Commit Graph

1598 Commits

Author SHA1 Message Date
Virgil Dupras
32d5f87b4e sms: don't use BC
The PAD driver was broken since IP moved to BC. Oops.
2020-10-06 20:36:29 -04:00
Virgil Dupras
eafcb0c440 avrpgm: add EEPROM support
also, verify all 3 first bytes of SPI commands. I'm not sure why
I wasn't doing that, probably because I was getting a lot of AVR
err and thought that only 2 bytes of the cmd were echoed. But now,
with a reliable SPI setup, verifying 3 bytes seems to work.
2020-10-05 19:36:49 -04:00
Virgil Dupras
8630b0a8ed recipes/rc2014/avr: new recipe 2020-10-05 18:46:22 -04:00
Virgil Dupras
dafcf72d5b Add ATmega328P definitions 2020-10-05 16:56:09 -04:00
Virgil Dupras
ebafa79795 Improve AVR docs
After many trials and errors in reliably accessing AVR chips through
my SPI relay design, I resigned myself to accepting 125kHz communication
speed with it. I find the complexity of solutions allowing to keep 250kHz
speeds to be excessive.
2020-10-05 16:46:16 -04:00
Virgil Dupras
44bcdd4327 Document 8086 asm instructions list
Also, remove needless argtype in CALL and RET
2020-09-25 19:44:32 -04:00
Virgil Dupras
8bf6258673 Add word TICKS
Adding a delay such as the 20ms one we have in AVR programmer's
initialization routine is tricky without a word like TICKS.

This implementation is highly inaccurate, but more accurate and
reliable than a "ballpark" DO..LOOP...
2020-09-25 17:31:06 -04:00
Virgil Dupras
1195b0313b emul/rc2014: add support for Zilog SIO
Very very simplistic, but works with our driver.
2020-09-24 21:01:14 -04:00
Virgil Dupras
35840ad8e6 sdc: don't use ABORT"
ABORT" doesn't work in xcomp.

Also, improve xcomp docs and fix misdocumentation.
2020-09-24 13:10:41 -04:00
Virgil Dupras
25a35cf28e Move 8086 boot code from B800 to B440
That slims down blkfs a lot.
2020-09-21 20:09:42 -04:00
Virgil Dupras
037c10fc57 Move AVR programmer from B690 to B160
Also, remove leftovers from previous move.
2020-09-21 20:00:49 -04:00
Virgil Dupras
faf088b397 Move AVR assembler from B650 to B50
And move its doc to doc/asm.txt
2020-09-21 19:52:53 -04:00
Virgil Dupras
b21be43535 Move 8086 assembler from B730 to B30
Also, move doc to doc/asm.txt.

Also, fix the pcat recipe which was broken since the overlay change.
I hadn't noticed it because I didn't have to rebuild the MBR.
2020-09-21 19:24:54 -04:00
Virgil Dupras
91f79d1131 Move z80a from B200 to B5
The idea is to consider assemblers as "runtime" apps instead of
placing them in the "bootstrap" section of the blocks. These apps
will be used for much more than bootstrapping.

Moved its documentation to doc/asm.txt and made its code blocks
more compact.
2020-09-21 17:51:08 -04:00
Virgil Dupras
a348ee9106 Remove Extra words
The few extra bytes they save in the core aren't worth the extra
complexity. This was initially done in a context where I had
troubles keeping the RC2014 binary with SDC inside the 8K limit.

At this point, even with the few extra bytes we add here, we're at
7200 bytes, so I'd say we're fine.
2020-09-21 14:51:46 -04:00
Virgil Dupras
7a5744a4c3 Remove BROWSE and CASE
With the Visual Editor, BROWSE is of dubious value. Even before that,
it was of dubious value. It's the only user of the CASE word, which
is also of dubious value: too complicated for its own good.

The CMD pattern used in VE is much better.
2020-09-21 14:13:34 -04:00
Virgil Dupras
fea9beac1e recipes/pcat: move recipe blocks into local overlay 2020-09-20 20:48:52 -04:00
Virgil Dupras
475171d07b recipes/ti84: move recipe blocks into local overlay 2020-09-20 20:24:09 -04:00
Virgil Dupras
373d03e0b1 recipes/trs80: move recipe blocks into local overlay 2020-09-20 11:57:30 -04:00
Virgil Dupras
9aa3ae4c6b Fix tests 2020-09-20 10:52:15 -04:00
Virgil Dupras
97ec2569a0 recipes/rc2014: move recipe blocks into local overlay 2020-09-20 10:50:13 -04:00
Virgil Dupras
8e624034bf recipes/sms: move recipe blocks into local overlay 2020-09-20 10:21:21 -04:00
Virgil Dupras
c9ce0f8cfd tools/blkpack: support multiple dirname arguments 2020-09-20 09:38:28 -04:00
Virgil Dupras
e123c0e536 Fix asm in z80mbc2 recipe 2020-09-20 09:01:11 -04:00
Virgil Dupras
f7dc6a2b79 Fix sms and ti84 recipes
Their asm code has been broken for a little while! oops!
2020-09-19 21:03:18 -04:00
Virgil Dupras
b1a95648f1 De-stabilize EXIT
This marks the end of wordrefs in stable ABI. Nice.
2020-09-19 20:35:35 -04:00
Virgil Dupras
3aa681ceca Remove ";" word
The ":" now takes care of scanning for ";". Conceptually, having
";" as an immediate word is slightly simpler than the approach in
this commit, but when bootstrapping is involved, this simpler
approach gets murkier.

Moreover, it got even murkier-er when trying to de-stabilize EXIT,
so here we are.
2020-09-19 20:22:23 -04:00
Virgil Dupras
53239c8f84 De-stabilize (n) 2020-09-19 19:44:15 -04:00
Virgil Dupras
68dd800bd1 Remove LIT< in favor of LIT" exclusively
This duplicated feature existed because of bootstrapping issues
with LIT", but again, with careful threading, we can clean things
up.

We can now have a proper "Collapse OS" prompt :)
2020-09-19 18:51:29 -04:00
Virgil Dupras
0b11979b5e Fix LIT"
I've mistakenly broken it in previous commit.
2020-09-19 14:28:10 -04:00
Virgil Dupras
eefbf66e95 De-stabilize (br), (?br), (loop), (s)
When writing the xcomp documentation, I realized that with careful
threading and by accepting a bit of code duplication in the xcomp
toolset, I could de-stabilize a couple of words.

(n) and EXIT are a bit trickier, but I think it can be done. It
would be nice to get rid of stable wordrefs...
2020-09-19 13:54:01 -04:00
Virgil Dupras
3295f1689e doc: add cross.txt 2020-09-19 10:32:28 -04:00
Virgil Dupras
6d180f737a doc: fix typos and inaccuracies 2020-09-19 09:04:18 -04:00
Virgil Dupras
4b1a49c8cc fix broken tests 2020-09-18 22:20:54 -04:00
Virgil Dupras
82b0b81521 doc: fix a few typos and inaccuracies 2020-09-18 21:13:28 -04:00
Virgil Dupras
495d2819d2 recipes/rc2014/sdcard: make spi relay design multi-devices
Also, fix the SPI relay driver to properly AND-away the result of
the CTL read.

Tested with a real prototype, works fine.
2020-09-18 19:22:56 -04:00
Virgil Dupras
7dc00179f7 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.
2020-09-17 13:30:29 -04:00
Virgil Dupras
a19c814b0d tools: improve reliability of ttyopen()
Previously, communications with my RC2014 would always be rocky and
fail most of the time. By sending an CR at init, things go much
smoother.
2020-09-17 10:25:08 -04:00
Virgil Dupras
1a6a549857 Make the SPI Relay protocol support multiple devices
Working on programming AVR chips exposes a glaring omission in my
first design of the SPI Relay: not allowing multiple devices make
this task hard. I constantly have to unplug my SD card before, plug
the AVR chip holder, then play a bit, then unplug the AVR holder,
then replug the SD card...

My prototype for a SPI relay design is built, but I haven't tested
it yet. I need to adapt the code first, which is what I do here.

When the prototype is tested, I'll update the SDC recipe with a new
schema.
2020-09-17 09:48:55 -04:00
Virgil Dupras
350b7c5939 avr: improve docs
The batch mode thing seems to have been caused by bad timing on my
prototype. Now that I've corrected it, live interaction seems to
work fine.
2020-09-05 16:52:46 -04:00
Virgil Dupras
5b4917dbe9 avr: allow writing to flash 2020-09-05 14:07:13 -04:00
Virgil Dupras
4910b9caef core: add AMOVEW 2020-08-31 12:11:17 -04:00
Virgil Dupras
3a84a3871b core: make parse and format words a bit tighter 2020-08-30 20:15:55 -04:00
Virgil Dupras
9c36885503 Fix doc innacuracies 2020-08-30 16:53:27 -04:00
Virgil Dupras
286f8968fd doc: add AVR documentation 2020-08-30 08:53:03 -04:00
Virgil Dupras
85f8543e17 avrspi: first steps
After having done my initial handshaking, I thought the rest of the
job was only a matter of implementing the protocol, but I was wrong.
There were many issues to fix before I could reliably communicate
with my 328P, mostly timing.

Now, I seem to be able to reliably extract fuse information, but
only in batch mode (that is, run "asp$ aspfl@" directly, then
running "(spid)" before running the next command). If I try to
interact with the chip in a single asp$ session, I sometimes get
wrong values (but no sync error! that's worrying...).
2020-08-30 08:01:09 -04:00
Virgil Dupras
7359717000 z80: add missing chkPS, calls
chkPS, used to be only for words that pushed back to PS, but I've
recently removed underflow checks from next and I forgot to add
missing chkPS, calls that go with this change.
2020-08-23 08:43:51 -04:00
Virgil Dupras
46676547d9 spi: add SPI_DELAY decl
AVR chips often run at less than z80's system clock. This means that
our SPI relay needs to have its own clock to properly communicate
with it. This means that the delay between OUT and IN can't be
hardcoded to 2 NOPs anymore. It needs to be configurable.
2020-08-23 07:55:17 -04:00
Virgil Dupras
bcf04f441d arduinouno: add schema to at28wr recipe 2020-08-21 20:25:06 -04:00
Virgil Dupras
0b39a975fe doc: add doc about editing text 2020-08-19 17:43:54 -04:00