summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2008-08-18 04:31:08 +0000
committer Aaron Giles <aaron@aarongiles.com>2008-08-18 04:31:08 +0000
commit284b5a0d95c4740b25fd1d06aecd2cc74eae12f3 (patch)
treeed984f6362decda13c57c168d5d2d18d6e30d06c /src/mame
parentd0eb89399fc684c90330466674470775079ae113 (diff)
Added new generic laserdisc VIDEO_UPDATE handler to the laserdisc code.
This handler works for both disc-only games and those with overlays. For disc-only games, the base macro is sufficient. For games with overlays, an additional set of configuration macros are provided: MDRV_LASERDISC_OVERLAY - specifies update function, width, height, and bitmap format of the overlay MDRV_LASERDISC_OVERLAY_CLIP - specifies the visible area of the overlay bitmap MDRV_LASERDISC_OVERLAY_POSITION - specifies default x,y position MDRV_LASERDISC_OVERLAY_SCALE - specifies default x,y scale factors The update function provided to MDRV_LASERDISC_OVERLAY is identical to a normal VIDEO_UPDATE callback, so a standard one can be used. All existing laserdisc drivers have been updated to support this new rendering mechanism, removing much duplicated code. Added the ability to configure the overlay position and scale parameters at runtime. Added OSD menus to control them. Added logic to save/restore the data in the game's configuration file. Added new macros MDRV_LASERDISC_SCREEN_ADD_NTSC and _PAL, which defines a standard screen with the correct video timing characteristics and update function for laserdiscs. Updated all drivers to use these macros instead of defining their own screens. Added DISK_REGIONS to all laserdisc drivers. Added DISK_IMAGE_READONLY_OPTIONAL to support games (like Cube Quest) where the disk is non-essential to the game's operation. Fixed bug in identifying the custom sound driver for the laserdisc. Updated ldverify to identify blank regions of the disc for post- processing. Fixed rendering 16bpp with alpha using bilinear filters (fixes screenshots of laserdisc games with overlays). Included support for parsing .gdi files in chdman. [ElSemi] Added new driver for Cube Quest. This includes CPU cores for the three bitslice processors, as well as laserdisc support for the hacked laserdisc that was used to drive the games. [Philip Bennett, Joe Magiera, Warren Ondras] Note that the SHA1/MD5 for the laserdisc will likely undergo at least one more change before being finalized.
Diffstat (limited to 'src/mame')
-rw-r--r--src/mame/drivers/alg.c84
-rw-r--r--src/mame/drivers/cliffhgr.c68
-rw-r--r--src/mame/drivers/cubeqst.c700
-rw-r--r--src/mame/drivers/dlair.c102
-rw-r--r--src/mame/drivers/esh.c28
-rw-r--r--src/mame/drivers/gottlieb.c12
-rw-r--r--src/mame/drivers/gpworld.c22
-rw-r--r--src/mame/drivers/istellar.c25
-rw-r--r--src/mame/drivers/lgp.c23
-rw-r--r--src/mame/drivers/segald.c35
-rw-r--r--src/mame/drivers/superdq.c55
-rw-r--r--src/mame/drivers/thayers.c18
-rw-r--r--src/mame/includes/gottlieb.h2
-rw-r--r--src/mame/mame.mak2
-rw-r--r--src/mame/mamedriv.c1
-rw-r--r--src/mame/video/gottlieb.c62
16 files changed, 807 insertions, 432 deletions
diff --git a/src/mame/drivers/alg.c b/src/mame/drivers/alg.c
index b8e386a9523..b00a472e21f 100644
--- a/src/mame/drivers/alg.c
+++ b/src/mame/drivers/alg.c
@@ -32,11 +32,6 @@ static emu_timer *serial_timer;
static UINT8 serial_timer_active;
static UINT16 input_select;
-static bitmap_t *amiga_bitmap;
-static render_texture *video_texture;
-static render_texture *overlay_texture;
-
-static void video_cleanup(running_machine *machine);
static TIMER_CALLBACK( response_timer );
@@ -72,16 +67,6 @@ static int get_lightgun_pos(const device_config *screen, int player, int *x, int
static VIDEO_START( alg )
{
- /* reset our globals */
- video_texture = NULL;
- overlay_texture = NULL;
-
- /* configure for cleanup */
- add_exit_callback(machine, video_cleanup);
-
- /* allocate Amiga bitmap */
- amiga_bitmap = video_screen_auto_bitmap_alloc(machine->primary_screen);
-
/* standard video start */
VIDEO_START_CALL(amiga);
@@ -91,63 +76,6 @@ static VIDEO_START( alg )
}
-static void video_cleanup(running_machine *machine)
-{
- if (video_texture != NULL)
- render_texture_free(video_texture);
- if (overlay_texture != NULL)
- render_texture_free(overlay_texture);
-}
-
-
-
-/*************************************
- *
- * Video update
- *
- *************************************/
-
-static VIDEO_UPDATE( alg )
-{
- int y;
-
- /* update the Amiga video */
- for (y = cliprect->min_y; y <= cliprect->max_y; y++)
- amiga_render_scanline(screen->machine, amiga_bitmap, y);
-
- /* at the end of the frame, composite the video */
- if (!video_skip_this_frame() && (cliprect->max_y == video_screen_get_visible_area(screen)->max_y))
- {
- bitmap_t *vidbitmap;
- rectangle fixedvis = *video_screen_get_visible_area(screen);
- fixedvis.max_x++;
- fixedvis.max_y++;
-
- /* first lay down the video data */
- laserdisc_get_video(laserdisc, &vidbitmap);
- if (video_texture == NULL)
- video_texture = render_texture_alloc(NULL, NULL);
- render_texture_set_bitmap(video_texture, vidbitmap, NULL, 0, TEXFORMAT_YUY16);
-
- /* then overlay the Amiga video */
- if (overlay_texture == NULL)
- overlay_texture = render_texture_alloc(NULL, NULL);
- render_texture_set_bitmap(overlay_texture, amiga_bitmap, &fixedvis, 0, TEXFORMAT_PALETTEA16);
-
- /* add both quads to the screen */
- render_container_empty(render_container_get_screen(screen));
- render_screen_add_quad(screen, 0.0f, 0.0f, 1.0f, 1.0f, MAKE_ARGB(0xff,0xff,0xff,0xff), video_texture, PRIMFLAG_BLENDMODE(BLENDMODE_NONE) | PRIMFLAG_SCREENTEX(1));
- render_screen_add_quad(screen, 0.0f, 0.0f, 1.0f, 1.0f, MAKE_ARGB(0xff,0xff,0xff,0xff), overlay_texture, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA) | PRIMFLAG_SCREENTEX(1));
-
- /* display disc information */
- if (laserdisc != NULL)
- popmessage("%s", laserdisc_describe_state(laserdisc));
- }
-
- return 0;
-}
-
-
/*************************************
*
@@ -473,21 +401,19 @@ static MACHINE_DRIVER_START( alg_r1 )
MDRV_NVRAM_HANDLER(generic_0fill)
MDRV_LASERDISC_ADD("laserdisc", SONY_LDP1450)
+ MDRV_LASERDISC_OVERLAY(amiga, 512*2, 262, BITMAP_FORMAT_INDEXED16)
+ MDRV_LASERDISC_OVERLAY_CLIP((129-8)*2, (449+8-1)*2, 44-8, 244+8-1)
/* video hardware */
- MDRV_VIDEO_ATTRIBUTES(VIDEO_SELF_RENDER)
-
- MDRV_SCREEN_ADD("main", RASTER)
- MDRV_SCREEN_REFRESH_RATE(59.97)
- MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
+ MDRV_LASERDISC_SCREEN_ADD_NTSC("main", BITMAP_FORMAT_INDEXED16)
+ MDRV_SCREEN_REFRESH_RATE(59.997)
MDRV_SCREEN_SIZE(512*2, 262)
MDRV_SCREEN_VISIBLE_AREA((129-8)*2, (449+8-1)*2, 44-8, 244+8-1)
+
MDRV_PALETTE_LENGTH(4097)
MDRV_PALETTE_INIT(amiga)
MDRV_VIDEO_START(alg)
- MDRV_VIDEO_UPDATE(alg)
/* sound hardware */
MDRV_SPEAKER_STANDARD_STEREO("left", "right")
diff --git a/src/mame/drivers/cliffhgr.c b/src/mame/drivers/cliffhgr.c
index 449e6c6a9f8..5c6bf10adcc 100644
--- a/src/mame/drivers/cliffhgr.c
+++ b/src/mame/drivers/cliffhgr.c
@@ -87,64 +87,10 @@ static const device_config *laserdisc;
static int port_bank = 0;
static int phillips_code = 0;
-static render_texture *video_texture;
-static render_texture *overlay_texture;
-static bitmap_t *last_video_bitmap;
-
static emu_timer *irq_timer;
/********************************************************/
-static void video_cleanup(running_machine *machine)
-{
- if (video_texture != NULL)
- render_texture_free(video_texture);
- if (overlay_texture != NULL)
- render_texture_free(overlay_texture);
-}
-
-static VIDEO_UPDATE( cliff )
-{
- /* update the TMS9928A video */
- VIDEO_UPDATE_CALL(tms9928a);
-
- if (laserdisc != NULL)
- {
- bitmap_t *vidbitmap;
- rectangle fixedvis = *TMS9928A_get_visarea();
- fixedvis.max_x++;
- fixedvis.max_y++;
-
- laserdisc_get_video(laserdisc, &vidbitmap);
-
- /* first lay down the video data */
- if (video_texture == NULL)
- video_texture = render_texture_alloc(NULL, NULL);
- if (vidbitmap != last_video_bitmap)
- render_texture_set_bitmap(video_texture, vidbitmap, NULL, 0, TEXFORMAT_YUY16);
-
- last_video_bitmap = vidbitmap;
-
- /* then overlay the TMS9928A video */
- if (overlay_texture == NULL)
- overlay_texture = render_texture_alloc(NULL, NULL);
- render_texture_set_bitmap(overlay_texture, bitmap, &fixedvis, 0, TEXFORMAT_PALETTEA16);
-
- /* add both quads to the screen */
- render_container_empty(render_container_get_screen(screen));
- render_screen_add_quad(screen, 0.0f, 0.0f, 1.0f, 1.0f, MAKE_ARGB(0xff,0xff,0xff,0xff), video_texture, PRIMFLAG_BLENDMODE(BLENDMODE_NONE) | PRIMFLAG_SCREENTEX(1));
- render_screen_add_quad(screen, 0.0f, 0.0f, 1.0f, 1.0f, MAKE_ARGB(0xff,0xff,0xff,0xff), overlay_texture, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA) | PRIMFLAG_SCREENTEX(1));
- }
-
- /* display disc information */
- if (laserdisc != NULL)
- popmessage("%s", laserdisc_describe_state(laserdisc));
-
- return 0;
-}
-
-/********************************************************/
-
static WRITE8_HANDLER( cliff_test_led_w )
{
set_led_status( 0, offset ^ 1 );
@@ -746,15 +692,15 @@ static MACHINE_DRIVER_START( cliffhgr )
MDRV_NVRAM_HANDLER(generic_0fill)
MDRV_LASERDISC_ADD("laserdisc", PIONEER_PR8210)
+ MDRV_LASERDISC_OVERLAY(tms9928a, 15+32*8+15, 27+24*8+24, BITMAP_FORMAT_INDEXED16)
+ MDRV_LASERDISC_OVERLAY_CLIP(15-12, 15+32*8+12-1, 27-9, 27+24*8+9-1)
/* start with the TMS9928a video configuration */
MDRV_IMPORT_FROM(tms9928a)
/* override video rendering and raw screen info */
- MDRV_VIDEO_ATTRIBUTES(VIDEO_SELF_RENDER)
- MDRV_VIDEO_UPDATE(cliff)
- MDRV_SCREEN_MODIFY("main")
- MDRV_SCREEN_RAW_PARAMS(13500000, 858, 0, 720, 262.5, 21, 262.5)
+ MDRV_SCREEN_REMOVE("main")
+ MDRV_LASERDISC_SCREEN_ADD_NTSC("main", BITMAP_FORMAT_INDEXED16)
/* sound hardware */
MDRV_SPEAKER_STANDARD_STEREO("left", "right")
@@ -822,13 +768,7 @@ ROM_END
static DRIVER_INIT( cliff )
{
- video_texture = NULL;
- overlay_texture = NULL;
- last_video_bitmap = NULL;
-
TMS9928A_configure(&tms9928a_interface);
-
- add_exit_callback(machine, video_cleanup);
}
diff --git a/src/mame/drivers/cubeqst.c b/src/mame/drivers/cubeqst.c
new file mode 100644
index 00000000000..134fddaf5fb
--- /dev/null
+++ b/src/mame/drivers/cubeqst.c
@@ -0,0 +1,700 @@
+/***************************************************************************
+
+ Simutrek Cube Quest
+
+ driver by Phil Bennett
+
+ TODO:
+ * Emulate D8478 laserdisc interface MCU
+ * Accurate video timings
+ - Derive from PROMs
+ * More accurate line fill circuitry emulation
+ - Use PROMs
+
+ Known bugs:
+ * The graphics tend go screwy when you add the first credit on the
+ 'Cubic History' screen.
+ * The guardians' pincer thingies shouldn't distort when they rotate
+
+****************************************************************************/
+
+#include "driver.h"
+#include "cpu/cubeqcpu/cubeqcpu.h"
+#include "deprecat.h"
+#include "sound/custom.h"
+#include "streams.h"
+#include "machine/laserdsc.h"
+
+
+/*************************************
+ *
+ * Constants
+ *
+ *************************************/
+
+/* TODO */
+#define CUBEQST_HBLANK 320
+#define CUBEQST_VCOUNT 280
+
+#define ALPHA_PEN 8192
+
+enum
+{
+ MAIN_CPU = 0,
+ ROTATE_CPU = 1,
+ LINE_CPU = 2,
+ SOUND_CPU = 3,
+} cpu_indices;
+
+
+/*************************************
+ *
+ * Statics
+ *
+ *************************************/
+
+static UINT16 *palette_ram;
+static UINT8 *depth_buffer;
+static int video_field;
+
+static UINT8 io_latch;
+static UINT8 reset_latch;
+
+static int disk_on;
+static int ldp_command_flag;
+static const device_config *laserdisc;
+
+/*************************************
+ *
+ * Video (move to separate file)
+ *
+ *************************************/
+
+static const rectangle overlay_clip = { 0, 320-1, 0, 256-8 };
+
+/* Get a pen number from a palette RAM entry */
+INLINE int get_output_color(UINT16 a)
+{
+ return ((a & 0xf000) >> 3) | ((a & 0x700) >> 2) | ((a & 0x70) >> 1) | (a & 0x7);
+}
+
+
+static VIDEO_START( cubeqst )
+{
+ video_field = 0;
+ depth_buffer = auto_malloc(512);
+
+ render_container_set_palette_alpha(render_container_get_screen(machine->primary_screen), ALPHA_PEN, 0);
+}
+
+/* TODO: Use resistor values */
+static PALETTE_INIT( cubeqst )
+{
+ int i;
+
+ for (i = 0; i < 8192; ++i)
+ {
+ UINT8 r, g, b, y;
+
+ b = i & 7;
+ g = (i >> 3) & 7;
+ r = (i >> 6) & 7;
+ y = ((i >> 9) & 0xf) * 2;
+
+ palette_set_color_rgb(machine, i, y*r, y*g, y*b);
+ }
+}
+
+/* TODO: This is a simplified version of what actually happens */
+static VIDEO_UPDATE( cubeqst )
+{
+ int y;
+
+ int palentry = palette_ram[255];
+
+ /*
+ * Clear the display with palette RAM entry 0xff
+ * This will be either transparent or an actual colour
+ */
+
+ /* Bit 3 selects LD/#GRAPHICS */
+ if ((palentry & (1 << 3)) && disk_on)
+ fillbitmap(bitmap, ALPHA_PEN, cliprect);
+ else
+ fillbitmap(bitmap, screen->machine->pens[get_output_color(palentry)], cliprect);
+
+ cpuintrf_push_context(LINE_CPU);
+
+ /* TODO: Add 1 for linebuffering? */
+ for (y = cliprect->min_y; y <= cliprect->max_y; ++y)
+ {
+ int i;
+ int num_entries = get_ptr_ram_val(y);
+ UINT32 *stk_ram = get_stack_ram();
+ UINT16 *dest = BITMAP_ADDR16(bitmap, y, 0);
+
+ /* Zap the depth buffer */
+ memset(depth_buffer, 0xff, 512);
+
+ /* Process all the spans on this scanline */
+ for (i = 0; i < num_entries; i += 2)
+ {
+ int color = 0, depth = 0;
+ int h1 = 0, h2 = 0;
+ int x;
+
+ int entry1 = stk_ram[(y << 7) | ((i + 0) & 0x7f)];
+ int entry2 = stk_ram[(y << 7) | ((i + 1) & 0x7f)];
+
+ UINT16 palram;
+ UINT16 pen;
+
+ /* Determine which entry is the start point and which is the stop */
+ if ( entry1 & (1 << 19) )
+ {
+ h1 = (entry2 >> 8) & 0x1ff;
+ depth = entry2 & 0xff;
+
+ h2 = (entry1 >> 8) & 0x1ff;
+ color = entry1 & 0xff;
+ }
+ else if ( entry2 & (1 << 19) )
+ {
+ h1 = (entry1 >> 8) & 0x1ff;
+ depth = entry1 & 0xff;
+
+ h2 = (entry2 >> 8) & 0x1ff;
+ color = entry2 & 0xff;
+ }
+ else
+ {
+ // Shouldn't happen...
+ }
+
+ /* Get the 16-bit palette RAM entry */
+ palram = palette_ram[color];
+
+ if (palram & (1 << 3))
+ /* If transparent, draw using our special alpha pen */
+ pen = ALPHA_PEN;
+ else
+ /* Otherwise map the entry to a MAME pen */
+ pen = screen->machine->pens[get_output_color(palram)];
+
+ /* Draw the span, testing for depth */
+ for (x = h1; x <= h2; ++x)
+ {
+ if (!(depth_buffer[x] < depth))
+ {
+ dest[x] = pen;
+ depth_buffer[x] = depth;
+ }
+ }
+ }
+ }
+
+ cpuintrf_pop_context();
+ return 0;
+}
+
+static READ16_HANDLER( line_r )
+{
+ /* I think this is unusued */
+ return video_screen_get_vpos(machine->primary_screen);
+}
+
+static INTERRUPT_GEN( vblank )
+{
+ int int_level = video_field == 0 ? 5 : 6;
+
+ cpunum_set_input_line(machine, MAIN_CPU, int_level, HOLD_LINE);
+
+ /* Update the laserdisc */
+ laserdisc_vsync(laserdisc);
+ video_field ^= 1;
+}
+
+
+/*************************************
+ *
+ * Laserdisc Interface
+ *
+ *************************************/
+
+static WRITE16_HANDLER( laserdisc_w )
+{
+ ldp_command_flag = 1;
+ laserdisc_data_w(laserdisc, data & 0xff);
+}
+
+/* Called by the player emulation to acknowledge the 68000 command */
+void ldp_ack_callback(void)
+{
+ ldp_command_flag = 0;
+}
+
+/*
+ D0: Command acknowledge
+ D1: Seek status (0 = searching, 1 = ready)
+*/
+static READ16_HANDLER( laserdisc_r )
+{
+ int ldp_seek_status = (laserdisc_line_r(laserdisc, LASERDISC_LINE_STATUS) == ASSERT_LINE) ? 1 : 0;
+
+ return (ldp_seek_status << 1) | ldp_command_flag;
+}
+
+
+/* LDP audio squelch control */
+static WRITE16_HANDLER( ldaud_w )
+{
+ simutrek_set_audio_squelch(laserdisc, data & 1 ? ASSERT_LINE : CLEAR_LINE);
+}
+
+/*
+ Control Register
+ ================
+
+ D0: Disk on
+ D1: H Genlock
+ D3: V Genlock
+
+ Note: Can only be written during VBLANK (as with palette RAM)
+*/
+static WRITE16_HANDLER( control_w )
+{
+ disk_on = data & 1;
+}
+
+
+/*************************************
+ *
+ * General Machine Stuff
+ *
+ *************************************/
+
+static TIMER_CALLBACK( delayed_bank_swap )
+{
+ cpuintrf_push_context(LINE_CPU);
+ cubeqcpu_swap_line_banks();
+
+ /* TODO: This is a little dubious */
+ clear_stack();
+
+ cpuintrf_pop_context();
+}
+
+
+static void swap_linecpu_banks(void)
+{
+ /* Best sync up before we switch banks around */
+ timer_call_after_resynch(NULL, 0, delayed_bank_swap);
+}
+
+
+/*
+ Reset Control
+ =============
+
+ D0: /Display (includes rotate and line processors)
+ D1: /Sound
+ D2: /Disk
+*/
+static WRITE16_HANDLER( reset_w )
+{
+ cpunum_set_input_line(machine, ROTATE_CPU, INPUT_LINE_RESET, data & 1 ? CLEAR_LINE : ASSERT_LINE);
+ cpunum_set_input_line(machine, LINE_CPU, INPUT_LINE_RESET, data & 1 ? CLEAR_LINE : ASSERT_LINE);
+ cpunum_set_input_line(machine, SOUND_CPU, INPUT_LINE_RESET, data & 2 ? CLEAR_LINE : ASSERT_LINE);
+
+ /* Swap stack and pointer RAM banks on rising edge of display reset */
+ if (!BIT(reset_latch, 0) && BIT(data, 0))
+ swap_linecpu_banks();
+
+ if (!BIT(data, 2))
+ device_reset(laserdisc);
+
+ reset_latch = data & 0xff;
+}
+
+
+/*************************************
+ *
+ * I/O
+ *
+ *************************************/
+
+static WRITE16_HANDLER( io_w )
+{
+ /*
+ 0: Spare lamp
+ 1: Spare driver
+ 2: Coin counter
+ 3: Left-front lamp
+ 4: Right-front lamp
+ 5: Righ back lamp
+ 6: Spare lamp
+ 7: LED latch clock
+ */
+
+ /* TODO: On rising edge of Q7, status LED latch is written */
+ if ( !BIT(io_latch, 7) && BIT(data, 7) )
+ {
+ /*
+ 0: Battery failure
+ 1: Bad coin
+ 2: No laser unit
+ */
+ }
+
+ io_latch = data;
+}
+
+static READ16_HANDLER( io_r )
+{
+ UINT16 port_data = input_port_read(machine, "IO");
+
+ /*
+ Certain bits depend on Q7 of the IO latch:
+
+ 5: Cube / Trackball H clock
+ 6: R-Fire / Trackball H data
+ 7: L-Fire / Trackball V clock
+ 10: Spare / Trackball V data
+ */
+
+ if ( !BIT(io_latch, 7) )
+ return port_data;
+ else
+ /* Return zeroes for the trackball signals for now */
+ return port_data & ~0x4e0;
+}
+
+/* Trackball ('CHOP') */
+static READ16_HANDLER( chop_r )
+{
+ return (input_port_read(machine, "TRACK_X") << 8) | input_port_read(machine, "TRACK_Y");
+}
+
+
+/*************************************
+ *
+ * Input definitions
+ *
+ *************************************/
+
+static INPUT_PORTS_START( cubeqst )
+ PORT_START("IO")
+ PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_TILT )
+ PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_COIN1 )
+ PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_COIN2 )
+ PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME( "Cube" )
+ PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME( "Right Fire" )
+ PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME( "Left Fire" )
+ PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_SERVICE )
+ PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_COIN3 ) PORT_NAME( "Free Game" )
+ PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0xf800, IP_ACTIVE_LOW, IPT_UNUSED )
+
+ PORT_START("TRACK_X")
+ PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_X ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10)
+
+ PORT_START("TRACK_Y")
+ PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_Y ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10)
+INPUT_PORTS_END
+
+
+/*************************************
+ *
+ * CPU memory handlers
+ *
+ *************************************/
+
+static ADDRESS_MAP_START( m68k_program_map, ADDRESS_SPACE_PROGRAM, 16 )
+ AM_RANGE(0x000000, 0x01ffff) AM_ROM
+ AM_RANGE(0x020000, 0x027fff) AM_READWRITE(read_rotram, write_rotram)
+ AM_RANGE(0x028000, 0x028fff) AM_READWRITE(read_sndram, write_sndram)
+ AM_RANGE(0x038000, 0x038001) AM_READWRITE(io_r, io_w)
+ AM_RANGE(0x038002, 0x038003) AM_READWRITE(chop_r, ldaud_w)
+ AM_RANGE(0x038008, 0x038009) AM_READWRITE(line_r, reset_w)
+ AM_RANGE(0x03800e, 0x03800f) AM_READWRITE(laserdisc_r, laserdisc_w)
+ AM_RANGE(0x03c800, 0x03c9ff) AM_RAM AM_BASE(&palette_ram)
+ AM_RANGE(0x03cc00, 0x03cc01) AM_WRITE(control_w)
+ AM_RANGE(0x03e000, 0x03efff) AM_RAM AM_MIRROR(0xfc0000) AM_BASE(&generic_nvram16) AM_SIZE(&generic_nvram_size)
+ AM_RANGE(0x03f000, 0x03ffff) AM_RAM AM_MIRROR(0xfc0000)
+ADDRESS_MAP_END
+
+
+/* For the bit-sliced CPUs */
+static ADDRESS_MAP_START( rotate_map, ADDRESS_SPACE_PROGRAM, 64 )
+ AM_RANGE(0x000, 0x1ff) AM_ROM
+ADDRESS_MAP_END
+
+static ADDRESS_MAP_START( line_sound_map, ADDRESS_SPACE_PROGRAM, 64 )
+ AM_RANGE(0x000, 0x0ff) AM_ROM
+ADDRESS_MAP_END
+
+
+/*************************************
+ *
+ * Initialisation
+ *
+ *************************************/
+
+static MACHINE_START( cubeqst )
+{
+ laserdisc = device_list_find_by_tag(machine->config->devicelist, LASERDISC, "laserdisc");
+ simutrek_set_cmd_ack_callback(laserdisc, ldp_ack_callback);
+}
+
+static MACHINE_RESET( cubeqst )
+{
+ reset_latch = 0;
+
+ /* Do this until we sort out the laserdisc interface properly */
+ ldp_command_flag = 0;
+
+ /* Auxillary CPUs are held in reset */
+ cpunum_set_input_line(machine, SOUND_CPU, INPUT_LINE_RESET, ASSERT_LINE);
+ cpunum_set_input_line(machine, ROTATE_CPU, INPUT_LINE_RESET, ASSERT_LINE);
+ cpunum_set_input_line(machine, LINE_CPU, INPUT_LINE_RESET, ASSERT_LINE);
+}
+
+
+/*************************************
+ *
+ * Sound definitions
+ *
+ *************************************/
+
+static sound_stream *cquest_stream;
+
+/*
+ * The sound CPU outputs to a 12-bit 7521 DAC
+ * The DAC output is multiplexed between
+ * 16 channels (8 per side).
+ */
+
+static struct
+{
+ INT16 sample[2][8];
+} cquest_sound;
+
+/* Called by the sound CPU emulation */
+void sound_dac_w(UINT16 data)
+{
+ int side = data & 1;
+ int chan = (data >> 1) & 7;
+ int value = ((data >> 4) & 0xfff);
+
+ /* Sign extend 12-bit to 16-bit */
+ int finalvalue = (value & 0x7ff) - (value & 0x800);
+ if (cquest_sound.sample[side][chan] != finalvalue)
+ {
+ stream_update(cquest_stream);
+ cquest_sound.sample[side][chan] = finalvalue;
+ }
+}
+
+static void cquest_stream_update(void *param, stream_sample_t **inputs, stream_sample_t **buffer, int length)
+{
+ int side;
+
+ /* Clear the buffers */
+ memset(buffer[0], 0, length * sizeof(*buffer[0]));
+ memset(buffer[1], 0, length * sizeof(*buffer[1]));
+
+ for (side = 0; side < 2; ++side)
+ {
+ int chan;
+ for (chan = 0; chan < 8; ++chan)
+ {
+ int samp;
+ for (samp = 0; samp < length; ++samp)
+ buffer[side][samp] += (cquest_sound.sample[side][chan]) * 4;
+ }
+ }
+}
+
+void *cquest_sh_start(int clock, const custom_sound_interface *config)
+{
+ /* Allocate the stream */
+ cquest_stream = stream_create(0, 2, Machine->sample_rate, NULL, cquest_stream_update);
+
+ return auto_malloc(1);
+}
+
+static const custom_sound_interface custom_interface =
+{
+ cquest_sh_start
+};
+
+
+static const cubeqst_snd_config snd_config =
+{
+ sound_dac_w,
+ "sound_proms"
+};
+
+
+/*************************************
+ *
+ * Machine driver
+ *
+ *************************************/
+
+static MACHINE_DRIVER_START( cubeqst )
+ MDRV_CPU_ADD("main_cpu", M68000, XTAL_16MHz / 2)
+ MDRV_CPU_PROGRAM_MAP(m68k_program_map, 0)
+ MDRV_CPU_VBLANK_INT("main", vblank)
+
+ MDRV_CPU_ADD("rotate_cpu", CQUESTROT, XTAL_10MHz / 2)
+ MDRV_CPU_PROGRAM_MAP(rotate_map, 0)
+
+ MDRV_CPU_ADD("line_cpu", CQUESTLIN, XTAL_10MHz / 2)
+ MDRV_CPU_PROGRAM_MAP(line_sound_map, 0)
+
+ MDRV_CPU_ADD("sound_cpu", CQUESTSND, XTAL_10MHz / 2)
+ MDRV_CPU_PROGRAM_MAP(line_sound_map, 0)
+ MDRV_CPU_CONFIG(snd_config)
+
+#if 0
+ MDRV_CPU_ADD("ldp_cpu", I8048, XTAL_10MHz / 2)
+ MDRV_CPU_PROGRAM_MAP(ldp_mem, 0)
+ MDRV_CPU_IO_MAP(ldp_io, 0)
+#endif
+
+ MDRV_INTERLEAVE(700)
+
+ MDRV_MACHINE_START(cubeqst)
+ MDRV_MACHINE_RESET(cubeqst)
+ MDRV_NVRAM_HANDLER(generic_0fill)
+
+ MDRV_LASERDISC_SCREEN_ADD_NTSC("main", BITMAP_FORMAT_INDEXED16)
+ MDRV_VIDEO_START(cubeqst)
+
+ MDRV_PALETTE_LENGTH(8192 + 1)
+ MDRV_PALETTE_INIT(cubeqst)
+
+ MDRV_LASERDISC_ADD("laserdisc", SIMUTREK_SPECIAL)
+ MDRV_LASERDISC_OVERLAY(cubeqst, CUBEQST_HBLANK, CUBEQST_VCOUNT, BITMAP_FORMAT_INDEXED16)
+ MDRV_LASERDISC_OVERLAY_CLIP(0, 320-1, 0, 256-8)
+ MDRV_LASERDISC_OVERLAY_POSITION(0.002, -0.018)
+
+ MDRV_SPEAKER_STANDARD_STEREO("left", "right")
+
+ MDRV_SOUND_ADD("laserdisc", CUSTOM, 0)
+ MDRV_SOUND_CONFIG(laserdisc_custom_interface)
+ MDRV_SOUND_ROUTE(0, "left", 1.0)
+ MDRV_SOUND_ROUTE(1, "right", 1.0)
+
+ MDRV_SOUND_ADD("cubeqst", CUSTOM, 1)
+ MDRV_SOUND_CONFIG(custom_interface)
+ MDRV_SOUND_ROUTE(1, "left", 1.0)
+ MDRV_SOUND_ROUTE(0, "right", 1.0)
+MACHINE_DRIVER_END
+
+
+/*************************************
+ *
+ * ROM definition(s)
+ *
+ *************************************/
+
+ROM_START( cubeqst )
+ ROM_REGION( 0x200000, "main_cpu", 0 )
+ ROM_LOAD16_BYTE( "eprom_bd_2764.1a", 0x000000, 0x02000, CRC(870a28f5) SHA1(6db2020fa10d03bfaf7bd2892ba7266e744567e9) )
+ ROM_LOAD16_BYTE( "eprom_bd_2764.1b", 0x000001, 0x02000, CRC(0c29b2d2) SHA1(1c67dbfaeb6ae1e6ccd870a815bd51ebc520a34c) )
+ ROM_LOAD16_BYTE( "eprom_bd_2764.2a", 0x004000, 0x02000, CRC(f03a76be) SHA1(794a9e5a4fddc16950836468157ea252a82c0771) )
+ ROM_LOAD16_BYTE( "eprom_bd_2764.2b", 0x004001, 0x02000, CRC(c995b786) SHA1(0370e0be81ceea647ea9e27eac22b6c2354e695b) )
+ ROM_LOAD16_BYTE( "eprom_bd_2764.3a", 0x008000, 0x02000, CRC(dedeabf3) SHA1(d06138336bdbd5ebee44188e92e5721ae63715ad) )
+ ROM_LOAD16_BYTE( "eprom_bd_2764.3b", 0x008001, 0x02000, CRC(7353e970) SHA1(9566335868352d3c652621809b812ede309ebded) )
+ ROM_LOAD16_BYTE( "eprom_bd_2764.4a", 0x00c000, 0x02000, CRC(3f8ae830) SHA1(13411f7bee31ae13a2e139ad576e48130838c472) )
+ ROM_LOAD16_BYTE( "eprom_bd_2764.4b", 0x00c001, 0x02000, CRC(6d4fc7cf) SHA1(8f95e2f9e313413ea6b9bcd1ec5d8c11962584db) )
+ ROM_LOAD16_BYTE( "eprom_bd_2764.5a", 0x010000, 0x02000, CRC(ea1a92d0) SHA1(71a6820c67aad951d05571cd29f52c2cebe78c3c) )
+ ROM_LOAD16_BYTE( "eprom_bd_2764.5b", 0x010001, 0x02000, CRC(d12ed62f) SHA1(3e897ef88f51d6b2010944b50f1b5387801d92ce) )
+ ROM_LOAD16_BYTE( "eprom_bd_2764.6a", 0x014000, 0x02000, CRC(6d31f22b) SHA1(36ecfb1c88be9a100a272564d8ff8df02a501f88) )
+ ROM_LOAD16_BYTE( "eprom_bd_2764.6b", 0x014001, 0x02000, CRC(2110f613) SHA1(e12e3b902e9d755fc55ff67851c905e40482a98f) )
+ ROM_LOAD16_BYTE( "eprom_bd_2764.7a", 0x018000, 0x02000, CRC(8b624074) SHA1(592891b384bdab3f851799e50f51b5f04c880490) )
+ ROM_LOAD16_BYTE( "eprom_bd_2764.7b", 0x018001, 0x02000, CRC(f31f2e81) SHA1(b4ae0726ac849662fb1878094a956aa3a9fe94a2) )
+ ROM_LOAD16_BYTE( "eprom_bd_2764.8a", 0x01c000, 0x02000, CRC(8ac5ab0c) SHA1(0cf6593c53184686d7020acd27e2c26aab29137c) )
+ ROM_LOAD16_BYTE( "eprom_bd_2764.8b", 0x01c001, 0x02000, CRC(39804640) SHA1(0f09cf6ef73a9199318278df15983a0cc01ece0d) )
+
+ ROM_REGION64_BE( 0x1000, "rotate_cpu", 0)
+ ROMX_LOAD( "rotate_video_board_82s131.8h", 0x0, 0x200, CRC(1dd1cc65) SHA1(3c83d48f90ba70e81c0d85fb182527afe1f1f68d), ROM_NIBBLE | ROM_SHIFT_NIBBLE_HI | ROM_SKIP(7))
+ ROMX_LOAD( "rotate_video_board_82s131.9h", 0x0, 0x200, CRC(2bbf0aa1) SHA1(1a4ef24a8dc27ac3b01f176aac9b1c1c194bd67b), ROM_NIBBLE | ROM_SHIFT_NIBBLE_LO | ROM_SKIP(7))
+ ROMX_LOAD( "rotate_video_board_82s131.10f", 0x1, 0x200, CRC(89b234eb) SHA1(23d84873b4a5088130fff960b3caded329ea70b5), ROM_NIBBLE | ROM_SHIFT_NIBBLE_HI | ROM_SKIP(7))
+ ROMX_LOAD( "rotate_video_board_82s131.10h", 0x1, 0x200, CRC(d86561b2) SHA1(ebc5374568d9b598237d98f0fb95b68b36a3ddff), ROM_NIBBLE | ROM_SHIFT_NIBBLE_LO | ROM_SKIP(7))
+ ROMX_LOAD( "rotate_video_board_82s131.7h", 0x2, 0x200, CRC(4e0909e2) SHA1(e97dcbd23e0d9eccc138e62334e016b1b333dec3), ROM_NIBBLE | ROM_SHIFT_NIBBLE_HI | ROM_SKIP(7))
+ ROMX_LOAD( "rotate_video_board_82s131.12k", 0x2, 0x200, CRC(84db792f) SHA1(03858d92f4ad5aae39ad1925738df958cc4dd020), ROM_NIBBLE | ROM_SHIFT_NIBBLE_LO | ROM_SKIP(7))
+ ROMX_LOAD( "rotate_video_board_82s131.12j", 0x3, 0x200, CRC(661350ba) SHA1(f1ccc31c7ce1d71f6128c575d508aa04a4a5e15f), ROM_NIBBLE | ROM_SHIFT_NIBBLE_HI | ROM_SKIP(7))
+ ROMX_LOAD( "rotate_video_board_82s131.12d", 0x3, 0x200, CRC(c60762ec) SHA1(d113eb1ce0db4d10a55057332fb17852b312396c), ROM_NIBBLE | ROM_SHIFT_NIBBLE_LO | ROM_SKIP(7))
+ ROMX_LOAD( "rotate_video_board_82s131.12e", 0x4, 0x200, CRC(605b924c) SHA1(899103f20ccec68e432c4abf11f554b0600f8b3c), ROM_NIBBLE | ROM_SHIFT_NIBBLE_HI | ROM_SKIP(7))
+ ROMX_LOAD( "rotate_video_board_82s131.12c", 0x4, 0x200, CRC(fbb881b7) SHA1(b8c1592cfa082fa7dc4abd5392816ba923760cbf), ROM_NIBBLE | ROM_SHIFT_NIBBLE_LO | ROM_SKIP(7))
+ ROMX_LOAD( "rotate_video_board_82s131.12h", 0x5, 0x200, CRC(6fb1d6f0) SHA1(5a0bf681aedde073f0164264620085e9f40eca9e), ROM_NIBBLE | ROM_SHIFT_NIBBLE_HI | ROM_SKIP(7))
+ ROMX_LOAD( "rotate_video_board_82s131.12f", 0x5, 0x200, CRC(5c00d30e) SHA1(ad7bbcce9eff348f78cb6e0782faa175ca928c11), ROM_NIBBLE | ROM_SHIFT_NIBBLE_LO | ROM_SKIP(7))
+
+ ROM_REGION64_BE( 0x800, "line_cpu", 0)
+ ROMX_LOAD( "line_drawer_82s129_u27.6b", 0x0, 0x100, CRC(a9777c19) SHA1(dcb83cc5fce3ff9760dfdfce078895ef71558f67), ROM_NIBBLE | ROM_SHIFT_NIBBLE_HI | ROM_SKIP(7))
+ ROMX_LOAD( "line_drawer_82s129_u28.3b", 0x0, 0x100, CRC(2248790c) SHA1(8473276bcc154a440745b714a31c89c459fef411), ROM_NIBBLE | ROM_SHIFT_NIBBLE_LO | ROM_SKIP(7))
+ ROMX_LOAD( "line_drawer_82s129_u29.3c", 0x1, 0x100, CRC(6accc743) SHA1(a5263a021c594117c14a3d4fbc207a4043001172), ROM_NIBBLE | ROM_SHIFT_NIBBLE_HI | ROM_SKIP(7))
+ ROMX_LOAD( "line_drawer_82s129_u30.3f", 0x1, 0x100, CRC(ba02ac36) SHA1(89473146f04f60bbed6644603ddc646b3d4e04eb), ROM_NIBBLE | ROM_SHIFT_NIBBLE_LO | ROM_SKIP(7))
+ ROMX_LOAD( "line_drawer_82s129_u31.2j", 0x2, 0x100, CRC(bbf50d89) SHA1(f49d4322123c3d4a7d6f664b7164dfe24ddd6eed), ROM_NIBBLE | ROM_SHIFT_NIBBLE_HI | ROM_SKIP(7))
+ ROMX_LOAD( "line_drawer_82s129_u5.3g", 0x2, 0x100, CRC(fa5c239b) SHA1(bbf526362af263aefea87341538157f4ecad686f), ROM_NIBBLE | ROM_SHIFT_NIBBLE_LO | ROM_SKIP(7))
+ ROMX_LOAD( "line_drawer_82s129_u6.2g", 0x3, 0x100, CRC(59874b50) SHA1(d304b4546c187b8c73aaf8887f0037426e60dd5f), ROM_NIBBLE | ROM_SHIFT_NIBBLE_HI | ROM_SKIP(7))
+ ROMX_LOAD( "line_drawer_82s129_u7.3h", 0x3, 0x100, CRC(886956d6) SHA1(ee150a9f99f3177fcc94be5af3f87433f39b311f), ROM_NIBBLE | ROM_SHIFT_NIBBLE_LO | ROM_SKIP(7))
+ ROMX_LOAD( "line_drawer_82s129_u8.3j", 0x4, 0x100, CRC(8d2b17ad) SHA1(f7408104f75e292539aaec688e220c143f762f67), ROM_NIBBLE | ROM_SHIFT_NIBBLE_HI | ROM_SKIP(7))
+ ROMX_LOAD( "line_drawer_82s129_u9.3k", 0x4, 0x100, CRC(0a678253) SHA1(06d7a8f9556eb156ae03184772e76c84ab8d75ea), ROM_NIBBLE | ROM_SHIFT_NIBBLE_LO | ROM_SKIP(7))
+
+ ROM_REGION64_BE( 0x800, "sound_cpu", 0)
+ ROMX_LOAD( "mother_sounds_82s129.7e", 0x0, 0x100, CRC(cf89ad06) SHA1(2f04ca6d57a8c425f51a288f553841db680f5a7e), ROM_NIBBLE | ROM_SHIFT_NIBBLE_HI | ROM_SKIP(7))
+ ROMX_LOAD( "mother_sounds_82s129.7f", 0x0, 0x100, CRC(5208036d) SHA1(ec29af4c10a098fb25424d1a5187a7bd2ec9fb92), ROM_NIBBLE | ROM_SHIFT_NIBBLE_LO | ROM_SKIP(7))
+ ROMX_LOAD( "mother_sounds_82s129.11f", 0x1, 0x100, CRC(af327360) SHA1(2b45358a39daaf5721b5a94c4fd55bd3d0d90ec3), ROM_NIBBLE | ROM_SHIFT_NIBBLE_HI | ROM_SKIP(7))
+ ROMX_LOAD( "mother_sounds_82s129.11e", 0x1, 0x100, CRC(b50d3e43) SHA1(9f2c071c6940767d20a563f6f2c9224e1896a5bf), ROM_NIBBLE | ROM_SHIFT_NIBBLE_LO | ROM_SKIP(7))
+ ROMX_LOAD( "mother_sounds_82s129.9f", 0x2, 0x100, CRC(cd93e3c9) SHA1(f0c11db65ddf2096f6df424b7747242d9e3155da), ROM_NIBBLE | ROM_SHIFT_NIBBLE_HI | ROM_SKIP(7))
+ ROMX_LOAD( "mother_sounds_82s129.10f", 0x2, 0x100, CRC(0e8b8df7) SHA1(37426ffdaf2d21273ac7e88789206fdafb14bc83), ROM_NIBBLE | ROM_SHIFT_NIBBLE_LO | ROM_SKIP(7))
+ ROMX_LOAD( "mother_sounds_82s129.8f", 0x3, 0x100, CRC(07deae27) SHA1(c6a2d7cbf4ea4120f43ae088a3de90bb7a42d4a4), ROM_NIBBLE | ROM_SHIFT_NIBBLE_HI | ROM_SKIP(7))
+ ROMX_LOAD( "mother_sounds_82s129.10e", 0x3, 0x100, CRC(2aaf765e) SHA1(fafe96834f5323fca71b8ab0c013f45c5c47182d), ROM_NIBBLE | ROM_SHIFT_NIBBLE_LO | ROM_SKIP(7))
+ ROMX_LOAD( "mother_sounds_82s129.9e", 0x4, 0x100, CRC(598687e7) SHA1(c5045ddaab7123ff0a4c8f4c2489f9d70b63fc76), ROM_NIBBLE | ROM_SHIFT_NIBBLE_HI | ROM_SKIP(7))
+ ROMX_LOAD( "mother_sounds_82s129.8e", 0x4, 0x100, CRC(68de17ed) SHA1(efefcb4ccdd012b767c4765304c6022b0c091066), ROM_NIBBLE | ROM_SHIFT_NIBBLE_LO | ROM_SKIP(7))
+
+ ROM_REGION( 0x10000, "ldp_cpu", 0)
+ ROM_LOAD( "laser_player_interface_d8748_a308.bin", 0x0000, 0x0400, CRC(eed3e728) SHA1(1eb3467f1c41553375b2c21952cd593b167f5416) )
+
+ ROM_REGION16_BE( 0x1000, "sound_proms", 0)
+ ROMX_LOAD( "mother_sounds_82s185.17f", 0x0, 0x800, CRC(0f49d40e) SHA1(40340833ab27ccb5b60baf44ad01930f204f5318), ROM_NIBBLE | ROM_SHIFT_NIBBLE_LO | ROM_SKIP(1) )
+ ROMX_LOAD( "mother_sounds_82s185.19f", 0x0, 0x800, CRC(a041ce92) SHA1(9bc92992de22b830e479933c50650c7dc23f5713), ROM_NIBBLE | ROM_SHIFT_NIBBLE_HI | ROM_SKIP(1) )
+ ROMX_LOAD( "mother_sounds_82s185.16f", 0x1, 0x800, CRC(75b1749f) SHA1(71da8224e72fb5250e2097666a47314d0a818ee9), ROM_NIBBLE | ROM_SHIFT_NIBBLE_LO | ROM_SKIP(1) )
+ ROMX_LOAD( "mother_sounds_82s185.18f", 0x1, 0x800, CRC(ae4c78ae) SHA1(76fdb8eab372065882caaa5b93ce9e21efe54da5), ROM_NIBBLE | ROM_SHIFT_NIBBLE_HI | ROM_SKIP(1) )
+
+ ROM_REGION( 0x1000, "video_proms", 0 )
+ /* Horizontal and vertical video timing PROMs */
+ ROM_LOAD( "rotate_video_board_82s129.4h", 0x000, 0x100, CRC(6ed1b8d3) SHA1(c392855e1ff8637e551891aefd6c6a3bbcf273a5) )
+ ROM_LOAD( "rotate_video_board_82s129.5h", 0x100, 0x100, CRC(32d839d4) SHA1(7b82e5c1ea5a351eba60c19560a10e4702ae2c22) )
+
+ /* Four sets of (identical) fill circuit state PROMs */
+ ROM_LOAD( "fill_board_82s129.2p", 0x200, 0x100, CRC(c525b091) SHA1(bd172ed3d15f410d09017207ec68faf1d1cb4512) )
+ ROM_LOAD( "fill_board_82s129.3p", 0x300, 0x100, CRC(7ed6c192) SHA1(b02bbcd0e04d3a6c54bec755df55fe6f97d9513f) )
+ ROM_LOAD( "fill_board_82s129.4p", 0x400, 0x100, CRC(6b572b73) SHA1(4a065cb05c12ce34e5598341e0de0cc571b2d387) )
+ ROM_LOAD( "fill_board_82s129.5p", 0x200, 0x100, CRC(c525b091) SHA1(bd172ed3d15f410d09017207ec68faf1d1cb4512) )
+ ROM_LOAD( "fill_board_82s129.6p", 0x300, 0x100, CRC(7ed6c192) SHA1(b02bbcd0e04d3a6c54bec755df55fe6f97d9513f) )
+ ROM_LOAD( "fill_board_82s129.7p", 0x400, 0x100, CRC(6b572b73) SHA1(4a065cb05c12ce34e5598341e0de0cc571b2d387) )
+ ROM_LOAD( "fill_board_82s129.9p", 0x200, 0x100, CRC(c525b091) SHA1(bd172ed3d15f410d09017207ec68faf1d1cb4512) )
+ ROM_LOAD( "fill_board_82s129.10p", 0x300, 0x100, CRC(7ed6c192) SHA1(b02bbcd0e04d3a6c54bec755df55fe6f97d9513f) )
+ ROM_LOAD( "fill_board_82s129.11p", 0x400, 0x100, CRC(6b572b73) SHA1(4a065cb05c12ce34e5598341e0de0cc571b2d387) )
+ ROM_LOAD( "fill_board_82s129.12p", 0x200, 0x100, CRC(c525b091) SHA1(bd172ed3d15f410d09017207ec68faf1d1cb4512) )
+ ROM_LOAD( "fill_board_82s129.13p", 0x300, 0x100, CRC(7ed6c192) SHA1(b02bbcd0e04d3a6c54bec755df55fe6f97d9513f) )
+ ROM_LOAD( "fill_board_82s129.14p", 0x400, 0x100, CRC(6b572b73) SHA1(4a065cb05c12ce34e5598341e0de0cc571b2d387) )
+
+ DISK_REGION( "laserdisc" )
+ DISK_IMAGE_READONLY_OPTIONAL( "cubeqst", 0, SHA1(833c86f967d700de5d31b06d7ab3d84166cf8a50) MD5(d94893847ddd817b04c81d8b0a40a9e5) )
+ROM_END
+
+/*************************************
+ *
+ * Game driver(s)
+ *
+ *************************************/
+
+GAME( 1983, cubeqst, 0, cubeqst, cubeqst, 0, ROT0, "Simutrek", "Cube Quest", 0 )
diff --git a/src/mame/drivers/dlair.c b/src/mame/drivers/dlair.c
index e185f27403a..35275422e78 100644
--- a/src/mame/drivers/dlair.c
+++ b/src/mame/drivers/dlair.c
@@ -71,12 +71,6 @@ static UINT8 last_misc;
static UINT8 laserdisc_type;
static UINT8 laserdisc_data;
-static render_texture *video_texture;
-static render_texture *overlay_texture;
-static UINT32 last_seqid;
-
-static bitmap_t *overlay_bitmap;
-
static const UINT8 led_map[16] =
{ 0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7c,0x07,0x7f,0x67,0x77,0x7c,0x39,0x5e,0x79,0x00 };
@@ -148,30 +142,6 @@ static const struct z80_irq_daisy_chain dleuro_daisy_chain[] =
*
*************************************/
-static void video_cleanup(running_machine *machine)
-{
- /* free our textures */
- if (video_texture != NULL)
- render_texture_free(video_texture);
- if (overlay_texture != NULL)
- render_texture_free(overlay_texture);
-}
-
-
-static VIDEO_START( dlair )
-{
- bitmap_t *vidbitmap;
-
- /* create textures */
- last_seqid = laserdisc_get_video(laserdisc, &vidbitmap);
- video_texture = render_texture_alloc(NULL, NULL);
- render_texture_set_bitmap(video_texture, vidbitmap, NULL, 0, TEXFORMAT_YUY16);
- overlay_bitmap = NULL;
-
- add_exit_callback(machine, video_cleanup);
-}
-
-
static PALETTE_INIT( dleuro )
{
int i;
@@ -184,16 +154,6 @@ static PALETTE_INIT( dleuro )
}
-static VIDEO_START( dleuro )
-{
- VIDEO_START_CALL(dlair);
-
- overlay_bitmap = auto_bitmap_alloc(video_screen_get_width(machine->primary_screen), video_screen_get_height(machine->primary_screen), BITMAP_FORMAT_INDEXED16);
- fillbitmap(overlay_bitmap, 8, NULL);
- overlay_texture = render_texture_alloc(NULL, NULL);
-}
-
-
/*************************************
*
@@ -201,31 +161,8 @@ static VIDEO_START( dleuro )
*
*************************************/
-static VIDEO_UPDATE( dlair )
-{
- bitmap_t *vidbitmap;
- UINT32 seqid;
-
- /* get the current video and update the bitmap if different */
- seqid = laserdisc_get_video(laserdisc, &vidbitmap);
- if (seqid != last_seqid)
- render_texture_set_bitmap(video_texture, vidbitmap, NULL, 0, TEXFORMAT_YUY16);
- last_seqid = seqid;
-
- /* cover the whole screen with a quad */
- render_container_empty(render_container_get_screen(screen));
- render_screen_add_quad(screen, 0.0f, 0.0f, 1.0f, 1.0f, MAKE_ARGB(0xff,0xff,0xff,0xff), video_texture, PRIMFLAG_BLENDMODE(BLENDMODE_NONE) | PRIMFLAG_SCREENTEX(1));
-
- popmessage("%s", laserdisc_describe_state(laserdisc));
-
- return 0;
-}
-
-
static VIDEO_UPDATE( dleuro )
{
- bitmap_t *vidbitmap;
- UINT32 seqid;
int x, y;
/* redraw the overlay */
@@ -233,27 +170,9 @@ static VIDEO_UPDATE( dleuro )
for (x = 0; x < 32; x++)
{
UINT8 *base = &videoram[y * 64 + x * 2 + 1];
- drawgfx(overlay_bitmap, screen->machine->gfx[0], base[0], base[1], 0, 0, 10 * x, 16 * y, cliprect, TRANSPARENCY_NONE, 0);
+ drawgfx(bitmap, screen->machine->gfx[0], base[0], base[1], 0, 0, 10 * x, 16 * y, cliprect, TRANSPARENCY_NONE, 0);
}
- /* update the overlay */
- render_texture_set_bitmap(overlay_texture, overlay_bitmap, video_screen_get_visible_area(screen), 0, TEXFORMAT_PALETTE16);
-
- /* get the current video and update the bitmap if different */
- seqid = laserdisc_get_video(laserdisc, &vidbitmap);
- if (seqid != last_seqid)
- render_texture_set_bitmap(video_texture, vidbitmap, NULL, 0, TEXFORMAT_YUY16);
- last_seqid = seqid;
-
- /* cover the whole screen with a quad */
- render_container_empty(render_container_get_screen(screen));
- if (last_misc & 0x02)
- render_screen_add_quad(screen, 0.0f, 0.0f, 1.0f, 1.0f, MAKE_ARGB(0xff,0xff,0xff,0xff), video_texture, PRIMFLAG_BLENDMODE(BLENDMODE_NONE) | PRIMFLAG_SCREENTEX(1));
- else
- render_screen_add_quad(screen, 0.0f, 0.0f, 1.0f, 1.0f, MAKE_ARGB(0xff,0xff,0xff,0xff), overlay_texture, PRIMFLAG_BLENDMODE(BLENDMODE_NONE) | PRIMFLAG_SCREENTEX(1));
-
- popmessage("%s", laserdisc_describe_state(laserdisc));
-
return 0;
}
@@ -799,14 +718,7 @@ static MACHINE_DRIVER_START( dlair_base )
MDRV_MACHINE_RESET(dlair)
/* video hardware */
- MDRV_VIDEO_ATTRIBUTES(VIDEO_SELF_RENDER)
-
- MDRV_SCREEN_ADD("main", RASTER)
- MDRV_SCREEN_FORMAT(BITMAP_FORMAT_RGB32)
- MDRV_SCREEN_RAW_PARAMS(XTAL_14_31818MHz, 910, 0, 720, 525.0/2, 0, 480/2)
-
- MDRV_VIDEO_START(dlair)
- MDRV_VIDEO_UPDATE(dlair)
+ MDRV_LASERDISC_SCREEN_ADD_NTSC("main", BITMAP_FORMAT_RGB32)
/* sound hardware */
MDRV_SPEAKER_STANDARD_STEREO("left", "right")
@@ -849,21 +761,15 @@ static MACHINE_DRIVER_START( dleuro )
MDRV_MACHINE_RESET(dlair)
MDRV_LASERDISC_ADD("laserdisc", PHILLIPS_22VP932)
+ MDRV_LASERDISC_OVERLAY(dleuro, 256, 256, BITMAP_FORMAT_INDEXED16)
/* video hardware */
- MDRV_SCREEN_ADD("main", RASTER)
- MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
- MDRV_SCREEN_REFRESH_RATE(50)
- MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MDRV_SCREEN_SIZE(32*8, 32*8)
- MDRV_SCREEN_VISIBLE_AREA(0, 199, 0, 239)
+ MDRV_LASERDISC_SCREEN_ADD_PAL("main", BITMAP_FORMAT_INDEXED16)
MDRV_GFXDECODE(dlair)
MDRV_PALETTE_LENGTH(16)
MDRV_PALETTE_INIT(dleuro)
- MDRV_VIDEO_START(dleuro)
- MDRV_VIDEO_UPDATE(dleuro)
/* sound hardware */
MDRV_SPEAKER_STANDARD_STEREO("left", "right")
diff --git a/src/mame/drivers/esh.c b/src/mame/drivers/esh.c
index 44557dd54c7..7d980d2f6a7 100644
--- a/src/mame/drivers/esh.c
+++ b/src/mame/drivers/esh.c
@@ -42,6 +42,8 @@ static VIDEO_UPDATE( esh )
{
int charx, chary;
+ render_container_set_palette_alpha(render_container_get_screen(screen), 0, 0x00);
+
/* clear */
fillbitmap(bitmap, 0, cliprect);
@@ -280,7 +282,8 @@ static MACHINE_START( esh )
/* DRIVER */
static MACHINE_DRIVER_START( esh )
-/* main cpu */
+
+ /* main cpu */
MDRV_CPU_ADD("main", Z80, PCB_CLOCK/6) /* The denominator is a Daphne guess based on PacMan's hardware */
MDRV_CPU_PROGRAM_MAP(z80_0_mem,0)
MDRV_CPU_IO_MAP(z80_0_io,0)
@@ -291,23 +294,17 @@ static MACHINE_DRIVER_START( esh )
MDRV_MACHINE_START(esh)
MDRV_LASERDISC_ADD("laserdisc", PIONEER_LDV1000)
+ MDRV_LASERDISC_OVERLAY(esh, 256, 256, BITMAP_FORMAT_INDEXED16)
-/* video */
-
- MDRV_SCREEN_ADD("main", RASTER)
- MDRV_SCREEN_FORMAT(BITMAP_FORMAT_RGB32)
- MDRV_SCREEN_REFRESH_RATE(60)
- MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MDRV_SCREEN_SIZE(32*8, 32*8)
- MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 32*8-1)
+ /* video hardware */
+ MDRV_LASERDISC_SCREEN_ADD_NTSC("main", BITMAP_FORMAT_INDEXED16)
MDRV_PALETTE_LENGTH(256)
MDRV_PALETTE_INIT(esh)
MDRV_GFXDECODE(esh)
- MDRV_VIDEO_UPDATE(esh)
-/* sound */
+ /* sound hardware */
MDRV_SPEAKER_STANDARD_STEREO("left", "right")
MDRV_SOUND_ADD("laserdisc", CUSTOM, 0)
@@ -334,6 +331,9 @@ ROM_START( esh )
ROM_LOAD( "rgb.j1", 0x000, 0x200, CRC(1e9f795f) SHA1(61a58694929fa39b2412bc9244e5681d65a0eacb) )
ROM_LOAD( "h.c5", 0x200, 0x100, CRC(abde5e4b) SHA1(9dd3a7fd523b519ac613b9f08ae9cc962992cf5d) ) /* Video timing? */
ROM_LOAD( "v.c6", 0x300, 0x100, CRC(7157ba22) SHA1(07355f30efe46196d216356eda48a59fc622e43f) )
+
+ DISK_REGION( "laserdisc" )
+ DISK_IMAGE_READONLY( "esh", 0, NO_DUMP )
ROM_END
ROM_START( esha )
@@ -353,6 +353,9 @@ ROM_START( esha )
ROM_LOAD( "rgb.j1", 0x000, 0x200, CRC(1e9f795f) SHA1(61a58694929fa39b2412bc9244e5681d65a0eacb) )
ROM_LOAD( "h.c5", 0x200, 0x100, CRC(abde5e4b) SHA1(9dd3a7fd523b519ac613b9f08ae9cc962992cf5d) ) /* Video timing? */
ROM_LOAD( "v.c6", 0x300, 0x100, CRC(7157ba22) SHA1(07355f30efe46196d216356eda48a59fc622e43f) )
+
+ DISK_REGION( "laserdisc" )
+ DISK_IMAGE_READONLY( "esh", 0, NO_DUMP )
ROM_END
ROM_START( eshb )
@@ -372,6 +375,9 @@ ROM_START( eshb )
ROM_LOAD( "rgb.j1", 0x000, 0x200, CRC(1e9f795f) SHA1(61a58694929fa39b2412bc9244e5681d65a0eacb) )
ROM_LOAD( "h.c5", 0x200, 0x100, CRC(abde5e4b) SHA1(9dd3a7fd523b519ac613b9f08ae9cc962992cf5d) ) /* Video timing? */
ROM_LOAD( "v.c6", 0x300, 0x100, CRC(7157ba22) SHA1(07355f30efe46196d216356eda48a59fc622e43f) )
+
+ DISK_REGION( "laserdisc" )
+ DISK_IMAGE_READONLY( "esh", 0, NO_DUMP )
ROM_END
diff --git a/src/mame/drivers/gottlieb.c b/src/mame/drivers/gottlieb.c
index 5f55a236aea..2bc9d40541a 100644
--- a/src/mame/drivers/gottlieb.c
+++ b/src/mame/drivers/gottlieb.c
@@ -1885,13 +1885,11 @@ static MACHINE_DRIVER_START( g2laser )
MDRV_LASERDISC_ADD("laserdisc", PIONEER_PR8210)
MDRV_LASERDISC_AUDIO(laserdisc_audio_process)
-
- MDRV_VIDEO_ATTRIBUTES(VIDEO_SELF_RENDER)
- MDRV_VIDEO_START(gottlieb_laserdisc)
- MDRV_VIDEO_UPDATE(gottlieb_laserdisc)
-
- MDRV_SCREEN_MODIFY("main")
- MDRV_SCREEN_RAW_PARAMS(NTSC_CLOCK, 910, 0, 720, 525.0/2, 0, 480/2)
+ MDRV_LASERDISC_OVERLAY(gottlieb, GOTTLIEB_VIDEO_HCOUNT, GOTTLIEB_VIDEO_VCOUNT, BITMAP_FORMAT_INDEXED16)
+ MDRV_LASERDISC_OVERLAY_CLIP(0, GOTTLIEB_VIDEO_HBLANK-1, 0, GOTTLIEB_VIDEO_VBLANK-8)
+
+ MDRV_SCREEN_REMOVE("main")
+ MDRV_LASERDISC_SCREEN_ADD_NTSC("main", BITMAP_FORMAT_INDEXED16)
MDRV_SOUND_ADD("laserdisc", CUSTOM, 0)
MDRV_SOUND_CONFIG(laserdisc_custom_interface)
diff --git a/src/mame/drivers/gpworld.c b/src/mame/drivers/gpworld.c
index 0dd89913c2c..d86f5b1c81e 100644
--- a/src/mame/drivers/gpworld.c
+++ b/src/mame/drivers/gpworld.c
@@ -203,6 +203,8 @@ static void gpworld_draw_sprites(running_machine *machine, bitmap_t *bitmap, con
static VIDEO_UPDATE( gpworld )
{
+ render_container_set_palette_alpha(render_container_get_screen(screen), 0, 0x00);
+
fillbitmap(bitmap, 0, cliprect);
gpworld_draw_tiles(screen->machine, bitmap, cliprect);
@@ -427,7 +429,8 @@ GFXDECODE_END
/* DRIVER */
static MACHINE_DRIVER_START( gpworld )
-/* main cpu */
+
+ /* main cpu */
MDRV_CPU_ADD("main", Z80, GUESSED_CLOCK)
MDRV_CPU_PROGRAM_MAP(mainmem,0)
MDRV_CPU_IO_MAP(mainport,0)
@@ -436,21 +439,15 @@ static MACHINE_DRIVER_START( gpworld )
MDRV_MACHINE_START(gpworld)
MDRV_LASERDISC_ADD("laserdisc", PIONEER_LDV1000)
+ MDRV_LASERDISC_OVERLAY(gpworld, 512, 256, BITMAP_FORMAT_INDEXED16)
-/* video */
-
- MDRV_SCREEN_ADD("main", RASTER)
- MDRV_SCREEN_FORMAT(BITMAP_FORMAT_RGB32)
- MDRV_SCREEN_REFRESH_RATE(60)
- MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MDRV_SCREEN_SIZE(64*8, 32*8)
- MDRV_SCREEN_VISIBLE_AREA(0*8, 64*8-1, 0*8, 32*8-1)
+ /* video hardware */
+ MDRV_LASERDISC_SCREEN_ADD_NTSC("main", BITMAP_FORMAT_INDEXED16)
MDRV_GFXDECODE(gpworld)
MDRV_PALETTE_LENGTH(1024)
- MDRV_VIDEO_UPDATE(gpworld)
-/* sound */
+ /* sound hardware */
MDRV_SPEAKER_STANDARD_STEREO("left", "right")
MDRV_SOUND_ADD("laserdisc", CUSTOM, 0)
@@ -490,6 +487,9 @@ ROM_START( gpworld )
ROM_LOAD( "pr6146.ic2", 0x000, 0x020, CRC(d10801a0) SHA1(89e9ac0d9c9eee6efd5455a3416c436ceda8f632) )
ROM_LOAD( "pr6147.ic28", 0x020, 0x100, CRC(b7173df9) SHA1(044beda43cb1793033021a08b3ee3441d5ffe6c3) )
ROM_LOAD( "pr5501.ic14", 0x120, 0x100, CRC(1bdf71d4) SHA1(ac52e948cce6df4abb7543c08e2c6454efd63e79) )
+
+ DISK_REGION( "laserdisc" )
+ DISK_IMAGE_READONLY( "gpworld", 0, NO_DUMP )
ROM_END
diff --git a/src/mame/drivers/istellar.c b/src/mame/drivers/istellar.c
index 36bec9d129a..06c5c2281a0 100644
--- a/src/mame/drivers/istellar.c
+++ b/src/mame/drivers/istellar.c
@@ -44,6 +44,8 @@ static VIDEO_UPDATE( istellar )
{
int charx, chary;
+ render_container_set_palette_alpha(render_container_get_screen(screen), 0, 0x00);
+
/* clear */
fillbitmap(bitmap, 0, cliprect);
@@ -325,18 +327,18 @@ static INTERRUPT_GEN( vblank_callback_istellar )
/* DRIVER */
static MACHINE_DRIVER_START( istellar )
-/* main cpu */
+ /* main cpu */
MDRV_CPU_ADD("main", Z80, GUESSED_CLOCK)
MDRV_CPU_PROGRAM_MAP(z80_0_mem,0)
MDRV_CPU_IO_MAP(z80_0_io,0)
MDRV_CPU_VBLANK_INT("main", vblank_callback_istellar)
-/* sound cpu */
+ /* sound cpu */
MDRV_CPU_ADD("audio", Z80, GUESSED_CLOCK)
MDRV_CPU_PROGRAM_MAP(z80_1_mem,0)
MDRV_CPU_IO_MAP(z80_1_io,0)
-/* ldp comm cpu */
+ /* ldp comm cpu */
MDRV_CPU_ADD("sub", Z80, GUESSED_CLOCK)
MDRV_CPU_PROGRAM_MAP(z80_2_mem,0)
MDRV_CPU_IO_MAP(z80_2_io,0)
@@ -344,23 +346,17 @@ static MACHINE_DRIVER_START( istellar )
MDRV_MACHINE_START(istellar)
MDRV_LASERDISC_ADD("laserdisc", PIONEER_LDV1000)
+ MDRV_LASERDISC_OVERLAY(istellar, 256, 256, BITMAP_FORMAT_INDEXED16)
-/* video */
-
- MDRV_SCREEN_ADD("main", RASTER)
- MDRV_SCREEN_FORMAT(BITMAP_FORMAT_RGB32)
- MDRV_SCREEN_REFRESH_RATE(60)
- MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MDRV_SCREEN_SIZE(32*8, 32*8)
- MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 32*8-1)
+ /* video hardware */
+ MDRV_LASERDISC_SCREEN_ADD_NTSC("main", BITMAP_FORMAT_INDEXED16)
MDRV_PALETTE_LENGTH(256)
MDRV_PALETTE_INIT(istellar)
MDRV_GFXDECODE(istellar)
- MDRV_VIDEO_UPDATE(istellar)
-/* sound */
+ /* sound hardware */
MDRV_SPEAKER_STANDARD_STEREO("left", "right")
MDRV_SOUND_ADD("laserdisc", CUSTOM, 0)
@@ -399,6 +395,9 @@ ROM_START( istellar )
ROM_LOAD( "red6b.bot", 0x000, 0x100, CRC(5c52f844) SHA1(a8a3d91f3247ad13c805d8d8288b07f3cdaf1189) ) /* At IC location C63? (bottom board) - label ? */
ROM_LOAD( "green6c.bot", 0x100, 0x100, CRC(7d8c845c) SHA1(04ae2ca0cc6679e21346ce34e9e01aa5bf4e2067) ) /* At IC location C62? (bottom board) - label ? */
ROM_LOAD( "blue6d.bot", 0x200, 0x100, CRC(5ebb81f9) SHA1(285d60f2894c524ca80fc68ad7c2dfd9093a67ea) ) /* At IC location C61? (bottom board) - label ? */
+
+ DISK_REGION( "laserdisc" )
+ DISK_IMAGE_READONLY( "istellar", 0, NO_DUMP )
ROM_END
diff --git a/src/mame/drivers/lgp.c b/src/mame/drivers/lgp.c
index b29c806c868..5d238a77d07 100644
--- a/src/mame/drivers/lgp.c
+++ b/src/mame/drivers/lgp.c
@@ -83,6 +83,8 @@ static VIDEO_UPDATE( lgp )
{
int charx, chary;
+ render_container_set_palette_alpha(render_container_get_screen(screen), 0, 0x00);
+
/* clear */
fillbitmap(bitmap, 0, cliprect);
@@ -340,13 +342,13 @@ static MACHINE_START( lgp )
/* DRIVER */
static MACHINE_DRIVER_START( lgp )
-/* main cpu */
+ /* main cpu */
MDRV_CPU_ADD("main", Z80, CPU_PCB_CLOCK)
MDRV_CPU_PROGRAM_MAP(main_program_map,0)
MDRV_CPU_IO_MAP(main_io_map,0)
MDRV_CPU_VBLANK_INT("main", vblank_callback_lgp)
-/* sound cpu */
+ /* sound cpu */
MDRV_CPU_ADD("audio", Z80, SOUND_PCB_CLOCK)
MDRV_CPU_PROGRAM_MAP(sound_program_map,0)
MDRV_CPU_IO_MAP(sound_io_map,0)
@@ -354,23 +356,17 @@ static MACHINE_DRIVER_START( lgp )
MDRV_MACHINE_START(lgp)
MDRV_LASERDISC_ADD("laserdisc", PIONEER_LDV1000)
+ MDRV_LASERDISC_OVERLAY(lgp, 256, 256, BITMAP_FORMAT_INDEXED16)
-/* video */
-
- MDRV_SCREEN_ADD("main", RASTER)
- MDRV_SCREEN_FORMAT(BITMAP_FORMAT_RGB32)
- MDRV_SCREEN_REFRESH_RATE(60)
- MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MDRV_SCREEN_SIZE(32*8, 32*8)
- MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 32*8-1)
+ /* video hardware */
+ MDRV_LASERDISC_SCREEN_ADD_NTSC("main", BITMAP_FORMAT_INDEXED16)
MDRV_PALETTE_LENGTH(256)
/* MDRV_PALETTE_INIT(lgp) */
MDRV_GFXDECODE(lgp)
- MDRV_VIDEO_UPDATE(lgp)
-/* sound */
+ /* sound hardware */
MDRV_SPEAKER_STANDARD_STEREO("left", "right")
MDRV_SOUND_ADD("laserdisc", CUSTOM, 0)
@@ -459,6 +455,9 @@ ROM_START( lgp )
ROM_LOAD( "a02_38.44", 0x00220, 0x100, CRC(6f37212a) SHA1(32b891dc9b97637620b2f1f9d9d76509c333cb2d) )
ROM_LOAD( "a02_39.109", 0x00320, 0x100, CRC(88363809) SHA1(b22a7bd8ce6b28bf7cfa64c3a08e4cf7f9b4cd20) )
ROM_LOAD( "a02_40.110", 0x00420, 0x100, CRC(fdfc7aac) SHA1(2413f7f9ad11c91d2adc0aab37bf70ff5c68ab6f) )
+
+ DISK_REGION( "laserdisc" )
+ DISK_IMAGE_READONLY( "lgp", 0, NO_DUMP )
ROM_END
diff --git a/src/mame/drivers/segald.c b/src/mame/drivers/segald.c
index b916ca564af..f51ca6523f0 100644
--- a/src/mame/drivers/segald.c
+++ b/src/mame/drivers/segald.c
@@ -80,6 +80,8 @@ static void astron_draw_sprites(bitmap_t *bitmap, const rectangle *cliprect)
static VIDEO_UPDATE( astron )
{
+ render_container_set_palette_alpha(render_container_get_screen(screen), 0, 0x00);
+
fillbitmap(bitmap, 0, cliprect);
astron_draw_characters(screen->machine, bitmap, cliprect);
@@ -341,7 +343,8 @@ static MACHINE_START( astron )
/* DRIVER */
static MACHINE_DRIVER_START( astron )
-/* main cpu */
+
+ /* main cpu */
MDRV_CPU_ADD("main", Z80, SCHEMATIC_CLOCK/4)
MDRV_CPU_PROGRAM_MAP(mainmem,0)
MDRV_CPU_IO_MAP(mainport,0)
@@ -351,19 +354,13 @@ static MACHINE_DRIVER_START( astron )
MDRV_MACHINE_START(astron)
MDRV_LASERDISC_ADD("laserdisc", PIONEER_LDV1000)
+ MDRV_LASERDISC_OVERLAY(astron, 256, 256, BITMAP_FORMAT_INDEXED16)
-/* video */
-
- MDRV_SCREEN_ADD("main", RASTER)
- MDRV_SCREEN_FORMAT(BITMAP_FORMAT_RGB32)
- MDRV_SCREEN_REFRESH_RATE(60)
- MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MDRV_SCREEN_SIZE(32*8, 32*8)
- MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 32*8-1)
+ /* video hardware */
+ MDRV_LASERDISC_SCREEN_ADD_NTSC("main", BITMAP_FORMAT_INDEXED16)
MDRV_GFXDECODE(segald)
MDRV_PALETTE_LENGTH(256)
- MDRV_VIDEO_UPDATE(astron)
/* sound hardare */
MDRV_SPEAKER_STANDARD_STEREO("left", "right")
@@ -403,6 +400,9 @@ ROM_START( astron )
ROM_LOAD( "pr-5277.bin", 0x100, 0x100, CRC(bf2c33ab) SHA1(4a83b3e9b74b900621e8f42edf94cc04b791cdd0) )
ROM_LOAD( "pr-5276.bin", 0x200, 0x20, CRC(91267e8a) SHA1(ae5bd8efea5322c4d9986d06680a781392f9a642) )
ROM_LOAD( "pr-5275.bin", 0x220, 0x20, CRC(0c872a9b) SHA1(eaabce5d867a4e896bd356abc94429f9a4eec372) )
+
+ DISK_REGION( "laserdisc" )
+ DISK_IMAGE_READONLY( "astron", 0, NO_DUMP )
ROM_END
ROM_START( astronp )
@@ -433,6 +433,9 @@ ROM_START( astronp )
ROM_LOAD( "pr-5277.bin", 0x100, 0x100, CRC(bf2c33ab) SHA1(4a83b3e9b74b900621e8f42edf94cc04b791cdd0) )
ROM_LOAD( "pr-5276.bin", 0x200, 0x20, CRC(91267e8a) SHA1(ae5bd8efea5322c4d9986d06680a781392f9a642) )
ROM_LOAD( "pr-5275.bin", 0x220, 0x20, CRC(0c872a9b) SHA1(eaabce5d867a4e896bd356abc94429f9a4eec372) )
+
+ DISK_REGION( "laserdisc" )
+ DISK_IMAGE_READONLY( "astron", 0, NO_DUMP )
ROM_END
ROM_START( galaxyr )
@@ -465,6 +468,9 @@ ROM_START( galaxyr )
ROM_LOAD( "pr-5277.bin", 0x100, 0x100, CRC(bf2c33ab) SHA1(4a83b3e9b74b900621e8f42edf94cc04b791cdd0) )
ROM_LOAD( "pr-5276.bin", 0x200, 0x20, CRC(91267e8a) SHA1(ae5bd8efea5322c4d9986d06680a781392f9a642) )
ROM_LOAD( "pr-5275.bin", 0x220, 0x20, CRC(0c872a9b) SHA1(eaabce5d867a4e896bd356abc94429f9a4eec372) )
+
+ DISK_REGION( "laserdisc" )
+ DISK_IMAGE_READONLY( "galaxyr", 0, NO_DUMP )
ROM_END
ROM_START( galaxyrp )
@@ -497,6 +503,9 @@ ROM_START( galaxyrp )
ROM_LOAD( "pr-5277.bin", 0x100, 0x100, CRC(bf2c33ab) SHA1(4a83b3e9b74b900621e8f42edf94cc04b791cdd0) )
ROM_LOAD( "pr-5276.bin", 0x200, 0x20, CRC(91267e8a) SHA1(ae5bd8efea5322c4d9986d06680a781392f9a642) )
ROM_LOAD( "pr-5275.bin", 0x220, 0x20, CRC(0c872a9b) SHA1(eaabce5d867a4e896bd356abc94429f9a4eec372) )
+
+ DISK_REGION( "laserdisc" )
+ DISK_IMAGE_READONLY( "galaxyr", 0, NO_DUMP )
ROM_END
ROM_START( sblazerp )
@@ -529,6 +538,9 @@ ROM_START( sblazerp )
ROM_LOAD( "pr-5277.bin", 0x100, 0x100, CRC(bf2c33ab) SHA1(4a83b3e9b74b900621e8f42edf94cc04b791cdd0) )
ROM_LOAD( "pr-5276.bin", 0x200, 0x20, CRC(91267e8a) SHA1(ae5bd8efea5322c4d9986d06680a781392f9a642) )
ROM_LOAD( "pr-5275.bin", 0x220, 0x20, CRC(0c872a9b) SHA1(eaabce5d867a4e896bd356abc94429f9a4eec372) )
+
+ DISK_REGION( "laserdisc" )
+ DISK_IMAGE_READONLY( "sblazer", 0, NO_DUMP )
ROM_END
ROM_START( cobraseg )
@@ -557,6 +569,9 @@ ROM_START( cobraseg )
ROM_LOAD( "pr-5277.bin", 0x100, 0x100, CRC(bf2c33ab) SHA1(4a83b3e9b74b900621e8f42edf94cc04b791cdd0) )
ROM_LOAD( "pr-5276.bin", 0x200, 0x20, CRC(91267e8a) SHA1(ae5bd8efea5322c4d9986d06680a781392f9a642) )
ROM_LOAD( "pr-5275.bin", 0x220, 0x20, CRC(0c872a9b) SHA1(eaabce5d867a4e896bd356abc94429f9a4eec372) )
+
+ DISK_REGION( "laserdisc" )
+ DISK_IMAGE_READONLY( "cobracom", 0, NO_DUMP )
ROM_END
diff --git a/src/mame/drivers/superdq.c b/src/mame/drivers/superdq.c
index d14ba641eb7..790fec43e99 100644
--- a/src/mame/drivers/superdq.c
+++ b/src/mame/drivers/superdq.c
@@ -34,18 +34,6 @@ static UINT8 superdq_ld_out_latch;
static tilemap *superdq_tilemap;
static int superdq_color_bank = 0;
-static render_texture *video_texture;
-static render_texture *overlay_texture;
-static bitmap_t *last_video_bitmap;
-
-static void video_cleanup(running_machine *machine)
-{
- if (video_texture != NULL)
- render_texture_free(video_texture);
- if (overlay_texture != NULL)
- render_texture_free(overlay_texture);
-}
-
static TILE_GET_INFO( get_tile_info )
{
int tile = videoram[tile_index];
@@ -56,41 +44,13 @@ static TILE_GET_INFO( get_tile_info )
static VIDEO_START( superdq )
{
superdq_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows, 8, 8, 32, 32);
-
- add_exit_callback(machine, video_cleanup);
}
static VIDEO_UPDATE( superdq )
{
- tilemap_draw(bitmap,cliprect,superdq_tilemap,0,0);
+ render_container_set_palette_alpha(render_container_get_screen(screen), 0, 0x00);
- if (!video_skip_this_frame())
- {
- bitmap_t *vidbitmap;
- rectangle fixedvis = *video_screen_get_visible_area(screen);
- fixedvis.max_x++;
- fixedvis.max_y++;
-
- laserdisc_get_video(laserdisc, &vidbitmap);
-
- /* first lay down the video data */
- if (video_texture == NULL)
- video_texture = render_texture_alloc(NULL, NULL);
- if (vidbitmap != last_video_bitmap)
- render_texture_set_bitmap(video_texture, vidbitmap, NULL, 0, TEXFORMAT_YUY16);
-
- last_video_bitmap = vidbitmap;
-
- /* then overlay the TMS9928A video */
- if (overlay_texture == NULL)
- overlay_texture = render_texture_alloc(NULL, NULL);
- render_texture_set_bitmap(overlay_texture, bitmap, &fixedvis, 0, TEXFORMAT_PALETTEA16);
-
- /* add both quads to the screen */
- render_container_empty(render_container_get_screen(screen));
- render_screen_add_quad(screen, 0.0f, 0.0f, 1.0f, 1.0f, MAKE_ARGB(0xff,0xff,0xff,0xff), video_texture, PRIMFLAG_BLENDMODE(BLENDMODE_NONE) | PRIMFLAG_SCREENTEX(1));
- render_screen_add_quad(screen, 0.0f, 0.0f, 1.0f, 1.0f, MAKE_ARGB(0xff,0xff,0xff,0xff), overlay_texture, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA) | PRIMFLAG_SCREENTEX(1));
- }
+ tilemap_draw(bitmap,cliprect,superdq_tilemap,0,0);
/* display disc information */
popmessage("%s", laserdisc_describe_state(laserdisc));
@@ -349,23 +309,16 @@ static MACHINE_DRIVER_START( superdq )
MDRV_MACHINE_RESET(superdq)
MDRV_LASERDISC_ADD("laserdisc", PIONEER_LDV1000)
+ MDRV_LASERDISC_OVERLAY(superdq, 256, 256, BITMAP_FORMAT_INDEXED16)
/* video hardware */
- MDRV_VIDEO_ATTRIBUTES(VIDEO_SELF_RENDER)
-
- MDRV_SCREEN_ADD("main", RASTER)
- MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
- MDRV_SCREEN_REFRESH_RATE(60)
- MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MDRV_SCREEN_SIZE(32*8, 32*8)
- MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 32*8-1)
+ MDRV_LASERDISC_SCREEN_ADD_NTSC("main", BITMAP_FORMAT_INDEXED16)
MDRV_GFXDECODE(superdq)
MDRV_PALETTE_LENGTH(32)
MDRV_PALETTE_INIT(superdq)
MDRV_VIDEO_START(superdq)
- MDRV_VIDEO_UPDATE(superdq)
/* sound hardware */
MDRV_SPEAKER_STANDARD_STEREO("left", "right")
diff --git a/src/mame/drivers/thayers.c b/src/mame/drivers/thayers.c
index 83ab79be43d..7432b236e98 100644
--- a/src/mame/drivers/thayers.c
+++ b/src/mame/drivers/thayers.c
@@ -38,16 +38,6 @@ static int pr7820_enter;
static const UINT8 led_map[16] = { 0x3f, 0x06, 0x5b, 0x4f, 0x66, 0x6d, 0x7c, 0x07, 0x7f, 0x67, 0x77, 0x7c, 0x39, 0x5e, 0x79, 0x00 };
-/* Video */
-
-static VIDEO_UPDATE( thayers )
-{
- /* display disc information */
- popmessage("%s", laserdisc_describe_state(laserdisc));
-
- return 0;
-}
-
/* Interrupts */
static void check_interrupt(running_machine *machine)
@@ -772,15 +762,9 @@ static MACHINE_DRIVER_START( thayers )
MDRV_LASERDISC_ADD("laserdisc", PIONEER_PR7820)
/* video hardware */
- MDRV_SCREEN_ADD("main", RASTER)
- MDRV_SCREEN_FORMAT(BITMAP_FORMAT_RGB32)
- MDRV_SCREEN_REFRESH_RATE(60)
- MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) // inaccurate
- MDRV_SCREEN_SIZE(32*10, 32*8)
- MDRV_SCREEN_VISIBLE_AREA(0*10, 32*10-1, 0*8, 32*8-1)
+ MDRV_LASERDISC_SCREEN_ADD_NTSC("main", BITMAP_FORMAT_RGB32)
MDRV_PALETTE_LENGTH(256)
- MDRV_VIDEO_UPDATE(thayers)
/* sound hardware */
// SSI 263 @ 2MHz
diff --git a/src/mame/includes/gottlieb.h b/src/mame/includes/gottlieb.h
index c4970469e59..7e79bfa67ac 100644
--- a/src/mame/includes/gottlieb.h
+++ b/src/mame/includes/gottlieb.h
@@ -38,6 +38,4 @@ extern WRITE8_HANDLER( gottlieb_laserdisc_video_control_w );
extern WRITE8_HANDLER( gottlieb_paletteram_w );
VIDEO_START( gottlieb );
-VIDEO_START( gottlieb_laserdisc );
VIDEO_UPDATE( gottlieb );
-VIDEO_UPDATE( gottlieb_laserdisc );
diff --git a/src/mame/mame.mak b/src/mame/mame.mak
index 74b92ddcce2..c5452d67894 100644
--- a/src/mame/mame.mak
+++ b/src/mame/mame.mak
@@ -137,6 +137,7 @@ CPUS += UPD7807
CPUS += ARM
CPUS += ARM7
CPUS += JAGUAR
+CPUS += CUBEQCPU
CPUS += R3000
CPUS += R3041
CPUS += R4600
@@ -1536,6 +1537,7 @@ $(MAMEOBJ)/misc.a: \
$(DRIVERS)/coolpool.o \
$(DRIVERS)/cowrace.o \
$(DRIVERS)/crystal.o $(VIDEO)/vrender0.o \
+ $(DRIVERS)/cubeqst.o \
$(DRIVERS)/cybertnk.o \
$(DRIVERS)/dcheese.o $(VIDEO)/dcheese.o \
$(DRIVERS)/dgpix.o \
diff --git a/src/mame/mamedriv.c b/src/mame/mamedriv.c
index 0b35e2ca765..d4991e3f910 100644
--- a/src/mame/mamedriv.c
+++ b/src/mame/mamedriv.c
@@ -7938,6 +7938,7 @@ Other Sun games
DRIVER( ttchampa )
DRIVER( dreamwld ) /* (c) 2000 SemiCom */
DRIVER( cybertnk ) /* (c) 1990 Coreland */
+ DRIVER( cubeqst ) /* (c) 1983 Simutrek Inc. */
DRIVER( pkscram ) /* (c) 1993 Cosmo Electronics Corporation */
/* Funworld */
diff --git a/src/mame/video/gottlieb.c b/src/mame/video/gottlieb.c
index 55c67304654..be11ac78fc4 100644
--- a/src/mame/video/gottlieb.c
+++ b/src/mame/video/gottlieb.c
@@ -20,11 +20,6 @@ static UINT8 spritebank;
static tilemap *bg_tilemap;
static double weights[4];
-static render_texture *video_texture;
-static render_texture *overlay_texture;
-static const rectangle overlay_clip = { 0, GOTTLIEB_VIDEO_HBLANK-1, 0, GOTTLIEB_VIDEO_VBLANK-8 };
-
-
/*************************************
*
@@ -86,6 +81,8 @@ WRITE8_HANDLER( gottlieb_video_control_w )
WRITE8_HANDLER( gottlieb_laserdisc_video_control_w )
{
+ const device_config *laserdisc = device_list_first(machine->config->devicelist, LASERDISC);
+
/* bit 0 works like the other games */
gottlieb_video_control_w(machine, offset, data & 0x01);
@@ -93,8 +90,10 @@ WRITE8_HANDLER( gottlieb_laserdisc_video_control_w )
spritebank = (data & 0x02) >> 1;
/* bit 2 video enable (0 = black screen) */
-
/* bit 3 genlock control (1 = show laserdisc image) */
+ laserdisc_overlay_enable(laserdisc, (data & 0x04) ? TRUE : FALSE);
+ laserdisc_video_enable(laserdisc, ((data & 0x0c) == 0x0c) ? TRUE : FALSE);
+
render_container_set_palette_alpha(render_container_get_screen(machine->primary_screen), 0, (data & 0x08) ? 0x00 : 0xff);
}
@@ -164,23 +163,6 @@ VIDEO_START( gottlieb )
}
-VIDEO_START( gottlieb_laserdisc )
-{
- /* handle normal video */
- VIDEO_START_CALL(gottlieb);
-
- /* allocate an overlay texture */
- overlay_texture = render_texture_alloc(NULL, NULL);
- if (overlay_texture == NULL)
- fatalerror("Out of memory allocating overlay texture");
-
- /* allocate a video texture */
- video_texture = render_texture_alloc(NULL, NULL);
- if (video_texture == NULL)
- fatalerror("Out of memory allocating video texture");
-}
-
-
/*************************************
*
@@ -237,37 +219,3 @@ VIDEO_UPDATE( gottlieb )
return 0;
}
-
-
-VIDEO_UPDATE( gottlieb_laserdisc )
-{
- const device_config *laserdisc = device_list_first(screen->machine->config->devicelist, LASERDISC);
- rectangle clip = *cliprect;
- bitmap_t *video_bitmap;
-
- /* scale the cliprect to the screen and render it */
- clip.min_x = 0;
- clip.max_x = GOTTLIEB_VIDEO_HBLANK - 1;
- clip.min_y = cliprect->min_y * GOTTLIEB_VIDEO_VCOUNT / bitmap->height;
- clip.max_y = (cliprect->max_y + 1) * GOTTLIEB_VIDEO_VCOUNT / bitmap->height - 1;
- video_update_gottlieb(screen, bitmap, &clip);
-
- /* if this is the last update, handle it */
- if (cliprect->max_y == video_screen_get_visible_area(screen)->max_y)
- {
- /* update the texture with the overlay contents */
- render_texture_set_bitmap(overlay_texture, bitmap, &overlay_clip, 0, TEXFORMAT_PALETTEA16);
-
- /* now talk to the laserdisc */
- laserdisc_get_video(laserdisc, &video_bitmap);
- if (video_bitmap != NULL)
- render_texture_set_bitmap(video_texture, video_bitmap, NULL, 0, TEXFORMAT_YUY16);
-
- /* add both quads to the screen */
- render_container_empty(render_container_get_screen(screen));
- render_screen_add_quad(screen, 0.0f, 0.0f, 1.0f, 1.0f, MAKE_ARGB(0xff,0xff,0xff,0xff), video_texture, PRIMFLAG_BLENDMODE(BLENDMODE_NONE) | PRIMFLAG_SCREENTEX(1));
- render_screen_add_quad(screen, 0.0f, 0.0f, 1.0f, 1.0f, MAKE_ARGB(0xff,0xff,0xff,0xff), overlay_texture, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA) | PRIMFLAG_SCREENTEX(1));
- }
-
- return 0;
-}