"UzeDOS" ideas

Topics related to the API, programming discussions & questions, coding tips, bugs, etc. should go here.
Post Reply
User avatar
ry755
Posts: 226
Joined: Mon May 22, 2017 6:01 am

"UzeDOS" ideas

Post by ry755 »

Surely I can't be the only one who likes to see *actual computers* being made out of microcontrollers, right??? :P

I have this vague idea in my head of creating a sort of disk-operating-system for the Uzebox, which would then load and execute a single application at a time. Currently the way Uzebox games and applications work is by having a kernel that gets linked directly with the application, creating a single binary that gets flashed. What I'd like to try doing is creating a more usual-style kernel, where the kernel and application are completely separated. Where the kernel is loaded into one part of flash and applications get loaded into another part of flash, which then can call into the kernel via a jump table or interrupt vectors or something. The kernel would use the self-flashing features of Jubatian's bootloader to write applications to a dedicated section in flash before executing them.

The way I see it, it would work something like this:
1. Bootloader loads the kernel into low flash
2. Kernel loads the startup application (some form of text shell) into high flash and jumps to it
3. Shell executes commands, and if requested, asks the kernel to overwrite the shell with the user's requested application
4. When the application returns, go to step 2

Special care would need to be taken to ensure that the limited 4KB of RAM gets split between the kernel and the application in a way where they don't overwrite each other, but that should be easy enough to do with linker scripts I think?

All of this would utilize the keyboard adapter to create a little computer out of the Uzebox hardware! :D
User avatar
Artcfox
Posts: 1382
Joined: Thu Jun 04, 2015 5:35 pm
Contact:

Re: "UzeDOS" ideas

Post by Artcfox »

So it would be sort of like an "extended bootloader" with jumptables in the extended portion, and an API that defined where certain functions are? I guess it could have functions for listing the contents of the SD card, changing directories, and other "disk" like activities?

It's an interesting concept, though if the kernel remains the same, it might limit the video modes an application can use, since you would have to fit both the kernel's video mode and the application's video mode into the same shared flash space on the chip.
User avatar
ry755
Posts: 226
Joined: Mon May 22, 2017 6:01 am

Re: "UzeDOS" ideas

Post by ry755 »

Yeah kinda, mainly I was thinking it would provide a set of APIs similar to MS-DOS and the like, which could be used primarily for creating text-based applications for the Uzebox. Maybe a little text editor for example.
User avatar
Artcfox
Posts: 1382
Joined: Thu Jun 04, 2015 5:35 pm
Contact:

Re: "UzeDOS" ideas

Post by Artcfox »

Have you heard of uLisp?

It's a LISP interpreter that runs on many microcontrollers, and with the AVR version, it even lets you generate machine code using the built-in assembler (also written in LISP), and then it copies the program to flash memory where it can execute it. It doesn't specifically say the 644 is supported, but if it runs on an ATmega328, and the 1284, it will probably also work on the 644.

That combined with a high-res video mode like mode 9 in 80x25 mode could be really awesome. It looks like it already has SD card support. I wonder if anyone's written uEmacs for it yet. :lol:

The page has examples, and one of them is of a text-based adventure game.
User avatar
ry755
Posts: 226
Joined: Mon May 22, 2017 6:01 am

Re: "UzeDOS" ideas

Post by ry755 »

I haven't seen that before but it looks super cool!! Being able to write code directly on the Uzebox would be super neat.
Post Reply