Video BIOS in Microsoft Virtual PC

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
User avatar
Tomaka17
Member
Member
Posts: 67
Joined: Thu Oct 02, 2008 8:20 am

Video BIOS in Microsoft Virtual PC

Post 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
MysteriOS
Currently working on: TCP/IP
User avatar
Tomaka17
Member
Member
Posts: 67
Joined: Thu Oct 02, 2008 8:20 am

Re: Video BIOS in Microsoft Virtual PC

Post 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
MysteriOS
Currently working on: TCP/IP
Post Reply