Merge remote-tracking branch 'vbam-libretro/master'
This commit is contained in:
commit
51a4f74b94
|
@ -195,6 +195,7 @@ int gbSynchronizeTicks = GBSYNCHRONIZE_CLOCK_TICKS;
|
||||||
// emulator features
|
// emulator features
|
||||||
int gbBattery = 0;
|
int gbBattery = 0;
|
||||||
int gbRumble = 0;
|
int gbRumble = 0;
|
||||||
|
int gbRTCPresent = 0;
|
||||||
bool gbBatteryError = false;
|
bool gbBatteryError = false;
|
||||||
int gbCaptureNumber = 0;
|
int gbCaptureNumber = 0;
|
||||||
bool gbCapture = false;
|
bool gbCapture = false;
|
||||||
|
@ -4360,8 +4361,6 @@ bool gbUpdateSizes()
|
||||||
memset(gbRam, gbRamFill, gbRamSize);
|
memset(gbRam, gbRamFill, gbRamSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
gbBattery = gbRumble = 0;
|
|
||||||
|
|
||||||
switch (gbRomType) {
|
switch (gbRomType) {
|
||||||
case 0x03:
|
case 0x03:
|
||||||
case 0x06:
|
case 0x06:
|
||||||
|
@ -4377,6 +4376,9 @@ bool gbUpdateSizes()
|
||||||
case 0xff:
|
case 0xff:
|
||||||
gbBattery = 1;
|
gbBattery = 1;
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
gbBattery = 0;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (gbRomType) {
|
switch (gbRomType) {
|
||||||
|
@ -4384,6 +4386,21 @@ bool gbUpdateSizes()
|
||||||
case 0x1d:
|
case 0x1d:
|
||||||
case 0x1e:
|
case 0x1e:
|
||||||
gbRumble = 1;
|
gbRumble = 1;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
gbRumble = 0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (gbRomType) {
|
||||||
|
case 0x0f:
|
||||||
|
case 0x10: // mbc3
|
||||||
|
case 0xfd: // tama5
|
||||||
|
gbRTCPresent = 1;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
gbRTCPresent = 0;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
gbInit();
|
gbInit();
|
||||||
|
|
|
@ -1,6 +1,11 @@
|
||||||
#ifndef GB_H
|
#ifndef GB_H
|
||||||
#define GB_H
|
#define GB_H
|
||||||
|
|
||||||
|
#define gbWidth 160
|
||||||
|
#define gbHeight 144
|
||||||
|
#define sgbWidth 256
|
||||||
|
#define sgbHeight 224
|
||||||
|
|
||||||
const int GB_C_FLAG = 0x10;
|
const int GB_C_FLAG = 0x10;
|
||||||
const int GB_H_FLAG = 0x20;
|
const int GB_H_FLAG = 0x20;
|
||||||
const int GB_N_FLAG = 0x40;
|
const int GB_N_FLAG = 0x40;
|
||||||
|
@ -55,6 +60,9 @@ void setColorizerHack(bool value);
|
||||||
bool allowColorizerHack(void);
|
bool allowColorizerHack(void);
|
||||||
|
|
||||||
extern int gbHardware;
|
extern int gbHardware;
|
||||||
|
extern int gbRomType; // gets type from header 0x147
|
||||||
|
extern int gbBattery; // enabled when gbRamSize != 0
|
||||||
|
extern int gbRTCPresent; // gbROM has RTC support
|
||||||
|
|
||||||
extern struct EmulatedSystem GBSystem;
|
extern struct EmulatedSystem GBSystem;
|
||||||
|
|
||||||
|
|
|
@ -389,7 +389,7 @@ void mapperMBC3ROM(uint16_t address, uint8_t value)
|
||||||
gbDataMBC3.mapperRAMBank = value;
|
gbDataMBC3.mapperRAMBank = value;
|
||||||
gbDataMBC3.mapperRAMAddress = tmpAddress;
|
gbDataMBC3.mapperRAMAddress = tmpAddress;
|
||||||
} else {
|
} else {
|
||||||
if (gbDataMBC3.mapperRAMEnable) {
|
if (gbRTCPresent && gbDataMBC3.mapperRAMEnable) {
|
||||||
gbDataMBC3.mapperRAMBank = -1;
|
gbDataMBC3.mapperRAMBank = -1;
|
||||||
|
|
||||||
gbDataMBC3.mapperClockRegister = value;
|
gbDataMBC3.mapperClockRegister = value;
|
||||||
|
@ -397,16 +397,18 @@ void mapperMBC3ROM(uint16_t address, uint8_t value)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 0x6000: // clock latch
|
case 0x6000: // clock latch
|
||||||
if (gbDataMBC3.mapperClockLatch == 0 && value == 1) {
|
if (gbRTCPresent) {
|
||||||
memoryUpdateMBC3Clock();
|
if (gbDataMBC3.mapperClockLatch == 0 && value == 1) {
|
||||||
gbDataMBC3.mapperLSeconds = gbDataMBC3.mapperSeconds;
|
memoryUpdateMBC3Clock();
|
||||||
gbDataMBC3.mapperLMinutes = gbDataMBC3.mapperMinutes;
|
gbDataMBC3.mapperLSeconds = gbDataMBC3.mapperSeconds;
|
||||||
gbDataMBC3.mapperLHours = gbDataMBC3.mapperHours;
|
gbDataMBC3.mapperLMinutes = gbDataMBC3.mapperMinutes;
|
||||||
gbDataMBC3.mapperLDays = gbDataMBC3.mapperDays;
|
gbDataMBC3.mapperLHours = gbDataMBC3.mapperHours;
|
||||||
gbDataMBC3.mapperLControl = gbDataMBC3.mapperControl;
|
gbDataMBC3.mapperLDays = gbDataMBC3.mapperDays;
|
||||||
|
gbDataMBC3.mapperLControl = gbDataMBC3.mapperControl;
|
||||||
|
}
|
||||||
|
if (value == 0x00 || value == 0x01)
|
||||||
|
gbDataMBC3.mapperClockLatch = value;
|
||||||
}
|
}
|
||||||
if (value == 0x00 || value == 0x01)
|
|
||||||
gbDataMBC3.mapperClockLatch = value;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -415,12 +417,12 @@ void mapperMBC3ROM(uint16_t address, uint8_t value)
|
||||||
void mapperMBC3RAM(uint16_t address, uint8_t value)
|
void mapperMBC3RAM(uint16_t address, uint8_t value)
|
||||||
{
|
{
|
||||||
if (gbDataMBC3.mapperRAMEnable) {
|
if (gbDataMBC3.mapperRAMEnable) {
|
||||||
if (gbDataMBC3.mapperRAMBank != -1) {
|
if (gbDataMBC3.mapperRAMBank >= 0) {
|
||||||
if (gbRamSize) {
|
if (gbRamSize) {
|
||||||
gbMemoryMap[address >> 12][address & 0x0fff] = value;
|
gbMemoryMap[address >> 12][address & 0x0fff] = value;
|
||||||
systemSaveUpdateCounter = SYSTEM_SAVE_UPDATED;
|
systemSaveUpdateCounter = SYSTEM_SAVE_UPDATED;
|
||||||
}
|
}
|
||||||
} else {
|
} else if (gbRTCPresent) {
|
||||||
time(&gbDataMBC3.mapperLastTime);
|
time(&gbDataMBC3.mapperLastTime);
|
||||||
switch (gbDataMBC3.mapperClockRegister) {
|
switch (gbDataMBC3.mapperClockRegister) {
|
||||||
case 0x08:
|
case 0x08:
|
||||||
|
@ -450,25 +452,25 @@ void mapperMBC3RAM(uint16_t address, uint8_t value)
|
||||||
uint8_t mapperMBC3ReadRAM(uint16_t address)
|
uint8_t mapperMBC3ReadRAM(uint16_t address)
|
||||||
{
|
{
|
||||||
if (gbDataMBC3.mapperRAMEnable) {
|
if (gbDataMBC3.mapperRAMEnable) {
|
||||||
if (gbDataMBC3.mapperRAMBank != -1) {
|
if (gbDataMBC3.mapperRAMBank >= 0) {
|
||||||
return gbMemoryMap[address >> 12][address & 0x0fff];
|
return gbMemoryMap[address >> 12][address & 0x0fff];
|
||||||
}
|
} else if (gbRTCPresent) {
|
||||||
|
switch (gbDataMBC3.mapperClockRegister) {
|
||||||
switch (gbDataMBC3.mapperClockRegister) {
|
case 0x08:
|
||||||
case 0x08:
|
return gbDataMBC3.mapperLSeconds;
|
||||||
return gbDataMBC3.mapperLSeconds;
|
break;
|
||||||
break;
|
case 0x09:
|
||||||
case 0x09:
|
return gbDataMBC3.mapperLMinutes;
|
||||||
return gbDataMBC3.mapperLMinutes;
|
break;
|
||||||
break;
|
case 0x0a:
|
||||||
case 0x0a:
|
return gbDataMBC3.mapperLHours;
|
||||||
return gbDataMBC3.mapperLHours;
|
break;
|
||||||
break;
|
case 0x0b:
|
||||||
case 0x0b:
|
return gbDataMBC3.mapperLDays;
|
||||||
return gbDataMBC3.mapperLDays;
|
break;
|
||||||
break;
|
case 0x0c:
|
||||||
case 0x0c:
|
return gbDataMBC3.mapperLControl;
|
||||||
return gbDataMBC3.mapperLControl;
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -246,6 +246,7 @@ static char dummy_state[735 * 2];
|
||||||
&name, sizeof(type) \
|
&name, sizeof(type) \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef __LIBRETRO__
|
||||||
// Old save state support
|
// Old save state support
|
||||||
|
|
||||||
static variable_desc gbsound_format[] = {
|
static variable_desc gbsound_format[] = {
|
||||||
|
@ -355,7 +356,6 @@ enum {
|
||||||
nr52
|
nr52
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifndef __LIBRETRO__
|
|
||||||
static void gbSoundReadGameOld(int version, gzFile gzFile)
|
static void gbSoundReadGameOld(int version, gzFile gzFile)
|
||||||
{
|
{
|
||||||
if (version == 11) {
|
if (version == 11) {
|
||||||
|
|
|
@ -27,30 +27,6 @@ int flashDeviceID = 0x1b;
|
||||||
int flashManufacturerID = 0x32;
|
int flashManufacturerID = 0x32;
|
||||||
int flashBank = 0;
|
int flashBank = 0;
|
||||||
|
|
||||||
static variable_desc flashSaveData[] = {
|
|
||||||
{ &flashState, sizeof(int) },
|
|
||||||
{ &flashReadState, sizeof(int) },
|
|
||||||
{ &flashSaveMemory[0], SIZE_FLASH512 },
|
|
||||||
{ NULL, 0 }
|
|
||||||
};
|
|
||||||
|
|
||||||
static variable_desc flashSaveData2[] = {
|
|
||||||
{ &flashState, sizeof(int) },
|
|
||||||
{ &flashReadState, sizeof(int) },
|
|
||||||
{ &flashSize, sizeof(int) },
|
|
||||||
{ &flashSaveMemory[0], SIZE_FLASH1M },
|
|
||||||
{ NULL, 0 }
|
|
||||||
};
|
|
||||||
|
|
||||||
static variable_desc flashSaveData3[] = {
|
|
||||||
{ &flashState, sizeof(int) },
|
|
||||||
{ &flashReadState, sizeof(int) },
|
|
||||||
{ &flashSize, sizeof(int) },
|
|
||||||
{ &flashBank, sizeof(int) },
|
|
||||||
{ &flashSaveMemory[0], SIZE_FLASH1M },
|
|
||||||
{ NULL, 0 }
|
|
||||||
};
|
|
||||||
|
|
||||||
void flashInit()
|
void flashInit()
|
||||||
{
|
{
|
||||||
memset(flashSaveMemory, 0xff, sizeof(flashSaveMemory));
|
memset(flashSaveMemory, 0xff, sizeof(flashSaveMemory));
|
||||||
|
@ -63,49 +39,6 @@ void flashReset()
|
||||||
flashBank = 0;
|
flashBank = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __LIBRETRO__
|
|
||||||
void flashSaveGame(uint8_t*& data)
|
|
||||||
{
|
|
||||||
utilWriteDataMem(data, flashSaveData3);
|
|
||||||
}
|
|
||||||
|
|
||||||
void flashReadGame(const uint8_t*& data, int)
|
|
||||||
{
|
|
||||||
utilReadDataMem(data, flashSaveData3);
|
|
||||||
}
|
|
||||||
|
|
||||||
#else // !__LIBRETRO__
|
|
||||||
void flashSaveGame(gzFile gzFile)
|
|
||||||
{
|
|
||||||
utilWriteData(gzFile, flashSaveData3);
|
|
||||||
}
|
|
||||||
|
|
||||||
void flashReadGame(gzFile gzFile, int version)
|
|
||||||
{
|
|
||||||
if (version < SAVE_GAME_VERSION_5)
|
|
||||||
utilReadData(gzFile, flashSaveData);
|
|
||||||
else if (version < SAVE_GAME_VERSION_7) {
|
|
||||||
utilReadData(gzFile, flashSaveData2);
|
|
||||||
flashBank = 0;
|
|
||||||
flashSetSize(flashSize);
|
|
||||||
} else {
|
|
||||||
utilReadData(gzFile, flashSaveData3);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void flashReadGameSkip(gzFile gzFile, int version)
|
|
||||||
{
|
|
||||||
// skip the flash data in a save game
|
|
||||||
if (version < SAVE_GAME_VERSION_5)
|
|
||||||
utilReadDataSkip(gzFile, flashSaveData);
|
|
||||||
else if (version < SAVE_GAME_VERSION_7) {
|
|
||||||
utilReadDataSkip(gzFile, flashSaveData2);
|
|
||||||
} else {
|
|
||||||
utilReadDataSkip(gzFile, flashSaveData3);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void flashSetSize(int size)
|
void flashSetSize(int size)
|
||||||
{
|
{
|
||||||
// log("Setting flash size to %d\n", size);
|
// log("Setting flash size to %d\n", size);
|
||||||
|
@ -279,3 +212,70 @@ void flashWrite(uint32_t address, uint8_t byte)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static variable_desc flashSaveData3[] = {
|
||||||
|
{ &flashState, sizeof(int) },
|
||||||
|
{ &flashReadState, sizeof(int) },
|
||||||
|
{ &flashSize, sizeof(int) },
|
||||||
|
{ &flashBank, sizeof(int) },
|
||||||
|
{ &flashSaveMemory[0], SIZE_FLASH1M },
|
||||||
|
{ NULL, 0 }
|
||||||
|
};
|
||||||
|
|
||||||
|
#ifdef __LIBRETRO__
|
||||||
|
void flashSaveGame(uint8_t*& data)
|
||||||
|
{
|
||||||
|
utilWriteDataMem(data, flashSaveData3);
|
||||||
|
}
|
||||||
|
|
||||||
|
void flashReadGame(const uint8_t*& data, int)
|
||||||
|
{
|
||||||
|
utilReadDataMem(data, flashSaveData3);
|
||||||
|
}
|
||||||
|
|
||||||
|
#else // !__LIBRETRO__
|
||||||
|
static variable_desc flashSaveData[] = {
|
||||||
|
{ &flashState, sizeof(int) },
|
||||||
|
{ &flashReadState, sizeof(int) },
|
||||||
|
{ &flashSaveMemory[0], SIZE_FLASH512 },
|
||||||
|
{ NULL, 0 }
|
||||||
|
};
|
||||||
|
|
||||||
|
static variable_desc flashSaveData2[] = {
|
||||||
|
{ &flashState, sizeof(int) },
|
||||||
|
{ &flashReadState, sizeof(int) },
|
||||||
|
{ &flashSize, sizeof(int) },
|
||||||
|
{ &flashSaveMemory[0], SIZE_FLASH1M },
|
||||||
|
{ NULL, 0 }
|
||||||
|
};
|
||||||
|
|
||||||
|
void flashSaveGame(gzFile gzFile)
|
||||||
|
{
|
||||||
|
utilWriteData(gzFile, flashSaveData3);
|
||||||
|
}
|
||||||
|
|
||||||
|
void flashReadGame(gzFile gzFile, int version)
|
||||||
|
{
|
||||||
|
if (version < SAVE_GAME_VERSION_5)
|
||||||
|
utilReadData(gzFile, flashSaveData);
|
||||||
|
else if (version < SAVE_GAME_VERSION_7) {
|
||||||
|
utilReadData(gzFile, flashSaveData2);
|
||||||
|
flashBank = 0;
|
||||||
|
flashSetSize(flashSize);
|
||||||
|
} else {
|
||||||
|
utilReadData(gzFile, flashSaveData3);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void flashReadGameSkip(gzFile gzFile, int version)
|
||||||
|
{
|
||||||
|
// skip the flash data in a save game
|
||||||
|
if (version < SAVE_GAME_VERSION_5)
|
||||||
|
utilReadDataSkip(gzFile, flashSaveData);
|
||||||
|
else if (version < SAVE_GAME_VERSION_7) {
|
||||||
|
utilReadDataSkip(gzFile, flashSaveData2);
|
||||||
|
} else {
|
||||||
|
utilReadDataSkip(gzFile, flashSaveData3);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
|
@ -1235,6 +1235,7 @@ DEFINE_ALU_INSN_C(1F, 3F, MVNS, YES)
|
||||||
int mult = (opcode & 0x0F); \
|
int mult = (opcode & 0x0F); \
|
||||||
uint32_t rs = reg[(opcode >> 8) & 0x0F].I; \
|
uint32_t rs = reg[(opcode >> 8) & 0x0F].I; \
|
||||||
int acc = (opcode >> 12) & 0x0F; /* or destLo */ \
|
int acc = (opcode >> 12) & 0x0F; /* or destLo */ \
|
||||||
|
maybe_unused(acc); \
|
||||||
int dest = (opcode >> 16) & 0x0F; /* or destHi */ \
|
int dest = (opcode >> 16) & 0x0F; /* or destHi */ \
|
||||||
OP; \
|
OP; \
|
||||||
SETCOND; \
|
SETCOND; \
|
||||||
|
|
|
@ -19,6 +19,9 @@ const uint64_t TICKS_PER_SECOND = 16777216;
|
||||||
#define SAVE_GAME_VERSION_10 10
|
#define SAVE_GAME_VERSION_10 10
|
||||||
#define SAVE_GAME_VERSION SAVE_GAME_VERSION_10
|
#define SAVE_GAME_VERSION SAVE_GAME_VERSION_10
|
||||||
|
|
||||||
|
#define gbaWidth 240
|
||||||
|
#define gbaHeight 160
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
GBA_SAVE_AUTO = 0,
|
GBA_SAVE_AUTO = 0,
|
||||||
GBA_SAVE_EEPROM,
|
GBA_SAVE_EEPROM,
|
||||||
|
|
|
@ -588,6 +588,7 @@ static struct {
|
||||||
int soundDSBValue;
|
int soundDSBValue;
|
||||||
} state;
|
} state;
|
||||||
|
|
||||||
|
#ifndef __LIBRETRO__
|
||||||
// Old GBA sound state format
|
// Old GBA sound state format
|
||||||
static variable_desc old_gba_state[] = {
|
static variable_desc old_gba_state[] = {
|
||||||
SKIP(int, soundPaused),
|
SKIP(int, soundPaused),
|
||||||
|
@ -673,6 +674,7 @@ variable_desc old_gba_state2[] = {
|
||||||
SKIP(int, sound3ForcedOutput),
|
SKIP(int, sound3ForcedOutput),
|
||||||
{ NULL, 0 }
|
{ NULL, 0 }
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
// New state format
|
// New state format
|
||||||
static variable_desc gba_state[] = {
|
static variable_desc gba_state[] = {
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
DEBUG=0
|
||||||
TILED_RENDERING=0
|
TILED_RENDERING=0
|
||||||
STATIC_LINKING=0
|
STATIC_LINKING=0
|
||||||
FRONTEND_SUPPORTS_RGB565=1
|
FRONTEND_SUPPORTS_RGB565=1
|
||||||
|
@ -13,118 +14,54 @@ filter_out2 = $(call filter_out1,$(call filter_out1,$1))
|
||||||
ifeq ($(platform),)
|
ifeq ($(platform),)
|
||||||
platform = unix
|
platform = unix
|
||||||
ifeq ($(shell uname -a),)
|
ifeq ($(shell uname -a),)
|
||||||
platform = win
|
platform = win
|
||||||
else ifneq ($(findstring MINGW,$(shell uname -a)),)
|
else ifneq ($(findstring MINGW,$(shell uname -a)),)
|
||||||
platform = win
|
platform = win
|
||||||
else ifneq ($(findstring win,$(shell uname -a)),)
|
|
||||||
platform = win
|
|
||||||
else ifneq ($(findstring Darwin,$(shell uname -a)),)
|
else ifneq ($(findstring Darwin,$(shell uname -a)),)
|
||||||
platform = osx
|
platform = osx
|
||||||
arch = intel
|
arch = intel
|
||||||
|
ifeq ($(shell uname -p),powerpc)
|
||||||
|
arch = ppc
|
||||||
|
endif
|
||||||
|
else ifneq ($(findstring win,$(shell uname -a)),)
|
||||||
|
platform = win
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
# system platform
|
||||||
|
system_platform = unix
|
||||||
ifeq ($(shell uname -a),)
|
ifeq ($(shell uname -a),)
|
||||||
arch = ppc
|
EXE_EXT = .exe
|
||||||
endif
|
system_platform = win
|
||||||
|
else ifneq ($(findstring Darwin,$(shell uname -a)),)
|
||||||
|
system_platform = osx
|
||||||
|
arch = intel
|
||||||
|
ifeq ($(shell uname -p),powerpc)
|
||||||
|
arch = ppc
|
||||||
endif
|
endif
|
||||||
|
else ifneq ($(findstring MINGW,$(shell uname -a)),)
|
||||||
|
system_platform = win
|
||||||
endif
|
endif
|
||||||
|
|
||||||
TARGET_NAME = vbam
|
CORE_DIR := ..
|
||||||
|
LIBRETRO_DIR := $(CORE_DIR)/libretro
|
||||||
VBAM_VERSION := $(shell sed -En 's/.*\[([0-9]+[^]]+).*/\1/p; T; q' ../../CHANGELOG.md 2>/dev/null)
|
TARGET_NAME := vbam
|
||||||
|
|
||||||
CXXFLAGS += -DVBAM_VERSION=\"$(VBAM_VERSION)\"
|
|
||||||
|
|
||||||
|
VBAM_VERSION := $(shell sed -En 's/.*\[([0-9]+[^]]+).*/\1/p; T; q' ../../CHANGELOG.md 2>/dev/null)
|
||||||
TAG_COMMIT := $(shell git rev-list -n 1 v$(VBAM_VERSION) --abbrev-commit 2>/dev/null)
|
TAG_COMMIT := $(shell git rev-list -n 1 v$(VBAM_VERSION) --abbrev-commit 2>/dev/null)
|
||||||
CURRENT_COMMIT := $(shell git rev-parse --short HEAD 2>/dev/null)
|
CURRENT_COMMIT := $(shell git rev-parse --short HEAD 2>/dev/null)
|
||||||
|
|
||||||
|
CXXFLAGS += -DVBAM_VERSION=\"$(VBAM_VERSION)\"
|
||||||
ifneq ($(CURRENT_COMMIT),$(TAG_COMMIT))
|
ifneq ($(CURRENT_COMMIT),$(TAG_COMMIT))
|
||||||
CXXFLAGS += -DGIT_COMMIT=\"$(CURRENT_COMMIT)\"
|
CXXFLAGS += -DGIT_COMMIT=\"$(CURRENT_COMMIT)\"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(platform), unix)
|
# UNIX
|
||||||
TARGET := $(TARGET_NAME)_libretro.so
|
ifneq (,$(findstring unix,$(platform)))
|
||||||
fpic := -fPIC
|
TARGET := $(TARGET_NAME)_libretro.so
|
||||||
SHARED := -shared -Wl,-no-undefined -Wl,--version-script=link.T
|
fpic := -fPIC
|
||||||
TILED_RENDERING = 1
|
SHARED := -shared -Wl,-version-script=$(LIBRETRO_DIR)/link.T -Wl,-no-undefined
|
||||||
else ifeq ($(platform), osx)
|
|
||||||
TARGET := $(TARGET_NAME)_libretro.dylib
|
|
||||||
fpic := -fPIC
|
|
||||||
SHARED := -dynamiclib
|
|
||||||
arch = intel
|
|
||||||
ifeq ($(shell uname -a),)
|
|
||||||
arch = ppc
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifneq ($(arch),ppc)
|
|
||||||
SHARED += -DLSB_FIRST
|
|
||||||
endif
|
|
||||||
OSXVER = `sw_vers -productVersion | cut -d. -f 2`
|
|
||||||
OSX_LT_MAVERICKS = `(( $(OSXVER) <= 9)) && echo "YES"`
|
|
||||||
ifeq ($(OSX_LT_MAVERICKS),"YES")
|
|
||||||
fpic += -mmacosx-version-min=10.5
|
|
||||||
endif
|
|
||||||
|
|
||||||
# iOS
|
|
||||||
else ifneq (,$(findstring ios,$(platform)))
|
|
||||||
TARGET := $(TARGET_NAME)_libretro_ios.dylib
|
|
||||||
fpic := -fPIC
|
|
||||||
SHARED := -dynamiclib -DLSB_FIRST
|
|
||||||
|
|
||||||
ifeq ($(IOSSDK),)
|
|
||||||
IOSSDK := $(shell xcodebuild -version -sdk iphoneos Path)
|
|
||||||
endif
|
|
||||||
|
|
||||||
CC = clang -arch armv7 -isysroot $(IOSSDK)
|
|
||||||
CXX = clang++ -arch armv7 -isysroot $(IOSSDK)
|
|
||||||
ifeq ($(platform),ios9)
|
|
||||||
CC += -miphoneos-version-min=8.0
|
|
||||||
CXX += -miphoneos-version-min=8.0
|
|
||||||
SHARED += -miphoneos-version-min=8.0
|
|
||||||
else
|
|
||||||
CC += -miphoneos-version-min=5.0
|
|
||||||
CXX += -miphoneos-version-min=5.0
|
|
||||||
SHARED += -miphoneos-version-min=5.0
|
|
||||||
endif
|
|
||||||
TILED_RENDERING = 1
|
|
||||||
else ifeq ($(platform), theos_ios)
|
|
||||||
DEPLOYMENT_IOSVERSION = 5.0
|
|
||||||
TARGET = iphone:latest:$(DEPLOYMENT_IOSVERSION)
|
|
||||||
ARCHS = armv7 armv7s
|
|
||||||
TARGET_IPHONEOS_DEPLOYMENT_VERSION=$(DEPLOYMENT_IOSVERSION)
|
|
||||||
THEOS_BUILD_DIR := objs
|
|
||||||
include $(THEOS)/makefiles/common.mk
|
|
||||||
|
|
||||||
LIBRARY_NAME = $(TARGET_NAME)_libretro_ios
|
|
||||||
|
|
||||||
ENDIANNESS_DEFINES = -DLSB_FIRST
|
|
||||||
TILED_RENDERING=1
|
TILED_RENDERING=1
|
||||||
else ifeq ($(platform), qnx)
|
|
||||||
TARGET := $(TARGET_NAME)_libretro_qnx.so
|
|
||||||
fpic := -fPIC
|
|
||||||
SHARED := -shared
|
|
||||||
TILED_RENDERING = 1
|
|
||||||
CC = qcc -Vgcc_ntoarmv7le
|
|
||||||
CXX = QCC -Vgcc_ntoarmv7le_cpp
|
|
||||||
AR = QCC -Vgcc_ntoarmv7le
|
|
||||||
else ifeq ($(platform), vita)
|
|
||||||
TARGET := $(TARGET_NAME)_libretro_vita.a
|
|
||||||
CC = arm-vita-eabi-gcc
|
|
||||||
CXX = arm-vita-eabi-g++
|
|
||||||
AR = arm-vita-eabi-ar
|
|
||||||
__FLAGS := -marm -mtune=cortex-a9 -mcpu=cortex-a9 -mfloat-abi=hard -mword-relocations
|
|
||||||
__FLAGS += -fno-optimize-sibling-calls -fno-strict-aliasing -fno-partial-inlining -fno-tree-vrp
|
|
||||||
__FLAGS += -ffast-math -fsingle-precision-constant -funroll-loops -ftracer
|
|
||||||
__FLAGS += -DVITA -I../vita -Wno-attributes
|
|
||||||
|
|
||||||
CFLAGS += $(__FLAGS)
|
|
||||||
CXXFLAGS += $(__FLAGS)
|
|
||||||
CXXFLAGS += -fno-exceptions -fno-rtti
|
|
||||||
STATIC_LINKING=1
|
|
||||||
TILED_RENDERING=1
|
|
||||||
USE_CHEATS=0
|
|
||||||
USE_TWEAKS=1
|
|
||||||
USE_THREADED_RENDERER=1
|
|
||||||
USE_MOTION_SENSOR=1
|
|
||||||
HAVE_NEON=1
|
|
||||||
|
|
||||||
# Classic Platforms ####################
|
# Classic Platforms ####################
|
||||||
# Platform affix = classic_<ISA>_<µARCH>
|
# Platform affix = classic_<ISA>_<µARCH>
|
||||||
|
@ -135,8 +72,7 @@ else ifeq ($(platform), vita)
|
||||||
else ifeq ($(platform), classic_armv7_a7)
|
else ifeq ($(platform), classic_armv7_a7)
|
||||||
TARGET := $(TARGET_NAME)_libretro.so
|
TARGET := $(TARGET_NAME)_libretro.so
|
||||||
fpic := -fPIC
|
fpic := -fPIC
|
||||||
SHARED := -shared
|
SHARED := -shared -Wl,--version-script=$(LIBRETRO_DIR)/link.T -Wl,--no-undefined -fPIC
|
||||||
TILED_RENDERING = 1
|
|
||||||
CFLAGS += -Ofast \
|
CFLAGS += -Ofast \
|
||||||
-flto=4 -fwhole-program -fuse-linker-plugin \
|
-flto=4 -fwhole-program -fuse-linker-plugin \
|
||||||
-fdata-sections -ffunction-sections -Wl,--gc-sections \
|
-fdata-sections -ffunction-sections -Wl,--gc-sections \
|
||||||
|
@ -146,8 +82,13 @@ else ifeq ($(platform), classic_armv7_a7)
|
||||||
-fmerge-all-constants -fno-math-errno \
|
-fmerge-all-constants -fno-math-errno \
|
||||||
-marm -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard
|
-marm -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard
|
||||||
CXXFLAGS += $(CFLAGS)
|
CXXFLAGS += $(CFLAGS)
|
||||||
HAVE_NEON = 1
|
CPPFLAGS += $(CFLAGS)
|
||||||
|
ASFLAGS += $(CFLAGS)
|
||||||
|
HAVE_NEON=1
|
||||||
ARCH = arm
|
ARCH = arm
|
||||||
|
BUILTIN_GPU = neon
|
||||||
|
USE_DYNAREC=1
|
||||||
|
TILED_RENDERING=1
|
||||||
ifeq ($(shell echo `$(CC) -dumpversion` "< 4.9" | bc -l), 1)
|
ifeq ($(shell echo `$(CC) -dumpversion` "< 4.9" | bc -l), 1)
|
||||||
CFLAGS += -march=armv7-a
|
CFLAGS += -march=armv7-a
|
||||||
else
|
else
|
||||||
|
@ -164,7 +105,7 @@ else ifeq ($(platform), classic_armv8_a35)
|
||||||
TARGET := $(TARGET_NAME)_libretro.so
|
TARGET := $(TARGET_NAME)_libretro.so
|
||||||
fpic := -fPIC
|
fpic := -fPIC
|
||||||
SHARED := -shared
|
SHARED := -shared
|
||||||
TILED_RENDERING = 1
|
TILED_RENDERING=1
|
||||||
CFLAGS += -Ofast \
|
CFLAGS += -Ofast \
|
||||||
-flto=4 -fwhole-program -fuse-linker-plugin \
|
-flto=4 -fwhole-program -fuse-linker-plugin \
|
||||||
-fdata-sections -ffunction-sections -Wl,--gc-sections \
|
-fdata-sections -ffunction-sections -Wl,--gc-sections \
|
||||||
|
@ -174,7 +115,7 @@ else ifeq ($(platform), classic_armv8_a35)
|
||||||
-fmerge-all-constants -fno-math-errno \
|
-fmerge-all-constants -fno-math-errno \
|
||||||
-marm -mtune=cortex-a35 -mfpu=neon-fp-armv8 -mfloat-abi=hard
|
-marm -mtune=cortex-a35 -mfpu=neon-fp-armv8 -mfloat-abi=hard
|
||||||
CXXFLAGS += $(CFLAGS)
|
CXXFLAGS += $(CFLAGS)
|
||||||
HAVE_NEON = 1
|
HAVE_NEON=1
|
||||||
ARCH = arm
|
ARCH = arm
|
||||||
ifeq ($(shell echo `$(CC) -dumpversion` "< 4.9" | bc -l), 1)
|
ifeq ($(shell echo `$(CC) -dumpversion` "< 4.9" | bc -l), 1)
|
||||||
CFLAGS += -march=armv8-a
|
CFLAGS += -march=armv8-a
|
||||||
|
@ -187,6 +128,300 @@ else ifeq ($(platform), classic_armv8_a35)
|
||||||
endif
|
endif
|
||||||
#######################################
|
#######################################
|
||||||
|
|
||||||
|
# OS X
|
||||||
|
else ifeq ($(platform), osx)
|
||||||
|
TARGET := $(TARGET_NAME)_libretro.dylib
|
||||||
|
fpic := -fPIC
|
||||||
|
ifeq ($(arch),ppc)
|
||||||
|
ENDIANNESS_DEFINES += -DMSB_FIRST
|
||||||
|
PLATFORM_DEFINES := -D__POWERPC__ -D__ppc__
|
||||||
|
endif
|
||||||
|
OSXVER = `sw_vers -productVersion | cut -d. -f 2`
|
||||||
|
OSX_LT_MAVERICKS = `(( $(OSXVER) <= 9)) && echo "YES"`
|
||||||
|
fpic += -mmacosx-version-min=10.2
|
||||||
|
SHARED := -dynamiclib
|
||||||
|
TILED_RENDERING=1
|
||||||
|
|
||||||
|
# iOS
|
||||||
|
else ifneq (,$(findstring ios,$(platform)))
|
||||||
|
TARGET := $(TARGET_NAME)_libretro_ios.dylib
|
||||||
|
fpic := -fPIC
|
||||||
|
SHARED := -dynamiclib
|
||||||
|
ifeq ($(IOSSDK),)
|
||||||
|
IOSSDK := $(shell xcodebuild -version -sdk iphoneos Path)
|
||||||
|
endif
|
||||||
|
ifeq ($(platform),ios-arm64)
|
||||||
|
CC = cc -arch arm64 -isysroot $(IOSSDK)
|
||||||
|
CXX = clang++ -arch arm64 -isysroot $(IOSSDK)
|
||||||
|
else
|
||||||
|
CC = cc -arch armv7 -isysroot $(IOSSDK)
|
||||||
|
CXX = clang++ -arch armv7 -isysroot $(IOSSDK)
|
||||||
|
endif
|
||||||
|
CFLAGS += -DIOS
|
||||||
|
ifeq ($(platform),$(filter $(platform),ios9 ios-arm64))
|
||||||
|
CC += -miphoneos-version-min=8.0
|
||||||
|
CXX += -miphoneos-version-min=8.0
|
||||||
|
CFLAGS += -miphoneos-version-min=8.0
|
||||||
|
else
|
||||||
|
CC += -miphoneos-version-min=5.0
|
||||||
|
CXX += -miphoneos-version-min=5.0
|
||||||
|
CFLAGS += -miphoneos-version-min=5.0
|
||||||
|
endif
|
||||||
|
TILED_RENDERING=1
|
||||||
|
|
||||||
|
# Theos iOS
|
||||||
|
else ifeq ($(platform), theos_ios)
|
||||||
|
DEPLOYMENT_IOSVERSION = 5.0
|
||||||
|
TARGET = iphone:latest:$(DEPLOYMENT_IOSVERSION)
|
||||||
|
ARCHS = armv7 armv7s
|
||||||
|
TARGET_IPHONEOS_DEPLOYMENT_VERSION=$(DEPLOYMENT_IOSVERSION)
|
||||||
|
THEOS_BUILD_DIR := objs
|
||||||
|
include $(THEOS)/makefiles/common.mk
|
||||||
|
LIBRARY_NAME = $(TARGET_NAME)_libretro_ios
|
||||||
|
TILED_RENDERING=1
|
||||||
|
|
||||||
|
# QNX
|
||||||
|
else ifeq ($(platform), qnx)
|
||||||
|
TARGET := $(TARGET_NAME)_libretro_$(platform).so
|
||||||
|
fpic := -fPIC
|
||||||
|
SHARED := -lcpp -lm -shared -Wl,-version-script=$(LIBRETRO_DIR)/link.T -Wl,-no-undefined
|
||||||
|
CC = qcc -Vgcc_ntoarmv7le
|
||||||
|
CXX = QCC -Vgcc_ntoarmv7le_cpp
|
||||||
|
AR = QCC -Vgcc_ntoarmv7le
|
||||||
|
PLATFORM_DEFINES := -D__BLACKBERRY_QNX__ -marm -mcpu=cortex-a9 -mfpu=neon -mfloat-abi=softfp
|
||||||
|
TILED_RENDERING=1
|
||||||
|
|
||||||
|
# PS3
|
||||||
|
else ifeq ($(platform), ps3)
|
||||||
|
TARGET := $(TARGET_NAME)_libretro_$(platform).a
|
||||||
|
CC = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-gcc.exe
|
||||||
|
CXX = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-gcc.exe
|
||||||
|
AR = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-ar.exe
|
||||||
|
ENDIANNESS_DEFINES += -DMSB_FIRST
|
||||||
|
PLATFORM_DEFINES := -D__CELLOS_LV2__ -D__POWERPC__ -D__ppc__
|
||||||
|
STATIC_LINKING=1
|
||||||
|
TILED_RENDERING=1
|
||||||
|
|
||||||
|
# PS3 (SNC)
|
||||||
|
else ifeq ($(platform), sncps3)
|
||||||
|
TARGET := $(TARGET_NAME)_libretro_ps3.a
|
||||||
|
CC = $(CELL_SDK)/host-win32/sn/bin/ps3ppusnc.exe
|
||||||
|
CXX = $(CELL_SDK)/host-win32/sn/bin/ps3ppusnc.exe
|
||||||
|
AR = $(CELL_SDK)/host-win32/sn/bin/ps3snarl.exe
|
||||||
|
ENDIANNESS_DEFINES += -DMSB_FIRST
|
||||||
|
PLATFORM_DEFINES := -D__CELLOS_LV2__ -D__POWERPC__ -D__ppc__
|
||||||
|
STATIC_LINKING=1
|
||||||
|
TILED_RENDERING=1
|
||||||
|
|
||||||
|
# Lightweight PS3 Homebrew SDK
|
||||||
|
else ifeq ($(platform), psl1ght)
|
||||||
|
TARGET := $(TARGET_NAME)_libretro_psl1ght.a
|
||||||
|
CC = $(PS3DEV)/ppu/bin/ppu-gcc$(EXE_EXT)
|
||||||
|
CXX = $(PS3DEV)/ppu/bin/ppu-g++$(EXE_EXT)
|
||||||
|
AR = $(PS3DEV)/ppu/bin/ppu-ar$(EXE_EXT)
|
||||||
|
ENDIANNESS_DEFINES += -DMSB_FIRST
|
||||||
|
PLATFORM_DEFINES := -D__CELLOS_LV2__ -D__POWERPC__ -D__ppc__
|
||||||
|
STATIC_LINKING=1
|
||||||
|
TILED_RENDERING=1
|
||||||
|
|
||||||
|
# PSP1
|
||||||
|
else ifeq ($(platform), psp1)
|
||||||
|
TARGET := $(TARGET_NAME)_libretro_$(platform).a
|
||||||
|
CC = psp-gcc$(EXE_EXT)
|
||||||
|
CXX = psp-g++$(EXE_EXT)
|
||||||
|
AR = psp-ar$(EXE_EXT)
|
||||||
|
PLATFORM_DEFINES := -DPSP
|
||||||
|
CFLAGS += -G0
|
||||||
|
CXXFLAGS += -G0
|
||||||
|
STATIC_LINKING=1
|
||||||
|
TILED_RENDERING=1
|
||||||
|
|
||||||
|
# Vita
|
||||||
|
else ifeq ($(platform), vita)
|
||||||
|
TARGET := $(TARGET_NAME)_libretro_$(platform).a
|
||||||
|
CC = arm-vita-eabi-gcc$(EXE_EXT)
|
||||||
|
CXX = arm-vita-eabi-g++$(EXE_EXT)
|
||||||
|
AR = arm-vita-eabi-ar$(EXE_EXT)
|
||||||
|
PLATFORM_DEFINES := -DVITA
|
||||||
|
__FLAGS := -marm -mfpu=neon -mtune=cortex-a9 -mcpu=cortex-a9 -mfloat-abi=hard -mword-relocations
|
||||||
|
__FLAGS += -fno-optimize-sibling-calls -fno-strict-aliasing -fno-partial-inlining -fno-tree-vrp
|
||||||
|
__FLAGS += -ffast-math -fsingle-precision-constant -funroll-loops -ftracer
|
||||||
|
|
||||||
|
CFLAGS += $(__FLAGS)
|
||||||
|
CXXFLAGS += $(__FLAGS)
|
||||||
|
CXXFLAGS += -fno-exceptions -fno-rtti
|
||||||
|
STATIC_LINKING=1
|
||||||
|
TILED_RENDERING=1
|
||||||
|
USE_CHEATS=0 #for performance boost.
|
||||||
|
|
||||||
|
USE_THREADED_RENDERER=1
|
||||||
|
USE_MOTION_SENSOR=1
|
||||||
|
USE_FRAME_SKIP=1
|
||||||
|
HAVE_NEON=1
|
||||||
|
|
||||||
|
# Libxenon
|
||||||
|
else ifeq ($(platform), xenon)
|
||||||
|
TARGET := $(TARGET_NAME)_libretro_xenon360.a
|
||||||
|
CC = xenon-gcc$(EXE_EXT)
|
||||||
|
CXX = xenon-g++$(EXE_EXT)
|
||||||
|
AR = xenon-ar$(EXE_EXT)
|
||||||
|
ENDIANNESS_DEFINES += -DMSB_FIRST
|
||||||
|
PLATFORM_DEFINES := -D__LIBXENON__ -D__POWERPC__ -D__ppc__
|
||||||
|
STATIC_LINKING=1
|
||||||
|
TILED_RENDERING=1
|
||||||
|
|
||||||
|
# Nintendo Game Cube
|
||||||
|
else ifeq ($(platform), ngc)
|
||||||
|
TARGET := $(TARGET_NAME)_libretro_$(platform).a
|
||||||
|
CC = $(DEVKITPPC)/bin/powerpc-eabi-gcc$(EXE_EXT)
|
||||||
|
CXX = $(DEVKITPPC)/bin/powerpc-eabi-g++$(EXE_EXT)
|
||||||
|
AR = $(DEVKITPPC)/bin/powerpc-eabi-ar$(EXE_EXT)
|
||||||
|
ENDIANNESS_DEFINES += -DMSB_FIRST
|
||||||
|
PLATFORM_DEFINES += -DGEKKO -DHW_DOL -mrvl -mcpu=750 -meabi -mhard-float -D__ppc__
|
||||||
|
PLATFORM_DEFINES += -U__INT32_TYPE__ -U __UINT32_TYPE__ -D__INT32_TYPE__=int
|
||||||
|
STATIC_LINKING=1
|
||||||
|
TILED_RENDERING=1
|
||||||
|
|
||||||
|
# Nintendo Wii
|
||||||
|
else ifeq ($(platform), wii)
|
||||||
|
TARGET := $(TARGET_NAME)_libretro_$(platform).a
|
||||||
|
CC = $(DEVKITPPC)/bin/powerpc-eabi-gcc$(EXE_EXT)
|
||||||
|
CXX = $(DEVKITPPC)/bin/powerpc-eabi-g++$(EXE_EXT)
|
||||||
|
AR = $(DEVKITPPC)/bin/powerpc-eabi-ar$(EXE_EXT)
|
||||||
|
ENDIANNESS_DEFINES += -DMSB_FIRST
|
||||||
|
PLATFORM_DEFINES += -DGEKKO -DHW_RVL -mrvl -mcpu=750 -meabi -mhard-float -D__ppc__
|
||||||
|
PLATFORM_DEFINES += -U__INT32_TYPE__ -U __UINT32_TYPE__ -D__INT32_TYPE__=int
|
||||||
|
STATIC_LINKING=1
|
||||||
|
TILED_RENDERING=1
|
||||||
|
|
||||||
|
# Nintendo WiiU
|
||||||
|
else ifeq ($(platform), wiiu)
|
||||||
|
TARGET := $(TARGET_NAME)_libretro_$(platform).a
|
||||||
|
CC = $(DEVKITPPC)/bin/powerpc-eabi-gcc$(EXE_EXT)
|
||||||
|
CXX = $(DEVKITPPC)/bin/powerpc-eabi-g++$(EXE_EXT)
|
||||||
|
AR = $(DEVKITPPC)/bin/powerpc-eabi-ar$(EXE_EXT)
|
||||||
|
ENDIANNESS_DEFINES += -DMSB_FIRST
|
||||||
|
PLATFORM_DEFINES += -DGEKKO -DWIIU -DHW_RVL -mwup -mcpu=750 -meabi -mhard-float -D__ppc__
|
||||||
|
PLATFORM_DEFINES += -U__INT32_TYPE__ -U __UINT32_TYPE__ -D__INT32_TYPE__=int
|
||||||
|
STATIC_LINKING=1
|
||||||
|
TILED_RENDERING=1
|
||||||
|
|
||||||
|
# Nintendo Switch (libnx)
|
||||||
|
else ifeq ($(platform), libnx)
|
||||||
|
include $(DEVKITPRO)/libnx/switch_rules
|
||||||
|
TARGET := $(TARGET_NAME)_libretro_$(platform).a
|
||||||
|
DEFINES := -DSWITCH=1 -U__linux__ -U__linux -DRARCH_INTERNAL -DHAVE_THREADS=1
|
||||||
|
CFLAGS := $(DEFINES) -g -O3 \
|
||||||
|
-fPIE -I$(LIBNX)/include/ -ffunction-sections -fdata-sections -ftls-model=local-exec -Wl,--allow-multiple-definition -specs=$(LIBNX)/switch.specs
|
||||||
|
CFLAGS += $(INCDIRS)
|
||||||
|
CFLAGS += $(INCLUDE) -D__SWITCH__ -DHAVE_LIBNX
|
||||||
|
CXXFLAGS := $(ASFLAGS) $(CFLAGS) -fno-rtti -fno-exceptions -std=gnu++11
|
||||||
|
CFLAGS += -std=gnu11
|
||||||
|
STATIC_LINKING=1
|
||||||
|
|
||||||
|
# Nintendo Switch (libtransistor)
|
||||||
|
else ifeq ($(platform), switch)
|
||||||
|
TARGET := $(TARGET_NAME)_libretro_$(platform).a
|
||||||
|
include $(LIBTRANSISTOR_HOME)/libtransistor.mk
|
||||||
|
STATIC_LINKING=1
|
||||||
|
TILED_RENDERING=1
|
||||||
|
|
||||||
|
else ifneq (,$(findstring armv,$(platform)))
|
||||||
|
TARGET := $(TARGET_NAME)_libretro.so
|
||||||
|
SHARED := -shared -Wl,--no-undefined
|
||||||
|
TILED_RENDERING=1
|
||||||
|
fpic := -fPIC
|
||||||
|
ifneq (,$(findstring cortexa8,$(platform)))
|
||||||
|
PLATFORM_DEFINES += -marm -mcpu=cortex-a8
|
||||||
|
else ifneq (,$(findstring cortexa9,$(platform)))
|
||||||
|
PLATFORM_DEFINES += -marm -mcpu=cortex-a9
|
||||||
|
endif
|
||||||
|
PLATFORM_DEFINES += -marm
|
||||||
|
ifneq (,$(findstring neon,$(platform)))
|
||||||
|
PLATFORM_DEFINES += -mfpu=neon
|
||||||
|
HAVE_NEON=1
|
||||||
|
endif
|
||||||
|
ifneq (,$(findstring softfloat,$(platform)))
|
||||||
|
PLATFORM_DEFINES += -mfloat-abi=softfp
|
||||||
|
else ifneq (,$(findstring hardfloat,$(platform)))
|
||||||
|
PLATFORM_DEFINES += -mfloat-abi=hard
|
||||||
|
endif
|
||||||
|
PLATFORM_DEFINES += -DARM
|
||||||
|
|
||||||
|
# Emscripten
|
||||||
|
else ifeq ($(platform), emscripten)
|
||||||
|
TARGET := $(TARGET_NAME)_libretro_$(platform).bc
|
||||||
|
STATIC_LINKING=1
|
||||||
|
|
||||||
|
# Windows MSVC 2003 Xbox 1
|
||||||
|
else ifeq ($(platform), xbox1_msvc2003)
|
||||||
|
TARGET := $(TARGET_NAME)_libretro_xdk1.lib
|
||||||
|
CC = CL.exe
|
||||||
|
CXX = CL.exe
|
||||||
|
LD = lib.exe
|
||||||
|
export INCLUDE := $(XDK)\xbox\include
|
||||||
|
export LIB := $(XDK)\xbox\lib
|
||||||
|
PATH := $(call unixcygpath,$(XDK)/xbox/bin/vc71):$(PATH)
|
||||||
|
PSS_STYLE :=2
|
||||||
|
CFLAGS += -D_XBOX -D_XBOX1
|
||||||
|
CXXFLAGS += -D_XBOX -D_XBOX1
|
||||||
|
TILED_RENDERING=1
|
||||||
|
STATIC_LINKING=1
|
||||||
|
HAS_GCC := 0
|
||||||
|
|
||||||
|
# Windows MSVC 2010 Xbox 360
|
||||||
|
else ifeq ($(platform), xbox360_msvc2010)
|
||||||
|
TARGET := $(TARGET_NAME)_libretro_xdk360.lib
|
||||||
|
MSVCBINDIRPREFIX = $(XEDK)/bin/win32
|
||||||
|
CC = "$(MSVCBINDIRPREFIX)/cl.exe"
|
||||||
|
CXX = "$(MSVCBINDIRPREFIX)/cl.exe"
|
||||||
|
LD = "$(MSVCBINDIRPREFIX)/lib.exe"
|
||||||
|
export INCLUDE := $(XEDK)/include/xbox
|
||||||
|
export LIB := $(XEDK)/lib/xbox
|
||||||
|
PSS_STYLE :=2
|
||||||
|
TILED_RENDERING=1
|
||||||
|
ENDIANNESS_DEFINES += -DMSB_FIRST
|
||||||
|
CFLAGS += -D_XBOX -D_XBOX360
|
||||||
|
CXXFLAGS += -D_XBOX -D_XBOX360
|
||||||
|
STATIC_LINKING=1
|
||||||
|
HAS_GCC := 0
|
||||||
|
|
||||||
|
# Windows MSVC 2005 x86
|
||||||
|
else ifeq ($(platform), windows_msvc2005_x86)
|
||||||
|
CC = cl.exe
|
||||||
|
CXX = cl.exe
|
||||||
|
PATH := $(shell IFS=$$'\n'; cygpath "$(VS80COMNTOOLS)../../VC/bin"):$(PATH)
|
||||||
|
PATH := $(PATH):$(shell IFS=$$'\n'; cygpath "$(VS80COMNTOOLS)../IDE")
|
||||||
|
INCLUDE := $(shell IFS=$$'\n'; cygpath "$(VS80COMNTOOLS)../../VC/include")
|
||||||
|
LIB := $(shell IFS=$$'\n'; cygpath -w "$(VS80COMNTOOLS)../../VC/lib")
|
||||||
|
BIN := $(shell IFS=$$'\n'; cygpath "$(VS80COMNTOOLS)../../VC/bin")
|
||||||
|
WindowsSdkDir := $(INETSDK)
|
||||||
|
export INCLUDE := $(INCLUDE);$(INETSDK)/Include;libretro-common/include/compat/msvc
|
||||||
|
export LIB := $(LIB);$(WindowsSdkDir);$(INETSDK)/Lib
|
||||||
|
TARGET := $(TARGET_NAME)_libretro.dll
|
||||||
|
PSS_STYLE :=2
|
||||||
|
LDFLAGS += -DLL
|
||||||
|
CFLAGS += -D_CRT_SECURE_NO_DEPRECATE
|
||||||
|
CXXFLAGS += -D_CRT_SECURE_NO_DEPRECATE
|
||||||
|
|
||||||
|
# Windows MSVC 2003 x86
|
||||||
|
else ifeq ($(platform), windows_msvc2003_x86)
|
||||||
|
CC = cl.exe
|
||||||
|
CXX = cl.exe
|
||||||
|
PATH := $(shell IFS=$$'\n'; cygpath "$(VS71COMNTOOLS)../../Vc7/bin"):$(PATH)
|
||||||
|
PATH := $(PATH):$(shell IFS=$$'\n'; cygpath "$(VS71COMNTOOLS)../IDE")
|
||||||
|
INCLUDE := $(shell IFS=$$'\n'; cygpath "$(VS71COMNTOOLS)../../Vc7/include")
|
||||||
|
LIB := $(shell IFS=$$'\n'; cygpath -w "$(VS71COMNTOOLS)../../Vc7/lib")
|
||||||
|
BIN := $(shell IFS=$$'\n'; cygpath "$(VS71COMNTOOLS)../../Vc7/bin")
|
||||||
|
WindowsSdkDir := $(INETSDK)
|
||||||
|
export INCLUDE := $(INCLUDE);$(INETSDK)/Include;src/drivers/libretro/msvc/msvc-2005
|
||||||
|
export LIB := $(LIB);$(WindowsSdkDir);$(INETSDK)/Lib
|
||||||
|
TARGET := $(TARGET_NAME)_libretro.dll
|
||||||
|
PSS_STYLE :=2
|
||||||
|
LDFLAGS += -DLL
|
||||||
|
CFLAGS += -D_CRT_SECURE_NO_DEPRECATE
|
||||||
|
CXXFLAGS += -D_CRT_SECURE_NO_DEPRECATE
|
||||||
|
|
||||||
# Windows MSVC 2017 all architectures
|
# Windows MSVC 2017 all architectures
|
||||||
else ifneq (,$(findstring windows_msvc2017,$(platform)))
|
else ifneq (,$(findstring windows_msvc2017,$(platform)))
|
||||||
|
|
||||||
|
@ -277,50 +512,40 @@ else ifneq (,$(findstring windows_msvc2017,$(platform)))
|
||||||
PSS_STYLE :=2
|
PSS_STYLE :=2
|
||||||
LDFLAGS += -DLL
|
LDFLAGS += -DLL
|
||||||
|
|
||||||
|
# Windows
|
||||||
else
|
else
|
||||||
TARGET := $(TARGET_NAME)_libretro.dll
|
TARGET := $(TARGET_NAME)_libretro.dll
|
||||||
LDFLAGS += -Wl,-no-undefined -Wl,--version-script=link.T
|
CC = gcc
|
||||||
CC = gcc
|
CXX = g++
|
||||||
CXX = g++
|
SHARED := -shared -static-libgcc -static-libstdc++ -Wl,-no-undefined -Wl,-version-script=$(LIBRETRO_DIR)/link.T
|
||||||
SHARED := -shared -static-libgcc -static-libstdc++
|
TILED_RENDERING=1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(TILED_RENDERING), 1)
|
|
||||||
VBA_DEFINES += -DTILED_RENDERING
|
|
||||||
endif
|
|
||||||
|
|
||||||
CORE_DIR := ..
|
|
||||||
|
|
||||||
include Makefile.common
|
include Makefile.common
|
||||||
|
|
||||||
OBJS := $(SOURCES_CXX:.cpp=.o)
|
OBJS := $(SOURCES_CXX:.cpp=.o)
|
||||||
|
|
||||||
VBA_DEFINES += -D__LIBRETRO__ -DFINAL_VERSION -DC_CORE -DNO_DEBUGGER
|
ifeq ($(STATIC_LINKING),1)
|
||||||
|
SHARED=
|
||||||
ifeq ($(FRONTEND_SUPPORTS_RGB565),1)
|
fpic=
|
||||||
VBA_DEFINES += -DFRONTEND_SUPPORTS_RGB565
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(NO_LINK),1)
|
|
||||||
VBA_DEFINES += -DNO_LINK
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq ($(SANITIZER),)
|
ifneq ($(SANITIZER),)
|
||||||
CFLAGS += -fsanitize=$(SANITIZER)
|
CFLAGS += -fsanitize=$(SANITIZER)
|
||||||
CXXFLAGS += -fsanitize=$(SANITIZER)
|
CXXFLAGS += -fsanitize=$(SANITIZER)
|
||||||
LDFLAGS += -fsanitize=$(SANITIZER)
|
LDFLAGS += -fsanitize=$(SANITIZER)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(DEBUG), 1)
|
ifeq ($(DEBUG), 1)
|
||||||
CFLAGS += -O0 -g
|
CFLAGS += -O0 -g
|
||||||
CXXFLAGS += -O0 -g
|
CXXFLAGS += -O0 -g
|
||||||
else
|
else
|
||||||
CFLAGS += -O2 -DNDEBUG
|
CFLAGS += -O2 -DNDEBUG
|
||||||
CXXFLAGS += -O2 -DNDEBUG
|
CXXFLAGS += -O2 -DNDEBUG
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CFLAGS += $(fpic) $(VBA_DEFINES)
|
CFLAGS += -Wall $(fpic) $(VBA_DEFINES) $(ENDIANNESS_DEFINES) $(PLATFORM_DEFINES)
|
||||||
CXXFLAGS += $(fpic) $(VBA_DEFINES)
|
CXXFLAGS += -Wall $(fpic) $(VBA_DEFINES) $(ENDIANNESS_DEFINES) $(PLATFORM_DEFINES)
|
||||||
|
|
||||||
OBJOUT = -o
|
OBJOUT = -o
|
||||||
LINKOUT = -o
|
LINKOUT = -o
|
||||||
|
@ -373,7 +598,7 @@ $(TARGET): $(OBJS)
|
||||||
ifeq ($(STATIC_LINKING), 1)
|
ifeq ($(STATIC_LINKING), 1)
|
||||||
$(AR) rcs $@ $(OBJS)
|
$(AR) rcs $@ $(OBJS)
|
||||||
else
|
else
|
||||||
$(LD) $(LINKOUT)$@ $(SHARED) $(OBJS) $(LDFLAGS) $(LIBS)
|
$(LD) $(LINKOUT)$@ $(SHARED) $(OBJS) $(LDFLAGS) $(LIBS)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
|
|
@ -1,13 +1,24 @@
|
||||||
LIBRETRO_COMMON := $(CORE_DIR)/libretro/libretro-common/include
|
LIBRETRO_COMMON := $(CORE_DIR)/libretro/libretro-common
|
||||||
|
INCFLAGS := -I$(CORE_DIR) -I$(LIBRETRO_COMMON)/include
|
||||||
|
VBA_DEFINES := -D__LIBRETRO__ -DFINAL_VERSION -DC_CORE -DNO_DEBUGGER
|
||||||
|
|
||||||
|
ifeq ($(TILED_RENDERING), 1)
|
||||||
|
VBA_DEFINES += -DTILED_RENDERING
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(FRONTEND_SUPPORTS_RGB565),1)
|
||||||
|
VBA_DEFINES += -DFRONTEND_SUPPORTS_RGB565
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(NO_LINK),1)
|
||||||
|
VBA_DEFINES += -DNO_LINK
|
||||||
|
endif
|
||||||
|
|
||||||
INCFLAGS := -I$(CORE_DIR) -I$(LIBRETRO_COMMON)
|
|
||||||
SOURCES_CXX :=
|
SOURCES_CXX :=
|
||||||
|
|
||||||
SOURCES_CXX += \
|
SOURCES_CXX += \
|
||||||
$(CORE_DIR)/libretro/libretro.cpp \
|
$(CORE_DIR)/libretro/libretro.cpp \
|
||||||
$(CORE_DIR)/libretro/UtilRetro.cpp \
|
$(CORE_DIR)/libretro/UtilRetro.cpp \
|
||||||
$(CORE_DIR)/libretro/SoundRetro.cpp \
|
$(CORE_DIR)/libretro/SoundRetro.cpp
|
||||||
$(CORE_DIR)/libretro/scrc32.cpp
|
|
||||||
|
|
||||||
SOURCES_CXX += \
|
SOURCES_CXX += \
|
||||||
$(CORE_DIR)/apu/Gb_Oscs.cpp \
|
$(CORE_DIR)/apu/Gb_Oscs.cpp \
|
||||||
|
|
|
@ -1,21 +1,16 @@
|
||||||
LOCAL_PATH := $(call my-dir)
|
LOCAL_PATH := $(call my-dir)
|
||||||
|
|
||||||
CORE_DIR := $(LOCAL_PATH)/../..
|
CORE_DIR := $(LOCAL_PATH)/../..
|
||||||
LIBRETRO_DIR := $(CORE_DIR)/libretro
|
LIBRETRO_DIR := $(CORE_DIR)/libretro
|
||||||
|
|
||||||
|
FRONTEND_SUPPORTS_RGB565 := 1
|
||||||
|
TILED_RENDERING := 1
|
||||||
|
|
||||||
include $(LIBRETRO_DIR)/Makefile.common
|
include $(LIBRETRO_DIR)/Makefile.common
|
||||||
|
|
||||||
COREFLAGS := -DHAVE_STDINT_H -DLSB_FIRST -D__LIBRETRO__ -DFINAL_VERSION -DC_CORE -DNO_LINK -DFRONTEND_SUPPORTS_RGB565 -DTILED_RENDERING -DNO_DEBUGGER $(INCFLAGS)
|
COREFLAGS := -DHAVE_STDINT_H $(VBA_DEFINES) $(INCFLAGS)
|
||||||
|
|
||||||
#GIT_VERSION := " $(shell git rev-parse --short HEAD || echo unknown)"
|
|
||||||
#ifneq ($(GIT_VERSION)," unknown")
|
|
||||||
# COREFLAGS += -DGIT_VERSION=\"$(GIT_VERSION)\"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
VBAM_VERSION := $(shell sed -En 's/.*\[([0-9]+[^]]+).*/\1/p; T; q' ../../CHANGELOG.md 2>/dev/null)
|
VBAM_VERSION := $(shell sed -En 's/.*\[([0-9]+[^]]+).*/\1/p; T; q' ../../CHANGELOG.md 2>/dev/null)
|
||||||
|
|
||||||
COREFLAGS += -DVBAM_VERSION=\"$(VBAM_VERSION)\"
|
COREFLAGS += -DVBAM_VERSION=\"$(VBAM_VERSION)\"
|
||||||
|
|
||||||
TAG_COMMIT := $(shell git rev-list -n 1 v$(VBAM_VERSION) --abbrev-commit 2>/dev/null)
|
TAG_COMMIT := $(shell git rev-list -n 1 v$(VBAM_VERSION) --abbrev-commit 2>/dev/null)
|
||||||
CURRENT_COMMIT := $(shell git rev-parse --short HEAD 2>/dev/null)
|
CURRENT_COMMIT := $(shell git rev-parse --short HEAD 2>/dev/null)
|
||||||
|
|
||||||
|
|
|
@ -1117,7 +1117,7 @@ enum retro_mod
|
||||||
* This may be still be done regardless of the core options
|
* This may be still be done regardless of the core options
|
||||||
* interface version.
|
* interface version.
|
||||||
*
|
*
|
||||||
* If version is 1 however, core options may instead be set by
|
* If version is >= 1 however, core options may instead be set by
|
||||||
* passing an array of retro_core_option_definition structs to
|
* passing an array of retro_core_option_definition structs to
|
||||||
* RETRO_ENVIRONMENT_SET_CORE_OPTIONS, or a 2D array of
|
* RETRO_ENVIRONMENT_SET_CORE_OPTIONS, or a 2D array of
|
||||||
* retro_core_option_definition structs to RETRO_ENVIRONMENT_SET_CORE_OPTIONS_INTL.
|
* retro_core_option_definition structs to RETRO_ENVIRONMENT_SET_CORE_OPTIONS_INTL.
|
||||||
|
@ -1132,8 +1132,8 @@ enum retro_mod
|
||||||
* GET_VARIABLE.
|
* GET_VARIABLE.
|
||||||
* This allows the frontend to present these variables to
|
* This allows the frontend to present these variables to
|
||||||
* a user dynamically.
|
* a user dynamically.
|
||||||
* This should only be called if RETRO_ENVIRONMENT_GET_ENHANCED_CORE_OPTIONS
|
* This should only be called if RETRO_ENVIRONMENT_GET_CORE_OPTIONS_VERSION
|
||||||
* returns an API version of 1.
|
* returns an API version of >= 1.
|
||||||
* This should be called instead of RETRO_ENVIRONMENT_SET_VARIABLES.
|
* This should be called instead of RETRO_ENVIRONMENT_SET_VARIABLES.
|
||||||
* This should be called the first time as early as
|
* This should be called the first time as early as
|
||||||
* possible (ideally in retro_set_environment).
|
* possible (ideally in retro_set_environment).
|
||||||
|
@ -1169,14 +1169,12 @@ enum retro_mod
|
||||||
* i.e. it should be feasible to cycle through options
|
* i.e. it should be feasible to cycle through options
|
||||||
* without a keyboard.
|
* without a keyboard.
|
||||||
*
|
*
|
||||||
* First entry should be treated as a default.
|
|
||||||
*
|
|
||||||
* Example entry:
|
* Example entry:
|
||||||
* {
|
* {
|
||||||
* "foo_option",
|
* "foo_option",
|
||||||
* "Speed hack coprocessor X",
|
* "Speed hack coprocessor X",
|
||||||
* "Provides increased performance at the expense of reduced accuracy",
|
* "Provides increased performance at the expense of reduced accuracy",
|
||||||
* {
|
* {
|
||||||
* { "false", NULL },
|
* { "false", NULL },
|
||||||
* { "true", NULL },
|
* { "true", NULL },
|
||||||
* { "unstable", "Turbo (Unstable)" },
|
* { "unstable", "Turbo (Unstable)" },
|
||||||
|
@ -1196,8 +1194,8 @@ enum retro_mod
|
||||||
* GET_VARIABLE.
|
* GET_VARIABLE.
|
||||||
* This allows the frontend to present these variables to
|
* This allows the frontend to present these variables to
|
||||||
* a user dynamically.
|
* a user dynamically.
|
||||||
* This should only be called if RETRO_ENVIRONMENT_GET_ENHANCED_CORE_OPTIONS
|
* This should only be called if RETRO_ENVIRONMENT_GET_CORE_OPTIONS_VERSION
|
||||||
* returns an API version of 1.
|
* returns an API version of >= 1.
|
||||||
* This should be called instead of RETRO_ENVIRONMENT_SET_VARIABLES.
|
* This should be called instead of RETRO_ENVIRONMENT_SET_VARIABLES.
|
||||||
* This should be called the first time as early as
|
* This should be called the first time as early as
|
||||||
* possible (ideally in retro_set_environment).
|
* possible (ideally in retro_set_environment).
|
||||||
|
@ -1384,17 +1382,17 @@ typedef int (RETRO_CALLCONV *retro_vfs_closedir_t)(struct retro_vfs_dir_handle *
|
||||||
struct retro_vfs_interface
|
struct retro_vfs_interface
|
||||||
{
|
{
|
||||||
/* VFS API v1 */
|
/* VFS API v1 */
|
||||||
retro_vfs_get_path_t get_path;
|
retro_vfs_get_path_t get_path;
|
||||||
retro_vfs_open_t open;
|
retro_vfs_open_t open;
|
||||||
retro_vfs_close_t close;
|
retro_vfs_close_t close;
|
||||||
retro_vfs_size_t size;
|
retro_vfs_size_t size;
|
||||||
retro_vfs_tell_t tell;
|
retro_vfs_tell_t tell;
|
||||||
retro_vfs_seek_t seek;
|
retro_vfs_seek_t seek;
|
||||||
retro_vfs_read_t read;
|
retro_vfs_read_t read;
|
||||||
retro_vfs_write_t write;
|
retro_vfs_write_t write;
|
||||||
retro_vfs_flush_t flush;
|
retro_vfs_flush_t flush;
|
||||||
retro_vfs_remove_t remove;
|
retro_vfs_remove_t remove;
|
||||||
retro_vfs_rename_t rename;
|
retro_vfs_rename_t rename;
|
||||||
/* VFS API v2 */
|
/* VFS API v2 */
|
||||||
retro_vfs_truncate_t truncate;
|
retro_vfs_truncate_t truncate;
|
||||||
/* VFS API v3 */
|
/* VFS API v3 */
|
||||||
|
@ -1422,11 +1420,11 @@ struct retro_vfs_interface_info
|
||||||
|
|
||||||
enum retro_hw_render_interface_type
|
enum retro_hw_render_interface_type
|
||||||
{
|
{
|
||||||
RETRO_HW_RENDER_INTERFACE_VULKAN = 0,
|
RETRO_HW_RENDER_INTERFACE_VULKAN = 0,
|
||||||
RETRO_HW_RENDER_INTERFACE_D3D9 = 1,
|
RETRO_HW_RENDER_INTERFACE_D3D9 = 1,
|
||||||
RETRO_HW_RENDER_INTERFACE_D3D10 = 2,
|
RETRO_HW_RENDER_INTERFACE_D3D10 = 2,
|
||||||
RETRO_HW_RENDER_INTERFACE_D3D11 = 3,
|
RETRO_HW_RENDER_INTERFACE_D3D11 = 3,
|
||||||
RETRO_HW_RENDER_INTERFACE_D3D12 = 4,
|
RETRO_HW_RENDER_INTERFACE_D3D12 = 4,
|
||||||
RETRO_HW_RENDER_INTERFACE_GSKIT_PS2 = 5,
|
RETRO_HW_RENDER_INTERFACE_GSKIT_PS2 = 5,
|
||||||
RETRO_HW_RENDER_INTERFACE_DUMMY = INT_MAX
|
RETRO_HW_RENDER_INTERFACE_DUMMY = INT_MAX
|
||||||
};
|
};
|
||||||
|
@ -2504,8 +2502,20 @@ struct retro_core_option_display
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Maximum number of values permitted for a core option
|
/* Maximum number of values permitted for a core option
|
||||||
* NOTE: This may be increased on a core-by-core basis
|
* > Note: We have to set a maximum value due the limitations
|
||||||
* if required (doing so has no effect on the frontend) */
|
* of the C language - i.e. it is not possible to create an
|
||||||
|
* array of structs each containing a variable sized array,
|
||||||
|
* so the retro_core_option_definition values array must
|
||||||
|
* have a fixed size. The size limit of 128 is a balancing
|
||||||
|
* act - it needs to be large enough to support all 'sane'
|
||||||
|
* core options, but setting it too large may impact low memory
|
||||||
|
* platforms. In practise, if a core option has more than
|
||||||
|
* 128 values then the implementation is likely flawed.
|
||||||
|
* To quote the above API reference:
|
||||||
|
* "The number of possible options should be very limited
|
||||||
|
* i.e. it should be feasible to cycle through options
|
||||||
|
* without a keyboard."
|
||||||
|
*/
|
||||||
#define RETRO_NUM_CORE_OPTION_VALUES_MAX 128
|
#define RETRO_NUM_CORE_OPTION_VALUES_MAX 128
|
||||||
|
|
||||||
struct retro_core_option_value
|
struct retro_core_option_value
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -7,6 +7,28 @@
|
||||||
#include <libretro.h>
|
#include <libretro.h>
|
||||||
#include <retro_inline.h>
|
#include <retro_inline.h>
|
||||||
|
|
||||||
|
#ifndef HAVE_NO_LANGEXTRA
|
||||||
|
#include "libretro_core_options_intl.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
********************************
|
||||||
|
* VERSION: 1.3
|
||||||
|
********************************
|
||||||
|
*
|
||||||
|
* - 1.3: Move translations to libretro_core_options_intl.h
|
||||||
|
* - libretro_core_options_intl.h includes BOM and utf-8
|
||||||
|
* fix for MSVC 2010-2013
|
||||||
|
* - Added HAVE_NO_LANGEXTRA flag to disable translations
|
||||||
|
* on platforms/compilers without BOM support
|
||||||
|
* - 1.2: Use core options v1 interface when
|
||||||
|
* RETRO_ENVIRONMENT_GET_CORE_OPTIONS_VERSION is >= 1
|
||||||
|
* (previously required RETRO_ENVIRONMENT_GET_CORE_OPTIONS_VERSION == 1)
|
||||||
|
* - 1.1: Support generation of core options v0 retro_core_option_value
|
||||||
|
* arrays containing options with a single value
|
||||||
|
* - 1.0: First commit
|
||||||
|
*/
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
@ -29,7 +51,7 @@ extern "C" {
|
||||||
struct retro_core_option_definition option_defs_us[] = {
|
struct retro_core_option_definition option_defs_us[] = {
|
||||||
{
|
{
|
||||||
"vbam_solarsensor",
|
"vbam_solarsensor",
|
||||||
"Solar sensor level",
|
"Solar Sensor Level",
|
||||||
"Adjusts simulated solar level in Boktai games. L2/R2 buttons can also be used to quickly change levels.",
|
"Adjusts simulated solar level in Boktai games. L2/R2 buttons can also be used to quickly change levels.",
|
||||||
{
|
{
|
||||||
{ "0", NULL },
|
{ "0", NULL },
|
||||||
|
@ -49,7 +71,7 @@ struct retro_core_option_definition option_defs_us[] = {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"vbam_usebios",
|
"vbam_usebios",
|
||||||
"Use BIOS file if available (Restart)",
|
"Use Official BIOS (If Available)",
|
||||||
"Use official BIOS when available. Core needs to be restarted for changes to apply.",
|
"Use official BIOS when available. Core needs to be restarted for changes to apply.",
|
||||||
{
|
{
|
||||||
{ "disabled", NULL },
|
{ "disabled", NULL },
|
||||||
|
@ -58,6 +80,17 @@ struct retro_core_option_definition option_defs_us[] = {
|
||||||
},
|
},
|
||||||
"disabled"
|
"disabled"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"vbam_forceRTCenable",
|
||||||
|
"Force-Enable RTC",
|
||||||
|
"Forces the internal real-time clock to be enabled regardless of rom. Usuable for rom patches that requires clock to be enabled (aka Pokemon).",
|
||||||
|
{
|
||||||
|
{ "disabled", NULL },
|
||||||
|
{ "enabled", NULL },
|
||||||
|
{ NULL, NULL },
|
||||||
|
},
|
||||||
|
"disabled"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"vbam_soundinterpolation",
|
"vbam_soundinterpolation",
|
||||||
"Sound Interpolation",
|
"Sound Interpolation",
|
||||||
|
@ -92,7 +125,7 @@ struct retro_core_option_definition option_defs_us[] = {
|
||||||
{
|
{
|
||||||
"vbam_palettes",
|
"vbam_palettes",
|
||||||
"(GB) Color Palette",
|
"(GB) Color Palette",
|
||||||
"Set Game Boy palettes.",
|
"Set Game Boy palettes to use.",
|
||||||
{
|
{
|
||||||
{ "black and white", NULL },
|
{ "black and white", NULL },
|
||||||
{ "blue sea", NULL },
|
{ "blue sea", NULL },
|
||||||
|
@ -109,7 +142,7 @@ struct retro_core_option_definition option_defs_us[] = {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"vbam_gbHardware",
|
"vbam_gbHardware",
|
||||||
"(GB) Emulated Hardware",
|
"(GB) Emulated Hardware (Needs Restart)",
|
||||||
"Sets the Game Boy hardware type to emulate. Restart core to apply.",
|
"Sets the Game Boy hardware type to emulate. Restart core to apply.",
|
||||||
{
|
{
|
||||||
{ "gbc", "Game Boy Color" },
|
{ "gbc", "Game Boy Color" },
|
||||||
|
@ -282,9 +315,20 @@ struct retro_core_option_definition option_defs_us[] = {
|
||||||
},
|
},
|
||||||
"disabled"
|
"disabled"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"vbam_show_advanced_options",
|
||||||
|
"Show Advanced Options",
|
||||||
|
"Show advanced options which can enable or disable sound channels and graphics layers.",
|
||||||
|
{
|
||||||
|
{ "disabled", NULL },
|
||||||
|
{ "enabled", NULL },
|
||||||
|
{ NULL, NULL },
|
||||||
|
},
|
||||||
|
"disabled"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"vbam_sound_1",
|
"vbam_sound_1",
|
||||||
"Sound channel 1",
|
"Sound Channel 1",
|
||||||
"Enables or disables tone & sweep sound channel.",
|
"Enables or disables tone & sweep sound channel.",
|
||||||
{
|
{
|
||||||
{ "disabled", NULL },
|
{ "disabled", NULL },
|
||||||
|
@ -293,9 +337,9 @@ struct retro_core_option_definition option_defs_us[] = {
|
||||||
},
|
},
|
||||||
"enabled"
|
"enabled"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"vbam_sound_2",
|
"vbam_sound_2",
|
||||||
"Sound channel 2",
|
"Sound Channel 2",
|
||||||
"Enables or disables tone sound channel.",
|
"Enables or disables tone sound channel.",
|
||||||
{
|
{
|
||||||
{ "disabled", NULL },
|
{ "disabled", NULL },
|
||||||
|
@ -306,7 +350,7 @@ struct retro_core_option_definition option_defs_us[] = {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"vbam_sound_3",
|
"vbam_sound_3",
|
||||||
"Sound channel 3",
|
"Sound Channel 3",
|
||||||
"Enables or disables wave output sound channel.",
|
"Enables or disables wave output sound channel.",
|
||||||
{
|
{
|
||||||
{ "disabled", NULL },
|
{ "disabled", NULL },
|
||||||
|
@ -317,7 +361,7 @@ struct retro_core_option_definition option_defs_us[] = {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"vbam_sound_4",
|
"vbam_sound_4",
|
||||||
"Sound channel 4",
|
"Sound Channel 4",
|
||||||
"Enables or disables noise audio channel.",
|
"Enables or disables noise audio channel.",
|
||||||
{
|
{
|
||||||
{ "disabled", NULL },
|
{ "disabled", NULL },
|
||||||
|
@ -328,7 +372,7 @@ struct retro_core_option_definition option_defs_us[] = {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"vbam_sound_5",
|
"vbam_sound_5",
|
||||||
"Sound DMA channel A",
|
"Sound DMA Channel A",
|
||||||
"Enables or disables DMA sound channel A.",
|
"Enables or disables DMA sound channel A.",
|
||||||
{
|
{
|
||||||
{ "disabled", NULL },
|
{ "disabled", NULL },
|
||||||
|
@ -339,7 +383,7 @@ struct retro_core_option_definition option_defs_us[] = {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"vbam_sound_6",
|
"vbam_sound_6",
|
||||||
"Sound DMA channel B",
|
"Sound DMA Channel B",
|
||||||
"Enables or disables DMA sound channel B.",
|
"Enables or disables DMA sound channel B.",
|
||||||
{
|
{
|
||||||
{ "disabled", NULL },
|
{ "disabled", NULL },
|
||||||
|
@ -350,7 +394,7 @@ struct retro_core_option_definition option_defs_us[] = {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"vbam_layer_1",
|
"vbam_layer_1",
|
||||||
"Show background layer 1",
|
"Show Background Layer 1",
|
||||||
"Shows or hides background layer 1.",
|
"Shows or hides background layer 1.",
|
||||||
{
|
{
|
||||||
{ "disabled", NULL },
|
{ "disabled", NULL },
|
||||||
|
@ -361,7 +405,7 @@ struct retro_core_option_definition option_defs_us[] = {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"vbam_layer_2",
|
"vbam_layer_2",
|
||||||
"Show background layer 2",
|
"Show Background Layer 2",
|
||||||
"Shows or hides background layer 2.",
|
"Shows or hides background layer 2.",
|
||||||
{
|
{
|
||||||
{ "disabled", NULL },
|
{ "disabled", NULL },
|
||||||
|
@ -372,7 +416,7 @@ struct retro_core_option_definition option_defs_us[] = {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"vbam_layer_3",
|
"vbam_layer_3",
|
||||||
"Show background layer 3",
|
"Show Background Layer 3",
|
||||||
"Shows or hides background layer 3.",
|
"Shows or hides background layer 3.",
|
||||||
{
|
{
|
||||||
{ "disabled", NULL },
|
{ "disabled", NULL },
|
||||||
|
@ -383,7 +427,7 @@ struct retro_core_option_definition option_defs_us[] = {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"vbam_layer_4",
|
"vbam_layer_4",
|
||||||
"Show background layer 4",
|
"Show Background Layer 4",
|
||||||
"Shows or hides background layer 4.",
|
"Shows or hides background layer 4.",
|
||||||
{
|
{
|
||||||
{ "disabled", NULL },
|
{ "disabled", NULL },
|
||||||
|
@ -394,7 +438,7 @@ struct retro_core_option_definition option_defs_us[] = {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"vbam_layer_5",
|
"vbam_layer_5",
|
||||||
"Show sprite layer",
|
"Show Sprite Layer",
|
||||||
"Shows or hides sprite layer.",
|
"Shows or hides sprite layer.",
|
||||||
{
|
{
|
||||||
{ "disabled", NULL },
|
{ "disabled", NULL },
|
||||||
|
@ -405,7 +449,7 @@ struct retro_core_option_definition option_defs_us[] = {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"vbam_layer_6",
|
"vbam_layer_6",
|
||||||
"Show window layer 1",
|
"Show Window Layer 1",
|
||||||
"Shows or hides window layer 1.",
|
"Shows or hides window layer 1.",
|
||||||
{
|
{
|
||||||
{ "disabled", NULL },
|
{ "disabled", NULL },
|
||||||
|
@ -416,7 +460,7 @@ struct retro_core_option_definition option_defs_us[] = {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"vbam_layer_7",
|
"vbam_layer_7",
|
||||||
"Show window layer 2",
|
"Show Window Layer 2",
|
||||||
"Shows or hides window layer 2.",
|
"Shows or hides window layer 2.",
|
||||||
{
|
{
|
||||||
{ "disabled", NULL },
|
{ "disabled", NULL },
|
||||||
|
@ -427,7 +471,7 @@ struct retro_core_option_definition option_defs_us[] = {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"vbam_layer_8",
|
"vbam_layer_8",
|
||||||
"Show sprite window layer",
|
"Show Sprite Window Layer",
|
||||||
"Shows or hides sprite window layer.",
|
"Shows or hides sprite window layer.",
|
||||||
{
|
{
|
||||||
{ "disabled", NULL },
|
{ "disabled", NULL },
|
||||||
|
@ -440,48 +484,13 @@ struct retro_core_option_definition option_defs_us[] = {
|
||||||
{ NULL, NULL, NULL, {{0}}, NULL }
|
{ NULL, NULL, NULL, {{0}}, NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
/* RETRO_LANGUAGE_JAPANESE */
|
|
||||||
|
|
||||||
/* RETRO_LANGUAGE_FRENCH */
|
|
||||||
|
|
||||||
/* RETRO_LANGUAGE_SPANISH */
|
|
||||||
|
|
||||||
/* RETRO_LANGUAGE_GERMAN */
|
|
||||||
|
|
||||||
/* RETRO_LANGUAGE_ITALIAN */
|
|
||||||
|
|
||||||
/* RETRO_LANGUAGE_DUTCH */
|
|
||||||
|
|
||||||
/* RETRO_LANGUAGE_PORTUGUESE_BRAZIL */
|
|
||||||
|
|
||||||
/* RETRO_LANGUAGE_PORTUGUESE_PORTUGAL */
|
|
||||||
|
|
||||||
/* RETRO_LANGUAGE_RUSSIAN */
|
|
||||||
|
|
||||||
/* RETRO_LANGUAGE_KOREAN */
|
|
||||||
|
|
||||||
/* RETRO_LANGUAGE_CHINESE_TRADITIONAL */
|
|
||||||
|
|
||||||
/* RETRO_LANGUAGE_CHINESE_SIMPLIFIED */
|
|
||||||
|
|
||||||
/* RETRO_LANGUAGE_ESPERANTO */
|
|
||||||
|
|
||||||
/* RETRO_LANGUAGE_POLISH */
|
|
||||||
|
|
||||||
/* RETRO_LANGUAGE_VIETNAMESE */
|
|
||||||
|
|
||||||
/* RETRO_LANGUAGE_ARABIC */
|
|
||||||
|
|
||||||
/* RETRO_LANGUAGE_GREEK */
|
|
||||||
|
|
||||||
/* RETRO_LANGUAGE_TURKISH */
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
********************************
|
********************************
|
||||||
* Language Mapping
|
* Language Mapping
|
||||||
********************************
|
********************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifndef HAVE_NO_LANGEXTRA
|
||||||
struct retro_core_option_definition *option_defs_intl[RETRO_LANGUAGE_LAST] = {
|
struct retro_core_option_definition *option_defs_intl[RETRO_LANGUAGE_LAST] = {
|
||||||
option_defs_us, /* RETRO_LANGUAGE_ENGLISH */
|
option_defs_us, /* RETRO_LANGUAGE_ENGLISH */
|
||||||
NULL, /* RETRO_LANGUAGE_JAPANESE */
|
NULL, /* RETRO_LANGUAGE_JAPANESE */
|
||||||
|
@ -501,8 +510,9 @@ struct retro_core_option_definition *option_defs_intl[RETRO_LANGUAGE_LAST] = {
|
||||||
NULL, /* RETRO_LANGUAGE_VIETNAMESE */
|
NULL, /* RETRO_LANGUAGE_VIETNAMESE */
|
||||||
NULL, /* RETRO_LANGUAGE_ARABIC */
|
NULL, /* RETRO_LANGUAGE_ARABIC */
|
||||||
NULL, /* RETRO_LANGUAGE_GREEK */
|
NULL, /* RETRO_LANGUAGE_GREEK */
|
||||||
NULL, /* RETRO_LANGUAGE_TURKISH */
|
option_defs_tr, /* RETRO_LANGUAGE_TURKISH */
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
********************************
|
********************************
|
||||||
|
@ -511,7 +521,8 @@ struct retro_core_option_definition *option_defs_intl[RETRO_LANGUAGE_LAST] = {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Handles configuration/setting of core options.
|
/* Handles configuration/setting of core options.
|
||||||
* Should only be called inside retro_set_environment().
|
* Should be called as early as possible - ideally inside
|
||||||
|
* retro_set_environment(), and no later than retro_load_game()
|
||||||
* > We place the function body in the header to avoid the
|
* > We place the function body in the header to avoid the
|
||||||
* necessity of adding more .c files (i.e. want this to
|
* necessity of adding more .c files (i.e. want this to
|
||||||
* be as painless as possible for core devs)
|
* be as painless as possible for core devs)
|
||||||
|
@ -524,8 +535,9 @@ static INLINE void libretro_set_core_options(retro_environment_t environ_cb)
|
||||||
if (!environ_cb)
|
if (!environ_cb)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (environ_cb(RETRO_ENVIRONMENT_GET_CORE_OPTIONS_VERSION, &version) && (version == 1))
|
if (environ_cb(RETRO_ENVIRONMENT_GET_CORE_OPTIONS_VERSION, &version) && (version >= 1))
|
||||||
{
|
{
|
||||||
|
#ifndef HAVE_NO_LANGEXTRA
|
||||||
struct retro_core_options_intl core_options_intl;
|
struct retro_core_options_intl core_options_intl;
|
||||||
unsigned language = 0;
|
unsigned language = 0;
|
||||||
|
|
||||||
|
@ -537,6 +549,9 @@ static INLINE void libretro_set_core_options(retro_environment_t environ_cb)
|
||||||
core_options_intl.local = option_defs_intl[language];
|
core_options_intl.local = option_defs_intl[language];
|
||||||
|
|
||||||
environ_cb(RETRO_ENVIRONMENT_SET_CORE_OPTIONS_INTL, &core_options_intl);
|
environ_cb(RETRO_ENVIRONMENT_SET_CORE_OPTIONS_INTL, &core_options_intl);
|
||||||
|
#else
|
||||||
|
environ_cb(RETRO_ENVIRONMENT_SET_CORE_OPTIONS, &option_defs_us);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -595,7 +610,7 @@ static INLINE void libretro_set_core_options(retro_environment_t environ_cb)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Build values string */
|
/* Build values string */
|
||||||
if (num_values > 1)
|
if (num_values > 0)
|
||||||
{
|
{
|
||||||
size_t j;
|
size_t j;
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,516 @@
|
||||||
|
#ifndef LIBRETRO_CORE_OPTIONS_INTL_H__
|
||||||
|
#define LIBRETRO_CORE_OPTIONS_INTL_H__
|
||||||
|
|
||||||
|
#if defined(_MSC_VER) && (_MSC_VER >= 1500 && _MSC_VER < 1900)
|
||||||
|
/* https://support.microsoft.com/en-us/kb/980263 */
|
||||||
|
#pragma execution_character_set("utf-8")
|
||||||
|
#pragma warning(disable:4566)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <libretro.h>
|
||||||
|
|
||||||
|
/*
|
||||||
|
********************************
|
||||||
|
* VERSION: 1.3
|
||||||
|
********************************
|
||||||
|
*
|
||||||
|
* - 1.3: Move translations to libretro_core_options_intl.h
|
||||||
|
* - libretro_core_options_intl.h includes BOM and utf-8
|
||||||
|
* fix for MSVC 2010-2013
|
||||||
|
* - Added HAVE_NO_LANGEXTRA flag to disable translations
|
||||||
|
* on platforms/compilers without BOM support
|
||||||
|
* - 1.2: Use core options v1 interface when
|
||||||
|
* RETRO_ENVIRONMENT_GET_CORE_OPTIONS_VERSION is >= 1
|
||||||
|
* (previously required RETRO_ENVIRONMENT_GET_CORE_OPTIONS_VERSION == 1)
|
||||||
|
* - 1.1: Support generation of core options v0 retro_core_option_value
|
||||||
|
* arrays containing options with a single value
|
||||||
|
* - 1.0: First commit
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
********************************
|
||||||
|
* Core Option Definitions
|
||||||
|
********************************
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* RETRO_LANGUAGE_JAPANESE */
|
||||||
|
|
||||||
|
/* RETRO_LANGUAGE_FRENCH */
|
||||||
|
|
||||||
|
/* RETRO_LANGUAGE_SPANISH */
|
||||||
|
|
||||||
|
/* RETRO_LANGUAGE_GERMAN */
|
||||||
|
|
||||||
|
/* RETRO_LANGUAGE_ITALIAN */
|
||||||
|
|
||||||
|
/* RETRO_LANGUAGE_DUTCH */
|
||||||
|
|
||||||
|
/* RETRO_LANGUAGE_PORTUGUESE_BRAZIL */
|
||||||
|
|
||||||
|
/* RETRO_LANGUAGE_PORTUGUESE_PORTUGAL */
|
||||||
|
|
||||||
|
/* RETRO_LANGUAGE_RUSSIAN */
|
||||||
|
|
||||||
|
/* RETRO_LANGUAGE_KOREAN */
|
||||||
|
|
||||||
|
/* RETRO_LANGUAGE_CHINESE_TRADITIONAL */
|
||||||
|
|
||||||
|
/* RETRO_LANGUAGE_CHINESE_SIMPLIFIED */
|
||||||
|
|
||||||
|
/* RETRO_LANGUAGE_ESPERANTO */
|
||||||
|
|
||||||
|
/* RETRO_LANGUAGE_POLISH */
|
||||||
|
|
||||||
|
/* RETRO_LANGUAGE_VIETNAMESE */
|
||||||
|
|
||||||
|
/* RETRO_LANGUAGE_ARABIC */
|
||||||
|
|
||||||
|
/* RETRO_LANGUAGE_GREEK */
|
||||||
|
|
||||||
|
/* RETRO_LANGUAGE_TURKISH */
|
||||||
|
|
||||||
|
struct retro_core_option_definition option_defs_tr[] = {
|
||||||
|
{
|
||||||
|
"vbam_solarsensor",
|
||||||
|
"Solar Sensör Seviyesi",
|
||||||
|
"Boktai oyunlarında simüle güneş seviyesini ayarlar. L2 / R2 düğmeleri ayrıca seviyeleri hızlıca değiştirmek için de kullanılabilir.",
|
||||||
|
{
|
||||||
|
{ "0", NULL },
|
||||||
|
{ "1", NULL },
|
||||||
|
{ "2", NULL },
|
||||||
|
{ "3", NULL },
|
||||||
|
{ "4", NULL },
|
||||||
|
{ "5", NULL },
|
||||||
|
{ "6", NULL },
|
||||||
|
{ "7", NULL },
|
||||||
|
{ "8", NULL },
|
||||||
|
{ "9", NULL },
|
||||||
|
{ "10", NULL },
|
||||||
|
{ NULL, NULL },
|
||||||
|
},
|
||||||
|
"0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"vbam_usebios",
|
||||||
|
"Resmi BIOS'u kullanın (Varsa)",
|
||||||
|
"Mümkün olduğunda resmi BIOS kullanın. Değişikliklerin uygulanabilmesi için çekirdeğin yeniden başlatılması gerekiyor.",
|
||||||
|
{
|
||||||
|
{ "disabled", NULL },
|
||||||
|
{ "enabled", NULL },
|
||||||
|
{ NULL, NULL },
|
||||||
|
},
|
||||||
|
"disabled"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"vbam_forceRTCenable",
|
||||||
|
"RTC'yi Etkinleştir",
|
||||||
|
"RAM'den bağımsız olarak dahili gerçek zamanlı saati etkinleştirmeye zorlar. Saatin etkinleştirilmesini gerektiren rom yamalar için kullanılabilir (Pokemon gibi).",
|
||||||
|
{
|
||||||
|
{ "disabled", NULL },
|
||||||
|
{ "enabled", NULL },
|
||||||
|
{ NULL, NULL },
|
||||||
|
},
|
||||||
|
"disabled"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"vbam_soundinterpolation",
|
||||||
|
"Ses Enterpolasyonu",
|
||||||
|
"Ses filtresini etkinleştirin veya devre dışı bırakın.",
|
||||||
|
{
|
||||||
|
{ "disabled", NULL },
|
||||||
|
{ "enabled", NULL },
|
||||||
|
{ NULL, NULL },
|
||||||
|
},
|
||||||
|
"enabled"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"vbam_soundfiltering",
|
||||||
|
"Ses Filtreleme",
|
||||||
|
"Kullanılacak filtreleme miktarını ayarlar. Yüksek değer, yüksek frekansları azaltır.",
|
||||||
|
{
|
||||||
|
{ "0", NULL },
|
||||||
|
{ "1", NULL },
|
||||||
|
{ "2", NULL },
|
||||||
|
{ "3", NULL },
|
||||||
|
{ "4", NULL },
|
||||||
|
{ "5", NULL },
|
||||||
|
{ "6", NULL },
|
||||||
|
{ "7", NULL },
|
||||||
|
{ "8", NULL },
|
||||||
|
{ "9", NULL },
|
||||||
|
{ "10", NULL },
|
||||||
|
{ NULL, NULL },
|
||||||
|
},
|
||||||
|
"5"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"vbam_palettes",
|
||||||
|
"(GB) Renk Paleti",
|
||||||
|
"Game Boy paletlerini kullanmak için ayarlayın.",
|
||||||
|
{
|
||||||
|
{ "black and white", NULL },
|
||||||
|
{ "blue sea", NULL },
|
||||||
|
{ "dark knight", NULL },
|
||||||
|
{ "green forest", NULL },
|
||||||
|
{ "hot desert", NULL },
|
||||||
|
{ "pink dreams", NULL },
|
||||||
|
{ "wierd colors", NULL },
|
||||||
|
{ "original gameboy", NULL },
|
||||||
|
{ "gba sp", NULL },
|
||||||
|
{ NULL, NULL },
|
||||||
|
},
|
||||||
|
"standard"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"vbam_gbHardware",
|
||||||
|
"(GB) Öykünülmüş Donanım (Yeniden Başlatılması Gerekiyor)",
|
||||||
|
"Game Boy donanım tipini taklit edecek şekilde ayarlar. Uygulamak için çekirdeği yeniden başlatın.",
|
||||||
|
{
|
||||||
|
{ "gbc", "Game Boy Color" },
|
||||||
|
{ "auto", "Automatic" },
|
||||||
|
{ "sgb", "Super Game Boy" },
|
||||||
|
{ "gb", "Game Boy" },
|
||||||
|
{ "gba", "Game Boy Advance" },
|
||||||
|
{ "sgb2", "Super Game Boy 2" },
|
||||||
|
{ NULL, NULL },
|
||||||
|
},
|
||||||
|
"gbc"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"vbam_allowcolorizerhack",
|
||||||
|
"(GB) Colorizer Hack'i Etkinleştir (Yeniden Başlatılması Gerekiyor)",
|
||||||
|
"Colorizer'ın saldırıya uğramış GB oyunlarının (örn. DX yamalı oyunlar) normalde GBC / GBA donanım türünde çalışmasına izin verir. Bu ayrıca bios dosyasının kullanımını da devre dışı bırakır. Renklendirilmemiş oyunlarda kullanılması tavsiye edilmez.",
|
||||||
|
{
|
||||||
|
{ "disabled", NULL },
|
||||||
|
{ "enabled", NULL },
|
||||||
|
{ NULL, NULL },
|
||||||
|
},
|
||||||
|
"disabled"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"vbam_showborders",
|
||||||
|
"(GB) Sınırları Göster",
|
||||||
|
"Etkinleştirildiğinde, yüklü içerik SGB uyumluysa, bu durum oyundaki sınırı gösterir.",
|
||||||
|
{
|
||||||
|
{ "disabled", NULL },
|
||||||
|
{ "enabled", NULL },
|
||||||
|
{ "auto", NULL },
|
||||||
|
{ NULL, NULL },
|
||||||
|
},
|
||||||
|
"disabled"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"vbam_gbcoloroption",
|
||||||
|
"(GB) Renk Düzeltme",
|
||||||
|
"Bazı oyunlarda renkleri düzelten renk düzeltmesini uygular.",
|
||||||
|
{
|
||||||
|
{ "disabled", NULL },
|
||||||
|
{ "enabled", NULL },
|
||||||
|
{ NULL, NULL },
|
||||||
|
},
|
||||||
|
"disabled"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"vbam_turboenable",
|
||||||
|
"Turbo Düğmelerini Etkinleştir",
|
||||||
|
"Gamepad turbo düğmelerini etkinleştirin veya devre dışı bırakın.",
|
||||||
|
{
|
||||||
|
{ "disabled", NULL },
|
||||||
|
{ "enabled", NULL },
|
||||||
|
{ NULL, NULL },
|
||||||
|
},
|
||||||
|
"enabled"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"vbam_turbodelay",
|
||||||
|
"Turbo Gecikme (kare cinsinden)",
|
||||||
|
"Karelerde turbo tetikleyicilerin oranını tekrarlayın. Daha yüksek değer daha fazla tetikler.",
|
||||||
|
{
|
||||||
|
{ "1", NULL },
|
||||||
|
{ "2", NULL },
|
||||||
|
{ "3", NULL },
|
||||||
|
{ "4", NULL },
|
||||||
|
{ "5", NULL },
|
||||||
|
{ "6", NULL },
|
||||||
|
{ "7", NULL },
|
||||||
|
{ "8", NULL },
|
||||||
|
{ "9", NULL },
|
||||||
|
{ "10", NULL },
|
||||||
|
{ "11", NULL },
|
||||||
|
{ "12", NULL },
|
||||||
|
{ "13", NULL },
|
||||||
|
{ "14", NULL },
|
||||||
|
{ "15", NULL },
|
||||||
|
{ NULL, NULL },
|
||||||
|
},
|
||||||
|
"3"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"vbam_astick_deadzone",
|
||||||
|
"Sensörlerin Ölü Bölgesi (%)",
|
||||||
|
"Analog çubukların ölü bölgesini (yüzde olarak) ayarlayın.",
|
||||||
|
{
|
||||||
|
{ "0", NULL },
|
||||||
|
{ "5", NULL },
|
||||||
|
{ "10", NULL },
|
||||||
|
{ "15", NULL },
|
||||||
|
{ "20", NULL },
|
||||||
|
{ "25", NULL },
|
||||||
|
{ "30", NULL },
|
||||||
|
{ NULL, NULL },
|
||||||
|
},
|
||||||
|
"15"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"vbam_gyro_sensitivity",
|
||||||
|
"Sensör Hassasiyeti (Jiroskop) (%)",
|
||||||
|
"Varsayılan konumlandırma, sol analogdur. Gyro özellikli oyunlar için hassasiyet seviyesini ayarlamak için kullanılır.",
|
||||||
|
{
|
||||||
|
{ "10", NULL },
|
||||||
|
{ "15", NULL },
|
||||||
|
{ "20", NULL },
|
||||||
|
{ "25", NULL },
|
||||||
|
{ "30", NULL },
|
||||||
|
{ "35", NULL },
|
||||||
|
{ "40", NULL },
|
||||||
|
{ "45", NULL },
|
||||||
|
{ "50", NULL },
|
||||||
|
{ "55", NULL },
|
||||||
|
{ "60", NULL },
|
||||||
|
{ "65", NULL },
|
||||||
|
{ "70", NULL },
|
||||||
|
{ "75", NULL },
|
||||||
|
{ "80", NULL },
|
||||||
|
{ "85", NULL },
|
||||||
|
{ "90", NULL },
|
||||||
|
{ "95", NULL },
|
||||||
|
{ "100", NULL },
|
||||||
|
{ "105", NULL },
|
||||||
|
{ "110", NULL },
|
||||||
|
{ "115", NULL },
|
||||||
|
{ "120", NULL },
|
||||||
|
{ NULL, NULL },
|
||||||
|
},
|
||||||
|
"100"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"vbam_tilt_sensitivity",
|
||||||
|
"Sensör Hassasiyeti (Eğim) (%)",
|
||||||
|
"Varsayılan konumlandırma sağ analogdur. Gyro özellikli oyunlar için hassasiyet seviyesini ayarlamak için kullanılır.",
|
||||||
|
{
|
||||||
|
{ "10", NULL },
|
||||||
|
{ "15", NULL },
|
||||||
|
{ "20", NULL },
|
||||||
|
{ "25", NULL },
|
||||||
|
{ "30", NULL },
|
||||||
|
{ "35", NULL },
|
||||||
|
{ "40", NULL },
|
||||||
|
{ "45", NULL },
|
||||||
|
{ "50", NULL },
|
||||||
|
{ "55", NULL },
|
||||||
|
{ "60", NULL },
|
||||||
|
{ "65", NULL },
|
||||||
|
{ "70", NULL },
|
||||||
|
{ "75", NULL },
|
||||||
|
{ "80", NULL },
|
||||||
|
{ "85", NULL },
|
||||||
|
{ "90", NULL },
|
||||||
|
{ "95", NULL },
|
||||||
|
{ "100", NULL },
|
||||||
|
{ "105", NULL },
|
||||||
|
{ "110", NULL },
|
||||||
|
{ "115", NULL },
|
||||||
|
{ "120", NULL },
|
||||||
|
{ NULL, NULL },
|
||||||
|
},
|
||||||
|
"100"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"vbam_swap_astick",
|
||||||
|
"Sol / Sağ Analog Değiştirme",
|
||||||
|
"Döndürme ve eğme için sola ve sağa analog çubuk işlevini değiştirir.",
|
||||||
|
{
|
||||||
|
{ "disabled", NULL },
|
||||||
|
{ "enabled", NULL },
|
||||||
|
{ NULL, NULL },
|
||||||
|
},
|
||||||
|
"disabled"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"vbam_show_advanced_options",
|
||||||
|
"Gelişmiş Ayarları Göster",
|
||||||
|
"Ses kanallarını ve grafik katmanlarını etkinleştirebilen veya devre dışı bırakabilen gelişmiş seçenekleri gösterin.",
|
||||||
|
{
|
||||||
|
{ "disabled", NULL },
|
||||||
|
{ "enabled", NULL },
|
||||||
|
{ NULL, NULL },
|
||||||
|
},
|
||||||
|
"disabled"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"vbam_sound_1",
|
||||||
|
"Ses Kanalı 1",
|
||||||
|
"Tonlu ve tarama ses kanalını etkinleştirir veya devre dışı bırakır.",
|
||||||
|
{
|
||||||
|
{ "disabled", NULL },
|
||||||
|
{ "enabled", NULL },
|
||||||
|
{ NULL, NULL },
|
||||||
|
},
|
||||||
|
"enabled"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"vbam_sound_2",
|
||||||
|
"Ses Kanalı 2",
|
||||||
|
"Tonlu ses kanalını etkinleştirir veya devre dışı bırakır.",
|
||||||
|
{
|
||||||
|
{ "disabled", NULL },
|
||||||
|
{ "enabled", NULL },
|
||||||
|
{ NULL, NULL },
|
||||||
|
},
|
||||||
|
"enabled"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"vbam_sound_3",
|
||||||
|
"Ses Kanalı 3",
|
||||||
|
"Dalga çıkışı ses kanalını etkinleştirir veya devre dışı bırakır.",
|
||||||
|
{
|
||||||
|
{ "disabled", NULL },
|
||||||
|
{ "enabled", NULL },
|
||||||
|
{ NULL, NULL },
|
||||||
|
},
|
||||||
|
"enabled"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"vbam_sound_4",
|
||||||
|
"Ses Kanalı 4",
|
||||||
|
"Gürültü ses kanalını etkinleştirir veya devre dışı bırakır.",
|
||||||
|
{
|
||||||
|
{ "disabled", NULL },
|
||||||
|
{ "enabled", NULL },
|
||||||
|
{ NULL, NULL },
|
||||||
|
},
|
||||||
|
"enabled"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"vbam_sound_5",
|
||||||
|
"DMA Ses Kanalı A",
|
||||||
|
"DMA ses kanalı A'yı etkinleştirir veya devre dışı bırakır.",
|
||||||
|
{
|
||||||
|
{ "disabled", NULL },
|
||||||
|
{ "enabled", NULL },
|
||||||
|
{ NULL, NULL },
|
||||||
|
},
|
||||||
|
"enabled"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"vbam_sound_6",
|
||||||
|
"DMA Ses Kanalı B",
|
||||||
|
"DMA ses kanalı B'yi etkinleştirir veya devre dışı bırakır.",
|
||||||
|
{
|
||||||
|
{ "disabled", NULL },
|
||||||
|
{ "enabled", NULL },
|
||||||
|
{ NULL, NULL },
|
||||||
|
},
|
||||||
|
"enabled"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"vbam_layer_1",
|
||||||
|
"Arka Plan Katmanını Göster 1",
|
||||||
|
"1. arka plan katmanını gösterir veya gizler.",
|
||||||
|
{
|
||||||
|
{ "disabled", NULL },
|
||||||
|
{ "enabled", NULL },
|
||||||
|
{ NULL, NULL },
|
||||||
|
},
|
||||||
|
"enabled"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"vbam_layer_2",
|
||||||
|
"Arka Plan Katmanını Göster 2",
|
||||||
|
"2. arka plan katmanını gösterir veya gizler.",
|
||||||
|
{
|
||||||
|
{ "disabled", NULL },
|
||||||
|
{ "enabled", NULL },
|
||||||
|
{ NULL, NULL },
|
||||||
|
},
|
||||||
|
"enabled"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"vbam_layer_3",
|
||||||
|
"Arka Plan Katmanını Göster 3",
|
||||||
|
"3. arka plan katmanını gösterir veya gizler.",
|
||||||
|
{
|
||||||
|
{ "disabled", NULL },
|
||||||
|
{ "enabled", NULL },
|
||||||
|
{ NULL, NULL },
|
||||||
|
},
|
||||||
|
"enabled"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"vbam_layer_4",
|
||||||
|
"Arka Plan Katmanını Göster 4",
|
||||||
|
"4. arka plan katmanını gösterir veya gizler.",
|
||||||
|
{
|
||||||
|
{ "disabled", NULL },
|
||||||
|
{ "enabled", NULL },
|
||||||
|
{ NULL, NULL },
|
||||||
|
},
|
||||||
|
"enabled"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"vbam_layer_5",
|
||||||
|
"Sprite Katmanını Göster",
|
||||||
|
"Sprite katmanını gösterir veya gizler.",
|
||||||
|
{
|
||||||
|
{ "disabled", NULL },
|
||||||
|
{ "enabled", NULL },
|
||||||
|
{ NULL, NULL },
|
||||||
|
},
|
||||||
|
"enabled"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"vbam_layer_6",
|
||||||
|
"Pencere Katmanını Göster 1",
|
||||||
|
"Pencere katmanı 1'i gösterir veya gizler.",
|
||||||
|
{
|
||||||
|
{ "disabled", NULL },
|
||||||
|
{ "enabled", NULL },
|
||||||
|
{ NULL, NULL },
|
||||||
|
},
|
||||||
|
"enabled"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"vbam_layer_7",
|
||||||
|
"Pencere Katmanını Göster 2",
|
||||||
|
"Pencere katmanı 2'yi gösterir veya gizler.",
|
||||||
|
{
|
||||||
|
{ "disabled", NULL },
|
||||||
|
{ "enabled", NULL },
|
||||||
|
{ NULL, NULL },
|
||||||
|
},
|
||||||
|
"enabled"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"vbam_layer_8",
|
||||||
|
"Sprite Pencere Katmanını Göster",
|
||||||
|
"Sprite pencere katmanını gösterir veya gizler.",
|
||||||
|
{
|
||||||
|
{ "disabled", NULL },
|
||||||
|
{ "enabled", NULL },
|
||||||
|
{ NULL, NULL },
|
||||||
|
},
|
||||||
|
"enabled"
|
||||||
|
},
|
||||||
|
|
||||||
|
{ NULL, NULL, NULL, {{0}}, NULL }
|
||||||
|
};
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
|
@ -1,10 +1,6 @@
|
||||||
#ifndef _S_CRC32_H
|
#ifndef _S_CRC32_H
|
||||||
#define _S_CRC32_H
|
#define _S_CRC32_H
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static const unsigned long crc_table[256] = {
|
static const unsigned long crc_table[256] = {
|
||||||
0x00000000L, 0x77073096L, 0xee0e612cL, 0x990951baL, 0x076dc419L,
|
0x00000000L, 0x77073096L, 0xee0e612cL, 0x990951baL, 0x076dc419L,
|
||||||
0x706af48fL, 0xe963a535L, 0x9e6495a3L, 0x0edb8832L, 0x79dcb8a4L,
|
0x706af48fL, 0xe963a535L, 0x9e6495a3L, 0x0edb8832L, 0x79dcb8a4L,
|
||||||
|
@ -87,8 +83,4 @@ unsigned long crc32(unsigned long crc, const unsigned char* buf, unsigned int le
|
||||||
return crc ^ 0xffffffffL;
|
return crc ^ 0xffffffffL;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
Loading…
Reference in New Issue