Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
80 Hz refresh rate in DOS & QB!!! :)
#11
this has been posted before, man: You get a stretched screen 'cause the monitor still doesn't recognize the video mode (frequency). The monitor comes to your home with most common video freciencies already adjusted. All you have to do is switch to that video mode and adjust the image. Next time, your monitor will remember it.

(unless your monitor is more than 6 or 7 years old)
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Reply
#12
Na_th_an:

Welcome in the world of "how to kill that poor screen" Smile


I buried myself in this subject deeply, however i could not make my screen ready to throw off the window, but created some interesting modes what should work.

You may need to get Tweak16B from somewhere to try them easily, but they can be set up without it too (but with some programming):


The basic:

16 color mode 640x400 register set:
Code:
3C2-00: 63 (or 67 for 79Hz)

3D4-00: 5F,   3D4-01: 4F,   3D4-02: 50,   3D4-03: 82,   3D4-04: 55
3D4-05: 81,   3D4-06: BF,   3D4-07: 1F,   3D4-08: 00,   3D4-09: 40
3D4-10: 9C,   3D4-11: 8E,   3D4-12: 8F,   3D4-13: 28,   3D4-14: 1F
3D4-15: 96,   3D4-16: B9,   3D4-17: E3

3C4-01: 01,   3C4-03: 00,   3C4-04: 06

3CE-05: 00,   3CE-06: 05

3C0-10: 01,   3C0-11: 00,   3C0-12: 0F,   3C0-13: 00,   3C0-14: 00

256 color mode 256x256 register set (Mode Q):
Code:
3C2-00: E3 (57Hz, or E7 for 64Hz)

3D4-00: 5F,   3D4-01: 3F,   3D4-02: 40,   3D4-03: 82,   3D4-04: 4A
3D4-05: 9A,   3D4-06: 23,   3D4-07: B2,   3D4-08: 00,   3D4-09: 61
3D4-10: 0A,   3D4-11: AC,   3D4-12: FF,   3D4-13: 20,   3D4-14: 00
3D4-15: 07,   3D4-16: 1A,   3D4-17: E3

3C4-01: 01,   3C4-03: 00,   3C4-04: 06

3CE-05: 40,   3CE-06: 05

3C0-10: 41,   3C0-11: 00,   3C0-12: 0F,   3C0-13: 00,   3C0-14: 00




Now the modes what i could tweak:



Resolution: 536x400 or 544x400 (Pixels are almost square)
Note: The memory page's width can not be set to 536 what is the nearest to have square pixels but 544 can be set.

Variant A,B: (536/544)x400, 75Hz or 84Hz depending on 3C2 (63 or 67)
Set the 640x400 mode, and change these:
Code:
Width=536 (Variant A)
3D4-00: 59,   3D4-01: 42,   3D4-02: 43,   3D4-03: 9C
3D4-04: 48,   3D4-05: 18
3D4-13: 22 (To set the memory page's width to 544)

Width=544 (Variant B; the same but:)
3D4-01: 43,   3D4-02: 44

Safe - A,B: (536/544)x400, 70Hz or 79Hz (Keeping everything but the width)
Set the 640x400 mode, and change these:
Code:
Width=536 (Variant A - Safe)
3D4-01: 42,   3D4-02: 43
3D4-13: 22

Width=544 (Variant B - Safe)
3D4-01: 43,   3D4-02: 44
3D4-13: 22

Variant C,D: (536/544)x400, 78Hz or 88Hz depending on 3C2 (63 or 67)
These modes were set up by keeping the 640x400 mode's limits so they should work if the screen supports these refresh rates:
Select variant A or B (not safe), and change:
Code:
3D4-00: 55,   3D4-03: 98



Mode "Cheetah - Q"
Resolution: 256x256 with 256 colors
Refresh rate: 67Hz or 75Hz (3C2-00: E3 or E7)
Set Mode Q, and change:
Code:
3D4-00: 51,   3D4-03: 94,   3D4-04: 44,   3D4-05: 14



I could set up a 464x350 mode too (with 16 colors) what worked on 92Hz Smile

Note: be careful with (536/544)x400 Variant C and D since some screens (like LCDs) can not set more than 75Hz!


And finally if you want something really high (or something what really makes your screen sick):
An 512x384 mode with 84Hz/95Hz refresh rate! (I can create you versions with lower rates if needed...)
It has exactly square pixels, and no problems at the video memory. Something like ModeQ in 16 colors.
Set the 640x400 mode, and change:
Code:
3D4-00: 51,   3D4-01: 3F,   3D4-02: 40,   3D4-03: 94,   3D4-04: 44
3D4-05: 14,   3D4-06: AF,   3D4-07: 1F,   3D4-08: 00,   3D4-09: 40
3D4-10: 8C,   3D4-11: 8E,   3D4-12: 7F,   3D4-13: 20,   3D4-14: 1F
3D4-15: 86,   3D4-16: A9,   3D4-17: E3


Use, or call these screen modes as you wish... I would like to call "Mode - Cheetah - Q" this version of ModeQ and "Mode - Cheetah - 16" the 512x384 sets, but i will not force anyone to use these names...


The technique:
This is very hard... There are many things what i not know well too for example what is "vertical blanking". I could set these by looking through the available modes learning how they work, and what they can accept. This way all of the modes i set might not be the "perfect" ones (what can force the screen to be on the borderline of it's displaying capabilities), but they are near to it. They use the same differences in the values as the 640x400 mode (as the resolution grows, it might be needed to have more time for retracing and some other invisible processes, and as it shrinks it might be set lower too to gain a bit higher refresh rate).
So all what i did is that i set the values for each screen mode like what i had seen at 640x400: this resulted the highest refresh rate. If it is needed to reduce them it can be done by increasing the time what the screen spends with invisible work (For example by having more "horizontal total" than what is really needed for that mode).
Usually who tweaked VGA modes before simply catched a screen mode with higher resolution than what they would like to have and only reduced the registers storing the number of the displayed lines. This left some idle time behind what might have been used to get higher refresh rates: now i cut this out and got it. Of course who set up Mode - Q first needed to work with the vertical part since there was no higher resolution in double - scanned modes than 240. I can not imagine why he or she not reduced the idle time gained by setting the horizontal part lower than 320 to have at least the usual 60Hz/67Hz refresh rates (Possibly had an LCD display?)...
fter 60 million years a civilization will search for a meteorite destroying most of the living creatures around this age...

There must be a better future for the Cheetahs!

http://rcs.fateback.com/
Reply
#13
To have something for QBasic too...

Code:
'A code what tweaks mode 9 to have 78 or 88 Hz refresh rate

'The three Mode 9...
'
'A -> The basic Mode 9 has 70Hz refresh rate, can be set by simply calling
'     SCREEN 9
'B -> By sending an OUT &H3C2, &HA7 after setting Mode 9, the refresh rate
'     will be increased to 79Hz
'C -> By running this code the refresh rate of Mode 9 becomes 88Hz! :)


SCREEN 9

OUT &H3C2, &HA7 'If (almost) 90Hz needed...
'By commenting out the line above 78Hz will be set

OUT &H3D4, &H11
tmp% = INP(&H3D5)
OUT &H3D4, &H11
OUT &H3D5, tmp% AND &H7F

OUT &H3D4, &H6
OUT &H3D5, &H8F
OUT &H3D4, &H7
OUT &H3D5, &H1F
OUT &H3D4, &H10
OUT &H3D5, &H6C
OUT &H3D4, &H11
OUT &H3D5, &H8E
OUT &H3D4, &H12
OUT &H3D5, &H5D
OUT &H3D4, &H15
OUT &H3D5, &H66
OUT &H3D4, &H16
OUT &H3D5, &H87

PRINT "Hi9 mode reached!"


Only Mode9 can be tweaked this way since the others have not got "idle time". QBasic's Mode9 was set up from a 640x400 mode by just reducing the visible area so those 50 lines of "rubbish" could be cut out resulting 8Hz higher refresh rate.


I set up today a 296x220 (256 colors) mode with 69Hz or 77Hz refresh rate. It is good because it can be used chained if needed, and has almost square pixels. Based on this mode i also created an 592x440 16 colored mode, but i more like 512x384.
By mixing the 512x384 mode with Mode (- Cheetah) - Q, i got 256x192 what is not good in resolution, but has the advantages of ModeQ and has square pixels (and can work on 84Hz/95Hz or lower if needed).
I also set up an almost useless 208x156 mode which has the only advantage of having 2 pages in chained mode... And can be set up to have more than 100Hz refresh rate...
I think 360x360 is a very good 256 color mode although it has not got square pixels. Tweak16B had one set up with the basic 70Hz refresh rate (what can not be improved by 3C2 since it is a 720 pixels wide mode), i tweaked one to be 77Hz what is not bad. The advantages of it is that the basic mode (with 70Hz refresh rate) can be set on any VGA screen, and it has the highest resolution keeping having two pages. I think it is very good for creating izometric view games.
Mode 360x200's aspect ratio is almost the same as 640x350's but it's maximal refresh rate is only 70Hz. On the other hand it can be set easily by mixing any 360 wide mode with Screen 13.

I can post any of these modes' description, i just did not want to put pages of tweaking here again...
fter 60 million years a civilization will search for a meteorite destroying most of the living creatures around this age...

There must be a better future for the Cheetahs!

http://rcs.fateback.com/
Reply
#14
how would i go about setting up the screen modes, so everything isn't streched?

Oz~
Reply
#15
(I did not want to create just an another topic for this...)


I tried FreePascal (Tried? We must program in FreePascal on Linux at university - different ways of making new anti - computer people Sad ), and it's graphic unit, and i surprised that it still can not get more than 60Hz in SVGA. I had already knew that DOS SVGA modes are limited to 60Hz, but this surprised me again. And once i had seen that there is VBE3 what supports changing the refresh rates (it would be an universal SVGA driver what every manufacturer should have installed in their hardware). Then why 60Hz?? Because VBE3 is not exist in the reality. Again: why? The specification should be more than five years old, but i had never seen any video cards supporting it yet. Had you ever thought of this?

My theory is that Windows came and it's extended features wich made it capable to handle any hardware with any extended feature. DOS programmers wrote their programs to usual hardwares so buying new ones were not needed as the programs did not use their features. In Windows anything could be written, the OS took care of sending the appropriate commands to the hardware so the extended features could be used when they existed, but there were no problem when not too. This difference made the hardware manufacturers interested in spreading the Windows way, so they cut back everywhere where they could on DOS: this might made the death of VBE3 too (Looking at a 60Hz game for a hour results switching to something else blinking less intensively...).
And now this gains many sleepless nights to programmers especially at Linux (A VGA card comes out - needs new way of setting up the screen modes - a Linux driver needs to be programmed if they not want tu use it at only 60Hz as VBE2 supports).

The same thing happened at the side of the sound cards: FM support seems to be removed with Windows XP Sad


So what to do? Luckily we can still go back to VGA as it is still needed to start up a computer correctly (Win XP's logo is 640 * 480 * 16 too!), live with less resolution, but more refresh rate Smile


Of course future is not so bright... For example writing a new OS was made almost completely impossible due to these actions of hardware manufacturers Sad. Windows and Linux / Unix lives, everything else will die if has not got any special use Sad


I just wrote these as i thought about them while i got annoyed of that 60Hz...
fter 60 million years a civilization will search for a meteorite destroying most of the living creatures around this age...

There must be a better future for the Cheetahs!

http://rcs.fateback.com/
Reply
#16
Where did you find Ralph Brown's ports list?
Reply
#17
http://www.ctyme.com/rbrown.htm

or

http://www-2.cs.cmu.edu/afs/cs/user/ralf...files.html
I'd knock on wood, but my desk is particle board.
Reply
#18
I already have the interrupt list... Wink

*smack*

Why didn't I see that PORTS.LST file before?
Reply
#19
This is the third time i am telling you - You have a good vision but a big sight :roll:
Reply
#20
Sorry, i not understand... I am not English, and i have not got a dictionary (i can not get any because of certain things) so i have to guess the things on my own, and now i am a little confused Sad

VGA & refresh rates: of course what i am doing is only possible an a multisync SVGA. But on ANY multisync SVGA! Smile Of course all the modes can be set up in a VGA compatible way, but it is nice to support more if the hardware is able to do it.
fter 60 million years a civilization will search for a meteorite destroying most of the living creatures around this age...

There must be a better future for the Cheetahs!

http://rcs.fateback.com/
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)