Back in the days I've never been in gfx programming on Oric (nor other computers I coded for), so I struggle a lot (even with this doc https://osdk.org/index.php?page=articles&ref=ART9) and for now just trying to draw stupid things on the screen, BUT there's something that puzzle me :
It seems that the Oric need some times to handle graphic memory updates and when drawing in a infinite loop screen is never refreshed.
Basically that mean that I need to
Code: Select all
col = 2;
pix_val = 0b00111111;
while (1) {
for (i = 0; i < 200; i++) {
base = 0xA000 + i * 40;
POKE(base, 2);
POKE(base + col, pix_val);
POKE(base + col + 1, pix_val);
POKE(base + col + 2, pix_val);
}
sleep(1);
/*
for (i2 = 0; i2 < 35000; i2++)
;
*/
}
So, two questions :
- what is the minimal time to wait before drawing the next frame to let ULA do its job ?
- that's a lot of cpu time lost, no ?!
- or am I totally wrong - this code is too naive