help by unreal mode

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.
amirsadig

Re:help by unreal mode

Post 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!
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:help by unreal mode

Post 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 ?
amirsadig

Re:help by unreal mode

Post by amirsadig »

I think I do not.
what is the relation between the two?
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:help by unreal mode

Post 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 ?
amirsadig

Re:help by unreal mode

Post 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 )
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:help by unreal mode

Post 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 ?
amirsadig

Re:help by unreal mode

Post 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.
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:help by unreal mode

Post 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 ...
amirsadig

Re:help by unreal mode

Post 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?
amirsadig

Re:help by unreal mode

Post 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.
Post Reply