fixed gcc build errors
This commit is contained in:
parent
9ab5ac3c13
commit
442f1499f0
|
@ -12,7 +12,7 @@ static inline void Push(struct Bus* bus, Byte val)
|
||||||
|
|
||||||
static inline Byte Pop(struct Bus* bus)
|
static inline Byte Pop(struct Bus* bus)
|
||||||
{
|
{
|
||||||
return readBus(bus, 0x0100 + (++bus->cpu->sp), 0);
|
return readBus(bus, 0x0100 + (++bus->cpu->sp));
|
||||||
}
|
}
|
||||||
|
|
||||||
struct CPU* createCPU(struct Bus* parent)
|
struct CPU* createCPU(struct Bus* parent)
|
||||||
|
@ -26,7 +26,7 @@ struct CPU* createCPU(struct Bus* parent)
|
||||||
|
|
||||||
// TODO: THIS IS JUST FOR THE TEST ROM
|
// TODO: THIS IS JUST FOR THE TEST ROM
|
||||||
cpu->pc.word = 0xC000;
|
cpu->pc.word = 0xC000;
|
||||||
cpu->pc.word = ((Word)readBus(parent, 0xFFFD, 0) << 8) | readBus(parent, 0xFFFC, 0);
|
cpu->pc.word = ((Word)readBus(parent, 0xFFFD) << 8) | readBus(parent, 0xFFFC);
|
||||||
|
|
||||||
cpu->status.raw = 0x34;
|
cpu->status.raw = 0x34;
|
||||||
cpu->acc = 0;
|
cpu->acc = 0;
|
||||||
|
|
|
@ -16,7 +16,7 @@ void logBusState(struct Bus* bus)
|
||||||
Word instructionBytes[3];
|
Word instructionBytes[3];
|
||||||
for (int i = 0; i < bus->cpu->currentOpcode->length; i++)
|
for (int i = 0; i < bus->cpu->currentOpcode->length; i++)
|
||||||
{
|
{
|
||||||
instructionBytes[i] = readBus(bus, oldPC + i, 0);
|
instructionBytes[i] = readBus(bus, oldPC + i);
|
||||||
sprintf(buffer + 3 * i, "%02X ", instructionBytes[i]);
|
sprintf(buffer + 3 * i, "%02X ", instructionBytes[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue