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 - Lars

Pages: 1 ... 22 23 [24] 25 26 ... 86
346
Hallo,

I have a RAM disk and environment var "TMPDIR" is pointing to it (other vars like TMP, TEMP and EPFITMPDIR are instead pointing to a hard drive directory).
Effectively it´s "set TMPDIR = Z:\" where Z: is the RAM disk drive letter.
It seems that as soon as I start an app that was ported from Unix (and therefore will in some way use LIBC etc.) then, a directory "runtime-root" is created in the root of Z:

I could care less as it will be gone on the next bootup but it seems to negatively impact the initial run of such an app. Why is this directory created and how can I prevent it from being created ?

347
Programming / Re: Compiling a PM sample with GCC
« on: March 31, 2022, 11:32:50 pm »
Hi Martin,

just as a side note: for a 32-bit application, the HEAPSIZE keyword in the DEF file is completely superfluous (it has no effect for 32-bit applications). But it won't hurt either, it will just be ignored by any 32-bit linker. It is a remnant of 16-bit linkers (and the original source code dates back to 16-bit times).

The STACKSIZE keyword however is relevant. 8 kBytes is very small stack for a PM application. It's obviously ok for this application but it should definitely be bigger for a "normal sized" PM application. Maybe 64 kByte would be a better choice.

348
Programming / Re: Compiling a PM sample with GCC
« on: March 30, 2022, 09:53:52 am »
Actually, GCC wants the os2.h in @unixroot\usr\include and should find it on its own without C_INCLUDE_PATH or -I, if you want to use the one in the toolkit, you need to define USE_OS2_TOOLKIT_HEADERS 1 or edit os2.h around line 39. Should use the define though.
Likewise, if you need  Toolkit header like dive.h, the toolkit headers need to be at the end of the C include search path, C_INCLUDE_PATH=/@unixroot/usr/include;c:/usr/include/os2tk45 or use -Idirafter=c:/usr/include/os2tk45.
Anyways, PMwalker seems to be designed for EMX, after editing the makefile to compile with kLIBC, I get,
Code: [Select]
        gcc -Zomf walker.obj walker.def
weakld: error: Unresolved symbol (UNDEF) '_ClientWndProc'.
weakld: info: The symbol is referenced by:
    H:/tmp/PMwalker/walker.def
Ignoring unresolved externals reported from weak prelinker.
Warning! W1058: file ldZXONto.: line(20): protmode option not valid for an OS/2
EMX executable
Error! E2028: _ClientWndProc is an undefined reference
Error! E2044: exported symbol _ClientWndProc not found
NMAKE : fatal error U1077: 'W:\OS2\CMD.EXE' : return code '1'
Stop.
with this makefile,
Code: [Select]
walker : walker.exe

walker.exe : walker.obj walker.res walker.def
   gcc -Zomf walker.obj walker.def
   rc walker.res

walker.obj : walker.c walker.h
   gcc -Zomf -los2 -c -O2 walker.c -o walker.obj

walker.res : walker.rc step1.ico step2.ico step3.ico
   rc -r walker.rc

Need to read the documentation, probably a define missing.
Hmm, the def file is broken, need to remove the underline prefix so it reads EXPORTS ClientWndProc rather then EXPORTS _ClientWndProc
Edit:, read the readme.txt, it was actually written for a different GCC port, GCC/2, not EMX.

Apparently, decades ago, GCC/2 either did not understand the "_System" keyword as a calling convention or the emx header files did not specify the "_System" keyword in which case the compiler defaults to the "C" calling convention that in turn will lead to an underscore being prepended to the symbol name (thank god, the "C" and the "_System" calling conventions have about the same rules regarding argument passing and stack cleanup ...).
If I now look into \usr\include\os2.h and \usr\include\os2emx.h, everything is fine and gcc.exe will properly resolve the EXPENTRY macro definition to the "_System" keyword.

349
Programming / Re: Compiling a PM sample with GCC
« on: March 30, 2022, 09:48:34 am »
As Dave suggested, DO NOT use the IBM provided toolkit when it comes to using gcc.exe. Apparently, gcc.exe does not understand some of the specific keywords (like "_Seg16") that the WATCOM and IBM compilers understand.

You should have a \usr\include\os2.h file and, without any further customization, that file will include <os2emx.h> which is basically the "merge" of all individual header files from the IBM toolkit (at least the BSE and PM and WIN related header files). That is by far the easiest way to go for gcc.exe.

I think the IBM provided toolkit files were packaged for those developers that intend to use WATCOM or the IBM provided toolchain (Visual Age C++). Maybe that should have been stated right away ...

350
Programming / Re: Compiling a PM sample with GCC
« on: March 30, 2022, 01:03:17 am »
gcc.exe does not know about INCLUDE env var. Try C_INCLUDE_PATH instead.

If that does not work , add -Ic:/usr/include/os2tk45 to the compiler commandline in the makefile.

351
Applications / Implemented DUMPFS.IFS as a 32-bit IFS
« on: March 29, 2022, 08:09:09 pm »
Hallo,

I am referring to:
https://www.os2site.com/sw/drivers/filesystem/dumpfs.zip

As you might know, this package contains a modified OS2DUMP and a specialized IFS for supporting trap dumps.
I have now reimplemented the "DUMPFS.IFS" contained in that package as a 32-bit version. That means, it supports dumps > 2 GB. I have also added (minimum) EA support so that the partition contents properly display in the WPS and also on the commandline. Of course, you can also use PMDF.EXE on that dump file (without the need to copy it to another partition as was true for the original DUMPFS.IFS).

Additionally I have implemented some reduced write support so that you can copy a trap dump file to that dump partition. Of course, copying the dump file to another partition (for example, a JFS partition) also works.

Would anybody be willing to test ? It does still have a few quirks here and there but in principle it should work (at least, it does on my system).

I have limited its use to an LVM managed system (that is OS2DASD.DMD/OS2LVM.DMD , sorry, but original Warp3 or Warp4 are not supported) in order to have optimal read/copy/write throughput.

Just drop me a note if you want a test version.


352
Games / Re: DOS VDM - USB and Game port Gamepad support
« on: March 29, 2022, 05:55:56 pm »
How does this all relate to :
https://github.com/OS2World/DRV-USBLib/tree/master/drivers/src/usbjoy

Is the gamepad a USB device ? If yes, should we not modify those USB joystick drivers to interface with GAMEDD.SYS ? That's at least how it was solved for the USB mouse:
we have USBMOUSE.SYS and that interfaces with AMOUSE.SYS / MOUSE.SYS.

353
General Discussion / Re: Email Address Valery Sedletzki ?
« on: March 09, 2022, 12:56:24 pm »
Thanks. I'll contact you directly.

354
General Discussion / Email Address Valery Sedletzki ?
« on: March 08, 2022, 08:17:11 am »
Hi,

can anyone provide me with an email address of Valery Sedletzki ?

@Valery: if you listen, just drop me your email address in the private area. I need your help on FSDs :-)

Thanks !

355
Internet / Re: RPM: Switching from i686 to Pentium4
« on: March 01, 2022, 03:12:11 pm »
Netlabs has a newer one:

http://rpm.netlabs.org/bootstrap/rpm-yum-bootstrap-1_7-pentium4.zip

It's just not linked from the RPM main page. And it is not a WPI but a ZIP.


356
Games / Re: DOS VDM - USB and Game port Gamepad support
« on: February 06, 2022, 04:25:45 am »
Ah, ok, yes, so SDL does not implement a full blown HID parser but it knows the input packet format for a couple of known devices.Yes, that is what is needed.

357
Games / Re: DOS VDM - USB and Game port Gamepad support
« on: February 06, 2022, 02:20:53 am »
The API can be found here:

https://github.com/libusb/hidapi/blob/master/hidapi/hidapi.h

To me, hidapi looks like a very thin layer on top of libusb. It just allows to send or receive feature reports and to receive input reports. Feature reports seem to be for control or to receive settings.
However, interpreting the contents of an input report requires a HID parser. The HID parser uses the information in the HID report descriptor (burned into the device, can be read from the device just like any other descriptor) to find out what bit means what.
So, the hidapi is available (from BWW github) or from Josh but the "intelligence" is provided by the parser that is not part of hidapi.
Maybe the application that Martin suggested contains the necessary parser to actually make up something of the data that it receives via USB. That would be my hope, at least.

Here is some hopefully simple explanation of what a HID report descriptor is:
https://eleccelerator.com/tutorial-about-usb-hid-report-descriptors/

358
Programming / Re: gcc - building libarchive
« on: February 05, 2022, 11:55:05 pm »
I was given this shell script to create the makefiles for a cmake based project (where the source is located in ..\git directory), to be called from the "build" directory:

export LDFLAGS='-Zhigh-mem -Zomf -lcx -lpthread'
export CFLAGS='-Zomf -O2 -g -march=pentium4 -Wno-attributes'

cmake  -DCMAKE_INSTALL_PREFIX:PATH=/@unixroot/usr \
    -DCMAKE_BUILD_TYPE:STRING=debug \
    ../git

Shouldn't that do the trick ? Might need to adjust the cmake defines for your case.


359
While you are at it, you should also link to (or copy):

https://hobbes.nmsu.edu/download/pub/os2/dev/info/books/OS2_IFS_1998-02-13.pdf

because that is the last version ever been written.

And one of these days, you should also link to the final,final,final version that Valery Sedletzki produced when he overhauled FAT32.IFS. Because that version contains the largely undocumented 32-bit interface extensions. But I will also need to add yet additional info to that :-)

360
Hardware / Re: Trap 000D when trying to go to command line
« on: February 02, 2022, 07:28:52 am »
Compare os2/boot/config.x with config.sys.
The difference (in drivers) must be causing the trap D.
The trap screen also usually shows the module that failed (but not always).

Pages: 1 ... 22 23 [24] 25 26 ... 86