summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/nbmj8891.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/nbmj8891.cpp')
-rw-r--r--src/mame/drivers/nbmj8891.cpp119
1 files changed, 54 insertions, 65 deletions
diff --git a/src/mame/drivers/nbmj8891.cpp b/src/mame/drivers/nbmj8891.cpp
index f4951b06bff..37474214287 100644
--- a/src/mame/drivers/nbmj8891.cpp
+++ b/src/mame/drivers/nbmj8891.cpp
@@ -52,34 +52,32 @@ TODO:
#include "speaker.h"
-DRIVER_INIT_MEMBER(nbmj8891_state,gionbana)
+void nbmj8891_state::init_gionbana()
{
uint8_t *prot = memregion("protection")->base();
- int i;
/* this is one possible way to rearrange the protection ROM data to get the
expected 0x5ece checksum. It's probably completely wrong! But since the
game doesn't do anything else with that ROM, this is more than enough. I
could just fill this are with fake data, the only thing that matters is
the checksum. */
- for (i = 0;i < 0x20000;i++)
+ for (int i = 0; i < 0x20000; i++)
{
prot[i] = bitswap<8>(prot[i],2,7,3,5,0,6,4,1);
}
}
-DRIVER_INIT_MEMBER(nbmj8891_state,omotesnd)
+void nbmj8891_state::init_omotesnd()
{
#if 0
uint8_t *prot = memregion("protection")->base();
- int i;
/* this is one possible way to rearrange the protection ROM data to get the
expected 0x5ece checksum. It's probably completely wrong! But since the
game doesn't do anything else with that ROM, this is more than enough. I
could just fill this are with fake data, the only thing that matters is
the checksum. */
- for (i = 0;i < 0x20000;i++)
+ for (int i = 0; i < 0x20000; i++)
{
prot[i] = bitswap<8>(prot[i],2,7,3,5,0,6,4,1);
}
@@ -102,59 +100,56 @@ DRIVER_INIT_MEMBER(nbmj8891_state,omotesnd)
#endif
}
-DRIVER_INIT_MEMBER(nbmj8891_state,telmahjn)
+void nbmj8891_state::init_telmahjn()
{
uint8_t *prot = memregion("protection")->base();
- int i;
/* this is one possible way to rearrange the protection ROM data to get the
expected 0x7354 checksum. It's probably completely wrong! But since the
game doesn't do anything else with that ROM, this is more than enough. I
could just fill this are with fake data, the only thing that matters is
the checksum. */
- for (i = 0;i < 0x20000;i++)
+ for (int i = 0; i < 0x20000; i++)
{
prot[i] = bitswap<8>(prot[i + 0x20000],7,0,4,1,5,2,6,3);
}
}
-DRIVER_INIT_MEMBER(nbmj8891_state,mgmen89)
+void nbmj8891_state::init_mgmen89()
{
uint8_t *prot = memregion("protection")->base();
- int i;
/* this is one possible way to rearrange the protection ROM data to get the
expected 0x4b98 checksum. It's probably completely wrong! But since the
game doesn't do anything else with that ROM, this is more than enough. I
could just fill this are with fake data, the only thing that matters is
the checksum. */
- for (i = 0;i < 0x20000;i++)
+ for (int i = 0; i < 0x20000; i++)
{
prot[i] = bitswap<8>(prot[i],5,6,1,0,7,3,2,4);
}
}
-DRIVER_INIT_MEMBER(nbmj8891_state,mjfocus)
+void nbmj8891_state::init_mjfocus()
{
uint8_t *prot = memregion("protection")->base();
uint8_t *ram = memregion("maincpu")->base() + 0xf800;
- int i;
/* need to clear RAM otherwise it doesn't boot... */
- for (i = 0; i < 0x800; i++) ram[i] = 0x00;
+ for (int i = 0; i < 0x800; i++) ram[i] = 0x00;
/* this is one possible way to rearrange the protection ROM data to get the
expected 0x7354 checksum. It's probably completely wrong! But since the
game doesn't do anything else with that ROM, this is more than enough. I
could just fill this are with fake data, the only thing that matters is
the checksum. */
- for (i = 0;i < 0x20000;i++)
+ for (int i = 0; i < 0x20000; i++)
{
prot[i] = bitswap<8>(prot[i + 0x20000],7,0,4,1,5,2,6,3);
}
}
-DRIVER_INIT_MEMBER(nbmj8891_state,mjfocusm)
+void nbmj8891_state::init_mjfocusm()
{
#if 1
uint8_t *ROM = memregion("maincpu")->base();
@@ -166,21 +161,17 @@ DRIVER_INIT_MEMBER(nbmj8891_state,mjfocusm)
#endif
}
-DRIVER_INIT_MEMBER(nbmj8891_state,scandal)
+void nbmj8891_state::init_scandal()
{
uint8_t *ROM = memregion("maincpu")->base();
- int i;
-
- for (i = 0xf800; i < 0x10000; i++) ROM[i] = 0x00;
+ for (int i = 0xf800; i < 0x10000; i++) ROM[i] = 0x00;
}
-DRIVER_INIT_MEMBER(nbmj8891_state,mjnanpas)
+void nbmj8891_state::init_mjnanpas()
{
/* they forgot to enable the protection check in this game... */
#if 0
uint8_t *prot = memregion("protection")->base();
- int i;
-
memregion("maincpu")->base()[0x003d] = 0x01; // force the protection check to be executed
/* this is one possible way to rearrange the protection ROM data to get the
@@ -188,40 +179,38 @@ DRIVER_INIT_MEMBER(nbmj8891_state,mjnanpas)
game doesn't do anything else with that ROM, this is more than enough. I
could just fill this are with fake data, the only thing that matters is
the checksum. */
- for (i = 0;i < 0x20000;i++)
+ for (int i = 0; i < 0x20000; i++)
{
prot[i] = bitswap<8>(prot[i + 0x20000],0,5,2,3,6,7,1,4);
}
#endif
}
-DRIVER_INIT_MEMBER(nbmj8891_state,pairsnb)
+void nbmj8891_state::init_pairsnb()
{
uint8_t *prot = memregion("protection")->base();
- int i;
/* this is one possible way to rearrange the protection ROM data to get the
expected 0x4b98 checksum. It's probably completely wrong! But since the
game doesn't do anything else with that ROM, this is more than enough. I
could just fill this are with fake data, the only thing that matters is
the checksum. */
- for (i = 0;i < 0x20000;i++)
+ for (int i = 0; i < 0x20000; i++)
{
prot[i] = bitswap<8>(prot[i],5,6,1,0,7,3,2,4);
}
}
-DRIVER_INIT_MEMBER(nbmj8891_state,pairsten)
+void nbmj8891_state::init_pairsten()
{
uint8_t *prot = memregion("protection")->base();
- int i;
/* this is one possible way to rearrange the protection ROM data to get the
expected 0x8374 checksum. It's probably completely wrong! But since the
game doesn't do anything else with that ROM, this is more than enough. I
could just fill this are with fake data, the only thing that matters is
the checksum. */
- for (i = 0;i < 0x20000;i++)
+ for (int i = 0; i < 0x20000; i++)
{
prot[i] = bitswap<8>(prot[i + 0x20000],5,6,0,4,3,7,1,2);
}
@@ -3567,37 +3556,37 @@ ROM_END
// YEAR, NAME, PARENT, MACHINE, INPUT, STATE, INIT, MONITOR,COMPANY,FULLNAME,FLAGS)
-GAME( 1988, msjiken, 0, msjiken, msjiken, nbmj8891_state, 0, ROT270, "Nichibutsu", "Mahjong Satsujin Jiken (Japan 881017)", MACHINE_SUPPORTS_SAVE )
-GAME( 1988, hanamomo, 0, hanamomo, hanamomo, nbmj8891_state, 0, ROT0, "Nichibutsu", "Mahjong Hana no Momoko gumi (Japan 881201)", MACHINE_SUPPORTS_SAVE )
-GAME( 1988, hanamomb, hanamomo, hanamomo, hanamomo, nbmj8891_state, 0, ROT0, "Nichibutsu", "Mahjong Hana no Momoko gumi (Japan 881125)", MACHINE_SUPPORTS_SAVE )
-GAME( 1988, telmahjn, 0, telmahjn, msjiken, nbmj8891_state, telmahjn, ROT270, "Nichibutsu", "Telephone Mahjong (Japan 890111)", MACHINE_SUPPORTS_SAVE )
-GAME( 1989, gionbana, 0, gionbana, gionbana, nbmj8891_state, gionbana, ROT0, "Nichibutsu", "Gionbana (Japan 890120)", MACHINE_SUPPORTS_SAVE )
-GAME( 1989, mgion, 0, mgion, mgion, nbmj8891_state, 0, ROT0, "Nichibutsu", "Gionbana [BET] (Japan 890207)", MACHINE_SUPPORTS_SAVE )
-GAME( 1989, omotesnd, 0, omotesnd, omotesnd, nbmj8891_state, omotesnd, ROT0, "Anime Tec", "Omotesandou (Japan 890215)", MACHINE_SUPPORTS_SAVE )
-GAME( 1989, abunai, 0, abunai, abunai, nbmj8891_state, 0, ROT0, "Green Soft", "Abunai Houkago - Mou Matenai (Japan 890325)", MACHINE_SUPPORTS_SAVE )
-GAME( 1989, mjfocus, 0, mjfocus, mjfocus, nbmj8891_state, mjfocus, ROT0, "Nichibutsu", "Mahjong Focus (Japan 890313)", MACHINE_SUPPORTS_SAVE )
-GAME( 1989, mjfocusm, mjfocus, mjfocusm, mjfocusm, nbmj8891_state, mjfocusm, ROT0, "Nichibutsu", "Mahjong Focus [BET] (Japan 890510)", MACHINE_SUPPORTS_SAVE )
-GAME( 1989, peepshow, mjfocus, mjfocus, mjfocus, nbmj8891_state, mjfocus, ROT0, "AC", "Nozokimeguri Mahjong Peep Show (Japan 890404)", MACHINE_SUPPORTS_SAVE )
-GAME( 1989, mjcamerb, 0, mjcamerb, mjcamerb, nbmj8891_state, 0, ROT0, "Miki Syouji", "Mahjong Camera Kozou (set 2) (Japan 881109)", MACHINE_SUPPORTS_SAVE )
-GAME( 1989, mmcamera, mjcamerb, mmcamera, mmcamera, nbmj8891_state, 0, ROT0, "Miki Syouji", "Mahjong Camera Kozou [BET] (Japan 890509)", MACHINE_SUPPORTS_SAVE )
-GAME( 1989, scandal, 0, scandal, scandal, nbmj8891_state, scandal, ROT0, "Nichibutsu", "Scandal Mahjong (Japan 890213)", MACHINE_SUPPORTS_SAVE )
-GAME( 1989, scandalm, scandal, scandalm, scandalm, nbmj8891_state, 0, ROT0, "Nichibutsu", "Scandal Mahjong [BET] (Japan 890217)", MACHINE_SUPPORTS_SAVE )
-GAME( 1989, mgmen89, 0, mgmen89, mgmen89, nbmj8891_state, mgmen89, ROT0, "Nichibutsu", "Mahjong G-MEN'89 (Japan 890425)", MACHINE_SUPPORTS_SAVE )
-GAME( 1989, mjnanpas, 0, mjnanpas, mjnanpas, nbmj8891_state, mjnanpas, ROT0, "Brooks", "Mahjong Nanpa Story (Japan 890713)", MACHINE_SUPPORTS_SAVE )
-GAME( 1989, mjnanpaa, mjnanpas, mjnanpas, mjnanpaa, nbmj8891_state, mjnanpas, ROT0, "Brooks", "Mahjong Nanpa Story (Japan 890712)", MACHINE_SUPPORTS_SAVE )
-GAME( 1989, mjnanpau, mjnanpas, mjnanpas, mjnanpas, nbmj8891_state, mjnanpas, ROT0, "Brooks", "Mahjong Nanpa Story (Ura) (Japan 890805)", MACHINE_SUPPORTS_SAVE )
-GAME( 1989, bananadr, 0, bananadr, bananadr, nbmj8891_state, 0, ROT0, "Digital Soft", "Mahjong Banana Dream [BET] (Japan 891124)", MACHINE_SUPPORTS_SAVE )
-GAME( 1990, mladyhtr, 0, mladyhtr, mladyhtr, nbmj8891_state, 0, ROT0, "Nichibutsu", "Mahjong The Lady Hunter (Japan 900509)", MACHINE_SUPPORTS_SAVE )
-GAME( 1990, chinmoku, 0, chinmoku, chinmoku, nbmj8891_state, 0, ROT0, "Nichibutsu", "Mahjong Chinmoku no Hentai (Japan 900511)", MACHINE_SUPPORTS_SAVE )
-GAME( 1990, maiko, 0, maiko, maiko, nbmj8891_state, 0, ROT0, "Nichibutsu", "Maikobana (Japan 900802)", MACHINE_SUPPORTS_SAVE )
-GAME( 1990, mmaiko, 0, mmaiko, mmaiko, nbmj8891_state, 0, ROT0, "Nichibutsu", "Maikobana [BET] (Japan 900911)", MACHINE_SUPPORTS_SAVE )
-GAME( 1990, hnxmasev, 0, hnxmasev, maiko, nbmj8891_state, 0, ROT180, "Nichibutsu / AV Japan", "AV Hanafuda Hana no Christmas Eve (Japan 901204)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE )
-GAME( 1990, hnageman, 0, hnageman, maiko, nbmj8891_state, 0, ROT180, "Nichibutsu / AV Japan", "AV Hanafuda Hana no Ageman (Japan 900716)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE )
-GAME( 1990, club90s, 0, club90s, club90s, nbmj8891_state, 0, ROT0, "Nichibutsu", "Mahjong CLUB 90's (set 1) (Japan 900919)", MACHINE_SUPPORTS_SAVE )
-GAME( 1990, club90sa, club90s, club90s, club90s, nbmj8891_state, 0, ROT0, "Nichibutsu", "Mahjong CLUB 90's (set 2) (Japan 900919)", MACHINE_SUPPORTS_SAVE )
-GAME( 1990, lovehous, club90s, lovehous, lovehous, nbmj8891_state, 0, ROT0, "Nichibutsu", "Mahjong Love House [BET] (Japan 901024)", MACHINE_SUPPORTS_SAVE )
-GAME( 1991, hanaoji, 0, hanaoji, hanaoji, nbmj8891_state, 0, ROT0, "Nichibutsu", "Hana to Ojisan [BET] (ver 1.01, 1991/12/09)", MACHINE_SUPPORTS_SAVE )
-GAME( 1991, hanaojia, hanaoji, hanaoji, hanaoji, nbmj8891_state, 0, ROT0, "Nichibutsu", "Hana to Ojisan [BET] (ver 1.00, 1991/08/23)", MACHINE_SUPPORTS_SAVE )
-GAME( 1988, taiwanmb, 0, taiwanmb, taiwanmb, nbmj8891_state, 0, ROT0, "Miki Syouji", "Taiwan Mahjong [BET] (Japan 881208)", MACHINE_SUPPORTS_SAVE )
-GAME( 1989, pairsnb, 0, pairsnb, pairsnb, nbmj8891_state, pairsnb, ROT0, "Nichibutsu", "Pairs (Nichibutsu) (Japan 890822)", MACHINE_SUPPORTS_SAVE )
-GAME( 1989, pairsten, pairsnb, pairsten, pairsnb, nbmj8891_state, pairsten, ROT0, "System Ten", "Pairs (System Ten) (Japan 890826)", MACHINE_SUPPORTS_SAVE )
+GAME( 1988, msjiken, 0, msjiken, msjiken, nbmj8891_state, empty_init, ROT270, "Nichibutsu", "Mahjong Satsujin Jiken (Japan 881017)", MACHINE_SUPPORTS_SAVE )
+GAME( 1988, hanamomo, 0, hanamomo, hanamomo, nbmj8891_state, empty_init, ROT0, "Nichibutsu", "Mahjong Hana no Momoko gumi (Japan 881201)", MACHINE_SUPPORTS_SAVE )
+GAME( 1988, hanamomb, hanamomo, hanamomo, hanamomo, nbmj8891_state, empty_init, ROT0, "Nichibutsu", "Mahjong Hana no Momoko gumi (Japan 881125)", MACHINE_SUPPORTS_SAVE )
+GAME( 1988, telmahjn, 0, telmahjn, msjiken, nbmj8891_state, init_telmahjn, ROT270, "Nichibutsu", "Telephone Mahjong (Japan 890111)", MACHINE_SUPPORTS_SAVE )
+GAME( 1989, gionbana, 0, gionbana, gionbana, nbmj8891_state, init_gionbana, ROT0, "Nichibutsu", "Gionbana (Japan 890120)", MACHINE_SUPPORTS_SAVE )
+GAME( 1989, mgion, 0, mgion, mgion, nbmj8891_state, empty_init, ROT0, "Nichibutsu", "Gionbana [BET] (Japan 890207)", MACHINE_SUPPORTS_SAVE )
+GAME( 1989, omotesnd, 0, omotesnd, omotesnd, nbmj8891_state, init_omotesnd, ROT0, "Anime Tec", "Omotesandou (Japan 890215)", MACHINE_SUPPORTS_SAVE )
+GAME( 1989, abunai, 0, abunai, abunai, nbmj8891_state, empty_init, ROT0, "Green Soft", "Abunai Houkago - Mou Matenai (Japan 890325)", MACHINE_SUPPORTS_SAVE )
+GAME( 1989, mjfocus, 0, mjfocus, mjfocus, nbmj8891_state, init_mjfocus, ROT0, "Nichibutsu", "Mahjong Focus (Japan 890313)", MACHINE_SUPPORTS_SAVE )
+GAME( 1989, mjfocusm, mjfocus, mjfocusm, mjfocusm, nbmj8891_state, init_mjfocusm, ROT0, "Nichibutsu", "Mahjong Focus [BET] (Japan 890510)", MACHINE_SUPPORTS_SAVE )
+GAME( 1989, peepshow, mjfocus, mjfocus, mjfocus, nbmj8891_state, init_mjfocus, ROT0, "AC", "Nozokimeguri Mahjong Peep Show (Japan 890404)", MACHINE_SUPPORTS_SAVE )
+GAME( 1989, mjcamerb, 0, mjcamerb, mjcamerb, nbmj8891_state, empty_init, ROT0, "Miki Syouji", "Mahjong Camera Kozou (set 2) (Japan 881109)", MACHINE_SUPPORTS_SAVE )
+GAME( 1989, mmcamera, mjcamerb, mmcamera, mmcamera, nbmj8891_state, empty_init, ROT0, "Miki Syouji", "Mahjong Camera Kozou [BET] (Japan 890509)", MACHINE_SUPPORTS_SAVE )
+GAME( 1989, scandal, 0, scandal, scandal, nbmj8891_state, init_scandal, ROT0, "Nichibutsu", "Scandal Mahjong (Japan 890213)", MACHINE_SUPPORTS_SAVE )
+GAME( 1989, scandalm, scandal, scandalm, scandalm, nbmj8891_state, empty_init, ROT0, "Nichibutsu", "Scandal Mahjong [BET] (Japan 890217)", MACHINE_SUPPORTS_SAVE )
+GAME( 1989, mgmen89, 0, mgmen89, mgmen89, nbmj8891_state, init_mgmen89, ROT0, "Nichibutsu", "Mahjong G-MEN'89 (Japan 890425)", MACHINE_SUPPORTS_SAVE )
+GAME( 1989, mjnanpas, 0, mjnanpas, mjnanpas, nbmj8891_state, init_mjnanpas, ROT0, "Brooks", "Mahjong Nanpa Story (Japan 890713)", MACHINE_SUPPORTS_SAVE )
+GAME( 1989, mjnanpaa, mjnanpas, mjnanpas, mjnanpaa, nbmj8891_state, init_mjnanpas, ROT0, "Brooks", "Mahjong Nanpa Story (Japan 890712)", MACHINE_SUPPORTS_SAVE )
+GAME( 1989, mjnanpau, mjnanpas, mjnanpas, mjnanpas, nbmj8891_state, init_mjnanpas, ROT0, "Brooks", "Mahjong Nanpa Story (Ura) (Japan 890805)", MACHINE_SUPPORTS_SAVE )
+GAME( 1989, bananadr, 0, bananadr, bananadr, nbmj8891_state, empty_init, ROT0, "Digital Soft", "Mahjong Banana Dream [BET] (Japan 891124)", MACHINE_SUPPORTS_SAVE )
+GAME( 1990, mladyhtr, 0, mladyhtr, mladyhtr, nbmj8891_state, empty_init, ROT0, "Nichibutsu", "Mahjong The Lady Hunter (Japan 900509)", MACHINE_SUPPORTS_SAVE )
+GAME( 1990, chinmoku, 0, chinmoku, chinmoku, nbmj8891_state, empty_init, ROT0, "Nichibutsu", "Mahjong Chinmoku no Hentai (Japan 900511)", MACHINE_SUPPORTS_SAVE )
+GAME( 1990, maiko, 0, maiko, maiko, nbmj8891_state, empty_init, ROT0, "Nichibutsu", "Maikobana (Japan 900802)", MACHINE_SUPPORTS_SAVE )
+GAME( 1990, mmaiko, 0, mmaiko, mmaiko, nbmj8891_state, empty_init, ROT0, "Nichibutsu", "Maikobana [BET] (Japan 900911)", MACHINE_SUPPORTS_SAVE )
+GAME( 1990, hnxmasev, 0, hnxmasev, maiko, nbmj8891_state, empty_init, ROT180, "Nichibutsu / AV Japan", "AV Hanafuda Hana no Christmas Eve (Japan 901204)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE )
+GAME( 1990, hnageman, 0, hnageman, maiko, nbmj8891_state, empty_init, ROT180, "Nichibutsu / AV Japan", "AV Hanafuda Hana no Ageman (Japan 900716)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE )
+GAME( 1990, club90s, 0, club90s, club90s, nbmj8891_state, empty_init, ROT0, "Nichibutsu", "Mahjong CLUB 90's (set 1) (Japan 900919)", MACHINE_SUPPORTS_SAVE )
+GAME( 1990, club90sa, club90s, club90s, club90s, nbmj8891_state, empty_init, ROT0, "Nichibutsu", "Mahjong CLUB 90's (set 2) (Japan 900919)", MACHINE_SUPPORTS_SAVE )
+GAME( 1990, lovehous, club90s, lovehous, lovehous, nbmj8891_state, empty_init, ROT0, "Nichibutsu", "Mahjong Love House [BET] (Japan 901024)", MACHINE_SUPPORTS_SAVE )
+GAME( 1991, hanaoji, 0, hanaoji, hanaoji, nbmj8891_state, empty_init, ROT0, "Nichibutsu", "Hana to Ojisan [BET] (ver 1.01, 1991/12/09)", MACHINE_SUPPORTS_SAVE )
+GAME( 1991, hanaojia, hanaoji, hanaoji, hanaoji, nbmj8891_state, empty_init, ROT0, "Nichibutsu", "Hana to Ojisan [BET] (ver 1.00, 1991/08/23)", MACHINE_SUPPORTS_SAVE )
+GAME( 1988, taiwanmb, 0, taiwanmb, taiwanmb, nbmj8891_state, empty_init, ROT0, "Miki Syouji", "Taiwan Mahjong [BET] (Japan 881208)", MACHINE_SUPPORTS_SAVE )
+GAME( 1989, pairsnb, 0, pairsnb, pairsnb, nbmj8891_state, init_pairsnb, ROT0, "Nichibutsu", "Pairs (Nichibutsu) (Japan 890822)", MACHINE_SUPPORTS_SAVE )
+GAME( 1989, pairsten, pairsnb, pairsten, pairsnb, nbmj8891_state, init_pairsten, ROT0, "System Ten", "Pairs (System Ten) (Japan 890826)", MACHINE_SUPPORTS_SAVE )