src/mess/video/dai.c
| r2200 | r2201 | |
| 132 | 132 | { |
| 133 | 133 | current_colour = dai_4_colours_palette[(((current_data_1>>(7-k)) & 0x01)<<1) | ((current_data_2>>(7-k)) & 0x01)]; |
| 134 | 134 | for (l=0; l<12; l++) |
| 135 | | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*12+l) = screen->machine->pens[current_colour]; |
| 135 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*12+l) = current_colour; |
| 136 | 136 | } |
| 137 | 137 | } |
| 138 | 138 | } |
| r2200 | r2201 | |
| 149 | 149 | { |
| 150 | 150 | current_colour = dai_4_colours_palette[(((current_data_1>>(7-k)) & 0x01)<<1) | ((current_data_2>>(7-k)) & 0x01)]; |
| 151 | 151 | for (l=0; l<12; l++) |
| 152 | | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*12+l) = screen->machine->pens[current_colour]; |
| 152 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*12+l) = current_colour; |
| 153 | 153 | } |
| 154 | 154 | } |
| 155 | 155 | } |
| r2200 | r2201 | |
| 171 | 171 | { |
| 172 | 172 | current_colour = dai_4_colours_palette[(((current_data_1>>(7-k)) & 0x01)<<1) | ((current_data_2>>(7-k)) & 0x01)]; |
| 173 | 173 | for (l=0; l<6; l++) |
| 174 | | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*6+l) = screen->machine->pens[current_colour]; |
| 174 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*6+l) = current_colour; |
| 175 | 175 | } |
| 176 | 176 | } |
| 177 | 177 | } |
| r2200 | r2201 | |
| 188 | 188 | { |
| 189 | 189 | current_colour = dai_4_colours_palette[(((current_data_1>>(7-k)) & 0x01)<<1) | ((current_data_2>>(7-k)) & 0x01)]; |
| 190 | 190 | for (l=0; l<6; l++) |
| 191 | | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*6+l) = screen->machine->pens[current_colour]; |
| 191 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*6+l) = current_colour; |
| 192 | 192 | } |
| 193 | 193 | } |
| 194 | 194 | } |
| r2200 | r2201 | |
| 210 | 210 | { |
| 211 | 211 | current_colour = dai_4_colours_palette[(((current_data_1>>(7-k)) & 0x01)<<1) | ((current_data_2>>(7-k)) & 0x01)]; |
| 212 | 212 | for (l=0; l<3; l++) |
| 213 | | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*3+l) = screen->machine->pens[current_colour]; |
| 213 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*3+l) = current_colour; |
| 214 | 214 | } |
| 215 | 215 | } |
| 216 | 216 | } |
| r2200 | r2201 | |
| 226 | 226 | { |
| 227 | 227 | current_colour = dai_4_colours_palette[(((current_data_1>>(7-k)) & 0x01)<<1) | ((current_data_2>>(7-k)) & 0x01)]; |
| 228 | 228 | for (l=0; l<3; l++) |
| 229 | | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*3+l) = screen->machine->pens[current_colour]; |
| 229 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*3+l) = current_colour; |
| 230 | 230 | } |
| 231 | 231 | } |
| 232 | 232 | } |
| r2200 | r2201 | |
| 248 | 248 | { |
| 249 | 249 | current_colour = dai_4_colours_palette[(((current_data_1>>(7-k)) & 0x01)<<1) | ((current_data_2>>(7-k)) & 0x01)]; |
| 250 | 250 | for (l=0; l<2; l++) |
| 251 | | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*2+l) = screen->machine->pens[current_colour]; |
| 251 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*2+l) = current_colour; |
| 252 | 252 | } |
| 253 | 253 | } |
| 254 | 254 | } |
| r2200 | r2201 | |
| 264 | 264 | { |
| 265 | 265 | current_colour = dai_4_colours_palette[(((current_data_1>>(7-k)) & 0x01)<<1) | ((current_data_2>>(7-k)) & 0x01)]; |
| 266 | 266 | for (l=0; l<2; l++) |
| 267 | | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*2+l) = screen->machine->pens[current_colour]; |
| 267 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*2+l) = current_colour; |
| 268 | 268 | } |
| 269 | 269 | } |
| 270 | 270 | } |
| r2200 | r2201 | |
| 293 | 293 | { |
| 294 | 294 | current_colour = dai_4_colours_palette[(((current_data_2 >> k)&0x01)<<1) | ((char_rom[current_data_1*16+j]>>k) & 0x01)]; |
| 295 | 295 | for (l=0; l<12; l++) |
| 296 | | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*12+l) = screen->machine->pens[current_colour]; |
| 296 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*12+l) = current_colour; |
| 297 | 297 | } |
| 298 | 298 | } |
| 299 | 299 | } |
| r2200 | r2201 | |
| 311 | 311 | { |
| 312 | 312 | current_colour = dai_4_colours_palette[(((current_data_2 >> k)&0x01)<<1) | ((char_rom[current_data_1*16+j]>>k) & 0x01)]; |
| 313 | 313 | for (l=0; l<12; l++) |
| 314 | | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*12+l) = screen->machine->pens[current_colour]; |
| 314 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*12+l) = current_colour; |
| 315 | 315 | } |
| 316 | 316 | } |
| 317 | 317 | } |
| r2200 | r2201 | |
| 334 | 334 | { |
| 335 | 335 | current_colour = dai_4_colours_palette[(((current_data_2 >> k)&0x01)<<1) | ((char_rom[current_data_1*16+j]>>k) & 0x01)]; |
| 336 | 336 | for (l=0; l<6; l++) |
| 337 | | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*6+l) = screen->machine->pens[current_colour]; |
| 337 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*6+l) = current_colour; |
| 338 | 338 | } |
| 339 | 339 | } |
| 340 | 340 | } |
| r2200 | r2201 | |
| 352 | 352 | { |
| 353 | 353 | current_colour = dai_4_colours_palette[(((current_data_2 >> k)&0x01)<<1) | ((char_rom[current_data_1*16+j]>>k) & 0x01)]; |
| 354 | 354 | for (l=0; l<6; l++) |
| 355 | | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*6+l) = screen->machine->pens[current_colour]; |
| 355 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*6+l) = current_colour; |
| 356 | 356 | } |
| 357 | 357 | } |
| 358 | 358 | } |
| r2200 | r2201 | |
| 375 | 375 | { |
| 376 | 376 | current_colour = dai_4_colours_palette[(((current_data_2 >> k)&0x01)<<1) | ((char_rom[current_data_1*16+j]>>k) & 0x01)]; |
| 377 | 377 | for (l=0; l<3; l++) |
| 378 | | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*3+l) = screen->machine->pens[current_colour]; |
| 378 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*3+l) = current_colour; |
| 379 | 379 | } |
| 380 | 380 | } |
| 381 | 381 | } |
| r2200 | r2201 | |
| 392 | 392 | { |
| 393 | 393 | current_colour = dai_4_colours_palette[(((current_data_2 >> k)&0x01)<<1) | ((char_rom[current_data_1*16+j]>>k) & 0x01)]; |
| 394 | 394 | for (l=0; l<3; l++) |
| 395 | | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*3+l) = screen->machine->pens[current_colour]; |
| 395 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*3+l) = current_colour; |
| 396 | 396 | } |
| 397 | 397 | } |
| 398 | 398 | } |
| r2200 | r2201 | |
| 414 | 414 | { |
| 415 | 415 | current_colour = dai_4_colours_palette[(((current_data_2 >> k)&0x01)<<1) | ((char_rom[current_data_1*16+j]>>k) & 0x01)]; |
| 416 | 416 | for (l=0; l<2; l++) |
| 417 | | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*2+l) = screen->machine->pens[current_colour]; |
| 417 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*2+l) = current_colour; |
| 418 | 418 | } |
| 419 | 419 | } |
| 420 | 420 | } |
| r2200 | r2201 | |
| 431 | 431 | { |
| 432 | 432 | current_colour = dai_4_colours_palette[(((current_data_2 >> k)&0x01)<<1) | ((char_rom[current_data_1*16+j]>>k) & 0x01)]; |
| 433 | 433 | for (l=0; l<2; l++) |
| 434 | | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*2+l) = screen->machine->pens[current_colour]; |
| 434 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*2+l) = current_colour; |
| 435 | 435 | } |
| 436 | 436 | } |
| 437 | 437 | } |
| r2200 | r2201 | |
| 459 | 459 | { |
| 460 | 460 | current_colour = ((current_data_1>>(7-k)) & 0x01) ? (current_data_2>>4)&0x0f : current_data_2&0x0f; |
| 461 | 461 | for (l=0; l<12; l++) |
| 462 | | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*12+l) = screen->machine->pens[current_colour]; |
| 462 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*12+l) = current_colour; |
| 463 | 463 | } |
| 464 | 464 | } |
| 465 | 465 | } |
| r2200 | r2201 | |
| 476 | 476 | { |
| 477 | 477 | current_colour = ((current_data_1>>(7-k)) & 0x01) ? (current_data_2>>4)&0x0f : current_data_2&0x0f; |
| 478 | 478 | for (l=0; l<12; l++) |
| 479 | | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*12+l) = screen->machine->pens[current_colour]; |
| 479 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*12+l) = current_colour; |
| 480 | 480 | } |
| 481 | 481 | } |
| 482 | 482 | } |
| r2200 | r2201 | |
| 498 | 498 | { |
| 499 | 499 | current_colour = ((current_data_1>>(7-k)) & 0x01) ? (current_data_2>>4)&0x0f : current_data_2&0x0f; |
| 500 | 500 | for (l=0; l<6; l++) |
| 501 | | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*6+l) = screen->machine->pens[current_colour]; |
| 501 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*6+l) = current_colour; |
| 502 | 502 | } |
| 503 | 503 | } |
| 504 | 504 | } |
| r2200 | r2201 | |
| 515 | 515 | { |
| 516 | 516 | current_colour = ((current_data_1>>(7-k)) & 0x01) ? (current_data_2>>4)&0x0f : current_data_2&0x0f; |
| 517 | 517 | for (l=0; l<6; l++) |
| 518 | | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*6+l) = screen->machine->pens[current_colour]; |
| 518 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*6+l) = current_colour; |
| 519 | 519 | } |
| 520 | 520 | } |
| 521 | 521 | } |
| r2200 | r2201 | |
| 537 | 537 | { |
| 538 | 538 | current_colour = ((current_data_1>>(7-k)) & 0x01) ? (current_data_2>>4)&0x0f : current_data_2&0x0f; |
| 539 | 539 | for (l=0; l<3; l++) |
| 540 | | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*3+l) = screen->machine->pens[current_colour]; |
| 540 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*3+l) = current_colour; |
| 541 | 541 | } |
| 542 | 542 | } |
| 543 | 543 | } |
| r2200 | r2201 | |
| 553 | 553 | { |
| 554 | 554 | current_colour = ((current_data_1>>(7-k)) & 0x01) ? (current_data_2>>4)&0x0f : current_data_2&0x0f; |
| 555 | 555 | for (l=0; l<3; l++) |
| 556 | | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*3+l) = screen->machine->pens[current_colour]; |
| 556 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*3+l) = current_colour; |
| 557 | 557 | } |
| 558 | 558 | } |
| 559 | 559 | } |
| r2200 | r2201 | |
| 575 | 575 | { |
| 576 | 576 | current_colour = ((current_data_1>>(7-k)) & 0x01) ? (current_data_2>>4)&0x0f : current_data_2&0x0f; |
| 577 | 577 | for (l=0; l<2; l++) |
| 578 | | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*2+l) = screen->machine->pens[current_colour]; |
| 578 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*2+l) = current_colour; |
| 579 | 579 | } |
| 580 | 580 | } |
| 581 | 581 | } |
| r2200 | r2201 | |
| 591 | 591 | { |
| 592 | 592 | current_colour = ((current_data_1>>(7-k)) & 0x01) ? (current_data_2>>4)&0x0f : current_data_2&0x0f; |
| 593 | 593 | for (l=0; l<2; l++) |
| 594 | | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*2+l) = screen->machine->pens[current_colour]; |
| 594 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*2+l) = current_colour; |
| 595 | 595 | } |
| 596 | 596 | } |
| 597 | 597 | } |
| r2200 | r2201 | |
| 618 | 618 | { |
| 619 | 619 | current_colour = ((char_rom[current_data_1*16+j]>>k) & 0x01) ? (current_data_2>>4)&0x0f : current_data_2&0x0f; |
| 620 | 620 | for (l=0; l<12; l++) |
| 621 | | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*12+l) = screen->machine->pens[current_colour]; |
| 621 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*12+l) = current_colour; |
| 622 | 622 | } |
| 623 | 623 | } |
| 624 | 624 | } |
| r2200 | r2201 | |
| 635 | 635 | { |
| 636 | 636 | current_colour = ((char_rom[current_data_1*16+j]>>k) & 0x01) ? (current_data_2>>4)&0x0f : current_data_2&0x0f; |
| 637 | 637 | for (l=0; l<12; l++) |
| 638 | | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*12+l) = screen->machine->pens[current_colour]; |
| 638 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*12+l) = current_colour; |
| 639 | 639 | } |
| 640 | 640 | } |
| 641 | 641 | } |
| r2200 | r2201 | |
| 657 | 657 | { |
| 658 | 658 | current_colour = ((char_rom[current_data_1*16+j]>>k) & 0x01) ? (current_data_2>>4)&0x0f : current_data_2&0x0f; |
| 659 | 659 | for (l=0; l<6; l++) |
| 660 | | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*6+l) = screen->machine->pens[current_colour]; |
| 660 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*6+l) = current_colour; |
| 661 | 661 | } |
| 662 | 662 | } |
| 663 | 663 | } |
| r2200 | r2201 | |
| 674 | 674 | { |
| 675 | 675 | current_colour = ((char_rom[current_data_1*16+j]>>k) & 0x01) ? (current_data_2>>4)&0x0f : current_data_2&0x0f; |
| 676 | 676 | for (l=0; l<6; l++) |
| 677 | | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*6+l) = screen->machine->pens[current_colour]; |
| 677 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*6+l) = current_colour; |
| 678 | 678 | } |
| 679 | 679 | } |
| 680 | 680 | } |
| r2200 | r2201 | |
| 696 | 696 | { |
| 697 | 697 | current_colour = ((char_rom[current_data_1*16+j]>>k) & 0x01) ? (current_data_2>>4)&0x0f : current_data_2&0x0f; |
| 698 | 698 | for (l=0; l<3; l++) |
| 699 | | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*3+l) = screen->machine->pens[current_colour]; |
| 699 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*3+l) = current_colour; |
| 700 | 700 | } |
| 701 | 701 | } |
| 702 | 702 | } |
| r2200 | r2201 | |
| 712 | 712 | { |
| 713 | 713 | current_colour = ((char_rom[current_data_1*16+j]>>k) & 0x01) ? (current_data_2>>4)&0x0f : current_data_2&0x0f; |
| 714 | 714 | for (l=0; l<3; l++) |
| 715 | | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*3+l) = screen->machine->pens[current_colour]; |
| 715 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*3+l) = current_colour; |
| 716 | 716 | } |
| 717 | 717 | } |
| 718 | 718 | } |
| r2200 | r2201 | |
| 733 | 733 | { |
| 734 | 734 | current_colour = ((char_rom[current_data_1*16+j]>>k) & 0x01) ? (current_data_2>>4)&0x0f : current_data_2&0x0f; |
| 735 | 735 | for (l=0; l<2; l++) |
| 736 | | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*2+l) = screen->machine->pens[current_colour]; |
| 736 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*2+l) = current_colour; |
| 737 | 737 | } |
| 738 | 738 | } |
| 739 | 739 | } |
| r2200 | r2201 | |
| 749 | 749 | { |
| 750 | 750 | current_colour = ((char_rom[current_data_1*16+j]>>k) & 0x01) ? (current_data_2>>4)&0x0f : current_data_2&0x0f; |
| 751 | 751 | for (l=0; l<2; l++) |
| 752 | | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*2+l) = screen->machine->pens[current_colour]; |
| 752 | *BITMAP_ADDR16(bitmap, current_scan_line/2 + j, (i*8+k)*2+l) = current_colour; |
| 753 | 753 | } |
| 754 | 754 | } |
| 755 | 755 | } |
src/mess/video/gb.c
| r2200 | r2201 | |
| 241 | 241 | } |
| 242 | 242 | } |
| 243 | 243 | |
| 244 | | INLINE void gb_update_sprites ( running_machine *machine ) |
| 244 | INLINE void gb_update_sprites ( void ) |
| 245 | 245 | { |
| 246 | 246 | bitmap_t *bitmap = tmpbitmap; |
| 247 | 247 | UINT8 height, tilemask, line, *oam, *vram; |
| r2200 | r2201 | |
| 291 | 291 | { |
| 292 | 292 | register int colour = ((data & 0x0100) ? 2 : 0) | ((data & 0x0001) ? 1 : 0); |
| 293 | 293 | if (colour && !bg_zbuf[xindex] && xindex >= 0 && xindex < 160) |
| 294 | | gb_plot_pixel(bitmap, xindex, yindex, machine->pens[spal[colour]]); |
| 294 | gb_plot_pixel(bitmap, xindex, yindex, spal[colour]); |
| 295 | 295 | data >>= 1; |
| 296 | 296 | } |
| 297 | 297 | break; |
| r2200 | r2201 | |
| 300 | 300 | { |
| 301 | 301 | register int colour = ((data & 0x0100) ? 2 : 0) | ((data & 0x0001) ? 1 : 0); |
| 302 | 302 | if (colour && xindex >= 0 && xindex < 160) |
| 303 | | gb_plot_pixel(bitmap, xindex, yindex, machine->pens[spal[colour]]); |
| 303 | gb_plot_pixel(bitmap, xindex, yindex, spal[colour]); |
| 304 | 304 | data >>= 1; |
| 305 | 305 | } |
| 306 | 306 | break; |
| r2200 | r2201 | |
| 309 | 309 | { |
| 310 | 310 | register int colour = ((data & 0x8000) ? 2 : 0) | ((data & 0x0080) ? 1 : 0); |
| 311 | 311 | if (colour && !bg_zbuf[xindex] && xindex >= 0 && xindex < 160) |
| 312 | | gb_plot_pixel(bitmap, xindex, yindex, machine->pens[spal[colour]]); |
| 312 | gb_plot_pixel(bitmap, xindex, yindex, spal[colour]); |
| 313 | 313 | data <<= 1; |
| 314 | 314 | } |
| 315 | 315 | break; |
| r2200 | r2201 | |
| 318 | 318 | { |
| 319 | 319 | register int colour = ((data & 0x8000) ? 2 : 0) | ((data & 0x0080) ? 1 : 0); |
| 320 | 320 | if (colour && xindex >= 0 && xindex < 160) |
| 321 | | gb_plot_pixel(bitmap, xindex, yindex, machine->pens[spal[colour]]); |
| 321 | gb_plot_pixel(bitmap, xindex, yindex, spal[colour]); |
| 322 | 322 | data <<= 1; |
| 323 | 323 | } |
| 324 | 324 | break; |
| r2200 | r2201 | |
| 385 | 385 | r.min_y = r.max_y = gb_lcd.current_line; |
| 386 | 386 | r.min_x = gb_lcd.start_x; |
| 387 | 387 | r.max_x = gb_lcd.end_x - 1; |
| 388 | | fillbitmap( bitmap, machine->pens[ gb_bpal[0] ], &r ); |
| 388 | fillbitmap( bitmap, gb_bpal[0], &r ); |
| 389 | 389 | } |
| 390 | 390 | while ( l < 2 ) { |
| 391 | 391 | UINT8 xindex, *map, *tiles; |
| r2200 | r2201 | |
| 413 | 413 | while ( i > 0 ) { |
| 414 | 414 | while ( ( gb_lcd.layer[l].xshift < 8 ) && i ) { |
| 415 | 415 | register int colour = ( ( data & 0x8000 ) ? 2 : 0 ) | ( ( data & 0x0080 ) ? 1 : 0 ); |
| 416 | | gb_plot_pixel( bitmap, xindex, gb_lcd.current_line, machine->pens[ gb_bpal[ colour ] ] ); |
| 416 | gb_plot_pixel( bitmap, xindex, gb_lcd.current_line, gb_bpal[ colour ] ); |
| 417 | 417 | bg_zbuf[ xindex ] = colour; |
| 418 | 418 | xindex++; |
| 419 | 419 | data <<= 1; |
| r2200 | r2201 | |
| 437 | 437 | l++; |
| 438 | 438 | } |
| 439 | 439 | if ( gb_lcd.end_x == 160 && LCDCONT & 0x02 ) { |
| 440 | | gb_update_sprites( machine ); |
| 440 | gb_update_sprites(); |
| 441 | 441 | } |
| 442 | 442 | gb_lcd.start_x = gb_lcd.end_x; |
| 443 | 443 | } |
| r2200 | r2201 | |
| 449 | 449 | const device_config *screen = video_screen_first(machine->config); |
| 450 | 450 | rectangle r = *video_screen_get_visible_area(screen); |
| 451 | 451 | r.min_y = r.max_y = gb_lcd.current_line; |
| 452 | | fillbitmap( bitmap, screen->machine->pens[0], &r ); |
| 452 | fillbitmap( bitmap, 0, &r ); |
| 453 | 453 | } |
| 454 | 454 | gb_lcd.previous_line = gb_lcd.current_line; |
| 455 | 455 | } |
| r2200 | r2201 | |
| 682 | 682 | r.max_x -= SGB_XOFFSET; |
| 683 | 683 | r.min_y = SGB_YOFFSET; |
| 684 | 684 | r.max_y -= SGB_YOFFSET; |
| 685 | | fillbitmap( bitmap, machine->pens[0], &r ); |
| 685 | fillbitmap( bitmap, 0, &r ); |
| 686 | 686 | } return; |
| 687 | 687 | case 3: /* Blank screen (white - or should it be color 0?) */ |
| 688 | 688 | { |
| r2200 | r2201 | |
| 692 | 692 | r.max_x -= SGB_XOFFSET; |
| 693 | 693 | r.min_y = SGB_YOFFSET; |
| 694 | 694 | r.max_y -= SGB_YOFFSET; |
| 695 | | fillbitmap( bitmap, machine->pens[32767], &r ); |
| 695 | fillbitmap( bitmap, 32767, &r ); |
| 696 | 696 | } return; |
| 697 | 697 | } |
| 698 | 698 | |
| r2200 | r2201 | |
| 711 | 711 | r.min_x = SGB_XOFFSET; |
| 712 | 712 | r.max_x -= SGB_XOFFSET; |
| 713 | 713 | r.min_y = r.max_y = gb_lcd.current_line + SGB_YOFFSET; |
| 714 | | fillbitmap( bitmap, machine->pens[0], &r ); |
| 714 | fillbitmap( bitmap, 0, &r ); |
| 715 | 715 | } |
| 716 | 716 | while( l < 2 ) { |
| 717 | 717 | UINT8 xindex, sgb_palette, *map, *tiles; |
| r2200 | r2201 | |
| 782 | 782 | r.min_x = SGB_XOFFSET; |
| 783 | 783 | r.max_x -= SGB_XOFFSET; |
| 784 | 784 | r.min_y = r.max_y = gb_lcd.current_line + SGB_YOFFSET; |
| 785 | | fillbitmap(bitmap, machine->pens[0], &r); |
| 785 | fillbitmap(bitmap, 0, &r); |
| 786 | 786 | } |
| 787 | 787 | gb_lcd.previous_line = gb_lcd.current_line; |
| 788 | 788 | } |
| r2200 | r2201 | |
| 848 | 848 | { |
| 849 | 849 | register int colour = ((data & 0x0100) ? 2 : 0) | ((data & 0x0001) ? 1 : 0); |
| 850 | 850 | if (colour && !bg_zbuf[xindex] && xindex >= 0 && xindex < 160) |
| 851 | | gb_plot_pixel(bitmap, xindex, yindex, machine->pens[cgb_spal[pal + colour]]); |
| 851 | gb_plot_pixel(bitmap, xindex, yindex, cgb_spal[pal + colour]); |
| 852 | 852 | data >>= 1; |
| 853 | 853 | } |
| 854 | 854 | break; |
| r2200 | r2201 | |
| 859 | 859 | if((bg_zbuf[xindex] & 0x80) && (bg_zbuf[xindex] & 0x7f) && (LCDCONT & 0x1)) |
| 860 | 860 | colour = 0; |
| 861 | 861 | if (colour && xindex >= 0 && xindex < 160) |
| 862 | | gb_plot_pixel(bitmap, xindex, yindex, machine->pens[cgb_spal[pal + colour]]); |
| 862 | gb_plot_pixel(bitmap, xindex, yindex, cgb_spal[pal + colour]); |
| 863 | 863 | data >>= 1; |
| 864 | 864 | } |
| 865 | 865 | break; |
| r2200 | r2201 | |
| 868 | 868 | { |
| 869 | 869 | register int colour = ((data & 0x8000) ? 2 : 0) | ((data & 0x0080) ? 1 : 0); |
| 870 | 870 | if (colour && !bg_zbuf[xindex] && xindex >= 0 && xindex < 160) |
| 871 | | gb_plot_pixel(bitmap, xindex, yindex, machine->pens[cgb_spal[pal + colour]]); |
| 871 | gb_plot_pixel(bitmap, xindex, yindex, cgb_spal[pal + colour]); |
| 872 | 872 | data <<= 1; |
| 873 | 873 | } |
| 874 | 874 | break; |
| r2200 | r2201 | |
| 879 | 879 | if((bg_zbuf[xindex] & 0x80) && (bg_zbuf[xindex] & 0x7f) && (LCDCONT & 0x1)) |
| 880 | 880 | colour = 0; |
| 881 | 881 | if (colour && xindex >= 0 && xindex < 160) |
| 882 | | gb_plot_pixel(bitmap, xindex, yindex, machine->pens[cgb_spal[pal + colour]]); |
| 882 | gb_plot_pixel(bitmap, xindex, yindex, cgb_spal[pal + colour]); |
| 883 | 883 | data <<= 1; |
| 884 | 884 | } |
| 885 | 885 | break; |
| r2200 | r2201 | |
| 947 | 947 | r.min_y = r.max_y = gb_lcd.current_line; |
| 948 | 948 | r.min_x = gb_lcd.start_x; |
| 949 | 949 | r.max_x = gb_lcd.end_x - 1; |
| 950 | | fillbitmap( bitmap, machine->pens[ ( gbc_mode == GBC_MODE_MONO ) ? 0 : 32767 ], &r ); |
| 950 | fillbitmap( bitmap, ( gbc_mode == GBC_MODE_MONO ) ? 0 : 32767, &r ); |
| 951 | 951 | } |
| 952 | 952 | while ( l < 2 ) { |
| 953 | 953 | UINT8 xindex, *map, *tiles, *gbcmap; |
| r2200 | r2201 | |
| 996 | 996 | colour = ( ( data & 0x8000 ) ? 2 : 0 ) | ( ( data & 0x0080 ) ? 1 : 0 ); |
| 997 | 997 | data <<= 1; |
| 998 | 998 | } |
| 999 | | gb_plot_pixel( bitmap, xindex, gb_lcd.current_line, machine->pens[ cgb_bpal[ ( ( gbcmap[ gb_lcd.layer[l].xindex ] & 0x07 ) * 4 ) + colour ] ] ); |
| 999 | gb_plot_pixel( bitmap, xindex, gb_lcd.current_line, cgb_bpal[ ( ( gbcmap[ gb_lcd.layer[l].xindex ] & 0x07 ) * 4 ) + colour ] ); |
| 1000 | 1000 | bg_zbuf[ xindex ] = colour + ( gbcmap[ gb_lcd.layer[l].xindex ] & 0x80 ); |
| 1001 | 1001 | xindex++; |
| 1002 | 1002 | gb_lcd.layer[l].xshift++; |
| r2200 | r2201 | |
| 1039 | 1039 | const device_config *screen = video_screen_first(machine->config); |
| 1040 | 1040 | rectangle r = *video_screen_get_visible_area(screen); |
| 1041 | 1041 | r.min_y = r.max_y = gb_lcd.current_line; |
| 1042 | | fillbitmap( bitmap, machine->pens[ ( gbc_mode == GBC_MODE_MONO ) ? 0 : 32767 ], &r ); |
| 1042 | fillbitmap( bitmap, ( gbc_mode == GBC_MODE_MONO ) ? 0 : 32767, &r ); |
| 1043 | 1043 | } |
| 1044 | 1044 | gb_lcd.previous_line = gb_lcd.current_line; |
| 1045 | 1045 | } |
src/mess/video/epnick.c
| r2200 | r2201 | |
| 30 | 30 | |
| 31 | 31 | // MESS specific |
| 32 | 32 | /* 8-bit pixel write! */ |
| 33 | | static void nick_write_pixel(running_machine *machine, NICK_STATE *nick, int ci) |
| 33 | static void nick_write_pixel(NICK_STATE *nick, int ci) |
| 34 | 34 | { |
| 35 | 35 | if (nick->dest_pos < nick->dest_max_pos) |
| 36 | 36 | { |
| 37 | | nick->dest[nick->dest_pos++] = machine->pens[ci]; |
| 37 | nick->dest[nick->dest_pos++] = ci; |
| 38 | 38 | } |
| 39 | 39 | } |
| 40 | 40 | |
| r2200 | r2201 | |
| 119 | 119 | } |
| 120 | 120 | |
| 121 | 121 | /* write border colour */ |
| 122 | | static void Nick_WriteBorder(running_machine *machine, int Clocks) |
| 122 | static void Nick_WriteBorder(int Clocks) |
| 123 | 123 | { |
| 124 | 124 | int i; |
| 125 | 125 | int ColIndex = Nick.BORDER; |
| 126 | 126 | |
| 127 | 127 | for (i=0; i<(Clocks<<4); i++) |
| 128 | 128 | { |
| 129 | | nick_write_pixel(machine, &Nick, ColIndex); |
| 129 | nick_write_pixel(&Nick, ColIndex); |
| 130 | 130 | } |
| 131 | 131 | } |
| 132 | 132 | |
| 133 | 133 | |
| 134 | | static void Nick_DoLeftMargin(running_machine *machine, LPT_ENTRY *pLPT) |
| 134 | static void Nick_DoLeftMargin(LPT_ENTRY *pLPT) |
| 135 | 135 | { |
| 136 | 136 | unsigned char LeftMargin; |
| 137 | 137 | |
| r2200 | r2201 | |
| 145 | 145 | LeftMarginVisible = LeftMargin-Nick_FirstVisibleClock; |
| 146 | 146 | |
| 147 | 147 | /* render the border */ |
| 148 | | Nick_WriteBorder(machine, LeftMarginVisible); |
| 148 | Nick_WriteBorder(LeftMarginVisible); |
| 149 | 149 | } |
| 150 | 150 | } |
| 151 | 151 | |
| 152 | | static void Nick_DoRightMargin(running_machine *machine, LPT_ENTRY *pLPT) |
| 152 | static void Nick_DoRightMargin(LPT_ENTRY *pLPT) |
| 153 | 153 | { |
| 154 | 154 | unsigned char RightMargin; |
| 155 | 155 | |
| r2200 | r2201 | |
| 163 | 163 | RightMarginVisible = Nick_LastVisibleClock - RightMargin; |
| 164 | 164 | |
| 165 | 165 | /* render the border */ |
| 166 | | Nick_WriteBorder(machine, RightMarginVisible); |
| 166 | Nick_WriteBorder(RightMarginVisible); |
| 167 | 167 | } |
| 168 | 168 | } |
| 169 | 169 | |
| r2200 | r2201 | |
| 179 | 179 | } |
| 180 | 180 | } |
| 181 | 181 | |
| 182 | | static void Nick_WritePixels2Colour(running_machine *machine, unsigned char Pen0, unsigned char Pen1, unsigned char DataByte) |
| 182 | static void Nick_WritePixels2Colour(unsigned char Pen0, unsigned char Pen1, unsigned char DataByte) |
| 183 | 183 | { |
| 184 | 184 | int i; |
| 185 | 185 | int ColIndex[2]; |
| r2200 | r2201 | |
| 195 | 195 | { |
| 196 | 196 | PenIndex = ColIndex[(Data>>7) & 0x01]; |
| 197 | 197 | |
| 198 | | nick_write_pixel(machine, &Nick, PenIndex); |
| 198 | nick_write_pixel(&Nick, PenIndex); |
| 199 | 199 | |
| 200 | 200 | Data = Data<<1; |
| 201 | 201 | } |
| 202 | 202 | } |
| 203 | 203 | |
| 204 | | static void Nick_WritePixels2ColourLPIXEL(running_machine *machine, unsigned char Pen0, unsigned char Pen1, unsigned char DataByte) |
| 204 | static void Nick_WritePixels2ColourLPIXEL(unsigned char Pen0, unsigned char Pen1, unsigned char DataByte) |
| 205 | 205 | { |
| 206 | 206 | int i; |
| 207 | 207 | int ColIndex[2]; |
| r2200 | r2201 | |
| 217 | 217 | { |
| 218 | 218 | PenIndex = ColIndex[(Data>>7) & 0x01]; |
| 219 | 219 | |
| 220 | | nick_write_pixel(machine, &Nick, PenIndex); |
| 221 | | nick_write_pixel(machine, &Nick, PenIndex); |
| 220 | nick_write_pixel(&Nick, PenIndex); |
| 221 | nick_write_pixel(&Nick, PenIndex); |
| 222 | 222 | |
| 223 | 223 | Data = Data<<1; |
| 224 | 224 | } |
| 225 | 225 | } |
| 226 | 226 | |
| 227 | 227 | |
| 228 | | static void Nick_WritePixels(running_machine *machine, unsigned char DataByte, unsigned char CharIndex) |
| 228 | static void Nick_WritePixels(unsigned char DataByte, unsigned char CharIndex) |
| 229 | 229 | { |
| 230 | 230 | int i; |
| 231 | 231 | |
| r2200 | r2201 | |
| 283 | 283 | |
| 284 | 284 | |
| 285 | 285 | |
| 286 | | Nick_WritePixels2Colour(machine, PenOffset, |
| 286 | Nick_WritePixels2Colour(PenOffset, |
| 287 | 287 | (PenOffset|0x01), Data); |
| 288 | 288 | } |
| 289 | 289 | break; |
| r2200 | r2201 | |
| 309 | 309 | PenIndex = Nick_PenIndexLookup_4Colour[Data]; |
| 310 | 310 | PalIndex = Nick.LPT.COL[PenIndex & 0x03]; |
| 311 | 311 | |
| 312 | | nick_write_pixel(machine, &Nick, PalIndex); |
| 313 | | nick_write_pixel(machine, &Nick, PalIndex); |
| 312 | nick_write_pixel(&Nick, PalIndex); |
| 313 | nick_write_pixel(&Nick, PalIndex); |
| 314 | 314 | |
| 315 | 315 | Data = Data<<1; |
| 316 | 316 | } |
| r2200 | r2201 | |
| 339 | 339 | |
| 340 | 340 | PalIndex = Nick_GetColourIndex(PenIndex); |
| 341 | 341 | |
| 342 | | nick_write_pixel(machine, &Nick, PalIndex); |
| 343 | | nick_write_pixel(machine, &Nick, PalIndex); |
| 344 | | nick_write_pixel(machine, &Nick, PalIndex); |
| 345 | | nick_write_pixel(machine, &Nick, PalIndex); |
| 342 | nick_write_pixel(&Nick, PalIndex); |
| 343 | nick_write_pixel(&Nick, PalIndex); |
| 344 | nick_write_pixel(&Nick, PalIndex); |
| 345 | nick_write_pixel(&Nick, PalIndex); |
| 346 | 346 | |
| 347 | 347 | Data = Data<<1; |
| 348 | 348 | } |
| r2200 | r2201 | |
| 365 | 365 | |
| 366 | 366 | PalIndex = Data; |
| 367 | 367 | |
| 368 | | nick_write_pixel(machine, &Nick, PalIndex); |
| 369 | | nick_write_pixel(machine, &Nick, PalIndex); |
| 370 | | nick_write_pixel(machine, &Nick, PalIndex); |
| 371 | | nick_write_pixel(machine, &Nick, PalIndex); |
| 372 | | nick_write_pixel(machine, &Nick, PalIndex); |
| 373 | | nick_write_pixel(machine, &Nick, PalIndex); |
| 374 | | nick_write_pixel(machine, &Nick, PalIndex); |
| 375 | | nick_write_pixel(machine, &Nick, PalIndex); |
| 368 | nick_write_pixel(&Nick, PalIndex); |
| 369 | nick_write_pixel(&Nick, PalIndex); |
| 370 | nick_write_pixel(&Nick, PalIndex); |
| 371 | nick_write_pixel(&Nick, PalIndex); |
| 372 | nick_write_pixel(&Nick, PalIndex); |
| 373 | nick_write_pixel(&Nick, PalIndex); |
| 374 | nick_write_pixel(&Nick, PalIndex); |
| 375 | nick_write_pixel(&Nick, PalIndex); |
| 376 | 376 | |
| 377 | 377 | |
| 378 | 378 | } |
| r2200 | r2201 | |
| 380 | 380 | } |
| 381 | 381 | } |
| 382 | 382 | |
| 383 | | static void Nick_WritePixelsLPIXEL(running_machine *machine, unsigned char DataByte, unsigned char CharIndex) |
| 383 | static void Nick_WritePixelsLPIXEL(unsigned char DataByte, unsigned char CharIndex) |
| 384 | 384 | { |
| 385 | 385 | int i; |
| 386 | 386 | |
| r2200 | r2201 | |
| 438 | 438 | |
| 439 | 439 | |
| 440 | 440 | |
| 441 | | Nick_WritePixels2ColourLPIXEL(machine, PenOffset,(PenOffset|0x01), Data); |
| 441 | Nick_WritePixels2ColourLPIXEL(PenOffset,(PenOffset|0x01), Data); |
| 442 | 442 | } |
| 443 | 443 | break; |
| 444 | 444 | |
| r2200 | r2201 | |
| 463 | 463 | PenIndex = Nick_PenIndexLookup_4Colour[Data]; |
| 464 | 464 | PalIndex = Nick.LPT.COL[PenIndex & 0x03]; |
| 465 | 465 | |
| 466 | | nick_write_pixel(machine, &Nick, PalIndex); |
| 467 | | nick_write_pixel(machine, &Nick, PalIndex); |
| 468 | | nick_write_pixel(machine, &Nick, PalIndex); |
| 469 | | nick_write_pixel(machine, &Nick, PalIndex); |
| 466 | nick_write_pixel(&Nick, PalIndex); |
| 467 | nick_write_pixel(&Nick, PalIndex); |
| 468 | nick_write_pixel(&Nick, PalIndex); |
| 469 | nick_write_pixel(&Nick, PalIndex); |
| 470 | 470 | |
| 471 | 471 | Data = Data<<1; |
| 472 | 472 | } |
| r2200 | r2201 | |
| 495 | 495 | |
| 496 | 496 | PalIndex = Nick_GetColourIndex(PenIndex); |
| 497 | 497 | |
| 498 | | nick_write_pixel(machine, &Nick, PalIndex); |
| 499 | | nick_write_pixel(machine, &Nick, PalIndex); |
| 500 | | nick_write_pixel(machine, &Nick, PalIndex); |
| 501 | | nick_write_pixel(machine, &Nick, PalIndex); |
| 502 | | nick_write_pixel(machine, &Nick, PalIndex); |
| 503 | | nick_write_pixel(machine, &Nick, PalIndex); |
| 504 | | nick_write_pixel(machine, &Nick, PalIndex); |
| 505 | | nick_write_pixel(machine, &Nick, PalIndex); |
| 498 | nick_write_pixel(&Nick, PalIndex); |
| 499 | nick_write_pixel(&Nick, PalIndex); |
| 500 | nick_write_pixel(&Nick, PalIndex); |
| 501 | nick_write_pixel(&Nick, PalIndex); |
| 502 | nick_write_pixel(&Nick, PalIndex); |
| 503 | nick_write_pixel(&Nick, PalIndex); |
| 504 | nick_write_pixel(&Nick, PalIndex); |
| 505 | nick_write_pixel(&Nick, PalIndex); |
| 506 | 506 | |
| 507 | 507 | Data = Data<<1; |
| 508 | 508 | } |
| r2200 | r2201 | |
| 525 | 525 | |
| 526 | 526 | PalIndex = Data; |
| 527 | 527 | |
| 528 | | nick_write_pixel(machine, &Nick, PalIndex); |
| 529 | | nick_write_pixel(machine, &Nick, PalIndex); |
| 530 | | nick_write_pixel(machine, &Nick, PalIndex); |
| 531 | | nick_write_pixel(machine, &Nick, PalIndex); |
| 532 | | nick_write_pixel(machine, &Nick, PalIndex); |
| 533 | | nick_write_pixel(machine, &Nick, PalIndex); |
| 534 | | nick_write_pixel(machine, &Nick, PalIndex); |
| 535 | | nick_write_pixel(machine, &Nick, PalIndex); |
| 528 | nick_write_pixel(&Nick, PalIndex); |
| 529 | nick_write_pixel(&Nick, PalIndex); |
| 530 | nick_write_pixel(&Nick, PalIndex); |
| 531 | nick_write_pixel(&Nick, PalIndex); |
| 532 | nick_write_pixel(&Nick, PalIndex); |
| 533 | nick_write_pixel(&Nick, PalIndex); |
| 534 | nick_write_pixel(&Nick, PalIndex); |
| 535 | nick_write_pixel(&Nick, PalIndex); |
| 536 | 536 | |
| 537 | | nick_write_pixel(machine, &Nick, PalIndex); |
| 538 | | nick_write_pixel(machine, &Nick, PalIndex); |
| 539 | | nick_write_pixel(machine, &Nick, PalIndex); |
| 540 | | nick_write_pixel(machine, &Nick, PalIndex); |
| 541 | | nick_write_pixel(machine, &Nick, PalIndex); |
| 542 | | nick_write_pixel(machine, &Nick, PalIndex); |
| 543 | | nick_write_pixel(machine, &Nick, PalIndex); |
| 544 | | nick_write_pixel(machine, &Nick, PalIndex); |
| 537 | nick_write_pixel(&Nick, PalIndex); |
| 538 | nick_write_pixel(&Nick, PalIndex); |
| 539 | nick_write_pixel(&Nick, PalIndex); |
| 540 | nick_write_pixel(&Nick, PalIndex); |
| 541 | nick_write_pixel(&Nick, PalIndex); |
| 542 | nick_write_pixel(&Nick, PalIndex); |
| 543 | nick_write_pixel(&Nick, PalIndex); |
| 544 | nick_write_pixel(&Nick, PalIndex); |
| 545 | 545 | |
| 546 | 546 | |
| 547 | 547 | } |
| r2200 | r2201 | |
| 550 | 550 | } |
| 551 | 551 | |
| 552 | 552 | |
| 553 | | static void Nick_DoPixel(running_machine *machine, int ClocksVisible) |
| 553 | static void Nick_DoPixel(int ClocksVisible) |
| 554 | 554 | { |
| 555 | 555 | int i; |
| 556 | 556 | unsigned char Buf1, Buf2; |
| r2200 | r2201 | |
| 563 | 563 | Buf2 = Nick_FetchByte(Nick.LD1); |
| 564 | 564 | Nick.LD1++; |
| 565 | 565 | |
| 566 | | Nick_WritePixels(machine, Buf1,Buf1); |
| 566 | Nick_WritePixels(Buf1,Buf1); |
| 567 | 567 | |
| 568 | | Nick_WritePixels(machine, Buf2,Buf1); |
| 568 | Nick_WritePixels(Buf2,Buf1); |
| 569 | 569 | } |
| 570 | 570 | } |
| 571 | 571 | |
| 572 | 572 | |
| 573 | | static void Nick_DoLPixel(running_machine *machine, int ClocksVisible) |
| 573 | static void Nick_DoLPixel(int ClocksVisible) |
| 574 | 574 | { |
| 575 | 575 | int i; |
| 576 | 576 | unsigned char Buf1; |
| r2200 | r2201 | |
| 580 | 580 | Buf1 = Nick_FetchByte(Nick.LD1); |
| 581 | 581 | Nick.LD1++; |
| 582 | 582 | |
| 583 | | Nick_WritePixelsLPIXEL(machine, Buf1,Buf1); |
| 583 | Nick_WritePixelsLPIXEL(Buf1,Buf1); |
| 584 | 584 | } |
| 585 | 585 | } |
| 586 | 586 | |
| 587 | | static void Nick_DoAttr(running_machine *machine, int ClocksVisible) |
| 587 | static void Nick_DoAttr(int ClocksVisible) |
| 588 | 588 | { |
| 589 | 589 | int i; |
| 590 | 590 | unsigned char Buf1, Buf2; |
| r2200 | r2201 | |
| 601 | 601 | unsigned char BackgroundColour = ((Buf1>>4) & 0x0f); |
| 602 | 602 | unsigned char ForegroundColour = (Buf1 & 0x0f); |
| 603 | 603 | |
| 604 | | Nick_WritePixels2ColourLPIXEL(machine, BackgroundColour, ForegroundColour, Buf2); |
| 604 | Nick_WritePixels2ColourLPIXEL(BackgroundColour, ForegroundColour, Buf2); |
| 605 | 605 | } |
| 606 | 606 | } |
| 607 | 607 | } |
| 608 | 608 | |
| 609 | | static void Nick_DoCh256(running_machine *machine, int ClocksVisible) |
| 609 | static void Nick_DoCh256(int ClocksVisible) |
| 610 | 610 | { |
| 611 | 611 | int i; |
| 612 | 612 | unsigned char Buf1, Buf2; |
| r2200 | r2201 | |
| 617 | 617 | Nick.LD1++; |
| 618 | 618 | Buf2 = Nick_FetchByte(ADDR_CH256(Nick.LD2, Buf1)); |
| 619 | 619 | |
| 620 | | Nick_WritePixelsLPIXEL(machine, Buf2,Buf1); |
| 620 | Nick_WritePixelsLPIXEL(Buf2,Buf1); |
| 621 | 621 | } |
| 622 | 622 | } |
| 623 | 623 | |
| 624 | | static void Nick_DoCh128(running_machine *machine, int ClocksVisible) |
| 624 | static void Nick_DoCh128(int ClocksVisible) |
| 625 | 625 | { |
| 626 | 626 | int i; |
| 627 | 627 | unsigned char Buf1, Buf2; |
| r2200 | r2201 | |
| 632 | 632 | Nick.LD1++; |
| 633 | 633 | Buf2 = Nick_FetchByte(ADDR_CH128(Nick.LD2, Buf1)); |
| 634 | 634 | |
| 635 | | Nick_WritePixelsLPIXEL(machine, Buf2,Buf1); |
| 635 | Nick_WritePixelsLPIXEL(Buf2,Buf1); |
| 636 | 636 | } |
| 637 | 637 | } |
| 638 | 638 | |
| 639 | | static void Nick_DoCh64(running_machine *machine, int ClocksVisible) |
| 639 | static void Nick_DoCh64(int ClocksVisible) |
| 640 | 640 | { |
| 641 | 641 | int i; |
| 642 | 642 | unsigned char Buf1, Buf2; |
| r2200 | r2201 | |
| 647 | 647 | Nick.LD1++; |
| 648 | 648 | Buf2 = Nick_FetchByte(ADDR_CH64(Nick.LD2, Buf1)); |
| 649 | 649 | |
| 650 | | Nick_WritePixelsLPIXEL(machine, Buf2,Buf1); |
| 650 | Nick_WritePixelsLPIXEL(Buf2,Buf1); |
| 651 | 651 | } |
| 652 | 652 | } |
| 653 | 653 | |
| 654 | 654 | |
| 655 | | static void Nick_DoDisplay(running_machine *machine, LPT_ENTRY *pLPT) |
| 655 | static void Nick_DoDisplay(LPT_ENTRY *pLPT) |
| 656 | 656 | { |
| 657 | 657 | unsigned char ClocksVisible; |
| 658 | 658 | unsigned char RightMargin, LeftMargin; |
| r2200 | r2201 | |
| 718 | 718 | { |
| 719 | 719 | case NICK_PIXEL_MODE: |
| 720 | 720 | { |
| 721 | | Nick_DoPixel(machine, ClocksVisible); |
| 721 | Nick_DoPixel(ClocksVisible); |
| 722 | 722 | } |
| 723 | 723 | break; |
| 724 | 724 | |
| 725 | 725 | case NICK_ATTR_MODE: |
| 726 | 726 | { |
| 727 | 727 | //mame_printf_info("attr mode\r\n"); |
| 728 | | Nick_DoAttr(machine, ClocksVisible); |
| 728 | Nick_DoAttr( ClocksVisible); |
| 729 | 729 | } |
| 730 | 730 | break; |
| 731 | 731 | |
| 732 | 732 | case NICK_CH256_MODE: |
| 733 | 733 | { |
| 734 | 734 | //mame_printf_info("ch256 mode\r\n"); |
| 735 | | Nick_DoCh256(machine, ClocksVisible); |
| 735 | Nick_DoCh256(ClocksVisible); |
| 736 | 736 | } |
| 737 | 737 | break; |
| 738 | 738 | |
| 739 | 739 | case NICK_CH128_MODE: |
| 740 | 740 | { |
| 741 | | Nick_DoCh128(machine, ClocksVisible); |
| 741 | Nick_DoCh128(ClocksVisible); |
| 742 | 742 | } |
| 743 | 743 | break; |
| 744 | 744 | |
| 745 | 745 | case NICK_CH64_MODE: |
| 746 | 746 | { |
| 747 | 747 | //mame_printf_info("ch64 mode\r\n"); |
| 748 | | Nick_DoCh64(machine, ClocksVisible); |
| 748 | Nick_DoCh64(ClocksVisible); |
| 749 | 749 | } |
| 750 | 750 | break; |
| 751 | 751 | |
| 752 | 752 | case NICK_LPIXEL_MODE: |
| 753 | 753 | { |
| 754 | | Nick_DoLPixel(machine, ClocksVisible); |
| 754 | Nick_DoLPixel(ClocksVisible); |
| 755 | 755 | } |
| 756 | 756 | break; |
| 757 | 757 | |
| r2200 | r2201 | |
| 799 | 799 | } |
| 800 | 800 | |
| 801 | 801 | /* call here to render a line of graphics */ |
| 802 | | static void Nick_DoLine(running_machine *machine) |
| 802 | static void Nick_DoLine(void) |
| 803 | 803 | { |
| 804 | 804 | unsigned char ScanLineCount; |
| 805 | 805 | |
| r2200 | r2201 | |
| 814 | 814 | } |
| 815 | 815 | |
| 816 | 816 | /* left border */ |
| 817 | | Nick_DoLeftMargin(machine, &Nick.LPT); |
| 817 | Nick_DoLeftMargin(&Nick.LPT); |
| 818 | 818 | |
| 819 | 819 | /* do visible part */ |
| 820 | | Nick_DoDisplay(machine, &Nick.LPT); |
| 820 | Nick_DoDisplay(&Nick.LPT); |
| 821 | 821 | |
| 822 | 822 | /* right border */ |
| 823 | | Nick_DoRightMargin(machine, &Nick.LPT); |
| 823 | Nick_DoRightMargin(&Nick.LPT); |
| 824 | 824 | |
| 825 | 825 | // 0x0f7 is first! |
| 826 | 826 | /* scan line count for this LPT */ |
| r2200 | r2201 | |
| 895 | 895 | } |
| 896 | 896 | } |
| 897 | 897 | |
| 898 | | void Nick_DoScreen(running_machine *machine, bitmap_t *bm) |
| 898 | void Nick_DoScreen(bitmap_t *bm) |
| 899 | 899 | { |
| 900 | 900 | int line = 0; |
| 901 | 901 | |
| r2200 | r2201 | |
| 908 | 908 | Nick.dest_max_pos = bm->width; |
| 909 | 909 | |
| 910 | 910 | /* write line */ |
| 911 | | Nick_DoLine(machine); |
| 911 | Nick_DoLine(); |
| 912 | 912 | |
| 913 | 913 | /* next line */ |
| 914 | 914 | line++; |
src/mess/video/electron.c
| r2200 | r2201 | |
| 88 | 88 | case 0: |
| 89 | 89 | for( i = 0; i < 80; i++ ) { |
| 90 | 90 | UINT8 pattern = read_vram( ula.screen_addr + i * 8 ); |
| 91 | | electron_plot_pixel( bitmap, x++, scanline, screen->machine->pens[ pal[(pattern>>7)& 1] ] ); |
| 92 | | electron_plot_pixel( bitmap, x++, scanline, screen->machine->pens[ pal[(pattern>>6)& 1] ] ); |
| 93 | | electron_plot_pixel( bitmap, x++, scanline, screen->machine->pens[ pal[(pattern>>5)& 1] ] ); |
| 94 | | electron_plot_pixel( bitmap, x++, scanline, screen->machine->pens[ pal[(pattern>>4)& 1] ] ); |
| 95 | | electron_plot_pixel( bitmap, x++, scanline, screen->machine->pens[ pal[(pattern>>3)& 1] ] ); |
| 96 | | electron_plot_pixel( bitmap, x++, scanline, screen->machine->pens[ pal[(pattern>>2)& 1] ] ); |
| 97 | | electron_plot_pixel( bitmap, x++, scanline, screen->machine->pens[ pal[(pattern>>1)& 1] ] ); |
| 98 | | electron_plot_pixel( bitmap, x++, scanline, screen->machine->pens[ pal[(pattern>>0)& 1] ] ); |
| 91 | electron_plot_pixel( bitmap, x++, scanline, pal[(pattern>>7)& 1] ); |
| 92 | electron_plot_pixel( bitmap, x++, scanline, pal[(pattern>>6)& 1] ); |
| 93 | electron_plot_pixel( bitmap, x++, scanline, pal[(pattern>>5)& 1] ); |
| 94 | electron_plot_pixel( bitmap, x++, scanline, pal[(pattern>>4)& 1] ); |
| 95 | electron_plot_pixel( bitmap, x++, scanline, pal[(pattern>>3)& 1] ); |
| 96 | electron_plot_pixel( bitmap, x++, scanline, pal[(pattern>>2)& 1] ); |
| 97 | electron_plot_pixel( bitmap, x++, scanline, pal[(pattern>>1)& 1] ); |
| 98 | electron_plot_pixel( bitmap, x++, scanline, pal[(pattern>>0)& 1] ); |
| 99 | 99 | } |
| 100 | 100 | ula.screen_addr += 1; |
| 101 | 101 | if ( ( scanline & 0x07 ) == 7 ) { |
| r2200 | r2201 | |
| 106 | 106 | x = 0; |
| 107 | 107 | for( i = 0; i < 80; i++ ) { |
| 108 | 108 | UINT8 pattern = read_vram( ula.screen_addr + i * 8 ); |
| 109 | | electron_plot_pixel( bitmap, x++, scanline, screen->machine->pens[ pal[map4[pattern>>3]] ] ); |
| 110 | | electron_plot_pixel( bitmap, x++, scanline, screen->machine->pens[ pal[map4[pattern>>3]] ] ); |
| 111 | | electron_plot_pixel( bitmap, x++, scanline, screen->machine->pens[ pal[map4[pattern>>2]] ] ); |
| 112 | | electron_plot_pixel( bitmap, x++, scanline, screen->machine->pens[ pal[map4[pattern>>2]] ] ); |
| 113 | | electron_plot_pixel( bitmap, x++, scanline, screen->machine->pens[ pal[map4[pattern>>1]] ] ); |
| 114 | | electron_plot_pixel( bitmap, x++, scanline, screen->machine->pens[ pal[map4[pattern>>1]] ] ); |
| 115 | | electron_plot_pixel( bitmap, x++, scanline, screen->machine->pens[ pal[map4[pattern>>0]] ] ); |
| 116 | | electron_plot_pixel( bitmap, x++, scanline, screen->machine->pens[ pal[map4[pattern>>0]] ] ); |
| 109 | electron_plot_pixel( bitmap, x++, scanline, pal[map4[pattern>>3]] ); |
| 110 | electron_plot_pixel( bitmap, x++, scanline, pal[map4[pattern>>3]] ); |
| 111 | electron_plot_pixel( bitmap, x++, scanline, pal[map4[pattern>>2]] ); |
| 112 | electron_plot_pixel( bitmap, x++, scanline, pal[map4[pattern>>2]] ); |
| 113 | electron_plot_pixel( bitmap, x++, scanline, pal[map4[pattern>>1]] ); |
| 114 | electron_plot_pixel( bitmap, x++, scanline, pal[map4[pattern>>1]] ); |
| 115 | electron_plot_pixel( bitmap, x++, scanline, pal[map4[pattern>>0]] ); |
| 116 | electron_plot_pixel( bitmap, x++, scanline, pal[map4[pattern>>0]] ); |
| 117 | 117 | } |
| 118 | 118 | ula.screen_addr += 1; |
| 119 | 119 | if ( ( scanline & 0x07 ) == 7 ) { |
| r2200 | r2201 | |
| 123 | 123 | case 2: |
| 124 | 124 | for( i = 0; i < 80; i++ ) { |
| 125 | 125 | UINT8 pattern = read_vram( ula.screen_addr + i * 8 ); |
| 126 | | electron_plot_pixel( bitmap, x++, scanline, screen->machine->pens[ pal[map16[pattern>>1]] ] ); |
| 127 | | electron_plot_pixel( bitmap, x++, scanline, screen->machine->pens[ pal[map16[pattern>>1]] ] ); |
| 128 | | electron_plot_pixel( bitmap, x++, scanline, screen->machine->pens[ pal[map16[pattern>>1]] ] ); |
| 129 | | electron_plot_pixel( bitmap, x++, scanline, screen->machine->pens[ pal[map16[pattern>>1]] ] ); |
| 130 | | electron_plot_pixel( bitmap, x++, scanline, screen->machine->pens[ pal[map16[pattern>>0]] ] ); |
| 131 | | electron_plot_pixel( bitmap, x++, scanline, screen->machine->pens[ pal[map16[pattern>>0]] ] ); |
| 132 | | electron_plot_pixel( bitmap, x++, scanline, screen->machine->pens[ pal[map16[pattern>>0]] ] ); |
| 133 | | electron_plot_pixel( bitmap, x++, scanline, screen->machine->pens[ pal[map16[pattern>>0]] ] ); |
| 126 | electron_plot_pixel( bitmap, x++, scanline, pal[map16[pattern>>1]] ); |
| 127 | electron_plot_pixel( bitmap, x++, scanline, pal[map16[pattern>>1]] ); |
| 128 | electron_plot_pixel( bitmap, x++, scanline, pal[map16[pattern>>1]] ); |
| 129 | electron_plot_pixel( bitmap, x++, scanline, pal[map16[pattern>>1]] ); |
| 130 | electron_plot_pixel( bitmap, x++, scanline, pal[map16[pattern>>0]] ); |
| 131 | electron_plot_pixel( bitmap, x++, scanline, pal[map16[pattern>>0]] ); |
| 132 | electron_plot_pixel( bitmap, x++, scanline, pal[map16[pattern>>0]] ); |
| 133 | electron_plot_pixel( bitmap, x++, scanline, pal[map16[pattern>>0]] ); |
| 134 | 134 | } |
| 135 | 135 | ula.screen_addr += 1; |
| 136 | 136 | if ( ( scanline & 0x07 ) == 7 ) { |
| r2200 | r2201 | |
| 139 | 139 | break; |
| 140 | 140 | case 3: |
| 141 | 141 | if ( ( scanline > 249 ) || ( scanline % 10 >= 8 ) ) { |
| 142 | | fillbitmap( bitmap, screen->machine->pens[7], &r ); |
| 142 | fillbitmap( bitmap, 7, &r ); |
| 143 | 143 | } else { |
| 144 | 144 | for( i = 0; i < 80; i++ ) { |
| 145 | 145 | UINT8 pattern = read_vram( ula.screen_addr + i * 8 ); |
| 146 | | electron_plot_pixel( bitmap, x++, scanline, screen->machine->pens[ pal[(pattern>>7)&1] ] ); |
| 147 | | electron_plot_pixel( bitmap, x++, scanline, screen->machine->pens[ pal[(pattern>>6)&1] ] ); |
| 148 | | electron_plot_pixel( bitmap, x++, scanline, screen->machine->pens[ pal[(pattern>>5)&1] ] ); |
| 149 | | electron_plot_pixel( bitmap, x++, scanline, screen->machine->pens[ pal[(pattern>>4)&1] ] ); |
| 150 | | electron_plot_pixel( bitmap, x++, scanline, screen->machine->pens[ pal[(pattern>>3)&1] ] ); |
| 151 | | electron_plot_pixel( bitmap, x++, scanline, screen->machine->pens[ pal[(pattern>>2)&1] ] ); |
| 152 | | electron_plot_pixel( bitmap, x++, scanline, screen->machine->pens[ pal[(pattern>>1)&1] ] ); |
| 153 | | electron_plot_pixel( bitmap, x++, scanline, screen->machine->pens[ pal[(pattern>>0)&1] ] ); |
| 146 | electron_plot_pixel( bitmap, x++, scanline, pal[(pattern>>7)&1] ); |
| 147 | electron_plot_pixel( bitmap, x++, scanline, pal[(pattern>>6)&1] ); |
| 148 | electron_plot_pixel( bitmap, x++, scanline, pal[(pattern>>5)&1] ); |
| 149 | electron_plot_pixel( bitmap, x++, scanline, pal[(pattern>>4)&1] ); |
| 150 | electron_plot_pixel( bitmap, x++, scanline, pal[(pattern>>3)&1] ); |
| 151 | electron_plot_pixel( bitmap, x++, scanline, pal[(pattern>>2)&1] ); |
| 152 | electron_plot_pixel( bitmap, x++, scanline, pal[(pattern>>1)&1] ); |
| 153 | electron_plot_pixel( bitmap, x++, scanline, pal[(pattern>>0)&1] ); |
| 154 | 154 | } |
| 155 | 155 | ula.screen_addr += 1; |
| 156 | 156 | if ( ( scanline & 0x07 ) == 7 ) { |
| r2200 | r2201 | |
| 162 | 162 | case 7: |
| 163 | 163 | for( i = 0; i < 40; i++ ) { |
| 164 | 164 | UINT8 pattern = read_vram( ula.screen_addr + i * 8 ); |
| 165 | | electron_plot_pixel( bitmap, x++, scanline, screen->machine->pens[ pal[(pattern>>7)&1] ] ); |
| 166 | | electron_plot_pixel( bitmap, x++, scanline, screen->machine->pens[ pal[(pattern>>7)&1] ] ); |
| 167 | | electron_plot_pixel( bitmap, x++, scanline, screen->machine->pens[ pal[(pattern>>6)&1] ] ); |
| 168 | | electron_plot_pixel( bitmap, x++, scanline, screen->machine->pens[ pal[(pattern>>6)&1] ] ); |
| 169 | | electron_plot_pixel( bitmap, x++, scanline, screen->machine->pens[ pal[(pattern>>5)&1] ] ); |
| 170 | | electron_plot_pixel( bitmap, x++, scanline, screen->machine->pens[ pal[(pattern>>5)&1] ] ); |
| 171 | | electron_plot_pixel( bitmap, x++, scanline, screen->machine->pens[ pal[(pattern>>4)&1] ] ); |
| 172 | | electron_plot_pixel( bitmap, x++, scanline, screen->machine->pens[ pal[(pattern>>4)&1] ] ); |
| 173 | | electron_plot_pixel( bitmap, x++, scanline, screen->machine->pens[ pal[(pattern>>3)&1] ] ); |
| 174 | | electron_plot_pixel( bitmap, x++, scanline, screen->machine->pens[ pal[(pattern>>3)&1] ] ); |
| 175 | | electron_plot_pixel( bitmap, x++, scanline, screen->machine->pens[ pal[(pattern>>2)&1] ] ); |
| 176 | | electron_plot_pixel( bitmap, x++, scanline, screen->machine->pens[ pal[(pattern>>2)&1] ] ); |
| 177 | | electron_plot_pixel( bitmap, x++, scanline, screen->machine->pens[ pal[(pattern>>1)&1] ] ); |
| 178 | | electron_plot_pixel( bitmap, x++, scanline, screen->machine->pens[ pal[(pattern>>1)&1] ] ); |
| 179 | | electron_plot_pixel( bitmap, x++, scanline, screen->machine->pens[ pal[(pattern>>0)&1] ] ); |
| 180 | | electron_plot_pixel( bitmap, x++, scanline, screen->machine->pens[ pal[(pattern>>0)&1] ] ); |
| 165 | electron_plot_pixel( bitmap, x++, scanline, pal[(pattern>>7)&1] ); |
| 166 | electron_plot_pixel( bitmap, x++, scanline, pal[(pattern>>7)&1] ); |
| 167 | electron_plot_pixel( bitmap, x++, scanline, pal[(pattern>>6)&1] ); |
| 168 | electron_plot_pixel( bitmap, x++, scanline, pal[(pattern>>6)&1] ); |
| 169 | electron_plot_pixel( bitmap, x++, scanline, pal[(pattern>>5)&1] ); |
| 170 | electron_plot_pixel( bitmap, x++, scanline, pal[(pattern>>5)&1] ); |
| 171 | electron_plot_pixel( bitmap, x++, scanline, pal[(pattern>>4)&1] ); |
| 172 | electron_plot_pixel( bitmap, x++, scanline, pal[(pattern>>4)&1] ); |
| 173 | electron_plot_pixel( bitmap, x++, scanline, pal[(pattern>>3)&1] ); |
| 174 | electron_plot_pixel( bitmap, x++, scanline, pal[(pattern>>3)&1] ); |
| 175 | electron_plot_pixel( bitmap, x++, scanline, pal[(pattern>>2)&1] ); |
| 176 | electron_plot_pixel( bitmap, x++, scanline, pal[(pattern>>2)&1] ); |
| 177 | electron_plot_pixel( bitmap, x++, scanline, pal[(pattern>>1)&1] ); |
| 178 | electron_plot_pixel( bitmap, x++, scanline, pal[(pattern>>1)&1] ); |
| 179 | electron_plot_pixel( bitmap, x++, scanline, pal[(pattern>>0)&1] ); |
| 180 | electron_plot_pixel( bitmap, x++, scanline, pal[(pattern>>0)&1] ); |
| 181 | 181 | } |
| 182 | 182 | ula.screen_addr += 1; |
| 183 | 183 | if ( ( scanline & 0x07 ) == 7 ) { |
| r2200 | r2201 | |
| 187 | 187 | case 5: |
| 188 | 188 | for( i = 0; i < 40; i++ ) { |
| 189 | 189 | UINT8 pattern = read_vram( ula.screen_addr + i * 8 ); |
| 190 | | electron_plot_pixel( bitmap, x++, scanline, screen->machine->pens[ pal[map4[pattern>>3]] ] ); |
| 191 | | electron_plot_pixel( bitmap, x++, scanline, screen->machine->pens[ pal[map4[pattern>>3]] ] ); |
| 192 | | electron_plot_pixel( bitmap, x++, scanline, screen->machine->pens[ pal[map4[pattern>>3]] ] ); |
| 193 | | electron_plot_pixel( bitmap, x++, scanline, screen->machine->pens[ pal[map4[pattern>>3]] ] ); |
| 194 | | electron_plot_pixel( bitmap, x++, scanline, screen->machine->pens[ pal[map4[pattern>>2]] ] ); |
| 195 | | electron_plot_pixel( bitmap, x++, scanline, screen->machine->pens[ pal[map4[pattern>>2]] ] ); |
| 196 | | electron_plot_pixel( bitmap, x++, scanline, screen->machine->pens[ pal[map4[pattern>>2]] ] ); |
| 197 | | electron_plot_pixel( bitmap, x++, scanline, screen->machine->pens[ pal[map4[pattern>>2]] ] ); |
| 198 | | electron_plot_pixel( bitmap, x++, scanline, screen->machine->pens[ pal[map4[pattern>>1]] ] ); |
| 199 | | electron_plot_pixel( bitmap, x++, scanline, screen->machine->pens[ pal[map4[pattern>>1]] ] ); |
| 200 | | electron_plot_pixel( bitmap, x++, scanline, screen->machine->pens[ pal[map4[pattern>>1]] ] ); |
| 201 | | electron_plot_pixel( bitmap, x++, scanline, screen->machine->pens[ pal[map4[pattern>>1]] ] ); |
| 202 | | electron_plot_pixel( bitmap, x++, scanline, screen->machine->pens[ pal[map4[pattern>>0]] ] ); |
| 203 | | electron_plot_pixel( bitmap, x++, scanline, screen->machine->pens[ pal[map4[pattern>>0]] ] ); |
| 204 | | electron_plot_pixel( bitmap, x++, scanline, screen->machine->pens[ pal[map4[pattern>>0]] ] ); |
| 205 | | electron_plot_pixel( bitmap, x++, scanline, screen->machine->pens[ pal[map4[pattern>>0]] ] ); |
| 190 | electron_plot_pixel( bitmap, x++, scanline, pal[map4[pattern>>3]] ); |
| 191 | electron_plot_pixel( bitmap, x++, scanline, pal[map4[pattern>>3]] ); |
| 192 | electron_plot_pixel( bitmap, x++, scanline, pal[map4[pattern>>3]] ); |
| 193 | electron_plot_pixel( bitmap, x++, scanline, pal[map4[pattern>>3]] ); |
| 194 | electron_plot_pixel( bitmap, x++, scanline, pal[map4[pattern>>2]] ); |
| 195 | electron_plot_pixel( bitmap, x++, scanline, pal[map4[pattern>>2]] ); |
| 196 | electron_plot_pixel( bitmap, x++, scanline, pal[map4[pattern>>2]] ); |
| 197 | electron_plot_pixel( bitmap, x++, scanline, pal[map4[pattern>>2]] ); |
| 198 | electron_plot_pixel( bitmap, x++, scanline, pal[map4[pattern>>1]] ); |
| 199 | electron_plot_pixel( bitmap, x++, scanline, pal[map4[pattern>>1]] ); |
| 200 | electron_plot_pixel( bitmap, x++, scanline, pal[map4[pattern>>1]] ); |
| 201 | electron_plot_pixel( bitmap, x++, scanline, pal[map4[pattern>>1]] ); |
| 202 | electron_plot_pixel( bitmap, x++, scanline, pal[map4[pattern>>0]] ); |
| 203 | electron_plot_pixel( bitmap, x++, scanline, pal[map4[pattern>>0]] ); |
| 204 | electron_plot_pixel( bitmap, x++, scanline, pal[map4[pattern>>0]] ); |
| 205 | electron_plot_pixel( bitmap, x++, scanline, pal[map4[pattern>>0]] ); |
| 206 | 206 | } |
| 207 | 207 | ula.screen_addr += 1; |
| 208 | 208 | if ( ( scanline & 0x07 ) == 7 ) { |
| r2200 | r2201 | |
| 211 | 211 | break; |
| 212 | 212 | case 6: |
| 213 | 213 | if ( ( scanline > 249 ) || ( scanline % 10 >= 8 ) ) { |
| 214 | | fillbitmap( bitmap, screen->machine->pens[7], &r ); |
| 214 | fillbitmap( bitmap, 7, &r ); |
| 215 | 215 | } else { |
| 216 | 216 | for( i = 0; i < 40; i++ ) { |
| 217 | 217 | UINT8 pattern = read_vram( ula.screen_addr + i * 8 ); |
| 218 | | electron_plot_pixel( bitmap, x++, scanline, screen->machine->pens[ pal[(pattern>>7)&1] ] ); |
| 219 | | electron_plot_pixel( bitmap, x++, scanline, screen->machine->pens[ pal[(pattern>>7)&1] ] ); |
| 220 | | electron_plot_pixel( bitmap, x++, scanline, screen->machine->pens[ pal[(pattern>>6)&1] ] ); |
| 221 | | electron_plot_pixel( bitmap, x++, scanline, screen->machine->pens[ pal[(pattern>>6)&1] ] ); |
| 222 | | electron_plot_pixel( bitmap, x++, scanline, screen->machine->pens[ pal[(pattern>>5)&1] ] ); |
| 223 | | electron_plot_pixel( bitmap, x++, scanline, screen->machine->pens[ pal[(pattern>>5)&1] ] ); |
| 224 | | electron_plot_pixel( bitmap, x++, scanline, screen->machine->pens[ pal[(pattern>>4)&1] ] ); |
| 225 | | electron_plot_pixel( bitmap, x++, scanline, screen->machine->pens[ pal[(pattern>>4)&1] ] ); |
| 226 | | electron_plot_pixel( bitmap, x++, scanline, screen->machine->pens[ pal[(pattern>>3)&1] ] ); |
| 227 | | electron_plot_pixel( bitmap, x++, scanline, screen->machine->pens[ pal[(pattern>>3)&1] ] ); |
| 228 | | electron_plot_pixel( bitmap, x++, scanline, screen->machine->pens[ pal[(pattern>>2)&1] ] ); |
| 229 | | electron_plot_pixel( bitmap, x++, scanline, screen->machine->pens[ pal[(pattern>>2)&1] ] ); |
| 230 | | electron_plot_pixel( bitmap, x++, scanline, screen->machine->pens[ pal[(pattern>>1)&1] ] ); |
| 231 | | electron_plot_pixel( bitmap, x++, scanline, screen->machine->pens[ pal[(pattern>>1)&1] ] ); |
| 232 | | electron_plot_pixel( bitmap, x++, scanline, screen->machine->pens[ pal[(pattern>>0)&1] ] ); |
| 233 | | electron_plot_pixel( bitmap, x++, scanline, screen->machine->pens[ pal[(pattern>>0)&1] ] ); |
| 218 | electron_plot_pixel( bitmap, x++, scanline, pal[(pattern>>7)&1] ); |
| 219 | electron_plot_pixel( bitmap, x++, scanline, pal[(pattern>>7)&1] ); |
| 220 | electron_plot_pixel( bitmap, x++, scanline, pal[(pattern>>6)&1] ); |
| 221 | electron_plot_pixel( bitmap, x++, scanline, pal[(pattern>>6)&1] ); |
| 222 | electron_plot_pixel( bitmap, x++, scanline, pal[(pattern>>5)&1] ); |
| 223 | electron_plot_pixel( bitmap, x++, scanline, pal[(pattern>>5)&1] ); |
| 224 | electron_plot_pixel( bitmap, x++, scanline, pal[(pattern>>4)&1] ); |
| 225 | electron_plot_pixel( bitmap, x++, scanline, pal[(pattern>>4)&1] ); |
| 226 | electron_plot_pixel( bitmap, x++, scanline, pal[(pattern>>3)&1] ); |
| 227 | electron_plot_pixel( bitmap, x++, scanline, pal[(pattern>>3)&1] ); |
| 228 | electron_plot_pixel( bitmap, x++, scanline, pal[(pattern>>2)&1] ); |
| 229 | electron_plot_pixel( bitmap, x++, scanline, pal[(pattern>>2)&1] ); |
| 230 | electron_plot_pixel( bitmap, x++, scanline, pal[(pattern>>1)&1] ); |
| 231 | electron_plot_pixel( bitmap, x++, scanline, pal[(pattern>>1)&1] ); |
| 232 | electron_plot_pixel( bitmap, x++, scanline, pal[(pattern>>0)&1] ); |
| 233 | electron_plot_pixel( bitmap, x++, scanline, pal[(pattern>>0)&1] ); |
| 234 | 234 | } |
| 235 | 235 | ula.screen_addr += 1; |
| 236 | 236 | if ( ( scanline % 10 ) == 7 ) { |