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

1621 Commits

Author SHA1 Message Date
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
63afa5798b zasm: add a bunch of instructions 2019-04-21 14:49:33 -04:00
Virgil Dupras
8594084b06 zasm: simplify code 2019-04-21 14:23:24 -04:00
Virgil Dupras
93eb262083 zasm: add a bunch of instructions 2019-04-21 14:12:06 -04:00
Virgil Dupras
e9e2f30fc5 zasm: add support for BIT 2019-04-21 13:41:55 -04:00
Virgil Dupras
e073fbff79 zasm: add support for "special instructions"
Let's not create complex rules for exception cases.
2019-04-21 12:58:28 -04:00
Virgil Dupras
ecf7d7fbd6 zasm: add a bunch of instructions 2019-04-21 11:49:20 -04:00
Virgil Dupras
056bbde710 zasm: add support for IX/IY with displacement 2019-04-21 10:55:47 -04:00
Virgil Dupras
14a410b024 zasm: extract tok.asm from zasm.asm 2019-04-21 09:25:52 -04:00
Virgil Dupras
89972ca210 zasm: add a bunch of instructions 2019-04-20 23:03:13 -04:00
Virgil Dupras
115dc18971 zasm: add support for extended instructions 2019-04-20 22:37:38 -04:00
Virgil Dupras
70f61ec451 zasm: a bit of refactoring 2019-04-20 20:35:45 -04:00
Virgil Dupras
f6dddaa380 zasm: add automated tests and fix a bunch of bugs
A python script generates all possibilities for all supported
instructions and compare zasm output with scas. After having fixed a
couple of bugs, all tests pass!
2019-04-17 21:03:20 -04:00
Virgil Dupras
8ce528c752 zasm: add a bunch of instructions 2019-04-17 17:08:45 -04:00
Virgil Dupras
76caf944dd zasm: add support for the "e" arg type (djnz, jr) 2019-04-17 16:26:04 -04:00
Virgil Dupras
c5c8369ce9 zasm: Add support for (NN) constants 2019-04-17 16:04:24 -04:00
Virgil Dupras
e1d6178457 zasm: add a bunch of instructions 2019-04-17 15:25:35 -04:00
Virgil Dupras
7996a9997a zasm: add support for numerical constants 2019-04-17 14:47:42 -04:00
Virgil Dupras
3fe5eb3e60 zasm: add a bunch of primary instructions 2019-04-17 11:37:49 -04:00
Virgil Dupras
a7dc1e7b4a zasm: make "RET cc" work 2019-04-17 11:06:51 -04:00
Virgil Dupras
279f6e0ad8 zasm: invert emulator io_write() handling
This facilitates debugging. To know the value of `A` at any point,
you can do `out (0), a`. The number of bytes in the output will be the
value of `A`.
2019-04-17 10:34:30 -04:00
Virgil Dupras
9b556c8883 zasm: support "special" groups and groups in arg2 2019-04-17 10:34:10 -04:00
Virgil Dupras
a7538473e4 zasm: add support for variable arguments 2019-04-17 08:23:01 -04:00
Virgil Dupras
38e40bfc16 zasm: make the instruction table fixed
Looping is easier
2019-04-16 22:46:04 -04:00
Virgil Dupras
8cd400651a zasm: read each argument immediately insto an argspec
Previously, we would go the other way around: match all available
argspecs to raw argument strings. It's much better to go the other way
around because we can "reduce" each argument much sooner. That will be
important when we start to support constants and expressions.
2019-04-16 22:40:07 -04:00
Virgil Dupras
1f94b6c3f7 zasm: can now match all "constant" primary opcodes 2019-04-16 20:32:30 -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
453cf3d74a zasm: start matching args
We now properly match arg-less operations.
2019-04-16 19:40:37 -04:00
Virgil Dupras
b3af6e0115 zasm: reuse code from core 2019-04-16 17:00:19 -04:00
Virgil Dupras
9acca52e44 zasm: begin parsing with easy pickings
Single opcodes that yield constants. "echo ret | zasm" yields 0xc9.
2019-04-16 16:49:47 -04:00
Virgil Dupras
88cee235b1 zasm: have a whole kernel in emulation instead of a simple wrapper
zasm is going to need to call to kernel code...
2019-04-16 14:26:45 -04:00
Virgil Dupras
43c1005d61 zasm: implement stdin/stdout in emulator 2019-04-16 13:59:19 -04:00
Virgil Dupras
1ae2331763 Add zasm app
For now, only a dummy app, but it's emulated properly with libz80.
Exciting times!
2019-04-16 13:36:57 -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
6597e8a75a doc: add emulate section 2019-04-16 11:37:04 -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
6c4489d2a3 Add blockdev doc 2019-04-16 10:40:51 -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