mirror of
https://github.com/holub/mame
synced 2025-05-22 05:38:52 +03:00
Fixed controls and added preliminary sound (missing rom banking) to Mirage Youjuu Mahjongden
Game is now working New games added or promoted from NOT_WORKING status --------------------------------------------------- Mirage Youjuu Mahjongden [Angelo Salese]
This commit is contained in:
parent
f39969550e
commit
52942414f4
@ -1,7 +1,11 @@
|
||||
/* Mirage Youjuu Mahjongden
|
||||
|
||||
todo: inputs, eeprom?
|
||||
sound (is mbl-03.10a a bad dump?)
|
||||
TODO:
|
||||
-eeprom emulation?
|
||||
-priorities
|
||||
-sample banking
|
||||
|
||||
Notes:To enter into Test Mode you need to keep pressed the Mahjong A button at start-up.
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -140,10 +144,25 @@ static READ16_HANDLER( random_readers )
|
||||
return mame_rand(machine);
|
||||
}
|
||||
|
||||
static UINT32 mux_data;
|
||||
|
||||
static WRITE16_HANDLER( mirage_mux_w )
|
||||
{
|
||||
mux_data = data & 0xffff;
|
||||
}
|
||||
|
||||
static READ16_HANDLER( mirage_input_r )
|
||||
{
|
||||
UINT16 port = input_port_read(machine, "MIRAGE0");
|
||||
return port;
|
||||
switch(mux_data & 0x1f)
|
||||
{
|
||||
case 0x01: return input_port_read(machine, "KEY0");
|
||||
case 0x02: return input_port_read(machine, "KEY1");
|
||||
case 0x04: return input_port_read(machine, "KEY2");
|
||||
case 0x08: return input_port_read(machine, "KEY3");
|
||||
case 0x10: return input_port_read(machine, "KEY4");
|
||||
}
|
||||
|
||||
return 0xffff;
|
||||
}
|
||||
|
||||
static ADDRESS_MAP_START( mirage_readmem, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
@ -185,8 +204,15 @@ static ADDRESS_MAP_START( mirage_writemem, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
|
||||
AM_RANGE(0x130000, 0x1307ff) AM_WRITE(paletteram16_xBBBBBGGGGGRRRRR_word_w) AM_BASE(&paletteram16)
|
||||
|
||||
AM_RANGE(0x150000, 0x150001) AM_WRITE(SMH_NOP)
|
||||
AM_RANGE(0x150002, 0x150003) AM_WRITE(SMH_NOP)
|
||||
AM_RANGE(0x140000, 0x140001) AM_READWRITE(okim6295_status_1_lsb_r, okim6295_data_1_lsb_w)
|
||||
AM_RANGE(0x140002, 0x140003) AM_READWRITE(okim6295_status_1_lsb_r, okim6295_data_1_lsb_w)
|
||||
|
||||
// AM_RANGE(0x140008, 0x140009) AM_WRITE(okim1_rombank_w)
|
||||
|
||||
AM_RANGE(0x150000, 0x150001) AM_READWRITE(okim6295_status_0_lsb_r, okim6295_data_0_lsb_w)
|
||||
AM_RANGE(0x150002, 0x150003) AM_READWRITE(okim6295_status_0_lsb_r, okim6295_data_0_lsb_w)
|
||||
|
||||
// AM_RANGE(0x150008, 0x150009) AM_WRITE(okim0_rombank_w)
|
||||
|
||||
AM_RANGE(0x160000, 0x160001) AM_WRITE(SMH_NOP)
|
||||
|
||||
@ -195,8 +221,8 @@ static ADDRESS_MAP_START( mirage_writemem, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
AM_RANGE(0x16a000, 0x16a001) AM_WRITE(SMH_NOP)
|
||||
|
||||
AM_RANGE(0x16c000, 0x16c001) AM_WRITE(SMH_NOP)
|
||||
AM_RANGE(0x16c002, 0x16c003) AM_WRITE(SMH_NOP) // input multiplex?
|
||||
AM_RANGE(0x16c004, 0x16c005) AM_WRITE(SMH_NOP)
|
||||
AM_RANGE(0x16c002, 0x16c003) AM_WRITE(SMH_NOP)
|
||||
AM_RANGE(0x16c004, 0x16c005) AM_WRITE(mirage_mux_w)
|
||||
|
||||
AM_RANGE(0x16e000, 0x16e001) AM_WRITE(SMH_NOP)
|
||||
|
||||
@ -207,11 +233,9 @@ ADDRESS_MAP_END
|
||||
|
||||
static INPUT_PORTS_START( mirage )
|
||||
PORT_START("SYSTEM_IN")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
|
||||
PORT_DIPNAME( 0x0004, 0x0004, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0004, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE1 )
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN1 )
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 )
|
||||
PORT_SERVICE( 0x0008, IP_ACTIVE_LOW )
|
||||
PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_VBLANK )
|
||||
PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Flip_Screen ) )
|
||||
@ -248,56 +272,41 @@ static INPUT_PORTS_START( mirage )
|
||||
PORT_DIPSETTING( 0x8000, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
|
||||
PORT_START("MIRAGE0")
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_SERVICE1 ) /* Inputs start here???? */
|
||||
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( 0x0010, 0x0010, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x0010, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Unknown ) ) /* Makes selections in "Test Mode" when changing from "Off" to "On" */
|
||||
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_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("KEY0")
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_MAHJONG_A )
|
||||
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_MAHJONG_E )
|
||||
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_MAHJONG_I )
|
||||
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_MAHJONG_M )
|
||||
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_MAHJONG_KAN )
|
||||
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_START1 )
|
||||
PORT_BIT( 0xffc0, IP_ACTIVE_LOW, IPT_START1 )
|
||||
|
||||
PORT_START("KEY1")
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_MAHJONG_C )
|
||||
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_MAHJONG_G )
|
||||
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_MAHJONG_K )
|
||||
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_MAHJONG_CHI )
|
||||
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_MAHJONG_RON )
|
||||
PORT_BIT( 0xffe0, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
|
||||
PORT_START("KEY2")
|
||||
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_MAHJONG_FLIP_FLOP )
|
||||
PORT_BIT( 0xfff7, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
|
||||
PORT_START("KEY3")
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_MAHJONG_B )
|
||||
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_MAHJONG_F )
|
||||
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_MAHJONG_J )
|
||||
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_MAHJONG_N )
|
||||
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_MAHJONG_REACH )
|
||||
PORT_BIT( 0xffe0, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
|
||||
PORT_START("KEY4")
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_MAHJONG_D )
|
||||
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_MAHJONG_H )
|
||||
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_MAHJONG_L )
|
||||
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_MAHJONG_PON )
|
||||
PORT_BIT( 0xfff0, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
INPUT_PORTS_END
|
||||
|
||||
|
||||
@ -367,7 +376,7 @@ static MACHINE_DRIVER_START( mirage )
|
||||
/* sound hardware */
|
||||
MDRV_SPEAKER_STANDARD_MONO("mono")
|
||||
|
||||
MDRV_SOUND_ADD("oki1", OKIM6295, 1000000)
|
||||
MDRV_SOUND_ADD("oki1", OKIM6295, 2500000)
|
||||
MDRV_SOUND_CONFIG(okim6295_interface_pin7high) // clock frequency & pin 7 not verified
|
||||
MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
|
||||
|
||||
@ -392,10 +401,11 @@ ROM_START( mirage )
|
||||
ROM_REGION( 0x200000, "oki1", 0 ) /* M6295 samples */
|
||||
ROM_LOAD( "mbl-03.10a", 0x000000, 0x200000, CRC(4a599703) SHA1(b49e84faa2d6acca952740d30fc8d1a33ac47e79) )
|
||||
|
||||
ROM_REGION( 0x200000, "oki2", 0 ) /* M6295 samples */
|
||||
ROM_REGION( 0x100000, "oki2", 0 ) /* M6295 samples */
|
||||
ROM_LOAD( "mbl-04.12k", 0x000000, 0x100000, CRC(b533123d) SHA1(2cb2f11331d00c2d282113932ed2836805f4fc6e) )
|
||||
ROM_END
|
||||
|
||||
#if 0
|
||||
static void descramble_sound( running_machine *machine, const char *region )
|
||||
{
|
||||
UINT8 *rom = memory_region(machine, region);
|
||||
@ -434,12 +444,12 @@ static void descramble_sound( running_machine *machine, const char *region )
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
static DRIVER_INIT( mirage )
|
||||
{
|
||||
deco56_decrypt_gfx(machine, "gfx1");
|
||||
descramble_sound(machine, "oki1");
|
||||
//descramble_sound(machine, "oki1");
|
||||
}
|
||||
|
||||
GAME( 1994, mirage, 0, mirage, mirage, mirage, ROT0, "Mitchell", "Mirage Youjuu Mahjongden (Japan)", GAME_NOT_WORKING )
|
||||
GAME( 1994, mirage, 0, mirage, mirage, mirage, ROT0, "Mitchell", "Mirage Youjuu Mahjongden (Japan)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
|
||||
|
Loading…
Reference in New Issue
Block a user