Re: Software 6502-on-6502

From: Cameron Kaiser (
Date: 2002-10-01 22:15:07

> > In between cranking more speed out of Nether G2's core renderer (10fps!
> > wahoo!), I finally threw together some ideas that had been floating

> Kewl! When can we expect an update?

I'm planning on taking at least a tech demo with me to VCF.

> > through my head about a software 6502-on-6502 emulator (i.e., an emulator
> > in 6502 assembly that emulates a 6502). While this might seem like an

> Sounds similar to what I imagined in my vaporware Apple II emulator for
> SuperCPU. Purely academic, of course  ;)
> But do you have a practial use for your simulator? I think that
> simulator is a better term.


The idea behind it was out of some ideas I have for HyperLink's future.
I'd like to take a whack at allowing HL to run applications in-place that
it downloads, or give it an applet API, that runs in a sandbox so that
HL can not only multitask between pages but also allow it to detect "nasty"
or otherwise buggy programs and shut them down without affecting the system.

Right now, even though memory access is just remapped back onto main RAM,
as proof of concept I wrote an applet that tried to bank out all the ROM and
crash the system (which did when run in 'real' mode). I then added code to
the memory drivers of the simulator to trap and raise exceptions for writes
to $00/$01, and ran the applet under the simulator, which promptly threw an
exception and gracefully terminated the applet.

Likewise, I threw in an applet consisting of $02 instructions, which hang a
real CPU, and it promptly threw illegal instruction exceptions and terminated

In the future, if I get around to adding virtual memory, it could treat REU,
geoRAM, etc., as addressable RAM and no applet running under the simulator
would be able to tell the difference. It could even be the basis of a proper
Unixy kernel, but I'm not *that* egotistical. ;-)

----------------------------- personal page: --
 Cameron Kaiser, Point Loma Nazarene University *
-- The new Tourette Syndrome movie: Twitch and Shout! -- John Waters ----------

       Message was sent through the cbm-hackers mailing list

Archive generated by hypermail 2.1.4.