Floopy disk is at 0x3f2 ~0x3f5. Anyone have the Source sample to read sector? I want it to read MBR 1st for now.
Posted on 2003-04-22 09:33:43 by realvampire
look up INT 013h ah=02
in ralph brown's intterupt list
this will tell ya how to do it
Posted on 2003-04-26 21:02:59 by rob.rice
I want my Win32App able to do it. It must be a Port accessing, not interupt.
Posted on 2003-04-27 01:23:20 by realvampire
That is a bad programming practice. If every Windows programmer did that, the programs would interfere with each other.

On Windows 95/98/Me, you can call DPMI function 0x300 to simulate the interrupt. Just remember that this must be called from a 16-bit segment and with 16-bit parameters.
On Window NT, you can open the drive with CreateFile and read from it.
Posted on 2003-04-27 06:12:14 by Sephiroth3
What is DPMI function 0x300?
I think practicing Port programming is great for Beginer.
Posted on 2003-04-27 06:16:45 by realvampire
hai realvampire, you can always access my homepage to download the source for accessing the FDC(Floppy Disk Controller), btw, its 8051 source code :grin: :grin:
and dont forget that i'm using DP8473.

sheeess, i cant believe i still remembering it :grin:
Posted on 2003-04-30 07:08:00 by dion
Dion kemana aja nih? Kok jarang nongol? Emang apa bedanya sama pentium atau 8086 ?

Posted on 2003-04-30 08:21:07 by realvampire
vampire, port programming can perhaps be an interesting thing to do, but it's not the way to go about things under win32. NT has a nice easy way (CreateFile, as already mentioned), while 9x is... ho humm. This thread might be of help:
Posted on 2003-04-30 08:38:00 by f0dder
I check it right now. Thanks Fodder.
Posted on 2003-04-30 08:43:45 by realvampire

Dion kemana aja nih? Kok jarang nongol? Emang apa bedanya sama pentium atau 8086 ?

well, if you really download it and read the source, its not so diff with 8085 :grin:
Posted on 2003-05-02 06:31:21 by dion

well, if you really download it and read the source, its not so diff with 8085 :grin:

Ahem..., Your site cannot be accesed. Im running on 45Kbps, weird..., I can access it yesterday.
Posted on 2003-05-02 09:25:15 by realvampire
SOLAR OS has a FDD driver using ports IN/OUT , Interupts and DMA ... functional ...

I use INTs and DMA because they are there anyway... but i guess i still have a non INT non DMA version somewhere lost on my HDD also...

should not be that hard to do...

just DISALBE INT/DMA bit in programming 8272 and then pool it for every byte read...

of course this will waste CPU time on pooling :D but if that is what you really want to do. Speed of actual CPU's alow you to do it quite easy

actually i guess any cpu can do it by pooling from 286/12Mhz upwards

I would at least recomend that you do not use DMA (as this can be somehow complicated and another source of errors) but do use IRQ 6 to read data from 8272 when it is ready.

This way you will not waste much CPU time and keep code relatively simple and fast because gains from DMA are marginal anyway (on FDD)
Posted on 2003-05-02 10:58:46 by BogdanOntanu
Bogdan: IRQ 6 ? How?
Posted on 2003-05-02 19:05:10 by realvampire

Bogdan: IRQ 6 ? How?

read the source, i recommend what Bogdan made. his source code was pretty really good to read :grin: :alright:
Posted on 2003-05-03 06:37:35 by dion
By standard floppy in PC's use IRQ-6 and DMA-2.

In SOLAR OS you cand freely use all that and memory and ports because averything is in ring-o and linear memory space 0 up to 4G.

As i said it before for Windows i do not recommend this approach unless you want to make your own VXD and SYS drivers and even then i do not know IF you could replace the original ones without restart

Instead try and use WinIO to get acces to 8272 ports and disable IRQ and DMA just try and pool data from 8272.

Take care commands to 8272 are multibyte and not that simple:
3 phases: Command phase, execution phase and result phase.

Assuming you want to learn and make fun

because is kind of useless to pool a device in such a way --- since in Windows floppy drivers work ok by using IRQs and DMA .... hmmm kind of ok

Thanks dion
I try to make my examples and released source codes as easy to read as i can (comments and stuff)
Posted on 2003-05-03 10:18:52 by BogdanOntanu