Previous 15994 Revisions Next

r3278 Tuesday 16th September, 2008 at 14:04:25 UTC by Roberto Zandonà
[C64] fixed border
[src/mess/drivers]c64.c c65.c
[src/mess/video]vic4567.c vic6567.c

src/mess/video/vic4567.c
r3277r3278
849849         }         
850850         else
851851         {
852            // if (vic2.on) vic2_drawlines (vic2.lastline, vic2.lines, VIC2_STARTVISIBLECOLUMNS + 34, VIC2_STARTVISIBLECOLUMNS + 34 + columns + 16 - 1);
852            if (vic2.on) vic2_drawlines (vic2.lastline, vic2.lines, VIC2_STARTVISIBLECOLUMNS + 34, VIC2_STARTVISIBLECOLUMNS + 34 + columns + 16 - 1);
853853         }
854854      }
855855      for (i = 0; i < 8; i++)
r3277r3278
869869   if (vic2.on)
870870      if ((vic2.rasterline >= VIC2_FIRSTRASTERLINE) && (vic2.rasterline < (VIC2_FIRSTRASTERLINE + VIC2_VISIBLELINES)))
871871      {
872//         vic2_drawlines (vic2.rasterline-1, vic2.rasterline, VIC2_STARTVISIBLECOLUMNS, VIC2_STARTVISIBLECOLUMNS + VIC2_VISIBLECOLUMNS);
873872         if (c64_pal)
874873         {
875874            if (vic2.on) vic2_drawlines (vic2.rasterline-1, vic2.rasterline, VIC2_STARTVISIBLECOLUMNS + 32, VIC2_STARTVISIBLECOLUMNS + 32 + columns + 16 - 1);
876875         }         
877876         else
878877         {
879            // if (vic2.on) vic2_drawlines (vic2.lastline, vic2.lines, VIC2_STARTVISIBLECOLUMNS + 34, VIC2_STARTVISIBLECOLUMNS + 34 + columns + 16 - 1);
880878            if (vic2.on) vic2_drawlines (vic2.rasterline-1, vic2.rasterline, VIC2_STARTVISIBLECOLUMNS + 34, VIC2_STARTVISIBLECOLUMNS + 34 + columns + 16 - 1);
881879         }
882880      }
src/mess/video/vic6567.c
r3277r3278
11831183   /* top part of display not rastered */
11841184   first -= VIC2_YPOS - YPOS;
11851185
1186   xbegin = VIC2_STARTVISIBLECOLUMNS;
1187   xend = xbegin + VIC2_VISIBLECOLUMNS;
11861188   if (!SCREENON)
11871189   {
1188//      if (first < vic2.bitmap->height)
1189      memset16 (BITMAP_ADDR16(vic2.bitmap, first + FIRSTLINE, 0), FRAMECOLOR, vic2.bitmap->width);
1190      xbegin = VIC2_STARTVISIBLECOLUMNS;
1191      xend = xbegin + VIC2_VISIBLECOLUMNS;
1192      if ((start_x <= xbegin) && (end_x >= xend))
1193         plot_box(vic2.bitmap, xbegin, first + FIRSTLINE, xend - xbegin, 1, FRAMECOLOR);
1194      if ((start_x > xbegin) && (end_x >= xend))
1195         plot_box(vic2.bitmap, start_x - VIC2_STARTVISIBLECOLUMNS, first + FIRSTLINE, xend - start_x, 1, FRAMECOLOR);
1196      if ((start_x <= xbegin) && (end_x < xend))
1197         plot_box(vic2.bitmap, xbegin, first + FIRSTLINE, end_x - xbegin , 1, FRAMECOLOR);
1198      if ((start_x > xbegin) && (end_x < xend))
1199         plot_box(vic2.bitmap, start_x - VIC2_STARTVISIBLECOLUMNS, first + FIRSTLINE, end_x - start_x, 1, FRAMECOLOR);
11901200      return;
11911201   }
11921202
r3277r3278
12071217      end = vic2.y_begin + YPOS;
12081218
12091219   line = first;
1220   // top border
12101221   if (line < end)
12111222   {
1212      plot_box(vic2.bitmap, start_x, line + FIRSTLINE, end_x - start_x, 1, FRAMECOLOR);
1223      if ((start_x <= xbegin) && (end_x >= xend))
1224         plot_box(vic2.bitmap, xbegin, first + FIRSTLINE, xend - xbegin, 1, FRAMECOLOR);
1225      if ((start_x > xbegin) && (end_x >= xend))
1226         plot_box(vic2.bitmap, start_x - VIC2_STARTVISIBLECOLUMNS, first + FIRSTLINE, xend - start_x, 1, FRAMECOLOR);
1227      if ((start_x <= xbegin) && (end_x < xend))
1228         plot_box(vic2.bitmap, xbegin, first + FIRSTLINE, end_x - xbegin , 1, FRAMECOLOR);
1229      if ((start_x > xbegin) && (end_x < xend))
1230         plot_box(vic2.bitmap, start_x - VIC2_STARTVISIBLECOLUMNS, first + FIRSTLINE, end_x - start_x, 1, FRAMECOLOR);
12131231      line = end;
12141232   }
12151233
r3277r3278
13411359      }
13421360      line += 1 + yend - ybegin;
13431361   }
1344   // TO DO: to implement start_x and end_x
1345   plot_box(vic2.bitmap, 0, first + FIRSTLINE, xbegin, 1, FRAMECOLOR);
1346   plot_box(vic2.bitmap, xend, first + FIRSTLINE, vic2.bitmap->width - xend, 1, FRAMECOLOR);
13471362
1363   // left border
1364   if ((start_x <= VIC2_STARTVISIBLECOLUMNS) && (end_x >= xbegin))
1365      plot_box(vic2.bitmap, VIC2_STARTVISIBLECOLUMNS, first + FIRSTLINE, xbegin - VIC2_STARTVISIBLECOLUMNS, 1, FRAMECOLOR);
1366   else if ((start_x > VIC2_STARTVISIBLECOLUMNS) && (end_x >= xbegin))
1367      plot_box(vic2.bitmap, start_x, first + FIRSTLINE, xbegin - start_x, 1, FRAMECOLOR);
1368   else if ((start_x <= VIC2_STARTVISIBLECOLUMNS) && (end_x < xbegin))
1369      plot_box(vic2.bitmap, VIC2_STARTVISIBLECOLUMNS, first + FIRSTLINE, end_x, 1, FRAMECOLOR);
1370   else if ((start_x > VIC2_STARTVISIBLECOLUMNS) && (end_x < xbegin))
1371      plot_box(vic2.bitmap, start_x, first + FIRSTLINE, end_x - start_x, 1, FRAMECOLOR);
1372
1373   // right border
1374   if ((start_x <= xend) && (end_x >= VIC2_STARTVISIBLECOLUMNS + VIC2_VISIBLECOLUMNS))
1375      plot_box(vic2.bitmap, xend, first + FIRSTLINE, VIC2_STARTVISIBLECOLUMNS + VIC2_VISIBLECOLUMNS - xend, 1, FRAMECOLOR);
1376   else if ((start_x > xend) && (end_x >= VIC2_STARTVISIBLECOLUMNS + VIC2_VISIBLECOLUMNS))
1377      plot_box(vic2.bitmap, start_x, first + FIRSTLINE, VIC2_STARTVISIBLECOLUMNS + VIC2_VISIBLECOLUMNS - start_x, 1, FRAMECOLOR);
1378   else if ((start_x <= xend) && (end_x < VIC2_STARTVISIBLECOLUMNS + VIC2_VISIBLECOLUMNS))
1379      plot_box(vic2.bitmap, xend, first + FIRSTLINE, end_x - xend, 1, FRAMECOLOR);
1380   else if ((start_x > VIC2_STARTVISIBLECOLUMNS) && (end_x < xbegin))
1381      plot_box(vic2.bitmap, start_x, first + FIRSTLINE, end_x - start_x, 1, FRAMECOLOR);
1382
13481383   if (first + 1 < vic2.bitmap->height)
13491384      end = first + 1;
13501385   else
13511386      end = vic2.bitmap->height;
13521387
1353   if (line < end) {
1354      plot_box(vic2.bitmap, start_x, first + FIRSTLINE, end_x - start_x, 1, FRAMECOLOR);
1388   // bottom border
1389   if (line < end)
1390   {
1391      if ((start_x <= xbegin) && (end_x >= xend))
1392         plot_box(vic2.bitmap, xbegin, first + FIRSTLINE, xend - xbegin, 1, FRAMECOLOR);
1393      if ((start_x > xbegin) && (end_x >= xend))
1394         plot_box(vic2.bitmap, start_x - VIC2_STARTVISIBLECOLUMNS, first + FIRSTLINE, xend - start_x, 1, FRAMECOLOR);
1395      if ((start_x <= xbegin) && (end_x < xend))
1396         plot_box(vic2.bitmap, xbegin, first + FIRSTLINE, end_x - xbegin , 1, FRAMECOLOR);
1397      if ((start_x > xbegin) && (end_x < xend))
1398         plot_box(vic2.bitmap, start_x - VIC2_STARTVISIBLECOLUMNS, first + FIRSTLINE, end_x - start_x, 1, FRAMECOLOR);
13551399      line = end;
13561400   }
13571401}
r3277r3278
14751519   }
14761520   if (!c64_pal)
14771521      if (vic2.rasterline < VIC2_FIRSTRASTERLINE + VIC2_VISIBLELINES - vic2.lines)
1478         vic2_drawlines (vic2.rasterline + vic2.lines - 1, vic2.rasterline + vic2.lines, VIC2_STARTVISIBLECOLUMNS, VIC2_STARTVISIBLECOLUMNS + VIC2_VISIBLECOLUMNS - 1);
1522         vic2_drawlines (vic2.rasterline + vic2.lines - 1, vic2.rasterline + vic2.lines, VIC2_STARTVISIBLECOLUMNS, VIC2_STARTVISIBLECOLUMNS + VIC2_VISIBLECOLUMNS);
14791523
14801524// if (vic2.rasterline == 0x80)
14811525   if (vic2.on)
14821526      if ((vic2.rasterline >= VIC2_FIRSTRASTERLINE) && (vic2.rasterline < VIC2_FIRSTRASTERLINE + VIC2_VISIBLELINES))
1483         vic2_drawlines (vic2.rasterline - 1, vic2.rasterline, VIC2_STARTVISIBLECOLUMNS, VIC2_STARTVISIBLECOLUMNS + VIC2_VISIBLECOLUMNS - 1);
1527         vic2_drawlines (vic2.rasterline - 1, vic2.rasterline, VIC2_STARTVISIBLECOLUMNS, VIC2_STARTVISIBLECOLUMNS + VIC2_VISIBLECOLUMNS);
14841528
14851529//   timer_adjust_oneshot(vicii_scanline_timer, video_screen_get_time_until_pos(machine->primary_screen, scanline, 0), scanline);
14861530}
src/mess/drivers/c65.c
r3277r3278
222222   MDRV_SCREEN_MODIFY("main")
223223   MDRV_SCREEN_REFRESH_RATE(VIC6567_VRETRACERATE)
224224   MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
225   MDRV_SCREEN_SIZE(VIC6567_COLUMNS * 2, VIC6567_LINES * 2)
225   MDRV_SCREEN_SIZE(525 * 2, 520 * 2)
226226   MDRV_SCREEN_VISIBLE_AREA(VIC6567_STARTVISIBLECOLUMNS ,(VIC6567_STARTVISIBLECOLUMNS + VIC6567_VISIBLECOLUMNS - 1) * 2, VIC6567_STARTVISIBLELINES, VIC6567_STARTVISIBLELINES + VIC6567_VISIBLELINES - 1)
227227   MDRV_PALETTE_LENGTH(sizeof(vic3_palette) / sizeof(vic3_palette[0]) / 3)
228228   MDRV_PALETTE_INIT( c65 )
r3277r3278
243243   MDRV_IMPORT_FROM( c65 )
244244   MDRV_SCREEN_MODIFY("main")
245245   MDRV_SCREEN_REFRESH_RATE(VIC6569_VRETRACERATE)
246   MDRV_SCREEN_SIZE(VIC6569_COLUMNS * 2, VIC6569_LINES * 2)
246   MDRV_SCREEN_SIZE(625 * 2, 520 * 2)
247247   MDRV_SCREEN_VISIBLE_AREA(VIC6569_STARTVISIBLECOLUMNS, (VIC6569_STARTVISIBLECOLUMNS + VIC6569_VISIBLECOLUMNS - 1) * 2, VIC6569_STARTVISIBLELINES, VIC6569_STARTVISIBLELINES + VIC6569_VISIBLELINES - 1)
248248
249249   MDRV_SOUND_REPLACE("sid_r", SID8580, 1022727)
src/mess/drivers/c64.c
r3277r3278
538538   /* video hardware */
539539   MDRV_IMPORT_FROM( vh_vic2_pal )
540540   MDRV_SCREEN_MODIFY("main")
541   MDRV_SCREEN_REFRESH_RATE(50.12706) /* vice: 50.123432124542124 - VIC6569_VRETRACERATE */
541   MDRV_SCREEN_REFRESH_RATE(VIC6569_VRETRACERATE)
542542   MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) /* 2500 not accurate */
543543
544544   /* sound hardware */

Previous 15994 Revisions Next


© 1998-2018 The MESS Team