To fix or not to fix

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
earlz

To fix or not to fix

Post by earlz »

Well i have some fdd code
everything works perfect in microsoft virtual pc and my real pc, but in bochs reading don't work(it don't get an irq6) now my question is:
should i even try to fix this(maybe emulating different hardware) or is this most likely just a bug in bochs

does anyone know if the hardware emulated is different
User avatar
Candy
Member
Member
Posts: 3882
Joined: Tue Oct 17, 2006 11:33 pm
Location: Eindhoven

Re:To fix or not to fix

Post by Candy »

Jordan3 wrote: Well i have some fdd code
everything works perfect in microsoft virtual pc and my real pc, but in bochs reading don't work(it don't get an irq6) now my question is:
should i even try to fix this(maybe emulating different hardware) or is this most likely just a bug in bochs

does anyone know if the hardware emulated is different
The hardware probably isn't different, but it displays a bug in your code when tested against their implementation. Since all common implementations work, yours might not work in a common pc that you don't have around for testing. I would advise to fix it, but only if it doesn't break other test environments. You're probably missing some edge condition that doesn't show on the rest (such as with no read error, or with multiple read errors or such).
Dex4u

Re:To fix or not to fix

Post by Dex4u »

I would leave it as my pmode floppy driver works in at least 100 real floppy drives, that its been tested on, but does not work in BOCH, if it was anyother peace of hardware, than i think candy is right, but i have found floppy drives to be very standard, your more likely to have problems with differant floppy disks, than the drives.
User avatar
bubach
Member
Member
Posts: 1223
Joined: Sat Oct 23, 2004 11:00 pm
Location: Sweden
Contact:

Re:To fix or not to fix

Post by bubach »

dex4u: when did your floppy driver stop working in bochs?
it worked fine in the versions i've had time to test..
"Simplicity is the ultimate sophistication."
http://bos.asmhackers.net/ - GitHub
User avatar
Brendan
Member
Member
Posts: 8561
Joined: Sat Jan 15, 2005 12:00 am
Location: At his keyboard!
Contact:

Re:To fix or not to fix

Post by Brendan »

Hi,
Jordan3 wrote:everything works perfect in microsoft virtual pc and my real pc, but in bochs reading don't work(it don't get an irq6) now my question is:
should i even try to fix this(maybe emulating different hardware) or is this most likely just a bug in bochs

does anyone know if the hardware emulated is different
Bochs doesn't quite emulate the floppy properly - it skips some checks, and things that shouldn't work actually do.

You're having the reverse problem though, so I'd suggesting fixing it (or at least finding out why your code doesn't work on Bochs).
bubach wrote:dex4u: when did your floppy driver stop working in bochs?
it worked fine in the versions i've had time to test..
Dex4U floppy code worked fine in Bochs on my computer a few days ago...


Cheers,

Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
Dex4u

Re:To fix or not to fix

Post by Dex4u »

bubach wrote:dex4u: when did your floppy driver stop working in bochs?
it worked fine in the versions i've had time to test..
Dex4U floppy code worked fine in Bochs on my computer a few days ago...
Cheers,
Brendan
There could be two reason, that it now works, as i have two floppy drivers in Dex4u.

1. Is that you used the go back to real and back int 13h driver, i use this driver in "DosBoxDex4u.zip" etc. as DOSBox emulator, assumes your using int 13h.

2. Its you used the pmode ver and it was a setup BOCH error, rather than a floppy driver error ?.

As a side note, even if you have a pmode floppy driver, it well worth make a v86 or to real and back driver, as with it i can read/write to USB floppy, hdd, flash cards, pen drivers, as long as your BIOS supports it.
As for speed on a normal floppy there is no noticeable slow down, but through USB it slow.
earlz

Re:To fix or not to fix

Post by earlz »

As a side note, even if you have a pmode floppy driver, it well worth make a v86 or to real and back driver, as with it i can read/write to USB floppy, hdd, flash cards, pen drivers, as long as your BIOS supports it.
As for speed on a normal floppy there is no noticeable slow down, but through USB it slow.
Well the only problem i see with that is it uses the dma and expects for interupts to be set up with the bios ints

and i think that realmode irt's need to be done in realtime so that would make a freeze up very likely
Dex4u

Re:To fix or not to fix

Post by Dex4u »

But in my code everything is set back to realmode spec, it only returns to pmode on completion of int.
The only thing needed to do is call pmode turn off fdd motor.

I have no idea about v86, as going back and forth is much easier.
earlz

Re:To fix or not to fix

Post by earlz »

could you please give me a link or post your fdd and switching to realmode code
Dex4u

Re:To fix or not to fix

Post by Dex4u »

Here is some code i wrote, to go back to realmode, change vesa mode and back to pmode, that uses basically the same code, just replace vesa int, with int 13h.
http://www.dex4u.com/images/DemoVesa.zip
Here is my pmode fdd just replace the read/write functions with the gobackto realmode functions (that includes the int 13h for read/write)
http://www.dex4u.com/images/FloppyDriver.zip

If you go to my web site and get "DosBoxDex4u.zip" in it is a image of my OS with the go backto realmode for floppy read/write, you can test its speed etc.
http://www.dex4u.com/download.htm
Post Reply