Points of Required Attention™
Please chime in on a proposed restructuring of the ROM hacking sections.
Views: 88,490,296
Main | FAQ | Uploader | IRC chat | Radio | Memberlist | Active users | Latest posts | Calendar | Stats | Online users | Search 04-27-24 12:12 AM
Guest: Register | Login

0 users currently in ROM Hacking | 1 guest

Main - ROM Hacking - Chalvo 55 New thread | New reply


Naulahauta
Posted on 05-20-10 01:19 PM (rev. 2 of 09-01-11 01:48 AM) Link | Quote | ID: 131357


Red Paragoomba
Level: 19

Posts: 8/56
EXP: 30495
Next: 5282

Since: 10-27-09

Last post: 3705 days
Last view: 486 days
READ LAST POST, IT'S FAR BELOW



Chalvo 55 is a fun Game Boy game released only in Japan. I've gathered some notes from it as an effort to spark motivation for a possible editor. Let's begin!

When we jump to 0x18000, we see the bytes of the very first room of the game. Observe:

73 57 7D 57 57 7D 7D 57 57 57 7D 57 7D 57 57 57
55 01 01 01 01 01 01 01 01 02 02 00 00 00 00 00
55 01 01 01 00 00 01 01 01 02 02 00 00 00 00 00
58 01 01 00 00 00 00 00 02 02 00 00 00 50 51 51
00 00 01 01 00 00 00 00 00 00 00 00 00 77 57 71
00 00 01 01 01 00 00 00 00 00 00 00 00 5D 00 7E
51 51 79 5A 5B 00 00 00 00 59 81 5B 07 5D 00 53
73 57 76 00 00 00 00 00 00 00 00 00 00 5D 00 53
7F 00 5D 00 00 00 00 0E 00 00 00 00 00 82 00 53
55 00 83 00 00 59 5A 80 5A 5A 5B 00 00 5D 00 53
55 00 82 00 00 00 00 00 00 00 00 00 00 5D 00 7E
55 00 5D 00 00 00 00 00 00 00 00 00 00 5D 00 53
55 00 75 52 00 00 00 59 5B 00 00 00 50 74 00 7E
7F 00 53 55 00 00 00 00 00 00 00 00 53 55 00 53
55 21 53 6E 52 00 00 00 00 00 00 50 6C 55 22 53
6E 51 6C 54 6E 51 7C 51 51 7C 51 6C 54 6E 51 6C


The bytes correspond to the tiles. Even the sprites (the blocks and the enemy) are defined in the byte array!
You can edit these bytes how you wish and the changes will take place. The physical maps are also pre-defined, so blocks will always be blocks and diamonds will always be diamonds.

But how do we know what blocks do the bytes represent? Let's head over to 0x18C00. I won't paste all of the definitions, but just a few to give you an idea what I mean:

02 02 FF FF FF FF
02 02 66 67 86 87
02 02 A6 A7 C6 C7
02 02 A8 A9 C8 C9
02 02 B0 B1 D0 D1
FF FF A8 A9 96 97
FF FF 70 71 98 99
FF FF A8 A9 96 97
02 02 70 71 90 91
02 02 FF FF FF FF
02 02 7E 7F 9E 9F
02 02 C0 C1 C8 C9
02 02 7C 7D 9C 9D
02 02 0D 0E CE CF
FF FF 1B 1C 3B 3C
FF FF 40 41 60 61
FF FF 80 81 A0 A1
02 02 AA AB CA CB


Compare it to the graphics page found in 0x48000. You can view it in Tile Molester or whatever you like.

So let's take the first 6-byte combo, 02 02 FF FF FF FF. The first two bytes, '02 02' mean "this is a tile, not a sprite". The four bytes after that define the 8x8 tiles used to build the block.
This block is constructed from FF, FF, FF and FF. It is the single 'air' block. And since this was the first defined block, it is '00' on the level block data array. Check back on the map on the beginning of the post; where there's air, there's 00s.
The next one, 02 02 66 67 86 87, is a crumbled block. If you look at the tilemap and take tile 66, 67, 86 and 87, you will make that very block. This is 01. Once again, if you look at the data array up there, there are 01s here and there, and each is a crumble block.

But now, let's jump to the ones that begin with FF FF. That means "This is a sprite".
The first FF FF-prefixed combo is FF FF A8 A9 96 97. Take tiles A8, A9, 96 and 97, and what do you know, you build a pink block similar to the one seen in the left and right edges of the first room. The behavior is defined elsewhere. And this is block number 05, so using 05 anywhere in your level will bring that pink block sprite right there. Simple as that!

Another fun thing is that if you change that FF FF prefix to 02 02, the enemies turn into stone:


Right now I've gotta flee but I'll be back later today with more data. Stay tuned!

____________________
oh

blackhole89
Posted on 05-20-10 02:04 PM Link | Quote | ID: 131358


The Guardian
Moloch whose eyes are a thousand blind windows!
Level: 124

Posts: 3118/4196
EXP: 21533893
Next: 302708

Since: 02-19-07
From: Ithaca, NY, US

Last post: 472 days
Last view: 84 days



Are there any other meaningful tile prefixes apart from 02 02 and FF FF? In the age of expensive memory, wasting 2 bytes on what is essentially 1 bit worth of information would seem ridiculously wasteful to a degree that it would be surprising if the developers went down that path.

____________________



Kawa
Posted on 05-20-10 05:10 PM Link | Quote | ID: 131363


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

Posts: 3678/5344
EXP: 30946235
Next: 716746

Since: 02-20-07
From: The Netherlands

Last post: 4498 days
Last view: 2634 days
That's one easy-ass format as far as it's described here. If I had a library for Gameboy graphics, I'd make that editor in no time!

____________________
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

Naulahauta
Posted on 05-20-10 07:27 PM Link | Quote | ID: 131364


Red Paragoomba
Level: 19

Posts: 9/56
EXP: 30495
Next: 5282

Since: 10-27-09

Last post: 3705 days
Last view: 486 days
blackhole89: You're most likely right. It must be a bitwise thing, but so far I've only encountered FF FF and 02 02. I'll fool around with more bits later today.
Kawa: Haha, yeah. Surprisingly simple alright.

Once again I came to only step by. I gotta go again but I'll be back sooner or later.

____________________
oh

Naulahauta
Posted on 09-01-11 02:11 AM Link | Quote | ID: 146576


Red Paragoomba
Level: 19

Posts: 53/56
EXP: 30495
Next: 5282

Since: 10-27-09

Last post: 3705 days
Last view: 486 days
Over 1 year bump, ooooh wow.

Well, anyway, I've documented pretty much everything about this game. Well, not everything, but enough to make a functional editor.
What's left is still some minor (though a few crucial) things. If anyone has a good, in-depth comprehensive Z80 assembly tutorial, please link me to it. I know 65816 but only because of the amount of tutorials and Geiger's amazing debugger. I've tried to disassemble the game with both, Game Lad and NO$GMB and both give me good results, but I can't understand anything.

Well, regardless, here's a few things one should know before diving into the ROM map:

-Level data - How levels are built
-Block/sprite data - What levels are built from
-Demo playback data - What happens after you wait in the title screen for the demo
-Door/transition data - What room you go into upon door/teleport

And finally, the ROM map. Includes enough information to create a hack. May include some sentences that sound stupid... I'm not that good when it comes to explaining how stuff works, but I tried my best :X If anyone has any questions I'm sure I can answer.

Spoiler:
If the above link's sprite elaborations look strange, here's another version.


____________________
oh

Main - ROM Hacking - Chalvo 55 New thread | New reply

Acmlmboard 2.1+4δ (2023-01-15)
© 2005-2023 Acmlm, blackhole89, Xkeeper et al.

Page rendered in 0.020 seconds. (347KB of memory used)
MySQL - queries: 47, rows: 71/72, time: 0.015 seconds.