src/mess/video/vic6567.c
| r3277 | r3278 | |
| 1183 | 1183 | /* top part of display not rastered */ |
| 1184 | 1184 | first -= VIC2_YPOS - YPOS; |
| 1185 | 1185 | |
| 1186 | xbegin = VIC2_STARTVISIBLECOLUMNS; |
| 1187 | xend = xbegin + VIC2_VISIBLECOLUMNS; |
| 1186 | 1188 | if (!SCREENON) |
| 1187 | 1189 | { |
| 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); |
| 1190 | 1200 | return; |
| 1191 | 1201 | } |
| 1192 | 1202 | |
| r3277 | r3278 | |
| 1207 | 1217 | end = vic2.y_begin + YPOS; |
| 1208 | 1218 | |
| 1209 | 1219 | line = first; |
| 1220 | // top border |
| 1210 | 1221 | if (line < end) |
| 1211 | 1222 | { |
| 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); |
| 1213 | 1231 | line = end; |
| 1214 | 1232 | } |
| 1215 | 1233 | |
| r3277 | r3278 | |
| 1341 | 1359 | } |
| 1342 | 1360 | line += 1 + yend - ybegin; |
| 1343 | 1361 | } |
| 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); |
| 1347 | 1362 | |
| 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 | |
| 1348 | 1383 | if (first + 1 < vic2.bitmap->height) |
| 1349 | 1384 | end = first + 1; |
| 1350 | 1385 | else |
| 1351 | 1386 | end = vic2.bitmap->height; |
| 1352 | 1387 | |
| 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); |
| 1355 | 1399 | line = end; |
| 1356 | 1400 | } |
| 1357 | 1401 | } |
| r3277 | r3278 | |
| 1475 | 1519 | } |
| 1476 | 1520 | if (!c64_pal) |
| 1477 | 1521 | 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); |
| 1479 | 1523 | |
| 1480 | 1524 | // if (vic2.rasterline == 0x80) |
| 1481 | 1525 | if (vic2.on) |
| 1482 | 1526 | 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); |
| 1484 | 1528 | |
| 1485 | 1529 | // timer_adjust_oneshot(vicii_scanline_timer, video_screen_get_time_until_pos(machine->primary_screen, scanline, 0), scanline); |
| 1486 | 1530 | } |