Crazy 6502 emulator idea
Posted: Wed May 10, 2006 7:25 am
I am about to do something that, at first, sounds ridiculous.
I love programming the 6502, and the OS I am writing works with it, and I'd like to make programs I happen to write for my OS available outside of the 6502 series CPUs without rewriting. That being said, I want to be able to empower my OS to use some of the enhanced features of alternative platforms such as PCs with multi-megabyte memory availability and fast disks, while still being a 6502 OS.
Here's my possibly silly idea: a 6502 emulator with a twist. I want to write a 6502 emulator that will faithfully emulate a 6502 with 32K of RAM and 8K of ROM. That's the part that has been redone a billion times. The twist is this: I want to provide external services to my OS in the emulator via a series of I/O ports and memory-mapped I/O pages from the 6502's point of view. Paging data in and out, banking memory in and out, being able to use a virtual device protocol of some sort to access a folder or disk image on the PC's hard drive directly...basically, it will run the OS on the PC or Alpha or Sparc or whatever, but instead of emulating an existing architecture, using the existing OS on the computer to expand its capabilites beyond that of practically any 6502 system that may ever exist. Granted, external hard drives and 16MB RAM 65816 systems exist for established architectures, but this would effectively allow the 6502 OS to exploit the capabilities of the host computer such as running at MHz speeds the 6502 will never reach, being able to run tons of programs at once, not worrying about severe memory constraints, etc.
Maybe it would be totally pointless, but I think it could be useful and interesting for all us hobbyists to have a virtual 6502 platform that offers features we may never see in a real one.
After all, every emulator I've seen stays constrained to emulating existing hardware. I've never seen one yet that was written specifically to scale out and use the host's full potential instead.
My $0.02, deposit as needed.
I love programming the 6502, and the OS I am writing works with it, and I'd like to make programs I happen to write for my OS available outside of the 6502 series CPUs without rewriting. That being said, I want to be able to empower my OS to use some of the enhanced features of alternative platforms such as PCs with multi-megabyte memory availability and fast disks, while still being a 6502 OS.
Here's my possibly silly idea: a 6502 emulator with a twist. I want to write a 6502 emulator that will faithfully emulate a 6502 with 32K of RAM and 8K of ROM. That's the part that has been redone a billion times. The twist is this: I want to provide external services to my OS in the emulator via a series of I/O ports and memory-mapped I/O pages from the 6502's point of view. Paging data in and out, banking memory in and out, being able to use a virtual device protocol of some sort to access a folder or disk image on the PC's hard drive directly...basically, it will run the OS on the PC or Alpha or Sparc or whatever, but instead of emulating an existing architecture, using the existing OS on the computer to expand its capabilites beyond that of practically any 6502 system that may ever exist. Granted, external hard drives and 16MB RAM 65816 systems exist for established architectures, but this would effectively allow the 6502 OS to exploit the capabilities of the host computer such as running at MHz speeds the 6502 will never reach, being able to run tons of programs at once, not worrying about severe memory constraints, etc.
Maybe it would be totally pointless, but I think it could be useful and interesting for all us hobbyists to have a virtual 6502 platform that offers features we may never see in a real one.
After all, every emulator I've seen stays constrained to emulating existing hardware. I've never seen one yet that was written specifically to scale out and use the host's full potential instead.
My $0.02, deposit as needed.