For the March 2019 Retrochallenge, I am continuing to work in kittyOS. I accomplished a lot last time, and am adding more this month.
For full details, check my personal webpage http://mwsherman.com/rc2019/03/
The goal is to turn the CAT-644 into a 'real' computer. And what I mean by that, is eventually I want to be able to turn it on, open a text editor, write some source code, compile, and run it, without turning on my PC. To do this it needs a real operating system.
The Unix model is everything is a file. This has been copied to death. I am intentionally trying something different. Instead, everything is a device. A special device, a mux, lets a program select thru a collection of devices. The plan, is the sdcard filesystem, is just a tree of virtual muxes, eventually selecting virtual block or char devices containing data. You could call them directories or files. But you don't need a traditional filesystem to get started; The basic setup is a single mux containing a single device such as a serial port.
Hardware Drivers
The following is all working in the kittyOS hardware drivers. Not all is bound to the OS by syscalls, but the driver's work on their own:
- Graphics
- 248x240 64-color VGA graphics (with 640*480 timings)
- Text output w/ scrolling
- Sprite render
- smooth 1px horz/vertical wraparound scrolling, with 'invisible' region
- FAST (50% cpu) and SLOW (90% cpu) modes
- Serial
- Up to 115k baud
- SDCard
- recognize SD (not SDHC, SDXC) up to 2GB
- read/write block
- PS/2 Keyboard
- Audio is supported (and tested) by the hardware, but not yet implemented in kittyos
Implemented and Working:
- Device driver tree
- Mainmux device supporting:
- character devices
- PS/2 keyboard
- VGA console
- serial port
- SPI port
- planned: A 'file' is just a seekable chardevice accessible thru a tree of virtual muxes, stored on an sd card.
- block devices
- sdcard
- init
- read/write blocks
- sdcard is controlled as spi device thru spi driver
- sdcard
- mux devices (mux is a collection of devices)
- the mainmux is the device thru which all other devices are reachable
- muxes can switch other muxes
- character devices
- Mainmux device supporting:
- 16-bit virtual machine interpreter
- 16-bit accumulator-register machine
- fastest possible dispatch: One 16-bit reg-reg arithmetic instruction per 6 AVR cycles (Can this be beat? I've looked everywhere for a faster interpreter. I can do in 8-bit machine with 5 cycles, but many programs want 16-bit math anyway)
- Handle-based memory allocator with automatic swapping between AVR internal memory and external SRAM. (possible future support for disk-swapping or load-on-demand)
Planned:
- interpreter-accessible syscalls for handle access
- Swappable handles containing code
- Storing chardevices on sdcard mux (finally 'files')
- Syscalls for sprites
- Audio support (eventually)
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.