From 8cc5bbb1107aae91d05a5bd89512029414591ded Mon Sep 17 00:00:00 2001 From: Virgil Dupras Date: Tue, 2 Jul 2019 16:31:16 -0400 Subject: [PATCH] recipes/sms: update README --- recipes/sms/README.md | 44 +++++++++++++++++++++++++++++-------------- 1 file changed, 30 insertions(+), 14 deletions(-) diff --git a/recipes/sms/README.md b/recipes/sms/README.md index 6fc896b..7d4d772 100644 --- a/recipes/sms/README.md +++ b/recipes/sms/README.md @@ -12,27 +12,43 @@ platform and this is where most of my information comes from. This platform is tight on RAM. It has 8k of it. However, if you have extra RAM, you can put it on your cartridge. -## Status +## Gathering parts -I'm experimenting. Collapse OS doesn't run on the SMS yet. There are two main -challenges to solve: interfacing a keyboard through its I/O system (should be -feasible. from what I read in the I/O specs, it's very well done and adaptable) -and interface with its VDP (Video Display Processor). +* [zasm][zasm] +* A Sega Master System or a MegaDrive (Genesis). (I have only tested on a + MegaDrive so far) +* A Megadrive D-pad controller. +* A way to get an arbitrary ROM to run on the SMS. Either through a writable + ROM card or an [Everdrive][everdrive]. -After that, I'll look into using the explansion slot so that I can reuse the -RC2014 bus to, for example, access SD cards. +## Build the ROM + +Running `make` will produce a `os.sms` ROM that can be put as is on a SD card +to the everdrive or flashed as is on a writable ROM cart. Then, just run the +thing! ## Usage -The binary produced by the Makefile here has been tested on a Genesis + -[Everdrive MD][everdrive] (I haven't built myself a writable cartridge yet). +On boot, you will get a regular Collapse OS shell. See the rest of the +documentation for shell usage instructions. -It is an adaptation of Maxim's (from SMS power) hello world. I converted it to -ZASM. It shows a letter in the range of "a" to "i" depending of which button on -controller A is pressed (only detects one button at once). All buttons of the -genesis controller are supported. Shows "i" when no button is pressed. +The particularity here is that, unlike with the RC2014, we don't access Collapse +OS through a serial link. Our input is a D-Pad and our output is a TV. The +screen is 32x28 characters. A bit tight, but usable. -I've also added the mandatory "TMR SEGA" header at the end of the binary. +D-Pad is used as follow: + +* There's always an active cursor. On boot, it shows "a". +* Up/Down increase/decrease the value of the cursor. +* Left/Right does the same, by increments of 5. +* A button is backspace. +* B button skips cursor to next "class" (number, lowcase, upcase, symbols). +* C button "enters" cursor character and advance the cursor by one. +* Start button is like pressing Return. + +Of course, that's not a fun way to enter text, but using the D-Pad is the +easiest way to get started. I'm working on a PS/2 keyboard adapter for the SMS. [smspower]: http://www.smspower.org [everdrive]: https://krikzz.com +[zasm]: ../../tools/emul