From 7dc00179f7b23100cb57c7d6f0caa1673c9b0f0a Mon Sep 17 00:00:00 2001 From: Virgil Dupras Date: Thu, 17 Sep 2020 13:27:12 -0400 Subject: [PATCH] tools/upload: use A! instead of C! to write By default, it changes nothing, but it allows interesting setups, such as using AT28! for directly uploading to EEPROM. I've also updated the EEPROM recipe to upload directly to 0x2000. I'm not sure what has changed, but it's working fine now. --- recipes/rc2014/eeprom.md | 17 ++++------------- tools/upload.c | 2 +- 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/recipes/rc2014/eeprom.md b/recipes/rc2014/eeprom.md index 1e3301e..f3bb862 100644 --- a/recipes/rc2014/eeprom.md +++ b/recipes/rc2014/eeprom.md @@ -44,18 +44,9 @@ can use `/tools/exec` to send `blk/593` to the RC2014. ## Writing contents to the AT28 -The driver provides `AT28!` which can be plugged in adev's `A!*`. +The driver provides `AT28!` which can be plugged in adev's `A!*`. You can do so +with `' AT28! A!* !`. -First, upload your binary to some place in memory, for example `a000`. To do so, -run this from your modern computer: +Then, upload your binary to EEPROM with: - ./upload a000 - -Then, activate `AT28!` with `' AT28! A!* !` and then run -`0xa000 0x2000 AMOVE`. `AT28!` checks every byte for integrity, -so it there's no error, you should be fine. Your content is now on the EEPROM! - -Why not upload content directly to `0x2000` after having activated `AT28!`? -Technically, you could. It was my first idea too. However, at the time of this -writing, I always get weird mismatch errors about halfway through. Maybe that -the ACIA interrupt does something wrong... + ./upload 2000 diff --git a/tools/upload.c b/tools/upload.c index 23ac2cb..1323111 100644 --- a/tools/upload.c +++ b/tools/upload.c @@ -42,7 +42,7 @@ int main(int argc, char **argv) } char s[0x40]; sprintf(s, - ": _ 0x%04x 0x%04x DO KEY DUP .x I C! LOOP ; _", + ": _ 0x%04x 0x%04x DO KEY DUP .x I A! LOOP ; _", memptr+bytecount, memptr); sendcmd(fd, s);