src/mess/video/astrocde.c
| r1961 | r1962 | |
| 153 | 153 | /* This selects commercial (high res, arcade) or |
| 154 | 154 | consumer (low res, astrocade) mode */ |
| 155 | 155 | |
| 156 | | WRITE8_HANDLER ( astrocade_mode_w ) |
| 156 | WRITE8_HANDLER( astrocade_mode_w ) |
| 157 | 157 | { |
| 158 | 158 | astrocade_mode = data & 0x01; |
| 159 | 159 | } |
| r1961 | r1962 | |
| 340 | 340 | magic_expand_flipflop ^= 1; |
| 341 | 341 | } |
| 342 | 342 | |
| 343 | | void astrocade_copy_line(running_machine *machine, int line) |
| 343 | |
| 344 | VIDEO_UPDATE( astrocde ) |
| 344 | 345 | { |
| 345 | | /* Copy one line to bitmap, using current colour register settings */ |
| 346 | int line = video_screen_get_vpos(0); |
| 346 | 347 | |
| 347 | 348 | int memloc; |
| 348 | 349 | int i,x,num_bytes; |
| r1961 | r1962 | |
| 369 | 370 | else |
| 370 | 371 | data = BackgroundData; |
| 371 | 372 | |
| 372 | | for(x=i*4+3;x>=i*4;x--) |
| 373 | for (x=i*4+3; x>=i*4; x--) |
| 373 | 374 | { |
| 374 | 375 | color = data & 03; |
| 375 | 376 | |
| r1961 | r1962 | |
| 378 | 379 | |
| 379 | 380 | if (astrocade_mode == 0) |
| 380 | 381 | { |
| 381 | | *BITMAP_ADDR16(tmpbitmap, line, 2*x+0) = machine->pens[Colour[color]]; |
| 382 | | *BITMAP_ADDR16(tmpbitmap, line, 2*x+1) = machine->pens[Colour[color]]; |
| 382 | *BITMAP_ADDR16(bitmap, line, 2*x+0) = machine->pens[Colour[color]]; |
| 383 | *BITMAP_ADDR16(bitmap, line, 2*x+1) = machine->pens[Colour[color]]; |
| 383 | 384 | } |
| 384 | 385 | else |
| 385 | | *BITMAP_ADDR16(tmpbitmap, line, x) = machine->pens[Colour[color]]; |
| 386 | *BITMAP_ADDR16(bitmap, line, x) = machine->pens[Colour[color]]; |
| 386 | 387 | |
| 387 | 388 | data >>= 2; |
| 388 | 389 | } |
| 389 | 390 | |
| 390 | 391 | } |
| 392 | |
| 393 | return 0; |
| 391 | 394 | } |
| 392 | | |
src/mess/machine/astrocde.c
| r1961 | r1962 | |
| 56 | 56 | static TIMER_CALLBACK( astrocde_scanline_callback ) |
| 57 | 57 | { |
| 58 | 58 | int scanline = video_screen_get_vpos(0); |
| 59 | | |
| 60 | | /* draw if we are in the visable area */ |
| 61 | | if (scanline < machine->screen[0].visarea.max_y) |
| 62 | | astrocade_copy_line(machine, scanline); |
| 63 | | |
| 59 | |
| 64 | 60 | /* scanline interrupt? */ |
| 65 | 61 | if (screen_interrupts_enabled && (screen_interrupt_mode == 0) && (scanline == NextScanInt)) |
| 66 | 62 | cpunum_set_input_line(machine, 0, 0, HOLD_LINE); |