blob: d8660931fcc3ce8bcd2e0b8c31cdb5de4d5e1c00 (
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
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
|
/*************************************************************************
Atari Night Driver hardware
*************************************************************************/
#include "sound/discrete.h"
/* Discrete Sound Input Nodes */
#define NITEDRVR_BANG_DATA NODE_01
#define NITEDRVR_SKID1_EN NODE_02
#define NITEDRVR_SKID2_EN NODE_03
#define NITEDRVR_MOTOR_DATA NODE_04
#define NITEDRVR_CRASH_EN NODE_05
#define NITEDRVR_ATTRACT_EN NODE_06
class nitedrvr_state : public driver_device
{
public:
nitedrvr_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag) ,
m_videoram(*this, "videoram"),
m_hvc(*this, "hvc"){ }
/* memory pointers */
required_shared_ptr<UINT8> m_videoram;
required_shared_ptr<UINT8> m_hvc;
/* video-related */
tilemap_t *m_bg_tilemap;
/* input */
UINT8 m_gear;
UINT8 m_track;
INT32 m_steering_buf;
INT32 m_steering_val;
UINT8 m_crash_en;
UINT8 m_crash_data;
UINT8 m_crash_data_en; // IC D8
UINT8 m_ac_line;
INT32 m_last_steering_val;
/* devices */
cpu_device *m_maincpu;
device_t *m_discrete;
DECLARE_READ8_MEMBER(nitedrvr_steering_reset_r);
DECLARE_WRITE8_MEMBER(nitedrvr_steering_reset_w);
DECLARE_READ8_MEMBER(nitedrvr_in0_r);
DECLARE_READ8_MEMBER(nitedrvr_in1_r);
DECLARE_WRITE8_MEMBER(nitedrvr_out0_w);
DECLARE_WRITE8_MEMBER(nitedrvr_out1_w);
DECLARE_WRITE8_MEMBER(nitedrvr_videoram_w);
DECLARE_WRITE8_MEMBER(nitedrvr_hvc_w);
TILE_GET_INFO_MEMBER(get_bg_tile_info);
virtual void machine_start();
virtual void machine_reset();
virtual void video_start();
UINT32 screen_update_nitedrvr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
};
/*----------- defined in machine/nitedrvr.c -----------*/
TIMER_DEVICE_CALLBACK( nitedrvr_crash_toggle_callback );
/*----------- defined in audio/nitedrvr.c -----------*/
DISCRETE_SOUND_EXTERN( nitedrvr );
|