Skip to content

Commit

Permalink
Merge pull request #10 from hyln9/master
Browse files Browse the repository at this point in the history
PFBA: add option to change neo-geo bios
  • Loading branch information
Cpasjuste authored Jun 6, 2017
2 parents 2f57e3f + 021f383 commit b8a0816
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 1 deletion.
6 changes: 6 additions & 0 deletions pfba/drv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,13 @@
#include "run.h"

extern Gui *gui;
extern UINT8 NeoSystem;
int bDrvOkay = 0; // 1 if the Driver has been initted okay, and it's okay to use the BurnDrv functions

static int ProgressCreate();

static UINT8 NeoSystemList[] = {0x0f, 0x0c, 0x0b, 0x0d, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0e};

static int DoLibInit() // Do Init of Burn library driver
{
int nRet;
Expand All @@ -20,6 +23,9 @@ static int DoLibInit() // Do Init of Burn library driver
return 1;
}

NeoSystem &= ~(UINT8)0x1f;
NeoSystem |= NeoSystemList[gui->GetConfig()->GetRomValue(Option::Index::ROM_NEOBIOS)];

nRet = BurnDrvInit();
printf("DoLibInit: BurnDrvInit = %i\n", nRet);

Expand Down
5 changes: 5 additions & 0 deletions pfba/gui/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,11 @@ Config::Config(const std::string &cfgPath, Renderer *renderer) {
options_gui.push_back(Option("SHOW_FPS", {"NO", "YES"}, 0, Option::Index::ROM_SHOW_FPS));
options_gui.push_back(Option("FRAMESKIP", {"OFF", "ON"}, 0, Option::Index::ROM_FRAMESKIP));
//options_gui.push_back(Option("M68K", {"ASM", "C"}, 0, Option::Index::ROM_M68K));
options_gui.push_back(Option("NEOBIOS", {"UNIBIOS_3_2", "AES_ASIA", "AES_JPN", "DEVKIT", "MVS_ASIA_EUR_V6S1",
"MVS_ASIA_EUR_V5S1", "MVS_ASIA_EUR_V3S4", "MVS_USA_V5S2",
"MVS_USA_V5S4", "MVS_USA_V5S6", "MVS_JPN_V6", "MVS_JPN_V5",
"MVS_JPN_V3S4", "NEO_MVH_MV1C", "MVS_JPN_J3", "DECK_V6"},
0, Option::Index::ROM_NEOBIOS));
options_gui.push_back(Option("AUDIO", {"OFF", "ON"}, 1, Option::Index::ROM_AUDIO));

// joystick
Expand Down
1 change: 1 addition & 0 deletions pfba/gui/option.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ class Option {
ROM_SHOW_FPS,
//ROM_M68K,
ROM_FRAMESKIP,
ROM_NEOBIOS,
ROM_AUDIO,
MENU_JOYPAD,
JOY_UP,
Expand Down
8 changes: 7 additions & 1 deletion pfba/run.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,13 @@ int RunOneFrame(bool bDraw, int bDrawFps, int fps) {
static int GetSekCpuCore(Gui *g) {

int sekCpuCore = 0; // SEK_CORE_C68K: USE CYCLONE ARM ASM M68K CORE
//int sekCpuCore = g->GetConfig()->GetRomValue(Option::Index::ROM_M68K);
// int sekCpuCore = g->GetConfig()->GetRomValue(Option::Index::ROM_M68K);

if (!g->GetConfig()->GetRomValue(Option::Index::ROM_NEOBIOS)) {
sekCpuCore = 1;
g->MessageBox("UNIBIOS DOESNT SUPPORT THE M68K ASM CORE\n"
"CYCLONE ASM CORE DISABLED", "OK", NULL);
}

std::vector<std::string> zipList;
int hardware = BurnDrvGetHardwareCode();
Expand Down

0 comments on commit b8a0816

Please sign in to comment.