I have started developing a 'proper' operating system for this computer. I am doing it for the 2018/09 Retrochallenge. http://mwsherman.com/rc2018/09/
Goals:
- Run native AVR programs in flash
- Run interpreted programs from SRAM
- Handle-based memory allocator: allow swapping memory from internal AVR memory to external memory
- Simple filesystem on SD card
Currently running in kittyOS:
- Hardware initialization
- Serial port as a 'char device'
- I/O devices abstracted: program running on the serial port could be switched to another device (if there was another device implemented to switch to!)
Existing code from the original cat1.c demo program: (to integrate in kittyOS)
- VGA driver (writable as char device for text; special calls for drawing sprites or pixels)
- SD Card driver (read/write linked lists of chained blocks)
- PS/2 keyboard driver (read only char device)
- Sound driver
Existing code run in simavr, but not tested on real hardware yet:
- 16-bit interpreter
- memory allocator ( can't use avr libc malloc, as I need allocation logic that knows about bitbang xram)
- task swapping
Todo List: not implemented anywhere yet
- filesystem directory (those linked list of disk blocks need a name... now you have a proper 'file')
- memory swapping (SRAM should just be a cache for XRAM structures)
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.
Love this project. The wooden case looks so so retro. I can't remember what retro computer it reminds me of.
Today's the day RC2018/09 !
I wouldn't bother with the bootjacking. There was a list on the Atmel site about which chips support self writing code. But then you have to worry about wear leveling, block erase time and things like that.
An interpreter is just as easy and fast enough.
Another thing. These chips have a wide temp range and a wide voltage range. They wont go fast at high temp and low voltage but at 5v you will have no problem running them at 32MHz or even faster - just adjust the bootloader to get the serial speed right for flashing.
The atMEGA1284 is a drop in replacement for the atMEGA664.
Are you sure? yes | no
please make only one. mruby
Are you sure? yes | no
Don't want a bunch of hacky AVR computers let loose?
Are you sure? yes | no
Very interested in the "native code through flash" option... Harvard architecture would seem to preclude it! Does that mean your CPU is allowed to flash itself during operation?
Are you sure? yes | no
Harvard architecture just means the program and data memory are separate. The AVRs can self-flash; that's how Arduino works. The goal is for most of the user-level programming to happen in the bytecode interpreter. Then if there is something that really needs full-speed AVR machine code, then it could flash itself. I haven't implemented that part yet, but others have.
I am currently using Chip45 bootloader. I don't want to write my own yet. But it turns out you can use anyone's bootloader in your own program using this trick called bootjacking. http://oneweekwonder.blogspot.com/2014/07/bootjacker-amazing-avr-bootloader-hack.html
Are you sure? yes | no