summaryrefslogtreecommitdiffstats
path: root/src/mame/drivers/esh.c
diff options
context:
space:
mode:
authorGravatarGravatar Aaron Giles <aaron@aarongiles.com>2008-08-18 04:31:08 +0000
committerGravatarGravatar Aaron Giles <aaron@aarongiles.com>2008-08-18 04:31:08 +0000
commit284b5a0d95c4740b25fd1d06aecd2cc74eae12f3 (patch) (github)
treeed984f6362decda13c57c168d5d2d18d6e30d06c /src/mame/drivers/esh.c
parentd0eb89399fc684c90330466674470775079ae113 (diff)
downloadmame-284b5a0d95c4740b25fd1d06aecd2cc74eae12f3.tar.bz2
mame-284b5a0d95c4740b25fd1d06aecd2cc74eae12f3.zip
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/drivers/esh.c')
-rw-r--r--src/mame/drivers/esh.c28
1 files changed, 17 insertions, 11 deletions
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