summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/neogeo/sbp.h
blob: 25fd920f281caa50437b5f0c8feb68caa17989de (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
// license:BSD-3-Clause
// copyright-holders:S. Smith,David Haywood,Fabio Priuli
#ifndef MAME_BUS_NEOGEO_SBP_H
#define MAME_BUS_NEOGEO_SBP_H

#pragma once

#include "slot.h"
#include "rom.h"

/*************************************************
 sbp
 **************************************************/

class neogeo_sbp_cart_device : public neogeo_rom_device
{
public:
	neogeo_sbp_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);

	virtual void protection_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0) override;
	virtual uint16_t protection_r(address_space &space, offs_t offset) override;

	virtual void decrypt_all(DECRYPT_ALL_PARAMS) override;
	virtual int get_fixed_bank_type() override { return 0; }

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

	void patch(uint8_t* cpurom, uint32_t cpurom_size);
};

DECLARE_DEVICE_TYPE(NEOGEO_SBP_CART, neogeo_sbp_cart_device)


#endif // MAME_BUS_NEOGEO_SBP_H