Commit Graph

59 Commits

Author SHA1 Message Date
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 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 394f962510 recipe: fix makefiles for fresh clone contexts
All recipe makesfiles would previously assume a built emul/.

Fixes #113
2020-06-11 12:23:59 -04:00
Virgil Dupras b5683f447b sms/kbd: update instructions for Forth Collapse OS
The keyboard is a bit glitchy, but these are the same glitch as those
that were already present in Z80 Collapse OS. They still need fixing...
2020-05-21 13:57:34 -04:00
Virgil Dupras aad6b5c2e5 avra: add global constants 2020-05-19 10:48:48 -04:00
Virgil Dupras ac309bbd9e avra: rename AGAIN, to AGAIN?,
AGAIN, becomes a shortcut for "' RJMP AGAIN?,"
2020-05-19 10:36:07 -04:00
Virgil Dupras 7a41c5c6f9 avra: add IF, .. THEN,
I decided to keep SKIP, .. TO, (renamed from AT,) around and limit
IF, .. THEN, to the simple BRNE case.
2020-05-19 10:26:57 -04:00
Virgil Dupras 8bbd29d37d avra: add SKIP, .. AT,
Will change to IF, .. THEN, but I need a way to easily reverse a
BR op. But from this commit, the translation of sms/kbd/ps2ctl.asm
is complete! perfect binary match!
2020-05-19 10:19:37 -04:00
Virgil Dupras 8ca85abfbd avra: add BEGIN, .. AGAIN, 2020-05-19 07:39:34 -04:00
Virgil Dupras 7b7e60ed4a avra: implement LD/ST
Still making great progress on sms/kbd/ps2ctl. Still matching ref
binary.
2020-05-18 22:28:58 -04:00
Virgil Dupras 6a55a04f22 sms/kbd: still advancing on ps2ctl
next step: implement ST.
2020-05-18 20:55:10 -04:00
Virgil Dupras e0bc14e55c avra: implement BR*
Getting good! still advancing on ps2ctl in sms/kbd and still
matching reference binary.
2020-05-18 20:34:06 -04:00
Virgil Dupras cdddfdefae avra: add a layer of indirection to FLBL!
This will make it easier to fit BR* in there.
2020-05-18 19:45:30 -04:00
Virgil Dupras 63dec372ce sms/kbd: continue advancing on ps2ctl rewrite
Still binary matching. Next step is branching support.
2020-05-17 21:10:02 -04:00
Virgil Dupras 177e70580f sms/kbd: begin rewriting ps2ctl to Forth
So far, the resulting binary matches.
2020-05-17 14:24:27 -04:00
Virgil Dupras bd38d80f9c Move Cross-compiled core from B390 to B350
and renamed it "Core words". Also, reworded the presentation.
2020-05-15 22:44:49 -04:00
Virgil Dupras f2817870aa sms: working on real hardware! 2020-05-15 21:53:26 -04:00
Virgil Dupras f9a8e6f180 sms: Pad WIP 2020-05-15 15:41:06 -04:00
Virgil Dupras 1597f1e131 Don't generalize XYPOS just yet
It was ill-advised.
2020-05-15 14:09:31 -04:00
Virgil Dupras 175b4bc497 sms: CollapseOS prompt! 2020-05-15 12:46:25 -04:00
Virgil Dupras 43eabf566b sms: WIP ! 2020-05-14 22:15:31 -04:00
Virgil Dupras 97dcad9b15 recipes/sms/kbd: use Collapse OS' AVR assembler 2020-02-26 23:10:43 -05:00
Virgil Dupras 64a54c72f8 Fix broken recipes 2020-02-26 21:44:37 -05:00
Virgil Dupras 92ddc7ebc1 recipes/trs80: use grid module
Not much of a gain in terms of usability (a bit of a loss in fact, things are
a bit slow and glitchy), but it's a necessary move if we want to use upcoming
grid-enabled userspace apps, such as a visual text editor.
2020-02-26 16:27:27 -05:00
Virgil Dupras 247b200dcc New kernel module: grid 2020-02-24 20:36:08 -05:00
Virgil Dupras fb2117dc2e sms/vdp: use fonts from kernel/fnt
Instead of its own version of one. Additionally, add a 7x7 font to
the collection.
2020-01-07 22:15:35 -05:00
Virgil Dupras 097c677641 emul/zasm: use libcfs
This allows us to get rid of the zasm.sh wrapper.
2019-12-31 15:07:39 -05:00
Virgil Dupras dcb96aefe9 lib/parse: remove parseHexPair
Also, make parseHexadecimal "tail" (HL). Soon, all routines in lib/parse
will do that, making the life of lib/expr easier.
2019-12-29 21:56:56 -05:00
Virgil Dupras 5b155a5c15 tools: use BASIC's new while loop
Also, increase STDIO_BUFSIZE to 0x40 so that those while loops work.
2019-12-12 12:04:56 -05:00
Virgil Dupras 0fb7995166 recipes/sms/romasm: add missing sentinel in .mycmds 2019-12-02 23:00:03 -05:00
Virgil Dupras 270ad926c9 recipes/sms: use BASIC shell 2019-12-02 20:18:41 -05:00
Virgil Dupras 019d05f64c Make the shell a userspace app
That's my mega-commit you've all been waiting for.

The code for the shell share more routines with userspace apps than with kernel
units, because, well, its behavior is that of a userspace app, not a device
driver.

This created a weird situation with libraries and jump tables. Some routine
belonging to the `kernel/` directory felt weird there.

And then comes `apps/basic`, which will likely share even more code with the
shell. I was seeing myself creating huge jump tables to reuse code from the
shell. It didn't feel right.

Moreover, we'll probably want basic-like apps to optionnally replace the shell.

So here I am with this huge change in the project structure. I didn't test all
recipes on hardware yet, I will do later. I might have broken some...

But now, the structure feels better and the line between what belongs to
`kernel` and what belongs to `apps` feels clearer.
2019-11-15 15:37:49 -05:00
Virgil Dupras cdd0b64570 Modify userspace .org and RAMSTART expectations
Instead of expecting a `USER_CODE` symbol to be set, we expect `.org` to be
set in all userspace glue code. This gives us more flexibility with regards to
how we manage that.

Moreover, instead of making `USER_RAMSTART` mandatory, we make it default to
the end of the binary, which is adequate in a majority of cases.

Will be useful for my upcoming mega-commit... :)
2019-11-15 10:33:13 -05:00
Virgil Dupras 7cf3ed38da Extract str.asm from core.asm and make core included by userspace
Most of register fiddling routines (which is now the only thing contained
in care.asm) are used by almost all userspace apps, often in inner loops.

That makes the penalty of using jump tables for those a bit too high.
Moreover, it burdens jump tables needlessly.

Because this unit is very small (now that string routines are out), it makes
sense to always include it in binaries.
2019-11-14 10:14:15 -05:00
Virgil Dupras 7274dccbe7 Move ASCII consts to ascii.h
And made them shorter in name. The new ascii.h file allow reuse in userspace
code.
2019-11-13 20:38:06 -05:00
Virgil Dupras 2a55bfd375 stdio: remove a layer of indirection in GetC/PutC
We use zasm's ability to use labels in .equ directive.

We didn't do it before because for a while, we were in between scas
and zasm (scas was used in automated tests) so we needed to use the
lowest common denominator: zasm doesn't have macros and scas can't
use labels in .equ directives.

This forced us to add this layer of indirection. But now that we are
completely cut from scas' dependency, we can use this nice zasm's
ability.
2019-11-04 09:55:12 -05:00
Virgil Dupras 16bf8e28c0 Remove SHELL_LOOPHOOK
It was a bad idea and having sms/pad interact directly with sms/vdp
is much simpler.

ref #64
2019-11-03 19:13:01 -05:00
Virgil Dupras b745f49186 Rename blockdev's API routines to GetB/PutB
The goal is to avoid mixing those routines with "character devices"
(acia, vpd, kbd) which aren't block devices and have routines that
have different expectations.

This is a first step to fixing #64.
2019-10-30 16:59:35 -04:00
luz.paz 6a635fddd9 Fix misc. source comment typos
Found via `codespell -q 3 -S ./tools -L splitted`
2019-10-09 11:12:08 -04:00
Virgil Dupras f4b6c7637d zasm: rename #inc to .inc
scas, it's not needed any more.
2019-10-06 14:32:23 -04:00
Virgil Dupras c839703682 recipes/sms/romasm: ed and zasm, fully functional! 2019-07-25 14:24:18 -04:00
Virgil Dupras 13028d431e recipes/sms/romasm: limit mmap size
Otherwise, we overflow into the RAM mirror, which means we
overwrite the beginning of the RAM.
2019-07-23 23:01:17 -04:00
Virgil Dupras 1c6a7caeae recipes/sms/romasm: make zasm's memory usage fit the SMS 2019-07-23 16:50:19 -04:00
Virgil Dupras af0b6231ca recipes/sms/romasm: make ed's memory usage fit the SMS
Yup, that's ultimately why I've just made this whole big zasm
refactoring in the previous commits. To allow for this.

But also, zasm is in much better shape now...
2019-07-23 16:13:52 -04:00
Virgil Dupras ffa28195b1 recipes/sms/romasm: adjust glue to zasm changes
Forward reference of SHELL_MEM_PTR wasn't working (nor should it
have been...).
2019-07-23 15:42:52 -04:00
Virgil Dupras 87d794d426 recipes/sms/romasm: adjust ed/zasm offsets 2019-07-22 10:11:59 -04:00
Virgil Dupras 77d805ea0f shell: allow cmds to be shorter than 4 chars 2019-07-21 15:57:55 -04:00
Virgil Dupras 70a42e8c4d recipes/sms/romasm: first steps 2019-07-21 15:37:03 -04:00
Virgil Dupras 0c0db41477 recipes/sms/kbd: add schematic 2019-07-20 14:51:34 -04:00