
Thanks,
Matt
Basically I want to write a 8086 Emulator to access real mode BIOS interrupts. What I am wondering and trying to understand is how a Real Mode Emulator running in Protected Mode allows BIOS interrupts. Is this because the BIOS code running in the Emulator for example when you call Int10h is called, the code behind that interrupt is ran in the Emulator right?Nessphoro wrote:I don't really understand your issue.
If the emulator emulates the BIOS/VBE code's instructions but reads/writes to real physical addresses and IO ports, then any devices (that respond to reads/writes to those real physical addresses and IO ports) won't know the difference. In that way you can (in theory) run BIOS/VBE code, including software interrupts and IRQ handlers.PearOs wrote:Basically I want to write a 8086 Emulator to access real mode BIOS interrupts. What I am wondering and trying to understand is how a Real Mode Emulator running in Protected Mode allows BIOS interrupts. Is this because the BIOS code running in the Emulator for example when you call Int10h is called, the code behind that interrupt is ran in the Emulator right?
You would still be able to use the video mode you set earlier. I think it is a good compromise for hobby OSs.Combuster wrote:Of course the most elegant solution would be to have drivers for everything
I agree. Ok so that's a good start. Now since I am in protected mode, sorry if this sounds noobish. I have never really done this before, isn't INT 10h remapped because I setup my own table so that I could get interrupts working. Or is it still intact somehow? Thanks, Mattmadanra wrote:You can find the VBE BIOS by looking up where int 0x10 points to in the interrupt table.
Returning to real mode might work - though if isolinux has changed any hardware configuration, there could well be problems; switching back to real mode isn't generally recommended. Ideally any video mode changes would be done before switching to protected mode. GRUB allows you to specify what resolution you want in the multiboot header, so if you're able to use GRUB instead of isolinux then that's an easy way to do it.
Owen wrote:One thing of note is that X.Org contains support for running a VESA BIOS on non-PC platforms.
Most VESA BIOSes don't have any real dependencies on the system BIOS.
The real mode Interrupt Vector Table (IVT) is stored in the first 1KB of RAM, so you can look it up there, as long as neither isolinux nor your OS has overwritten that part of RAM.PearOs wrote:I have never really done this before, isn't INT 10h remapped because I setup my own table so that I could get interrupts working. Or is it still intact somehow?