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
|
|
|
//Xorg/GLX OpenGL 2.0 driver
|
|
|
|
|
|
|
|
//note: this is a fallback driver for use when OpenGL 3.2 is not available.
|
|
|
|
//see glx.cpp for comments on how this driver operates (they are very similar.)
|
|
|
|
|
Update to v103r18 release.
byuu says:
Changelog:
- tomoko: improved handling of changing audio devices on the audio
settings panel
- ruby/audio/wasapi: added device enumeration and selection support¹
- ruby/audio/wasapi: release property store handle from audio device
- ruby/audio/wasapi: fix exclusive mode buffer filling
- ruby/video/glx2: ported to new API -- tested and confirmed working
great²
- ruby/video/sdl: fixed initialization -- tested and confirmed working
on FreeBSD now³
- ruby/video/xv: ported to new API -- tested and mostly working great,
sans fullscreen mode⁴
Errata:
- accidentally changed "Driver Settings" label to "Driver" on the
audio settings tab because I deleted the line and forgot the
"Settings" part
- need to use "return initialize();" from setDevice() in the WASAPI
driver, instead of "return true;", so device selection is currently
not functioning in this WIP for said driver
¹: for now, this will likely end up selecting the first available
endpoint device, which is probably wrong. I need to come up with a
system to expose good 'default values' when selecting new audio drivers,
or changing audio device settings.
²: glx2 is a fallback driver for system with only OpenGL 2.0 and no
OpenGL 3.2 drivers, such as FreeBSD 10.1 with AMD graphics cards.
³: although I really should track down why InputManager::poll() is
crashing the emulator when Video::ready() returns false ...
⁴: really bizarrely, when entering fullscreen mode, it looks like the
image was a triangle strip, and the bottom right triange is missing, and
the top left triangle skews the entire image into it. I'm suspecting
this is a Radeon driver bug when trying to create a 2560x1600 X-Video
surface. The glitch persists when exiting fullscreen, too.
If anyone can test the X-Video driver on their Linux/BSD system, it'd be
appreciated. If it's just my video card, I'll ignore it. If not,
hopefully someone can find the cause of the issue :|
2017-07-20 11:52:47 +00:00
|
|
|
#if defined(DISPLAY_XORG)
|
|
|
|
#include <GL/gl.h>
|
|
|
|
#include <GL/glx.h>
|
|
|
|
#ifndef glGetProcAddress
|
|
|
|
#define glGetProcAddress(name) (*glXGetProcAddress)((const GLubyte*)(name))
|
|
|
|
#endif
|
|
|
|
#elif defined(DISPLAY_QUARTZ)
|
|
|
|
#include <OpenGL/gl3.h>
|
|
|
|
#elif defined(DISPLAY_WINDOWS)
|
|
|
|
#include <GL/gl.h>
|
|
|
|
#include <GL/glext.h>
|
|
|
|
#ifndef glGetProcAddress
|
|
|
|
#define glGetProcAddress(name) wglGetProcAddress(name)
|
|
|
|
#endif
|
|
|
|
#else
|
|
|
|
#error "ruby::OpenGL2: unsupported platform"
|
|
|
|
#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
|
|
|
|
2018-07-31 02:23:12 +00:00
|
|
|
struct VideoGLX2 : VideoDriver {
|
2018-08-05 09:00:15 +00:00
|
|
|
VideoGLX2& self = *this;
|
2019-07-07 09:44:09 +00:00
|
|
|
VideoGLX2(Video& super) : VideoDriver(super) { construct(); }
|
|
|
|
~VideoGLX2() { destruct(); }
|
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
|
|
|
|
2018-07-31 02:23:12 +00:00
|
|
|
auto create() -> bool {
|
|
|
|
super.setFormat("RGB24");
|
|
|
|
return initialize();
|
|
|
|
}
|
|
|
|
|
2018-08-09 04:15:56 +00:00
|
|
|
auto driver() -> string override { return "OpenGL 2.0"; }
|
Update to 20180728 release.
byuu says:
Sigh, I seem to be spiraling a bit here ... but the work is very
important. Hopefully I can get a solid WIP together soon. But for now...
I've integrated dynamic rate control into ruby::Audio via
setDynamic(bool) for now. It's very demanding, as you would expect. When
it's not in use, I realized the OSS driver's performance was pretty bad
due to calling write() for every sample for every channel. I implemented
a tiny 256-sample buffer and bsnes went from 290fps to 330fps on my
FreeBSD desktop. It may be possible to do the same buffering with DRC,
but for now, I'm not doing so, and adjusting the audio input frequency
on every sample.
I also added ruby::Video::setFlush(bool), which is available only in the
OpenGL drivers, and this causes glFinish() to be called after swapping
display buffers. I really couldn't think of a good name for this, "hard
GPU sync" sounds kind of silly. In my view, flush is what commits queued
events. Eg fflush(). OpenGL of course treats glFlush differently (I
really don't even know what the point of it is even after reading the
manual ...), and then has glFinish ... meh, whatever. It's
setFlush(bool) until I come up with something better. Also as expected,
this one's a big hit to performance.
To implement the DRC, I started putting helper functions into the ruby
video/audio/input core classes. And then the XVideo driver started
crashing. It took hours and hours and hours to track down the problem:
you have to clear XSetWindowAttributes to zero before calling
XCreateWindow. No amount of `--sync`, `gdb break gdk_x_error`, `-Og`,
etc will make Xlib be even remotely helpful in debugging errors like
this.
The GLX, GLX2, and XVideo drivers basically worked by chance before. If
the stack frame had the right memory cleared, it worked. Otherwise it'd
crash with BadValue, and my changing things broke that condition on the
XVideo driver. So this has been fixed in all three now.
Once XVideo was running again, I realized that non-power of two video
sizes were completely broken for the YUV formats. It took a while, but I
managed to fix all of that as well.
At this point, most of ruby is going to be broken outside of FreeBSD, as
I still need to finish updating all the drivers.
2018-07-28 11:21:39 +00:00
|
|
|
auto ready() -> bool override { return _ready; }
|
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
|
|
|
|
2019-07-07 09:44:09 +00:00
|
|
|
auto hasExclusive() -> bool override { return true; }
|
Update to 20180728 release.
byuu says:
Sigh, I seem to be spiraling a bit here ... but the work is very
important. Hopefully I can get a solid WIP together soon. But for now...
I've integrated dynamic rate control into ruby::Audio via
setDynamic(bool) for now. It's very demanding, as you would expect. When
it's not in use, I realized the OSS driver's performance was pretty bad
due to calling write() for every sample for every channel. I implemented
a tiny 256-sample buffer and bsnes went from 290fps to 330fps on my
FreeBSD desktop. It may be possible to do the same buffering with DRC,
but for now, I'm not doing so, and adjusting the audio input frequency
on every sample.
I also added ruby::Video::setFlush(bool), which is available only in the
OpenGL drivers, and this causes glFinish() to be called after swapping
display buffers. I really couldn't think of a good name for this, "hard
GPU sync" sounds kind of silly. In my view, flush is what commits queued
events. Eg fflush(). OpenGL of course treats glFlush differently (I
really don't even know what the point of it is even after reading the
manual ...), and then has glFinish ... meh, whatever. It's
setFlush(bool) until I come up with something better. Also as expected,
this one's a big hit to performance.
To implement the DRC, I started putting helper functions into the ruby
video/audio/input core classes. And then the XVideo driver started
crashing. It took hours and hours and hours to track down the problem:
you have to clear XSetWindowAttributes to zero before calling
XCreateWindow. No amount of `--sync`, `gdb break gdk_x_error`, `-Og`,
etc will make Xlib be even remotely helpful in debugging errors like
this.
The GLX, GLX2, and XVideo drivers basically worked by chance before. If
the stack frame had the right memory cleared, it worked. Otherwise it'd
crash with BadValue, and my changing things broke that condition on the
XVideo driver. So this has been fixed in all three now.
Once XVideo was running again, I realized that non-power of two video
sizes were completely broken for the YUV formats. It took a while, but I
managed to fix all of that as well.
At this point, most of ruby is going to be broken outside of FreeBSD, as
I still need to finish updating all the drivers.
2018-07-28 11:21:39 +00:00
|
|
|
auto hasContext() -> bool override { return true; }
|
|
|
|
auto hasBlocking() -> bool override { return true; }
|
|
|
|
auto hasFlush() -> bool override { return true; }
|
2018-08-21 03:17:12 +00:00
|
|
|
auto hasShader() -> bool override { return true; }
|
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
|
|
|
|
2019-07-07 09:44:09 +00:00
|
|
|
auto hasFormats() -> vector<string> override {
|
|
|
|
if(_depth == 30) return {"RGB30", "RGB24"};
|
|
|
|
if(_depth == 24) return {"RGB24"};
|
|
|
|
return {"RGB24"}; //fallback
|
|
|
|
}
|
|
|
|
|
|
|
|
auto setExclusive(bool exclusive) -> bool override {
|
|
|
|
return initialize();
|
|
|
|
}
|
|
|
|
|
Update to 20180728 release.
byuu says:
Sigh, I seem to be spiraling a bit here ... but the work is very
important. Hopefully I can get a solid WIP together soon. But for now...
I've integrated dynamic rate control into ruby::Audio via
setDynamic(bool) for now. It's very demanding, as you would expect. When
it's not in use, I realized the OSS driver's performance was pretty bad
due to calling write() for every sample for every channel. I implemented
a tiny 256-sample buffer and bsnes went from 290fps to 330fps on my
FreeBSD desktop. It may be possible to do the same buffering with DRC,
but for now, I'm not doing so, and adjusting the audio input frequency
on every sample.
I also added ruby::Video::setFlush(bool), which is available only in the
OpenGL drivers, and this causes glFinish() to be called after swapping
display buffers. I really couldn't think of a good name for this, "hard
GPU sync" sounds kind of silly. In my view, flush is what commits queued
events. Eg fflush(). OpenGL of course treats glFlush differently (I
really don't even know what the point of it is even after reading the
manual ...), and then has glFinish ... meh, whatever. It's
setFlush(bool) until I come up with something better. Also as expected,
this one's a big hit to performance.
To implement the DRC, I started putting helper functions into the ruby
video/audio/input core classes. And then the XVideo driver started
crashing. It took hours and hours and hours to track down the problem:
you have to clear XSetWindowAttributes to zero before calling
XCreateWindow. No amount of `--sync`, `gdb break gdk_x_error`, `-Og`,
etc will make Xlib be even remotely helpful in debugging errors like
this.
The GLX, GLX2, and XVideo drivers basically worked by chance before. If
the stack frame had the right memory cleared, it worked. Otherwise it'd
crash with BadValue, and my changing things broke that condition on the
XVideo driver. So this has been fixed in all three now.
Once XVideo was running again, I realized that non-power of two video
sizes were completely broken for the YUV formats. It took a while, but I
managed to fix all of that as well.
At this point, most of ruby is going to be broken outside of FreeBSD, as
I still need to finish updating all the drivers.
2018-07-28 11:21:39 +00:00
|
|
|
auto setContext(uintptr context) -> bool override {
|
Update to v103r18 release.
byuu says:
Changelog:
- tomoko: improved handling of changing audio devices on the audio
settings panel
- ruby/audio/wasapi: added device enumeration and selection support¹
- ruby/audio/wasapi: release property store handle from audio device
- ruby/audio/wasapi: fix exclusive mode buffer filling
- ruby/video/glx2: ported to new API -- tested and confirmed working
great²
- ruby/video/sdl: fixed initialization -- tested and confirmed working
on FreeBSD now³
- ruby/video/xv: ported to new API -- tested and mostly working great,
sans fullscreen mode⁴
Errata:
- accidentally changed "Driver Settings" label to "Driver" on the
audio settings tab because I deleted the line and forgot the
"Settings" part
- need to use "return initialize();" from setDevice() in the WASAPI
driver, instead of "return true;", so device selection is currently
not functioning in this WIP for said driver
¹: for now, this will likely end up selecting the first available
endpoint device, which is probably wrong. I need to come up with a
system to expose good 'default values' when selecting new audio drivers,
or changing audio device settings.
²: glx2 is a fallback driver for system with only OpenGL 2.0 and no
OpenGL 3.2 drivers, such as FreeBSD 10.1 with AMD graphics cards.
³: although I really should track down why InputManager::poll() is
crashing the emulator when Video::ready() returns false ...
⁴: really bizarrely, when entering fullscreen mode, it looks like the
image was a triangle strip, and the bottom right triange is missing, and
the top left triangle skews the entire image into it. I'm suspecting
this is a Radeon driver bug when trying to create a 2560x1600 X-Video
surface. The glitch persists when exiting fullscreen, too.
If anyone can test the X-Video driver on their Linux/BSD system, it'd be
appreciated. If it's just my video card, I'll ignore it. If not,
hopefully someone can find the cause of the issue :|
2017-07-20 11:52:47 +00:00
|
|
|
return initialize();
|
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
|
|
|
}
|
|
|
|
|
Update to 20180728 release.
byuu says:
Sigh, I seem to be spiraling a bit here ... but the work is very
important. Hopefully I can get a solid WIP together soon. But for now...
I've integrated dynamic rate control into ruby::Audio via
setDynamic(bool) for now. It's very demanding, as you would expect. When
it's not in use, I realized the OSS driver's performance was pretty bad
due to calling write() for every sample for every channel. I implemented
a tiny 256-sample buffer and bsnes went from 290fps to 330fps on my
FreeBSD desktop. It may be possible to do the same buffering with DRC,
but for now, I'm not doing so, and adjusting the audio input frequency
on every sample.
I also added ruby::Video::setFlush(bool), which is available only in the
OpenGL drivers, and this causes glFinish() to be called after swapping
display buffers. I really couldn't think of a good name for this, "hard
GPU sync" sounds kind of silly. In my view, flush is what commits queued
events. Eg fflush(). OpenGL of course treats glFlush differently (I
really don't even know what the point of it is even after reading the
manual ...), and then has glFinish ... meh, whatever. It's
setFlush(bool) until I come up with something better. Also as expected,
this one's a big hit to performance.
To implement the DRC, I started putting helper functions into the ruby
video/audio/input core classes. And then the XVideo driver started
crashing. It took hours and hours and hours to track down the problem:
you have to clear XSetWindowAttributes to zero before calling
XCreateWindow. No amount of `--sync`, `gdb break gdk_x_error`, `-Og`,
etc will make Xlib be even remotely helpful in debugging errors like
this.
The GLX, GLX2, and XVideo drivers basically worked by chance before. If
the stack frame had the right memory cleared, it worked. Otherwise it'd
crash with BadValue, and my changing things broke that condition on the
XVideo driver. So this has been fixed in all three now.
Once XVideo was running again, I realized that non-power of two video
sizes were completely broken for the YUV formats. It took a while, but I
managed to fix all of that as well.
At this point, most of ruby is going to be broken outside of FreeBSD, as
I still need to finish updating all the drivers.
2018-07-28 11:21:39 +00:00
|
|
|
auto setBlocking(bool blocking) -> bool override {
|
Update to 20180729 release.
byuu wrote:
Sigh ...
asio.hpp needs #include <nall/windows/registry.hpp>
[Since the last WIP, byuu also posted the following message. -Ed.]
ruby drivers have all been updated (but not tested outside of BSD), and
I redesigned the settings window. The driver functionality all exists on
a new "Drivers" panel, the emulator/hack settings go to a
"Configuration" panel, and the video/audio panels lose driver settings.
As does the settings menu and its synchronize options.
I want to start pushing toward a v107 release. Critically, I will need
DirectSound and ALSA to support dynamic rate control. I'd also like to
eliminate the other system manifest.bml files. I need to update the
cheat code database format, and bundle at least a few quark shaders --
although I still need to default to Direct3D on Windows.
Turbo keys would be nice, if it's not too much effort. Aside from
netplay, it's the last significant feature I'm missing.
I think for v107, higan is going to be a bit rough around the edges
compared to bsnes. And I don't think it's practical to finish the bsnes
localization support.
I'm thinking we probably want another WIP to iron out any critical
issues, but this time there should be a feature freeze with the next
WIP.
2018-07-29 13:24:38 +00:00
|
|
|
if(glXSwapInterval) glXSwapInterval(blocking);
|
Update to v103r18 release.
byuu says:
Changelog:
- tomoko: improved handling of changing audio devices on the audio
settings panel
- ruby/audio/wasapi: added device enumeration and selection support¹
- ruby/audio/wasapi: release property store handle from audio device
- ruby/audio/wasapi: fix exclusive mode buffer filling
- ruby/video/glx2: ported to new API -- tested and confirmed working
great²
- ruby/video/sdl: fixed initialization -- tested and confirmed working
on FreeBSD now³
- ruby/video/xv: ported to new API -- tested and mostly working great,
sans fullscreen mode⁴
Errata:
- accidentally changed "Driver Settings" label to "Driver" on the
audio settings tab because I deleted the line and forgot the
"Settings" part
- need to use "return initialize();" from setDevice() in the WASAPI
driver, instead of "return true;", so device selection is currently
not functioning in this WIP for said driver
¹: for now, this will likely end up selecting the first available
endpoint device, which is probably wrong. I need to come up with a
system to expose good 'default values' when selecting new audio drivers,
or changing audio device settings.
²: glx2 is a fallback driver for system with only OpenGL 2.0 and no
OpenGL 3.2 drivers, such as FreeBSD 10.1 with AMD graphics cards.
³: although I really should track down why InputManager::poll() is
crashing the emulator when Video::ready() returns false ...
⁴: really bizarrely, when entering fullscreen mode, it looks like the
image was a triangle strip, and the bottom right triange is missing, and
the top left triangle skews the entire image into it. I'm suspecting
this is a Radeon driver bug when trying to create a 2560x1600 X-Video
surface. The glitch persists when exiting fullscreen, too.
If anyone can test the X-Video driver on their Linux/BSD system, it'd be
appreciated. If it's just my video card, I'll ignore it. If not,
hopefully someone can find the cause of the issue :|
2017-07-20 11:52:47 +00:00
|
|
|
return true;
|
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
|
|
|
}
|
|
|
|
|
Update to 20180729 release.
byuu wrote:
Sigh ...
asio.hpp needs #include <nall/windows/registry.hpp>
[Since the last WIP, byuu also posted the following message. -Ed.]
ruby drivers have all been updated (but not tested outside of BSD), and
I redesigned the settings window. The driver functionality all exists on
a new "Drivers" panel, the emulator/hack settings go to a
"Configuration" panel, and the video/audio panels lose driver settings.
As does the settings menu and its synchronize options.
I want to start pushing toward a v107 release. Critically, I will need
DirectSound and ALSA to support dynamic rate control. I'd also like to
eliminate the other system manifest.bml files. I need to update the
cheat code database format, and bundle at least a few quark shaders --
although I still need to default to Direct3D on Windows.
Turbo keys would be nice, if it's not too much effort. Aside from
netplay, it's the last significant feature I'm missing.
I think for v107, higan is going to be a bit rough around the edges
compared to bsnes. And I don't think it's practical to finish the bsnes
localization support.
I'm thinking we probably want another WIP to iron out any critical
issues, but this time there should be a feature freeze with the next
WIP.
2018-07-29 13:24:38 +00:00
|
|
|
auto setFormat(string format) -> bool override {
|
|
|
|
if(format == "RGB24") {
|
|
|
|
_glFormat = GL_UNSIGNED_INT_8_8_8_8_REV;
|
|
|
|
return initialize();
|
|
|
|
}
|
|
|
|
|
|
|
|
if(format == "RGB30") {
|
|
|
|
_glFormat = GL_UNSIGNED_INT_2_10_10_10_REV;
|
|
|
|
return initialize();
|
|
|
|
}
|
|
|
|
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2018-08-21 03:17:12 +00:00
|
|
|
auto setShader(string shader) -> bool override {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
Update to 20180728 release.
byuu says:
Sigh, I seem to be spiraling a bit here ... but the work is very
important. Hopefully I can get a solid WIP together soon. But for now...
I've integrated dynamic rate control into ruby::Audio via
setDynamic(bool) for now. It's very demanding, as you would expect. When
it's not in use, I realized the OSS driver's performance was pretty bad
due to calling write() for every sample for every channel. I implemented
a tiny 256-sample buffer and bsnes went from 290fps to 330fps on my
FreeBSD desktop. It may be possible to do the same buffering with DRC,
but for now, I'm not doing so, and adjusting the audio input frequency
on every sample.
I also added ruby::Video::setFlush(bool), which is available only in the
OpenGL drivers, and this causes glFinish() to be called after swapping
display buffers. I really couldn't think of a good name for this, "hard
GPU sync" sounds kind of silly. In my view, flush is what commits queued
events. Eg fflush(). OpenGL of course treats glFlush differently (I
really don't even know what the point of it is even after reading the
manual ...), and then has glFinish ... meh, whatever. It's
setFlush(bool) until I come up with something better. Also as expected,
this one's a big hit to performance.
To implement the DRC, I started putting helper functions into the ruby
video/audio/input core classes. And then the XVideo driver started
crashing. It took hours and hours and hours to track down the problem:
you have to clear XSetWindowAttributes to zero before calling
XCreateWindow. No amount of `--sync`, `gdb break gdk_x_error`, `-Og`,
etc will make Xlib be even remotely helpful in debugging errors like
this.
The GLX, GLX2, and XVideo drivers basically worked by chance before. If
the stack frame had the right memory cleared, it worked. Otherwise it'd
crash with BadValue, and my changing things broke that condition on the
XVideo driver. So this has been fixed in all three now.
Once XVideo was running again, I realized that non-power of two video
sizes were completely broken for the YUV formats. It took a while, but I
managed to fix all of that as well.
At this point, most of ruby is going to be broken outside of FreeBSD, as
I still need to finish updating all the drivers.
2018-07-28 11:21:39 +00:00
|
|
|
auto clear() -> void override {
|
2018-05-28 01:16:27 +00:00
|
|
|
memory::fill<uint32_t>(_glBuffer, _glWidth * _glHeight);
|
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
|
|
|
glClearColor(0.0, 0.0, 0.0, 1.0);
|
|
|
|
glClear(GL_COLOR_BUFFER_BIT);
|
|
|
|
glFlush();
|
Update to v103r18 release.
byuu says:
Changelog:
- tomoko: improved handling of changing audio devices on the audio
settings panel
- ruby/audio/wasapi: added device enumeration and selection support¹
- ruby/audio/wasapi: release property store handle from audio device
- ruby/audio/wasapi: fix exclusive mode buffer filling
- ruby/video/glx2: ported to new API -- tested and confirmed working
great²
- ruby/video/sdl: fixed initialization -- tested and confirmed working
on FreeBSD now³
- ruby/video/xv: ported to new API -- tested and mostly working great,
sans fullscreen mode⁴
Errata:
- accidentally changed "Driver Settings" label to "Driver" on the
audio settings tab because I deleted the line and forgot the
"Settings" part
- need to use "return initialize();" from setDevice() in the WASAPI
driver, instead of "return true;", so device selection is currently
not functioning in this WIP for said driver
¹: for now, this will likely end up selecting the first available
endpoint device, which is probably wrong. I need to come up with a
system to expose good 'default values' when selecting new audio drivers,
or changing audio device settings.
²: glx2 is a fallback driver for system with only OpenGL 2.0 and no
OpenGL 3.2 drivers, such as FreeBSD 10.1 with AMD graphics cards.
³: although I really should track down why InputManager::poll() is
crashing the emulator when Video::ready() returns false ...
⁴: really bizarrely, when entering fullscreen mode, it looks like the
image was a triangle strip, and the bottom right triange is missing, and
the top left triangle skews the entire image into it. I'm suspecting
this is a Radeon driver bug when trying to create a 2560x1600 X-Video
surface. The glitch persists when exiting fullscreen, too.
If anyone can test the X-Video driver on their Linux/BSD system, it'd be
appreciated. If it's just my video card, I'll ignore it. If not,
hopefully someone can find the cause of the issue :|
2017-07-20 11:52:47 +00:00
|
|
|
if(_isDoubleBuffered) glXSwapBuffers(_display, _glXWindow);
|
|
|
|
}
|
|
|
|
|
2019-07-07 09:44:09 +00:00
|
|
|
auto size(uint& width, uint& height) -> void override {
|
|
|
|
XWindowAttributes window;
|
|
|
|
XGetWindowAttributes(_display, _window, &window);
|
|
|
|
|
|
|
|
XWindowAttributes parent;
|
|
|
|
XGetWindowAttributes(_display, _parent, &parent);
|
|
|
|
|
|
|
|
if(window.width != parent.width || window.height != parent.height) {
|
|
|
|
XResizeWindow(_display, _window, parent.width, parent.height);
|
|
|
|
}
|
|
|
|
|
|
|
|
width = parent.width;
|
|
|
|
height = parent.height;
|
|
|
|
}
|
|
|
|
|
Update to 20180729 release.
byuu wrote:
Sigh ...
asio.hpp needs #include <nall/windows/registry.hpp>
[Since the last WIP, byuu also posted the following message. -Ed.]
ruby drivers have all been updated (but not tested outside of BSD), and
I redesigned the settings window. The driver functionality all exists on
a new "Drivers" panel, the emulator/hack settings go to a
"Configuration" panel, and the video/audio panels lose driver settings.
As does the settings menu and its synchronize options.
I want to start pushing toward a v107 release. Critically, I will need
DirectSound and ALSA to support dynamic rate control. I'd also like to
eliminate the other system manifest.bml files. I need to update the
cheat code database format, and bundle at least a few quark shaders --
although I still need to default to Direct3D on Windows.
Turbo keys would be nice, if it's not too much effort. Aside from
netplay, it's the last significant feature I'm missing.
I think for v107, higan is going to be a bit rough around the edges
compared to bsnes. And I don't think it's practical to finish the bsnes
localization support.
I'm thinking we probably want another WIP to iron out any critical
issues, but this time there should be a feature freeze with the next
WIP.
2018-07-29 13:24:38 +00:00
|
|
|
auto acquire(uint32_t*& data, uint& pitch, uint width, uint height) -> bool override {
|
Update to v103r18 release.
byuu says:
Changelog:
- tomoko: improved handling of changing audio devices on the audio
settings panel
- ruby/audio/wasapi: added device enumeration and selection support¹
- ruby/audio/wasapi: release property store handle from audio device
- ruby/audio/wasapi: fix exclusive mode buffer filling
- ruby/video/glx2: ported to new API -- tested and confirmed working
great²
- ruby/video/sdl: fixed initialization -- tested and confirmed working
on FreeBSD now³
- ruby/video/xv: ported to new API -- tested and mostly working great,
sans fullscreen mode⁴
Errata:
- accidentally changed "Driver Settings" label to "Driver" on the
audio settings tab because I deleted the line and forgot the
"Settings" part
- need to use "return initialize();" from setDevice() in the WASAPI
driver, instead of "return true;", so device selection is currently
not functioning in this WIP for said driver
¹: for now, this will likely end up selecting the first available
endpoint device, which is probably wrong. I need to come up with a
system to expose good 'default values' when selecting new audio drivers,
or changing audio device settings.
²: glx2 is a fallback driver for system with only OpenGL 2.0 and no
OpenGL 3.2 drivers, such as FreeBSD 10.1 with AMD graphics cards.
³: although I really should track down why InputManager::poll() is
crashing the emulator when Video::ready() returns false ...
⁴: really bizarrely, when entering fullscreen mode, it looks like the
image was a triangle strip, and the bottom right triange is missing, and
the top left triangle skews the entire image into it. I'm suspecting
this is a Radeon driver bug when trying to create a 2560x1600 X-Video
surface. The glitch persists when exiting fullscreen, too.
If anyone can test the X-Video driver on their Linux/BSD system, it'd be
appreciated. If it's just my video card, I'll ignore it. If not,
hopefully someone can find the cause of the issue :|
2017-07-20 11:52:47 +00:00
|
|
|
if(width != _width || height != _height) resize(width, height);
|
|
|
|
pitch = _glWidth * sizeof(uint32_t);
|
|
|
|
return data = _glBuffer;
|
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
|
|
|
}
|
|
|
|
|
Update to 20180729 release.
byuu wrote:
Sigh ...
asio.hpp needs #include <nall/windows/registry.hpp>
[Since the last WIP, byuu also posted the following message. -Ed.]
ruby drivers have all been updated (but not tested outside of BSD), and
I redesigned the settings window. The driver functionality all exists on
a new "Drivers" panel, the emulator/hack settings go to a
"Configuration" panel, and the video/audio panels lose driver settings.
As does the settings menu and its synchronize options.
I want to start pushing toward a v107 release. Critically, I will need
DirectSound and ALSA to support dynamic rate control. I'd also like to
eliminate the other system manifest.bml files. I need to update the
cheat code database format, and bundle at least a few quark shaders --
although I still need to default to Direct3D on Windows.
Turbo keys would be nice, if it's not too much effort. Aside from
netplay, it's the last significant feature I'm missing.
I think for v107, higan is going to be a bit rough around the edges
compared to bsnes. And I don't think it's practical to finish the bsnes
localization support.
I'm thinking we probably want another WIP to iron out any critical
issues, but this time there should be a feature freeze with the next
WIP.
2018-07-29 13:24:38 +00:00
|
|
|
auto release() -> void override {
|
Update to v103r18 release.
byuu says:
Changelog:
- tomoko: improved handling of changing audio devices on the audio
settings panel
- ruby/audio/wasapi: added device enumeration and selection support¹
- ruby/audio/wasapi: release property store handle from audio device
- ruby/audio/wasapi: fix exclusive mode buffer filling
- ruby/video/glx2: ported to new API -- tested and confirmed working
great²
- ruby/video/sdl: fixed initialization -- tested and confirmed working
on FreeBSD now³
- ruby/video/xv: ported to new API -- tested and mostly working great,
sans fullscreen mode⁴
Errata:
- accidentally changed "Driver Settings" label to "Driver" on the
audio settings tab because I deleted the line and forgot the
"Settings" part
- need to use "return initialize();" from setDevice() in the WASAPI
driver, instead of "return true;", so device selection is currently
not functioning in this WIP for said driver
¹: for now, this will likely end up selecting the first available
endpoint device, which is probably wrong. I need to come up with a
system to expose good 'default values' when selecting new audio drivers,
or changing audio device settings.
²: glx2 is a fallback driver for system with only OpenGL 2.0 and no
OpenGL 3.2 drivers, such as FreeBSD 10.1 with AMD graphics cards.
³: although I really should track down why InputManager::poll() is
crashing the emulator when Video::ready() returns false ...
⁴: really bizarrely, when entering fullscreen mode, it looks like the
image was a triangle strip, and the bottom right triange is missing, and
the top left triangle skews the entire image into it. I'm suspecting
this is a Radeon driver bug when trying to create a 2560x1600 X-Video
surface. The glitch persists when exiting fullscreen, too.
If anyone can test the X-Video driver on their Linux/BSD system, it'd be
appreciated. If it's just my video card, I'll ignore it. If not,
hopefully someone can find the cause of the issue :|
2017-07-20 11:52:47 +00:00
|
|
|
}
|
|
|
|
|
2019-07-07 09:44:09 +00:00
|
|
|
auto output(uint width, uint height) -> void override {
|
|
|
|
uint windowWidth, windowHeight;
|
|
|
|
size(windowWidth, windowHeight);
|
|
|
|
|
|
|
|
if(!width) width = windowWidth;
|
|
|
|
if(!height) height = windowHeight;
|
|
|
|
int x = ((int)windowWidth - (int)width) / 2;
|
|
|
|
int y = ((int)windowHeight - (int)height) / 2;
|
|
|
|
|
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
|
|
|
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_BORDER);
|
|
|
|
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_BORDER);
|
2018-08-21 03:17:12 +00:00
|
|
|
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, self.shader == "Blur" ? GL_LINEAR : GL_NEAREST);
|
|
|
|
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, self.shader == "Blur" ? GL_LINEAR : GL_NEAREST);
|
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
|
|
|
|
|
|
|
glMatrixMode(GL_PROJECTION);
|
|
|
|
glLoadIdentity();
|
2019-07-07 09:44:09 +00:00
|
|
|
glOrtho(0, windowWidth, 0, windowHeight, -1.0, 1.0);
|
|
|
|
glViewport(x, y, width, height);
|
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
|
|
|
|
|
|
|
glMatrixMode(GL_MODELVIEW);
|
|
|
|
glLoadIdentity();
|
Update to v103r18 release.
byuu says:
Changelog:
- tomoko: improved handling of changing audio devices on the audio
settings panel
- ruby/audio/wasapi: added device enumeration and selection support¹
- ruby/audio/wasapi: release property store handle from audio device
- ruby/audio/wasapi: fix exclusive mode buffer filling
- ruby/video/glx2: ported to new API -- tested and confirmed working
great²
- ruby/video/sdl: fixed initialization -- tested and confirmed working
on FreeBSD now³
- ruby/video/xv: ported to new API -- tested and mostly working great,
sans fullscreen mode⁴
Errata:
- accidentally changed "Driver Settings" label to "Driver" on the
audio settings tab because I deleted the line and forgot the
"Settings" part
- need to use "return initialize();" from setDevice() in the WASAPI
driver, instead of "return true;", so device selection is currently
not functioning in this WIP for said driver
¹: for now, this will likely end up selecting the first available
endpoint device, which is probably wrong. I need to come up with a
system to expose good 'default values' when selecting new audio drivers,
or changing audio device settings.
²: glx2 is a fallback driver for system with only OpenGL 2.0 and no
OpenGL 3.2 drivers, such as FreeBSD 10.1 with AMD graphics cards.
³: although I really should track down why InputManager::poll() is
crashing the emulator when Video::ready() returns false ...
⁴: really bizarrely, when entering fullscreen mode, it looks like the
image was a triangle strip, and the bottom right triange is missing, and
the top left triangle skews the entire image into it. I'm suspecting
this is a Radeon driver bug when trying to create a 2560x1600 X-Video
surface. The glitch persists when exiting fullscreen, too.
If anyone can test the X-Video driver on their Linux/BSD system, it'd be
appreciated. If it's just my video card, I'll ignore it. If not,
hopefully someone can find the cause of the issue :|
2017-07-20 11:52:47 +00:00
|
|
|
glPixelStorei(GL_UNPACK_ROW_LENGTH, _glWidth);
|
Update to 20180729 release.
byuu wrote:
Sigh ...
asio.hpp needs #include <nall/windows/registry.hpp>
[Since the last WIP, byuu also posted the following message. -Ed.]
ruby drivers have all been updated (but not tested outside of BSD), and
I redesigned the settings window. The driver functionality all exists on
a new "Drivers" panel, the emulator/hack settings go to a
"Configuration" panel, and the video/audio panels lose driver settings.
As does the settings menu and its synchronize options.
I want to start pushing toward a v107 release. Critically, I will need
DirectSound and ALSA to support dynamic rate control. I'd also like to
eliminate the other system manifest.bml files. I need to update the
cheat code database format, and bundle at least a few quark shaders --
although I still need to default to Direct3D on Windows.
Turbo keys would be nice, if it's not too much effort. Aside from
netplay, it's the last significant feature I'm missing.
I think for v107, higan is going to be a bit rough around the edges
compared to bsnes. And I don't think it's practical to finish the bsnes
localization support.
I'm thinking we probably want another WIP to iron out any critical
issues, but this time there should be a feature freeze with the next
WIP.
2018-07-29 13:24:38 +00:00
|
|
|
glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, _width, _height, GL_BGRA, _glFormat, _glBuffer);
|
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
|
|
|
|
Update to v103r18 release.
byuu says:
Changelog:
- tomoko: improved handling of changing audio devices on the audio
settings panel
- ruby/audio/wasapi: added device enumeration and selection support¹
- ruby/audio/wasapi: release property store handle from audio device
- ruby/audio/wasapi: fix exclusive mode buffer filling
- ruby/video/glx2: ported to new API -- tested and confirmed working
great²
- ruby/video/sdl: fixed initialization -- tested and confirmed working
on FreeBSD now³
- ruby/video/xv: ported to new API -- tested and mostly working great,
sans fullscreen mode⁴
Errata:
- accidentally changed "Driver Settings" label to "Driver" on the
audio settings tab because I deleted the line and forgot the
"Settings" part
- need to use "return initialize();" from setDevice() in the WASAPI
driver, instead of "return true;", so device selection is currently
not functioning in this WIP for said driver
¹: for now, this will likely end up selecting the first available
endpoint device, which is probably wrong. I need to come up with a
system to expose good 'default values' when selecting new audio drivers,
or changing audio device settings.
²: glx2 is a fallback driver for system with only OpenGL 2.0 and no
OpenGL 3.2 drivers, such as FreeBSD 10.1 with AMD graphics cards.
³: although I really should track down why InputManager::poll() is
crashing the emulator when Video::ready() returns false ...
⁴: really bizarrely, when entering fullscreen mode, it looks like the
image was a triangle strip, and the bottom right triange is missing, and
the top left triangle skews the entire image into it. I'm suspecting
this is a Radeon driver bug when trying to create a 2560x1600 X-Video
surface. The glitch persists when exiting fullscreen, too.
If anyone can test the X-Video driver on their Linux/BSD system, it'd be
appreciated. If it's just my video card, I'll ignore it. If not,
hopefully someone can find the cause of the issue :|
2017-07-20 11:52:47 +00:00
|
|
|
double w = (double)_width / (double)_glWidth;
|
|
|
|
double h = (double)_height / (double)_glHeight;
|
2019-07-07 09:44:09 +00:00
|
|
|
int u = windowWidth;
|
|
|
|
int v = windowHeight;
|
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
|
|
|
|
|
|
|
glBegin(GL_TRIANGLE_STRIP);
|
|
|
|
glTexCoord2f(0, 0); glVertex3i(0, v, 0);
|
|
|
|
glTexCoord2f(w, 0); glVertex3i(u, v, 0);
|
|
|
|
glTexCoord2f(0, h); glVertex3i(0, 0, 0);
|
|
|
|
glTexCoord2f(w, h); glVertex3i(u, 0, 0);
|
|
|
|
glEnd();
|
|
|
|
glFlush();
|
|
|
|
|
Update to v103r18 release.
byuu says:
Changelog:
- tomoko: improved handling of changing audio devices on the audio
settings panel
- ruby/audio/wasapi: added device enumeration and selection support¹
- ruby/audio/wasapi: release property store handle from audio device
- ruby/audio/wasapi: fix exclusive mode buffer filling
- ruby/video/glx2: ported to new API -- tested and confirmed working
great²
- ruby/video/sdl: fixed initialization -- tested and confirmed working
on FreeBSD now³
- ruby/video/xv: ported to new API -- tested and mostly working great,
sans fullscreen mode⁴
Errata:
- accidentally changed "Driver Settings" label to "Driver" on the
audio settings tab because I deleted the line and forgot the
"Settings" part
- need to use "return initialize();" from setDevice() in the WASAPI
driver, instead of "return true;", so device selection is currently
not functioning in this WIP for said driver
¹: for now, this will likely end up selecting the first available
endpoint device, which is probably wrong. I need to come up with a
system to expose good 'default values' when selecting new audio drivers,
or changing audio device settings.
²: glx2 is a fallback driver for system with only OpenGL 2.0 and no
OpenGL 3.2 drivers, such as FreeBSD 10.1 with AMD graphics cards.
³: although I really should track down why InputManager::poll() is
crashing the emulator when Video::ready() returns false ...
⁴: really bizarrely, when entering fullscreen mode, it looks like the
image was a triangle strip, and the bottom right triange is missing, and
the top left triangle skews the entire image into it. I'm suspecting
this is a Radeon driver bug when trying to create a 2560x1600 X-Video
surface. The glitch persists when exiting fullscreen, too.
If anyone can test the X-Video driver on their Linux/BSD system, it'd be
appreciated. If it's just my video card, I'll ignore it. If not,
hopefully someone can find the cause of the issue :|
2017-07-20 11:52:47 +00:00
|
|
|
if(_isDoubleBuffered) glXSwapBuffers(_display, _glXWindow);
|
2018-07-31 02:23:12 +00:00
|
|
|
if(self.flush) glFinish();
|
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
|
|
|
}
|
|
|
|
|
Update to 20180728 release.
byuu says:
Sigh, I seem to be spiraling a bit here ... but the work is very
important. Hopefully I can get a solid WIP together soon. But for now...
I've integrated dynamic rate control into ruby::Audio via
setDynamic(bool) for now. It's very demanding, as you would expect. When
it's not in use, I realized the OSS driver's performance was pretty bad
due to calling write() for every sample for every channel. I implemented
a tiny 256-sample buffer and bsnes went from 290fps to 330fps on my
FreeBSD desktop. It may be possible to do the same buffering with DRC,
but for now, I'm not doing so, and adjusting the audio input frequency
on every sample.
I also added ruby::Video::setFlush(bool), which is available only in the
OpenGL drivers, and this causes glFinish() to be called after swapping
display buffers. I really couldn't think of a good name for this, "hard
GPU sync" sounds kind of silly. In my view, flush is what commits queued
events. Eg fflush(). OpenGL of course treats glFlush differently (I
really don't even know what the point of it is even after reading the
manual ...), and then has glFinish ... meh, whatever. It's
setFlush(bool) until I come up with something better. Also as expected,
this one's a big hit to performance.
To implement the DRC, I started putting helper functions into the ruby
video/audio/input core classes. And then the XVideo driver started
crashing. It took hours and hours and hours to track down the problem:
you have to clear XSetWindowAttributes to zero before calling
XCreateWindow. No amount of `--sync`, `gdb break gdk_x_error`, `-Og`,
etc will make Xlib be even remotely helpful in debugging errors like
this.
The GLX, GLX2, and XVideo drivers basically worked by chance before. If
the stack frame had the right memory cleared, it worked. Otherwise it'd
crash with BadValue, and my changing things broke that condition on the
XVideo driver. So this has been fixed in all three now.
Once XVideo was running again, I realized that non-power of two video
sizes were completely broken for the YUV formats. It took a while, but I
managed to fix all of that as well.
At this point, most of ruby is going to be broken outside of FreeBSD, as
I still need to finish updating all the drivers.
2018-07-28 11:21:39 +00:00
|
|
|
auto poll() -> void override {
|
2018-06-10 08:07:19 +00:00
|
|
|
while(XPending(_display)) {
|
|
|
|
XEvent event;
|
|
|
|
XNextEvent(_display, &event);
|
|
|
|
if(event.type == Expose) {
|
|
|
|
XWindowAttributes attributes;
|
|
|
|
XGetWindowAttributes(_display, _window, &attributes);
|
2018-07-31 02:23:12 +00:00
|
|
|
super.doUpdate(attributes.width, attributes.height);
|
2018-06-10 08:07:19 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
Update to v103r18 release.
byuu says:
Changelog:
- tomoko: improved handling of changing audio devices on the audio
settings panel
- ruby/audio/wasapi: added device enumeration and selection support¹
- ruby/audio/wasapi: release property store handle from audio device
- ruby/audio/wasapi: fix exclusive mode buffer filling
- ruby/video/glx2: ported to new API -- tested and confirmed working
great²
- ruby/video/sdl: fixed initialization -- tested and confirmed working
on FreeBSD now³
- ruby/video/xv: ported to new API -- tested and mostly working great,
sans fullscreen mode⁴
Errata:
- accidentally changed "Driver Settings" label to "Driver" on the
audio settings tab because I deleted the line and forgot the
"Settings" part
- need to use "return initialize();" from setDevice() in the WASAPI
driver, instead of "return true;", so device selection is currently
not functioning in this WIP for said driver
¹: for now, this will likely end up selecting the first available
endpoint device, which is probably wrong. I need to come up with a
system to expose good 'default values' when selecting new audio drivers,
or changing audio device settings.
²: glx2 is a fallback driver for system with only OpenGL 2.0 and no
OpenGL 3.2 drivers, such as FreeBSD 10.1 with AMD graphics cards.
³: although I really should track down why InputManager::poll() is
crashing the emulator when Video::ready() returns false ...
⁴: really bizarrely, when entering fullscreen mode, it looks like the
image was a triangle strip, and the bottom right triange is missing, and
the top left triangle skews the entire image into it. I'm suspecting
this is a Radeon driver bug when trying to create a 2560x1600 X-Video
surface. The glitch persists when exiting fullscreen, too.
If anyone can test the X-Video driver on their Linux/BSD system, it'd be
appreciated. If it's just my video card, I'll ignore it. If not,
hopefully someone can find the cause of the issue :|
2017-07-20 11:52:47 +00:00
|
|
|
private:
|
2019-07-07 09:44:09 +00:00
|
|
|
auto construct() -> void {
|
2018-07-31 02:23:12 +00:00
|
|
|
_display = XOpenDisplay(nullptr);
|
Update to v103r18 release.
byuu says:
Changelog:
- tomoko: improved handling of changing audio devices on the audio
settings panel
- ruby/audio/wasapi: added device enumeration and selection support¹
- ruby/audio/wasapi: release property store handle from audio device
- ruby/audio/wasapi: fix exclusive mode buffer filling
- ruby/video/glx2: ported to new API -- tested and confirmed working
great²
- ruby/video/sdl: fixed initialization -- tested and confirmed working
on FreeBSD now³
- ruby/video/xv: ported to new API -- tested and mostly working great,
sans fullscreen mode⁴
Errata:
- accidentally changed "Driver Settings" label to "Driver" on the
audio settings tab because I deleted the line and forgot the
"Settings" part
- need to use "return initialize();" from setDevice() in the WASAPI
driver, instead of "return true;", so device selection is currently
not functioning in this WIP for said driver
¹: for now, this will likely end up selecting the first available
endpoint device, which is probably wrong. I need to come up with a
system to expose good 'default values' when selecting new audio drivers,
or changing audio device settings.
²: glx2 is a fallback driver for system with only OpenGL 2.0 and no
OpenGL 3.2 drivers, such as FreeBSD 10.1 with AMD graphics cards.
³: although I really should track down why InputManager::poll() is
crashing the emulator when Video::ready() returns false ...
⁴: really bizarrely, when entering fullscreen mode, it looks like the
image was a triangle strip, and the bottom right triange is missing, and
the top left triangle skews the entire image into it. I'm suspecting
this is a Radeon driver bug when trying to create a 2560x1600 X-Video
surface. The glitch persists when exiting fullscreen, too.
If anyone can test the X-Video driver on their Linux/BSD system, it'd be
appreciated. If it's just my video card, I'll ignore it. If not,
hopefully someone can find the cause of the issue :|
2017-07-20 11:52:47 +00:00
|
|
|
_screen = DefaultScreen(_display);
|
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
|
|
|
|
2019-07-07 09:44:09 +00:00
|
|
|
XWindowAttributes attributes{};
|
|
|
|
XGetWindowAttributes(_display, RootWindow(_display, _screen), &attributes);
|
|
|
|
_depth = attributes.depth;
|
|
|
|
}
|
|
|
|
|
|
|
|
auto destruct() -> void {
|
|
|
|
terminate();
|
|
|
|
|
|
|
|
if(_display) {
|
|
|
|
XCloseDisplay(_display);
|
|
|
|
_display = nullptr;
|
|
|
|
_screen = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
auto initialize() -> bool {
|
|
|
|
terminate();
|
|
|
|
if(!self.exclusive && !self.context) return false;
|
|
|
|
|
2017-07-09 02:23:17 +00:00
|
|
|
int versionMajor = 0, versionMinor = 0;
|
Update to v103r18 release.
byuu says:
Changelog:
- tomoko: improved handling of changing audio devices on the audio
settings panel
- ruby/audio/wasapi: added device enumeration and selection support¹
- ruby/audio/wasapi: release property store handle from audio device
- ruby/audio/wasapi: fix exclusive mode buffer filling
- ruby/video/glx2: ported to new API -- tested and confirmed working
great²
- ruby/video/sdl: fixed initialization -- tested and confirmed working
on FreeBSD now³
- ruby/video/xv: ported to new API -- tested and mostly working great,
sans fullscreen mode⁴
Errata:
- accidentally changed "Driver Settings" label to "Driver" on the
audio settings tab because I deleted the line and forgot the
"Settings" part
- need to use "return initialize();" from setDevice() in the WASAPI
driver, instead of "return true;", so device selection is currently
not functioning in this WIP for said driver
¹: for now, this will likely end up selecting the first available
endpoint device, which is probably wrong. I need to come up with a
system to expose good 'default values' when selecting new audio drivers,
or changing audio device settings.
²: glx2 is a fallback driver for system with only OpenGL 2.0 and no
OpenGL 3.2 drivers, such as FreeBSD 10.1 with AMD graphics cards.
³: although I really should track down why InputManager::poll() is
crashing the emulator when Video::ready() returns false ...
⁴: really bizarrely, when entering fullscreen mode, it looks like the
image was a triangle strip, and the bottom right triange is missing, and
the top left triangle skews the entire image into it. I'm suspecting
this is a Radeon driver bug when trying to create a 2560x1600 X-Video
surface. The glitch persists when exiting fullscreen, too.
If anyone can test the X-Video driver on their Linux/BSD system, it'd be
appreciated. If it's just my video card, I'll ignore it. If not,
hopefully someone can find the cause of the issue :|
2017-07-20 11:52:47 +00:00
|
|
|
glXQueryVersion(_display, &versionMajor, &versionMinor);
|
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(versionMajor < 1 || (versionMajor == 1 && versionMinor < 2)) return false;
|
|
|
|
|
2018-07-31 02:23:12 +00:00
|
|
|
int redDepth = self.format == "RGB30" ? 10 : 8;
|
|
|
|
int greenDepth = self.format == "RGB30" ? 10 : 8;
|
|
|
|
int blueDepth = self.format == "RGB30" ? 10 : 8;
|
Update to 20180729 release.
byuu wrote:
Sigh ...
asio.hpp needs #include <nall/windows/registry.hpp>
[Since the last WIP, byuu also posted the following message. -Ed.]
ruby drivers have all been updated (but not tested outside of BSD), and
I redesigned the settings window. The driver functionality all exists on
a new "Drivers" panel, the emulator/hack settings go to a
"Configuration" panel, and the video/audio panels lose driver settings.
As does the settings menu and its synchronize options.
I want to start pushing toward a v107 release. Critically, I will need
DirectSound and ALSA to support dynamic rate control. I'd also like to
eliminate the other system manifest.bml files. I need to update the
cheat code database format, and bundle at least a few quark shaders --
although I still need to default to Direct3D on Windows.
Turbo keys would be nice, if it's not too much effort. Aside from
netplay, it's the last significant feature I'm missing.
I think for v107, higan is going to be a bit rough around the edges
compared to bsnes. And I don't think it's practical to finish the bsnes
localization support.
I'm thinking we probably want another WIP to iron out any critical
issues, but this time there should be a feature freeze with the next
WIP.
2018-07-29 13:24:38 +00:00
|
|
|
|
2017-07-09 02:23:17 +00:00
|
|
|
int attributeList[] = {
|
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
|
|
|
GLX_DRAWABLE_TYPE, GLX_WINDOW_BIT,
|
|
|
|
GLX_RENDER_TYPE, GLX_RGBA_BIT,
|
|
|
|
GLX_DOUBLEBUFFER, True,
|
Update to 20180729 release.
byuu wrote:
Sigh ...
asio.hpp needs #include <nall/windows/registry.hpp>
[Since the last WIP, byuu also posted the following message. -Ed.]
ruby drivers have all been updated (but not tested outside of BSD), and
I redesigned the settings window. The driver functionality all exists on
a new "Drivers" panel, the emulator/hack settings go to a
"Configuration" panel, and the video/audio panels lose driver settings.
As does the settings menu and its synchronize options.
I want to start pushing toward a v107 release. Critically, I will need
DirectSound and ALSA to support dynamic rate control. I'd also like to
eliminate the other system manifest.bml files. I need to update the
cheat code database format, and bundle at least a few quark shaders --
although I still need to default to Direct3D on Windows.
Turbo keys would be nice, if it's not too much effort. Aside from
netplay, it's the last significant feature I'm missing.
I think for v107, higan is going to be a bit rough around the edges
compared to bsnes. And I don't think it's practical to finish the bsnes
localization support.
I'm thinking we probably want another WIP to iron out any critical
issues, but this time there should be a feature freeze with the next
WIP.
2018-07-29 13:24:38 +00:00
|
|
|
GLX_RED_SIZE, redDepth,
|
|
|
|
GLX_GREEN_SIZE, greenDepth,
|
|
|
|
GLX_BLUE_SIZE, blueDepth,
|
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
|
|
|
None
|
|
|
|
};
|
|
|
|
|
2017-07-09 02:23:17 +00:00
|
|
|
int fbCount = 0;
|
Update to v103r18 release.
byuu says:
Changelog:
- tomoko: improved handling of changing audio devices on the audio
settings panel
- ruby/audio/wasapi: added device enumeration and selection support¹
- ruby/audio/wasapi: release property store handle from audio device
- ruby/audio/wasapi: fix exclusive mode buffer filling
- ruby/video/glx2: ported to new API -- tested and confirmed working
great²
- ruby/video/sdl: fixed initialization -- tested and confirmed working
on FreeBSD now³
- ruby/video/xv: ported to new API -- tested and mostly working great,
sans fullscreen mode⁴
Errata:
- accidentally changed "Driver Settings" label to "Driver" on the
audio settings tab because I deleted the line and forgot the
"Settings" part
- need to use "return initialize();" from setDevice() in the WASAPI
driver, instead of "return true;", so device selection is currently
not functioning in this WIP for said driver
¹: for now, this will likely end up selecting the first available
endpoint device, which is probably wrong. I need to come up with a
system to expose good 'default values' when selecting new audio drivers,
or changing audio device settings.
²: glx2 is a fallback driver for system with only OpenGL 2.0 and no
OpenGL 3.2 drivers, such as FreeBSD 10.1 with AMD graphics cards.
³: although I really should track down why InputManager::poll() is
crashing the emulator when Video::ready() returns false ...
⁴: really bizarrely, when entering fullscreen mode, it looks like the
image was a triangle strip, and the bottom right triange is missing, and
the top left triangle skews the entire image into it. I'm suspecting
this is a Radeon driver bug when trying to create a 2560x1600 X-Video
surface. The glitch persists when exiting fullscreen, too.
If anyone can test the X-Video driver on their Linux/BSD system, it'd be
appreciated. If it's just my video card, I'll ignore it. If not,
hopefully someone can find the cause of the issue :|
2017-07-20 11:52:47 +00:00
|
|
|
auto fbConfig = glXChooseFBConfig(_display, _screen, attributeList, &fbCount);
|
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(fbCount == 0) return false;
|
|
|
|
|
2019-07-07 09:44:09 +00:00
|
|
|
auto visual = glXGetVisualFromFBConfig(_display, fbConfig[0]);
|
|
|
|
|
|
|
|
_parent = self.exclusive ? RootWindow(_display, visual->screen) : (Window)self.context;
|
|
|
|
XWindowAttributes windowAttributes;
|
|
|
|
XGetWindowAttributes(_display, _parent, &windowAttributes);
|
|
|
|
|
|
|
|
_colormap = XCreateColormap(_display, RootWindow(_display, visual->screen), visual->visual, AllocNone);
|
|
|
|
XSetWindowAttributes attributes{};
|
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
|
|
|
attributes.border_pixel = 0;
|
2019-07-07 09:44:09 +00:00
|
|
|
attributes.colormap = _colormap;
|
|
|
|
attributes.override_redirect = self.exclusive;
|
|
|
|
_window = XCreateWindow(_display, _parent,
|
|
|
|
0, 0, windowAttributes.width, windowAttributes.height,
|
|
|
|
0, visual->depth, InputOutput, visual->visual,
|
|
|
|
CWBorderPixel | CWColormap | CWOverrideRedirect, &attributes);
|
2018-06-10 08:07:19 +00:00
|
|
|
XSelectInput(_display, _window, ExposureMask);
|
Update to v103r18 release.
byuu says:
Changelog:
- tomoko: improved handling of changing audio devices on the audio
settings panel
- ruby/audio/wasapi: added device enumeration and selection support¹
- ruby/audio/wasapi: release property store handle from audio device
- ruby/audio/wasapi: fix exclusive mode buffer filling
- ruby/video/glx2: ported to new API -- tested and confirmed working
great²
- ruby/video/sdl: fixed initialization -- tested and confirmed working
on FreeBSD now³
- ruby/video/xv: ported to new API -- tested and mostly working great,
sans fullscreen mode⁴
Errata:
- accidentally changed "Driver Settings" label to "Driver" on the
audio settings tab because I deleted the line and forgot the
"Settings" part
- need to use "return initialize();" from setDevice() in the WASAPI
driver, instead of "return true;", so device selection is currently
not functioning in this WIP for said driver
¹: for now, this will likely end up selecting the first available
endpoint device, which is probably wrong. I need to come up with a
system to expose good 'default values' when selecting new audio drivers,
or changing audio device settings.
²: glx2 is a fallback driver for system with only OpenGL 2.0 and no
OpenGL 3.2 drivers, such as FreeBSD 10.1 with AMD graphics cards.
³: although I really should track down why InputManager::poll() is
crashing the emulator when Video::ready() returns false ...
⁴: really bizarrely, when entering fullscreen mode, it looks like the
image was a triangle strip, and the bottom right triange is missing, and
the top left triangle skews the entire image into it. I'm suspecting
this is a Radeon driver bug when trying to create a 2560x1600 X-Video
surface. The glitch persists when exiting fullscreen, too.
If anyone can test the X-Video driver on their Linux/BSD system, it'd be
appreciated. If it's just my video card, I'll ignore it. If not,
hopefully someone can find the cause of the issue :|
2017-07-20 11:52:47 +00:00
|
|
|
XSetWindowBackground(_display, _window, 0);
|
|
|
|
XMapWindow(_display, _window);
|
|
|
|
XFlush(_display);
|
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
|
|
|
|
Update to v103r18 release.
byuu says:
Changelog:
- tomoko: improved handling of changing audio devices on the audio
settings panel
- ruby/audio/wasapi: added device enumeration and selection support¹
- ruby/audio/wasapi: release property store handle from audio device
- ruby/audio/wasapi: fix exclusive mode buffer filling
- ruby/video/glx2: ported to new API -- tested and confirmed working
great²
- ruby/video/sdl: fixed initialization -- tested and confirmed working
on FreeBSD now³
- ruby/video/xv: ported to new API -- tested and mostly working great,
sans fullscreen mode⁴
Errata:
- accidentally changed "Driver Settings" label to "Driver" on the
audio settings tab because I deleted the line and forgot the
"Settings" part
- need to use "return initialize();" from setDevice() in the WASAPI
driver, instead of "return true;", so device selection is currently
not functioning in this WIP for said driver
¹: for now, this will likely end up selecting the first available
endpoint device, which is probably wrong. I need to come up with a
system to expose good 'default values' when selecting new audio drivers,
or changing audio device settings.
²: glx2 is a fallback driver for system with only OpenGL 2.0 and no
OpenGL 3.2 drivers, such as FreeBSD 10.1 with AMD graphics cards.
³: although I really should track down why InputManager::poll() is
crashing the emulator when Video::ready() returns false ...
⁴: really bizarrely, when entering fullscreen mode, it looks like the
image was a triangle strip, and the bottom right triange is missing, and
the top left triangle skews the entire image into it. I'm suspecting
this is a Radeon driver bug when trying to create a 2560x1600 X-Video
surface. The glitch persists when exiting fullscreen, too.
If anyone can test the X-Video driver on their Linux/BSD system, it'd be
appreciated. If it's just my video card, I'll ignore it. If not,
hopefully someone can find the cause of the issue :|
2017-07-20 11:52:47 +00:00
|
|
|
while(XPending(_display)) {
|
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
|
|
|
XEvent event;
|
Update to v103r18 release.
byuu says:
Changelog:
- tomoko: improved handling of changing audio devices on the audio
settings panel
- ruby/audio/wasapi: added device enumeration and selection support¹
- ruby/audio/wasapi: release property store handle from audio device
- ruby/audio/wasapi: fix exclusive mode buffer filling
- ruby/video/glx2: ported to new API -- tested and confirmed working
great²
- ruby/video/sdl: fixed initialization -- tested and confirmed working
on FreeBSD now³
- ruby/video/xv: ported to new API -- tested and mostly working great,
sans fullscreen mode⁴
Errata:
- accidentally changed "Driver Settings" label to "Driver" on the
audio settings tab because I deleted the line and forgot the
"Settings" part
- need to use "return initialize();" from setDevice() in the WASAPI
driver, instead of "return true;", so device selection is currently
not functioning in this WIP for said driver
¹: for now, this will likely end up selecting the first available
endpoint device, which is probably wrong. I need to come up with a
system to expose good 'default values' when selecting new audio drivers,
or changing audio device settings.
²: glx2 is a fallback driver for system with only OpenGL 2.0 and no
OpenGL 3.2 drivers, such as FreeBSD 10.1 with AMD graphics cards.
³: although I really should track down why InputManager::poll() is
crashing the emulator when Video::ready() returns false ...
⁴: really bizarrely, when entering fullscreen mode, it looks like the
image was a triangle strip, and the bottom right triange is missing, and
the top left triangle skews the entire image into it. I'm suspecting
this is a Radeon driver bug when trying to create a 2560x1600 X-Video
surface. The glitch persists when exiting fullscreen, too.
If anyone can test the X-Video driver on their Linux/BSD system, it'd be
appreciated. If it's just my video card, I'll ignore it. If not,
hopefully someone can find the cause of the issue :|
2017-07-20 11:52:47 +00:00
|
|
|
XNextEvent(_display, &event);
|
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
|
|
|
}
|
|
|
|
|
2019-07-07 09:44:09 +00:00
|
|
|
_glXContext = glXCreateContext(_display, visual, 0, GL_TRUE);
|
Update to v103r18 release.
byuu says:
Changelog:
- tomoko: improved handling of changing audio devices on the audio
settings panel
- ruby/audio/wasapi: added device enumeration and selection support¹
- ruby/audio/wasapi: release property store handle from audio device
- ruby/audio/wasapi: fix exclusive mode buffer filling
- ruby/video/glx2: ported to new API -- tested and confirmed working
great²
- ruby/video/sdl: fixed initialization -- tested and confirmed working
on FreeBSD now³
- ruby/video/xv: ported to new API -- tested and mostly working great,
sans fullscreen mode⁴
Errata:
- accidentally changed "Driver Settings" label to "Driver" on the
audio settings tab because I deleted the line and forgot the
"Settings" part
- need to use "return initialize();" from setDevice() in the WASAPI
driver, instead of "return true;", so device selection is currently
not functioning in this WIP for said driver
¹: for now, this will likely end up selecting the first available
endpoint device, which is probably wrong. I need to come up with a
system to expose good 'default values' when selecting new audio drivers,
or changing audio device settings.
²: glx2 is a fallback driver for system with only OpenGL 2.0 and no
OpenGL 3.2 drivers, such as FreeBSD 10.1 with AMD graphics cards.
³: although I really should track down why InputManager::poll() is
crashing the emulator when Video::ready() returns false ...
⁴: really bizarrely, when entering fullscreen mode, it looks like the
image was a triangle strip, and the bottom right triange is missing, and
the top left triangle skews the entire image into it. I'm suspecting
this is a Radeon driver bug when trying to create a 2560x1600 X-Video
surface. The glitch persists when exiting fullscreen, too.
If anyone can test the X-Video driver on their Linux/BSD system, it'd be
appreciated. If it's just my video card, I'll ignore it. If not,
hopefully someone can find the cause of the issue :|
2017-07-20 11:52:47 +00:00
|
|
|
glXMakeCurrent(_display, _glXWindow = _window, _glXContext);
|
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
|
|
|
|
2017-07-09 02:23:17 +00:00
|
|
|
if(!glXSwapInterval) glXSwapInterval = (int (*)(int))glGetProcAddress("glXSwapIntervalMESA");
|
|
|
|
if(!glXSwapInterval) glXSwapInterval = (int (*)(int))glGetProcAddress("glXSwapIntervalSGI");
|
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
|
|
|
|
2018-07-31 02:23:12 +00:00
|
|
|
if(glXSwapInterval) glXSwapInterval(self.blocking);
|
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
|
|
|
|
2017-07-09 02:23:17 +00:00
|
|
|
int value = 0;
|
2019-07-07 09:44:09 +00:00
|
|
|
glXGetConfig(_display, visual, GLX_DOUBLEBUFFER, &value);
|
Update to v103r18 release.
byuu says:
Changelog:
- tomoko: improved handling of changing audio devices on the audio
settings panel
- ruby/audio/wasapi: added device enumeration and selection support¹
- ruby/audio/wasapi: release property store handle from audio device
- ruby/audio/wasapi: fix exclusive mode buffer filling
- ruby/video/glx2: ported to new API -- tested and confirmed working
great²
- ruby/video/sdl: fixed initialization -- tested and confirmed working
on FreeBSD now³
- ruby/video/xv: ported to new API -- tested and mostly working great,
sans fullscreen mode⁴
Errata:
- accidentally changed "Driver Settings" label to "Driver" on the
audio settings tab because I deleted the line and forgot the
"Settings" part
- need to use "return initialize();" from setDevice() in the WASAPI
driver, instead of "return true;", so device selection is currently
not functioning in this WIP for said driver
¹: for now, this will likely end up selecting the first available
endpoint device, which is probably wrong. I need to come up with a
system to expose good 'default values' when selecting new audio drivers,
or changing audio device settings.
²: glx2 is a fallback driver for system with only OpenGL 2.0 and no
OpenGL 3.2 drivers, such as FreeBSD 10.1 with AMD graphics cards.
³: although I really should track down why InputManager::poll() is
crashing the emulator when Video::ready() returns false ...
⁴: really bizarrely, when entering fullscreen mode, it looks like the
image was a triangle strip, and the bottom right triange is missing, and
the top left triangle skews the entire image into it. I'm suspecting
this is a Radeon driver bug when trying to create a 2560x1600 X-Video
surface. The glitch persists when exiting fullscreen, too.
If anyone can test the X-Video driver on their Linux/BSD system, it'd be
appreciated. If it's just my video card, I'll ignore it. If not,
hopefully someone can find the cause of the issue :|
2017-07-20 11:52:47 +00:00
|
|
|
_isDoubleBuffered = value;
|
|
|
|
_isDirect = glXIsDirect(_display, _glXContext);
|
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
|
|
|
|
|
|
|
glDisable(GL_ALPHA_TEST);
|
|
|
|
glDisable(GL_BLEND);
|
|
|
|
glDisable(GL_DEPTH_TEST);
|
|
|
|
glDisable(GL_POLYGON_SMOOTH);
|
|
|
|
glDisable(GL_STENCIL_TEST);
|
|
|
|
|
|
|
|
glEnable(GL_DITHER);
|
|
|
|
glEnable(GL_TEXTURE_2D);
|
|
|
|
|
|
|
|
resize(256, 256);
|
Update to v103r18 release.
byuu says:
Changelog:
- tomoko: improved handling of changing audio devices on the audio
settings panel
- ruby/audio/wasapi: added device enumeration and selection support¹
- ruby/audio/wasapi: release property store handle from audio device
- ruby/audio/wasapi: fix exclusive mode buffer filling
- ruby/video/glx2: ported to new API -- tested and confirmed working
great²
- ruby/video/sdl: fixed initialization -- tested and confirmed working
on FreeBSD now³
- ruby/video/xv: ported to new API -- tested and mostly working great,
sans fullscreen mode⁴
Errata:
- accidentally changed "Driver Settings" label to "Driver" on the
audio settings tab because I deleted the line and forgot the
"Settings" part
- need to use "return initialize();" from setDevice() in the WASAPI
driver, instead of "return true;", so device selection is currently
not functioning in this WIP for said driver
¹: for now, this will likely end up selecting the first available
endpoint device, which is probably wrong. I need to come up with a
system to expose good 'default values' when selecting new audio drivers,
or changing audio device settings.
²: glx2 is a fallback driver for system with only OpenGL 2.0 and no
OpenGL 3.2 drivers, such as FreeBSD 10.1 with AMD graphics cards.
³: although I really should track down why InputManager::poll() is
crashing the emulator when Video::ready() returns false ...
⁴: really bizarrely, when entering fullscreen mode, it looks like the
image was a triangle strip, and the bottom right triange is missing, and
the top left triangle skews the entire image into it. I'm suspecting
this is a Radeon driver bug when trying to create a 2560x1600 X-Video
surface. The glitch persists when exiting fullscreen, too.
If anyone can test the X-Video driver on their Linux/BSD system, it'd be
appreciated. If it's just my video card, I'll ignore it. If not,
hopefully someone can find the cause of the issue :|
2017-07-20 11:52:47 +00:00
|
|
|
return _ready = true;
|
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
|
|
|
}
|
|
|
|
|
Update to v103r18 release.
byuu says:
Changelog:
- tomoko: improved handling of changing audio devices on the audio
settings panel
- ruby/audio/wasapi: added device enumeration and selection support¹
- ruby/audio/wasapi: release property store handle from audio device
- ruby/audio/wasapi: fix exclusive mode buffer filling
- ruby/video/glx2: ported to new API -- tested and confirmed working
great²
- ruby/video/sdl: fixed initialization -- tested and confirmed working
on FreeBSD now³
- ruby/video/xv: ported to new API -- tested and mostly working great,
sans fullscreen mode⁴
Errata:
- accidentally changed "Driver Settings" label to "Driver" on the
audio settings tab because I deleted the line and forgot the
"Settings" part
- need to use "return initialize();" from setDevice() in the WASAPI
driver, instead of "return true;", so device selection is currently
not functioning in this WIP for said driver
¹: for now, this will likely end up selecting the first available
endpoint device, which is probably wrong. I need to come up with a
system to expose good 'default values' when selecting new audio drivers,
or changing audio device settings.
²: glx2 is a fallback driver for system with only OpenGL 2.0 and no
OpenGL 3.2 drivers, such as FreeBSD 10.1 with AMD graphics cards.
³: although I really should track down why InputManager::poll() is
crashing the emulator when Video::ready() returns false ...
⁴: really bizarrely, when entering fullscreen mode, it looks like the
image was a triangle strip, and the bottom right triange is missing, and
the top left triangle skews the entire image into it. I'm suspecting
this is a Radeon driver bug when trying to create a 2560x1600 X-Video
surface. The glitch persists when exiting fullscreen, too.
If anyone can test the X-Video driver on their Linux/BSD system, it'd be
appreciated. If it's just my video card, I'll ignore it. If not,
hopefully someone can find the cause of the issue :|
2017-07-20 11:52:47 +00:00
|
|
|
auto terminate() -> void {
|
|
|
|
_ready = false;
|
|
|
|
|
|
|
|
if(_glTexture) {
|
|
|
|
glDeleteTextures(1, &_glTexture);
|
|
|
|
_glTexture = 0;
|
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
|
|
|
}
|
|
|
|
|
Update to v103r18 release.
byuu says:
Changelog:
- tomoko: improved handling of changing audio devices on the audio
settings panel
- ruby/audio/wasapi: added device enumeration and selection support¹
- ruby/audio/wasapi: release property store handle from audio device
- ruby/audio/wasapi: fix exclusive mode buffer filling
- ruby/video/glx2: ported to new API -- tested and confirmed working
great²
- ruby/video/sdl: fixed initialization -- tested and confirmed working
on FreeBSD now³
- ruby/video/xv: ported to new API -- tested and mostly working great,
sans fullscreen mode⁴
Errata:
- accidentally changed "Driver Settings" label to "Driver" on the
audio settings tab because I deleted the line and forgot the
"Settings" part
- need to use "return initialize();" from setDevice() in the WASAPI
driver, instead of "return true;", so device selection is currently
not functioning in this WIP for said driver
¹: for now, this will likely end up selecting the first available
endpoint device, which is probably wrong. I need to come up with a
system to expose good 'default values' when selecting new audio drivers,
or changing audio device settings.
²: glx2 is a fallback driver for system with only OpenGL 2.0 and no
OpenGL 3.2 drivers, such as FreeBSD 10.1 with AMD graphics cards.
³: although I really should track down why InputManager::poll() is
crashing the emulator when Video::ready() returns false ...
⁴: really bizarrely, when entering fullscreen mode, it looks like the
image was a triangle strip, and the bottom right triange is missing, and
the top left triangle skews the entire image into it. I'm suspecting
this is a Radeon driver bug when trying to create a 2560x1600 X-Video
surface. The glitch persists when exiting fullscreen, too.
If anyone can test the X-Video driver on their Linux/BSD system, it'd be
appreciated. If it's just my video card, I'll ignore it. If not,
hopefully someone can find the cause of the issue :|
2017-07-20 11:52:47 +00:00
|
|
|
if(_glBuffer) {
|
|
|
|
delete[] _glBuffer;
|
|
|
|
_glBuffer = nullptr;
|
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
|
|
|
}
|
|
|
|
|
Update to v103r18 release.
byuu says:
Changelog:
- tomoko: improved handling of changing audio devices on the audio
settings panel
- ruby/audio/wasapi: added device enumeration and selection support¹
- ruby/audio/wasapi: release property store handle from audio device
- ruby/audio/wasapi: fix exclusive mode buffer filling
- ruby/video/glx2: ported to new API -- tested and confirmed working
great²
- ruby/video/sdl: fixed initialization -- tested and confirmed working
on FreeBSD now³
- ruby/video/xv: ported to new API -- tested and mostly working great,
sans fullscreen mode⁴
Errata:
- accidentally changed "Driver Settings" label to "Driver" on the
audio settings tab because I deleted the line and forgot the
"Settings" part
- need to use "return initialize();" from setDevice() in the WASAPI
driver, instead of "return true;", so device selection is currently
not functioning in this WIP for said driver
¹: for now, this will likely end up selecting the first available
endpoint device, which is probably wrong. I need to come up with a
system to expose good 'default values' when selecting new audio drivers,
or changing audio device settings.
²: glx2 is a fallback driver for system with only OpenGL 2.0 and no
OpenGL 3.2 drivers, such as FreeBSD 10.1 with AMD graphics cards.
³: although I really should track down why InputManager::poll() is
crashing the emulator when Video::ready() returns false ...
⁴: really bizarrely, when entering fullscreen mode, it looks like the
image was a triangle strip, and the bottom right triange is missing, and
the top left triangle skews the entire image into it. I'm suspecting
this is a Radeon driver bug when trying to create a 2560x1600 X-Video
surface. The glitch persists when exiting fullscreen, too.
If anyone can test the X-Video driver on their Linux/BSD system, it'd be
appreciated. If it's just my video card, I'll ignore it. If not,
hopefully someone can find the cause of the issue :|
2017-07-20 11:52:47 +00:00
|
|
|
_glWidth = 0;
|
|
|
|
_glHeight = 0;
|
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
|
|
|
|
Update to v103r18 release.
byuu says:
Changelog:
- tomoko: improved handling of changing audio devices on the audio
settings panel
- ruby/audio/wasapi: added device enumeration and selection support¹
- ruby/audio/wasapi: release property store handle from audio device
- ruby/audio/wasapi: fix exclusive mode buffer filling
- ruby/video/glx2: ported to new API -- tested and confirmed working
great²
- ruby/video/sdl: fixed initialization -- tested and confirmed working
on FreeBSD now³
- ruby/video/xv: ported to new API -- tested and mostly working great,
sans fullscreen mode⁴
Errata:
- accidentally changed "Driver Settings" label to "Driver" on the
audio settings tab because I deleted the line and forgot the
"Settings" part
- need to use "return initialize();" from setDevice() in the WASAPI
driver, instead of "return true;", so device selection is currently
not functioning in this WIP for said driver
¹: for now, this will likely end up selecting the first available
endpoint device, which is probably wrong. I need to come up with a
system to expose good 'default values' when selecting new audio drivers,
or changing audio device settings.
²: glx2 is a fallback driver for system with only OpenGL 2.0 and no
OpenGL 3.2 drivers, such as FreeBSD 10.1 with AMD graphics cards.
³: although I really should track down why InputManager::poll() is
crashing the emulator when Video::ready() returns false ...
⁴: really bizarrely, when entering fullscreen mode, it looks like the
image was a triangle strip, and the bottom right triange is missing, and
the top left triangle skews the entire image into it. I'm suspecting
this is a Radeon driver bug when trying to create a 2560x1600 X-Video
surface. The glitch persists when exiting fullscreen, too.
If anyone can test the X-Video driver on their Linux/BSD system, it'd be
appreciated. If it's just my video card, I'll ignore it. If not,
hopefully someone can find the cause of the issue :|
2017-07-20 11:52:47 +00:00
|
|
|
if(_glXContext) {
|
|
|
|
glXDestroyContext(_display, _glXContext);
|
|
|
|
_glXContext = nullptr;
|
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
|
|
|
}
|
|
|
|
|
Update to v103r18 release.
byuu says:
Changelog:
- tomoko: improved handling of changing audio devices on the audio
settings panel
- ruby/audio/wasapi: added device enumeration and selection support¹
- ruby/audio/wasapi: release property store handle from audio device
- ruby/audio/wasapi: fix exclusive mode buffer filling
- ruby/video/glx2: ported to new API -- tested and confirmed working
great²
- ruby/video/sdl: fixed initialization -- tested and confirmed working
on FreeBSD now³
- ruby/video/xv: ported to new API -- tested and mostly working great,
sans fullscreen mode⁴
Errata:
- accidentally changed "Driver Settings" label to "Driver" on the
audio settings tab because I deleted the line and forgot the
"Settings" part
- need to use "return initialize();" from setDevice() in the WASAPI
driver, instead of "return true;", so device selection is currently
not functioning in this WIP for said driver
¹: for now, this will likely end up selecting the first available
endpoint device, which is probably wrong. I need to come up with a
system to expose good 'default values' when selecting new audio drivers,
or changing audio device settings.
²: glx2 is a fallback driver for system with only OpenGL 2.0 and no
OpenGL 3.2 drivers, such as FreeBSD 10.1 with AMD graphics cards.
³: although I really should track down why InputManager::poll() is
crashing the emulator when Video::ready() returns false ...
⁴: really bizarrely, when entering fullscreen mode, it looks like the
image was a triangle strip, and the bottom right triange is missing, and
the top left triangle skews the entire image into it. I'm suspecting
this is a Radeon driver bug when trying to create a 2560x1600 X-Video
surface. The glitch persists when exiting fullscreen, too.
If anyone can test the X-Video driver on their Linux/BSD system, it'd be
appreciated. If it's just my video card, I'll ignore it. If not,
hopefully someone can find the cause of the issue :|
2017-07-20 11:52:47 +00:00
|
|
|
if(_window) {
|
|
|
|
XUnmapWindow(_display, _window);
|
|
|
|
_window = 0;
|
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
|
|
|
}
|
|
|
|
|
Update to v103r18 release.
byuu says:
Changelog:
- tomoko: improved handling of changing audio devices on the audio
settings panel
- ruby/audio/wasapi: added device enumeration and selection support¹
- ruby/audio/wasapi: release property store handle from audio device
- ruby/audio/wasapi: fix exclusive mode buffer filling
- ruby/video/glx2: ported to new API -- tested and confirmed working
great²
- ruby/video/sdl: fixed initialization -- tested and confirmed working
on FreeBSD now³
- ruby/video/xv: ported to new API -- tested and mostly working great,
sans fullscreen mode⁴
Errata:
- accidentally changed "Driver Settings" label to "Driver" on the
audio settings tab because I deleted the line and forgot the
"Settings" part
- need to use "return initialize();" from setDevice() in the WASAPI
driver, instead of "return true;", so device selection is currently
not functioning in this WIP for said driver
¹: for now, this will likely end up selecting the first available
endpoint device, which is probably wrong. I need to come up with a
system to expose good 'default values' when selecting new audio drivers,
or changing audio device settings.
²: glx2 is a fallback driver for system with only OpenGL 2.0 and no
OpenGL 3.2 drivers, such as FreeBSD 10.1 with AMD graphics cards.
³: although I really should track down why InputManager::poll() is
crashing the emulator when Video::ready() returns false ...
⁴: really bizarrely, when entering fullscreen mode, it looks like the
image was a triangle strip, and the bottom right triange is missing, and
the top left triangle skews the entire image into it. I'm suspecting
this is a Radeon driver bug when trying to create a 2560x1600 X-Video
surface. The glitch persists when exiting fullscreen, too.
If anyone can test the X-Video driver on their Linux/BSD system, it'd be
appreciated. If it's just my video card, I'll ignore it. If not,
hopefully someone can find the cause of the issue :|
2017-07-20 11:52:47 +00:00
|
|
|
if(_colormap) {
|
|
|
|
XFreeColormap(_display, _colormap);
|
|
|
|
_colormap = 0;
|
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
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-07-09 02:23:17 +00:00
|
|
|
auto resize(uint width, uint height) -> void {
|
Update to v103r18 release.
byuu says:
Changelog:
- tomoko: improved handling of changing audio devices on the audio
settings panel
- ruby/audio/wasapi: added device enumeration and selection support¹
- ruby/audio/wasapi: release property store handle from audio device
- ruby/audio/wasapi: fix exclusive mode buffer filling
- ruby/video/glx2: ported to new API -- tested and confirmed working
great²
- ruby/video/sdl: fixed initialization -- tested and confirmed working
on FreeBSD now³
- ruby/video/xv: ported to new API -- tested and mostly working great,
sans fullscreen mode⁴
Errata:
- accidentally changed "Driver Settings" label to "Driver" on the
audio settings tab because I deleted the line and forgot the
"Settings" part
- need to use "return initialize();" from setDevice() in the WASAPI
driver, instead of "return true;", so device selection is currently
not functioning in this WIP for said driver
¹: for now, this will likely end up selecting the first available
endpoint device, which is probably wrong. I need to come up with a
system to expose good 'default values' when selecting new audio drivers,
or changing audio device settings.
²: glx2 is a fallback driver for system with only OpenGL 2.0 and no
OpenGL 3.2 drivers, such as FreeBSD 10.1 with AMD graphics cards.
³: although I really should track down why InputManager::poll() is
crashing the emulator when Video::ready() returns false ...
⁴: really bizarrely, when entering fullscreen mode, it looks like the
image was a triangle strip, and the bottom right triange is missing, and
the top left triangle skews the entire image into it. I'm suspecting
this is a Radeon driver bug when trying to create a 2560x1600 X-Video
surface. The glitch persists when exiting fullscreen, too.
If anyone can test the X-Video driver on their Linux/BSD system, it'd be
appreciated. If it's just my video card, I'll ignore it. If not,
hopefully someone can find the cause of the issue :|
2017-07-20 11:52:47 +00:00
|
|
|
_width = width;
|
|
|
|
_height = height;
|
|
|
|
|
|
|
|
if(_glTexture == 0) glGenTextures(1, &_glTexture);
|
|
|
|
_glWidth = max(_glWidth, width);
|
|
|
|
_glHeight = max(_glHeight, height);
|
|
|
|
delete[] _glBuffer;
|
|
|
|
_glBuffer = new uint32_t[_glWidth * _glHeight]();
|
|
|
|
|
|
|
|
glBindTexture(GL_TEXTURE_2D, _glTexture);
|
|
|
|
glPixelStorei(GL_UNPACK_ROW_LENGTH, _glWidth);
|
Update to 20180729 release.
byuu wrote:
Sigh ...
asio.hpp needs #include <nall/windows/registry.hpp>
[Since the last WIP, byuu also posted the following message. -Ed.]
ruby drivers have all been updated (but not tested outside of BSD), and
I redesigned the settings window. The driver functionality all exists on
a new "Drivers" panel, the emulator/hack settings go to a
"Configuration" panel, and the video/audio panels lose driver settings.
As does the settings menu and its synchronize options.
I want to start pushing toward a v107 release. Critically, I will need
DirectSound and ALSA to support dynamic rate control. I'd also like to
eliminate the other system manifest.bml files. I need to update the
cheat code database format, and bundle at least a few quark shaders --
although I still need to default to Direct3D on Windows.
Turbo keys would be nice, if it's not too much effort. Aside from
netplay, it's the last significant feature I'm missing.
I think for v107, higan is going to be a bit rough around the edges
compared to bsnes. And I don't think it's practical to finish the bsnes
localization support.
I'm thinking we probably want another WIP to iron out any critical
issues, but this time there should be a feature freeze with the next
WIP.
2018-07-29 13:24:38 +00:00
|
|
|
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, _glWidth, _glHeight, 0, GL_BGRA, _glFormat, _glBuffer);
|
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
|
|
|
}
|
Update to v103r18 release.
byuu says:
Changelog:
- tomoko: improved handling of changing audio devices on the audio
settings panel
- ruby/audio/wasapi: added device enumeration and selection support¹
- ruby/audio/wasapi: release property store handle from audio device
- ruby/audio/wasapi: fix exclusive mode buffer filling
- ruby/video/glx2: ported to new API -- tested and confirmed working
great²
- ruby/video/sdl: fixed initialization -- tested and confirmed working
on FreeBSD now³
- ruby/video/xv: ported to new API -- tested and mostly working great,
sans fullscreen mode⁴
Errata:
- accidentally changed "Driver Settings" label to "Driver" on the
audio settings tab because I deleted the line and forgot the
"Settings" part
- need to use "return initialize();" from setDevice() in the WASAPI
driver, instead of "return true;", so device selection is currently
not functioning in this WIP for said driver
¹: for now, this will likely end up selecting the first available
endpoint device, which is probably wrong. I need to come up with a
system to expose good 'default values' when selecting new audio drivers,
or changing audio device settings.
²: glx2 is a fallback driver for system with only OpenGL 2.0 and no
OpenGL 3.2 drivers, such as FreeBSD 10.1 with AMD graphics cards.
³: although I really should track down why InputManager::poll() is
crashing the emulator when Video::ready() returns false ...
⁴: really bizarrely, when entering fullscreen mode, it looks like the
image was a triangle strip, and the bottom right triange is missing, and
the top left triangle skews the entire image into it. I'm suspecting
this is a Radeon driver bug when trying to create a 2560x1600 X-Video
surface. The glitch persists when exiting fullscreen, too.
If anyone can test the X-Video driver on their Linux/BSD system, it'd be
appreciated. If it's just my video card, I'll ignore it. If not,
hopefully someone can find the cause of the issue :|
2017-07-20 11:52:47 +00:00
|
|
|
|
|
|
|
bool _ready = false;
|
2018-08-21 03:17:12 +00:00
|
|
|
bool blur = false;
|
Update to v103r18 release.
byuu says:
Changelog:
- tomoko: improved handling of changing audio devices on the audio
settings panel
- ruby/audio/wasapi: added device enumeration and selection support¹
- ruby/audio/wasapi: release property store handle from audio device
- ruby/audio/wasapi: fix exclusive mode buffer filling
- ruby/video/glx2: ported to new API -- tested and confirmed working
great²
- ruby/video/sdl: fixed initialization -- tested and confirmed working
on FreeBSD now³
- ruby/video/xv: ported to new API -- tested and mostly working great,
sans fullscreen mode⁴
Errata:
- accidentally changed "Driver Settings" label to "Driver" on the
audio settings tab because I deleted the line and forgot the
"Settings" part
- need to use "return initialize();" from setDevice() in the WASAPI
driver, instead of "return true;", so device selection is currently
not functioning in this WIP for said driver
¹: for now, this will likely end up selecting the first available
endpoint device, which is probably wrong. I need to come up with a
system to expose good 'default values' when selecting new audio drivers,
or changing audio device settings.
²: glx2 is a fallback driver for system with only OpenGL 2.0 and no
OpenGL 3.2 drivers, such as FreeBSD 10.1 with AMD graphics cards.
³: although I really should track down why InputManager::poll() is
crashing the emulator when Video::ready() returns false ...
⁴: really bizarrely, when entering fullscreen mode, it looks like the
image was a triangle strip, and the bottom right triange is missing, and
the top left triangle skews the entire image into it. I'm suspecting
this is a Radeon driver bug when trying to create a 2560x1600 X-Video
surface. The glitch persists when exiting fullscreen, too.
If anyone can test the X-Video driver on their Linux/BSD system, it'd be
appreciated. If it's just my video card, I'll ignore it. If not,
hopefully someone can find the cause of the issue :|
2017-07-20 11:52:47 +00:00
|
|
|
|
|
|
|
Display* _display = nullptr;
|
|
|
|
int _screen = 0;
|
2019-07-07 09:44:09 +00:00
|
|
|
uint _depth = 24; //depth of the default root window
|
|
|
|
Window _parent = 0;
|
Update to v103r18 release.
byuu says:
Changelog:
- tomoko: improved handling of changing audio devices on the audio
settings panel
- ruby/audio/wasapi: added device enumeration and selection support¹
- ruby/audio/wasapi: release property store handle from audio device
- ruby/audio/wasapi: fix exclusive mode buffer filling
- ruby/video/glx2: ported to new API -- tested and confirmed working
great²
- ruby/video/sdl: fixed initialization -- tested and confirmed working
on FreeBSD now³
- ruby/video/xv: ported to new API -- tested and mostly working great,
sans fullscreen mode⁴
Errata:
- accidentally changed "Driver Settings" label to "Driver" on the
audio settings tab because I deleted the line and forgot the
"Settings" part
- need to use "return initialize();" from setDevice() in the WASAPI
driver, instead of "return true;", so device selection is currently
not functioning in this WIP for said driver
¹: for now, this will likely end up selecting the first available
endpoint device, which is probably wrong. I need to come up with a
system to expose good 'default values' when selecting new audio drivers,
or changing audio device settings.
²: glx2 is a fallback driver for system with only OpenGL 2.0 and no
OpenGL 3.2 drivers, such as FreeBSD 10.1 with AMD graphics cards.
³: although I really should track down why InputManager::poll() is
crashing the emulator when Video::ready() returns false ...
⁴: really bizarrely, when entering fullscreen mode, it looks like the
image was a triangle strip, and the bottom right triange is missing, and
the top left triangle skews the entire image into it. I'm suspecting
this is a Radeon driver bug when trying to create a 2560x1600 X-Video
surface. The glitch persists when exiting fullscreen, too.
If anyone can test the X-Video driver on their Linux/BSD system, it'd be
appreciated. If it's just my video card, I'll ignore it. If not,
hopefully someone can find the cause of the issue :|
2017-07-20 11:52:47 +00:00
|
|
|
Window _window = 0;
|
|
|
|
Colormap _colormap = 0;
|
|
|
|
GLXContext _glXContext = nullptr;
|
|
|
|
GLXWindow _glXWindow = 0;
|
|
|
|
|
|
|
|
bool _isDoubleBuffered = false;
|
|
|
|
bool _isDirect = false;
|
|
|
|
|
|
|
|
uint _width = 256;
|
|
|
|
uint _height = 256;
|
|
|
|
|
|
|
|
GLuint _glTexture = 0;
|
|
|
|
uint32_t* _glBuffer = nullptr;
|
|
|
|
uint _glWidth = 0;
|
|
|
|
uint _glHeight = 0;
|
Update to 20180729 release.
byuu wrote:
Sigh ...
asio.hpp needs #include <nall/windows/registry.hpp>
[Since the last WIP, byuu also posted the following message. -Ed.]
ruby drivers have all been updated (but not tested outside of BSD), and
I redesigned the settings window. The driver functionality all exists on
a new "Drivers" panel, the emulator/hack settings go to a
"Configuration" panel, and the video/audio panels lose driver settings.
As does the settings menu and its synchronize options.
I want to start pushing toward a v107 release. Critically, I will need
DirectSound and ALSA to support dynamic rate control. I'd also like to
eliminate the other system manifest.bml files. I need to update the
cheat code database format, and bundle at least a few quark shaders --
although I still need to default to Direct3D on Windows.
Turbo keys would be nice, if it's not too much effort. Aside from
netplay, it's the last significant feature I'm missing.
I think for v107, higan is going to be a bit rough around the edges
compared to bsnes. And I don't think it's practical to finish the bsnes
localization support.
I'm thinking we probably want another WIP to iron out any critical
issues, but this time there should be a feature freeze with the next
WIP.
2018-07-29 13:24:38 +00:00
|
|
|
uint _glFormat = GL_UNSIGNED_INT_8_8_8_8_REV;
|
2018-08-01 09:07:28 +00:00
|
|
|
|
|
|
|
auto (*glXSwapInterval)(int) -> int = nullptr;
|
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
|
|
|
};
|