summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorGravatarGravatar MetalliC <0vetal0@gmail.com>2016-08-01 22:19:06 +0300
committerGravatarGravatar MetalliC <0vetal0@gmail.com>2016-08-01 22:19:06 +0300
commite50cabe1ffae8cda9be5e9328f97514c5f06d79b (patch)
treeced6fe932ed81503c0d0db3d4ddbbb334c46b667
parent203e6dc8293414dc1839eec7a48d875f6fc902a3 (diff)
naomi: get rid of hacky rom_region, use rom_parameter instead
-rw-r--r--src/mame/drivers/naomi.cpp50
-rw-r--r--src/mame/includes/naomi.h7
-rw-r--r--src/mame/machine/naomi.cpp35
-rw-r--r--src/mame/machine/naomibd.cpp4
-rw-r--r--src/mame/machine/naomibd.h7
-rw-r--r--src/mame/machine/naomigd.h2
-rw-r--r--src/mame/machine/naomim1.cpp17
-rw-r--r--src/mame/machine/naomim1.h5
-rw-r--r--src/mame/machine/naomim2.h4
-rw-r--r--src/mame/machine/naomim4.cpp27
-rw-r--r--src/mame/machine/naomim4.h5
-rw-r--r--src/mame/machine/naomirom.h4
12 files changed, 61 insertions, 106 deletions
diff --git a/src/mame/drivers/naomi.cpp b/src/mame/drivers/naomi.cpp
index 770f1c72c4f..3fea358ae7e 100644
--- a/src/mame/drivers/naomi.cpp
+++ b/src/mame/drivers/naomi.cpp
@@ -2688,7 +2688,7 @@ MACHINE_CONFIG_END
*/
static MACHINE_CONFIG_DERIVED( naomi, naomi_base )
- MCFG_NAOMI_ROM_BOARD_ADD("rom_board", "naomibd_eeprom", "boardid", WRITE8(dc_state, g1_irq))
+ MCFG_NAOMI_ROM_BOARD_ADD("rom_board", "naomibd_eeprom", WRITE8(dc_state, g1_irq))
MACHINE_CONFIG_END
/*
@@ -2704,7 +2704,7 @@ MACHINE_CONFIG_END
*/
static MACHINE_CONFIG_DERIVED( naomim1, naomi_base )
- MCFG_NAOMI_M1_BOARD_ADD("rom_board", "naomibd_eeprom", "boardid", WRITE8(dc_state, g1_irq))
+ MCFG_NAOMI_M1_BOARD_ADD("rom_board", "naomibd_eeprom", WRITE8(dc_state, g1_irq))
MACHINE_CONFIG_END
/*
@@ -2712,7 +2712,7 @@ MACHINE_CONFIG_END
*/
static MACHINE_CONFIG_DERIVED( naomim2, naomi_base )
- MCFG_NAOMI_M2_BOARD_ADD("rom_board", "naomibd_eeprom", "boardid", WRITE8(dc_state, g1_irq))
+ MCFG_NAOMI_M2_BOARD_ADD("rom_board", "naomibd_eeprom", WRITE8(dc_state, g1_irq))
MACHINE_CONFIG_END
/*
@@ -2720,7 +2720,7 @@ MACHINE_CONFIG_END
*/
static MACHINE_CONFIG_DERIVED( naomim4, naomi_base )
- MCFG_NAOMI_M4_BOARD_ADD("rom_board", "pic_readout", "naomibd_eeprom", "boardid", WRITE8(dc_state, g1_irq))
+ MCFG_NAOMI_M4_BOARD_ADD("rom_board", "pic_readout", "naomibd_eeprom", WRITE8(dc_state, g1_irq))
MACHINE_CONFIG_END
/*
@@ -5880,7 +5880,7 @@ ROM_START( mushi2eo )
ROM_REGION( 0x800, "pic_readout", 0 )
ROM_LOAD( "317-0437-com.ic3", 0, 0x800, BAD_DUMP CRC(b6e4f61a) SHA1(b5cae574170afa3889e01517f1c4429e207042b9) )
- ROM_REGION(0x4, "boardid", ROMREGION_ERASEVAL(0x02))
+ ROM_PARAMETER( ":rom_board:id", "5502" )
ROM_END
ROM_START( mushik2e )
@@ -5895,7 +5895,7 @@ ROM_START( mushik2e )
ROM_REGION( 0x800, "pic_readout", 0 )
ROM_LOAD( "317-0437-com.ic3", 0, 0x800, BAD_DUMP CRC(b6e4f61a) SHA1(b5cae574170afa3889e01517f1c4429e207042b9) )
- ROM_REGION(0x4, "boardid", ROMREGION_ERASEVAL(0x82))
+ ROM_PARAMETER( ":rom_board:id", "5582" )
ROM_END
ROM_START( zunou )
@@ -5909,7 +5909,7 @@ ROM_START( zunou )
ROM_REGION( 0x800, "pic_readout", 0 )
ROM_LOAD( "317-0435-jpn.ic3", 0, 0x800, BAD_DUMP CRC(b553d900) SHA1(ed1c3c2053f2c0e98cb5c4d99f93143a66c29e5c) )
- ROM_REGION(0x4, "boardid", ROMREGION_ERASEVAL(0x02))
+ ROM_PARAMETER( ":rom_board:id", "5502" )
ROM_END
ROM_START( sl2007 )
@@ -5925,7 +5925,7 @@ ROM_START( sl2007 )
ROM_REGION( 0x800, "pic_readout", 0 )
ROM_LOAD( "317-5129-jpn.ic3", 0, 0x800, CRC(432ba30f) SHA1(4935a16d1075430799269ac7ac990066d44d815b) )
- ROM_REGION(0x4, "boardid", ROMREGION_ERASEVAL(0x04))
+ ROM_PARAMETER( ":rom_board:id", "5504" )
ROM_END
ROM_START( asndynmt )
@@ -5941,7 +5941,7 @@ ROM_START( asndynmt )
ROM_REGION( 0x800, "pic_readout", 0 )
ROM_LOAD( "317-0495-com.ic3", 0, 0x800, CRC(c229a59b) SHA1(497dcc1e4e52eb044a8b709edbd00126cef212b1) )
- ROM_REGION(0x4, "boardid", ROMREGION_ERASEVAL(0x04))
+ ROM_PARAMETER( ":rom_board:id", "5504" )
ROM_END
ROM_START( illvelo )
@@ -5957,7 +5957,7 @@ ROM_START( illvelo )
ROM_REGION( 0x800, "pic_readout", 0 )
ROM_LOAD( "317-5131-jpn.ic3", 0, 0x800, CRC(af4b38f2) SHA1(9b82f16a258854d7d618d60f9a610f7d47d67a78) )
- ROM_REGION(0x4, "boardid", ROMREGION_ERASEVAL(0x04))
+ ROM_PARAMETER( ":rom_board:id", "5504" )
ROM_END
ROM_START( mamonoro )
@@ -5973,7 +5973,7 @@ ROM_START( mamonoro )
ROM_REGION( 0x800, "pic_readout", 0 )
ROM_LOAD( "317-5132-jpn.ic3", 0, 0x800, CRC(d56e70a1) SHA1(fda1a2989f0fa3b0edeb292cdd4537d9b86af6f2) )
- ROM_REGION(0x4, "boardid", ROMREGION_ERASEVAL(0x04))
+ ROM_PARAMETER( ":rom_board:id", "5504" )
ROM_END
ROM_START( mbaao )
@@ -5991,7 +5991,7 @@ ROM_START( mbaao )
ROM_REGION( 0x800, "pic_readout", 0 )
ROM_LOAD( "317-5133-jpn.ic3", 0, 0x800, CRC(0f16d180) SHA1(9d4ae15aa54752cdbd8e279388b7f3ae20777172) )
- ROM_REGION(0x4, "boardid", ROMREGION_ERASEVAL(0x06))
+ ROM_PARAMETER( ":rom_board:id", "5506" )
ROM_END
ROM_START( mbaa )
@@ -6010,7 +6010,7 @@ ROM_START( mbaa )
ROM_REGION( 0x800, "pic_readout", 0 )
ROM_LOAD( "317-5133-jpn.ic3", 0, 0x800, CRC(0f16d180) SHA1(9d4ae15aa54752cdbd8e279388b7f3ae20777172) )
- ROM_REGION(0x4, "boardid", ROMREGION_ERASEVAL(0x86))
+ ROM_PARAMETER( ":rom_board:id", "5586" )
ROM_END
ROM_START( radirgyn )
@@ -6025,7 +6025,7 @@ ROM_START( radirgyn )
ROM_REGION( 0x800, "pic_readout", 0 )
ROM_LOAD( "317-5138-jpn.ic3", 0, 0x800, CRC(93b7a03d) SHA1(7af7c8d436f61e57b9d5957431c6fc745442f74f) )
- ROM_REGION(0x4, "boardid", ROMREGION_ERASEVAL(0x04))
+ ROM_PARAMETER( ":rom_board:id", "5504" )
ROM_END
ROM_START( ausfache )
@@ -6040,7 +6040,7 @@ ROM_START( ausfache )
ROM_REGION( 0x800, "pic_readout", 0 )
ROM_LOAD( "317-05130-jpn.ic3", 0, 0x800, CRC(eccdcd59) SHA1(9f374e0b37f18591c92c38c83c9310f2db0abf9c) )
- ROM_REGION(0x4, "boardid", ROMREGION_ERASEVAL(0x04))
+ ROM_PARAMETER( ":rom_board:id", "5504" )
ROM_END
ROM_START( manicpnc )
@@ -6060,7 +6060,7 @@ ROM_START( manicpnc )
ROM_REGION( 0x800, "pic_readout", 0 )
ROM_LOAD( "317-0461-com.ic3", 0, 0x800, BAD_DUMP CRC(c9282cdd) SHA1(23933e489d763515428e2714cc6e7676df1d5323) )
- ROM_REGION(0x4, "boardid", ROMREGION_ERASEVAL(0x05))
+ ROM_PARAMETER( ":rom_board:id", "5505" )
ROM_END
ROM_START( pokasuka )
@@ -6080,7 +6080,7 @@ ROM_START( pokasuka )
ROM_REGION( 0x800, "pic_readout", 0 )
ROM_LOAD( "317-0461-com.ic3", 0, 0x800, BAD_DUMP CRC(c9282cdd) SHA1(23933e489d763515428e2714cc6e7676df1d5323) )
- ROM_REGION(0x4, "boardid", ROMREGION_ERASEVAL(0x05))
+ ROM_PARAMETER( ":rom_board:id", "5505" )
ROM_END
ROM_START( rhytngk )
@@ -6096,7 +6096,7 @@ ROM_START( rhytngk )
ROM_REGION( 0x800, "pic_readout", 0 )
ROM_LOAD( "317-0503-jpn.ic3", 0, 0x800, CRC(6eb0976b) SHA1(d5d0fc09a0c0e3a8f2703c450f05f5082317fbe4) )
- ROM_REGION(0x4, "boardid", ROMREGION_ERASEVAL(0x04))
+ ROM_PARAMETER( ":rom_board:id", "5504" )
ROM_END
// this is satellite unit of the main game, server/control and lagre screen units required and need to be dumped
@@ -6111,7 +6111,7 @@ ROM_START( starhrpr )
// PIC not populated
ROM_REGION( 0x800, "pic_readout", ROMREGION_ERASE00 )
- ROM_REGION(0x4, "boardid", ROMREGION_ERASEVAL(0x02))
+ ROM_PARAMETER( ":rom_board:id", "5502" )
ROM_END
/*
@@ -9594,12 +9594,12 @@ ROM_END
/* 0026 */ GAME( 2000, totd, naomi, naomim2, naomi, naomi_state, naomi, ROT0, "Sega", "The Typing of the Dead (Rev A)", GAME_FLAGS )
/* 0027 */ GAME( 2000, smarinef, naomi, naomim2, naomi, naomi_state, naomi, ROT0, "Sega", "Sega Marine Fishing", GAME_FLAGS )
/* 0028 */ GAME( 2000, vonot, naomi, naomim2, naomi, naomi_state, naomi, ROT0, "Sega", "Virtual On Oratorio Tangram M.S.B.S. ver5.66 2000 Edition", GAME_FLAGS )
-/* 0030 */ GAME( 2000, qmegamis, naomi, naomim1, naomi, naomi_state, qmegamis,ROT0, "Sega", "Quiz Ah Megamisama", GAME_FLAGS )
+/* 0030 */ GAME( 2000, qmegamis, naomi, naomim1, naomi, naomi_state, naomi, ROT0, "Sega", "Quiz Ah Megamisama", GAME_FLAGS )
/* 0035 */ GAME( 2000, sstrkfgt, naomi, naomim2, sstrkfgt,naomi_state, naomi, ROT0, "Sega", "Sega Strike Fighter (Rev A, set 1)", GAME_FLAGS )
/* 0035 */ GAME( 2000, sstrkfgta,sstrkfgt, naomim2, sstrkfgt,naomi_state, naomi, ROT0, "Sega", "Sega Strike Fighter (Rev A, set 2)", GAME_FLAGS )
/* 0036 */ GAME( 2000, 18wheels, 18wheelr, naomim2, 18wheelr,naomi_state, naomi, ROT0, "Sega", "18 Wheeler (standard)", GAME_FLAGS )
/* 0037 */ GAME( 2000, 18wheelu, 18wheelr, naomim2, 18wheelr,naomi_state, naomi, ROT0, "Sega", "18 Wheeler (upright)", GAME_FLAGS )
-/* 0039 */ GAME( 2000, gram2000, naomi, naomim1, naomi, naomi_state, gram2000,ROT0, "Sega", "Giant Gram 2000", GAME_FLAGS )
+/* 0039 */ GAME( 2000, gram2000, naomi, naomim1, naomi, naomi_state, naomi, ROT0, "Sega", "Giant Gram 2000", GAME_FLAGS )
/* 0040 */ GAME( 2000, wwfroyal, naomi, naomim2, naomi, naomi_state, naomi, ROT0, "Sega", "WWF Royal Rumble", GAME_FLAGS )
/* 0041 */ GAME( 2000, slasho, naomi, naomim2, naomi, naomi_state, naomi, ROT0, "Sega", "Slashout", GAME_FLAGS )
// 0042 Ferrari F355 Challenge 2 (twin) - identical to 834-????? listed above.
@@ -9629,7 +9629,7 @@ ROM_END
/* 0128 */ GAME( 2003, shootpl, naomi, naomim1, naomi, naomi_state, naomi, ROT0, "Sega", "Shootout Pool The Medal / Shootout Pool Prize (Rev A)", GAME_FLAGS )
/* 0130 */ GAME( 2002, hopper, naomi, naomi, naomi, naomi_state, naomi, ROT0, "Sega", "SWP Hopper Board", GAME_FLAGS )
/* 0136 */ GAME( 2004, shootplm, naomi, naomim1, naomi, naomi_state, naomi, ROT0, "Sega", "Shootout Pool The Medal Ver. B / Shootout Pool Prize Ver. B", GAME_FLAGS )
-/* 0140 */ GAME( 2004, kick4csh, naomi, naomim1, naomi, naomi_state, kick4csh,ROT0, "Sega", "Kick '4' Cash", GAME_FLAGS )
+/* 0140 */ GAME( 2004, kick4csh, naomi, naomim1, naomi, naomi_state, naomi, ROT0, "Sega", "Kick '4' Cash", GAME_FLAGS )
/* 0150 */ GAME( 2003, mtkob2, naomi, naomim1, naomi, naomi_state, naomi, ROT0, "Sega", "Mushiking The King Of Beetle 2K3 2nd", GAME_FLAGS )
/* 0158 */ GAME( 2005, mushi2k5, naomi, naomim2, naomi, naomi_state, naomi, ROT0, "Sega", "Mushiking The King Of Beetle 2K5 1st", GAME_FLAGS )
/* 0164 */ GAME( 2005, mushi2eo, mushik2e, naomim4, naomi, naomi_state, naomi, ROT0, "Sega", "MushiKing II - The King Of Beetle II ENG (Ver. 1.001)", GAME_FLAGS )
@@ -9655,7 +9655,7 @@ GAME( 2003, puyofevp, naomi, naomim1, naomi, naomi_state, naomi, ROT0, "Sega", "
/* 0080 */ GAME( 2002, vf4cart, naomi2, naomi2m2, naomi, naomi_state, naomi2, ROT0, "Sega", "Virtua Fighter 4 (Cartridge)", GAME_FLAGS )
/* 0087 */ GAME( 2002, kingrt66, naomi2, naomi2m2, naomi, naomi_state, naomi2, ROT0, "Sega", "The King of Route 66 (Rev A)", GAME_FLAGS )
/* 0095 */ GAME( 2002, soulsurf, naomi2, naomi2m2, naomi, naomi_state, naomi2, ROT0, "Sega", "Soul Surfer (Rev A)", GAME_FLAGS )
-/* 0106 */ GAME( 2002, vf4evoct, naomi2, naomi2m1, naomi, naomi_state, vf4evoct, ROT0, "Sega", "Virtua Fighter 4 Evolution (Cartridge)", GAME_FLAGS )
+/* 0106 */ GAME( 2002, vf4evoct, naomi2, naomi2m1, naomi, naomi_state, naomi2, ROT0, "Sega", "Virtua Fighter 4 Evolution (Cartridge)", GAME_FLAGS )
/* 0129 */ GAME( 2003, clubkprz, naomi2, naomi2m1, naomi, naomi_state, naomi2, ROT0, "Sega", "Club Kart Prize", GAME_FLAGS )
/* Note: the game's full name is exactly "Club Kart Prize Ver. B". The "Ver. B" does not denote a new revision of Club Kart Prize; the different 840- number confirms this. */
/* 0137 */ GAME( 2004, clubkpzb, naomi2, naomi2m1, naomi, naomi_state, naomi2, ROT0, "Sega", "Club Kart Prize Ver. B", GAME_FLAGS )
@@ -9670,8 +9670,8 @@ GAME( 2003, puyofevp, naomi, naomim1, naomi, naomi_state, naomi, ROT0, "Sega", "
/* 0004 */ GAME( 1999, shangril, naomi, naomim2, naomi_mp,naomi_state,naomi_mp,ROT0, "Marvelous Ent.", "Dengen Tenshi Taisen Janshi Shangri-la (Build 0728)", GAME_FLAGS ) // version taken from service mode
/* 0005 */ GAME( 1999, spawn, naomi, naomim2, naomi, naomi_state, naomi, ROT0, "Todd Mc Farlane / Capcom","Spawn In the Demon's Hand (Rev B)", GAME_FLAGS )
/* 0006 */ GAME( 1999, puyoda, naomi, naomim2, naomi, naomi_state, naomi, ROT0, "Compile", "Puyo Puyo Da!", GAME_FLAGS )
-/* 0007-01 */ GAME(2000, mvsc2u, mvsc2, naomim2, naomi, naomi_state, mvsc2, ROT0, "Capcom / Marvel", "Marvel Vs. Capcom 2 New Age of Heroes (USA) (Rev A)", GAME_FLAGS)
-/* 0007-02 -03 */ GAME(2000, mvsc2, naomi, naomim1, naomi, naomi_state, mvsc2, ROT0, "Capcom / Marvel", "Marvel Vs. Capcom 2 New Age of Heroes (Export, Korea) (Rev A)", GAME_FLAGS)
+/* 0007-01 */ GAME(2000, mvsc2u, mvsc2, naomim2, naomi, naomi_state, naomi, ROT0, "Capcom / Marvel", "Marvel Vs. Capcom 2 New Age of Heroes (USA) (Rev A)", GAME_FLAGS)
+/* 0007-02 -03 */ GAME(2000, mvsc2, naomi, naomim1, naomi, naomi_state, naomi, ROT0, "Capcom / Marvel", "Marvel Vs. Capcom 2 New Age of Heroes (Export, Korea) (Rev A)", GAME_FLAGS)
/* 0008 */ GAME( 2000, pstone2, naomi, naomim2, naomi, naomi_state, naomi, ROT0, "Capcom", "Power Stone 2", GAME_FLAGS )
/* 0011 */ GAME( 2000, capsnk, naomi, naomim2, naomi, naomi_state, naomi, ROT0, "Capcom / SNK", "Capcom Vs. SNK Millennium Fight 2000 (Rev C)", GAME_FLAGS )
/* 0011 */ GAME( 2000, capsnka, capsnk,naomim2, naomi, naomi_state, naomi, ROT0, "Capcom / SNK", "Capcom Vs. SNK Millennium Fight 2000 (Rev A)", GAME_FLAGS )
diff --git a/src/mame/includes/naomi.h b/src/mame/includes/naomi.h
index 74b981da5de..a6e62e00a5d 100644
--- a/src/mame/includes/naomi.h
+++ b/src/mame/includes/naomi.h
@@ -67,12 +67,7 @@ class naomi_state : public dc_state
DECLARE_DRIVER_INIT(naomigd_mp);
DECLARE_DRIVER_INIT(sfz3ugd);
DECLARE_DRIVER_INIT(hotd2);
- DECLARE_DRIVER_INIT(qmegamis);
- DECLARE_DRIVER_INIT(gram2000);
- DECLARE_DRIVER_INIT(kick4csh);
- DECLARE_DRIVER_INIT(vf4evoct);
DECLARE_DRIVER_INIT(naomi_mp);
- DECLARE_DRIVER_INIT(mvsc2);
DECLARE_READ64_MEMBER( naomi_arm_r );
DECLARE_WRITE64_MEMBER( naomi_arm_w );
@@ -91,8 +86,6 @@ class naomi_state : public dc_state
inline int decode_reg32_64(UINT32 offset, UINT64 mem_mask, UINT64 *shift);
- UINT16 actel_id;
-
UINT8 aw_ctrl_type;
UINT8 asciihex_to_dec(UINT8 in);
diff --git a/src/mame/machine/naomi.cpp b/src/mame/machine/naomi.cpp
index d54da60cbfb..b91c3889839 100644
--- a/src/mame/machine/naomi.cpp
+++ b/src/mame/machine/naomi.cpp
@@ -205,7 +205,6 @@ DRIVER_INIT_MEMBER(naomi_state,naomi)
{
//m_maincpu->space(AS_PROGRAM).install_read_handler(0xc2ad238, 0xc2ad23f, read64_delegate(FUNC(naomi_state::naomi_biose_idle_skip_r),this); // rev e bios
m_maincpu->space(AS_PROGRAM).install_read_handler(0xc2b0600, 0xc2b0607, read64_delegate(FUNC(naomi_state::naomi_biosh_idle_skip_r),this)); // rev h bios
- actel_id = 0xffff;
create_pic_from_retdat();
}
@@ -213,7 +212,6 @@ DRIVER_INIT_MEMBER(naomi_state,naomi)
DRIVER_INIT_MEMBER(naomi_state,naomi2)
{
m_maincpu->space(AS_PROGRAM).install_read_handler(0xc2b0600, 0xc2b0607, read64_delegate(FUNC(naomi_state::naomi2_biose_idle_skip_r),this)); // rev e bios
- actel_id = 0xffff;
create_pic_from_retdat();
}
@@ -240,7 +238,6 @@ DRIVER_INIT_MEMBER(naomi_state,naomi_mp)
{
//m_maincpu->space(AS_PROGRAM).install_read_handler(0xc2ad238, 0xc2ad23f, read64_delegate(FUNC(naomi_state::naomi_biose_idle_skip_r),this); // rev e bios
m_maincpu->space(AS_PROGRAM).install_read_handler(0xc2b0600, 0xc2b0607, read64_delegate(FUNC(naomi_state::naomi_biosh_idle_skip_r),this)); // rev h bios
- actel_id = 0xffff;
m_mp_mux = 0;
create_pic_from_retdat();
@@ -250,7 +247,6 @@ DRIVER_INIT_MEMBER(naomi_state,naomigd)
{
m_maincpu->space(AS_PROGRAM).install_read_handler(0xc2ad238, 0xc2ad23f, read64_delegate(FUNC(naomi_state::naomi_biose_idle_skip_r),this)); // rev e bios
//m_maincpu->space(AS_PROGRAM).install_read_handler(0xc2b0600, 0xc2b0607, read64_delegate(FUNC(naomi_state::naomi_biosh_idle_skip_r),this)); // rev h bios
- actel_id = 0xffff;
create_pic_from_retdat();
}
@@ -259,7 +255,6 @@ DRIVER_INIT_MEMBER(naomi_state,naomigd_mp)
{
m_maincpu->space(AS_PROGRAM).install_read_handler(0xc2ad238, 0xc2ad23f, read64_delegate(FUNC(naomi_state::naomi_biose_idle_skip_r),this)); // rev e bios
//m_maincpu->space(AS_PROGRAM).install_read_handler(0xc2b0600, 0xc2b0607, read64_delegate(FUNC(naomi_state::naomi_biosh_idle_skip_r),this)); // rev h bios
- actel_id = 0xffff;
m_mp_mux = 0;
create_pic_from_retdat();
@@ -327,36 +322,6 @@ DRIVER_INIT_MEMBER(naomi_state,sfz3ugd)
}
-DRIVER_INIT_MEMBER(naomi_state,qmegamis)
-{
- DRIVER_INIT_CALL(naomi);
- actel_id = 0; //FIXME: correct value
-}
-
-DRIVER_INIT_MEMBER(naomi_state,mvsc2)
-{
- DRIVER_INIT_CALL(naomi);
- actel_id = 0; //FIXME: correct value
-}
-
-DRIVER_INIT_MEMBER(naomi_state,gram2000)
-{
- DRIVER_INIT_CALL(naomi);
- actel_id = 0; //FIXME: correct value
-}
-
-DRIVER_INIT_MEMBER(naomi_state,vf4evoct)
-{
- DRIVER_INIT_CALL(naomi2);
- actel_id = 0; //FIXME: correct value
-}
-
-DRIVER_INIT_MEMBER(naomi_state,kick4csh)
-{
- DRIVER_INIT_CALL(naomi);
- actel_id = 0; //FIXME: correct value
-}
-
READ64_MEMBER(naomi_state::hotd2_idle_skip_r )
{
// if (space.device().safe_pc()==0xc0cfcbc)
diff --git a/src/mame/machine/naomibd.cpp b/src/mame/machine/naomibd.cpp
index f90c3d35077..d3bba812c7e 100644
--- a/src/mame/machine/naomibd.cpp
+++ b/src/mame/machine/naomibd.cpp
@@ -68,14 +68,12 @@ naomi_board::naomi_board(const machine_config &mconfig, device_type type, const
: naomi_g1_device(mconfig, type, name, tag, owner, clock, shortname, source)
{
eeprom_tag = nullptr;
- rombdid_tag = nullptr;
}
-void naomi_board::static_set_eeprom_tag(device_t &device, const char *_eeprom_tag, const char *_actel_tag)
+void naomi_board::static_set_eeprom_tag(device_t &device, const char *_eeprom_tag)
{
naomi_board &dev = downcast<naomi_board &>(device);
dev.eeprom_tag = _eeprom_tag;
- dev.rombdid_tag = _actel_tag;
}
diff --git a/src/mame/machine/naomibd.h b/src/mame/machine/naomibd.h
index 8f0c07d3c09..a965833d3c2 100644
--- a/src/mame/machine/naomibd.h
+++ b/src/mame/machine/naomibd.h
@@ -6,16 +6,16 @@
#include "machine/naomig1.h"
#include "machine/x76f100.h"
-#define MCFG_NAOMI_BOARD_ADD(_tag, type, _eeprom_tag, _actel_tag, _irq_cb) \
+#define MCFG_NAOMI_BOARD_ADD(_tag, type, _eeprom_tag, _irq_cb) \
MCFG_NAOMI_G1_ADD(_tag, type, _irq_cb) \
- naomi_board::static_set_eeprom_tag(*device, _eeprom_tag, _actel_tag);
+ naomi_board::static_set_eeprom_tag(*device, _eeprom_tag);
class naomi_board : public naomi_g1_device
{
public:
naomi_board(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
- static void static_set_eeprom_tag(device_t &device, const char *_eeprom_tag, const char *_actel_tag);
+ static void static_set_eeprom_tag(device_t &device, const char *_eeprom_tag);
// Can be patched in the underlying class
virtual DECLARE_ADDRESS_MAP(submap, 16);
@@ -49,7 +49,6 @@ protected:
virtual void board_write(offs_t offset, UINT16 data);
UINT32 rom_offset;
- const char *rombdid_tag;
private:
UINT32 dma_offset, dma_cur_offset;
UINT16 dma_count;
diff --git a/src/mame/machine/naomigd.h b/src/mame/machine/naomigd.h
index 4a291bbb119..3590beb827c 100644
--- a/src/mame/machine/naomigd.h
+++ b/src/mame/machine/naomigd.h
@@ -6,7 +6,7 @@
#include "machine/naomibd.h"
#define MCFG_NAOMI_GDROM_BOARD_ADD(_tag, _image_tag, _pic_tag, _eeprom_tag, _irq_cb) \
- MCFG_NAOMI_BOARD_ADD(_tag, NAOMI_GDROM_BOARD, _eeprom_tag, nullptr, _irq_cb) \
+ MCFG_NAOMI_BOARD_ADD(_tag, NAOMI_GDROM_BOARD, _eeprom_tag, _irq_cb) \
naomi_gdrom_board::static_set_tags(*device, _image_tag, _pic_tag);
class naomi_gdrom_board : public naomi_board
diff --git a/src/mame/machine/naomim1.cpp b/src/mame/machine/naomim1.cpp
index a456bc8cdb8..68282faf8d9 100644
--- a/src/mame/machine/naomim1.cpp
+++ b/src/mame/machine/naomim1.cpp
@@ -20,13 +20,7 @@ naomi_m1_board::naomi_m1_board(const machine_config &mconfig, const char *tag, d
READ16_MEMBER(naomi_m1_board::actel_id_r)
{
- if (rombdid_tag && owner()->memregion(rombdid_tag) != nullptr)
- {
- const UINT8 *bdid = owner()->memregion(rombdid_tag)->base();
- return bdid[0] | (bdid[1] << 8);
- }
-
- return 0x0000;
+ return actel_id;
}
void naomi_m1_board::device_start()
@@ -42,6 +36,15 @@ void naomi_m1_board::device_start()
key = 0;
}
+ std::string sid = parameter("id");
+ if (!sid.empty())
+ actel_id = strtoll(sid.c_str(), nullptr, 16);
+ else
+ {
+ logerror("%s: Warning: Actel ID not provided\n", tag());
+ actel_id = 0;
+ }
+
buffer = std::make_unique<UINT8[]>(BUFFER_SIZE);
save_pointer(NAME(buffer.get()), BUFFER_SIZE);
diff --git a/src/mame/machine/naomim1.h b/src/mame/machine/naomim1.h
index 0e1730eee80..126648e378c 100644
--- a/src/mame/machine/naomim1.h
+++ b/src/mame/machine/naomim1.h
@@ -5,8 +5,8 @@
#include "naomibd.h"
-#define MCFG_NAOMI_M1_BOARD_ADD(_tag, _eeprom_tag, _actel_tag, _irq_cb) \
- MCFG_NAOMI_BOARD_ADD(_tag, NAOMI_M1_BOARD, _eeprom_tag, _actel_tag, _irq_cb)
+#define MCFG_NAOMI_M1_BOARD_ADD(_tag, _eeprom_tag, _irq_cb) \
+ MCFG_NAOMI_BOARD_ADD(_tag, NAOMI_M1_BOARD, _eeprom_tag, _irq_cb)
class naomi_m1_board : public naomi_board
{
@@ -28,6 +28,7 @@ protected:
private:
enum { BUFFER_SIZE = 32768 };
UINT32 key;
+ UINT16 actel_id;
std::unique_ptr<UINT8[]> buffer;
UINT8 dict[111], hist[2];
diff --git a/src/mame/machine/naomim2.h b/src/mame/machine/naomim2.h
index 8196e7e4ba7..21ca305be6e 100644
--- a/src/mame/machine/naomim2.h
+++ b/src/mame/machine/naomim2.h
@@ -7,8 +7,8 @@
#include "315-5881_crypt.h"
-#define MCFG_NAOMI_M2_BOARD_ADD(_tag, _eeprom_tag, _actel_tag, _irq_cb) \
- MCFG_NAOMI_BOARD_ADD(_tag, NAOMI_M2_BOARD, _eeprom_tag, _actel_tag, _irq_cb)
+#define MCFG_NAOMI_M2_BOARD_ADD(_tag, _eeprom_tag, _irq_cb) \
+ MCFG_NAOMI_BOARD_ADD(_tag, NAOMI_M2_BOARD, _eeprom_tag, _irq_cb)
class naomi_m2_board : public naomi_board
{
diff --git a/src/mame/machine/naomim4.cpp b/src/mame/machine/naomim4.cpp
index 89d61ce08c3..6f51a964576 100644
--- a/src/mame/machine/naomim4.cpp
+++ b/src/mame/machine/naomim4.cpp
@@ -63,6 +63,15 @@ void naomi_m4_board::device_start()
{
naomi_board::device_start();
+ std::string sid = parameter("id");
+ if (!sid.empty())
+ m4id = strtoll(sid.c_str(), nullptr, 16);
+ else
+ {
+ logerror("%s: Warning: M4 ID not provided\n", tag());
+ m4id = 0x5504;
+ }
+
subkey1 = (m_key_data[0x5e2] << 8) | m_key_data[0x5e0];
subkey2 = (m_key_data[0x5e6] << 8) | m_key_data[0x5e4];
@@ -132,13 +141,7 @@ void naomi_m4_board::board_get_buffer(UINT8 *&base, UINT32 &limit)
static UINT8 retzero[2] = { 0, 0 };
if (cfi_mode) {
- int fpr_num = 0;
-
- if (rombdid_tag && owner()->memregion(rombdid_tag) != nullptr)
- {
- fpr_num = *owner()->memregion(rombdid_tag)->base() & 0x7f;
-
- }
+ int fpr_num = m4id & 0x7f;
if (((rom_cur_address >> 26) & 0x07) < fpr_num) {
base = &cfidata[rom_cur_address & 0xffff];
@@ -215,15 +218,7 @@ void naomi_m4_board::enc_fill()
READ16_MEMBER(naomi_m4_board::m4_id_r)
{
- UINT16 epr_flag = 0;
-
- if (rombdid_tag != nullptr && owner()->memregion(rombdid_tag) != nullptr)
- {
- epr_flag = *owner()->memregion(rombdid_tag)->base() & 0x80;
-
- }
-
- return 0x5500 | epr_flag;
+ return m4id & 0xff80;
}
void naomi_m4_board::board_write(offs_t offset, UINT16 data)
diff --git a/src/mame/machine/naomim4.h b/src/mame/machine/naomim4.h
index 461fa1779a5..0d340b3cab5 100644
--- a/src/mame/machine/naomim4.h
+++ b/src/mame/machine/naomim4.h
@@ -5,8 +5,8 @@
#include "naomibd.h"
-#define MCFG_NAOMI_M4_BOARD_ADD(_tag, _key_tag, _eeprom_tag, _actel_tag, _irq_cb) \
- MCFG_NAOMI_BOARD_ADD(_tag, NAOMI_M4_BOARD, _eeprom_tag, _actel_tag, _irq_cb) \
+#define MCFG_NAOMI_M4_BOARD_ADD(_tag, _key_tag, _eeprom_tag, _irq_cb) \
+ MCFG_NAOMI_BOARD_ADD(_tag, NAOMI_M4_BOARD, _eeprom_tag, _irq_cb) \
naomi_m4_board::static_set_tags(*device, "^" _key_tag);
class naomi_m4_board : public naomi_board
@@ -33,6 +33,7 @@ private:
static const UINT8 k_sboxes[4][16];
+ UINT16 m4id;
required_memory_region m_region;
required_region_ptr<UINT8> m_key_data;
UINT16 subkey1, subkey2;
diff --git a/src/mame/machine/naomirom.h b/src/mame/machine/naomirom.h
index 11f692200db..f1303dcdd82 100644
--- a/src/mame/machine/naomirom.h
+++ b/src/mame/machine/naomirom.h
@@ -5,8 +5,8 @@
#include "naomibd.h"
-#define MCFG_NAOMI_ROM_BOARD_ADD(_tag, _eeprom_tag, _actel_tag, _irq_cb) \
- MCFG_NAOMI_BOARD_ADD(_tag, NAOMI_ROM_BOARD, _eeprom_tag, _actel_tag, _irq_cb)
+#define MCFG_NAOMI_ROM_BOARD_ADD(_tag, _eeprom_tag, _irq_cb) \
+ MCFG_NAOMI_BOARD_ADD(_tag, NAOMI_ROM_BOARD, _eeprom_tag, _irq_cb)
class naomi_rom_board : public naomi_board
{