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

318 Commits

Author SHA1 Message Date
Virgil Dupras
5e13dcedf3 Make KEY and EMIT into switch words 2020-10-28 16:00:58 -04:00
Virgil Dupras
04bd57b527 Remove BIT@ and BIT!
They were only used in the ti84 recipe and were not worth their cost.
2020-10-27 22:51:08 -04:00
Virgil Dupras
6947fea2a8 emul/z80: add SD card support to SMS
It works (in emulation, but soon on real hardware!), but the LIST
command is awkward due to tight screen estate...
2020-10-25 16:53:58 -04:00
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
5a77b80d3d emul/8086/pcat: fix broken int13h logic
I had forgotten that heads index increment before track index.
2020-10-25 12:21:44 -04:00
Virgil Dupras
ba21b6a9f5 emul/8086: add PC/AT emulator 2020-10-25 10:27:52 -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
eafcb0c440 avrpgm: add EEPROM support
also, verify all 3 first bytes of SPI commands. I'm not sure why
I wasn't doing that, probably because I was getting a lot of AVR
err and thought that only 2 bytes of the cmd were echoed. But now,
with a reliable SPI setup, verifying 3 bytes seems to work.
2020-10-05 19:36:49 -04:00
Virgil Dupras
8630b0a8ed recipes/rc2014/avr: new recipe 2020-10-05 18:46:22 -04:00
Virgil Dupras
8bf6258673 Add word TICKS
Adding a delay such as the 20ms one we have in AVR programmer's
initialization routine is tricky without a word like TICKS.

This implementation is highly inaccurate, but more accurate and
reliable than a "ballpark" DO..LOOP...
2020-09-25 17:31:06 -04:00
Virgil Dupras
35840ad8e6 sdc: don't use ABORT"
ABORT" doesn't work in xcomp.

Also, improve xcomp docs and fix misdocumentation.
2020-09-24 13:10:41 -04:00
Virgil Dupras
25a35cf28e Move 8086 boot code from B800 to B440
That slims down blkfs a lot.
2020-09-21 20:09:42 -04:00
Virgil Dupras
b21be43535 Move 8086 assembler from B730 to B30
Also, move doc to doc/asm.txt.

Also, fix the pcat recipe which was broken since the overlay change.
I hadn't noticed it because I didn't have to rebuild the MBR.
2020-09-21 19:24:54 -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
fea9beac1e recipes/pcat: move recipe blocks into local overlay 2020-09-20 20:48:52 -04:00
Virgil Dupras
475171d07b recipes/ti84: move recipe blocks into local overlay 2020-09-20 20:24:09 -04:00
Virgil Dupras
373d03e0b1 recipes/trs80: move recipe blocks into local overlay 2020-09-20 11:57:30 -04:00
Virgil Dupras
97ec2569a0 recipes/rc2014: move recipe blocks into local overlay 2020-09-20 10:50:13 -04:00
Virgil Dupras
8e624034bf recipes/sms: move recipe blocks into local overlay 2020-09-20 10:21:21 -04:00
Virgil Dupras
e123c0e536 Fix asm in z80mbc2 recipe 2020-09-20 09:01:11 -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
495d2819d2 recipes/rc2014/sdcard: make spi relay design multi-devices
Also, fix the SPI relay driver to properly AND-away the result of
the CTL read.

Tested with a real prototype, works fine.
2020-09-18 19:22:56 -04:00
Virgil Dupras
7dc00179f7 tools/upload: use A! instead of C! to write
By default, it changes nothing, but it allows interesting
setups, such as using AT28! for directly uploading to EEPROM.

I've also updated the EEPROM recipe to upload directly to 0x2000.
I'm not sure what has changed, but it's working fine now.
2020-09-17 13:30:29 -04:00
Virgil Dupras
1a6a549857 Make the SPI Relay protocol support multiple devices
Working on programming AVR chips exposes a glaring omission in my
first design of the SPI Relay: not allowing multiple devices make
this task hard. I constantly have to unplug my SD card before, plug
the AVR chip holder, then play a bit, then unplug the AVR holder,
then replug the SD card...

My prototype for a SPI relay design is built, but I haven't tested
it yet. I need to adapt the code first, which is what I do here.

When the prototype is tested, I'll update the SDC recipe with a new
schema.
2020-09-17 09:48:55 -04:00
Virgil Dupras
9c36885503 Fix doc innacuracies 2020-08-30 16:53:27 -04:00
Virgil Dupras
46676547d9 spi: add SPI_DELAY decl
AVR chips often run at less than z80's system clock. This means that
our SPI relay needs to have its own clock to properly communicate
with it. This means that the delay between OUT and IN can't be
hardcoded to 2 NOPs anymore. It needs to be configurable.
2020-08-23 07:55:17 -04:00
Virgil Dupras
bcf04f441d arduinouno: add schema to at28wr recipe 2020-08-21 20:25:06 -04:00
Virgil Dupras
11f8843a16 rc2014: add sio recipe 2020-08-18 16:02:47 -04:00
Virgil Dupras
8788379aac Flatten recipes 2020-08-18 15:46:14 -04:00
Virgil Dupras
6d2a0f749a recipes/rc2014: fix out-of-date information 2020-08-16 20:54:06 -04:00
Virgil Dupras
124da6adec Move SD Card subsystem outside of RC2014 recipe and add protocols
Although the SPI Relay driver is RC2014-specific, the SD Card driver
is generic enough to be a subsystem. That's the second subsystem we
add and this warrants, I think, the formalization of a new concept:
protocols.
2020-08-16 14:30:33 -04:00
Virgil Dupras
007252e459 Move SIO driver into RC2014 recipe 2020-08-16 09:31:02 -04:00
Virgil Dupras
939a1da9e6 recipes/arduinouno/at28: add companion at28dump program 2020-07-28 16:29:10 -04:00
Virgil Dupras
b8e52707e9 recipes/arduinouno/at28: improve reliability
Previously, it could never write more than a few bytes before pingpong
getting a mismatch error. Now, I can pingpong Collapse OS binary
without a mismatch.
2020-07-28 15:23:10 -04:00
Virgil Dupras
3607eefa55 Add arduinouno/at28 recipe 2020-07-22 17:26:06 -04:00
Virgil Dupras
d97012ecae Fix makefile build-from-clean-repo glitches 2020-06-30 10:24:12 -04:00
Virgil Dupras
f09aa0603c rc2014: separate SPI relay and SDC drivers
My intention is to reuse the SPI relay to program AVR MCUs from a
RC2014.
2020-06-29 18:48:00 -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
b8800be76f rc2014: improve SD card driver docs 2020-06-28 16:34:41 -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
49d7a7f435 z80mbc2: add BLK support 2020-06-22 21:21:24 -04:00