Merge pull request #65 from retro-wertz/libretro
retro_get_memory_data/size and memory descriptors update
This commit is contained in:
commit
c3edd6d433
|
@ -110,6 +110,8 @@ endif()
|
||||||
|
|
||||||
option(ENABLE_FFMPEG "Enable ffmpeg A/V recording" ${FFMPEG_DEFAULT})
|
option(ENABLE_FFMPEG "Enable ffmpeg A/V recording" ${FFMPEG_DEFAULT})
|
||||||
|
|
||||||
|
option(ENABLE_ONLINEUPDATES "Enable online update checks" ON)
|
||||||
|
|
||||||
set(LTO_DEFAULT ON)
|
set(LTO_DEFAULT ON)
|
||||||
|
|
||||||
# lto produces buggy binaries for 64 bit win32
|
# lto produces buggy binaries for 64 bit win32
|
||||||
|
@ -293,6 +295,10 @@ if(ENABLE_FFMPEG)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(NOT ENABLE_ONLINEUPDATES)
|
||||||
|
add_definitions(-DNO_ONLINEUPDATES)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(NOT ENABLE_FFMPEG)
|
if(NOT ENABLE_FFMPEG)
|
||||||
add_definitions(-DNO_FFMPEG)
|
add_definitions(-DNO_FFMPEG)
|
||||||
endif()
|
endif()
|
||||||
|
@ -444,7 +450,7 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID STREQUAL Clang)
|
||||||
if(X86_32 OR AMD64)
|
if(X86_32 OR AMD64)
|
||||||
set(MY_C_OPT_FLAGS ${MY_C_OPT_FLAGS} -mtune=generic)
|
set(MY_C_OPT_FLAGS ${MY_C_OPT_FLAGS} -mtune=generic)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# common debug flags
|
# common debug flags
|
||||||
if(CMAKE_COMPILER_IS_GNUCXX)
|
if(CMAKE_COMPILER_IS_GNUCXX)
|
||||||
set(MY_C_DBG_FLAGS -ggdb3 -Og -fno-omit-frame-pointer)
|
set(MY_C_DBG_FLAGS -ggdb3 -Og -fno-omit-frame-pointer)
|
||||||
|
|
|
@ -177,6 +177,7 @@ Here is the complete list:
|
||||||
| ENABLE_LINK | Enable GBA linking functionality (requires SFML) | ON |
|
| ENABLE_LINK | Enable GBA linking functionality (requires SFML) | ON |
|
||||||
| ENABLE_LIRC | Enable LIRC support | OFF |
|
| ENABLE_LIRC | Enable LIRC support | OFF |
|
||||||
| ENABLE_FFMPEG | Enable ffmpeg A/V recording | OFF |
|
| ENABLE_FFMPEG | Enable ffmpeg A/V recording | OFF |
|
||||||
|
| ENABLE_ONLINEUPDATES | Enable online update checks | ON |
|
||||||
| ENABLE_LTO | Compile with Link Time Optimization (gcc and clang only) | ON for release build |
|
| ENABLE_LTO | Compile with Link Time Optimization (gcc and clang only) | ON for release build |
|
||||||
| ENABLE_GBA_LOGGING | Enable extended GBA logging | ON |
|
| ENABLE_GBA_LOGGING | Enable extended GBA logging | ON |
|
||||||
| ENABLE_DIRECT3D | Direct3D rendering for wxWidgets (Windows, **NOT IMPLEMENTED!!!**) | ON |
|
| ENABLE_DIRECT3D | Direct3D rendering for wxWidgets (Windows, **NOT IMPLEMENTED!!!**) | ON |
|
||||||
|
|
|
@ -38,7 +38,6 @@ extern "C" {
|
||||||
#else // _WIN32
|
#else // _WIN32
|
||||||
#include <direct.h>
|
#include <direct.h>
|
||||||
#define GETCWD _getcwd
|
#define GETCWD _getcwd
|
||||||
#define snprintf sprintf
|
|
||||||
#define stat _stat
|
#define stat _stat
|
||||||
#define mkdir(X,Y) (_mkdir(X))
|
#define mkdir(X,Y) (_mkdir(X))
|
||||||
// from: https://www.linuxquestions.org/questions/programming-9/porting-to-win32-429334/
|
// from: https://www.linuxquestions.org/questions/programming-9/porting-to-win32-429334/
|
||||||
|
|
|
@ -4830,16 +4830,16 @@ void gbEmulate(int ticksToStop)
|
||||||
//(fixes a part of Carmaggedon problem)
|
//(fixes a part of Carmaggedon problem)
|
||||||
if ((register_LCDC & 0x01 || gbCgbMode) && (register_LCDC & 0x20) && (gbWindowLine != -2)) {
|
if ((register_LCDC & 0x01 || gbCgbMode) && (register_LCDC & 0x20) && (gbWindowLine != -2)) {
|
||||||
|
|
||||||
int inUseRegister_WY = 0;
|
int tempinUseRegister_WY = inUseRegister_WY;
|
||||||
int tempgbWindowLine = gbWindowLine;
|
int tempgbWindowLine = gbWindowLine;
|
||||||
|
|
||||||
if ((tempgbWindowLine == -1) || (tempgbWindowLine > 144)) {
|
if ((tempgbWindowLine == -1) || (tempgbWindowLine > 144)) {
|
||||||
inUseRegister_WY = oldRegister_WY;
|
tempinUseRegister_WY = oldRegister_WY;
|
||||||
if (register_LY > oldRegister_WY)
|
if (register_LY > oldRegister_WY)
|
||||||
tempgbWindowLine = 146;
|
tempgbWindowLine = 146;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (register_LY >= inUseRegister_WY) {
|
if (register_LY >= tempinUseRegister_WY) {
|
||||||
|
|
||||||
if (tempgbWindowLine == -1)
|
if (tempgbWindowLine == -1)
|
||||||
tempgbWindowLine = 0;
|
tempgbWindowLine = 0;
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
#include <libretro.h>
|
||||||
|
|
||||||
#include "NLS.h"
|
#include "NLS.h"
|
||||||
#include "System.h"
|
#include "System.h"
|
||||||
#include "Util.h"
|
#include "Util.h"
|
||||||
|
@ -111,63 +113,59 @@ bool utilIsGBImage(const char* file)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// strip .gz or .z off end
|
|
||||||
void utilStripDoubleExtension(const char* file, char* buffer)
|
|
||||||
{
|
|
||||||
if (buffer != file) // allows conversion in place
|
|
||||||
strcpy(buffer, file);
|
|
||||||
}
|
|
||||||
|
|
||||||
static bool utilIsImage(const char* file)
|
|
||||||
{
|
|
||||||
return utilIsGBAImage(file) || utilIsGBImage(file);
|
|
||||||
}
|
|
||||||
|
|
||||||
IMAGE_TYPE utilFindType(const char* file)
|
IMAGE_TYPE utilFindType(const char* file)
|
||||||
{
|
{
|
||||||
//char buffer[2048];
|
if (utilIsGBAImage(file))
|
||||||
if (!utilIsImage(file)) // TODO: utilIsArchive() instead?
|
return IMAGE_GBA;
|
||||||
{
|
|
||||||
return IMAGE_UNKNOWN;
|
if (utilIsGBImage(file))
|
||||||
}
|
return IMAGE_GB;
|
||||||
return utilIsGBAImage(file) ? IMAGE_GBA : IMAGE_GB;
|
|
||||||
|
return IMAGE_UNKNOWN;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int utilGetSize(int size)
|
static int utilGetSize(int size)
|
||||||
{
|
{
|
||||||
int res = 1;
|
int res = 1;
|
||||||
while(res < size)
|
while(res < size)
|
||||||
res <<= 1;
|
res <<= 1;
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t *utilLoad(const char *file, bool (*accept)(const char *), uint8_t *data, int &size)
|
uint8_t *utilLoad(const char *file, bool (*accept)(const char *), uint8_t *data, int &size)
|
||||||
{
|
{
|
||||||
FILE *fp = NULL;
|
FILE *fp = NULL;
|
||||||
//char *buf = NULL;
|
|
||||||
|
|
||||||
fp = fopen(file,"rb");
|
fp = fopen(file,"rb");
|
||||||
if(!fp) return NULL;
|
if (!fp)
|
||||||
fseek(fp, 0, SEEK_END); //go to end
|
{
|
||||||
size = ftell(fp); // get position at end (length)
|
log("Failed to open file %s", file);
|
||||||
rewind(fp);
|
return NULL;
|
||||||
|
}
|
||||||
|
fseek(fp, 0, SEEK_END); //go to end
|
||||||
|
|
||||||
uint8_t *image = data;
|
size = ftell(fp); // get position at end (length)
|
||||||
if(image == NULL)
|
rewind(fp);
|
||||||
{
|
|
||||||
//allocate buffer memory if none was passed to the function
|
|
||||||
image = (uint8_t *)malloc(utilGetSize(size));
|
|
||||||
if(image == NULL)
|
|
||||||
{
|
|
||||||
systemMessage(MSG_OUT_OF_MEMORY, N_("Failed to allocate memory for %s"),
|
|
||||||
"data");
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
FREAD_UNCHECKED(image, 1, size, fp); // read into buffer
|
uint8_t *image = data;
|
||||||
fclose(fp);
|
if(image == NULL)
|
||||||
return image;
|
{
|
||||||
|
image = (uint8_t *)malloc(utilGetSize(size));
|
||||||
|
if(image == NULL)
|
||||||
|
{
|
||||||
|
log("Failed to allocate memory for %s", file);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (fread(image, 1, size, fp) != size) {
|
||||||
|
log("Failed to read from %s", file);
|
||||||
|
fclose(fp);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
fclose(fp);
|
||||||
|
return image;
|
||||||
}
|
}
|
||||||
|
|
||||||
void utilGBAFindSave(const int size)
|
void utilGBAFindSave(const int size)
|
||||||
|
@ -220,12 +218,10 @@ void utilGBAFindSave(const int size)
|
||||||
p++;
|
p++;
|
||||||
}
|
}
|
||||||
// if no matches found, then set it to NONE
|
// if no matches found, then set it to NONE
|
||||||
if (detectedSaveType == 0) {
|
if (detectedSaveType == 0)
|
||||||
detectedSaveType = 5;
|
detectedSaveType = 5;
|
||||||
}
|
if (detectedSaveType == 4)
|
||||||
if (detectedSaveType == 4) {
|
|
||||||
detectedSaveType = 3;
|
detectedSaveType = 3;
|
||||||
}
|
|
||||||
|
|
||||||
cpuSaveType = detectedSaveType;
|
cpuSaveType = detectedSaveType;
|
||||||
rtcEnabled = rtcFound_;
|
rtcEnabled = rtcFound_;
|
||||||
|
@ -234,30 +230,20 @@ void utilGBAFindSave(const int size)
|
||||||
|
|
||||||
void utilUpdateSystemColorMaps(bool lcd)
|
void utilUpdateSystemColorMaps(bool lcd)
|
||||||
{
|
{
|
||||||
switch (systemColorDepth) {
|
int i = 0;
|
||||||
case 16: {
|
|
||||||
for (int i = 0; i < 0x10000; i++) {
|
|
||||||
systemColorMap16[i] = ((i & 0x1f) << systemRedShift) | (((i & 0x3e0) >> 5) << systemGreenShift) | (((i & 0x7c00) >> 10) << systemBlueShift);
|
|
||||||
}
|
|
||||||
} break;
|
|
||||||
case 24:
|
|
||||||
case 32: {
|
|
||||||
for (int i = 0; i < 0x10000; i++) {
|
|
||||||
systemColorMap32[i] = ((i & 0x1f) << systemRedShift) | (((i & 0x3e0) >> 5) << systemGreenShift) | (((i & 0x7c00) >> 10) << systemBlueShift);
|
|
||||||
}
|
|
||||||
} break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Check for existence of file.
|
(void)lcd;
|
||||||
bool utilFileExists(const char* filename)
|
|
||||||
{
|
switch (systemColorDepth) {
|
||||||
FILE* f = fopen(filename, "r");
|
case 16:
|
||||||
if (f == NULL) {
|
for (i = 0; i < 0x10000; i++)
|
||||||
return false;
|
systemColorMap16[i] = ((i & 0x1f) << systemRedShift) | (((i & 0x3e0) >> 5) << systemGreenShift) | (((i & 0x7c00) >> 10) << systemBlueShift);
|
||||||
} else {
|
break;
|
||||||
fclose(f);
|
case 24:
|
||||||
return true;
|
case 32:
|
||||||
|
for (i = 0; i < 0x10000; i++)
|
||||||
|
systemColorMap32[i] = ((i & 0x1f) << systemRedShift) | (((i & 0x3e0) >> 5) << systemGreenShift) | (((i & 0x7c00) >> 10) << systemBlueShift);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -156,57 +156,63 @@ uint16_t systemGbPalette[24] = {
|
||||||
GS555(0x1f), GS555(0x15), GS555(0x0c), 0
|
GS555(0x1f), GS555(0x15), GS555(0x0c), 0
|
||||||
};
|
};
|
||||||
|
|
||||||
static const uint16_t defaultGBPalettes[][8] = {
|
struct palettes_t {
|
||||||
|
char name[40];
|
||||||
|
uint16_t data[8];
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct palettes_t defaultGBPalettes[] = {
|
||||||
{
|
{
|
||||||
// Standard
|
"Standard",
|
||||||
0x7FFF, 0x56B5, 0x318C, 0x0000, 0x7FFF, 0x56B5, 0x318C, 0x0000,
|
{ 0x7FFF, 0x56B5, 0x318C, 0x0000, 0x7FFF, 0x56B5, 0x318C, 0x0000 },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
// Blue Sea
|
"Blue Sea",
|
||||||
0x6200, 0x7E10, 0x7C10, 0x5000, 0x6200, 0x7E10, 0x7C10, 0x5000,
|
{ 0x6200, 0x7E10, 0x7C10, 0x5000, 0x6200, 0x7E10, 0x7C10, 0x5000 },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
// Dark Night
|
"Dark Night",
|
||||||
0x4008, 0x4000, 0x2000, 0x2008, 0x4008, 0x4000, 0x2000, 0x2008,
|
{ 0x4008, 0x4000, 0x2000, 0x2008, 0x4008, 0x4000, 0x2000, 0x2008 },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
// Green Forest
|
"Green Forest",
|
||||||
0x43F0, 0x03E0, 0x4200, 0x2200, 0x43F0, 0x03E0, 0x4200, 0x2200,
|
{ 0x43F0, 0x03E0, 0x4200, 0x2200, 0x43F0, 0x03E0, 0x4200, 0x2200 },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
// Hot Desert
|
"Hot Desert",
|
||||||
0x43FF, 0x03FF, 0x221F, 0x021F, 0x43FF, 0x03FF, 0x221F, 0x021F,
|
{ 0x43FF, 0x03FF, 0x221F, 0x021F, 0x43FF, 0x03FF, 0x221F, 0x021F },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
// Pink Dreams
|
"Pink Dreams",
|
||||||
0x621F, 0x7E1F, 0x7C1F, 0x2010, 0x621F, 0x7E1F, 0x7C1F, 0x2010,
|
{ 0x621F, 0x7E1F, 0x7C1F, 0x2010, 0x621F, 0x7E1F, 0x7C1F, 0x2010 },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
// Weird Colors
|
"Weird Colors",
|
||||||
0x621F, 0x401F, 0x001F, 0x2010, 0x621F, 0x401F, 0x001F, 0x2010,
|
{ 0x621F, 0x401F, 0x001F, 0x2010, 0x621F, 0x401F, 0x001F, 0x2010 }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
// Real GB Colors
|
"Real GB Colors",
|
||||||
0x1B8E, 0x02C0, 0x0DA0, 0x1140, 0x1B8E, 0x02C0, 0x0DA0, 0x1140,
|
{ 0x1B8E, 0x02C0, 0x0DA0, 0x1140, 0x1B8E, 0x02C0, 0x0DA0, 0x1140 },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
// Real 'GB on GBASP' Colors
|
"Real GB on GBASP Colors",
|
||||||
0x7BDE, /*0x23F0*/ 0x5778, /*0x5DC0*/ 0x5640, 0x0000, 0x7BDE, /*0x3678*/ 0x529C, /*0x0980*/ 0x2990, 0x0000,
|
{ 0x7BDE, 0x5778, 0x5640, 0x0000, 0x7BDE, 0x529C, 0x2990, 0x0000 },
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
static void set_gbPalette(void)
|
static void set_gbPalette(void)
|
||||||
{
|
{
|
||||||
const uint16_t *pal = defaultGBPalettes[current_gbPalette];
|
|
||||||
|
|
||||||
if (type != IMAGE_GB)
|
if (type != IMAGE_GB)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (gbCgbMode || gbSgbMode)
|
if (gbCgbMode || gbSgbMode)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for (int i = 0; i < 8; i++)
|
const uint16_t *pal = defaultGBPalettes[current_gbPalette].data;
|
||||||
gbPalette[i] = pal[i];
|
for (int i = 0; i < 8; i++) {
|
||||||
|
uint16_t val = pal[i];
|
||||||
|
gbPalette[i] = val;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void set_gbColorCorrection(int value)
|
static void set_gbColorCorrection(int value)
|
||||||
|
@ -329,16 +335,17 @@ void* retro_get_memory_data(unsigned id)
|
||||||
return vram;
|
return vram;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (type == IMAGE_GB) {
|
|
||||||
|
if (type == IMAGE_GB) {
|
||||||
switch (id) {
|
switch (id) {
|
||||||
case RETRO_MEMORY_SAVE_RAM:
|
case RETRO_MEMORY_SAVE_RAM:
|
||||||
if (gbBattery)
|
if (gbBattery)
|
||||||
return gbRam;
|
return gbRam;
|
||||||
return NULL;
|
return NULL;
|
||||||
case RETRO_MEMORY_SYSTEM_RAM:
|
case RETRO_MEMORY_SYSTEM_RAM:
|
||||||
return gbMemoryMap[0x0c];
|
return (gbCgbMode ? gbWram : (gbMemory + 0xC000));
|
||||||
case RETRO_MEMORY_VIDEO_RAM:
|
case RETRO_MEMORY_VIDEO_RAM:
|
||||||
return gbMemoryMap[0x08] ;
|
return (gbCgbMode ? gbVram : (gbMemory + 0x8000));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -363,16 +370,17 @@ size_t retro_get_memory_size(unsigned id)
|
||||||
return SIZE_VRAM - 0x2000; // usuable vram is only 0x18000
|
return SIZE_VRAM - 0x2000; // usuable vram is only 0x18000
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (type == IMAGE_GB) {
|
|
||||||
|
if (type == IMAGE_GB) {
|
||||||
switch (id) {
|
switch (id) {
|
||||||
case RETRO_MEMORY_SAVE_RAM:
|
case RETRO_MEMORY_SAVE_RAM:
|
||||||
if (gbBattery)
|
if (gbBattery)
|
||||||
return gbRamSize;
|
return gbRamSize;
|
||||||
return 0;
|
return 0;
|
||||||
case RETRO_MEMORY_SYSTEM_RAM:
|
case RETRO_MEMORY_SYSTEM_RAM:
|
||||||
return 0x2000;
|
return gbCgbMode ? 0x8000 : 0x2000;
|
||||||
case RETRO_MEMORY_VIDEO_RAM:
|
case RETRO_MEMORY_VIDEO_RAM:
|
||||||
return 0x2000;
|
return gbCgbMode ? 0x4000 : 0x2000;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1486,7 +1494,7 @@ bool retro_load_game(const struct retro_game_info *game)
|
||||||
gb_init();
|
gb_init();
|
||||||
|
|
||||||
unsigned addr, i;
|
unsigned addr, i;
|
||||||
struct retro_memory_descriptor desc[17];
|
struct retro_memory_descriptor desc[18];
|
||||||
struct retro_memory_map retromap;
|
struct retro_memory_map retromap;
|
||||||
|
|
||||||
memset(desc, 0, sizeof(desc));
|
memset(desc, 0, sizeof(desc));
|
||||||
|
@ -1509,22 +1517,39 @@ bool retro_load_game(const struct retro_game_info *game)
|
||||||
// $0000-$00FF Restart and Interrupt Vectors
|
// $0000-$00FF Restart and Interrupt Vectors
|
||||||
// http://gameboy.mongenel.com/dmg/asmmemmap.html
|
// http://gameboy.mongenel.com/dmg/asmmemmap.html
|
||||||
for (addr = 0, i = 0; addr < 16; addr++) {
|
for (addr = 0, i = 0; addr < 16; addr++) {
|
||||||
if (gbMemoryMap[addr] != NULL) {
|
if (addr == 13) continue;
|
||||||
desc[i].ptr = gbMemoryMap[addr];
|
if (addr == 14) continue;
|
||||||
desc[i].start = addr * 0x1000;
|
if (addr == 12) { // WRAM, bank 0-1
|
||||||
desc[i].len = 4096;
|
if (!gbCgbMode) { // WRAM-GB
|
||||||
if (addr < 4) desc[i].flags = RETRO_MEMDESC_CONST;
|
if (!gbMemory) continue;
|
||||||
|
desc[i].ptr = gbMemory + 0xC000;
|
||||||
|
} else { // WRAM GBC
|
||||||
|
if (!gbWram) continue;
|
||||||
|
desc[i].ptr = gbWram;
|
||||||
|
}
|
||||||
|
desc[i].start = addr * 0x1000;
|
||||||
|
desc[i].len = 0x2000;
|
||||||
i++;
|
i++;
|
||||||
|
continue;
|
||||||
|
} else { // Everything else map
|
||||||
|
if (gbMemoryMap[addr]) {
|
||||||
|
desc[i].ptr = gbMemoryMap[addr];
|
||||||
|
desc[i].start = addr * 0x1000;
|
||||||
|
desc[i].len = 0x1000;
|
||||||
|
if (addr < 4)
|
||||||
|
desc[i].flags = RETRO_MEMDESC_CONST;
|
||||||
|
i++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gbCgbMode) { // banks 2-7 of GBC work ram banks at $10000
|
if (gbWram && gbCgbMode) { // banks 2-7 of GBC work ram banks at $10000
|
||||||
desc[i].ptr = (void*)gbWram;
|
desc[i].ptr = gbWram;
|
||||||
desc[i].offset = 0x2000;
|
desc[i].offset = 0x2000;
|
||||||
desc[i].start = 0x10000;
|
desc[i].start = 0x10000;
|
||||||
desc[i].select = 0xFFFF0000;
|
desc[i].select = 0xFFFFA000;
|
||||||
desc[i].len = 0x6000;
|
desc[i].len = 0x6000;
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
retromap.descriptors = desc;
|
retromap.descriptors = desc;
|
||||||
|
|
|
@ -89,6 +89,24 @@ void MainFrame::SetMenuOption(const char* menuName, int value)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void toggleBooleanVar(bool *menuValue, bool *globalVar)
|
||||||
|
{
|
||||||
|
if (*menuValue == *globalVar) // used accelerator
|
||||||
|
*globalVar = !(*globalVar);
|
||||||
|
else // used menu item
|
||||||
|
*globalVar = *menuValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void toggleBitVar(bool *menuValue, int *globalVar, int mask)
|
||||||
|
{
|
||||||
|
bool isEnabled = ((*globalVar) & (mask)) != (mask);
|
||||||
|
if (*menuValue == isEnabled)
|
||||||
|
*globalVar = ((*globalVar) & ~(mask)) | (!isEnabled ? (mask) : 0);
|
||||||
|
else
|
||||||
|
*globalVar = ((*globalVar) & ~(mask)) | (*menuValue ? (mask) : 0);
|
||||||
|
*menuValue = ((*globalVar) & (mask)) != (mask);
|
||||||
|
}
|
||||||
|
|
||||||
//// File menu
|
//// File menu
|
||||||
|
|
||||||
static int open_ft = 0;
|
static int open_ft = 0;
|
||||||
|
@ -188,7 +206,10 @@ EVT_HANDLER(RecentReset, "Reset recent ROM list")
|
||||||
|
|
||||||
EVT_HANDLER(RecentFreeze, "Freeze recent ROM list (toggle)")
|
EVT_HANDLER(RecentFreeze, "Freeze recent ROM list (toggle)")
|
||||||
{
|
{
|
||||||
GetMenuOptionBool("RecentFreeze", gopts.recent_freeze);
|
bool menuPress;
|
||||||
|
GetMenuOptionBool("RecentFreeze", menuPress);
|
||||||
|
toggleBooleanVar(&menuPress, &gopts.recent_freeze);
|
||||||
|
SetMenuOption("RecentFreeze", gopts.recent_freeze ? 1 : 0);
|
||||||
update_opts();
|
update_opts();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1355,18 +1376,8 @@ EVT_HANDLER(Pause, "Pause (toggle)")
|
||||||
{
|
{
|
||||||
bool menuPress;
|
bool menuPress;
|
||||||
GetMenuOptionBool("Pause", menuPress);
|
GetMenuOptionBool("Pause", menuPress);
|
||||||
|
toggleBooleanVar(&menuPress, &paused);
|
||||||
if (paused == menuPress)
|
SetMenuOption("Pause", paused ? 1 : 0);
|
||||||
{
|
|
||||||
// used accelerator
|
|
||||||
paused = !paused;
|
|
||||||
SetMenuOption("Pause", paused ? 1 : 0);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// used menu item
|
|
||||||
paused = menuPress;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (paused)
|
if (paused)
|
||||||
panel->Pause();
|
panel->Pause();
|
||||||
|
@ -1383,7 +1394,10 @@ EVT_HANDLER(Pause, "Pause (toggle)")
|
||||||
// new
|
// new
|
||||||
EVT_HANDLER_MASK(EmulatorSpeedupToggle, "Turbo mode (toggle)", CMDEN_GB | CMDEN_GBA)
|
EVT_HANDLER_MASK(EmulatorSpeedupToggle, "Turbo mode (toggle)", CMDEN_GB | CMDEN_GBA)
|
||||||
{
|
{
|
||||||
GetMenuOptionBool("EmulatorSpeedupToggle", turbo);
|
bool menuPress;
|
||||||
|
GetMenuOptionBool("EmulatorSpeedupToggle", menuPress);
|
||||||
|
toggleBooleanVar(&menuPress, &turbo);
|
||||||
|
SetMenuOption("EmulatorSpeedupToggle", turbo ? 1 : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
EVT_HANDLER_MASK(Reset, "Reset", CMDEN_GB | CMDEN_GBA)
|
EVT_HANDLER_MASK(Reset, "Reset", CMDEN_GB | CMDEN_GBA)
|
||||||
|
@ -1399,21 +1413,37 @@ EVT_HANDLER(ToggleFullscreen, "Full screen (toggle)")
|
||||||
|
|
||||||
EVT_HANDLER(JoypadAutofireA, "Autofire A (toggle)")
|
EVT_HANDLER(JoypadAutofireA, "Autofire A (toggle)")
|
||||||
{
|
{
|
||||||
|
bool menuPress;
|
||||||
|
GetMenuOptionBool("JoypadAutofireA", menuPress);
|
||||||
|
toggleBitVar(&menuPress, &autofire, KEYM_A);
|
||||||
|
SetMenuOption("JoypadAutofireA", menuPress ? 1 : 0);
|
||||||
GetMenuOptionInt("JoypadAutofireA", autofire, KEYM_A);
|
GetMenuOptionInt("JoypadAutofireA", autofire, KEYM_A);
|
||||||
}
|
}
|
||||||
|
|
||||||
EVT_HANDLER(JoypadAutofireB, "Autofire B (toggle)")
|
EVT_HANDLER(JoypadAutofireB, "Autofire B (toggle)")
|
||||||
{
|
{
|
||||||
|
bool menuPress;
|
||||||
|
GetMenuOptionBool("JoypadAutofireB", menuPress);
|
||||||
|
toggleBitVar(&menuPress, &autofire, KEYM_B);
|
||||||
|
SetMenuOption("JoypadAutofireB", menuPress ? 1 : 0);
|
||||||
GetMenuOptionInt("JoypadAutofireB", autofire, KEYM_B);
|
GetMenuOptionInt("JoypadAutofireB", autofire, KEYM_B);
|
||||||
}
|
}
|
||||||
|
|
||||||
EVT_HANDLER(JoypadAutofireL, "Autofire L (toggle)")
|
EVT_HANDLER(JoypadAutofireL, "Autofire L (toggle)")
|
||||||
{
|
{
|
||||||
|
bool menuPress;
|
||||||
|
GetMenuOptionBool("JoypadAutofireL", menuPress);
|
||||||
|
toggleBitVar(&menuPress, &autofire, KEYM_LEFT);
|
||||||
|
SetMenuOption("JoypadAutofireL", menuPress ? 1 : 0);
|
||||||
GetMenuOptionInt("JoypadAutofireL", autofire, KEYM_LEFT);
|
GetMenuOptionInt("JoypadAutofireL", autofire, KEYM_LEFT);
|
||||||
}
|
}
|
||||||
|
|
||||||
EVT_HANDLER(JoypadAutofireR, "Autofire R (toggle)")
|
EVT_HANDLER(JoypadAutofireR, "Autofire R (toggle)")
|
||||||
{
|
{
|
||||||
|
bool menuPress;
|
||||||
|
GetMenuOptionBool("JoypadAutofireR", menuPress);
|
||||||
|
toggleBitVar(&menuPress, &autofire, KEYM_RIGHT);
|
||||||
|
SetMenuOption("JoypadAutofireR", menuPress ? 1 : 0);
|
||||||
GetMenuOptionInt("JoypadAutofireR", autofire, KEYM_RIGHT);
|
GetMenuOptionInt("JoypadAutofireR", autofire, KEYM_RIGHT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1424,7 +1454,10 @@ EVT_HANDLER_MASK(LoadGameRecent, "Load most recent save", CMDEN_SAVST)
|
||||||
|
|
||||||
EVT_HANDLER(LoadGameAutoLoad, "Auto load most recent save (toggle)")
|
EVT_HANDLER(LoadGameAutoLoad, "Auto load most recent save (toggle)")
|
||||||
{
|
{
|
||||||
GetMenuOptionBool("LoadGameAutoLoad", gopts.autoload_state);
|
bool menuPress;
|
||||||
|
GetMenuOptionBool("LoadGameAutoLoad", menuPress);
|
||||||
|
toggleBooleanVar(&menuPress, &gopts.autoload_state);
|
||||||
|
SetMenuOption("LoadGameAutoLoad", gopts.autoload_state ? 1 : 0);
|
||||||
update_opts();
|
update_opts();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1499,6 +1532,10 @@ EVT_HANDLER_MASK(Load, "Load state...", CMDEN_GB | CMDEN_GBA)
|
||||||
// new
|
// new
|
||||||
EVT_HANDLER(KeepSaves, "Do not load battery saves (toggle)")
|
EVT_HANDLER(KeepSaves, "Do not load battery saves (toggle)")
|
||||||
{
|
{
|
||||||
|
bool menuPress;
|
||||||
|
GetMenuOptionBool("KeepSaves", menuPress);
|
||||||
|
toggleBitVar(&menuPress, &skipSaveGameBattery, 1);
|
||||||
|
SetMenuOption("KeepSaves", menuPress ? 1 : 0);
|
||||||
GetMenuOptionInt("KeepSaves", skipSaveGameBattery, 1);
|
GetMenuOptionInt("KeepSaves", skipSaveGameBattery, 1);
|
||||||
update_opts();
|
update_opts();
|
||||||
}
|
}
|
||||||
|
@ -1506,6 +1543,10 @@ EVT_HANDLER(KeepSaves, "Do not load battery saves (toggle)")
|
||||||
// new
|
// new
|
||||||
EVT_HANDLER(KeepCheats, "Do not change cheat list (toggle)")
|
EVT_HANDLER(KeepCheats, "Do not change cheat list (toggle)")
|
||||||
{
|
{
|
||||||
|
bool menuPress;
|
||||||
|
GetMenuOptionBool("KeepCheats", menuPress);
|
||||||
|
toggleBitVar(&menuPress, &skipSaveGameCheats, 1);
|
||||||
|
SetMenuOption("KeepCheats", menuPress ? 1 : 0);
|
||||||
GetMenuOptionInt("KeepCheats", skipSaveGameCheats, 1);
|
GetMenuOptionInt("KeepCheats", skipSaveGameCheats, 1);
|
||||||
update_opts();
|
update_opts();
|
||||||
}
|
}
|
||||||
|
@ -1655,7 +1696,10 @@ EVT_HANDLER_MASK(CheatsSearch, "Create cheat...", CMDEN_GB | CMDEN_GBA)
|
||||||
// new
|
// new
|
||||||
EVT_HANDLER(CheatsAutoSaveLoad, "Auto save/load cheats (toggle)")
|
EVT_HANDLER(CheatsAutoSaveLoad, "Auto save/load cheats (toggle)")
|
||||||
{
|
{
|
||||||
GetMenuOptionBool("CheatsAutoSaveLoad", gopts.autoload_cheats);
|
bool menuPress;
|
||||||
|
GetMenuOptionBool("CheatsAutoSaveLoad", menuPress);
|
||||||
|
toggleBooleanVar(&menuPress, &gopts.autoload_cheats);
|
||||||
|
SetMenuOption("CheatsAutoSaveLoad", gopts.autoload_cheats ? 1 : 0);
|
||||||
update_opts();
|
update_opts();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1663,6 +1707,10 @@ EVT_HANDLER(CheatsAutoSaveLoad, "Auto save/load cheats (toggle)")
|
||||||
// changed for convenience to match internal variable functionality
|
// changed for convenience to match internal variable functionality
|
||||||
EVT_HANDLER(CheatsEnable, "Enable cheats (toggle)")
|
EVT_HANDLER(CheatsEnable, "Enable cheats (toggle)")
|
||||||
{
|
{
|
||||||
|
bool menuPress;
|
||||||
|
GetMenuOptionBool("CheatsEnable", menuPress);
|
||||||
|
toggleBitVar(&menuPress, &cheatsEnabled, 1);
|
||||||
|
SetMenuOption("CheatsEnable", menuPress ? 1 : 0);
|
||||||
GetMenuOptionInt("CheatsEnable", cheatsEnabled, 1);
|
GetMenuOptionInt("CheatsEnable", cheatsEnabled, 1);
|
||||||
update_opts();
|
update_opts();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1646,6 +1646,18 @@ public:
|
||||||
{
|
{
|
||||||
bool clear = ev.GetId() == XRCID("Clear");
|
bool clear = ev.GetId() == XRCID("Clear");
|
||||||
|
|
||||||
|
// For the individual clear buttons, we assume their name is
|
||||||
|
// "Clear" + joynames[i]
|
||||||
|
// ClearUp for Up; ClearR for R etc
|
||||||
|
for (int i = 0; i < NUM_KEYS; ++i) {
|
||||||
|
wxJoyKeyTextCtrl* tc = XRCCTRL_D(*p, joynames[i], wxJoyKeyTextCtrl);
|
||||||
|
wxString singleClearButton("Clear" + joynames[i]);
|
||||||
|
if (ev.GetId() == XRCID(singleClearButton)) {
|
||||||
|
tc->SetValue(wxEmptyString);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for (int i = 0; i < NUM_KEYS; i++) {
|
for (int i = 0; i < NUM_KEYS; i++) {
|
||||||
wxJoyKeyTextCtrl* tc = XRCCTRL_D(*p, joynames[i], wxJoyKeyTextCtrl);
|
wxJoyKeyTextCtrl* tc = XRCCTRL_D(*p, joynames[i], wxJoyKeyTextCtrl);
|
||||||
|
|
||||||
|
@ -3324,16 +3336,43 @@ bool MainFrame::BindControls()
|
||||||
sc = SafeXRCCTRL<wxSpinCtrl>(d, n); \
|
sc = SafeXRCCTRL<wxSpinCtrl>(d, n); \
|
||||||
sc->SetValidator(wxGenericValidator(&o)); \
|
sc->SetValidator(wxGenericValidator(&o)); \
|
||||||
} while (0)
|
} while (0)
|
||||||
#define getsc_uint(n, o) \
|
#define getsc_uint(n, o) \
|
||||||
do { \
|
do { \
|
||||||
sc = SafeXRCCTRL<wxSpinCtrl>(d, n); \
|
sc = SafeXRCCTRL<wxSpinCtrl>(d, n); \
|
||||||
sc->SetValidator(wxUIntValidator(&o)); \
|
sc->SetValidator(wxUIntValidator(&o)); \
|
||||||
} while (0)
|
} while (0)
|
||||||
{
|
{
|
||||||
|
#ifndef NO_ONLINEUPDATES
|
||||||
// Online Auto Update check frequency
|
// Online Auto Update check frequency
|
||||||
getrbi("UpdateNever", gopts.onlineupdates, 0);
|
getrbi("UpdateNever", gopts.onlineupdates, 0);
|
||||||
getrbi("UpdateDaily", gopts.onlineupdates, 1);
|
getrbi("UpdateDaily", gopts.onlineupdates, 1);
|
||||||
getrbi("UpdateWeekly", gopts.onlineupdates, 7);
|
getrbi("UpdateWeekly", gopts.onlineupdates, 7);
|
||||||
|
#else
|
||||||
|
wxWindowList &children = d->GetChildren();
|
||||||
|
std::vector<wxWindow*> forDeletion;
|
||||||
|
for (wxWindowList::Node *node = children.GetFirst(); node; node = node->GetNext())
|
||||||
|
{
|
||||||
|
wxWindow *current = (wxWindow *)node->GetData();
|
||||||
|
if (dynamic_cast<wxStaticText*>(current))
|
||||||
|
{
|
||||||
|
if (((wxStaticText *)current)->GetName() == wxT("OnlineUpdates"))
|
||||||
|
forDeletion.push_back(current);
|
||||||
|
}
|
||||||
|
else if (dynamic_cast<wxRadioButton*>(current))
|
||||||
|
{
|
||||||
|
wxString tmp = ((wxRadioButton *)current)->GetName();
|
||||||
|
if (tmp == wxT("UpdateNever") ||
|
||||||
|
tmp == wxT("UpdateDaily") ||
|
||||||
|
tmp == wxT("UpdateWeekly"))
|
||||||
|
forDeletion.push_back(current);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (unsigned i = 0; i < forDeletion.size(); ++i)
|
||||||
|
{
|
||||||
|
delete forDeletion[i];
|
||||||
|
}
|
||||||
|
std::vector<wxWindow*>().swap(forDeletion);
|
||||||
|
#endif // NO_ONLINEUPDATES
|
||||||
getrbi("PNG", captureFormat, 0);
|
getrbi("PNG", captureFormat, 0);
|
||||||
getrbi("BMP", captureFormat, 1);
|
getrbi("BMP", captureFormat, 1);
|
||||||
getsc("RewindInterval", gopts.rewind_interval);
|
getsc("RewindInterval", gopts.rewind_interval);
|
||||||
|
@ -3405,10 +3444,10 @@ bool MainFrame::BindControls()
|
||||||
} while (0)
|
} while (0)
|
||||||
#define getcbie(n, o, v) getbie(n, o, v, cb, wxCheckBox, CB)
|
#define getcbie(n, o, v) getbie(n, o, v, cb, wxCheckBox, CB)
|
||||||
wxFilePickerCtrl* fp;
|
wxFilePickerCtrl* fp;
|
||||||
#define getfp(n, o) \
|
#define getfp(n, o, l) \
|
||||||
do { \
|
do { \
|
||||||
fp = SafeXRCCTRL<wxFilePickerCtrl>(d, n); \
|
fp = SafeXRCCTRL<wxFilePickerCtrl>(d, n); \
|
||||||
fp->SetValidator(wxFileDirPickerValidator(&o)); \
|
fp->SetValidator(wxFileDirPickerValidator(&o, l)); \
|
||||||
} while (0)
|
} while (0)
|
||||||
d = LoadXRCropertySheetDialog("GameBoyConfig");
|
d = LoadXRCropertySheetDialog("GameBoyConfig");
|
||||||
{
|
{
|
||||||
|
@ -3418,10 +3457,15 @@ bool MainFrame::BindControls()
|
||||||
// in command handler. Plus making changes might require resizing
|
// in command handler. Plus making changes might require resizing
|
||||||
// game area. Validation only here.
|
// game area. Validation only here.
|
||||||
SafeXRCCTRL<wxChoice>(d, "Borders");
|
SafeXRCCTRL<wxChoice>(d, "Borders");
|
||||||
/// Boot ROM
|
/// GB Boot ROM
|
||||||
getfp("BootRom", gopts.gb_bios);
|
wxStaticText *label = SafeXRCCTRL<wxStaticText>(d, "BiosFile");
|
||||||
|
if (!gopts.gb_bios.empty()) label->SetLabel(gopts.gb_bios);
|
||||||
|
getfp("BootRom", gopts.gb_bios, label);
|
||||||
getlab("BootRomLab");
|
getlab("BootRomLab");
|
||||||
getfp("CBootRom", gopts.gbc_bios);
|
/// GBC
|
||||||
|
wxStaticText *clabel = SafeXRCCTRL<wxStaticText>(d, "CBiosFile");
|
||||||
|
if (!gopts.gbc_bios.empty()) clabel->SetLabel(gopts.gbc_bios);
|
||||||
|
getfp("CBootRom", gopts.gbc_bios, clabel);
|
||||||
getlab("CBootRomLab");
|
getlab("CBootRomLab");
|
||||||
/// Custom Colors
|
/// Custom Colors
|
||||||
//getcbi("Color", gbColorOption);
|
//getcbi("Color", gbColorOption);
|
||||||
|
@ -3492,7 +3536,9 @@ bool MainFrame::BindControls()
|
||||||
wxCommandEventHandler(BatConfig_t::Detect),
|
wxCommandEventHandler(BatConfig_t::Detect),
|
||||||
NULL, &BatConfigHandler);
|
NULL, &BatConfigHandler);
|
||||||
/// Boot ROM
|
/// Boot ROM
|
||||||
getfp("BootRom", gopts.gba_bios);
|
wxStaticText *label = SafeXRCCTRL<wxStaticText>(d, "BiosFile");
|
||||||
|
if (!gopts.gba_bios.empty()) label->SetLabel(gopts.gba_bios);
|
||||||
|
getfp("BootRom", gopts.gba_bios, label);
|
||||||
getlab("BootRomLab");
|
getlab("BootRomLab");
|
||||||
/// Game Overrides
|
/// Game Overrides
|
||||||
getgbaw("GameSettings");
|
getgbaw("GameSettings");
|
||||||
|
@ -3691,6 +3737,12 @@ bool MainFrame::BindControls()
|
||||||
w->Connect(XRCID("Clear"), wxEVT_COMMAND_BUTTON_CLICKED,
|
w->Connect(XRCID("Clear"), wxEVT_COMMAND_BUTTON_CLICKED,
|
||||||
wxCommandEventHandler(JoyPadConfig_t::JoypadConfigButtons),
|
wxCommandEventHandler(JoyPadConfig_t::JoypadConfigButtons),
|
||||||
NULL, &JoyPadConfigHandler[i]);
|
NULL, &JoyPadConfigHandler[i]);
|
||||||
|
for (int j = 0; j < NUM_KEYS; ++j) {
|
||||||
|
w->Connect(XRCID(wxString("Clear" + joynames[j])),
|
||||||
|
wxEVT_COMMAND_BUTTON_CLICKED,
|
||||||
|
wxCommandEventHandler(JoyPadConfig_t::JoypadConfigButtons),
|
||||||
|
NULL, &JoyPadConfigHandler[i]);
|
||||||
|
}
|
||||||
joyDialog->Fit();
|
joyDialog->Fit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -143,18 +143,27 @@ const wxString joynames[NUM_KEYS] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
wxJoyKeyBinding defkeys_keyboard[NUM_KEYS] = {
|
wxJoyKeyBinding defkeys_keyboard[NUM_KEYS] = {
|
||||||
WJKB(WXK_UP), WJKB(WXK_DOWN), WJKB(WXK_LEFT), WJKB(WXK_RIGHT),
|
WJKB(wxT('W')), WJKB(wxT('S')), WJKB(wxT('A')), WJKB(wxT('D')),
|
||||||
WJKB(wxT('Z')), WJKB(wxT('X')), WJKB(wxT('A')), WJKB(wxT('S')),
|
WJKB(wxT('L')), WJKB(wxT('K')), WJKB(wxT('I')), WJKB(wxT('O')),
|
||||||
WJKB(wxT('C')), WJKB(wxT('V')),
|
WJKB(WXK_BACK), WJKB(WXK_RETURN),
|
||||||
WJKB(0), WJKB(0), WJKB(0), WJKB(0),
|
WJKB(0), WJKB(0), WJKB(0), WJKB(0),
|
||||||
WJKB(0), WJKB(0), WJKB(0), WJKB(0),
|
WJKB(0), WJKB(0), WJKB(0), WJKB(0),
|
||||||
WJKB(WXK_SPACE), WJKB(0), WJKB(0)
|
WJKB(WXK_SPACE), WJKB(0), WJKB(0)
|
||||||
};
|
};
|
||||||
|
|
||||||
wxJoyKeyBinding defkeys_joystick[NUM_KEYS] = {
|
wxJoyKeyBinding defkeys_joystick[NUM_KEYS] = {
|
||||||
|
WJKB(0, WXJB_HAT_N, 1), WJKB(0, WXJB_HAT_S, 1), WJKB(0, WXJB_HAT_W, 1), WJKB(0, WXJB_HAT_E, 1),
|
||||||
|
WJKB(0, WXJB_BUTTON, 1), WJKB(1, WXJB_BUTTON, 1), WJKB(4, WXJB_BUTTON, 1), WJKB(5, WXJB_BUTTON, 1),
|
||||||
|
WJKB(6, WXJB_BUTTON, 1), WJKB(7, WXJB_BUTTON, 1),
|
||||||
|
WJKB(0), WJKB(0), WJKB(0), WJKB(0),
|
||||||
|
WJKB(0), WJKB(0), WJKB(0), WJKB(0),
|
||||||
|
WJKB(0), WJKB(0), WJKB(0)
|
||||||
|
};
|
||||||
|
|
||||||
|
wxJoyKeyBinding extrakeys_joystick[NUM_KEYS] = {
|
||||||
WJKB(1, WXJB_AXIS_MINUS, 1), WJKB(1, WXJB_AXIS_PLUS, 1), WJKB(0, WXJB_AXIS_MINUS, 1), WJKB(0, WXJB_AXIS_PLUS, 1),
|
WJKB(1, WXJB_AXIS_MINUS, 1), WJKB(1, WXJB_AXIS_PLUS, 1), WJKB(0, WXJB_AXIS_MINUS, 1), WJKB(0, WXJB_AXIS_PLUS, 1),
|
||||||
WJKB(0, WXJB_BUTTON, 1), WJKB(1, WXJB_BUTTON, 1), WJKB(2, WXJB_BUTTON, 1), WJKB(3, WXJB_BUTTON, 1),
|
WJKB(0), WJKB(0), WJKB(0), WJKB(0),
|
||||||
WJKB(4, WXJB_BUTTON, 1), WJKB(5, WXJB_BUTTON, 1),
|
WJKB(0), WJKB(0),
|
||||||
WJKB(0), WJKB(0), WJKB(0), WJKB(0),
|
WJKB(0), WJKB(0), WJKB(0), WJKB(0),
|
||||||
WJKB(0), WJKB(0), WJKB(0), WJKB(0),
|
WJKB(0), WJKB(0), WJKB(0), WJKB(0),
|
||||||
WJKB(0), WJKB(0), WJKB(0)
|
WJKB(0), WJKB(0), WJKB(0)
|
||||||
|
@ -225,7 +234,9 @@ opt_desc opts[] = {
|
||||||
BOOLOPT("General/AutoLoadLastState", "", wxTRANSLATE("Automatically load last saved state"), gopts.autoload_state),
|
BOOLOPT("General/AutoLoadLastState", "", wxTRANSLATE("Automatically load last saved state"), gopts.autoload_state),
|
||||||
STROPT("General/BatteryDir", "", wxTRANSLATE("Directory to store game save files (relative paths are relative to ROM; blank is config dir)"), gopts.battery_dir),
|
STROPT("General/BatteryDir", "", wxTRANSLATE("Directory to store game save files (relative paths are relative to ROM; blank is config dir)"), gopts.battery_dir),
|
||||||
BOOLOPT("General/FreezeRecent", "", wxTRANSLATE("Freeze recent load list"), gopts.recent_freeze),
|
BOOLOPT("General/FreezeRecent", "", wxTRANSLATE("Freeze recent load list"), gopts.recent_freeze),
|
||||||
|
#ifndef NO_ONLINEUPDATES
|
||||||
ENUMOPT("General/OnlineUpdates", "", wxTRANSLATE("Automatically check for online updates"), gopts.onlineupdates, wxTRANSLATE("never|daily|weekly")),
|
ENUMOPT("General/OnlineUpdates", "", wxTRANSLATE("Automatically check for online updates"), gopts.onlineupdates, wxTRANSLATE("never|daily|weekly")),
|
||||||
|
#endif // NO_ONLINEUPDATES
|
||||||
STROPT("General/RecordingDir", "", wxTRANSLATE("Directory to store A/V and game recordings (relative paths are relative to ROM)"), gopts.recording_dir),
|
STROPT("General/RecordingDir", "", wxTRANSLATE("Directory to store A/V and game recordings (relative paths are relative to ROM)"), gopts.recording_dir),
|
||||||
INTOPT("General/RewindInterval", "", wxTRANSLATE("Number of seconds between rewind snapshots (0 to disable)"), gopts.rewind_interval, 0, 600),
|
INTOPT("General/RewindInterval", "", wxTRANSLATE("Number of seconds between rewind snapshots (0 to disable)"), gopts.rewind_interval, 0, 600),
|
||||||
STROPT("General/ScreenshotDir", "", wxTRANSLATE("Directory to store screenshots (relative paths are relative to ROM)"), gopts.scrshot_dir),
|
STROPT("General/ScreenshotDir", "", wxTRANSLATE("Directory to store screenshots (relative paths are relative to ROM)"), gopts.scrshot_dir),
|
||||||
|
@ -346,18 +357,13 @@ opts_t::opts_t()
|
||||||
bilinear = true;
|
bilinear = true;
|
||||||
default_stick = 1;
|
default_stick = 1;
|
||||||
|
|
||||||
for (int i = 0; i < NUM_KEYS; i++) {
|
|
||||||
if (defkeys_keyboard[i].key)
|
|
||||||
joykey_bindings[0][i].push_back(defkeys_keyboard[i]);
|
|
||||||
if (defkeys_joystick[i].key)
|
|
||||||
joykey_bindings[0][i].push_back(defkeys_joystick[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
recent = new wxFileHistory(10);
|
recent = new wxFileHistory(10);
|
||||||
autofire_rate = 1;
|
autofire_rate = 1;
|
||||||
print_auto_page = true;
|
print_auto_page = true;
|
||||||
autoPatch = true;
|
autoPatch = true;
|
||||||
|
#ifndef NO_ONLINEUPDATES
|
||||||
onlineupdates = 1;
|
onlineupdates = 1;
|
||||||
|
#endif // NO_ONLINEUPDATES
|
||||||
// quick fix for issues #48 and #445
|
// quick fix for issues #48 and #445
|
||||||
link_host = "127.0.0.1";
|
link_host = "127.0.0.1";
|
||||||
}
|
}
|
||||||
|
@ -368,6 +374,19 @@ bool opt_lt(const opt_desc& opt1, const opt_desc& opt2)
|
||||||
return wxStrcmp(opt1.opt, opt2.opt) < 0;
|
return wxStrcmp(opt1.opt, opt2.opt) < 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// set default input keys
|
||||||
|
void set_default_keys()
|
||||||
|
{
|
||||||
|
for (int i = 0; i < NUM_KEYS; i++) {
|
||||||
|
if (defkeys_keyboard[i].key)
|
||||||
|
gopts.joykey_bindings[0][i].push_back(defkeys_keyboard[i]);
|
||||||
|
if (defkeys_joystick[i].joy)
|
||||||
|
gopts.joykey_bindings[0][i].push_back(defkeys_joystick[i]);
|
||||||
|
if (extrakeys_joystick[i].joy)
|
||||||
|
gopts.joykey_bindings[0][i].push_back(extrakeys_joystick[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// FIXME: simulate MakeInstanceFilename(vbam.ini) using subkeys (Slave%d/*)
|
// FIXME: simulate MakeInstanceFilename(vbam.ini) using subkeys (Slave%d/*)
|
||||||
void load_opts()
|
void load_opts()
|
||||||
{
|
{
|
||||||
|
|
|
@ -42,7 +42,9 @@ extern struct opts_t {
|
||||||
/// General
|
/// General
|
||||||
bool autoload_state, autoload_cheats;
|
bool autoload_state, autoload_cheats;
|
||||||
wxString battery_dir;
|
wxString battery_dir;
|
||||||
|
#ifndef NO_ONLINEUPDATES
|
||||||
int onlineupdates;
|
int onlineupdates;
|
||||||
|
#endif // NO_ONLINEUPDATES
|
||||||
long last_update;
|
long last_update;
|
||||||
wxString last_updated_filename;
|
wxString last_updated_filename;
|
||||||
bool recent_freeze;
|
bool recent_freeze;
|
||||||
|
@ -115,6 +117,8 @@ extern const int num_opts;
|
||||||
extern const wxAcceleratorEntry default_accels[];
|
extern const wxAcceleratorEntry default_accels[];
|
||||||
extern const int num_def_accels;
|
extern const int num_def_accels;
|
||||||
|
|
||||||
|
// call to setup default keys.
|
||||||
|
void set_default_keys();
|
||||||
// call to load config (once)
|
// call to load config (once)
|
||||||
// will write defaults for options not present and delete bad opts
|
// will write defaults for options not present and delete bad opts
|
||||||
// will also initialize opts[] array translations
|
// will also initialize opts[] array translations
|
||||||
|
|
|
@ -923,7 +923,7 @@ void GameArea::Pause()
|
||||||
|
|
||||||
// when the game is paused like this, we should not allow any
|
// when the game is paused like this, we should not allow any
|
||||||
// input to remain pressed, because they could be released
|
// input to remain pressed, because they could be released
|
||||||
// outside of the game zone and we would not know about it.
|
// outside of the game zone and we would not know about it.
|
||||||
clear_input_press();
|
clear_input_press();
|
||||||
|
|
||||||
if (loaded != IMAGE_UNKNOWN)
|
if (loaded != IMAGE_UNKNOWN)
|
||||||
|
@ -2296,12 +2296,10 @@ DXDrawingPanel::DXDrawingPanel(wxWindow* parent, int _width, int _height)
|
||||||
: DrawingPanel(parent, _width, _height)
|
: DrawingPanel(parent, _width, _height)
|
||||||
{
|
{
|
||||||
// FIXME: implement
|
// FIXME: implement
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void DXDrawingPanel::DrawArea(wxWindowDC& dc)
|
void DXDrawingPanel::DrawArea(wxWindowDC& dc)
|
||||||
{
|
{
|
||||||
|
|
||||||
// FIXME: implement
|
// FIXME: implement
|
||||||
if (!did_init) {
|
if (!did_init) {
|
||||||
DrawingPanelInit();
|
DrawingPanelInit();
|
||||||
|
|
|
@ -1294,8 +1294,10 @@ bool debugWaitSocket()
|
||||||
void log(const char* defaultMsg, ...)
|
void log(const char* defaultMsg, ...)
|
||||||
{
|
{
|
||||||
va_list valist;
|
va_list valist;
|
||||||
|
char buf[2048];
|
||||||
va_start(valist, defaultMsg);
|
va_start(valist, defaultMsg);
|
||||||
wxString msg = wxString::Format(defaultMsg, valist);
|
vsnprintf(buf, 2048, defaultMsg, valist);
|
||||||
|
wxString msg = wxString(buf, wxConvLibc);
|
||||||
va_end(valist);
|
va_end(valist);
|
||||||
wxGetApp().log.append(msg);
|
wxGetApp().log.append(msg);
|
||||||
|
|
||||||
|
|
|
@ -114,22 +114,26 @@ protected:
|
||||||
bool* vptr;
|
bool* vptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#include <wx/stattext.h>
|
||||||
|
|
||||||
// wxFilePickerCtrl/wxDirPickerCtrl copy-only vvalidator
|
// wxFilePickerCtrl/wxDirPickerCtrl copy-only vvalidator
|
||||||
class wxFileDirPickerValidator : public wxValidator {
|
class wxFileDirPickerValidator : public wxValidator {
|
||||||
public:
|
public:
|
||||||
wxFileDirPickerValidator(wxString* _vptr)
|
wxFileDirPickerValidator(wxString* _vptr, wxStaticText* _label = NULL)
|
||||||
: wxValidator()
|
: wxValidator()
|
||||||
, vptr(_vptr)
|
, vptr(_vptr)
|
||||||
|
, vlabel(_label)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
wxFileDirPickerValidator(const wxFileDirPickerValidator& v)
|
wxFileDirPickerValidator(const wxFileDirPickerValidator& v)
|
||||||
: wxValidator()
|
: wxValidator()
|
||||||
, vptr(v.vptr)
|
, vptr(v.vptr)
|
||||||
|
, vlabel(v.vlabel)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
wxObject* Clone() const
|
wxObject* Clone() const
|
||||||
{
|
{
|
||||||
return new wxFileDirPickerValidator(vptr);
|
return new wxFileDirPickerValidator(vptr, vlabel);
|
||||||
}
|
}
|
||||||
bool TransferToWindow();
|
bool TransferToWindow();
|
||||||
bool TransferFromWindow();
|
bool TransferFromWindow();
|
||||||
|
@ -141,6 +145,7 @@ public:
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
wxString* vptr;
|
wxString* vptr;
|
||||||
|
wxStaticText* vlabel;
|
||||||
};
|
};
|
||||||
|
|
||||||
// color copy-only validator that supports either 32-bit or 16-bit color
|
// color copy-only validator that supports either 32-bit or 16-bit color
|
||||||
|
|
|
@ -230,6 +230,7 @@ bool wxFileDirPickerValidator::TransferFromWindow()
|
||||||
|
|
||||||
if (fp) {
|
if (fp) {
|
||||||
*vptr = fp->GetPath();
|
*vptr = fp->GetPath();
|
||||||
|
if (vlabel) vlabel->SetLabel(*vptr);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -237,6 +238,7 @@ bool wxFileDirPickerValidator::TransferFromWindow()
|
||||||
|
|
||||||
if (dp) {
|
if (dp) {
|
||||||
*vptr = dp->GetPath();
|
*vptr = dp->GetPath();
|
||||||
|
if (vlabel) vlabel->SetLabel(*vptr);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -56,9 +56,9 @@ static void get_config_path(wxPathList& path, bool exists = true)
|
||||||
if ((wxDirExists(s) && wxIsWritable(s)) || ((!exists || !wxDirExists(s)) && parent.IsDirWritable())) \
|
if ((wxDirExists(s) && wxIsWritable(s)) || ((!exists || !wxDirExists(s)) && parent.IsDirWritable())) \
|
||||||
path.Add(s); \
|
path.Add(s); \
|
||||||
} while (0)
|
} while (0)
|
||||||
#define add_nonstandard_path(p) \
|
#define add_nonstandard_path(p) \
|
||||||
do { \
|
do { \
|
||||||
const wxString& s = p; \
|
const wxString& s = p; \
|
||||||
wxFileName parent = wxFileName::DirName(s + wxT("//..")); \
|
wxFileName parent = wxFileName::DirName(s + wxT("//..")); \
|
||||||
parent.MakeAbsolute(); \
|
parent.MakeAbsolute(); \
|
||||||
if ((wxDirExists(s) && wxIsWritable(s)) || ((!exists || !wxDirExists(s)) && parent.IsDirWritable())) \
|
if ((wxDirExists(s) && wxIsWritable(s)) || ((!exists || !wxDirExists(s)) && parent.IsDirWritable())) \
|
||||||
|
@ -165,6 +165,8 @@ wxString wxvbamApp::GetConfigurationPath()
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// use default keys for input.
|
||||||
|
set_default_keys();
|
||||||
}
|
}
|
||||||
|
|
||||||
return data_path;
|
return data_path;
|
||||||
|
@ -488,7 +490,7 @@ void wxvbamApp::OnInitCmdLine(wxCmdLineParser& cl)
|
||||||
N_("Print configuration path and exit"),
|
N_("Print configuration path and exit"),
|
||||||
wxCMD_LINE_VAL_NONE, 0 },
|
wxCMD_LINE_VAL_NONE, 0 },
|
||||||
{ wxCMD_LINE_SWITCH, t("f"), t("fullscreen"),
|
{ wxCMD_LINE_SWITCH, t("f"), t("fullscreen"),
|
||||||
N_("Start in full-screen mode"),
|
N_("Start in full-screen mode"),
|
||||||
wxCMD_LINE_VAL_NONE, 0 },
|
wxCMD_LINE_VAL_NONE, 0 },
|
||||||
#if !defined(NO_LINK) && !defined(__WXMSW__)
|
#if !defined(NO_LINK) && !defined(__WXMSW__)
|
||||||
{ wxCMD_LINE_SWITCH, t("s"), t("delete-shared-state"),
|
{ wxCMD_LINE_SWITCH, t("s"), t("delete-shared-state"),
|
||||||
|
|
|
@ -105,6 +105,27 @@
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
|
<object class="sizeritem">
|
||||||
|
<flag>wxALL|wxEXPAND</flag>
|
||||||
|
<border>5</border>
|
||||||
|
<object class="wxBoxSizer">
|
||||||
|
<orient>wxHORIZONTAL</orient>
|
||||||
|
<object class="sizeritem">
|
||||||
|
<object class="wxStaticText">
|
||||||
|
<label>Current BIOS file :</label>
|
||||||
|
</object>
|
||||||
|
<flag>wxALL|wxALIGN_CENTRE_VERTICAL</flag>
|
||||||
|
<border>5</border>
|
||||||
|
</object>
|
||||||
|
<object class="sizeritem">
|
||||||
|
<object class="wxStaticText" name="BiosFile">
|
||||||
|
<label>(None)</label>
|
||||||
|
</object>
|
||||||
|
<flag>wxALL|wxALIGN_CENTRE_VERTICAL</flag>
|
||||||
|
<border>5</border>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
<orient>wxVERTICAL</orient>
|
<orient>wxVERTICAL</orient>
|
||||||
</object>
|
</object>
|
||||||
<flag>wxALL|wxEXPAND</flag>
|
<flag>wxALL|wxEXPAND</flag>
|
||||||
|
|
|
@ -81,7 +81,7 @@
|
||||||
<orient>wxHORIZONTAL</orient>
|
<orient>wxHORIZONTAL</orient>
|
||||||
<object class="sizeritem">
|
<object class="sizeritem">
|
||||||
<object class="wxStaticText" name="BootRomLab">
|
<object class="wxStaticText" name="BootRomLab">
|
||||||
<label>Boot _ROM file :</label>
|
<label>GB Boot _ROM file :</label>
|
||||||
</object>
|
</object>
|
||||||
<flag>wxALL|wxALIGN_CENTRE_VERTICAL</flag>
|
<flag>wxALL|wxALIGN_CENTRE_VERTICAL</flag>
|
||||||
<border>5</border>
|
<border>5</border>
|
||||||
|
@ -121,6 +121,48 @@
|
||||||
</object>
|
</object>
|
||||||
<flag>wxEXPAND</flag>
|
<flag>wxEXPAND</flag>
|
||||||
</object>
|
</object>
|
||||||
|
<object class="sizeritem">
|
||||||
|
<flag>wxALL|wxEXPAND</flag>
|
||||||
|
<border>5</border>
|
||||||
|
<object class="wxBoxSizer">
|
||||||
|
<orient>wxHORIZONTAL</orient>
|
||||||
|
<object class="sizeritem">
|
||||||
|
<object class="wxStaticText">
|
||||||
|
<label>Current GB BIOS file :</label>
|
||||||
|
</object>
|
||||||
|
<flag>wxALL|wxALIGN_CENTRE_VERTICAL</flag>
|
||||||
|
<border>5</border>
|
||||||
|
</object>
|
||||||
|
<object class="sizeritem">
|
||||||
|
<object class="wxStaticText" name="BiosFile">
|
||||||
|
<label>(None)</label>
|
||||||
|
</object>
|
||||||
|
<flag>wxALL|wxALIGN_CENTRE_VERTICAL</flag>
|
||||||
|
<border>5</border>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="sizeritem">
|
||||||
|
<flag>wxALL|wxEXPAND</flag>
|
||||||
|
<border>5</border>
|
||||||
|
<object class="wxBoxSizer">
|
||||||
|
<orient>wxHORIZONTAL</orient>
|
||||||
|
<object class="sizeritem">
|
||||||
|
<object class="wxStaticText">
|
||||||
|
<label>Current GBC BIOS file :</label>
|
||||||
|
</object>
|
||||||
|
<flag>wxALL|wxALIGN_CENTRE_VERTICAL</flag>
|
||||||
|
<border>5</border>
|
||||||
|
</object>
|
||||||
|
<object class="sizeritem">
|
||||||
|
<object class="wxStaticText" name="CBiosFile">
|
||||||
|
<label>(None)</label>
|
||||||
|
</object>
|
||||||
|
<flag>wxALL|wxALIGN_CENTRE_VERTICAL</flag>
|
||||||
|
<border>5</border>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
<label>Boot ROM</label>
|
<label>Boot ROM</label>
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
<object class="sizeritem">
|
<object class="sizeritem">
|
||||||
<object class="wxBoxSizer">
|
<object class="wxBoxSizer">
|
||||||
<object class="sizeritem">
|
<object class="sizeritem">
|
||||||
<object class="wxStaticText">
|
<object class="wxStaticText" name="OnlineUpdates">
|
||||||
<label>Check for updates:</label>
|
<label>Check for updates:</label>
|
||||||
</object>
|
</object>
|
||||||
<flag>wxALL|wxALIGN_CENTRE_VERTICAL</flag>
|
<flag>wxALL|wxALIGN_CENTRE_VERTICAL</flag>
|
||||||
|
|
|
@ -24,6 +24,14 @@
|
||||||
<flag>wxALL|wxEXPAND</flag>
|
<flag>wxALL|wxEXPAND</flag>
|
||||||
<border>5</border>
|
<border>5</border>
|
||||||
</object>
|
</object>
|
||||||
|
<object class="sizeritem">
|
||||||
|
<object class="wxButton" name="ClearUp">
|
||||||
|
<label>_Clear</label>
|
||||||
|
<style>wxBU_EXACTFIT</style>
|
||||||
|
</object>
|
||||||
|
<flag>wxALL</flag>
|
||||||
|
<border>5</border>
|
||||||
|
</object>
|
||||||
<object class="sizeritem">
|
<object class="sizeritem">
|
||||||
<object class="wxStaticText">
|
<object class="wxStaticText">
|
||||||
<label>A</label>
|
<label>A</label>
|
||||||
|
@ -39,6 +47,14 @@
|
||||||
<flag>wxALL|wxEXPAND</flag>
|
<flag>wxALL|wxEXPAND</flag>
|
||||||
<border>5</border>
|
<border>5</border>
|
||||||
</object>
|
</object>
|
||||||
|
<object class="sizeritem">
|
||||||
|
<object class="wxButton" name="ClearA">
|
||||||
|
<label>_Clear</label>
|
||||||
|
<style>wxBU_EXACTFIT</style>
|
||||||
|
</object>
|
||||||
|
<flag>wxALL</flag>
|
||||||
|
<border>5</border>
|
||||||
|
</object>
|
||||||
<object class="sizeritem">
|
<object class="sizeritem">
|
||||||
<object class="wxStaticText">
|
<object class="wxStaticText">
|
||||||
<label>Down</label>
|
<label>Down</label>
|
||||||
|
@ -54,6 +70,14 @@
|
||||||
<flag>wxALL|wxEXPAND</flag>
|
<flag>wxALL|wxEXPAND</flag>
|
||||||
<border>5</border>
|
<border>5</border>
|
||||||
</object>
|
</object>
|
||||||
|
<object class="sizeritem">
|
||||||
|
<object class="wxButton" name="ClearDown">
|
||||||
|
<label>_Clear</label>
|
||||||
|
<style>wxBU_EXACTFIT</style>
|
||||||
|
</object>
|
||||||
|
<flag>wxALL</flag>
|
||||||
|
<border>5</border>
|
||||||
|
</object>
|
||||||
<object class="sizeritem">
|
<object class="sizeritem">
|
||||||
<object class="wxStaticText">
|
<object class="wxStaticText">
|
||||||
<label>B</label>
|
<label>B</label>
|
||||||
|
@ -69,6 +93,14 @@
|
||||||
<flag>wxALL|wxEXPAND</flag>
|
<flag>wxALL|wxEXPAND</flag>
|
||||||
<border>5</border>
|
<border>5</border>
|
||||||
</object>
|
</object>
|
||||||
|
<object class="sizeritem">
|
||||||
|
<object class="wxButton" name="ClearB">
|
||||||
|
<label>_Clear</label>
|
||||||
|
<style>wxBU_EXACTFIT</style>
|
||||||
|
</object>
|
||||||
|
<flag>wxALL</flag>
|
||||||
|
<border>5</border>
|
||||||
|
</object>
|
||||||
<object class="sizeritem">
|
<object class="sizeritem">
|
||||||
<object class="wxStaticText">
|
<object class="wxStaticText">
|
||||||
<label>Left</label>
|
<label>Left</label>
|
||||||
|
@ -84,6 +116,14 @@
|
||||||
<flag>wxALL|wxEXPAND</flag>
|
<flag>wxALL|wxEXPAND</flag>
|
||||||
<border>5</border>
|
<border>5</border>
|
||||||
</object>
|
</object>
|
||||||
|
<object class="sizeritem">
|
||||||
|
<object class="wxButton" name="ClearLeft">
|
||||||
|
<label>_Clear</label>
|
||||||
|
<style>wxBU_EXACTFIT</style>
|
||||||
|
</object>
|
||||||
|
<flag>wxALL</flag>
|
||||||
|
<border>5</border>
|
||||||
|
</object>
|
||||||
<object class="sizeritem">
|
<object class="sizeritem">
|
||||||
<object class="wxStaticText">
|
<object class="wxStaticText">
|
||||||
<label>L</label>
|
<label>L</label>
|
||||||
|
@ -99,6 +139,14 @@
|
||||||
<flag>wxALL|wxEXPAND</flag>
|
<flag>wxALL|wxEXPAND</flag>
|
||||||
<border>5</border>
|
<border>5</border>
|
||||||
</object>
|
</object>
|
||||||
|
<object class="sizeritem">
|
||||||
|
<object class="wxButton" name="ClearL">
|
||||||
|
<label>_Clear</label>
|
||||||
|
<style>wxBU_EXACTFIT</style>
|
||||||
|
</object>
|
||||||
|
<flag>wxALL</flag>
|
||||||
|
<border>5</border>
|
||||||
|
</object>
|
||||||
<object class="sizeritem">
|
<object class="sizeritem">
|
||||||
<object class="wxStaticText">
|
<object class="wxStaticText">
|
||||||
<label>Right</label>
|
<label>Right</label>
|
||||||
|
@ -114,6 +162,14 @@
|
||||||
<flag>wxALL|wxEXPAND</flag>
|
<flag>wxALL|wxEXPAND</flag>
|
||||||
<border>5</border>
|
<border>5</border>
|
||||||
</object>
|
</object>
|
||||||
|
<object class="sizeritem">
|
||||||
|
<object class="wxButton" name="ClearRight">
|
||||||
|
<label>_Clear</label>
|
||||||
|
<style>wxBU_EXACTFIT</style>
|
||||||
|
</object>
|
||||||
|
<flag>wxALL</flag>
|
||||||
|
<border>5</border>
|
||||||
|
</object>
|
||||||
<object class="sizeritem">
|
<object class="sizeritem">
|
||||||
<object class="wxStaticText">
|
<object class="wxStaticText">
|
||||||
<label>R</label>
|
<label>R</label>
|
||||||
|
@ -130,6 +186,14 @@
|
||||||
<flag>wxALL|wxEXPAND</flag>
|
<flag>wxALL|wxEXPAND</flag>
|
||||||
<border>5</border>
|
<border>5</border>
|
||||||
</object>
|
</object>
|
||||||
|
<object class="sizeritem">
|
||||||
|
<object class="wxButton" name="ClearR">
|
||||||
|
<label>_Clear</label>
|
||||||
|
<style>wxBU_EXACTFIT</style>
|
||||||
|
</object>
|
||||||
|
<flag>wxALL</flag>
|
||||||
|
<border>5</border>
|
||||||
|
</object>
|
||||||
<object class="sizeritem">
|
<object class="sizeritem">
|
||||||
<object class="wxStaticText">
|
<object class="wxStaticText">
|
||||||
<label>Select</label>
|
<label>Select</label>
|
||||||
|
@ -145,6 +209,14 @@
|
||||||
<flag>wxALL|wxEXPAND</flag>
|
<flag>wxALL|wxEXPAND</flag>
|
||||||
<border>5</border>
|
<border>5</border>
|
||||||
</object>
|
</object>
|
||||||
|
<object class="sizeritem">
|
||||||
|
<object class="wxButton" name="ClearSelect">
|
||||||
|
<label>_Clear</label>
|
||||||
|
<style>wxBU_EXACTFIT</style>
|
||||||
|
</object>
|
||||||
|
<flag>wxALL</flag>
|
||||||
|
<border>5</border>
|
||||||
|
</object>
|
||||||
<object class="sizeritem">
|
<object class="sizeritem">
|
||||||
<object class="wxStaticText">
|
<object class="wxStaticText">
|
||||||
<label>Start</label>
|
<label>Start</label>
|
||||||
|
@ -160,8 +232,16 @@
|
||||||
<flag>wxALL|wxEXPAND</flag>
|
<flag>wxALL|wxEXPAND</flag>
|
||||||
<border>5</border>
|
<border>5</border>
|
||||||
</object>
|
</object>
|
||||||
<cols>4</cols>
|
<object class="sizeritem">
|
||||||
<growablecols>1,3</growablecols>
|
<object class="wxButton" name="ClearStart">
|
||||||
|
<label>_Clear</label>
|
||||||
|
<style>wxBU_EXACTFIT</style>
|
||||||
|
</object>
|
||||||
|
<flag>wxALL</flag>
|
||||||
|
<border>5</border>
|
||||||
|
</object>
|
||||||
|
<cols>6</cols>
|
||||||
|
<growablecols>1,2,4,5</growablecols>
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
<label>Standard</label>
|
<label>Standard</label>
|
||||||
|
@ -183,6 +263,14 @@
|
||||||
<flag>wxALL|wxEXPAND</flag>
|
<flag>wxALL|wxEXPAND</flag>
|
||||||
<border>5</border>
|
<border>5</border>
|
||||||
</object>
|
</object>
|
||||||
|
<object class="sizeritem">
|
||||||
|
<object class="wxButton" name="ClearMotionUp">
|
||||||
|
<label>_Clear</label>
|
||||||
|
<style>wxBU_EXACTFIT</style>
|
||||||
|
</object>
|
||||||
|
<flag>wxALL</flag>
|
||||||
|
<border>5</border>
|
||||||
|
</object>
|
||||||
<object class="sizeritem">
|
<object class="sizeritem">
|
||||||
<object class="wxStaticText">
|
<object class="wxStaticText">
|
||||||
<label>Autofire A</label>
|
<label>Autofire A</label>
|
||||||
|
@ -197,6 +285,14 @@
|
||||||
<flag>wxALL|wxEXPAND</flag>
|
<flag>wxALL|wxEXPAND</flag>
|
||||||
<border>5</border>
|
<border>5</border>
|
||||||
</object>
|
</object>
|
||||||
|
<object class="sizeritem">
|
||||||
|
<object class="wxButton" name="ClearAutoA">
|
||||||
|
<label>_Clear</label>
|
||||||
|
<style>wxBU_EXACTFIT</style>
|
||||||
|
</object>
|
||||||
|
<flag>wxALL</flag>
|
||||||
|
<border>5</border>
|
||||||
|
</object>
|
||||||
<object class="sizeritem">
|
<object class="sizeritem">
|
||||||
<object class="wxStaticText">
|
<object class="wxStaticText">
|
||||||
<label>Motion Down</label>
|
<label>Motion Down</label>
|
||||||
|
@ -211,6 +307,14 @@
|
||||||
<flag>wxALL|wxEXPAND</flag>
|
<flag>wxALL|wxEXPAND</flag>
|
||||||
<border>5</border>
|
<border>5</border>
|
||||||
</object>
|
</object>
|
||||||
|
<object class="sizeritem">
|
||||||
|
<object class="wxButton" name="ClearMotionDown">
|
||||||
|
<label>_Clear</label>
|
||||||
|
<style>wxBU_EXACTFIT</style>
|
||||||
|
</object>
|
||||||
|
<flag>wxALL</flag>
|
||||||
|
<border>5</border>
|
||||||
|
</object>
|
||||||
<object class="sizeritem">
|
<object class="sizeritem">
|
||||||
<object class="wxStaticText">
|
<object class="wxStaticText">
|
||||||
<label>Autofire B</label>
|
<label>Autofire B</label>
|
||||||
|
@ -225,6 +329,14 @@
|
||||||
<flag>wxALL|wxEXPAND</flag>
|
<flag>wxALL|wxEXPAND</flag>
|
||||||
<border>5</border>
|
<border>5</border>
|
||||||
</object>
|
</object>
|
||||||
|
<object class="sizeritem">
|
||||||
|
<object class="wxButton" name="ClearAutoB">
|
||||||
|
<label>_Clear</label>
|
||||||
|
<style>wxBU_EXACTFIT</style>
|
||||||
|
</object>
|
||||||
|
<flag>wxALL</flag>
|
||||||
|
<border>5</border>
|
||||||
|
</object>
|
||||||
<object class="sizeritem">
|
<object class="sizeritem">
|
||||||
<object class="wxStaticText">
|
<object class="wxStaticText">
|
||||||
<label>Motion Left/Dark</label>
|
<label>Motion Left/Dark</label>
|
||||||
|
@ -239,6 +351,14 @@
|
||||||
<flag>wxALL|wxEXPAND</flag>
|
<flag>wxALL|wxEXPAND</flag>
|
||||||
<border>5</border>
|
<border>5</border>
|
||||||
</object>
|
</object>
|
||||||
|
<object class="sizeritem">
|
||||||
|
<object class="wxButton" name="ClearMotionLeft">
|
||||||
|
<label>_Clear</label>
|
||||||
|
<style>wxBU_EXACTFIT</style>
|
||||||
|
</object>
|
||||||
|
<flag>wxALL</flag>
|
||||||
|
<border>5</border>
|
||||||
|
</object>
|
||||||
<object class="sizeritem">
|
<object class="sizeritem">
|
||||||
<object class="wxStaticText">
|
<object class="wxStaticText">
|
||||||
<label>GameShark</label>
|
<label>GameShark</label>
|
||||||
|
@ -253,6 +373,14 @@
|
||||||
<flag>wxALL|wxEXPAND</flag>
|
<flag>wxALL|wxEXPAND</flag>
|
||||||
<border>5</border>
|
<border>5</border>
|
||||||
</object>
|
</object>
|
||||||
|
<object class="sizeritem">
|
||||||
|
<object class="wxButton" name="ClearGS">
|
||||||
|
<label>_Clear</label>
|
||||||
|
<style>wxBU_EXACTFIT</style>
|
||||||
|
</object>
|
||||||
|
<flag>wxALL</flag>
|
||||||
|
<border>5</border>
|
||||||
|
</object>
|
||||||
<object class="sizeritem">
|
<object class="sizeritem">
|
||||||
<object class="wxStaticText">
|
<object class="wxStaticText">
|
||||||
<label>Motion Right/Light</label>
|
<label>Motion Right/Light</label>
|
||||||
|
@ -267,6 +395,14 @@
|
||||||
<flag>wxALL|wxGROW</flag>
|
<flag>wxALL|wxGROW</flag>
|
||||||
<border>5</border>
|
<border>5</border>
|
||||||
</object>
|
</object>
|
||||||
|
<object class="sizeritem">
|
||||||
|
<object class="wxButton" name="ClearMotionRight">
|
||||||
|
<label>_Clear</label>
|
||||||
|
<style>wxBU_EXACTFIT</style>
|
||||||
|
</object>
|
||||||
|
<flag>wxALL</flag>
|
||||||
|
<border>5</border>
|
||||||
|
</object>
|
||||||
<object class="sizeritem">
|
<object class="sizeritem">
|
||||||
<object class="wxStaticText">
|
<object class="wxStaticText">
|
||||||
<label>Speed Up</label>
|
<label>Speed Up</label>
|
||||||
|
@ -281,6 +417,14 @@
|
||||||
<flag>wxALL|wxEXPAND</flag>
|
<flag>wxALL|wxEXPAND</flag>
|
||||||
<border>5</border>
|
<border>5</border>
|
||||||
</object>
|
</object>
|
||||||
|
<object class="sizeritem">
|
||||||
|
<object class="wxButton" name="ClearSpeed">
|
||||||
|
<label>_Clear</label>
|
||||||
|
<style>wxBU_EXACTFIT</style>
|
||||||
|
</object>
|
||||||
|
<flag>wxALL</flag>
|
||||||
|
<border>5</border>
|
||||||
|
</object>
|
||||||
<object class="sizeritem">
|
<object class="sizeritem">
|
||||||
<object class="wxStaticText">
|
<object class="wxStaticText">
|
||||||
<label>Spin Left</label>
|
<label>Spin Left</label>
|
||||||
|
@ -295,6 +439,17 @@
|
||||||
<flag>wxALL|wxEXPAND</flag>
|
<flag>wxALL|wxEXPAND</flag>
|
||||||
<border>5</border>
|
<border>5</border>
|
||||||
</object>
|
</object>
|
||||||
|
<object class="sizeritem">
|
||||||
|
<object class="wxButton" name="ClearMotionIn">
|
||||||
|
<label>_Clear</label>
|
||||||
|
<style>wxBU_EXACTFIT</style>
|
||||||
|
</object>
|
||||||
|
<flag>wxALL</flag>
|
||||||
|
<border>5</border>
|
||||||
|
</object>
|
||||||
|
<object class="spacer">
|
||||||
|
<flag>wxEXPAND</flag>
|
||||||
|
</object>
|
||||||
<object class="spacer">
|
<object class="spacer">
|
||||||
<flag>wxEXPAND</flag>
|
<flag>wxEXPAND</flag>
|
||||||
</object>
|
</object>
|
||||||
|
@ -315,6 +470,14 @@
|
||||||
<flag>wxALL|wxGROW</flag>
|
<flag>wxALL|wxGROW</flag>
|
||||||
<border>5</border>
|
<border>5</border>
|
||||||
</object>
|
</object>
|
||||||
|
<object class="sizeritem">
|
||||||
|
<object class="wxButton" name="ClearMotionOut">
|
||||||
|
<label>_Clear</label>
|
||||||
|
<style>wxBU_EXACTFIT</style>
|
||||||
|
</object>
|
||||||
|
<flag>wxALL</flag>
|
||||||
|
<border>5</border>
|
||||||
|
</object>
|
||||||
<object class="sizeritem">
|
<object class="sizeritem">
|
||||||
<object class="wxStaticText">
|
<object class="wxStaticText">
|
||||||
<label>Screenshot</label>
|
<label>Screenshot</label>
|
||||||
|
@ -329,8 +492,16 @@
|
||||||
<flag>wxALL|wxEXPAND</flag>
|
<flag>wxALL|wxEXPAND</flag>
|
||||||
<border>5</border>
|
<border>5</border>
|
||||||
</object>
|
</object>
|
||||||
<cols>4</cols>
|
<object class="sizeritem">
|
||||||
<growablecols>1,3</growablecols>
|
<object class="wxButton" name="ClearCapture">
|
||||||
|
<label>_Clear</label>
|
||||||
|
<style>wxBU_EXACTFIT</style>
|
||||||
|
</object>
|
||||||
|
<flag>wxALL</flag>
|
||||||
|
<border>5</border>
|
||||||
|
</object>
|
||||||
|
<cols>6</cols>
|
||||||
|
<growablecols>1,2,4,5</growablecols>
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
<label>Special</label>
|
<label>Special</label>
|
||||||
|
@ -355,7 +526,7 @@
|
||||||
</object>
|
</object>
|
||||||
<object class="sizeritem">
|
<object class="sizeritem">
|
||||||
<object class="wxButton" name="Clear">
|
<object class="wxButton" name="Clear">
|
||||||
<label>Clear</label>
|
<label>Clear All</label>
|
||||||
</object>
|
</object>
|
||||||
<flag>wxALL</flag>
|
<flag>wxALL</flag>
|
||||||
<border>5</border>
|
<border>5</border>
|
||||||
|
|
|
@ -296,7 +296,7 @@
|
||||||
<checkable>1</checkable>
|
<checkable>1</checkable>
|
||||||
</object>
|
</object>
|
||||||
<object class="wxMenu">
|
<object class="wxMenu">
|
||||||
<label>_Quick resize</label>
|
<label>_Scaled resize</label>
|
||||||
<object class="wxMenuItem" name="SetSize1x">
|
<object class="wxMenuItem" name="SetSize1x">
|
||||||
<label>_1x</label>
|
<label>_1x</label>
|
||||||
</object>
|
</object>
|
||||||
|
@ -357,11 +357,11 @@
|
||||||
</object>
|
</object>
|
||||||
<object class="wxMenuItem" name="IncreaseVolume">
|
<object class="wxMenuItem" name="IncreaseVolume">
|
||||||
<label>_Increase volume</label>
|
<label>_Increase volume</label>
|
||||||
<checkable>0</checkable>
|
<enabled>0</enabled>
|
||||||
</object>
|
</object>
|
||||||
<object class="wxMenuItem" name="DecreaseVolume">
|
<object class="wxMenuItem" name="DecreaseVolume">
|
||||||
<label>_Decrease volume</label>
|
<label>_Decrease volume</label>
|
||||||
<checkable>0</checkable>
|
<enabled>0</enabled>
|
||||||
</object>
|
</object>
|
||||||
<object class="wxMenuItem" name="ToggleSound">
|
<object class="wxMenuItem" name="ToggleSound">
|
||||||
<label>_Toggle sound</label>
|
<label>_Toggle sound</label>
|
||||||
|
@ -372,7 +372,7 @@
|
||||||
<label>_GBA sound interpolation</label>
|
<label>_GBA sound interpolation</label>
|
||||||
<checkable>1</checkable>
|
<checkable>1</checkable>
|
||||||
</object>
|
</object>
|
||||||
<object class="separator"/>
|
<object class="separator"/>
|
||||||
<object class="wxMenuItem" name="GBEnhanceSound">
|
<object class="wxMenuItem" name="GBEnhanceSound">
|
||||||
<label>_GB sound enhancement</label>
|
<label>_GB sound enhancement</label>
|
||||||
<checkable>1</checkable>
|
<checkable>1</checkable>
|
||||||
|
@ -391,7 +391,7 @@
|
||||||
<object class="wxMenuItem" name="JoypadConfigure">
|
<object class="wxMenuItem" name="JoypadConfigure">
|
||||||
<label>_Configure ...</label>
|
<label>_Configure ...</label>
|
||||||
</object>
|
</object>
|
||||||
<object class="separator"/>
|
<object class="separator"/>
|
||||||
<object class="wxMenu">
|
<object class="wxMenu">
|
||||||
<label>_Autofire</label>
|
<label>_Autofire</label>
|
||||||
<object class="wxMenuItem" name="JoypadAutofireA">
|
<object class="wxMenuItem" name="JoypadAutofireA">
|
||||||
|
@ -417,7 +417,7 @@
|
||||||
<object class="wxMenuItem" name="GameBoyAdvanceConfigure">
|
<object class="wxMenuItem" name="GameBoyAdvanceConfigure">
|
||||||
<label>Configure ...</label>
|
<label>Configure ...</label>
|
||||||
</object>
|
</object>
|
||||||
<object class="separator"/>
|
<object class="separator"/>
|
||||||
<object class="wxMenuItem" name="RTC">
|
<object class="wxMenuItem" name="RTC">
|
||||||
<label>_Real-time clock</label>
|
<label>_Real-time clock</label>
|
||||||
<checkable>1</checkable>
|
<checkable>1</checkable>
|
||||||
|
@ -482,7 +482,7 @@
|
||||||
<object class="wxMenuItem" name="CheatsSearch">
|
<object class="wxMenuItem" name="CheatsSearch">
|
||||||
<label>Find c_heat ...</label>
|
<label>Find c_heat ...</label>
|
||||||
</object>
|
</object>
|
||||||
<object class="separator"/>
|
<object class="separator"/>
|
||||||
<object class="wxMenuItem" name="CheatsAutoSaveLoad">
|
<object class="wxMenuItem" name="CheatsAutoSaveLoad">
|
||||||
<label>A_utomatically save/load cheats</label>
|
<label>A_utomatically save/load cheats</label>
|
||||||
<checkable>1</checkable>
|
<checkable>1</checkable>
|
||||||
|
|
Loading…
Reference in New Issue