summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/a2bus/a2estd80col.cpp
blob: a32b6750c776a5646ce8879e9b1bc670a25e674a (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
70
71
72
73
74
75
76
77
78
79
80
81
// license:BSD-3-Clause
// copyright-holders:R. Belmont
/*********************************************************************

    a2estd80col.c

    Apple IIe Standard 80 Column Card (2K of RAM, no double-hi-res)

*********************************************************************/

#include "emu.h"
#include "a2estd80col.h"


/***************************************************************************
    PARAMETERS
***************************************************************************/

//**************************************************************************
//  GLOBAL VARIABLES
//**************************************************************************

const device_type A2EAUX_STD80COL = device_creator<a2eaux_std80col_device>;

//**************************************************************************
//  LIVE DEVICE
//**************************************************************************

a2eaux_std80col_device::a2eaux_std80col_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
		device_t(mconfig, A2EAUX_STD80COL, "Apple IIe Standard 80-Column Card", tag, owner, clock, "a2estd80", __FILE__),
		device_a2eauxslot_card_interface(mconfig, *this)
{
}

a2eaux_std80col_device::a2eaux_std80col_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname, const char *source) :
		device_t(mconfig, type, name, tag, owner, clock, shortname, source),
		device_a2eauxslot_card_interface(mconfig, *this)
{
}

//-------------------------------------------------
//  device_start - device-specific startup
//-------------------------------------------------

void a2eaux_std80col_device::device_start()
{
	set_a2eauxslot_device();
	save_item(NAME(m_ram));
}

void a2eaux_std80col_device::device_reset()
{
}

uint8_t a2eaux_std80col_device::read_auxram(uint16_t offset)
{
	if (offset < 0x800)
	{
		return m_ram[offset];
	}

	return 0xff;
}

void a2eaux_std80col_device::write_auxram(uint16_t offset, uint8_t data)
{
	if (offset < 0x800)
	{
		m_ram[offset] = data;
	}
}

uint8_t *a2eaux_std80col_device::get_vram_ptr()
{
	return &m_ram[0];
}

uint8_t *a2eaux_std80col_device::get_auxbank_ptr()
{
	return &m_ram[0];
}