| |
Krill
Registered: Apr 2002 Posts: 2847 |
6502 VM running on a 6502
I wonder what the slowdown for a highly-optimised 6502 VM running on a 6502 (or 6510) would be.
Considering Ultimate64 with its 48 MHz turbo mode, might it be generally possible to execute one guest cycle in 48 host cycles or fewer? =)
Guts feeling says yes, but i haven't yet dabbled with some actual code (on paper or otherwise).
I'm not much considering I/O (chip access, including interrupts) yet, thinking about the basic load/store/branch/arith instructions mostly, at this point.
Or maybe such a thing exists already, originally intended for SuperCPU or so? =) |
|
... 10 posts hidden. Click here to view all posts.... |
| |
Krill
Registered: Apr 2002 Posts: 2847 |
Quoting tlrYou could opt for scanning the code forward until an unsafe op is found. Scanning doesn't work so well with the requirement to execute an instruction in exactly the same time it would take on the original 1 MHz system, though. And it's rather likely that there are runs of many unsafe instructions, so nothing gained. In this regard, it's closer to an emulator than some JIT/dynamic recompilation kind of VM.
Quoting tlrIsn't the Ultimate64 open source like the 1541U2? What Groepaz said, but what are you insinuating? :)
Some answers to these questions could be found by testing, but i have no plans whatsoever to add/fix/change anything on the firmware. Just figured that U64 would be the best platform currently for something i'd like to see used. =) |
| |
tlr
Registered: Sep 2003 Posts: 1714 |
Quoting KrillQuoting tlrIsn't the Ultimate64 open source like the 1541U2? What Groepaz said, but what are you insinuating? :)
Some answers to these questions could be found by testing, but i have no plans whatsoever to add/fix/change anything on the firmware. Just figured that U64 would be the best platform currently for something i'd like to see used. =)
I'm implying implementing the hypervisor/sandboxing in the FPGA fabric instead of running it in 6502 assembly. This is probably more straight forward with no tricks required to keep timing. But with no source, not really feasible.
Doing it in 6502 asm sound like a fun project though. :) |
| |
Krill
Registered: Apr 2002 Posts: 2847 |
Quoting tlrDoing it in 6502 asm sound like a fun project though. :) Yeah, but the limitations are obvious. Being able to run any original C-64 software would be a side-goal. :)
And with virtualisation in hardware, one could also have neat things like shifting processing slices between hypervisor and guest at (the hypervisor's) will, or having an overlay menu/monitor/editor running in the hypervisor. |
| |
Oswald
Registered: Apr 2002 Posts: 5020 |
hmm and no one interested why ? I am :) |
| |
Krill
Registered: Apr 2002 Posts: 2847 |
Quoting Oswaldhmm and no one interested why ? I am :) Ok, time to revive this thread. =D
What i was getting at was some kind of "Byte Battle"-like setup, which in turn is a... vintage computing... variant of "Shader Showdown", but with some Lua-based fantasy console thing.
I think that something like that running on an U64 would be close enough to the original machine in order to defy the "fantasy console" label while still allowing for producing code able to run on the stock machine, in a very time-constrained live-coding show, but with a neat editor/compiler thingy running the code as it's typed.
(Note that whatever language/compiler setup on top of the VM is an open question, could be some beefed-up BASIC, could be some macro-enhanced 6502 assembly, or Turbo Rascal, maybe even Lua itself, whatever.) |
Previous - 1 | 2 - Next |