fix warnings in controller module
This commit is contained in:
parent
2c2dd84bff
commit
472a4c5e13
|
@ -219,7 +219,7 @@ void Bus::WriteCPU(Word addr, Byte val)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case 0x4016:
|
case 0x4016:
|
||||||
controllerPort.Write(addr, val);
|
controllerPort.Write(val);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x4017:
|
case 0x4017:
|
||||||
|
|
|
@ -18,10 +18,9 @@ ControllerPort::~ControllerPort()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Byte ControllerPort::Write(Word addr, Byte val)
|
void ControllerPort::Write(Byte val)
|
||||||
{
|
{
|
||||||
latch.Raw = val;
|
latch.Raw = val;
|
||||||
return 0x00;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Byte ControllerPort::Read(Word addr)
|
Byte ControllerPort::Read(Word addr)
|
||||||
|
|
|
@ -15,7 +15,7 @@ public:
|
||||||
ControllerPort();
|
ControllerPort();
|
||||||
~ControllerPort();
|
~ControllerPort();
|
||||||
|
|
||||||
Byte Write(Word addr, Byte val);
|
void Write(Byte val);
|
||||||
Byte Read(Word addr);
|
Byte Read(Word addr);
|
||||||
|
|
||||||
void Tick();
|
void Tick();
|
||||||
|
|
|
@ -19,7 +19,8 @@ class Controller
|
||||||
friend class ControllerPortViewer;
|
friend class ControllerPortViewer;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Controller(int outPin) : outPin(outPin) {}
|
Controller(Byte outPin) : outPin(outPin) {}
|
||||||
|
virtual ~Controller() {}
|
||||||
|
|
||||||
virtual void OUT(PortLatch latch) = 0;
|
virtual void OUT(PortLatch latch) = 0;
|
||||||
|
|
||||||
|
|
|
@ -23,8 +23,5 @@ void StandardController::OUT(PortLatch latch)
|
||||||
pressed.Buttons.Left = Input::IsKeyDown(GLFW_KEY_A);
|
pressed.Buttons.Left = Input::IsKeyDown(GLFW_KEY_A);
|
||||||
pressed.Buttons.Right = Input::IsKeyDown(GLFW_KEY_D);
|
pressed.Buttons.Right = Input::IsKeyDown(GLFW_KEY_D);
|
||||||
|
|
||||||
if (pressed.Raw == 0xFF)
|
|
||||||
volatile int dkjf = 3;
|
|
||||||
|
|
||||||
outRegister = pressed.Raw;
|
outRegister = pressed.Raw;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue