pi@cosmac:~/elf/forth $ cat idiot_new_qhi.hex forth.hex > mc-forth.hex pi@cosmac:~/elf/forth $ hex2bin mc-forth.hex hex2bin v2.5, Copyright (C) 2017 Jacques Pelletier & contributors Allocate_Memory_and_Rewind: Lowest address: 00000000 Highest address: 00001633 Starting address: 00000000 Max Length: 5684 Binary file start = 00000000 Records start = 00000000 Highest address = 00001633 Pad Byte = FF pi@cosmac:~/elf/forth $ ls -l insgesamt 40 -rw-r--r-- 1 pi pi 12132 Jan 13 12:36 forth.hex -rw-r--r-- 1 pi pi 2890 Jan 13 12:36 idiot_new.hex -rw-r--r-- 1 pi pi 5684 Jan 13 12:41 mc-forth.bin -rw-r--r-- 1 pi pi 15022 Jan 13 12:36 mc-forth.hexNow upload and start Rc/Forth (mc-forth.bin):
pi@cosmac:~/elf/forth $ bin2elf -w -r mc-forth.bin 0x1634 bytes writtenclear high (8th) bit of input characters
pi@cosmac:~/elf/forth $ stty -F /dev/ttyS0 istripand start the terminal emulator (console):
pi@cosmac:~/elf/forth $ microcom -s 600 connected to /dev/ttyS0 Escape character: Ctrl-\ Type the escape character followed by c to get to the menu or q to quit [CR] IDIOT/4 *$P500 Rc/Forth 0.1 (c) copyright 2006 by Michael H. Riley ok 15 5 + . 20 ok BYE IDIOT/4 *
pi@cosmac:~/elf/forth $ hex2bin mcsmp_rcforth.hex hex2bin v2.5, Copyright (C) 2017 Jacques Pelletier & contributors Allocate_Memory_and_Rewind: Lowest address: 00008000 Highest address: 000091DB Starting address: 00008000 Max Length: 4572 Binary file start = 00008000 Records start = 00008000 Highest address = 000091DB Pad Byte = FF pi@cosmac:~/elf/forth $ bin2elf -s 8000 mcsmp_rcforth.bin 0x11dc bytes writtenNow upload and start the monitor, start the terminal program with 9600 baud:
pi@cosmac:~/elf/forth $ bin2elf -w -r MCSMP20B.bin 0x8000 bytes written pi@cosmac:~/elf/forth $ microcom -s 9600 connected to /dev/ttyS0 Escape character: Ctrl-\ Type the escape character followed by c to get to the menu or q to quit [CR] Membership Card's Serial Monitor Program Ver. 2.0B Enter "H" for Help. >R8000 Currently running your program Rc/Forth 0.1 (c) copyright 2006 by Michael H. Riley ok
ok 1 4 OUT ok 4 1 OUT ok 4 2 OUT ok : LED! 4 SWAP OUT ; ok 4 LED!The rest of the program, every word can and should be tested interactively (e.g. 1 LEFT):
: SWITCH@ 4 INP ; : DELAY 1 SWITCH@ + 0 DO LOOP ; : LEFT 7 0 DO 2 * DUP LED! DELAY LOOP ; : RIGHT 7 0 DO 2 / DUP LED! DELAY LOOP ; : NIGHTRIDER 1 DUP LED! BEGIN LEFT RIGHT EF 8 <> UNTIL DROP ;Push the IN button to terminate the program.
CLK MC ->- host MOSI MC ->- host MISO MC -<- host SS MC ->- host or other peripherals (optional)
SPI | MC (Master) | AT25xxx (Slave) | Interface |
---|---|---|---|
MISO | J2.9 IN7 SWITCH7 | 2 SO | direct |
MOSI | J2.11 O7 LED7 | 5 SI | direct |
CLK | J2.10 O6 LED6 | 6 SCK | direct |
CS | 1 CS | Pullup 10 k, switch to GND | |
P4.3 VDD | 8 VCC | +5V | |
" | 3 WP | +5V | |
" | 7 HOLD | +5V | |
21 GND | 4 GND | GND |
SPI | MC (Master) | AT25xxx (Slave) | Interface |
---|---|---|---|
8 VCC | +5V | ||
7 /HOLD | +5V | ||
CLK | TPB & N1 (OUT2) | 6 SCK | wired AND; Pullup 10 k, 2 1N4148 |
MOSI | D0 | 5 SI | direct |
4 GND | GND | ||
3 /WP | +5V | ||
MISO | /EF2 | 2 SO | direct |
CS | 1 /CS | GND |
block.0
, block.2
, block.255
.
https://github.com/utoh/pygmy-forth/blob/master/extras/kermit/pfkerm.doc
pi@cosmac:~/elf/elf2k $ cp v88.hex v88.hex.org pi@cosmac:~/elf/elf2k $ patch v88.hex v88-mc.patch pi@cosmac:~/elf/elf2k $ hex2bin v88.hex hex2bin v2.5, Copyright (C) 2017 Jacques Pelletier & contributors Allocate_Memory_and_Rewind: Lowest address: 00000000 Highest address: 00007FFF Starting address: 00000000 Max Length: 32768 Binary file start = 00000000 Records start = 00000000 Highest address = 00007FFF Pad Byte = FF pi@cosmac:~/elf/elf2k $ bin2elf -s 8000 v88.bin 0x8000 bytes written pi@cosmac:~/elf/elf2k $ bin2elf -w -r LBR_8000.bin 0x0003 bytes written pi@cosmac:~/elf/elf2k $But there is "Post Code 97" -> EPROM checksum wrong
I | Attachment | History | Action | Size | Date | Who | Comment |
---|---|---|---|---|---|---|---|
patch | v88-msc.patch | r1 | manage | 0.5 K | 2019-01-13 - 14:53 | PeterSchmid |