News:

OS2World.com Forum is back !!!

Remember to visit OS2World at:
http://www.os2world.com

Main Menu

General Software Testing

Started by Martin Iturbide, September 26, 2023, 09:41:41 PM

Previous topic - Next topic

Martin Iturbide

#90
Hello

I tried to compile it, but I suck. Only warnings, but I fail with the linker.



Creating binary resource file Mandel.RES
RC:  RCPP -E -D RC_INVOKED -W4 -f Mandel.rc -ef C:\OS2\RCPP.ERR -I C:\usr\include

Mandel.rc
gcc -Wall -Zomf Mandel.obj gifcompr.obj gifencod.obj Mandel.def -los2 -o Mandel.exe
weakld: error: Unresolved symbol (UNDEF) '_DosReleaseMutexSem'.
weakld: info: The symbol is referenced by:
    E:\dev\5TRYING\Mandel\Mandel.obj
weakld: error: Unresolved symbol (UNDEF) '_DosRequestMutexSem'.
weakld: info: The symbol is referenced by:
    E:\dev\5TRYING\Mandel\Mandel.obj
weakld: error: Unresolved symbol (UNDEF) '_DosCreateMutexSem'.
weakld: info: The symbol is referenced by:
    E:\dev\5TRYING\Mandel\Mandel.obj
Ignoring unresolved externals reported from weak prelinker.
Error! E2028: _DosRequestMutexSem is an undefined reference
Error! E2028: _DosReleaseMutexSem is an undefined reference
Error! E2028: _DosCreateMutexSem is an undefined reference
file E:\dev\5TRYING\Mandel\Mandel.obj(Mandel.obj): undefined symbol _DosRequestMutexSem
file E:\dev\5TRYING\Mandel\Mandel.obj(Mandel.obj): undefined symbol _DosReleaseMutexSem
file E:\dev\5TRYING\Mandel\Mandel.obj(Mandel.obj): undefined symbol _DosCreateMutexSem
make: *** [Makefile:10: Mandel.exe] Error 1


Regards
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Dave Yeo

#91
Mandel.c needs #define INCL_DOSSEMAPHORES before os2.h. Makefile needs some minor mods, -Zmts removed and -Zomf added in its place on the Mandel.exe recipe.
I will attach my work.
Note that it runs fine run from the source directory besides a warning about the lack of a map file. With the map file(s) gives a blank screen. I think as it expects only 256 colours
Edit:, yes the map files seem to be different palettes. I ran out of memory while playing with it so it may be worth adding a -Zhigh-mem where you have the -Zomf. Guess the check for map file could be removed or changed to a parameter. If I knew how, it could query the number of colours and only use the map file with 256 colours.
Edit2: With the map files, if you save the image, the gif looks correct and varies based on the map file.
Edit3: Updated source again, add stdlib.h a few places, fixed make clean, bigger stack for _beginthread.
Now get warnings like,

gcc    -c -o Mandel.o Mandel.c
Mandel.c: In function 'MandelWndProc':
Mandel.c:170:20: warning: passing argument 1 of '_beginthread' from incompatible pointer type [-Wincompatible-pointer-types]
  170 |      _beginthread (SaveThread, 0, 4096, &pfdFileDialog.szFullFile);
      |                    ^~~~~~~~~~
      |                    |
      |                    void (__attribute__((system)) *)(char *) {aka void (*)(char *)}


Mandel.h has,
void APIENTRY SaveThread (char *path);
Not sure of the fix.

Rich Walsh

#92
Quote from: Dave Yeo on October 10, 2025, 01:25:49 AM
Now get warnings like,

gcc    -c -o Mandel.o Mandel.c
Mandel.c: In function 'MandelWndProc':
Mandel.c:170:20: warning: passing argument 1 of '_beginthread' from incompatible pointer type [-Wincompatible-pointer-types]
  170 |      _beginthread (SaveThread, 0, 4096, &pfdFileDialog.szFullFile);
      |                    ^~~~~~~~~~
      |                    |
      |                    void (__attribute__((system)) *)(char *) {aka void (*)(char *)}


Not sure of the fix.

_beginthread (&SaveThread, 0, 4096, &pfdFileDialog.szFullFile);

It wants the address of SaveThread() (whence the '&'), not just a reference to it. Other/earlier compilers would do the conversion without mentioning it - gcc has gotten fussier over the years.

Edit: all wrong :(  It's complaining that the signature of SaveThread() doesn't match what it expects: a function that takes a character ptr and doesn't return a value. Take a look at SaveThread() and see if it returns a value or takes e.g., a ptr to void rather than a char ptr, then modify or cast accordingly.


Martin Iturbide

#93
Thanks Dave.  It compiles here with the warnings.

I put your changes here:
https://github.com/OS2World/APP-GRAPHICS-Mandelbrot

I just made some little silly text changes to show the bldlevel info and updated the "about" text.

Regards
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Martin Iturbide

Hello

I'm trying some old MD+F Blitter demo.

- https://web.archive.org/web/20060505034436/http://www.modulardreams.com/downloads/os2blit.zip
- https://web.archive.org/web/20060505034436/http://www.modulardreams.com/downloads/os2va.zip

But when I run it, I get a rapid quit and got this POPUPLOG.


11-30-2025  20:41:20  SYS3175  PID 00db  TID 0001  Slot 0086
C:\HOME\DOWNLOADS\OS2BLI15\BLITTER.EXE
c0000005
00185e04
P1=00000001  P2=0000000c  P3=XXXXXXXX  P4=XXXXXXXX 
EAX=00000000  EBX=00000000  ECX=00000000  EDX=00000000
ESI=00000000  EDI=00000000 
DS=0053  DSACC=d0f3  DSLIM=9fffffff 
ES=0053  ESACC=d0f3  ESLIM=9fffffff 
FS=150b  FSACC=00f3  FSLIM=00000030
GS=0000  GSACC=****  GSLIM=********
CS:EIP=005b:00185e04  CSACC=d0df  CSLIM=9fffffff
SS:ESP=0053:003d0c8c  SSACC=d0f3  SSLIM=9fffffff
EBP=00000000  FLG=00010202

BLITTER.EXE 0001:00175e04


Download Reference:
-- https://web.archive.org/web/20060505034436/http://www.modulardreams.com/old_download.html

Any ideas are welcome.

Regards
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Martin Iturbide

Hello

I found this driver (attached) and source code: https://github.com/OS2World/DRV-COM2COM

The readme is blank, any idea what COM2COM.SYS (2003-11-08) does?
I'm guessing it is some virtual COM driver for OS/2, but I'm not sure. Or it is just a Dev sample?

Regards
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Martin Iturbide

Hello

I'm also trying Lemon.
- https://hobbesarchive.com/Home/Download?path=/Hobbes/pub/os2/apps/mmedia/sound/LEMON.zip

I run it and I point it to the TIFF file that comes with it. But it exists and show this popuplog.


12-18-2025  15:41:08  SYS3175  PID 0064  TID 0004  Slot 009a
C:\HOME\MARTIN\DOWNLOADS\LEMON\LEMON\LEMON.EXE
c0000005
00082934
P1=00000002  P2=00000028  P3=XXXXXXXX  P4=XXXXXXXX 
EAX=00000004  EBX=00cf1ee0  ECX=00000008  EDX=00cf1ee0
ESI=000b5598  EDI=000b5734 
DS=0053  DSACC=d0f3  DSLIM=9fffffff 
ES=0053  ESACC=d0f3  ESLIM=9fffffff 
FS=150b  FSACC=00f3  FSLIM=00000030
GS=0000  GSACC=****  GSLIM=********
CS:EIP=005b:00082934  CSACC=d0df  CSLIM=9fffffff
SS:ESP=0053:00cf1ed4  SSACC=d0f3  SSLIM=9fffffff
EBP=00cf1fe8  FLG=00010246

LEMON.EXE 0002:00062934


Regards
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Dave Yeo

Seems to run here. Loads Moz.tif (Sonata in C Major by Bach) and seems to process it though the doc file it produced only had ! in it. Looks for its templates in \LEMON\TEMPLS so needs to be run in a root, H:\LEMON here. OMR.INI can be edited to find its templates in other places.
I'd assume a stack overflow for your crash. It is Alpha quality software.

Steven Levine

Hi all,

FWIW, this looks like a NULL pointer issue to me. P2 is 0x20 and ECX is 0.  I would expect a disassembly to show a

  mov eax, 20h[ecx]

or something like that at location 00082934h.  Since the code does not trap for Dave, this might be an undocumented dependency on the install location.

Dave Yeo

I did get a different crash after playing a bit more,

12-18-2025  20:48:04  SYS3175  PID 0261  TID 0001  Slot 00c7
H:\TMP\LEMON\LEMON.EXE
c0000005
0007d8f2
P1=00000001  P2=00000278  P3=XXXXXXXX  P4=XXXXXXXX
EAX=00000278  EBX=00000000  ECX=0000002e  EDX=0000002e
ESI=00792e28  EDI=00000004
DS=0053  DSACC=d0f3  DSLIM=b7ffffff
ES=0053  ESACC=d0f3  ESLIM=b7ffffff
FS=150b  FSACC=00f3  FSLIM=00000030
GS=0000  GSACC=****  GSLIM=********
CS:EIP=005b:0007d8f2  CSACC=d0df  CSLIM=b7ffffff
SS:ESP=0053:000b4fe4  SSACC=d0f3  SSLIM=b7ffffff
EBP=00090f96  FLG=00010246

LEMON.EXE 0002:0005d8f2

The doc does say,

WARNING: Lemon is the result of research undertaken at the University
of Calgary as a masters thesis.  As such, Lemon is 'alpha' software --
not really ready for public consumption.  It is provided 'as is' for
the curious.  For those interested in the research behind Lemon, see:
"Optical Music Recognition", September 1995, K. Todd Reed, The
University of Calgary.

...

Martin Iturbide

Thanks for giving it a try. I guess it is to alpha and without source code not much can be done (as far as I know).
In my case it is trapping (popuplog) even if I put it on C:\LEMON

Regards
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Martin Iturbide

Hello

Do you think there is a chance to run this poker game in ArcaOS with some trick/hack/mod?
- https://www.os2world.com/games/downloads/native/cards-dice/Poker_Solitaire_1-1.zip
It is from 1989, so it is for OS/2 1.1 or later.

This is the error on popuplog
Quote

01-16-2026  10:39:01  SYS3175  PID 00af  TID 0001  Slot 009c
C:\HOME\MARTIN\DOWNLOADS\POKER_SOLITAIRE_1-1\POKER.EXE
c0000005
0001035b
P1=00000008  P2=00001b30  P3=XXXXXXXX  P4=XXXXXXXX 
EAX=00000000  EBX=1f8e0000  ECX=00000005  EDX=e3980000
ESI=00062ab0  EDI=000f2d86 
DS=001f  DSACC=00f3  DSLIM=0000609f 
ES=001f  ESACC=00f3  ESLIM=0000609f 
FS=150b  FSACC=00f3  FSLIM=00000030
GS=0000  GSACC=****  GSLIM=********
CS:EIP=000f:0000035b  CSACC=00fb  CSLIM=000076df
SS:ESP=001f:000050fe  SSACC=00f3  SSLIM=0000609f
EBP=0006513c  FLG=00010246

POKER.EXE 0001:0000035b


Regards
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Steven Levine

This is stack overflow.  You might try enlarging the stack.  Since this is a 16-bit app and the stack is in the same segment as the dgroup, this might be effective.

Martin Iturbide

Thanks Steven

What should be the command to modify the stack of a 16bit app to make it run?

How much should I put on the /STACKOS2 ??
-- exehdr /STACKOS2:0x00000 poker.exe


Regards
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Steven Levine

Turns out I misread the popuplog.  it's not a stack problem.  I cranked up the debugger to see what the code was really doing that triggered the trap.  The trap is at

035B                 les     di, pntr_2FC8   ; MartinI trap here

so it's a pointer problem.  The pointer is set at:

0293                 call    far ptr WinLoadPointer
0298                 mov     word ptr pntr_2FC8, ax; return pntr not handle ??
029B                 mov     word ptr pntr_2FC8+2, dx

What is odd about this is that based on the code, WinLoadPointer is returning a pointer, not a handle like current versions of WinLoadPointer.  I have to assume that this app was built to run against a really old version of PM.  Possibly for OS/2 2.1

The pointer returned by WinLoadPointer looks OK, but the selector (1b30) is a ring0 selector which is not usable by a ring3 app.

It would be interesting to see if someone with an OS/2 2.x install can run this app.