summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/pc98_cbus/pc9801_02.cpp
blob: 12e9fcaff814360d55409ae97c740e68edff65ff (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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
// license:BSD-3-Clause
// copyright-holders:Angelo Salese
/**************************************************************************************************

Conventional memory for vanilla PC-9801

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

#include "emu.h"

#include "pc9801_02.h"

DEFINE_DEVICE_TYPE(PC9801_02_128KB, pc9801_02_128kb_device, "pc9801_02_128kb", "NEC PC-9801-02 conventional RAM")

pc9801_02_128kb_device::pc9801_02_128kb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
	: device_t(mconfig, PC9801_02_128KB, tag, owner, clock)
	, device_pc98_cbus_slot_interface(mconfig, *this)
{
}

void pc9801_02_128kb_device::device_start()
{
	m_ram.resize((128*1024) / 2);
}

void pc9801_02_128kb_device::device_reset()
{
}

void pc9801_02_128kb_device::remap(int space_id, offs_t start, offs_t end)
{
	if (space_id == AS_PROGRAM)
	{
		m_bus->space(AS_PROGRAM).install_ram(0x000000, 0x01ffff, &m_ram[0]);
	}
}

DEFINE_DEVICE_TYPE(PC9801_02_256KB, pc9801_02_256kb_device, "pc9801_02_256kb", "NEC PC-9801-41 conventional RAM")

pc9801_02_256kb_device::pc9801_02_256kb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
	: device_t(mconfig, PC9801_02_256KB, tag, owner, clock)
	, device_pc98_cbus_slot_interface(mconfig, *this)
{
}

void pc9801_02_256kb_device::device_start()
{
	m_ram.resize((256*1024) / 2);
}

void pc9801_02_256kb_device::device_reset()
{
}

void pc9801_02_256kb_device::remap(int space_id, offs_t start, offs_t end)
{
	if (space_id == AS_PROGRAM)
	{
		m_bus->space(AS_PROGRAM).install_ram(0x000000, 0x03ffff, &m_ram[0]);
	}
}


DEFINE_DEVICE_TYPE(PC9801_02_384KB, pc9801_02_384kb_device, "pc9801_02_384kb", "NEC PC-9801-02 x 1 + PC-9801-41 x 1 conventional RAMs")

pc9801_02_384kb_device::pc9801_02_384kb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
	: device_t(mconfig, PC9801_02_384KB, tag, owner, clock)
	, device_pc98_cbus_slot_interface(mconfig, *this)
{
}

void pc9801_02_384kb_device::device_start()
{
	m_ram.resize((384*1024) / 2);
}

void pc9801_02_384kb_device::device_reset()
{
}

void pc9801_02_384kb_device::remap(int space_id, offs_t start, offs_t end)
{
	if (space_id == AS_PROGRAM)
	{
		m_bus->space(AS_PROGRAM).install_ram(0x000000, 0x05ffff, &m_ram[0]);
	}
}

DEFINE_DEVICE_TYPE(PC9801_02_512KB, pc9801_02_512kb_device, "pc9801_02_512kb", "NEC PC-9801-41 x 2 conventional RAMs")

pc9801_02_512kb_device::pc9801_02_512kb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
	: device_t(mconfig, PC9801_02_512KB, tag, owner, clock)
	, device_pc98_cbus_slot_interface(mconfig, *this)
{
}

void pc9801_02_512kb_device::device_start()
{
	m_ram.resize((512*1024) / 2);
}

void pc9801_02_512kb_device::device_reset()
{
}

void pc9801_02_512kb_device::remap(int space_id, offs_t start, offs_t end)
{
	if (space_id == AS_PROGRAM)
	{
		m_bus->space(AS_PROGRAM).install_ram(0x000000, 0x07ffff, &m_ram[0]);
	}
}



DEFINE_DEVICE_TYPE(PC9801_02_640KB, pc9801_02_640kb_device, "pc9801_02_640kb", "NEC PC-9801-41 x 2 + PC-9801-02 x 1 conventional RAMs")

pc9801_02_640kb_device::pc9801_02_640kb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
	: device_t(mconfig, PC9801_02_640KB, tag, owner, clock)
	, device_pc98_cbus_slot_interface(mconfig, *this)
{
}

void pc9801_02_640kb_device::device_start()
{
	m_ram.resize((640*1024) / 2);
}

void pc9801_02_640kb_device::device_reset()
{
}

void pc9801_02_640kb_device::remap(int space_id, offs_t start, offs_t end)
{
	if (space_id == AS_PROGRAM)
	{
		m_bus->space(AS_PROGRAM).install_ram(0x000000, 0x09ffff, &m_ram[0]);
	}
}