I've gotten almost all initial routines working, I now have control of the controller (thank goodness, that's important) :lol: I'm going to finish tweaking my PCI code tonight, then move on to device enumeration. I expected to have more bugs than that, I wrote all the routines in a rather fast manner, all my bugs were in the PCI. :roll: All my PCI routines need is a search routine, I'll write it tonight, then upload my source for evaluation, if anyone wants it. :) I'm slowly creating a USB demo, if it does anything interesting (right now it shows 4 numbers: USB PCI Address, USB IO Base, status register, and the Serial Bus revision number. oh. and a frame pointer correctly produced by my routine, which is the first step in the structural nightmare of USB), I will post it if it does anything worth noting.
tonyMac- 03-21-2005
I have rewritten a few of my routines, all use the built-in Dex4u PCI routibnes, which work much better than mine. :oops: :wink: I am now to the point of actually atempting a transfer over the bus, in order to enumerate devices. Once I finish downloading the mass storage spec, I'll be working...
Dex- 03-22-2005
Nice 8) , let us know as soon has you get a transfer over the bus :wink:
By using these two functions
call [RealModeInt10h]
call [RealModeRegs]
You can call a real mode int 10h function, so it may help you if you get stuck, but note, it may not work for all int 10h, eg those that use memory pointers or irq will not work.
In the "PrintString" call you can now do this in to the string
MyString: db 0xd2, 0x02, 'hello ' ,0xd2, 0x07, 'world',13,0
This will print "hello" and "world" in a differant color, so "0xd2" or "210" means that the following byte will be the color byte for the text,
I have also modded the load file from floppy, you call from your program, you now can write the name of a file to load like this "test.txt" or "MyFile.bmp", upto 8 letters and 3 extention.
The cd load works the same as before, all the int 40h that were there before have also been modded with the above mods.
If any one wants a function add let me know, i think i add all requested functions.
tonyMac- 01-23-2006
I'm in the act of finding my USB code, some of it was on a floppy... the rest is buried on my HDD.... :?
I have, however, found a Pascal program (with source), that does some USB transfers, like configuring a hub. Once I truley understand how this works, I will be able to begin programming libraries for apps that may want to use a specific piece of hardware. Until we have a driver interface, that is (which I'm sure will be done before I am ready. :lol:
http://hobbes.nmsu.edu/pub/dos/Usb4pas.zip
Dex- 01-23-2006
Glad to see the USB project ,is back off the backburner 8).
I use to do a lot of pascal progamming, but now i find pascal not as easy to read, too much ASM.
I made a floppy driver that goes back to realmode for int 13h, that works with a usb pen drive, or would work if we had a fat16 implemented.
tonyMac- 01-24-2006
You have that currently? Is it part of the kernel, or could I have a copy that includes it? my Laptop doesn't have a floppy drive, it's hard for me to work, I have an external floppy that is recognized as A:\, so it should work with a real-mode floppy drive routine.
Dex- 01-24-2006
I have put it on the web site "DosBoxDex4u.zip" it a ima image. it works instead of normal floppy driver.
I may have a switch in the CLI, so you can chose between BIOS or pmode driver.
Note to say it goes to real and back for every 512bytes, it surprisingly fast :?.
It can be used for Hdd read/write by changing drive number.
tonyMac- 01-24-2006
It works great, I'm able to read/write to/from my USB floppy drive, although slowly. This is no fault of the driver, it actually takes a few seconds to boot Dex4u from the usb drive, the BIOS routines are most likely Full speed, not High speed, and designed for the smallest code size. Even after running the USB controller code, which initialized the controller, the disk was accessible. I can't promise this would be the case for other BIOS, if you have a Dell, most likely. If you don't, it's possible that any code I release for USB could make drive A:\ "dissapear" to the system if it happens to be an external USB drive accessed through BIOS. One current glitch, which I believe is unavoidable, is that when inserting a new disk and typing "Dir", the system says disk not ready. I think it's the lag of the BIOS USB driver, it has to recognize the disk. typing "Dir" again results in completion of the command.
My goals for the USB driver have changed, I believe a full-blown multi-device driver is well beyond my ability, and possibly beyond what is needed for the system. I will still work on a Mass storage driver for system use, since it would be worthless outside the kernel... (can't load a driver if you can't see the disk it's on!), however, other device classes will be handled by specific and focused drivers, aka "keyboard/mouse (HID) driver", or "Camera driver". A general-purpose driver would be larger than our kernel, and would be nothing but bloat to the system. after all, I have a lot of USB devices, but in Dex4u I would be using them in a very focused manner, it would not be difficult to make a USB driver that handled only the bus (pref. in-kernel), and the user would load the drivers for the specific hardware they would be using. (mouse/keyboard, camera, etc.)
Dex- 01-24-2006
Glad it works OK and you seem to have a good idea for the way you will be implement USB 8).
The problem with the changing the disk, is the same, even on normal floppy drives,
using the BIOS from pmode driver.
I thought i fix it, with looping 3 times on error, that image maybe from before i fix it ??.
I will check it and get back to you.
tonyMac- 01-24-2006
I have located all of my USB work. I have most of the controller code done, at least for setting/resetting flags and telling the thing to go, my problem lies with the making of the data structure, and enumeration. really big problems, actually... :? And the old demo I was working on hangs the machine, that's no good. This was probably what frustrated me enough to hold up work on it, although, now I have time to devote to it (after the Super Bowl, my home town team the Pittsburgh Steelers are in it. 8) )
Dex- 01-25-2006
Good luck to the Pittsburgh Steelers, it the world cup (football) this year 8) .
tonyMac- 01-25-2006
Hmmmm, football... to the world it involves a little round white and black ball... to the united states, it involves an oblong brown ball, which is usually carried. :lol: So, put the Steelers on a Soccer field, and put a soccer team in an arena, we'll see how it goes!
Dex- 01-25-2006
American football is like our rugby, but we do not need all that padding :wink: .
I have checked and that image is before i fixed the problem with the change disk, i will update it, when i next upload to the site.
Forumer™ is Voted #1 Free Forum Hosting provider
Build your own community today with the largest message board hosting company.