Re: [hatari-devel] Hatari Windows 2.4.1 release and PortMidi?

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Le 24/08/2022 à 16:57, Thorsten Otto a écrit :

But i just realized that hatari itself does not use any c++ code. So my

dependency seems infact to be from capsimg.dll. Strangely, the version in your

archive does not link to libstdc++, not even to msvcrt.dll, just kernel32.

As far as I know all is compiled in C mode, not C++ ; can't remember what I changed myself, see attached CapsLib.h that I patched (I think I added the "linux changes" part). In my case, there will be no "extern C", so C++ should not be used.


 >(we already have daily builts at http://antarctica.no/~hatari/latest/)

The win32 directory there however contains the libstdc++-6.dll. It also has

libncurses, while the release binary is linked against libtermcap. And the

capsimg.dll in that directory seems to be different from the release:

(release version)

I think some distrib provide ncurses or termap with similar API, so any one can be used ?


$ ldd capsimg.dll

KERNEL32.dll => C:\Windows\SysWOW64\KERNEL32.dll (0x7dd60000)

ntdll.dll => C:\Windows\SysWOW64\ntdll.dll (0x7de70000)

KERNELBASE.dll => C:\Windows\SysWOW64\KERNELBASE.dll (0x7d850000)

(version from http://antarctica.no/~hatari/latest/windows/win32/)

$ ldd capsimg.dll

libgcc_s_sjlj-1.dll = C:\msys64\mingw32\bin\libgcc_s_sjlj-1.dll

(0x6d0c0000)

KERNEL32.dll => C:\Windows\SysWOW64\KERNEL32.dll (0x7dd60000)

ntdll.dll => C:\Windows\SysWOW64\ntdll.dll (0x7de70000)

KERNELBASE.dll => C:\Windows\SysWOW64\KERNELBASE.dll (0x7d850000)

msvcrt.dll => C:\Windows\SysWOW64\msvcrt.dll (0x6ff50000)

libwinpthread-1.dll => C:\msys64\mingw32\bin\libwinpthread-1.dll

(0x64b40000)

libstdc++-6.dll => C:\msys64\mingw32\bin\libstdc++-6.dll (0x6fe40000)

libgcc_s_dw2-1.dll => C:\msys64\mingw32\bin\libgcc_s_dw2-1.dll

(0x6eb40000)

(both for the 32-bit versions, but for 64-bit it is similar)



And another thing i just noticed: without MIDI support, the Devices dialog in

the windows version looks like:

never tried portmidi ; what should it look like ?


And another thing: after unpacking the zip, i have to go to a cygwin shell and use "chmod 755 *.dll *.exe", otherwise i get a "Access denied" error. So looks like the *.dll are extracted without execute permission. Any way to avoid that? (this is maybe not hatari specific, i had that same problem already with other archives)

This might be your zip version that don't preserve file attributes ? I zip files under linux and never saw this problem.

Nicolas
#ifndef CAPSLIB_H
#define CAPSLIB_H

#undef LIB_USER
#ifdef CAPS_USER
#define LIB_USER
#endif
#include "ComLib.h"

//-- Linux changes
#ifdef __cplusplus
extern "C" {
#endif // __cplusplus
//-- Linux changes

ExtSub SDWORD __cdecl CAPSInit();
ExtSub SDWORD __cdecl CAPSExit();
ExtSub SDWORD __cdecl CAPSAddImage();
ExtSub SDWORD __cdecl CAPSRemImage(SDWORD id);
ExtSub SDWORD __cdecl CAPSLockImage(SDWORD id, PCHAR name);
ExtSub SDWORD __cdecl CAPSLockImageMemory(SDWORD id, PUBYTE buffer, UDWORD length, UDWORD flag);
ExtSub SDWORD __cdecl CAPSUnlockImage(SDWORD id);
ExtSub SDWORD __cdecl CAPSLoadImage(SDWORD id, UDWORD flag);
ExtSub SDWORD __cdecl CAPSGetImageInfo(PCAPSIMAGEINFO pi, SDWORD id);
ExtSub SDWORD __cdecl CAPSLockTrack(PVOID ptrackinfo, SDWORD id, UDWORD cylinder, UDWORD head, UDWORD flag);
ExtSub SDWORD __cdecl CAPSUnlockTrack(SDWORD id, UDWORD cylinder, UDWORD head);
ExtSub SDWORD __cdecl CAPSUnlockAllTracks(SDWORD id);
ExtSub PCHAR  __cdecl CAPSGetPlatformName(UDWORD pid);
ExtSub SDWORD __cdecl CAPSGetVersionInfo(PVOID pversioninfo, UDWORD flag);
ExtSub UDWORD __cdecl CAPSFdcGetInfo(SDWORD iid, PCAPSFDC pc, SDWORD ext);
ExtSub SDWORD __cdecl CAPSFdcInit(PCAPSFDC pc);
ExtSub void   __cdecl CAPSFdcReset(PCAPSFDC pc);
ExtSub void   __cdecl CAPSFdcEmulate(PCAPSFDC pc, UDWORD cyclecnt);
ExtSub UDWORD __cdecl CAPSFdcRead(PCAPSFDC pc, UDWORD address);
ExtSub void   __cdecl CAPSFdcWrite(PCAPSFDC pc, UDWORD address, UDWORD data);
ExtSub SDWORD __cdecl CAPSFdcInvalidateTrack(PCAPSFDC pc, SDWORD drive);
ExtSub SDWORD __cdecl CAPSFormatDataToMFM(PVOID pformattrack, UDWORD flag);
ExtSub SDWORD __cdecl CAPSGetInfo(PVOID pinfo, SDWORD id, UDWORD cylinder, UDWORD head, UDWORD inftype, UDWORD infid);
ExtSub SDWORD __cdecl CAPSSetRevolution(SDWORD id, UDWORD value);
ExtSub SDWORD __cdecl CAPSGetImageType(PCHAR name);
ExtSub SDWORD __cdecl CAPSGetImageTypeMemory(PUBYTE buffer, UDWORD length);
ExtSub SDWORD __cdecl CAPSGetDebugRequest();

//-- Linux changes
#ifdef __cplusplus
}
#endif // __cplusplus
//-- Linux changes

#endif


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/