Page 1 of 1

in_Pause(2000) for ZX81?

Posted: Thu May 31, 2018 5:22 pm
by siggi
Hi
I used "in_Pause(2000);" during SLOW mode to show lyrics within a MIDI song for 2 seconds before returning to FAST mode to continue playing the song. But the player stays in display mode (SLOW) for approx. 9 seconds (and shows the text), while WIKI says.
8. in_Pause()

Pause for a period of time measured in milliseconds. Returns early with time remaining in the pause if a key is pressed. This function is implemented as a busy-wait and is guaranteed to work even with interrupts disabled.
Maybe it works at ZX81 while "interrupts are disabled" (at ZX81: FAST mode) as documented, but not during ZX81 SLOW mode ;-)

If there is no easy solution: the documention should be updated ;-)

Siggi

Posted: Mon Jun 04, 2018 8:58 pm
by stefano
could it be just lasting longer than expected? if the zx81 is runs only for a 20% of the total cpu time, then 9/80*20=2.25

Posted: Mon Jun 04, 2018 9:01 pm
by stefano
similarly, 2000/80*20=500 .. does this value fix the delay to the expected value?

Posted: Sun Jun 17, 2018 6:43 am
by siggi
Currently I divide by 5 (=20%), which gives approximatley the expected timing. But my ZX81 has Wilf's WHY WAIT modification, so is approx. 10% faster than "normal" Zeddies.

Siggi

BTW: 20% of 2000ms is 2000ms/100*20 ;-)

Posted: Mon Jun 25, 2018 8:34 pm
by stefano
odd how someone can love computing that much and be weak in maths .. :)