summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/machine/gaelcrpt.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/machine/gaelcrpt.cpp')
-rw-r--r--src/mame/machine/gaelcrpt.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mame/machine/gaelcrpt.cpp b/src/mame/machine/gaelcrpt.cpp
index 2dbe0f1153f..32166390e02 100644
--- a/src/mame/machine/gaelcrpt.cpp
+++ b/src/mame/machine/gaelcrpt.cpp
@@ -20,10 +20,10 @@ static int decrypt(int const param1, int const param2, int const enc_prev_word,
switch (swap)
{
- case 0: res = BITSWAP16(enc_word, 1, 2, 0,14,12,15, 4, 8,13, 7, 3, 6,11, 5,10, 9); break;
- case 1: res = BITSWAP16(enc_word, 14,10, 4,15, 1, 6,12,11, 8, 0, 9,13, 7, 3, 5, 2); break;
- case 2: res = BITSWAP16(enc_word, 2,13,15, 1,12, 8,14, 4, 6, 0, 9, 5,10, 7, 3,11); break;
- case 3: res = BITSWAP16(enc_word, 3, 8, 1,13,14, 4,15, 0,10, 2, 7,12, 6,11, 9, 5); break;
+ case 0: res = bitswap<16>(enc_word, 1, 2, 0,14,12,15, 4, 8,13, 7, 3, 6,11, 5,10, 9); break;
+ case 1: res = bitswap<16>(enc_word, 14,10, 4,15, 1, 6,12,11, 8, 0, 9,13, 7, 3, 5, 2); break;
+ case 2: res = bitswap<16>(enc_word, 2,13,15, 1,12, 8,14, 4, 6, 0, 9, 5,10, 7, 3,11); break;
+ case 3: res = bitswap<16>(enc_word, 3, 8, 1,13,14, 4,15, 0,10, 2, 7,12, 6,11, 9, 5); break;
}
res ^= param2;
@@ -117,7 +117,7 @@ static int decrypt(int const param1, int const param2, int const enc_prev_word,
res ^= (param1 << 6) | (param1 << 11);
- return BITSWAP16(res, 2,6,0,11,14,12,7,10,5,4,8,3,9,1,13,15);
+ return bitswap<16>(res, 2,6,0,11,14,12,7,10,5,4,8,3,9,1,13,15);
}