Problem with VESA & floppy

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
trolly
Member
Member
Posts: 52
Joined: Tue Mar 25, 2008 12:26 pm

Problem with VESA & floppy

Post by trolly »

Hi,

I have a little problem, and need help to solve it

I have a floppy driver that can read sectors from the disk. it use DMA
i have a Vesa driver that can switch to graphic mode/returns to text mode ; it use vesa 2.0 , and switch between real& protected mode to switch the graphic mode

the floppy driver works when i'm in text mode
when i'm in graphic mode, the floppy driver seem to block (maybe problem with dma interrupt ?)
when i'm in graphic mode, then i go back to text mode, the floppy driver works

this not work :
SetMode mode1024x768x24
ReadFile
...do something ://this dont' seem to be reached,

but this works:
SetMode mode1024x768x24
ExitMode
ReadFile
SetMode mode1024x768x24
... do something ;//this seem to be executed correctly


do you know if there's is similar known problems and how i can solve it?
User avatar
Love4Boobies
Member
Member
Posts: 2111
Joined: Fri Mar 07, 2008 5:36 pm
Location: Bucharest, Romania

Re: Problem with VESA & floppy

Post by Love4Boobies »

I am ill. What medication should I take and for how long?
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: Problem with VESA & floppy

Post by Combuster »

Are you sure it's the disk access that's failing rather than graphics mode preventing whatever feedback to reach the user - printing text in graphics modes doesn't necessarily need to work.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
trolly
Member
Member
Posts: 52
Joined: Tue Mar 25, 2008 12:26 pm

Re: Problem with VESA & floppy

Post by trolly »

as i said,

when i'm in graphic mode, it seem that the os block somewhere when i try to read a file (or a sector in the disk). not when i'm in text mode.

basicaly, i have to go back to text mode, before to read a file, then return to the graphic mode ;

when i read the file before entering in graphic mode, it works correctly and continue to the next step (switch to graphic mode, display some graphics and mouse cursor)
when i enter to the graphic mode, before to read the file, it block (normaly it should display some graphics to the screen, but it does'nt, the screen stay black)
when i enter to the graphic mode, then go back to text mode, then read the file, then return to graphic mode, it works (display some graphics, mouse working, etc...)

i can not find a logic cause of that :/
trolly
Member
Member
Posts: 52
Joined: Tue Mar 25, 2008 12:26 pm

Re: Problem with VESA & floppy

Post by trolly »

Solved

it seem that when i output something to the textmode console, while i'm in graphic mode, the sytem crashes. (idont know why)

I solved the problem by redirecting the output to another function that display the messages in the graphic buffer instead of the text mode memory.
Post Reply