Forums

Sega Master System / Mark III / Game Gear
SG-1000 / SC-3000 / SF-7000 / OMV
Home - Forums - Games - Scans - Maps - Cheats - Credits
Music - Videos - Development - Hacks - Translations - Homebrew

View topic - compiling MEKA on VC++ 2008 express

Reply to topic
Author Message
  • Joined: 03 Jan 2009
  • Posts: 9
Reply with quote
compiling MEKA on VC++ 2008 express
Post Posted: Sat Jan 03, 2009 8:16 pm
Hi all

I've been trying to compile Meka on Visual C++ 2008 Express with no success. I've fixed some project configurations to match my own setup and it compiles just fine till the resource part. The compile simply cannot find the afxres.h file! I thought Meka did not depend on MFC stuff but i think i'm guessing wrong. I'm not sure if this file should be included in the source pack or if it should be generated locally and how to do this.

I think that this is some MFC related issue but i cannot find the solution. Also i've noticed that in the project configuration, Meka does not seem to depend on MFC since it is configured as "Using standard windows libs" and "Not using ATL".

If people gets interested, i can send the project files and changes i've made to source files in order to get it working in VC 2008 express.
  View user's profile Send private message
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8644
  • Location: Paris, France
Reply with quote
Post Posted: Mon Jan 05, 2009 4:53 am
Hello,

Please post them here! (as attachments).
When I have time I will try this myself. I have installed VC++2008 at work now.
  View user's profile Send private message Visit poster's website
  • Joined: 03 Jan 2009
  • Posts: 9
Reply with quote
meka/vcpp2008
Post Posted: Tue Jan 06, 2009 12:58 am
Bock wrote
Hello,

Please post them here! (as attachments).
When I have time I will try this myself. I have installed VC++2008 at work now.


Of course! Sending my source pack right now. Please note i've made a few minor modifications to the source (i'm using 0.72 srcs). No big deal. Note I'm using express edition, so minor issues can come out.

1.) I built my own static zlib and included it in the source package. I also set the apropriate dirs in the linking config in the vcpp2008 express

2.) I disabled a few warnings in NASM (orphan labels complaining) and VC++ (deprecated functions not ISO C++ complains and unsafe CRT). I think this is not big deal for meka and also fixing this should be straightforward. Also i hardcoded the NASM path in the custom rules for building the asm modules because i was incapable of making NASM a Visual C++ friend (still working on this)

3.) I've fixed the afxres.h stuff I posted in the previous message. Just copied the afxres.h (which is just a bunch of defines anyway) file from the reactos project and it worked fine. Not sure if it is the same distributed in MS version.

4.) I've changed the interface (just added one more function prototype in tools_t.h) in the build_date_update tool to eliminate the crappy #include "tool_t.c" in the buildupd.c (hope this does not break anything).

These are the changes i made hoping for the best. I started the applet which shows the ROM information as asked in the TODO but i still can't compile meka successfully. Now i'm having allegro issues. I downloaded allegro 4.2.2 binaries and tried linking to them with no success. I'm also having problems with ddraw.lib (which version should i use?). VC++ shows several not found symbols. I though that if i used statically linked allegro i should not have those problems.
meka-src.zip (1.62 MB)

  View user's profile Send private message
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8644
  • Location: Paris, France
Reply with quote
Post Posted: Tue Jan 06, 2009 4:08 am
I recall various problems with the MsVc project that I tweaked recently but haven't commited. Anyway maybe I'll just switch to 2008.
I used DirectX 7 as far as I remember.. not entirely sure. Can you paste your errors?
I have no computer at home (should get one fairly shortly) so right now it is a little tricky to do any work.
  View user's profile Send private message Visit poster's website
  • Joined: 03 Jan 2009
  • Posts: 9
Reply with quote
meka/vs2008 express
Post Posted: Tue Jan 06, 2009 10:00 am
Bock wrote
I recall various problems with the MsVc project that I tweaked recently but haven't commited. Anyway maybe I'll just switch to 2008.
I used DirectX 7 as far as I remember.. not entirely sure. Can you paste your errors?
I have no computer at home (should get one fairly shortly) so right now it is a little tricky to do any work.


Alright!

Do you think it is possible to compile with Visual C++ 2008 Express? I guess this is a nice thing to be done because people can get it for free. Not depending on professional and team editions should get more people working in meka. I'm also interested in which version of allegro you used. Did you compile it yourself? Got some binary package? Can you send the libs you used for building meka? In order to test and incorporate the applet i'm working on I should be able to compile meka.

Is it possible that i'm not using the correct DirectX lib and so getting those errors? Are not those things retro-compatible?

I'm sending the buildlog.htm file i got from VS. Should be useful for helping me to get meka to compile correctly.
BuildLog.zip (5.27 KB)

  View user's profile Send private message
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8644
  • Location: Paris, France
Reply with quote
Post Posted: Tue Jan 06, 2009 10:27 am
The instructions to compile Allegro should be complete in Sources.txt
I'm not sure where those old functions went, maybe they were deprecated in 2008 or went in some librairies. Probably renamed and can be enable thru a preprocessor definition, which mean that you have to recompile Allegro yourself.

I'll work on switching to 2008, yes.
  View user's profile Send private message Visit poster's website
  • Joined: 03 Jan 2009
  • Posts: 9
Reply with quote
Post Posted: Thu Feb 12, 2009 10:26 pm
Bock wrote
The instructions to compile Allegro should be complete in Sources.txt
I'm not sure where those old functions went, maybe they were deprecated in 2008 or went in some librairies. Probably renamed and can be enable thru a preprocessor definition, which mean that you have to recompile Allegro yourself.

I'll work on switching to 2008, yes.


First, sorry for the recent disapear. I didn't quit on Meka development, just a huge change in work/college. Now that everything got right, I get back to meka dev.


That said, i noticed that i used wrong allegro precompiled binaries. I got the rigth one now but still can't compile it. It's only one damn function which the linker cannot find anywhere. Again, directx issues.

This is a new buildlog i got from my last tries.
BuildLog.zip (2.32 KB)

  View user's profile Send private message
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8644
  • Location: Paris, France
Reply with quote
Post Posted: Fri Feb 13, 2009 3:36 am
Check what name for dinput the linker command-line is trying to link with, which version you have and if their API matches. I'm not so familiar with DirectX myself.
  View user's profile Send private message Visit poster's website
  • Joined: 03 Mar 2008
  • Posts: 25
Reply with quote
Post Posted: Sat Feb 14, 2009 2:24 pm
You need to link it against dinput.lib
  View user's profile Send private message
  • Joined: 03 Jan 2009
  • Posts: 9
Reply with quote
finally: meka compiles on vc2008 express
Post Posted: Mon Apr 06, 2009 10:51 pm
Hi all!

Today I finally managed to get meka compiled on VC++ 2008 Express. I had a lot of trouble getting this to compile but it worked.

The thing was that I had a static linked allegro to link with meka. Well a "little" static because it still needed to link with some directx library (not sure if are the import libraries or the *real* static ones). After realizing this I got the lastest DirectX SDK and tried to compile meka linking with it. Did not work. It constantly complained about one single function DirectInputCreate. Well, I thought that it was in DirectX, for god's sake. It was, but Microsoft seems to like breaking interfaces and changed the prototype to DirectInput8Create in the last version. Result: no linking at all. What solved my problem was some minimal directx (dx70_min.zip) package found on http://alleg.sourceforge.net/wip.html. Linked perfectly.

Having said that, the MSVC project files are quite a mess. I will try to get things right and post the project files. I did not tested with the last WIP, but with 0.72 stable source. This should not be a problem and I can set project files for WIP too after i clean some stuff here.
  View user's profile Send private message
  • Joined: 03 Jan 2009
  • Posts: 9
Reply with quote
adapting project files to v0.73
Post Posted: Tue Sep 14, 2010 4:56 pm
Hi all.

I recently found that I have some Meka sources in my desktop. I have successfully compiled it with the Visual C++ 2008 Express. This has the BIG advantage of being free to download.

What is the compiler used to build Meka v0.73? Is anyone interested that I adapt the project files I currently have in my desktop with the lastest sources and release those?
  View user's profile Send private message
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8644
  • Location: Paris, France
Reply with quote
Post Posted: Wed Mar 09, 2011 7:36 am
I tried to compile MEKA today on my fresh Windows 7 install with VC++ 2008 express and went through fixing everything. It is now committed on SVN.

Unfortunately I had forgotten about this thread when I did it, so I had to redo some of the thing you mentioned above. :)

It is using Allegro 4.2.3 (you can use the pre-compiled 'allegro-msvc9-4.2.3' package).

Now that Allegro 5.0 is released I intend to port MEKA to Allegro 5, and eventually scrap SEAL and use the Allegro sound API instead.
  View user's profile Send private message Visit poster's website
  • Joined: 03 Jan 2009
  • Posts: 9
Reply with quote
meka on VC++ 2008
Post Posted: Wed Mar 09, 2011 11:53 am
Nice to hear that. I already checked out the lastest meka from SVN.

Some things I would like to ask:

1.) Why does meka still need some directx stuff (static libs)? Isn't Allegro supposed to eliminate this need? Or is it some legacy code which is just there? Do you mind if I try to remove/replace/rewrite these parts and remove the Directx?

2.) Is there plans for a full Linux support? The only REAL obstacle I see is exactly the audio stuff, which if Allegro could provide (and eliminate SEAL) can lead to a real Linux port. Is there any other obstacle I'm not aware of? Do you mind if I help porting to Allegro 5?

Bock wrote
I tried to compile MEKA today on my fresh Windows 7 install with VC++ 2008 express and went through fixing everything. It is now committed on SVN.

Unfortunately I had forgotten about this thread when I did it, so I had to redo some of the thing you mentioned above. :)

It is using Allegro 4.2.3 (you can use the pre-compiled 'allegro-msvc9-4.2.3' package).

Now that Allegro 5.0 is released I intend to port MEKA to Allegro 5, and eventually scrap SEAL and use the Allegro sound API instead.
  View user's profile Send private message
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8644
  • Location: Paris, France
Reply with quote
Post Posted: Wed Mar 09, 2011 1:47 pm
1) Allegro use DirectX as a backend so this is normal behavior.

2) There is no "plan" for a full Linux support given that I am not working on it.
Getting rid of SEAL is top priority for both Windows and Linux version.
And any help porting to Allegro 5 would be super welcome. :)
  View user's profile Send private message Visit poster's website
  • Joined: 03 Jan 2009
  • Posts: 9
Reply with quote
Meka to Allegro5
Post Posted: Wed Mar 09, 2011 2:53 pm
Bock wrote
1) Allegro use DirectX as a backend so this is normal behavior.

2) There is no "plan" for a full Linux support given that I am not working on it.
Getting rid of SEAL is top priority for both Windows and Linux version.
And any help porting to Allegro 5 would be super welcome. :)


Well, but isn't a fully static allegro built just to get rid of linking other stuff?

Actually I'm now cleaning some things in the build_date_update tool. But I will try to start the port to Allegro5 tonight, after I get back from work.

I noticed that you have written a bunch of code to get compilation date/time. Do you mind if I use a compiler macro like __DATE__ and __TIME__ (which seems to work in VC as well as GCC) and let the compiler resolve this? This could lead to getting rid of build_date_update.
  View user's profile Send private message
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8644
  • Location: Paris, France
Reply with quote
Post Posted: Wed Mar 09, 2011 3:00 pm
> Well, but isn't a fully static allegro built just to get rid of linking other stuff?
Static allegro is to use the static version of the standard library and depend on less DLL.

The reason for build_date_update is that I wanted the very last date, whereas __DATE__/__TIME__ require the specific file to be compiled.

But, this is an artifact of the old MS-DOS day were compiling the full program was very slow. Maybe slow it doesn't matter because if we want to release a build we can do a clean build anyway.

So you can make that change and remove the hack.
Maybe make sure that __DATE__/__TIME__ result is parsed or displayed in a way that is correct for the user, similarly to the output of build_date_update.

Please feel free to send patches and will try to apply them fast. If this gets up to speed I can probably give you SVN write access later.

Thanks a bunch!
  View user's profile Send private message Visit poster's website
  • Joined: 03 Jan 2009
  • Posts: 9
Reply with quote
macros for DATE and TIME
Post Posted: Wed Mar 09, 2011 3:56 pm
Thank you.

I will remove the hack, do some testing and send them to you as a patch. If needed I will write a parser to set the strings in the appropriate format.

Just for the record: VC2008 defines these macros according to the oficial documentation: link

But these macros seems to be part of C99, which means they will work in GCC/Linux as well.
  View user's profile Send private message
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8644
  • Location: Paris, France
Reply with quote
Post Posted: Wed Apr 06, 2011 8:40 am
Daniel if you have any patch please post them here.
Today I will have a look at Allegro 5.
  View user's profile Send private message Visit poster's website
  • Joined: 22 Jul 2012
  • Posts: 51
  • Location: The Netherlands
Reply with quote
Post Posted: Sat Aug 18, 2012 1:38 pm
Would it be a lot of work to remove the allegro 4to5 file?

Visual studio 2012 gives me a hard time compiling meka since it cannot link this 4to5 file correctly. (Maybe it's just me doing something wrong there though)
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8644
  • Location: Paris, France
Reply with quote
Post Posted: Sat Aug 18, 2012 2:04 pm
What's the problem with it ?
  View user's profile Send private message Visit poster's website
  • Joined: 22 Jul 2012
  • Posts: 51
  • Location: The Netherlands
Reply with quote
Post Posted: Mon Aug 20, 2012 6:34 pm
It seems the current allegro binaries are not compatible with vs2012 yet.
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8644
  • Location: Paris, France
Reply with quote
Post Posted: Mon Aug 20, 2012 6:45 pm
What is the actual problem, compilation or link error? Why did you refer to the alleg4to5 file? It's only a set of simple helpers.
  View user's profile Send private message Visit poster's website
  • Joined: 22 Jul 2012
  • Posts: 51
  • Location: The Netherlands
Reply with quote
Post Posted: Mon Aug 20, 2012 6:51 pm
Error 8 error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MDd_DynamicDebug' in db.obj D:\Downloads\meka\meka\srcs\smsid\libcpmtd.lib(xlock.obj) smsid
Error 9 error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MDd_DynamicDebug' in db.obj D:\Downloads\meka\meka\srcs\smsid\libcpmtd.lib(newaop.obj) smsid
Error 10 error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MDd_DynamicDebug' in db.obj D:\Downloads\meka\meka\srcs\smsid\libcpmtd.lib(stdthrow.obj) smsid
Error 11 error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MDd_DynamicDebug' in db.obj D:\Downloads\meka\meka\srcs\smsid\libcpmtd.lib(xthrow.obj) smsid
Error 12 error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MDd_DynamicDebug' in db.obj D:\Downloads\meka\meka\srcs\smsid\libcpmtd.lib(syserror.obj) smsid


I tried googling this error but that's no help
  View user's profile Send private message Visit poster's website
  • Joined: 22 Jul 2012
  • Posts: 51
  • Location: The Netherlands
Reply with quote
Post Posted: Mon Aug 20, 2012 6:53 pm
And these:
Error 19 error LNK2038: mismatch detected for '_MSC_VER': value '1600' doesn't match value '1700' in allegro4to5.obj D:\Downloads\meka\meka\srcs\MsVc\allegro-5.0.7-static-md-debug.lib(d3d_disp.obj) Meka
Error 20 error LNK2038: mismatch detected for '_MSC_VER': value '1600' doesn't match value '1700' in allegro4to5.obj D:\Downloads\meka\meka\srcs\MsVc\allegro-5.0.7-static-md-debug.lib(d3d_bmp.obj) Meka
Error 21 error LNK2038: mismatch detected for '_MSC_VER': value '1600' doesn't match value '1700' in allegro4to5.obj D:\Downloads\meka\meka\srcs\MsVc\allegro_image-5.0.7-static-md-debug.lib(gdiplus.obj) Meka
Error 22 error LNK2038: mismatch detected for '_MSC_VER': value '1600' doesn't match value '1700' in allegro4to5.obj D:\Downloads\meka\meka\srcs\MsVc\allegro_audio-5.0.7-static-md-debug.lib(dsound.obj) Meka
Error 23 error CVT1100: duplicate resource. type:MANIFEST, name:1, language:0x0409 D:\Downloads\meka\meka\srcs\MsVc\CVTRES Meka
Error 24 error LNK1123: failure during conversion to COFF: file invalid or corrupt D:\Downloads\meka\meka\srcs\MsVc\LINK Meka
  View user's profile Send private message Visit poster's website
  • Joined: 03 Dec 2016
  • Posts: 1
  • Location: londan
Reply with quote
Post Posted: Sat Dec 03, 2016 11:27 am
hello

Could the sound problems in MekaW be related to buffers?? I have just found that using my on-board sound card as opposed to my PCI sound card the sound seemed to be less choppy.

Also does the DirectX version you are running have anything to do with it?

It seems weird that some days the sound is good yet others its crappy so it leaves me to believe that maybe certain hardware combinations could cause problems??

I know its only phesable ideas and I know I may be completely wrong but its worth a try

Thanks

regards
Arran Brown
  View user's profile Send private message Visit poster's website
Reply to topic



Back to the top of this page

Back to SMS Power!