blob: f3a46daf8dcc8503eee8d3188b37a9c4e177cfe7 (
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
|
#include "emu.h"
#include "ram.h"
const device_type MSX_SLOT_RAM = &device_creator<msx_slot_ram_device>;
msx_slot_ram_device::msx_slot_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, MSX_SLOT_RAM, "MSX Internal RAM", tag, owner, clock, "msx_slot_ram", __FILE__)
, msx_internal_slot_interface()
{
}
void msx_slot_ram_device::device_start()
{
m_ram.resize(m_size);
save_item(NAME(m_ram));
}
READ8_MEMBER(msx_slot_ram_device::read)
{
if ( offset >= m_start_address && offset < m_end_address )
{
return m_ram[ offset - m_start_address ];
}
return 0xFF;
}
WRITE8_MEMBER(msx_slot_ram_device::write)
{
if ( offset >= m_start_address && offset < m_end_address )
{
m_ram[offset - m_start_address] = data;
}
}
|