summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/neopcb.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/neopcb.cpp')
-rw-r--r--src/mame/drivers/neopcb.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/mame/drivers/neopcb.cpp b/src/mame/drivers/neopcb.cpp
index ae05d6209f0..ca7c8a084b2 100644
--- a/src/mame/drivers/neopcb.cpp
+++ b/src/mame/drivers/neopcb.cpp
@@ -250,7 +250,7 @@ void neopcb_state::svcpcb_gfx_decrypt()
for (int i = 0; i < rom_size; i += 4)
{
uint32_t rom32 = rom[i] | rom[i+1]<<8 | rom[i+2]<<16 | rom[i+3]<<24;
- rom32 = BITSWAP32(rom32, 0x09, 0x0d, 0x13, 0x00, 0x17, 0x0f, 0x03, 0x05, 0x04, 0x0c, 0x11, 0x1e, 0x12, 0x15, 0x0b, 0x06, 0x1b, 0x0a, 0x1a, 0x1c, 0x14, 0x02, 0x0e, 0x1d, 0x18, 0x08, 0x01, 0x10, 0x19, 0x1f, 0x07, 0x16);
+ rom32 = bitswap<32>(rom32, 0x09, 0x0d, 0x13, 0x00, 0x17, 0x0f, 0x03, 0x05, 0x04, 0x0c, 0x11, 0x1e, 0x12, 0x15, 0x0b, 0x06, 0x1b, 0x0a, 0x1a, 0x1c, 0x14, 0x02, 0x0e, 0x1d, 0x18, 0x08, 0x01, 0x10, 0x19, 0x1f, 0x07, 0x16);
buf[i] = rom32 & 0xff;
buf[i+1] = (rom32>>8) & 0xff;
buf[i+2] = (rom32>>16) & 0xff;
@@ -259,7 +259,7 @@ void neopcb_state::svcpcb_gfx_decrypt()
for (int i = 0; i < rom_size / 4; i++)
{
- int ofst = BITSWAP24((i & 0x1fffff), 0x17, 0x16, 0x15, 0x04, 0x0b, 0x0e, 0x08, 0x0c, 0x10, 0x00, 0x0a, 0x13, 0x03, 0x06, 0x02, 0x07, 0x0d, 0x01, 0x11, 0x09, 0x14, 0x0f, 0x12, 0x05);
+ int ofst = bitswap<24>((i & 0x1fffff), 0x17, 0x16, 0x15, 0x04, 0x0b, 0x0e, 0x08, 0x0c, 0x10, 0x00, 0x0a, 0x13, 0x03, 0x06, 0x02, 0x07, 0x0d, 0x01, 0x11, 0x09, 0x14, 0x0f, 0x12, 0x05);
ofst ^= 0x0c8923;
ofst += (i & 0xffe00000);
memcpy(&rom[i * 4], &buf[ofst * 4], 0x04);
@@ -274,7 +274,7 @@ void neopcb_state::svcpcb_s1data_decrypt()
size_t s1_size = memregion("fixed")->bytes();
for (int i = 0; i < s1_size; i++) // Decrypt S
- s1[i] = BITSWAP8(s1[i] ^ 0xd2, 4, 0, 7, 2, 5, 1, 6, 3);
+ s1[i] = bitswap<8>(s1[i] ^ 0xd2, 4, 0, 7, 2, 5, 1, 6, 3);
}
@@ -294,7 +294,7 @@ void neopcb_state::kf2k3pcb_gfx_decrypt()
for (int i = 0; i < rom_size; i +=4)
{
uint32_t rom32 = rom[i] | rom[i+1]<<8 | rom[i+2]<<16 | rom[i+3]<<24;
- rom32 = BITSWAP32(rom32, 0x09, 0x0d, 0x13, 0x00, 0x17, 0x0f, 0x03, 0x05, 0x04, 0x0c, 0x11, 0x1e, 0x12, 0x15, 0x0b, 0x06, 0x1b, 0x0a, 0x1a, 0x1c, 0x14, 0x02, 0x0e, 0x1d, 0x18, 0x08, 0x01, 0x10, 0x19, 0x1f, 0x07, 0x16);
+ rom32 = bitswap<32>(rom32, 0x09, 0x0d, 0x13, 0x00, 0x17, 0x0f, 0x03, 0x05, 0x04, 0x0c, 0x11, 0x1e, 0x12, 0x15, 0x0b, 0x06, 0x1b, 0x0a, 0x1a, 0x1c, 0x14, 0x02, 0x0e, 0x1d, 0x18, 0x08, 0x01, 0x10, 0x19, 0x1f, 0x07, 0x16);
buf[i] = rom32 & 0xff;
buf[i+1] = (rom32>>8) & 0xff;
buf[i+2] = (rom32>>16) & 0xff;
@@ -303,7 +303,7 @@ void neopcb_state::kf2k3pcb_gfx_decrypt()
for (int i = 0; i < rom_size; i+=4)
{
- int ofst = BITSWAP24((i & 0x7fffff), 0x17, 0x15, 0x0a, 0x14, 0x13, 0x16, 0x12, 0x11, 0x10, 0x0f, 0x0e, 0x0d, 0x0c, 0x0b, 0x09, 0x08, 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00);
+ int ofst = bitswap<24>((i & 0x7fffff), 0x17, 0x15, 0x0a, 0x14, 0x13, 0x16, 0x12, 0x11, 0x10, 0x0f, 0x0e, 0x0d, 0x0c, 0x0b, 0x09, 0x08, 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00);
ofst ^= 0x000000;
ofst += (i & 0xff800000);
memcpy(&rom[ofst], &buf[i], 0x04);
@@ -333,7 +333,7 @@ void neopcb_state::kf2k3pcb_decrypt_s1data()
dst = memregion("fixed")->base();
for (int i = 0; i < tx_size; i++)
- dst[i] = BITSWAP8(dst[i] ^ 0xd2, 4, 0, 7, 2, 5, 1, 6, 3);
+ dst[i] = bitswap<8>(dst[i] ^ 0xd2, 4, 0, 7, 2, 5, 1, 6, 3);
}
@@ -498,7 +498,7 @@ DRIVER_INIT_MEMBER(neopcb_state, kf2k3pcb)
// incorrect
uint8_t* rom = memregion("audiocpu")->base();
for (int i = 0; i < 0x90000; i++)
- rom[i] = BITSWAP8(rom[i], 5, 6, 1, 4, 3, 0, 7, 2);
+ rom[i] = bitswap<8>(rom[i], 5, 6, 1, 4, 3, 0, 7, 2);
kf2k3pcb_gfx_decrypt();
m_cmc_prot->cmc50_gfx_decrypt(spr_region, spr_region_size, KOF2003_GFX_KEY);