Reset resets the CPU to its initial powerup state
()
| 259 | |
| 260 | // Reset resets the CPU to its initial powerup state |
| 261 | func (cpu *CPU) Reset() { |
| 262 | cpu.PC = cpu.Read16(0xFFFC) |
| 263 | cpu.SP = 0xFD |
| 264 | cpu.SetFlags(0x24) |
| 265 | } |
| 266 | |
| 267 | // PrintInstruction prints the current CPU state |
| 268 | func (cpu *CPU) PrintInstruction() { |