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 - Serial bootloader for SMS

Reply to topic
Author Message
  • Joined: 24 Sep 2013
  • Posts: 141
Reply with quote
Serial bootloader for SMS
Post Posted: Fri Dec 30, 2016 2:18 am
Just completed a serial bootloader for the Master System in which you can upload and execute a ROM from your PC to the console using a serial port.

Attached ROMs and video showing the process.

I want to do automated testing on the SMS hardware itself so to streamline it I needed a way to push code directly from the PC into the console, reusing the UART implementation on the controller port an the XMODEM protocol I managed to have a way to upload and execute small relocatable ROMs on the Master System with minor intervention and no cartridge reflashing.

The bootloader has been added to my in-progress BIOS replacement ROM, which will, in a future, try to download a ROM on powerup so I can fully automate the console testing.
bootloader demo.m4a (3.7 MB)
Video showing the bootloader upload process. (download to watch)
sms-upload-setup.jpg (135.16 KB)
Console setup
sms-upload-setup.jpg
bios-menu.zip (19.88 KB)
ROMs

  View user's profile Send private message Visit poster's website
  • Joined: 25 Feb 2013
  • Posts: 384
  • Location: Osaka
Reply with quote
Post Posted: Sat Dec 31, 2016 3:38 am
what speeds are you achieving? (bytes/s)
  View user's profile Send private message
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8652
  • Location: Paris, France
Reply with quote
Post Posted: Sat Dec 31, 2016 10:15 am
It is great that it's using the serial port, but if a MOD is required (for the BIOS) why not go full way and use USB for possibly faster speed?

I could use a software similar to my "smsdump" tool, that copies itself to ram, allowing the card/card/source to be unplugged, then can dump carts and send them over xmodem on the serial port. :)
  View user's profile Send private message Visit poster's website
  • Joined: 24 Sep 2013
  • Posts: 141
Reply with quote
Post Posted: Sun Jan 01, 2017 7:21 pm
Quote
if a MOD is required


It can run from any of the available ROM sources, be it BIOS, Cartridge, Card or Expansion port. The example shown has been done using the card slot and no BIOS modification, even though the original purpose was making a BIOS replacement I think it will stay as a toolkit ROM because I am too lazy to heavily mod my SMS :P

Quote
..."smsdump" tool, that copies itself to ram, allowing the card/card/source to be unplugged, then can dump carts and send them over xmodem on the serial port.


Tried that with a cartridge slot board, didn't have much success, stuff gets corrupted when plugging the card off. Not that I tried too hard anyway but I would suggest using the card slot to do any ROM tool loading before dumping since it is generally not used and is booted first on SMS. Otherwise, if you can fit the tool ROM in less than ~4K of ROM it could be loaded by this bootloader as-is.

Quote
what speeds are you achieving? (bytes/s)


As of right now my UART code implements a 4800bps serial port. Further improvements can be done, especially on the SMS-to-PC link speed but have not bothered yet.
  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!