2015-11-21 07:36:48 +00:00
|
|
|
#ifdef _WIN32
|
|
|
|
#include <initguid.h>
|
|
|
|
#include <cguid.h>
|
|
|
|
#endif
|
|
|
|
|
2010-08-09 13:28:56 +00:00
|
|
|
#include <ruby/ruby.hpp>
|
2015-06-20 05:44:05 +00:00
|
|
|
using namespace nall;
|
|
|
|
using namespace ruby;
|
|
|
|
|
|
|
|
/* Shared */
|
2010-08-09 13:28:56 +00:00
|
|
|
|
Update to v094r09 release.
byuu says:
This will easily be the biggest diff in the history of higan. And not in
a good way.
* target-higan and target-loki have been blown away completely
* nall and ruby massively updated
* phoenix replaced with hiro (pretty near a total rewrite)
* target-higan restarted using hiro (just a window for now)
* all emulation cores updated to compile again
* installation changed to not require root privileges (installs locally)
For the foreseeable future (maybe even permanently?), the new higan UI
will only build under Linux/BSD with GTK+ 2.20+. Probably the most
likely route for Windows/OS X will be to try and figure out how to build
hiro/GTK on those platforms, as awful as that would be. The other
alternative would be to produce new UIs for those platforms ... which
would actually be a good opportunity to make something much more user
friendly.
Being that I just started on this a few hours ago, that means that for
at least a few weeks, don't expect to be able to actually play any
games. Right now, you can pretty much just compile the binary and that's
it. It's quite possible that some nall changes didn't produce
compilation errors, but will produce runtime errors. So until the UI can
actually load games, we won't know if anything is broken. But we should
mostly be okay. It was mostly just trim<1> -> trim changes, moving to
Hash::SHA256 (much cleaner), and patching some reckless memory copy
functions enough to compile.
Progress isn't going to be like it was before: I'm now dividing my time
much thinner between studying and other hobbies.
My aim this time is not to produce a binary for everyone to play games
on. Rather, it's to keep the emulator alive. I want to be able to apply
critical patches again. And I would also like the base of the emulator
to live on, for use in other emulator frontends that utilize higan.
2015-02-26 10:10:46 +00:00
|
|
|
#undef deprecated
|
2010-10-23 05:08:05 +00:00
|
|
|
#undef mkdir
|
|
|
|
#undef usleep
|
2010-08-09 13:28:56 +00:00
|
|
|
|
Update to v094r29 release.
byuu says:
Note: for Windows users, please go to nall/intrinsics.hpp line 60 and
correct the typo from "DISPLAY_WINDOW" to "DISPLAY_WINDOWS" before
compiling, otherwise things won't work at all.
This will be a really major WIP for the core SNES emulation, so please
test as thoroughly as possible.
I rewrote the 65816 CPU core's dispatcher from a jump table to a switch
table. This was so that I could pass class variables as parameters to
opcodes without crazy theatrics.
With that, I killed the regs.r[N] stuff, the flag_t operator|=, &=, ^=
stuff, and all of the template versions of opcodes.
I also removed some stupid pointless flag tests in xcn and pflag that
would always be true.
I sure hope that AWJ is happy with this; because this change was so that
my flag assignments and branch tests won't need to build regs.P into
a full 8-bit variable anymore.
It does of course incur a slight performance hit when you pass in
variables by-value to functions, but it should help with binary size
(and thus cache) by reducing a lot of extra functions. (I know I could
have used template parameters for some things even with a switch table,
but chose not to for the aforementioned reasons.)
Overall, it's about a ~1% speedup from the previous build. The CPU core
instructions were never a bottleneck, but I did want to fix the P flag
building stuff because that really was a dumb mistake v_v'
2015-06-22 13:31:49 +00:00
|
|
|
#if defined(DISPLAY_XORG)
|
2015-06-20 05:44:05 +00:00
|
|
|
#include <X11/Xlib.h>
|
|
|
|
#include <X11/Xutil.h>
|
|
|
|
#include <X11/Xatom.h>
|
Update to v094r29 release.
byuu says:
Note: for Windows users, please go to nall/intrinsics.hpp line 60 and
correct the typo from "DISPLAY_WINDOW" to "DISPLAY_WINDOWS" before
compiling, otherwise things won't work at all.
This will be a really major WIP for the core SNES emulation, so please
test as thoroughly as possible.
I rewrote the 65816 CPU core's dispatcher from a jump table to a switch
table. This was so that I could pass class variables as parameters to
opcodes without crazy theatrics.
With that, I killed the regs.r[N] stuff, the flag_t operator|=, &=, ^=
stuff, and all of the template versions of opcodes.
I also removed some stupid pointless flag tests in xcn and pflag that
would always be true.
I sure hope that AWJ is happy with this; because this change was so that
my flag assignments and branch tests won't need to build regs.P into
a full 8-bit variable anymore.
It does of course incur a slight performance hit when you pass in
variables by-value to functions, but it should help with binary size
(and thus cache) by reducing a lot of extra functions. (I know I could
have used template parameters for some things even with a switch table,
but chose not to for the aforementioned reasons.)
Overall, it's about a ~1% speedup from the previous build. The CPU core
instructions were never a bottleneck, but I did want to fix the P flag
building stuff because that really was a dumb mistake v_v'
2015-06-22 13:31:49 +00:00
|
|
|
#elif defined(DISPLAY_QUARTZ)
|
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
|
|
|
#define Boolean CocoaBoolean
|
2015-06-20 05:44:05 +00:00
|
|
|
#define decimal CocoaDecimal
|
|
|
|
#include <Cocoa/Cocoa.h>
|
|
|
|
#include <Carbon/Carbon.h>
|
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
|
|
|
#undef Boolean
|
2015-06-20 05:44:05 +00:00
|
|
|
#undef decimal
|
Update to v094r29 release.
byuu says:
Note: for Windows users, please go to nall/intrinsics.hpp line 60 and
correct the typo from "DISPLAY_WINDOW" to "DISPLAY_WINDOWS" before
compiling, otherwise things won't work at all.
This will be a really major WIP for the core SNES emulation, so please
test as thoroughly as possible.
I rewrote the 65816 CPU core's dispatcher from a jump table to a switch
table. This was so that I could pass class variables as parameters to
opcodes without crazy theatrics.
With that, I killed the regs.r[N] stuff, the flag_t operator|=, &=, ^=
stuff, and all of the template versions of opcodes.
I also removed some stupid pointless flag tests in xcn and pflag that
would always be true.
I sure hope that AWJ is happy with this; because this change was so that
my flag assignments and branch tests won't need to build regs.P into
a full 8-bit variable anymore.
It does of course incur a slight performance hit when you pass in
variables by-value to functions, but it should help with binary size
(and thus cache) by reducing a lot of extra functions. (I know I could
have used template parameters for some things even with a switch table,
but chose not to for the aforementioned reasons.)
Overall, it's about a ~1% speedup from the previous build. The CPU core
instructions were never a bottleneck, but I did want to fix the P flag
building stuff because that really was a dumb mistake v_v'
2015-06-22 13:31:49 +00:00
|
|
|
#elif defined(DISPLAY_WINDOWS)
|
2015-06-20 05:44:05 +00:00
|
|
|
#include <windows.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* Video */
|
|
|
|
|
|
|
|
#if defined(VIDEO_CGL)
|
|
|
|
#include <ruby/video/cgl.cpp>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(VIDEO_DIRECT3D)
|
|
|
|
#include <ruby/video/direct3d.cpp>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(VIDEO_DIRECTDRAW)
|
|
|
|
#include <ruby/video/directdraw.cpp>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(VIDEO_GDI)
|
|
|
|
#include <ruby/video/gdi.cpp>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(VIDEO_GLX)
|
|
|
|
#include <ruby/video/glx.cpp>
|
|
|
|
#endif
|
|
|
|
|
Update to v095r03 release and icarus 20151107.
byuu says:
Note: you will need the new icarus (and please use the "no manifest"
system) to run GBA games with this WIP.
Changelog:
- fixed caching of r(d) to pass armwrestler tests [Jonas Quinn]
- DMA to/from GBA BIOS should fail [Cydrak]
- fixed sign-extend and rotate on ldrs instructions [Cydrak]
- fixed 8-bit SRAM reading/writing [byuu]
- refactored GBA/cartridge
- cartridge/rom,ram.type is now cartridge/mrom,sram,eeprom,flash
- things won't crash horribly if you specify a RAM size larger than
the largest legal size in the manifest
- specialized MROM / SRAM classes replace all the shared read/write
functions that didn't work right anyway
- there's a new ruby/video.glx2 driver, which is not enabled by default
- use this if you are running Linux/BSD, but don't have OpenGL 3.2 yet
- I'm not going to support OpenGL2 on Windows/OS X, because these OSes
don't ship ancient video card drivers
- probably more. What am I, clairvoyant? :P
For endrift's tests, this gets us to 1348/1552 memory and 1016/1260
timing. Overall, this puts us back in second place. Only no$ is ahead
on memory, but bgba is even more ahead on timing.
2015-11-08 09:09:18 +00:00
|
|
|
#if defined(VIDEO_GLX2)
|
|
|
|
#include <ruby/video/glx2.cpp>
|
|
|
|
#endif
|
|
|
|
|
2015-06-20 05:44:05 +00:00
|
|
|
#if defined(VIDEO_SDL)
|
|
|
|
#include <ruby/video/sdl.cpp>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(VIDEO_WGL)
|
|
|
|
#include <ruby/video/wgl.cpp>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(VIDEO_XSHM)
|
|
|
|
#include <ruby/video/xshm.cpp>
|
|
|
|
#endif
|
|
|
|
|
2017-07-23 09:18:16 +00:00
|
|
|
#if defined(VIDEO_XVIDEO)
|
|
|
|
#include <ruby/video/xvideo.cpp>
|
2015-06-20 05:44:05 +00:00
|
|
|
#endif
|
2010-08-09 13:28:56 +00:00
|
|
|
|
2015-06-20 05:44:05 +00:00
|
|
|
namespace ruby {
|
2010-08-09 13:28:56 +00:00
|
|
|
|
2015-06-20 05:44:05 +00:00
|
|
|
auto Video::create(const string& driver) -> Video* {
|
|
|
|
if(!driver) return create(optimalDriver());
|
2010-08-09 13:28:56 +00:00
|
|
|
|
2015-06-20 05:44:05 +00:00
|
|
|
#if defined(VIDEO_CGL)
|
|
|
|
if(driver == "OpenGL") return new VideoCGL;
|
2010-08-09 13:28:56 +00:00
|
|
|
#endif
|
|
|
|
|
2015-06-20 05:44:05 +00:00
|
|
|
#if defined(VIDEO_DIRECT3D)
|
2017-07-09 02:23:17 +00:00
|
|
|
if(driver == "Direct3D") return new VideoDirect3D;
|
2010-08-09 13:28:56 +00:00
|
|
|
#endif
|
|
|
|
|
2015-06-20 05:44:05 +00:00
|
|
|
#if defined(VIDEO_DIRECTDRAW)
|
2017-07-09 02:23:17 +00:00
|
|
|
if(driver == "DirectDraw") return new VideoDirectDraw;
|
2010-08-09 13:28:56 +00:00
|
|
|
#endif
|
|
|
|
|
2015-06-20 05:44:05 +00:00
|
|
|
#if defined(VIDEO_GDI)
|
|
|
|
if(driver == "GDI") return new VideoGDI;
|
2010-08-09 13:28:56 +00:00
|
|
|
#endif
|
|
|
|
|
2015-06-20 05:44:05 +00:00
|
|
|
#if defined(VIDEO_GLX)
|
|
|
|
if(driver == "OpenGL") return new VideoGLX;
|
2010-08-09 13:28:56 +00:00
|
|
|
#endif
|
|
|
|
|
Update to v095r03 release and icarus 20151107.
byuu says:
Note: you will need the new icarus (and please use the "no manifest"
system) to run GBA games with this WIP.
Changelog:
- fixed caching of r(d) to pass armwrestler tests [Jonas Quinn]
- DMA to/from GBA BIOS should fail [Cydrak]
- fixed sign-extend and rotate on ldrs instructions [Cydrak]
- fixed 8-bit SRAM reading/writing [byuu]
- refactored GBA/cartridge
- cartridge/rom,ram.type is now cartridge/mrom,sram,eeprom,flash
- things won't crash horribly if you specify a RAM size larger than
the largest legal size in the manifest
- specialized MROM / SRAM classes replace all the shared read/write
functions that didn't work right anyway
- there's a new ruby/video.glx2 driver, which is not enabled by default
- use this if you are running Linux/BSD, but don't have OpenGL 3.2 yet
- I'm not going to support OpenGL2 on Windows/OS X, because these OSes
don't ship ancient video card drivers
- probably more. What am I, clairvoyant? :P
For endrift's tests, this gets us to 1348/1552 memory and 1016/1260
timing. Overall, this puts us back in second place. Only no$ is ahead
on memory, but bgba is even more ahead on timing.
2015-11-08 09:09:18 +00:00
|
|
|
#if defined(VIDEO_GLX2)
|
|
|
|
if(driver == "OpenGL2") return new VideoGLX2;
|
|
|
|
#endif
|
|
|
|
|
2015-06-20 05:44:05 +00:00
|
|
|
#if defined(VIDEO_SDL)
|
|
|
|
if(driver == "SDL") return new VideoSDL;
|
2010-08-09 13:28:56 +00:00
|
|
|
#endif
|
|
|
|
|
2015-06-20 05:44:05 +00:00
|
|
|
#if defined(VIDEO_WGL)
|
|
|
|
if(driver == "OpenGL") return new VideoWGL;
|
2010-08-09 13:28:56 +00:00
|
|
|
#endif
|
|
|
|
|
2015-06-20 05:44:05 +00:00
|
|
|
#if defined(VIDEO_XSHM)
|
|
|
|
if(driver == "XShm") return new VideoXShm;
|
Update to v084r03 release.
(r02 was not posted to the WIP thread)
byuu says:
Internally, all color is processed with 30-bit precision. The filters
also operate at 30-bit depth.
There's a new config file setting, video.depth, which defaults to 24.
This causes the final output to downsample to 24-bit, as most will
require.
If you set it to 30-bit, the downsampling will not occur, and bsnes will
ask ruby for a 30-bit surface. If you don't have one available, you're
going to get bad colors. Or maybe even a crash with OpenGL.
I don't yet have detection code to make sure you have an appropriate
visual in place.
30-bit mode will really only work if you are running Linux, running Xorg
at Depth 30, use the OpenGL or XShm driver, have an nVidia Quadro or AMD
FireGL card with the official drivers, and have a 30-bit capable
monitor.
Lots of planning and work for very little gain here, but it's nice that
it's finally finished.
Oh, I had to change the contrast/brightness formulas a tiny bit, but
they still work and look nice.
2011-12-03 03:22:54 +00:00
|
|
|
#endif
|
|
|
|
|
2017-07-23 09:18:16 +00:00
|
|
|
#if defined(VIDEO_XVIDEO)
|
|
|
|
if(driver == "XVideo") return new VideoXVideo;
|
2010-08-09 13:28:56 +00:00
|
|
|
#endif
|
|
|
|
|
2015-06-20 05:44:05 +00:00
|
|
|
return new Video;
|
2010-08-09 13:28:56 +00:00
|
|
|
}
|
|
|
|
|
2015-06-20 05:44:05 +00:00
|
|
|
auto Video::optimalDriver() -> string {
|
2013-07-29 09:42:45 +00:00
|
|
|
#if defined(VIDEO_WGL)
|
|
|
|
return "OpenGL";
|
|
|
|
#elif defined(VIDEO_DIRECT3D)
|
|
|
|
return "Direct3D";
|
|
|
|
#elif defined(VIDEO_DIRECTDRAW)
|
|
|
|
return "DirectDraw";
|
|
|
|
#elif defined(VIDEO_GDI)
|
|
|
|
return "GDI";
|
|
|
|
#elif defined(VIDEO_CGL)
|
|
|
|
return "OpenGL";
|
|
|
|
#elif defined(VIDEO_GLX)
|
|
|
|
return "OpenGL";
|
Update to v095r03 release and icarus 20151107.
byuu says:
Note: you will need the new icarus (and please use the "no manifest"
system) to run GBA games with this WIP.
Changelog:
- fixed caching of r(d) to pass armwrestler tests [Jonas Quinn]
- DMA to/from GBA BIOS should fail [Cydrak]
- fixed sign-extend and rotate on ldrs instructions [Cydrak]
- fixed 8-bit SRAM reading/writing [byuu]
- refactored GBA/cartridge
- cartridge/rom,ram.type is now cartridge/mrom,sram,eeprom,flash
- things won't crash horribly if you specify a RAM size larger than
the largest legal size in the manifest
- specialized MROM / SRAM classes replace all the shared read/write
functions that didn't work right anyway
- there's a new ruby/video.glx2 driver, which is not enabled by default
- use this if you are running Linux/BSD, but don't have OpenGL 3.2 yet
- I'm not going to support OpenGL2 on Windows/OS X, because these OSes
don't ship ancient video card drivers
- probably more. What am I, clairvoyant? :P
For endrift's tests, this gets us to 1348/1552 memory and 1016/1260
timing. Overall, this puts us back in second place. Only no$ is ahead
on memory, but bgba is even more ahead on timing.
2015-11-08 09:09:18 +00:00
|
|
|
#elif defined(VIDEO_GLX2)
|
|
|
|
return "OpenGL2";
|
2017-07-23 09:18:16 +00:00
|
|
|
#elif defined(VIDEO_XVIDEO)
|
|
|
|
return "XVideo";
|
2013-07-29 09:42:45 +00:00
|
|
|
#elif defined(VIDEO_XSHM)
|
|
|
|
return "XShm";
|
|
|
|
#elif defined(VIDEO_SDL)
|
|
|
|
return "SDL";
|
|
|
|
#else
|
|
|
|
return "None";
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
2015-06-20 05:44:05 +00:00
|
|
|
auto Video::safestDriver() -> string {
|
2010-08-09 13:28:56 +00:00
|
|
|
#if defined(VIDEO_DIRECT3D)
|
|
|
|
return "Direct3D";
|
|
|
|
#elif defined(VIDEO_WGL)
|
|
|
|
return "OpenGL";
|
|
|
|
#elif defined(VIDEO_DIRECTDRAW)
|
|
|
|
return "DirectDraw";
|
|
|
|
#elif defined(VIDEO_GDI)
|
|
|
|
return "GDI";
|
2013-03-19 08:48:50 +00:00
|
|
|
#elif defined(VIDEO_CGL)
|
|
|
|
return "OpenGL";
|
Update to v084r03 release.
(r02 was not posted to the WIP thread)
byuu says:
Internally, all color is processed with 30-bit precision. The filters
also operate at 30-bit depth.
There's a new config file setting, video.depth, which defaults to 24.
This causes the final output to downsample to 24-bit, as most will
require.
If you set it to 30-bit, the downsampling will not occur, and bsnes will
ask ruby for a 30-bit surface. If you don't have one available, you're
going to get bad colors. Or maybe even a crash with OpenGL.
I don't yet have detection code to make sure you have an appropriate
visual in place.
30-bit mode will really only work if you are running Linux, running Xorg
at Depth 30, use the OpenGL or XShm driver, have an nVidia Quadro or AMD
FireGL card with the official drivers, and have a 30-bit capable
monitor.
Lots of planning and work for very little gain here, but it's nice that
it's finally finished.
Oh, I had to change the contrast/brightness formulas a tiny bit, but
they still work and look nice.
2011-12-03 03:22:54 +00:00
|
|
|
#elif defined(VIDEO_XSHM)
|
|
|
|
return "XShm";
|
2010-08-09 13:28:56 +00:00
|
|
|
#elif defined(VIDEO_SDL)
|
|
|
|
return "SDL";
|
2017-07-23 09:18:16 +00:00
|
|
|
#elif defined(VIDEO_XVIDEO)
|
|
|
|
return "XVideo";
|
Update to v095r03 release and icarus 20151107.
byuu says:
Note: you will need the new icarus (and please use the "no manifest"
system) to run GBA games with this WIP.
Changelog:
- fixed caching of r(d) to pass armwrestler tests [Jonas Quinn]
- DMA to/from GBA BIOS should fail [Cydrak]
- fixed sign-extend and rotate on ldrs instructions [Cydrak]
- fixed 8-bit SRAM reading/writing [byuu]
- refactored GBA/cartridge
- cartridge/rom,ram.type is now cartridge/mrom,sram,eeprom,flash
- things won't crash horribly if you specify a RAM size larger than
the largest legal size in the manifest
- specialized MROM / SRAM classes replace all the shared read/write
functions that didn't work right anyway
- there's a new ruby/video.glx2 driver, which is not enabled by default
- use this if you are running Linux/BSD, but don't have OpenGL 3.2 yet
- I'm not going to support OpenGL2 on Windows/OS X, because these OSes
don't ship ancient video card drivers
- probably more. What am I, clairvoyant? :P
For endrift's tests, this gets us to 1348/1552 memory and 1016/1260
timing. Overall, this puts us back in second place. Only no$ is ahead
on memory, but bgba is even more ahead on timing.
2015-11-08 09:09:18 +00:00
|
|
|
#elif defined(VIDEO_GLX2)
|
|
|
|
return "OpenGL2";
|
2010-08-09 13:28:56 +00:00
|
|
|
#elif defined(VIDEO_GLX)
|
|
|
|
return "OpenGL";
|
|
|
|
#else
|
|
|
|
return "None";
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
2016-07-01 11:58:12 +00:00
|
|
|
auto Video::availableDrivers() -> string_vector {
|
2015-06-20 05:44:05 +00:00
|
|
|
return {
|
2010-08-09 13:28:56 +00:00
|
|
|
|
|
|
|
#if defined(VIDEO_WGL)
|
2015-06-20 05:44:05 +00:00
|
|
|
"OpenGL",
|
2010-08-09 13:28:56 +00:00
|
|
|
#endif
|
|
|
|
|
2013-07-29 09:42:45 +00:00
|
|
|
#if defined(VIDEO_DIRECT3D)
|
2015-06-20 05:44:05 +00:00
|
|
|
"Direct3D",
|
2013-07-29 09:42:45 +00:00
|
|
|
#endif
|
|
|
|
|
2010-08-09 13:28:56 +00:00
|
|
|
#if defined(VIDEO_DIRECTDRAW)
|
2015-06-20 05:44:05 +00:00
|
|
|
"DirectDraw",
|
2010-08-09 13:28:56 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(VIDEO_GDI)
|
2015-06-20 05:44:05 +00:00
|
|
|
"GDI",
|
2010-08-09 13:28:56 +00:00
|
|
|
#endif
|
|
|
|
|
2013-03-19 08:48:50 +00:00
|
|
|
#if defined(VIDEO_CGL)
|
2015-06-20 05:44:05 +00:00
|
|
|
"OpenGL",
|
2013-03-19 08:48:50 +00:00
|
|
|
#endif
|
|
|
|
|
2010-08-09 13:28:56 +00:00
|
|
|
#if defined(VIDEO_GLX)
|
2015-06-20 05:44:05 +00:00
|
|
|
"OpenGL",
|
2010-08-09 13:28:56 +00:00
|
|
|
#endif
|
|
|
|
|
Update to v095r03 release and icarus 20151107.
byuu says:
Note: you will need the new icarus (and please use the "no manifest"
system) to run GBA games with this WIP.
Changelog:
- fixed caching of r(d) to pass armwrestler tests [Jonas Quinn]
- DMA to/from GBA BIOS should fail [Cydrak]
- fixed sign-extend and rotate on ldrs instructions [Cydrak]
- fixed 8-bit SRAM reading/writing [byuu]
- refactored GBA/cartridge
- cartridge/rom,ram.type is now cartridge/mrom,sram,eeprom,flash
- things won't crash horribly if you specify a RAM size larger than
the largest legal size in the manifest
- specialized MROM / SRAM classes replace all the shared read/write
functions that didn't work right anyway
- there's a new ruby/video.glx2 driver, which is not enabled by default
- use this if you are running Linux/BSD, but don't have OpenGL 3.2 yet
- I'm not going to support OpenGL2 on Windows/OS X, because these OSes
don't ship ancient video card drivers
- probably more. What am I, clairvoyant? :P
For endrift's tests, this gets us to 1348/1552 memory and 1016/1260
timing. Overall, this puts us back in second place. Only no$ is ahead
on memory, but bgba is even more ahead on timing.
2015-11-08 09:09:18 +00:00
|
|
|
#if defined(VIDEO_GLX2)
|
|
|
|
"OpenGL2",
|
|
|
|
#endif
|
|
|
|
|
2017-07-23 09:18:16 +00:00
|
|
|
#if defined(VIDEO_XVIDEO)
|
|
|
|
"XVideo",
|
2010-08-09 13:28:56 +00:00
|
|
|
#endif
|
|
|
|
|
Update to v084r03 release.
(r02 was not posted to the WIP thread)
byuu says:
Internally, all color is processed with 30-bit precision. The filters
also operate at 30-bit depth.
There's a new config file setting, video.depth, which defaults to 24.
This causes the final output to downsample to 24-bit, as most will
require.
If you set it to 30-bit, the downsampling will not occur, and bsnes will
ask ruby for a 30-bit surface. If you don't have one available, you're
going to get bad colors. Or maybe even a crash with OpenGL.
I don't yet have detection code to make sure you have an appropriate
visual in place.
30-bit mode will really only work if you are running Linux, running Xorg
at Depth 30, use the OpenGL or XShm driver, have an nVidia Quadro or AMD
FireGL card with the official drivers, and have a 30-bit capable
monitor.
Lots of planning and work for very little gain here, but it's nice that
it's finally finished.
Oh, I had to change the contrast/brightness formulas a tiny bit, but
they still work and look nice.
2011-12-03 03:22:54 +00:00
|
|
|
#if defined(VIDEO_XSHM)
|
2015-06-20 05:44:05 +00:00
|
|
|
"XShm",
|
Update to v084r03 release.
(r02 was not posted to the WIP thread)
byuu says:
Internally, all color is processed with 30-bit precision. The filters
also operate at 30-bit depth.
There's a new config file setting, video.depth, which defaults to 24.
This causes the final output to downsample to 24-bit, as most will
require.
If you set it to 30-bit, the downsampling will not occur, and bsnes will
ask ruby for a 30-bit surface. If you don't have one available, you're
going to get bad colors. Or maybe even a crash with OpenGL.
I don't yet have detection code to make sure you have an appropriate
visual in place.
30-bit mode will really only work if you are running Linux, running Xorg
at Depth 30, use the OpenGL or XShm driver, have an nVidia Quadro or AMD
FireGL card with the official drivers, and have a 30-bit capable
monitor.
Lots of planning and work for very little gain here, but it's nice that
it's finally finished.
Oh, I had to change the contrast/brightness formulas a tiny bit, but
they still work and look nice.
2011-12-03 03:22:54 +00:00
|
|
|
#endif
|
|
|
|
|
2010-08-09 13:28:56 +00:00
|
|
|
#if defined(VIDEO_SDL)
|
2015-06-20 05:44:05 +00:00
|
|
|
"SDL",
|
2010-08-09 13:28:56 +00:00
|
|
|
#endif
|
|
|
|
|
2015-06-20 05:44:05 +00:00
|
|
|
"None"};
|
2010-08-09 13:28:56 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2015-06-20 05:44:05 +00:00
|
|
|
/* Audio */
|
|
|
|
|
|
|
|
#if defined(AUDIO_ALSA)
|
|
|
|
#include <ruby/audio/alsa.cpp>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(AUDIO_AO)
|
|
|
|
#include <ruby/audio/ao.cpp>
|
|
|
|
#endif
|
|
|
|
|
2017-07-15 12:00:20 +00:00
|
|
|
#if defined(AUDIO_ASIO)
|
|
|
|
#include <ruby/audio/asio.cpp>
|
|
|
|
#endif
|
|
|
|
|
2015-06-20 05:44:05 +00:00
|
|
|
#if defined(AUDIO_DIRECTSOUND)
|
|
|
|
#include <ruby/audio/directsound.cpp>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(AUDIO_OPENAL)
|
|
|
|
#include <ruby/audio/openal.cpp>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(AUDIO_OSS)
|
|
|
|
#include <ruby/audio/oss.cpp>
|
|
|
|
#endif
|
2010-08-09 13:28:56 +00:00
|
|
|
|
2015-06-20 05:44:05 +00:00
|
|
|
#if defined(AUDIO_PULSEAUDIO)
|
|
|
|
#include <ruby/audio/pulseaudio.cpp>
|
|
|
|
#endif
|
2010-08-09 13:28:56 +00:00
|
|
|
|
2015-06-20 05:44:05 +00:00
|
|
|
#if defined(AUDIO_PULSEAUDIOSIMPLE)
|
|
|
|
#include <ruby/audio/pulseaudiosimple.cpp>
|
|
|
|
#endif
|
|
|
|
|
2015-11-21 07:36:48 +00:00
|
|
|
#if defined(AUDIO_WASAPI)
|
|
|
|
#include <ruby/audio/wasapi.cpp>
|
|
|
|
#endif
|
|
|
|
|
2015-06-20 05:44:05 +00:00
|
|
|
#if defined(AUDIO_XAUDIO2)
|
|
|
|
#include <ruby/audio/xaudio2.cpp>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
namespace ruby {
|
2010-08-09 13:28:56 +00:00
|
|
|
|
2015-06-20 05:44:05 +00:00
|
|
|
auto Audio::create(const string& driver) -> Audio* {
|
|
|
|
if(!driver) return create(optimalDriver());
|
2010-08-09 13:28:56 +00:00
|
|
|
|
2015-06-20 05:44:05 +00:00
|
|
|
#if defined(AUDIO_ALSA)
|
|
|
|
if(driver == "ALSA") return new AudioALSA;
|
2010-08-09 13:28:56 +00:00
|
|
|
#endif
|
|
|
|
|
2015-06-20 05:44:05 +00:00
|
|
|
#if defined(AUDIO_AO)
|
|
|
|
if(driver == "libao") return new AudioAO;
|
2010-08-09 13:28:56 +00:00
|
|
|
#endif
|
|
|
|
|
2017-07-15 12:00:20 +00:00
|
|
|
#if defined(AUDIO_ASIO)
|
|
|
|
if(driver == "ASIO") return new AudioASIO;
|
|
|
|
#endif
|
|
|
|
|
2015-06-20 05:44:05 +00:00
|
|
|
#if defined(AUDIO_DIRECTSOUND)
|
2017-07-15 12:00:20 +00:00
|
|
|
if(driver == "DirectSound") return new AudioDirectSound;
|
2010-08-09 13:28:56 +00:00
|
|
|
#endif
|
|
|
|
|
2015-06-20 05:44:05 +00:00
|
|
|
#if defined(AUDIO_OPENAL)
|
|
|
|
if(driver == "OpenAL") return new AudioOpenAL;
|
2010-08-09 13:28:56 +00:00
|
|
|
#endif
|
|
|
|
|
2015-06-20 05:44:05 +00:00
|
|
|
#if defined(AUDIO_OSS)
|
|
|
|
if(driver == "OSS") return new AudioOSS;
|
2010-08-09 13:28:56 +00:00
|
|
|
#endif
|
|
|
|
|
2015-06-20 05:44:05 +00:00
|
|
|
#if defined(AUDIO_PULSEAUDIO)
|
|
|
|
if(driver == "PulseAudio") return new AudioPulseAudio;
|
2010-08-09 13:28:56 +00:00
|
|
|
#endif
|
|
|
|
|
2015-06-20 05:44:05 +00:00
|
|
|
#if defined(AUDIO_PULSEAUDIOSIMPLE)
|
|
|
|
if(driver == "PulseAudioSimple") return new AudioPulseAudioSimple;
|
2010-08-09 13:28:56 +00:00
|
|
|
#endif
|
|
|
|
|
2015-11-21 07:36:48 +00:00
|
|
|
#if defined(AUDIO_WASAPI)
|
|
|
|
if(driver == "WASAPI") return new AudioWASAPI;
|
|
|
|
#endif
|
|
|
|
|
2015-06-20 05:44:05 +00:00
|
|
|
#if defined(AUDIO_XAUDIO2)
|
|
|
|
if(driver == "XAudio2") return new AudioXAudio2;
|
2010-08-16 04:10:50 +00:00
|
|
|
#endif
|
|
|
|
|
2015-06-20 05:44:05 +00:00
|
|
|
return new Audio;
|
2010-08-09 13:28:56 +00:00
|
|
|
}
|
|
|
|
|
2015-06-20 05:44:05 +00:00
|
|
|
auto Audio::optimalDriver() -> string {
|
2017-07-15 12:00:20 +00:00
|
|
|
#if defined(AUDIO_ASIO)
|
|
|
|
return "ASIO";
|
|
|
|
#elif defined(AUDIO_WASAPI)
|
2015-11-21 07:36:48 +00:00
|
|
|
return "WASAPI";
|
|
|
|
#elif defined(AUDIO_XAUDIO2)
|
2013-07-29 09:42:45 +00:00
|
|
|
return "XAudio2";
|
|
|
|
#elif defined(AUDIO_DIRECTSOUND)
|
|
|
|
return "DirectSound";
|
|
|
|
#elif defined(AUDIO_ALSA)
|
|
|
|
return "ALSA";
|
|
|
|
#elif defined(AUDIO_OSS)
|
|
|
|
return "OSS";
|
2015-06-20 05:44:05 +00:00
|
|
|
#elif defined(AUDIO_OPENAL)
|
|
|
|
return "OpenAL";
|
2013-07-29 09:42:45 +00:00
|
|
|
#elif defined(AUDIO_PULSEAUDIO)
|
|
|
|
return "PulseAudio";
|
|
|
|
#elif defined(AUDIO_PULSEAUDIOSIMPLE)
|
|
|
|
return "PulseAudioSimple";
|
|
|
|
#elif defined(AUDIO_AO)
|
|
|
|
return "libao";
|
|
|
|
#else
|
|
|
|
return "None";
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
2015-06-20 05:44:05 +00:00
|
|
|
auto Audio::safestDriver() -> string {
|
2010-08-09 13:28:56 +00:00
|
|
|
#if defined(AUDIO_DIRECTSOUND)
|
|
|
|
return "DirectSound";
|
2015-11-21 07:36:48 +00:00
|
|
|
#elif defined(AUDIO_WASAPI)
|
|
|
|
return "WASAPI";
|
2010-08-16 04:10:50 +00:00
|
|
|
#elif defined(AUDIO_XAUDIO2)
|
|
|
|
return "XAudio2";
|
2010-08-09 13:28:56 +00:00
|
|
|
#elif defined(AUDIO_ALSA)
|
|
|
|
return "ALSA";
|
2015-06-20 05:44:05 +00:00
|
|
|
#elif defined(AUDIO_OSS)
|
|
|
|
return "OSS";
|
2010-08-09 13:28:56 +00:00
|
|
|
#elif defined(AUDIO_OPENAL)
|
|
|
|
return "OpenAL";
|
|
|
|
#elif defined(AUDIO_PULSEAUDIO)
|
|
|
|
return "PulseAudio";
|
|
|
|
#elif defined(AUDIO_PULSEAUDIOSIMPLE)
|
|
|
|
return "PulseAudioSimple";
|
|
|
|
#elif defined(AUDIO_AO)
|
|
|
|
return "libao";
|
2017-07-15 12:00:20 +00:00
|
|
|
#elif defined(AUDIO_ASIO)
|
|
|
|
return "ASIO";
|
2010-08-09 13:28:56 +00:00
|
|
|
#else
|
|
|
|
return "None";
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
2016-07-01 11:58:12 +00:00
|
|
|
auto Audio::availableDrivers() -> string_vector {
|
2015-06-20 05:44:05 +00:00
|
|
|
return {
|
2010-08-09 13:28:56 +00:00
|
|
|
|
2017-07-15 12:00:20 +00:00
|
|
|
#if defined(AUDIO_ASIO)
|
|
|
|
"ASIO",
|
|
|
|
#endif
|
|
|
|
|
2015-11-21 07:36:48 +00:00
|
|
|
#if defined(AUDIO_WASAPI)
|
|
|
|
"WASAPI",
|
|
|
|
#endif
|
|
|
|
|
2010-08-16 04:10:50 +00:00
|
|
|
#if defined(AUDIO_XAUDIO2)
|
2015-06-20 05:44:05 +00:00
|
|
|
"XAudio2",
|
2010-08-16 04:10:50 +00:00
|
|
|
#endif
|
|
|
|
|
2013-07-29 09:42:45 +00:00
|
|
|
#if defined(AUDIO_DIRECTSOUND)
|
2015-06-20 05:44:05 +00:00
|
|
|
"DirectSound",
|
2013-07-29 09:42:45 +00:00
|
|
|
#endif
|
|
|
|
|
2010-08-09 13:28:56 +00:00
|
|
|
#if defined(AUDIO_ALSA)
|
2015-06-20 05:44:05 +00:00
|
|
|
"ALSA",
|
2010-08-09 13:28:56 +00:00
|
|
|
#endif
|
|
|
|
|
2015-06-20 05:44:05 +00:00
|
|
|
#if defined(AUDIO_OSS)
|
|
|
|
"OSS",
|
2010-08-09 13:28:56 +00:00
|
|
|
#endif
|
|
|
|
|
2015-06-20 05:44:05 +00:00
|
|
|
#if defined(AUDIO_OPENAL)
|
|
|
|
"OpenAL",
|
2010-08-09 13:28:56 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(AUDIO_PULSEAUDIO)
|
2015-06-20 05:44:05 +00:00
|
|
|
"PulseAudio",
|
2010-08-09 13:28:56 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(AUDIO_PULSEAUDIOSIMPLE)
|
2015-06-20 05:44:05 +00:00
|
|
|
"PulseAudioSimple",
|
2010-08-09 13:28:56 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(AUDIO_AO)
|
2015-06-20 05:44:05 +00:00
|
|
|
"libao",
|
2010-08-09 13:28:56 +00:00
|
|
|
#endif
|
|
|
|
|
2015-06-20 05:44:05 +00:00
|
|
|
"None"};
|
2010-08-09 13:28:56 +00:00
|
|
|
}
|
|
|
|
|
2011-08-14 10:34:11 +00:00
|
|
|
}
|
|
|
|
|
2015-06-20 05:44:05 +00:00
|
|
|
/* Input */
|
|
|
|
|
|
|
|
#if defined(INPUT_CARBON)
|
|
|
|
#include <ruby/input/carbon.cpp>
|
|
|
|
#endif
|
|
|
|
|
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
|
|
|
#if defined(INPUT_QUARTZ)
|
|
|
|
#include <ruby/input/quartz.cpp>
|
|
|
|
#endif
|
|
|
|
|
2015-06-20 05:44:05 +00:00
|
|
|
#if defined(INPUT_SDL)
|
|
|
|
#include <ruby/input/sdl.cpp>
|
|
|
|
#endif
|
2011-08-14 10:34:11 +00:00
|
|
|
|
2015-06-20 05:44:05 +00:00
|
|
|
#if defined(INPUT_UDEV)
|
|
|
|
#include <ruby/input/udev.cpp>
|
|
|
|
#endif
|
2010-08-09 13:28:56 +00:00
|
|
|
|
2015-06-20 05:44:05 +00:00
|
|
|
#if defined(INPUT_WINDOWS)
|
|
|
|
#include <ruby/input/windows.cpp>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(INPUT_XLIB)
|
|
|
|
#include <ruby/input/xlib.cpp>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
namespace ruby {
|
2010-08-09 13:28:56 +00:00
|
|
|
|
2015-06-20 05:44:05 +00:00
|
|
|
auto Input::create(const string& driver) -> Input* {
|
|
|
|
if(!driver) return create(optimalDriver());
|
2010-08-09 13:28:56 +00:00
|
|
|
|
2015-06-20 05:44:05 +00:00
|
|
|
#if defined(INPUT_WINDOWS)
|
|
|
|
if(driver == "Windows") return new InputWindows;
|
2010-08-09 13:28:56 +00:00
|
|
|
#endif
|
|
|
|
|
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
|
|
|
#if defined(INPUT_QUARTZ)
|
|
|
|
if(driver == "Quartz") return new InputQuartz;
|
|
|
|
#endif
|
|
|
|
|
2015-06-20 05:44:05 +00:00
|
|
|
#if defined(INPUT_CARBON)
|
|
|
|
if(driver == "Carbon") return new InputCarbon;
|
2013-03-19 08:48:50 +00:00
|
|
|
#endif
|
|
|
|
|
2015-06-20 05:44:05 +00:00
|
|
|
#if defined(INPUT_UDEV)
|
|
|
|
if(driver == "udev") return new InputUdev;
|
2013-12-21 10:45:58 +00:00
|
|
|
#endif
|
|
|
|
|
2015-06-20 05:44:05 +00:00
|
|
|
#if defined(INPUT_SDL)
|
|
|
|
if(driver == "SDL") return new InputSDL;
|
2010-08-09 13:28:56 +00:00
|
|
|
#endif
|
|
|
|
|
2015-06-20 05:44:05 +00:00
|
|
|
#if defined(INPUT_XLIB)
|
|
|
|
if(driver == "Xlib") return new InputXlib;
|
2010-08-09 13:28:56 +00:00
|
|
|
#endif
|
|
|
|
|
2015-06-20 05:44:05 +00:00
|
|
|
return new Input;
|
2010-08-09 13:28:56 +00:00
|
|
|
}
|
|
|
|
|
2015-06-20 05:44:05 +00:00
|
|
|
auto Input::optimalDriver() -> string {
|
2014-01-05 09:59:17 +00:00
|
|
|
#if defined(INPUT_WINDOWS)
|
|
|
|
return "Windows";
|
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
|
|
|
#elif defined(INPUT_QUARTZ)
|
|
|
|
return "Quartz";
|
2013-03-19 08:48:50 +00:00
|
|
|
#elif defined(INPUT_CARBON)
|
|
|
|
return "Carbon";
|
2013-12-21 10:45:58 +00:00
|
|
|
#elif defined(INPUT_UDEV)
|
|
|
|
return "udev";
|
2010-08-09 13:28:56 +00:00
|
|
|
#elif defined(INPUT_SDL)
|
|
|
|
return "SDL";
|
Update to v093r12 release.
byuu says:
I've completely redone the ethos InputManager and ruby to work on
HID::Device objects instead of one giant scancode pool.
Currently only the udev driver supports the changes to ruby, so only
Linux users will be able to compile and run this WIP build.
The nice thing about the new system is that it's now possible to
uniquely identify controllers, so if you swap out gamepads, you won't
end up with it working but with all the mappings all screwed up. Since
higan lets you map multiple physical inputs to one emulated input, you
can now configure your keyboard and multiple gamepads to the same
emulated input, and then just use whatever controller you want.
Because USB gamepad makers failed to provide unique serial#s with each
controller, we have to limit the mapping to specific USB ports.
Otherwise, we couldn't distinguish two otherwise identical gamepads. So
basically your computer USB ports act like real game console input port
numbers. Which is kind of neat, I guess.
And the really nice thing about the new system is that we now have the
capability to support hotplugging input devices. I haven't yet added
this to any drivers, but I'm definitely going to add it to udev for v094
official.
Finally, with the device ID (vendor ID + product ID) exposed, we gain
one last really cool feature that we may be able to develop more in the
future. Say we created a joypad.bml file to include with higan. In it,
we'd store the Xbox 360 controller, and pre-defined button mappings for
each emulated system. So if higan detects you have an Xbox 360
controller, you can just plug it in and use it. Even better, we can
clearly specify the difference between triggers and analog axes, and
name each individual input. So you'd see "Xbox 360 Gamepad #1: Left
Trigger" instead of higan v093's "JP0::Axis2.Hi"
Note: for right now, ethos' input manager isn't filtering the device IDs
to look pretty. So you're going to see a 64-bit hex value for a device
ID right now instead of something like Joypad#N for now.
2013-12-23 11:43:51 +00:00
|
|
|
#elif defined(INPUT_XLIB)
|
|
|
|
return "Xlib";
|
2013-07-29 09:42:45 +00:00
|
|
|
#else
|
|
|
|
return "None";
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
2015-06-20 05:44:05 +00:00
|
|
|
auto Input::safestDriver() -> string {
|
2014-01-05 09:59:17 +00:00
|
|
|
#if defined(INPUT_WINDOWS)
|
|
|
|
return "Windows";
|
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
|
|
|
#elif defined(INPUT_QUARTZ)
|
|
|
|
return "Quartz";
|
2013-07-29 09:42:45 +00:00
|
|
|
#elif defined(INPUT_CARBON)
|
|
|
|
return "Carbon";
|
2013-12-21 10:45:58 +00:00
|
|
|
#elif defined(INPUT_UDEV)
|
|
|
|
return "udev";
|
2013-07-29 09:42:45 +00:00
|
|
|
#elif defined(INPUT_SDL)
|
|
|
|
return "SDL";
|
Update to v093r12 release.
byuu says:
I've completely redone the ethos InputManager and ruby to work on
HID::Device objects instead of one giant scancode pool.
Currently only the udev driver supports the changes to ruby, so only
Linux users will be able to compile and run this WIP build.
The nice thing about the new system is that it's now possible to
uniquely identify controllers, so if you swap out gamepads, you won't
end up with it working but with all the mappings all screwed up. Since
higan lets you map multiple physical inputs to one emulated input, you
can now configure your keyboard and multiple gamepads to the same
emulated input, and then just use whatever controller you want.
Because USB gamepad makers failed to provide unique serial#s with each
controller, we have to limit the mapping to specific USB ports.
Otherwise, we couldn't distinguish two otherwise identical gamepads. So
basically your computer USB ports act like real game console input port
numbers. Which is kind of neat, I guess.
And the really nice thing about the new system is that we now have the
capability to support hotplugging input devices. I haven't yet added
this to any drivers, but I'm definitely going to add it to udev for v094
official.
Finally, with the device ID (vendor ID + product ID) exposed, we gain
one last really cool feature that we may be able to develop more in the
future. Say we created a joypad.bml file to include with higan. In it,
we'd store the Xbox 360 controller, and pre-defined button mappings for
each emulated system. So if higan detects you have an Xbox 360
controller, you can just plug it in and use it. Even better, we can
clearly specify the difference between triggers and analog axes, and
name each individual input. So you'd see "Xbox 360 Gamepad #1: Left
Trigger" instead of higan v093's "JP0::Axis2.Hi"
Note: for right now, ethos' input manager isn't filtering the device IDs
to look pretty. So you're going to see a 64-bit hex value for a device
ID right now instead of something like Joypad#N for now.
2013-12-23 11:43:51 +00:00
|
|
|
#elif defined(INPUT_XLIB)
|
|
|
|
return "Xlib";
|
2010-08-09 13:28:56 +00:00
|
|
|
#else
|
|
|
|
return "none";
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
2016-07-01 11:58:12 +00:00
|
|
|
auto Input::availableDrivers() -> string_vector {
|
2015-06-20 05:44:05 +00:00
|
|
|
return {
|
2010-08-09 13:28:56 +00:00
|
|
|
|
2014-01-05 09:59:17 +00:00
|
|
|
#if defined(INPUT_WINDOWS)
|
2015-06-20 05:44:05 +00:00
|
|
|
"Windows",
|
2010-08-09 13:28:56 +00:00
|
|
|
#endif
|
|
|
|
|
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
|
|
|
#if defined(INPUT_QUARTZ)
|
|
|
|
"Quartz",
|
|
|
|
#endif
|
|
|
|
|
2013-03-19 08:48:50 +00:00
|
|
|
#if defined(INPUT_CARBON)
|
2015-06-20 05:44:05 +00:00
|
|
|
"Carbon",
|
2013-03-19 08:48:50 +00:00
|
|
|
#endif
|
|
|
|
|
2013-12-21 10:45:58 +00:00
|
|
|
#if defined(INPUT_UDEV)
|
2015-06-20 05:44:05 +00:00
|
|
|
"udev",
|
2013-12-21 10:45:58 +00:00
|
|
|
#endif
|
|
|
|
|
2010-08-09 13:28:56 +00:00
|
|
|
#if defined(INPUT_SDL)
|
2015-06-20 05:44:05 +00:00
|
|
|
"SDL",
|
2010-08-09 13:28:56 +00:00
|
|
|
#endif
|
|
|
|
|
Update to v093r12 release.
byuu says:
I've completely redone the ethos InputManager and ruby to work on
HID::Device objects instead of one giant scancode pool.
Currently only the udev driver supports the changes to ruby, so only
Linux users will be able to compile and run this WIP build.
The nice thing about the new system is that it's now possible to
uniquely identify controllers, so if you swap out gamepads, you won't
end up with it working but with all the mappings all screwed up. Since
higan lets you map multiple physical inputs to one emulated input, you
can now configure your keyboard and multiple gamepads to the same
emulated input, and then just use whatever controller you want.
Because USB gamepad makers failed to provide unique serial#s with each
controller, we have to limit the mapping to specific USB ports.
Otherwise, we couldn't distinguish two otherwise identical gamepads. So
basically your computer USB ports act like real game console input port
numbers. Which is kind of neat, I guess.
And the really nice thing about the new system is that we now have the
capability to support hotplugging input devices. I haven't yet added
this to any drivers, but I'm definitely going to add it to udev for v094
official.
Finally, with the device ID (vendor ID + product ID) exposed, we gain
one last really cool feature that we may be able to develop more in the
future. Say we created a joypad.bml file to include with higan. In it,
we'd store the Xbox 360 controller, and pre-defined button mappings for
each emulated system. So if higan detects you have an Xbox 360
controller, you can just plug it in and use it. Even better, we can
clearly specify the difference between triggers and analog axes, and
name each individual input. So you'd see "Xbox 360 Gamepad #1: Left
Trigger" instead of higan v093's "JP0::Axis2.Hi"
Note: for right now, ethos' input manager isn't filtering the device IDs
to look pretty. So you're going to see a 64-bit hex value for a device
ID right now instead of something like Joypad#N for now.
2013-12-23 11:43:51 +00:00
|
|
|
#if defined(INPUT_XLIB)
|
2015-06-20 05:44:05 +00:00
|
|
|
"Xlib",
|
2010-08-09 13:28:56 +00:00
|
|
|
#endif
|
|
|
|
|
2015-06-20 05:44:05 +00:00
|
|
|
"None"};
|
2010-08-09 13:28:56 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|