GBA/DS LSD ordering.

Discussion in 'Nintendo Game Development' started by Piglet, May 30, 2008.

  1. Piglet

    Piglet Spirited Member

    Joined:
    May 28, 2008
    Messages:
    175
    Likes Received:
    0
    I want to use sub-pixel enhancements for text on the GBA/DS. Can the colour order be confirmed. For people who don't know the trick, the LSD makes a pixel using 3 columns thus:

    RGB
    RGB
    RGB

    This (assuming 31 for all 3 colours) then you get a white pixel. Now, look at this

    -GBR
    -GBR
    -GBR

    The left pixel has the R set to black and the G & B on full brightness. On the next pixel, only the red is set. Thus the white (or any shade of gray) pixel has moved right by 1/3 of a pixel. It only worksd with grayscale bot man, does it make for great, smooth graphics and scrolls. Imagine, the DS suddenly has an X resolution of 768 pixels.
    I wrote a scroller which used the system and it worked like a charm. I always outline the text with a black pixel to avoid fringing. You cannot use it with coloured images so I use 2 sets. One grayscale (and triple X-res) and then another using only single pixel resolution.
     
  2. devzone

    devzone Robust Member

    Joined:
    May 20, 2008
    Messages:
    248
    Likes Received:
    1
    This is similar to the "clear type" font resolution enhancement used on laptops
    Its nice to see the idea being tried on the GBA/DS, would you considure posting your demo code ? It would be nice to see it in action.
     
  3. babu

    babu Mamihlapinatapai

    Joined:
    Apr 15, 2005
    Messages:
    2,945
    Likes Received:
    3
    LSD = LCD? ;-)
    iirc. the subpixel ordering is different between the lower and upper screen. (not 100% sure could remeber wrong)
     
    Last edited: May 30, 2008
  4. Piglet

    Piglet Spirited Member

    Joined:
    May 28, 2008
    Messages:
    175
    Likes Received:
    0
    Wow, I can believe that, with one being a touch-screen. On the GBA I think you could swap the order (or rather, which data went where) that may have been in there for the BIOS to change should a different LCD be used...
     
  5. devzone

    devzone Robust Member

    Joined:
    May 20, 2008
    Messages:
    248
    Likes Received:
    1
    I guess you could always put a single white pixel on each screen and then look at them with a magnifying lens
     
  6. Piglet

    Piglet Spirited Member

    Joined:
    May 28, 2008
    Messages:
    175
    Likes Received:
    0
    Oh, it's easy to test, but can I assume it will always the same. On the GBA, I think they had a BIOS thingy that could swap the outputs due to colour order. Unless I can read that value, or know it will not change, then I cannot use it..
     
  7. devzone

    devzone Robust Member

    Joined:
    May 20, 2008
    Messages:
    248
    Likes Received:
    1
    to be safe you could always add a config menu to your program that allows a choice of lcd color modes :shrug:
     
  8. Piglet

    Piglet Spirited Member

    Joined:
    May 28, 2008
    Messages:
    175
    Likes Received:
    0
    I could, thats one way, but it is.... inellegant and I'm not sure how Nintendo would take it. I BET that hidden away somewhere is a method of finding out (there was on the DS) and, if Nintendo accept the product then they SHOULD tell me.
     
  9. babu

    babu Mamihlapinatapai

    Joined:
    Apr 15, 2005
    Messages:
    2,945
    Likes Received:
    3
    you could allways check with the people over at dsdev.org's forum. They could probably help you in the right direction. :)
     
sonicdude10
Draft saved Draft deleted
Insert every image as a...
  1.  0%

Share This Page