Sync with vblank on PTP (v1)? Attn Rayman
avsa242
Posts: 452
Ray,
Can you tell me if this is the proper way to wait for vblank on the original PTP?
I don't have enough RAM for a double-buffered display, so I'm trying to wait until the display is ready before clearing it for the next frame, instead. It does seem to work; the flicker is reduced to pretty much nothing, however, the refresh rate of my outer repeat loop is at or slightly less than 10 per second (without waiting it is 20-30/sec), so I just want to be sure this is the right way to sync before trying to change the rest of my program (I'm sure a lot of time is eaten up by f.Fadd and fs.FloatToFormat - F32 and FloatString objects, respectively).
Thanks!
Cheers,
Jesse
Can you tell me if this is the proper way to wait for vblank on the original PTP?
PUB meter|i,j,k,l fs.SetPrecision(2) i:=f.FFloat(0) gr.textmode(2,2,6,5) repeat repeat until lcd_status == 1 ' Sync with VBlank gr.clear i:=f.FAdd(i,0.10) j:=fs.FloatToFormat(i,9,0) gr.text(-90,50,j)
I don't have enough RAM for a double-buffered display, so I'm trying to wait until the display is ready before clearing it for the next frame, instead. It does seem to work; the flicker is reduced to pretty much nothing, however, the refresh rate of my outer repeat loop is at or slightly less than 10 per second (without waiting it is 20-30/sec), so I just want to be sure this is the right way to sync before trying to change the rest of my program (I'm sure a lot of time is eaten up by f.Fadd and fs.FloatToFormat - F32 and FloatString objects, respectively).
Thanks!
Cheers,
Jesse
Comments
I think that part of it works the same may.
Double buffering that way will probably be a challenge though...
Yeah, with the float objects, I just don't have enough RAM left to double-buffer - so I'm going with a single buffer and syncing with the vblank signal to reduce flicker, instead.
Cheers,
Jesse
You can actually have multiple independent graphics areas around the screen.
Cheers,
Jesse