mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-08-20 07:51:28 +02:00
rename variables for consistency with existing code
This commit is contained in:
@@ -120,8 +120,8 @@ private:
|
|||||||
|
|
||||||
uint autoJoypadCounter = 33; //state machine; 4224 / 128 = 33 (inactive)
|
uint autoJoypadCounter = 33; //state machine; 4224 / 128 = 33 (inactive)
|
||||||
|
|
||||||
uint2 autoJoypadPort0 = 0;
|
|
||||||
uint2 autoJoypadPort1 = 0;
|
uint2 autoJoypadPort1 = 0;
|
||||||
|
uint2 autoJoypadPort2 = 0;
|
||||||
|
|
||||||
bool cpuLatch = false;
|
bool cpuLatch = false;
|
||||||
bool autoJoypadLatch = false;
|
bool autoJoypadLatch = false;
|
||||||
|
@@ -45,8 +45,8 @@ auto CPU::serialize(serializer& s) -> void {
|
|||||||
|
|
||||||
s.integer(status.autoJoypadCounter);
|
s.integer(status.autoJoypadCounter);
|
||||||
|
|
||||||
s.integer(status.autoJoypadPort0);
|
|
||||||
s.integer(status.autoJoypadPort1);
|
s.integer(status.autoJoypadPort1);
|
||||||
|
s.integer(status.autoJoypadPort2);
|
||||||
|
|
||||||
s.boolean(status.cpuLatch);
|
s.boolean(status.cpuLatch);
|
||||||
s.boolean(status.autoJoypadLatch);
|
s.boolean(status.autoJoypadLatch);
|
||||||
|
@@ -243,13 +243,13 @@ auto CPU::joypadEdge() -> void {
|
|||||||
//sixteen bits are shifted into joy{1-4}, one bit per 256 clocks
|
//sixteen bits are shifted into joy{1-4}, one bit per 256 clocks
|
||||||
//the bits are read on one 128-clock cycle and written on the next
|
//the bits are read on one 128-clock cycle and written on the next
|
||||||
if ((status.autoJoypadCounter & 1) == 0) {
|
if ((status.autoJoypadCounter & 1) == 0) {
|
||||||
status.autoJoypadPort0 = controllerPort1.device->data();
|
status.autoJoypadPort1 = controllerPort1.device->data();
|
||||||
status.autoJoypadPort1 = controllerPort2.device->data();
|
status.autoJoypadPort2 = controllerPort2.device->data();
|
||||||
} else {
|
} else {
|
||||||
io.joy1 = io.joy1 << 1 | status.autoJoypadPort0.bit(0);
|
io.joy1 = io.joy1 << 1 | status.autoJoypadPort1.bit(0);
|
||||||
io.joy2 = io.joy2 << 1 | status.autoJoypadPort1.bit(0);
|
io.joy2 = io.joy2 << 1 | status.autoJoypadPort2.bit(0);
|
||||||
io.joy3 = io.joy3 << 1 | status.autoJoypadPort0.bit(1);
|
io.joy3 = io.joy3 << 1 | status.autoJoypadPort1.bit(1);
|
||||||
io.joy4 = io.joy4 << 1 | status.autoJoypadPort1.bit(1);
|
io.joy4 = io.joy4 << 1 | status.autoJoypadPort2.bit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user