Previous 199869 Revisions Next

r35017 Saturday 14th February, 2015 at 07:49:03 UTC by Osso
tnzs.c: enabled save state support (nw)
[src/mame/drivers]cchance.c tnzs.c
[src/mame/includes]tnzs.h
[src/mame/machine]tnzs.c

trunk/src/mame/drivers/cchance.c
r243528r243529
185185
186186MACHINE_START_MEMBER(cchance_state,cchance)
187187{
188   save_item(NAME(m_screenflip));
189188   save_item(NAME(m_hop_io));
190189   save_item(NAME(m_bell_io));
191190}
192191
193192MACHINE_RESET_MEMBER(cchance_state,cchance)
194193{
195   m_screenflip = 0;
196194   m_mcu_type = -1;
197195   m_hop_io = 0;
198196   m_bell_io = 0;
trunk/src/mame/drivers/tnzs.c
r243528r243529
622622#include "emu.h"
623623#include "cpu/z80/z80.h"
624624#include "includes/taitoipt.h"
625#include "cpu/mcs48/mcs48.h"
626625#include "sound/2203intf.h"
627#include "sound/dac.h"
628#include "sound/samples.h"
629626#include "includes/tnzs.h"
630627#include "sound/2151intf.h"
631628
r243528r243529
26602657
26612658
26622659//    YEAR, NAME,      PARENT,   MACHINE,  INPUT,    INIT,     MONITOR,COMPANY,FULLNAME,FLAGS
2663GAME( 1987, plumppop,  0,        drtoppel, plumppop, tnzs_state,    plumpop,  ROT0,   "Taito Corporation", "Plump Pop (Japan)", 0 )
2664GAME( 1992, jpopnics,  0,        jpopnics, jpopnics, driver_device, 0,        ROT0,   "Nics",              "Jumping Pop (Nics, Korean hack of Plump Pop)", GAME_IMPERFECT_GRAPHICS )
2660GAME( 1987, plumppop,  0,        drtoppel, plumppop, tnzs_state,    plumpop,  ROT0,   "Taito Corporation", "Plump Pop (Japan)", GAME_SUPPORTS_SAVE )
2661GAME( 1992, jpopnics,  0,        jpopnics, jpopnics, driver_device, 0,        ROT0,   "Nics",              "Jumping Pop (Nics, Korean hack of Plump Pop)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE )
26652662
2666GAME( 1987, extrmatn,  0,        arknoid2, extrmatn, tnzs_state,    extrmatn, ROT270, "Taito Corporation Japan",     "Extermination (World)", 0 )
2667GAME( 1987, extrmatnu, extrmatn, arknoid2, extrmatn, tnzs_state,    extrmatn, ROT270, "Taito (World Games license)", "Extermination (US)", 0 )
2668GAME( 1987, extrmatnj, extrmatn, arknoid2, extrmatn, tnzs_state,    extrmatn, ROT270, "Taito Corporation",           "Extermination (Japan)", 0 )
2663GAME( 1987, extrmatn,  0,        arknoid2, extrmatn, tnzs_state,    extrmatn, ROT270, "Taito Corporation Japan",     "Extermination (World)", GAME_SUPPORTS_SAVE )
2664GAME( 1987, extrmatnu, extrmatn, arknoid2, extrmatn, tnzs_state,    extrmatn, ROT270, "Taito (World Games license)", "Extermination (US)", GAME_SUPPORTS_SAVE )
2665GAME( 1987, extrmatnj, extrmatn, arknoid2, extrmatn, tnzs_state,    extrmatn, ROT270, "Taito Corporation",           "Extermination (Japan)", GAME_SUPPORTS_SAVE )
26692666
2670GAME( 1987, arknoid2,  0,        arknoid2, arknoid2, tnzs_state,    arknoid2, ROT270, "Taito Corporation Japan",                     "Arkanoid - Revenge of DOH (World)", 0 )
2671GAME( 1987, arknoid2u, arknoid2, arknoid2, arknid2u, tnzs_state,    arknoid2, ROT270, "Taito America Corporation (Romstar license)", "Arkanoid - Revenge of DOH (US)", 0 )
2672GAME( 1987, arknoid2j, arknoid2, arknoid2, arknid2u, tnzs_state,    arknoid2, ROT270, "Taito Corporation",                           "Arkanoid - Revenge of DOH (Japan)", 0 )
2673GAME( 1987, arknoid2b, arknoid2, arknoid2, arknid2u, tnzs_state,    arknoid2, ROT270, "bootleg",                                     "Arkanoid - Revenge of DOH (Japan bootleg)", 0 )
2667GAME( 1987, arknoid2,  0,        arknoid2, arknoid2, tnzs_state,    arknoid2, ROT270, "Taito Corporation Japan",                     "Arkanoid - Revenge of DOH (World)", GAME_SUPPORTS_SAVE )
2668GAME( 1987, arknoid2u, arknoid2, arknoid2, arknid2u, tnzs_state,    arknoid2, ROT270, "Taito America Corporation (Romstar license)", "Arkanoid - Revenge of DOH (US)", GAME_SUPPORTS_SAVE )
2669GAME( 1987, arknoid2j, arknoid2, arknoid2, arknid2u, tnzs_state,    arknoid2, ROT270, "Taito Corporation",                           "Arkanoid - Revenge of DOH (Japan)", GAME_SUPPORTS_SAVE )
2670GAME( 1987, arknoid2b, arknoid2, arknoid2, arknid2u, tnzs_state,    arknoid2, ROT270, "bootleg",                                     "Arkanoid - Revenge of DOH (Japan bootleg)", GAME_SUPPORTS_SAVE )
26742671
2675GAME( 1987, drtoppel,  0,        drtoppel, drtoppel, tnzs_state,    drtoppel, ROT90,  "Kaneko / Taito Corporation Japan",   "Dr. Toppel's Adventure (World)", 0 ) /* Possible region hack */
2676GAME( 1987, drtoppelu, drtoppel, drtoppel, drtopplu, tnzs_state,    drtoppel, ROT90,  "Kaneko / Taito America Corporation", "Dr. Toppel's Adventure (US)", 0 ) /* Possible region hack */
2677GAME( 1987, drtoppelj, drtoppel, drtoppel, drtopplu, tnzs_state,    drtoppel, ROT90,  "Kaneko / Taito Corporation",         "Dr. Toppel's Tankentai (Japan)", 0 )
2672GAME( 1987, drtoppel,  0,        drtoppel, drtoppel, tnzs_state,    drtoppel, ROT90,  "Kaneko / Taito Corporation Japan",   "Dr. Toppel's Adventure (World)", GAME_SUPPORTS_SAVE ) /* Possible region hack */
2673GAME( 1987, drtoppelu, drtoppel, drtoppel, drtopplu, tnzs_state,    drtoppel, ROT90,  "Kaneko / Taito America Corporation", "Dr. Toppel's Adventure (US)", GAME_SUPPORTS_SAVE ) /* Possible region hack */
2674GAME( 1987, drtoppelj, drtoppel, drtoppel, drtopplu, tnzs_state,    drtoppel, ROT90,  "Kaneko / Taito Corporation",         "Dr. Toppel's Tankentai (Japan)", GAME_SUPPORTS_SAVE )
26782675
2679GAME( 1988, kageki,    0,        kageki,   kageki,   tnzs_state,    kageki,   ROT90,  "Kaneko / Taito America Corporation (Romstar license)", "Kageki (US)", 0 )
2680GAME( 1988, kagekij,   kageki,   kageki,   kagekij,  tnzs_state,    kageki,   ROT90,  "Kaneko / Taito Corporation",                           "Kageki (Japan)", 0 )
2681GAME( 1992, kagekih,   kageki,   kageki,   kageki,   tnzs_state,    kageki,   ROT90,  "hack",                                                 "Kageki (hack)", 0 ) // date is hacked at least, might also be a Japan set hacked to show english
2676GAME( 1988, kageki,    0,        kageki,   kageki,   tnzs_state,    kageki,   ROT90,  "Kaneko / Taito America Corporation (Romstar license)", "Kageki (US)", GAME_SUPPORTS_SAVE )
2677GAME( 1988, kagekij,   kageki,   kageki,   kagekij,  tnzs_state,    kageki,   ROT90,  "Kaneko / Taito Corporation",                           "Kageki (Japan)", GAME_SUPPORTS_SAVE )
2678GAME( 1992, kagekih,   kageki,   kageki,   kageki,   tnzs_state,    kageki,   ROT90,  "hack",                                                 "Kageki (hack)", GAME_SUPPORTS_SAVE ) // date is hacked at least, might also be a Japan set hacked to show english
26822679
2683GAME( 1988, chukatai,  0,        tnzs,     chukatai, tnzs_state,    chukatai, ROT0,   "Taito Corporation Japan",   "Chuka Taisen (World)", 0 ) /* Possible region hack */
2684GAME( 1988, chukataiu, chukatai, tnzs,     chukatau, tnzs_state,    chukatai, ROT0,   "Taito America Corporation", "Chuka Taisen (US)", 0 ) /* Possible region hack */
2685GAME( 1988, chukataij, chukatai, tnzs,     chukatau, tnzs_state,    chukatai, ROT0,   "Taito Corporation",         "Chuka Taisen (Japan)", 0 )
2680GAME( 1988, chukatai,  0,        tnzs,     chukatai, tnzs_state,    chukatai, ROT0,   "Taito Corporation Japan",   "Chuka Taisen (World)", GAME_SUPPORTS_SAVE ) /* Possible region hack */
2681GAME( 1988, chukataiu, chukatai, tnzs,     chukatau, tnzs_state,    chukatai, ROT0,   "Taito America Corporation", "Chuka Taisen (US)", GAME_SUPPORTS_SAVE ) /* Possible region hack */
2682GAME( 1988, chukataij, chukatai, tnzs,     chukatau, tnzs_state,    chukatai, ROT0,   "Taito Corporation",         "Chuka Taisen (Japan)", GAME_SUPPORTS_SAVE )
26862683
2687GAME( 1988, tnzs,      0,        tnzsb,    tnzs,     tnzs_state,    tnzsb,    ROT0,   "Taito Corporation Japan", "The NewZealand Story (World, new version) (newer PCB)", 0 )
2688GAME( 1988, tnzsj,     tnzs,     tnzsb,    tnzsj,    tnzs_state,    tnzsb,    ROT0,   "Taito Corporation",       "The NewZealand Story (Japan, new version) (newer PCB)", 0 )
2689GAME( 1988, tnzsjo,    tnzs,     tnzs,     tnzsjo,   tnzs_state,    tnzs,     ROT0,   "Taito Corporation",       "The NewZealand Story (Japan, old version) (older PCB)", 0 )
2690GAME( 1988, tnzso,     tnzs,     tnzs,     tnzsop,   tnzs_state,    tnzs,     ROT0,   "Taito Corporation Japan", "The NewZealand Story (World, old version) (older PCB)", 0 )
2691GAME( 1988, tnzsop,    tnzs,     tnzs,     tnzsop,   tnzs_state,    tnzs,     ROT0,   "Taito Corporation Japan", "The NewZealand Story (World, prototype?) (older PCB)", 0 )
2684GAME( 1988, tnzs,      0,        tnzsb,    tnzs,     tnzs_state,    tnzsb,    ROT0,   "Taito Corporation Japan", "The NewZealand Story (World, new version) (newer PCB)", GAME_SUPPORTS_SAVE )
2685GAME( 1988, tnzsj,     tnzs,     tnzsb,    tnzsj,    tnzs_state,    tnzsb,    ROT0,   "Taito Corporation",       "The NewZealand Story (Japan, new version) (newer PCB)", GAME_SUPPORTS_SAVE )
2686GAME( 1988, tnzsjo,    tnzs,     tnzs,     tnzsjo,   tnzs_state,    tnzs,     ROT0,   "Taito Corporation",       "The NewZealand Story (Japan, old version) (older PCB)", GAME_SUPPORTS_SAVE )
2687GAME( 1988, tnzso,     tnzs,     tnzs,     tnzsop,   tnzs_state,    tnzs,     ROT0,   "Taito Corporation Japan", "The NewZealand Story (World, old version) (older PCB)", GAME_SUPPORTS_SAVE )
2688GAME( 1988, tnzsop,    tnzs,     tnzs,     tnzsop,   tnzs_state,    tnzs,     ROT0,   "Taito Corporation Japan", "The NewZealand Story (World, prototype?) (older PCB)", GAME_SUPPORTS_SAVE )
26922689
2693GAME( 1988, kabukiz,   0,        kabukiz,  kabukiz,  tnzs_state,    kabukiz,  ROT0,   "Kaneko / Taito Corporation Japan", "Kabuki-Z (World)", 0 )
2694GAME( 1988, kabukizj,  kabukiz,  kabukiz,  kabukizj, tnzs_state,    kabukiz,  ROT0,   "Kaneko / Taito Corporation",       "Kabuki-Z (Japan)", 0 )
2690GAME( 1988, kabukiz,   0,        kabukiz,  kabukiz,  tnzs_state,    kabukiz,  ROT0,   "Kaneko / Taito Corporation Japan", "Kabuki-Z (World)", GAME_SUPPORTS_SAVE )
2691GAME( 1988, kabukizj,  kabukiz,  kabukiz,  kabukizj, tnzs_state,    kabukiz,  ROT0,   "Kaneko / Taito Corporation",       "Kabuki-Z (Japan)", GAME_SUPPORTS_SAVE )
26952692
2696GAME( 1989, insectx,   0,        insectx,  insectx,  tnzs_state,    insectx,  ROT0,   "Taito Corporation Japan", "Insector X (World)", 0 )
2697GAME( 1989, insectxj,  insectx,  insectx,  insectxj, tnzs_state,    insectx,  ROT0,   "Taito Corporation",       "Insector X (Japan)", 0 )
2693GAME( 1989, insectx,   0,        insectx,  insectx,  tnzs_state,    insectx,  ROT0,   "Taito Corporation Japan", "Insector X (World)", GAME_SUPPORTS_SAVE )
2694GAME( 1989, insectxj,  insectx,  insectx,  insectxj, tnzs_state,    insectx,  ROT0,   "Taito Corporation",       "Insector X (Japan)", GAME_SUPPORTS_SAVE )
trunk/src/mame/includes/tnzs.h
r243528r243529
2525public:
2626   tnzs_state(const machine_config &mconfig, device_type type, const char *tag)
2727      : driver_device(mconfig, type, tag),
28      m_maincpu(*this, "maincpu"),
2829      m_audiocpu(*this, "audiocpu"),
2930      m_subcpu(*this, "sub"),
3031      m_mcu(*this, "mcu"),
31      m_maincpu(*this, "maincpu"),
3232      m_seta001(*this, "spritegen"),
3333      m_dac(*this, "dac"),
3434      m_samples(*this, "samples"),
3535      m_palette(*this, "palette"),
3636      m_mainbank(*this, "mainbank")
3737      { }
38   
39   /* devices */
40   required_device<cpu_device> m_maincpu;
41   optional_device<cpu_device> m_audiocpu;
42   optional_device<cpu_device> m_subcpu;
43   optional_device<upi41_cpu_device> m_mcu;
44   optional_device<seta001_device> m_seta001;
45   optional_device<dac_device> m_dac;
46   optional_device<samples_device> m_samples;
47   required_device<palette_device> m_palette;
48   optional_device<address_map_bank_device> m_mainbank;
3849
39   /* video-related */
40   int      m_screenflip;
41
4250   /* sound-related */
4351   INT16    *m_sampledata[MAX_SAMPLES];
4452   int      m_samplesize[MAX_SAMPLES];
r243528r243529
5967   UINT8    m_mcu_credits;
6068   int      m_bank2;
6169
62   UINT8*   m_ROM;
63
64   /* devices */
65   optional_device<cpu_device> m_audiocpu;
66   optional_device<cpu_device> m_subcpu;
67   optional_device<upi41_cpu_device> m_mcu;
6870   DECLARE_WRITE8_MEMBER(tnzsb_sound_command_w);
6971   DECLARE_WRITE8_MEMBER(jpopnics_subbankswitch_w);
7072   DECLARE_READ8_MEMBER(tnzs_port1_r);
r243528r243529
8688   DECLARE_WRITE8_MEMBER(kageki_csport_w);
8789   DECLARE_WRITE8_MEMBER(kabukiz_sound_bank_w);
8890   DECLARE_WRITE8_MEMBER(kabukiz_sample_w);
91   DECLARE_WRITE_LINE_MEMBER(irqhandler);
8992
9093   SAMPLES_START_CB_MEMBER(kageki_init_samples);
9194
r243528r243529
104107   DECLARE_PALETTE_INIT(arknoid2);
105108   DECLARE_MACHINE_START(tnzs_common);
106109   DECLARE_MACHINE_RESET(jpopnics);
110   
107111   UINT32 screen_update_tnzs(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
108112   void screen_eof_tnzs(screen_device &screen, bool state);
113   
109114   INTERRUPT_GEN_MEMBER(arknoid2_interrupt);
110115   TIMER_CALLBACK_MEMBER(kludge_callback);
116   
111117   void tnzs_postload();
112   void mcu_reset(  );
113   void mcu_handle_coins( int coin );
114   DECLARE_WRITE_LINE_MEMBER(irqhandler);
115   required_device<cpu_device> m_maincpu;
116   optional_device<seta001_device> m_seta001;
117   optional_device<dac_device> m_dac;
118   optional_device<samples_device> m_samples;
119   required_device<palette_device> m_palette;
120   optional_device<address_map_bank_device> m_mainbank;
118   void mcu_reset();
119   void mcu_handle_coins(int coin);
121120};
trunk/src/mame/machine/tnzs.c
r243528r243529
624624         break;
625625   }
626626
627   m_screenflip = 0;
628627   m_kageki_csport_sel = 0;
629628   m_input_select = 0;
630629   m_mcu_readcredits = 0;  // this might belong to mcu_reset
r243528r243529
633632
634633MACHINE_RESET_MEMBER(tnzs_state,jpopnics)
635634{
636   m_screenflip = 0;
637635   m_mcu_type = -1;
638636}
639637
640void tnzs_state::tnzs_postload()
641{
642   membank("subbank")->set_entry(m_bank2);
643}
644638
645
646639MACHINE_START_MEMBER(tnzs_state,tnzs_common)
647640{
648641   UINT8 *SUB = memregion("sub")->base();
649   m_ROM = memregion("maincpu")->base();
650
642   
651643   membank("subbank")->configure_entries(0, 4, &SUB[0x08000], 0x2000);
652644   membank("subbank")->set_entry(m_bank2);
653645
654646   m_bank2 = 0;
655647   m_mainbank->set_bank(2);
656648
657   save_item(NAME(m_screenflip));
658649   save_item(NAME(m_bank2));
659
660   machine().save().register_postload(save_prepost_delegate(FUNC(tnzs_state::tnzs_postload), this));
661650}
662651
663652MACHINE_START_MEMBER(tnzs_state,tnzs)


Previous 199869 Revisions Next


© 1997-2024 The MAME Team