Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

CGA Game Timing Question (Developers)

posted by tkchia Homepage, 21.05.2022, 21:38

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.
> :-D

(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:

Back to the forum
Board view  Mix view
22049 Postings in 2034 Threads, 396 registered users, 75 users online (0 registered, 75 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum