We've just updated MediaWiki and its underlying software. If anything doesn't look or work quite right, please mention it to us. --RanAS

Emulation Mode Flag: Difference between revisions

From SnesLab
Jump to: navigation, search
(Added relation about RESET and emulation mode.)
(added E&L link)
Line 1: Line 1:
The '''Emulation Mode flag''' controls whether the [[65c816]] is behaving like a 6502.
The '''Emulation Mode flag''' controls whether the [[65c816]] is behaving like a 6502.


When clear, the MPU is in 65c816 native mode.
When clear, the MPU is in '''65c816 native mode.'''


When set, the MPU is in 6502 emulation mode.
When set, the MPU is in '''6502 emulation mode.'''


This flag cannot be modified directly and is normally hidden from the programmer.  To modify it, use the [[XCE]] instruction to swap its value with the carry flag's value.
This flag cannot be modified directly and is normally hidden from the programmer.  To modify it, use the [[XCE]] instruction to swap its value with the carry flag's value.


The flag is set when a [[RESET]] interrupt is fired. In other words, the CPU always starts in emulation mode at boot and after a reset.
The flag is set when a [[RESET]] interrupt is fired. In other words, the CPU always starts in emulation mode at boot and after a reset.
=== Reference ===
* [[Eyes & Lichty]] https://archive.org/details/0893037893ProgrammingThe65816/page/n403


[[Category:SNES Hardware]]
[[Category:SNES Hardware]]
[[Category:ASM]]
[[Category:ASM]]

Revision as of 08:38, 21 November 2023

The Emulation Mode flag controls whether the 65c816 is behaving like a 6502.

When clear, the MPU is in 65c816 native mode.

When set, the MPU is in 6502 emulation mode.

This flag cannot be modified directly and is normally hidden from the programmer. To modify it, use the XCE instruction to swap its value with the carry flag's value.

The flag is set when a RESET interrupt is fired. In other words, the CPU always starts in emulation mode at boot and after a reset.

Reference