Page 1 of 1
Undocumented video modes
Posted: Sat Jan 07, 2012 10:20 pm
by guferr
Hi, i was trying to make an video recorder for my O.S. (via int 08h), so i started by creating an DOS interrupt to make it. This interrupt tries to identify the video mode trough the int 010h, and then records the video memory in the hard disk, in the correct mode for the identified video mode. It works fine with various programs and video modes, both text and graphic, but i got stuck on the simpsons game for DOS, what uses an video mode that seems to be 320*200 with 256 colors, and int 010h is informing that too (mode 04h), but the recording doesn't work on this game, all i got are some columns, and the rest stay black. I made various tests, and i tried to write on that video mode (inside the game), like i would do on the mode 04h, but only some columns change, the rest stay untouched.
Searching on the internet i found something about "unusual" or "undocumented" video modes, that are "branches" of video mode 04h, but they didn't explain how to operate on those video modes. And the worst, i lost those pages, so now i have nothing talking about it. Do someone know about those video modes? Thanks for the help
.
Obs.: This game tries to replace the int 08h, so i had to make some tricks to fool the game, so my original int 08h can stay running.
Re: Undocumented video modes
Posted: Sat Jan 07, 2012 10:25 pm
by Brendan
Hi,
Sounds like
"Mode X" (or a variation of it) to me...
Cheers,
Brendan
Re: Undocumented video modes
Posted: Sun Jan 08, 2012 12:09 pm
by guferr
Thanks Brendan, those were the video modes that i was talking about, but the question is:
How to identify between them (Mode X, Y and Q).
And, how to operate on them, what are the memory areas used by them (would they begin from A0000h just like mode 013h?) and how the operate the registers to select the color planes. I think this may be the same way you do on mode 12h. I just want to know if there's any more detailed article, because this wikipedia article is just one superficial explanation. I think i can do something from here, but a little more help would save me time.
Thanks for the help
.
Re: Undocumented video modes
Posted: Sun Jan 08, 2012 1:40 pm
by VolTeK
Re: Undocumented video modes
Posted: Sun Jan 08, 2012 9:00 pm
by Brendan
Hi,
guferr wrote:How to identify between them (Mode X, Y and Q).
If the program asked for "320*200" then you'd have to check the VGA card's registers to see if they were left in the default state for "320*200" or if the program tweaked them for "mode X", "mode Y" or "mode Q".
Of course it's entirely possible for a program to do a complete video mode switch without using the BIOS or VBE at all. To guard against that, you could ignore the BIOS/VBE yourself and get all the information needed to decode display memory directly from the video card's registers; which might not be too messy if you know the card is 100% VGA compatible (but quickly becomes a nightmare for SVGA - different code for different cards).
The other alternative might be to run the program inside an emulator. For example, you could use DOSEMU, and modify the emulator so that you get the video data directly from DOSEMU's framebuffer (before DOSEMU sends it to the real video card) so that you don't need to care what the program itself actually does with the emulated video card.
Cheers,
Brendan
Re: Undocumented video modes
Posted: Mon Jan 09, 2012 3:50 am
by Combuster
If a framegrabber is all you want, Dosbox is the way to go.
What happens behind the scenes is that some programs don't use int 10h to set the video mode they want and instead program the hardware directly (with the consequence that any calls to int 10h will likely report wrong information). There is a ton of information on the VGA already lying around, with our wiki being a good starting point. The Mode X article should have directed you to that subject as well (did you search?).
Re: Undocumented video modes
Posted: Thu Jan 12, 2012 10:49 pm
by guferr
Thanks, that is all i need. I just discovered the game video mode is 320*240 256 colors. Making a video recorder wasn't Exactly my goal, it was just the program that make me wonder that. I wanted to know that for future programs. Thanks.