summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/fantland.c
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2008-02-21 08:50:36 +0000
committer Aaron Giles <aaron@aarongiles.com>2008-02-21 08:50:36 +0000
commitb7c4a537cd133cb0d7f07e3e99ea0d8a27a0531a (patch)
treeef0e28a8aa802b02eec9136e7d876781ed8700d3 /src/mame/drivers/fantland.c
parent10d998271654018ae46208002d1b835930a978aa (diff)
Most important thing to note about this change:
ALL DRIVERS MUST NOW EXPLICITLY DECLARE THEIR SCREENS. Read on for more detail.... Added device tag as a parameter to the start function for devices. Updated MC6845 to accept this tag. Added new functions for iterating through the device list and counting devices of a given type. Updated search and iteration functions to accept DEVICE_TYPE_WILDCARD to work across all devices. Added new macro MDRV_DEVICE_CONFIG_DATA() which is used to set a single item in an inline data structure. Removed the per-screen palette_base. This was an idea that never really worked out, nor have we really needed it. Defined a new device type VIDEO_SCREEN. Currently this has no live functionality, but merely serves as a placeholder/identifier for video screens. Eventually some of the screen management code may move into the start/stop/reset functions. Changed MDRV_SCREEN_* macros to build up VIDEO_SCREEN devices rather than storing values in the screen[] array. Changed MDRV_SCREEN_ADD to specify a screen type (RASTER, VECTOR, LCD for the moment). Removed the older VIDEO_TYPE_RASTER and VIDEO_TYPE_VECTOR; this information is now determined by walking the screen list. Removed the screen[] array from machine_config. Modified all code referencing Machine->config->screen[] and changed it to iterate over the devices using the new video_screen_first() and video_screen_next() functions. (The next step will be to add video_* functions that accept a tag instead of screen index, and then move systems over to always referencing screens by tag instead of index.) Removed implicit screen #0. This means that ALL DRIVERS MUST EXPLICITLY DECLARE THEIR SCREENS. Updated all drivers to do so. While there, grouped all MDRV_SCREEN_* parameters together. Also removed unnecessary VIDEO_TYPE_RASTER and VIDEO_TYPE_VECTOR. Also removed VBLANK and bitmap format information from vector games. This was painful and very tedious. Changed game information to display info about all screens.
Diffstat (limited to 'src/mame/drivers/fantland.c')
-rw-r--r--src/mame/drivers/fantland.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/mame/drivers/fantland.c b/src/mame/drivers/fantland.c
index 530d0852aa7..0489d460f25 100644
--- a/src/mame/drivers/fantland.c
+++ b/src/mame/drivers/fantland.c
@@ -820,18 +820,18 @@ static MACHINE_DRIVER_START( fantland )
MDRV_CPU_PERIODIC_INT(fantland_sound_irq, 8000)
// NMI when soundlatch is written
- MDRV_SCREEN_REFRESH_RATE(60)
- MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
-
MDRV_MACHINE_RESET(fantland)
MDRV_INTERLEAVE(8000/60) // sound irq must feed the DAC at 8kHz
/* video hardware */
- MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER)
+ MDRV_SCREEN_ADD("main", RASTER)
+ MDRV_SCREEN_REFRESH_RATE(60)
+ MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
MDRV_SCREEN_SIZE(352,256)
MDRV_SCREEN_VISIBLE_AREA(0, 352-1, 0, 256-1)
+
MDRV_GFXDECODE(fantland)
MDRV_PALETTE_LENGTH(256)
@@ -871,16 +871,16 @@ static MACHINE_DRIVER_START( galaxygn )
MDRV_CPU_IO_MAP(fantland_sound_iomap, 0)
// IRQ by YM2151, NMI when soundlatch is written
- MDRV_SCREEN_REFRESH_RATE(60)
- MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
-
MDRV_MACHINE_RESET(fantland)
/* video hardware */
- MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER)
+ MDRV_SCREEN_ADD("main", RASTER)
+ MDRV_SCREEN_REFRESH_RATE(60)
+ MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
MDRV_SCREEN_SIZE(352,256)
MDRV_SCREEN_VISIBLE_AREA(0, 352-1, 0, 256-1)
+
MDRV_GFXDECODE(fantland)
MDRV_PALETTE_LENGTH(256)
@@ -923,16 +923,16 @@ static MACHINE_DRIVER_START( borntofi )
MDRV_CPU_ADD(I8088, 18432000/3) // 8088 - AMD P8088-2 CPU, running at 6.144MHz [18.432/3]
MDRV_CPU_PROGRAM_MAP(borntofi_sound_map, 0)
- MDRV_SCREEN_REFRESH_RATE(54) // 54 Hz
- MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
-
MDRV_MACHINE_RESET(borntofi)
/* video hardware */
- MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER)
+ MDRV_SCREEN_ADD("main", RASTER)
+ MDRV_SCREEN_REFRESH_RATE(54) // 54 Hz
+ MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
MDRV_SCREEN_SIZE(352,256)
MDRV_SCREEN_VISIBLE_AREA(0, 352-1, 0, 256-1)
+
MDRV_GFXDECODE(fantland)
MDRV_PALETTE_LENGTH(256)
@@ -970,16 +970,16 @@ static MACHINE_DRIVER_START( wheelrun )
MDRV_CPU_PROGRAM_MAP(wheelrun_sound_map, 0)
// IRQ by YM3526, NMI when soundlatch is written
- MDRV_SCREEN_REFRESH_RATE(60)
- MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
-
MDRV_MACHINE_RESET(fantland)
/* video hardware */
- MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER)
+ MDRV_SCREEN_ADD("main", RASTER)
+ MDRV_SCREEN_REFRESH_RATE(60)
+ MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
MDRV_SCREEN_SIZE(256,224)
MDRV_SCREEN_VISIBLE_AREA(0, 256-1, 0, 224-1)
+
MDRV_GFXDECODE(fantland)
MDRV_PALETTE_LENGTH(256)