Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Can I compile Mame 106 for x64?  (Read 3229 times)

0 Members and 1 Guest are viewing this topic.

ID4

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 95
  • Last login:January 29, 2025, 02:55:51 pm
    • ID4 Retrodev
Can I compile Mame 106 for x64?
« on: November 06, 2013, 02:06:02 pm »
Hi!

I´m trying to compile Mame Source 106 for x64 architecture, I´m using the same dev tools that used for ArcadeMAME 106 (http://www.mamedev.org/tools/previous-20070810.html)

When I remove try to compile with mingw-make32.exe using "PTR64=1" in the makefile, I get this error:

Quote
Compiling src/windows/winddraw.c...
Compiling src/windows/winmain.c...
src/windows/winmain.c: In function `exception_filter':
src/windows/winmain.c:431: error: structure has no member named `Rax'
src/windows/winmain.c:432: error: structure has no member named `Rbx'
src/windows/winmain.c:433: error: structure has no member named `Rcx'
src/windows/winmain.c:434: error: structure has no member named `Rdx'
src/windows/winmain.c:436: error: structure has no member named `Rsi'
src/windows/winmain.c:437: error: structure has no member named `Rdi'
src/windows/winmain.c:438: error: structure has no member named `Rbp'
src/windows/winmain.c:439: error: structure has no member named `Rsp'
src/windows/winmain.c:441: error: structure has no member named `R8'
src/windows/winmain.c:442: error: structure has no member named `R9'
src/windows/winmain.c:443: error: structure has no member named `R10'
src/windows/winmain.c:444: error: structure has no member named `R11'
src/windows/winmain.c:446: error: structure has no member named `R12'
src/windows/winmain.c:447: error: structure has no member named `R13'
src/windows/winmain.c:448: error: structure has no member named `R14'
src/windows/winmain.c:449: error: structure has no member named `R15'
src/windows/winmain.c:403: warning: unused variable `code_start'
src/windows/winmain.c:403: warning: unused variable `code_size'
mingw32-make.exe: *** [obj/mamepp/windows/winmain.o] Error 1

Any help plese? :embarassed:
« Last Edit: November 06, 2013, 02:09:38 pm by ID4 »

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Re: Can I compile Mame 106 for x64?
« Reply #1 on: November 08, 2013, 06:14:44 am »
Can you compile vanilla MAME x64?

ID4

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 95
  • Last login:January 29, 2025, 02:55:51 pm
    • ID4 Retrodev
Re: Can I compile Mame 106 for x64?
« Reply #2 on: November 08, 2013, 01:30:08 pm »
Vanilla Mame x64? What is this?

Using mi standar mingw compiler that I used to compile ArcadeMAME106 32 bits, but using PTR64=1 in the makefile, after a while, get this:

Quote
Compiling src/windows/winddraw.c...
Compiling src/windows/winmain.c...
src/windows/winmain.c: In function `exception_filter':
src/windows/winmain.c:431: error: structure has no member named `Rax'
src/windows/winmain.c:432: error: structure has no member named `Rbx'
src/windows/winmain.c:433: error: structure has no member named `Rcx'
src/windows/winmain.c:434: error: structure has no member named `Rdx'
src/windows/winmain.c:436: error: structure has no member named `Rsi'
src/windows/winmain.c:437: error: structure has no member named `Rdi'
src/windows/winmain.c:438: error: structure has no member named `Rbp'
src/windows/winmain.c:439: error: structure has no member named `Rsp'
src/windows/winmain.c:441: error: structure has no member named `R8'
src/windows/winmain.c:442: error: structure has no member named `R9'
src/windows/winmain.c:443: error: structure has no member named `R10'
src/windows/winmain.c:444: error: structure has no member named `R11'
src/windows/winmain.c:446: error: structure has no member named `R12'
src/windows/winmain.c:447: error: structure has no member named `R13'
src/windows/winmain.c:448: error: structure has no member named `R14'
src/windows/winmain.c:449: error: structure has no member named `R15'
src/windows/winmain.c:403: warning: unused variable `code_start'
src/windows/winmain.c:403: warning: unused variable `code_size'
mingw32-make.exe: *** [obj/mamepp/windows/winmain.o] Error 1

So I installed Mame Compiler 64 1.17 and try for 64 bits, get this:

Quote
Compiling Mame64...
Using Parameters  MSVC_BUILD=1 PTR64=1
mkdir.exe obj
mkdir.exe obj/mame
mkdir.exe obj/mame/cpu
mkdir.exe obj/mame/cpu/adsp2100
mkdir.exe obj/mame/cpu/alph8201
mkdir.exe obj/mame/cpu/arm
mkdir.exe obj/mame/cpu/arm7
mkdir.exe obj/mame/cpu/asap
mkdir.exe obj/mame/cpu/ccpu
mkdir.exe obj/mame/cpu/dsp32
mkdir.exe obj/mame/cpu/dsp56k
mkdir.exe obj/mame/cpu/e132xs
mkdir.exe obj/mame/cpu/g65816
mkdir.exe obj/mame/cpu/h6280
mkdir.exe obj/mame/cpu/h83002
mkdir.exe obj/mame/cpu/hd6309
mkdir.exe obj/mame/cpu/i386
mkdir.exe obj/mame/cpu/i8039
mkdir.exe obj/mame/cpu/i8051
mkdir.exe obj/mame/cpu/i8085
mkdir.exe obj/mame/cpu/i86
mkdir.exe obj/mame/cpu/i8x41
mkdir.exe obj/mame/cpu/i960
mkdir.exe obj/mame/cpu/jaguar
mkdir.exe obj/mame/cpu/konami
mkdir.exe obj/mame/cpu/m37710
mkdir.exe obj/mame/cpu/m6502
mkdir.exe obj/mame/cpu/m6800
mkdir.exe obj/mame/cpu/m68000
mkdir.exe obj/mame/cpu/m6805
mkdir.exe obj/mame/cpu/m6809
mkdir.exe obj/mame/cpu/mc68hc11
mkdir.exe obj/mame/cpu/mips
mkdir.exe obj/mame/cpu/nec
mkdir.exe obj/mame/cpu/pic16c5x
mkdir.exe obj/mame/cpu/powerpc
mkdir.exe obj/mame/cpu/r3000
mkdir.exe obj/mame/cpu/rsp
mkdir.exe obj/mame/cpu/s2650
mkdir.exe obj/mame/cpu/se3208
mkdir.exe obj/mame/cpu/sh2
mkdir.exe obj/mame/cpu/sharc
mkdir.exe obj/mame/cpu/spc700
mkdir.exe obj/mame/cpu/t11
mkdir.exe obj/mame/cpu/tms32010
mkdir.exe obj/mame/cpu/tms32025
mkdir.exe obj/mame/cpu/tms32031
mkdir.exe obj/mame/cpu/tms32051
mkdir.exe obj/mame/cpu/tms34010
mkdir.exe obj/mame/cpu/tms9900
mkdir.exe obj/mame/cpu/upd7810
mkdir.exe obj/mame/cpu/v60
mkdir.exe obj/mame/cpu/v810
mkdir.exe obj/mame/cpu/z180
mkdir.exe obj/mame/cpu/z80
mkdir.exe obj/mame/cpu/z8000
mkdir.exe obj/mame/debug
mkdir.exe obj/mame/drivers
mkdir.exe obj/mame/expat
mkdir.exe obj/mame/machine
mkdir.exe obj/mame/sndhrdw
mkdir.exe obj/mame/sound
mkdir.exe obj/mame/vidhrdw
mkdir.exe obj/mame/windows
mkdir.exe obj/mame/zlib
Compiling src/artwork.c...
mingw32-make: *** [obj/mame/artwork.o] Error -101
Finished!
0 Hours 0 Minutes and 11 Seconds Elapsed.

Altrough, If I use Mame compiler 64 1.17 with the same source and compile for 32 bits, It compiles perfect.

What is the problem? :-(
« Last Edit: November 08, 2013, 01:35:08 pm by ID4 »

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Re: Can I compile Mame 106 for x64?
« Reply #3 on: November 09, 2013, 03:40:40 am »
Did you follow the instructions here?

ID4

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 95
  • Last login:January 29, 2025, 02:55:51 pm
    • ID4 Retrodev
Re: Can I compile Mame 106 for x64?
« Reply #4 on: November 09, 2013, 05:23:18 am »
Yes I read it.

As I said, I used my "standar" mingw32 for Mame 106, as described in http://www.mamedev.org/tools/previous-20070810.html. With this I get ArcadeMAME 106 for 32 Bits compiled without any problems.

Now, I used Mame Compiler 64 1.17 and GET ArcadeMAME 106 compiled for 32 Bits but need to edit the makefile and uncheck
"-Werror -Wall" and "-Wno-unused-functions"

Quote
#-------------------------------------------------
# compile and linking flags
#-------------------------------------------------

CFLAGS = -std=gnu89 -Isrc -Isrc/includes -Isrc/$(MAMEOS)

ifdef SYMBOLS
CFLAGS += -O0 -Wall -Wno-unused -g
else
CFLAGS += -DNDEBUG \
   $(ARCH) -O3 -fno-strict-aliasing \
#   -Werror -Wall \
   -Wall \
   -Wno-sign-compare \
#   -Wno-unused-functions \
   -Wpointer-arith \
   -Wbad-function-cast \
   -Wcast-align \
   -Wstrict-prototypes \
   -Wundef \
   -Wformat-security \
   -Wwrite-strings \
   -Wdeclaration-after-statement
endif

With this, Mame Compiler 64 1.17 compiles ArcadeMAME 106 perfectly without any options selected in "Compile Options".

But if try to compile it for 64 Bits "Compile options: 64 Bits processor", It fails here: :embarassed:

Quote
Compiling Mame64...
Using Parameters  MSVC_BUILD=1 PTR64=1
Compiling src/artwork.c...
mingw32-make: *** [obj/mame/artwork.o] Error -101
Finished!
0 Hours 0 Minutes and 6 Seconds Elapsed.
« Last Edit: November 09, 2013, 05:49:28 am by ID4 »

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Re: Can I compile Mame 106 for x64?
« Reply #5 on: November 09, 2013, 10:54:18 am »
"Vanilla MAME" is an unmodified version of MAME. Can you compile that for x64?

You say you followed the instructions so I can safely assume you have the same version of MinGW I linked to.

ID4

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 95
  • Last login:January 29, 2025, 02:55:51 pm
    • ID4 Retrodev
Re: Can I compile Mame 106 for x64?
« Reply #6 on: November 10, 2013, 04:54:44 am »
Hi!

I tried "vanilla" Mame 106 x64 with "64 bits processor" and "Disable Warnings as Error", result:

Quote
Compiling src/artwork.c...
mingw32-make: *** [obj/mame/artwork.o] Error -101
Finished!
0 Hours 0 Minutes and 31 Seconds Elapsed.

The same problem :(

Mame Compiler 64 MinGW:

Quote
C:\MinGW\bin>mingw32-make --version
GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for i686-pc-mingw32

My MinGW:

Quote
C:\mingw32\bin>mingw32-make --version
GNU Make 3.80
Copyright (C) 2002  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.




headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Re: Can I compile Mame 106 for x64?
« Reply #7 on: November 11, 2013, 03:33:16 am »
Sorry I only just realised you were compiling MAME 106. That's a pretty old version of MAME. Any reason why you are compiling such an old version?

On the Mame Compiler webpage did you read the part called "Older Versions of MAME"?

ID4

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 95
  • Last login:January 29, 2025, 02:55:51 pm
    • ID4 Retrodev
Re: Can I compile Mame 106 for x64?
« Reply #8 on: November 11, 2013, 05:43:31 am »
Hi!

Yeah, As I said, I´m the author of "ArcadeMAME106", I just finished the final version and compiled it perfectly as ever for 32 Bits using the tools described in mamedev "Older Versions of MAME".

The problem is that I want to compile it for x64 too before of publish ArcadeMAME106 final version.

Can you help me?  :notworthy:

Haze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1296
  • Last login:October 04, 2023, 08:30:02 am
  • I want to build my own arcade controls!
    • MAME Development Blog
Re: Can I compile Mame 106 for x64?
« Reply #9 on: November 11, 2013, 10:41:13 am »
the 64-bit option was first added as an experimental dev option around that point.. but not 'official' until around 0.120 IIRC..

it probably required a bunch of extra tricks to compile it, and likely doesn't even work once compiled for a fair chunk of drivers because a lot of code wasn't even 64-bit safe at that point.. it might even end up slower than the 32-bit binary because I think at that point there was still a fair bit of x86 assembly in certain areas of MAME that would have to be disabled in the 64-bit build because there was no x64 equivalent.

the code has improved a LOT since 0.106 in such areas... this isn't like the UME situation where it is considered 'experimental' but works 100% fine, it was a case of 'we know it's horribly broken, so broken we're not even making it an official option at this point because we don't want to deal with the reports'

« Last Edit: November 11, 2013, 10:54:40 am by Haze »

ID4

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 95
  • Last login:January 29, 2025, 02:55:51 pm
    • ID4 Retrodev
Re: Can I compile Mame 106 for x64?
« Reply #10 on: November 11, 2013, 03:41:09 pm »
Mnnn

So, say goodbye to an x64 version?  :embarassed:

Anyway Mame106 is fast, even on old machines, maybe an 64 bits version is not necesary ...

If I "touch" again the Mame sources to make an "ArcadeMAME", It be the last or a least one of the last, and will be based in GroovyMAME.

I will finish the documentation of ArcadeMAME 106 and publish it, It will take some days ...
« Last Edit: November 11, 2013, 03:45:42 pm by ID4 »