Skip to content
Permalink
Browse files

Cleanup: Remove previous core option struct and unused variables etc

  • Loading branch information
retro-wertz
retro-wertz committed Jul 18, 2019
1 parent aac30c7 commit bd5ba431229e1bac01c8683b69dd7b95e4ab5eba
Showing with 2 additions and 67 deletions.
  1. +2 −2 src/gb/gbMemory.cpp
  2. +0 −2 src/gba/GBA.cpp
  3. +0 −27 src/libretro/UtilRetro.cpp
  4. +0 −36 src/libretro/libretro.cpp
@@ -308,7 +308,7 @@ mapperMBC3 gbDataMBC3 = {
0, // timer latched hours
0, // timer latched days
0, // timer latched control
0 // last time
{0} // last time
};

void memoryUpdateMBC3Clock()
@@ -1176,7 +1176,7 @@ mapperTAMA5 gbDataTAMA5 = {
0, // timer latched months
0, // timer latched years
0, // timer latched control
(time_t)-1 // last time
{(time_t)-1} // last time
};

void memoryUpdateTAMA5Clock()
@@ -142,8 +142,6 @@ const uint8_t gamepakWaitState[4] = { 4, 3, 2, 8 };
const uint8_t gamepakWaitState0[2] = { 2, 1 };
const uint8_t gamepakWaitState1[2] = { 4, 1 };
const uint8_t gamepakWaitState2[2] = { 8, 1 };
const bool isInRom[16] = { false, false, false, false, false, false, false, false,
true, true, true, true, true, true, false, false };

uint8_t memoryWait[16] = { 0, 0, 2, 0, 0, 0, 0, 0, 4, 4, 4, 4, 4, 4, 4, 0 };
uint8_t memoryWait32[16] = { 0, 0, 5, 0, 0, 1, 1, 0, 7, 7, 9, 9, 13, 13, 4, 0 };
@@ -49,18 +49,6 @@ extern int systemBlueShift;
extern uint16_t systemColorMap16[0x10000];
extern uint32_t systemColorMap32[0x10000];

const char gb_image_header[] =
{
static_cast<const char>
(
0xce, 0xed, 0x66, 0x66, 0xcc, 0x0d, 0x00, 0x0b, 0x03, 0x73, 0x00,
0x83, 0x00, 0x0c, 0x00, 0x0d, 0x00, 0x08, 0x11, 0x1f, 0x88, 0x89,
0x00, 0x0e, 0xdc, 0xcc, 0x6e, 0xe6, 0xdd, 0xdd, 0xd9, 0x99, 0xbb,
0xbb, 0x67, 0x63, 0x6e, 0x0e, 0xec, 0xcc, 0xdd, 0xdc, 0x99, 0x9f,
0xbb, 0xb9, 0x33, 0x3e
)
};

bool utilWritePNGFile(const char* fileName, int w, int h, uint8_t* pix)
{
return false;
@@ -108,21 +96,6 @@ bool utilIsGBAImage(const char* file)

bool utilIsGBImage(const char* file)
{
/*
FILE *fp;
bool ret = false;
char buffer[47];
if (!file || !(fp = fopen (file, "r"))) //TODO more checks here (does file exist, is it a file, a symlink or a blockdevice)
return ret;
fseek (fp, 0, SEEK_END);
if (ftell (fp) >= 0x8000) { //afaik there can be no gb-rom smaller than this
fseek (fp, 0x104, SEEK_SET);
fread (buffer, sizeof (char), 47, fp);
ret = !memcmp (buffer, gb_image_header, 47);
}
fclose (fp);
return ret;
*/
if (strlen(file) > 4) {
const char *p = strrchr(file, '.');

@@ -503,40 +503,6 @@ void retro_set_controller_port_device(unsigned port, unsigned device)
void retro_set_environment(retro_environment_t cb)
{
environ_cb = cb;

struct retro_variable variables[] = {
{ "vbam_solarsensor", "Solar Sensor Level; 0|1|2|3|4|5|6|7|8|9|10" },
{ "vbam_usebios", "Use BIOS file (Restart); disabled|enabled" },
{ "vbam_soundinterpolation", "Sound Interpolation; enabled|disabled" },
{ "vbam_soundfiltering", "Sound Filtering; 5|6|7|8|9|10|0|1|2|3|4" },
{ "vbam_gbHardware", "(GB) Emulated Hardware; gbc|auto|sgb|gb|gba|sgb2" },
{ "vbam_palettes", "(GB) Color Palette; black and white|blue sea|dark knight|green forest|hot desert|pink dreams|wierd colors|original gameboy|gba sp" },
{ "vbam_showborders", "(GB) Show Borders; disabled|enabled|auto" },
{ "vbam_turboenable", "Enable Turbo Buttons; disabled|enabled" },
{ "vbam_turbodelay", "Turbo Delay (in frames); 3|4|5|6|7|8|9|10|11|12|13|14|15|1|2" },
{ "vbam_astick_deadzone", "Sensors Deadzone (%); 15|20|25|30|0|5|10"},
{ "vbam_gyro_sensitivity", "Sensor Sensitivity (Gyroscope) (%); 100|105|110|115|120|10|15|20|25|30|35|40|45|50|55|60|65|70|75|80|85|90|95"},
{ "vbam_tilt_sensitivity", "Sensor Sensitivity (Tilt) (%); 100|105|110|115|120|10|15|20|25|30|35|40|45|50|55|60|65|70|75|80|85|90|95"},
{ "vbam_swap_astick", "Swap Left/Right Analog; disabled|enabled" },
{ "vbam_layer_1", "Show layer 1; enabled|disabled" },
{ "vbam_layer_2", "Show layer 2; enabled|disabled" },
{ "vbam_layer_3", "Show layer 3; enabled|disabled" },
{ "vbam_layer_4", "Show layer 4; enabled|disabled" },
{ "vbam_layer_5", "Show sprite layer; enabled|disabled" },
{ "vbam_layer_6", "Show window layer 1; enabled|disabled" },
{ "vbam_layer_7", "Show window layer 2; enabled|disabled" },
{ "vbam_layer_8", "Show sprite window layer; enabled|disabled" },
{ "vbam_sound_1", "Sound channel 1; enabled|disabled" },
{ "vbam_sound_2", "Sound channel 2; enabled|disabled" },
{ "vbam_sound_3", "Sound channel 3; enabled|disabled" },
{ "vbam_sound_4", "Sound channel 4; enabled|disabled" },
{ "vbam_sound_5", "Direct Sound A; enabled|disabled" },
{ "vbam_sound_6", "Direct Sound B; enabled|disabled" },
{ NULL, NULL },
};

// cb(RETRO_ENVIRONMENT_SET_VARIABLES, variables);

libretro_set_core_options(environ_cb);
}

@@ -1651,8 +1617,6 @@ void systemMessage(int, const char* fmt, ...)
va_end(ap);
}

static int rumble_state, rumble_down;

uint32_t systemReadJoypad(int which)
{
uint32_t J = 0;

0 comments on commit bd5ba43

Please sign in to comment.
You can’t perform that action at this time.