Hello,
First off, I will admit that I don't really post here often. I lurk a few times a week but have never really interact. I am more of a vintage computer guy.
Over the last 6 months I have been designing an operating system for 8 and 16 bit systems. While I have been designing it with the TI-84 in mind, it can be ported and will run on just about anything with at least 16kb of memory and some sort of timed interrupt. It is nowhere near complete, but over the last few weeks it has progressed to the point where I can demonstrate portions of the system.
While targeted at the TI-8x line of calculators, I am currently developing it on a custom Z80 system emulator I whipped up in Java. I did this so it is easier to interact with the system. I am also not a TI-84 expert, so this is easier to develop for.
What Is It?
System/I MICRON is a fully preemptive multitasking operating system. It is not another TIOS shell, but an entirely new operating system. Inspired by the likes of UNIX, OS/9, RT-11, and CP/M, it provides a powerful environment for designing, compiling, and running programs while using minimal resources. The finished operating system will include:
- Full preemptive multitasking.
- Ability to run comfortably in ~16kb.
- Process forking and piping.
- Drivers can be loaded/unloaded from memory on the fly.
- Batch files can be executed
- Hardware can be interfaced using device drivers.
- All user space programs can be compiled using the MICRON-Basic language, providing fully portability between architectures.
- Compiler, text editor, and command line standard on all systems.
- And much more
Why Is It Useful?
It isn't really, to be honest. It is more of an interesting programming project for me. Maybe once I finish up writing the core operating system, I can start writing network drivers or something.
What is Inside?
I tried to make MICRON as portable has humanly possible. No MMU or complicated interrupt hardware is required. The only things that are needed is a single timed interrupt to signal a context switch.
The system is divided up into two basic parts. The Kernel and the User Space. The Kernal allows user programs to be interfaced to the system. For my specific test-bed the Kernel is written in Z80 assembly. The Kernel is fairly small, as it only handles context switching, pipe management, and memory allocation. It takes up about 2kb of memory in total. All other programs are running in the user area. User area programs are all written in MICRON-Basic, which is a simple, basic-like compiled language that I wrote for MICRON. While it is fairly limited, it is better than assembly and allows for fully portability. This should make porting the system extremely easy, as the only things that need to be modified are the Kernel, compiler, and device drivers.
Here is a simple diagram of the MICRON system running the program TY.PRG
All user space programs interact with the Kernel in some way or another. In addition, The CONSOLE program acts as the hub between different programs. FSD's (File System Drivers) are attached to the console, and programs communicate with it through the console instead of communicating directly.
As mentioned before, all user space programs are written in MICRON Basic for comparability sake. While it isn't the most powerful language by my own admission, it is still easier than assembly. The compiler is also super small, so it should be able to fit onto an actual system with 16kb of memory.
Here is an example of the classic "Hello World" program, like I said, it ain't pretty.
Code:
Progress So Far
So far I am about 60% done with the system. The Kernel and MICRON Basic Cross Compiler are all completed. The CONSOLE program is almost completed, with all that is needed to be added is some internal process commands. The things that still need to be added are a text editor and a user space MICRON Basic compiler. It also still needs to be ported to the TI-8x calculators, but that shouldn't be too difficult.
I made a small video showcasing the progress I have in my emulator:
There is more information about this test is the youtube video description.
Questions
So, I know a little bit about the internals of the TI-84s, but I am not an expert. I am going to be porting the system over to a real calculator over the next couple of months so I have a few questions.
1. Can I dual boot TIOS and another operating system somehow? Is it possible to write a routine to load TIOS instead of a custom operating system. If not, is it possible to be able to boot some sort of fully-memory utility (bigger than 8kb) from inside of TIOS.
2. Do I get full access to memory when running an OS. Is there any restrictions of portions of memory I can actually execute.
3. Can I reserve actual space in the Flash memory so I can have a separate file system without clobbering the TIOS file system.
If anyone has any feedback or questions, I would be more than happy to hear them. This is my first large scale low level programming project, so this is kind of learning experience for me.
Thank you for reading.
First off, I will admit that I don't really post here often. I lurk a few times a week but have never really interact. I am more of a vintage computer guy.
Over the last 6 months I have been designing an operating system for 8 and 16 bit systems. While I have been designing it with the TI-84 in mind, it can be ported and will run on just about anything with at least 16kb of memory and some sort of timed interrupt. It is nowhere near complete, but over the last few weeks it has progressed to the point where I can demonstrate portions of the system.
While targeted at the TI-8x line of calculators, I am currently developing it on a custom Z80 system emulator I whipped up in Java. I did this so it is easier to interact with the system. I am also not a TI-84 expert, so this is easier to develop for.
What Is It?
System/I MICRON is a fully preemptive multitasking operating system. It is not another TIOS shell, but an entirely new operating system. Inspired by the likes of UNIX, OS/9, RT-11, and CP/M, it provides a powerful environment for designing, compiling, and running programs while using minimal resources. The finished operating system will include:
- Full preemptive multitasking.
- Ability to run comfortably in ~16kb.
- Process forking and piping.
- Drivers can be loaded/unloaded from memory on the fly.
- Batch files can be executed
- Hardware can be interfaced using device drivers.
- All user space programs can be compiled using the MICRON-Basic language, providing fully portability between architectures.
- Compiler, text editor, and command line standard on all systems.
- And much more
Why Is It Useful?
It isn't really, to be honest. It is more of an interesting programming project for me. Maybe once I finish up writing the core operating system, I can start writing network drivers or something.
What is Inside?
I tried to make MICRON as portable has humanly possible. No MMU or complicated interrupt hardware is required. The only things that are needed is a single timed interrupt to signal a context switch.
The system is divided up into two basic parts. The Kernel and the User Space. The Kernal allows user programs to be interfaced to the system. For my specific test-bed the Kernel is written in Z80 assembly. The Kernel is fairly small, as it only handles context switching, pipe management, and memory allocation. It takes up about 2kb of memory in total. All other programs are running in the user area. User area programs are all written in MICRON-Basic, which is a simple, basic-like compiled language that I wrote for MICRON. While it is fairly limited, it is better than assembly and allows for fully portability. This should make porting the system extremely easy, as the only things that need to be modified are the Kernel, compiler, and device drivers.
Here is a simple diagram of the MICRON system running the program TY.PRG
All user space programs interact with the Kernel in some way or another. In addition, The CONSOLE program acts as the hub between different programs. FSD's (File System Drivers) are attached to the console, and programs communicate with it through the console instead of communicating directly.
As mentioned before, all user space programs are written in MICRON Basic for comparability sake. While it isn't the most powerful language by my own admission, it is still easier than assembly. The compiler is also super small, so it should be able to fit onto an actual system with 16kb of memory.
Here is an example of the classic "Hello World" program, like I said, it ain't pretty.
Code:
BYTE A = 0
BYTE E = 0
STRING H[13] = "HELLO WORLD",10,0
@START
;WRITE TO SIO
WRITE #SIO,H[A],E
IF E > 0 GOTO ERROR
INC A
IF H[A] > 0 GOTO START
;KILLS PROCESS
GETPID A
LET #COM[1] = A
LET #COM[0] = 255
HALT:
GOTO HALT
ERROR:
FORFIT
GOTO START
Progress So Far
So far I am about 60% done with the system. The Kernel and MICRON Basic Cross Compiler are all completed. The CONSOLE program is almost completed, with all that is needed to be added is some internal process commands. The things that still need to be added are a text editor and a user space MICRON Basic compiler. It also still needs to be ported to the TI-8x calculators, but that shouldn't be too difficult.
I made a small video showcasing the progress I have in my emulator:
There is more information about this test is the youtube video description.
Questions
So, I know a little bit about the internals of the TI-84s, but I am not an expert. I am going to be porting the system over to a real calculator over the next couple of months so I have a few questions.
1. Can I dual boot TIOS and another operating system somehow? Is it possible to write a routine to load TIOS instead of a custom operating system. If not, is it possible to be able to boot some sort of fully-memory utility (bigger than 8kb) from inside of TIOS.
2. Do I get full access to memory when running an OS. Is there any restrictions of portions of memory I can actually execute.
3. Can I reserve actual space in the Flash memory so I can have a separate file system without clobbering the TIOS file system.
If anyone has any feedback or questions, I would be more than happy to hear them. This is my first large scale low level programming project, so this is kind of learning experience for me.
Thank you for reading.