flat assembler
Message board for the users of flat assembler.
Index
> Main > VGA text modes |
Author |
|
rhyno_dagreat 07 Dec 2006, 21:07
I don't know if you have this or not, but this PDF is what helped me. Look at Function 02h, it should explain it enough to help you. Also, check out http://www.ctyme.com/intr/rb-0275.htm if you haven't already. Hope this helps!
|
|||||||||||
07 Dec 2006, 21:07 |
|
rugxulo 07 Dec 2006, 21:08
Bah, Win XP is screwy, so no promises that it works there, but in DOSBOX 0.65 (at least, and probably real DOS too), this should go to 80x50 (better than nothing, at least, although I personally ain't comfortable with text that small):
Code: ; set 80x50 text mode org 100h mov ax,1112h xor bx,bx int 10h ret Last edited by rugxulo on 07 Dec 2006, 21:37; edited 1 time in total |
|||
07 Dec 2006, 21:08 |
|
rhyno_dagreat 07 Dec 2006, 21:20
Rugxulo - Do you think WinXP is "protecting" people from accessing that mode? I'm trying it and it's not working.
|
|||
07 Dec 2006, 21:20 |
|
rugxulo 07 Dec 2006, 21:32
Win XP does weird things in the name of DOS compatibility (e.g., if you run a DOS program, the prompt (assuming $p$g) will change to SFN instead of LFN). I think they also restrict DOS programs to (mostly?) only 80x25 or 80x50 (nothing exotic). Someone else probably knows more details about this than me (revolution, Dex, Tomasz, pretty much anybody really ).
<EDIT> flash, all that does for me if make the DOS window full-screen (Win XP Home SP2). In DOSBOX 0.65, it does nothing noticeable (it returns 0000_014Fh in EAX w/ no carry set, if that helps). </EDIT> Last edited by rugxulo on 08 Dec 2006, 03:40; edited 1 time in total |
|||
07 Dec 2006, 21:32 |
|
Dex4u 07 Dec 2006, 22:43
I use that mode for DexOS CLI, also i used it for DexOS editor, but it's not good on the eye's, so i am making a 80x25 ver of the editor, i must be getting old .
http://www.dex4u.com/editor.htm |
|||
07 Dec 2006, 22:43 |
|
smiddy 07 Dec 2006, 23:07
Here's a few:
Code: ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ScreenMode160x64 - Change screen size if machine is capable. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ScreenMode160x64: pusha mov ax,4F02h ; VESA Call mov bx,6Bh ; 160 x 64 screen size int 10h ; Call the interrupt cmp al,4Fh ; Compare to check if call is supported jne .Done ; If not supported, head out cmp ah,1 ; Compare to see if the call was successful jne .Done ; If not successful, head out ; If successful, update BIOS push es ; Save ES mov ax,0 ; Place 0 into AX mov es,ax ; Put 0 into ES mov ax,160 ; Place number of columns in AX mov [es:44Ah],ax ; Set number of columns in BDA mov al,63 ; Place number of columns in AL mov [es:484h],al ; Set number of rows - 1 in BDA pop es ; Restore original ES .Done: popa ret Now instead of 6Bh in BX, you can change that to the following: 22h - 100x37 108h - 80x60 109h - 132x25 10Ah - 132x43 10Bh - 132x50 10Ch - 132x60 CAUTION: Use 100x37 and 164x60 at your own risk. I can not get them to work consistently and haven't had time to investigate why. Also, it is wise to update the BIOS Data Area to reflect the changes you've made, otherwise things can get screwed up. |
|||
07 Dec 2006, 23:07 |
|
Japheth 08 Dec 2006, 16:24
Regretably there is no guarantee that VESA text modes 108h-10Ch are implemented.
If you have to be sure, you must restrict yourself to VGA compatibility. The best that any VGA can offer are 480 scan lines, that is, if you use a font with 8x8 character size, you can get 60 lines. With a 14 pixel font, you can get 34 lines at best. You might need to program the CRT and sequencer directly to get these resolutions. |
|||
08 Dec 2006, 16:24 |
|
Mac2004 08 Dec 2006, 21:05
Hello Flash!
Quote:
Have you made sure that your current video card actually supports the modes you try to set up?. Many video cards do not support certain (text)modes. You can use eg. whatvga program to test your video card. Just Google it and you should find it. regards, Mac2004 |
|||
08 Dec 2006, 21:05 |
|
smiddy 09 Dec 2006, 05:09
Japheth wrote: Regretably there is no guarantee that VESA text modes 108h-10Ch are implemented. You can test them, as I have above, no need to limit yourself if you don't have too. Also, you could program the ports as you mentioned, but that is a lot more difficult that testing VESA any day. |
|||
09 Dec 2006, 05:09 |
|
smiddy 09 Dec 2006, 05:12
Mac2004 wrote: You can use eg. whatvga program to test your video card. Just Google it and you should find it. There's also a program out there name VMODE.EXE and it has ASM source. It is under one of the DOS utilities sites. |
|||
09 Dec 2006, 05:12 |
|
Japheth 09 Dec 2006, 15:22
smiddy wrote:
There's a lot of cards which don't implement support for extended VESA text modes (nvidea for example). OTOH, reprogramming the VGA registers is not that difficult. In DOS - not in a DOS Box - I often use a 100x37 text mode resolution with Volkov Commander, which is based on a 800x600 pixel resolution and looks pretty good. Setting the mode is done by a small self-written tool. Is is attached, but is not written with FASM.
|
|||||||||||
09 Dec 2006, 15:22 |
|
smiddy 09 Dec 2006, 16:47
Japheth wrote:
I don't disagree, but for ease of use, the BIOS seems to be easier than programming the VGA ports. Japheth wrote: OTOH, reprogramming the VGA registers is not that difficult. In DOS - not in a DOS Box - I often use a 100x37 text mode resolution with Volkov Commander, which is based on a 800x600 pixel resolution and looks pretty good. Setting the mode is done by a small self-written tool. Is is attached, but is not written with FASM. A cursory look seems quite nice. Once I get the opportunity I'll give it a further critical look. I personally don't know how/when to program the ports or what all the registers are for VGA (SVGA, XVGA, etcetera). Understanding how to implement it would go a long way into understand what has to be done to get what one wants from the VGA ports. |
|||
09 Dec 2006, 16:47 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.