diff options
Diffstat (limited to 'src/mame/machine/decocrpt.cpp')
-rw-r--r-- | src/mame/machine/decocrpt.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/mame/machine/decocrpt.cpp b/src/mame/machine/decocrpt.cpp index 680481a3e52..dda584c2d76 100644 --- a/src/mame/machine/decocrpt.cpp +++ b/src/mame/machine/decocrpt.cpp @@ -46,13 +46,13 @@ Sotsugyo Shousho 1995 #include "emu.h" #include "machine/decocrpt.h" -static const UINT16 xor_masks[16] = +static const uint16_t xor_masks[16] = { 0xd556,0x73cb,0x2963,0x4b9a,0xb3bc,0xbc73,0xcbc9,0xaeb5, 0x1e6d,0xd5b5,0xe676,0x5cc5,0x395a,0xdaae,0x2629,0xe59e, }; -static const UINT8 swap_patterns[8][16] = +static const uint8_t swap_patterns[8][16] = { { 0xf,0x8,0x9,0xc,0xa,0xd,0xb,0xe, 0x2,0x7,0x4,0x3,0x1,0x5,0x6,0x0 }, { 0xc,0xa,0xb,0x9,0x8,0xf,0xe,0xd, 0x6,0x0,0x3,0x5,0x7,0x4,0x2,0x1 }, @@ -64,7 +64,7 @@ static const UINT8 swap_patterns[8][16] = { 0x9,0x8,0xe,0xa,0xf,0xb,0xd,0xc, 0x6,0x0,0x5,0x2,0x4,0x1,0x3,0x7 }, }; -static const UINT8 deco56_xor_table[0x800] = +static const uint8_t deco56_xor_table[0x800] = { 0, 1, 2, 3, 4, 5, 5, 6, 7, 8, 9,10, 7,11,11, 9,11, 3, 7,10,12,13, 3,14, 0, 0, 9, 0,15, 3, 4,14, 6, 3,14,14, 3,12, 3,13, 9, 5,13, 3, 8, 2, 7,14, 2, 5, 1, 2, 3, 4,14,11, 8, 0, 6, 7,10, 3, 4, 7, @@ -132,7 +132,7 @@ static const UINT8 deco56_xor_table[0x800] = 11, 6, 3, 0, 5,11,14,14,14, 4,13, 6,11, 6, 4,12,15, 2, 4, 1, 1, 5, 1,15, 7, 0, 5, 0, 0, 0,12, 1, }; -static const UINT16 deco56_address_table[0x800] = +static const uint16_t deco56_address_table[0x800] = { 0x527,0x1a1,0x2f6,0x523,0x297,0x005,0x141,0x3b4,0x539,0x794,0x6dd,0x498,0x59b,0x119,0x5db,0x631, 0x2f1,0x565,0x409,0x158,0x2d6,0x16e,0x571,0x0b9,0x543,0x52b,0x668,0x0c0,0x5fd,0x216,0x5ea,0x24e, @@ -264,7 +264,7 @@ static const UINT16 deco56_address_table[0x800] = 0x625,0x4bc,0x335,0x42b,0x5d8,0x07d,0x03f,0x089,0x7e9,0x07c,0x1cf,0x024,0x188,0x53b,0x2bf,0x726, }; -static const UINT8 deco56_swap_table[0x800] = +static const uint8_t deco56_swap_table[0x800] = { 4,0,7,2,0,0,7,2,0,1,6,3,2,2,2,2,0,5,6,3,7,0,0,5,1,1,1,7,1,0,0,0, 2,5,6,6,2,0,4,1,5,0,1,7,4,7,0,4,6,2,1,5,3,1,2,4,6,4,2,0,4,3,3,7, @@ -332,7 +332,7 @@ static const UINT8 deco56_swap_table[0x800] = 6,5,6,0,1,1,6,0,6,1,7,2,4,5,6,5,0,4,0,3,2,3,7,7,0,3,5,0,4,1,1,1, }; -static const UINT8 deco74_xor_table[0x800] = +static const uint8_t deco74_xor_table[0x800] = { 13,13, 0,10, 8,15,12, 0,10, 8,13,15,12, 3,15, 2,11, 1, 8,10,13, 4,10,12,11, 2, 0, 3, 0,11, 8,11, 5,14,11, 2, 5, 3, 8,11, 8,13,14, 4, 3,13,11,10,14, 6, 9,11,11, 8, 0,15, 2, 4, 5, 7,15, 8,13,11, @@ -400,7 +400,7 @@ static const UINT8 deco74_xor_table[0x800] = 7, 7,12, 5, 3,14, 1, 5, 1,10, 6, 7, 9, 8,15, 7,13,11, 4, 5, 4,10,14,14,12, 1,13,14,15,14,15,10, }; -static const UINT16 deco74_address_table[0x800] = +static const uint16_t deco74_address_table[0x800] = { 0x526,0x684,0x15f,0x1ad,0x736,0x341,0x4c3,0x23c,0x3eb,0x01f,0x18e,0x375,0x029,0x227,0x707,0x506, 0x5ce,0x0dc,0x5dc,0x5fd,0x15c,0x013,0x7b9,0x3c1,0x77d,0x1eb,0x53d,0x4a9,0x66e,0x0a9,0x4e2,0x361, @@ -532,7 +532,7 @@ static const UINT16 deco74_address_table[0x800] = 0x174,0x060,0x674,0x6ec,0x7bb,0x288,0x6ee,0x737,0x34c,0x617,0x4bc,0x5d5,0x78c,0x465,0x126,0x626, }; -static const UINT8 deco74_swap_table[0x800] = +static const uint8_t deco74_swap_table[0x800] = { 2,7,5,7,1,1,4,4,7,5,6,7,7,3,4,3,0,2,1,3,0,4,7,7,2,5,3,1,4,4,6,7, 6,7,4,5,1,3,0,3,7,2,5,0,1,5,2,1,4,0,6,1,1,2,4,2,1,0,6,5,2,6,4,6, @@ -600,11 +600,11 @@ static const UINT8 deco74_swap_table[0x800] = 4,7,2,2,1,3,4,4,1,7,0,2,5,4,7,3,7,6,1,5,6,0,7,4,1,1,5,2,2,6,7,2, }; -static void deco_decrypt(running_machine &machine,const char *rgntag,const UINT8 *xor_table,const UINT16 *address_table,const UINT8 *swap_table,int remap_only) +static void deco_decrypt(running_machine &machine,const char *rgntag,const uint8_t *xor_table,const uint16_t *address_table,const uint8_t *swap_table,int remap_only) { - UINT16 *rom = (UINT16 *)machine.root_device().memregion(rgntag)->base(); + uint16_t *rom = (uint16_t *)machine.root_device().memregion(rgntag)->base(); int len = machine.root_device().memregion(rgntag)->bytes()/2; - std::vector<UINT16> buffer(len); + std::vector<uint16_t> buffer(len); int i; /* we work on 16-bit words but data is loaded as 8-bit, so swap bytes on LSB machines */ |