Building a W65C265S Operating System (?)
- rehsd

- 20 hours ago
- 2 min read
As my W65C265S hardware build is coming along well, I would like to develop an operating system (OS) for it. While I have done miscellaneous 65xxx development over the years, my code has always been a mishmash of routines. The closest I have come to better understanding operating systems is implementing FreeDOS on my 286/386 builds, where I was adding core BIOS routines to support FreeDOS. So, can I hack my way through this and develop and operating system? Time will tell.
So what is an operating system?
I am going to work off this definition: An operating system is the software layer that sits between programs and the hardware, providing the essential services, abstractions, and control needed to run code safely, consistently, and efficiently.
Three fundamentals of an operating system:
Resource management: CPU, memory, I/O devices, storage.
Hardware abstraction: read files, draw a shape, etc.
Program execution environment: startup, system calls, memory layout, multitasking, error handling.
Roadmap
If I have any chance of success, I will need to continue to build my knowledge of 65816 development. I will also benefit from a plan of attack. Given that, I am thinking of working through OS development in the following general order (knowing that I will need to loop back at times as I learn).
Foundations
Reset, startup code
Set CPU to native mode
Configure M/X flags
Initialize stack
Set up Direct Page
Configure memory map
Initialize internal peripherals
Console and video drivers (ILI LCD, VGA)
TX/RX routines
Video primitives (pixels, lines, rectangles, circles) and character support
Basic interrupt handling
Kernel core
Timer driver
Syscall mechanism
COP handler
Syscall table
Memory management
Static memory map
Kernel heap
Device abstraction
Video functions
Block devices
Filesystem
Program loader
FAT16
OS Tools
Shell, monitor
Libraries, runtime
Multitasking
Graphic user interface
As with most of my posts, this will be a 'living' post that I will continue to update as I learn and progress on a '265 OS. More to come!

Comments