First post, by katastic
I want to do some research into how "scenes" are drawn in various oldschool games.
The simplest example: A game with no double buffering or page flipping draws to the screen (hopefully!) after every vsync. That means it's simply modifying VRAM and I could hook into each time that happens.
So if I were to force a draw-to-the-OS every time the CGA/EGA/VGA/whatever memory was written to, I could--in essence--build a video with each "frame" being the individual draw calls as they appear.
So, does anyone have any tips for exploring the code base (or existing debug solutions?). Where to touch, what APIs/code files. Any information on how you would do that, what function you would hijack, etc.
I would imagine that there's a "VGA" source file with all the registers and memory accesses go through a memory-access function.
Also, any ideas for how to hijack double buffering or page flipping. I would imagine double buffering would be difficult, but page flipping is (as far as I can remember about 90's coding) simply a indexing register where you change where the "start of" page (the screen) begins in VRAM, and it's still drawing to VRAM.
Another "problem" to solve is, how would I get this data to the screen (or image dump)? For example, "Mode X" is a VGA paged memory mode where red, green, blue are all separate pages. e.g. All reds pixels in a row for the screen. Then all green. Then all blue. (Whatever the actual pixel order is). But if I'm dumping that, I'd have to recombine it somehow.