Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

Is there some DOS floppy utility that doesn't rely on DMA? (Developers)

posted by RayeR Homepage, CZ, 03.04.2024, 03:06
(edited by RayeR on 03.04.2024, 05:52)

> Maybe here could be some DOS floppy code which does not rely to DMA
> https://github.com/joncampbell123/doslib/tree/master/hw/floppy

Yes, you was right, this supports also noDMA mode, thanks!

I tried to run test.exe and for some reason it detected DMA 2 enabled by default but it can be disabled in the menu. Then I tried seeking and reading a sector but unfortunatelly it was very unreliable (for sure I tried with a floppy that I tested under Linux it reads OK without any errors). Sometimes I got simply "NDMA read failed -2 (d0h)" error and zero data. Sometimes it read a sector but not full. It usually reads a range of 450-510 bytes and it was messed up at first look (the strings in bootsector). Every read attempt got a different number of readed bytes and different content. I also tried to disable interrupt in the menu and tried again but nothing changed, same mess. So this code would do what I need but it's useless for real use. But still may be good as a reference alongside linux floppy driver to learn something from it. It would take some time...

http://rayer.g6.cz/1tmp/fd1.jpg
http://rayer.g6.cz/1tmp/fd2.jpg

EDIT:
This may be the source of problem:
static inline int floppy_controller_wait_data_ready(struct floppy_controller *fdc,unsigned int timeout) {
        do {
                floppy_controller_read_status(fdc);
                if (floppy_controller_data_io_ready(fdc)) return 1;
        } while (--timeout != 0);

This is called in CLI block with value 1000, maybe my PC is too fast :P (limited just by inp I/O speed)

---
DOS gives me freedom to unlimited HW access.

 

Complete thread:

Back to the forum
Board view  Mix view
22049 Postings in 2034 Threads, 396 registered users, 53 users online (0 registered, 53 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum