diff --git a/higan/emulator/emulator.hpp b/higan/emulator/emulator.hpp index c5de30bf..9d1d4833 100644 --- a/higan/emulator/emulator.hpp +++ b/higan/emulator/emulator.hpp @@ -12,7 +12,7 @@ using namespace nall; namespace Emulator { static const string Name = "higan"; - static const string Version = "104.16"; + static const string Version = "104.17"; static const string Author = "byuu"; static const string License = "GPLv3"; static const string Website = "https://byuu.org/"; diff --git a/higan/processor/m68k/disassembler.cpp b/higan/processor/m68k/disassembler.cpp index cf2fdf86..d8bf9843 100644 --- a/higan/processor/m68k/disassembler.cpp +++ b/higan/processor/m68k/disassembler.cpp @@ -44,7 +44,7 @@ template auto M68K::_immediate() -> string { template auto M68K::_address(EffectiveAddress& ea) -> string { if(ea.mode == 7) return {"$", hex((int16)_readPC(), 6L)}; - if(ea.mode == 8) return {"$", hex(readPC(), 6L)}; + if(ea.mode == 8) return {"$", hex(_readPC(), 6L)}; if(ea.mode == 9) return {"$", hex(_pc + (int16)_readPC(), 6L)}; return "???"; } diff --git a/higan/processor/m68k/effective-address.cpp b/higan/processor/m68k/effective-address.cpp index 512825bb..d69049ab 100644 --- a/higan/processor/m68k/effective-address.cpp +++ b/higan/processor/m68k/effective-address.cpp @@ -68,7 +68,7 @@ template auto M68K::fetch(EffectiveAddress& ea) -> uint32 { return 0; } -template auto M68K::read(EffectiveAddress& ea) -> uint32 { +template auto M68K::read(EffectiveAddress& ea) -> uint32 { ea.address = fetch(ea); switch(ea.mode) { @@ -88,14 +88,14 @@ template auto M68K::read(EffectiveAddress& ea) -> uint32 { case AddressRegisterIndirectWithPostIncrement: { auto address = ea.address + (ea.reg == 7 && Size == Byte ? bytes() : bytes()); auto data = read(ea.address); - if(!Hold) write(AddressRegister{ea.reg}, ea.address = address); + if(!hold) write(AddressRegister{ea.reg}, ea.address = address); return data; } case AddressRegisterIndirectWithPreDecrement: { auto address = ea.address - (ea.reg == 7 && Size == Byte ? bytes() : bytes()); auto data = read(address); - if(!Hold) write(AddressRegister{ea.reg}, ea.address = address); + if(!hold) write(AddressRegister{ea.reg}, ea.address = address); return data; } @@ -132,7 +132,7 @@ template auto M68K::read(EffectiveAddress& ea) -> uint32 { return 0; } -template auto M68K::write(EffectiveAddress& ea, uint32 data) -> void { +template auto M68K::write(EffectiveAddress& ea, uint32 data) -> void { ea.address = fetch(ea); switch(ea.mode) { @@ -152,14 +152,14 @@ template auto M68K::write(EffectiveAddress& ea, uint32 dat case AddressRegisterIndirectWithPostIncrement: { auto address = ea.address + (ea.reg == 7 && Size == Byte ? bytes() : bytes()); write(ea.address, data); - if(!Hold) write(AddressRegister{ea.reg}, ea.address = address); + if(!hold) write(AddressRegister{ea.reg}, ea.address = address); return; } case AddressRegisterIndirectWithPreDecrement: { auto address = ea.address - (ea.reg == 7 && Size == Byte ? bytes() : bytes()); write(address, data); - if(!Hold) write(AddressRegister{ea.reg}, ea.address = address); + if(!hold) write(AddressRegister{ea.reg}, ea.address = address); return; } diff --git a/higan/processor/m68k/instructions.cpp b/higan/processor/m68k/instructions.cpp index 9a59629b..42ee0349 100644 --- a/higan/processor/m68k/instructions.cpp +++ b/higan/processor/m68k/instructions.cpp @@ -79,13 +79,13 @@ auto M68K::instructionABCD(EffectiveAddress with, EffectiveAddress from) -> void r.x = r.c; } -template auto M68K::ADD(uint32 source, uint32 target) -> uint32 { +template auto M68K::ADD(uint32 source, uint32 target) -> uint32 { auto result = (uint64)source + target; - if(Extend) result += r.x; + if(extend) result += r.x; r.c = sign(result >> 1) < 0; r.v = sign(~(target ^ source) & (target ^ result)) < 0; - r.z = clip(result) ? 0 : (Extend ? r.z : 1); + r.z = clip(result) ? 0 : (extend ? r.z : 1); r.n = sign(result) < 0; r.x = r.c; @@ -1059,13 +1059,13 @@ auto M68K::instructionSTOP() -> void { r.stop = true; } -template auto M68K::SUB(uint32 source, uint32 target) -> uint32 { +template auto M68K::SUB(uint32 source, uint32 target) -> uint32 { auto result = (uint64)target - source; - if(Extend) result -= r.x; + if(extend) result -= r.x; r.c = sign(result >> 1) < 0; r.v = sign((target ^ source) & (target ^ result)) < 0; - r.z = clip(result) ? 0 : (Extend ? r.z : 1); + r.z = clip(result) ? 0 : (extend ? r.z : 1); r.n = sign(result) < 0; r.x = r.c; diff --git a/higan/processor/m68k/m68k.hpp b/higan/processor/m68k/m68k.hpp index 40c8073b..05a00d21 100644 --- a/higan/processor/m68k/m68k.hpp +++ b/higan/processor/m68k/m68k.hpp @@ -102,8 +102,8 @@ struct M68K { }; template auto fetch(EffectiveAddress& ea) -> uint32; - template auto read(EffectiveAddress& ea) -> uint32; - template auto write(EffectiveAddress& ea, uint32 data) -> void; + template auto read(EffectiveAddress& ea) -> uint32; + template auto write(EffectiveAddress& ea, uint32 data) -> void; //instruction.cpp auto instruction() -> void; @@ -120,7 +120,7 @@ struct M68K { template auto sign(uint32 data) -> int32; auto instructionABCD(EffectiveAddress with, EffectiveAddress from) -> void; - template auto ADD(uint32 source, uint32 target) -> uint32; + template auto ADD(uint32 source, uint32 target) -> uint32; template auto instructionADD(EffectiveAddress from, DataRegister with) -> void; template auto instructionADD(DataRegister from, EffectiveAddress with) -> void; template auto instructionADDA(AddressRegister ar, EffectiveAddress ea) -> void; @@ -233,7 +233,7 @@ struct M68K { auto instructionSBCD(EffectiveAddress with, EffectiveAddress from) -> void; auto instructionSCC(uint4 condition, EffectiveAddress to) -> void; auto instructionSTOP() -> void; - template auto SUB(uint32 source, uint32 target) -> uint32; + template auto SUB(uint32 source, uint32 target) -> uint32; template auto instructionSUB(EffectiveAddress source, DataRegister target) -> void; template auto instructionSUB(DataRegister source, EffectiveAddress target) -> void; template auto instructionSUBA(AddressRegister to, EffectiveAddress from) -> void;