summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/neogeo/prot_kof2k3bl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/bus/neogeo/prot_kof2k3bl.cpp')
-rw-r--r--src/devices/bus/neogeo/prot_kof2k3bl.cpp38
1 files changed, 19 insertions, 19 deletions
diff --git a/src/devices/bus/neogeo/prot_kof2k3bl.cpp b/src/devices/bus/neogeo/prot_kof2k3bl.cpp
index 35c2272fb3d..2806af3a45b 100644
--- a/src/devices/bus/neogeo/prot_kof2k3bl.cpp
+++ b/src/devices/bus/neogeo/prot_kof2k3bl.cpp
@@ -7,7 +7,7 @@
extern const device_type KOF2K3BL_PROT = &device_creator<kof2k3bl_prot_device>;
-kof2k3bl_prot_device::kof2k3bl_prot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+kof2k3bl_prot_device::kof2k3bl_prot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
device_t(mconfig, KOF2K3BL_PROT, "Neo Geo KOF 2003 Bootleg Protection", tag, owner, clock, "kof2k3bl_prot", __FILE__)
{}
@@ -45,10 +45,10 @@ WRITE16_MEMBER(kof2k3bl_prot_device::kof2003_w)
data = COMBINE_DATA(&m_cartridge_ram[offset]);
if (offset == 0x1ff0/2 || offset == 0x1ff2/2)
{
- UINT8* cr = (UINT8 *)m_cartridge_ram;
- UINT8 prt = cr[BYTE_XOR_LE(0x1ff2)];
+ uint8_t* cr = (uint8_t *)m_cartridge_ram;
+ uint8_t prt = cr[BYTE_XOR_LE(0x1ff2)];
m_bank_base = 0x100000 + ((cr[BYTE_XOR_LE(0x1ff3)] << 16) | (cr[BYTE_XOR_LE(0x1ff2)] << 8) | cr[BYTE_XOR_LE(0x1ff1)]);
- //UINT32 address = (cr[BYTE_XOR_LE(0x1ff3)] << 16) | (cr[BYTE_XOR_LE(0x1ff2)] << 8) | cr[BYTE_XOR_LE(0x1ff1)];
+ //uint32_t address = (cr[BYTE_XOR_LE(0x1ff3)] << 16) | (cr[BYTE_XOR_LE(0x1ff2)] << 8) | cr[BYTE_XOR_LE(0x1ff1)];
//m_bankdev->neogeo_set_main_cpu_bank_address(address+0x100000);
cr[BYTE_XOR_LE(0x1ff0)] = 0xa0;
@@ -64,10 +64,10 @@ WRITE16_MEMBER(kof2k3bl_prot_device::kof2003p_w)
data = COMBINE_DATA(&m_cartridge_ram[offset]);
if (offset == 0x1ff0/2 || offset == 0x1ff2/2)
{
- UINT8* cr = (UINT8 *)m_cartridge_ram;
- UINT8 prt = cr[BYTE_XOR_LE(0x1ff2)];
+ uint8_t* cr = (uint8_t *)m_cartridge_ram;
+ uint8_t prt = cr[BYTE_XOR_LE(0x1ff2)];
m_bank_base = 0x100000 + ((cr[BYTE_XOR_LE(0x1ff3)] << 16) | (cr[BYTE_XOR_LE(0x1ff2)] << 8) | cr[BYTE_XOR_LE(0x1ff0)]);
- //UINT32 address = (cr[BYTE_XOR_LE(0x1ff3)] << 16) | (cr[BYTE_XOR_LE(0x1ff2)] << 8) | cr[BYTE_XOR_LE(0x1ff0)];
+ //uint32_t address = (cr[BYTE_XOR_LE(0x1ff3)] << 16) | (cr[BYTE_XOR_LE(0x1ff2)] << 8) | cr[BYTE_XOR_LE(0x1ff0)];
//m_bankdev->neogeo_set_main_cpu_bank_address(address+0x100000);
cr[BYTE_XOR_LE(0x1ff0)] &= 0xfe;
@@ -77,12 +77,12 @@ WRITE16_MEMBER(kof2k3bl_prot_device::kof2003p_w)
}
}
-void kof2k3bl_prot_device::bl_px_decrypt(UINT8* cpurom, UINT32 cpurom_size)
+void kof2k3bl_prot_device::bl_px_decrypt(uint8_t* cpurom, uint32_t cpurom_size)
{
- static const UINT8 sec[] = { 0x07, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06 };
+ static const uint8_t sec[] = { 0x07, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06 };
int rom_size = 0x800000;
- UINT8 *rom = cpurom;
- std::vector<UINT8> buf(rom_size);
+ uint8_t *rom = cpurom;
+ std::vector<uint8_t> buf(rom_size);
memcpy(&buf[0], rom, rom_size);
for (int i = 0; i < rom_size / 0x100000; i++)
@@ -92,10 +92,10 @@ void kof2k3bl_prot_device::bl_px_decrypt(UINT8* cpurom, UINT32 cpurom_size)
/* The King of Fighters 2004 Plus / Hero (The King of Fighters 2003 bootleg) */
-void kof2k3bl_prot_device::pl_px_decrypt(UINT8* cpurom, UINT32 cpurom_size)
+void kof2k3bl_prot_device::pl_px_decrypt(uint8_t* cpurom, uint32_t cpurom_size)
{
- std::vector<UINT16> tmp(0x100000/2);
- UINT16*rom16 = (UINT16*)cpurom;
+ std::vector<uint16_t> tmp(0x100000/2);
+ uint16_t*rom16 = (uint16_t*)cpurom;
for (int i = 0; i < 0x700000/2; i += 0x100000/2)
{
@@ -113,20 +113,20 @@ void kof2k3bl_prot_device::pl_px_decrypt(UINT8* cpurom, UINT32 cpurom_size)
/* The King of Fighters 2004 Ultra Plus (The King of Fighters 2003 bootleg) */
-void kof2k3bl_prot_device::upl_px_decrypt(UINT8* cpurom, UINT32 cpurom_size)
+void kof2k3bl_prot_device::upl_px_decrypt(uint8_t* cpurom, uint32_t cpurom_size)
{
- UINT8 *src = cpurom;
+ uint8_t *src = cpurom;
memmove(src + 0x100000, src, 0x600000);
memmove(src, src + 0x700000, 0x100000);
- UINT8 *rom = cpurom + 0xfe000;
- UINT8 *buf = cpurom + 0xd0610;
+ uint8_t *rom = cpurom + 0xfe000;
+ uint8_t *buf = cpurom + 0xd0610;
for (int i = 0; i < 0x2000 / 2; i++)
{
int ofst = (i & 0xff00) + BITSWAP8((i & 0x00ff), 7, 6, 0, 4, 3, 2, 1, 5);
memcpy(&rom[i * 2], &buf[ofst * 2], 2);
}
- UINT16* rom16 = (UINT16*)cpurom;
+ uint16_t* rom16 = (uint16_t*)cpurom;
m_overlay = rom16[0x58196 / 2];
}