Ok I deleted my previous post because it's totally obsolete. Let's start over, shall we?
Emulation now works on Darwin (X11/gtk2/SDL)! \o/ It's not *playable* due to lack of input device.
Various people from #fink on irc.freenode.net have worked with me on porting Mupen64, glN64, and Rice video to Darwin (X11/gtk2/SDL). I got em started and they did almost all of the work.
Thanks mainly to Feanor, who did 90% of the work because I'm not a programmer (I just play one on irc). I don't think it'll work on pure Darwin because it does just barely use Cocoa for the SDL display, because fink's SDL doesn't work properly on MacOS. Hacktarux and friends just fixed dynarec!
This differs from the Cocoa port in that it has plugin support, it has dynarec, and Rice has been buggily ported! We actually fixed the problems with the uniqueness of Darwin's handling of shared objects.
It's only been tested on Intel MacOS at the moment. It appears to run at full speed on a 2GHz core2duo iMac.
Procedure:
* Download the mupen64 source: http://mupen64.emulation64.com/files/0.5/mupen64_src-0.5.tar.bz2
* Download our mupen64 patch:
http://smuckola.org/projects/mupen64/mupen64_src-0.5-darwin.diff
* Assuming you have xcode, fink, and xorg or the equivalent installed, start an xterm (not Terminal.app) and do this: cd mupen64_src-0.5-darwin ; cat ../mupen64_src-0.5-darwin.diff | patch -p1 && ./configure --prefix=/usr/local && make
* Download the Rice video source: http://emutalk.net/showthread.php?t=41037
* Download our Rice video patch: http://smuckola.org/projects/mupen64/RiceVideo610-darwin.diff
* Patch Rice similarly and copy the .so and .ini from its dir into mupen64's plugins folder.
* Start mupen64, enable dynarec mode, enable Rice or glN64, enable SDL audio. Possibly edit the jttl_audio.conf's buffer sizes to prevent audio skipping.
Current flaws:
* Rice-related bugs: colors are weird on some light sources, and textures are occasionally buggy/flashy/etc
* no input device at all, not even keyboard, with either the basic input plugin or the SDL input plugin. The SDL input plugin's conf screen crashes instantly. We hope it's possible to manually configure a file or something to enable keyboard controls, or that the cocoa port did something in the source, so then we can take over with USB Overdrive. Or maybe it'd magically work if we used Cocoa.
If you're wondering about the disabling of some of Rice's asm, Feanor says that some of the asm is totally redundant and doesn't do anything that the C output doesn't do. He says it doesn't define all its register clobbers (I hope you know what that means because I don't.) In general, a lot of the code has a lot of needless Linux-specifics so we hope that Hacktarux can incorporate some of this to make it more portable. The code also assumes that it's living on a case-sensitive filesystem in the case of Config.h whereas the default filesystem on MacOS is case-preserving/case-insensitive. I hope we can integrate this as a bunch of #ifdef or somesuch so that it's unified as one source base ASAP.
Here is a good guide on the basics of porting apps to Darwin.
http://www.finkproject.org/doc/porting/shared.php?phpLang=en
From what I've read in the archives, Hacktarux and friends made a valiant effort in about 2004, and if they'd had this guide, they'd have done a lot better because it is a pretty unique process. Darwin handles shared objects and dynamic libraries uniquely. You have to replace malloc.h with stdlib.h everywhere.
Okay so can someone please enable input support?
Emulation now works on Darwin (X11/gtk2/SDL)! \o/ It's not *playable* due to lack of input device.
Various people from #fink on irc.freenode.net have worked with me on porting Mupen64, glN64, and Rice video to Darwin (X11/gtk2/SDL). I got em started and they did almost all of the work.
This differs from the Cocoa port in that it has plugin support, it has dynarec, and Rice has been buggily ported! We actually fixed the problems with the uniqueness of Darwin's handling of shared objects.
It's only been tested on Intel MacOS at the moment. It appears to run at full speed on a 2GHz core2duo iMac.
Procedure:
* Download the mupen64 source: http://mupen64.emulation64.com/files/0.5/mupen64_src-0.5.tar.bz2
* Download our mupen64 patch:
http://smuckola.org/projects/mupen64/mupen64_src-0.5-darwin.diff
* Assuming you have xcode, fink, and xorg or the equivalent installed, start an xterm (not Terminal.app) and do this: cd mupen64_src-0.5-darwin ; cat ../mupen64_src-0.5-darwin.diff | patch -p1 && ./configure --prefix=/usr/local && make
* Download the Rice video source: http://emutalk.net/showthread.php?t=41037
* Download our Rice video patch: http://smuckola.org/projects/mupen64/RiceVideo610-darwin.diff
* Patch Rice similarly and copy the .so and .ini from its dir into mupen64's plugins folder.
* Start mupen64, enable dynarec mode, enable Rice or glN64, enable SDL audio. Possibly edit the jttl_audio.conf's buffer sizes to prevent audio skipping.
Current flaws:
* Rice-related bugs: colors are weird on some light sources, and textures are occasionally buggy/flashy/etc
* no input device at all, not even keyboard, with either the basic input plugin or the SDL input plugin. The SDL input plugin's conf screen crashes instantly. We hope it's possible to manually configure a file or something to enable keyboard controls, or that the cocoa port did something in the source, so then we can take over with USB Overdrive. Or maybe it'd magically work if we used Cocoa.
If you're wondering about the disabling of some of Rice's asm, Feanor says that some of the asm is totally redundant and doesn't do anything that the C output doesn't do. He says it doesn't define all its register clobbers (I hope you know what that means because I don't.) In general, a lot of the code has a lot of needless Linux-specifics so we hope that Hacktarux can incorporate some of this to make it more portable. The code also assumes that it's living on a case-sensitive filesystem in the case of Config.h whereas the default filesystem on MacOS is case-preserving/case-insensitive. I hope we can integrate this as a bunch of #ifdef or somesuch so that it's unified as one source base ASAP.
Here is a good guide on the basics of porting apps to Darwin.
http://www.finkproject.org/doc/porting/shared.php?phpLang=en
From what I've read in the archives, Hacktarux and friends made a valiant effort in about 2004, and if they'd had this guide, they'd have done a lot better because it is a pretty unique process. Darwin handles shared objects and dynamic libraries uniquely. You have to replace malloc.h with stdlib.h everywhere.
Okay so can someone please enable input support?
Last edited: