summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/neogeo/prot_pvc.h
blob: f133424c2fa982257ccfb3dbd767d518d158d444 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// license:BSD-3-Clause
// copyright-holders:S. Smith,David Haywood,Fabio Priuli

#ifndef MAME_BUS_NEOGEO_PROT_PVC_H
#define MAME_BUS_NEOGEO_PROT_PVC_H

#pragma once

DECLARE_DEVICE_TYPE(NG_PVC_PROT, pvc_prot_device)


class pvc_prot_device :  public device_t
{
public:
	// construction/destruction
	pvc_prot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);

	void pvc_write_unpack_color();
	void pvc_write_pack_color();
//  void pvc_write_bankswitch(address_space &space);
	uint32_t get_bank_base();
	uint16_t protection_r(offs_t offset);
	void protection_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);

	uint16_t m_cart_ram[0x1000];

	void mslug5_decrypt_68k(uint8_t* rom, uint32_t size);
	void svc_px_decrypt(uint8_t* rom, uint32_t size);
	void kf2k3pcb_decrypt_68k(uint8_t* rom, uint32_t size);
	void kof2003_decrypt_68k(uint8_t* rom, uint32_t size);
	void kof2003h_decrypt_68k(uint8_t* rom, uint32_t size);

protected:
	virtual void device_start() override;
	virtual void device_reset() override;
};

#endif // MAME_BUS_NEOGEO_PROT_PVC_H