src/mess/video/vtech2.c
| r2049 | r2050 | |
| 126 | 126 | int offs, x, y; |
| 127 | 127 | int full_refresh = 1; |
| 128 | 128 | |
| 129 | | if( full_refresh ) |
| 130 | | { |
| 131 | | fillbitmap(bitmap, screen->machine->pens[(laser_bg_mode >> 4) & 15], cliprect); |
| 132 | | } |
| 129 | if( full_refresh ) |
| 130 | fillbitmap(bitmap, ((laser_bg_mode >> 4) & 15)<<1, cliprect); |
| 133 | 131 | |
| 134 | 132 | if (laser_latch & 0x08) |
| 135 | 133 | { |
| r2049 | r2050 | |
| 142 | 140 | * GR 5 |
| 143 | 141 | * 640x192 1bpp |
| 144 | 142 | */ |
| 145 | | for( y = 0; y < 192; y++ ) |
| 146 | | { |
| 143 | for( y = 0; y < 192; y++ ) |
| 144 | { |
| 147 | 145 | offs = offs_2[y]; |
| 148 | | for( x = 0; x < 80; x++, offs++ ) |
| 149 | | { |
| 146 | for( x = 0; x < 80; x++, offs++ ) |
| 147 | { |
| 150 | 148 | int sx, sy, code, color = laser_two_color; |
| 151 | 149 | sy = BORDER_V/2 + y; |
| 152 | 150 | sx = BORDER_H/2 + x * 8; |
| 153 | | code = videoram[offs]; |
| 154 | | drawgfx(bitmap,screen->machine->gfx[2],code,color,0,0,sx,sy, |
| 155 | | cliprect,TRANSPARENCY_NONE,0); |
| 156 | | } |
| 157 | | } |
| 158 | | break; |
| 151 | code = videoram[offs]; |
| 152 | drawgfx(bitmap,screen->machine->gfx[2],code,color,0,0,sx,sy,cliprect,TRANSPARENCY_NONE,0); |
| 153 | } |
| 154 | } |
| 155 | break; |
| 159 | 156 | |
| 160 | | case 2: |
| 157 | case 2: |
| 161 | 158 | /* |
| 162 | 159 | * GR 4 |
| 163 | 160 | * 320x192 1bpp with two colors per 8 pixels |
| 164 | 161 | */ |
| 165 | | for( y = 0; y < 192; y++ ) |
| 166 | | { |
| 162 | for( y = 0; y < 192; y++ ) |
| 163 | { |
| 167 | 164 | offs = offs_2[y]; |
| 168 | 165 | for( x = 0; x < 40; x++, offs += 2 ) |
| 169 | | { |
| 166 | { |
| 170 | 167 | int sx, sy, code, color; |
| 171 | 168 | sy = BORDER_V/2 + y; |
| 172 | 169 | sx = BORDER_H/2 + x * 16; |
| 173 | | code = videoram[offs]; |
| 170 | code = videoram[offs]; |
| 174 | 171 | color = videoram[offs+1]; |
| 175 | | drawgfx(bitmap,screen->machine->gfx[3],code,color,0,0,sx,sy, |
| 176 | | cliprect,TRANSPARENCY_NONE,0); |
| 177 | | } |
| 178 | | } |
| 179 | | break; |
| 172 | drawgfx(bitmap,screen->machine->gfx[3],code,color,0,0,sx,sy,cliprect,TRANSPARENCY_NONE,0); |
| 173 | } |
| 174 | } |
| 175 | break; |
| 180 | 176 | |
| 181 | 177 | case 3: |
| 182 | 178 | /* |
| 183 | 179 | * GR 3 |
| 184 | 180 | * 160x192 4bpp |
| 185 | 181 | */ |
| 186 | | for( y = 0; y < 192; y++ ) |
| 187 | | { |
| 182 | for( y = 0; y < 192; y++ ) |
| 183 | { |
| 188 | 184 | offs = offs_2[y]; |
| 189 | 185 | for( x = 0; x < 80; x++, offs++ ) |
| 190 | | { |
| 186 | { |
| 191 | 187 | int sx, sy, code; |
| 192 | 188 | sy = BORDER_V/2 + y; |
| 193 | 189 | sx = BORDER_H/2 + x * 8; |
| 194 | | code = videoram[offs]; |
| 195 | | drawgfx(bitmap,screen->machine->gfx[5],code,0,0,0,sx,sy, |
| 196 | | cliprect,TRANSPARENCY_NONE,0); |
| 197 | | } |
| 198 | | } |
| 199 | | break; |
| 190 | code = videoram[offs]; |
| 191 | drawgfx(bitmap,screen->machine->gfx[5],code,0,0,0,sx,sy,cliprect,TRANSPARENCY_NONE,0); |
| 192 | } |
| 193 | } |
| 194 | break; |
| 200 | 195 | |
| 201 | 196 | case 4: |
| 202 | 197 | case 5: |
| r2049 | r2050 | |
| 205 | 200 | * 160x96 4bpp |
| 206 | 201 | */ |
| 207 | 202 | for( y = 0; y < 96; y++ ) |
| 208 | | { |
| 203 | { |
| 209 | 204 | offs = offs_0[y]; |
| 210 | 205 | for( x = 0; x < 80; x++, offs++ ) |
| 211 | | { |
| 206 | { |
| 212 | 207 | int sx, sy, code; |
| 213 | 208 | sy = BORDER_V/2 + y * 2; |
| 214 | 209 | sx = BORDER_H/2 + x * 8; |
| 215 | | code = videoram[offs]; |
| 216 | | drawgfx(bitmap,screen->machine->gfx[6],code,0,0,0,sx,sy, |
| 217 | | cliprect,TRANSPARENCY_NONE,0); |
| 218 | | } |
| 219 | | } |
| 220 | | break; |
| 210 | code = videoram[offs]; |
| 211 | drawgfx(bitmap,screen->machine->gfx[6],code,0,0,0,sx,sy,cliprect,TRANSPARENCY_NONE,0); |
| 212 | } |
| 213 | } |
| 214 | break; |
| 221 | 215 | |
| 222 | 216 | case 6: |
| 223 | 217 | /* |
| 224 | 218 | * GR 2 |
| 225 | 219 | * 320x192 1bpp |
| 226 | 220 | */ |
| 227 | | for( y = 0; y < 192; y++ ) |
| 228 | | { |
| 221 | for( y = 0; y < 192; y++ ) |
| 222 | { |
| 229 | 223 | offs = offs_1[y]; |
| 230 | | for( x = 0; x < 40; x++, offs++ ) |
| 231 | | { |
| 232 | | int sx, sy, code, color = laser_two_color; |
| 224 | for( x = 0; x < 40; x++, offs++ ) |
| 225 | { |
| 226 | int sx, sy, code, color = laser_two_color; |
| 233 | 227 | sy = BORDER_V/2 + y; |
| 234 | 228 | sx = BORDER_H/2 + x * 16; |
| 235 | | code = videoram[offs]; |
| 236 | | drawgfx(bitmap,screen->machine->gfx[3],code,color,0,0,sx,sy, |
| 237 | | cliprect,TRANSPARENCY_NONE,0); |
| 238 | | } |
| 239 | | } |
| 240 | | break; |
| 229 | code = videoram[offs]; |
| 230 | drawgfx(bitmap,screen->machine->gfx[3],code,color,0,0,sx,sy,cliprect,TRANSPARENCY_NONE,0); |
| 231 | } |
| 232 | } |
| 233 | break; |
| 241 | 234 | |
| 242 | 235 | case 7: |
| 243 | 236 | /* |
| 244 | 237 | * GR 1 |
| 245 | 238 | * 160x192 1bpp with two colors per 8 pixels |
| 246 | 239 | */ |
| 247 | | for( y = 0; y < 192; y++ ) |
| 248 | | { |
| 240 | for( y = 0; y < 192; y++ ) |
| 241 | { |
| 249 | 242 | offs = offs_1[y]; |
| 250 | 243 | for( x = 0; x < 20; x++, offs += 2 ) |
| 251 | | { |
| 244 | { |
| 252 | 245 | int sx, sy, code, color; |
| 253 | 246 | sy = BORDER_V/2 + y; |
| 254 | 247 | sx = BORDER_H/2 + x * 32; |
| 255 | | code = videoram[offs]; |
| 248 | code = videoram[offs]; |
| 256 | 249 | color = videoram[offs+1]; |
| 257 | | drawgfx(bitmap,screen->machine->gfx[4],code,color,0,0,sx,sy, |
| 258 | | cliprect,TRANSPARENCY_NONE,0); |
| 259 | | } |
| 260 | | } |
| 261 | | break; |
| 262 | | } |
| 263 | | } |
| 250 | drawgfx(bitmap,screen->machine->gfx[4],code,color,0,0,sx,sy,cliprect,TRANSPARENCY_NONE,0); |
| 251 | } |
| 252 | } |
| 253 | break; |
| 254 | } |
| 255 | } |
| 264 | 256 | else |
| 265 | 257 | { |
| 266 | 258 | /* text modes */ |
| 267 | | if (laser_bg_mode & 1) |
| 268 | | { |
| 269 | | /* 80 columns text mode */ |
| 270 | | for( y = 0; y < 24; y++ ) |
| 271 | | { |
| 272 | | offs = ((y & 7) << 8) + ((y >> 3) * 80); |
| 273 | | for( x = 0; x < 80; x++, offs++ ) |
| 274 | | { |
| 259 | if (laser_bg_mode & 1) |
| 260 | { |
| 261 | /* 80 columns text mode */ |
| 262 | for( y = 0; y < 24; y++ ) |
| 263 | { |
| 264 | offs = ((y & 7) << 8) + ((y >> 3) * 80); |
| 265 | for( x = 0; x < 80; x++, offs++ ) |
| 266 | { |
| 275 | 267 | int sx, sy, code, color = laser_two_color; |
| 276 | 268 | sy = BORDER_V/2 + y * 8; |
| 277 | 269 | sx = BORDER_H/2 + x * 8; |
| 278 | | code = videoram[0x3800+offs]; |
| 279 | | drawgfx(bitmap,screen->machine->gfx[0],code,color,0,0,sx,sy, |
| 280 | | cliprect,TRANSPARENCY_PEN,0); |
| 281 | | } |
| 282 | | } |
| 283 | | } |
| 284 | | else |
| 285 | | { |
| 286 | | /* 40 columns text mode */ |
| 287 | | for( y = 0; y < 24; y++ ) |
| 288 | | { |
| 289 | | offs = ((y & 7) << 8) + ((y >> 3) * 80); |
| 290 | | for( x = 0; x < 40; x++, offs += 2 ) |
| 291 | | { |
| 292 | | int sx, sy, code, color = 0; |
| 270 | code = videoram[0x3800+offs]; |
| 271 | drawgfx(bitmap,screen->machine->gfx[0],code,color,0,0,sx,sy,cliprect,TRANSPARENCY_NONE,0); |
| 272 | } |
| 273 | } |
| 274 | } |
| 275 | else |
| 276 | { |
| 277 | /* 40 columns text mode */ |
| 278 | for( y = 0; y < 24; y++ ) |
| 279 | { |
| 280 | offs = ((y & 7) << 8) + ((y >> 3) * 80); |
| 281 | for( x = 0; x < 40; x++, offs += 2 ) |
| 282 | { |
| 283 | int sx, sy, code, color = 0; |
| 293 | 284 | sy = BORDER_V/2 + y * 8; |
| 294 | 285 | sx = BORDER_H/2 + x * 16; |
| 295 | | code = videoram[0x3800+offs]; |
| 296 | | color = videoram[0x3801+offs]; |
| 297 | | drawgfx(bitmap,screen->machine->gfx[1],code,color,0,0,sx,sy, |
| 298 | | cliprect,TRANSPARENCY_PEN,0); |
| 299 | | } |
| 300 | | } |
| 301 | | } |
| 302 | | } |
| 286 | code = videoram[0x3800+offs]; |
| 287 | color = videoram[0x3801+offs]; |
| 288 | drawgfx(bitmap,screen->machine->gfx[1],code,color,0,0,sx,sy,cliprect,TRANSPARENCY_NONE,0); |
| 289 | } |
| 290 | } |
| 291 | } |
| 292 | } |
| 303 | 293 | |
| 304 | 294 | if( laser_frame_time > 0 ) |
| 305 | 295 | { |