Update to v096r02 (OS X Preview for Developers) release.
byuu says:
Warning: this is not for the faint of heart. This is a very early,
unpolished, buggy release. But help testing/fixing bugs would be greatly
appreciated for anyone willing.
Requirements:
- Mac OS X 10.7+
- Xcode 7.2+
Installation Commands:
cd higan
gmake -j 4
gmake install
cd ../icarus
gmake -j 4
gmake install
(gmake install is absolutely required, sorry. You'll be missing key
files in key places if you don't run it, and nothing will work.)
(gmake uninstall also exists, or you can just delete the .app bundles
from your Applications folder, and the Dev folder on your desktop.)
If you want to use the GBA emulation, then you need to drop the GBA BIOS
into ~/Emulation/System/Game\ Boy\ Advance.sys\bios.rom
Usage:
You'll now find higan.app and icarus.app in your Applications folders.
First, run icarus.app, navigate to where you keep your game ROMs. Now
click the settings button at the bottom right, and check "Create
Manifests", and click OK. (You'll need to do this every time you run
icarus because there's some sort of bug on OSX saving the settings.) Now
click "Import", and let it bring in your games into ~/Emulation.
Note: "Create Manifests" is required. I don't yet have a pipe
implementation on OS X for higan to invoke icarus yet. If you don't
check this box, it won't create manifest.bml files, and your games won't
run at all.
Now you can run higan.app. The first thing you'll want to do is go to
higan->Preferences... and assign inputs for your gamepads. At the very
least, do it for the default controller for all the systems you want to
emulate.
Now this is very important ... close the application at this point so
that it writes your config file to disk. There's a serious crashing bug,
and if you trigger it, you'll lose your input bindings.
Now the really annoying part ... go to Library->{System} and pick the
game you want to play. Right now, there's a ~50% chance the application
will bomb. It seems the hiro::pListView object is getting destroyed, yet
somehow the internal Cocoa callbacks are being triggered anyway. I don't
know how this is possible, and my attempts to debug with lldb have been
a failure :(
If you're unlucky, the application will crash. Restart and try again. If
it crashes every single time, then you can try launching your game from
the command-line instead. Example:
open /Applications/higan.app \
--args ~/Emulation/Super\ Famicom/Zelda3.sfc/
Help wanted:
I could really, really, really use some help with that crashing on game
loading. There's a lot of rough edges, but they're all cosmetic. This
one thing is pretty much the only major show-stopping issue at the
moment, preventing a wider general audience pre-compiled binary preview.
2016-01-05 02:59:19 +00:00
|
|
|
auto NSMakeColor(const hiro::Color& color) -> NSColor* {
|
|
|
|
return [NSColor colorWithRed:(color.red() / 255.0) green:(color.green() / 255.0) blue:(color.blue() / 255.0) alpha:(color.alpha() / 255.0)];
|
|
|
|
}
|
|
|
|
|
2016-01-07 08:14:33 +00:00
|
|
|
auto NSMakeImage(image icon, uint scaleWidth = 0, uint scaleHeight = 0) -> NSImage* {
|
|
|
|
if(!icon) return nil;
|
2015-12-30 06:41:46 +00:00
|
|
|
|
2016-01-07 08:14:33 +00:00
|
|
|
if(scaleWidth && scaleHeight) icon.scale(scaleWidth, scaleHeight);
|
|
|
|
icon.transform(0, 32, 255u << 24, 255u << 0, 255u << 8, 255u << 16); //Cocoa stores images in ABGR format
|
2015-12-30 06:41:46 +00:00
|
|
|
|
|
|
|
//create NSImage from memory
|
2016-01-07 08:14:33 +00:00
|
|
|
NSImage* cocoaImage = [[[NSImage alloc] initWithSize:NSMakeSize(icon.width(), icon.height())] autorelease];
|
2013-05-02 11:25:45 +00:00
|
|
|
NSBitmapImageRep* bitmap = [[[NSBitmapImageRep alloc]
|
2013-03-15 13:11:33 +00:00
|
|
|
initWithBitmapDataPlanes:nil
|
2016-01-07 08:14:33 +00:00
|
|
|
pixelsWide:icon.width() pixelsHigh:icon.height()
|
2013-03-15 13:11:33 +00:00
|
|
|
bitsPerSample:8 samplesPerPixel:4 hasAlpha:YES
|
|
|
|
isPlanar:NO colorSpaceName:NSCalibratedRGBColorSpace
|
|
|
|
bitmapFormat:NSAlphaNonpremultipliedBitmapFormat
|
2016-01-07 08:14:33 +00:00
|
|
|
bytesPerRow:(4 * icon.width()) bitsPerPixel:32
|
2013-03-15 13:11:33 +00:00
|
|
|
] autorelease];
|
2018-05-28 01:16:27 +00:00
|
|
|
memory::copy<uint32_t>([bitmap bitmapData], icon.data(), icon.width() * icon.height());
|
2013-03-15 13:11:33 +00:00
|
|
|
[cocoaImage addRepresentation:bitmap];
|
2016-01-07 08:14:33 +00:00
|
|
|
return cocoaImage;
|
2013-03-15 13:11:33 +00:00
|
|
|
}
|
2013-07-29 09:42:45 +00:00
|
|
|
|
2015-12-30 06:41:46 +00:00
|
|
|
auto DropPathsOperation(id<NSDraggingInfo> sender) -> NSDragOperation {
|
2013-07-29 09:42:45 +00:00
|
|
|
NSPasteboard* pboard = [sender draggingPasteboard];
|
|
|
|
if([[pboard types] containsObject:NSFilenamesPboardType]) {
|
|
|
|
if([sender draggingSourceOperationMask] & NSDragOperationGeneric) {
|
|
|
|
return NSDragOperationGeneric;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return NSDragOperationNone;
|
|
|
|
}
|
|
|
|
|
2016-07-01 11:58:12 +00:00
|
|
|
auto DropPaths(id<NSDraggingInfo> sender) -> string_vector {
|
|
|
|
string_vector paths;
|
2013-07-29 09:42:45 +00:00
|
|
|
NSPasteboard* pboard = [sender draggingPasteboard];
|
|
|
|
if([[pboard types] containsObject:NSFilenamesPboardType]) {
|
|
|
|
NSArray* files = [pboard propertyListForType:NSFilenamesPboardType];
|
2015-12-30 06:41:46 +00:00
|
|
|
for(uint n = 0; n < [files count]; n++) {
|
2013-07-29 09:42:45 +00:00
|
|
|
string path = [[files objectAtIndex:n] UTF8String];
|
2013-12-03 10:01:59 +00:00
|
|
|
if(directory::exists(path) && !path.endsWith("/")) path.append("/");
|
2013-07-29 09:42:45 +00:00
|
|
|
paths.append(path);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return paths;
|
|
|
|
}
|