Emulator behavior differences: Difference between revisions
→GB/GBC: Trying to put the footnotes (detailed explanations) into separate subsections with hyperlinks for navigation.
(→Overview: Added the "Non-executable memory sections" column, changed the column header format (spaces and capitalization), and used red color to mark up the fail (different) cases.) |
(→GB/GBC: Trying to put the footnotes (detailed explanations) into separate subsections with hyperlinks for navigation.) |
||
Line 6:
{| class=wikitable
! Platform !!
|-
| Game Boy Color (CGB-001) ||
|-
| Game Boy Advance SP (AGS-001) ||
|-
| Game Boy Player ||
|-
| 3DS Virtual Console || [[#gb-invalid-opcode-vc|{{color|red|
|-
| Stadium 2 GB Tower ||
|-
| bgb 1.4.1 ||
|-
| VBA-RR v24 svn440 ||
|-
| VBA 1.7.2 ||
|-
| MyOldBoy v1.1.0 || [[#gb-invalid-opcode-ignore|{{color|red|
|-
| LameboyDS v0.12 || [[#gb-invalid-opcode-ignore|{{color|red|
|}
1 - the emulator breaks into a debugger every time an undefined opcode is encountered▼
2 - brings up the infamous message "unknown opcode xx at yyyy"▼
▲3 - the result is 127 instead of 124 - this behavior needs to be more thoroughly investigated
=== Invalid opcodes ===
▲6 - (probably) always returns 0
Out of all 256 possible values for a byte, most are defined as the opcode for some GB ASM instruction (as a special case, 0xCB is defined as the first byte of a group of two-byte ASM instructions). However, there are 11 '''invalid opcodes''', i.e. byte values that don't correspond to any assembly instruction, namely 0xD3, 0xDB, 0xDD, 0xE3, 0xE4, 0xEB, 0xEC, 0xED, 0xF4, 0xFC, and 0xFD.
* {{anchor|gb-invalid-opcode-consoles}}On real consoles, invalid opcodes hangs the game completely, hard-locking the CPU. The screen freezes as is, and the game audio becomes "stuck" on the note that was playing at the time of the freeze, if any.
7 - displays a message: "The saved data has been corrupted, so it is impossible to CONTINUE. Please reset the game and choose NEW GAME", the save is not corrupted though▼
* Some emulators display an error message upon encountering an invalid opcode, in addition to freezing the game. Since the real console would be unable to take input or generate meaningful output anyway, this is not considered an emulation inaccuracy.
▲
▲8 - (probably) always returns 255 - so VRAM access is enabled not during the V-Blank period, but during the V-Blank interrupt, which changes things dramatically
▲
▲
▲9 - some other data seems to be stored in the echo RAM area
* {{anchor|gb-invalid-opcode-ignore}}Some emulators silently ignore invalid opcodes, which '''is''' considered an emulation inaccuracy since this may cause glitches to exhibit behaviors that do not happen on real hardware, possibly destructive (e.g. corruption of the save file).
** {{anchor|gb-invalid-opcode-vc}}In particular, the 3DS Virtual Console ignores invalid opcodes, probably because the emulator hooks them to communicate with the hardware, essentially using them as an extension of the GB ASM instruction set.
▲10 - some corrupted stops work, some not - this is to be expected with undefined behavior
== References ==
|