Previous | Next
| From: indi (all posts)
Date: 1998-09-07
Subject: Re: FF30, timers, FF11
|
>>An other problem: I was not able to code proper emulation of timers.
>>Usually cause no problems at all, except timer-based protectors. (I
>>wrote at least 3 of them in '92... ;)
>>So please tell me: after the write to the $ff00 and $ff01, when will
>>the timer start? (Right after, some delay, or before the end of the
>>opcode?)
>The next cycle after the write it will be already decremented by one,
>if I remember right, this applies in slow mode. Do not forget that it
>decrements every two double-clock cycle. I didn't checked it yet if it
>is aliased at all, and if yes whether it's aliased against odd or
>even cycles. Will do the test, and let you know the result.
I'll just throw another bit in here.... Also remember the timer is based on "actual" machine ticks and not CPU ticks.. so if the screen is on... the DMA has an effect... This doesn'y matter for 99% of stuff, even most protectors switch off the screen for proper decoding.. but a few don't.
I ended up basing the timer tick on the even value of $ff1e divided by about 4 I think $ff1e is a 1/2 or quarter cycle if i recall (check the minus4 source for better info).
This should give spot on emulation, since even when the CPU is locked out, the timer can still increment.
Mike
^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^
Mike Dailly mike@scotch.demon.co.uk http://www.scotch.demon.co.uk
(Please remove the <REMOVE_ME> from my e-mail address when replying)
|
| |
Copyright © Plus/4 World Team, 2001-2024. Support Plus/4 World on Patreon |