...
This commit is contained in:
@@ -138,3 +138,81 @@ BCC
|
|||||||
CLC SEC CLI SEI CLD SED CLV
|
CLC SEC CLI SEI CLD SED CLV
|
||||||
===========================
|
===========================
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
MICROINSTRUCTIONS
|
||||||
|
===========================================
|
||||||
|
|
||||||
|
FetchOpcode
|
||||||
|
DoOpcodeWork();
|
||||||
|
IR = Mem::Read(PC++);
|
||||||
|
Decode();
|
||||||
|
ResetState();
|
||||||
|
|
||||||
|
FakeFetchOperand
|
||||||
|
Address.Lo = Mem::Read(PC);
|
||||||
|
|
||||||
|
FetchOperandLo
|
||||||
|
Address.Lo = B = Mem::Read(PC++);
|
||||||
|
|
||||||
|
FetchOperandHi
|
||||||
|
Address.Hi = Mem::Read(PC++);
|
||||||
|
|
||||||
|
FetchOperandHiAndIndex
|
||||||
|
Address.Hi = Mem::Read(PC++);
|
||||||
|
if (Address.Lo+X/Y > 255) pageCrossed = true;
|
||||||
|
Address.Lo += X/Y;
|
||||||
|
|
||||||
|
ReadAddress
|
||||||
|
B = Mem::Read(Address);
|
||||||
|
if (pageCrossed) Address += 0x0100;
|
||||||
|
|
||||||
|
ReadAddressAndSkip
|
||||||
|
B = Mem::Read(Address);
|
||||||
|
if (pageCrossed)
|
||||||
|
Address += 0x0100;
|
||||||
|
else
|
||||||
|
InsertFetchOpcode();
|
||||||
|
|
||||||
|
IndexX
|
||||||
|
B = Mem::Read(Address);
|
||||||
|
Address.Lo += X;
|
||||||
|
|
||||||
|
FetchAddressLo
|
||||||
|
T = Mem::Read(Address++);
|
||||||
|
|
||||||
|
FetchAddressHi
|
||||||
|
Address.Hi = Mem::Read(Address);
|
||||||
|
Address.Lo = T;
|
||||||
|
|
||||||
|
FetchAddressHiAndIndex
|
||||||
|
Address.Hi = Mem::Read(Address);
|
||||||
|
pageCrossed = (T+Y > 255);
|
||||||
|
Address.Lo = T+Y;
|
||||||
|
|
||||||
|
WriteRegister
|
||||||
|
if ((IR&3)==1) Mem::Write(Address, rA);
|
||||||
|
else if ((IR&3)==2) Mem::Write(Address, rX);
|
||||||
|
else if ((IR&3)==0) Mem::Write(Address, rY);
|
||||||
|
|
||||||
|
WriteAddress
|
||||||
|
Mem::Write(Address, B);
|
||||||
|
DoOpcodeWork();
|
||||||
|
|
||||||
|
CheckIfTaken
|
||||||
|
FakeFetchOperand();
|
||||||
|
If (!condition)
|
||||||
|
InsertFetchOpcode();
|
||||||
|
else
|
||||||
|
T = PC.Hi;
|
||||||
|
PC = PC +(int8_t)B;
|
||||||
|
|
||||||
|
CheckIfPageCrossed
|
||||||
|
FakeFetchOperand();
|
||||||
|
if (PC.Hi == T)
|
||||||
|
InsertFetchOpCode();
|
||||||
|
else
|
||||||
|
pageCrossed = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user