mirror of
https://github.com/holub/mame
synced 2025-05-22 21:58:57 +03:00
quizpani (quizpani.c) [stephh] :
- Improved Dip Switches and fixed Inputs (after verification of the M68000 code)
This commit is contained in:
parent
6e74fa24c9
commit
00c5f4dca5
@ -30,6 +30,19 @@
|
||||
QZ7.99 82s129 prom
|
||||
QZ8.121 82s135 prom
|
||||
|
||||
|
||||
Stephh's notes (based on the games M68000 code and some tests) :
|
||||
|
||||
- I'm unsure that DSW1 bit 0 is related to screen flipping, but if you look at code
|
||||
at 0x004d9c, there is a write to 0x100014.w before writes to the scroll registers.
|
||||
- I can't explain why there is a possibility to have an alternate buttons layout.
|
||||
It may be to run the game on other (NMK ?) boards.
|
||||
- Press START1 + START2 on startup to enter sort of "test mode" (code at 0x003b0c).
|
||||
It shall display system and players inputs, but text seems to be displayed
|
||||
with a black color on a black background, so you can't see anything :(
|
||||
Furthermore, there is no wait after the values are displayed, and after the 'rts'
|
||||
instruction at 0x0083a4, PC branches back to 0x000000 ! Leftover from another game ?
|
||||
|
||||
*************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
@ -44,7 +57,7 @@ static ADDRESS_MAP_START( quizpani_map, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
AM_RANGE(0x100002, 0x100003) AM_READ_PORT("P1_P2")
|
||||
AM_RANGE(0x100008, 0x100009) AM_READ_PORT("DSW1")
|
||||
AM_RANGE(0x10000a, 0x10000b) AM_READ_PORT("DSW2")
|
||||
AM_RANGE(0x100014, 0x100015) AM_WRITENOP
|
||||
AM_RANGE(0x100014, 0x100015) AM_WRITENOP /* screen flipping? */
|
||||
AM_RANGE(0x100016, 0x100017) AM_WRITENOP /* IRQ enable? */
|
||||
AM_RANGE(0x100018, 0x100019) AM_WRITE(quizpani_tilesbank_w)
|
||||
AM_RANGE(0x104000, 0x104001) AM_DEVREADWRITE8_MODERN("oki", okim6295_device, read, write, 0x00ff)
|
||||
@ -60,6 +73,7 @@ static ADDRESS_MAP_START( quizpani_map, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
ADDRESS_MAP_END
|
||||
|
||||
|
||||
/* verified from M68000 code */
|
||||
static INPUT_PORTS_START( quizpani )
|
||||
PORT_START("SYSTEM")
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 )
|
||||
@ -73,95 +87,68 @@ static INPUT_PORTS_START( quizpani )
|
||||
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
|
||||
PORT_START("P1_P2")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1)
|
||||
PORT_DIPNAME( 0x0010, 0x0010, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0010, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0020, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0040, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0080, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
|
||||
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
|
||||
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)
|
||||
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2)
|
||||
PORT_DIPNAME( 0x1000, 0x1000, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x1000, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x2000, 0x2000, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x2000, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x4000, 0x4000, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x4000, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x8000, 0x8000, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x8000, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
/* "Standard" buttons layout */
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_CONDITION("DSW1",0x0002,PORTCOND_EQUALS,0x0002)
|
||||
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) PORT_CONDITION("DSW1",0x0002,PORTCOND_EQUALS,0x0002)
|
||||
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) PORT_CONDITION("DSW1",0x0002,PORTCOND_EQUALS,0x0002)
|
||||
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) PORT_CONDITION("DSW1",0x0002,PORTCOND_EQUALS,0x0002)
|
||||
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW1",0x0002,PORTCOND_EQUALS,0x0002)
|
||||
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW1",0x0002,PORTCOND_EQUALS,0x0002)
|
||||
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW1",0x0002,PORTCOND_EQUALS,0x0002)
|
||||
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW1",0x0002,PORTCOND_EQUALS,0x0002)
|
||||
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_CONDITION("DSW1",0x0002,PORTCOND_EQUALS,0x0002)
|
||||
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) PORT_CONDITION("DSW1",0x0002,PORTCOND_EQUALS,0x0002)
|
||||
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) PORT_CONDITION("DSW1",0x0002,PORTCOND_EQUALS,0x0002)
|
||||
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) PORT_CONDITION("DSW1",0x0002,PORTCOND_EQUALS,0x0002)
|
||||
PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW1",0x0002,PORTCOND_EQUALS,0x0002)
|
||||
PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW1",0x0002,PORTCOND_EQUALS,0x0002)
|
||||
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW1",0x0002,PORTCOND_EQUALS,0x0002)
|
||||
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW1",0x0002,PORTCOND_EQUALS,0x0002)
|
||||
/* "Alternate" buttons layout */
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* dup. B1 P1 */ PORT_CONDITION("DSW1",0x0002,PORTCOND_EQUALS,0x0000)
|
||||
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* dup. B1 P1 */ PORT_CONDITION("DSW1",0x0002,PORTCOND_EQUALS,0x0000)
|
||||
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* dup. B1 P1 */ PORT_CONDITION("DSW1",0x0002,PORTCOND_EQUALS,0x0000)
|
||||
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_CONDITION("DSW1",0x0002,PORTCOND_EQUALS,0x0000)
|
||||
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) PORT_CONDITION("DSW1",0x0002,PORTCOND_EQUALS,0x0000)
|
||||
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) PORT_CONDITION("DSW1",0x0002,PORTCOND_EQUALS,0x0000)
|
||||
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) PORT_CONDITION("DSW1",0x0002,PORTCOND_EQUALS,0x0000)
|
||||
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW1",0x0002,PORTCOND_EQUALS,0x0000)
|
||||
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* dup. B1 P2 */ PORT_CONDITION("DSW1",0x0002,PORTCOND_EQUALS,0x0000)
|
||||
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* dup. B1 P2 */ PORT_CONDITION("DSW1",0x0002,PORTCOND_EQUALS,0x0000)
|
||||
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* dup. B1 P2 */ PORT_CONDITION("DSW1",0x0002,PORTCOND_EQUALS,0x0000)
|
||||
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_CONDITION("DSW1",0x0002,PORTCOND_EQUALS,0x0000)
|
||||
PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) PORT_CONDITION("DSW1",0x0002,PORTCOND_EQUALS,0x0000)
|
||||
PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) PORT_CONDITION("DSW1",0x0002,PORTCOND_EQUALS,0x0000)
|
||||
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) PORT_CONDITION("DSW1",0x0002,PORTCOND_EQUALS,0x0000)
|
||||
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW1",0x0002,PORTCOND_EQUALS,0x0000)
|
||||
|
||||
PORT_START("DSW1")
|
||||
PORT_DIPNAME( 0x0001, 0x0001, DEF_STR( Unknown ) )
|
||||
PORT_DIPNAME( 0x0001, 0x0001, DEF_STR( Flip_Screen ) ) /* guess, but check code at 0x004d9c and write to 0x100014 */
|
||||
PORT_DIPSETTING( 0x0001, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0002, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
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( 0x0002, 0x0002, "Buttons Layout" ) /* check code at 0x005d80 */
|
||||
PORT_DIPSETTING( 0x0002, DEF_STR( Standard ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( Alternate ) )
|
||||
PORT_DIPNAME( 0x0004, 0x0018, DEF_STR( Difficulty ) )
|
||||
PORT_DIPSETTING( 0x0008, DEF_STR( Easy ) )
|
||||
PORT_DIPSETTING( 0x0018, DEF_STR( Medium ) )
|
||||
PORT_DIPSETTING( 0x0010, DEF_STR( Hard ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( Hardest ) )
|
||||
PORT_DIPNAME( 0x0030, 0x0030, DEF_STR( Lives ) )
|
||||
PORT_DIPSETTING( 0x0000, "1" )
|
||||
PORT_DIPSETTING( 0x0020, "2" )
|
||||
PORT_DIPSETTING( 0x0030, "3" )
|
||||
PORT_DIPSETTING( 0x0010, "4" )
|
||||
PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0040, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPUNKNOWN( 0x0040, 0x0040 ) /* check code at 0x0083a6 - never called ? */
|
||||
PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Demo_Sounds ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0080, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0100, 0x0100, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0100, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0200, 0x0200, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0200, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0400, 0x0400, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0400, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0800, 0x0800, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0800, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x1000, 0x1000, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x1000, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x2000, 0x2000, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x2000, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x4000, 0x4000, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x4000, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x8000, 0x8000, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x8000, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
|
||||
PORT_START("DSW2")
|
||||
PORT_DIPNAME( 0x0001, 0x0001, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0001, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0002, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPUNUSED( 0x0001, 0x0001 )
|
||||
PORT_DIPNAME( 0x0002, 0x0002, "Sounds/Music" ) /* check code at 0x003ab4 */
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0002, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x001c, 0x001c, DEF_STR( Coin_B ) )
|
||||
PORT_DIPSETTING( 0x0010, DEF_STR( 4C_1C ) )
|
||||
PORT_DIPSETTING( 0x0008, DEF_STR( 3C_1C ) )
|
||||
@ -180,30 +167,6 @@ static INPUT_PORTS_START( quizpani )
|
||||
PORT_DIPSETTING( 0x00a0, DEF_STR( 1C_3C ) )
|
||||
PORT_DIPSETTING( 0x0020, DEF_STR( 1C_4C ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( Free_Play ) )
|
||||
PORT_DIPNAME( 0x0100, 0x0100, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0100, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0200, 0x0200, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0200, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0400, 0x0400, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0400, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0800, 0x0800, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0800, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x1000, 0x1000, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x1000, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x2000, 0x2000, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x2000, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x4000, 0x4000, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x4000, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x8000, 0x8000, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x8000, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
INPUT_PORTS_END
|
||||
|
||||
static const gfx_layout tilelayout =
|
||||
|
Loading…
Reference in New Issue
Block a user