[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Ignore 6502 Cycles on Emulator



    Okay, lets say that emulation does not have cycle counter as timing.
How can we throttle it to 1MHz without cycle counter as timing?

-- 
Bryan Parkoff
"Sheldon Simms" <sheldonsimms@yahoo.com> wrote in message
pan.2003.10.24.12.57.43.704548@yahoo.com">news:pan.2003.10.24.12.57.43.704548@yahoo.com...
> On Fri, 24 Oct 2003 04:04:17 +0000, Bryan Parkoff wrote:
>
> >     I have been analyzing many 6502 emulator source code, but I know
that
> > they do not look very good.  One of them do not use cycle counter.  All
256
> > opcodes ignore cycle counters.  It always starts at integer 60.  Each
opcode
> > is executed before integer one is subtracted from integer 60.  After it
> > reaches to integer 0, emulation will be suspended in order to allow
video
> > and sound to be updated.
> >     I wonder how can video and sound be so accurate without cycle
counter.
>
> Emulation of most Apple II video requires no timing information at all.
> Bytes written to video memory cause certain patterns to appear on the
> screen, without reference to time.
>
> Timing is only important when the video output of a program depends on
> the location of the raster beam. In this case, it is necessary to
> count cycles to generate a correct emulation of the video display.
>
> But most Apple II software doesn't depend on the beam, and works well
> on an emulator that doesn't count cycles.
>
> As for sound, it is probably sufficient (although not optimal) to assume
> that every instruction takes the same (average) number of cycles. Choosing
> a proper value for that average would be difficult, but maybe a rough
> estimate, like "3", would produce acceptable audio output.
>
> -Sheldon
>