OK, so I analyzed the other method that is writing text. I actually like that one better as I don’t have to care about the charmem.
So next steps are the same as before. Write something that changes the original addresses to something else and alter the method to only write 18×6 letters. After that add support to the UI.
bigmak wrote:
So, fishing has 2 totally different ways it creates the text that it displays ?…odd (to me at least)
-Eric
There is a third one used for single letters. There might be another one for when the text is written letter by letter but I’m not sure.
What makes the whole thing tricky is that they never reserve a dedicated spot in charmem for letters. They just move stuff around overwriting parts with game graphics.
I investigated a bit and found the method that is writing at least some of the other text. Surprisingly, it is completely different from the one before.
The first one would store images of letters in the chramem and then point to the letters from the bgmaps. This one actually treats the text like images, meaning it just writes an image of the text into the charmem and then displays that on the bgmap. That image of course is generated from the alphabet stored in the rom. So the most elegant way should to change the method that writes those text-images into the charmem.
OK, so I started writing the UI part of the Patching Util. Till now most of it happened in code only. I don’t necessarily need a UI like that but I though maybe someone wants to make a translation for a different language or something. Hopefully it will also make things easier later.
I encountered 2 problems ahead. First I don’t have numbers in my alphabet (I planned to use the one out of the orignal alphabet but that won’t work). Second there is yet another method writing text that needs to be altered as well.
Attachments:
Good news. I found the code that overwrites my chars. It was kind of strange though as the method doesn’t write into the usual charmem addresses but directly into the mirrored area. So it would write to 0x0007A000 instead of 0x0000E000. However, it was rather easy to bypass and the game now displays properly mapped strings in the stage selection menu.
Next I will extend my UI to make the sentence patching a bit easier.
Wyndcrosser wrote:
That’s awesome. Way better than me, I just edited the graphics in a tile editor program. lol.
What tile editor program did you use?
Hopefully, I managed to solve the problems I explained earlier. There is no charmem that is not used at some point. So I decided to write my alphabet into the area where the original game stores the Japanese letters most of the time. The problem is that there is not much space. My previous attempt would draw 16×8 letters but still store them as 16×16. That way I didn’t need to change the drawing code allot. However, I had to do that now. Basically, I rewrote how the game calculates the offset for the alphabet.
It works for now which means I am back to where I was when I made the video. Of course the game overwrites the alphabet with it’s own as soon as you start the actual game. So the next step will be to stop the game from doing that.
thunderstruck wrote:
speedyink wrote:
This does seem to be progressing quite quickly.Yeah, stuff was rather easy till now. I encountered a problem yesterday though. As soon you start the actual game it overwrites part of the alphabet with game graphics. Unfortunately the part where I store my latin letters. So I guess the smarter way is to write the latin alphabet into a free area in the charmem. Let’s just hope there is one.
Might look into this later today.
So this actually turned out to be a problem. There is some space at the end of the charmem left, it is not much though. So I wrote some code that copies my alphabet into the free area. Now I need to rewrite my altered code to use that alphabet. Maybe tomorrow…
speedyink wrote:
This does seem to be progressing quite quickly.
Yeah, stuff was rather easy till now. I encountered a problem yesterday though. As soon you start the actual game it overwrites part of the alphabet with game graphics. Unfortunately the part where I store my latin letters. So I guess the smarter way is to write the latin alphabet into a free area in the charmem. Let’s just hope there is one.
Might look into this later today.
Changing the letters in the name menu was pretty easy. Fount the letters in the rom and let them point to my latin alphabet.
Here is a video showing the progress so far:
Turned out searching for strings in the rom isn’t that simple because of how the game switches alphabets.
However, I just went ahead and replaced all of the strings in the first menus (everything you can see before you start the game) by using the addresses I got from the debugger. That was quite efficient already so I might just do it that way. I will still add something to the UI to speed things up a bit.
The menu that allows you to enter your name is still broken though. I found the code that writes the letters there. So the next step is to trick it to load something else.
Benjamin Stevens wrote:
thunderstruck wrote:
Figured out what the problem was. Just need a couple of changes in the original code. I can now replace many sentences in the rom without problems. The attached screenshot shows one screen I use for testing. Just ignore the messed up Japanese.I replaced those sentences by getting their addresses from the debugger. Next step will be to automatically search the text in the rom.
Very nice! You’ve certainly got some great patching work going on there.
I wouldn’t be able to do it without your translation.
I don’t want to create a wrong impression though. There are still plenty of things that need to be done. But the first steps are done.
Figured out what the problem was. Just need a couple of changes in the original code. I can now replace many sentences in the rom without problems. The attached screenshot shows one screen I use for testing. Just ignore the messed up Japanese.
I replaced those sentences by getting their addresses from the debugger. Next step will be to automatically search the text in the rom.
Attachments:
Thanks guys, I’m trying my best.
I had to overcome some problems but I managed to write my text replacement code. It generally works fine when I replace a single sentence. It breaks as soon have more, most likely due to the changes I made to the original method.
Will check tomorrow.
After a longer break I decided to work on this again. I mainly cleaned up my patching tool, separating code and all that stuff.
I already have a Latin alphabet patched into the rom and rewrote a part of the code so that it’s using 8×16 characters instead of 16×16.
I now started writing code that checks if there is a translation for a given text. If so it will use the 8×16 characters and the latin alphabet. I’m trying to keep this as generic as possible in case there are is other code that needs rewriting.
After that I will add the mapping to the UI of the patching tool so that I define translations more easily.
HP Lovethrash wrote:
What kind of work goes into making a level editor for a VB game anyway?
What you want to do first is reverse engineer the game. Usually I create different save states and compare memory dumps (I use mednafen). For example, in Faceball I would shoot one of the breakable walls and search the part in the memory that changed.
When you know where in memory the information of your interest is saved, you want to know how it got there. So you add a write breakpoint on that address to see who writes there. You then check the code to figure out where the information is stored in the rom. With knowing that you can change it using a hey editor and alter the behavior.
Using this method you reverse engineer the data structures and the code loading it. You then want to change the game to load data from somewhere else in the rom (some free spot). There you store data (e.g. new levels) in the same format that you reverse engineered. Of course you could also override what has been stored originally.
However, when you know the data structures and the code that is loading them you can go ahead and build you level editor. I usually use c# because it’s simple and yet powerful. Your level editor simply writes your levels into the ROM using your reverse engineered data structures.
Of course, the more you know about the game the more you can change.
danielps wrote:
The pull request has been accepted, but it’s not yet on a stable release. You can either build it from source or wait for a nightly at bin.rada.re.
Totally missed the link to the nightly build. Works great, Thanks. Makes reading asm much easier then using the mednafen debug feature.
The code patching capabilities would be an great addition for me. But I guess only a handful others would use it.
I saw your video running my Snatcher demo on a 3DS btw. Cool stuff.
danielps wrote:
For those of you who don’t know, radare2 is a reverse engineering framework. It comes with a nice set of tools to help you visualize and document disassembled code. Read more about it here.I recently implemented support for the V810 architecture, which means you can now use it to disassemble and analyse VB ROMs.
The assembler isn’t implemented though, so the code patching capabilities aren’t there. I could do it if there’s enough interest, but I have no plans at the moment.Anyway, I thought I’d mention it here because someone might find it useful.
I never used radare2 so I just tried it a bit. I understand that your pull request has not been accepted yet? At least I could find the asm_v810.dll anywhere in the binaries package. Also changing the architecture with “e asm.arch=v810” didn’t work.
Could you maybe post it here so that I don’t have to compile it myself?
Other then that I managed to dissemble some functions from my test rom, just with the wrong architecture. This article helped a bit: http://canthack.org/2011/07/adventures-with-radare-1-a-simple-shellcode-analysis/
However, I’m overwhelmed by the amount of features that are there. Could you maybe just throw some basic commands/features at me so that I know how to get started?
Sounds cool. Will check it out later. I would definitely be interested in the code patching capabilities.
Lester Knight wrote:
I find the eBay (auction site) concern ridiculous. If you choose to honestly represent your property and someone else chooses to buy it, what is the problem? If someone lists a copy on eBay at the price they paid (or cheaper), and the auction goes for much more, why is that taken personally by others? That sale would clearly be a demonstration of demand. A demand for a game made in a limited run, like ALL homebrew releases. As a seller, I would be more upset that a community was so enraged by this listing that they would go out of their way to stop it. In fact, it would have nothing to do with anyone but the two involved in the sale.This moral high ground for Virtual Boy reproduction/homebrew game sales has become a concern for me.
I agree. As long as you play it fair everyone should have the right to resell.
MineStorm wrote:
The only problem I have is that some where allowed to buy more than one copy. It’s obvious what they intended to do from the start. Plus, it denied others getting the game.
I think this was done because of the multiplayer part. We need VB online support.
Wyndcrosser wrote:
Hi Thunder,Any more details on Virtual Fishing? I know you’re probably busy with Snatcher too 🙂
I somehow wasn’t in the mood for vb programming lately. I usually take a break during the summer time to follow other hobbies.

