fix warnings in controller module

This commit is contained in:
Robert 2023-01-28 01:21:41 +01:00
parent 2c2dd84bff
commit 472a4c5e13
5 changed files with 5 additions and 8 deletions

View file

@ -219,7 +219,7 @@ void Bus::WriteCPU(Word addr, Byte val)
return;
case 0x4016:
controllerPort.Write(addr, val);
controllerPort.Write(val);
break;
case 0x4017:

View file

@ -18,10 +18,9 @@ ControllerPort::~ControllerPort()
}
}
Byte ControllerPort::Write(Word addr, Byte val)
void ControllerPort::Write(Byte val)
{
latch.Raw = val;
return 0x00;
}
Byte ControllerPort::Read(Word addr)

View file

@ -15,7 +15,7 @@ public:
ControllerPort();
~ControllerPort();
Byte Write(Word addr, Byte val);
void Write(Byte val);
Byte Read(Word addr);
void Tick();

View file

@ -19,7 +19,8 @@ class Controller
friend class ControllerPortViewer;
public:
Controller(int outPin) : outPin(outPin) {}
Controller(Byte outPin) : outPin(outPin) {}
virtual ~Controller() {}
virtual void OUT(PortLatch latch) = 0;

View file

@ -23,8 +23,5 @@ void StandardController::OUT(PortLatch latch)
pressed.Buttons.Left = Input::IsKeyDown(GLFW_KEY_A);
pressed.Buttons.Right = Input::IsKeyDown(GLFW_KEY_D);
if (pressed.Raw == 0xFF)
volatile int dkjf = 3;
outRegister = pressed.Raw;
}