What does PAUSE do on a ZX81 ?
What does PAUSE do on a ZX81 ?
Today I wrote a test program which confused me while testing my video output.
What does PAUSE exactly do ?
I found a flickering when using in a loop but it is independend from the length of PAUSE. It just flickers every PAUSE command for one time.
I found out with my oscilloscope, that there is the triggering of the horizontal sync is moving, so seem to be unsynced for a small moment.
In the emulator (EO) it's the same flickering.
The manual says, computing will just stop for "n" frames and only content is displayed.
Why the hell is it flickering / loosing sync ? It just could do no execution of the program for a defined time period.
But seems that there is the a new picture sync at the end of PAUSE.
For what is it good ?
Long time ago I programmed with PAUSE and never had that in my mind.
I think the ROM routines could be improved by many changes. This could be one of it.
Used this for testing:
10 PRINT "X";
20 PAUSE 50
30 GOTO 10
What does PAUSE exactly do ?
I found a flickering when using in a loop but it is independend from the length of PAUSE. It just flickers every PAUSE command for one time.
I found out with my oscilloscope, that there is the triggering of the horizontal sync is moving, so seem to be unsynced for a small moment.
In the emulator (EO) it's the same flickering.
The manual says, computing will just stop for "n" frames and only content is displayed.
Why the hell is it flickering / loosing sync ? It just could do no execution of the program for a defined time period.
But seems that there is the a new picture sync at the end of PAUSE.
For what is it good ?
Long time ago I programmed with PAUSE and never had that in my mind.
I think the ROM routines could be improved by many changes. This could be one of it.
Used this for testing:
10 PRINT "X";
20 PAUSE 50
30 GOTO 10
Re: What does PAUSE do on a ZX81 ?
By the way, I just thought why is the display flickering at all in FAST mode ?
I think the switching between FAST and SLOW or "computing" and "computing&display" could be done with synchronization.
Don't you think so ?
I think the switching between FAST and SLOW or "computing" and "computing&display" could be done with synchronization.
Don't you think so ?
Re: What does PAUSE do on a ZX81 ?
As I can remenber, the PAUSE command always make display fickering... When my programs wanted to make some pause, I used an empty FOR-NEXT loop, to avoid screen flickering...
I think I remember this... Almost 30 years... from my very first ZX81 BASIC program...
I think I remember this... Almost 30 years... from my very first ZX81 BASIC program...
Re: What does PAUSE do on a ZX81 ?
like iturbez said, PAUSE always has caused the display to flicker... it's just the way it is... crap programming (in the rom) ??? or maybe they thought it would only be useful when running in fast in which case the flicker doesn't matter !
Maybe a rom patch could fix it ??? i dunno aint really looked at it.
Andy
Maybe a rom patch could fix it ??? i dunno aint really looked at it.
Andy
what's that Smell.... smells like fresh flux and solder fumes...
Re: What does PAUSE do on a ZX81 ?
Yes - I think it would be possible.Andy Rea wrote: Maybe a rom patch could fix it ??? i dunno aint really looked at it.
Andy
Flickering doesn't look very nice.
If I want a program to be fast I wouldn't think about using PAUSE.Andy Rea wrote: or maybe they thought it would only be useful when running in fast in which case the flicker doesn't matter !
Re: What does PAUSE do on a ZX81 ?
but at some point your going to want to see the result ? or an imtermediate progress reportPokeMon wrote:If I want a program to be fast I wouldn't think about using PAUSE.Andy Rea wrote: or maybe they thought it would only be useful when running in fast in which case the flicker doesn't matter !
what's that Smell.... smells like fresh flux and solder fumes...
- RetroTechie
- Posts: 379
- Joined: Tue Nov 01, 2011 12:16 am
- Location: Hengelo, NL
- Contact:
Re: What does PAUSE do on a ZX81 ?
When you think of it: why doesn't a ZX81 simply count screen lines in FAST mode (like it does for top & bottom border in SLOW mode), but still produce the software-generated vertical sync? In other words: skip the CPU-expensive active display generation, but still do everything else.PokeMon wrote:By the way, I just thought why is the display flickering at all in FAST mode ?
That way almost all CPU time would be available for processing (=the purpose of FAST mode), and TV's would always see a continuous horizontal & vertical sync. Perhaps a ROM patch really is a better method to achieve this (as opposed to add-on hardware to produce vsync while in FAST mode). And integrate a fix for this PAUSE issue while we're at it...?
Even more elegant: the above, combined with a system variable that says "display screen each X frames". X=1 -> SLOW mode. X=3, 5 or so: much faster processing, see a glimpse of what's on screen. X=large number -> same as original FAST mode.
Re: What does PAUSE do on a ZX81 ?
You could something like this if you was making an arcade game like Space invaders, Slow mode for the score line, fast mode for a few lines, slow for a few lines to show aliens, fast to skip some lines,slow for the shooterRetroTechie wrote:PokeMon wrote:Even more elegant: the above, combined with a system variable that says "display screen each X frames". X=1 -> SLOW mode. X=3, 5 or so: much faster processing, see a glimpse of what's on screen. X=large number -> same as original FAST mode.
Bill H
Re: What does PAUSE do on a ZX81 ?
And - PAUSE also mess with interrupts, which Andy kindly pointed me once.
I was kinda shocked, as a ZX Spectrum user.
Now I know not to use PAUSE but FOR/TO/NEXT instead, when the music plays.
I was kinda shocked, as a ZX Spectrum user.
Now I know not to use PAUSE but FOR/TO/NEXT instead, when the music plays.
IN NIHILUM REVERTERIS - a big text-adventure game for ZX81: http://tiny.pl/g2m6m
"MONOCHROME" issue 5 - (Spring 2014) free paper/PDF magazine about ZX81: http://tiny.pl/q2m44
ZX81 COMPETITIONS 2007/2009: http://zx81.republika.pl/
"MONOCHROME" issue 5 - (Spring 2014) free paper/PDF magazine about ZX81: http://tiny.pl/q2m44
ZX81 COMPETITIONS 2007/2009: http://zx81.republika.pl/
Re: What does PAUSE do on a ZX81 ?
In MC I use FRAMES to get a 1/50 sec delay.
In BASIC:
This will app. wait 1 sec in BASIC before continuing (1 sec or 1,02 is what I got as a result)
Set the vaue to 255-n for n/50 sec delay.
In BASIC:
Code: Select all
10 POKE 16436,255
20 IF PEEK 16436>205 THEN GOTO 20
Set the vaue to 255-n for n/50 sec delay.