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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
// license:BSD-3-Clause
// copyright-holders:David Haywood
#ifndef MAME_MACHINE_MPU4_CHARACTERISER_BL_H
#define MAME_MACHINE_MPU4_CHARACTERISER_BL_H
#pragma once
#include "cpu/m6809/m6809.h"
// bootleg protection
DECLARE_DEVICE_TYPE(MPU4_CHARACTERISER_BL, mpu4_characteriser_bl)
// is this a bootleg, or a much earlier official protection, it's more than just a fixed return value at least
// but has only been seen on 2 games
DECLARE_DEVICE_TYPE(MPU4_CHARACTERISER_BL_BLASTBANK, mpu4_characteriser_bl_blastbank)
class mpu4_characteriser_bl : public device_t
{
public:
// construction/destruction
mpu4_characteriser_bl(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
void set_bl_fixed_return(uint8_t ret)
{
m_blfixedreturn = ret;
}
uint8_t read(offs_t offset)
{
logerror("%s: bootleg Characteriser read offset %02x\n", machine().describe_context(), offset);
return m_blfixedreturn;
}
void write(offs_t offset, uint8_t data)
{
logerror("%s: bootleg Characteriser write offset %02x data %02x\n", machine().describe_context(), offset, data);
}
protected:
mpu4_characteriser_bl(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
virtual void device_start() override;
virtual void device_reset() override;
private:
uint8_t m_blfixedreturn = 0;
};
class mpu4_characteriser_bl_blastbank : public device_t
{
public:
// construction/destruction
mpu4_characteriser_bl_blastbank(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
virtual uint8_t read(offs_t offset);
virtual void write(offs_t offset, uint8_t data);
void set_retxor(uint8_t retxor) { m_retxor = retxor; }
protected:
virtual void device_start() override;
virtual void device_reset() override;
uint8_t m_retxor = 0x00;
int m_prot_col = 0;
};
#endif // MAME_MACHINE_MPU4_CHARACTERISER_BL_H
|