CGA Game Timing Question (Developers)
Hello KarlG,
> learning about the HP_200LX pocket computer, which is apparently a fully
> XT-compatible system that runs DOS, and can do CGA graphics (on a 4-tone
> B&W LCD screen). Eventually I'd like to pick up one of those when I find a
> good deal, and I wanted to see if I could make something fun to run on it.
>
(1) Welcome!
(2) While waiting for a true CGA graphics system, perhaps you can try your code on Jeff Parsons's PCjs. Apparently PCjs does a crazy good job at emulating weird quirks of historical graphics adapters.
(3) As far as I know, there is no "standardized" interval at which vertical retraces need to happen. What is true on an actual CGA monitor may not be true on a newer VGA monitor, et vice versa. And of course virtual machines may throw all your assumptions out of the window. So it may be that your PC's display refreshes itself every 500 μs or so, or it may be every 100 μs, or (?) even every 1 μs...
My guess is that, yes, reading port 0x3da
is a good thing to do to avoid ugly artefacts. But to be truly speed-independent, your program should probably also use a separate timing mechanism, whether via IRQ 0, or (if available) via IRQ 8, or something else.
Thank you!
---
https://gitlab.com/tkchia · https://codeberg.org/tkchia · 😴 "MOV AX,0D500H+CMOS_REG_D+NMI"
Complete thread:
- CGA Game Timing Question - KarlG, 21.05.2022, 18:16
- CGA Game Timing Question - glennmcc, 21.05.2022, 19:13
- CGA Game Timing Question - KarlG, 21.05.2022, 20:13
- CGA Game Timing Question - glennmcc, 21.05.2022, 20:30
- CGA Game Timing Question - KarlG, 21.05.2022, 20:41
- CGA Game Timing Question - tkchia, 21.05.2022, 21:38
- CGA Game Timing Question - KarlG, 22.05.2022, 00:37
- CGA Game Timing Question - rr, 22.05.2022, 10:46
- CGA Game Timing Question - KarlG, 22.05.2022, 00:37
- CGA Game Timing Question - tkchia, 21.05.2022, 21:38
- CGA Game Timing Question - KarlG, 21.05.2022, 20:41
- CGA Game Timing Question - glennmcc, 21.05.2022, 20:30
- CGA Game Timing Question - KarlG, 21.05.2022, 20:13
- CGA Game Timing Question - glennmcc, 21.05.2022, 19:13