trunk/src/mame/drivers/dec0.c
| r242888 | r242889 | |
| 526 | 526 | |
| 527 | 527 | |
| 528 | 528 | |
| 529 | void dec0_automat_state::machine_start() |
| 530 | { |
| 531 | save_item(NAME(m_automat_adpcm_byte)); |
| 532 | save_item(NAME(m_automat_msm5205_vclk_toggle)); |
| 533 | save_item(NAME(m_automat_scroll_regs)); |
| 534 | } |
| 529 | 535 | |
| 530 | 536 | |
| 531 | | |
| 532 | 537 | /* swizzle the palette writes around so we can use the same gfx plane ordering as the originals */ |
| 533 | 538 | READ16_MEMBER( dec0_automat_state::automat_palette_r ) |
| 534 | 539 | { |
| r242888 | r242889 | |
| 3034 | 3039 | return 0xffff; |
| 3035 | 3040 | } |
| 3036 | 3041 | |
| 3037 | | READ16_MEMBER(dec0_state::ffantasybl_vblank_r) |
| 3038 | | { |
| 3039 | | return ioport("VBLANK")->read(); |
| 3040 | | } |
| 3041 | | |
| 3042 | 3042 | DRIVER_INIT_MEMBER(dec0_state,ffantasybl) |
| 3043 | 3043 | { |
| 3044 | 3044 | m_maincpu->space(AS_PROGRAM).install_ram(0x24c880, 0x24cbff); // what is this? layer 3-related?? |
| 3045 | 3045 | |
| 3046 | 3046 | m_maincpu->space(AS_PROGRAM).install_read_handler(0x00242024, 0x00242025, read16_delegate(FUNC(dec0_state::ffantasybl_242024_r),this)); |
| 3047 | | m_maincpu->space(AS_PROGRAM).install_read_handler(0x00ff87ee, 0x00ff87ef, read16_delegate(FUNC(dec0_state::ffantasybl_vblank_r),this)); |
| 3047 | m_maincpu->space(AS_PROGRAM).install_read_port(0x00ff87ee, 0x00ff87ef, "VBLANK"); |
| 3048 | 3048 | } |
| 3049 | 3049 | |
| 3050 | 3050 | /******************************************************************************/ |
| 3051 | 3051 | |
| 3052 | 3052 | // YEAR, NAME, PARENT, MACHINE, INPUT, STATE/DEVICE, INIT, MONITOR,COMPANY, FULLNAME, FLAGS |
| 3053 | | GAME( 1987, hbarrel, 0, hbarrel, hbarrel, dec0_state, hbarrel, ROT270, "Data East USA", "Heavy Barrel (US)", 0 ) |
| 3054 | | GAME( 1987, hbarrelw, hbarrel, hbarrel, hbarrel, dec0_state, hbarrel, ROT270, "Data East Corporation", "Heavy Barrel (World)", 0 ) |
| 3055 | | GAME( 1988, baddudes, 0, baddudes, baddudes, dec0_state, baddudes, ROT0, "Data East USA", "Bad Dudes vs. Dragonninja (US)", 0 ) |
| 3056 | | GAME( 1988, drgninja, baddudes, baddudes, drgninja, dec0_state, baddudes, ROT0, "Data East Corporation", "Dragonninja (Japan)", 0 ) |
| 3057 | | GAME( 1988, birdtry, 0, birdtry, birdtry, dec0_state, birdtry, ROT270, "Data East Corporation", "Birdie Try (Japan)", GAME_UNEMULATED_PROTECTION ) |
| 3058 | | GAME( 1988, robocop, 0, robocop, robocop, dec0_state, robocop, ROT0, "Data East Corporation", "Robocop (World revision 4)", 0 ) |
| 3059 | | GAME( 1988, robocopw, robocop, robocop, robocop, dec0_state, robocop, ROT0, "Data East Corporation", "Robocop (World revision 3)", 0 ) |
| 3060 | | GAME( 1988, robocopj, robocop, robocop, robocop, dec0_state, robocop, ROT0, "Data East Corporation", "Robocop (Japan)", 0 ) |
| 3061 | | GAME( 1988, robocopu, robocop, robocop, robocop, dec0_state, robocop, ROT0, "Data East USA", "Robocop (US revision 1)", 0 ) |
| 3062 | | GAME( 1988, robocopu0, robocop, robocop, robocop, dec0_state, robocop, ROT0, "Data East USA", "Robocop (US revision 0)", 0 ) |
| 3063 | | GAME( 1989, hippodrm, 0, hippodrm, hippodrm, dec0_state, hippodrm, ROT0, "Data East USA", "Hippodrome (US)", 0 ) |
| 3064 | | GAME( 1989, ffantasy, hippodrm, hippodrm, ffantasy, dec0_state, hippodrm, ROT0, "Data East Corporation", "Fighting Fantasy (Japan revision 2)", 0 ) |
| 3065 | | GAME( 1989, ffantasya, hippodrm, hippodrm, ffantasy, dec0_state, hippodrm, ROT0, "Data East Corporation", "Fighting Fantasy (Japan)", 0 ) |
| 3066 | | GAME( 1989, secretag, 0, slyspy, slyspy, dec0_state, slyspy, ROT0, "Data East Corporation", "Secret Agent (World revision 3)", 0 ) |
| 3067 | | GAME( 1989, secretagj, secretag, slyspy, slyspy, dec0_state, slyspy, ROT0, "Data East Corporation", "Secret Agent (Japan revision 2)", 0 ) |
| 3068 | | GAME( 1989, slyspy, secretag, slyspy, slyspy, dec0_state, slyspy, ROT0, "Data East USA", "Sly Spy (US revision 3)", 0 ) |
| 3069 | | GAME( 1989, slyspy2, secretag, slyspy, slyspy, dec0_state, slyspy, ROT0, "Data East USA", "Sly Spy (US revision 2)", 0 ) |
| 3070 | | GAME( 1989, midres, 0, midres, midres, driver_device, 0, ROT0, "Data East Corporation", "Midnight Resistance (World)", 0 ) |
| 3071 | | GAME( 1989, midresu, midres, midres, midresu, driver_device, 0, ROT0, "Data East USA", "Midnight Resistance (US)", 0 ) |
| 3072 | | GAME( 1989, midresj, midres, midres, midresu, driver_device, 0, ROT0, "Data East Corporation", "Midnight Resistance (Japan)", 0 ) |
| 3073 | | GAME( 1990, bouldash, 0, slyspy, bouldash, dec0_state, slyspy, ROT0, "Data East Corporation (licensed from First Star)", "Boulder Dash / Boulder Dash Part 2 (World)", 0 ) |
| 3074 | | GAME( 1990, bouldashj, bouldash, slyspy, bouldash, dec0_state, slyspy, ROT0, "Data East Corporation (licensed from First Star)", "Boulder Dash / Boulder Dash Part 2 (Japan)", 0 ) |
| 3053 | GAME( 1987, hbarrel, 0, hbarrel, hbarrel, dec0_state, hbarrel, ROT270, "Data East USA", "Heavy Barrel (US)", GAME_SUPPORTS_SAVE ) |
| 3054 | GAME( 1987, hbarrelw, hbarrel, hbarrel, hbarrel, dec0_state, hbarrel, ROT270, "Data East Corporation", "Heavy Barrel (World)", GAME_SUPPORTS_SAVE ) |
| 3055 | GAME( 1988, baddudes, 0, baddudes, baddudes, dec0_state, baddudes, ROT0, "Data East USA", "Bad Dudes vs. Dragonninja (US)", GAME_SUPPORTS_SAVE ) |
| 3056 | GAME( 1988, drgninja, baddudes, baddudes, drgninja, dec0_state, baddudes, ROT0, "Data East Corporation", "Dragonninja (Japan)", GAME_SUPPORTS_SAVE ) |
| 3057 | GAME( 1988, birdtry, 0, birdtry, birdtry, dec0_state, birdtry, ROT270, "Data East Corporation", "Birdie Try (Japan)", GAME_UNEMULATED_PROTECTION | GAME_SUPPORTS_SAVE ) |
| 3058 | GAME( 1988, robocop, 0, robocop, robocop, dec0_state, robocop, ROT0, "Data East Corporation", "Robocop (World revision 4)", GAME_SUPPORTS_SAVE ) |
| 3059 | GAME( 1988, robocopw, robocop, robocop, robocop, dec0_state, robocop, ROT0, "Data East Corporation", "Robocop (World revision 3)", GAME_SUPPORTS_SAVE ) |
| 3060 | GAME( 1988, robocopj, robocop, robocop, robocop, dec0_state, robocop, ROT0, "Data East Corporation", "Robocop (Japan)", GAME_SUPPORTS_SAVE ) |
| 3061 | GAME( 1988, robocopu, robocop, robocop, robocop, dec0_state, robocop, ROT0, "Data East USA", "Robocop (US revision 1)", GAME_SUPPORTS_SAVE ) |
| 3062 | GAME( 1988, robocopu0, robocop, robocop, robocop, dec0_state, robocop, ROT0, "Data East USA", "Robocop (US revision 0)", GAME_SUPPORTS_SAVE ) |
| 3063 | GAME( 1989, hippodrm, 0, hippodrm, hippodrm, dec0_state, hippodrm, ROT0, "Data East USA", "Hippodrome (US)", GAME_SUPPORTS_SAVE ) |
| 3064 | GAME( 1989, ffantasy, hippodrm, hippodrm, ffantasy, dec0_state, hippodrm, ROT0, "Data East Corporation", "Fighting Fantasy (Japan revision 2)", GAME_SUPPORTS_SAVE ) |
| 3065 | GAME( 1989, ffantasya, hippodrm, hippodrm, ffantasy, dec0_state, hippodrm, ROT0, "Data East Corporation", "Fighting Fantasy (Japan)", GAME_SUPPORTS_SAVE ) |
| 3066 | GAME( 1989, secretag, 0, slyspy, slyspy, dec0_state, slyspy, ROT0, "Data East Corporation", "Secret Agent (World revision 3)", GAME_SUPPORTS_SAVE ) |
| 3067 | GAME( 1989, secretagj, secretag, slyspy, slyspy, dec0_state, slyspy, ROT0, "Data East Corporation", "Secret Agent (Japan revision 2)", GAME_SUPPORTS_SAVE ) |
| 3068 | GAME( 1989, slyspy, secretag, slyspy, slyspy, dec0_state, slyspy, ROT0, "Data East USA", "Sly Spy (US revision 3)", GAME_SUPPORTS_SAVE ) |
| 3069 | GAME( 1989, slyspy2, secretag, slyspy, slyspy, dec0_state, slyspy, ROT0, "Data East USA", "Sly Spy (US revision 2)", GAME_SUPPORTS_SAVE ) |
| 3070 | GAME( 1989, midres, 0, midres, midres, driver_device, 0, ROT0, "Data East Corporation", "Midnight Resistance (World)", GAME_SUPPORTS_SAVE ) |
| 3071 | GAME( 1989, midresu, midres, midres, midresu, driver_device, 0, ROT0, "Data East USA", "Midnight Resistance (US)", GAME_SUPPORTS_SAVE ) |
| 3072 | GAME( 1989, midresj, midres, midres, midresu, driver_device, 0, ROT0, "Data East Corporation", "Midnight Resistance (Japan)", GAME_SUPPORTS_SAVE ) |
| 3073 | GAME( 1990, bouldash, 0, slyspy, bouldash, dec0_state, slyspy, ROT0, "Data East Corporation (licensed from First Star)", "Boulder Dash / Boulder Dash Part 2 (World)", GAME_SUPPORTS_SAVE ) |
| 3074 | GAME( 1990, bouldashj, bouldash, slyspy, bouldash, dec0_state, slyspy, ROT0, "Data East Corporation (licensed from First Star)", "Boulder Dash / Boulder Dash Part 2 (Japan)", GAME_SUPPORTS_SAVE ) |
| 3075 | 3075 | |
| 3076 | 3076 | // bootlegs |
| 3077 | 3077 | |
| 3078 | 3078 | // more or less just an unprotected versions of the game, everything intact |
| 3079 | | GAME( 1988, robocopb, robocop, robocopb, robocop, dec0_state, robocop, ROT0, "bootleg", "Robocop (World bootleg)", 0) |
| 3080 | | GAME( 1988, drgninjab, baddudes, baddudes, drgninja, dec0_state, baddudes, ROT0, "bootleg", "Dragonninja (bootleg)", 0 ) |
| 3079 | GAME( 1988, robocopb, robocop, robocopb, robocop, dec0_state, robocop, ROT0, "bootleg", "Robocop (World bootleg)", GAME_SUPPORTS_SAVE ) |
| 3080 | GAME( 1988, drgninjab, baddudes, baddudes, drgninja, dec0_state, baddudes, ROT0, "bootleg", "Dragonninja (bootleg)", GAME_SUPPORTS_SAVE ) |
| 3081 | 3081 | |
| 3082 | 3082 | // this is a common bootleg board |
| 3083 | | GAME( 1989, midresb, midres, midresb, midresb, dec0_state, midresb, ROT0, "bootleg", "Midnight Resistance (bootleg with 68705)", 0 ) // need to hook up 68705? |
| 3084 | | GAME( 1989, ffantasybl, hippodrm, ffantasybl, ffantasybl, dec0_state, ffantasybl, ROT0, "bootleg", "Fighting Fantasy (bootleg with 68705)", GAME_IMPERFECT_GRAPHICS ) // 68705 not dumped, might be the same as midresb |
| 3083 | GAME( 1989, midresb, midres, midresb, midresb, dec0_state, midresb, ROT0, "bootleg", "Midnight Resistance (bootleg with 68705)", GAME_SUPPORTS_SAVE ) // need to hook up 68705? |
| 3084 | GAME( 1989, ffantasybl, hippodrm, ffantasybl, ffantasybl, dec0_state, ffantasybl, ROT0, "bootleg", "Fighting Fantasy (bootleg with 68705)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE ) // 68705 not dumped, might be the same as midresb |
| 3085 | 3085 | /* A Bad Dudes bootleg with 68705 like the midres and ffantasy ones exists, but is not dumped */ |
| 3086 | 3086 | |
| 3087 | 3087 | // these are different to the above but quite similar to each other |
| 3088 | | GAME( 1988, automat, robocop, automat, robocop, dec0_state, robocop, ROT0, "bootleg", "Automat (bootleg of Robocop)", GAME_NOT_WORKING ) // sound rom / music from section z with mods for ADPCM? |
| 3089 | | GAME( 1989, secretab, secretag, secretab, slyspy, dec0_state, slyspy, ROT0, "bootleg", "Secret Agent (bootleg)", GAME_NOT_WORKING ) |
| 3088 | GAME( 1988, automat, robocop, automat, robocop, dec0_state, robocop, ROT0, "bootleg", "Automat (bootleg of Robocop)", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) // sound rom / music from section z with mods for ADPCM? |
| 3089 | GAME( 1989, secretab, secretag, secretab, slyspy, dec0_state, slyspy, ROT0, "bootleg", "Secret Agent (bootleg)", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) |
trunk/src/mame/includes/dec0.h
| r242888 | r242889 | |
| 8 | 8 | public: |
| 9 | 9 | dec0_state(const machine_config &mconfig, device_type type, const char *tag) |
| 10 | 10 | : driver_device(mconfig, type, tag), |
| 11 | | m_ram(*this, "ram"), |
| 12 | | m_spriteram(*this, "spriteram"), |
| 13 | | m_paletteram(*this, "palette"), |
| 14 | | m_robocop_shared_ram(*this, "robocop_shared"), |
| 15 | | m_hippodrm_shared_ram(*this, "hippodrm_shared"), |
| 11 | m_maincpu(*this, "maincpu"), |
| 12 | m_audiocpu(*this, "audiocpu"), |
| 13 | m_subcpu(*this, "sub"), |
| 14 | m_mcu(*this, "mcu"), |
| 15 | m_msm(*this, "msm"), |
| 16 | m_palette(*this, "palette"), |
| 16 | 17 | m_tilegen1(*this, "tilegen1"), |
| 17 | 18 | m_tilegen2(*this, "tilegen2"), |
| 18 | 19 | m_tilegen3(*this, "tilegen3"), |
| 19 | 20 | m_spritegen(*this, "spritegen"), |
| 20 | 21 | m_pfprotect(*this, "pfprotect"), |
| 21 | | m_maincpu(*this, "maincpu"), |
| 22 | | m_audiocpu(*this, "audiocpu"), |
| 23 | | m_subcpu(*this, "sub"), |
| 24 | | m_mcu(*this, "mcu"), |
| 25 | | m_msm(*this, "msm"), |
| 26 | | m_palette(*this, "palette") { } |
| 22 | m_ram(*this, "ram"), |
| 23 | m_spriteram(*this, "spriteram"), |
| 24 | m_paletteram(*this, "palette"), |
| 25 | m_robocop_shared_ram(*this, "robocop_shared"), |
| 26 | m_hippodrm_shared_ram(*this, "hippodrm_shared") { } |
| 27 | |
| 28 | required_device<cpu_device> m_maincpu; |
| 29 | required_device<cpu_device> m_audiocpu; |
| 30 | optional_device<cpu_device> m_subcpu; |
| 31 | optional_device<cpu_device> m_mcu; |
| 32 | optional_device<msm5205_device> m_msm; |
| 33 | required_device<palette_device> m_palette; |
| 34 | optional_device<deco_bac06_device> m_tilegen1; |
| 35 | optional_device<deco_bac06_device> m_tilegen2; |
| 36 | optional_device<deco_bac06_device> m_tilegen3; |
| 37 | optional_device<deco_mxc06_device> m_spritegen; |
| 38 | optional_device<address_map_bank_device> m_pfprotect; |
| 27 | 39 | |
| 28 | 40 | required_shared_ptr<UINT16> m_ram; |
| 29 | 41 | required_shared_ptr<UINT16> m_spriteram; |
| r242888 | r242889 | |
| 31 | 43 | optional_shared_ptr<UINT8> m_robocop_shared_ram; |
| 32 | 44 | optional_shared_ptr<UINT8> m_hippodrm_shared_ram; |
| 33 | 45 | |
| 34 | | optional_device<deco_bac06_device> m_tilegen1; |
| 35 | | optional_device<deco_bac06_device> m_tilegen2; |
| 36 | | optional_device<deco_bac06_device> m_tilegen3; |
| 37 | | optional_device<deco_mxc06_device> m_spritegen; |
| 38 | | |
| 39 | | optional_device<address_map_bank_device> m_pfprotect; |
| 40 | | |
| 41 | | int m_GAME; |
| 46 | int m_game; |
| 42 | 47 | int m_i8751_return; |
| 43 | 48 | int m_i8751_command; |
| 44 | 49 | int m_slyspy_state; |
| 45 | 50 | int m_hippodrm_msb; |
| 46 | 51 | int m_hippodrm_lsb; |
| 47 | 52 | UINT8 m_i8751_ports[4]; |
| 48 | | |
| 49 | 53 | UINT16 *m_buffered_spriteram; |
| 50 | 54 | UINT16 m_pri; |
| 55 | |
| 51 | 56 | DECLARE_WRITE16_MEMBER(dec0_control_w); |
| 52 | 57 | DECLARE_WRITE16_MEMBER(slyspy_control_w); |
| 53 | 58 | DECLARE_WRITE16_MEMBER(midres_sound_w); |
| r242888 | r242889 | |
| 70 | 75 | DECLARE_WRITE16_MEMBER(dec0_update_sprites_w); |
| 71 | 76 | DECLARE_WRITE16_MEMBER(dec0_priority_w); |
| 72 | 77 | DECLARE_READ16_MEMBER(ffantasybl_242024_r); |
| 73 | | DECLARE_READ16_MEMBER(ffantasybl_vblank_r); |
| 78 | DECLARE_WRITE_LINE_MEMBER(sound_irq); |
| 79 | DECLARE_WRITE_LINE_MEMBER(sound_irq2); |
| 80 | |
| 74 | 81 | DECLARE_DRIVER_INIT(robocop); |
| 75 | 82 | DECLARE_DRIVER_INIT(hippodrm); |
| 76 | 83 | DECLARE_DRIVER_INIT(hbarrel); |
| r242888 | r242889 | |
| 79 | 86 | DECLARE_DRIVER_INIT(baddudes); |
| 80 | 87 | DECLARE_DRIVER_INIT(midresb); |
| 81 | 88 | DECLARE_DRIVER_INIT(ffantasybl); |
| 89 | |
| 90 | virtual void machine_start(); |
| 91 | DECLARE_MACHINE_RESET(slyspy); |
| 82 | 92 | DECLARE_VIDEO_START(dec0); |
| 83 | | DECLARE_MACHINE_RESET(slyspy); |
| 84 | 93 | DECLARE_VIDEO_START(dec0_nodma); |
| 94 | |
| 85 | 95 | UINT32 screen_update_hbarrel(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 86 | 96 | UINT32 screen_update_baddudes(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 87 | 97 | UINT32 screen_update_birdtry(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| r242888 | r242889 | |
| 89 | 99 | UINT32 screen_update_hippodrm(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 90 | 100 | UINT32 screen_update_slyspy(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 91 | 101 | UINT32 screen_update_midres(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 102 | |
| 92 | 103 | void baddudes_i8751_write(int data); |
| 93 | 104 | void birdtry_i8751_write(int data); |
| 94 | 105 | void dec0_i8751_write(int data); |
| 95 | 106 | void dec0_i8751_reset(); |
| 96 | 107 | void h6280_decrypt(const char *cputag); |
| 97 | | DECLARE_WRITE_LINE_MEMBER(sound_irq); |
| 98 | | DECLARE_WRITE_LINE_MEMBER(sound_irq2); |
| 99 | | required_device<cpu_device> m_maincpu; |
| 100 | | required_device<cpu_device> m_audiocpu; |
| 101 | | optional_device<cpu_device> m_subcpu; |
| 102 | | optional_device<cpu_device> m_mcu; |
| 103 | | optional_device<msm5205_device> m_msm; |
| 104 | | required_device<palette_device> m_palette; |
| 105 | 108 | }; |
| 106 | 109 | |
| 107 | 110 | |
| r242888 | r242889 | |
| 114 | 117 | |
| 115 | 118 | UINT8 m_automat_adpcm_byte; |
| 116 | 119 | int m_automat_msm5205_vclk_toggle; |
| 120 | UINT16 m_automat_scroll_regs[4]; |
| 121 | |
| 117 | 122 | DECLARE_WRITE16_MEMBER(automat_control_w); |
| 118 | 123 | DECLARE_WRITE8_MEMBER(automat_adpcm_w); |
| 119 | 124 | DECLARE_READ16_MEMBER( automat_palette_r ); |
| r242888 | r242889 | |
| 122 | 127 | { |
| 123 | 128 | COMBINE_DATA(&m_automat_scroll_regs[offset]); |
| 124 | 129 | } |
| 125 | | UINT16 m_automat_scroll_regs[4]; |
| 126 | | |
| 130 | DECLARE_WRITE_LINE_MEMBER(automat_vclk_cb); |
| 131 | |
| 132 | virtual void machine_start(); |
| 133 | |
| 127 | 134 | UINT32 screen_update_automat(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 128 | 135 | UINT32 screen_update_secretab(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 129 | | DECLARE_WRITE_LINE_MEMBER(automat_vclk_cb); |
| 130 | 136 | }; |