fix warnings in CPU and Bus modules
This commit is contained in:
parent
d9b23f0b75
commit
22434d868d
|
@ -56,7 +56,7 @@ uint8_t Bus::Tick()
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DMATick();
|
DMATick();
|
||||||
result = DMACyclesLeft;
|
result = (uint8_t)DMACyclesLeft;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -83,7 +83,7 @@ void Bus::DMATick()
|
||||||
if (DMALatch != 0)
|
if (DMALatch != 0)
|
||||||
{
|
{
|
||||||
Byte data = ReadCPU(((Word)DMAPage << 8) | (0x100 - DMACyclesLeft));
|
Byte data = ReadCPU(((Word)DMAPage << 8) | (0x100 - DMACyclesLeft));
|
||||||
ppu.WriteRegister(0x2004, data);
|
ppu.WriteRegister(0x04, data);
|
||||||
|
|
||||||
DMACyclesLeft--;
|
DMACyclesLeft--;
|
||||||
}
|
}
|
||||||
|
@ -196,8 +196,6 @@ void Bus::WriteCPU(Word addr, Byte val)
|
||||||
{
|
{
|
||||||
if (0x0000 <= addr && addr < 0x2000)
|
if (0x0000 <= addr && addr < 0x2000)
|
||||||
{
|
{
|
||||||
if (addr == 0x0348)
|
|
||||||
volatile int jdfkdf = 3;
|
|
||||||
RAM[addr & 0x7FF] = val;
|
RAM[addr & 0x7FF] = val;
|
||||||
}
|
}
|
||||||
else if (0x2000 <= addr && addr < 0x4000)
|
else if (0x2000 <= addr && addr < 0x4000)
|
||||||
|
|
|
@ -52,7 +52,7 @@ uint8_t CPU::Tick()
|
||||||
currentInstruction = &(InstructionTable[opcode]);
|
currentInstruction = &(InstructionTable[opcode]);
|
||||||
|
|
||||||
// Add this instruction to the past instruction list
|
// Add this instruction to the past instruction list
|
||||||
pastInstructions.push_back(std::make_pair(pc.Raw - 1, currentInstruction));
|
pastInstructions.push_back(std::make_pair((Word)(pc.Raw - 1), currentInstruction));
|
||||||
if (pastInstructions.size() > 50)
|
if (pastInstructions.size() > 50)
|
||||||
pastInstructions.pop_front();
|
pastInstructions.pop_front();
|
||||||
|
|
||||||
|
@ -1081,7 +1081,7 @@ void CPU::SBX()
|
||||||
CHECK_ZERO(result);
|
CHECK_ZERO(result);
|
||||||
status.Flag.Carry = ((acc & idx) >= fetchedVal);
|
status.Flag.Carry = ((acc & idx) >= fetchedVal);
|
||||||
|
|
||||||
idx = result;
|
idx = (Byte)(result & 0xFF);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CPU::SBC()
|
void CPU::SBC()
|
||||||
|
|
|
@ -45,7 +45,7 @@ union StatusFlag
|
||||||
Byte Negative : 1;
|
Byte Negative : 1;
|
||||||
} Flag;
|
} Flag;
|
||||||
|
|
||||||
Word Raw;
|
Byte Raw;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue