+  RHDN Forum Archive
|-+  Romhacking
| |-+  General Romhacking
| | |-+  So it seems there's something about GBA graphics that I'm not getting.
Pages: [1]
Author Topic: So it seems there's something about GBA graphics that I'm not getting.  (Read 1 times)
Ryusui
Guest
« on: October 19, 2008, 04:00:15 am »

It was a godsend when I looked in the Wan Wan Meitantei ROM and discovered, ripe for the taking, a full ASCII font I could use for adding my precious extra bit to each password character. Of course, wedging it into the available VRAM took a bit more doing; it was originally positioned at 600F800, but with some tinkering I was able to put it into the free space at the end of the first half of VRAM, at 6007400 instead.

But now I've got a problem. I can't seem to figure out how to make the BG0 tilemap which displays the password on screen point to the first half of VRAM instead. Tile 0 is still 6008000, and for the life of me I can't figure out how to get it to display a tile in the first half of VRAM.

Of course, the obvious answer is "it's impossible and you're screwed", but would someone have the decency to tell me just what exactly is going on here?
KC
Guest
« Reply #1 on: October 19, 2008, 04:18:53 am »

Guess it's this one, quoted from gbatek:
Quote
4000008h - BG0CNT - BG0 Control (R/W) (BG Modes 0,1 only)
400000Ah - BG1CNT - BG1 Control (R/W) (BG Modes 0,1 only)
400000Ch - BG2CNT - BG2 Control (R/W) (BG Modes 0,1,2 only)
400000Eh - BG3CNT - BG3 Control (R/W) (BG Modes 0,2 only)

  Bit   Expl.
  0-1   BG Priority           (0-3, 0=Highest)
  2-3   Character Base Block  (0-3, in units of 16 KBytes) (=BG Tile Data)
  4-5   Not used (must be zero)
  6     Mosaic                (0=Disable, 1=Enable)
  7     Colors/Palettes       (0=16/16, 1=256/1)
  8-12  Screen Base Block     (0-31, in units of 2 KBytes) (=BG Map Data)
  13    Display Area Overflow (0=Transparent, 1=Wraparound; BG2CNT/BG3CNT only)
  14-15 Screen Size (0-3)

Internal Screen Size (dots) and size of BG Map (bytes):

  Value  Text Mode      Rotation/Scaling Mode
  0      256x256 (2K)   128x128   (256 bytes)
  1      512x256 (4K)   256x256   (1K)
  2      256x512 (4K)   512x512   (4K)
  3      512x512 (8K)   1024x1024 (16K)

In case that some or all BGs are set to same priority then BG0 is having the highest, and BG3 the lowest priority.
You'll have to change the Character Base Block.
Ryusui
Guest
« Reply #2 on: October 19, 2008, 02:28:54 pm »

Well, crabadonk. So much for that "genius idea". ^_^;

Looks like I'm gonna have to figure out some way to wedge it into the second bank...

EDIT: Aaaaand done. I fit it in before the numeric font. Can't believe I didn't think of it before. Ideally, I'd also relocate the numeric font itself to the blank space that the ASCII font used to go into, but the game does some weird stuff when I try that.

The fun part? The game actually uses the address I modified to determine what tiles are used to print numbers, so I only had to hack the offset in one place. Next step: password fun. :3
« Last Edit: October 19, 2008, 06:57:26 pm by Ryusui »
Pages: [1]  


Powered by SMF 1.1.4 | SMF © 2006-2007, Simple Machines LLC