flat assembler
Message board for the users of flat assembler.
Index
> OS Construction > bootloader usb driver |
Author |
|
Dex4u 18 Dec 2007, 18:46
Yes and no, to boot from usb pen, you need to emulate floppy or hdd (so you can use int 13h for that).
But you can not boot from floppy and then load from usb pen drive, without removing the floppy and rebooting. |
|||
18 Dec 2007, 18:46 |
|
edfed 18 Dec 2007, 21:41
Quote:
why? Grub is able to load different bootloaders... To reload a boot, simply load it at seg:7C00h and jump to this location, the problem is: it is possible to read a usb pen with a PIO function less than 460 bytes? if possible , where to find the documents, reading usb pen with pio. |
|||
18 Dec 2007, 21:41 |
|
f0dder 18 Dec 2007, 23:51
Dex4u wrote: Yes and no, to boot from usb pen, you need to emulate floppy or hdd (so you can use int 13h for that). Sure you can, if you program the USB pendrive directly, instead of relying on BIOS floppy emulation. What's the obsession with 512 byte bootsector anyway, there's plenty more room on a floppy than just the bootsector... _________________ - carpe noctem |
|||
18 Dec 2007, 23:51 |
|
Dex4u 19 Dec 2007, 01:46
f0dder wrote:
No you can not, the only way is to use emulation, or code a usb stack, not likely in 460 bytes. You must be living in dream land, Why do you need to add a USB stack to Dos, if you can read/write to it using pio or int 13h ?, The simple answer is, you can not without emulation and by booting from it (or coding a USB stack ). Once you boot from it, you can use emulation in realmode, but it stops if you go to pmode. Theres a small chance of it working, if maybe you have no hdd installed. |
|||
19 Dec 2007, 01:46 |
|
edfed 19 Dec 2007, 02:16
in fact, i have some problems with floppies, as i don't want to buy new ones, i use some dead floppies, only the boot sector is good, the rest is bad.
i cannot boot from usb pen on my machines, but i can from floppy why emulation? i don't see what you mean by emulation. i just want to read the content of the memory chip on the usb drive and you speak about emulation. it's strange... i don't want a dos dependant usb pen driver do you understand? i spoke about int13h and PIO as exemple, not as restrictions. Code: mov dx,usb_drive_IO in eax,dx ;that's all i want. |
|||
19 Dec 2007, 02:16 |
|
Dex4u 19 Dec 2007, 02:38
edfed wrote:
edfed my dear chap, because you want a easy way, does not mean there is one. USB are one of the hardest device to code for, why do you think LINUX had a problem. You can write a USB stack (alot of work), but in your case you can not use any other way (as you can not boot usb ) Emulation is away to use usb, by tricking the boot loader into thinking its loading from a floppy or hdd using int 13h, but your BIOS need to be able to do that, yours can not. Your best loading from a normal hdd. Note: I have done a lot of work with USB, i am working on a USB stack for DexOS right now, 5 months and i only have the basic's done. Last edited by Dex4u on 19 Dec 2007, 02:39; edited 1 time in total |
|||
19 Dec 2007, 02:38 |
|
LocoDelAssembly 19 Dec 2007, 02:39
edfed, by emulation they mean BIOS emulation, like "El Torito" does. When you use the INT13, the BIOS will fool your boot code making it beleave that the pen is either a HDD, a Floppy or a CDROM (and maybe some other types of emulation exists).
http://www.ctyme.com/intr/int-13.htm <- Check from Int 13/AH=4Ah to see somewhat related stuff |
|||
19 Dec 2007, 02:39 |
|
sinsi 19 Dec 2007, 02:40
edfed wrote:
Heh, if only it was that easy. Look here for a DOS USB driver http://www.dosusb.net/ |
|||
19 Dec 2007, 02:40 |
|
edfed 19 Dec 2007, 02:41
i understand now.
i'll use the first 4kbyte of my hdd ( unsused by FAT32 ) it's sufficient for the moment. thanks i'll wait your code as exemple. |
|||
19 Dec 2007, 02:41 |
|
edfed 19 Dec 2007, 02:44
so if i well understand, usb drive need a lot of routines to works. ok.
aïe aïe äïe headacke |
|||
19 Dec 2007, 02:44 |
|
f0dder 19 Dec 2007, 12:09
Dex4u wrote:
Re-read my post? Writing a USB stack is what I meant, and hence also why I asked about the bootsector-size obsession, because obviously you can't fit an USB stack in 460 bytes. _________________ - carpe noctem |
|||
19 Dec 2007, 12:09 |
|
moile 19 Dec 2007, 21:00
and is it possible to write it within 8 sectors?
this is the maximum of contiguous good sectors i have on my floppies! |
|||
19 Dec 2007, 21:00 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.