Video::Video(VirtualMachine& vm, VideoFairy& videoFairy) :vm_(vm) ,debugger_(vm.debugger()) ,cartridge(NULL) ,videoFairy(videoFairy) ,isEven(false) ,nowY(0) ,nowX(0) ,spriteHitCnt(0) ,executeNMIonVBlank(false) ,spriteHeight(8) ,patternTableAddressBackground(0) ,patternTableAddress8x8Sprites(0) ,vramIncrementSize(1) ,colorEmphasis(0) ,spriteVisibility(false) ,backgroundVisibility(false) ,spriteClipping(false) ,backgroundClipping(false) ,paletteMask(0) ,nowOnVBnank(false) ,sprite0Hit(false) ,lostSprites(false) ,vramBuffer(0) ,spriteAddr(0) ,vramAddrRegister(0x0) ,vramAddrReloadRegister(0) ,horizontalScrollBits(0) ,scrollRegisterWritten(false) ,vramAddrRegisterWritten(false) { //ctor memset(this->screenBuffer, 0x0, screenWidth * screenHeight * sizeof(uint8_t)); }
IOPort::IOPort(VirtualMachine& vm, GamepadFairy* pad1, GamepadFairy* pad2) :vm_(vm) ,debugger_(vm.debugger()) ,pad1Fairy(pad1 == 0 ? dummyPad : *pad1) ,pad2Fairy(pad2 == 0 ? dummyPad : *pad2) ,pad1Idx(GamepadFairy::A) ,pad2Idx(GamepadFairy::A) { }