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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
|
// license:BSD-3-Clause
// copyright-holders:David Haywood
/*************************************************************************
Simple 156 based board
*************************************************************************/
#include "machine/eepromser.h"
#include "sound/okim6295.h"
#include "video/deco16ic.h"
#include "video/decospr.h"
#include "emupal.h"
class simpl156_state : public driver_device
{
public:
simpl156_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_deco_tilegen1(*this, "tilegen1"),
m_eeprom(*this, "eeprom"),
m_okimusic(*this, "okimusic") ,
m_mainram(*this, "mainram"),
m_systemram(*this, "systemram"),
m_sprgen(*this, "spritegen"),
m_palette(*this, "palette") { }
void joemacr(machine_config &config);
void magdrop(machine_config &config);
void chainrec(machine_config &config);
void mitchell156(machine_config &config);
void magdropp(machine_config &config);
void init_simpl156();
void init_joemacr();
void init_charlien();
void init_prtytime();
void init_osman();
void init_chainrec();
private:
/* devices */
required_device<cpu_device> m_maincpu;
required_device<deco16ic_device> m_deco_tilegen1;
required_device<eeprom_serial_93cxx_device> m_eeprom;
required_device<okim6295_device> m_okimusic;
/* memory pointers */
std::unique_ptr<uint16_t[]> m_pf1_rowscroll;
std::unique_ptr<uint16_t[]> m_pf2_rowscroll;
required_shared_ptr<uint32_t> m_mainram;
required_shared_ptr<uint32_t> m_systemram;
optional_device<decospr_device> m_sprgen;
required_device<palette_device> m_palette;
std::unique_ptr<uint16_t[]> m_spriteram;
size_t m_spriteram_size;
DECO16IC_BANK_CB_MEMBER(bank_callback);
DECOSPR_PRIORITY_CB_MEMBER(pri_callback);
DECLARE_WRITE32_MEMBER(simpl156_eeprom_w);
DECLARE_READ32_MEMBER(simpl156_spriteram_r);
DECLARE_WRITE32_MEMBER(simpl156_spriteram_w);
DECLARE_READ32_MEMBER(simpl156_mainram_r);
DECLARE_WRITE32_MEMBER(simpl156_mainram_w);
DECLARE_READ32_MEMBER(simpl156_pf1_rowscroll_r);
DECLARE_WRITE32_MEMBER(simpl156_pf1_rowscroll_w);
DECLARE_READ32_MEMBER(simpl156_pf2_rowscroll_r);
DECLARE_WRITE32_MEMBER(simpl156_pf2_rowscroll_w);
DECLARE_READ32_MEMBER(joemacr_speedup_r);
DECLARE_READ32_MEMBER(chainrec_speedup_r);
DECLARE_READ32_MEMBER(prtytime_speedup_r);
DECLARE_READ32_MEMBER(charlien_speedup_r);
DECLARE_READ32_MEMBER(osman_speedup_r);
virtual void video_start() override;
uint32_t screen_update_simpl156(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
INTERRUPT_GEN_MEMBER(simpl156_vbl_interrupt);
void chainrec_map(address_map &map);
void joemacr_map(address_map &map);
void magdrop_map(address_map &map);
void magdropp_map(address_map &map);
void mitchell156_map(address_map &map);
};
|