src/io/controller.cc
/*
 * Writes to the controller registers, updating the strobe
 * and shift registers as needed.
 */
Writes to the controller registers, updating the strobe
and shift registers as needed.
Writes to the controller registers updating the strobe and shift registers as needed .
void Controller::Write(DoubleWord addr, DataWord val) {
  if (addr == IO_JOY1_ADDR) { joy_strobe_ = (val & 1); }
  if (joy_strobe_) {
    joy1_shift_ = input_->Poll();
    joy2_shift_ = 0x00U; 
  }
  return;
}
void Controller :: Write ( DoubleWord addr , DataWord val ) { if ( addr == IO_JOY1_ADDR ) { joy_strobe_ = ( val & 1 ) ; } if ( joy_strobe_ ) { joy1_shift_ = input_ -> Poll ( ) ; joy2_shift_ = 0x00U ; } return ; }
Writes to the controller registers, updating the strobe
 and shift registers as needed.
Writes to the controller registers updating the strobe and shift registers as needed .
// Update the strobe register if its address was written to. // Poll for SDL inputs, if strobe is active. // No P2 Emulation.