Author
|
Topic: Need Help Getting Level Data (Read 2 times)
|
Lin
Guest
|
|
« on: May 28, 2008, 01:54:07 am » |
|
This isn't anything big, but I'm hacking Dragon Warrior Monsters (GBC Game) and I wanted to edit the level data. I just want to edit the tiles, not the events, npcs, or anything like that. If I'm correct, the tiles in rooms (Not the 8x8 tiles used in VRAM) are 32x32 px wide... Basically I need help on how to get them. I spent hours going through the memory editor, and changing every still byte I could (With automatic update on) and all I really changed was VRAM, color of myself, and some tiles. I also stood in one room and went to the memory editor and then moved, and checked for any bytes that switched. I did that throughout the whole ROM (Atleast with the bytes that weren't moving, cause I knew those couldn't be tiles), and I got nothing. I know that you can find where tiles are placed in a room through a memory editor, because VRAM is at the same place per room, yet has its own separate offset for real. I figured that level data was the same way, all of the bytes making up the level were in one spot for all rooms depending on which you are at, and then are somewhere else in the rom itself. Thanks for helping me if you can ~Lin
|
|
|
|
KaioShin
Guest
|
|
« Reply #1 on: May 28, 2008, 02:15:20 am » |
|
Do you want to edit the tile graphics or the tile placement?
To edit the later you have to read up on Tilemaps. I don't know the GB hardware anymore (I used to actually, but don't use it for 4 years and it's completely gone), but it should not be hard to find the tilemap in the ROM. Get a debugger and set write breakpoints to the tilemap and you'll see where it comes from.
|
|
|
|
Lin
Guest
|
|
« Reply #2 on: May 28, 2008, 02:28:17 am » |
|
Well, the only debugger for GBC I have is the one built into BGB. I barely know how to use it. The only thing I know about debuggers is if you put a breakpoint on a certain line and the rom runs into that line, it stops. So I don't know how to do what you said
|
|
|
|
Tauwasser
Guest
|
|
« Reply #3 on: May 28, 2008, 02:37:26 am » |
|
Open the rom in bgb. Play until you`re in the level you want to find the data for. Open up the Vram viewer. Look where you`re Screen is and find some vram offset that will get replaced when you walk in a certain direction (because the game reloeads directly from the rom, it does not keep all the block data in vram, that`d be with 32x32px 0x10 bytes for every block!). Set a watchpoint to that location and then play the game and walk in that direction. The debugger should break and you should be in the routine that reloads the tile data for that point of the map. Now you can fudge your way thru until you find where the tiles come from and then you should have the block assignment, or when you stepped even further, you have the mapdata.
cYa,
Tauwasser
|
|
|
|
Lin
Guest
|
|
« Reply #4 on: May 28, 2008, 03:06:39 am » |
|
Well, in BGB, I went to the VRAM viewer and got a tile I could modify (As much as destroy, or change the tile itself) and put a breakpoint on both of the offsets (Map address and tile address) and done all I could to the tile, and it doesn't break. I'm not sure I understand what you mean by changes when you walk towards it, because no tile in any game I have changes when you look at it.
|
|
|
|
Tauwasser
Guest
|
|
« Reply #5 on: May 28, 2008, 07:35:30 am » |
|
I knew I should have put pictures there... however I`m somewhat not at home, so I can`t. Anyway, ok. So the Map you`re standing on is in vram, 0:9800 or 0:9C00. However, when you first load a map up (such as returning from a save game, or entering a house), probably not all parts of your map are loaded right into this vram space. You can see the screen you`re currently looking at with the red border. Now, there might be some "scrambled" tile data left in vram from earlier maps and so, however it should not display all of your map (since most maps would be larger than that anywar I guess). Now, when you move in either direction you should see parts outside of your screen of the vram updating (so the player actually sees the map and not some random tiles). This is where you want to set a breakpoint! It will snap right when you start walking in that direction in the routine that reads the map data and puts the blockdata at the right places in vram.
cYa,
Tauwasser
|
|
|
|
|