Original Post


I attached a zip with new a RB build I did where I fixed a few audio related things (mostly noise channel related). There’s no huge changes, so you’re not likely to notice much of a difference, but I figured I’d post it anyway.

The other thing is… there’s also a build called reality_boy_rommap.exe . This build creates a file (or files) mapping out the ROM, determining which parts are code and data, and also code alignment. It does this by tagging all ROM accesses as either code (which means it was fetched by the processor to execute), or as data (meaning it was read with the load operation). While there may be some cases where this method doesn’t work, I don’t have any reason to believe any of the existing VB games do any of them, and this should at least be a good reference.

What I’m requesting is if you plan on playing a game in the emulator for a while, if you could use the _rommap version, and then zip/post to this thread the .map file that gets output, it’d give us a lot of information regarding the ROMs and save a lot of time for those of us looking to hack/modify/reverse engineer ROMs.

Since different parts of the ROMs get used depending on where you’re at in the game, that’s why I said if you plan on playing for a while, since just starting level one will only touch parts of the ROM related to the startup and first level. You can incrementally post them though, if you can start later in the game, like Wario Land or Teleroboxer… I can merge multiple files to get a master map (which is what I plan on doing anyway).

Also, for those looking to hack ROMs, you can use this by pressing T in the game to dump the current map to file and clear the map… then do whatever you want, like start a level, then hit T again to dump any accesses since the last T press. If you look at the file, it’ll be a file the same size as the ROM, full of 0’s, except the character D for data, I for instruction (first byte of the instruction), and C for code (rest of the instruction, tells whether it was 16 or 32 bits).

The location of the characters corresponds to the location in the ROM. So, if you want to know where the speech data in Red Alarm is, press T just before “T&E Soft Presents”, then press it again right after, and look at the .map that gets output and look for the cluster of D’s… it’s likely there. The .map file names get incremented each time you output a map (and it outputs a final one when you exit RB), though they’ll get overwritten if you run the same ROM in Reality Boy again.

You’ll also need the normal libraries that RB needs… if you have an existing version, you should be able to just drop it in the same directory… otherwise download RB, then drop these in the directory. Let me know if you have any problems w/ it.

BTW, I’ll post several utilities to use w/ the ROM maps in the next day or two (merge and mask).


44 Replies

DogP wrote:
There could be a file name length issue… IIRC, the files are referenced by a 255 byte string, so if you’ve got a really long path, it may hit the limit.

Actually, in my version of the front-end at least, the file paths (emu and ROM) are stored in 2048-byte strings. But, I kinda goofed because the command-line options (minus the emu executable path) is stored in a 512-byte string… :doh:

Microsoft’s docs for ShellExecute don’t say if there is a limit to the lengths of strings passed to it, so I’m going to increase it to 4K or so and test it out with a really long path.

EDIT: I increased the path variable size and also now use _snprintf() so there shouldn’t be anymore buffer overruns even if the size is exceeded (it’ll just cut off the last few options). I tested it on:

“C:\Documents and Settings\\My Documents\Really Big, Long, and also Huge Test Path\Which is also nested quite deeply\And is used to store only a single Virtual Boy ROM Image\Space Invaders Virtual Collection (J) [!].vb” and it worked a treat 😀

Attached you should find a new executable to test.

  • This reply was modified 12 years, 3 months ago by RunnerPack.

I mean inside Reality Boy… I don’t remember if the ROM path is handled differently, but I’m pretty sure the SRAM path is 255 characters (and so is my ROM map, since I just copied a lot of the SRAM code for that).


Yup, that worked, at least for the front-end side of things!

At least, I think it worked… I’m running the app through Wine on Linux right now instead of Windows 7… Not sure if Wine would’ve handled it properly before. Probably not.

It’s been a while since this thread was updated… I’m thinking, could someone add this new release of Virtual Boy to the emulators section? Since there’s some improvements in emulation and the last release of RB was in 2008, it seems significant enough to me to update the section.


Write a reply

You must be logged in to reply to this topic.