1 // license:BSD-3-Clause
2 // copyright-holders:S. Smith,David Haywood,Fabio Priuli
3
4 #ifndef MAME_BUS_NEOGEO_PROT_MISC_H
5 #define MAME_BUS_NEOGEO_PROT_MISC_H
6
7 #pragma once
8
DECLARE_DEVICE_TYPE(NEOBOOT_PROT,neoboot_prot_device)9 DECLARE_DEVICE_TYPE(NEOBOOT_PROT, neoboot_prot_device)
10
11
12 class neoboot_prot_device : public device_t
13 {
14 public:
15 // construction/destruction
16 neoboot_prot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
17
18 void cx_decrypt(uint8_t* sprrom, uint32_t sprrom_size);
19 void sx_decrypt(uint8_t* fixed, uint32_t fixed_size, int value);
20
21 void kof97oro_px_decode(uint8_t* cpurom, uint32_t cpurom_size);
22
23 void kf10thep_px_decrypt(uint8_t* cpurom, uint32_t cpurom_size);
24
25 void kf2k5uni_px_decrypt(uint8_t* cpurom, uint32_t cpurom_size);
26 void kf2k5uni_sx_decrypt(uint8_t* fixedrom, uint32_t fixedrom_size);
27 void kf2k5uni_mx_decrypt(uint8_t* audiorom, uint32_t audiorom_size);
28
29 void decrypt_kof2k4se_68k(uint8_t* cpurom, uint32_t cpurom_size);
30
31 void lans2004_vx_decrypt(uint8_t* ymsndrom, uint32_t ymsndrom_size);
32 void lans2004_decrypt_68k(uint8_t* cpurom, uint32_t cpurom_size);
33
34 void samsho5b_px_decrypt(uint8_t* cpurom, uint32_t cpurom_size);
35 void samsho5b_vx_decrypt(uint8_t* ymsndrom, uint32_t ymsndrom_size);
36
37 uint16_t mslug5p_prot_r();
38 //void ms5plus_bankswitch_w(offs_t offset, uint16_t data);
39 uint32_t mslug5p_bank_base(uint16_t sel);
40
41 void mslug5b_vx_decrypt(uint8_t* ymsndrom, uint32_t ymsndrom_size);
42 void mslug5b_cx_decrypt(uint8_t* sprrom, uint32_t sprrom_size);
43
44 void kog_px_decrypt(uint8_t* cpurom, uint32_t cpurom_size);
45
46 void svcboot_px_decrypt(uint8_t* cpurom, uint32_t cpurom_size);
47 void svcboot_cx_decrypt(uint8_t* sprrom, uint32_t sprrom_size);
48 void svcplus_px_decrypt(uint8_t* cpurom, uint32_t cpurom_size);
49 void svcplus_px_hack(uint8_t* cpurom, uint32_t cpurom_size);
50 void svcplusa_px_decrypt(uint8_t* cpurom, uint32_t cpurom_size);
51 void svcsplus_px_decrypt(uint8_t* cpurom, uint32_t cpurom_size);
52 void svcsplus_px_hack(uint8_t* cpurom, uint32_t cpurom_size);
53
54 void kof2002b_gfx_decrypt(uint8_t *src, int size);
55 void kf2k2mp_decrypt(uint8_t* cpurom, uint32_t cpurom_size);
56 void kf2k2mp2_px_decrypt(uint8_t* cpurom, uint32_t cpurom_size);
57
58 void kof10th_decrypt(uint8_t* cpurom, uint32_t cpurom_size);
59
60 protected:
61 virtual void device_start() override;
62 virtual void device_reset() override;
63 };
64
65 #endif // MAME_BUS_NEOGEO_PROT_MISC_H
66