640x480 Video Mode Free Download

1 view
Skip to first unread message

Abigael Ortyl

unread,
Aug 4, 2024, 3:45:22 PM8/4/24
to oplatersee
Dueto my limited knowledge of retrocomputing and old CRT displays and graphics cards, I could be making some wrong assumptions in this question. For any wrong assumption you find in this question, I would request you to point it out to me so that I can improve my knowledge as I try to get an answer to this question.

How does VGA manage to show 720x400 resolution text on a 640x480 display? Does it scale the pixel width down and scale the pixel height up? Like fit 720 pixels wide text somehow in the available 640 pixels wide display?


This might be your basic misunderstanding here. Displays as used back then and what VGA was designed for, are not a fixed 640x480 device, but analogue CRT (Cathode-Ray Tube) monitors. Fixed size displays only became a common thing for desktop PC way later with the advent of fast, high resolution LCD screens (*1).


Number of pixel per line is thus only limited by output speed of the computer - and beam manipulation speed by the CRT. Likewise the number of lines. Due to the way of the receiver of a CRT is build, it will adapt. This is called synchronisation (syncing). A 15% higher pixel rate is quite within reason for next to all CRT.


So in a way, yes, the pixels were a bit smaller. Except this was not reached by dropping parts of them or calculation some intermediate values like it is today, but by literally making them smaller in width. Which the CRT would show faithfully (*2).


For LCDs and other displays with fixed pixel resolutions, usually on laptops, the VGA BIOS was adapted to take the limitations into account. On laptops, this normally meant that 9-pixel modes were ignored, and only 400 lines were displayed, with blank space at the top and bottom of the screen; so 8025 text mode used 640400 pixels on-screen. (VGA text modes can have their ninth column enabled or disabled; enabling the ninth column adds a blank column of pixels, except for a few graphics characters where it can duplicate the eighth column.)


Of course the VGA card in text mode does, in fact, generate the signal from the glyph bitmaps of the character mode font, which actually has an inherent horizontal resolution. The most common text mode renders an 8025 grid of character cells at 916 pixels each, giving text mode an effective resolution of 720400 pixels. And you are of course right to notice that 640 pixels are not enough to store a whole single scanline of that mode.


However, character cells are merely often 9 pixels wide, and the glyph bitmaps are never. The glyph bitmaps are actually 816, drawn inside character cells that could be either 916 or 816. The ninth column of pixels in a character cell, if present, is not encoded in the glyph bitmap, but is generated by the graphics adapter: either entirely blank or, if the character index is in the box-drawing character range [0xC0, 0xE0), by repeating the eighth column. The EGA and VGA have a specific register responsible for switching between width-9 and width-8 character cells: sequencer register 1, bit 0. Toggling it will switch the effective horizontal resolution in text mode between 720 and 640 pixels. And when the VGA card is in 640480 graphical mode, the character cells (now a software-only concept implemented by the video interrupt services) are 8 pixels wide.


Well, for standard text mode (8x8), it uses maybe 640x400 or 640x200. For the other, yes, it does use 720x400. It all depends on the pixel clock. As long as you use 25.175 Mhz, you can only have 640 pixels across. You can only vary the horizontal resolution of a fixed mode. So if you want less, you can output everything multiple times or reduce the pixel clock. And if you want more, you can increase the pixel clock. As for vertical, you can lower that resolution by doubling (or tripling, or quadding) the lines.


The Gigatron TTL computer uses a 6.25 Mhz CPU and pixel clock. So that means the pixels are 4 times as wide. To keep the aspect ratio, it sends all 120 lines 4 times each. So it has the same horizontal and vertical frequencies as 640x480 mode, but only has 160x120 pixels.


I've just started using assembly language (felt like learning something new), and have run into a few questions (so far) that all the tutorials I've been looking through don't answer, or are too old to know.


1) I've tried a few searches (maybe I just don't know the right keywords), but I can't find an updated list of graphics modes for changing screen resolutions, etc. The best I've found is: Assembler Tutorial, and I'd hardly think that 640x480 is the best resolution assembly language can use. Does anyone know of a more updated tutorial I can use?


As for #2, in general the answer is no, you can't MOV memory to memory. But it's not strictly true: there is MOVS (move string), which moves a byte, word, or dword from DS:SI to ES:DI. Usually this instruction is used in conjunction with a REP prefix to move blocks of memory. Also, assuming you have a stack set up, you can move memory-to-memory without clobbering a register by pushing and popping:


Regarding your first question, interrupt 10 is very old, and likely not used beyond resolutions of 640x480. A different part of the software stack is now used; i.e., you would have to interrogate Windows to get the current screen resolution.


This rather verbose post contains a lot of details of how to use assembler to drive DirectX in Windows. DirectX is the key API family for graphics these days, you won't come far using DOS-era interrupts and programming the VGA framebuffer directly.


Interrupt 10h is basically an operating system function call (actually it runs BIOS code). Internally, it reads/writes video memory as well as various registers on the graphics card. To get an idea of what sort of stuff happens "within" interrupt 10h, check this out.


When you run a DOS program under Windows, it is run in a virtual DOS machine. Windows doesn't actually let it touch the graphics card but lets it play with a virtual one. Usually this only extends as far as VGA screen modes (and sometimes only text mode), i.e. what you have is a virtual VGA card (not a modern graphics card). For this reason, in 16-bit assembly language under Windows, you just can't use the full capabilities of modern graphics cards.


HP Pavlion p7-1247c. I am stuck at 640x480. I can get to the change resolution setting but the display setting is grayed out so I am stuck at 640x480. I can boot to safe mode and I can change the resolution while in safe mode but not when I boot normally. I tried a system restore back to how it was first shipped to me. I can't complete the initial setup because I am at 640x480 and I can't see or click on the button to continue because it is off the screen. I found that there is a boot option for low resolution which is where I seem to be stuck. I can't find any way to turn off the boot to low resolution. Also, it seems that the initial setup program assumes a wide aspect ration monitor. This does not work with my old monitor which will do 1280x1024, but is stuck at 640x480.


I think the real reason that I tried swapping the cable is that the last tech support guy said that it would not be the cable. This is just proof that sometimes it is the most simple part of the whole system which can cause the most difficulty.


Here is the driver for the integrated video and a guide to help you install it in Safe Mode. I used a third party source to identify the integrated video included in the A8 3820 processor. If the link is incorrect, you can use the same page to indentify the appropriate driver. Once the appropriate driver is installed it may solve your problem.


Thanks for the link to the driver. I assumed that the driver from HP would work on an HP computer, it didn't. I have the problem computer packed up and ready to ship back to HP. After spending some quality time with HP support they decided that the video card is bad and they want me to send the computer back to them so that they can repair it.


Well, I got my computer back from HP today. The note included with it said that the mother board was replaced. I guess they replaced the motherboard because they thought there was a problem with the video circuit on it. I hooked it up and foudn that nothing had changed! I am still stuck at 640x480 unless I boot to safe mode. In safe mode it boots to 800x600 and I can change it to what ever I want it to be. Well, at least to the supported resolutions.


I booted normally and then installed the AMD driver which was suggested. Nothing happened, I'm still stuck at 640x480. The installation was challenging because the install program assumed I was running at a higher resolution. I had to hit 'tab' a couple of times and then'enter' and luckily I happened to be on the 'next' button and was able to continue with the installation. It was a waste of time because it didn't work for me.


I included a two page report when I sent the compter back. I carefully explained what the problem is and what I had done to correct the issue. This seems to be another waste of time because it seems that no one bothered to read it.


I'm not a happy camper today. HP should have been able to solve this simple problem! I can't understand how they could have shipped the computer back to me when the problem had clearly not be resolved.


I had the same issue. In the past it seemed to correct itself. I have a 5 screen config and most replies do not apply to my set up that also has a 4 monitor KVM switch for a second computer. The fix was simple as pushing the cable in all the way after reading your post. If it comes out a little bit the monitor will work fine... at first. That is until the power goes off like it did in the thunderstorm last night.. The KVM swith then restarts finding the cable only worthy of 640x480 setting. Everything looks fine and a lot of time can be wasted if you do not do the simplist of checks on the cables. I feel your pain bro! Swapping the MOBO must have been a nightmare of packaging and shipping and waiting. THANKS for the info...

3a8082e126
Reply all
Reply to author
Forward
0 new messages