mirror of
https://github.com/zoriya/ComSquare.git
synced 2026-06-03 02:23:49 +00:00
Fxing MOVW, fixing 0xEB MOV
Adding better temporary CPU-APU synchro
This commit is contained in:
+1
-1
@@ -656,7 +656,7 @@ namespace ComSquare::APU
|
|||||||
case 0xEA:
|
case 0xEA:
|
||||||
return this->NOT1(this->_getAbsoluteBit());
|
return this->NOT1(this->_getAbsoluteBit());
|
||||||
case 0xEB:
|
case 0xEB:
|
||||||
return this->MOV(this->_getDirectAddr(), this->_internalRegisters.y, 3);
|
return this->MOV(this->_internalRead(this->_getDirectAddr()), this->_internalRegisters.y, 3);
|
||||||
case 0xEC:
|
case 0xEC:
|
||||||
return this->MOV(this->_getAbsoluteAddr(), this->_internalRegisters.y, 4);
|
return this->MOV(this->_getAbsoluteAddr(), this->_internalRegisters.y, 4);
|
||||||
case 0xED:
|
case 0xED:
|
||||||
|
|||||||
@@ -11,9 +11,11 @@ namespace ComSquare::APU
|
|||||||
uint24_t addr2 = addr + 1 + (this->_internalRegisters.p ? 0x0100 : 0);
|
uint24_t addr2 = addr + 1 + (this->_internalRegisters.p ? 0x0100 : 0);
|
||||||
|
|
||||||
if (to_ya) {
|
if (to_ya) {
|
||||||
uint16_t value = ((this->_internalRead(addr2) << 8u) | this->_internalRead(addr));
|
uint8_t tmp = this->_internalRead(addr2);
|
||||||
|
uint16_t value = (tmp << 8) | this->_internalRead(addr);
|
||||||
|
|
||||||
this->_internalRegisters.ya = value;
|
this->_internalRegisters.a = value;
|
||||||
|
this->_internalRegisters.y = (value >> 8);
|
||||||
this->_setNZflags(value);
|
this->_setNZflags(value);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
+1
-1
@@ -209,7 +209,7 @@ namespace ComSquare::CPU
|
|||||||
unsigned CPU::update()
|
unsigned CPU::update()
|
||||||
{
|
{
|
||||||
unsigned cycles = 0;
|
unsigned cycles = 0;
|
||||||
const unsigned maxCycles = 0x17;
|
const unsigned maxCycles = 0x0C;
|
||||||
|
|
||||||
for (int i = 0; i < 8; i++) {
|
for (int i = 0; i < 8; i++) {
|
||||||
if (!(this->_internalRegisters.dmaEnableRegister & (0xF << i)))
|
if (!(this->_internalRegisters.dmaEnableRegister & (0xF << i)))
|
||||||
|
|||||||
Reference in New Issue
Block a user