summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author stephh <stephh@users.noreply.github.com>2008-10-28 22:36:44 +0000
committer stephh <stephh@users.noreply.github.com>2008-10-28 22:36:44 +0000
commit0c22d0bf479194cdcb0758dbaafed9b42bfcef7e (patch)
tree6d451da0199525e44324c948c2779800399b5001
parent59898e7d867286b0ca36e82b463262cca2024896 (diff)
Fixed Dip Switches and inputs for 'dreamwld'.
-rw-r--r--src/mame/drivers/dreamwld.c178
1 files changed, 81 insertions, 97 deletions
diff --git a/src/mame/drivers/dreamwld.c b/src/mame/drivers/dreamwld.c
index 2d358b4af6a..b300cdf2e3b 100644
--- a/src/mame/drivers/dreamwld.c
+++ b/src/mame/drivers/dreamwld.c
@@ -34,6 +34,51 @@ Notes:
VSync @ 58Hz
+Stephh's notes (based on the games M68000 code and some tests) :
+
+ - Don't trust the "test mode" as it displays Dip Switches infos
+ that are in fact unused by the game ! Leftover from another game ?
+
+ PORT_START("DSW")
+ PORT_DIPNAME( 0x0003, 0x0003, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:1,2")
+ PORT_DIPSETTING( 0x0002, "1" )
+ PORT_DIPSETTING( 0x0003, "2" )
+ PORT_DIPSETTING( 0x0001, "3" )
+ PORT_DIPSETTING( 0x0000, "4" )
+ PORT_DIPUNUSED_DIPLOC( 0x0004, IP_ACTIVE_LOW, "SW2:3" )
+ PORT_DIPUNUSED_DIPLOC( 0x0008, IP_ACTIVE_LOW, "SW2:4" )
+ PORT_DIPUNUSED_DIPLOC( 0x0010, IP_ACTIVE_LOW, "SW2:5" )
+ PORT_DIPNAME( 0x0060, 0x0060, "Ticket Payout" ) PORT_DIPLOCATION("SW2:6,7")
+ PORT_DIPSETTING( 0x0000, DEF_STR( No ) )
+ PORT_DIPSETTING( 0x0020, "Little" )
+ PORT_DIPSETTING( 0x0060, DEF_STR( Normal ) )
+ PORT_DIPSETTING( 0x0040, "Much" )
+ PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Free_Play ) ) PORT_DIPLOCATION("SW2:8")
+ PORT_DIPSETTING( 0x0080, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
+ PORT_DIPNAME( 0x0100, 0x0000, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW1:1")
+ PORT_DIPSETTING( 0x0100, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
+ PORT_DIPNAME( 0x0e00, 0x0e00, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW1:2,3,4")
+ PORT_DIPSETTING( 0x0000, DEF_STR( 5C_1C ) )
+ PORT_DIPSETTING( 0x0200, DEF_STR( 4C_1C ) )
+ PORT_DIPSETTING( 0x0400, DEF_STR( 3C_1C ) )
+ PORT_DIPSETTING( 0x0600, DEF_STR( 2C_1C ) )
+ PORT_DIPSETTING( 0x0e00, DEF_STR( 1C_1C ) )
+ PORT_DIPSETTING( 0x0a00, DEF_STR( 2C_3C ) )
+ PORT_DIPSETTING( 0x0c00, DEF_STR( 1C_2C ) )
+ PORT_DIPSETTING( 0x0800, DEF_STR( 1C_3C ) )
+ PORT_DIPNAME( 0x7000, 0x7000, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW1:5,6,7")
+ PORT_DIPSETTING( 0x2000, "Level 1" )
+ PORT_DIPSETTING( 0x1000, "Level 2" )
+ PORT_DIPSETTING( 0x0000, "Level 3" )
+ PORT_DIPSETTING( 0x7000, "Level 4" )
+ PORT_DIPSETTING( 0x6000, "Level 5" )
+ PORT_DIPSETTING( 0x5000, "Level 6" )
+ PORT_DIPSETTING( 0x4000, "Level 7" )
+ PORT_DIPSETTING( 0x3000, "Level 8" )
+ PORT_SERVICE_DIPLOC( 0x8000, IP_ACTIVE_LOW, "SW1:8" )
+
*/
#include "driver.h"
@@ -140,7 +185,7 @@ static TILE_GET_INFO( get_dreamwld_bg2_tile_info )
SET_TILE_INFO(1,tileno+dreamwld_tilebank[1]*0x2000,0xc0+colour,0);
}
-static VIDEO_START(dreamwld)
+static VIDEO_START( dreamwld )
{
dreamwld_bg_tilemap = tilemap_create(get_dreamwld_bg_tile_info,tilemap_scan_rows, 16, 16, 64,32);
dreamwld_bg2_tilemap = tilemap_create(get_dreamwld_bg2_tile_info,tilemap_scan_rows, 16, 16, 64,32);
@@ -149,7 +194,7 @@ static VIDEO_START(dreamwld)
dreamwld_tilebank[0] = dreamwld_tilebank[1] = 0;
}
-static VIDEO_UPDATE(dreamwld)
+static VIDEO_UPDATE( dreamwld )
{
tilemap_set_scrolly( dreamwld_bg_tilemap,0, dreamwld_bg_scroll[(0x400/4)]+32 );
tilemap_set_scrolly( dreamwld_bg2_tilemap,0, dreamwld_bg_scroll[(0x400/4)+2]+32 );
@@ -205,12 +250,12 @@ static WRITE32_HANDLER( dreamwld_palette_w )
palette_set_color_rgb(machine, color, pal5bit(dat >> 10), pal5bit(dat >> 5), pal5bit(dat >> 0));
}
-static READ32_HANDLER(dreamwld_6295_0_r)
+static READ32_HANDLER( dreamwld_6295_0_r )
{
return okim6295_status_0_r(machine, 0)<<24;
}
-static WRITE32_HANDLER(dreamwld_6295_0_w)
+static WRITE32_HANDLER( dreamwld_6295_0_w )
{
if (ACCESSING_BITS_24_31)
{
@@ -244,12 +289,12 @@ static WRITE32_HANDLER( dreamwld_6295_0_bank_w )
}
}
-static READ32_HANDLER(dreamwld_6295_1_r)
+static READ32_HANDLER( dreamwld_6295_1_r )
{
return okim6295_status_1_r(machine, 0)<<24;
}
-static WRITE32_HANDLER(dreamwld_6295_1_w)
+static WRITE32_HANDLER( dreamwld_6295_1_w )
{
if (ACCESSING_BITS_24_31)
{
@@ -297,103 +342,48 @@ static ADDRESS_MAP_START( dreamwld_map, ADDRESS_SPACE_PROGRAM, 32 )
ADDRESS_MAP_END
-
-static INPUT_PORTS_START(dreamwld)
+static INPUT_PORTS_START( dreamwld )
PORT_START("INPUTS") /* 32bit */
PORT_BIT( 0x00000001, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x00000002, IP_ACTIVE_LOW, IPT_COIN2 )
- PORT_DIPNAME( 0x00000004, 0x00000004, "Not Dips?" ) // i don't think these are dips, they're probably just unused parts of the coin port input
- PORT_DIPSETTING( 0x00000004, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00000008, 0x00000008, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00000008, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00000010, 0x00000010, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00000010, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00000020, 0x00000020, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00000020, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00000040, 0x00000040, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00000040, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00000080, 0x00000080, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00000080, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00000100, 0x00000100, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00000100, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00000200, 0x00000200, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00000200, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00000400, 0x00000400, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00000400, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00000800, 0x00000800, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00000800, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00001000, 0x00001000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00001000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00002000, 0x00002000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00002000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00004000, 0x00004000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00004000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
- PORT_DIPNAME( 0x00008000, 0x00008000, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00008000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
-
+ PORT_BIT( 0x0000fffc, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x00010000, IP_ACTIVE_LOW, IPT_START2 )
- PORT_BIT( 0x00020000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)
- PORT_BIT( 0x00040000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
- PORT_BIT( 0x00080000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
- PORT_BIT( 0x00100000, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2)
+ PORT_BIT( 0x00020000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) /* "Book" (when you get one of them) */
+ PORT_BIT( 0x00040000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) /* "Jump" */
+ PORT_BIT( 0x00080000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) /* "Dig" */
+ PORT_BIT( 0x00100000, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2)
PORT_BIT( 0x00200000, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2)
- PORT_BIT( 0x00400000, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2)
- PORT_BIT( 0x00800000, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2)
+ PORT_BIT( 0x00400000, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2)
+ PORT_BIT( 0x00800000, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2)
PORT_BIT( 0x01000000, IP_ACTIVE_LOW, IPT_START1 )
- PORT_BIT( 0x02000000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1)
- PORT_BIT( 0x04000000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
- PORT_BIT( 0x08000000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
- PORT_BIT( 0x10000000, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1)
+ PORT_BIT( 0x02000000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) /* "Book" (when you get one of them) */
+ PORT_BIT( 0x04000000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) /* "Jump" */
+ PORT_BIT( 0x08000000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) /* "Dig" */
+ PORT_BIT( 0x10000000, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1)
PORT_BIT( 0x20000000, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1)
- PORT_BIT( 0x40000000, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1)
- PORT_BIT( 0x80000000, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1)
+ PORT_BIT( 0x40000000, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1)
+ PORT_BIT( 0x80000000, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1)
PORT_START("c00004") /* 32bit */
PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "DSW")
PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "DSW")
- PORT_START("DSW") /* 16bit */
+ PORT_START("DSW") /* 16bit */
PORT_DIPNAME( 0x0003, 0x0003, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:1,2")
- PORT_DIPSETTING( 0x0001, "1" )
- PORT_DIPSETTING( 0x0003, "2" )
- PORT_DIPSETTING( 0x0002, "3" )
- PORT_DIPSETTING( 0x0000, "4" )
- PORT_DIPNAME( 0x0004, 0x0004, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x0004, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0008, 0x0008, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x0008, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0010, 0x0010, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x0010, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0060, 0x0060, "Ticket Payout" ) PORT_DIPLOCATION("SW2:6,7")
- PORT_DIPSETTING( 0x0000, DEF_STR( No ) )
- PORT_DIPSETTING( 0x0020, "Little" )
- PORT_DIPSETTING( 0x0060, DEF_STR( Normal ) )
- PORT_DIPSETTING( 0x0040, "Much" )
- PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Free_Play ) ) PORT_DIPLOCATION("SW2:8")
+ PORT_DIPSETTING( 0x0002, "2" )
+ PORT_DIPSETTING( 0x0003, "3" )
+ PORT_DIPSETTING( 0x0001, "4" )
+ PORT_DIPSETTING( 0x0000, "5" )
+ PORT_DIPUNUSED_DIPLOC( 0x0004, IP_ACTIVE_LOW, "SW2:3" )
+ PORT_DIPUNUSED_DIPLOC( 0x0008, IP_ACTIVE_LOW, "SW2:4" )
+ PORT_DIPUNUSED_DIPLOC( 0x0010, IP_ACTIVE_LOW, "SW2:5" )
+ PORT_DIPUNUSED_DIPLOC( 0x0020, IP_ACTIVE_LOW, "SW2:6" ) /* see notes - "Ticket Payout" */
+ PORT_DIPUNUSED_DIPLOC( 0x0040, IP_ACTIVE_LOW, "SW2:7" ) /* see notes - "Ticket Payout" */
+ PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Free_Play ) ) PORT_DIPLOCATION("SW2:8") /* gives in fact 99 credits */
PORT_DIPSETTING( 0x0080, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
-
- PORT_DIPNAME( 0x0100, 0x0000, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW1:1")
- PORT_DIPSETTING( 0x0100, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0e00, 0x0e00, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW1:2,3,4")
+ PORT_DIPUNUSED_DIPLOC( 0x0100, IP_ACTIVE_LOW, "SW1:1" ) /* see notes - "Demo Sounds" */
+ PORT_DIPNAME( 0x0e00, 0x0e00, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW1:2,3,4")
PORT_DIPSETTING( 0x0000, DEF_STR( 5C_1C ) )
PORT_DIPSETTING( 0x0200, DEF_STR( 4C_1C ) )
PORT_DIPSETTING( 0x0400, DEF_STR( 3C_1C ) )
@@ -402,15 +392,9 @@ static INPUT_PORTS_START(dreamwld)
PORT_DIPSETTING( 0x0a00, DEF_STR( 2C_3C ) )
PORT_DIPSETTING( 0x0c00, DEF_STR( 1C_2C ) )
PORT_DIPSETTING( 0x0800, DEF_STR( 1C_3C ) )
- PORT_DIPNAME( 0x7000, 0x7000, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW1:5,6,7")
- PORT_DIPSETTING( 0x2000, "Level 1" )
- PORT_DIPSETTING( 0x1000, "Level 2" )
- PORT_DIPSETTING( 0x0000, "Level 3" )
- PORT_DIPSETTING( 0x7000, "Level 4" )
- PORT_DIPSETTING( 0x6000, "Level 5" )
- PORT_DIPSETTING( 0x5000, "Level 6" )
- PORT_DIPSETTING( 0x4000, "Level 7" )
- PORT_DIPSETTING( 0x3000, "Level 8" )
+ PORT_DIPUNUSED_DIPLOC( 0x1000, IP_ACTIVE_LOW, "SW1:5" ) /* see notes - "Difficulty" */
+ PORT_DIPUNUSED_DIPLOC( 0x2000, IP_ACTIVE_LOW, "SW1:6" ) /* see notes - "Difficulty" */
+ PORT_DIPUNUSED_DIPLOC( 0x4000, IP_ACTIVE_LOW, "SW1:7" ) /* see notes - "Difficulty" */
PORT_SERVICE_DIPLOC( 0x8000, IP_ACTIVE_LOW, "SW1:8" )
INPUT_PORTS_END