1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-12-28 23:49:15 +11:00
collapseos/recipes/rc2014
Virgil Dupras 0703da928e rc2014: adapt recipe to single stage xcomp
It's now much easier...
2020-05-14 11:32:51 -04:00
..
eeprom rc2014: adapt recipe to single stage xcomp 2020-05-14 11:32:51 -04:00
ps2 emul/zasm: use libcfs 2019-12-31 15:07:39 -05:00
sdcard rc2014: adapt recipe to single stage xcomp 2020-05-14 11:32:51 -04:00
selfhost xcomp: move all offset spitting to the end of the unit 2020-05-05 20:10:04 -04:00
Makefile rc2014: adapt recipe to single stage xcomp 2020-05-14 11:32:51 -04:00
README.md rc2014: adapt recipe to single stage xcomp 2020-05-14 11:32:51 -04:00
xcomp.fs Cross-compiles in a single stage! 2020-05-14 10:17:38 -04:00

RC2014

The RC2014 is a nice and minimal z80 system that has the advantage of being available in an assembly kit. Assembling it yourself involves quite a bit of soldering due to the bus system. However, one very nice upside of that bus system is that each component is isolated and simple.

The machine used in this recipe is the "Classic" RC2014 with an 8k ROM module , 32k of RAM, a 7.3728Mhz clock and a serial I/O.

The ROM module being supplied in the assembly kit is an EPROM, not EEPROM, so you can't install Collapse OS on it. You'll have to supply your own.

There are many options around to boot arbitrary sources. What was used in this recipe was a AT28C64B EEPROM module. I chose it because it's compatible with the 8k ROM module which is very convenient. If you do the same, however, don't forget to set the A14 jumper to high because what is the A14 pin on the AT27 ROM module is the WE pin on the AT28! Setting the jumper high will keep is disabled.

This recipe is for installing a minimal Collapse OS system on the RC2014. There are other recipes related to the RC2014:

Recipe

The goal is to have the shell running and accessible through the Serial I/O.

You'll need specialized tools to write data to the AT28 EEPROM. There seems to be many devices around made to write in flash and EEPROM modules, but being in a "understand everything" mindset, I built my own. This is the device I use in this recipe.

Gathering parts

Configure your build

Modules used in this build are configured through the conf.fs file in this folder. There isn't much to configure, but it's there.

Build the binary

Building the binary is as simple as running make. This will yield os.bin which can then be written to EEPROM.

Emulate

The Collapse OS project includes a RC2014 emulator suitable for this image. You can invoke it with make emul. See emul/hw/rc2014/README.md for details.

Write to the ROM

Plug your romwrite atmega328 to your computer and identify the tty bound to it. In my case (arduino uno), it's /dev/ttyACM0. Then:

screen /dev/ttyACM0 9600
CTRL-A + ":quit"
cat rom.bin | pv -L 10 > /dev/ttyACM0

See romwrite's README for details about these commands.

Note that this method is slow and clunky, but before long, you won't be using it anymore. Writing to an EEPROM is much easier and faster from a RC2014 running Collapse OS, so once you have that first Collapse OS ROM, you'll be much better equipped for further toying around (unless, of course, you already had tools to write to EEPROM. In which case, you'll be ignoring this section altogether).

Running

Put the AT28 in the ROM module, don't forget to set the A14 jumper high, then power the thing up. Connect the FTDI-to-TTL cable to the Serial I/O module and identify the tty bound to it (in my case, /dev/ttyUSB0). Then:

screen /dev/ttyUSB0 115200

Press the reset button on the RC2014 and the "ok" prompt should appear.