mirror of
https://github.com/Luigi30/FruitMachine-Swift.git
synced 2024-11-26 21:52:45 +00:00
added missing flag settings
This commit is contained in:
parent
6f1027f788
commit
944f51a186
@ -169,6 +169,9 @@ class Opcodes: NSObject {
|
||||
|
||||
static func TSX(state: CPUState, addressingMode: AddressingMode) -> Void {
|
||||
state.index_x = state.stack_pointer
|
||||
|
||||
state.updateZeroFlag();
|
||||
state.updateNegativeFlag();
|
||||
}
|
||||
|
||||
static func PHA(state: CPUState, addressingMode: AddressingMode) -> Void {
|
||||
@ -179,6 +182,9 @@ class Opcodes: NSObject {
|
||||
static func PLA(state: CPUState, addressingMode: AddressingMode) -> Void {
|
||||
state.stack_pointer = state.stack_pointer &+ 1
|
||||
state.accumulator = state.memoryInterface.readByte(offset: 0x0100 | UInt16(state.stack_pointer))
|
||||
|
||||
state.updateZeroFlag();
|
||||
state.updateNegativeFlag();
|
||||
}
|
||||
|
||||
static func PHP(state: CPUState, addressingMode: AddressingMode) -> Void {
|
||||
|
Loading…
Reference in New Issue
Block a user