|
|
ForumsSega Master System / Mark III / Game GearSG-1000 / SC-3000 / SF-7000 / OMV |
Home - Forums - Games - Scans - Maps - Cheats Music - Videos - Development - Translations - Homebrew |
![]() |
| Author | Message |
|---|---|
|
How to build for Linux amd64?
|
|
Hi,
I couldn't find instructions on how to build for Linux 64 bits. I'm using Debian Squeeze. Simply running 'make' doesn't work (wrong architecture): otto@debian:~/meka/srcs$ make
./buildupd.exe gcc -I. -I./tools -I./sound -Ilibs -I../include -DARCH_UNIX -DX86_ASM -DASM_SYMBOLS_REQUIRE_UNDERSCORE -DMEKA_SOUND -DMEKA_ZIP -DMEKA_PNG -DMEKA_JOY -DMEKA_Z80_DEBUGGER -Wall -march=pentium -O6 -ffast-math -fno-strength-reduce -funroll-all-loops -fomit-frame-pointer -DMARAT_Z80 -c meka.c -oobj/meka.o meka.c:1: error: CPU you selected does not support x86-64 instruction set meka.c:1: error: CPU you selected does not support x86-64 instruction set make: *** [obj/meka.o] Error 1 otto@debian:~/meka/srcs$ Can anyone help? |
|
|
|
|
|
|
|
Try to remove "-march=pentium" from the Makefile.
I don't think it has ever been tested on a 64-bit architecture so it would likely require other changes. |
|
|
|
|
|
|
|
It went further, then failed. Output: http://pastebin.ca/1933362
Some said in this thread he was sucessful on 0.70, but there aren't any comments about it: http://www.smspower.org/forums/viewtopic.php?t=11165 |
|
|
|
|
|
|
| Well for once you don't have Allegro installed. | |
|
|
|
|
|
|
Right.
Now complaining about audio.h. The sources.txt told me to replace <seal> by <audio> in sound/sound.h, but it was already audio.h. otto@debian:~/meka/srcs$ make
./buildupd.exe gcc -I. -I./tools -I./sound -Ilibs -I../include -DARCH_UNIX -DX86_ASM -DASM_SYMBOLS_REQUIRE_UNDERSCORE -DMEKA_SOUND -DMEKA_ZIP -DMEKA_PNG -DMEKA_JOY -DMEKA_Z80_DEBUGGER -Wall -O6 -ffast-math -fno-strength-reduce -funroll-all-loops -fomit-frame-pointer -DMARAT_Z80 -c meka.c -oobj/meka.o In file included from shared.h:95, from meka.c:11: ./sound/sound.h:18:57: error: audio.h: No such file or directory In file included from shared.h:95, from meka.c:11: ./sound/sound.h:65: error: expected specifier-qualifier-list before ‘HAC’ In file included from ./sound/sound.h:177, from shared.h:95, from meka.c:11: ./sound/sasound.h:68: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘saInitSoundCard’ make: *** [obj/meka.o] Error 1 otto@debian:~/meka/srcs$ |
|
|
|
|
|
|
|
Have you installed SEAL ?
Double-check whats the filename is your distribution. |
|
|
|
|
|
|
| Now I do. It didn't help, though. | |
|
|
|
|
jamf
|
|
|
Hi
I can compile Meka under Debian amd64, but can't link it because of 32bits asm. To compile you need to install libseal-dev and libxxf86dga-dev if you don't have it. Also you need to modify sound/sound.h changing: #include "audio.h" // Official SEAL distribute name //#include "seal.h" // Debian package header file was renamed to seal.h by //#include "audio.h" // Official SEAL distribute name #include "seal.h" // Debian package header file was renamed to seal.h Once this is done, you can compile, but the proccess stops at link time. |
|
|
jamf
|
|
| Sorry, I forgot to mention that also you need to modify the Makefile deleting the ocurrences of "-march=pentium" | |
|
jamf
|
|
|
Hi again.
Ok, now I have Meka build under Debian amd64, this is how I did it: - First you need to install this packages if you don't have it: liballegro4.2-dev libseal-dev libxxf86dga-dev - Modify sound/sound.h changing: #else // Uncomment the appropriate: #include "audio.h" // Official SEAL distribute name //#include "seal.h" // Debian package header file was renamed to seal.h // FIXME: Need to automate this of use some Makefile trickery to detect. #endif by #else // Uncomment the appropriate: //#include "audio.h" // Official SEAL distribute name #include "seal.h" // Debian package header file was renamed to seal.h // FIXME: Need to automate this of use some Makefile trickery to detect. #endif - Modify Makefile: * Change where it says: #---[ UNIX/GCC ]--------------------------------------- ifeq ($(SYSTEM), unix) This line: DEF_OS = -DARCH_UNIX -DX86_ASM -DASM_SYMBOLS_REQUIRE_UNDERSCORE By this one: DEF_OS = -DARCH_UNIX -DX86_64 -DASM_SYMBOLS_REQUIRE_UNDERSCORE * Change: En CFLAGS += -Wall -march=pentium -O6 -ffast-math -fno-strength-reduce -funroll-all-loops -fomit-frame-pointer by CFLAGS += -Wall -march=x86-64 -O6 -ffast-math -fno-strength-reduce -funroll-all-loops -fomit-frame-pointer * Change: OTYPE = elf by OTYPE = elf64 * And finally change: En OBJ_BLIT = $(OD)/blit.o $(OD)/blitintf.o $(OD)/eagle.o $(OD)/hq2x.o $(OD)/hq2x16.o $(OD)/hq2x32.o By OBJ_BLIT = $(OD)/blit.o $(OD)/blitintf.o $(OD)/eagle.o $(OD)/hq2x.o This last change removes the hq2x16 and hq2x32 support. This is because hq2x16.asm and hq2x32.asm does not compile under 64bits, so we need to make one more change: * In file srcs/blit.c, change: Cambios en blit.c void Blit_Fullscreen_HQ2X (void) { // Perform HQ2X into double buffer // FIXME-OPT: Apply on full width. hq2x_16( (unsigned char *)((u16 *)screenbuffer->line[blit_cfg.src_sy] + 0), (unsigned char *)((u16 *)Blit_Buffer_Double->line[blit_cfg.src_sy * 2] + 0), MAX_RES_X+32, cur_drv->y_res, (MAX_RES_X+32)*4); Blit_Fullscreen_Misc(); Blit_Fullscreen_CopyStretch(Blit_Buffer_Double, 2, 2); } por void Blit_Fullscreen_HQ2X (void) { Blit_Fullscreen_Eagle(); } This will make the HQ2X blit work as if it were Eagle. I hope this can help. |
|
|
|
|
Thanks for the info.
Does it works well? (under a 64-bits architecture, I mean) |
|
|
|
|
|
jamf
|
|
Hi Bock.
ok, with sound (Linux Voxware) it is so slow that is impossible to test nothing. With no sound It works really fine, but some systems do not work. I have tested ColecoVision, SG1000, Master System and Game Gear, the first two works really fine except for the lack of sound. Master and GameGear do not work, I get only color screens and meka writes to console in a bucle:
If you give me an e-mail, I will send you some screenshots. Greetings jamf gelide.sf.net |
|
|
|
|
Hi, thanks for answering.
Since it's not really working well for now and the installing process isn't that simple (some of those packages aren't in the official repos), I'll wait a bit more to test again. |
|
|
|
|
|
|
| The Decode_Tile_C function has to be created based on the X86 assembly version. It is a pretty trivial function to implement. You can give it a look or I will someday. | |
|
|
|
|
jamf
|
|
|
I installed those packages from the official Debian repos.
Sorry, I can help with asm, long timesince the last time I programmed in assembly. Anyway if I have time, I will give it a try. Greetings jamf gelide.sf.net |
|
|
|
| libseal-dev isn't.At least not for squeeze. | |
|
|
|
|
jamf
|
|
You are right, It is in lenny: packages.debian.org/lenny/libseal-dev Greetings jamf |
|
|
|
|
How about making another Meka release once all the Linux compilation issues have bee fixed?
Philipp |
|
|
|
|
|
|
| I am taking patches if any (but wouldn't be able to test them for Linux). | |
|
|
![]() |