m62: shrink io memory maps

This commit is contained in:
hap 2022-01-31 14:53:44 +01:00
parent 5889120e02
commit c878e8ef5f
7 changed files with 38 additions and 146 deletions

View File

@ -15606,7 +15606,7 @@ GAME( 1982, tenspot, 0, tenspot, tenspot, tenspot_state, init_
// Separate tile/sprite ROMs, plus INT instead of NMI
GAME( 1982, devilfshg, devilfsh, devilfshg, devilfshg, galaxian_state, init_devilfshg, ROT270, "Artic", "Devil Fish (Galaxian hardware)", MACHINE_SUPPORTS_SAVE )
GAME( 1984, devilfshgb, devilfsh, devilfshg, devilfshg, galaxian_state, init_galaxian, ROT270, "bootleg (Vision)", "Devil Fish (Galaxian hardware, bootleg)", MACHINE_SUPPORTS_SAVE )
GAME( 1984, devilfshgb, devilfsh, devilfshg, devilfshg, galaxian_state, init_galaxian, ROT270, "bootleg (Vision)", "Devil Fish (Galaxian hardware, bootleg)", MACHINE_SUPPORTS_SAVE ) // unencrypted
// Sound hardware replaced with AY8910
// We're missing the original set by Taito do Brasil, we only have the bootlegs

View File

@ -137,7 +137,6 @@ The MCUs used were not imported from Sharp, but cloned by USSR, renamed to
#include "emu.h"
#include "includes/hh_sm510.h"
#include "cpu/sm510/sm500.h"
#include "screen.h"
#include "speaker.h"

View File

@ -213,12 +213,7 @@ void m62_state::battroad_map(address_map &map)
void m62_state::battroad_io_map(address_map &map)
{
map.global_mask(0xff);
map(0x00, 0x00).portr("SYSTEM").w(m_audio, FUNC(irem_audio_device::cmd_w));
map(0x01, 0x01).portr("P1").w(FUNC(m62_state::m62_flipscreen_w)); /* + coin counters */
map(0x02, 0x02).portr("P2");
map(0x03, 0x03).portr("DSW1");
map(0x04, 0x04).portr("DSW2");
kungfum_io_map(map);
map(0x80, 0x80).w(FUNC(m62_state::m62_vscroll_low_w));
map(0x81, 0x81).w(FUNC(m62_state::m62_hscroll_high_w));
map(0x82, 0x82).w(FUNC(m62_state::m62_hscroll_low_w));
@ -244,12 +239,7 @@ void m62_state::ldrun2_map(address_map &map)
void m62_state::ldrun2_io_map(address_map &map)
{
map.global_mask(0xff);
map(0x00, 0x00).portr("SYSTEM").w(m_audio, FUNC(irem_audio_device::cmd_w));
map(0x01, 0x01).portr("P1").w(FUNC(m62_state::m62_flipscreen_w)); /* + coin counters */
map(0x02, 0x02).portr("P2");
map(0x03, 0x03).portr("DSW1");
map(0x04, 0x04).portr("DSW2");
kungfum_io_map(map);
map(0x80, 0x80).r(FUNC(m62_state::ldrun2_bankswitch_r));
map(0x80, 0x81).w(FUNC(m62_state::ldrun2_bankswitch_w));
}
@ -267,12 +257,7 @@ void m62_state::ldrun3_map(address_map &map)
void m62_state::ldrun3_io_map(address_map &map)
{
map.global_mask(0xff);
map(0x00, 0x00).portr("SYSTEM").w(m_audio, FUNC(irem_audio_device::cmd_w));
map(0x01, 0x01).portr("P1").w(FUNC(m62_state::m62_flipscreen_w)); /* + coin counters */
map(0x02, 0x02).portr("P2");
map(0x03, 0x03).portr("DSW1");
map(0x04, 0x04).portr("DSW2");
kungfum_io_map(map);
map(0x80, 0x80).w(FUNC(m62_state::m62_vscroll_low_w));
map(0x81, 0x81).w(FUNC(m62_state::ldrun3_topbottom_mask_w));
}
@ -289,12 +274,7 @@ void m62_state::ldrun4_map(address_map &map)
void m62_state::ldrun4_io_map(address_map &map)
{
map.global_mask(0xff);
map(0x00, 0x00).portr("SYSTEM").w(m_audio, FUNC(irem_audio_device::cmd_w));
map(0x01, 0x01).portr("P1").w(FUNC(m62_state::m62_flipscreen_w)); /* + coin counters */
map(0x02, 0x02).portr("P2");
map(0x03, 0x03).portr("DSW1");
map(0x04, 0x04).portr("DSW2");
kungfum_io_map(map);
map(0x82, 0x82).w(FUNC(m62_state::m62_hscroll_high_w));
map(0x83, 0x83).w(FUNC(m62_state::m62_hscroll_low_w));
}
@ -320,12 +300,7 @@ void m62_state::kidniki_map(address_map &map)
void m62_state::kidniki_io_map(address_map &map)
{
map.global_mask(0xff);
map(0x00, 0x00).portr("SYSTEM").w(m_audio, FUNC(irem_audio_device::cmd_w));
map(0x01, 0x01).portr("P1").w(FUNC(m62_state::m62_flipscreen_w)); /* + coin counters */
map(0x02, 0x02).portr("P2");
map(0x03, 0x03).portr("DSW1");
map(0x04, 0x04).portr("DSW2");
kungfum_io_map(map);
map(0x80, 0x80).w(FUNC(m62_state::m62_hscroll_low_w));
map(0x81, 0x81).w(FUNC(m62_state::m62_hscroll_high_w));
map(0x82, 0x82).w(FUNC(m62_state::kidniki_text_vscroll_low_w));
@ -377,12 +352,7 @@ void m62_state::youjyudn_map(address_map &map)
void m62_state::youjyudn_io_map(address_map &map)
{
map.global_mask(0xff);
map(0x00, 0x00).portr("SYSTEM").w(m_audio, FUNC(irem_audio_device::cmd_w));
map(0x01, 0x01).portr("P1").w(FUNC(m62_state::m62_flipscreen_w)); /* + coin counters */
map(0x02, 0x02).portr("P2");
map(0x03, 0x03).portr("DSW1");
map(0x04, 0x04).portr("DSW2");
kungfum_io_map(map);
map(0x80, 0x80).w(FUNC(m62_state::m62_hscroll_high_w));
map(0x81, 0x81).w(FUNC(m62_state::m62_hscroll_low_w));
map(0x83, 0x83).w(FUNC(m62_state::youjyudn_bankswitch_w));
@ -398,7 +368,7 @@ void m62_state::horizon_map(address_map &map)
}
static INPUT_PORTS_START( common )
INPUT_PORTS_START( m62_common )
PORT_START("SYSTEM")
/* Start 1 & 2 also restarts and freezes the game with stop mode on
and are used in test mode to enter and esc the various tests */
@ -448,8 +418,8 @@ static INPUT_PORTS_START( common )
INPUT_PORTS_END
static INPUT_PORTS_START( kungfum )
PORT_INCLUDE( common )
INPUT_PORTS_START( kungfum )
PORT_INCLUDE( m62_common )
PORT_MODIFY("DSW2")
/* In slowmo mode, press 2 to slow game speed */
@ -483,7 +453,7 @@ static INPUT_PORTS_START( kungfum )
INPUT_PORTS_END
static INPUT_PORTS_START( battroad )
PORT_INCLUDE( common )
PORT_INCLUDE( m62_common )
PORT_MODIFY("DSW2")
PORT_DIPUNKNOWN_DIPLOC( 0x08, 0x08, "SW2:4" )
@ -509,7 +479,7 @@ static INPUT_PORTS_START( battroad )
INPUT_PORTS_END
static INPUT_PORTS_START( ldrun )
PORT_INCLUDE( common )
PORT_INCLUDE( m62_common )
PORT_MODIFY("DSW2")
PORT_DIPUNKNOWN_DIPLOC( 0x08, 0x08, "SW2:4" )
@ -537,7 +507,7 @@ static INPUT_PORTS_START( ldrun )
INPUT_PORTS_END
static INPUT_PORTS_START( ldrun2 )
PORT_INCLUDE( common )
PORT_INCLUDE( m62_common )
PORT_MODIFY("DSW2")
PORT_DIPUNKNOWN_DIPLOC( 0x08, 0x08, "SW2:4" )
@ -566,7 +536,7 @@ static INPUT_PORTS_START( ldrun2 )
INPUT_PORTS_END
static INPUT_PORTS_START( ldrun3 )
PORT_INCLUDE( common )
PORT_INCLUDE( m62_common )
PORT_MODIFY("DSW2")
PORT_DIPUNKNOWN_DIPLOC( 0x08, 0x08, "SW2:4" )
@ -595,7 +565,7 @@ static INPUT_PORTS_START( ldrun3 )
INPUT_PORTS_END
static INPUT_PORTS_START( ldrun4 )
PORT_INCLUDE( common )
PORT_INCLUDE( m62_common )
PORT_MODIFY("DSW2")
PORT_DIPNAME( 0x02, 0x02, "2 Players Lives" ) PORT_DIPLOCATION("SW2:2")
@ -629,7 +599,7 @@ static INPUT_PORTS_START( ldrun4 )
INPUT_PORTS_END
static INPUT_PORTS_START( lotlot )
PORT_INCLUDE( common )
PORT_INCLUDE( m62_common )
PORT_MODIFY("DSW2")
PORT_DIPNAME( 0x08, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW2:4")
@ -656,7 +626,7 @@ static INPUT_PORTS_START( lotlot )
INPUT_PORTS_END
static INPUT_PORTS_START( kidniki )
PORT_INCLUDE( common )
PORT_INCLUDE( m62_common )
PORT_MODIFY("DSW2")
PORT_DIPNAME( 0x08, 0x08, "Game Repeats" ) PORT_DIPLOCATION("SW2:4")
@ -686,7 +656,7 @@ static INPUT_PORTS_START( kidniki )
INPUT_PORTS_END
static INPUT_PORTS_START( spelunkr )
PORT_INCLUDE( common )
PORT_INCLUDE( m62_common )
PORT_MODIFY("DSW2")
PORT_DIPNAME( 0x08, 0x00, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("SW2:4")
@ -716,7 +686,7 @@ static INPUT_PORTS_START( spelunkr )
INPUT_PORTS_END
static INPUT_PORTS_START( spelunk2 )
PORT_INCLUDE( common )
PORT_INCLUDE( m62_common )
/* Factory shipment setting is all OFF */
PORT_MODIFY("DSW2")
@ -746,7 +716,7 @@ static INPUT_PORTS_START( spelunk2 )
INPUT_PORTS_END
static INPUT_PORTS_START( youjyudn )
PORT_INCLUDE( common )
PORT_INCLUDE( m62_common )
PORT_MODIFY("DSW2")
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW2:4")
@ -772,7 +742,7 @@ static INPUT_PORTS_START( youjyudn )
INPUT_PORTS_END
static INPUT_PORTS_START( horizon )
PORT_INCLUDE( common )
PORT_INCLUDE( m62_common )
PORT_MODIFY("DSW2")
/* In freeze mode, press 2 to stop and 1 to restart */

View File

@ -2,7 +2,10 @@
// copyright-holders:Jonas Jago
/*******************************************************************************
Beyond Kung-Fu - Irem M62-based unreleased Kung-Fu Master sequel
Beyond Kung-Fu
Irem M62-based unreleased Kung-Fu Master sequel
video reference: https://www.youtube.com/watch?v=Efr9EQkbCSQ
TODO:
- finish background gfx emulation, supposedly via an (undumped) MCU
@ -195,93 +198,15 @@ void m62_bkungfu_state::mem_map(address_map& map)
void m62_bkungfu_state::io_map(address_map &map)
{
map.global_mask(0xff);
map(0x00, 0x00).portr("SYSTEM").w(m_audio, FUNC(irem_audio_device::cmd_w));
map(0x01, 0x01).portr("P1").w(FUNC(m62_bkungfu_state::m62_flipscreen_w)); /* + coin counters */
map(0x02, 0x02).portr("P2");
map(0x03, 0x03).portr("DSW1");
map(0x04, 0x04).portr("DSW2");
map(0x81, 0x81).w(FUNC(m62_bkungfu_state::m62_hscroll_high_w));
kungfum_io_map(map);
map(0x80, 0x80).w(FUNC(m62_bkungfu_state::m62_hscroll_low_w));
map(0x81, 0x81).w(FUNC(m62_bkungfu_state::m62_hscroll_high_w));
map(0x83, 0x83).w(FUNC(m62_bkungfu_state::kidniki_background_bank_w));
//map(0x84, 0x84).nopw();
}
/*******************************************************************************
Input Ports
*******************************************************************************/
static INPUT_PORTS_START( bkungfu )
PORT_START("SYSTEM")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_IMPULSE(19)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("P1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_START("P2")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL
PORT_START("DSW2")
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW2:1")
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x02, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW2:2")
PORT_DIPSETTING( 0x00, DEF_STR( Upright ) )
PORT_DIPSETTING( 0x02, DEF_STR( Cocktail ) )
PORT_DIPNAME( 0x04, 0x04, "Coin Mode" ) PORT_DIPLOCATION("SW2:3")
PORT_DIPSETTING( 0x04, "Mode 1" )
PORT_DIPSETTING( 0x00, "Mode 2" )
PORT_DIPNAME( 0x08, 0x08, "Slow Motion Mode (Cheat)" ) PORT_DIPLOCATION("SW2:4")
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x10, 0x10, "Freeze (Cheat)" ) PORT_DIPLOCATION("SW2:5")
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x20, 0x20, "Level Selection Mode (Cheat)" ) PORT_DIPLOCATION("SW2:6")
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x40, 0x40, "Invulnerability (Cheat)" ) PORT_DIPLOCATION("SW2:7")
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_SERVICE_DIPLOC( 0x80, IP_ACTIVE_LOW, "SW2:8" )
PORT_START("DSW1")
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW1:1")
PORT_DIPSETTING( 0x01, DEF_STR( Easy ) )
PORT_DIPSETTING( 0x00, DEF_STR( Hard ) )
PORT_DIPNAME( 0x02, 0x02, "Energy Loss" ) PORT_DIPLOCATION("SW1:2")
PORT_DIPSETTING( 0x02, "Slow" )
PORT_DIPSETTING( 0x00, "Fast" )
PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW1:3,4")
PORT_DIPSETTING( 0x08, "2" )
PORT_DIPSETTING( 0x0c, "3" )
PORT_DIPSETTING( 0x04, "4" )
PORT_DIPSETTING( 0x00, "5" )
IREM_Z80_COINAGE_TYPE_3_LOC(SW1)
INPUT_PORTS_END
/*******************************************************************************
Machine Configs
*******************************************************************************/
@ -362,4 +287,4 @@ ROM_END
*******************************************************************************/
// YEAR NAME PARENT MACHINE INPUT CLASS INIT ROT COMPANY FULLNAME FLAGS
GAME( 1987, bkungfu, 0, bkungfu, bkungfu, m62_bkungfu_state, empty_init, ROT0, "Irem", "Beyond Kung-Fu (location test)", MACHINE_NOT_WORKING | MACHINE_UNEMULATED_PROTECTION | MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS )
GAME( 1987, bkungfu, 0, bkungfu, kungfum, m62_bkungfu_state, empty_init, ROT0, "Irem", "Beyond Kung-Fu (location test)", MACHINE_NOT_WORKING | MACHINE_UNEMULATED_PROTECTION | MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS )

View File

@ -32,7 +32,6 @@
#include "emu.h"
#include "includes/hh_sm510.h"
#include "cpu/sm510/sm510.h"
#include "machine/timer.h"
#include "screen.h"
#include "speaker.h"
@ -63,9 +62,9 @@ private:
output_finder<> m_led_out;
required_device<timer_device> m_led_off;
int m_led_pin;
int m_sctrl;
int m_sclock;
int m_led_pin = 0;
int m_sctrl = 0;
int m_sclock = 0;
TIMER_DEVICE_CALLBACK_MEMBER(led_off_callback) { m_led_out = m_led_pin ? 1 : 0; }
DECLARE_WRITE_LINE_MEMBER(led_w);
@ -93,11 +92,6 @@ void rzone_state::machine_start()
// resolve handlers
m_led_out.resolve();
// zerofill
m_led_pin = 0;
m_sctrl = 0;
m_sclock = 0;
// register for savestates
save_item(NAME(m_led_pin));
save_item(NAME(m_sctrl));

View File

@ -4,7 +4,7 @@
Scramble hardware
NOTE: Eventually to be merged into GALAXIAN.C
NOTE: Eventually to be merged into GALAXIAN.CPP
Interesting tidbit:
@ -2064,7 +2064,7 @@ GAME( 1981, 800fatha, mariner, mariner, 800fath, scramble_state, init_mariner
GAME( 1981, mars, 0, mars, mars, scramble_state, init_mars, ROT90, "Artic", "Mars", MACHINE_SUPPORTS_SAVE )
GAME( 1984, marsarf, mars, mars, mars, scramble_state, empty_init, ROT90, "bootleg (Arfyc)", "Mars (bootleg)", MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE ) // unencrypted, very similar to the original. Bad sound ROM
GAME( 1982, devilfsh, 0, devilfsh, devilfsh, scramble_state, init_devilfsh, ROT90, "Artic", "Devil Fish", MACHINE_SUPPORTS_SAVE )
GAME( 1982, devilfsh, 0, devilfsh, devilfsh, scramble_state, init_devilfsh, ROT90, "Artic", "Devil Fish (Scramble hardware)", MACHINE_SUPPORTS_SAVE )
GAME( 1983, newsin7, 0, newsin7, newsin7, scramble_state, init_mars, ROT90, "ATW USA, Inc.", "New Sinbad 7 (set 1)", MACHINE_SUPPORTS_SAVE )
GAME( 1982, newsin7a, newsin7, newsin7, newsin7, scramble_state, init_newsin7a, ROT90, "ATW USA, Inc", "New Sinbad 7 (set 2)", MACHINE_SUPPORTS_SAVE )

View File

@ -67,6 +67,8 @@ protected:
void m62_start(tilemap_get_info_delegate tile_get_info, int rows, int cols, int x1, int y1, int x2, int y2);
void kungfum_io_map(address_map &map);
private:
/* memory pointers */
required_shared_ptr<uint8_t> m_spriteram;
@ -174,7 +176,6 @@ private:
void horizon_map(address_map &map);
void kidniki_io_map(address_map &map);
void kidniki_map(address_map &map);
void kungfum_io_map(address_map &map);
void kungfum_map(address_map &map);
void ldrun2_io_map(address_map &map);
void ldrun2_map(address_map &map);
@ -190,4 +191,7 @@ private:
void youjyudn_map(address_map &map);
};
INPUT_PORTS_EXTERN( m62_common );
INPUT_PORTS_EXTERN( kungfum );
#endif // MAME_INCLUDES_M62_H