Visual Boy Advance SDL H2
View Single Post
October 8th, 2011 (7:24 PM). Edited October 29th, 2011 by JPAN.
pokemon rom researcher
After getting tired of working on my latest project, I decided it was time for something more relaxed and less time consuming. So, I decided to implement some new functionalities (and fix some old ones) on VBA-SDL-H.
Let me start by saying, I didn't make VBA. So, all credit to the original work goes to Forgotten and the rest of his team, and to all other contributers which can be found on the readme file (which I didn't alter), or in the VBA-SDL-H page.
So, what did I do to this new version? The changes aren't that big. Basically, changed the old breakpoint system to a new version that is capable of conditional breaking, and added support for string-viewing using a character table (with some modifications). But, to enumerating them:
Changed the way old Break worked
All breaks are now stored independantly in a new structure, and on memory, four flags are mantained that indicate the type of break that is present. They can be of ARM, Thumb, Read or Write.
The old method replaced the code at the location with the breakpoint symbol, and when it stopped there, it was replaced it with the actual code. That caused a somewhat annoying bug where the original code would be lost, leaving you with BE00 as the only knonw instruction code.
The old breakpoint symbol is still available for work, though, so normal, homebrew code should work as intended.
Created Conditional breaks
With the new system in place, you can now break anywhere equaly. But sometimes, you may wish to break only if a certain value was reached.(For example, when working on the item codes, sometimes I had to wait until the value written on memory was the item one. It took several passes.)
This new code allow for such situations. You can now only break when a certain value is reached, or when a set of conditions are met.
Created Register breaks
You can set a break on register change, that will break if a certain condition dependant on the register happened. This type of break is very heavy on the emulator, and can reduce maximum speed. My tests showed a difference from ~500% speed with it off to ~200% with it on. That is a big difference. When not in use, you can disable this behaviour by typing
on the console.
Break on register may be useful for looping situations where you want to check certain values but not stop on that code every single time, or for loop-breaking interruptions that change a knonw register, but won't happen while only using next.
You can load a character table. It would work with the same one used with translhextion, and with some changes, would even print newlines and terminate strings correctly. With the
command, you can load such a table onto the emulator, and then with the
command you can see the results. You can disable and re-enable the table behaviour using
, if you want to switch between ASCII and your string type. The other 'm' commands (such as
), will always display ASCII, regardless of the table. That is because the Table entries can sometimes be quite big (5 characters long), and would create a new line, messing up the byte table.
commands, you can fill portions of memory with the byte to word of your choice.
Edit memory now accepts multiple entries
now allow for multiple consecutive entries. That means you can now enter any sequence of bytes you want, without repeating eb a number of times.
New quit commands
I got tired of trying to exit the debugger with
was the right command. So, now adding to those two we also have
to get out. More can be added easily.
Same reason as above, but for some others.
. More can be added if needed.
Added to the Symbol evaluator
has been here for a while, and is used naturally on pretty much all commands that require number parsing. It did not support, however negate and negative operators. Negative is placing a - before the expression (-0x50), negate is placing a ~ before the number (~0x1). Could probably add more if needed, but the native VBA parser separates by using space, so expressions cannot contain spaces.
The contents of the ZIP file include the executable (windows only), Source code (so unix users aren't left out, the code is GCC compatible) if you want to check out how it was implemented (some stuff are wierd looking, but I guarantee, it's for performance reasons).
For instructions on how to use the controls, use
for most instructions, or
for break register use,
for generic break help, and
help bm, bl, bd, bc
for specific help with break make (bt, bw, br, and the like), break list (bl, btl, bxl, bil, and the like), break delete (btd, bwd, bad, and the like), and break clear (bc, bic, bac, and the like) respectively.
PS: A modified, emulator-ready table is also given.
Bug fixed. It now always show the correct break on ARM and THUMB breaks
Also, added new features:
, you can copy blocks of data from one location of memory to another, like from the ROM to RAM, or RAM to RAM.
command, you can reload the currently open ROM, or open a new one by specifying the path afterwards.
Run commands from a text file
Creating a txt file with the commands you want to run (any of the defined debugger commands), then calling
with the file. You can use it to run long breakpoint commands, or resume debugging a code location through several sessions.
(1.0 KB, 264 views)
(Save to Dropbox)
(329.8 KB, 490 views)
(Save to Dropbox)
(1.80 MB, 329 views)
(Save to Dropbox)
Here are the links for my work
ASM Tutorial Document
Study on the special and special2 commands
*now all specials accounted for*
How to change multichoice boxes
Pokemon data decrypting (asm code)
Fire red map sizes and tile information
Pokemon Fire Red Hacked Engine
Currently working on:
Battle Script Documentation
Another large project
Joined Dec 2008
View Public Profile
Send a private message to JPAN
Find all posts by JPAN
Find threads started by JPAN
Ignore Posts by JPAN