snookr10.cpp: Realigned the ASCII diagram about encryption,
messed up some time ago for some bulk changes.
This commit is contained in:
parent
90f166da8f
commit
f65c56c6c7
@ -206,15 +206,15 @@
|
||||
To properly decrypt the thing 'on the fly' as the hardware does, I applied a bitswap into TILE_GET_INFO.
|
||||
This method rearrange the tile number for each tile called to be drawn.
|
||||
|
||||
The final algorithm is:
|
||||
digit #3
|
||||
+-------+ swapped digits 1 & 2
|
||||
| | +-------+------+
|
||||
tile_offset = bitswap<16>((tile_offset & 0xfff),15,14,13,12, 8,9,10,11, 0,1,2,3, 4,5,6,7)
|
||||
| | | | | | | | || | | |
|
||||
inverted inverted|inverted
|
||||
bitorder bitorder|bitorder
|
||||
Colors are scrambled in the following way:
|
||||
The final algorithm is: +---- swapped ----+
|
||||
digit #3 digit #1 digit #2
|
||||
+-------+ +-----+ +-----+
|
||||
| | | | | |
|
||||
tile_offset = bitswap<16>((tile_offset & 0xfff),15,14,13,12, 8,9,10,11, 0,1,2,3, 4,5,6,7 )
|
||||
| | | | | | | | | | | |
|
||||
inverted inverted inverted
|
||||
bitorder bitorder bitorder
|
||||
Colors are scrambled in the following way:
|
||||
|
||||
Normal | Scrambled
|
||||
offset | offset
|
||||
@ -244,10 +244,10 @@
|
||||
1st nibble
|
||||
inverted bitorder
|
||||
| | | |
|
||||
color_index = bitswap<8>(color_index,4,5,6,7,2,3,0,1)
|
||||
color_index = bitswap<8>(color_index,4,5,6,7,2,3,0,1)
|
||||
<-> <->
|
||||
2nd nibble
|
||||
swappeed pairs
|
||||
swapped pairs
|
||||
|
||||
Scary, huh?... ;-)
|
||||
|
||||
@ -438,7 +438,7 @@
|
||||
|
||||
So, the algorithm to properly decrypt the color codes is the following one:
|
||||
|
||||
color_index = bitswap<8>(color_index,7,5,6,4,3,2,1,0)
|
||||
color_index = bitswap<8>(color_index,7,5,6,4,3,2,1,0)
|
||||
| |
|
||||
swapped
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user