summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/isa/pgc.h
blob: 45eb4bfb25a0cbeafa841f2ce8342a6c80f0479b (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
67
68
69
// license:BSD-3-Clause
// copyright-holders:Sergey Svishchev

#pragma once

#ifndef __ISA_PGC_H__
#define __ISA_PGC_H__

#include "emu.h"

#include "cpu/i86/i86.h"
#include "isa.h"

//**************************************************************************
//  TYPE DEFINITIONS
//**************************************************************************

// ======================> isa8_pgc_device

class isa8_pgc_device :
	public device_t,
	public device_isa8_card_interface
{
public:
	// construction/destruction
	isa8_pgc_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
	isa8_pgc_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);

	// optional information overrides
	virtual machine_config_constructor device_mconfig_additions() const override;
	virtual const rom_entry *device_rom_region() const override;
	virtual ioport_constructor device_input_ports() const override;

	UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);

	TIMER_DEVICE_CALLBACK_MEMBER( scanline_callback );
	INTERRUPT_GEN_MEMBER(vblank_irq);
	IRQ_CALLBACK_MEMBER(irq_callback);

	DECLARE_WRITE8_MEMBER( stateparam_w );
	DECLARE_READ8_MEMBER( stateparam_r );
	DECLARE_WRITE8_MEMBER( lut_w );
	DECLARE_READ8_MEMBER( init_r );

	void reset_common();

protected:
	// device-level overrides
	virtual void device_start() override;
	virtual void device_reset() override;

private:
	required_device<i8088_cpu_device> m_cpu;
	required_device<screen_device> m_screen;
	required_device<palette_device> m_palette;

	UINT8 *m_commarea;
	UINT8 *m_vram;
	UINT8 *m_eram;
	UINT8 m_stateparam[16];
	UINT8 m_lut[256*3];
	bitmap_ind16 *m_bitmap;
};


// device type definition
extern const device_type ISA8_PGC;

#endif  /* __ISA_PGC_H__ */