Vs. System - unused DIP switches replaced with second coin and service buttons
This commit is contained in:
parent
598a291daf
commit
ac18eb3c37
|
@ -254,6 +254,8 @@ void FCEUI_VSUniToggleDIP(int w);
|
|||
uint8 FCEUI_VSUniGetDIPs(void);
|
||||
void FCEUI_VSUniSetDIP(int w, int state);
|
||||
void FCEUI_VSUniCoin(void);
|
||||
void FCEUI_VSUniCoin2(void);
|
||||
void FCEUI_VSUniService(void);
|
||||
|
||||
void FCEUI_FDSInsert(void); //mbg merge 7/17/06 changed to void fn(void) to make it an EMUCMDFN
|
||||
//int FCEUI_FDSEject(void);
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -924,6 +924,10 @@
|
|||
#define ID_HEXEDITOR_DEFCOLOR 40009
|
||||
#define ID_CDLOGGER_DEFCOLOR 40010
|
||||
#define ID_DEBUGGER_DEFCOLOR 40011
|
||||
#define ID_Menu 40012
|
||||
#define MENU_INSERT_COIN2 40013
|
||||
#define MENU_SERVICE 40014
|
||||
#define MENU_SERVICE_BUTTON 40015
|
||||
#define MENU_NETWORK 40040
|
||||
#define MENU_PALETTE 40041
|
||||
#define MENU_SOUND 40042
|
||||
|
@ -1226,7 +1230,7 @@
|
|||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 313
|
||||
#define _APS_NEXT_COMMAND_VALUE 40012
|
||||
#define _APS_NEXT_COMMAND_VALUE 40016
|
||||
#define _APS_NEXT_CONTROL_VALUE 1050
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
|
|
|
@ -1966,6 +1966,12 @@ LRESULT FAR PASCAL AppWndProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam)
|
|||
case MENU_INSERT_COIN:
|
||||
FCEUI_VSUniCoin();
|
||||
break;
|
||||
case MENU_INSERT_COIN2:
|
||||
FCEUI_VSUniCoin2();
|
||||
break;
|
||||
case MENU_SERVICE_BUTTON:
|
||||
FCEUI_VSUniService();
|
||||
break;
|
||||
case MENU_INPUT_BARCODE:
|
||||
char bbuf[32 + 1];
|
||||
if ((CWin32InputBox::GetString("Input Barcode", "Input full 13- or 8-digit barcode to be directly send to the reader. Or input partial 12- or 7-digit number to allow the program to calculate control code automatically.", bbuf, hWnd) == IDOK)) {
|
||||
|
@ -2574,6 +2580,8 @@ adelikat: Outsourced this to a remappable hotkey
|
|||
EnableMenuItem(fceumenu,MENU_EJECT_DISK,MF_BYCOMMAND | (FCEU_IsValidUI(FCEUI_EJECT_DISK)?MF_ENABLED:MF_GRAYED));
|
||||
EnableMenuItem(fceumenu,MENU_SWITCH_DISK,MF_BYCOMMAND | (FCEU_IsValidUI(FCEUI_SWITCH_DISK)?MF_ENABLED:MF_GRAYED));
|
||||
EnableMenuItem(fceumenu,MENU_INSERT_COIN,MF_BYCOMMAND | (FCEU_IsValidUI(FCEUI_INSERT_COIN)?MF_ENABLED:MF_GRAYED));
|
||||
EnableMenuItem(fceumenu,MENU_INSERT_COIN2, MF_BYCOMMAND | (FCEU_IsValidUI(FCEUI_INSERT_COIN) ? MF_ENABLED : MF_GRAYED));
|
||||
EnableMenuItem(fceumenu,MENU_SERVICE_BUTTON, MF_BYCOMMAND | (FCEU_IsValidUI(FCEUI_INSERT_COIN) ? MF_ENABLED : MF_GRAYED));
|
||||
EnableMenuItem(fceumenu,MENU_INPUT_BARCODE,MF_BYCOMMAND | (FCEU_IsValidUI(FCEUI_INPUT_BARCODE)?MF_ENABLED:MF_GRAYED));
|
||||
EnableMenuItem(fceumenu,MENU_TASEDITOR,MF_BYCOMMAND | (FCEU_IsValidUI(FCEUI_TASEDITOR)?MF_ENABLED:MF_GRAYED));
|
||||
EnableMenuItem(fceumenu,MENU_CLOSE_FILE,MF_BYCOMMAND | (FCEU_IsValidUI(FCEUI_CLOSEGAME) && GameInfo ?MF_ENABLED:MF_GRAYED));
|
||||
|
@ -3027,8 +3035,12 @@ struct HOTKEYMENUINDEX hotkeyMenuIndexes[] = {
|
|||
{ MENU_EJECT_DISK,EMUCMD_FDS_EJECT_INSERT },
|
||||
// "&Switch Disk Side"
|
||||
{ MENU_SWITCH_DISK,EMUCMD_FDS_SIDE_SELECT },
|
||||
// "&Insert Coin"
|
||||
// "&Insert Coin #1"
|
||||
{ MENU_INSERT_COIN,EMUCMD_VSUNI_COIN },
|
||||
// "I&nsert Coin #2"
|
||||
{ MENU_INSERT_COIN2,EMUCMD_VSUNI_COIN_2 },
|
||||
// "Ser&vice Button"
|
||||
{ MENU_SERVICE_BUTTON,EMUCMD_VSUNI_SERVICE_BUTTON },
|
||||
// "Speed &Up"
|
||||
{ ID_NES_SPEEDUP,EMUCMD_SPEED_FASTER },
|
||||
// "Slow &Down"
|
||||
|
|
|
@ -279,7 +279,8 @@ static void SetInputNes20(uint8 expansion) {
|
|||
|
||||
int x = 0;
|
||||
|
||||
if (expansion == 0x02) eoptions |= 32768; // dirty hack to enable Four-Score
|
||||
if (expansion == 0x02)
|
||||
eoptions |= 32768; // dirty hack to enable Four-Score
|
||||
GameInfo->vs_cswitch = expansion == 0x05;
|
||||
|
||||
while (moo[x].expansion_id) {
|
||||
|
|
|
@ -106,6 +106,8 @@ uint8 FCEU_GetJoyJoy(void)
|
|||
}
|
||||
|
||||
extern uint8 coinon;
|
||||
extern uint8 coinon2;
|
||||
extern uint8 service;
|
||||
|
||||
//set to true if the fourscore is attached
|
||||
static bool FSAttached = false;
|
||||
|
@ -431,8 +433,11 @@ void FCEU_UpdateInput(void)
|
|||
portFC.driver->Update(portFC.ptr,portFC.attrib);
|
||||
}
|
||||
|
||||
if(GameInfo->type==GIT_VSUNI)
|
||||
if(coinon) coinon--;
|
||||
if (GameInfo->type == GIT_VSUNI) {
|
||||
if (coinon) coinon--;
|
||||
if (coinon2) coinon2--;
|
||||
if (service) service--;
|
||||
}
|
||||
|
||||
if(FCEUnetplay)
|
||||
NetplayUpdate(joy);
|
||||
|
@ -454,7 +459,11 @@ static DECLFR(VSUNIRead0)
|
|||
|
||||
ret|=(vsdip&3)<<3;
|
||||
if(coinon)
|
||||
ret|=0x4;
|
||||
ret |= 0x20;
|
||||
if (coinon2)
|
||||
ret |= 0x40;
|
||||
if (service)
|
||||
ret |= 0x04;
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -668,7 +677,9 @@ void FCEU_DoSimpleCommand(int cmd)
|
|||
{
|
||||
case FCEUNPCMD_FDSINSERT: FCEU_FDSInsert();break;
|
||||
case FCEUNPCMD_FDSSELECT: FCEU_FDSSelect();break;
|
||||
case FCEUNPCMD_VSUNICOIN: FCEU_VSUniCoin(); break;
|
||||
case FCEUNPCMD_VSUNICOIN: FCEU_VSUniCoin(0); break;
|
||||
case FCEUNPCMD_VSUNICOIN2: FCEU_VSUniCoin(1); break;
|
||||
case FCEUNPCMD_VSUNISERVICE: FCEU_VSUniService(); break;
|
||||
case FCEUNPCMD_VSUNIDIP0:
|
||||
case FCEUNPCMD_VSUNIDIP0+1:
|
||||
case FCEUNPCMD_VSUNIDIP0+2:
|
||||
|
@ -726,6 +737,22 @@ void FCEUI_VSUniCoin(void)
|
|||
FCEU_QSimpleCommand(FCEUNPCMD_VSUNICOIN);
|
||||
}
|
||||
|
||||
void FCEUI_VSUniCoin2(void)
|
||||
{
|
||||
if (!FCEU_IsValidUI(FCEUI_INSERT_COIN))
|
||||
return;
|
||||
|
||||
FCEU_QSimpleCommand(FCEUNPCMD_VSUNICOIN2);
|
||||
}
|
||||
|
||||
void FCEUI_VSUniService(void)
|
||||
{
|
||||
if (!FCEU_IsValidUI(FCEUI_INSERT_COIN))
|
||||
return;
|
||||
|
||||
FCEU_QSimpleCommand(FCEUNPCMD_VSUNISERVICE);
|
||||
}
|
||||
|
||||
//Resets the frame counter if movie inactive and rom is reset or power-cycle
|
||||
void ResetFrameCounter()
|
||||
{
|
||||
|
@ -901,17 +928,17 @@ struct EMUCMDTABLE FCEUI_CommandTable[]=
|
|||
{ EMUCMD_FDS_EJECT_INSERT, EMUCMDTYPE_FDS, FCEUI_FDSInsert, 0, 0, "Eject or Insert FDS Disk", EMUCMDFLAG_TASEDITOR },
|
||||
{ EMUCMD_FDS_SIDE_SELECT, EMUCMDTYPE_FDS, FCEUI_FDSSelect, 0, 0, "Switch FDS Disk Side", EMUCMDFLAG_TASEDITOR },
|
||||
|
||||
{ EMUCMD_VSUNI_COIN, EMUCMDTYPE_VSUNI, FCEUI_VSUniCoin, 0, 0, "Insert Coin", EMUCMDFLAG_TASEDITOR },
|
||||
{ EMUCMD_VSUNI_TOGGLE_DIP_0, EMUCMDTYPE_VSUNI, CommandToggleDip, 0, 0, "Toggle Dipswitch 0", 0 },
|
||||
{ EMUCMD_VSUNI_TOGGLE_DIP_1, EMUCMDTYPE_VSUNI, CommandToggleDip, 0, 0, "Toggle Dipswitch 1", 0 },
|
||||
{ EMUCMD_VSUNI_TOGGLE_DIP_2, EMUCMDTYPE_VSUNI, CommandToggleDip, 0, 0, "Toggle Dipswitch 2", 0 },
|
||||
{ EMUCMD_VSUNI_TOGGLE_DIP_3, EMUCMDTYPE_VSUNI, CommandToggleDip, 0, 0, "Toggle Dipswitch 3", 0 },
|
||||
{ EMUCMD_VSUNI_TOGGLE_DIP_4, EMUCMDTYPE_VSUNI, CommandToggleDip, 0, 0, "Toggle Dipswitch 4", 0 },
|
||||
{ EMUCMD_VSUNI_TOGGLE_DIP_5, EMUCMDTYPE_VSUNI, CommandToggleDip, 0, 0, "Toggle Dipswitch 5", 0 },
|
||||
{ EMUCMD_VSUNI_TOGGLE_DIP_6, EMUCMDTYPE_VSUNI, CommandToggleDip, 0, 0, "Toggle Dipswitch 6", 0 },
|
||||
{ EMUCMD_VSUNI_TOGGLE_DIP_7, EMUCMDTYPE_VSUNI, CommandToggleDip, 0, 0, "Toggle Dipswitch 7", 0 },
|
||||
{ EMUCMD_VSUNI_TOGGLE_DIP_8, EMUCMDTYPE_VSUNI, CommandToggleDip, 0, 0, "Toggle Dipswitch 8", 0 },
|
||||
{ EMUCMD_VSUNI_TOGGLE_DIP_9, EMUCMDTYPE_VSUNI, CommandToggleDip, 0, 0, "Toggle Dipswitch 9", 0 },
|
||||
{ EMUCMD_VSUNI_COIN, EMUCMDTYPE_VSUNI, FCEUI_VSUniCoin, 0, 0, "Insert Coin #1", EMUCMDFLAG_TASEDITOR },
|
||||
{ EMUCMD_VSUNI_COIN_2, EMUCMDTYPE_VSUNI, FCEUI_VSUniCoin2, 0, 0, "Insert Coin #2", EMUCMDFLAG_TASEDITOR },
|
||||
{ EMUCMD_VSUNI_SERVICE_BUTTON, EMUCMDTYPE_VSUNI, FCEUI_VSUniService, 0, 0, "Service Button", EMUCMDFLAG_TASEDITOR },
|
||||
{ EMUCMD_VSUNI_TOGGLE_DIP_0, EMUCMDTYPE_VSUNI, CommandToggleDip, 0, 0, "Toggle Dip Switch 0", 0 },
|
||||
{ EMUCMD_VSUNI_TOGGLE_DIP_1, EMUCMDTYPE_VSUNI, CommandToggleDip, 0, 0, "Toggle Dip Switch 1", 0 },
|
||||
{ EMUCMD_VSUNI_TOGGLE_DIP_2, EMUCMDTYPE_VSUNI, CommandToggleDip, 0, 0, "Toggle Dip Switch 2", 0 },
|
||||
{ EMUCMD_VSUNI_TOGGLE_DIP_3, EMUCMDTYPE_VSUNI, CommandToggleDip, 0, 0, "Toggle Dip Switch 3", 0 },
|
||||
{ EMUCMD_VSUNI_TOGGLE_DIP_4, EMUCMDTYPE_VSUNI, CommandToggleDip, 0, 0, "Toggle Dip Switch 4", 0 },
|
||||
{ EMUCMD_VSUNI_TOGGLE_DIP_5, EMUCMDTYPE_VSUNI, CommandToggleDip, 0, 0, "Toggle Dip Switch 5", 0 },
|
||||
{ EMUCMD_VSUNI_TOGGLE_DIP_6, EMUCMDTYPE_VSUNI, CommandToggleDip, 0, 0, "Toggle Dip Switch 6", 0 },
|
||||
{ EMUCMD_VSUNI_TOGGLE_DIP_7, EMUCMDTYPE_VSUNI, CommandToggleDip, 0, 0, "Toggle Dip Switch 7", 0 },
|
||||
|
||||
{ EMUCMD_MISC_AUTOSAVE, EMUCMDTYPE_MISC, FCEUI_RewindToLastAutosave, 0, 0, "Load Last Auto-save", 0},
|
||||
{ EMUCMD_MISC_SHOWSTATES, EMUCMDTYPE_MISC, ViewSlots, 0, 0, "View save slots", 0 },
|
||||
|
|
|
@ -197,8 +197,8 @@ enum EMUCMD
|
|||
EMUCMD_VSUNI_TOGGLE_DIP_5,
|
||||
EMUCMD_VSUNI_TOGGLE_DIP_6,
|
||||
EMUCMD_VSUNI_TOGGLE_DIP_7,
|
||||
EMUCMD_VSUNI_TOGGLE_DIP_8,
|
||||
EMUCMD_VSUNI_TOGGLE_DIP_9,
|
||||
EMUCMD_VSUNI_COIN_2,
|
||||
EMUCMD_VSUNI_SERVICE_BUTTON,
|
||||
EMUCMD_MISC_AUTOSAVE,
|
||||
EMUCMD_MISC_SHOWSTATES,
|
||||
EMUCMD_MISC_USE_INPUT_PRESET_1,
|
||||
|
|
|
@ -1221,7 +1221,11 @@ void FCEUMOV_AddInputState()
|
|||
if (mr->command_fds_select())
|
||||
FCEU_FDSSelect();
|
||||
if (mr->command_vs_insertcoin())
|
||||
FCEU_VSUniCoin();
|
||||
FCEU_VSUniCoin(0);
|
||||
if (mr->command_vs_insertcoin2())
|
||||
FCEU_VSUniCoin(1);
|
||||
if (mr->command_vs_service())
|
||||
FCEU_VSUniService();
|
||||
_currCommand = 0;
|
||||
} else
|
||||
#endif
|
||||
|
@ -1249,7 +1253,11 @@ void FCEUMOV_AddInputState()
|
|||
if(mr->command_fds_select())
|
||||
FCEU_FDSSelect();
|
||||
if (mr->command_vs_insertcoin())
|
||||
FCEU_VSUniCoin();
|
||||
FCEU_VSUniCoin(0);
|
||||
if (mr->command_vs_insertcoin2())
|
||||
FCEU_VSUniCoin(1);
|
||||
if (mr->command_vs_service())
|
||||
FCEU_VSUniService();
|
||||
|
||||
joyports[0].load(mr);
|
||||
joyports[1].load(mr);
|
||||
|
@ -1327,6 +1335,8 @@ void FCEUMOV_AddCommand(int cmd)
|
|||
case FCEUNPCMD_FDSINSERT: cmd = MOVIECMD_FDS_INSERT; break;
|
||||
case FCEUNPCMD_FDSSELECT: cmd = MOVIECMD_FDS_SELECT; break;
|
||||
case FCEUNPCMD_VSUNICOIN: cmd = MOVIECMD_VS_INSERTCOIN; break;
|
||||
case FCEUNPCMD_VSUNICOIN2: cmd = MOVIECMD_VS_INSERTCOIN2; break;
|
||||
case FCEUNPCMD_VSUNISERVICE: cmd = MOVIECMD_VS_SERVICE; break;
|
||||
// all other netplay commands (e.g. FCEUNPCMD_VSUNIDIP0) are not supported by movie recorder for now
|
||||
default: return;
|
||||
}
|
||||
|
|
|
@ -81,7 +81,9 @@ enum EMOVIECMD
|
|||
MOVIECMD_POWER = 2,
|
||||
MOVIECMD_FDS_INSERT = 4,
|
||||
MOVIECMD_FDS_SELECT = 8,
|
||||
MOVIECMD_VS_INSERTCOIN = 16
|
||||
MOVIECMD_VS_INSERTCOIN = 16,
|
||||
MOVIECMD_VS_INSERTCOIN2 = 32,
|
||||
MOVIECMD_VS_SERVICE = 64
|
||||
};
|
||||
|
||||
EMOVIEMODE FCEUMOV_Mode();
|
||||
|
@ -131,6 +133,8 @@ public:
|
|||
bool command_fds_insert() { return (commands & MOVIECMD_FDS_INSERT) != 0; }
|
||||
bool command_fds_select() { return (commands & MOVIECMD_FDS_SELECT) != 0; }
|
||||
bool command_vs_insertcoin() { return (commands & MOVIECMD_VS_INSERTCOIN) != 0; }
|
||||
bool command_vs_insertcoin2() { return (commands & MOVIECMD_VS_INSERTCOIN2) != 0; }
|
||||
bool command_vs_service() { return (commands & MOVIECMD_VS_SERVICE) != 0; }
|
||||
|
||||
void toggleBit(int joy, int bit)
|
||||
{
|
||||
|
|
|
@ -7,7 +7,10 @@ extern int FCEUnetplay;
|
|||
#define FCEUNPCMD_POWER 0x02
|
||||
|
||||
#define FCEUNPCMD_VSUNICOIN 0x07
|
||||
#define FCEUNPCMD_VSUNIDIP0 0x08
|
||||
#define FCEUNPCMD_VSUNIDIP0 0x08
|
||||
#define FCEUNPCMD_VSUNICOIN2 0x20
|
||||
#define FCEUNPCMD_VSUNISERVICE 0x21
|
||||
|
||||
#define FCEUNPCMD_FDSINSERTx 0x10
|
||||
#define FCEUNPCMD_FDSINSERT 0x18
|
||||
//#define FCEUNPCMD_FDSEJECT 0x19
|
||||
|
|
|
@ -80,13 +80,29 @@ static DECLFR(VSSecRead) {
|
|||
}
|
||||
return(0x00);
|
||||
}
|
||||
uint8 coinon = 0;
|
||||
|
||||
void FCEU_VSUniCoin(void) {
|
||||
uint8 coinon = 0;
|
||||
uint8 coinon2 = 0;
|
||||
uint8 service = 0;
|
||||
|
||||
void FCEU_VSUniCoin(uint8 slot) {
|
||||
if (GameInfo->type != GIT_VSUNI)
|
||||
FCEU_DispMessage("Not Vs. System; can't insert coin.", 0);
|
||||
else {
|
||||
switch (slot) {
|
||||
case 0:
|
||||
coinon = 6; break;
|
||||
case 1:
|
||||
coinon2 = 6; break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void FCEU_VSUniService() {
|
||||
if (GameInfo->type != GIT_VSUNI)
|
||||
FCEU_DispMessage("Not Vs. System; can't press service button.", 0);
|
||||
else
|
||||
coinon = 6;
|
||||
service = 6;
|
||||
}
|
||||
|
||||
static readfunc OldReadPPU;
|
||||
|
@ -131,7 +147,7 @@ void FCEU_VSUniSwap(uint8 *j0, uint8 *j1) {
|
|||
}
|
||||
|
||||
void FCEU_VSUniPower(void) {
|
||||
coinon = 0;
|
||||
coinon = coinon2 = service = 0;
|
||||
VSindex = 0;
|
||||
|
||||
if (secptr)
|
||||
|
@ -404,6 +420,8 @@ void FCEU_VSUniDraw(uint8 *XBuf) {
|
|||
SFORMAT FCEUVSUNI_STATEINFO[] = {
|
||||
{ &vsdip, 1, "vsdp" },
|
||||
{ &coinon, 1, "vscn" },
|
||||
{ &coinon2, 1, "vsc2" },
|
||||
{ &service, 1, "vssv" },
|
||||
{ &VSindex, 1, "vsin" },
|
||||
{ 0 }
|
||||
};
|
||||
|
|
|
@ -20,5 +20,6 @@ void FCEU_VSUniCheck(uint64 md5partial, int *, uint8 *);
|
|||
void FCEU_VSUniDraw(uint8 *XBuf);
|
||||
|
||||
void FCEU_VSUniToggleDIP(int); /* For movies and netplay */
|
||||
void FCEU_VSUniCoin(void);
|
||||
void FCEU_VSUniCoin(uint8 slot);
|
||||
void FCEU_VSUniService();
|
||||
void FCEU_VSUniSwap(uint8 *j0, uint8 *j1);
|
||||
|
|
Loading…
Reference in New Issue