Views: 51,600,859
Main | FAQ | Uploader | IRC chat | Radio | Memberlist | Active users | Latest posts | Calendar | Stats | Online users | Search 05-27-19 02:45 AM
Guest: Register | Login

0 users currently in ROM Hacking | 2 guests | 1 bot

Main - ROM Hacking - GBA tiles New thread | New reply


Celice
Posted on 07-04-07 06:43 PM Link | Quote | ID: 52246


Buzz Blob
Level: 37

Posts: 52/285
EXP: 320359
Next: 17894

Since: 04-06-07
From: Oroville, CA

Last post: 1890 days
Last view: 1851 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
Posted on 07-04-07 07:07 PM Link | Quote | ID: 52251


CHIKKN NI A BAAZZKIT!!!
80's Cheerilee is best pony
Level: 131

Posts: 389/5344
EXP: 26142592
Next: 282028

Since: 02-20-07
From: The Netherlands

Last post: 2702 days
Last view: 837 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
Posted on 07-05-07 03:36 AM Link | Quote | ID: 52378


Buzz Blob
Level: 37

Posts: 53/285
EXP: 320359
Next: 17894

Since: 04-06-07
From: Oroville, CA

Last post: 1890 days
Last view: 1851 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
Posted on 07-05-07 04:08 AM Link | Quote | ID: 52385


Ninji
Level: 34

Posts: 45/238
EXP: 243107
Next: 10544

Since: 05-26-07

Last post: 2266 days
Last view: 2215 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
Posted on 07-05-07 04:30 AM (rev. 2 of 07-05-07 04:31 AM) Link | Quote | ID: 52392


Buzz Blob
Level: 37

Posts: 55/285
EXP: 320359
Next: 17894

Since: 04-06-07
From: Oroville, CA

Last post: 1890 days
Last view: 1851 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 this will actually help someone, truly

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
Posted on 07-05-07 06:08 AM Link | Quote | ID: 52418


Ninji
Level: 34

Posts: 46/238
EXP: 243107
Next: 10544

Since: 05-26-07

Last post: 2266 days
Last view: 2215 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
Posted on 07-05-07 06:25 AM Link | Quote | ID: 52422


Buzz Blob
Level: 37

Posts: 56/285
EXP: 320359
Next: 17894

Since: 04-06-07
From: Oroville, CA

Last post: 1890 days
Last view: 1851 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
Posted on 07-05-07 07:13 AM Link | Quote | ID: 52433


Ninji
Level: 34

Posts: 47/238
EXP: 243107
Next: 10544

Since: 05-26-07

Last post: 2266 days
Last view: 2215 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
Posted on 07-05-07 07:24 AM Link | Quote | ID: 52435


Buzz Blob
Level: 37

Posts: 57/285
EXP: 320359
Next: 17894

Since: 04-06-07
From: Oroville, CA

Last post: 1890 days
Last view: 1851 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

Acmlmboard 2.1+3δ (2016-01-08)
© 2005-2016 Acmlm, blackhole89, Xkeeper et al.

Page rendered in 0.101 seconds. (340KB of memory used)
MySQL - queries: 71, rows: 100/0, time: 0.050 seconds.