Can somebody download these and perform the command showlib usbsys.device >ram:toto and send me the toto file via e-mail and the same... usblist >ram:toto
I didn't try the usblist 68k binary included in the archive but compiled the source for OS4 instead. It didn't work because the OS4 interface test had the logic reversed.
Oups, thanks xenic Also don't forget to remove ioreq and port... I've improved the code yerterday.
There is a new version of this tutorial on aminet, which try to implement unicode strings printing (in small-face way ). http://aminet.net/package/dev/c/usblist
I made a small OS4 makefile and compiled your sources for OS4 and tested the resulting programs. They seem to work but GCC issues warnings for almost all the printf statements. I don't want to post them all here but here is an example:
usblist1.c:78: warning: format '%ld' expects type 'long int', but argument 2 has type 'int'
Almost all the arguments have type int but the printf statements use %ld or %lx. Since you are using a different compiler and includes for 68k, the OS4 includes may be different and use different type definitions. Possibly your compiler just doesn't generate warnings for these kinds of errors. If you intend these files to also be tutorials for OS4 then the warnings should probably be eliminated by using the correct argument types in the printf statements.
Here is the simple makefile I wrote to compile usblist and usblist1 with OS4 GCC:
USB opened 001 ID 0000:0000 Front Roothub (unit 1) 002 ID 0424:2504 003 ID 090c:1000 SMI Corporation, USB DISK 004 ID 0000:0000 Rear Roothub (unit 0) 005 ID 05e3:0608 USB2.0 Hub Bye!
usblist1
USB opened USBSysBase at 0x6fe7f300 [1] rawifc at 0x6fe81650 product="Front Roothub (unit 1)" deb USB vers 0100 dev ID 0000:0000 dev vers=0x0100 dev class=9 subclass=0 protocol=0 cfg numints=1 cfg maxpower=0 (0 mA) int InterfaceID=0 int AltSetting=0 int class=9 subclass=0 protocol=0 [2] rawifc at 0x6fe81990 deb USB vers 0200 dev ID 0424:2504 dev vers=0x0200 dev class=9 subclass=0 protocol=0 cfg numints=1 cfg maxpower=1 (2 mA) int InterfaceID=0 int AltSetting=0 int class=9 subclass=0 protocol=0 [3] rawifc at 0x6fe81b90 vendor="SMI Corporation" product="USB DISK" serial="AA04012700007677" deb USB vers 0200 dev ID 090c:1000 dev vers=0x0200 dev class=0 subclass=0 protocol=0 cfg numints=1 cfg maxpower=50 (100 mA) int InterfaceID=0 int AltSetting=0 int class=8 subclass=6 protocol=80 [4] rawifc at 0x6fe81450 product="Rear Roothub (unit 0)" deb USB vers 0100 dev ID 0000:0000 dev vers=0x0100 dev class=9 subclass=0 protocol=0 cfg numints=1 cfg maxpower=0 (0 mA) int InterfaceID=0 int AltSetting=0 int class=9 subclass=0 protocol=0 [5] rawifc at 0x6fe81790 product="USB2.0 Hub" deb USB vers 0200 dev ID 05e3:0608 dev vers=0x0200 dev class=9 subclass=0 protocol=0 cfg numints=1 cfg maxpower=250 (500 mA) int InterfaceID=0 int AltSetting=0 int class=9 subclass=0 protocol=0 Bye!
8.RAM Disk:usblist> usblist USB opened 001 ID 0000:0000 Rear Roothub (unit 0) 002 ID 05e3:0605 USB2.0 Hub 003 ID 0aec:3260 Generic , USB Storage Device 004 ID 0000:0000 EHCI Roothub (unit 0) 005 ID 07d1:3c09 Ralink, 802.11 n WLAN Bye!
8.RAM Disk:usblist> usblist1 USB opened USBSysBase at 0x6aeef3c0 [1] rawifc at 0x6b35d350 product="Rear Roothub (unit 0)" deb USB vers 0100 dev ID 0000:0000 dev vers=0x0100 dev class=9 subclass=0 protocol=0 cfg numints=1 cfg maxpower=0 (0 mA) int InterfaceID=0 int AltSetting=0 int class=9 subclass=0 protocol=0 [2] rawifc at 0x6958f890 product="USB2.0 Hub" deb USB vers 0200 dev ID 05e3:0605 dev vers=0x0200 dev class=9 subclass=0 protocol=0 cfg numints=1 cfg maxpower=50 (100 mA) int InterfaceID=0 int AltSetting=0 int class=9 subclass=0 protocol=0 [3] rawifc at 0x6b35edc0 vendor="Generic " product="USB Storage Device" serial="0AEC326000001A000" deb USB vers 0200 dev ID 0aec:3260 dev vers=0x0200 dev class=0 subclass=0 protocol=0 cfg numints=1 cfg maxpower=49 (98 mA) int InterfaceID=0 int AltSetting=0 int class=8 subclass=6 protocol=80 [4] rawifc at 0x696564c0 product="EHCI Roothub (unit 0)" deb USB vers 0100 dev ID 0000:0000 dev vers=0x0100 dev class=9 subclass=0 protocol=0 cfg numints=1 cfg maxpower=0 (0 mA) int InterfaceID=0 int AltSetting=0 int class=9 subclass=0 protocol=0 [5] rawifc at 0x69793880 vendor="Ralink" product="802.11 n WLAN" serial="1.0" interface="1.0" deb USB vers 0200 dev ID 07d1:3c09 dev vers=0x0200 dev class=0 subclass=0 protocol=0 cfg numints=1 cfg maxpower=225 (450 mA) int InterfaceID=0 int AltSetting=0 int class=255 subclass=255 protocol=255 Bye!
USB opened 001 ID 0000:0000 Front Roothub (unit 1) 002 ID 0424:2504 003 ID 090c:1000 SMI Corporation, USB DISK 004 ID 0000:0000 Rear Roothub (unit 0) 005 ID 05e3:0608 USB2.0 Hub Bye!
USB opened 001 in use ID 0000:0000 (9,0,0) Front Roothub (unit 1) 002 in use ID 0424:2504 (9,0,0) 003 in use ID 090c:1000 (8,6,80) SMI Corporation, USB DISK 004 free ID 04e8:663e (2,8,0) Samsung, SAMSUNG Mobile USB Modem 005 free ID 04e8:663e (2,2,1) Samsung, SAMSUNG Mobile USB Modem 006 free ID 04e8:663e (10,0,0) Samsung, SAMSUNG Mobile USB Modem 007 in use ID 0000:0000 (9,0,0) Rear Roothub (unit 0) 008 in use ID 05e3:0608 (9,0,0) USB2.0 Hub Bye!
USBList
USB opened 001 ID 0000:0000 Front Roothub (unit 1) 002 ID 0424:2504 003 ID 090c:1000 SMI Corporation, USB DISK 004 ID 04e8:663e Samsung, SAMSUNG Mobile USB Modem 005 ID 04e8:663e Samsung, SAMSUNG Mobile USB Modem 006 ID 04e8:663e Samsung, SAMSUNG Mobile USB Modem 007 ID 0000:0000 Rear Roothub (unit 0) 008 ID 05e3:0608 USB2.0 Hub Bye!
USBList1
USB opened USBSysBase at 0x6ff84dd0 [1] rawifc at 0x6fe85710 product="Front Roothub (unit 1)" parent=0xffffffff address=-1 speed=-1 deb USB vers 0100 dev ID 0000:0000 dev vers=0x0100 dev class=9 subclass=0 protocol=0 cfg numints=1 cfg maxpower=0 (0 mA) int InterfaceID=0 int AltSetting=0 int class=9 subclass=0 protocol=0 [2] rawifc at 0x6c1c67c0 parent=0xffffffff address=-1 speed=-1 deb USB vers 0200 dev ID 0424:2504 dev vers=0x0200 dev class=9 subclass=0 protocol=0 cfg numints=1 cfg maxpower=1 (2 mA) int InterfaceID=0 int AltSetting=0 int class=9 subclass=0 protocol=0 [3] rawifc at 0x6b866600 vendor="SMI Corporation" product="USB DISK" serial="AA04012700007677" parent=0xffffffff address=-1 speed=-1 deb USB vers 0200 dev ID 090c:1000 dev vers=0x0200 dev class=0 subclass=0 protocol=0 cfg numints=1 cfg maxpower=50 (100 mA) int InterfaceID=0 int AltSetting=0 int class=8 subclass=6 protocol=80 [4] rawifc at 0x66fac440 vendor="Samsung" product="SAMSUNG Mobile USB Modem" serial="358223-00-418541" interface="S_WHCM" parent=0xffffffff address=-1 speed=-1 deb USB vers 0200 dev ID 04e8:663e dev vers=0x0200 dev class=2 subclass=0 protocol=0 cfg numints=3 cfg maxpower=1 (2 mA) int InterfaceID=0 int AltSetting=0 int class=2 subclass=8 protocol=0 [5] rawifc at 0x66fac480 vendor="Samsung" product="SAMSUNG Mobile USB Modem" serial="358223-00-418541" interface="WMC Modem" parent=0xffffffff address=-1 speed=-1 deb USB vers 0200 dev ID 04e8:663e dev vers=0x0200 dev class=2 subclass=0 protocol=0 cfg numints=3 cfg maxpower=1 (2 mA) int InterfaceID=1 int AltSetting=0 int class=2 subclass=2 protocol=1 [6] rawifc at 0x66fac540 vendor="Samsung" product="SAMSUNG Mobile USB Modem" serial="358223-00-418541" interface="WMC Modem bulk data" parent=0xffffffff address=-1 speed=-1 deb USB vers 0200 dev ID 04e8:663e dev vers=0x0200 dev class=2 subclass=0 protocol=0 cfg numints=3 cfg maxpower=1 (2 mA) int InterfaceID=2 int AltSetting=0 int class=10 subclass=0 protocol=0 [7] rawifc at 0x6fe85850 product="Rear Roothub (unit 0)" parent=0xffffffff address=-1 speed=-1 deb USB vers 0100 dev ID 0000:0000 dev vers=0x0100 dev class=9 subclass=0 protocol=0 cfg numints=1 cfg maxpower=0 (0 mA) int InterfaceID=0 int AltSetting=0 int class=9 subclass=0 protocol=0 [8] rawifc at 0x6c1c6600 product="USB2.0 Hub" parent=0xffffffff address=-1 speed=-1 deb USB vers 0200 dev ID 05e3:0608 dev vers=0x0200 dev class=9 subclass=0 protocol=0 cfg numints=1 cfg maxpower=250 (500 mA) int InterfaceID=0 int AltSetting=0 int class=9 subclass=0 protocol=0 Bye!
USB opened 001 in use ID 0000:0000 (9,0,0) Additional Roothub (unit 2) 002 in use ID 0000:0000 (9,0,0) Front Roothub (unit 1) 003 in use ID 050d:0234 (9,0,0) 004 in use ID 046d:c215 (3,0,0) Logitech, Logitech Extreme 3D 005 in use ID 041e:411c (8,6,80) CREATIVE, MuVo USB2.0 006 in use ID 058f:6362 (8,6,80) Generic, Mass Storage Device 007 in use ID 0000:0000 (9,0,0) Rear Roothub (unit 0) Bye!
Valiant@Camelot AmigaOne XE, 800Mhz, 1GB, 9250 Radeon, OS4.1u7 Sam440ep, 666Mhz, 512Mb, 9250 Radeon, OS4.1u6 A1-X1000, 1.8Ghz, 1GB, 9250 Radeon, OS4.1x A1-X5000/40 2.2Ghz, 2GB, Radeon HD 7700, OS4.1 FE ud 2