MCPcopy Create free account
hub / github.com/TASEmulators/fceux / InitializeInput

Function InitializeInput

src/input.cpp:624–644  ·  view source on GitHub ↗

initializes the input system to power-on state

Source from the content-addressed store, hash-verified

622
623//initializes the input system to power-on state
624void InitializeInput(void)
625{
626 memset(joy_readbit,0,sizeof(joy_readbit));
627 memset(joy,0,sizeof(joy));
628 LastStrobe = 0;
629
630 if(GameInfo->type==GIT_VSUNI)
631 {
632 SetReadHandler(0x4016,0x4016,VSUNIRead0);
633 SetReadHandler(0x4017,0x4017,VSUNIRead1);
634 }
635 else
636 SetReadHandler(0x4016,0x4017,JPRead);
637
638 SetWriteHandler(0x4016,0x4016,B4016);
639
640 //force the port drivers to be setup
641 SetInputStuff(0);
642 SetInputStuff(1);
643 SetInputStuffFC();
644}
645
646
647bool FCEUI_GetInputFourscore()

Callers 1

PowerNESFunction · 0.85

Calls 4

SetReadHandlerFunction · 0.85
SetWriteHandlerFunction · 0.85
SetInputStuffFunction · 0.85
SetInputStuffFCFunction · 0.85

Tested by

no test coverage detected