Commit Graph

7 Commits

Author SHA1 Message Date
Virgil Dupras ae028e3a86 blockdev: make implementors "random access"
This huge refactoring remove the Seek and Tell routine from blockdev
implementation requirements and change GetC and PutC's API so that they
take an address to read and write (through HL/DE) at each call.

The "PTR" approach in blockdev implementation was very redundant from
device to device and it made more sense to generalize. It's possible
that future device aren't "random access", but we'll be able to add more
device types later.

Another important change in this commit is that the "blockdev handle" is
now opaque. Previously, consumers of the API would happily call routines
directly from one of the 4 offsets. We can't do that any more. This
makes the API more solid for future improvements.

This change forced me to change a lot of things in fs, but overall,
things are now simpler. No more `FS_PTR`: the "device handle" now holds
the active pointer.

Lots, lots of changes, but it also feels a lot cleaner and solid.
2019-06-04 15:36:20 -04:00
Virgil Dupras 5e5c7e6592 sdc: add sdcPutC
Wriiiiiite!
2019-06-01 19:53:42 -04:00
Virgil Dupras 3bc7cec03a sdc: allow the read of 0xff
That took an embarrasingly large amount of time to debug for something,
in the end, so obvious...
2019-05-31 21:33:42 -04:00
Virgil Dupras a641a94853 sdc: make sector swapping more robust
It would previously only work when GetC-ing our way into a new sector.
Seeking into one would not work. Now it's much more robust and this
paves the way for write support.
2019-05-30 14:55:38 -04:00
Virgil Dupras 312e95479e sdc: fix bug preventing us from reading beyond first sector 2019-05-28 13:12:08 -04:00
Virgil Dupras 8cfe834edb recipes/rc2014/sdcard: use "sdci" and blockdev rather than user prog 2019-05-28 11:01:17 -04:00
Virgil Dupras 7fad3b0c90 Move /parts/z80 to /kernel
Let go of that "meta os" thing. it's not as meta as I made it sound
like. It's a kernel.
2019-05-19 11:19:41 -04:00