OS2 World Community Forum
OS/2, eCS & ArcaOS - Technical => Programming => Topic started by: Mentore on April 24, 2016, 05:32:54 pm
-
Hello all.
Time allowing, I'm trying to compile / recompile some old discotinued projects.
I recently came across some old MAME sources (until 0.60 I think), and thought it would be an interesting experiment to see if the old MAME 0.37 b14 from Marty Amodeo would work with those more updated sources. I thought, "Well, if that would allow emulating even a single game more, or make the old ones work better, it would be worth the work" and then I started diff-ing the newer sources with the old ones.
You wouldn't believe it but it compiles 8)
Just, it does not link completely... Upon linking it prints these linker errors:
obj/mame/os2/os2.o: Undefined symbol _ss_deregister_all_funcs referenced from text segment
obj/mame/os2/os2.o: Undefined symbol _WindowProc referenced from data segment
obj/mame/os2/dart.o: Undefined symbol mciSendCommand referenced from text segment
obj/mame/os2/dart.o: Undefined symbol mciSendCommand referenced from text segment
obj/mame/os2/dart.o: Undefined symbol mciSendCommand referenced from text segment
obj/mame/os2/dart.o: Undefined symbol mciSendCommand referenced from text segment
obj/mame/os2/dart.o: Undefined symbol mciSendCommand referenced from text segment
obj/mame/os2/dart.o: Undefined symbol mciSendCommand referenced from text segment
Attached is the os2.mak makefile I'm using. It's identical to the old one present in the 0.37 b14 release, I just changed the -Zmt option with -Zexe to make it link with the new gcc from Paul Smedley (trying gcc 5.10 right now). Also the original makefile was not modified.
The obj files are present and I have downloaded, installed and configured the Warp 4.52 toolkit, so from now on it seems I'm stuck here.
BTW: I of course know there's SDLMAME from the great KO Myung Hun and appreciate it really much - also, I know that I cannot port the latest MAME, which architecture has greatly changed. But I love the old MAME GUI and am accustomed to it. Plus, alas, SDLMAME crashes from time to time...
Hope to hear some news from you.
TIA
Mentore
-
Can you also post src\rules.mak and src\os2\os2.mak (not totally sure of the name of the last) and also the defines right before #include <os2.h> and there should also be a #include <mcios2.h> or similar, post the defines right before them as well.
BTW, the -Zmt is harmless and does nothing on kLIBC and you shouldn't need -Zexe when using -Zomf or targeting a executable with a .exe suffix
-
Can you also post src\rules.mak and src\os2\os2.mak (not totally sure of the name of the last) and also the defines right before #include <os2.h> and there should also be a #include <mcios2.h> or similar, post the defines right before them as well.
BTW, the -Zmt is harmless and does nothing on kLIBC and you shouldn't need -Zexe when using -Zomf or targeting a executable with a .exe suffix
Weird, I was sure I already attached os2.mak. Oh well, doing this right now together with the other files.
By the way I must admit my memory works bad sometimes. It should have been -Zomf and not -Zexe.
Files attached. Here follows the lines you asked for:
These are defined into os2.c:
#define INCL_DOSPROCESS
#define INCL_DOSSEMAPHORES
#define INCL_DOSDEVICES
#define INCL_DOSDEVIOCTL
#define INCL_WININPUT
#define INCL_DOSMISC
First lines of dart.h:
#include <stdio.h>
#include <string.h>
#include <malloc.h>
#include <stdlib.h>
#include <process.h>
#define INCL_DOS
#define INCL_DOSERRORS
#include <os2.h>
From dart.c / dart.h seems that every reference from mcios2.h is missing... I'll try again later.
Thanks!
-
Try changing all the defines before os2.h to
#define INCL_BASE
#define INCL_PM
Might have to double check the toolkit documentation on DART to see if mcios2.h is needed.
-
For dart.c try.
#define INCL_BASE
#define INCL_PM
#include <os2.h>
#include <mmioos2.h>
#include <mcios2.h>
And in your build environment (I have it in config.site)
export 'CPPFLAGS=-idirafter g:/OS2TK45/h'
Adjusting the path to your toolkit as needed
-
For dart.c try.
#define INCL_BASE
#define INCL_PM
#include <os2.h>
#include <mmioos2.h>
#include <mcios2.h>
And in your build environment (I have it in config.site)
export 'CPPFLAGS=-idirafter g:/OS2TK45/h'
Adjusting the path to your toolkit as needed
Tried the suggested modifications, I had to edit xtramm.h file to take into account the additions.
Didn't add the CPPFLAGS directive - didn't find a config.site. But still this should have to do only with compiling... Recompiled all with GCC 4.92, still the same linker problems.
This needs a little more investigation, I think.
If I solve this, I'll do a little tests and then it will be time for MAME 0.53 and on until MAME 0.59 - which is the latest before the big emulator source change.
Mentore
Mentore