Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Dave Yeo

Pages: [1] 2 3 ... 215
1
Games / Re: DOS VDM - USB and Game port Gamepad support
« on: November 26, 2021, 10:14:48 pm »
OK, my understanding is obviously limited. It seems the code I quoted is limited to 8 ports, a USB3 limit. I took it for granted that was root ports, of which I have 8 of, as well as 2 hubs totaling 14 ports. The tree,
Code: [Select]
Controller 0: USBXHCD$
Root Hub 0 (4 ports) 1B21:2142
  Port 4: Device 046D:C216 (HID) LS Logitech, Inc. F310 Gamepad [DirectInput Mode]

Controller 1: USBEHCD$
Root Hub 1 (2 ports) 8086:1C2D
  Port 1:  Hub 3 (6 ports) 8087:0024 (HS hub with single TT) Intel Corp. Integrated Rate Matching Hub
    Port 3: Device 046D:C534 (HID)-(Keyboard)(HID)-(Mouse) FS Logitech, Inc. Unifying Receiver
    Port 4: Device 0951:1666 (MSD)-(SCSI)-(BO) HS Kingston Technology DataTraveler 100 G3/G4/SE9 G2/50

Controller 2: USBEHC2$
Root Hub 2 (2 ports) 8086:1C26
  Port 1:  Hub 4 (8 ports) 8087:0024 (HS hub with single TT) Intel Corp. Integrated Rate Matching Hub

which does seem to show enough of the bus hierarchy. Unluckily that is likely directly reading the drivers.
As for usbcalls, I've been using the one installed with YUM/RPM. Tried the one that ships with the Arca Noae drivers but it is quite different with almost none of the exports matching, different calling convention too. Guess ideally would be to basically rewrite the libusb/hid.c from hidapi to use the system usbcalls, big job likely beyond my abilities. Another idea is to call the system usbcalls from the YUM/RPM one.
Missing exports using the system usbcalls,
Code: [Select]
Error! E2028: _libusb_get_port_numbers is an undefined reference
Error! E2028: _libusb_get_bus_number is an undefined reference
Error! E2028: _libusb_alloc_transfer is an undefined reference
Error! E2028: _libusb_submit_transfer is an undefined reference
Error! E2028: _libusb_handle_events is an undefined reference
Error! E2028: _libusb_cancel_transfer is an undefined reference
Error! E2028: _libusb_handle_events_completed is an undefined reference
Error! E2028: _libusb_init is an undefined reference
Error! E2028: _libusb_exit is an undefined reference
Error! E2028: _libusb_get_device_list is an undefined reference
Error! E2028: _libusb_get_active_config_descriptor is an undefined reference
Error! E2028: _libusb_open is an undefined reference
Error! E2028: _libusb_get_device is an undefined reference
Error! E2028: _libusb_get_device_descriptor is an undefined reference
Error! E2028: _libusb_kernel_driver_active is an undefined reference
Error! E2028: _libusb_claim_interface is an undefined reference
Error! E2028: _libusb_free_config_descriptor is an undefined reference
Error! E2028: _libusb_free_device_list is an undefined reference
Error! E2028: _libusb_detach_kernel_driver is an undefined reference
Error! E2028: _libusb_close is an undefined reference
Error! E2028: _libusb_interrupt_transfer is an undefined reference
Error! E2028: _libusb_control_transfer is an undefined reference
Error! E2028: _libusb_free_transfer is an undefined reference
Error! E2028: _libusb_release_interface is an undefined reference
Error! E2028: _libusb_attach_kernel_driver is an undefined reference

2
Storage / Re: JFS cache sizing, and system "speed-up"
« on: November 26, 2021, 08:09:46 pm »
Is XUL marked to load high? Otherwise the only follow-up is to see if it's been LXLITE compressed? (not sure if DLLs get processed by LXLITE, I think they do...?)

During make package, all the DLL's and the exe get lxlited. Raw xul.dll, 71,299,848 bytes.

@Doug,
Right click on the preference and choose reset would probably work. Otherwise with the browser closed, edit prefs.js and delete the line, after backing up prefs.js.

3
Storage / Re: JFS cache sizing, and system "speed-up"
« on: November 26, 2021, 04:54:18 pm »
My ramdisk does persist over warm reboots (last computer, it even persisted over a couple of seconds of no power) and every time the browser crashes, which is too often lately, the whole cache gets invalidated.
As for Thunderbird, I'd think the cache is mostly used when displaying web pages, which it is quite capable of doing. I even have an add-on, thunderbrowse, which exposes displaying web pages.
For SM, you can point the cache in the Preferences under Advanced-->Cache. I assume that for TB, you have to open the Options-->Advanced-->Config Editor and create the same preference as for Firefox.

4
Games / Re: DOS VDM - USB and Game port Gamepad support
« on: November 26, 2021, 04:25:20 am »
Taking iconv out of the equation for now (problems with converting UTF-16LE?), I now get,
Code: [Select]
H:\tmp\hidapi\lib>hidtest.exe
hidapi test/example tool. Compiled with hidapi version 0.11.0, runtime version 0.11.0.
Compile-time version matches runtime version of hidapi.

make_path() failed. unknown error
make_path() failed. unknown error
make_path() failed. unknown error
Device Found
  type: 046d c534
  path:
  serial_number: (null)
  Manufacturer: Logitech
  Product:      USB Receiver
  Release:      2901
  Interface:    0
  Usage (page): 0x6 (0x1)

Device Found
  type: 046d c534
  path:
  serial_number: (null)
  Manufacturer: Logitech  Product:      USB Receiver  Release:      2901
  Interface:    1
  Usage (page): 0x6 (0x1)

Device Found
  type: 046d c216
  path:
  serial_number: (null)
  Manufacturer: Logitech  Product:      Logitech Dual Action  Release:      300
  Interface:    0
  Usage (page): 0x4 (0x1)

unable to open device

Better but there is still the make_path() error.
Looking at the code, it seems that libusb screws up returning the number of ports,
Code: [Select]
static char *make_path(libusb_device *dev, int interface_number, int config_number)
{
char str[64]; /* max length "000-000.000.000.000.000.000.000:000.000" */
/* Note that USB3 port count limit is 7; use 8 here for alignment */
uint8_t port_numbers[8] = {0, 0, 0, 0, 0, 0, 0, 0};
int num_ports = libusb_get_port_numbers(dev, port_numbers, 8);

if (num_ports > 0) {
int n = snprintf(str, sizeof("000-000"), "%u-%u", libusb_get_bus_number(dev), port_numbers[0]);
for (uint8_t i = 1; i < num_ports; i++) {
n += snprintf(&str[n], sizeof(".000"), ".%u", port_numbers[i]);
}
n += snprintf(&str[n], sizeof(":000.000"), ":%u.%u", (uint8_t)config_number, (uint8_t)interface_number);
str[n] = '\0';
} else {
/* USB3.0 specs limit number of ports to 7 and buffer size here is 8 */
if (num_ports == LIBUSB_ERROR_OVERFLOW) {
LOG("make_path() failed. buffer overflow error\n");
} else {
LOG("make_path() failed. unknown error\n");
}
str[0] = '\0';
}
return strdup(str);
}

Or maybe something else? There's also the null serial number, problem with UTF-16?

5
Games / Re: DOS VDM - USB and Game port Gamepad support
« on: November 26, 2021, 12:07:23 am »
Meanwhile I recompiled hidapi with some debugging printf's, now the output is,
Code: [Select]
H:\tmp\hidapi\lib>hidtest.exe
hidapi test/example tool. Compiled with hidapi version 0.11.0, runtime version 0.11.0.
Compile-time version matches runtime version of hidapi.

make_path() failed. unknown error
iconv_open() failed
iconv_open() failed
make_path() failed. unknown error
iconv_open() failed
iconv_open() failed
make_path() failed. unknown error
iconv_open() failed
iconv_open() failed
Device Found
  type: 046d c534
  path:
  serial_number: (null)
  Manufacturer: (null)
  Product:      (null)
  Release:      2901
  Interface:    0
  Usage (page): 0x0 (0x0)

Device Found
  type: 046d c534
  path:
  serial_number: (null)
  Manufacturer: (null)
  Product:      (null)
  Release:      2901
  Interface:    1
  Usage (page): 0x0 (0x0)

Device Found
  type: 046d c216
  path:
  serial_number: (null)
  Manufacturer: (null)
  Product:      (null)
  Release:      300
  Interface:    0
  Usage (page): 0x0 (0x0)

unable to open device

The make_path failed is likely the problem.
I also compiled some of the test programs that come with libusb-devel-docs.
Code: [Select]
H:\tmp\libusb_test>testlibusb.exe
Dev (bus 1, device 1): Logitech - USB Receiver
Dev (bus 1, device 2): Kingston - DataTraveler 3.0
Dev (bus 1, device 3): Logitech - Logitech Dual Action
Code: [Select]
H:\tmp\libusb_test>listdevs.exe
046d:c534 (bus 1, device 1)
0951:1666 (bus 1, device 2)
046d:c216 (bus 1, device 3)
and here testing the joypad,
Code: [Select]
H:\tmp\libusb_test>xusb.exe 046d:c216
Using libusb v1.0.21.11156

Opening device 046D:C216...

Reading device descriptor:
            length: 18
      device class: 0
               S/N: 0
           VID:PID: 046D:C216
         bcdDevice: 0300
   iMan:iProd:iSer: 1:2:0
          nb confs: 1

Reading BOS descriptor: libusb: error [libusb_get_bos_descriptor] failed to read BOS (-1)
no descriptor

Reading first configuration descriptor:
             nb interfaces: 1
              interface[0]: id = 0
interface[0].altsetting[0]: num endpoints = 2
   Class.SubClass.Protocol: 03.00.00
       endpoint[0].address: 81
           max packet size: 0008
          polling interval: 0A
       endpoint[1].address: 01
           max packet size: 0008
          polling interval: 0A

Claiming interface 0...

Reading string descriptors:
   String (0x01): "Logitech"
   String (0x02): "Logitech Dual Action"
   String (0xEE): "?"

Releasing interface 0...
Closing device...
libusb: warning [libusb_exit] some libusb_devices were leaked


6
Storage / Re: JFS cache sizing, and system "speed-up"
« on: November 25, 2021, 08:05:44 pm »
For the Mozilla cache, I use the ramdisk, fairly easy to setup with SM. For Firefox need to use about:config to create preference something like this (H: is my ramdisk) "browser.cache.disk.parent_directory;H:\mozilla\firefox"

7
Storage / Re: JFS cache sizing, and system "speed-up"
« on: November 25, 2021, 01:21:49 am »
@Doug, it was an EUFI install I was testing on. Within 1 MB of the same as this MBR system. The DOS thing is a VDM that runs really early in the boot, can't remember its purpose right now,

@Dariusz, that was a new install of the latest 5.1 beta, so only the stock device drivers including the ram disk driver. Panorama, have to compare to a SNAP system later.
Here's my nonswappable memory on my regular system.
Code: [Select]
Nonswappable Memory analysis:
Apps & DLLs      = 0002B000 ->     172K -> 0.168M
Process overhead = 001EC000 ->    1968K -> 1.922M
DD allocated     = 083F2000 ->  135112K -> 131.945M
DOS              = 0001D000 ->     116K -> 0.113M
VDisk            = 00000000 ->       0K -> 0.000M
File system      = 00051000 ->     324K -> 0.316M
Kernel code      = 000B1000 ->     708K -> 0.691M
Kernel data      = 014D0000 ->   21312K -> 20.813M
Kernel heap      = 003F8000 ->    4064K -> 3.969M

Total            = 09FF0000 ->  163776K -> 159.938M
< End of THESEUS4 (v 4.001.00) output @ 16:18:23 on 24/11/2021 >

8
Storage / Re: JFS cache sizing, and system "speed-up"
« on: November 24, 2021, 04:20:53 pm »
OTOH, here, where I could only get 700MB's cache,
Code: [Select]
Hostname:         4C4C454
OS2/eCS Version:  2.45
# of Processors:  4
Physical Memory:  3240 mb
Virt Addr Limit:  1536 mb

Even more memory accessible to the system.

9
Storage / Re: JFS cache sizing, and system "speed-up"
« on: November 24, 2021, 05:04:39 am »
Yea, started to reply and same thing. Now using a build with intree NSPR4 and NSS, same versions as latest YUM verisons, they seemed stable when I built them as part of the Mozilla build previously. Same code, possibly different optimizations and now the newer GCC.
I guess I'll have to upload new builds if this stays stable.

10
Games / Re: DOS VDM - USB and Game port Gamepad support
« on: November 24, 2021, 04:36:51 am »
Hi Mark,
Use less instead of more, it is a lot more capable including scrolling back up.
Things aren't bad here, some gas stations are empty and the refinery shut down today, so rationing gas, 30 litres on the honour system though some stations are setting things to a $50 limit. Gas in Vancouver is about $1.60 a litre and some were charging close to $2 a litre.
Stores here have the odd empty shelf and some things like eggs and toilet paper are limited to one or two packages to buy. Not bad here but we're still connected to the west.
Driving to Abbotsford the other day, could see the floods, highway was closed so had to take back roads but it is further east where things are bad. Now we have another couple of atmospheric rivers coming, perhaps 100-150 mm of rain, not good. Many of the dykes have been shored up and the Fraser is back down but it snowed up in the hills so might be bad.
See similar is happening to Newfoundland and Labrador except colder, weird times.

11
Games / Re: DOS VDM - USB and Game port Gamepad support
« on: November 24, 2021, 04:15:37 am »
Meanwhile, I managed to compile hidapi but it seems there is something missing, possibly in my attempt at wcsdup(), the version I found on the net originally used strlenW() which we don't have, so I changed it to wcslen().
Here's the DLL and the test program in the lib directory, needs libusb100.dll, the libusb1 package, and the devel package to build. My patch against the github source also included, after patching run "sh bootstrap", "sh configure" then make.
Tried my Sons XBox controller which wasn't detected. Then his Logitech Dual Action gamepad which was detected. First 2 entries are my unified keyboard/mouse controller, 3rd is his gamepad.
Code: [Select]
H:\tmp\hidapi\lib>hidtest.exe
hidapi test/example tool. Compiled with hidapi version 0.11.0, runtime version 0.11.0.
Compile-time version matches runtime version of hidapi.

Device Found
  type: 046d c534
  path:
  serial_number: (null)
  Manufacturer: (null)
  Product:      (null)
  Release:      2901
  Interface:    0
  Usage (page): 0x6 (0x1)

Device Found
  type: 046d c534
  path:
  serial_number: (null)
  Manufacturer: (null)
  Product:      (null)
  Release:      2901
  Interface:    1
  Usage (page): 0x6 (0x1)

Device Found
  type: 046d c216
  path:
  serial_number: (null)
  Manufacturer: (null)
  Product:      (null)
  Release:      300
  Interface:    0
  Usage (page): 0x4 (0x1)

unable to open device

I guess the serial number etc should be filled in? Perhaps the Usage (page) is good enough for SDL?

12
Games / Re: DOS VDM - USB and Game port Gamepad support
« on: November 24, 2021, 04:00:51 am »
Hi Mark, you might be able to capture the output by redirecting stdout/stderr,
Code: [Select]
oinput.cmd 2>&1 | tee oinput.log

13
Storage / Re: JFS cache sizing, and system "speed-up"
« on: November 23, 2021, 07:40:58 am »
System seems to have ended up unstable after that change, both SM and TB crashing frequently. Leaves me wondering if the kernel commits more memory at times. Different partition with VAL set to 3072 gives me 153M free system memory, 123M largest block.

I have  107M free system memory, 92M largest block.  FF is quite stable.

This was the latest beta with the updated NSPR and NSS so that may be part of it.

14
Storage / Re: JFS cache sizing, and system "speed-up"
« on: November 23, 2021, 06:58:16 am »
System seems to have ended up unstable after that change, both SM and TB crashing frequently. Leaves me wondering if the kernel commits more memory at times. Different partition with VAL set to 3072 gives me 153M free system memory, 123M largest block.

15
Games / Re: DOS VDM - USB and Game port Gamepad support
« on: November 23, 2021, 06:54:01 am »
Hi guys.

When I first ported Dosbox, I tested the joystick support, i.e. PC joysticks via DB15 port, on a T23, and it worked. It should still work.

As for USB joysticks:
The linux port of SDL 2 uses the HIDAPI library for supporting USB joysticks. We probably could port that code over to OS/2 (and then back to SDL 1), but I have to understand that code myself first.

Trying to build the HIDAPI library fails as we're missing wcsdup, a wide char version of strdup it seems. Have to find it somewhere unless Paul has added to one of his GCC ports.
Which brings up another possible problem, libusb seems to do unicode, utf8 I think.

Pages: [1] 2 3 ... 215