![]() |
China DOS Union-- Unite DOS · Advance DOS · Grow DOS --Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum |
| Guest | Log in | Register | Members | Search | China DOS Union |
|
中国DOS联盟论坛 The time now is 2026-10-31 21:22 |
47,815 topics / 349,930 posts / today 0 new / 48,290 members |
| DOS开发编程 & 发展交流 (开发室) » Seek help with DOS USB programming! |
| Printable Version 2,108 / 10 |
| Floor1 yuanchengjun | Posted 2007-04-17 04:57 |
| 新手上路 Posts 3 Credits 8 | |
|
Looking for DOS USB device driver source code, or examples, or tutorials,... No need for a complete driver, examples are okay, such as: a process of sending and receiving data packets once.
|
|
| Floor2 yuanchengjun | Posted 2007-04-17 04:59 |
| 新手上路 Posts 3 Credits 8 | |
|
DOS, C language don't know USB, probably need to use assembly.
Great expert, please give unsparing advice! |
|
| Floor3 heling | Posted 2007-06-07 13:02 |
| 新手上路 Posts 9 Credits 18 | |
| Floor4 kinglin | Posted 2007-07-03 14:33 |
| 初级用户 Posts 28 Credits 62 | |
| Floor5 windowsvesta | Posted 2007-07-04 11:04 |
| 初级用户 Posts 67 Credits 138 From 云南 | |
|
I want to know too
|
|
| Floor6 johnsonlam | Posted 2007-07-04 12:59 |
| 银牌会员 Posts 497 Credits 1,410 From 九龍,香港 | |
|
There are:
http://www.georgpotthast.de/usb/dosusb.htm This is the USB standard document: http://www.usb.org/developers/docs/usb_20_040907.zip [ Last edited by johnsonlam on 2007-7-4 at 01:03 PM ] |
|
| Floor7 wzsunlight | Posted 2007-09-11 20:15 |
| 初级用户 Posts 52 Credits 107 | |
| Floor8 dsysps | Posted 2007-10-23 17:15 |
| 初级用户 Posts 34 Credits 98 | |
|
I also want to know, and I'm working hard. Now I understand the basic configuration process of EHCI
//Detect EHCI through PCI configuration space BYTE SearchEHCI(void) { union REGS regs; int bus, dev, func; //WORD Did,Vid; WORD ClassCod,SubClass; for(bus = 0; bus <= PDI_BUS_MAX; ++bus) { for(dev = 0; dev <= PDI_DEVICE_MAX; ++dev) { for(func = 0; func <= PDI_FUNCTION_MAX; ++func) { UsbHostPciAddr = MK_PDI(bus, dev, func);/* Calculate address */ /* Get vendor ID */ regs.x.ax = 0xB109; // READ CONFIGURATION WORD regs.x.bx = UsbHostPciAddr; regs.x.di = 0; // Vendor ID regs.x.cx = 0xFFFF; // Invalid vendor ID int86(0x1A, ®s, ®s); /* Determine if the device exists. FFFFh is an invalid vendor ID */ if (regs.x.cx != 0xFFFF) { /* Class Code */ regs.x.ax = 0xB109; // READ CONFIGURATION WORD regs.x.bx = UsbHostPciAddr; regs.x.di = 0xA; // Class int86(0x1A, ®s, ®s); ClassCod=regs.x.cx; if(ClassCod==0x0c03) //usb host { regs.x.ax = 0xB109; // READ CONFIGURATION WORD regs.x.bx = UsbHostPciAddr; regs.x.di = 8; //SubClass int86(0x1A, ®s, ®s); SubClass=regs.x.cx; if((SubClass&0xff00)==0x2000) return USB_EHCI_CONTROLLER; } } } } } return USB_NULL_CONTROLLER; } ///*Set base address to 0X000D0000*/ void CfgBaseAddr(void) { union REGS regs; regs.x.ax = 0xB10c; //WRITE CONFIGURATION WORD regs.x.bx = UsbHostPciAddr; regs.x.di = 0X10; regs.x.cx = 0; int86(0x1A, ®s, ®s); regs.x.ax = 0xB10c; // WRITE CONFIGURATION WORD regs.x.bx = UsbHostPciAddr; regs.x.di = 0X12; regs.x.cx = 0X000D; int86(0x1A, ®s, ®s); } ......... |
|
| Floor9 phtsai63 | Posted 2007-10-24 11:13 |
| 新手上路 Posts 3 Credits 6 | |
|
Dos USB is written in Basic and only supports OHCI and UHCI. Hope the above can benefit the public.
|
|
| Floor10 winson4829 | Posted 2008-03-06 14:34 |
| 初级用户 Posts 17 Credits 68 | |
|
Development environment uses DJGPP + FreeDOS + DPMI + DOSUSB driver (http://www.dosusb.net)
Please refer to the forum content in http://www.dosusb.net. Different USB CHIPs are not guaranteed to be successful, But in my environment, the SOURCE CODE I wrote is OK File name: W6USBCOM.h File name: W6USBCOM.C |
|
| Floor11 happe | Posted 2008-03-11 05:01 |
| 新手上路 Posts 6 Credits 12 | |
|
Still learning. There are so many things here...
What is DOS USB programming about? Still don't understand after looking. |
|
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |