Open Kylogias opened 3 years ago
Hmm, as an alternative I've been considering doing 8K ROM, 32K banked RAM, 24K GP RAM, or something to that effect. I would rather have the ROM carry a base OS (shell/some basic programs) and then load everything into RAM from a disk device. I don't think ROM banks make much sense over filling a few RAM banks for programs over 32K.
Data storage is also infinitely extensible through devices as well.
EDIT: hell, one of the memory banks could even be a ROM chip (just hook it up and don't respond to writes) so there's no need to distinguish for the sake of banking.
I don't see how you could add devices for stuff like external RAM/ROM dynamically, (without modifying the base program), unless there's a device API (is there a device API outside of the base program?)
They function as modules in the emulator - see screen.c
and kb.c
for examples. I think I'll spend some time in the next couple days though cleaning up the module system and adding in maybe support for a BANK
command in the emulator that can add arbitrary RAM/ROM banks. Will update in this issue :)
I am proposing ROM banks. Currently, if you want to swap out ROM banks, you'll have to put the Program Counter to an address in RAM and painstakingly set all the bytes in ROM individually. This would take 98304 cycles JUST TO DECREMENT A 2-BYTE VALUE, which is very slow, especially for fast-paced games (DOOM anyone?). Also, this method would require a Hard Drive device, else it would be useless. ROM banking allows for programs with a size greater than 32KB. If ROM banking was added, you can truly simulate pretty much everything with any amount of space, provided it doesn't exceed maximum banks and provided it doesn't need to Save/Load.
EDIT :: Reopened and repurposed