Previous 199869 Revisions Next

r36334 Monday 9th March, 2015 at 02:39:14 UTC by Vasantha Crabb
More untangling of goldstar
[src/mame/drivers]goldstar.c
[src/mame/includes]goldstar.h

trunk/src/mame/drivers/goldstar.c
r244845r244846
483483}
484484
485485
486static ADDRESS_MAP_START( ncb3_map, AS_PROGRAM, 8, goldstar_state )
486static ADDRESS_MAP_START( ncb3_map, AS_PROGRAM, 8, cb3_state )
487487   AM_RANGE(0x0000, 0xb7ff) AM_ROM
488488   AM_RANGE(0xb800, 0xbfff) AM_RAM AM_SHARE("nvram")
489489   AM_RANGE(0xc000, 0xc7ff) AM_ROM
r244845r244846
78397839
78407840
78417841
7842static MACHINE_CONFIG_START( cb3e, goldstar_state )
7842static MACHINE_CONFIG_START( cb3e, cb3_state )
78437843
78447844   /* basic machine hardware */
78457845   MCFG_CPU_ADD("maincpu", Z80, CPU_CLOCK)
r244845r244846
78897889
78907890
78917891
7892static MACHINE_CONFIG_START( cb3c, goldstar_state )
7892static MACHINE_CONFIG_START( cb3c, cb3_state )
78937893
78947894   /* basic machine hardware */
78957895   MCFG_CPU_ADD("maincpu", Z80, CPU_CLOCK)
r244845r244846
79387938MACHINE_CONFIG_END
79397939
79407940
7941static MACHINE_CONFIG_START( ncb3, goldstar_state )
7941static MACHINE_CONFIG_START( ncb3, cb3_state )
79427942
79437943   /* basic machine hardware */
79447944   MCFG_CPU_ADD("maincpu", Z80, CPU_CLOCK)
r244845r244846
1348013480   #endif
1348113481}
1348213482
13483UINT8 goldstar_state::decrypt(UINT8 cipherText, UINT16 address)
13483UINT8 cb3_state::decrypt(UINT8 cipherText, UINT16 address)
1348413484{
1348513485   int idx;
1348613486   UINT8 output;
r244845r244846
1349713497   return output ^ sbox[idx];
1349813498}
1349913499
13500UINT8 goldstar_state::chry10_decrypt(UINT8 cipherText)
13500UINT8 chrygld_state::chry10_decrypt(UINT8 cipherText)
1350113501{
1350213502   return cipherText ^ (BIT(cipherText, 4) << 3) ^ (BIT(cipherText, 1) << 5) ^ (BIT(cipherText, 6) << 7);
1350313503}
1350413504
13505DRIVER_INIT_MEMBER(goldstar_state,chry10)
13505DRIVER_INIT_MEMBER(chrygld_state, chry10)
1350613506{
1350713507   UINT8 *ROM = memregion("maincpu")->base();
1350813508   int size = memregion("maincpu")->bytes();
r244845r244846
1352613526   dump_to_file(ROM);
1352713527}
1352813528
13529DRIVER_INIT_MEMBER(goldstar_state,cb3)
13529DRIVER_INIT_MEMBER(cb3_state, cb3)
1353013530{
1353113531   UINT8 *ROM = memregion("maincpu")->base();
1353213532   int size = memregion("maincpu")->bytes();
r244845r244846
1354413544}
1354513545
1354613546
13547DRIVER_INIT_MEMBER(goldstar_state,chrygld)
13547DRIVER_INIT_MEMBER(chrygld_state, chrygld)
1354813548{
1354913549   int A;
1355013550   UINT8 *ROM = memregion("maincpu")->base();
r244845r244846
1398313983   m_maincpu->space(AS_IO).install_read_handler(0x1a, 0x1a, read8_delegate(FUNC(goldstar_state::fixedvale4_r),this));
1398413984}
1398513985
13986DRIVER_INIT_MEMBER(goldstar_state,cherrys)
13986DRIVER_INIT_MEMBER(cb3_state, cherrys)
1398713987{
1398813988   int i;
1398913989   UINT8 *ROM = memregion("maincpu")->base();
r244845r244846
1407314073
1407414074}
1407514075
14076DRIVER_INIT_MEMBER(goldstar_state, cb3e)
14076DRIVER_INIT_MEMBER(cb3_state, cb3e)
1407714077{
1407814078/*  program bitswap */
1407914079   int i;
r244845r244846
1413014130GAMEL( 199?, goldstar,  0,        goldstar, goldstar, goldstar_state, goldstar,  ROT0, "IGS",               "Golden Star",                                 0,                 layout_goldstar )
1413114131GAMEL( 199?, goldstbl,  goldstar, goldstbl, goldstar, driver_device,  0,         ROT0, "IGS",               "Golden Star (Blue version)",                  0,                 layout_goldstar )
1413214132GAME(  199?, moonlght,  goldstar, moonlght, goldstar, driver_device,  0,         ROT0, "bootleg",           "Moon Light (bootleg of Golden Star)",         0 )
14133GAME(  199?, chrygld,   0,        chrygld,  chrygld,  goldstar_state, chrygld,   ROT0, "bootleg",           "Cherry Gold I",                               0 )
14134GAME(  199?, chry10,    0,        chrygld,  chry10,   goldstar_state, chry10,    ROT0, "bootleg",           "Cherry 10 (bootleg with PIC16F84)",           0 )
14133GAME(  199?, chrygld,   0,        chrygld,  chrygld,  chrygld_state,  chrygld,   ROT0, "bootleg",           "Cherry Gold I",                               0 )
14134GAME(  199?, chry10,    0,        chrygld,  chry10,   chrygld_state,  chry10,    ROT0, "bootleg",           "Cherry 10 (bootleg with PIC16F84)",           0 )
1413514135GAME(  199?, goldfrui,  goldstar, goldfrui, goldstar, driver_device,  0,         ROT0, "bootleg",           "Gold Fruit",                                  0 )                  // maybe fullname should be 'Gold Fruit (main 40%)'
1413614136GAME(  2001, super9,    goldstar, super9,   goldstar, goldstar_state, super9,    ROT0, "Playmark",          "Super Nove (Playmark)",                       GAME_NOT_WORKING )   // need to decode gfx and see the program loops/reset...
1413714137GAME(  2001, wcherry,   0,        wcherry,  chrygld,  goldstar_state, wcherry,   ROT0, "bootleg",           "Win Cherry (ver 0.16 - 19990219)",            GAME_NOT_WORKING )
r244845r244846
1414214142// are these really dyna, or bootlegs?
1414314143GAMEL( 199?, ncb3,      0,        ncb3,     ncb3,     driver_device,  0,         ROT0, "Dyna",              "Cherry Bonus III (ver.1.40, set 1)",          0,                 layout_cherryb3 )
1414414144GAMEL( 199?, cb3a,      ncb3,     ncb3,     cb3a,     driver_device,  0,         ROT0, "Dyna",              "Cherry Bonus III (ver.1.40, set 2)",          0,                 layout_cherryb3 )
14145GAMEL( 199?, cb3,       ncb3,     ncb3,     ncb3,     goldstar_state, cb3,       ROT0, "Dyna",              "Cherry Bonus III (ver.1.40, encrypted)",      0,                 layout_cherryb3 )
14146GAMEL( 199?, cb3b,      ncb3,     cherrys,  ncb3,     goldstar_state, cherrys,   ROT0, "Dyna",              "Cherry Bonus III (alt)",                      0,                 layout_cherryb3 )
14147GAME(  199?, cb3c,      ncb3,     cb3c,     chrygld,  goldstar_state, cb3,       ROT0, "bootleg",           "Cherry Bonus III (alt, set 2)",               GAME_NOT_WORKING)
14145GAMEL( 199?, cb3,       ncb3,     ncb3,     ncb3,     cb3_state,      cb3,       ROT0, "Dyna",              "Cherry Bonus III (ver.1.40, encrypted)",      0,                 layout_cherryb3 )
14146GAMEL( 199?, cb3b,      ncb3,     cherrys,  ncb3,     cb3_state,      cherrys,   ROT0, "Dyna",              "Cherry Bonus III (alt)",                      0,                 layout_cherryb3 )
14147GAME(  199?, cb3c,      ncb3,     cb3c,     chrygld,  cb3_state,      cb3,       ROT0, "bootleg",           "Cherry Bonus III (alt, set 2)",               GAME_NOT_WORKING)
1414814148GAMEL( 199?, cb3d,      ncb3,     ncb3,     ncb3,     driver_device,  0,         ROT0, "bootleg",           "Cherry Bonus III (set 3)",                    0,                 layout_cherryb3 )
14149GAMEL( 199?, cb3e,      ncb3,     cb3e,     chrygld,  goldstar_state, cb3e,      ROT0, "bootleg",           "Cherry Bonus III (set 4, encrypted bootleg)", 0,                 layout_cherryb3 )
14149GAMEL( 199?, cb3e,      ncb3,     cb3e,     chrygld,  cb3_state,      cb3e,      ROT0, "bootleg",           "Cherry Bonus III (set 4, encrypted bootleg)", 0,                 layout_cherryb3 )
1415014150
1415114151GAME(  1996, cmast97,   ncb3,     cm97,     chrygld,  driver_device,  0,         ROT0, "Dyna",              "Cherry Master '97",                           GAME_NOT_WORKING) // fix prom decode
1415214152
trunk/src/mame/includes/goldstar.h
r244845r244846
1515      m_reel3_scroll(*this, "reel3_scroll"),
1616      m_maincpu(*this, "maincpu"),
1717      m_gfxdecode(*this, "gfxdecode"),
18      m_palette(*this, "palette") { }
18      m_palette(*this, "palette")
19   {
20   }
1921
2022   int m_dataoffset;
2123
r244845r244846
99101   DECLARE_DRIVER_INIT(cmast91);
100102   DECLARE_DRIVER_INIT(nfb96_dk);
101103   DECLARE_DRIVER_INIT(cm);
102   DECLARE_DRIVER_INIT(chry10);
103104   DECLARE_DRIVER_INIT(lucky8a);
104105   DECLARE_DRIVER_INIT(nfb96sea);
105106   DECLARE_DRIVER_INIT(schery97a);
106   DECLARE_DRIVER_INIT(chrygld);
107107   DECLARE_DRIVER_INIT(rp35);
108   DECLARE_DRIVER_INIT(cb3);
109   DECLARE_DRIVER_INIT(cb3e);
110108   DECLARE_DRIVER_INIT(wcherry);
111109   DECLARE_DRIVER_INIT(cmv4);
112110   DECLARE_DRIVER_INIT(nfb96_c2);
113111   DECLARE_DRIVER_INIT(rp36);
114   DECLARE_DRIVER_INIT(cherrys);
115112   DECLARE_DRIVER_INIT(schery97);
116113   DECLARE_DRIVER_INIT(nfb96_d);
117114   DECLARE_DRIVER_INIT(tonypok);
r244845r244846
145142   INTERRUPT_GEN_MEMBER(lucky8_irq);
146143   void do_blockswaps(UINT8* ROM);
147144   void dump_to_file( UINT8* ROM);
148   UINT8 decrypt(UINT8 cipherText, UINT16 address);
149   UINT8 chry10_decrypt(UINT8 cipherText);
150145   required_device<cpu_device> m_maincpu;
151146   required_device<gfxdecode_device> m_gfxdecode;
152147   required_device<palette_device> m_palette;
153148};
154149
155150
151class cb3_state : public goldstar_state
152{
153public:
154   cb3_state(const machine_config &mconfig, device_type type, const char *tag)
155      : goldstar_state(mconfig, type, tag)
156   {
157   }
158
159   DECLARE_DRIVER_INIT(cb3);
160   DECLARE_DRIVER_INIT(cb3e);
161   DECLARE_DRIVER_INIT(cherrys);
162
163protected:
164   UINT8 decrypt(UINT8 cipherText, UINT16 address);
165};
166
167
168class chrygld_state : public goldstar_state
169{
170public:
171   chrygld_state(const machine_config &mconfig, device_type type, const char *tag)
172      : goldstar_state(mconfig, type, tag)
173   {
174   }
175
176   DECLARE_DRIVER_INIT(chrygld);
177   DECLARE_DRIVER_INIT(chry10);
178
179protected:
180   UINT8 chry10_decrypt(UINT8 cipherText);
181};
182
183
156184class sangho_state : public goldstar_state
157185{
158186public:


Previous 199869 Revisions Next


© 1997-2024 The MAME Team