From b046aba7f9d5452b1873f91b069e7d48b5f5beb5 Mon Sep 17 00:00:00 2001 From: Virgil Dupras Date: Wed, 29 Apr 2020 12:26:44 -0400 Subject: [PATCH] recipes/trs80: running! no floppy yet. --- recipes/trs80/README.md | 28 +++++++++++++++++++++++----- recipes/trs80/xcomp.fs | 5 +++-- 2 files changed, 26 insertions(+), 7 deletions(-) diff --git a/recipes/trs80/README.md b/recipes/trs80/README.md index fd3124d..4e2accd 100644 --- a/recipes/trs80/README.md +++ b/recipes/trs80/README.md @@ -63,10 +63,10 @@ my knowledge. As far as I know, the COMM program doesn't allow this. What are we going to do? We're going to punch in a binary program to handle that kind of reception! You're gonna feel real badass about it too... -## Building the binary +## Building the stage 1 -You can start the process by building the binary. Running `make` in this folder -will yield a `os.bin` file. You'll need it later. +You can start the process by building the stage 1 binary. Running `make` in +this folder will yield a `stage1.bin` file. You'll need it later. ## Testing serial communication @@ -167,7 +167,7 @@ filename to send. Before you send the binary, make it go through `tools/ttysafe` first (which just takes input from stdin and spits tty-safe content to stdout): - ./ttysafe < os.bin > os.ttysafe + ./ttysafe < stage1.bin > stage1.ttysafe On OpenBSD, the invocation can look like: @@ -198,12 +198,30 @@ session on the other, type a few characters, and try `pingpong` again. ## Running Collapse OS -If everything went well, you can run Collapse OS with `g3000`. You'll +If everything went well, you can run Collapse OS with `g3000`. You'll get a usable Collapse OS prompt! Like with the `recv` program, nothing stops you from dumping that binary to a floppy. +## Saving to disk + +You could save your sent content as-is by following the instructions you had +for the `RECV` program, but that would mean that your executable would boostrap +itself every time it starts, which takes multiple seconds. You're better off +saving a compiled version of Collapse OS, something you already have once you +see the "ok" after running `g3000`. + +Before you do that, however, you need to update your `LATEST` field, something +you can do with `CURRENT @ 0x08 BIN+ !`. You also need to know where your +binary stops, something you'll get with `H@ .X`. + +Then, you can go back to TRSDOS with the BREAK key followed by `o` and +proceed with writing the proper memory area to disk. + +TODO: make this work. this doesn't actually work. Saving it before compilation +works though. + ## Configuration In addition to the generic basic shell, this build of Collapse OS has support diff --git a/recipes/trs80/xcomp.fs b/recipes/trs80/xcomp.fs index 9304893..c695616 100644 --- a/recipes/trs80/xcomp.fs +++ b/recipes/trs80/xcomp.fs @@ -1,5 +1,5 @@ -0x6000 CONSTANT RAMSTART 0xf000 CONSTANT RS_ADDR +RS_ADDR 0x80 - CONSTANT RAMSTART 212 LOAD ( z80 assembler ) 262 LOAD ( xcomp ) : CODE XCODE ; @@ -17,6 +17,7 @@ H@ 256 /MOD 2 PC! 2 PC! (entry) _ ( Update LATEST ) PC ORG @ 8 + ! +," CURRENT @ HERE ! " 422 463 XPACKR ( core cmp print parse readln fmt ) -," : _ RDLN$ (ok) ; _ " +," : INIT CURRENT @ HERE ! RDLN$ (ok) INTERPRET ; INIT " H@ 256 /MOD 2 PC! 2 PC!