| 92 | } |
| 93 | |
| 94 | static u32 GBIMicrocode_MicrocodeHash(u32 code_base, u32 code_size) |
| 95 | { |
| 96 | // Needed for Conker's Bad Fur Day |
| 97 | if( code_size == 0 ) code_size = 0x1000; |
| 98 | |
| 99 | const u8 * ram( g_pu8RamBase ); |
| 100 | |
| 101 | u32 hash {}; |
| 102 | for (u32 i = 0; i < code_size; ++i) |
| 103 | { |
| 104 | hash = (hash << 4) + hash + ram[ (code_base+i) ^ U8_TWIDDLE ]; // Best hash ever! |
| 105 | } |
| 106 | return hash; |
| 107 | } |
| 108 | |
| 109 | void GBIMicrocode_Reset() |
| 110 | { |
no outgoing calls
no test coverage detected