trunk/src/mame/drivers/goldstar.c
| r244845 | r244846 | |
| 483 | 483 | } |
| 484 | 484 | |
| 485 | 485 | |
| 486 | | static ADDRESS_MAP_START( ncb3_map, AS_PROGRAM, 8, goldstar_state ) |
| 486 | static ADDRESS_MAP_START( ncb3_map, AS_PROGRAM, 8, cb3_state ) |
| 487 | 487 | AM_RANGE(0x0000, 0xb7ff) AM_ROM |
| 488 | 488 | AM_RANGE(0xb800, 0xbfff) AM_RAM AM_SHARE("nvram") |
| 489 | 489 | AM_RANGE(0xc000, 0xc7ff) AM_ROM |
| r244845 | r244846 | |
| 7839 | 7839 | |
| 7840 | 7840 | |
| 7841 | 7841 | |
| 7842 | | static MACHINE_CONFIG_START( cb3e, goldstar_state ) |
| 7842 | static MACHINE_CONFIG_START( cb3e, cb3_state ) |
| 7843 | 7843 | |
| 7844 | 7844 | /* basic machine hardware */ |
| 7845 | 7845 | MCFG_CPU_ADD("maincpu", Z80, CPU_CLOCK) |
| r244845 | r244846 | |
| 7889 | 7889 | |
| 7890 | 7890 | |
| 7891 | 7891 | |
| 7892 | | static MACHINE_CONFIG_START( cb3c, goldstar_state ) |
| 7892 | static MACHINE_CONFIG_START( cb3c, cb3_state ) |
| 7893 | 7893 | |
| 7894 | 7894 | /* basic machine hardware */ |
| 7895 | 7895 | MCFG_CPU_ADD("maincpu", Z80, CPU_CLOCK) |
| r244845 | r244846 | |
| 7938 | 7938 | MACHINE_CONFIG_END |
| 7939 | 7939 | |
| 7940 | 7940 | |
| 7941 | | static MACHINE_CONFIG_START( ncb3, goldstar_state ) |
| 7941 | static MACHINE_CONFIG_START( ncb3, cb3_state ) |
| 7942 | 7942 | |
| 7943 | 7943 | /* basic machine hardware */ |
| 7944 | 7944 | MCFG_CPU_ADD("maincpu", Z80, CPU_CLOCK) |
| r244845 | r244846 | |
| 13480 | 13480 | #endif |
| 13481 | 13481 | } |
| 13482 | 13482 | |
| 13483 | | UINT8 goldstar_state::decrypt(UINT8 cipherText, UINT16 address) |
| 13483 | UINT8 cb3_state::decrypt(UINT8 cipherText, UINT16 address) |
| 13484 | 13484 | { |
| 13485 | 13485 | int idx; |
| 13486 | 13486 | UINT8 output; |
| r244845 | r244846 | |
| 13497 | 13497 | return output ^ sbox[idx]; |
| 13498 | 13498 | } |
| 13499 | 13499 | |
| 13500 | | UINT8 goldstar_state::chry10_decrypt(UINT8 cipherText) |
| 13500 | UINT8 chrygld_state::chry10_decrypt(UINT8 cipherText) |
| 13501 | 13501 | { |
| 13502 | 13502 | return cipherText ^ (BIT(cipherText, 4) << 3) ^ (BIT(cipherText, 1) << 5) ^ (BIT(cipherText, 6) << 7); |
| 13503 | 13503 | } |
| 13504 | 13504 | |
| 13505 | | DRIVER_INIT_MEMBER(goldstar_state,chry10) |
| 13505 | DRIVER_INIT_MEMBER(chrygld_state, chry10) |
| 13506 | 13506 | { |
| 13507 | 13507 | UINT8 *ROM = memregion("maincpu")->base(); |
| 13508 | 13508 | int size = memregion("maincpu")->bytes(); |
| r244845 | r244846 | |
| 13526 | 13526 | dump_to_file(ROM); |
| 13527 | 13527 | } |
| 13528 | 13528 | |
| 13529 | | DRIVER_INIT_MEMBER(goldstar_state,cb3) |
| 13529 | DRIVER_INIT_MEMBER(cb3_state, cb3) |
| 13530 | 13530 | { |
| 13531 | 13531 | UINT8 *ROM = memregion("maincpu")->base(); |
| 13532 | 13532 | int size = memregion("maincpu")->bytes(); |
| r244845 | r244846 | |
| 13544 | 13544 | } |
| 13545 | 13545 | |
| 13546 | 13546 | |
| 13547 | | DRIVER_INIT_MEMBER(goldstar_state,chrygld) |
| 13547 | DRIVER_INIT_MEMBER(chrygld_state, chrygld) |
| 13548 | 13548 | { |
| 13549 | 13549 | int A; |
| 13550 | 13550 | UINT8 *ROM = memregion("maincpu")->base(); |
| r244845 | r244846 | |
| 13983 | 13983 | m_maincpu->space(AS_IO).install_read_handler(0x1a, 0x1a, read8_delegate(FUNC(goldstar_state::fixedvale4_r),this)); |
| 13984 | 13984 | } |
| 13985 | 13985 | |
| 13986 | | DRIVER_INIT_MEMBER(goldstar_state,cherrys) |
| 13986 | DRIVER_INIT_MEMBER(cb3_state, cherrys) |
| 13987 | 13987 | { |
| 13988 | 13988 | int i; |
| 13989 | 13989 | UINT8 *ROM = memregion("maincpu")->base(); |
| r244845 | r244846 | |
| 14073 | 14073 | |
| 14074 | 14074 | } |
| 14075 | 14075 | |
| 14076 | | DRIVER_INIT_MEMBER(goldstar_state, cb3e) |
| 14076 | DRIVER_INIT_MEMBER(cb3_state, cb3e) |
| 14077 | 14077 | { |
| 14078 | 14078 | /* program bitswap */ |
| 14079 | 14079 | int i; |
| r244845 | r244846 | |
| 14130 | 14130 | GAMEL( 199?, goldstar, 0, goldstar, goldstar, goldstar_state, goldstar, ROT0, "IGS", "Golden Star", 0, layout_goldstar ) |
| 14131 | 14131 | GAMEL( 199?, goldstbl, goldstar, goldstbl, goldstar, driver_device, 0, ROT0, "IGS", "Golden Star (Blue version)", 0, layout_goldstar ) |
| 14132 | 14132 | GAME( 199?, moonlght, goldstar, moonlght, goldstar, driver_device, 0, ROT0, "bootleg", "Moon Light (bootleg of Golden Star)", 0 ) |
| 14133 | | GAME( 199?, chrygld, 0, chrygld, chrygld, goldstar_state, chrygld, ROT0, "bootleg", "Cherry Gold I", 0 ) |
| 14134 | | GAME( 199?, chry10, 0, chrygld, chry10, goldstar_state, chry10, ROT0, "bootleg", "Cherry 10 (bootleg with PIC16F84)", 0 ) |
| 14133 | GAME( 199?, chrygld, 0, chrygld, chrygld, chrygld_state, chrygld, ROT0, "bootleg", "Cherry Gold I", 0 ) |
| 14134 | GAME( 199?, chry10, 0, chrygld, chry10, chrygld_state, chry10, ROT0, "bootleg", "Cherry 10 (bootleg with PIC16F84)", 0 ) |
| 14135 | 14135 | GAME( 199?, goldfrui, goldstar, goldfrui, goldstar, driver_device, 0, ROT0, "bootleg", "Gold Fruit", 0 ) // maybe fullname should be 'Gold Fruit (main 40%)' |
| 14136 | 14136 | GAME( 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... |
| 14137 | 14137 | GAME( 2001, wcherry, 0, wcherry, chrygld, goldstar_state, wcherry, ROT0, "bootleg", "Win Cherry (ver 0.16 - 19990219)", GAME_NOT_WORKING ) |
| r244845 | r244846 | |
| 14142 | 14142 | // are these really dyna, or bootlegs? |
| 14143 | 14143 | GAMEL( 199?, ncb3, 0, ncb3, ncb3, driver_device, 0, ROT0, "Dyna", "Cherry Bonus III (ver.1.40, set 1)", 0, layout_cherryb3 ) |
| 14144 | 14144 | GAMEL( 199?, cb3a, ncb3, ncb3, cb3a, driver_device, 0, ROT0, "Dyna", "Cherry Bonus III (ver.1.40, set 2)", 0, layout_cherryb3 ) |
| 14145 | | GAMEL( 199?, cb3, ncb3, ncb3, ncb3, goldstar_state, cb3, ROT0, "Dyna", "Cherry Bonus III (ver.1.40, encrypted)", 0, layout_cherryb3 ) |
| 14146 | | GAMEL( 199?, cb3b, ncb3, cherrys, ncb3, goldstar_state, cherrys, ROT0, "Dyna", "Cherry Bonus III (alt)", 0, layout_cherryb3 ) |
| 14147 | | GAME( 199?, cb3c, ncb3, cb3c, chrygld, goldstar_state, cb3, ROT0, "bootleg", "Cherry Bonus III (alt, set 2)", GAME_NOT_WORKING) |
| 14145 | GAMEL( 199?, cb3, ncb3, ncb3, ncb3, cb3_state, cb3, ROT0, "Dyna", "Cherry Bonus III (ver.1.40, encrypted)", 0, layout_cherryb3 ) |
| 14146 | GAMEL( 199?, cb3b, ncb3, cherrys, ncb3, cb3_state, cherrys, ROT0, "Dyna", "Cherry Bonus III (alt)", 0, layout_cherryb3 ) |
| 14147 | GAME( 199?, cb3c, ncb3, cb3c, chrygld, cb3_state, cb3, ROT0, "bootleg", "Cherry Bonus III (alt, set 2)", GAME_NOT_WORKING) |
| 14148 | 14148 | GAMEL( 199?, cb3d, ncb3, ncb3, ncb3, driver_device, 0, ROT0, "bootleg", "Cherry Bonus III (set 3)", 0, layout_cherryb3 ) |
| 14149 | | GAMEL( 199?, cb3e, ncb3, cb3e, chrygld, goldstar_state, cb3e, ROT0, "bootleg", "Cherry Bonus III (set 4, encrypted bootleg)", 0, layout_cherryb3 ) |
| 14149 | GAMEL( 199?, cb3e, ncb3, cb3e, chrygld, cb3_state, cb3e, ROT0, "bootleg", "Cherry Bonus III (set 4, encrypted bootleg)", 0, layout_cherryb3 ) |
| 14150 | 14150 | |
| 14151 | 14151 | GAME( 1996, cmast97, ncb3, cm97, chrygld, driver_device, 0, ROT0, "Dyna", "Cherry Master '97", GAME_NOT_WORKING) // fix prom decode |
| 14152 | 14152 | |
trunk/src/mame/includes/goldstar.h
| r244845 | r244846 | |
| 15 | 15 | m_reel3_scroll(*this, "reel3_scroll"), |
| 16 | 16 | m_maincpu(*this, "maincpu"), |
| 17 | 17 | m_gfxdecode(*this, "gfxdecode"), |
| 18 | | m_palette(*this, "palette") { } |
| 18 | m_palette(*this, "palette") |
| 19 | { |
| 20 | } |
| 19 | 21 | |
| 20 | 22 | int m_dataoffset; |
| 21 | 23 | |
| r244845 | r244846 | |
| 99 | 101 | DECLARE_DRIVER_INIT(cmast91); |
| 100 | 102 | DECLARE_DRIVER_INIT(nfb96_dk); |
| 101 | 103 | DECLARE_DRIVER_INIT(cm); |
| 102 | | DECLARE_DRIVER_INIT(chry10); |
| 103 | 104 | DECLARE_DRIVER_INIT(lucky8a); |
| 104 | 105 | DECLARE_DRIVER_INIT(nfb96sea); |
| 105 | 106 | DECLARE_DRIVER_INIT(schery97a); |
| 106 | | DECLARE_DRIVER_INIT(chrygld); |
| 107 | 107 | DECLARE_DRIVER_INIT(rp35); |
| 108 | | DECLARE_DRIVER_INIT(cb3); |
| 109 | | DECLARE_DRIVER_INIT(cb3e); |
| 110 | 108 | DECLARE_DRIVER_INIT(wcherry); |
| 111 | 109 | DECLARE_DRIVER_INIT(cmv4); |
| 112 | 110 | DECLARE_DRIVER_INIT(nfb96_c2); |
| 113 | 111 | DECLARE_DRIVER_INIT(rp36); |
| 114 | | DECLARE_DRIVER_INIT(cherrys); |
| 115 | 112 | DECLARE_DRIVER_INIT(schery97); |
| 116 | 113 | DECLARE_DRIVER_INIT(nfb96_d); |
| 117 | 114 | DECLARE_DRIVER_INIT(tonypok); |
| r244845 | r244846 | |
| 145 | 142 | INTERRUPT_GEN_MEMBER(lucky8_irq); |
| 146 | 143 | void do_blockswaps(UINT8* ROM); |
| 147 | 144 | void dump_to_file( UINT8* ROM); |
| 148 | | UINT8 decrypt(UINT8 cipherText, UINT16 address); |
| 149 | | UINT8 chry10_decrypt(UINT8 cipherText); |
| 150 | 145 | required_device<cpu_device> m_maincpu; |
| 151 | 146 | required_device<gfxdecode_device> m_gfxdecode; |
| 152 | 147 | required_device<palette_device> m_palette; |
| 153 | 148 | }; |
| 154 | 149 | |
| 155 | 150 | |
| 151 | class cb3_state : public goldstar_state |
| 152 | { |
| 153 | public: |
| 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 | |
| 163 | protected: |
| 164 | UINT8 decrypt(UINT8 cipherText, UINT16 address); |
| 165 | }; |
| 166 | |
| 167 | |
| 168 | class chrygld_state : public goldstar_state |
| 169 | { |
| 170 | public: |
| 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 | |
| 179 | protected: |
| 180 | UINT8 chry10_decrypt(UINT8 cipherText); |
| 181 | }; |
| 182 | |
| 183 | |
| 156 | 184 | class sangho_state : public goldstar_state |
| 157 | 185 | { |
| 158 | 186 | public: |