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

73 Commits

Author SHA1 Message Date
Virgil Dupras
490eceab6d emul/z80: flatten directory structure
I'm about to reuse sdc.c in sms.c and the old directory structure
was becoming awkward.
2020-10-25 15:58:00 -04:00
Virgil Dupras
efe4b13a4e Move /emul to /emul/z80
I'm planning on adding other subfolders. 8086 for example...
2020-10-24 16:50:22 -04:00
Virgil Dupras
46c95320af emul: bring "hw" subfolders one level higher 2020-10-24 14:37:19 -04:00
Virgil Dupras
8cecd54410 emul/sms: add PS/2 keyboard emulation 2020-10-24 11:18:48 -04:00
Virgil Dupras
473d04d7d9 recipes/sms: add cartridge hacking instructions 2020-10-12 21:39:53 -04:00
Virgil Dupras
1681e61956 emul/sms: don't hardcode name table offset
Use reg 2 as specified.
2020-10-12 21:11:46 -04:00
Virgil Dupras
6b895d0745 sms: explicitly set ourselves in IM 1
I'm not sure if not setting IM 1 explicitly can be the source of bugs,
but SMS Power's tutorial mentions that everyone is doing it, so...
2020-10-10 13:31:54 -04:00
Virgil Dupras
0d172cc2c4 tools: add smsrom
Running a ROM on an everdrive is one thing, but running a ROM
directly is another: my hacked up sega.bin didn't have a proper
checksum, so the ROM didn't run.

This new tool transforms a binary into a properly-headered ROM.

Has been tested on an actual SMS.
2020-10-10 13:30:43 -04:00
Virgil Dupras
32d5f87b4e sms: don't use BC
The PAD driver was broken since IP moved to BC. Oops.
2020-10-06 20:36:29 -04:00
Virgil Dupras
91f79d1131 Move z80a from B200 to B5
The idea is to consider assemblers as "runtime" apps instead of
placing them in the "bootstrap" section of the blocks. These apps
will be used for much more than bootstrapping.

Moved its documentation to doc/asm.txt and made its code blocks
more compact.
2020-09-21 17:51:08 -04:00
Virgil Dupras
8e624034bf recipes/sms: move recipe blocks into local overlay 2020-09-20 10:21:21 -04:00
Virgil Dupras
f7dc6a2b79 Fix sms and ti84 recipes
Their asm code has been broken for a little while! oops!
2020-09-19 21:03:18 -04:00
Virgil Dupras
8788379aac Flatten recipes 2020-08-18 15:46:14 -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
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