1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-09-06 09:58:44 +10:00
Commit Graph

290 Commits

Author SHA1 Message Date
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
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
9c36885503 Fix doc innacuracies 2020-08-30 16:53:27 -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
11f8843a16 rc2014: add sio recipe 2020-08-18 16:02:47 -04:00
Virgil Dupras
8788379aac Flatten recipes 2020-08-18 15:46:14 -04:00
Virgil Dupras
6d2a0f749a recipes/rc2014: fix out-of-date information 2020-08-16 20:54:06 -04:00
Virgil Dupras
124da6adec Move SD Card subsystem outside of RC2014 recipe and add protocols
Although the SPI Relay driver is RC2014-specific, the SD Card driver
is generic enough to be a subsystem. That's the second subsystem we
add and this warrants, I think, the formalization of a new concept:
protocols.
2020-08-16 14:30:33 -04:00
Virgil Dupras
007252e459 Move SIO driver into RC2014 recipe 2020-08-16 09:31:02 -04:00
Virgil Dupras
939a1da9e6 recipes/arduinouno/at28: add companion at28dump program 2020-07-28 16:29:10 -04:00
Virgil Dupras
b8e52707e9 recipes/arduinouno/at28: improve reliability
Previously, it could never write more than a few bytes before pingpong
getting a mismatch error. Now, I can pingpong Collapse OS binary
without a mismatch.
2020-07-28 15:23:10 -04:00
Virgil Dupras
3607eefa55 Add arduinouno/at28 recipe 2020-07-22 17:26:06 -04:00
Virgil Dupras
d97012ecae Fix makefile build-from-clean-repo glitches 2020-06-30 10:24:12 -04:00
Virgil Dupras
f09aa0603c rc2014: separate SPI relay and SDC drivers
My intention is to reuse the SPI relay to program AVR MCUs from a
RC2014.
2020-06-29 18:48:00 -04:00
Virgil Dupras
5a2612a9c5 Add HERESTART xcomp config 2020-06-28 19:45:28 -04:00
Virgil Dupras
3068b58be5 Rename RAMSTART to SYSVARS
It's more descriptive this way. Also, I'll soon add a new HERESTART
config.
2020-06-28 18:49:30 -04:00
Virgil Dupras
b8800be76f rc2014: improve SD card driver docs 2020-06-28 16:34:41 -04:00
Virgil Dupras
1312817117 z80: make boot binary a 2-part process
Previously, recipes that began spitting binary contents before
loading block 282 would end up with VARIABLE code in their binary,
thus breaking them. We fix this by making this loading process
2-part.
2020-06-26 21:41:17 -04:00
Virgil Dupras
b3e865d0fb recipes: use cvm's staging binary instead of emul's
Much faster!
2020-06-26 21:23:13 -04:00
Virgil Dupras
49d7a7f435 z80mbc2: add BLK support 2020-06-22 21:21:24 -04:00
Virgil Dupras
a7660fba0e z80mbc2: new recipe
ref #82
2020-06-22 19:09:41 -04:00
Virgil Dupras
94ed01086a pcat: move drivers and xcomp to blkfs 2020-06-22 14:21:25 -04:00
Virgil Dupras
1bea45acb8 8086a: add PUSHs, and POPs, 2020-06-22 13:54:33 -04:00
Virgil Dupras
06d997f26a pcat: write recipe README 2020-06-22 13:34:20 -04:00
Virgil Dupras
496826cdc4 pcat: implement AT-XY
VE works! well, at this point, we can say that Collapse OS runs on
PC/AT. A little cleanup and docs writing and we're done!
2020-06-22 06:53:30 -04:00
Virgil Dupras
f76d30b6fe pcat: add blk write support 2020-06-22 06:44:52 -04:00
Virgil Dupras
515890717f pcat: use heads count from 13H08H
On real hardware, there aren't always 2 heads...
2020-06-22 05:59:26 -04:00
Virgil Dupras
d7f002df98 pcat: use boot drive no passed to bootloader through DL
instead of hardcoded drive 0.
2020-06-21 22:53:11 -04:00
Virgil Dupras
dc7f36263a pcat: BLK-enabled!
That INT 13H logic was a bit tricky to implement...

read-only for now.
2020-06-21 22:07:12 -04:00
Virgil Dupras
cd514e6cd6 pcat: add PSP checks in all native words
Also, fix (roll) which wasn't properly implemented.
2020-06-21 14:07:02 -04:00
Virgil Dupras
dcaa515929 pcat: implement does 2020-06-21 10:40:09 -04:00
Virgil Dupras
99c05fff3c pcat: it works!
Forth intepreter now works! There's still DOES> and overflow checks
to implement, but otherwise, we have it!
2020-06-20 20:06:42 -04:00
Virgil Dupras
60ecab314e pcat: we have PROMPT!
Not working, but we do get that sweet "CollapseOS".
2020-06-20 16:58:48 -04:00
Virgil Dupras
1536434666 pcat: implement cell execution and shaping things up 2020-06-20 13:50:01 -04:00
Virgil Dupras
9d2afd200c pcat: implement (s) 2020-06-19 20:09:51 -04:00
Virgil Dupras
8cc8df0446 pcat: add native _find 2020-06-19 07:56:54 -04:00
Virgil Dupras
5ebdf84e78 pcat: more native words
almost there!
2020-06-19 07:26:33 -04:00
Virgil Dupras
3b21ba635d pcat: add PICK and (roll) 2020-06-18 21:21:46 -04:00
Virgil Dupras
6b07296d30 pcat: more native words 2020-06-18 19:06:53 -04:00
Virgil Dupras
bd508daad9 pcat: begin organizing native words properly
This port is taking shape!
2020-06-18 15:28:30 -04:00
Virgil Dupras
6bc1738bfd pcat: implement (loop)
8086 asm is a lot terser than z80... Those indirect memory operations
are very handy.
2020-06-18 15:01:04 -04:00
Virgil Dupras
bc8144b4be pcat: implement (br) and (br?) 2020-06-16 22:10:32 -04:00
Virgil Dupras
a92864a595 pcat: implement RSP mechanism in execution model 2020-06-16 20:41:53 -04:00
Virgil Dupras
d8d2e05eb2 pcat: make find compare strings
find is the biggest chunk of logic of the boot code. The 8086 version
is significantly terser than the z80 one. REP/CMPS helps...
2020-06-15 06:23:19 -04:00
Virgil Dupras
8c452f5add pcat: begin implementing find
Not comparing strings yet. Without asm tooling support, it's a big
chunk to swallow at once. It's progressing well!
2020-06-14 21:52:58 -04:00
Virgil Dupras
a72322df31 pcat: begin structuring around words 2020-06-14 14:15:44 -04:00
Virgil Dupras
2b7abf802f pcat: begin porting forth
I'm not sure yet where I'm going, but I'm not going to build the
8086 port from the ground up like I did with the z80, that is,
making is sustain itself and eventually merge its forth code with
core words. That would be too much work which would then be thrown
out (all those words I'll initially have to implement in asm which
are already implemented in Forth).

What I *think* I can do is build a mirror version of z80 boot code
and cross-compile it from the z80. This means it has to follow z80
stable ABI.

Nope, I'm not sure where I'm going...
2020-06-13 21:37:54 -04:00
Virgil Dupras
07e50313c7 pcat: separate MBR code and OS code
MBR code now strictly loads OS code into memory and jumps into it.

Now, I've got to consolidate my assembler code, modrm logic is
messed up.
2020-06-13 15:35:16 -04:00