Virgil Dupras
5219887ad7
sdc: implement _crc16 in z80
před 4 roky
Virgil Dupras
8d78ca9dac
tests: add test_sdc
The SD card driver is a bit too slow to be bearable. I'll write
_crc16 in z80 and see how it goes.
před 4 roky
Virgil Dupras
b5c370a936
emul: embed blkfs in forth binary
This will allow us to read from blkfs in tests.
před 4 roky
Virgil Dupras
1bd191e86a
Move /emul/forth/* to /emul
Less noisy this way
před 4 roky
Virgil Dupras
816563e2e3
Stop LOADing on ABORT
This is done by adding a "C<* override" layer that is reset to 0 on
ABORT.
The problem was that when ABORT happened during a LOAD, we had a
resetted RSP and started from a clean INTERPRET, but LOAD didn't
have the opportunity to restore C<*, which caused it to continue
interpreting from the faulty BLK.
With a C<* override, we don't need to *restore* C<*, we just need to
clear the override.
před 4 roky
Virgil Dupras
af39b37dd1
Replace the "> " prompt with the more traditional "ok" one
This is more than cosmetic, it's also highly usable. The presence
or absence of the "ok" message allows us to know whether the command
aborted. Previously, the "> " prompt appeared when the system expected
a prompt in the INTERPRET context, whether the previous command aborted
or not.
Also, this allows us to get rid of that ugly FLAGS global variable.
před 4 roky
Virgil Dupras
a699c93509
Print word that wasn't found on "word not found" error
před 4 roky
Virgil Dupras
f19a5e1f71
Remove recipes/rc2014/zasm
That becomes irrelevant in Forth
před 4 roky
Virgil Dupras
44403c3d4c
Move icore to blkfs
The way is clear for complete stage1 bootstrapping on the RC2014
target!
před 4 roky
Virgil Dupras
8fbbf5209a
Copy sdc driver to blkfs
před 4 roky
Virgil Dupras
a19376df6c
Copy ACIA driver to blkfs
We can get rid of acia.z80, but not of acia.fs yet, we still need it.
před 4 roky
Virgil Dupras
dd6ce1b8fe
Avoid using (xentry) outside xcomp config
před 4 roky
Virgil Dupras
fcd77f80ab
Use blk's boot.z80
před 4 roky
Virgil Dupras
503dbe9a2c
Copy boot.z80 to blkfs
před 4 roky
Virgil Dupras
338769a0a8
z80a: add PUSH0, PUSH1, PUSHZ, macros
před 4 roky
Virgil Dupras
7464c67c80
boot: fix (roll)
It didn't work for values over 0xff. Duh!
před 4 roky
Virgil Dupras
7a0e63746f
parse: don't validate 0x and 0b lengths
It doesn't serve much purpose and takes up many precious bytes. And,
after all, parsed didn't do it either...
před 4 roky
Virgil Dupras
372524fd19
Move xcomp to blocks
před 4 roky
Virgil Dupras
446ce574cd
Add words "'S" and "S0"
před 4 roky
Virgil Dupras
ae14c55feb
boot: a little dereferencing to make things a bit faster
před 4 roky
Virgil Dupras
e569e40665
Forth-ify 2DUP 2OVER 2SWAP
2DROP was left in boot.z80 because it's used in icore.
před 4 roky
Virgil Dupras
0438cb92fe
Add word "ROLL"
před 4 roky
Virgil Dupras
2de1eabaa6
z80a: add LDIR, LDDR, and friends
před 4 roky
Virgil Dupras
4967c2add2
Merge z80c.fs and boot.fs into boot.z80
před 4 roky
Virgil Dupras
41ed70f8cb
z80c: Add word "PICK"
před 4 roky
Virgil Dupras
58c017448f
z80a: add JPccnn,
před 4 roky
Virgil Dupras
353d12c27d
boot: inline chkRS, make next a bit faster
před 4 roky
Virgil Dupras
bf49ca2ed2
recipes/rc2014: fix Makefile
It didn't have z80a anymore.
před 4 roky
Virgil Dupras
d466c6d95d
emul: make stage2 load z80a from blkfs
This allows us to remove forth/z80a.fs. Another big step towards
self-hosting!
před 4 roky
Virgil Dupras
6ae65940d2
Update bootstrap bin
It seems that I had forgotten in an earlier commit.
před 4 roky
Virgil Dupras
0892193cbe
Copy z80a.fs to disk blocks
I don't remove z80a.fs yet because build process needs it, but that
will change shortly.
před 4 roky
Virgil Dupras
98191d0b0d
recipes/rc2014/sdcard: now works under Forth!
před 4 roky
Virgil Dupras
dfaa1dc101
link: add "offset" argument to RLDICT
As long as our target was the first word of the "user" dict, using
target's prev to compute offset was fine, but when the target is not
the first word, this system breaks down.
This is the case when, instead of including source code in our boot
binary, we paste it in Collapse OS' prompt.
Also, adjust RC2014 recipe to include stage 3 assembling instructions
with the "paste into prompt" method.
před 4 roky
Virgil Dupras
29a6ee128d
core: fix PSP leak in CASE..ENDCASE
před 4 roky
Virgil Dupras
a2d89de557
drv/sdc: implement core words in z80
In addition to making the driver significantly faster, it allows us
to make SDC port configuration opaque to sdc.fs.
před 4 roky
Virgil Dupras
a70366aa43
drv/sdc: Implement SDC!
This has been tested in the RC2014 emulator. I could edit blocks with
the Block Editor and they would correctly be written to SDC.
před 4 roky
Virgil Dupras
47a7133b8b
drv/sdc: Implement "SDC@" as a BLK@ word
"0 LIST" in the RC2014 emulator w/ SD card works!
před 4 roky
Virgil Dupras
f3c92684a0
link: improve reliability by never relinking last word
It's not possible to reliably determine its end and with some memory
initialization scenarios, it makes RLDICT fail.
před 4 roky
Virgil Dupras
052c744000
drv/sdc: implement "SDC@"
I can read a block from blkfs in RC2014 emulator. It even checks
CRC16 successfully!
před 4 roky
Virgil Dupras
c64a8a2e2b
drv/sdc: new unit to drive SD card through SPI relay
Goes through initialization in RC2014 emulator.
před 4 roky
Virgil Dupras
b062a9092a
parse: use "0<" instead of "0 <"
As I wrote in my "Clarify signed-ness" commit, "0 <" is broken.
Also, made this unit a bit more compact. The RC2014 stage1 can
really use some breathing room...
před 4 roky
Virgil Dupras
66f65daa08
Add word LEAVE
před 4 roky
Virgil Dupras
19d94dfb47
recipes/rc2014: stage1 is too big! saving some space
stripfc requires 2 spaces before "(" to strip a comment. This was
a low hanging fruit for me to get stage1.bin under the 8K line.
That thing is getting tight...
před 4 roky
Virgil Dupras
287213fc68
recipes/rc2014/eeprom: remove old stuff
před 4 roky
Virgil Dupras
82044454d5
Merge branch 'master' into forth
před 4 roky
Virgil Dupras
9c41744e46
emul/hw/rc2014: implement blk write in sdc
All of that should help me implement sdc support much faster in
Forth.
před 4 roky
Virgil Dupras
7544b3834b
emul/hw/rc2014: implement blkread in sdc
I now get to "fls" in recipes/rc2014/sdcard!
před 4 roky
Virgil Dupras
ae470397d7
emul/hw/rc2014: add sdc emulator (wip)
so far, it goes through initialization with the rc2014/sdcard recipe.
před 4 roky
Virgil Dupras
2cadae260d
editor: add "U" word
před 4 roky
Virgil Dupras
9edab10a3a
blk: add dirty flag and auto write blocks on fetch
Also, fix some PSP leaks related to LOAD.
před 4 roky