|
ForumsSega Master System / Mark III / Game GearSG-1000 / SC-3000 / SF-7000 / OMV |
Home - Forums - Games - Scans - Maps - Cheats - Credits Music - Videos - Development - Hacks - Translations - Homebrew |
Author | Message |
---|---|
|
SDSC debug console test ROM
Posted: Fri Feb 08, 2019 8:33 pm
|
I wrote a test ROM for the SDSC Debug Console, to exercise a modification I made to Meka. Source code is at https://github.com/maxim-zhao/sdsc-console-tester . It makes little use of the console location and attribute features because I didn't implement them, but it does use them for the purposes of testing them a little. | |
|
Posted: Thu Jun 06, 2019 7:06 am |
That does quite a bit more than the example I came up with last night because I couldn't find one the night before that. I had long had a C version, but my current project is assembly. I ended up using the assembly from SDCC as a basis initially before it was rewritten as I didn't want to deal with passing parameters on the stack.
I do quite like the Print macro you use. I had kind of wondered what might be a good way to do just that. Anyone wanting to see a small C version & very similarly implemented wla-dx version can go to https://github.com/losinggeneration/sdsc_print to see those. |
|
|
Posted: Fri Jun 07, 2019 6:05 am |
My macros optimise for ease of writing test cases at the expense of code speed, because there's no easy way to allocate a static string and use it inline as you can in C. | |
|
Posted: Fri Jun 07, 2019 5:20 pm |
That makes sense. For a debug statement (my main use case), that's probably an alright trade-off as the intent is to remove it later. That's less useful for something intended to be left in the code though. |
|
|
Posted: Fri Jun 07, 2019 9:24 pm |
The inline nature of the pointers means you would have to split it to calls to a debug method for each string and then calls for each parameter. To be honest I did it in order to allow Zexall to run without a VDP implementation, via a Meka SDSC console implementation which is sitting in a PR on GitHub. In real code I still fall back on old fashioned techniques, because verbose logging isn't really useful for me - but that may just be me being slow to change my ways. | |