trunk/src/mame/drivers/fastfred.c
| r243291 | r243292 | |
| 14 | 14 | #include "sound/ay8910.h" |
| 15 | 15 | |
| 16 | 16 | |
| 17 | void fastfred_state::machine_start() |
| 18 | { |
| 19 | save_item(NAME(m_charbank)); |
| 20 | save_item(NAME(m_colorbank)); |
| 21 | save_item(NAME(m_nmi_mask)); |
| 22 | save_item(NAME(m_sound_nmi_mask)); |
| 23 | } |
| 24 | |
| 17 | 25 | // This routine is a big hack, but the only way I can get the game working |
| 18 | 26 | // without knowing anything about the way the protection chip works. |
| 19 | 27 | // These values were derived based on disassembly of the code. Usually, it |
| r243291 | r243292 | |
| 124 | 132 | |
| 125 | 133 | MACHINE_START_MEMBER(fastfred_state,imago) |
| 126 | 134 | { |
| 135 | machine_start(); |
| 127 | 136 | m_gfxdecode->gfx(1)->set_source(m_imago_sprites); |
| 128 | 137 | } |
| 129 | 138 | |
| r243291 | r243292 | |
| 1039 | 1048 | m_hardware_type = 3; |
| 1040 | 1049 | } |
| 1041 | 1050 | |
| 1042 | | GAME( 1982, flyboy, 0, fastfred, flyboy, fastfred_state, flyboy, ROT90, "Kaneko", "Fly-Boy", 0 ) |
| 1043 | | GAME( 1982, flyboyb, flyboy, fastfred, flyboy, fastfred_state, flyboyb, ROT90, "bootleg", "Fly-Boy (bootleg)", 0 ) |
| 1044 | | GAME( 1982, fastfred, flyboy, fastfred, fastfred, fastfred_state, fastfred, ROT90, "Kaneko (Atari license)", "Fast Freddie", 0 ) |
| 1045 | | GAME( 1983, jumpcoas, 0, jumpcoas, jumpcoas, fastfred_state, jumpcoas, ROT90, "Kaneko", "Jump Coaster", 0 ) |
| 1046 | | GAME( 1983, jumpcoast,jumpcoas, jumpcoas, jumpcoas, fastfred_state, jumpcoas, ROT90, "Kaneko (Taito license)", "Jump Coaster (Taito)", 0 ) |
| 1047 | | GAME( 1983, boggy84, 0, jumpcoas, boggy84, fastfred_state, boggy84, ROT90, "Kaneko", "Boggy '84", 0 ) |
| 1048 | | GAME( 1983, boggy84b, boggy84, jumpcoas, boggy84, fastfred_state, boggy84b, ROT90, "bootleg (Eddie's Games)", "Boggy '84 (bootleg)", 0 ) |
| 1049 | | GAME( 1986, redrobin, 0, fastfred, redrobin, fastfred_state, flyboyb, ROT90, "Elettronolo", "Red Robin", 0 ) |
| 1051 | GAME( 1982, flyboy, 0, fastfred, flyboy, fastfred_state, flyboy, ROT90, "Kaneko", "Fly-Boy", GAME_SUPPORTS_SAVE ) |
| 1052 | GAME( 1982, flyboyb, flyboy, fastfred, flyboy, fastfred_state, flyboyb, ROT90, "bootleg", "Fly-Boy (bootleg)", GAME_SUPPORTS_SAVE ) |
| 1053 | GAME( 1982, fastfred, flyboy, fastfred, fastfred, fastfred_state, fastfred, ROT90, "Kaneko (Atari license)", "Fast Freddie", GAME_SUPPORTS_SAVE ) |
| 1054 | GAME( 1983, jumpcoas, 0, jumpcoas, jumpcoas, fastfred_state, jumpcoas, ROT90, "Kaneko", "Jump Coaster", GAME_SUPPORTS_SAVE ) |
| 1055 | GAME( 1983, jumpcoast,jumpcoas, jumpcoas, jumpcoas, fastfred_state, jumpcoas, ROT90, "Kaneko (Taito license)", "Jump Coaster (Taito)", GAME_SUPPORTS_SAVE ) |
| 1056 | GAME( 1983, boggy84, 0, jumpcoas, boggy84, fastfred_state, boggy84, ROT90, "Kaneko", "Boggy '84", GAME_SUPPORTS_SAVE ) |
| 1057 | GAME( 1983, boggy84b, boggy84, jumpcoas, boggy84, fastfred_state, boggy84b, ROT90, "bootleg (Eddie's Games)", "Boggy '84 (bootleg)", GAME_SUPPORTS_SAVE ) |
| 1058 | GAME( 1986, redrobin, 0, fastfred, redrobin, fastfred_state, flyboyb, ROT90, "Elettronolo", "Red Robin", GAME_SUPPORTS_SAVE ) |
| 1050 | 1059 | GAME( 1984, imago, 0, imago, imago, fastfred_state, imago, ROT90, "Acom", "Imago (cocktail set)", 0 ) |
| 1051 | 1060 | GAME( 1983, imagoa, imago, imago, imagoa, fastfred_state, imago, ROT90, "Acom", "Imago (no cocktail set)", 0 ) |
trunk/src/mame/includes/fastfred.h
| r243291 | r243292 | |
| 12 | 12 | public: |
| 13 | 13 | fastfred_state(const machine_config &mconfig, device_type type, const char *tag) |
| 14 | 14 | : galaxold_state(mconfig, type, tag), |
| 15 | m_gfxdecode(*this, "gfxdecode"), |
| 16 | m_palette(*this, "palette"), |
| 15 | 17 | m_videoram(*this, "videoram"), |
| 16 | 18 | m_spriteram(*this, "spriteram"), |
| 17 | 19 | m_attributesram(*this, "attributesram"), |
| 18 | 20 | m_background_color(*this, "bgcolor"), |
| 19 | | m_imago_fg_videoram(*this, "imago_fg_vram"), |
| 20 | | m_gfxdecode(*this, "gfxdecode"), |
| 21 | | m_palette(*this, "palette") { } |
| 21 | m_imago_fg_videoram(*this, "imago_fg_vram") { } |
| 22 | 22 | |
| 23 | | UINT8 m_imago_sprites[0x800*3]; |
| 24 | | UINT16 m_imago_sprites_address; |
| 25 | | UINT8 m_imago_sprites_bank; |
| 26 | | int m_hardware_type; |
| 23 | required_device<gfxdecode_device> m_gfxdecode; |
| 24 | required_device<palette_device> m_palette; |
| 25 | |
| 27 | 26 | required_shared_ptr<UINT8> m_videoram; |
| 28 | 27 | required_shared_ptr<UINT8> m_spriteram; |
| 29 | 28 | required_shared_ptr<UINT8> m_attributesram; |
| 30 | 29 | optional_shared_ptr<UINT8> m_background_color; |
| 31 | 30 | optional_shared_ptr<UINT8> m_imago_fg_videoram; |
| 32 | | required_device<gfxdecode_device> m_gfxdecode; |
| 33 | | required_device<palette_device> m_palette; |
| 34 | 31 | |
| 32 | int m_hardware_type; |
| 35 | 33 | UINT16 m_charbank; |
| 36 | 34 | UINT8 m_colorbank; |
| 35 | UINT8 m_nmi_mask; |
| 36 | UINT8 m_sound_nmi_mask; |
| 37 | UINT8 m_imago_sprites[0x800*3]; |
| 38 | UINT16 m_imago_sprites_address; |
| 39 | UINT8 m_imago_sprites_bank; |
| 40 | |
| 37 | 41 | tilemap_t *m_bg_tilemap; |
| 38 | 42 | tilemap_t *m_fg_tilemap; |
| 39 | 43 | tilemap_t *m_web_tilemap; |
| 40 | 44 | |
| 41 | | UINT8 m_nmi_mask; |
| 42 | | UINT8 m_sound_nmi_mask; |
| 43 | 45 | DECLARE_READ8_MEMBER(fastfred_custom_io_r); |
| 44 | 46 | DECLARE_READ8_MEMBER(flyboy_custom1_io_r); |
| 45 | 47 | DECLARE_READ8_MEMBER(flyboy_custom2_io_r); |
| r243291 | r243292 | |
| 51 | 53 | DECLARE_READ8_MEMBER(imago_sprites_offset_r); |
| 52 | 54 | DECLARE_WRITE8_MEMBER(nmi_mask_w); |
| 53 | 55 | DECLARE_WRITE8_MEMBER(sound_nmi_mask_w); |
| 56 | DECLARE_WRITE8_MEMBER(fastfred_videoram_w); |
| 57 | DECLARE_WRITE8_MEMBER(fastfred_attributes_w); |
| 58 | DECLARE_WRITE8_MEMBER(fastfred_charbank1_w); |
| 59 | DECLARE_WRITE8_MEMBER(fastfred_charbank2_w); |
| 60 | DECLARE_WRITE8_MEMBER(fastfred_colorbank1_w); |
| 61 | DECLARE_WRITE8_MEMBER(fastfred_colorbank2_w); |
| 62 | DECLARE_WRITE8_MEMBER(fastfred_flip_screen_x_w); |
| 63 | DECLARE_WRITE8_MEMBER(fastfred_flip_screen_y_w); |
| 64 | DECLARE_WRITE8_MEMBER(imago_fg_videoram_w); |
| 65 | DECLARE_WRITE8_MEMBER(imago_charbank_w); |
| 66 | |
| 54 | 67 | DECLARE_DRIVER_INIT(fastfred); |
| 55 | 68 | DECLARE_DRIVER_INIT(flyboy); |
| 56 | 69 | DECLARE_DRIVER_INIT(flyboyb); |
| r243291 | r243292 | |
| 58 | 71 | DECLARE_DRIVER_INIT(boggy84); |
| 59 | 72 | DECLARE_DRIVER_INIT(jumpcoas); |
| 60 | 73 | DECLARE_DRIVER_INIT(boggy84b); |
| 74 | |
| 61 | 75 | TILE_GET_INFO_MEMBER(get_tile_info); |
| 62 | 76 | TILE_GET_INFO_MEMBER(imago_get_tile_info_bg); |
| 63 | 77 | TILE_GET_INFO_MEMBER(imago_get_tile_info_fg); |
| 64 | 78 | TILE_GET_INFO_MEMBER(imago_get_tile_info_web); |
| 65 | | DECLARE_VIDEO_START(fastfred); |
| 79 | |
| 80 | INTERRUPT_GEN_MEMBER(vblank_irq); |
| 81 | INTERRUPT_GEN_MEMBER(sound_timer_irq); |
| 82 | |
| 83 | virtual void machine_start(); |
| 66 | 84 | DECLARE_PALETTE_INIT(fastfred); |
| 67 | 85 | DECLARE_MACHINE_START(imago); |
| 86 | DECLARE_VIDEO_START(fastfred); |
| 68 | 87 | DECLARE_VIDEO_START(imago); |
| 88 | |
| 69 | 89 | UINT32 screen_update_fastfred(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 70 | 90 | UINT32 screen_update_imago(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 71 | | INTERRUPT_GEN_MEMBER(vblank_irq); |
| 72 | | INTERRUPT_GEN_MEMBER(sound_timer_irq); |
| 73 | 91 | void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 74 | | DECLARE_WRITE8_MEMBER(fastfred_videoram_w); |
| 75 | | DECLARE_WRITE8_MEMBER(fastfred_attributes_w); |
| 76 | | DECLARE_WRITE8_MEMBER(fastfred_charbank1_w); |
| 77 | | DECLARE_WRITE8_MEMBER(fastfred_charbank2_w); |
| 78 | | DECLARE_WRITE8_MEMBER(fastfred_colorbank1_w); |
| 79 | | DECLARE_WRITE8_MEMBER(fastfred_colorbank2_w); |
| 80 | | DECLARE_WRITE8_MEMBER(fastfred_flip_screen_x_w); |
| 81 | | DECLARE_WRITE8_MEMBER(fastfred_flip_screen_y_w); |
| 82 | | |
| 83 | | DECLARE_WRITE8_MEMBER(imago_fg_videoram_w); |
| 84 | | DECLARE_WRITE8_MEMBER(imago_charbank_w); |
| 85 | 92 | }; |