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
(→Reference: Clark link) |
(→References: removed:) |
||
Line 15: | Line 15: | ||
=== References === | === References === | ||
* Figure 17.3, [[Eyes & Lichty]] page 377, https://archive.org/details/0893037893ProgrammingThe65816/page/377 | * Figure 17.3, [[Eyes & Lichty]] page 377, https://archive.org/details/0893037893ProgrammingThe65816/page/377 | ||
* Clark, Bruce. http://www.6502.org/tutorials/65c816opcodes.html#APPENDIX | * Clark, Bruce. http://www.6502.org/tutorials/65c816opcodes.html#APPENDIX | ||
[[Category:SNES Hardware]] | [[Category:SNES Hardware]] | ||
[[Category:ASM]] | [[Category:ASM]] | ||
[[Category:Flags]] | [[Category:Flags]] |
Revision as of 22:36, 22 July 2024
The Emulation Mode Flag (E) 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.
The 65c816 does not attempt to emulate the illegal 6502 opcodes.
For writing new SNES code it is recommended to always stay in native mode even if dealing with 8 bit data. One reason is page boundary crossing incur a one cycle penalty in emulation mode.
References
- Figure 17.3, Eyes & Lichty page 377, https://archive.org/details/0893037893ProgrammingThe65816/page/377
- Clark, Bruce. http://www.6502.org/tutorials/65c816opcodes.html#APPENDIX