flat assembler
Message board for the users of flat assembler.
Index
> Main > Output ONLY via ports Goto page Previous 1, 2 |
Author |
|
DJ Mauretto 17 Jul 2007, 16:32
Hello
Note that this code is valid only for change vga mode ,but if you are under high resolution video mode like vesa you must program other register, not belong to vga ,debug your vesa function for this |
|||
17 Jul 2007, 16:32 |
|
vid 17 Jul 2007, 17:16
I am not under VESA, i am under Windows booted into VGA mode (switch /basevideo in boot.ini). But resolution is 640x480 (minimal for windows), so it probably isn't just plain VGA...
|
|||
17 Jul 2007, 17:16 |
|
DJ Mauretto 17 Jul 2007, 17:27
windows on 640*480 4bit ?
no it's vesa 640*480 256 color |
|||
17 Jul 2007, 17:27 |
|
rugxulo 17 Jul 2007, 19:20
*singing* ("In N' Out" by Van Halen)
"got you goin' in, they got you comin' out Same amount, in 'n' out" Sorry, that's all this reminds me of. |
|||
17 Jul 2007, 19:20 |
|
vid 17 Jul 2007, 20:57
DJ Mauretto: personally i doubt windows uses VESA. Maybe it has it's VESA-like driver, improperly called VGA. And anyway, i can't use VESA, or BIOS, or alikes, i have to access ports on my own
|
|||
17 Jul 2007, 20:57 |
|
f0dder 17 Jul 2007, 23:53
vid wrote: DJ Mauretto: personally i doubt windows uses VESA. Maybe it has it's VESA-like driver, improperly called VGA. And anyway, i can't use VESA, or BIOS, or alikes, i have to access ports on my own Bah, if you're in driver code, set up a v86 context and call BIOS from that ...or perhaps use a kernel API to change video mode? _________________ - carpe noctem |
|||
17 Jul 2007, 23:53 |
|
Dex4u 18 Jul 2007, 01:28
@vid, As well as your above code, do you not need to also reprogram fonts ?, as bubach use to use this meford for mode changing in BOS (but he later changed to switching to and from pmode to real mode for mode change )
PS: Here some code on his site: http://bos.asmhackers.net/docs/vga_without_bios/snippet_3/tauron30/ASM_SRC/ |
|||
18 Jul 2007, 01:28 |
|
DJ Mauretto 18 Jul 2007, 07:30
Vesa or not Vesa , certainly it's no VGA...
My pc with Xp pro booted in vga mode give me a 640x480 8bit (256 color).. I don't recognize no one Vga Mode or Mode x with this resolution. Maybe it's another M$ secret ? |
|||
18 Jul 2007, 07:30 |
|
vid 18 Jul 2007, 07:44
Quote: Bah, if you're in driver code, set up a v86 context and call BIOS from that i was considering that, unfortunately it's outside my abilities right now got any examples? Quote: ...or perhaps use a kernel API to change video mode? Any idea which one it might be? Quote: @vid, As well as your above code, do you not need to also reprogram fonts ? Yes, but this code alone should be enough to see that display has changed. And it doesn't |
|||
18 Jul 2007, 07:44 |
|
Dex4u 18 Jul 2007, 15:49
Have you tried this code ?
Code: mov esi, mode0x03 call set_regs;somemore code here;---------------------------------;; Set VGA regs to choosen mode ;; internal use. ;;---------------------------------;set_regs: cli mov dx, 0x3C2 lodsb out dx, al mov dx, 0x3DA lodsb out dx, al xor ecx, ecx mov dx, 0x3C4 .l1: lodsb xchg al, ah mov al, cl out dx, ax inc ecx cmp cl, 4 jbe .l1 mov dx, 0x3D4 mov ax, 0x0E11 out dx, ax xor ecx, ecx mov dx, 0x3D4 .l2: lodsb xchg al, ah mov al, cl out dx, ax inc ecx cmp cl, 0x18 jbe .l2 xor ecx, ecx mov dx, 0x3CE .l3: lodsb xchg al, ah mov al, cl out dx, ax inc ecx cmp cl, 8 jbe .l3 mov dx, 0x3DA in al, dx xor ecx, ecx mov dx, 0x3C0 .l4: in ax, dx mov al, cl out dx, al lodsb out dx, al inc ecx cmp cl, 0x14 jbe .l4 mov al, 0x20 out dx, al sti ret ;---------------------; ; VGA mode values. ; ;---------------------; mode0x03 db 0x67, 0x00, 0x03, 0x00, 0x03, 0x00, 0x02, 0x5F, 0x4F db 0x50, 0x82, 0x55, 0x81, 0xBF, 0x1F, 0x00, 0x4F, 0x0E db 0x0F, 0x00, 0x00, 0x00, 0x00, 0x9C, 0x0E, 0x8F, 0x28 db 0x01, 0x96, 0xB9, 0xA3, 0xFF, 0x00, 0x00, 0x00, 0x00 db 0x00, 0x10, 0x0E, 0x00, 0xFF, 0x00, 0x01, 0x02, 0x03 db 0x04, 0x05, 0x14, 0x07, 0x38, 0x39, 0x3A, 0x3B, 0x3C db 0x3D, 0x3E, 0x3F, 0x0C, 0x00, 0x0F, 0x08, 0x00 |
|||
18 Jul 2007, 15:49 |
|
vid 18 Jul 2007, 16:07
basically, yes. I just didn't write word at a time, i wrote first index of register, and then value to port higher by one.
also, i don't have reading from 3DA before last loop. I would try this, but i am busy right now. I'll give it a try later |
|||
18 Jul 2007, 16:07 |
|
DJ Mauretto 18 Jul 2007, 18:23
Hello
i have found a extended bios mode in my doc,perhaps it is useful for you to know this.. this mode is 640x480 256 color , it seems just that used from windows. mov ax,0030h int 10h |
|||
18 Jul 2007, 18:23 |
|
vid 18 Jul 2007, 19:00
DJ Mauretto: Again, I can't use BIOS. Also, I strongly doubt windows uses BIOS
|
|||
18 Jul 2007, 19:00 |
|
DJ Mauretto 18 Jul 2007, 19:28
ok thinks to windows at first installation without no video driver , it has need
to set video mode... if you try to uninstall video driver and boot to vga mode it use bios to set video , probably extended video mode 30H... I know that you cannot use the bios , but you can debug int 10h mode 30h to try which registries uses it is only a idea ,I would make in this way... but don't worry I will not reply more to this post |
|||
18 Jul 2007, 19:28 |
|
vid 18 Jul 2007, 20:27
Quote: ok thinks to windows at first installation without no video driver |
|||
18 Jul 2007, 20:27 |
|
Goto page Previous 1, 2 < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.