Previous 15994 Revisions Next

r3213 Tuesday 9th September, 2008 at 21:31:17 UTC by Roberto Zandonà
[C64] a little fix for the raster line draw
[src/mess/video]vic6567.c

src/mess/video/vic6567.c
r3212r3213
572572   cycles = (int)(activecpu_gettotalcycles() - vic2.rasterline_start_cpu_cycles);
573573
574574   if (cycles > VIC2_CYCLESPERLINE - 1) cycles = VIC2_CYCLESPERLINE - 1;
575   startx = VIC2_FIRSTRASTERCOLUMNS + cycles * 8;
575   startx = VIC2_FIRSTRASTERCOLUMNS + (cycles) * 8;
576576   if (startx >= VIC2_COLUMNS) startx -= VIC2_COLUMNS;
577577
578578   // 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 ?!
580580   if (!strncmp(machine->gamedrv->name, "c64", 3))
581581   {
582582      if (startx > VIC2_FIRSTRASTERCOLUMNS)
r3212r3213
585585            {
586586               vic2_drawlines (vic2.rasterline - 1, vic2.rasterline, startx, VIC2_STARTVISIBLECOLUMNS + VIC2_VISIBLECOLUMNS - 1);
587587            }
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);
589589      }
590590      else
591591      {
592592         if (startx >= VIC2_STARTVISIBLECOLUMNS)
593593         {
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);
595595         }
596596      }
597597   }
r3212r3213
14291429   }
14301430   for (i=0; i < 5; i++)
14311431      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));
14331434   vic2.rasterline_start_cpu_cycles = activecpu_gettotalcycles();
14341435
14351436   if (vic2.rasterline == vic2.lines)
r3212r3213
14451446         timer_set (attotime_make(0, 0), NULL, 1, vic2_timer_timeout);
14461447      }
14471448   }
1448// if (input_code_pressed(KEYCODE_Q)) activecpu_eat_cycles(1000);
1449   // activecpu_eat_cycles(1000);
14491450
14501451   if (vic2.rasterline == C64_2_RASTERLINE(RASTERLINE))
14511452   {

Previous 15994 Revisions Next


© 1998-2018 The MESS Team