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

139 Commits

Author SHA1 Message Date
devisn
0576d2dfa1
a recipe for the ZX Spectrum (#105)
* Add files via upload

* a monolithic build recipe for ZX Spectrum

* emulation and emulated tapes in README.md
2020-06-11 13:34:34 -04: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
a442c46935 sms/vdp: highlight cursor with inverted palette 2020-02-26 09:43:50 -05:00
Virgil Dupras
247b200dcc New kernel module: grid 2020-02-24 20:36:08 -05:00
Virgil Dupras
69f0c6dafd trs80/floppy: implement write 2020-02-22 12:09:43 -05:00
Virgil Dupras
438c71ad3d trs80/floppy: new module
Read-only support for now, hardcoded on drive :1. But it seems to work.

Can't wait to get a CFS running on this!
2020-02-21 19:30:57 -05:00
Virgil Dupras
bd38d46892 recipes/trs80: fix double line feeds
Lines should be terminated only with a CR on this system, not CRLF.
2020-02-21 08:40:42 -05:00
Virgil Dupras
9515d63d47 recipes/trs80: Collapse OS runs on the TRS-80 Model 4P! 2020-02-12 11:23:49 -05:00
Virgil Dupras
d70c6d3b5f sms/vdp: improve comments 2020-01-08 18:38:55 -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
0d7693a163 core: remove writeHLinDE
It wasn't used much so I inlined it.
2019-12-13 09:56:23 -05:00
Virgil Dupras
4f7a05e3b7 core: remove cpHLDE
It wasn't used much, so I replaced its use in the kernel with direct code
and moved the routine in apps/ed, the only other place where it was used.
2019-12-12 15:53:14 -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
880775ae69 recipes/rc2014/sdcard: use BASIC shell 2019-12-11 11:18:32 -05:00
Virgil Dupras
5e0a548faa kbd: squeeze out a few bytes 2019-12-06 22:45:39 -05:00
Virgil Dupras
3a68807cd4 kbd: make kbdGetC blocking
I forgot to update this when changing stdio GetC API.
2019-12-06 19:59:46 -05:00
Virgil Dupras
817088f794 fs: fix broken "ensure Z" in fsIter 2019-11-25 22:32:55 -05:00
Virgil Dupras
7262993f14 basic: add if 2019-11-21 16:06:14 -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
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
17cc28e211 recipes/ti84: use a 3x5 font instead of a 5x7 one
This allow a lot more characters to fit on that tiny screen...

ref #41
2019-11-11 13:26:24 -05:00
Virgil Dupras
30d6fdb16b ti/lcd: use brand new support for IX in SRL and RR 2019-11-10 22:07:44 -05:00
Virgil Dupras
c4658591bd ti/lcd: allow for fonts smaller than 5 pixels
That's a lot of code for such a small change, but there's a big difference
between 5 pixels and 4 pixels: 4 pixels requires compositing.
2019-11-09 22:55:15 -05:00
Virgil Dupras
6d9f96aee6 ti/lcd: add support for backspace
Also, fix visual glitch on line wrap.
2019-11-09 14:37:52 -05:00
Virgil Dupras
a4190f9984 recipes/ti84: document usage
ref #41
2019-11-09 14:20:01 -05:00
Virgil Dupras
2026113480 ti/kbd: lowercase letters by default, 2nd to upcase 2019-11-09 13:38:35 -05:00
Virgil Dupras
9c37471780 ti/kbd: improve debouncing
Previously, on real hardware (emulator behaved fine), we would routinely
get repeat keys unless pressing the button very fast. This commit solves that.
2019-11-09 13:22:01 -05:00
Virgil Dupras
418af5f626 ti/kbd: make Alpha and 2nd toggle
Previously, when being in A-Lock mode, activating Alpha wouldn't make
us go temporarily in digit mode, as is expected.
2019-11-09 13:12:36 -05:00
Virgil Dupras
67f689260f ti/lcd: Add scrolling through z-offset 2019-11-09 08:25:10 -05:00
Virgil Dupras
6a70a0e5e6 ti/lcd: wrap rows on overflow 2019-11-09 08:09:01 -05:00
Virgil Dupras
b27a71cb88 ti/kbd: fix space character 2019-11-09 08:01:03 -05:00
Virgil Dupras
6c1b1f2b79 ti/lcd: wrap to next line when overflowing 2019-11-08 22:55:56 -05:00
Virgil Dupras
bb2e528b65 ti/lcd: clear screen on init
LCD RAM persists between reboots, makingit necessary to clear it.

ref #41
2019-11-08 21:54:03 -05:00
Virgil Dupras
c896b77143 ti/kbd: implement A-Lock
ref #41
2019-11-08 20:27:43 -05:00
Virgil Dupras
8d5c26f299 ti/kbd: add alpha support
no a-lock or lowercase yet.

ref #41
2019-11-08 15:45:45 -05:00
Virgil Dupras
ca8b315e9d ti/kbd: widen char detection
no alpha yet.

ref #41
2019-11-08 14:58:29 -05:00
Virgil Dupras
dca6ce4e8e ti/kbd: begin GetC implementation
For now, only digits are scanned. Lifted from my "tiseg7" example.

ref #41
2019-11-08 14:04:56 -05:00
Virgil Dupras
6a4bddc493 ti/lcd: ensure that variables are initialized 2019-11-08 11:45:37 -05:00
Virgil Dupras
c57f2d6973 fonts/5x7: add lowercase letters 2019-11-07 22:27:12 -05:00
Virgil Dupras
fda9c9826e ti/lcd: add linefeed support
There's no scrolling yet...

ref #41
2019-11-07 20:53:15 -05:00
Virgil Dupras
a13a94bbc7 fix typos 2019-11-07 12:13:00 -05:00
Virgil Dupras
ca84b5dac8 recipes/ti84: first step
This was mostly lifted from my "tihello" example, but it required significant
adjustments.

This commit also introduces a font management system. A lot of fonts are
available online, but sources aren't always clear so to avoid copyright
landmines, I re-created my first 5x7 font from scratch.

As it is now, this resulting ROM gets "Collapse OS>" to be displayed on the
LCD screen. Much work still left to do.

ref #41
2019-11-07 11:52:29 -05:00
Virgil Dupras
3ef964e74d acia: make GetC blocking 2019-11-04 14:44:43 -05:00
Virgil Dupras
41338a4b23 stdio: add "Accepted characters" comment section
ref #64
2019-11-04 10:12:17 -05:00
Virgil Dupras
27149338e4 stdio: fix typo 2019-11-04 10:04:09 -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
2a513e6f57 stdio: make stdioGetC and stdioReadline blocking
ref #64.

Also, fix a bug in the shell where it would write outside the buffer's
bounds when given a completely filled buffer without a space character
in it.
2019-11-03 20:32:27 -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