src/mess/video/vic6567.c
| r3212 | r3213 | |
| 572 | 572 | cycles = (int)(activecpu_gettotalcycles() - vic2.rasterline_start_cpu_cycles); |
| 573 | 573 | |
| 574 | 574 | if (cycles > VIC2_CYCLESPERLINE - 1) cycles = VIC2_CYCLESPERLINE - 1; |
| 575 | | startx = VIC2_FIRSTRASTERCOLUMNS + cycles * 8; |
| 575 | startx = VIC2_FIRSTRASTERCOLUMNS + (cycles) * 8; |
| 576 | 576 | if (startx >= VIC2_COLUMNS) startx -= VIC2_COLUMNS; |
| 577 | 577 | |
| 578 | 578 | // sprites chenges are active only from the next raster line |
| 579 | | // FIX ME : c64 have different width |
| 579 | // FIX ME : c65 have different width, left border width is 8 pixel wrong ?! |
| 580 | 580 | if (!strncmp(machine->gamedrv->name, "c64", 3)) |
| 581 | 581 | { |
| 582 | 582 | if (startx > VIC2_FIRSTRASTERCOLUMNS) |
| r3212 | r3213 | |
| 585 | 585 | { |
| 586 | 586 | vic2_drawlines (vic2.rasterline - 1, vic2.rasterline, startx, VIC2_STARTVISIBLECOLUMNS + VIC2_VISIBLECOLUMNS - 1); |
| 587 | 587 | } |
| 588 | | vic2_drawlines (vic2.rasterline - 1, vic2.rasterline, VIC2_STARTVISIBLECOLUMNS, VIC2_FIRSTRASTERCOLUMNS - 1); |
| 588 | vic2_drawlines (vic2.rasterline - 1, vic2.rasterline, VIC2_STARTVISIBLECOLUMNS, VIC2_FIRSTRASTERCOLUMNS + 8 - 1); |
| 589 | 589 | } |
| 590 | 590 | else |
| 591 | 591 | { |
| 592 | 592 | if (startx >= VIC2_STARTVISIBLECOLUMNS) |
| 593 | 593 | { |
| 594 | | vic2_drawlines (vic2.rasterline - 1, vic2.rasterline, startx, VIC2_FIRSTRASTERCOLUMNS - 1); |
| 594 | vic2_drawlines (vic2.rasterline - 1, vic2.rasterline, startx, VIC2_FIRSTRASTERCOLUMNS + 8 - 1); |
| 595 | 595 | } |
| 596 | 596 | } |
| 597 | 597 | } |
| r3212 | r3213 | |
| 1429 | 1429 | } |
| 1430 | 1430 | for (i=0; i < 5; i++) |
| 1431 | 1431 | vic2.spritemulti[i] = vic2.spritemulti_buffer[i]; |
| 1432 | | |
| 1432 | //if (input_code_pressed(KEYCODE_Q)) { cpunum_suspend(0, SUSPEND_ANY_REASON, 40); cpunum_resume(0, SUSPEND_ANY_REASON); } |
| 1433 | //printf("%04x ", (int)(activecpu_gettotalcycles() - vic2.rasterline_start_cpu_cycles)); |
| 1433 | 1434 | vic2.rasterline_start_cpu_cycles = activecpu_gettotalcycles(); |
| 1434 | 1435 | |
| 1435 | 1436 | if (vic2.rasterline == vic2.lines) |
| r3212 | r3213 | |
| 1445 | 1446 | timer_set (attotime_make(0, 0), NULL, 1, vic2_timer_timeout); |
| 1446 | 1447 | } |
| 1447 | 1448 | } |
| 1448 | | // if (input_code_pressed(KEYCODE_Q)) activecpu_eat_cycles(1000); |
| 1449 | // activecpu_eat_cycles(1000); |
| 1449 | 1450 | |
| 1450 | 1451 | if (vic2.rasterline == C64_2_RASTERLINE(RASTERLINE)) |
| 1451 | 1452 | { |