The original idea was to sit down with a C64, floppy drive, monitor, joystick, mouse and reference books, and start with BASIC, writing a text editor, assembler, IDE, etc and work my way up to having a windowed operating system like GEOS with a few utilities and such.
Except now, the spec of the system is designed by me, and I'm building that too.... Which meshes in perfectly with my original intention to build a RC2014+TMS9918 emulator, which I can use for initial development, and kickstarting the boot rom onto it.
Hardware
I wanted some sort of related name for the project, so I was thinking Llama, TMS, which became Llitmus, like the PH sensitive dye. I was gonna go with Llitmus-80 with the '80' because it uses a z80, but then once I read that the litmus was made from lichen, I just went with the name Llichen-80.First, let's get into the Llichen-80 system specification.
- RC2014 backplane/base system
- 7.37 MHz clock speed
- 32k RAM from 8000-FFFF
- 8k BASIC ROM from 0000-1FFF (*)
- 32k RAM from 0000-7FFF (*)
- Digital IO board at port 00
- TMS 9918A video board at port 10,11
- ACIA Serial port at 80
- ACIA Serial port 2 at C0 - connected to CH376S USB drive interface
So (*) Indicates something... there's an overlap of these two items. My existing design piggybacks bit 0 of the output from the digital board to select which of the two of these that memory READs come from. That is to say that writing 0x00 to the digital out board will select ROM, and 0x01 will select RAM. Writes to these locations always go to RAM. So one way I can test this is:
- Start up the computer
- select ROM bank
- Write a basic program to peek from the ROM and write to the RAM
- select the RAM bank
- Yank out the ROM board, and everything still works fine
10 OUT 0,0This all works great! One addition I made was to intercept the VCC to the RAM chip and have it also connected to some CR2032 batteries for a backup. It's not perfect, but it works well enough for my system for now. I also added a switch to force the use of the ROM, since sometimes the bank switching can get into a messed up state and you need to force reboot off of the ROM.
20 FOR A=0 TO 8192
30 B = PEEK(A)
40 POKE( A, B)
50 NEXT A
60 OUT 0,1
RUN
The other thing I created was a second ACIA serial port, essentially duplicating the circuit of the stock ACIA serial port, but changing it to look at ports C0 and C1 instead of 80 and 81.
The TMS could be configured for anywhere, for the most part, but the ACIA chip IO port mapping is messy so they consume essentially from 80 to FF. I went with the SORD-M5 configuration of putting it at 10 and 11h. Although there might be issues with this...
Anyway, more about these modifications and such at the end of the month.
Experiments
I also became very aware that I do not yet understand how to get the chip to do what I want.
Emulation
There was really no need to get a whole video display system working with my existing emulator when I could start with an existing, debugged, well supported emulator, openMSX, and just create a new hardware profile for the RC2014 with my system's configuration... and with some changes to support my bank switching hardware and such.
I made a branch of openMSX on github to handle any/all of the changes I've made for it, which at the moment is just getting it to build on OSX/Darwin 10.14 correctly.
I also was messing around with my good old friend, the Texas Instruments TI-99/4A as it uses the TMS9918 chip. I figured that I could experiment around with how color and graphics look. I'm not a fan of the TI's font, nor the MSX's font for that matter, but I figured it's a good platform to get reacquainted with the weirdness of the TMS and to see how this all might look in the future, perhaps.
This is of course just a screenshot from the impressive web-javascript TI emulator at js99er.net.
More as it develops...