Sunday, 2 February 2014

Composite Instructions

The various how tos are all over the blog, I thought I would summarise them here.

Stuff is downloaded from the link bar on the right. It all is open source - do what you wish with it, please keep attributions however.

The Emulator

to run the emulator either ./mvem <binary> or mvem <binary>. It requires SDL2 - for Windows the DLL is included, for others you will have to go to www.sdl.org. It doesn't use anything else. The mouse control on Windows does not appear to work properly, and this appears to be a Windows problem. 

The currently available binary images are in both archives. The osx file contains the source files as well (the work was done on a Mac)

If there is an overlay bitmap file - in windows .bmp format, because this is the only format that SDL can read directly.

it boots up in debug mode - the keys are :

0-9A-F  change displayed address
G run program until broken (with M)
K set breakpoint at current address
S single step
V step over
M return to monitor (if running)
Esc exits the debugger

When running, O & P control the paddle,  and 123QWEASDZXC are the Microvision keys. If you write home-brews on it that use the paddle, or have the reversed output as Vegas Slots does, you will have to hard code this in the emulator - each ROM image has a checksum which determines whether it has the paddle hardware or not, what the charging times are (best way to do this is trial and error) and whether the output to the LCD driver is back to front or not. 
 
The Assembler
    
The Assembler is a lua file called tmsasm.lua , which assembles TMS1100 assembler - it is basic but it works. There are plenty of sample codes to see, but the basic differences to some others are :

there are no expressions  - you cannot write tcmiy label+1 for example
ldp, br and call extract the right bit from the address used, you do not have to modulo 64, or divide by 64 modulo 16. 
No support is provided for chapter bits outside comc, obviously. High chapter usage is shown in the space invaders source, which is mostly in the upper chapter.
lbr and lcall are shorthands for ldp x; br x and ldp x;call x respectively.
 
The hardware version

The hardware version requires a directory with the .ino file, the header files copied from the OSX emulator and absolute links to include the C code from the OSX emulator version. Relative links don't work. You can see this in the .ino file. It is designed for a 328 based Arduino (e.g. Duenamolive in this case) but it should work okay on most Arduinos or other MCUs really , all it does is scan the various hardware bits. The .ino code just translates hardware calls into Arduino compatible ones. 

The wiring is very basic. It uses a LCD4884 shield, available from most of the usual suspects. The buzzer is connected to Pin 8 via a 100R resistor , and the keypad as follows:

Arduino 13 -> Keyboard 3 (C0)
Arduino 12 -> Keyboard 1 (C1)
Arduino 11 -> Keyboard 5 (C2)
Arduino A5 -> Keyboard 2 (R0)
Arduino A4 -> Keyboard 7 (R1)
Arduino A3 -> Keyboard 6 (R2)
Arduino A2 -> Keyboard 4 (R3)

The keypad is one of those stock 3 x 4 keypads available cheaply from most suppliers with rows : 123 456 789 *0#


3 comments:

  1. I came across an Alien Raiders cart and dumped the ROM. It plays once you tell your emulator that the O PLA is reversed and it uses the paddle. It's got pretty good game play, but seems a little tough. www.seanriddle.com/alienraiders.bin

    ReplyDelete
  2. Have you got newer links for these? The Studio24 thing seems kaput. I want to recreate the Science Fair Microcomputer Trainer (TMS-1100 based) that Tandy used to sell, on an Arduino. Would be helpful to see your emulator source code.

    ReplyDelete
  3. Hi. A combination of disabling automatic indexes plus reorganisation, stuff is at http://www.studio2.org.uk/studio2/mv/

    I *think* Sean Riddle has decapped the TMS1100 trainer (this is the chap who did most of the Microvision chips) so an emulator shouldn't be that hard ; if you use my code (or write your own) and step through it you should be able to figure out what is connected to where. I'm pretty sure the manual for the Trainer is on the www somewhere as well, and that may give you some/all of the wiring as from what I remember it came as a kit you wired together ?

    It is theoretically possible that the SFMT might have its own microcode instruction set but I've never seen one that did - and the O lines probably just set the LED display.

    ReplyDelete