Page 1 of 1

Video BIOS in Microsoft Virtual PC

Posted: Tue Mar 10, 2009 4:45 pm
by Tomaka17
Hello everybody !

Yesterday I started implementing virtual mode support in my O/S
It works perfectly with BOCHS, where I can get informations about a video mode and even set one using interruption 0x10 (so cool to see a high resolution :D )

But when I run my O/S on Virtual PC, I'm getting an 'unknown opcode' interruption while in virtual mode for opcode 0xFF

- it doesn't come from my V86 GPF handler because the unknown opcode comes before any GPF
- the unknown opcode comes at offset 0xC800:0x9365, while the start of the handler is at 0xC800:0x1100 (approximatively) ; if it was bad code I would get an error far sooner
- my stack doesn't overwrite the code
- maybe the offset of the interruption handler is wrong (I'm reading it from the Interrupt Vector Table), but it works with BOCHS so why would it not work with Virtual PC ?
- Virtual PC emulates a standard SVGA card as stated on wikipedia, so the video bios should be present and working


Does somebody have an idea or had the same problem?

Thank you

Re: Video BIOS in Microsoft Virtual PC

Posted: Wed Mar 11, 2009 1:37 am
by Tomaka17
Solved!

I was setting EIP to segment << 4 | offset, and CS to segment

So with interrupt handler at 0xC800:0x1100 I had EIP = 0xC9100 (truncated to 0x9100) and CS = 0xC800, this was pointing to a wrong offset

This might sound stupid but was a bit complicated to solve due to the way my createThread functions are made