MCPcopy Create free account
hub / github.com/DaedalusX64/daedalus / CorrectSwap

Method CorrectSwap

Source/Utility/ROMFile.cpp:121–140  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

119}
120
121void ROMFile::CorrectSwap( u8 * p_bytes, u32 length )
122{
123 switch (mHeaderMagic)
124 {
125 case 0x80371240:
126 // Pre byteswapped - no need to do anything
127 break;
128 case 0x40123780:
129 ByteSwap_3210( p_bytes, length );
130 break;
131 case 0x12408037:
132 ByteSwap_2301( p_bytes, length );
133 break;
134 default:
135 #ifdef DAEDALUS_DEBUG_CONSOLE
136 DAEDALUS_ERROR( "Unhandled swapping mode: %08x", mHeaderMagic );
137 #endif
138 break;
139 }
140}
141
142// Swap bytes from 37 80 40 12
143// to 40 12 37 80

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected