Page 2 of 2

Re:Read Floppy sector

Posted: Sun Sep 18, 2005 12:58 pm
by Kemp
The entire computing world is made of sects. The eternal conflict between The Holy Order of VI and The Church of Emacs comes to mind ;)

Re:Read Floppy sector

Posted: Sun Sep 18, 2005 1:08 pm
by DynatOS
Kemp wrote: The entire computing world is made of sects. The eternal conflict between The Holy Order of VI and The Church of Emacs comes to mind ;)
LOL. Yes, well... sect... dedicated believers in FASM... a government conspiracy. I don't really care what it is, I only care that examples like Dex4u/Ashley4's belief in what Tomasz said have ground to them, mainly because people spread information that other are willing to believe just as blindly and then it becomes a web of lies and misinformation (no pun intended).

Re:Read Floppy sector

Posted: Sun Sep 18, 2005 4:09 pm
by Cjmovie
Here is my GDT data:

Code: Select all

GdtUnreal:
   dw GdtUnreal_end - GdtUnreal_start - 1 ;Size of table
GdtUnreal_start:
        dw 0, 0, 0, 0   ;Null descriptor, 4 words all set to '0'
        dw 0FFFFh       ;Part of limit
   dw 0            ;Some flags
   db 0            ;Some flags
        db 92h          ;Present, ring 0, data, expand-up, writable
   db 0CFh      ;Page-granular, 32-bit
   db 0
GdtUnreal_end:
I feel like an idiot. I forgot to put:

Code: Select all

dd GdtUnreal_start
I tested, it seems to work.

Re:Read Floppy sector

Posted: Sun Sep 18, 2005 4:34 pm
by DynatOS
Cjmovie wrote: Here is my GDT data:

Code: Select all

GdtUnreal:
   dw GdtUnreal_end - GdtUnreal_start - 1 ;Size of table
GdtUnreal_start:
        dw 0, 0, 0, 0   ;Null descriptor, 4 words all set to '0'
        dw 0FFFFh       ;Part of limit
   dw 0            ;Some flags
   db 0            ;Some flags
        db 92h          ;Present, ring 0, data, expand-up, writable
   db 0CFh      ;Page-granular, 32-bit
   db 0
GdtUnreal_end:
I feel like an idiot. I forgot to put:

Code: Select all

dd GdtUnreal_start
I tested, it seems to work.
I am glad you figured out what was wrong, it rarely is easy to step outside of the problem and step through your source to figure out what is wrong (mostly because things make sense in your head). For me it seems the more difficult thing is to accept when things do work :P

Re:Read Floppy sector

Posted: Sun Sep 18, 2005 5:29 pm
by Cjmovie
True. The hard part is that the error wasn't actually code, so I coulnd't step it :).

Re:Read Floppy sector

Posted: Mon Sep 19, 2005 5:28 am
by Pype.Clicker
Cjmovie wrote: Hmm...Out of curiosity, is it possible that BOCHS only auto-enables A20 while the PM bit is set in CR0? Meaning I would have to enable A20 myself anyways?
as seen on The FAQ:
Bochs enables A20Line in the BIOS
Your PC doesn't necessarily does so. Sometimes there's a BIOS option, sometimes there isn't. Check your code that enables A20Line and make sure it has no issues with faster hardware.

Re:Read Floppy sector

Posted: Mon Sep 19, 2005 5:42 am
by Dex4u
@DynatOS, You may of missed the point, he did not say that Bochs does not emulat unreal mode, but that it does not emulat it properly, this may or may not of shown up, in the problem in cjmovie code (as it happend it was not the problem).

I for one Do Not follow what other programmers say blindly, but just pointed to a comment i read, to try help cjmovie with his problem.
I do not use Bochs or unreal mode, so can only point people to possable courses.
But if i where to take anybodies word on this subject, Tomasz Grysztar
would be top of my list.

Re:Read Floppy sector

Posted: Mon Sep 19, 2005 6:16 pm
by Cjmovie
Pype.Clicker wrote:
Cjmovie wrote: Hmm...Out of curiosity, is it possible that BOCHS only auto-enables A20 while the PM bit is set in CR0? Meaning I would have to enable A20 myself anyways?
as seen on The FAQ:
Bochs enables A20Line in the BIOS
Your PC doesn't necessarily does so. Sometimes there's a BIOS option, sometimes there isn't. Check your code that enables A20Line and make sure it has no issues with faster hardware.
As a note from my BIOS, I qoute:

Option "A20" -> "Let a pin on the keyboard controller control the A20 line, or let the SuperIO Chip auto-enable A20."