So I've got a mad idea of creating a tool, that could make debugging process easier, basically, thought the ability to show the result of operations. But eventually, I went deeper, and created... SANDBOX!
SANDBOX is my first program for Sega Genesis, it's a powerful tool to test and debug your code, which even can be used to learn assembly language and how M68k processor works.
The idea is very simple - you write ASM-code, include it into SANDBOX (including process is automatized), run it in emulator and SANDBOX will provide you abilities to see RAM space, registers etc. But the main thing here is... extra commands! (actually macros)
There is OUT command to output any kind of data, PAUSE command to pause program at any point and some others.
Let's have a real example.
Imagine that you don't know, what BCC does, and want to figure this out, so you can write a program:
out "BCC didn't work!"
out 'BCC worked!'
And when you compile and run it in SANDBOX, you'll see the result:
Yeah, you can preview source code in SANDBOX itself!
BCC didn't work? Try another value, experimenting!
There are some sample programs, that will learn you how to do some useful things about your code (and yes, BCC example is there, but more completed and advanced, so you might wanna check it out)
You just put ASM-files in a specific folder, and any files there will be compiled and included into SANDBOX, letting you run several programs:
I guess just outputting text isn't enough for good debugging, so there are commands to output numeric values, example:
move.b #$F0,d0 ; let's put $F0 to d0 and see it in different modes!
outb d0 ; see as Unsigned Hexadecimal
outb d0,signed ; see as Signed Hexadecimal
outb d0,dec ; see as Unsigned Decimal
outb d0,dec+signed ; see as Signed Decimal
outb d0,bin ; see as Unsigned Binary
outb d0,bin+signed ; see as Signed Binary
outw d0 ; see as Unsigned Hexadecimal word
outw d0,signed ; see as Signed Hexadecimal word
outb d0 ; see as byte
outl d0 ; see as unsigned
outl d0,signed ; see as signed
outl d0,trim+signed ; see as signed with triming!
Result of running it:
Also, filling RAM example:
SANDBOX now is in beta state, there can be some bugs, Source code viewing doesn't work properly. If you notice any unexpected crashes, glitches, please report.
Don't forget to read readme.htm.
Secret message for Russian hackers: На ЦИСе выложу чуть позже, потерпите. =Ъ