flat assembler
Message board for the users of flat assembler.
Index
> OS Construction > Hard disk driver problem |
Author |
|
ASHLEY4 27 Oct 2004, 18:11
I have not done a hdd driver, but i have done a cd/dvd which are very simular, i have lots of test pc's and there were big diffeancs between all the drives in the delay that was needed, in the end i used the biggist delay, also on some pc they would not work on first read, need to do 2 read attemps, with a small delay in between.
Here is some hdd code i found, may help?. \\\\||//// (@@) ASHLEY4. Last edited by ASHLEY4 on 27 Oct 2004, 22:52; edited 1 time in total |
|||
27 Oct 2004, 18:11 |
|
crc 27 Oct 2004, 18:59
Try performing the read and write operations more than once -- PIO is nice, but very hard to deal with on faster computers. I can share my HDD driver if you want, but it has some strange calling conventions... It does work on every system I've tried it on though.
|
|||
27 Oct 2004, 18:59 |
|
Octavio 27 Oct 2004, 22:37
crc wrote: Try performing the read and write operations more than once -- PIO is nice, but very hard to deal with on faster computers. I can share my HDD driver if you want, but it has some strange calling conventions... It does work on every system I've tried it on though. read two times is normal on removable devices just after the disk has changed but i think that on a hard disk any error is not normal. also sometimes, specially with older disk they become busy forever and don´t respond even for the reset command. And yes i would like to see your hdd driver if it works on many computers also if you want to see my code (asm but not fasm)i can share it. what is strange calling conventions in assembly language? and even if it is unreadable (optimized) i don´t care. what i don´t like is when people write a lot of lines of code for doing simple things (like linux). Just now i only have one computer, i have destroy the other i have 2 adapters for removable hd but they are imcompatible ("pc compatible" sounds strange today) , and when placing the disc on the wrong adapter it burns the two ide controllers and the other hard disk, but i have luck, one of the disk has survived. Now i´m thinking wich computer to buy. |
|||
27 Oct 2004, 22:37 |
|
Gomer73 28 Oct 2004, 21:10
Check out Hale's site:
http://www.ata-atapi.com/ I converted his code to assembler for my OS and it works great. You can also check out the UDMA driver for FreeDOS |
|||
28 Oct 2004, 21:10 |
|
Octavio 29 Oct 2004, 00:45
well, i found the problem , i was using something like this:
mov dx,1f4h out dx,eax instead it should be: mov dx,1f4h out dx,al inc dx mov al,ah out dx,al inc dx........... some ports registers must be writen one byte at a time. |
|||
29 Oct 2004, 00:45 |
|
ASHLEY4 29 Oct 2004, 01:40
You might be better off with this:
Code: mov dx,4 add dx,word [port] ; Add the base out dx,al for pc with more than 1 hdd \\\\||//// (@@) ASHLEY4. |
|||
29 Oct 2004, 01:40 |
|
Octavio 29 Oct 2004, 16:28
ASHLEY4 wrote: You might be better off with this: it was just a example, my driver supports 4 hd in chs or lba mode and can support even more with a small modification on the code. OT: Now i have a PIII 930Mhz and after test my programs it seems that is a bit faster than the other computer amd xp1800 ! |
|||
29 Oct 2004, 16:28 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.