diff options
Diffstat (limited to 'src/devices/bus/neogeo/prot_kof2k2.cpp')
-rw-r--r-- | src/devices/bus/neogeo/prot_kof2k2.cpp | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/src/devices/bus/neogeo/prot_kof2k2.cpp b/src/devices/bus/neogeo/prot_kof2k2.cpp index 5e1acf05bd6..75b79172d29 100644 --- a/src/devices/bus/neogeo/prot_kof2k2.cpp +++ b/src/devices/bus/neogeo/prot_kof2k2.cpp @@ -4,8 +4,6 @@ #include "emu.h" #include "prot_kof2k2.h" -#include <algorithm> - DEFINE_DEVICE_TYPE(NG_KOF2002_PROT, kof2002_prot_device, "ng_kof2002_prot", "Neo Geo KoF 2002 Protection") @@ -30,11 +28,10 @@ void kof2002_prot_device::kof2002_decrypt_68k(uint8_t* cpurom, uint32_t cpurom_s static const int sec[]={0x100000,0x280000,0x300000,0x180000,0x000000,0x380000,0x200000,0x080000}; uint8_t *src = cpurom + 0x100000; std::vector<uint8_t> dst(0x400000); - - std::copy(&src[0], &src[0x400000], dst.begin()); + memcpy(&dst[0], src, 0x400000); for (int i = 0; i < 8; ++i) - std::copy(&dst[sec[i]], &dst[sec[i]+0x80000], src + i * 0x80000); + memcpy(src + i * 0x80000, &dst[sec[i]], 0x80000); } @@ -43,11 +40,10 @@ void kof2002_prot_device::matrim_decrypt_68k(uint8_t* cpurom, uint32_t cpurom_si static const int sec[]={0x100000,0x280000,0x300000,0x180000,0x000000,0x380000,0x200000,0x080000}; uint8_t *src = cpurom + 0x100000; std::vector<uint8_t> dst(0x400000); - - std::copy(&src[0], &src[0x400000], dst.begin()); + memcpy(&dst[0], src, 0x400000); for (int i = 0; i < 8; ++i) - std::copy(&dst[sec[i]], &dst[sec[i]+0x80000], src + i * 0x80000); + memcpy(src + i * 0x80000, &dst[sec[i]], 0x80000); } @@ -56,11 +52,9 @@ void kof2002_prot_device::samsho5_decrypt_68k(uint8_t* cpurom, uint32_t cpurom_s static const int sec[]={0x000000,0x080000,0x700000,0x680000,0x500000,0x180000,0x200000,0x480000,0x300000,0x780000,0x600000,0x280000,0x100000,0x580000,0x400000,0x380000}; uint8_t *src = cpurom; std::vector<uint8_t> dst(0x800000); - - std::copy(&src[0], &src[0x800000], dst.begin()); - + memcpy(&dst[0], src, 0x800000); for (int i = 0; i < 16; ++i) - std::copy(&dst[sec[i]], &dst[sec[i]+0x80000], src + i * 0x80000); + memcpy(src + i * 0x80000, &dst[sec[i]], 0x80000); } @@ -70,8 +64,7 @@ void kof2002_prot_device::samsh5sp_decrypt_68k(uint8_t* cpurom, uint32_t cpurom_ uint8_t *src = cpurom; std::vector<uint8_t> dst(0x800000); - std::copy(&src[0], &src[0x800000], dst.begin()); - + memcpy(&dst[0], src, 0x800000); for (int i = 0; i < 16; ++i) - std::copy(&dst[sec[i]], &dst[sec[i]+0x80000], src + i * 0x80000); + memcpy(src + i * 0x80000, &dst[sec[i]], 0x80000); } |