summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2008-02-19 09:26:23 +0000
committer Aaron Giles <aaron@aarongiles.com>2008-02-19 09:26:23 +0000
commit08c3ff61e0146b865c2e118361279ab0588bbb60 (patch)
tree3f8532d6acc603e584f9796f6a0b29cc683333c8
parent787b37d60e6000c2ad90bc6f725dc88aa993eb93 (diff)
From: JEA Wallace [mailto:jeaw100@york.ac.uk]
Subject: Various little changes from the last month I've been meaning to send these in for ages, but the day job has been insane for a while now, so it's been hard to keep these up to date. Firstly, I've fixed a few corner cases I've noticed in the 6840 emulation based on running the MPU4 test ROMs, and added the ability to dynamically alter the external clock frequencies in game (since these pins can be connected to other timing devices in a daisy chain, this may well prove handy for speech chips and the like). The 6850 core has also been changed to allow dynamic RX and TX clock alteration, to at least try to remove a few of the MPU4 timing problems (the ACIA clocks are triggered by the output pin of one of the 6840 timers, so the clock rate will vary according to what has been programmed into the counter, rather than a fixed value). MPU4 has been changed to document the Video board a bit better, and to change a game name to match what is actually on the marquee. Other names have changed, to better describe the program nature (AMLD versions are legally speaking not SWPs, as there is no capacity for payout, so AMLD SWP is an oxymoron). Lastly, since I was smoketesting 6840ptm using cchasm anyway, I've added some documentation of the Cosmic Chasm crystals, and merged the memory maps.
-rw-r--r--src/emu/machine/6840ptm.c123
-rw-r--r--src/emu/machine/6840ptm.h20
-rw-r--r--src/emu/machine/6850acia.c13
-rw-r--r--src/emu/machine/6850acia.h3
-rw-r--r--src/mame/drivers/cchasm.c73
-rw-r--r--src/mame/drivers/mpu4drvr.c20
6 files changed, 174 insertions, 78 deletions
diff --git a/src/emu/machine/6840ptm.c b/src/emu/machine/6840ptm.c
index 023ca17968f..5013d67bd2c 100644
--- a/src/emu/machine/6840ptm.c
+++ b/src/emu/machine/6840ptm.c
@@ -66,6 +66,7 @@ struct _ptm6840
UINT8 mode[3];
UINT8 fired[3];
UINT8 t3_divisor;
+ UINT8 t3_scaler;
UINT8 IRQ;
UINT8 status_reg;
UINT8 status_read_since_int;
@@ -135,9 +136,11 @@ int ptm6840_get_irq(int which)
// //
///////////////////////////////////////////////////////////////////////////
-static void subtract_from_counter(int counter, int count, int which)
+static void subtract_from_counter(int which, int counter, int count)
{
int clock;
+ attotime duration;
+
ptm6840 *currptr = ptm + which;
/* determine the clock frequency for this timer */
@@ -171,13 +174,11 @@ static void subtract_from_counter(int counter, int count, int which)
/* store the result */
currptr->counter[counter] = (msb << 8) | lsb;
- timer_adjust_oneshot(currptr->timer[counter], attotime_mul(ATTOTIME_IN_HZ(clock), currptr->counter[counter]), which);
}
/* word mode */
else
{
- attotime duration;
int word = currptr->counter[counter];
/* count the clocks */
@@ -195,12 +196,35 @@ static void subtract_from_counter(int counter, int count, int which)
/* store the result */
currptr->counter[counter] = word;
+ }
+
+ if (currptr->enabled[counter])
+ {
duration = attotime_mul(ATTOTIME_IN_HZ(clock), currptr->counter[counter]);
if (counter == 2) duration = attotime_mul(duration, currptr->t3_divisor);
timer_adjust_oneshot(currptr->timer[counter], duration, which);
}
}
+static void ptm_tick(int which, int counter, int count)
+{
+ ptm6840 *currptr = ptm + which;
+
+ if (counter == 2)
+ {
+ currptr->t3_scaler += count;
+ if ( currptr->t3_scaler > currptr->t3_divisor-1)
+ {
+ subtract_from_counter(which,counter,1);
+ currptr->t3_scaler = 0;
+ }
+ }
+ else
+ {
+ subtract_from_counter(which,counter,count);
+ }
+}
+
///////////////////////////////////////////////////////////////////////////
// //
// Update Internal Interrupts //
@@ -236,7 +260,7 @@ INLINE void update_interrupts(int which)
// //
///////////////////////////////////////////////////////////////////////////
-static UINT16 compute_counter(int counter, int which)
+static UINT16 compute_counter(int which, int counter)
{
ptm6840 *currptr = ptm + which;
@@ -245,7 +269,10 @@ static UINT16 compute_counter(int counter, int which)
/* if there's no timer, return the count */
if (!currptr->enabled[counter])
+ {
+ PLOG(("MC6840 #%d: read counter(%d): %d\n", which, counter, currptr->counter[counter]));
return currptr->counter[counter];
+ }
/* determine the clock frequency for this timer */
if (currptr->control_reg[counter] & 0x02)
@@ -279,7 +306,7 @@ static UINT16 compute_counter(int counter, int which)
// //
///////////////////////////////////////////////////////////////////////////
-static void reload_count(int idx, int which)
+static void reload_count(int which, int idx)
{
int clock;
int count;
@@ -321,7 +348,6 @@ static void reload_count(int idx, int which)
duration = attotime_mul(ATTOTIME_IN_HZ(clock), count);
if (idx == 2) duration = attotime_mul(duration, currptr->t3_divisor);
- timer_adjust_oneshot(currptr->timer[idx], duration, which);
PLOG(("MC6840 #%d: reload_count(%d): output = %lf\n", which, idx, attotime_to_double(duration)));
if (!currptr->control_reg[idx] & 0x02)
@@ -335,6 +361,7 @@ static void reload_count(int idx, int which)
else
{
currptr->enabled[idx] = 1;
+ timer_adjust_oneshot(currptr->timer[idx], duration, which);
timer_enable(currptr->timer[idx],TRUE);
}
}
@@ -380,6 +407,7 @@ void ptm6840_config(int which, const ptm6840_interface *intf)
state_save_register_item("6840ptm", which, currptr->status_read_since_int);
state_save_register_item("6840ptm", which, currptr->status_reg);
state_save_register_item("6840ptm", which, currptr->t3_divisor);
+ state_save_register_item("6840ptm", which, currptr->t3_scaler);
state_save_register_item("6840ptm", which, currptr->internal_clock);
state_save_register_item("6840ptm", which, currptr->IRQ);
@@ -395,7 +423,6 @@ void ptm6840_config(int which, const ptm6840_interface *intf)
state_save_register_item_array("6840ptm", which, currptr->latch);
ptm6840_reset(which);
-
}
///////////////////////////////////////////////////////////////////////////
@@ -454,7 +481,7 @@ int ptm6840_read(int which, int offset)
case PTM_6840_MSBBUF3://6
{
int idx = (offset - 2)/2;
- int result = compute_counter(idx, which);
+ int result = compute_counter(which, idx);
/* clear the interrupt if the status has been read */
if (currptr->status_read_since_int & (1 << idx))
@@ -544,7 +571,7 @@ void ptm6840_write (int which, int offset, int data)
{
for (i = 0; i < 3; i++)
{
- reload_count(i,which);
+ reload_count(which,i);
}
}
@@ -553,7 +580,7 @@ void ptm6840_write (int which, int offset, int data)
/* changing the clock source? (e.g. Zwackery) */
if (diffs & 0x02)
- reload_count(idx,which);
+ reload_count(which,idx);
}
break;
}
@@ -582,7 +609,7 @@ void ptm6840_write (int which, int offset, int data)
/* reload the count if in an appropriate mode */
if (!(currptr->control_reg[idx] & 0x10))
{
- reload_count(idx, which);
+ reload_count(which,idx);
}
PLOG(("%06X:MC6840 #%d: Counter %d latch = %04X\n", activecpu_get_previouspc(), which, idx, currptr->latch[idx]));
break;
@@ -613,13 +640,13 @@ static void ptm6840_timeout(int which, int idx)
{ // output enabled
if ( p->intf )
{
- if ((p->mode[idx] == 0)|(p->mode[idx] == 2))
+ if ((p->mode[idx] == 0)||(p->mode[idx] == 2))
{
p->output[idx] = p->output[idx]?0:1;
PLOG(("**ptm6840 %d t%d output %d **\n", which, idx+1, p->output[idx]));
if ( p->intf->out_func[idx] ) p->intf->out_func[idx](0, p->output[idx]);
}
- if ((p->mode[idx] == 4)|(p->mode[idx] == 6))
+ if ((p->mode[idx] == 4)||(p->mode[idx] == 6))
{
if (!p->fired[idx])
{
@@ -632,7 +659,7 @@ static void ptm6840_timeout(int which, int idx)
}
}
p->enabled[idx]= 0;
- reload_count(idx,which);
+ reload_count(which,idx);
}
static TIMER_CALLBACK( ptm6840_t1_timeout ) { ptm6840_timeout(param, 0); }
@@ -649,10 +676,10 @@ INLINE void ptm6840_set_gate(int which, int state, int idx)
{
ptm6840 *p = ptm + which;
- if ((p->mode[idx] == 0)|(p->mode[idx] == 2)|(p->mode[0] == 4)|(p->mode[idx] == 6))
+ if ((p->mode[idx] == 0)||(p->mode[idx] == 2)||(p->mode[0] == 4)||(p->mode[idx] == 6))
{
if (state == 0 && p->gate[idx])
- reload_count(idx,which);
+ reload_count(which,idx);
}
p->gate[idx] = state;
}
@@ -675,10 +702,72 @@ INLINE void ptm6840_set_clock(int which, int state, int idx)
if (!(p->control_reg[idx] & 0x02))
{
- if (state) subtract_from_counter(idx,1,which);
+ if (state) ptm_tick(which,idx,1);
}
}
+///////////////////////////////////////////////////////////////////////////
+// //
+// ptm6840_get_count: get count value //
+// //
+///////////////////////////////////////////////////////////////////////////
+
+UINT16 ptm6840_get_count(int which,int counter)
+{
+ return compute_counter(which, counter);
+}
+
+///////////////////////////////////////////////////////////////////////////
+// //
+// ptm6840_set_ext_clock: set external clock frequency //
+// //
+///////////////////////////////////////////////////////////////////////////
+
+void ptm6840_set_ext_clock(int which, int counter, int clock)
+{
+ ptm6840 *currptr = ptm + which;
+ currptr->external_clock[counter] = clock;
+
+ if (!currptr->control_reg[counter] & 0x02)
+ {
+ if (!currptr->intf->external_clock[counter])
+ {
+ currptr->enabled[counter] = 0;
+ timer_enable(currptr->timer[counter],FALSE);
+ }
+ }
+ else
+ {
+ int count;
+ attotime duration;
+
+ /* determine the number of clock periods before we expire */
+ count = currptr->counter[counter];
+ if (currptr->control_reg[counter] & 0x04)
+ count = ((count >> 8) + 1) * ((count & 0xff) + 1);
+ else
+ count = count + 1;
+
+ duration = attotime_mul(ATTOTIME_IN_HZ(clock), count);
+ if (counter == 2) duration = attotime_mul(duration, currptr->t3_divisor);
+ currptr->enabled[counter] = 1;
+ timer_adjust_oneshot(currptr->timer[counter], duration, which);
+ timer_enable(currptr->timer[counter],TRUE);
+ }
+}
+
+///////////////////////////////////////////////////////////////////////////
+// //
+// ptm6840_get_ext_clock: get external clock frequency //
+// //
+///////////////////////////////////////////////////////////////////////////
+
+int ptm6840_get_ext_clock(int which, int counter)
+{
+ ptm6840 *currptr = ptm + which;
+ return currptr->external_clock[counter];
+}
+
void ptm6840_set_c1(int which, int state) { ptm6840_set_clock(which, state, 0); }
void ptm6840_set_c2(int which, int state) { ptm6840_set_clock(which, state, 1); }
void ptm6840_set_c3(int which, int state) { ptm6840_set_clock(which, state, 2); }
diff --git a/src/emu/machine/6840ptm.h b/src/emu/machine/6840ptm.h
index f125338b9e3..f5a5e3ed757 100644
--- a/src/emu/machine/6840ptm.h
+++ b/src/emu/machine/6840ptm.h
@@ -5,8 +5,6 @@
This function is a simple emulation of up to 4 MC6840 PTM
(Programmable Timer Module)
- based on ( 6522 and 6821 PTM )
-
**********************************************************************/
#ifndef PTM_6840
@@ -31,15 +29,19 @@ int ptm6840_read( int which, int offset);
void ptm6840_write( int which, int offset, int data);
int ptm6840_get_status(int which, int clock); // get whether timer is enabled
-int ptm6840_get_irq(int which); // get IRQ state
-void ptm6840_set_g1(int which, int state); // set gate1 state
-void ptm6840_set_c1(int which, int state); // set clock1 state
+int ptm6840_get_irq(int which); // get IRQ state
+UINT16 ptm6840_get_count(int which,int counter);// get counter value
+void ptm6840_set_ext_clock(int which, int counter, int clock); // set clock frequency
+int ptm6840_get_ext_clock(int which, int counter);// get clock frequency
+
+void ptm6840_set_g1(int which, int state); // set gate1 state
+void ptm6840_set_c1(int which, int state); // set clock1 state
-void ptm6840_set_g2(int which, int state); // set gate2 state
-void ptm6840_set_c2(int which, int state); // set clock2 state
+void ptm6840_set_g2(int which, int state); // set gate2 state
+void ptm6840_set_c2(int which, int state); // set clock2 state
-void ptm6840_set_g3(int which, int state); // set gate3 state
-void ptm6840_set_c3(int which, int state); // set clock3 state
+void ptm6840_set_g3(int which, int state); // set gate3 state
+void ptm6840_set_c3(int which, int state); // set clock3 state
/*-------------------------------------------------------------------------*/
diff --git a/src/emu/machine/6850acia.c b/src/emu/machine/6850acia.c
index bee9b7e4247..e4738c1a8f0 100644
--- a/src/emu/machine/6850acia.c
+++ b/src/emu/machine/6850acia.c
@@ -630,6 +630,19 @@ static TIMER_CALLBACK( receive_event )
}
}
+void acia6850_set_rx_clock(int which, int clock)
+{
+ acia_6850 *acia_p = &acia[which];
+ acia_p->rx_clock = clock;
+}
+
+void acia6850_set_tx_clock(int which, int clock)
+{
+ acia_6850 *acia_p = &acia[which];
+ acia_p->tx_clock = clock;
+}
+
+
WRITE8_HANDLER( acia6850_0_ctrl_w ) { acia6850_ctrl_w(0, data); }
WRITE8_HANDLER( acia6850_1_ctrl_w ) { acia6850_ctrl_w(1, data); }
WRITE8_HANDLER( acia6850_2_ctrl_w ) { acia6850_ctrl_w(2, data); }
diff --git a/src/emu/machine/6850acia.h b/src/emu/machine/6850acia.h
index 9a8e1756f48..788b0a6cbde 100644
--- a/src/emu/machine/6850acia.h
+++ b/src/emu/machine/6850acia.h
@@ -28,6 +28,9 @@ struct acia6850_interface
void acia6850_config(int which, const struct acia6850_interface *intf);
+void acia6850_set_rx_clock(int which, int clock);
+void acia6850_set_tx_clock(int which, int clock);
+
WRITE8_HANDLER( acia6850_0_ctrl_w );
WRITE8_HANDLER( acia6850_1_ctrl_w );
WRITE8_HANDLER( acia6850_2_ctrl_w );
diff --git a/src/mame/drivers/cchasm.c b/src/mame/drivers/cchasm.c
index 838fe6ae28f..252b5fe9dda 100644
--- a/src/mame/drivers/cchasm.c
+++ b/src/mame/drivers/cchasm.c
@@ -22,6 +22,7 @@
#include "sound/ay8910.h"
#include "cpu/z80/z80daisy.h"
+#define CCHASM_68K_CLOCK (XTAL_8MHz)
/*************************************
*
@@ -29,58 +30,32 @@
*
*************************************/
-static ADDRESS_MAP_START( readmem, ADDRESS_SPACE_PROGRAM, 16 )
- AM_RANGE(0x000000, 0x00ffff) AM_READ(MRA16_ROM)
- AM_RANGE(0x040000, 0x04000f) AM_READ(ptm6840_0_lsb_r)
- AM_RANGE(0x060000, 0x060001) AM_READ(input_port_0_word_r)
- AM_RANGE(0xf80000, 0xf800ff) AM_READ(cchasm_io_r)
- AM_RANGE(0xffb000, 0xffffff) AM_READ(MRA16_RAM)
-ADDRESS_MAP_END
-
-
-static ADDRESS_MAP_START( writemem, ADDRESS_SPACE_PROGRAM, 16 )
- AM_RANGE(0x000000, 0x00ffff) AM_WRITE(MWA16_ROM)
- AM_RANGE(0x040000, 0x04000f) AM_WRITE(ptm6840_0_lsb_w)
+static ADDRESS_MAP_START( memmap, ADDRESS_SPACE_PROGRAM, 16 )
+ AM_RANGE(0x000000, 0x00ffff) AM_ROM
+ AM_RANGE(0x040000, 0x04000f) AM_READWRITE(ptm6840_0_lsb_r,ptm6840_0_lsb_w)
AM_RANGE(0x050000, 0x050001) AM_WRITE(cchasm_refresh_control_w)
- AM_RANGE(0x060000, 0x060001) AM_WRITE(cchasm_led_w)
+ AM_RANGE(0x060000, 0x060001) AM_READWRITE(input_port_0_word_r,cchasm_led_w)
AM_RANGE(0x070000, 0x070001) AM_WRITE(watchdog_reset16_w)
- AM_RANGE(0xf80000, 0xf800ff) AM_WRITE(cchasm_io_w)
- AM_RANGE(0xffb000, 0xffffff) AM_WRITE(MWA16_RAM) AM_BASE(&cchasm_ram)
+ AM_RANGE(0xf80000, 0xf800ff) AM_READWRITE(cchasm_io_r,cchasm_io_w)
+ AM_RANGE(0xffb000, 0xffffff) AM_RAM AM_BASE(&cchasm_ram)
ADDRESS_MAP_END
-
-
/*************************************
*
* Sound CPU memory handlers
*
*************************************/
-static ADDRESS_MAP_START( sound_readmem, ADDRESS_SPACE_PROGRAM, 8 )
- AM_RANGE(0x0000, 0x0fff) AM_READ(MRA8_ROM)
- AM_RANGE(0x4000, 0x43ff) AM_READ(MRA8_RAM)
- AM_RANGE(0x5000, 0x53ff) AM_READ(MRA8_RAM)
- AM_RANGE(0x6000, 0x6fff) AM_READ(cchasm_snd_io_r)
+static ADDRESS_MAP_START( sound_memmap, ADDRESS_SPACE_PROGRAM, 8 )
+ AM_RANGE(0x0000, 0x0fff) AM_ROM
+ AM_RANGE(0x4000, 0x43ff) AM_RAM
+ AM_RANGE(0x5000, 0x53ff) AM_RAM
+ AM_RANGE(0x6000, 0x6fff) AM_READWRITE(cchasm_snd_io_r,cchasm_snd_io_w)
ADDRESS_MAP_END
-
-static ADDRESS_MAP_START( sound_writemem, ADDRESS_SPACE_PROGRAM, 8 )
- AM_RANGE(0x0000, 0x0fff) AM_WRITE(MWA8_ROM)
- AM_RANGE(0x4000, 0x43ff) AM_WRITE(MWA8_RAM)
- AM_RANGE(0x5000, 0x53ff) AM_WRITE(MWA8_RAM)
- AM_RANGE(0x6000, 0x6fff) AM_WRITE(cchasm_snd_io_w)
-ADDRESS_MAP_END
-
-
-static ADDRESS_MAP_START( sound_readport, ADDRESS_SPACE_IO, 8 )
- ADDRESS_MAP_FLAGS( AMEF_ABITS(8) )
- AM_RANGE(0x00, 0x03) AM_READ(z80ctc_0_r)
-ADDRESS_MAP_END
-
-
-static ADDRESS_MAP_START( sound_writeport, ADDRESS_SPACE_IO, 8 )
+static ADDRESS_MAP_START( sound_portmap, ADDRESS_SPACE_IO, 8 )
ADDRESS_MAP_FLAGS( AMEF_ABITS(8) )
- AM_RANGE(0x00, 0x03) AM_WRITE(z80ctc_0_w)
+ AM_RANGE(0x00, 0x03) AM_READWRITE(z80ctc_0_r,z80ctc_0_w)
ADDRESS_MAP_END
static void cchasm_6840_irq(int state)
@@ -89,8 +64,8 @@ static void cchasm_6840_irq(int state)
}
static const ptm6840_interface cchasm_6840_intf =
{
- 8000000/10,
- { 0,8000000/10,0 },
+ CCHASM_68K_CLOCK/10,
+ { 0,CCHASM_68K_CLOCK/10,0 },
{ NULL, NULL, NULL },
cchasm_6840_irq
};
@@ -102,7 +77,7 @@ static const ptm6840_interface cchasm_6840_intf =
*************************************/
static INPUT_PORTS_START( cchasm )
- PORT_START /* DSW */
+ PORT_START_TAG("DSW")
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Lives ) )
PORT_DIPSETTING( 0x01, "3" )
PORT_DIPSETTING( 0x00, "5" )
@@ -125,10 +100,10 @@ static INPUT_PORTS_START( cchasm )
PORT_DIPSETTING( 0x40, DEF_STR( 1C_1C ) )
PORT_SERVICE( 0x80, IP_ACTIVE_LOW )
- PORT_START /* IN1 */
+ PORT_START_TAG("IN1")
PORT_BIT( 0xff, 0, IPT_DIAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10)
- PORT_START /* IN2 */
+ PORT_START_TAG("IN2")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON2 )
@@ -138,7 +113,7 @@ static INPUT_PORTS_START( cchasm )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 )
- PORT_START /* IN3 */
+ PORT_START_TAG("IN3")
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN3 )
@@ -178,13 +153,13 @@ static MACHINE_DRIVER_START( cchasm )
MDRV_MACHINE_START(cchasm)
/* basic machine hardware */
- MDRV_CPU_ADD(M68000,8000000) /* 8 MHz (from schematics) */
- MDRV_CPU_PROGRAM_MAP(readmem,writemem)
+ MDRV_CPU_ADD(M68000,CCHASM_68K_CLOCK) /* 8 MHz (from schematics) */
+ MDRV_CPU_PROGRAM_MAP(memmap,0)
MDRV_CPU_ADD(Z80,3584229) /* 3.58 MHz (from schematics) */
MDRV_CPU_CONFIG(daisy_chain)
- MDRV_CPU_PROGRAM_MAP(sound_readmem,sound_writemem)
- MDRV_CPU_IO_MAP(sound_readport,sound_writeport)
+ MDRV_CPU_PROGRAM_MAP(sound_memmap,0)
+ MDRV_CPU_IO_MAP(sound_portmap,0)
MDRV_SCREEN_REFRESH_RATE(40)
diff --git a/src/mame/drivers/mpu4drvr.c b/src/mame/drivers/mpu4drvr.c
index c498d4736d2..6006ca547a1 100644
--- a/src/mame/drivers/mpu4drvr.c
+++ b/src/mame/drivers/mpu4drvr.c
@@ -341,7 +341,19 @@ static WRITE8_HANDLER( vid_o1_callback )
static WRITE8_HANDLER( vid_o2_callback )
{
+ int clock = ptm6840_get_ext_clock(1, 1)/(ptm6840_get_count(1,1)?ptm6840_get_count(1,1):1)
+ *ptm6840_get_ext_clock(1, 0)/(ptm6840_get_count(1,0)?ptm6840_get_count(1,0):1)
+ *ptm6840_get_ext_clock(1, 2)/(ptm6840_get_count(1,2)?ptm6840_get_count(1,2):1);
+
ptm6840_set_c3( 1, data); // copy output value to c3
+
+ if (clock)
+ {
+ acia6850_set_rx_clock(0, clock);
+ acia6850_set_tx_clock(0, clock);
+ acia6850_set_rx_clock(1, clock);
+ acia6850_set_tx_clock(1, clock);
+ }
}
static WRITE8_HANDLER( vid_o3_callback )
@@ -1450,7 +1462,9 @@ static ADDRESS_MAP_START( vp_68k_map, ADDRESS_SPACE_PROGRAM, 16 )
ADDRESS_MAP_END
//Deal 'Em was designed as an enhanced gamecard, to fit into an existing MPU4 cabinet
-//It's an unoffical addon, and does all its work through the existing 6809 CPU
+//It's an unoffical addon, and does all its work through the existing 6809 CPU.
+//Although given unofficial status, Barcrest's patent on the MPU4 Video hardware (GB1596363) describes
+//the Deal 'Em board design, rather than the one they ultimately used.
static const gfx_layout dealemcharlayout =
{
@@ -1954,8 +1968,8 @@ GAME( 1987, dealem, 0, dealem, dealem, 0, ROT0, "Zenitone", "Deal 'Em
GAME( 199?, bctvidbs,0, mpu4mod2, mpu4, 0, ROT0, "Barcrest", "MPU4 Video Firmware", GAME_IS_BIOS_ROOT )
GAME( 1994?,crmaze, bctvidbs,mpu4_vid, crmaze, crmaze,ROT0, "Barcrest", "The Crystal Maze: Team Challenge (SWP)", GAME_NOT_WORKING|GAME_NO_SOUND )
-GAME( 1992?,crmazea, crmaze, mpu4_vid, crmaze, crmaze,ROT0, "Barcrest", "The Crystal Maze (AMLD version SWP)", GAME_NOT_WORKING|GAME_NO_SOUND )
-GAME( 1993?,crmazeb, crmaze, mpu4_vid, crmaze, 0, ROT0, "Barcrest", "The Crystal Maze - Now Featuring Ocean Zone (AMLD Version SWP)", GAME_NOT_WORKING|GAME_NO_SOUND ) // unprotected?
+GAME( 1992?,crmazea, crmaze, mpu4_vid, crmaze, crmaze,ROT0, "Barcrest", "The Crystal Maze (AMLD Version)", GAME_NOT_WORKING|GAME_NO_SOUND )
+GAME( 1993?,crmazeb, crmaze, mpu4_vid, crmaze, 0, ROT0, "Barcrest", "The New Crystal Maze - Now Featuring Ocean Zone! (AMLD Version)", GAME_NOT_WORKING|GAME_NO_SOUND ) // unprotected?
GAME( 1990, turnover,bctvidbs,mpu4_vid, mpu4, 0, ROT0, "Barcrest", "Turnover", GAME_NOT_WORKING|GAME_NO_SOUND ) // unprotected?
GAME( 1992, skiltrek,bctvidbs,mpu4_vid, mpu4, 0, ROT0, "Barcrest", "Skill Trek", GAME_NOT_WORKING|GAME_NO_SOUND ) // unprotected?
GAME( 1990, timemchn,bctvidbs,mpu4_vid, mpu4, 0, ROT0, "Barcrest", "Time Machine v2.0", GAME_NOT_WORKING|GAME_NO_SOUND ) // unprotected?