Update to v093r11 release.

byuu says:

Changelog:
- GBA: SOUND_CTL_H is readable, fixes sound effects in Mario&Luigi
  Superstar Saga [Cydrak] (note: game is still unplayable due to other
  bugs)
- phoenix/Windows: workaround for Win32 API ListView bug, fixes slot
  loading behavior
- ruby: added udev driver for Linux with rumble support, and added
  rumble support to existing RawInput driver for XInput and DirectInput
- ethos: added new "Rumble" mapping to GBA input assignment, use it to
  tell higan which controller to rumble (clear it to disable rumble)
- GBA: Game Boy Player rumble is now fully emulated
- core: added new normalized raw-color palette mode for Display
  Emulation shaders

The way rumble was added to ethos was somewhat hackish. The support
doesn't really exist in nall.

I need to redesign the entire input system, but that's not a change
I want to make so close to a release.
This commit is contained in:
Tim Allen
2013-12-21 21:45:58 +11:00
parent 84fab07756
commit 73be2e729c
36 changed files with 1247 additions and 263 deletions

View File

@@ -73,7 +73,7 @@ void ICD2::reset() {
joyp14lock = 0;
pulselock = true;
GameBoy::video.generate_palette(Emulator::Interface::PaletteMode::None);
GameBoy::video.generate_palette(Emulator::Interface::PaletteMode::Literal);
GameBoy::system.init();
GameBoy::system.power();
}

View File

@@ -4,7 +4,7 @@ Video video;
void Video::generate_palette(Emulator::Interface::PaletteMode mode) {
for(unsigned color = 0; color < (1 << 19); color++) {
if(mode == Emulator::Interface::PaletteMode::None) {
if(mode == Emulator::Interface::PaletteMode::Literal) {
palette[color] = color;
continue;
}
@@ -14,23 +14,32 @@ void Video::generate_palette(Emulator::Interface::PaletteMode mode) {
unsigned g = (color >> 5) & 31;
unsigned r = (color >> 0) & 31;
if(mode == Emulator::Interface::PaletteMode::Channel) {
l = image::normalize(l, 4, 16);
r = image::normalize(r, 5, 16);
g = image::normalize(g, 5, 16);
b = image::normalize(b, 5, 16);
palette[color] = interface->videoColor(color, l, r, g, b);
continue;
}
if(mode == Emulator::Interface::PaletteMode::Emulation) {
r = gamma_ramp[r];
g = gamma_ramp[g];
b = gamma_ramp[b];
} else {
r = (r << 3) | (r >> 2);
g = (g << 3) | (g >> 2);
b = (b << 3) | (b >> 2);
r = image::normalize(r, 5, 8);
g = image::normalize(g, 5, 8);
b = image::normalize(b, 5, 8);
}
double L = (1.0 + l) / 16.0;
if(l == 0) L *= 0.5;
unsigned R = L * (r << 8 | r << 0);
unsigned G = L * (g << 8 | g << 0);
unsigned B = L * (b << 8 | b << 0);
unsigned R = L * image::normalize(r, 8, 16);
unsigned G = L * image::normalize(g, 8, 16);
unsigned B = L * image::normalize(b, 8, 16);
palette[color] = interface->videoColor(color, R, G, B);
palette[color] = interface->videoColor(color, 0, R, G, B);
}
}