Compiling ZSNES for OS X

Posted:
in Mac Software edited January 2014
Hi all. I've been trying to compile the SNES emulator known as ZSNES. I downloaded the Linux source code and I got the needed dependencies. Before all of you start on me that "you can't compile Linux programs on OS X" I just wanna say that I wanna give it a try. If it doesn't work.. then it doesn't work.



Okay so I get one thing it needs: nasm 0.98. I downloaded it and whenever I try and execute the GNU Make it complains that it can't find "malloc.h". I did a "locate malloc.h" and here's where it is:



/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/sys/malloc.h

/usr/include/objc/malloc.h

/usr/include/sys/malloc.h



How do I tell it where it is? I tried export path=$PATH:/<insert one of the paths> and it either says:



Bad : modifier in $ (/).



...or...



export: Command not found.



And the odd thing is that when I do a make install it seems to place it in the correct directory yet ZSNES's ./configure complains it can't find it. I just got this compiled and working on my Linux box and it works fine. Also what I need to know is how to set a config flag for the host. Here's the other error I get when trying to compile ZSNES:



loading cache ./config.cache

checking for gcc... gcc

checking whether the C compiler (gcc -pipe -I. -Wall ) works... yes

checking whether the C compiler (gcc -pipe -I. -Wall ) is a cross-compiler... no

checking whether we are using GNU C... yes

checking whether gcc accepts -g... yes

checking for nasm... ./configure: error:: command not found

no

checking for a BSD compatible install... /usr/bin/install -c

checking host system type... configure: error: can not guess host type; you must specify one




All help is appreciated but taunts and put downs are not.

Comments

  • Reply 1 of 13
    I hate to be the one to put you down, but lots of the ZSNES code is x86 assembly, AFAICT...and ya know what that means.
  • Reply 2 of 13
    Quote:

    Originally posted by kim kap sol

    I hate to be the one to put you down, but lots of the ZSNES code is x86 assembly, AFAICT...and ya know what that means.



    Yeah I learned that just now. I was told that I'd need to emulate that some how... what was that WINE-like x86 emu that's being developed?
  • Reply 3 of 13
    Pi2kO: Give it up. Seriously. You'll never, I repeat, never get it to work. Just download a compiled zsnes for OSX.



    The libs require other libs, which require other libs, which require other libs, which require other libs, and so on. It's called dependancy hell. Don't go there.



    I've got a G4 optimised beautiful port of snes9x by some japanese dude (who rules!). It runs very well, looks great. Post here if you can't find it by searching google, I will email you a copy if necessary.
  • Reply 4 of 13
    Quote:

    Originally posted by 1337_5L4Xx0R

    Pi2kO: Give it up. Seriously. You'll never, I repeat, never get it to work. Just download a compiled zsnes for OSX.



    The libs require other libs, which require other libs, which require other libs, which require other libs, and so on. It's called dependancy hell. Don't go there.



    I've got a G4 optimised beautiful port of snes9x by some japanese dude (who rules!). It runs very well, looks great. Post here if you can't find it by searching google, I will email you a copy if necessary.




    Well... when I compiled ZSNES on my Linux machine it only needed NASM, SDL, Zlib, and LibPng. That's not bad. Where can I find the OS X Build of ZSNES? I've been hearing that it's being ported......
  • Reply 5 of 13
    aquaticaquatic Posts: 5,602member
    There is no port dude but SNES9X custom owns. Real full screen, VBL, great controller support, perfect compatibility, the whole 9 yards.
  • Reply 6 of 13
    Quote:

    Originally posted by Aquatic

    There is no port dude but SNES9X custom owns. Real full screen, VBL, great controller support, perfect compatibility, the whole 9 yards.



    OK then explain this:



    http://board.zsnes.com/phpBB2/viewtopic.php?t=8940



  • Reply 7 of 13
    Hey I´m think all that is needed is to recode the x86 assembly to PPC assembly, (I´m sure I can do it), as for the rest of the program is done in C. If someone here wants to help, lets do it. Or if somebody knows the people who are working on the Mac port please post some info on how to contac them.



    Regards,

    Luis
  • Reply 8 of 13
    Quote:

    Originally posted by ucaboys

    Hey I´m think all that is needed is to recode the x86 assembly to PPC assembly, (I´m sure I can do it), as for the rest of the program is done in C. If someone here wants to help, lets do it. Or if somebody knows the people who are working on the Mac port please post some info on how to contac them.



    Regards,

    Luis




    OK. I contacted the person that reported that a ZSNES for Mac is in the works.... When he/she responds I'll let you know... Meanwhile you can grab the source code at ZSNES.com. Make sure you get the Linux src and not the WIndows or DOS though they're all in the same archive...
  • Reply 9 of 13
    aquaticaquatic Posts: 5,602member
    Why do you want zsnes so much? I'd rather just have SNES9X custom keep getting better and faster.
  • Reply 10 of 13
    BTW, best game for snes9x: Assault Suits Valken, or I believe the English version (as opposed to japanese) is Cybernator.



    Type cybernator.zip into a search engine. It's pretty sweet!
  • Reply 11 of 13
    Quote:

    Originally posted by Proud iBook Owner 2k2

    what was that WINE-like x86 emu that's being developed?



    WINE Is No Emulator, it's a runtime environment for Win32-code on x86-processors. It "just" passes x86-intructions down to the processor, pretty similar to how Classic works in OSX.



    There are a OpenSource x86 emulator caeld Bochs. It isn't very good, but it works.
  • Reply 12 of 13
    I want ZSNES so much, because IMHO it's the fastes SNES emulator there is , it will allow you to run gmes at full speed & no hic-ups with a 200 MHz procesor. I'm willing to sit down and port all of the x86 assembly code in that project to PPC assembly, I'm sure that I can make it even faster because of the greater number of registers in the PowerPC architercture.



    I'm tired of the current emu developers having machines that are fast ( in PC side most of them code for machines that have 1 GHz or more) , and because of that they use brute force methods to make their emulator work, I preffer fast, small and elegant solutions to solve problems like the dinamic recompilation( or translation for that matter) of the code to be exectuted in the procesor.



    I'll port a NES emulator in OCT just to get the hang of things, and I'll release it once I know its good enough. (I'm gonna need help drawing to screen in with GUI). I'll make sure it's the most accurate and fastest NES emu out there, and then I'll move on to ZSNES.



    What do you think? anybody wants to help?



    Regards Luis
  • Reply 13 of 13
    Heh... I made a typo in the topic title... its ZSNES that I want to come to Mac OS X.... not ZNES lol sorry.
Sign In or Register to comment.