Page 2 of 2
Re: Changing VESA resolution in Long/Pmode
Posted: Tue Aug 04, 2009 11:31 pm
by tantrikwizard
I'm just waiting for, say, around next Tuesday for a new thread entitled "Stupid bios modifies segment registers"
Re: Changing VESA resolution in Long/Pmode
Posted: Wed Aug 05, 2009 1:52 pm
by gravaera
^^^
Nah. It'll come a little later than that. Right now I'm a bit hassled with Uni exams.
Re: Changing VESA resolution in Long/Pmode
Posted: Mon Aug 10, 2009 9:01 pm
by iammisc
Honestly just use an emulator or vm86 mode, it's much simpler.
Re: Changing VESA resolution in Long/Pmode
Posted: Thu Aug 13, 2009 4:54 am
by Craze Frog
If you emulate it, it won't really be able to change the video mode, right?
Re: Changing VESA resolution in Long/Pmode
Posted: Thu Aug 13, 2009 7:41 am
by Brendan
Hi,
Craze Frog wrote:If you emulate it, it won't really be able to change the video mode, right?
You'd emulate the CPU while using the real video device...
Cheers,
Brendan
Re: Changing VESA resolution in Long/Pmode
Posted: Mon Aug 17, 2009 3:02 am
by tharkun
AFAIK, if you pad it, and the add the 0x66 prefix, it should work.
Please correct me if I'm wrong.
Re: Changing VESA resolution in Long/Pmode
Posted: Mon Aug 17, 2009 3:53 am
by mnovotny
You're wrong. The instructions aren't 32 bit in size while in 32 bit mode, nor they are 16 bit while in 16 bit mode.
Basic instructions usually have only one byte opcode and several other bytes of additional data. The size of instructions isn't fixed!
xor eax, eax
mov eax, 0
These two instructions do exactly the same, yet the first instruction is shorter.
Re: Changing VESA resolution in Long/Pmode
Posted: Mon Aug 17, 2009 11:28 am
by Craze Frog
mnovotny wrote:
xor eax, eax
mov eax, 0
These two instructions do exactly the same, yet the first instruction is shorter.
No, they don't do the same thing. xor modifies eflags.
Re: Changing VESA resolution in Long/Pmode
Posted: Mon Aug 17, 2009 11:49 am
by mnovotny
Bah, detail...
Re: Changing VESA resolution in Long/Pmode
Posted: Tue Aug 18, 2009 5:07 am
by Cognition
Instruction sizes aside, segmentation will actually work properly in the compatibility sub mode of long mode. Fully translating or recompiling instructions shouldn't be necessary really as you can run in 16-bit protected mode with segmentation. Flat model segmentation only applies to code actually executing in 64-bit mode. It shouldn't be too hard emulate real mode segmentation via the GDT and setting up something resembling a virtual monitor to catch a few choice instructions and deal with the final IRET.
Re: Changing VESA resolution in Long/Pmode
Posted: Wed Aug 19, 2009 2:59 am
by Combuster
Having segmentation or not, it won't work. Real mode segmentation != protected/compatibility mode segmentation.
Re: Changing VESA resolution in Long/Pmode
Posted: Wed Aug 19, 2009 4:15 am
by Cognition
Edit: Scrap the idea, overall it's more trouble then it's worth really.