trunk/src/mame/video/galpani2.c
| r21067 | r21068 | |
| 25 | 25 | |
| 26 | 26 | |
| 27 | 27 | #ifdef UNUSED_DEFINITION |
| 28 | | INLINE UINT16 galpani2_bg8_regs_r(address_space &space, offs_t offset, int n) |
| 28 | inline UINT16 galpani2_state::galpani2_bg8_regs_r(address_space &space, offs_t offset, int n) |
| 29 | 29 | { |
| 30 | | galpani2_state *state = space.machine().driver_data<galpani2_state>(); |
| 31 | 30 | switch (offset * 2) |
| 32 | 31 | { |
| 33 | | case 0x16: return space.machine().rand() & 1; |
| 32 | case 0x16: return machine().rand() & 1; |
| 34 | 33 | default: |
| 35 | 34 | logerror("CPU #0 PC %06X : Warning, bg8 #%d screen reg %04X read\n",space.cpu->safe_pc(),_n_,offset*2); |
| 36 | 35 | } |
| 37 | | return state->m_bg8_regs[_n_][offset]; |
| 36 | return m_bg8_regs[_n_][offset]; |
| 38 | 37 | } |
| 39 | 38 | |
| 40 | 39 | /* |
| r21067 | r21068 | |
| 44 | 43 | c04 0003 flip, 0300 flip? |
| 45 | 44 | c1c/e 01ff scroll, 3000 ? |
| 46 | 45 | */ |
| 47 | | INLINE void galpani2_bg8_regs_w(address_space &space, offs_t offset, UINT16 data, UINT16 mem_mask, int _n_) |
| 46 | inline void galpani2_state::galpani2_bg8_regs_w(address_space &space, offs_t offset, UINT16 data, UINT16 mem_mask, int _n_) |
| 48 | 47 | { |
| 49 | | galpani2_state *state = space.machine().driver_data<galpani2_state>(); |
| 50 | | COMBINE_DATA(&state->m_bg8_regs[_n_][offset]); |
| 48 | COMBINE_DATA(&m_bg8_regs[_n_][offset]); |
| 51 | 49 | } |
| 52 | 50 | |
| 53 | | READ16_HANDLER( galpani2_bg8_regs_0_r ) { return galpani2_bg8_regs_r(space, offset, 0); } |
| 54 | | READ16_HANDLER( galpani2_bg8_regs_1_r ) { return galpani2_bg8_regs_r(space, offset, 1); } |
| 51 | READ16_MEMBER( galpani2_bg8_regs_0_r ) { return galpani2_bg8_regs_r(space, offset, 0); } |
| 52 | READ16_MEMBER( galpani2_bg8_regs_1_r ) { return galpani2_bg8_regs_r(space, offset, 1); } |
| 55 | 53 | |
| 56 | | WRITE16_HANDLER( galpani2_bg8_regs_0_w ) { galpani2_bg8_regs_w(space, offset, data, mem_mask, 0); } |
| 57 | | WRITE16_HANDLER( galpani2_bg8_regs_1_w ) { galpani2_bg8_regs_w(space, offset, data, mem_mask, 1); } |
| 54 | WRITE16_MEMBER( galpani2_bg8_regs_0_w ) { galpani2_bg8_regs_w(space, offset, data, mem_mask, 0); } |
| 55 | WRITE16_MEMBER( galpani2_bg8_regs_1_w ) { galpani2_bg8_regs_w(space, offset, data, mem_mask, 1); } |
| 58 | 56 | #endif |
| 59 | 57 | |
| 60 | | INLINE void galpani2_bg8_w(address_space &space, offs_t offset, UINT16 data, UINT16 mem_mask, int _n_) |
| 58 | inline void galpani2_state::galpani2_bg8_w(offs_t offset, UINT16 data, UINT16 mem_mask, int _n_) |
| 61 | 59 | { |
| 62 | | galpani2_state *state = space.machine().driver_data<galpani2_state>(); |
| 63 | 60 | int x,y,pen; |
| 64 | | UINT16 newword = COMBINE_DATA(&state->m_bg8[_n_][offset]); |
| 61 | UINT16 newword = COMBINE_DATA(&m_bg8[_n_][offset]); |
| 65 | 62 | pen = newword & 0xff; |
| 66 | 63 | x = (offset % 512); /* 512 x 256 */ |
| 67 | 64 | y = (offset / 512); |
| 68 | | state->m_bg8_bitmap[_n_]->pix16(y, x) = 0x4000 + pen; |
| 65 | m_bg8_bitmap[_n_]->pix16(y, x) = 0x4000 + pen; |
| 69 | 66 | } |
| 70 | 67 | |
| 71 | | WRITE16_HANDLER( galpani2_bg8_0_w ) { galpani2_bg8_w(space, offset, data, mem_mask, 0); } |
| 72 | | WRITE16_HANDLER( galpani2_bg8_1_w ) { galpani2_bg8_w(space, offset, data, mem_mask, 1); } |
| 68 | WRITE16_MEMBER( galpani2_state::galpani2_bg8_0_w ) { galpani2_bg8_w(offset, data, mem_mask, 0); } |
| 69 | WRITE16_MEMBER( galpani2_state::galpani2_bg8_1_w ) { galpani2_bg8_w(offset, data, mem_mask, 1); } |
| 73 | 70 | |
| 74 | | INLINE void galpani2_palette_w(address_space &space, offs_t offset, UINT16 data, UINT16 mem_mask, int _n_) |
| 71 | inline void galpani2_state::galpani2_palette_w(offs_t offset, UINT16 data, UINT16 mem_mask, int _n_) |
| 75 | 72 | { |
| 76 | | galpani2_state *state = space.machine().driver_data<galpani2_state>(); |
| 77 | | UINT16 newword = COMBINE_DATA(&state->m_palette[_n_][offset]); |
| 78 | | palette_set_color_rgb( space.machine(), offset + 0x4000 + _n_ * 0x100, pal5bit(newword >> 5), pal5bit(newword >> 10), pal5bit(newword >> 0) ); |
| 73 | UINT16 newword = COMBINE_DATA(&m_palette[_n_][offset]); |
| 74 | palette_set_color_rgb( machine(), offset + 0x4000 + _n_ * 0x100, pal5bit(newword >> 5), pal5bit(newword >> 10), pal5bit(newword >> 0) ); |
| 79 | 75 | } |
| 80 | 76 | |
| 81 | | WRITE16_HANDLER( galpani2_palette_0_w ) { galpani2_palette_w(space, offset, data, mem_mask, 0); } |
| 82 | | WRITE16_HANDLER( galpani2_palette_1_w ) { galpani2_palette_w(space, offset, data, mem_mask, 1); } |
| 77 | WRITE16_MEMBER( galpani2_state::galpani2_palette_0_w ) { galpani2_palette_w(offset, data, mem_mask, 0); } |
| 78 | WRITE16_MEMBER( galpani2_state::galpani2_palette_1_w ) { galpani2_palette_w(offset, data, mem_mask, 1); } |
| 83 | 79 | |
| 84 | 80 | |
| 85 | 81 | /*************************************************************************** |
| r21067 | r21068 | |
| 91 | 87 | ***************************************************************************/ |
| 92 | 88 | |
| 93 | 89 | /* 8 horizontal pages of 256x256 pixels? */ |
| 94 | | WRITE16_HANDLER( galpani2_bg15_w ) |
| 90 | WRITE16_MEMBER( galpani2_state::galpani2_bg15_w ) |
| 95 | 91 | { |
| 96 | | galpani2_state *state = space.machine().driver_data<galpani2_state>(); |
| 97 | | UINT16 newword = COMBINE_DATA(&state->m_bg15[offset]); |
| 92 | UINT16 newword = COMBINE_DATA(&m_bg15[offset]); |
| 98 | 93 | |
| 99 | 94 | int x = (offset % 256) + (offset / (256*256)) * 256 ; |
| 100 | 95 | int y = (offset / 256) % 256; |
| 101 | 96 | |
| 102 | | state->m_bg15_bitmap->pix16(y, x) = 0x4200 + (newword & 0x7fff); |
| 97 | m_bg15_bitmap->pix16(y, x) = 0x4200 + (newword & 0x7fff); |
| 103 | 98 | } |
| 104 | 99 | |
| 105 | 100 | |
trunk/src/mame/video/gauntlet.c
| r21067 | r21068 | |
| 116 | 116 | * |
| 117 | 117 | *************************************/ |
| 118 | 118 | |
| 119 | | WRITE16_HANDLER( gauntlet_xscroll_w ) |
| 119 | WRITE16_MEMBER( gauntlet_state::gauntlet_xscroll_w ) |
| 120 | 120 | { |
| 121 | | gauntlet_state *state = space.machine().driver_data<gauntlet_state>(); |
| 122 | | UINT16 oldxscroll = *state->m_xscroll; |
| 123 | | COMBINE_DATA(state->m_xscroll); |
| 121 | UINT16 oldxscroll = *m_xscroll; |
| 122 | COMBINE_DATA(m_xscroll); |
| 124 | 123 | |
| 125 | 124 | /* if something changed, force a partial update */ |
| 126 | | if (*state->m_xscroll != oldxscroll) |
| 125 | if (*m_xscroll != oldxscroll) |
| 127 | 126 | { |
| 128 | | space.machine().primary_screen->update_partial(space.machine().primary_screen->vpos()); |
| 127 | machine().primary_screen->update_partial(machine().primary_screen->vpos()); |
| 129 | 128 | |
| 130 | 129 | /* adjust the scrolls */ |
| 131 | | state->m_playfield_tilemap->set_scrollx(0, *state->m_xscroll); |
| 132 | | atarimo_set_xscroll(0, *state->m_xscroll & 0x1ff); |
| 130 | m_playfield_tilemap->set_scrollx(0, *m_xscroll); |
| 131 | atarimo_set_xscroll(0, *m_xscroll & 0x1ff); |
| 133 | 132 | } |
| 134 | 133 | } |
| 135 | 134 | |
| r21067 | r21068 | |
| 141 | 140 | * |
| 142 | 141 | *************************************/ |
| 143 | 142 | |
| 144 | | WRITE16_HANDLER( gauntlet_yscroll_w ) |
| 143 | WRITE16_MEMBER( gauntlet_state::gauntlet_yscroll_w ) |
| 145 | 144 | { |
| 146 | | gauntlet_state *state = space.machine().driver_data<gauntlet_state>(); |
| 147 | | UINT16 oldyscroll = *state->m_yscroll; |
| 148 | | COMBINE_DATA(state->m_yscroll); |
| 145 | UINT16 oldyscroll = *m_yscroll; |
| 146 | COMBINE_DATA(m_yscroll); |
| 149 | 147 | |
| 150 | 148 | /* if something changed, force a partial update */ |
| 151 | | if (*state->m_yscroll != oldyscroll) |
| 149 | if (*m_yscroll != oldyscroll) |
| 152 | 150 | { |
| 153 | | space.machine().primary_screen->update_partial(space.machine().primary_screen->vpos()); |
| 151 | machine().primary_screen->update_partial(machine().primary_screen->vpos()); |
| 154 | 152 | |
| 155 | 153 | /* if the bank changed, mark all tiles dirty */ |
| 156 | | if (state->m_playfield_tile_bank != (*state->m_yscroll & 3)) |
| 154 | if (m_playfield_tile_bank != (*m_yscroll & 3)) |
| 157 | 155 | { |
| 158 | | state->m_playfield_tile_bank = *state->m_yscroll & 3; |
| 159 | | state->m_playfield_tilemap->mark_all_dirty(); |
| 156 | m_playfield_tile_bank = *m_yscroll & 3; |
| 157 | m_playfield_tilemap->mark_all_dirty(); |
| 160 | 158 | } |
| 161 | 159 | |
| 162 | 160 | /* adjust the scrolls */ |
| 163 | | state->m_playfield_tilemap->set_scrolly(0, *state->m_yscroll >> 7); |
| 164 | | atarimo_set_yscroll(0, (*state->m_yscroll >> 7) & 0x1ff); |
| 161 | m_playfield_tilemap->set_scrolly(0, *m_yscroll >> 7); |
| 162 | atarimo_set_yscroll(0, (*m_yscroll >> 7) & 0x1ff); |
| 165 | 163 | } |
| 166 | 164 | } |
| 167 | 165 | |
trunk/src/mame/video/toobin.c
| r21067 | r21068 | |
| 107 | 107 | * |
| 108 | 108 | *************************************/ |
| 109 | 109 | |
| 110 | | WRITE16_HANDLER( toobin_paletteram_w ) |
| 110 | WRITE16_MEMBER( toobin_state::toobin_paletteram_w ) |
| 111 | 111 | { |
| 112 | | toobin_state *state = space.machine().driver_data<toobin_state>(); |
| 113 | 112 | int newword; |
| 114 | 113 | |
| 115 | | COMBINE_DATA(&state->m_generic_paletteram_16[offset]); |
| 116 | | newword = state->m_generic_paletteram_16[offset]; |
| 114 | COMBINE_DATA(&m_generic_paletteram_16[offset]); |
| 115 | newword = m_generic_paletteram_16[offset]; |
| 117 | 116 | |
| 118 | 117 | { |
| 119 | 118 | int red = (((newword >> 10) & 31) * 224) >> 5; |
| r21067 | r21068 | |
| 124 | 123 | if (green) green += 38; |
| 125 | 124 | if (blue) blue += 38; |
| 126 | 125 | |
| 127 | | palette_set_color(space.machine(), offset & 0x3ff, MAKE_RGB(red, green, blue)); |
| 126 | palette_set_color(machine(), offset & 0x3ff, MAKE_RGB(red, green, blue)); |
| 128 | 127 | if (!(newword & 0x8000)) |
| 129 | | palette_set_pen_contrast(space.machine(), offset & 0x3ff, state->m_brightness); |
| 128 | palette_set_pen_contrast(machine(), offset & 0x3ff, m_brightness); |
| 130 | 129 | else |
| 131 | | palette_set_pen_contrast(space.machine(), offset & 0x3ff, 1.0); |
| 130 | palette_set_pen_contrast(machine(), offset & 0x3ff, 1.0); |
| 132 | 131 | } |
| 133 | 132 | } |
| 134 | 133 | |
| 135 | 134 | |
| 136 | | WRITE16_HANDLER( toobin_intensity_w ) |
| 135 | WRITE16_MEMBER( toobin_state::toobin_intensity_w ) |
| 137 | 136 | { |
| 138 | | toobin_state *state = space.machine().driver_data<toobin_state>(); |
| 139 | 137 | int i; |
| 140 | 138 | |
| 141 | 139 | if (ACCESSING_BITS_0_7) |
| 142 | 140 | { |
| 143 | | state->m_brightness = (double)(~data & 0x1f) / 31.0; |
| 141 | m_brightness = (double)(~data & 0x1f) / 31.0; |
| 144 | 142 | |
| 145 | 143 | for (i = 0; i < 0x400; i++) |
| 146 | | if (!(state->m_generic_paletteram_16[i] & 0x8000)) |
| 147 | | palette_set_pen_contrast(space.machine(), i, state->m_brightness); |
| 144 | if (!(m_generic_paletteram_16[i] & 0x8000)) |
| 145 | palette_set_pen_contrast(machine(), i, m_brightness); |
| 148 | 146 | } |
| 149 | 147 | } |
| 150 | 148 | |
| r21067 | r21068 | |
| 156 | 154 | * |
| 157 | 155 | *************************************/ |
| 158 | 156 | |
| 159 | | WRITE16_HANDLER( toobin_xscroll_w ) |
| 157 | WRITE16_MEMBER( toobin_state::toobin_xscroll_w ) |
| 160 | 158 | { |
| 161 | | toobin_state *state = space.machine().driver_data<toobin_state>(); |
| 162 | | UINT16 oldscroll = *state->m_xscroll; |
| 159 | UINT16 oldscroll = *m_xscroll; |
| 163 | 160 | UINT16 newscroll = oldscroll; |
| 164 | 161 | COMBINE_DATA(&newscroll); |
| 165 | 162 | |
| 166 | 163 | /* if anything has changed, force a partial update */ |
| 167 | 164 | if (newscroll != oldscroll) |
| 168 | | space.machine().primary_screen->update_partial(space.machine().primary_screen->vpos()); |
| 165 | machine().primary_screen->update_partial(machine().primary_screen->vpos()); |
| 169 | 166 | |
| 170 | 167 | /* update the playfield scrolling - hscroll is clocked on the following scanline */ |
| 171 | | state->m_playfield_tilemap->set_scrollx(0, newscroll >> 6); |
| 168 | m_playfield_tilemap->set_scrollx(0, newscroll >> 6); |
| 172 | 169 | atarimo_set_xscroll(0, newscroll >> 6); |
| 173 | 170 | |
| 174 | 171 | /* update the data */ |
| 175 | | *state->m_xscroll = newscroll; |
| 172 | *m_xscroll = newscroll; |
| 176 | 173 | } |
| 177 | 174 | |
| 178 | 175 | |
| 179 | | WRITE16_HANDLER( toobin_yscroll_w ) |
| 176 | WRITE16_MEMBER( toobin_state::toobin_yscroll_w ) |
| 180 | 177 | { |
| 181 | | toobin_state *state = space.machine().driver_data<toobin_state>(); |
| 182 | | UINT16 oldscroll = *state->m_yscroll; |
| 178 | UINT16 oldscroll = *m_yscroll; |
| 183 | 179 | UINT16 newscroll = oldscroll; |
| 184 | 180 | COMBINE_DATA(&newscroll); |
| 185 | 181 | |
| 186 | 182 | /* if anything has changed, force a partial update */ |
| 187 | 183 | if (newscroll != oldscroll) |
| 188 | | space.machine().primary_screen->update_partial(space.machine().primary_screen->vpos()); |
| 184 | machine().primary_screen->update_partial(machine().primary_screen->vpos()); |
| 189 | 185 | |
| 190 | 186 | /* if bit 4 is zero, the scroll value is clocked in right away */ |
| 191 | | state->m_playfield_tilemap->set_scrolly(0, newscroll >> 6); |
| 187 | m_playfield_tilemap->set_scrolly(0, newscroll >> 6); |
| 192 | 188 | atarimo_set_yscroll(0, (newscroll >> 6) & 0x1ff); |
| 193 | 189 | |
| 194 | 190 | /* update the data */ |
| 195 | | *state->m_yscroll = newscroll; |
| 191 | *m_yscroll = newscroll; |
| 196 | 192 | } |
| 197 | 193 | |
| 198 | 194 | |
| r21067 | r21068 | |
| 203 | 199 | * |
| 204 | 200 | *************************************/ |
| 205 | 201 | |
| 206 | | WRITE16_HANDLER( toobin_slip_w ) |
| 202 | WRITE16_MEMBER( toobin_state::toobin_slip_w ) |
| 207 | 203 | { |
| 208 | 204 | int oldslip = atarimo_0_slipram_r(space, offset, mem_mask); |
| 209 | 205 | int newslip = oldslip; |
| r21067 | r21068 | |
| 211 | 207 | |
| 212 | 208 | /* if the SLIP is changing, force a partial update first */ |
| 213 | 209 | if (oldslip != newslip) |
| 214 | | space.machine().primary_screen->update_partial(space.machine().primary_screen->vpos()); |
| 210 | machine().primary_screen->update_partial(machine().primary_screen->vpos()); |
| 215 | 211 | |
| 216 | 212 | /* update the data */ |
| 217 | 213 | atarimo_0_slipram_w(space, offset, data, mem_mask); |
trunk/src/mame/video/skullxbo.c
| r21067 | r21068 | |
| 101 | 101 | * |
| 102 | 102 | *************************************/ |
| 103 | 103 | |
| 104 | | WRITE16_HANDLER( skullxbo_xscroll_w ) |
| 104 | WRITE16_MEMBER( skullxbo_state::skullxbo_xscroll_w ) |
| 105 | 105 | { |
| 106 | | skullxbo_state *state = space.machine().driver_data<skullxbo_state>(); |
| 107 | | |
| 108 | 106 | /* combine data */ |
| 109 | | UINT16 oldscroll = *state->m_xscroll; |
| 107 | UINT16 oldscroll = *m_xscroll; |
| 110 | 108 | UINT16 newscroll = oldscroll; |
| 111 | 109 | COMBINE_DATA(&newscroll); |
| 112 | 110 | |
| 113 | 111 | /* if something changed, force an update */ |
| 114 | 112 | if (oldscroll != newscroll) |
| 115 | | space.machine().primary_screen->update_partial(space.machine().primary_screen->vpos()); |
| 113 | machine().primary_screen->update_partial(machine().primary_screen->vpos()); |
| 116 | 114 | |
| 117 | 115 | /* adjust the actual scrolls */ |
| 118 | | state->m_playfield_tilemap->set_scrollx(0, 2 * (newscroll >> 7)); |
| 116 | m_playfield_tilemap->set_scrollx(0, 2 * (newscroll >> 7)); |
| 119 | 117 | atarimo_set_xscroll(0, 2 * (newscroll >> 7)); |
| 120 | 118 | |
| 121 | 119 | /* update the data */ |
| 122 | | *state->m_xscroll = newscroll; |
| 120 | *m_xscroll = newscroll; |
| 123 | 121 | } |
| 124 | 122 | |
| 125 | 123 | |
| 126 | | WRITE16_HANDLER( skullxbo_yscroll_w ) |
| 124 | WRITE16_MEMBER( skullxbo_state::skullxbo_yscroll_w ) |
| 127 | 125 | { |
| 128 | | skullxbo_state *state = space.machine().driver_data<skullxbo_state>(); |
| 129 | | |
| 130 | 126 | /* combine data */ |
| 131 | | int scanline = space.machine().primary_screen->vpos(); |
| 132 | | UINT16 oldscroll = *state->m_yscroll; |
| 127 | int scanline = machine().primary_screen->vpos(); |
| 128 | UINT16 oldscroll = *m_yscroll; |
| 133 | 129 | UINT16 newscroll = oldscroll; |
| 134 | 130 | UINT16 effscroll; |
| 135 | 131 | COMBINE_DATA(&newscroll); |
| 136 | 132 | |
| 137 | 133 | /* if something changed, force an update */ |
| 138 | 134 | if (oldscroll != newscroll) |
| 139 | | space.machine().primary_screen->update_partial(scanline); |
| 135 | machine().primary_screen->update_partial(scanline); |
| 140 | 136 | |
| 141 | 137 | /* adjust the effective scroll for the current scanline */ |
| 142 | | if (scanline > space.machine().primary_screen->visible_area().max_y) |
| 138 | if (scanline > machine().primary_screen->visible_area().max_y) |
| 143 | 139 | scanline = 0; |
| 144 | 140 | effscroll = (newscroll >> 7) - scanline; |
| 145 | 141 | |
| 146 | 142 | /* adjust the actual scrolls */ |
| 147 | | state->m_playfield_tilemap->set_scrolly(0, effscroll); |
| 143 | m_playfield_tilemap->set_scrolly(0, effscroll); |
| 148 | 144 | atarimo_set_yscroll(0, effscroll & 0x1ff); |
| 149 | 145 | |
| 150 | 146 | /* update the data */ |
| 151 | | *state->m_yscroll = newscroll; |
| 147 | *m_yscroll = newscroll; |
| 152 | 148 | } |
| 153 | 149 | |
| 154 | 150 | |
| r21067 | r21068 | |
| 159 | 155 | * |
| 160 | 156 | *************************************/ |
| 161 | 157 | |
| 162 | | WRITE16_HANDLER( skullxbo_mobmsb_w ) |
| 158 | WRITE16_MEMBER( skullxbo_state::skullxbo_mobmsb_w ) |
| 163 | 159 | { |
| 164 | | space.machine().primary_screen->update_partial(space.machine().primary_screen->vpos()); |
| 160 | machine().primary_screen->update_partial(machine().primary_screen->vpos()); |
| 165 | 161 | atarimo_set_bank(0, (offset >> 9) & 1); |
| 166 | 162 | } |
| 167 | 163 | |
| r21067 | r21068 | |
| 173 | 169 | * |
| 174 | 170 | *************************************/ |
| 175 | 171 | |
| 176 | | WRITE16_HANDLER( skullxbo_playfieldlatch_w ) |
| 172 | WRITE16_MEMBER( skullxbo_state::skullxbo_playfieldlatch_w ) |
| 177 | 173 | { |
| 178 | | skullxbo_state *state = space.machine().driver_data<skullxbo_state>(); |
| 179 | | state->set_playfield_latch(data); |
| 174 | set_playfield_latch(data); |
| 180 | 175 | } |
| 181 | 176 | |
| 182 | 177 | |
trunk/src/mame/video/atarisy1.c
| r21067 | r21068 | |
| 195 | 195 | * |
| 196 | 196 | *************************************/ |
| 197 | 197 | |
| 198 | | WRITE16_HANDLER( atarisy1_bankselect_w ) |
| 198 | WRITE16_MEMBER( atarisy1_state::atarisy1_bankselect_w ) |
| 199 | 199 | { |
| 200 | | atarisy1_state *state = space.machine().driver_data<atarisy1_state>(); |
| 201 | | UINT16 oldselect = *state->m_bankselect; |
| 200 | UINT16 oldselect = *m_bankselect; |
| 202 | 201 | UINT16 newselect = oldselect, diff; |
| 203 | | int scanline = space.machine().primary_screen->vpos(); |
| 202 | int scanline = machine().primary_screen->vpos(); |
| 204 | 203 | |
| 205 | 204 | /* update memory */ |
| 206 | 205 | COMBINE_DATA(&newselect); |
| r21067 | r21068 | |
| 209 | 208 | /* sound CPU reset */ |
| 210 | 209 | if (diff & 0x0080) |
| 211 | 210 | { |
| 212 | | space.machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_RESET, (newselect & 0x0080) ? CLEAR_LINE : ASSERT_LINE); |
| 213 | | if (!(newselect & 0x0080)) state->sound_cpu_reset(); |
| 211 | machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_RESET, (newselect & 0x0080) ? CLEAR_LINE : ASSERT_LINE); |
| 212 | if (!(newselect & 0x0080)) sound_cpu_reset(); |
| 214 | 213 | } |
| 215 | 214 | |
| 216 | 215 | /* if MO or playfield banks change, force a partial update */ |
| 217 | 216 | if (diff & 0x003c) |
| 218 | | space.machine().primary_screen->update_partial(scanline); |
| 217 | machine().primary_screen->update_partial(scanline); |
| 219 | 218 | |
| 220 | 219 | /* motion object bank select */ |
| 221 | 220 | atarimo_set_bank(0, (newselect >> 3) & 7); |
| 222 | | state->update_timers(scanline); |
| 221 | update_timers(scanline); |
| 223 | 222 | |
| 224 | 223 | /* playfield bank select */ |
| 225 | 224 | if (diff & 0x0004) |
| 226 | 225 | { |
| 227 | | state->m_playfield_tile_bank = (newselect >> 2) & 1; |
| 228 | | state->m_playfield_tilemap->mark_all_dirty(); |
| 226 | m_playfield_tile_bank = (newselect >> 2) & 1; |
| 227 | m_playfield_tilemap->mark_all_dirty(); |
| 229 | 228 | } |
| 230 | 229 | |
| 231 | 230 | /* stash the new value */ |
| 232 | | *state->m_bankselect = newselect; |
| 231 | *m_bankselect = newselect; |
| 233 | 232 | } |
| 234 | 233 | |
| 235 | 234 | |
| r21067 | r21068 | |
| 240 | 239 | * |
| 241 | 240 | *************************************/ |
| 242 | 241 | |
| 243 | | WRITE16_HANDLER( atarisy1_priority_w ) |
| 242 | WRITE16_MEMBER( atarisy1_state::atarisy1_priority_w ) |
| 244 | 243 | { |
| 245 | | atarisy1_state *state = space.machine().driver_data<atarisy1_state>(); |
| 246 | | UINT16 oldpens = state->m_playfield_priority_pens; |
| 244 | UINT16 oldpens = m_playfield_priority_pens; |
| 247 | 245 | UINT16 newpens = oldpens; |
| 248 | 246 | |
| 249 | 247 | /* force a partial update in case this changes mid-screen */ |
| 250 | 248 | COMBINE_DATA(&newpens); |
| 251 | 249 | if (oldpens != newpens) |
| 252 | | space.machine().primary_screen->update_partial(space.machine().primary_screen->vpos()); |
| 253 | | state->m_playfield_priority_pens = newpens; |
| 250 | machine().primary_screen->update_partial(machine().primary_screen->vpos()); |
| 251 | m_playfield_priority_pens = newpens; |
| 254 | 252 | } |
| 255 | 253 | |
| 256 | 254 | |
| r21067 | r21068 | |
| 261 | 259 | * |
| 262 | 260 | *************************************/ |
| 263 | 261 | |
| 264 | | WRITE16_HANDLER( atarisy1_xscroll_w ) |
| 262 | WRITE16_MEMBER( atarisy1_state::atarisy1_xscroll_w ) |
| 265 | 263 | { |
| 266 | | atarisy1_state *state = space.machine().driver_data<atarisy1_state>(); |
| 267 | | UINT16 oldscroll = *state->m_xscroll; |
| 264 | UINT16 oldscroll = *m_xscroll; |
| 268 | 265 | UINT16 newscroll = oldscroll; |
| 269 | 266 | |
| 270 | 267 | /* force a partial update in case this changes mid-screen */ |
| 271 | 268 | COMBINE_DATA(&newscroll); |
| 272 | 269 | if (oldscroll != newscroll) |
| 273 | | space.machine().primary_screen->update_partial(space.machine().primary_screen->vpos()); |
| 270 | machine().primary_screen->update_partial(machine().primary_screen->vpos()); |
| 274 | 271 | |
| 275 | 272 | /* set the new scroll value */ |
| 276 | | state->m_playfield_tilemap->set_scrollx(0, newscroll); |
| 273 | m_playfield_tilemap->set_scrollx(0, newscroll); |
| 277 | 274 | |
| 278 | 275 | /* update the data */ |
| 279 | | *state->m_xscroll = newscroll; |
| 276 | *m_xscroll = newscroll; |
| 280 | 277 | } |
| 281 | 278 | |
| 282 | 279 | |
| r21067 | r21068 | |
| 293 | 290 | } |
| 294 | 291 | |
| 295 | 292 | |
| 296 | | WRITE16_HANDLER( atarisy1_yscroll_w ) |
| 293 | WRITE16_MEMBER( atarisy1_state::atarisy1_yscroll_w ) |
| 297 | 294 | { |
| 298 | | atarisy1_state *state = space.machine().driver_data<atarisy1_state>(); |
| 299 | | UINT16 oldscroll = *state->m_yscroll; |
| 295 | UINT16 oldscroll = *m_yscroll; |
| 300 | 296 | UINT16 newscroll = oldscroll; |
| 301 | | int scanline = space.machine().primary_screen->vpos(); |
| 297 | int scanline = machine().primary_screen->vpos(); |
| 302 | 298 | int adjusted_scroll; |
| 303 | 299 | |
| 304 | 300 | /* force a partial update in case this changes mid-screen */ |
| 305 | 301 | COMBINE_DATA(&newscroll); |
| 306 | | space.machine().primary_screen->update_partial(scanline); |
| 302 | machine().primary_screen->update_partial(scanline); |
| 307 | 303 | |
| 308 | 304 | /* because this latches a new value into the scroll base, |
| 309 | 305 | we need to adjust for the scanline */ |
| 310 | 306 | adjusted_scroll = newscroll; |
| 311 | | if (scanline <= space.machine().primary_screen->visible_area().max_y) |
| 307 | if (scanline <= machine().primary_screen->visible_area().max_y) |
| 312 | 308 | adjusted_scroll -= (scanline + 1); |
| 313 | | state->m_playfield_tilemap->set_scrolly(0, adjusted_scroll); |
| 309 | m_playfield_tilemap->set_scrolly(0, adjusted_scroll); |
| 314 | 310 | |
| 315 | 311 | /* but since we've adjusted it, we must reset it to the normal value |
| 316 | 312 | once we hit scanline 0 again */ |
| 317 | | state->m_yscroll_reset_timer->adjust(space.machine().primary_screen->time_until_pos(0), newscroll); |
| 313 | m_yscroll_reset_timer->adjust(machine().primary_screen->time_until_pos(0), newscroll); |
| 318 | 314 | |
| 319 | 315 | /* update the data */ |
| 320 | | *state->m_yscroll = newscroll; |
| 316 | *m_yscroll = newscroll; |
| 321 | 317 | } |
| 322 | 318 | |
| 323 | 319 | |
| r21067 | r21068 | |
| 328 | 324 | * |
| 329 | 325 | *************************************/ |
| 330 | 326 | |
| 331 | | WRITE16_HANDLER( atarisy1_spriteram_w ) |
| 327 | WRITE16_MEMBER( atarisy1_state::atarisy1_spriteram_w ) |
| 332 | 328 | { |
| 333 | | atarisy1_state *state = space.machine().driver_data<atarisy1_state>(); |
| 334 | 329 | int active_bank = atarimo_get_bank(0); |
| 335 | 330 | int oldword = atarimo_0_spriteram_r(space, offset, mem_mask); |
| 336 | 331 | int newword = oldword; |
| r21067 | r21068 | |
| 345 | 340 | { |
| 346 | 341 | /* if the timer is in the active bank, update the display list */ |
| 347 | 342 | atarimo_0_spriteram_w(space, offset, data, 0xffff); |
| 348 | | state->update_timers(space.machine().primary_screen->vpos()); |
| 343 | update_timers(machine().primary_screen->vpos()); |
| 349 | 344 | } |
| 350 | 345 | |
| 351 | 346 | /* if we're about to modify data in the active sprite bank, make sure the video is up-to-date */ |
| r21067 | r21068 | |
| 353 | 348 | /* renders the next scanline's sprites to the line buffers, but Road Runner still glitches */ |
| 354 | 349 | /* without the extra +1 */ |
| 355 | 350 | else |
| 356 | | space.machine().primary_screen->update_partial(space.machine().primary_screen->vpos() + 2); |
| 351 | machine().primary_screen->update_partial(machine().primary_screen->vpos() + 2); |
| 357 | 352 | } |
| 358 | 353 | |
| 359 | 354 | /* let the MO handler do the basic work */ |
| r21067 | r21068 | |
| 400 | 395 | * |
| 401 | 396 | *************************************/ |
| 402 | 397 | |
| 403 | | READ16_HANDLER( atarisy1_int3state_r ) |
| 398 | READ16_MEMBER( atarisy1_state::atarisy1_int3state_r ) |
| 404 | 399 | { |
| 405 | | atarigen_state *atarigen = space.machine().driver_data<atarigen_state>(); |
| 406 | | return atarigen->m_scanline_int_state ? 0x0080 : 0x0000; |
| 400 | return m_scanline_int_state ? 0x0080 : 0x0000; |
| 407 | 401 | } |
| 408 | 402 | |
| 409 | 403 | |
trunk/src/mame/video/vindictr.c
| r21067 | r21068 | |
| 105 | 105 | * |
| 106 | 106 | *************************************/ |
| 107 | 107 | |
| 108 | | WRITE16_HANDLER( vindictr_paletteram_w ) |
| 108 | WRITE16_MEMBER( vindictr_state::vindictr_paletteram_w ) |
| 109 | 109 | { |
| 110 | 110 | static const int ztable[16] = |
| 111 | 111 | { 0x0, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf, 0x10, 0x11 }; |
| 112 | 112 | int c; |
| 113 | 113 | |
| 114 | 114 | /* first blend the data */ |
| 115 | | vindictr_state *state = space.machine().driver_data<vindictr_state>(); |
| 116 | | COMBINE_DATA(&state->m_generic_paletteram_16[offset]); |
| 117 | | data = state->m_generic_paletteram_16[offset]; |
| 115 | COMBINE_DATA(&m_generic_paletteram_16[offset]); |
| 116 | data = m_generic_paletteram_16[offset]; |
| 118 | 117 | |
| 119 | 118 | /* now generate colors at all 16 intensities */ |
| 120 | 119 | for (c = 0; c < 8; c++) |
| r21067 | r21068 | |
| 124 | 123 | int g = ((data >> 4) & 15) * i; |
| 125 | 124 | int b = ((data >> 0) & 15) * i; |
| 126 | 125 | |
| 127 | | palette_set_color(space.machine(),offset + c*2048,MAKE_RGB(r,g,b)); |
| 126 | palette_set_color(machine(),offset + c*2048,MAKE_RGB(r,g,b)); |
| 128 | 127 | } |
| 129 | 128 | } |
| 130 | 129 | |
trunk/src/mame/video/atarisy2.c
| r21067 | r21068 | |
| 114 | 114 | * |
| 115 | 115 | *************************************/ |
| 116 | 116 | |
| 117 | | WRITE16_HANDLER( atarisy2_state::xscroll_w ) |
| 117 | WRITE16_MEMBER( atarisy2_state::xscroll_w ) |
| 118 | 118 | { |
| 119 | 119 | UINT16 oldscroll = *m_xscroll; |
| 120 | 120 | UINT16 newscroll = oldscroll; |
| r21067 | r21068 | |
| 145 | 145 | } |
| 146 | 146 | |
| 147 | 147 | |
| 148 | | WRITE16_HANDLER( atarisy2_state::yscroll_w ) |
| 148 | WRITE16_MEMBER( atarisy2_state::yscroll_w ) |
| 149 | 149 | { |
| 150 | 150 | UINT16 oldscroll = *m_yscroll; |
| 151 | 151 | UINT16 newscroll = oldscroll; |
| r21067 | r21068 | |
| 180 | 180 | * |
| 181 | 181 | *************************************/ |
| 182 | 182 | |
| 183 | | WRITE16_HANDLER( atarisy2_state::paletteram_w ) |
| 183 | WRITE16_MEMBER( atarisy2_state::paletteram_w ) |
| 184 | 184 | { |
| 185 | 185 | static const int intensity_table[16] = |
| 186 | 186 | { |
| r21067 | r21068 | |
| 215 | 215 | * |
| 216 | 216 | *************************************/ |
| 217 | 217 | |
| 218 | | READ16_HANDLER( atarisy2_state::slapstic_r ) |
| 218 | READ16_MEMBER( atarisy2_state::slapstic_r ) |
| 219 | 219 | { |
| 220 | 220 | int result = m_slapstic_base[offset]; |
| 221 | 221 | slapstic_tweak(space, offset); |
| r21067 | r21068 | |
| 226 | 226 | } |
| 227 | 227 | |
| 228 | 228 | |
| 229 | | WRITE16_HANDLER( atarisy2_state::slapstic_w ) |
| 229 | WRITE16_MEMBER( atarisy2_state::slapstic_w ) |
| 230 | 230 | { |
| 231 | 231 | slapstic_tweak(space, offset); |
| 232 | 232 | |
| r21067 | r21068 | |
| 242 | 242 | * |
| 243 | 243 | *************************************/ |
| 244 | 244 | |
| 245 | | READ16_HANDLER( atarisy2_state::videoram_r ) |
| 245 | READ16_MEMBER( atarisy2_state::videoram_r ) |
| 246 | 246 | { |
| 247 | 247 | int offs = offset | m_videobank; |
| 248 | 248 | if (offs >= 0xc00 && offs < 0x1000) |
| r21067 | r21068 | |
| 254 | 254 | } |
| 255 | 255 | |
| 256 | 256 | |
| 257 | | WRITE16_HANDLER( atarisy2_state::videoram_w ) |
| 257 | WRITE16_MEMBER( atarisy2_state::videoram_w ) |
| 258 | 258 | { |
| 259 | 259 | int offs = offset | m_videobank; |
| 260 | 260 | |
trunk/src/mame/drivers/badlands.c
| r21067 | r21068 | |
| 381 | 381 | AM_RANGE(0xfe6006, 0xfe6007) AM_READ(pedal_1_r) |
| 382 | 382 | AM_RANGE(0xfe8000, 0xfe9fff) AM_WRITE8(sound_w, 0xff00) |
| 383 | 383 | AM_RANGE(0xfea000, 0xfebfff) AM_READ8(sound_r, 0xff00) |
| 384 | | AM_RANGE(0xfec000, 0xfedfff) AM_WRITE_LEGACY(badlands_pf_bank_w) |
| 384 | AM_RANGE(0xfec000, 0xfedfff) AM_WRITE(badlands_pf_bank_w) |
| 385 | 385 | AM_RANGE(0xfee000, 0xfeffff) AM_WRITE(eeprom_enable_w) |
| 386 | 386 | AM_RANGE(0xffc000, 0xffc3ff) AM_RAM_WRITE(expanded_paletteram_666_w) AM_SHARE("paletteram") |
| 387 | 387 | AM_RANGE(0xffe000, 0xffefff) AM_RAM_WRITE(playfield_w) AM_SHARE("playfield") |
| r21067 | r21068 | |
| 641 | 641 | //AM_RANGE(0xfe0000, 0xfe1fff) AM_WRITE(watchdog_reset16_w) |
| 642 | 642 | AM_RANGE(0xfe2000, 0xfe3fff) AM_WRITE(video_int_ack_w) |
| 643 | 643 | |
| 644 | | AM_RANGE(0xfec000, 0xfedfff) AM_WRITE_LEGACY(badlands_pf_bank_w) |
| 644 | AM_RANGE(0xfec000, 0xfedfff) AM_WRITE(badlands_pf_bank_w) |
| 645 | 645 | AM_RANGE(0xfee000, 0xfeffff) AM_WRITE(eeprom_enable_w) |
| 646 | 646 | AM_RANGE(0xffc000, 0xffc3ff) AM_RAM_WRITE(expanded_paletteram_666_w) AM_SHARE("paletteram") |
| 647 | 647 | AM_RANGE(0xffe000, 0xffefff) AM_RAM_WRITE(playfield_w) AM_SHARE("playfield") |
trunk/src/mame/drivers/galpani2.c
| r21067 | r21068 | |
| 290 | 290 | AM_RANGE(0x304000, 0x30401f) AM_DEVREADWRITE("kan_spr", kaneko16_sprite_device, kaneko16_sprites_regs_r, kaneko16_sprites_regs_w) |
| 291 | 291 | AM_RANGE(0x308000, 0x308001) AM_WRITENOP // ? 0 at startup |
| 292 | 292 | AM_RANGE(0x30c000, 0x30c001) AM_WRITENOP // ? hblank effect ? |
| 293 | | AM_RANGE(0x310000, 0x3101ff) AM_RAM_WRITE_LEGACY(galpani2_palette_0_w) AM_SHARE("palette.0") // ? |
| 293 | AM_RANGE(0x310000, 0x3101ff) AM_RAM_WRITE(galpani2_palette_0_w) AM_SHARE("palette.0") // ? |
| 294 | 294 | AM_RANGE(0x314000, 0x314001) AM_WRITENOP // ? flip backgrounds ? |
| 295 | 295 | AM_RANGE(0x318000, 0x318001) AM_READWRITE(galpani2_eeprom_r, galpani2_eeprom_w) // EEPROM |
| 296 | 296 | AM_RANGE(0x380000, 0x387fff) AM_RAM // Palette? |
| 297 | 297 | AM_RANGE(0x388000, 0x38ffff) AM_RAM_WRITE(paletteram_xGGGGGRRRRRBBBBB_word_w) AM_SHARE("paletteram" ) // Palette |
| 298 | 298 | AM_RANGE(0x390000, 0x3901ff) AM_WRITENOP // ? at startup of service mode |
| 299 | 299 | |
| 300 | | AM_RANGE(0x400000, 0x43ffff) AM_RAM_WRITE_LEGACY(galpani2_bg8_0_w) AM_SHARE("bg8.0") // Background 0 |
| 300 | AM_RANGE(0x400000, 0x43ffff) AM_RAM_WRITE(galpani2_bg8_0_w) AM_SHARE("bg8.0") // Background 0 |
| 301 | 301 | AM_RANGE(0x440000, 0x440001) AM_RAM AM_SHARE("bg8_scrollx.0") // Background 0 Scroll X |
| 302 | 302 | AM_RANGE(0x480000, 0x480001) AM_RAM AM_SHARE("bg8_scrolly.0") // Background 0 Scroll Y |
| 303 | 303 | AM_RANGE(0x4c0000, 0x4c0001) AM_WRITENOP // ? 0 at startup only |
| 304 | | AM_RANGE(0x500000, 0x53ffff) AM_RAM_WRITE_LEGACY(galpani2_bg8_1_w) AM_SHARE("bg8.1") // Background 1 |
| 304 | AM_RANGE(0x500000, 0x53ffff) AM_RAM_WRITE(galpani2_bg8_1_w) AM_SHARE("bg8.1") // Background 1 |
| 305 | 305 | AM_RANGE(0x540000, 0x540001) AM_RAM AM_SHARE("bg8_scrollx.1") // Background 1 Scroll X |
| 306 | 306 | |
| 307 | 307 | AM_RANGE(0x540572, 0x540573) AM_READNOP // ? galpani2 at F0A4 |
| r21067 | r21068 | |
| 354 | 354 | static ADDRESS_MAP_START( galpani2_mem2, AS_PROGRAM, 16, galpani2_state ) |
| 355 | 355 | AM_RANGE(0x000000, 0x03ffff) AM_ROM // ROM |
| 356 | 356 | AM_RANGE(0x100000, 0x13ffff) AM_RAM AM_SHARE("ram2") // Work RAM |
| 357 | | AM_RANGE(0x400000, 0x4fffff) AM_RAM_WRITE_LEGACY(galpani2_bg15_w) AM_SHARE("bg15") // bg15 |
| 357 | AM_RANGE(0x400000, 0x4fffff) AM_RAM_WRITE(galpani2_bg15_w) AM_SHARE("bg15") // bg15 |
| 358 | 358 | AM_RANGE(0x500000, 0x5fffff) AM_RAM // bg15 |
| 359 | 359 | AM_RANGE(0x600000, 0x600001) AM_NOP // ? 0 at startup only |
| 360 | 360 | AM_RANGE(0x640000, 0x640001) AM_WRITENOP // ? 0 at startup only |
trunk/src/mame/drivers/toobin.c
| r21067 | r21068 | |
| 101 | 101 | AM_RANGE(0xc00000, 0xc07fff) AM_RAM_WRITE(playfield_large_w) AM_SHARE("playfield") |
| 102 | 102 | AM_RANGE(0xc08000, 0xc097ff) AM_MIRROR(0x046000) AM_RAM_WRITE(alpha_w) AM_SHARE("alpha") |
| 103 | 103 | AM_RANGE(0xc09800, 0xc09fff) AM_MIRROR(0x046000) AM_READWRITE_LEGACY(atarimo_0_spriteram_r, atarimo_0_spriteram_w) |
| 104 | | AM_RANGE(0xc10000, 0xc107ff) AM_MIRROR(0x047800) AM_RAM_WRITE_LEGACY(toobin_paletteram_w) AM_SHARE("paletteram") |
| 104 | AM_RANGE(0xc10000, 0xc107ff) AM_MIRROR(0x047800) AM_RAM_WRITE(toobin_paletteram_w) AM_SHARE("paletteram") |
| 105 | 105 | AM_RANGE(0xff6000, 0xff6001) AM_READNOP /* who knows? read at controls time */ |
| 106 | 106 | AM_RANGE(0xff8000, 0xff8001) AM_MIRROR(0x4500fe) AM_WRITE(watchdog_reset16_w) |
| 107 | 107 | AM_RANGE(0xff8100, 0xff8101) AM_MIRROR(0x4500fe) AM_WRITE8(sound_w, 0x00ff) |
| 108 | | AM_RANGE(0xff8300, 0xff8301) AM_MIRROR(0x45003e) AM_WRITE_LEGACY(toobin_intensity_w) |
| 108 | AM_RANGE(0xff8300, 0xff8301) AM_MIRROR(0x45003e) AM_WRITE(toobin_intensity_w) |
| 109 | 109 | AM_RANGE(0xff8340, 0xff8341) AM_MIRROR(0x45003e) AM_WRITE(interrupt_scan_w) AM_SHARE("interrupt_scan") |
| 110 | | AM_RANGE(0xff8380, 0xff8381) AM_MIRROR(0x45003e) AM_READWRITE_LEGACY(atarimo_0_slipram_r, toobin_slip_w) |
| 110 | AM_RANGE(0xff8380, 0xff8381) AM_MIRROR(0x45003e) AM_READ_LEGACY(atarimo_0_slipram_r) AM_WRITE(toobin_slip_w) |
| 111 | 111 | AM_RANGE(0xff83c0, 0xff83c1) AM_MIRROR(0x45003e) AM_WRITE(scanline_int_ack_w) |
| 112 | 112 | AM_RANGE(0xff8400, 0xff8401) AM_MIRROR(0x4500fe) AM_WRITE(sound_reset_w) |
| 113 | 113 | AM_RANGE(0xff8500, 0xff8501) AM_MIRROR(0x4500fe) AM_WRITE(eeprom_enable_w) |
| 114 | | AM_RANGE(0xff8600, 0xff8601) AM_MIRROR(0x4500fe) AM_WRITE_LEGACY(toobin_xscroll_w) AM_SHARE("xscroll") |
| 115 | | AM_RANGE(0xff8700, 0xff8701) AM_MIRROR(0x4500fe) AM_WRITE_LEGACY(toobin_yscroll_w) AM_SHARE("yscroll") |
| 114 | AM_RANGE(0xff8600, 0xff8601) AM_MIRROR(0x4500fe) AM_WRITE(toobin_xscroll_w) AM_SHARE("xscroll") |
| 115 | AM_RANGE(0xff8700, 0xff8701) AM_MIRROR(0x4500fe) AM_WRITE(toobin_yscroll_w) AM_SHARE("yscroll") |
| 116 | 116 | AM_RANGE(0xff8800, 0xff8801) AM_MIRROR(0x4507fe) AM_READ_PORT("FF8800") |
| 117 | 117 | AM_RANGE(0xff9000, 0xff9001) AM_MIRROR(0x4507fe) AM_READ(special_port1_r) |
| 118 | 118 | AM_RANGE(0xff9800, 0xff9801) AM_MIRROR(0x4507fe) AM_READ8(sound_r, 0x00ff) |
trunk/src/mame/drivers/galpanic.c
| r21067 | r21068 | |
| 215 | 215 | AM_RANGE(0x000000, 0x3fffff) AM_ROM |
| 216 | 216 | AM_RANGE(0x400000, 0x400001) AM_DEVREADWRITE8("oki", okim6295_device, read, write, 0x00ff) |
| 217 | 217 | AM_RANGE(0x500000, 0x51ffff) AM_RAM AM_SHARE("fgvideoram") |
| 218 | | AM_RANGE(0x520000, 0x53ffff) AM_RAM_WRITE_LEGACY(galpanic_bgvideoram_w) AM_SHARE("bgvideoram") /* + work RAM */ |
| 219 | | AM_RANGE(0x600000, 0x6007ff) AM_RAM_WRITE_LEGACY(galpanic_paletteram_w) AM_SHARE("paletteram") /* 1024 colors, but only 512 seem to be used */ |
| 218 | AM_RANGE(0x520000, 0x53ffff) AM_RAM_WRITE(galpanic_bgvideoram_w) AM_SHARE("bgvideoram") /* + work RAM */ |
| 219 | AM_RANGE(0x600000, 0x6007ff) AM_RAM_WRITE(galpanic_paletteram_w) AM_SHARE("paletteram") /* 1024 colors, but only 512 seem to be used */ |
| 220 | 220 | AM_RANGE(0x700000, 0x701fff) AM_DEVREADWRITE_LEGACY("pandora", pandora_spriteram_LSB_r, pandora_spriteram_LSB_w) |
| 221 | 221 | AM_RANGE(0x702000, 0x704fff) AM_RAM |
| 222 | 222 | AM_RANGE(0x800000, 0x800001) AM_READ_PORT("DSW1") |
| r21067 | r21068 | |
| 251 | 251 | static ADDRESS_MAP_START( comad_map, AS_PROGRAM, 16, galpanic_state ) |
| 252 | 252 | AM_RANGE(0x000000, 0x4fffff) AM_ROM |
| 253 | 253 | AM_RANGE(0x500000, 0x51ffff) AM_RAM AM_SHARE("fgvideoram") |
| 254 | | AM_RANGE(0x520000, 0x53ffff) AM_RAM_WRITE_LEGACY(galpanic_bgvideoram_w) AM_SHARE("bgvideoram") /* + work RAM */ |
| 255 | | AM_RANGE(0x600000, 0x6007ff) AM_RAM_WRITE_LEGACY(galpanic_paletteram_w) AM_SHARE("paletteram") /* 1024 colors, but only 512 seem to be used */ |
| 254 | AM_RANGE(0x520000, 0x53ffff) AM_RAM_WRITE(galpanic_bgvideoram_w) AM_SHARE("bgvideoram") /* + work RAM */ |
| 255 | AM_RANGE(0x600000, 0x6007ff) AM_RAM_WRITE(galpanic_paletteram_w) AM_SHARE("paletteram") /* 1024 colors, but only 512 seem to be used */ |
| 256 | 256 | AM_RANGE(0x700000, 0x700fff) AM_RAM AM_SHARE("spriteram") |
| 257 | 257 | AM_RANGE(0x800000, 0x800001) AM_READ_PORT("DSW1") |
| 258 | 258 | AM_RANGE(0x800002, 0x800003) AM_READ_PORT("DSW2") |
| r21067 | r21068 | |
| 270 | 270 | static ADDRESS_MAP_START( fantsia2_map, AS_PROGRAM, 16, galpanic_state ) |
| 271 | 271 | AM_RANGE(0x000000, 0x4fffff) AM_ROM |
| 272 | 272 | AM_RANGE(0x500000, 0x51ffff) AM_RAM AM_SHARE("fgvideoram") |
| 273 | | AM_RANGE(0x520000, 0x53ffff) AM_RAM_WRITE_LEGACY(galpanic_bgvideoram_w) AM_SHARE("bgvideoram") /* + work RAM */ |
| 274 | | AM_RANGE(0x600000, 0x6007ff) AM_RAM_WRITE_LEGACY(galpanic_paletteram_w) AM_SHARE("paletteram") /* 1024 colors, but only 512 seem to be used */ |
| 273 | AM_RANGE(0x520000, 0x53ffff) AM_RAM_WRITE(galpanic_bgvideoram_w) AM_SHARE("bgvideoram") /* + work RAM */ |
| 274 | AM_RANGE(0x600000, 0x6007ff) AM_RAM_WRITE(galpanic_paletteram_w) AM_SHARE("paletteram") /* 1024 colors, but only 512 seem to be used */ |
| 275 | 275 | AM_RANGE(0x700000, 0x700fff) AM_RAM AM_SHARE("spriteram") |
| 276 | 276 | AM_RANGE(0x800000, 0x800001) AM_READ_PORT("DSW1") |
| 277 | 277 | AM_RANGE(0x800002, 0x800003) AM_READ_PORT("DSW2") |
| r21067 | r21068 | |
| 288 | 288 | static ADDRESS_MAP_START( galhustl_map, AS_PROGRAM, 16, galpanic_state ) |
| 289 | 289 | AM_RANGE(0x000000, 0x0fffff) AM_ROM |
| 290 | 290 | AM_RANGE(0x500000, 0x51ffff) AM_RAM AM_SHARE("fgvideoram") |
| 291 | | AM_RANGE(0x520000, 0x53ffff) AM_WRITE_LEGACY(galpanic_bgvideoram_w) AM_SHARE("bgvideoram") |
| 291 | AM_RANGE(0x520000, 0x53ffff) AM_WRITE(galpanic_bgvideoram_w) AM_SHARE("bgvideoram") |
| 292 | 292 | AM_RANGE(0x580000, 0x583fff) AM_RAM_WRITE(galpanic_bgvideoram_mirror_w) |
| 293 | | AM_RANGE(0x600000, 0x6007ff) AM_RAM_WRITE_LEGACY(galpanic_paletteram_w) AM_SHARE("paletteram") /* 1024 colors, but only 512 seem to be used */ |
| 293 | AM_RANGE(0x600000, 0x6007ff) AM_RAM_WRITE(galpanic_paletteram_w) AM_SHARE("paletteram") /* 1024 colors, but only 512 seem to be used */ |
| 294 | 294 | AM_RANGE(0x600800, 0x600fff) AM_RAM // writes only 1? |
| 295 | 295 | AM_RANGE(0x680000, 0x68001f) AM_RAM // regs? |
| 296 | 296 | AM_RANGE(0x700000, 0x700fff) AM_RAM AM_SHARE("spriteram") |
| r21067 | r21068 | |
| 314 | 314 | static ADDRESS_MAP_START( zipzap_map, AS_PROGRAM, 16, galpanic_state ) |
| 315 | 315 | AM_RANGE(0x000000, 0x4fffff) AM_ROM |
| 316 | 316 | AM_RANGE(0x500000, 0x51ffff) AM_RAM AM_SHARE("fgvideoram") |
| 317 | | AM_RANGE(0x520000, 0x53ffff) AM_RAM_WRITE_LEGACY(galpanic_bgvideoram_w) AM_SHARE("bgvideoram") |
| 317 | AM_RANGE(0x520000, 0x53ffff) AM_RAM_WRITE(galpanic_bgvideoram_w) AM_SHARE("bgvideoram") |
| 318 | 318 | AM_RANGE(0x580000, 0x583fff) AM_RAM_WRITE(galpanic_bgvideoram_mirror_w) |
| 319 | | AM_RANGE(0x600000, 0x600fff) AM_RAM_WRITE_LEGACY(galpanic_paletteram_w) AM_SHARE("paletteram") /* 1024 colors, but only 512 seem to be used */ |
| 319 | AM_RANGE(0x600000, 0x600fff) AM_RAM_WRITE(galpanic_paletteram_w) AM_SHARE("paletteram") /* 1024 colors, but only 512 seem to be used */ |
| 320 | 320 | AM_RANGE(0x680000, 0x68001f) AM_RAM |
| 321 | 321 | AM_RANGE(0x700000, 0x700fff) AM_RAM AM_SHARE("spriteram") |
| 322 | 322 | AM_RANGE(0x701000, 0x71ffff) AM_RAM |
| r21067 | r21068 | |
| 335 | 335 | static ADDRESS_MAP_START( supmodel_map, AS_PROGRAM, 16, galpanic_state ) |
| 336 | 336 | AM_RANGE(0x000000, 0x4fffff) AM_ROM |
| 337 | 337 | AM_RANGE(0x500000, 0x51ffff) AM_RAM AM_SHARE("fgvideoram") |
| 338 | | AM_RANGE(0x520000, 0x53ffff) AM_RAM_WRITE_LEGACY(galpanic_bgvideoram_w) AM_SHARE("bgvideoram") |
| 338 | AM_RANGE(0x520000, 0x53ffff) AM_RAM_WRITE(galpanic_bgvideoram_w) AM_SHARE("bgvideoram") |
| 339 | 339 | // AM_RANGE(0x580000, 0x583fff) AM_RAM_WRITE(galpanic_bgvideoram_mirror_w) // can't be right, causes half the display to vanish at times! |
| 340 | | AM_RANGE(0x600000, 0x600fff) AM_RAM_WRITE_LEGACY(galpanic_paletteram_w) AM_SHARE("paletteram") /* 1024 colors, but only 512 seem to be used */ |
| 340 | AM_RANGE(0x600000, 0x600fff) AM_RAM_WRITE(galpanic_paletteram_w) AM_SHARE("paletteram") /* 1024 colors, but only 512 seem to be used */ |
| 341 | 341 | AM_RANGE(0x680000, 0x68001f) AM_RAM |
| 342 | 342 | AM_RANGE(0x700000, 0x700fff) AM_RAM AM_SHARE("spriteram") |
| 343 | 343 | AM_RANGE(0x780000, 0x78001f) AM_RAM |
trunk/src/mame/drivers/skullxbo.c
| r21067 | r21068 | |
| 115 | 115 | |
| 116 | 116 | static ADDRESS_MAP_START( main_map, AS_PROGRAM, 16, skullxbo_state ) |
| 117 | 117 | AM_RANGE(0x000000, 0x07ffff) AM_ROM |
| 118 | | AM_RANGE(0xff0000, 0xff07ff) AM_WRITE_LEGACY(skullxbo_mobmsb_w) |
| 118 | AM_RANGE(0xff0000, 0xff07ff) AM_WRITE(skullxbo_mobmsb_w) |
| 119 | 119 | AM_RANGE(0xff0800, 0xff0bff) AM_WRITE(skullxbo_halt_until_hblank_0_w) |
| 120 | 120 | AM_RANGE(0xff0c00, 0xff0fff) AM_WRITE(eeprom_enable_w) |
| 121 | 121 | AM_RANGE(0xff1000, 0xff13ff) AM_WRITE(video_int_ack_w) |
| 122 | 122 | AM_RANGE(0xff1400, 0xff17ff) AM_WRITE8(sound_w, 0x00ff) |
| 123 | 123 | AM_RANGE(0xff1800, 0xff1bff) AM_WRITE(sound_reset_w) |
| 124 | | AM_RANGE(0xff1c00, 0xff1c7f) AM_WRITE_LEGACY(skullxbo_playfieldlatch_w) |
| 125 | | AM_RANGE(0xff1c80, 0xff1cff) AM_WRITE_LEGACY(skullxbo_xscroll_w) AM_SHARE("xscroll") |
| 124 | AM_RANGE(0xff1c00, 0xff1c7f) AM_WRITE(skullxbo_playfieldlatch_w) |
| 125 | AM_RANGE(0xff1c80, 0xff1cff) AM_WRITE(skullxbo_xscroll_w) AM_SHARE("xscroll") |
| 126 | 126 | AM_RANGE(0xff1d00, 0xff1d7f) AM_WRITE(scanline_int_ack_w) |
| 127 | 127 | AM_RANGE(0xff1d80, 0xff1dff) AM_WRITE(watchdog_reset16_w) |
| 128 | | AM_RANGE(0xff1e00, 0xff1e7f) AM_WRITE_LEGACY(skullxbo_playfieldlatch_w) |
| 129 | | AM_RANGE(0xff1e80, 0xff1eff) AM_WRITE_LEGACY(skullxbo_xscroll_w) |
| 128 | AM_RANGE(0xff1e00, 0xff1e7f) AM_WRITE(skullxbo_playfieldlatch_w) |
| 129 | AM_RANGE(0xff1e80, 0xff1eff) AM_WRITE(skullxbo_xscroll_w) |
| 130 | 130 | AM_RANGE(0xff1f00, 0xff1f7f) AM_WRITE(scanline_int_ack_w) |
| 131 | 131 | AM_RANGE(0xff1f80, 0xff1fff) AM_WRITE(watchdog_reset16_w) |
| 132 | 132 | AM_RANGE(0xff2000, 0xff2fff) AM_RAM_WRITE(paletteram_666_w) AM_SHARE("paletteram") |
| 133 | | AM_RANGE(0xff4000, 0xff47ff) AM_WRITE_LEGACY(skullxbo_yscroll_w) AM_SHARE("yscroll") |
| 133 | AM_RANGE(0xff4000, 0xff47ff) AM_WRITE(skullxbo_yscroll_w) AM_SHARE("yscroll") |
| 134 | 134 | AM_RANGE(0xff4800, 0xff4fff) AM_WRITE(skullxbo_mobwr_w) |
| 135 | 135 | AM_RANGE(0xff6000, 0xff6fff) AM_WRITE(eeprom_w) AM_SHARE("eeprom") |
| 136 | 136 | AM_RANGE(0xff5000, 0xff5001) AM_READ8(sound_r, 0x00ff) |
trunk/src/mame/drivers/atarisy1.c
| r21067 | r21068 | |
| 461 | 461 | static ADDRESS_MAP_START( main_map, AS_PROGRAM, 16, atarisy1_state ) |
| 462 | 462 | AM_RANGE(0x000000, 0x07ffff) AM_ROM |
| 463 | 463 | AM_RANGE(0x080000, 0x087fff) AM_ROM /* slapstic maps here */ |
| 464 | | AM_RANGE(0x2e0000, 0x2e0001) AM_READ_LEGACY(atarisy1_int3state_r) |
| 464 | AM_RANGE(0x2e0000, 0x2e0001) AM_READ(atarisy1_int3state_r) |
| 465 | 465 | AM_RANGE(0x400000, 0x401fff) AM_RAM |
| 466 | | AM_RANGE(0x800000, 0x800001) AM_WRITE_LEGACY(atarisy1_xscroll_w) AM_SHARE("xscroll") |
| 467 | | AM_RANGE(0x820000, 0x820001) AM_WRITE_LEGACY(atarisy1_yscroll_w) AM_SHARE("yscroll") |
| 468 | | AM_RANGE(0x840000, 0x840001) AM_WRITE_LEGACY(atarisy1_priority_w) |
| 469 | | AM_RANGE(0x860000, 0x860001) AM_WRITE_LEGACY(atarisy1_bankselect_w) AM_SHARE("bankselect") |
| 466 | AM_RANGE(0x800000, 0x800001) AM_WRITE(atarisy1_xscroll_w) AM_SHARE("xscroll") |
| 467 | AM_RANGE(0x820000, 0x820001) AM_WRITE(atarisy1_yscroll_w) AM_SHARE("yscroll") |
| 468 | AM_RANGE(0x840000, 0x840001) AM_WRITE(atarisy1_priority_w) |
| 469 | AM_RANGE(0x860000, 0x860001) AM_WRITE(atarisy1_bankselect_w) AM_SHARE("bankselect") |
| 470 | 470 | AM_RANGE(0x880000, 0x880001) AM_WRITE(watchdog_reset16_w) |
| 471 | 471 | AM_RANGE(0x8a0000, 0x8a0001) AM_WRITE(video_int_ack_w) |
| 472 | 472 | AM_RANGE(0x8c0000, 0x8c0001) AM_WRITE(eeprom_enable_w) |
| 473 | 473 | AM_RANGE(0x900000, 0x9fffff) AM_RAM |
| 474 | 474 | AM_RANGE(0xa00000, 0xa01fff) AM_RAM_WRITE(playfield_w) AM_SHARE("playfield") |
| 475 | | AM_RANGE(0xa02000, 0xa02fff) AM_READWRITE_LEGACY(atarimo_0_spriteram_r, atarisy1_spriteram_w) |
| 475 | AM_RANGE(0xa02000, 0xa02fff) AM_READ_LEGACY(atarimo_0_spriteram_r) AM_WRITE(atarisy1_spriteram_w) |
| 476 | 476 | AM_RANGE(0xa03000, 0xa03fff) AM_RAM_WRITE(alpha_w) AM_SHARE("alpha") |
| 477 | 477 | AM_RANGE(0xb00000, 0xb007ff) AM_RAM_WRITE(paletteram_IIIIRRRRGGGGBBBB_word_w) AM_SHARE("paletteram") |
| 478 | 478 | AM_RANGE(0xf00000, 0xf00fff) AM_READWRITE(eeprom_r, eeprom_w) AM_SHARE("eeprom") |