Fixed clang compiler warnings
This commit is contained in:
parent
c9b01cf899
commit
651062a75d
7 changed files with 19 additions and 16 deletions
|
@ -901,7 +901,7 @@ bool Debugger::ProcessRamOperation(MemoryOperationType type, uint16_t &addr, uin
|
||||||
_currentReadValue = nullptr;
|
_currentReadValue = nullptr;
|
||||||
|
|
||||||
if(type == MemoryOperationType::Write) {
|
if(type == MemoryOperationType::Write) {
|
||||||
if(_runToCycle == -1 && !CheckFlag(DebuggerFlags::IgnoreRedundantWrites) || _memoryManager->DebugRead(addr) != value) {
|
if((_runToCycle == -1 && !CheckFlag(DebuggerFlags::IgnoreRedundantWrites)) || (_memoryManager->DebugRead(addr) != value)) {
|
||||||
_memoryAccessCounter->ProcessMemoryWrite(addressInfo, _cpu->GetCycleCount());
|
_memoryAccessCounter->ProcessMemoryWrite(addressInfo, _cpu->GetCycleCount());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -916,7 +916,7 @@ bool Debugger::ProcessRamOperation(MemoryOperationType type, uint16_t &addr, uin
|
||||||
}
|
}
|
||||||
} else if(addr >= 0x4018 && _mapper->IsWriteRegister(addr)) {
|
} else if(addr >= 0x4018 && _mapper->IsWriteRegister(addr)) {
|
||||||
_eventManager->AddDebugEvent(DebugEventType::MapperRegisterWrite, addr, value);
|
_eventManager->AddDebugEvent(DebugEventType::MapperRegisterWrite, addr, value);
|
||||||
} else if(addr >= 0x4000 && addr <= 0x4015 || addr == 0x4017) {
|
} else if((addr >= 0x4000 && addr <= 0x4015) || addr == 0x4017) {
|
||||||
_eventManager->AddDebugEvent(DebugEventType::ApuRegisterWrite, addr, value);
|
_eventManager->AddDebugEvent(DebugEventType::ApuRegisterWrite, addr, value);
|
||||||
} else if(addr == 0x4016) {
|
} else if(addr == 0x4016) {
|
||||||
_eventManager->AddDebugEvent(DebugEventType::ControlRegisterWrite, addr, value);
|
_eventManager->AddDebugEvent(DebugEventType::ControlRegisterWrite, addr, value);
|
||||||
|
|
|
@ -130,7 +130,7 @@ private:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ((currentRegister == 0x29)) {
|
if (currentRegister == 0x29) {
|
||||||
//std::cout << std::hex << "value: " << value << std::endl;
|
//std::cout << std::hex << "value: " << value << std::endl;
|
||||||
if ((value & 0x3 && (value & 0x80))) {
|
if ((value & 0x3 && (value & 0x80))) {
|
||||||
//if ((value & 0x3 )) {
|
//if ((value & 0x3 )) {
|
||||||
|
|
|
@ -826,6 +826,8 @@ int LuaApi::GetAccessCounters(lua_State *lua)
|
||||||
lua_rawseti(lua, -2, i);
|
lua_rawseti(lua, -2, i);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
|
|
|
@ -133,7 +133,7 @@ void MemoryManager::Write(uint16_t addr, uint8_t value, MemoryOperationType oper
|
||||||
{
|
{
|
||||||
if(_console->DebugProcessRamOperation(operationType, addr, value)) {
|
if(_console->DebugProcessRamOperation(operationType, addr, value)) {
|
||||||
_ramWriteHandlers[addr]->WriteRAM(addr, value);
|
_ramWriteHandlers[addr]->WriteRAM(addr, value);
|
||||||
if ((addr == 0x4016) /*| (addr >= 0x401c && addr <= 0x401f)*/) {
|
if (addr == 0x4016) {
|
||||||
_ramWriteHandlers[0xE000]->WriteRAM(addr, value);
|
_ramWriteHandlers[0xE000]->WriteRAM(addr, value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -165,6 +165,7 @@ uint32_t MemoryManager::ToAbsolutePrgAddress(uint16_t ramAddr)
|
||||||
|
|
||||||
void MemoryManager::StreamState(bool saving)
|
void MemoryManager::StreamState(bool saving)
|
||||||
{
|
{
|
||||||
|
(void)saving;
|
||||||
ArrayInfo<uint8_t> internalRam = { _internalRAM, MemoryManager::InternalRAMSize };
|
ArrayInfo<uint8_t> internalRam = { _internalRAM, MemoryManager::InternalRAMSize };
|
||||||
Stream(internalRam);
|
Stream(internalRam);
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,16 +58,17 @@ public:
|
||||||
{
|
{
|
||||||
_readCount = 0;
|
_readCount = 0;
|
||||||
_stateBuffer =
|
_stateBuffer =
|
||||||
IsPressed(PartyTap::Buttons::B1) ? 1 : 0 |
|
(IsPressed(PartyTap::Buttons::B1) ? 1 : 0) |
|
||||||
IsPressed(PartyTap::Buttons::B2) ? 2 : 0 |
|
(IsPressed(PartyTap::Buttons::B2) ? 2 : 0) |
|
||||||
IsPressed(PartyTap::Buttons::B3) ? 4 : 0 |
|
(IsPressed(PartyTap::Buttons::B3) ? 4 : 0) |
|
||||||
IsPressed(PartyTap::Buttons::B4) ? 8 : 0 |
|
(IsPressed(PartyTap::Buttons::B4) ? 8 : 0) |
|
||||||
IsPressed(PartyTap::Buttons::B5) ? 16 : 0 |
|
(IsPressed(PartyTap::Buttons::B5) ? 16 : 0) |
|
||||||
IsPressed(PartyTap::Buttons::B6) ? 32 : 0;
|
(IsPressed(PartyTap::Buttons::B6) ? 32 : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void WriteRAM(uint16_t addr, uint8_t value) override
|
void WriteRAM(uint16_t addr, uint8_t value) override
|
||||||
{
|
{
|
||||||
|
(void)addr;
|
||||||
StrobeProcessWrite(value);
|
StrobeProcessWrite(value);
|
||||||
}
|
}
|
||||||
};
|
};
|
|
@ -63,7 +63,6 @@ protected:
|
||||||
|
|
||||||
void UpdateState()
|
void UpdateState()
|
||||||
{
|
{
|
||||||
MemoryAccessType access = _prgRamEnabled ? MemoryAccessType::ReadWrite : MemoryAccessType::NoAccess;
|
|
||||||
SetCpuMemoryMapping(0x6000, 0x7FFF, 0, HasBattery() ? PrgMemoryType::SaveRam : PrgMemoryType::WorkRam);
|
SetCpuMemoryMapping(0x6000, 0x7FFF, 0, HasBattery() ? PrgMemoryType::SaveRam : PrgMemoryType::WorkRam);
|
||||||
|
|
||||||
if(_usingExternalRom) {
|
if(_usingExternalRom) {
|
||||||
|
|
|
@ -234,7 +234,7 @@ static void fchecksize (LoadState *S, size_t size, const char *tname) {
|
||||||
#define checksize(S,t) fchecksize(S,sizeof(t),#t)
|
#define checksize(S,t) fchecksize(S,sizeof(t),#t)
|
||||||
|
|
||||||
static void checkHeader (LoadState *S) {
|
static void checkHeader (LoadState *S) {
|
||||||
checkliteral(S, LUA_SIGNATURE + 1, "not a"); /* 1st char already checked */
|
checkliteral(S, &LUA_SIGNATURE[1], "not a"); /* 1st char already checked */
|
||||||
if (LoadByte(S) != LUAC_VERSION)
|
if (LoadByte(S) != LUAC_VERSION)
|
||||||
error(S, "version mismatch in");
|
error(S, "version mismatch in");
|
||||||
if (LoadByte(S) != LUAC_FORMAT)
|
if (LoadByte(S) != LUAC_FORMAT)
|
||||||
|
|
Loading…
Add table
Reference in a new issue