| |||
Views: 88,490,808 |
Main | FAQ | Uploader | IRC chat | Radio | Memberlist | Active users | Latest posts | Calendar | Stats | Online users | Search | 04-27-24 03:09 AM |
|
Guest: Register | Login |
0 users currently in ROM Hacking | 3 guests |
Main - ROM Hacking - GBA tiles | New thread | New reply |
Celice |
| ||
Buzz Blob Level: 39 Posts: 52/285 EXP: 379775 Next: 24996 Since: 04-06-07 From: Oroville, CA Last post: 3687 days Last view: 3648 days |
How are they arranged when on screen? I've only really messed around with the NES, so there wasn't much of an exception to searching for a tile's hex in the order on-screen. But I tried this method on the GBA a few months ago and no dice.
Is it something that's a per-basis kinda thing or and I just going about it wrong? I was wanting to edit how a menu's TSA is, to make use of some new tiles I had made; I wanted to have more than three tiles per menu box. |
Kawa |
| ||
CHIKKN NI A BAAZZKIT!!! 80's Cheerilee is best pony Level: 138 Posts: 389/5344 EXP: 30946537 Next: 716444 Since: 02-20-07 From: The Netherlands Last post: 4499 days Last view: 2634 days |
Two bytes an onscreen tile. Most of the bits are tile index, four for palette index, two for flip.
They go in a matrix of 32x32 for small, square maps and 32x64 for both tall and wide maps. ____________________ Wife make lunch - Shampoo Opera - give it a spin Spare some of your free time? <GreyMaria> I walked around the Lake so many goddamn times that my sex drive was brutally murdered Kawa rocks — byuu |
Celice |
| ||
Buzz Blob Level: 39 Posts: 53/285 EXP: 379775 Next: 24996 Since: 04-06-07 From: Oroville, CA Last post: 3687 days Last view: 3648 days |
/me tilts head
I didn't completly catch that. Maybe a more visual example? You have to remember that I've only done so much as searching for '02 03 12 13' for a tile usually._. |
smkdan |
| ||
Ninji Level: 36 Posts: 45/238 EXP: 288665 Next: 19445 Since: 05-26-07 Last post: 4063 days Last view: 4012 days |
It looks like the tiles are laid out like this then.
ppppvhcc cccccccc palette, flip/mirror and character index. NES tilemaps are stored with the plaette info seperate and just had a single byte for the tile. GBA has all the info and the tile index sharing 2 bytes each. You won't find them searching for the character index alone. |
Celice |
| ||
Buzz Blob Level: 39 Posts: 55/285 EXP: 379775 Next: 24996 Since: 04-06-07 From: Oroville, CA Last post: 3687 days Last view: 3648 days |
How does that translate into XX XX (2) bytes :? And how does a character index work with so many entries, or in other words, why are there so many 'c'?
:X EDIT: does it sorta go as X Y ZZ, with X being the pallete (0~F), Y being a flip (?) and ZZ being the actual tile-ish? |
smkdan |
| ||
Ninji Level: 36 Posts: 46/238 EXP: 288665 Next: 19445 Since: 05-26-07 Last post: 4063 days Last view: 4012 days |
Can't boil it down to seeing it clearly from nybbles / single hex digits alone. Arrange the 16 bits to how you see fit and convert it to hex. There's your 'translation'. Providing the game sends the tilemap data straight from rom to vram, the byte order is reversed.
If I have a tile with palette 3, flipping and no mirroring and the tile reference was 25 I'd have: ppppvhcc cccccccc 00111000 00011001 3819 hex, reversed order (1938) if stored plainly in ROM. There's 10bits of 'c' so 1024 unique tiles can be indexed. |
Celice |
| ||
Buzz Blob Level: 39 Posts: 56/285 EXP: 379775 Next: 24996 Since: 04-06-07 From: Oroville, CA Last post: 3687 days Last view: 3648 days |
Alright, I get part of it. But I've never dealt with bits (isn't that binary?). I only really have two questions now: one, are the indexs relative to the image, such as the first tile of the first row is 00/01, or could it be more obscure?; and the second, do you know of any tutorials which can help me out in bit-work? I don't understand how that taken apart can mean there's the third pallete being used with a vertical flip, and with the tile in question at 25. All I can do really is take that and actually ocnvert it to hex, and not die in the process ._.;; |
smkdan |
| ||
Ninji Level: 36 Posts: 47/238 EXP: 288665 Next: 19445 Since: 05-26-07 Last post: 4063 days Last view: 4012 days |
I only really have two questions now: one, are the indexs relative to the image, such as the first tile of the first row is 00/01, or could it be more obscure?
The character indexes are relative to whatever location of vram the game designates to store the tiles. The sequence they appear on screen in doesn't affect it. I don't understand how that taken apart can mean there's the third pallete being used with a vertical flip, and with the tile in question at 25. All I can do really is take that and actually ocnvert it to hex, and not die in the process ._.;; ppppvhcc cccccccc 00111000 00011001 0011 = 3 ppppvhcc cccccccc 00111000 00011001 1 = yes for flip ppppvhcc cccccccc 00111000 00011001 0 = no for mirror ppppvhcc cccccccc 00111000 00011001 00000011001 = 25 for tile index |
Celice |
| ||
Buzz Blob Level: 39 Posts: 57/285 EXP: 379775 Next: 24996 Since: 04-06-07 From: Oroville, CA Last post: 3687 days Last view: 3648 days |
... I'm stupid D:
I realized that 0;1 meant off/on, and the other stuff made sense as well. I use Windows' Calculator to convert stuff, and I had tried to get 25 from 11001. I got 19, but I just now realized that that's in hex: 19->25 in decimal <.> I'm going to try and work through this later on when I need it, but it seems like I got it down. mucho thanks ^__^ |
Main - ROM Hacking - GBA tiles | New thread | New reply |
© 2005-2023 Acmlm, blackhole89, Xkeeper et al. |
MySQL - queries: 72, rows: 100/101, time: 0.014 seconds. |