Detecting if in FAST mode?

Any discussions related to the creation of new hardware or software for the ZX80 or ZX81
Post Reply
User avatar
stefano
Posts: 592
Joined: Tue Dec 11, 2012 9:24 am
Contact:

Detecting if in FAST mode?

Post by stefano »

I'm wondering what's the right way to check if we're in FAST mode.
I'm concerned in trusting the system variables because the ZX81 ROM can be running as a retrofit in a ZX80, which obviously is never in FAST mode.
I haven't fully understood how the SLOW/FAST subroutine works in rom
olofsen
Posts: 189
Joined: Wed Jan 08, 2014 12:29 pm

Re: Detecting if in FAST mode?

Post by olofsen »

The NMI routine increments the alternative A register. The SLOW/FAST routine starts the NMI generator, and tests within a time frame if this register is incremented. With the ZX81 ROM in the ZX80, this does not happen. If bit 6 of CDFLAG indicates a change to SLOW, this test will indicate if SLOW is actually possible, and if not, bit 7 of CDFLAG will not be set.
User avatar
stefano
Posts: 592
Joined: Tue Dec 11, 2012 9:24 am
Contact:

Re: Detecting if in FAST mode?

Post by stefano »

It is a bit of fun having the code repeatedly checking the hardware status!
You might even add a switch on the 50/60hz diode and the raster frequency would change at runtime :)

Thankyou for the information, at the end I chose a different approach and totally replaced the fgetc() code to reduce flickering a little as I did on the ZX80.
Post Reply