When you coding some stuff for your hack, the debugging process can be absolutely awful. You aren't able to see the result of instructions in the code, generally having just to guess where the mistake is and trying to fix it with trial and error method. If your code is big, it's a real headache. Even being able to see RAM, VRAM, you can't control everything, for example, you can't be sure, if some part of your code works or not, if branch command branch or didn't work because of some issues.
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:
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:
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.
Download
Secret message for Russian hackers: На ЦИСе выложу чуть позже, потерпите. =Ъ
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:
Syntax Highlighted Code: ASM
move.w #$10,d0
cmpi.w #$20,d0
bcc.s BCCWorks
out "BCC didn't work!"
rts
BCCWorks:
out 'BCC worked!'
rts
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:
Syntax Highlighted Code: ASM
move.b #$F0,d0 ; let's put $F0 to d0 and see it in different modes!
outb d0 ; see as Unsigned Hexadecimal
break
outb d0,signed ; see as Signed Hexadecimal
break
outb d0,dec ; see as Unsigned Decimal
break
outb d0,dec+signed ; see as Signed Decimal
break
outb d0,bin ; see as Unsigned Binary
break
outb d0,bin+signed ; see as Signed Binary
pause
move.w #$1020,d0
outw d0 ; see as Unsigned Hexadecimal word
break
outw d0,signed ; see as Signed Hexadecimal word
break
outb d0 ; see as byte
pause
move.l #-$1,d0
outl d0 ; see as unsigned
break
outl d0,signed ; see as signed
break
outl d0,trim+signed ; see as signed with triming!
rts
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.
Download
Secret message for Russian hackers: На ЦИСе выложу чуть позже, потерпите. =Ъ
This post has been edited by vladikcomper: 04 November 2010 - 05:35 PM



