summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/bus/intv
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2014-10-15 07:19:47 +0000
committer Miodrag Milanovic <mmicko@gmail.com>2014-10-15 07:19:47 +0000
commitc93ed344fbd26a9c2c49bdbc99014d8dc0cbe9ef (patch)
treea5017b8341bdadc5bcd1185ae49fe4c0a85424b8 /src/emu/bus/intv
parenta4dd32afb6cbfaae0e452c90486060682ab1c31c (diff)
Cleanups and version bumpmame0155
Diffstat (limited to 'src/emu/bus/intv')
-rw-r--r--src/emu/bus/intv/ecs.c55
-rw-r--r--src/emu/bus/intv/ecs.h42
-rw-r--r--src/emu/bus/intv/rom.c1
-rw-r--r--src/emu/bus/intv/rom.h8
-rw-r--r--src/emu/bus/intv/slot.c83
-rw-r--r--src/emu/bus/intv/slot.h13
-rw-r--r--src/emu/bus/intv/voice.h24
7 files changed, 111 insertions, 115 deletions
diff --git a/src/emu/bus/intv/ecs.c b/src/emu/bus/intv/ecs.c
index 6b42f004bab..4400b5e8839 100644
--- a/src/emu/bus/intv/ecs.c
+++ b/src/emu/bus/intv/ecs.c
@@ -4,10 +4,10 @@
Mattel Intellivision Entertainment Computer System expansion emulation
TODO:
- - Make paged rom emulation more accurate (according to
+ - Make paged rom emulation more accurate (according to
http://spatula-city.org/~im14u2c/intv/tech/ecs.html
- writes to $xa5y should be available for every x and every y, i.e. we shall
- have writes to every 4K chunk of the memory map, and there shall be 16 pages
+ writes to $xa5y should be available for every x and every y, i.e. we shall
+ have writes to every 4K chunk of the memory map, and there shall be 16 pages
for each)
Current emulation is instead tailored around the minimal usage necessary to
make the main expansion and World Series Major League Baseball happy
@@ -67,12 +67,12 @@ void intv_ecs_device::device_start()
}
void intv_ecs_device::device_reset()
-{
+{
memset(m_bank_base, 0, sizeof(m_bank_base));
}
void intv_ecs_device::late_subslot_setup()
-{
+{
switch (m_subslot->get_type())
{
case INTV_RAM:
@@ -107,13 +107,13 @@ UINT8 intv_ecs_device::intv_control_r(int hand)
0xFF, 0x3F, 0x9F, 0x5F, 0xD7, 0xB7, 0x77, 0xDB,
0xBB, 0x7B, 0xDD, 0xBD, 0x7D, 0xDE, 0xBE, 0x7E
};
-
+
static const UINT8 disc_table[] =
{
0xF3, 0xE3, 0xE7, 0xF7, 0xF6, 0xE6, 0xEE, 0xFE,
0xFC, 0xEC, 0xED, 0xFD, 0xF9, 0xE9, 0xEB, 0xFB
};
-
+
static const UINT8 discyx_table[5][5] =
{
{ 0xE3, 0xF3, 0xFB, 0xEB, 0xE9 },
@@ -122,10 +122,10 @@ UINT8 intv_ecs_device::intv_control_r(int hand)
{ 0xF6, 0xE6, 0xFE, 0xEC, 0xED },
{ 0xE6, 0xEE, 0xFE, 0xFC, 0xEC }
};
-
+
int x, y;
UINT8 val = 0xff;
-
+
/* keypad */
x = m_keypad[hand]->read();
for (y = 0; y < 16; y++)
@@ -135,12 +135,12 @@ UINT8 intv_ecs_device::intv_control_r(int hand)
val &= keypad_table[y];
}
}
-
+
switch ((m_options->read() >> hand) & 4)
{
case 0: /* disc == digital */
default:
-
+
x = m_disc[hand]->read();
for (y = 0; y < 16; y++)
{
@@ -150,14 +150,14 @@ UINT8 intv_ecs_device::intv_control_r(int hand)
}
}
break;
-
+
case 1: /* disc == _fake_ analog */
-
+
x = m_discx[hand]->read();
y = m_discy[hand]->read();
val &= discyx_table[y / 32][x / 32];
}
-
+
return val;
}
@@ -252,7 +252,7 @@ static INPUT_PORTS_START( intv_ecs_kbd )
Bit 4 D E 2 3 W S Z X
Bit 5 A CTL (right) 1 Q (up) (down) (space)
Bit 6 SHIFT NC NC NC NC NC NC NC
-
+
Shifted keys that differ from pc:
Key : 1 2 5 6 7 (left) (right) (up) (down)
Shift + key: = " + - / % ' ^ ?
@@ -530,32 +530,32 @@ ioport_constructor intv_ecs_device::device_input_ports() const
Paged ROM handling
-------------------------------------------------*/
-READ16_MEMBER(intv_ecs_device::read_rom20)
-{
+READ16_MEMBER(intv_ecs_device::read_rom20)
+{
if (m_bank_base[2])
- return INTV_ROM16_READ(offset + 0x2000);
+ return INTV_ROM16_READ(offset + 0x2000);
else
return 0xffff;
}
-READ16_MEMBER(intv_ecs_device::read_rom70)
-{
+READ16_MEMBER(intv_ecs_device::read_rom70)
+{
if (m_bank_base[7])
return 0xffff;
else
- return INTV_ROM16_READ(offset + 0x7000);
+ return INTV_ROM16_READ(offset + 0x7000);
}
-READ16_MEMBER(intv_ecs_device::read_rome0)
-{
+READ16_MEMBER(intv_ecs_device::read_rome0)
+{
if (m_bank_base[14])
- return INTV_ROM16_READ(offset + 0xe000);
- else // if WSMLB is loaded, it shall go here, otherwise 0xffff
+ return INTV_ROM16_READ(offset + 0xe000);
+ else // if WSMLB is loaded, it shall go here, otherwise 0xffff
return m_subslot->read_rome0(space, offset, mem_mask);
}
-READ16_MEMBER(intv_ecs_device::read_romf0)
-{
+READ16_MEMBER(intv_ecs_device::read_romf0)
+{
// only WSMLB should come here with bank_base = 1
if (m_bank_base[15])
return m_subslot->read_romf0(space, offset + 0x1000, mem_mask);
@@ -585,4 +585,3 @@ WRITE16_MEMBER(intv_ecs_device::write_ay)
if (ACCESSING_BITS_0_7)
return m_snd->write(space, offset, data, mem_mask);
}
-
diff --git a/src/emu/bus/intv/ecs.h b/src/emu/bus/intv/ecs.h
index 6db3609c7ce..52ca99b76e5 100644
--- a/src/emu/bus/intv/ecs.h
+++ b/src/emu/bus/intv/ecs.h
@@ -14,14 +14,14 @@ class intv_ecs_device : public intv_rom_device
public:
// construction/destruction
intv_ecs_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-
+
// device-level overrides
virtual void device_start();
virtual void device_reset();
virtual machine_config_constructor device_mconfig_additions() const;
virtual ioport_constructor device_input_ports() const;
virtual const rom_entry *device_rom_region() const;
-
+
// reading and writing
// actual ECS accesses
@@ -32,14 +32,14 @@ public:
virtual DECLARE_READ16_MEMBER(read_romf0);
// RAM
virtual DECLARE_READ16_MEMBER(read_ram) { return (int)m_ram[offset & (m_ram.count() - 1)]; }
- virtual DECLARE_WRITE16_MEMBER(write_ram) { m_ram[offset & (m_ram.count() - 1)] = data & 0xff; }
+ virtual DECLARE_WRITE16_MEMBER(write_ram) { m_ram[offset & (m_ram.count() - 1)] = data & 0xff; }
// AY8914
virtual DECLARE_READ16_MEMBER(read_ay);
virtual DECLARE_WRITE16_MEMBER(write_ay);
DECLARE_READ8_MEMBER(ay_porta_r);
DECLARE_READ8_MEMBER(ay_portb_r);
DECLARE_WRITE8_MEMBER(ay_porta_w);
-
+
// passthru accesses
virtual DECLARE_READ16_MEMBER(read_rom04) { return m_subslot->read_rom04(space, offset, mem_mask); }
virtual DECLARE_READ16_MEMBER(read_rom40) { return m_subslot->read_rom40(space, offset, mem_mask); }
@@ -47,27 +47,27 @@ public:
virtual DECLARE_READ16_MEMBER(read_rom50) { return m_subslot->read_rom50(space, offset, mem_mask); }
virtual DECLARE_READ16_MEMBER(read_rom60) { return m_subslot->read_rom60(space, offset, mem_mask); }
virtual DECLARE_READ16_MEMBER(read_rom80)
- {
+ {
if (m_ram88_enabled && offset >= 0x800)
- return m_subslot->read_ram(space, offset & 0x7ff, mem_mask);
+ return m_subslot->read_ram(space, offset & 0x7ff, mem_mask);
else
- return m_subslot->read_rom80(space, offset, mem_mask);
+ return m_subslot->read_rom80(space, offset, mem_mask);
}
virtual DECLARE_READ16_MEMBER(read_rom90) { return m_subslot->read_rom90(space, offset, mem_mask); }
virtual DECLARE_READ16_MEMBER(read_roma0) { return m_subslot->read_roma0(space, offset, mem_mask); }
virtual DECLARE_READ16_MEMBER(read_romb0) { return m_subslot->read_romb0(space, offset, mem_mask); }
virtual DECLARE_READ16_MEMBER(read_romc0) { return m_subslot->read_romc0(space, offset, mem_mask); }
- virtual DECLARE_READ16_MEMBER(read_romd0)
- {
+ virtual DECLARE_READ16_MEMBER(read_romd0)
+ {
if (m_ramd0_enabled && offset < 0x800)
- return m_subslot->read_ram(space, offset, mem_mask);
+ return m_subslot->read_ram(space, offset, mem_mask);
else
- return m_subslot->read_romd0(space, offset, mem_mask);
+ return m_subslot->read_romd0(space, offset, mem_mask);
}
// paged ROM banking
- virtual DECLARE_WRITE16_MEMBER(write_rom20)
- {
+ virtual DECLARE_WRITE16_MEMBER(write_rom20)
+ {
if (offset == 0xfff)
{
if (data == 0x2a50)
@@ -76,8 +76,8 @@ public:
m_bank_base[2] = 1;
}
}
- virtual DECLARE_WRITE16_MEMBER(write_rom70)
- {
+ virtual DECLARE_WRITE16_MEMBER(write_rom70)
+ {
if (offset == 0xfff)
{
if (data == 0x7a50)
@@ -86,8 +86,8 @@ public:
m_bank_base[7] = 1;
}
}
- virtual DECLARE_WRITE16_MEMBER(write_rome0)
- {
+ virtual DECLARE_WRITE16_MEMBER(write_rome0)
+ {
if (offset == 0xfff)
{
if (data == 0xea50)
@@ -96,8 +96,8 @@ public:
m_bank_base[14] = 1;
}
}
- virtual DECLARE_WRITE16_MEMBER(write_romf0)
- {
+ virtual DECLARE_WRITE16_MEMBER(write_romf0)
+ {
if (offset == 0xfff)
{
if (data == 0xfa50)
@@ -112,11 +112,11 @@ public:
// IntelliVoice passthru
virtual DECLARE_READ16_MEMBER(read_speech) { if (m_voice_enabled) return m_subslot->read_speech(space, offset, mem_mask); else return 0xffff; }
virtual DECLARE_WRITE16_MEMBER(write_speech) { if (m_voice_enabled) m_subslot->write_speech(space, offset, data, mem_mask); }
-
+
virtual void late_subslot_setup();
UINT8 intv_control_r(int hand);
-
+
private:
required_device<ay8914_device> m_snd;
diff --git a/src/emu/bus/intv/rom.c b/src/emu/bus/intv/rom.c
index 6bc190f4a83..6ff9cbd58d7 100644
--- a/src/emu/bus/intv/rom.c
+++ b/src/emu/bus/intv/rom.c
@@ -47,4 +47,3 @@ intv_wsmlb_device::intv_wsmlb_device(const machine_config &mconfig, const char *
: intv_rom_device(mconfig, INTV_ROM_WSMLB, "Intellivision World Series Baseball Cart", tag, owner, clock, "intv_wsmlb", __FILE__)
{
}
-
diff --git a/src/emu/bus/intv/rom.h b/src/emu/bus/intv/rom.h
index 2eb13cc5c76..cb6947b833c 100644
--- a/src/emu/bus/intv/rom.h
+++ b/src/emu/bus/intv/rom.h
@@ -13,7 +13,7 @@ public:
// construction/destruction
intv_rom_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);
intv_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-
+
// reading and writing
virtual DECLARE_READ16_MEMBER(read_rom04) { return INTV_ROM16_READ(offset + 0x0400); }
virtual DECLARE_READ16_MEMBER(read_rom20) { return INTV_ROM16_READ(offset + 0x2000); }
@@ -30,7 +30,7 @@ public:
virtual DECLARE_READ16_MEMBER(read_romd0) { return INTV_ROM16_READ(offset + 0xd000); }
virtual DECLARE_READ16_MEMBER(read_rome0) { return INTV_ROM16_READ(offset + 0xe000); }
virtual DECLARE_READ16_MEMBER(read_romf0) { return INTV_ROM16_READ(offset + 0xf000); }
-
+
// device-level overrides
virtual void device_start() {}
virtual void device_reset() {}
@@ -43,7 +43,7 @@ class intv_ram_device : public intv_rom_device
public:
// construction/destruction
intv_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-
+
// reading and writing
virtual DECLARE_READ16_MEMBER(read_ram) { return (int)m_ram[offset & (m_ram.count() - 1)]; }
virtual DECLARE_WRITE16_MEMBER(write_ram) { m_ram[offset & (m_ram.count() - 1)] = data & 0xff; }
@@ -56,7 +56,7 @@ class intv_gfact_device : public intv_rom_device
public:
// construction/destruction
intv_gfact_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-
+
// reading and writing
virtual DECLARE_READ16_MEMBER(read_ram) { return (int)m_ram[offset & (m_ram.count() - 1)]; }
virtual DECLARE_WRITE16_MEMBER(write_ram) { m_ram[offset & (m_ram.count() - 1)] = data & 0xff; }
diff --git a/src/emu/bus/intv/slot.c b/src/emu/bus/intv/slot.c
index 0b60e504593..4b633fdb997 100644
--- a/src/emu/bus/intv/slot.c
+++ b/src/emu/bus/intv/slot.c
@@ -3,18 +3,18 @@
Mattel Intellivision cart emulation
(through slot devices)
-
+
This is a strange beast, because INTV carts had potentially access to
a *LOT* of memory ranges!
Quoting Joe Zbiciak's documentation for his emu (jzIntv):
-
-
+
+
The Intellivision leaves many addresses available to cartridges. However,
several address ranges come with caveats, such as interactions with other
- devices in the system, or incompatibilities with various peripherals.
-
+ devices in the system, or incompatibilities with various peripherals.
+
Below is a summary.
-
+
ADDRESSES NOTES
-------------- --------------------------------------------------------------
$0400 - $04FF RAM/ROM ok on all but Intellivision 2.
@@ -26,7 +26,7 @@
$4800 ROM ok. RAM ok only if boot ROM at $7000.
$4801 - $4FFF RAM/ROM ok.
$5000 - $5014 ROM ok. RAM ok only if boot ROM at $7000 or $4800.
- $5015 - $6FFF RAM/ROM ok.
+ $5015 - $6FFF RAM/ROM ok.
$7000 ROM ok if no ECS. RAM at $7000 confuses EXEC boot sequence.
$7001 - $77FF RAM/ROM ok if no ECS.
$7800 - $7FFF ROM ok if no ECS. Do not map RAM here due to GRAM alias.
@@ -38,8 +38,8 @@
$E000 - $EFFF RAM/ROM ok if no ECS.
$F000 - $F7FF RAM/ROM ok.
$F800 - $FFFF ROM ok. Do not map RAM here due to GRAM alias.
-
-
+
+
We handle this, by always creating a 0x10000 wide ROM region to load the
cart image and exposing the following (long list of) read handlers:
read_rom04
@@ -58,7 +58,7 @@
read_rome0
read_romf0
Each pcb types will then use the correct ones for its wiring setup.
-
+
The BIN+CFG format introduced by INTVPC emulator includes metadata about where to
load ROM into memory in the CFG file, but we don't support it (because we don't parse
the CFG at all) and we rely instead on the intv.hsi metadata for fullpath loading of
@@ -69,7 +69,7 @@
TODO:
- Convert also the keyboard component to be a passthru slot device
- Merge some of the ROM accessor above, once it is clear which ones can be merged
-
+
***********************************************************************************************************/
@@ -239,16 +239,16 @@ int intv_cart_slot_device::load_fullpath()
UINT8 num_segments;
UINT8 start_seg;
UINT8 end_seg;
-
+
UINT32 current_address;
UINT32 end_address;
-
+
UINT8 high_byte;
UINT8 low_byte;
-
+
UINT8 *ROM;
const char *file_type = filetype();
-
+
/* if it is in .rom format, we enter here */
if (!core_stricmp (file_type, "rom"))
{
@@ -256,9 +256,9 @@ int intv_cart_slot_device::load_fullpath()
fread(&temp, 1);
if (temp != 0xa8)
return IMAGE_INIT_FAIL;
-
+
fread(&num_segments, 1);
-
+
fread(&temp, 1);
if (temp != (num_segments ^ 0xff))
return IMAGE_INIT_FAIL;
@@ -270,10 +270,10 @@ int intv_cart_slot_device::load_fullpath()
{
fread(&start_seg, 1);
current_address = start_seg * 0x100;
-
+
fread(&end_seg, 1);
end_address = end_seg * 0x100 + 0xff;
-
+
while (current_address <= end_address)
{
fread(&low_byte, 1);
@@ -282,12 +282,12 @@ int intv_cart_slot_device::load_fullpath()
ROM[current_address << 1] = high_byte;
current_address++;
}
-
+
// Here we should calculate and compare the CRC16...
fread(&temp, 1);
fread(&temp, 1);
}
-
+
// Access tables and fine address restriction tables are not supported ATM
for (int i = 0; i < (16 + 32 + 2); i++)
{
@@ -300,7 +300,7 @@ int intv_cart_slot_device::load_fullpath()
{
// This code is a blatant hack, due to impossibility to load a separate .cfg file in MESS.
// It shall be eventually replaced by the .xml loading
-
+
// extrainfo format
// 1. mapper number (to deal with bankswitch). no bankswitch is mapper 0 (most games).
// 2.->5. current images have at most 4 chunks of data. we store here block size and location to load
@@ -314,7 +314,7 @@ int intv_cart_slot_device::load_fullpath()
m_cart->rom_alloc(0x20000, tag());
ROM = (UINT8 *)m_cart->get_rom_base();
-
+
if (!hashfile_extrainfo(*this, extrainfo))
{
// If no extrainfo, we assume a single 0x2000 chunk at 0x5000
@@ -329,12 +329,12 @@ int intv_cart_slot_device::load_fullpath()
else
{
sscanf(extrainfo.cstr() ,"%d %d %d %d %d %d %d", &mapper, &rom[0], &rom[1], &rom[2],
- &rom[3], &ram, &extra);
+ &rom[3], &ram, &extra);
//printf("extrainfo: %d %d %d %d %d %d %d \n", mapper, rom[0], rom[1], rom[2], rom[3], ram, extra);
-
+
if (mapper)
logerror("Bankswitch not yet implemented!\n");
-
+
if (ram)
{
start = ((ram & 0xf0) >> 4) * 0x1000;
@@ -355,25 +355,25 @@ int intv_cart_slot_device::load_fullpath()
}
if (extra & INTELLIVOICE_MASK)
{
- printf("WARNING: This game requires emulation of the IntelliVoice module.\n");
+ printf("WARNING: This game requires emulation of the IntelliVoice module.\n");
}
-
+
if (extra & ECS_MASK)
{
printf("WARNING: This game requires emulation of the ECS module.\n");
}
-
+
for (int j = 0; j < 4; j++)
{
start = ((rom[j] & 0xf0) >> 4) * 0x1000;
size = (rom[j] & 0x0f) * 0x800;
- // some cart has to be loaded to 0x4800, but none of the available ones goes to 0x4000.
+ // some cart has to be loaded to 0x4800, but none of the available ones goes to 0x4000.
// Hence, we use 0x04 << 4 in extrainfo (to reduce the stored values) and fix the value here.
if (start == 0x4000) start += 0x800;
-
+
// logerror("step %d: %d %d \n", j, start / 0x1000, size / 0x1000);
-
+
for (int i = 0; i < size; i++)
{
fread(&low_byte, 1);
@@ -383,7 +383,7 @@ int intv_cart_slot_device::load_fullpath()
}
}
}
-
+
return IMAGE_INIT_PASS;
}
}
@@ -408,7 +408,7 @@ bool intv_cart_slot_device::call_load()
// so if we are loading one of these, we allocate additional 0x2000 bytes for the paged bank
if (m_type == INTV_WSMLB)
extra_bank = true;
-
+
UINT32 size = 0;
UINT16 address = 0;
UINT8 *ROM, *region;
@@ -423,7 +423,7 @@ bool intv_cart_slot_device::call_load()
if (size)
{
region = get_software_region(region_name[i]);
-
+
for (int j = 0; j < size / 2; j++)
{
ROM[((address + j) << 1) + 1] = region[2 * j];
@@ -467,7 +467,7 @@ void intv_cart_slot_device::get_default_card_software(astring &result)
UINT32 len = core_fsize(m_file);
dynamic_buffer rom(len);
int type = INTV_STD;
-
+
core_fread(m_file, rom, len);
if (rom[0] == 0xa8 && (rom[1] == (rom[2] ^ 0xff)))
@@ -480,12 +480,12 @@ void intv_cart_slot_device::get_default_card_software(astring &result)
int start;
int mapper, rom[5], ram, extra;
astring extrainfo;
-
+
if (hashfile_extrainfo(*this, extrainfo))
{
sscanf(extrainfo.cstr() ,"%d %d %d %d %d %d %d", &mapper, &rom[0], &rom[1], &rom[2],
- &rom[3], &ram, &extra);
-
+ &rom[3], &ram, &extra);
+
if (ram)
{
start = ((ram & 0xf0) >> 4) * 0x1000;
@@ -495,7 +495,7 @@ void intv_cart_slot_device::get_default_card_software(astring &result)
type = INTV_GFACT;
}
}
-
+
}
slot_string = intv_get_slot(type);
@@ -567,6 +567,5 @@ SLOT_INTERFACE_START(intv_cart)
SLOT_INTERFACE_INTERNAL("intv_wsmlb", INTV_ROM_WSMLB)
SLOT_INTERFACE_INTERNAL("intv_voice", INTV_ROM_VOICE)
SLOT_INTERFACE_INTERNAL("intv_ecs", INTV_ROM_ECS)
-// SLOT_INTERFACE_INTERNAL("intv_keycomp", INTV_ROM_KEYCOMP)
+// SLOT_INTERFACE_INTERNAL("intv_keycomp", INTV_ROM_KEYCOMP)
SLOT_INTERFACE_END
-
diff --git a/src/emu/bus/intv/slot.h b/src/emu/bus/intv/slot.h
index e14243f190f..03b3792349b 100644
--- a/src/emu/bus/intv/slot.h
+++ b/src/emu/bus/intv/slot.h
@@ -11,7 +11,7 @@ enum
{
INTV_STD = 0,
INTV_RAM,
- INTV_GFACT, // has RAM too but at diff offset
+ INTV_GFACT, // has RAM too but at diff offset
INTV_WSMLB,
INTV_VOICE,
INTV_ECS,
@@ -51,7 +51,7 @@ public:
virtual DECLARE_READ16_MEMBER(read_ram) { return 0xffff; }
virtual DECLARE_WRITE16_MEMBER(write_ram) {}
-
+
// Used by IntelliVoice & ECS
virtual DECLARE_READ16_MEMBER(read_ay) { return 0xffff; }
virtual DECLARE_WRITE16_MEMBER(write_ay) {}
@@ -71,7 +71,7 @@ public:
UINT32 get_rom_size() { return m_rom_size; }
UINT32 get_ram_size() { return m_ram.count(); }
- void save_ram() { device().save_item(NAME(m_ram)); }
+ void save_ram() { device().save_item(NAME(m_ram)); }
virtual void late_subslot_setup() {}
protected:
@@ -105,7 +105,7 @@ public:
int get_type() { return m_type; }
int load_fullpath();
- void save_ram() { if (m_cart && m_cart->get_ram_size()) m_cart->save_ram(); }
+ void save_ram() { if (m_cart && m_cart->get_ram_size()) m_cart->save_ram(); }
virtual iodevice_t image_type() const { return IO_CARTSLOT; }
virtual bool is_readable() const { return 1; }
@@ -136,7 +136,7 @@ public:
virtual DECLARE_READ16_MEMBER(read_romd0) { if (m_cart) return m_cart->read_romd0(space, offset, mem_mask); else return 0xffff; }
virtual DECLARE_READ16_MEMBER(read_rome0) { if (m_cart) return m_cart->read_rome0(space, offset, mem_mask); else return 0xffff; }
virtual DECLARE_READ16_MEMBER(read_romf0) { if (m_cart) return m_cart->read_romf0(space, offset, mem_mask); else return 0xffff; }
-
+
virtual DECLARE_READ16_MEMBER(read_ay);
virtual DECLARE_WRITE16_MEMBER(write_ay);
virtual DECLARE_READ16_MEMBER(read_speech);
@@ -176,8 +176,7 @@ extern const device_type INTV_CART_SLOT;
#define MCFG_INTV_CARTRIDGE_ADD(_tag,_slot_intf,_def_slot) \
MCFG_DEVICE_ADD(_tag, INTV_CART_SLOT, 0) \
- MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false) \
-
+ MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false)
SLOT_INTERFACE_EXTERN(intv_cart);
diff --git a/src/emu/bus/intv/voice.h b/src/emu/bus/intv/voice.h
index 9ba16aef358..96e92bbf44c 100644
--- a/src/emu/bus/intv/voice.h
+++ b/src/emu/bus/intv/voice.h
@@ -13,7 +13,7 @@ class intv_voice_device : public intv_rom_device
public:
// construction/destruction
intv_voice_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-
+
// device-level overrides
virtual void device_start();
virtual machine_config_constructor device_mconfig_additions() const;
@@ -23,7 +23,7 @@ public:
// actual IntelliVoice access
virtual DECLARE_READ16_MEMBER(read_speech);
virtual DECLARE_WRITE16_MEMBER(write_speech);
-
+
// passthru access
virtual DECLARE_READ16_MEMBER(read_rom04) { return m_subslot->read_rom04(space, offset, mem_mask); }
virtual DECLARE_READ16_MEMBER(read_rom20) { return m_subslot->read_rom20(space, offset, mem_mask); }
@@ -33,34 +33,34 @@ public:
virtual DECLARE_READ16_MEMBER(read_rom60) { return m_subslot->read_rom60(space, offset, mem_mask); }
virtual DECLARE_READ16_MEMBER(read_rom70) { return m_subslot->read_rom70(space, offset, mem_mask); }
virtual DECLARE_READ16_MEMBER(read_rom80)
- {
+ {
if (m_ram88_enabled && offset >= 0x800)
- return m_subslot->read_ram(space, offset & 0x7ff, mem_mask);
+ return m_subslot->read_ram(space, offset & 0x7ff, mem_mask);
else
- return m_subslot->read_rom80(space, offset, mem_mask);
+ return m_subslot->read_rom80(space, offset, mem_mask);
}
virtual DECLARE_READ16_MEMBER(read_rom90) { return m_subslot->read_rom90(space, offset, mem_mask); }
virtual DECLARE_READ16_MEMBER(read_roma0) { return m_subslot->read_roma0(space, offset, mem_mask); }
virtual DECLARE_READ16_MEMBER(read_romb0) { return m_subslot->read_romb0(space, offset, mem_mask); }
virtual DECLARE_READ16_MEMBER(read_romc0) { return m_subslot->read_romc0(space, offset, mem_mask); }
- virtual DECLARE_READ16_MEMBER(read_romd0)
- {
+ virtual DECLARE_READ16_MEMBER(read_romd0)
+ {
if (m_ramd0_enabled && offset < 0x800)
- return m_subslot->read_ram(space, offset, mem_mask);
+ return m_subslot->read_ram(space, offset, mem_mask);
else
- return m_subslot->read_romd0(space, offset, mem_mask);
+ return m_subslot->read_romd0(space, offset, mem_mask);
}
virtual DECLARE_READ16_MEMBER(read_rome0) { return m_subslot->read_rome0(space, offset, mem_mask); }
virtual DECLARE_READ16_MEMBER(read_romf0) { return m_subslot->read_romf0(space, offset, mem_mask); }
-
+
// RAM passthru write
virtual DECLARE_WRITE16_MEMBER(write_88) { if (m_ram88_enabled) m_subslot->write_ram(space, offset, data, mem_mask); }
virtual DECLARE_WRITE16_MEMBER(write_d0) { if (m_ramd0_enabled) m_subslot->write_ram(space, offset, data, mem_mask); }
virtual DECLARE_READ16_MEMBER(read_ram) { return m_subslot->read_ram(space, offset, mem_mask); }
virtual DECLARE_WRITE16_MEMBER(write_ram) { m_subslot->write_ram(space, offset, data, mem_mask); }
-
+
virtual void late_subslot_setup();
-
+
private:
required_device<sp0256_device> m_speech;
required_device<intv_cart_slot_device> m_subslot;