Invalid sound banks examination
Posted by: ISSOtm
Date: 2016-07-18 09:29:58
Here is the bot's source (in C) : http://pastebin.com/DzFuWzz9
Here is the report for Pokémon Yellow : http://pastebin.com/RpEDNEyX
Obviously, it is extremely bulky, and is often wrong when the bank doesn't immediately crash, but at least it helps.
Pokémon Yellow results :
[table]
[tr]
[td]Bank #[/td][td]Effect / Commentary[/td]
[/tr]
[tr]
[td]00 / 01[/td][td]TheZZAZZGlitch pointed out : it tries to learn an invalid move forever.[/td]
[/tr]
[tr]
[td]03[/td][td]Crashes (STOP).[/td]
[/tr]
[tr]
[td]04[/td][td]Crashes (invalid opcode F4).[/td]
[/tr]
[tr]
[td]05[/td][td]To investigate.[/td]
[/tr]
[tr]
[td]06[/td][td]NOP slides into VRAM. High chances to crash.[/td]
[/tr]
[tr]
[td]07[/td][td]NOP slides into VRAM. High chances to crash.[/td]
[/tr]
[tr]
[td]09[/td][td]Does a bunch of stuff. Should be investigated.[/td]
[/tr]
[tr]
[td]0A[/td][td]To investigate.[/td]
[/tr]
[tr]
[td]0B[/td][td]Writes ((a OR h + c) XOR $FF) to hl + 1, then returns. (UNSURE)[/td]
[/tr]
[tr]
[td]0C[/td][td]Crashes (rst 38h).[/td]
[/tr]
[tr]
[td]0D[/td][td]If the Z flag is set, returns. Otherwise crashes (rst 18h).[/td]
[/tr]
[tr]
[td]0E[/td][td]Maybe returns, otherwise crashes (invalid opcode D3). (To investigate)[/td]
[/tr]
[tr]
[td]0F[/td][td]Returns nicely.[/td]
[/tr]
[tr]
[td]10[/td][td]NOP slides into VRAM. High chances to crash.[/td]
[/tr]
[tr]
[td]11[/td][td]Does some memory writes, HALTs a lot, returns if D72C bit 4 is nonzero, otherwise does stuff that should be investigated.[/td]
[/tr]
[tr]
[td]12[/td][td]NOP slides into VRAM. High chances to crash.[/td]
[/tr]
[tr]
[td]13[/td][td]Crashes (rst 30h).[/td]
[/tr]
[tr]
[td]14 to 18[/td][td]NOP slides into VRAM. High chances to crash.[/td]
[/tr]
[tr]
[td]19[/td][td]Crashes (rst 38h).[/td]
[/tr]
[tr]
[td]1A[/td][td]To investigate, but does a bunch of lds.[/td]
[/tr]
[tr]
[td]1B[/td][td]Decrements sp, does a bunch of stuff, to investigate.[/td]
[/tr]
[tr]
[td]1C[/td][td]Crashes (rst 38h).[/td]
[/tr]
[tr]
[td]1D[/td][td]NOP slides into VRAM. High chances to crash.[/td]
[/tr]
[tr]
[td]1E[/td][td]To investigate.[/td]
[/tr]
[tr]
[td]21 and 22[/td][td]NOP slide to VRAM. High chances of crashing.[/td]
[/tr]
[tr]
[td]23[/td][td]Runs a RRA, sends that value to FF3F (some sound thing), then returns if that RRA was nonzero (I guess it is ?).[/td]
[/tr]
[tr]
[td]24[/td][td]NOP slides into VRAM. High chances to crash.[/td]
[/tr]
[tr]
[td]25[/td][td]Crashes (rst 38h).[/td]
[/tr]
[tr]
[td]26[/td][td]Crashes (rst 20h).[/td]
[/tr]
[tr]
[td]27[/td][td]Crashes (invalid opcode F4).[/td]
[/tr]
[tr]
[td]28 to 2A[/td][td]Crash (rst 20h).[/td]
[/tr]
[tr]
[td]2B[/td][td]Crashes (invalid opcode F4).[/td]
[/tr]
[tr]
[td]2C[/td][td]Crashes (rst 20h).[/td]
[/tr]
[tr]
[td]2D[/td][td]Does a lot of stuff (including adding $A8 to SP), then possibly slides into VRAM. To investigate.[/td]
[/tr]
[tr]
[td]2E[/td][td]Crashes (invalid opcode F4).[/td]
[/tr]
[tr]
[td]2F[/td][td]
[/tr]
[tr]
[td]30[/td][td]Crashes (rst 38h).[/td]
[/tr]
[tr]
[td]31[/td][td]Does a RRCA, and returns if that is nonzero. If it is, add 0F to SP, and returns if the RRCA + b is nonzero. Otherwise crashes (invalid opcode FC).[/td]
[/tr]
[tr]
[td]32[/td][td]Crashes (rst 38h).[/td]
[/tr]
[tr]
[td]33[/td][td]Crashes (invalid opcode FC).[/td]
[/tr]
[tr]
[td]34[/td][td]NOP slides into VRAM. High chances of crashing.[/td]
[/tr]
[tr]
[td]35[/td][td]Crashes (rst 28h).[/td]
[/tr]
[tr]
[td]36 to 38[/td][td]Crash (rst 38h).[/td]
[/tr]
[tr]
[td]39[/td][td]Crashes (invalid opcode FC).[/td]
[/tr]
[tr]
[td]3A and 3B[/td][td]NOP slide into VRAM. High chances of crashing.[/td]
[/tr]
[tr]
[td]3C[/td][td]ret nc, otherwise crashes.[/td]
[/tr]
[tr]
[td]3D[/td][td]NOP slides into VRAM. High chances of crashing.[/td]
[/tr]
[tr]
[td]3E[/td][td]To investigate.[/td]
[/tr]
[tr]
[td]3F[/td][td]Crashes (invalid opcode FC)[/td]
[/tr]
[tr]
[td]40 to 7F[/td][td]Crashes (rst 38h).[/td]
[/tr]
[/table]
To summarize, here are the banks that do not crash or NOP slide :
00/01, 05, 09, 0B, 0D, 0E, 0F, 11, 1A, 1B, 1E, 23, 2D, 2F, 31, 3C and 3E.
Here are the banks that should be investigated :
05, 09, 0B, 0E, 11, 1A, 1B, 23, 2D, 2F, and 3E.