trunk/src/mame/drivers/stuntair.c
| r22891 | r22892 | |
| 4 | 4 | |
| 5 | 5 | Stunt Air by Nuova Videotron 1983 |
| 6 | 6 | |
| 7 | | Finally i've found this one,too.This romset comes from a rare italian pcb.Game is a Sega's Star Jacker clone with different code,graphics,sound and hardware. |
| 7 | Finally i've found this one,too.This romset comes from a rare italian pcb. |
| 8 | 8 | |
| 9 | 9 | Hardware info (complete): |
| 10 | 10 | Main cpu Z80A |
| r22891 | r22892 | |
| 84 | 84 | m_fgram(*this, "fgram"), |
| 85 | 85 | m_bgram(*this, "bgram"), |
| 86 | 86 | m_bgattrram(*this, "bgattrram") |
| 87 | | { } |
| 87 | { |
| 88 | m_bg_xscroll = 0; |
| 89 | } |
| 88 | 90 | |
| 89 | 91 | required_device<cpu_device> m_maincpu; |
| 90 | 92 | required_device<cpu_device> m_audiocpu; |
| r22891 | r22892 | |
| 95 | 97 | tilemap_t *m_fg_tilemap; |
| 96 | 98 | tilemap_t *m_bg_tilemap; |
| 97 | 99 | |
| 100 | UINT8 m_bg_xscroll; |
| 101 | |
| 98 | 102 | DECLARE_WRITE8_MEMBER(stuntair_fgram_w); |
| 99 | 103 | TILE_GET_INFO_MEMBER(get_stuntair_fg_tile_info); |
| 100 | 104 | |
| r22891 | r22892 | |
| 102 | 106 | DECLARE_WRITE8_MEMBER(stuntair_bgattrram_w); |
| 103 | 107 | TILE_GET_INFO_MEMBER(get_stuntair_bg_tile_info); |
| 104 | 108 | |
| 109 | DECLARE_WRITE8_MEMBER(stuntair_bgxscroll_w); |
| 105 | 110 | |
| 106 | 111 | DECLARE_READ8_MEMBER(stuntair_unk_r) |
| 107 | 112 | { |
| r22891 | r22892 | |
| 125 | 130 | AM_RANGE(0xd000, 0xd3ff) AM_RAM_WRITE(stuntair_bgram_w) AM_SHARE("bgram") // bg |
| 126 | 131 | AM_RANGE(0xd800, 0xdfff) AM_RAM |
| 127 | 132 | |
| 128 | | AM_RANGE(0xe000, 0xe000) AM_READ(stuntair_unk_r) AM_WRITENOP |
| 129 | | AM_RANGE(0xe800, 0xe800) AM_READ(stuntair_unk_r) AM_WRITENOP |
| 133 | AM_RANGE(0xe000, 0xe000) AM_READ(stuntair_unk_r) |
| 134 | AM_RANGE(0xe800, 0xe800) AM_READ(stuntair_unk_r) AM_WRITE(stuntair_bgxscroll_w) |
| 130 | 135 | |
| 131 | | AM_RANGE(0xf000, 0xf000) AM_READ(stuntair_unk_r) AM_WRITENOP |
| 136 | AM_RANGE(0xf000, 0xf000) AM_READ(stuntair_unk_r) |
| 132 | 137 | AM_RANGE(0xf001, 0xf001) AM_WRITENOP // might be nmi enable |
| 133 | | AM_RANGE(0xf002, 0xf002) AM_READ(stuntair_unk_r) AM_WRITENOP |
| 134 | | AM_RANGE(0xf003, 0xf003) AM_READ(stuntair_unk_r) AM_WRITENOP |
| 135 | | AM_RANGE(0xf004, 0xf004) AM_WRITENOP |
| 136 | | AM_RANGE(0xf005, 0xf005) AM_WRITENOP |
| 137 | | AM_RANGE(0xf006, 0xf006) AM_WRITENOP |
| 138 | | AM_RANGE(0xf007, 0xf007) AM_WRITENOP |
| 138 | AM_RANGE(0xf002, 0xf002) AM_READ(stuntair_unk_r) |
| 139 | AM_RANGE(0xf003, 0xf003) AM_READ(stuntair_unk_r) |
| 140 | // AM_RANGE(0xf004, 0xf004) AM_WRITENOP |
| 141 | // AM_RANGE(0xf005, 0xf005) AM_WRITENOP |
| 142 | // AM_RANGE(0xf006, 0xf006) AM_WRITENOP |
| 143 | // AM_RANGE(0xf007, 0xf007) AM_WRITENOP |
| 139 | 144 | |
| 140 | 145 | |
| 141 | 146 | AM_RANGE(0xf800, 0xfbff) AM_RAM_WRITE(stuntair_fgram_w) AM_SHARE("fgram") |
| r22891 | r22892 | |
| 216 | 221 | TILE_GET_INFO_MEMBER(stuntair_state::get_stuntair_fg_tile_info) |
| 217 | 222 | { |
| 218 | 223 | int tileno = m_fgram[tile_index]; |
| 219 | | SET_TILE_INFO_MEMBER(0, tileno&0x7f, 0, 0); |
| 224 | int opaque = tileno & 0x80; |
| 225 | |
| 226 | |
| 227 | SET_TILE_INFO_MEMBER(0, tileno&0x7f, 0, opaque?TILE_FORCE_LAYER0 : TILE_FORCE_LAYER1); |
| 220 | 228 | } |
| 221 | 229 | |
| 222 | 230 | WRITE8_MEMBER(stuntair_state::stuntair_fgram_w) |
| r22891 | r22892 | |
| 225 | 233 | m_fg_tilemap->mark_tile_dirty(offset); |
| 226 | 234 | } |
| 227 | 235 | |
| 236 | /* Back Layer */ |
| 237 | |
| 238 | WRITE8_MEMBER( stuntair_state::stuntair_bgxscroll_w ) |
| 239 | { |
| 240 | m_bg_xscroll = data; |
| 241 | } |
| 242 | |
| 228 | 243 | WRITE8_MEMBER(stuntair_state::stuntair_bgram_w) |
| 229 | 244 | { |
| 230 | 245 | m_bgram[offset] = data; |
| r22891 | r22892 | |
| 258 | 273 | |
| 259 | 274 | UINT32 stuntair_state::screen_update_stuntair(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
| 260 | 275 | { |
| 276 | m_bg_tilemap->set_scrollx(0, m_bg_xscroll); |
| 277 | |
| 278 | |
| 261 | 279 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
| 262 | | m_fg_tilemap->draw(bitmap, cliprect, 0, 0); |
| 280 | m_fg_tilemap->draw(bitmap, cliprect, 0, TILEMAP_PIXEL_LAYER0); |
| 281 | m_fg_tilemap->draw(bitmap, cliprect, 0, TILEMAP_PIXEL_LAYER1|TILEMAP_DRAW_OPAQUE); |
| 282 | |
| 263 | 283 | return 0; |
| 264 | 284 | } |
| 265 | 285 | |