Page 1 of 1
vm86 and int 0x10 mode 0x13 - graphics, what else?
Posted: Sat Jul 26, 2003 2:03 pm
by distantvoices
Ha!
and No,this is no joke. I've implemented vm86 stuff. I build a vm86 process, which has bios, vga bios and bios data area mapped into it's adress space. It behaves weird and queer never the less.
On real pc (Athlon xp 1700 +/nvidia 3d tnt 32 mb) it simply blanks the screen and displays a blinking cursor. When I switch back to text mode, the resolution remains the same, but text input is ok. In bochs, it is the same. screen is erased, but nothing else happens. For mode 13 i use this formula to get the offset for a pixel: y*xres+x or y<<8+y<<6+x. No pixel no lines.
the tutorials don't really reveal the problem to me. Maybe I am just thinking way too complicated.
Does somebody have experience with this stuff? More than mapping bios relevant memory into the vm86-memory space can't be done for making it accessible to vm86 task. Are there more caveats?
Re:vm86 and int 0x10 mode 0x13 - graphics, what else?
Posted: Sun Jul 27, 2003 3:28 am
by drizzt
beyond infinity wrote:
For mode 13 i use this formula to get the offset for a pixel: y*xres+x or y<<8+y<<6+x. No pixel no lines.
I think you should use this forumula: y<<6+y<<4+x.
...and for more helps, post your code... maybe there are problems into your v86 monitor...
Re:vm86 and int 0x10 mode 0x13 - graphics, what else?
Posted: Sun Jul 27, 2003 1:17 pm
by distantvoices
Thanks for reply, Dark Elf.
Nay,i won't put source code here. I do the debugging myself coz it is my error. Would be too much for you to translate germen variable names to something understandable.
The vm86 monitor is working fine. I can trap in and out of vm86 mode with smooth elegance. It also goes through the bios routines and here the vm86-monitor dsoes the stuff it is expected to do.
What does not go the right way is: the switch to any graphics mode using bios int 10h. I wonder if there are any data areas left. Maybe I have overwritten something? Pointing me to some bios memory layout would be great. Possible tehat I've overseen something?
stay safe
Re:vm86 and int 0x10 mode 0x13 - graphics, what else?
Posted: Sun Jul 27, 2003 10:48 pm
by mystran
Re:vm86 and int 0x10 mode 0x13 - graphics, what else?
Posted: Thu Jul 31, 2003 3:56 am
by beyond infinity lazy
woi ... really really weird error ... Didn't push nor handle exception error codes in my exception handler ... so no wonder it crapped out and didn't even consider to work in proper manner.
yeah, as someone has stated somewhere: the smallest bugs are the idiots cradle. But never the less, it's been worth the studying and searching. This way one learns about to search at the right places. It's really been as if you search a key everywhere but at the door knob where you've put it the day before.*lol*
now the vm86 subsystem of my kernel does wonderful work. It's something that works with message passing. Ah ... brain resting feels good...
Re:vm86 and int 0x10 mode 0x13 - graphics, what else?
Posted: Thu Jul 31, 2003 7:09 am
by Pype.Clicker
well done. I still have to implement these, so if you're working on an open-source project, let me know where i can get a glance at it ...
Re:vm86 and int 0x10 mode 0x13 - graphics, what else?
Posted: Thu Jul 31, 2003 7:45 am
by beyond infinity lazy
Probably at
www.distantvoices.org this weekend, you'll find sources and a grub-floppy-image for download.
I always test it on at least two computers(for hardware compatibility) and on bochs (for intermediate bug tracking). The video subsystem should by then be able to toggle between text mode and vga-modes and draw some boxes in vga.
to come: mouse interaction with console/vga screen -> changes according the video modes. Maybe it is of use maybe its pure crap.