Page 2 of 2

Re:help by unreal mode

Posted: Fri Jun 25, 2004 2:01 am
by amirsadig
I have make a test with GRUP. I let GRUB set the video mode and I get the mode Info structure to get framebuffer and that work.
that mean I should make somethig, when setting video mode!

Re:help by unreal mode

Posted: Fri Jun 25, 2004 2:24 am
by Pype.Clicker
just by curiosity, you're not using the "screen retrace" as an input for measuring time in your floppy setup code, are you ?

Re:help by unreal mode

Posted: Fri Jun 25, 2004 2:42 am
by amirsadig
I think I do not.
what is the relation between the two?

Re:help by unreal mode

Posted: Fri Jun 25, 2004 2:49 am
by Pype.Clicker
well, i can remember of people suggesting the use of "screen retrace" polls to measure time. With a well-known screen mode & BIOS, such event occur at 60Hz in text mode, for instance. When moving to higher resolutions, it could be working at up to 120Hz on l337 hardware, and it might no longer use VGA registers to inform of retraces ... so using it for timing will not behave nicely ...

You might like to check the IRQ masks haven't been modified by the BIOS ... The keyboard interrupt is still working once the new video mode has been set up, right ? just the floppy no longer works as expected ?

Re:help by unreal mode

Posted: Fri Jun 25, 2004 2:55 am
by amirsadig
the floppy irq work, but timer irq is not working.
the floppy driver hange because it wait for delaying to seek to track 1. but because timer does not work the seek function loop for ever ( delaying is base on timer )

Re:help by unreal mode

Posted: Fri Jun 25, 2004 3:14 am
by Pype.Clicker
could it be that the jump to unreal mode make you miss to send an EOI ... no. If that was the case, no IRQ would be received at all ...

So either the mask problem or the PIT reprogrammed in a bad way ...
(still i don't see why the vesa BIOS would reprogram it)

Do you have a way to display "text" on your graphic screen already ?

Re:help by unreal mode

Posted: Fri Jun 25, 2004 3:40 am
by amirsadig
yes, I can put text on my graphic screen.
with this I could see where my OS hange up ;D.

as you said after calling VESA bios, the PIC has been reprogrammed and IRQ0 and IRQ6 has been disabled ( but I still receive IRQ6, why I do not know). before calling VESA BIOS IRQ0 IRQ1 IRQ6 was enabled.
ok I have reprogram PIC to enable IRQ0 and IRQ1 and IRQ6

Code: Select all

outportb(0x21, ~0x43);
then timer work.
why PIC reprogrammed via BIOS? I don't know now. but it is good to research.

Re:help by unreal mode

Posted: Fri Jun 25, 2004 5:37 am
by Pype.Clicker
amirsadig wrote: why PIC reprogrammed via BIOS? I don't know now. but it is good to research.
I suppose this is because the BIOS needed to finetune something about the timings and uses the internal "end of retrace" interrupt but must not be interrupted by the IRQ0, or something ...

Probably it would have been fixed if PIC wasn't reprogrammed towards other Interrupt vectors ... noone can know for sure ...

Re:help by unreal mode

Posted: Fri Jun 25, 2004 11:42 am
by amirsadig
I use jump to real mode before activating paging and work.
when I jump to real mode after enable paging I receive GPF #13. the EIP which case the fault in bochs is different as in VMWare.

what I should take care when return to unreal from PM with paging enabled?

Re:help by unreal mode

Posted: Fri Jun 25, 2004 12:01 pm
by amirsadig

Code: Select all

mov  eax, cr0
                and  eax, 0xFE
                mov  cr0, eax
                jmp  word 0x00:.3

this code, which disable protected mode is 16 bit code. that mean the lowest 2 byte of eax should not be touch.
as I done debug the lowest 2 byte has been zeros. therefore I should reenable page again, each time I call unreal code.