From f65c56c6c7685d502502ea8cc9d80d0e47ab36bf Mon Sep 17 00:00:00 2001 From: Roberto Fresca Date: Sat, 30 Apr 2022 05:24:06 +0200 Subject: snookr10.cpp: Realigned the ASCII diagram about encryption, messed up some time ago for some bulk changes. --- src/mame/drivers/snookr10.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/mame/drivers/snookr10.cpp b/src/mame/drivers/snookr10.cpp index 94d9be40781..b4ddb6245ea 100644 --- a/src/mame/drivers/snookr10.cpp +++ b/src/mame/drivers/snookr10.cpp @@ -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 -- cgit v1.2.3