Re: Hardware emulation of 6509 using 6502?

From: Jeff Laughton <laughton_at_cyg.net>
Date: Mon, 16 Jul 2018 21:21:17 -0400
Message-ID: <20180716212117.Horde.RBeUtIjt_c4gljWQcFSdqmh@www2.cyg.net>
Quoting Mia Magnusson <mia@plea.se>:

> Den Tue, 17 Jul 2018 01:10:43 +0100 skrev smf <smf@null.net>:
>> On 17/07/2018 00:15, David Wood wrote:
>> > That has the massive caveat of the cpu having to be taken
>> > completely off the bus during the emulation and would probably
>> > still require a clock cycle.  Perhaps not if done quickly enough.
>>
>> Interrupts while you are executing the injected instruction stream
>> would be fun.
>
> If you are going to separate the bus and inject code, holding of
> interrupts until you are done with the code injection is the simplest
> part...

That may superficially seem to be the case, but code injection is  
simpler than one might suppose. Remember it's only the data bus which  
needs to get pre-empted. Easy peasy! The *address* bus can remain  
under CPU control.

But holding off interrupts is tricky. So far I've not come across any  
simple but satisfactory scheme that can ensure a multi-instruction  
sequence will remain indivisible. You end up delaying interrupt  
recognition (ie, increasing latency) quite a lot.  :(  That's because  
you have to allow for the fact that interrupts aren't always promptly  
recognized by the CPU -- see [1].

[1] http://forum.6502.org/viewtopic.php?f=4&t=1634

> --
> (\_/) Copy the bunny to your mails to help
> (O.o) him achieve world domination.
> (> <) Come join the dark side.
> /_|_\ We have cookies.
Received on 2018-07-17 04:00:04

Archive generated by hypermail 2.2.0.