ZSNES on mac [not a request :)]

Strictly for discussing ZSNES development and for submitting code. You can also join us on IRC at irc.libera.chat in #zsnes.
Please, no requests here.

Moderator: ZSNES Mods

Post Reply
jkenney
New Member
Posts: 3
Joined: Tue Jan 25, 2005 12:33 am

ZSNES on mac [not a request :)]

Post by jkenney »

I have decided to look into the possiblity of compiling the linux source code on mac osx.

As all know gcc is capable of cross-compilation, and therefore I will try and do some reserch and see if it can just compile x86 assembly for the ppc. (Slashdot had something... but the link is dead).

Another option is porting it from x86 to ppc assembly or C.

If anyone has any help they would like to share that would be appreciated.
Noxious Ninja
Dark Wind
Posts: 1271
Joined: Thu Jul 29, 2004 8:58 pm
Location: Texas
Contact:

Re: ZSNES on mac [not a request :)]

Post by Noxious Ninja »

jkenney wrote:I have decided to look into the possiblity of compiling the linux source code on mac osx.

As all know gcc is capable of cross-compilation, and therefore I will try and do some reserch and see if it can just compile x86 assembly for the ppc. (Slashdot had something... but the link is dead).

Another option is porting it from x86 to ppc assembly or C.

If anyone has any help they would like to share that would be appreciated.
Cross-compilation is having, say, a machine running x86 Linux compile binaries for a Mac OS X machine. GCC can't do what you want; you'd have to write a auto-translating version of NASM. Good luck with that. ;)

As for porting the assembly, sure, it can be done. If you know both x86 assembly and PPC assembly, feel free to give it a shot.
[u][url=http://bash.org/?577451]#577451[/url][/u]
Aerdan
Winter Knight
Posts: 467
Joined: Mon Aug 16, 2004 10:16 pm
Contact:

Post by Aerdan »

I'm not an official dev by any means, but feel free to port ZSNES to OS X. I'm not going to stop you, and if you end up doing it and making it work, we'd be happy to include your changes in the sources.
Kagerato
Lurker
Posts: 153
Joined: Mon Aug 09, 2004 1:40 am
Contact:

Post by Kagerato »

Personally, it would seem that if you were actually going to do the kind of monumental, inconceivable task of porting all that code to another architecture, you might as well try to re-write the emulator in C instead. It would be approximately the same amount of work, and you'd likely achieve compatibility with many architectures simultaneously.
jkenney
New Member
Posts: 3
Joined: Tue Jan 25, 2005 12:33 am

Post by jkenney »

Interestingly enough nasm was ported to osx.
My first attempt will be to compile it as per instructions for linux and see what doesnt work.

Ill post the results.
funkyass
"God"
Posts: 1128
Joined: Tue Jul 27, 2004 11:24 pm

Post by funkyass »

nasm on osx will produce binaries that run on 80 x86 machines.

not PowerPCs.

its a 80x86 assembler. thats all it will do.
Noxious Ninja
Dark Wind
Posts: 1271
Joined: Thu Jul 29, 2004 8:58 pm
Location: Texas
Contact:

Post by Noxious Ninja »

jkenney wrote:Interestingly enough nasm was ported to osx.
That would be an example of a cross compiler.
[u][url=http://bash.org/?577451]#577451[/url][/u]
jkenney
New Member
Posts: 3
Joined: Tue Jan 25, 2005 12:33 am

Post by jkenney »

It seems that way.

Though seriously assembly is just another language albiet more hardware specific.

Although a headache its not impossible to compile x86 assembly for another architecture.

Well now i have to look through each assembly file and convert it. If anyone else here knows ppc and x86 assembly then help would be appreciated :) There are a lot of files.

On the plus side, i got configure and make to work it compiles but then stops once it realizes that the object files are x86. But theoreticly that means once i convert the assembly it should work.
Noxious Ninja
Dark Wind
Posts: 1271
Joined: Thu Jul 29, 2004 8:58 pm
Location: Texas
Contact:

Post by Noxious Ninja »

Like Kagerato said, if you really intend to start on this somehow, convert the code to C, not PPC assembler.
[u][url=http://bash.org/?577451]#577451[/url][/u]
grinvader
ZSNES Shake Shake Prinny
Posts: 5632
Joined: Wed Jul 28, 2004 4:15 pm
Location: PAL50, dood !

Post by grinvader »

FYI, total size of all ASM to convert is close to 4.5 megs.
Noteworthy, zsnes/src/cpu holds ~1.24 megs and zsnes/src/video holds ~1.67 megs.
皆黙って俺について来い!!

Code: Select all

<jmr> bsnes has the most accurate wiki page but it takes forever to load (or something)
Pantheon: Gideon Zhi | CaitSith2 | Nach | kode54
Post Reply