trunk/src/mame/drivers/8080bw.c
| r248598 | r248599 | |
| 421 | 421 | MCFG_SCREEN_MODIFY("screen") |
| 422 | 422 | MCFG_SCREEN_UPDATE_DRIVER(_8080bw_state, screen_update_invadpt2) |
| 423 | 423 | |
| 424 | MCFG_PALETTE_ADD_3BIT_RBG("palette") |
| 425 | |
| 424 | 426 | /* sound hardware */ |
| 425 | 427 | MCFG_FRAGMENT_ADD(invaders_samples_audio) |
| 426 | 428 | MACHINE_CONFIG_END |
| r248598 | r248599 | |
| 623 | 625 | MCFG_SCREEN_MODIFY("screen") |
| 624 | 626 | MCFG_SCREEN_UPDATE_DRIVER(_8080bw_state, screen_update_cosmo) |
| 625 | 627 | |
| 628 | MCFG_PALETTE_ADD_3BIT_RGB("palette") |
| 629 | |
| 626 | 630 | /* sound hardware */ |
| 627 | 631 | MCFG_FRAGMENT_ADD(invaders_samples_audio) |
| 628 | 632 | MACHINE_CONFIG_END |
| r248598 | r248599 | |
| 893 | 897 | MCFG_SCREEN_MODIFY("screen") |
| 894 | 898 | MCFG_SCREEN_UPDATE_DRIVER(_8080bw_state, screen_update_invadpt2) |
| 895 | 899 | |
| 900 | MCFG_PALETTE_ADD_3BIT_RBG("palette") |
| 901 | |
| 896 | 902 | /* sound hardware */ |
| 897 | 903 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 898 | 904 | |
| r248598 | r248599 | |
| 1056 | 1062 | MCFG_SCREEN_MODIFY("screen") |
| 1057 | 1063 | MCFG_SCREEN_UPDATE_DRIVER(_8080bw_state, screen_update_invadpt2) |
| 1058 | 1064 | |
| 1065 | MCFG_PALETTE_ADD_3BIT_RBG("palette") |
| 1066 | |
| 1059 | 1067 | /* sound hardware */ |
| 1060 | 1068 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 1061 | 1069 | |
| r248598 | r248599 | |
| 1385 | 1393 | MCFG_SCREEN_MODIFY("screen") |
| 1386 | 1394 | MCFG_SCREEN_UPDATE_DRIVER(_8080bw_state, screen_update_schaser) |
| 1387 | 1395 | |
| 1396 | MCFG_PALETTE_ADD_3BIT_RBG("palette") |
| 1397 | |
| 1388 | 1398 | /* sound hardware */ |
| 1389 | 1399 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 1390 | 1400 | |
| r248598 | r248599 | |
| 1490 | 1500 | MCFG_SCREEN_MODIFY("screen") |
| 1491 | 1501 | MCFG_SCREEN_UPDATE_DRIVER(_8080bw_state, screen_update_schasercv) |
| 1492 | 1502 | |
| 1503 | MCFG_PALETTE_ADD_3BIT_RBG("palette") |
| 1504 | |
| 1493 | 1505 | /* sound hardware */ |
| 1494 | 1506 | MCFG_FRAGMENT_ADD(invaders_samples_audio) |
| 1495 | 1507 | |
| r248598 | r248599 | |
| 1570 | 1582 | /* video hardware */ |
| 1571 | 1583 | MCFG_SCREEN_MODIFY("screen") |
| 1572 | 1584 | MCFG_SCREEN_UPDATE_DRIVER(_8080bw_state, screen_update_sflush) |
| 1585 | |
| 1586 | MCFG_PALETTE_ADD("palette", 8) |
| 1587 | MCFG_PALETTE_INIT_OWNER(_8080bw_state, sflush) |
| 1573 | 1588 | MACHINE_CONFIG_END |
| 1574 | 1589 | |
| 1575 | 1590 | |
| r248598 | r248599 | |
| 1670 | 1685 | MCFG_SCREEN_MODIFY("screen") |
| 1671 | 1686 | MCFG_SCREEN_UPDATE_DRIVER(_8080bw_state, screen_update_indianbt) |
| 1672 | 1687 | |
| 1688 | MCFG_PALETTE_ADD_3BIT_RGB("palette") |
| 1689 | |
| 1673 | 1690 | /* sound hardware */ |
| 1674 | 1691 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 1675 | 1692 | |
| r248598 | r248599 | |
| 1714 | 1731 | MCFG_SCREEN_MODIFY("screen") |
| 1715 | 1732 | MCFG_SCREEN_UPDATE_DRIVER(_8080bw_state, screen_update_lupin3) |
| 1716 | 1733 | |
| 1734 | MCFG_PALETTE_ADD_3BIT_RBG("palette") |
| 1735 | |
| 1717 | 1736 | /* sound hardware */ |
| 1718 | 1737 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 1719 | 1738 | |
| r248598 | r248599 | |
| 1865 | 1884 | MCFG_SCREEN_MODIFY("screen") |
| 1866 | 1885 | MCFG_SCREEN_UPDATE_DRIVER(_8080bw_state, screen_update_polaris) |
| 1867 | 1886 | |
| 1887 | MCFG_PALETTE_ADD_3BIT_RBG("palette") |
| 1888 | |
| 1868 | 1889 | /* sound hardware */ |
| 1869 | 1890 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 1870 | 1891 | |
| r248598 | r248599 | |
| 1989 | 2010 | MCFG_SCREEN_MODIFY("screen") |
| 1990 | 2011 | MCFG_SCREEN_UPDATE_DRIVER(_8080bw_state, screen_update_ballbomb) |
| 1991 | 2012 | |
| 2013 | MCFG_PALETTE_ADD_3BIT_RBG("palette") |
| 2014 | |
| 1992 | 2015 | /* sound hardware */ |
| 1993 | 2016 | MCFG_FRAGMENT_ADD(invaders_samples_audio) |
| 1994 | 2017 | |
| r248598 | r248599 | |
| 2230 | 2253 | MCFG_SCREEN_MODIFY("screen") |
| 2231 | 2254 | MCFG_SCREEN_UPDATE_DRIVER(_8080bw_state, screen_update_indianbt) |
| 2232 | 2255 | |
| 2256 | MCFG_PALETTE_ADD_3BIT_RGB("palette") |
| 2257 | |
| 2233 | 2258 | /* sound hardware */ |
| 2234 | 2259 | MCFG_FRAGMENT_ADD(invaders_samples_audio) |
| 2235 | 2260 | |
| r248598 | r248599 | |
| 2253 | 2278 | MCFG_SCREEN_MODIFY("screen") |
| 2254 | 2279 | MCFG_SCREEN_UPDATE_DRIVER(_8080bw_state, screen_update_indianbt) |
| 2255 | 2280 | |
| 2281 | MCFG_PALETTE_ADD_3BIT_RGB("palette") |
| 2282 | |
| 2256 | 2283 | /* sound hardware */ |
| 2257 | 2284 | MCFG_FRAGMENT_ADD(invaders_samples_audio) |
| 2258 | 2285 | MACHINE_CONFIG_END |
| r248598 | r248599 | |
| 2324 | 2351 | MCFG_SCREEN_MODIFY("screen") |
| 2325 | 2352 | MCFG_SCREEN_UPDATE_DRIVER(_8080bw_state, screen_update_invadpt2) |
| 2326 | 2353 | |
| 2354 | MCFG_PALETTE_ADD_3BIT_RBG("palette") |
| 2355 | |
| 2327 | 2356 | /* sound hardware */ |
| 2328 | 2357 | MCFG_FRAGMENT_ADD(invaders_samples_audio) |
| 2329 | 2358 | MACHINE_CONFIG_END |
trunk/src/mame/video/8080bw.c
| r248598 | r248599 | |
| 12 | 12 | #include "includes/8080bw.h" |
| 13 | 13 | |
| 14 | 14 | |
| 15 | | #define NUM_PENS (8) |
| 16 | | |
| 17 | | |
| 18 | 15 | MACHINE_START_MEMBER(_8080bw_state,extra_8080bw_vh) |
| 19 | 16 | { |
| 20 | 17 | save_item(NAME(m_flip_screen)); |
| r248598 | r248599 | |
| 44 | 41 | } |
| 45 | 42 | |
| 46 | 43 | |
| 47 | | void _8080bw_state::invadpt2_get_pens( pen_t *pens ) |
| 44 | PALETTE_INIT_MEMBER( _8080bw_state, sflush ) |
| 48 | 45 | { |
| 49 | | offs_t i; |
| 46 | // standard 3-bit rbg palette |
| 47 | palette.palette_init_3bit_rbg(palette); |
| 50 | 48 | |
| 51 | | for (i = 0; i < NUM_PENS; i++) |
| 52 | | { |
| 53 | | pens[i] = rgb_t(pal1bit(i >> 0), pal1bit(i >> 2), pal1bit(i >> 1)); |
| 54 | | } |
| 49 | // but background color is bright blue |
| 50 | palette.set_pen_color(0, 0x80, 0x80, 0xff); |
| 55 | 51 | } |
| 56 | 52 | |
| 57 | 53 | |
| 58 | | void _8080bw_state::sflush_get_pens( pen_t *pens ) |
| 54 | inline void _8080bw_state::set_pixel( bitmap_rgb32 &bitmap, UINT8 y, UINT8 x, int color ) |
| 59 | 55 | { |
| 60 | | offs_t i; |
| 61 | | |
| 62 | | pens[0] = rgb_t(0x80, 0x80, 0xff); |
| 63 | | |
| 64 | | for (i = 1; i < NUM_PENS; i++) |
| 65 | | { |
| 66 | | pens[i] = rgb_t(pal1bit(i >> 0), pal1bit(i >> 2), pal1bit(i >> 1)); |
| 67 | | } |
| 68 | | } |
| 69 | | |
| 70 | | |
| 71 | | void _8080bw_state::cosmo_get_pens( pen_t *pens ) |
| 72 | | { |
| 73 | | offs_t i; |
| 74 | | |
| 75 | | for (i = 0; i < NUM_PENS; i++) |
| 76 | | { |
| 77 | | pens[i] = rgb_t(pal1bit(i >> 0), pal1bit(i >> 1), pal1bit(i >> 2)); |
| 78 | | } |
| 79 | | } |
| 80 | | |
| 81 | | |
| 82 | | inline void _8080bw_state::set_pixel( bitmap_rgb32 &bitmap, UINT8 y, UINT8 x, const pen_t *pens, UINT8 color ) |
| 83 | | { |
| 84 | 56 | if (y >= MW8080BW_VCOUNTER_START_NO_VBLANK) |
| 85 | 57 | { |
| 86 | 58 | if (m_flip_screen) |
| 87 | | bitmap.pix32(MW8080BW_VBSTART - 1 - (y - MW8080BW_VCOUNTER_START_NO_VBLANK), MW8080BW_HPIXCOUNT - 1 - x) = pens[color]; |
| 59 | bitmap.pix32(MW8080BW_VBSTART - 1 - (y - MW8080BW_VCOUNTER_START_NO_VBLANK), MW8080BW_HPIXCOUNT - 1 - x) = color; |
| 88 | 60 | else |
| 89 | | bitmap.pix32(y - MW8080BW_VCOUNTER_START_NO_VBLANK, x) = pens[color]; |
| 61 | bitmap.pix32(y - MW8080BW_VCOUNTER_START_NO_VBLANK, x) = m_palette->pen_color(color); |
| 90 | 62 | } |
| 91 | 63 | } |
| 92 | 64 | |
| 93 | 65 | |
| 94 | | inline void _8080bw_state::set_8_pixels( bitmap_rgb32 &bitmap, UINT8 y, UINT8 x, UINT8 data, const pen_t *pens, UINT8 fore_color, UINT8 back_color ) |
| 66 | inline void _8080bw_state::set_8_pixels( bitmap_rgb32 &bitmap, UINT8 y, UINT8 x, UINT8 data, int fore_color, int back_color ) |
| 95 | 67 | { |
| 96 | 68 | int i; |
| 97 | 69 | |
| 98 | 70 | for (i = 0; i < 8; i++) |
| 99 | 71 | { |
| 100 | | set_pixel(bitmap, y, x, pens, (data & 0x01) ? fore_color : back_color); |
| 72 | set_pixel(bitmap, y, x, (data & 0x01) ? fore_color : back_color); |
| 101 | 73 | |
| 102 | 74 | x = x + 1; |
| 103 | 75 | data = data >> 1; |
| r248598 | r248599 | |
| 106 | 78 | |
| 107 | 79 | |
| 108 | 80 | /* this is needed as this driver doesn't emulate the shift register like mw8080bw does */ |
| 109 | | void _8080bw_state::clear_extra_columns( bitmap_rgb32 &bitmap, const pen_t *pens, UINT8 color ) |
| 81 | void _8080bw_state::clear_extra_columns( bitmap_rgb32 &bitmap, int color ) |
| 110 | 82 | { |
| 111 | 83 | UINT8 x; |
| 112 | 84 | |
| r248598 | r248599 | |
| 117 | 89 | for (y = MW8080BW_VCOUNTER_START_NO_VBLANK; y != 0; y++) |
| 118 | 90 | { |
| 119 | 91 | if (m_flip_screen) |
| 120 | | bitmap.pix32(MW8080BW_VBSTART - 1 - (y - MW8080BW_VCOUNTER_START_NO_VBLANK), MW8080BW_HPIXCOUNT - 1 - (256 + x)) = pens[color]; |
| 92 | bitmap.pix32(MW8080BW_VBSTART - 1 - (y - MW8080BW_VCOUNTER_START_NO_VBLANK), MW8080BW_HPIXCOUNT - 1 - (256 + x)) = m_palette->pen_color(color); |
| 121 | 93 | else |
| 122 | | bitmap.pix32(y - MW8080BW_VCOUNTER_START_NO_VBLANK, 256 + x) = pens[color]; |
| 94 | bitmap.pix32(y - MW8080BW_VCOUNTER_START_NO_VBLANK, 256 + x) = m_palette->pen_color(color); |
| 123 | 95 | } |
| 124 | 96 | } |
| 125 | 97 | } |
| r248598 | r248599 | |
| 127 | 99 | |
| 128 | 100 | UINT32 _8080bw_state::screen_update_invadpt2(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
| 129 | 101 | { |
| 130 | | pen_t pens[NUM_PENS]; |
| 131 | | offs_t offs; |
| 132 | | UINT8 *prom; |
| 133 | | UINT8 *color_map_base; |
| 102 | UINT8 *prom = memregion("proms")->base(); |
| 103 | UINT8 *color_map_base = m_color_map ? &prom[0x0400] : &prom[0x0000]; |
| 134 | 104 | |
| 135 | | invadpt2_get_pens(pens); |
| 136 | | |
| 137 | | prom = memregion("proms")->base(); |
| 138 | | color_map_base = m_color_map ? &prom[0x0400] : &prom[0x0000]; |
| 139 | | |
| 140 | | for (offs = 0; offs < m_main_ram.bytes(); offs++) |
| 105 | for (offs_t offs = 0; offs < m_main_ram.bytes(); offs++) |
| 141 | 106 | { |
| 142 | 107 | UINT8 y = offs >> 5; |
| 143 | 108 | UINT8 x = offs << 3; |
| r248598 | r248599 | |
| 147 | 112 | UINT8 data = m_main_ram[offs]; |
| 148 | 113 | UINT8 fore_color = m_screen_red ? 1 : color_map_base[color_address] & 0x07; |
| 149 | 114 | |
| 150 | | set_8_pixels(bitmap, y, x, data, pens, fore_color, 0); |
| 115 | set_8_pixels(bitmap, y, x, data, fore_color, 0); |
| 151 | 116 | } |
| 152 | 117 | |
| 153 | | clear_extra_columns(bitmap, pens, 0); |
| 118 | clear_extra_columns(bitmap, 0); |
| 154 | 119 | |
| 155 | 120 | return 0; |
| 156 | 121 | } |
| r248598 | r248599 | |
| 158 | 123 | |
| 159 | 124 | UINT32 _8080bw_state::screen_update_ballbomb(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
| 160 | 125 | { |
| 161 | | pen_t pens[NUM_PENS]; |
| 162 | | offs_t offs; |
| 163 | | UINT8 *color_map_base; |
| 164 | | UINT8 *prom; |
| 126 | UINT8 *prom = memregion("proms")->base(); |
| 127 | UINT8 *color_map_base = m_color_map ? &prom[0x0400] : &prom[0x0000]; |
| 165 | 128 | |
| 166 | | invadpt2_get_pens(pens); |
| 167 | | |
| 168 | | prom = memregion("proms")->base(); |
| 169 | | color_map_base = m_color_map ? &prom[0x0400] : &prom[0x0000]; |
| 170 | | |
| 171 | | for (offs = 0; offs < m_main_ram.bytes(); offs++) |
| 129 | for (offs_t offs = 0; offs < m_main_ram.bytes(); offs++) |
| 172 | 130 | { |
| 173 | 131 | UINT8 y = offs >> 5; |
| 174 | 132 | UINT8 x = offs << 3; |
| r248598 | r248599 | |
| 179 | 137 | UINT8 fore_color = m_screen_red ? 1 : color_map_base[color_address] & 0x07; |
| 180 | 138 | |
| 181 | 139 | /* blue background */ |
| 182 | | set_8_pixels(bitmap, y, x, data, pens, fore_color, 2); |
| 140 | set_8_pixels(bitmap, y, x, data, fore_color, 2); |
| 183 | 141 | } |
| 184 | 142 | |
| 185 | | clear_extra_columns(bitmap, pens, 2); |
| 143 | clear_extra_columns(bitmap, 2); |
| 186 | 144 | |
| 187 | 145 | return 0; |
| 188 | 146 | } |
| r248598 | r248599 | |
| 190 | 148 | |
| 191 | 149 | UINT32 _8080bw_state::screen_update_schaser(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
| 192 | 150 | { |
| 193 | | pen_t pens[NUM_PENS]; |
| 194 | | offs_t offs; |
| 195 | | UINT8 *background_map_base; |
| 151 | UINT8 *background_map_base = memregion("proms")->base(); |
| 196 | 152 | |
| 197 | | invadpt2_get_pens(pens); |
| 198 | | |
| 199 | | background_map_base = memregion("proms")->base(); |
| 200 | | |
| 201 | | for (offs = 0; offs < m_main_ram.bytes(); offs++) |
| 153 | for (offs_t offs = 0; offs < m_main_ram.bytes(); offs++) |
| 202 | 154 | { |
| 203 | 155 | UINT8 back_color = 0; |
| 204 | 156 | |
| r248598 | r248599 | |
| 219 | 171 | back_color = (((back_data & 0x0c) == 0x0c) && m_schaser_background_select) ? 4 : 2; |
| 220 | 172 | } |
| 221 | 173 | |
| 222 | | set_8_pixels(bitmap, y, x, data, pens, fore_color, back_color); |
| 174 | set_8_pixels(bitmap, y, x, data, fore_color, back_color); |
| 223 | 175 | } |
| 224 | 176 | |
| 225 | | clear_extra_columns(bitmap, pens, m_schaser_background_disable ? 0 : 2); |
| 177 | clear_extra_columns(bitmap, m_schaser_background_disable ? 0 : 2); |
| 226 | 178 | |
| 227 | 179 | return 0; |
| 228 | 180 | } |
| r248598 | r248599 | |
| 230 | 182 | |
| 231 | 183 | UINT32 _8080bw_state::screen_update_schasercv(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
| 232 | 184 | { |
| 233 | | pen_t pens[NUM_PENS]; |
| 234 | | offs_t offs; |
| 235 | | |
| 236 | | invadpt2_get_pens(pens); |
| 237 | | |
| 238 | | for (offs = 0; offs < m_main_ram.bytes(); offs++) |
| 185 | for (offs_t offs = 0; offs < m_main_ram.bytes(); offs++) |
| 239 | 186 | { |
| 240 | 187 | UINT8 y = offs >> 5; |
| 241 | 188 | UINT8 x = offs << 3; |
| r248598 | r248599 | |
| 244 | 191 | UINT8 fore_color = m_colorram[offs & 0x1f9f] & 0x07; |
| 245 | 192 | |
| 246 | 193 | /* blue background */ |
| 247 | | set_8_pixels(bitmap, y, x, data, pens, fore_color, 2); |
| 194 | set_8_pixels(bitmap, y, x, data, fore_color, 2); |
| 248 | 195 | } |
| 249 | 196 | |
| 250 | | clear_extra_columns(bitmap, pens, 2); |
| 197 | clear_extra_columns(bitmap, 2); |
| 251 | 198 | |
| 252 | 199 | return 0; |
| 253 | 200 | } |
| r248598 | r248599 | |
| 255 | 202 | |
| 256 | 203 | UINT32 _8080bw_state::screen_update_rollingc(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
| 257 | 204 | { |
| 258 | | offs_t offs; |
| 259 | | |
| 260 | | for (offs = 0; offs < m_main_ram.bytes(); offs++) |
| 205 | for (offs_t offs = 0; offs < m_main_ram.bytes(); offs++) |
| 261 | 206 | { |
| 262 | 207 | UINT8 y = offs >> 5; |
| 263 | 208 | UINT8 x = offs << 3; |
| r248598 | r248599 | |
| 266 | 211 | UINT8 fore_color = m_colorram[offs & 0x1f1f] & 0x0f; |
| 267 | 212 | UINT8 back_color = m_colorram2[offs & 0x1f1f] & 0x0f; |
| 268 | 213 | |
| 269 | | set_8_pixels(bitmap, y, x, data, m_palette->pens(), fore_color, back_color); |
| 214 | set_8_pixels(bitmap, y, x, data, fore_color, back_color); |
| 270 | 215 | } |
| 271 | 216 | |
| 272 | | clear_extra_columns(bitmap, m_palette->pens(), 0); |
| 217 | clear_extra_columns(bitmap, 0); |
| 273 | 218 | |
| 274 | 219 | return 0; |
| 275 | 220 | } |
| r248598 | r248599 | |
| 277 | 222 | |
| 278 | 223 | UINT32 _8080bw_state::screen_update_polaris(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
| 279 | 224 | { |
| 280 | | pen_t pens[NUM_PENS]; |
| 281 | | offs_t offs; |
| 282 | | UINT8 *color_map_base; |
| 283 | | UINT8 *cloud_gfx; |
| 225 | UINT8 *color_map_base = memregion("proms")->base(); |
| 226 | UINT8 *cloud_gfx = memregion("user1")->base(); |
| 284 | 227 | |
| 285 | | invadpt2_get_pens(pens); |
| 286 | | |
| 287 | | color_map_base = memregion("proms")->base(); |
| 288 | | cloud_gfx = memregion("user1")->base(); |
| 289 | | |
| 290 | | for (offs = 0; offs < m_main_ram.bytes(); offs++) |
| 228 | for (offs_t offs = 0; offs < m_main_ram.bytes(); offs++) |
| 291 | 229 | { |
| 292 | 230 | UINT8 y = offs >> 5; |
| 293 | 231 | UINT8 x = offs << 3; |
| r248598 | r248599 | |
| 309 | 247 | |
| 310 | 248 | if ((color_map_base[color_address] & 0x08) || (cloud_y >= 64)) |
| 311 | 249 | { |
| 312 | | set_8_pixels(bitmap, y, x, data, pens, fore_color, back_color); |
| 250 | set_8_pixels(bitmap, y, x, data, fore_color, back_color); |
| 313 | 251 | } |
| 314 | 252 | else |
| 315 | 253 | { |
| r248598 | r248599 | |
| 332 | 270 | color = (cloud_gfx[cloud_gfx_offs] & bit) ? 7 : back_color; |
| 333 | 271 | } |
| 334 | 272 | |
| 335 | | set_pixel(bitmap, y, x, pens, color); |
| 273 | set_pixel(bitmap, y, x, color); |
| 336 | 274 | |
| 337 | 275 | x = x + 1; |
| 338 | 276 | data = data >> 1; |
| r248598 | r248599 | |
| 340 | 278 | } |
| 341 | 279 | } |
| 342 | 280 | |
| 343 | | clear_extra_columns(bitmap, pens, 6); |
| 281 | clear_extra_columns(bitmap, 6); |
| 344 | 282 | |
| 345 | 283 | return 0; |
| 346 | 284 | } |
| r248598 | r248599 | |
| 348 | 286 | |
| 349 | 287 | UINT32 _8080bw_state::screen_update_lupin3(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
| 350 | 288 | { |
| 351 | | pen_t pens[NUM_PENS]; |
| 352 | | offs_t offs; |
| 353 | | |
| 354 | | invadpt2_get_pens(pens); |
| 355 | | |
| 356 | | for (offs = 0; offs < m_main_ram.bytes(); offs++) |
| 289 | for (offs_t offs = 0; offs < m_main_ram.bytes(); offs++) |
| 357 | 290 | { |
| 358 | 291 | UINT8 y = offs >> 5; |
| 359 | 292 | UINT8 x = offs << 3; |
| r248598 | r248599 | |
| 361 | 294 | UINT8 data = m_main_ram[offs]; |
| 362 | 295 | UINT8 fore_color = ~m_colorram[offs & 0x1f9f] & 0x07; |
| 363 | 296 | |
| 364 | | set_8_pixels(bitmap, y, x, data, pens, fore_color, 0); |
| 297 | set_8_pixels(bitmap, y, x, data, fore_color, 0); |
| 365 | 298 | } |
| 366 | 299 | |
| 367 | | clear_extra_columns(bitmap, pens, 0); |
| 300 | clear_extra_columns(bitmap, 0); |
| 368 | 301 | |
| 369 | 302 | return 0; |
| 370 | 303 | } |
| r248598 | r248599 | |
| 372 | 305 | |
| 373 | 306 | UINT32 _8080bw_state::screen_update_cosmo(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
| 374 | 307 | { |
| 375 | | pen_t pens[NUM_PENS]; |
| 376 | | offs_t offs; |
| 377 | | |
| 378 | | cosmo_get_pens(pens); |
| 379 | | |
| 380 | | for (offs = 0; offs < m_main_ram.bytes(); offs++) |
| 308 | for (offs_t offs = 0; offs < m_main_ram.bytes(); offs++) |
| 381 | 309 | { |
| 382 | 310 | UINT8 y = offs >> 5; |
| 383 | 311 | UINT8 x = offs << 3; |
| r248598 | r248599 | |
| 387 | 315 | UINT8 data = m_main_ram[offs]; |
| 388 | 316 | UINT8 fore_color = m_colorram[color_address] & 0x07; |
| 389 | 317 | |
| 390 | | set_8_pixels(bitmap, y, x, data, pens, fore_color, 0); |
| 318 | set_8_pixels(bitmap, y, x, data, fore_color, 0); |
| 391 | 319 | } |
| 392 | 320 | |
| 393 | | clear_extra_columns(bitmap, pens, 0); |
| 321 | clear_extra_columns(bitmap, 0); |
| 394 | 322 | |
| 395 | 323 | return 0; |
| 396 | 324 | } |
| r248598 | r248599 | |
| 398 | 326 | |
| 399 | 327 | UINT32 _8080bw_state::screen_update_indianbt(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
| 400 | 328 | { |
| 401 | | pen_t pens[NUM_PENS]; |
| 402 | | offs_t offs; |
| 403 | | UINT8 *color_map_base; |
| 404 | | UINT8 *prom; |
| 329 | UINT8 *prom = memregion("proms")->base(); |
| 330 | UINT8 *color_map_base = m_color_map ? &prom[0x0400] : &prom[0x0000]; |
| 405 | 331 | |
| 406 | | cosmo_get_pens(pens); |
| 407 | | |
| 408 | | prom = memregion("proms")->base(); |
| 409 | | color_map_base = m_color_map ? &prom[0x0400] : &prom[0x0000]; |
| 410 | | |
| 411 | | for (offs = 0; offs < m_main_ram.bytes(); offs++) |
| 332 | for (offs_t offs = 0; offs < m_main_ram.bytes(); offs++) |
| 412 | 333 | { |
| 413 | 334 | UINT8 y = offs >> 5; |
| 414 | 335 | UINT8 x = offs << 3; |
| r248598 | r248599 | |
| 418 | 339 | UINT8 data = m_main_ram[offs]; |
| 419 | 340 | UINT8 fore_color = color_map_base[color_address] & 0x07; |
| 420 | 341 | |
| 421 | | set_8_pixels(bitmap, y, x, data, pens, fore_color, 0); |
| 342 | set_8_pixels(bitmap, y, x, data, fore_color, 0); |
| 422 | 343 | } |
| 423 | 344 | |
| 424 | | clear_extra_columns(bitmap, pens, 0); |
| 345 | clear_extra_columns(bitmap, 0); |
| 425 | 346 | |
| 426 | 347 | return 0; |
| 427 | 348 | } |
| r248598 | r248599 | |
| 429 | 350 | |
| 430 | 351 | UINT32 _8080bw_state::screen_update_sflush(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
| 431 | 352 | { |
| 432 | | pen_t pens[NUM_PENS]; |
| 433 | | offs_t offs; |
| 434 | | |
| 435 | | sflush_get_pens(pens); |
| 436 | | |
| 437 | | for (offs = 0; offs < m_main_ram.bytes(); offs++) |
| 353 | for (offs_t offs = 0; offs < m_main_ram.bytes(); offs++) |
| 438 | 354 | { |
| 439 | 355 | UINT8 y = offs >> 5; |
| 440 | 356 | UINT8 x = offs << 3; |
| r248598 | r248599 | |
| 442 | 358 | UINT8 data = m_main_ram[offs]; |
| 443 | 359 | UINT8 fore_color = m_colorram[offs & 0x1f9f] & 0x07; |
| 444 | 360 | |
| 445 | | set_8_pixels(bitmap, y, x, data, pens, fore_color, 0); |
| 361 | set_8_pixels(bitmap, y, x, data, fore_color, 0); |
| 446 | 362 | } |
| 447 | 363 | |
| 448 | | clear_extra_columns(bitmap, pens, 0); |
| 364 | clear_extra_columns(bitmap, 0); |
| 449 | 365 | |
| 450 | 366 | return 0; |
| 451 | 367 | } |
| r248598 | r248599 | |
| 453 | 369 | |
| 454 | 370 | UINT32 _8080bw_state::screen_update_shuttlei(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
| 455 | 371 | { |
| 456 | | pen_t pens[2] = { rgb_t::black, rgb_t::white }; |
| 457 | | offs_t offs; |
| 458 | | |
| 459 | | for (offs = 0; offs < m_main_ram.bytes(); offs++) |
| 372 | for (offs_t offs = 0; offs < m_main_ram.bytes(); offs++) |
| 460 | 373 | { |
| 461 | | int i; |
| 462 | | |
| 463 | 374 | UINT8 y = offs >> 5; |
| 464 | 375 | UINT8 x = offs << 3; |
| 465 | 376 | |
| 466 | 377 | UINT8 data = m_main_ram[offs]; |
| 467 | 378 | |
| 468 | | for (i = 0; i < 8; i++) |
| 379 | for (int i = 0; i < 8; i++) |
| 469 | 380 | { |
| 470 | 381 | if (m_flip_screen) |
| 471 | | bitmap.pix32(191-y, 255-(x|i)) = pens[BIT(data, 7)]; |
| 382 | bitmap.pix32(191-y, 255-(x|i)) = BIT(data, 7) ? rgb_t::white : rgb_t::black; |
| 472 | 383 | else |
| 473 | | bitmap.pix32(y, x|i) = pens[BIT(data, 7)]; |
| 384 | bitmap.pix32(y, x|i) = BIT(data, 7) ? rgb_t::white : rgb_t::black; |
| 474 | 385 | data <<= 1; |
| 475 | 386 | } |
| 476 | 387 | } |
| r248598 | r248599 | |
| 481 | 392 | |
| 482 | 393 | UINT32 _8080bw_state::screen_update_spacecom(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
| 483 | 394 | { |
| 484 | | pen_t pens[2] = { rgb_t::black, rgb_t::white }; |
| 485 | | offs_t offs; |
| 486 | | |
| 487 | | for (offs = 0; offs < 0x1c00; offs++) |
| 395 | for (offs_t offs = 0; offs < 0x1c00; offs++) |
| 488 | 396 | { |
| 489 | | int i; |
| 490 | | |
| 491 | 397 | UINT8 y = offs >> 5; |
| 492 | 398 | UINT8 x = offs << 3; |
| 493 | 399 | UINT8 flipx = m_flip_screen ? 7 : 0; |
| 494 | 400 | |
| 495 | 401 | UINT8 data = m_main_ram[offs+0x400]; |
| 496 | 402 | |
| 497 | | for (i = 0; i < 8; i++) |
| 403 | for (int i = 0; i < 8; i++) |
| 498 | 404 | { |
| 499 | | bitmap.pix32(y, x | (i^flipx)) = pens[data & 1]; |
| 405 | bitmap.pix32(y, x | (i^flipx)) = BIT(data, 0) ? rgb_t::white : rgb_t::black; |
| 500 | 406 | data >>= 1; |
| 501 | 407 | } |
| 502 | 408 | } |