add fds insert/select recording
This commit is contained in:
parent
4c2fe989c8
commit
9813608af3
|
@ -35,6 +35,7 @@
|
|||
#include "cart.h"
|
||||
#include "netplay.h"
|
||||
#include "driver.h"
|
||||
#include "movie.h"
|
||||
|
||||
// TODO: Add code to put a delay in between the time a disk is inserted
|
||||
// and the when it can be successfully read/written to. This should
|
||||
|
@ -147,6 +148,7 @@ static void FDSInit(void)
|
|||
|
||||
void FCEU_FDSInsert(void)
|
||||
{
|
||||
FCEUMOV_AddCommand(FCEUNPCMD_FDSINSERT);
|
||||
if(TotalSides==0)
|
||||
{
|
||||
FCEU_DispMessage("Not FDS; can't eject disk.");
|
||||
|
@ -171,6 +173,7 @@ InDisk=255;
|
|||
*/
|
||||
void FCEU_FDSSelect(void)
|
||||
{
|
||||
FCEUMOV_AddCommand(FCEUNPCMD_FDSSELECT);
|
||||
if(TotalSides==0)
|
||||
{
|
||||
FCEU_DispMessage("Not FDS; can't select disk.");
|
||||
|
|
|
@ -14,11 +14,13 @@
|
|||
#include "palette.h"
|
||||
#include "input.h"
|
||||
#include "fceu.h"
|
||||
#include "netplay.h"
|
||||
#include "driver.h"
|
||||
#include "state.h"
|
||||
#include "file.h"
|
||||
#include "video.h"
|
||||
#include "movie.h"
|
||||
#include "fds.h"
|
||||
#ifdef _S9XLUA_H
|
||||
#include "fceulua.h"
|
||||
#endif
|
||||
|
@ -918,6 +920,12 @@ void FCEUMOV_AddInputState()
|
|||
if(mr->command_reset())
|
||||
ResetNES();
|
||||
|
||||
if(mr->command_fds_insert())
|
||||
FCEU_FDSInsert();
|
||||
|
||||
if(mr->command_fds_select())
|
||||
FCEU_FDSSelect();
|
||||
|
||||
joyports[0].load(mr);
|
||||
joyports[1].load(mr);
|
||||
}
|
||||
|
@ -969,6 +977,11 @@ void FCEUMOV_AddCommand(int cmd)
|
|||
//NOTE: EMOVIECMD matches FCEUNPCMD_RESET and FCEUNPCMD_POWER
|
||||
//we are lucky (well, I planned it that way)
|
||||
|
||||
switch(cmd) {
|
||||
case FCEUNPCMD_FDSINSERT: cmd = MOVIECMD_FDS_INSERT; break;
|
||||
case FCEUNPCMD_FDSSELECT: cmd = MOVIECMD_FDS_SELECT; break;
|
||||
}
|
||||
|
||||
_currCommand |= cmd;
|
||||
}
|
||||
|
||||
|
|
|
@ -64,6 +64,8 @@ enum EMOVIECMD
|
|||
{
|
||||
MOVIECMD_RESET = 1,
|
||||
MOVIECMD_POWER = 2,
|
||||
MOVIECMD_FDS_INSERT = 4,
|
||||
MOVIECMD_FDS_SELECT = 8
|
||||
};
|
||||
|
||||
EMOVIEMODE FCEUMOV_Mode();
|
||||
|
@ -103,6 +105,8 @@ public:
|
|||
uint8 commands;
|
||||
bool command_reset() { return (commands&MOVIECMD_RESET)!=0; }
|
||||
bool command_power() { return (commands&MOVIECMD_POWER)!=0; }
|
||||
bool command_fds_insert() { return (commands&MOVIECMD_FDS_INSERT)!=0; }
|
||||
bool command_fds_select() { return (commands&MOVIECMD_FDS_SELECT)!=0; }
|
||||
|
||||
void toggleBit(int joy, int bit)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue