From 6d2a0f749a5389f76572788106ac591021be5942 Mon Sep 17 00:00:00 2001 From: Virgil Dupras Date: Sun, 16 Aug 2020 20:54:06 -0400 Subject: [PATCH] recipes/rc2014: fix out-of-date information --- recipes/rc2014/sdcard/README.md | 19 +++++++++++-------- recipes/rc2014/selfhost/README.md | 4 ++-- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/recipes/rc2014/sdcard/README.md b/recipes/rc2014/sdcard/README.md index d90b5a2..8dabb6a 100644 --- a/recipes/rc2014/sdcard/README.md +++ b/recipes/rc2014/sdcard/README.md @@ -70,13 +70,15 @@ instead. ## Building your binary -The binary built in the base recipe doesn't have SDC drivers. Using the same -instructions as in the `eeprom` recipe, you'll need to assemble a binary with -those drivers. First, we need drivers for the SPI relay. This is done by -declaring `SPI_DATA`, `SPI_CSLOW` and `SPI_CSHIGH`, which are respectively `4`, -`5` and `6` in our relay design. You can then load the driver with `596 LOAD`. -This driver provides `(spix)`, `(spie)` and `(spid)` which are then used in the -SDC driver. +The binary built in the base recipe doesn't have SDC drivers. You'll need to +assemble a binary with those drivers. To do so, you'll modify the xcomp unit +of the base recipe. Look at `xcomp.fs`, you'll see that we load a block. That's +our xcomp block (likely, B599). Open it. + +First, we need drivers for the SPI relay. This is done by declaring `SPI_DATA`, +`SPI_CSLOW` and `SPI_CSHIGH`, which are respectively `4`, `5` and `6` in our +relay design. You can then load the driver with `596 LOAD`. This driver provides +`(spix)`, `(spie)` and `(spid)` which are then used in the SDC driver. The SDC driver is at B420. It gives you a load range. This means that what you need to insert in `xcomp` will look like: @@ -85,7 +87,8 @@ you need to insert in `xcomp` will look like: You also need to add `BLK$` to the init sequence. -Build it and write it to EEPROM. +Build it (run `make pack` in `cvm/` first to ensure an up-to-date blkfs) and +write it to EEPROM. ## Testing in the emulator diff --git a/recipes/rc2014/selfhost/README.md b/recipes/rc2014/selfhost/README.md index 6891b08..780c51a 100644 --- a/recipes/rc2014/selfhost/README.md +++ b/recipes/rc2014/selfhost/README.md @@ -15,10 +15,10 @@ Build Collapse OS' from within Collapse OS is very similar to how we do it from the makefile. If you take the time to look at the base recipe `Makefile`, you'll see `cat xcomp.fs | $(STAGE)`. That's the thing. Open `xcomp.fs` in a text editor and take a look at it. You'll see that it loads -B618, which contains the meat, and then spits stuff to port 2, which is a +B599, which contains the meat, and then spits stuff to port 2, which is a special signal for the `stage` binary. -To assemble from RC2014, all you need to do is load B618. This will +To assemble from RC2014, all you need to do is load B599. This will yield a binary in memory. To know the start/end offset of the binary, you'll type the same two commands and in `xcomp.fs`, but replace the `/MOD 2 PC! 2 PC!` words with `.X`. Then, write that binary between those offsets on your target