Hi all,
I finally have my SNASM2 and SNSERVER ISA cards fully functioning! Now I'm trying to figure out the debugging process.
I've successfully built my code with SNASM68K.EXE, outputting a COFF file with debugging info, and the debugger (SNBUG68K.EXE) recognises the debug info and shows me the source code alongside the disassembly (F**K YEAH!). Opening the Memory window shows me some recognisable strings from the binary, so I can assume it's correctly uploaded to the target and is waiting to run.
Unfortunately, hitting Run (or trying to step over the first line of code) immediately halts the machine and I lose SCSI connectivity. If I don't load my own binary at all, I can successfully run, step through and watch whatever startup code gets loaded on bootup (the MegaCD intro screen and main menu, possibly), so I think the debugger and target are functioning fine, it's just my code isn't suitable.
A few things from the SNASM2 and MegaCD Development manuals caught my eye:
The appendix shows the mentioned CPU code:
Apologies for the poor scans, my manual is a copy of a copy of a copy, which I then copied.
So my question is: Where does this code go? The top of the binary is for the header and CPU vector table, and since it halts on the first line there's no way this code would actually run to be able to do anything useful.
At the moment all of my exceptions/traps/interrupts just point to an empty subroutine which calls RTE.
I finally have my SNASM2 and SNSERVER ISA cards fully functioning! Now I'm trying to figure out the debugging process.
I've successfully built my code with SNASM68K.EXE, outputting a COFF file with debugging info, and the debugger (SNBUG68K.EXE) recognises the debug info and shows me the source code alongside the disassembly (F**K YEAH!). Opening the Memory window shows me some recognisable strings from the binary, so I can assume it's correctly uploaded to the target and is waiting to run.
Unfortunately, hitting Run (or trying to step over the first line of code) immediately halts the machine and I lose SCSI connectivity. If I don't load my own binary at all, I can successfully run, step through and watch whatever startup code gets loaded on bootup (the MegaCD intro screen and main menu, possibly), so I think the debugger and target are functioning fine, it's just my code isn't suitable.
A few things from the SNASM2 and MegaCD Development manuals caught my eye:
The appendix shows the mentioned CPU code:
Apologies for the poor scans, my manual is a copy of a copy of a copy, which I then copied.
So my question is: Where does this code go? The top of the binary is for the header and CPU vector table, and since it halts on the first line there's no way this code would actually run to be able to do anything useful.
At the moment all of my exceptions/traps/interrupts just point to an empty subroutine which calls RTE.

![[IMG]](https://web.archive.org/web/2im_/http://bigevilcorp.files.wordpress.com/2014/09/dsc_1703.jpg)