Original Post

I want to write a simple I/O program that extracts BGMaps from VB Wario Land ROM and therefore all sprites from the game automatically.

Extracting chars from a rom is easy but manual areangement of them is difficult. The BGMaps that specify their positions exist though. Do I was wondering if:
-Can BGMaps be extracted from ROMS? How can I detect the BGMap structure in a file?
-BGMaps contain RAM info, not ROM info. So is anyone familiar with how Wario Land loads its tiles, and if so can this info be extracted as well?

If we can extract the maps and the loaded tile sets, then the sprites in the game can be all arranged automatically. Let’s discuss if this is possible.

5 Replies

-Can BGMaps be extracted from ROMS? How can I detect the BGMap structure in a file?

It depends on the game. If they’re uncompressed, you can spot them in a hex editor as they are made up of 16-bit values that are usually similar in range. In that case, extracting them would be easy, but the hard part would be finding the charsets.

-BGMaps contain RAM info, not ROM info. So is anyone familiar with how Wario Land loads its tiles, and if so can this info be extracted as well?

If the charsets are uncompressed, you can spot them with the VB Ripper Utility or the VeeBee Utilities.

If either of these are compressed, the best/easiest way to find them is to use an emulator and place a write breakpoint on addresses where charmaps and BGMaps are usually loaded. For charmaps, most games seem to use 78000, ignoring the uncontiguous areas at lower addresses (but note that any number of characters may be loaded at any address in character memory). BGMaps start at 20000, 22000, etc.; they are usually loaded so they take up the upper left corner of the BGMap segment if they don’t use it completely. Look at the memory map. Once you’ve found the code that loads/decompresses the data, disassemble it so you understand the format. Repeat until exhausted. 😉

Some emulators (at least Red Dragon) can also show you the contents of BGMap memory during execution, though taking screenshots of that and then editing them would also get tedious quickly.

This might help: https://www.vg-resource.com/showthread.php?tid=21526

Thanks for the advice! Which emulator can set breakpoints?

As far as I know, only Mednafen currently has write breakpoints. Press Alt+D to enter the debugger, then Shift+W to set write breakpoints (separated by spaces).

This is all assuming that the images you want are composed of BGMaps stored in the ROM. It’s entirely possible for the game to generate the contents of certain BGMaps “on-the-fly”, especially for characters with a lot of “moving parts” like Wario himself. This kind of thing will be caught by the breakpoints, but since it’s not copying anything, the code will look a bit different.

And then there are images composed of a collection of Objects. I don’t know if this technique is used in Wario, or any other commercial VB game, but it’s a possibility.

RunnerPack wrote:
This is all assuming that the images you want are composed of BGMaps stored in the ROM. It’s entirely possible for the game to generate the contents of certain BGMaps “on-the-fly”, especially for characters with a lot of “moving parts” like Wario himself. This kind of thing will be caught by the breakpoints, but since it’s not copying anything, the code will look a bit different.

And then there are images composed of a collection of Objects. I don’t know if this technique is used in Wario, or any other commercial VB game, but it’s a possibility.

It’s possible that Wario is a collection of objects. Which means his “special purpose” animation data that describes the movement of his objects would need to be found as well. Luckily most enemies in the game do not look like they are made from objects.

Also if the game has any dynamic loading of chars, that too could be an issue for deciding which BGMap lines up with which load.

This really requires a good understanding of how the game works. So we’ve got some assembly to read!

 

Write a reply

You must be logged in to reply to this topic.