Update to v068 release.

Changes since last WIP appear to be:
 - updated cheats DB
 - prefer RawInput to DirectInput on Win32.
 - Version bump.
 - Miscellaneous changes.
This commit is contained in:
Tim Allen
2010-08-22 10:44:27 +10:00
parent 8d8bfe9e7e
commit 7b039b712e
4 changed files with 2233 additions and 371 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -308,10 +308,10 @@ void InputInterface::driver(const char *driver) {
//select the *safest* available driver, not the fastest //select the *safest* available driver, not the fastest
const char* InputInterface::default_driver() { const char* InputInterface::default_driver() {
#if defined(INPUT_DIRECTINPUT) #if defined(INPUT_RAWINPUT)
return "DirectInput";
#elif defined(INPUT_RAWINPUT)
return "RawInput"; return "RawInput";
#elif defined(INPUT_DIRECTINPUT)
return "DirectInput";
#elif defined(INPUT_SDL) #elif defined(INPUT_SDL)
return "SDL"; return "SDL";
#elif defined(INPUT_X) #elif defined(INPUT_X)

View File

@@ -1,7 +1,7 @@
namespace SNES { namespace SNES {
namespace Info { namespace Info {
static const char Name[] = "bsnes"; static const char Name[] = "bsnes";
static const char Version[] = "067.26"; static const char Version[] = "068";
static const unsigned SerializerVersion = 12; static const unsigned SerializerVersion = 12;
} }
} }

View File

@@ -21,6 +21,9 @@ const uint8_t Video::cursor[15 * 15] = {
}; };
void Video::draw_cursor(uint16_t color, int x, int y) { void Video::draw_cursor(uint16_t color, int x, int y) {
uint16_t *data = (uint16_t*)ppu.output;
if(ppu.interlace() && ppu.field()) data += 512;
for(int cy = 0; cy < 15; cy++) { for(int cy = 0; cy < 15; cy++) {
int vy = y + cy - 7; int vy = y + cy - 7;
if(vy <= 0 || vy >= 240) continue; //do not draw offscreen if(vy <= 0 || vy >= 240) continue; //do not draw offscreen
@@ -34,13 +37,10 @@ void Video::draw_cursor(uint16_t color, int x, int y) {
uint16_t pixelcolor = (pixel == 1) ? 0 : color; uint16_t pixelcolor = (pixel == 1) ? 0 : color;
if(hires == false) { if(hires == false) {
*((uint16_t*)ppu.output + vy * 1024 + 0 + vx) = pixelcolor; *((uint16_t*)data + vy * 1024 + vx) = pixelcolor;
*((uint16_t*)ppu.output + vy * 1024 + 512 + vx) = pixelcolor;
} else { } else {
*((uint16_t*)ppu.output + vy * 1024 + 0 + vx * 2 + 0) = pixelcolor; *((uint16_t*)data + vy * 1024 + vx * 2 + 0) = pixelcolor;
*((uint16_t*)ppu.output + vy * 1024 + 512 + vx * 2 + 0) = pixelcolor; *((uint16_t*)data + vy * 1024 + vx * 2 + 1) = pixelcolor;
*((uint16_t*)ppu.output + vy * 1024 + 0 + vx * 2 + 1) = pixelcolor;
*((uint16_t*)ppu.output + vy * 1024 + 512 + vx * 2 + 1) = pixelcolor;
} }
} }
} }
@@ -54,6 +54,7 @@ void Video::update() {
} }
uint16_t *data = (uint16_t*)ppu.output; uint16_t *data = (uint16_t*)ppu.output;
if(ppu.interlace() && ppu.field()) data += 512;
unsigned width = 256; unsigned width = 256;
unsigned height = !ppu.overscan() ? 224 : 239; unsigned height = !ppu.overscan() ? 224 : 239;
@@ -73,7 +74,7 @@ void Video::update() {
height <<= 1; height <<= 1;
} }
system.interface->video_refresh(data + 1024, width, height); system.interface->video_refresh(ppu.output + 1024, width, height);
frame_hires = false; frame_hires = false;
frame_interlace = false; frame_interlace = false;