MCPcopy Create free account
hub / github.com/dborth/fceugx / InitializeInput

Function InitializeInput

source/fceultra/input.cpp:647–667  ·  view source on GitHub ↗

initializes the input system to power-on state

Source from the content-addressed store, hash-verified

645
646//initializes the input system to power-on state
647void InitializeInput(void)
648{
649 memset(joy_readbit,0,sizeof(joy_readbit));
650 memset(joy,0,sizeof(joy));
651 LastStrobe = 0;
652
653 if(GameInfo->type==GIT_VSUNI)
654 {
655 SetReadHandler(0x4016,0x4016,VSUNIRead0);
656 SetReadHandler(0x4017,0x4017,VSUNIRead1);
657 }
658 else
659 SetReadHandler(0x4016,0x4017,JPRead);
660
661 SetWriteHandler(0x4016,0x4016,B4016);
662
663 //force the port drivers to be setup
664 SetInputStuff(0);
665 SetInputStuff(1);
666 SetInputStuffFC();
667}
668
669
670bool 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