thejpster / monotron

A simple 8-bit home computer style application for the TI Tiva-C Launchpad
Apache License 2.0
191 stars 9 forks source link

Add file I/O to the ABI #46

Open thejpster opened 5 years ago

thejpster commented 5 years ago

Need to be able to read/write files and list directories from the Apps, e.g. loading bitmaps/code from disk.

thejpster commented 5 years ago

MS-DOS offered a bunch of virtual files you could open:

Linux/UNIX has virtual devices in /dev which acheive the same effect.

In Monotron the devices we want to perform file I/O (read, write, etc) on are:

thejpster commented 4 years ago

An alternative approach is to provide a BIOS-level API (enumerating fixed disks, read/write sectors, etc) and moving file read/write into a DOS. This could be loaded into RAM or stored in ROM, but it would be distinct from the BIOS. CP/M does something similar. It would allow us to keep the OS the same on multiple platforms, while the BIOS deals with high-speed SDMMC vs 1-bit SPI, for example. It would effectively be a HAL.