1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-17 09:38:05 +11:00
Commit Graph

58 Commits

Author SHA1 Message Date
Virgil Dupras
a994867a86 Wohoo! zasm assembles core.asm!!! 2019-05-14 16:50:35 -04:00
Virgil Dupras
23fd493013 core: make a bit more zasm-friendly 2019-05-14 16:42:44 -04:00
Virgil Dupras
72d2a8f073 zasm: add support for + expressions 2019-05-14 15:26:29 -04:00
Virgil Dupras
4f44d3de63 parts/z80/fs: add "fopn" command 2019-05-12 15:38:58 -04:00
Virgil Dupras
51bab80a4c parts/z80/fs: fix fsInitMeta writing to ROM 2019-05-12 14:31:35 -04:00
Virgil Dupras
1ea5bedb4f blockdev: fix broken blkSeek/blkTell
scas didn't warn about this, but it seems that `jr` calls were out of
range. Seek and Tell was broken. Replacing `jr` with `jp` does the
trick.
2019-05-12 13:57:37 -04:00
Virgil Dupras
c77d96da22 blockdev: clarify routines specs 2019-05-12 11:45:08 -04:00
Virgil Dupras
34ee91a0d7 zasm: use blkdev IDs as input and output
This will soon allow use to seek and tell on input, which is necessary
for a second pass which is necessary for forward symbol references.

This require making `blkSel` a bit more flexible. Rather than having one
global selected blkdev, each app can select its own, in its own memory
space.
2019-05-10 19:33:34 -04:00
Virgil Dupras
d8bc9c2bdd parts/z80/sdc: implement blockdev's GetC 2019-05-09 10:47:57 -04:00
Virgil Dupras
54d0286486 parts/z80/sdc: add sdcSetBlkSize and sdcReadBlk 2019-05-08 20:08:17 -04:00
Virgil Dupras
12ca2bd53e parts/z80/sdc: add sdcInitialize
Also, adjust SD card recipe. Straightforward initialization and read!
2019-05-08 16:03:54 -04:00
Virgil Dupras
ef11059382 parts/z80/sdc: new part
Incomplete, but what it does *does* work. I could handshake CMD0+CMD8 on
a MicroSD HC.
2019-05-07 14:50:24 -04:00
Virgil Dupras
59b0c83b0e shell: add iowr and iord 2019-05-02 15:18:47 -04:00
Virgil Dupras
57c3dfece8 zasm: assemble multiple lines at once 2019-04-30 15:51:39 -04:00
Virgil Dupras
055e0d7a31 Split parts in two: z80 and avr
Also, clarify the role of recipes.
2019-04-25 16:03:45 -04:00
Virgil Dupras
a391f85c00 fs: implement GetC, PutC, Seek and Tell on file handle
Very coarse, but I got them to work.
2019-04-23 19:42:10 -04:00
Virgil Dupras
f00334ec89 fs: add private "blk" routines
This way, we can interact with the mounted FS even when we change the
selected blkdev.
2019-04-23 15:50:26 -04:00
Virgil Dupras
3ba0a707e7 blockdev: remove a layer of indirection in block routine storage
This will facilitate "copying" blk selection in FS.
2019-04-23 15:03:23 -04:00
Virgil Dupras
ad217c018e fs: implement block reuse in fsAlloc 2019-04-23 14:00:54 -04:00
Virgil Dupras
684f083e8e fs: add "fdel" command 2019-04-23 13:29:16 -04:00
Virgil Dupras
5eca14d49a fs: implement fsNext
This allows more than one file to be allocated. `fls` properly lists
multiple files.
2019-04-23 12:04:09 -04:00
Virgil Dupras
1a6d285d2d fs: always read whole block meta in memory to avoid seeking 2019-04-23 10:54:56 -04:00
Virgil Dupras
c0dbee78de New part: fs
Very incomplete, but if you play your cards right, you can, with the
shell:

1. Create a new CFS
2. Mount it
3. Allocate a file with an arbitrary name
4. Have it listed with `fls`
2019-04-23 09:37:22 -04:00
Virgil Dupras
07fde3cab5 blockdev: move the new seek mode logic into the seek command
It wasn't a good idea to complicate all blockdev impls with complicated
seeks. Let's just stay in absolute mode for now.
2019-04-23 08:33:32 -04:00
Virgil Dupras
f87cd0485a blockdev: make "seek" print out its resulting position
Also, extract commands into blockdev_cmds to avoid making blockdev
dependent on stdio.
2019-04-22 22:54:23 -04:00
Virgil Dupras
5071ee9f40 Extract "stdio" part from shell 2019-04-22 22:41:37 -04:00
Virgil Dupras
8b7faa1f02 blockdev: add "type" argument to blkSeek
Allows seeking forward, backwards, to the beginning, to the end.
2019-04-22 22:28:35 -04:00
Virgil Dupras
d3d229a918 shell: support string arguments
No consumer yet, but it's coming...
2019-04-22 21:52:33 -04:00
Virgil Dupras
1bcceb949c blockdev: add Tell and fix blkGetCW
Calling on blkGetC repeatedly was somehow very unstable and often
failed. I didn't pinpoint exactly why, but keeping the call addr around
and calling that instead seems like a better idea anyway.
2019-04-22 17:15:59 -04:00
Virgil Dupras
196d22c4ab shell: add "save" command
The opposite of "load"
2019-04-22 16:01:31 -04:00
Virgil Dupras
b4694225c5 blockdev: change GetC API
Instead of waiting, GetC always return immediately, with Z indicating if
something was fetched. The "wait" loop is implemented by the called (and
in the new `blkGetCW`).

This simplifies out-of-bounds verifications for storage blockdevs.
2019-04-22 14:26:16 -04:00
Virgil Dupras
fc0cdede55 Move print(n)str from core to shell
These routines had hardcoded references to ACIA and didn't belong to the
core.
2019-04-16 19:45:05 -04:00
Virgil Dupras
ff99062d5b Move RC2014 recipe in its own folder
Also, remove `parts/platforms`. It makes no sense. Only recipes make
sense.
2019-04-16 11:50:16 -04:00
Virgil Dupras
056de2b19d doc: add glue code section 2019-04-16 11:26:58 -04:00
Virgil Dupras
7060ee4dc5 Add Status section to README 2019-04-16 10:52:29 -04:00
Virgil Dupras
21eb64f751 blockdev: remove one layer of indirection
The approach used for shell extra commands also works for blockdev. Much
simpler and tighter this way.
2019-04-16 10:17:25 -04:00
Virgil Dupras
a27da6f41a add mmap part
This also introduces the "seek" shell command.
2019-04-16 08:36:26 -04:00
Virgil Dupras
af13b0bd00 Code consolidation 2019-04-16 08:35:44 -04:00
Virgil Dupras
ce49fc15d0 blockdev: reorganize routine pointers
Also, add dummy seek reoutine.
2019-04-15 21:56:15 -04:00
Virgil Dupras
a5addc989c shell: rename seek to mptr
going to use `seek` for block devices
2019-04-15 20:42:12 -04:00
Virgil Dupras
c996da8ac8 shell: add error codes to cmds 2019-04-15 20:38:25 -04:00
Virgil Dupras
12c23f52e0 Add blockdev part
Also, add the ability for parts to define extra shell commands.
2019-04-15 16:53:11 -04:00
Virgil Dupras
4600b5299c shell: place cmd metadata next to the routine
This will facilitate the inclusion of extra commands other parts might
want to define.
2019-04-15 15:08:00 -04:00
Virgil Dupras
26b125b337 shell: add shellParseArgs
Replaces individual command parsing. Quite a big and complex chunk of
code, but makes each command much simpler.
2019-04-14 23:14:07 -04:00
Virgil Dupras
83f63c7146 shell: add call command 2019-04-14 17:01:28 -04:00
Virgil Dupras
e4c23b4270 shell: echo types letters right away
Easier to use this way...
2019-04-14 15:18:41 -04:00
Virgil Dupras
942ff37bf8 shell: implement load command 2019-04-14 14:53:16 -04:00
Virgil Dupras
461c09f1e5 Decouple shell from acia 2019-04-14 14:24:29 -04:00
Virgil Dupras
8ccddbcb0e Separate shell and acia input buffers
They serve a different purpose. The goal of the ACIA buffer is to ensure
that we don't miss an input. The goal of the shell buffer is to wait
until the user presses return.

The ACIA buffer has been moved to shell and replaced with a circular
buffer, a more appropriate data structure for this kind of purpose.

Also, introduce `aciaGetC`.
2019-04-14 14:04:31 -04:00
Virgil Dupras
902c6a5dd3 shell: add count arg to peek
Also, fix seek reversed endianness.
2019-04-14 11:54:18 -04:00