Forums

Sega Master System / Mark III / Game Gear
SG-1000 / SC-3000 / SF-7000 / OMV
Home - Forums - Games - Scans - Maps - Cheats - Credits
Music - Videos - Development - Hacks - Translations - Homebrew

View topic - SDSC debug console test ROM

Reply to topic
Author Message
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 14685
  • Location: London
Reply with quote
SDSC debug console test ROM
Post 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.
  View user's profile Send private message Visit poster's website
  • Joined: 31 Jan 2011
  • Posts: 26
  • Location: Iowa, USA
Reply with quote
Post 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.
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 14685
  • Location: London
Reply with quote
Post 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.
  View user's profile Send private message Visit poster's website
  • Joined: 31 Jan 2011
  • Posts: 26
  • Location: Iowa, USA
Reply with quote
Post Posted: Fri Jun 07, 2019 5:20 pm
Maxim wrote
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.

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.
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 14685
  • Location: London
Reply with quote
Post 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.
  View user's profile Send private message Visit poster's website
Reply to topic



Back to the top of this page

Back to SMS Power!