trunk/src/mame/machine/amiga.c
| r30693 | r30694 | |
| 310 | 310 | |
| 311 | 311 | void amiga_state::vblank() |
| 312 | 312 | { |
| 313 | | // signal vblank irq |
| 314 | | set_interrupt(INTENA_SETCLR | INTENA_VERTB); |
| 315 | | |
| 316 | | // clock cia a (todo: this can be connected to either a fixed 50/60hz signal from the power supply, or the vblank) |
| 317 | | m_cia_0->tod_w(1); |
| 318 | | m_cia_0->tod_w(0); |
| 319 | 313 | } |
| 320 | 314 | |
| 315 | // todo: cia a clock can be connected to either a fixed 50/60hz signal from the power supply, or the vblank |
| 321 | 316 | TIMER_CALLBACK_MEMBER( amiga_state::scanline_callback ) |
| 322 | 317 | { |
| 318 | amiga_state *state = this; |
| 323 | 319 | int scanline = param; |
| 324 | 320 | |
| 325 | | // on the first scanline, we do some extra bookkeeping |
| 321 | // vblank start |
| 326 | 322 | if (scanline == 0) |
| 323 | { |
| 324 | // signal vblank irq |
| 325 | set_interrupt(INTENA_SETCLR | INTENA_VERTB); |
| 326 | |
| 327 | // clock tod |
| 328 | m_cia_0->tod_w(1); |
| 329 | |
| 330 | // additional bookkeeping by drivers |
| 327 | 331 | vblank(); |
| 332 | } |
| 328 | 333 | |
| 329 | | // on every scanline, clock the second cia tod |
| 330 | | m_cia_1->tod_w(1); |
| 331 | | m_cia_1->tod_w(0); |
| 334 | // vblank end |
| 335 | if (scanline == m_screen->visible_area().min_y) |
| 336 | { |
| 337 | m_cia_0->tod_w(0); |
| 338 | } |
| 332 | 339 | |
| 333 | 340 | // render up to this scanline |
| 334 | 341 | if (!m_screen->update_partial(scanline)) |
| r30693 | r30694 | |
| 336 | 343 | if (IS_AGA(this)) |
| 337 | 344 | { |
| 338 | 345 | bitmap_rgb32 dummy_bitmap; |
| 339 | | amiga_aga_render_scanline(machine(), dummy_bitmap, scanline); |
| 346 | aga_render_scanline(dummy_bitmap, scanline); |
| 340 | 347 | } |
| 341 | 348 | else |
| 342 | 349 | { |
| r30693 | r30694 | |
| 345 | 352 | } |
| 346 | 353 | } |
| 347 | 354 | |
| 355 | // clock tod (if we actually render this scanline) |
| 356 | m_cia_1->tod_w((scanline & 1) ^ BIT(CUSTOM_REG(REG_VPOSR), 15)); |
| 357 | |
| 348 | 358 | // force a sound update |
| 349 | 359 | m_sound->update(); |
| 350 | 360 | |
| r30693 | r30694 | |
| 1523 | 1533 | data &= ~BPLCON0_BPU0; |
| 1524 | 1534 | } |
| 1525 | 1535 | CUSTOM_REG(offset) = data; |
| 1526 | | update_screenmode(); |
| 1527 | 1536 | break; |
| 1528 | 1537 | |
| 1529 | 1538 | case REG_COLOR00: case REG_COLOR01: case REG_COLOR02: case REG_COLOR03: |
trunk/src/mame/includes/amiga.h
| r30693 | r30694 | |
| 361 | 361 | m_centronics_perror(0), |
| 362 | 362 | m_centronics_select(0), |
| 363 | 363 | m_gayle_reset(false), |
| 364 | m_previous_lof(true), |
| 364 | 365 | m_rx_shift(0), |
| 365 | 366 | m_tx_shift(0), |
| 366 | 367 | m_rx_state(0), |
| r30693 | r30694 | |
| 417 | 418 | DECLARE_PALETTE_INIT( amiga ); |
| 418 | 419 | |
| 419 | 420 | void render_scanline(bitmap_ind16 &bitmap, int scanline); |
| 421 | void aga_render_scanline(bitmap_rgb32 &bitmap, int scanline); |
| 420 | 422 | UINT32 screen_update_amiga(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 421 | 423 | UINT32 screen_update_amiga_aga(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); |
| 422 | 424 | void update_screenmode(); |
| r30693 | r30694 | |
| 472 | 474 | enum |
| 473 | 475 | { |
| 474 | 476 | SCREEN_WIDTH = 910, |
| 475 | | SCREEN_HEIGHT_PAL = 312, |
| 476 | | SCREEN_HEIGHT_NTSC = 262, |
| 477 | | VBLANK_PAL = 29, // 26 |
| 478 | | VBLANK_NTSC = 21, |
| 477 | SCREEN_HEIGHT_PAL = 625, |
| 478 | SCREEN_HEIGHT_NTSC = 525, |
| 479 | VBLANK_PAL = 58, // 52 |
| 480 | VBLANK_NTSC = 42, |
| 479 | 481 | HBLANK = 186 |
| 480 | 482 | }; |
| 481 | 483 | |
| r30693 | r30694 | |
| 586 | 588 | |
| 587 | 589 | enum |
| 588 | 590 | { |
| 591 | VPOSR_LOF = 0x8000 // long frame |
| 592 | }; |
| 593 | |
| 594 | enum |
| 595 | { |
| 589 | 596 | ADKCON_UARTBRK = 0x800 // send break |
| 590 | 597 | }; |
| 591 | 598 | |
| r30693 | r30694 | |
| 613 | 620 | |
| 614 | 621 | bool m_gayle_reset; |
| 615 | 622 | |
| 623 | bool m_previous_lof; |
| 616 | 624 | bitmap_ind16 m_flickerfixer; |
| 625 | bitmap_ind32 m_flickerfixer32; |
| 617 | 626 | |
| 618 | 627 | UINT16 m_rx_shift; |
| 619 | 628 | UINT16 m_tx_shift; |
| r30693 | r30694 | |
| 640 | 649 | void amiga_chip_ram_w8(amiga_state *state, offs_t offset, UINT8 data); |
| 641 | 650 | |
| 642 | 651 | |
| 643 | | |
| 644 | 652 | /*----------- defined in video/amiga.c -----------*/ |
| 645 | 653 | |
| 646 | 654 | extern const UINT16 amiga_expand_byte[256]; |
| r30693 | r30694 | |
| 653 | 661 | void amiga_sprite_dma_reset(running_machine &machine, int which); |
| 654 | 662 | void amiga_sprite_enable_comparitor(running_machine &machine, int which, int enable); |
| 655 | 663 | |
| 664 | MACHINE_CONFIG_EXTERN( pal_video ); |
| 665 | MACHINE_CONFIG_EXTERN( ntsc_video ); |
| 666 | |
| 656 | 667 | /*----------- defined in video/amigaaga.c -----------*/ |
| 657 | 668 | |
| 658 | | void amiga_aga_render_scanline(running_machine &machine, bitmap_rgb32 &bitmap, int scanline); |
| 659 | 669 | void amiga_aga_palette_write(running_machine &machine, int color_reg, UINT16 data); |
| 660 | 670 | void amiga_aga_diwhigh_written(running_machine &machine, int written); |
| 661 | | MACHINE_CONFIG_EXTERN( pal_video ); |
| 662 | | MACHINE_CONFIG_EXTERN( ntsc_video ); |
| 663 | 671 | |
| 664 | 672 | #endif /* __AMIGA_H__ */ |
trunk/src/mame/video/amiga.c
| r30693 | r30694 | |
| 626 | 626 | UINT16 save_color0 = CUSTOM_REG(REG_COLOR00); |
| 627 | 627 | int ddf_start_pixel = 0, ddf_stop_pixel = 0; |
| 628 | 628 | int hires = 0, dualpf = 0, ham = 0; |
| 629 | | bool lace = CUSTOM_REG(REG_BPLCON0) & BPLCON0_LACE; |
| 630 | 629 | int hstart = 0, hstop = 0; |
| 631 | 630 | int vstart = 0, vstop = 0; |
| 632 | 631 | int pf1pri = 0, pf2pri = 0; |
| 633 | 632 | int planes = 0; |
| 634 | 633 | |
| 635 | | int x; |
| 636 | 634 | UINT16 *dst = NULL; |
| 637 | 635 | int ebitoffs = 0, obitoffs = 0; |
| 638 | 636 | int ecolmask = 0, ocolmask = 0; |
| r30693 | r30694 | |
| 646 | 644 | // we need to do a bit more work on the first scanline |
| 647 | 645 | if (scanline == 0) |
| 648 | 646 | { |
| 649 | | // toggle lof if interlaced |
| 650 | | if (lace) |
| 651 | | CUSTOM_REG(REG_VPOSR) ^= 0x8000; |
| 647 | m_previous_lof = CUSTOM_REG(REG_VPOSR) & VPOSR_LOF; |
| 652 | 648 | |
| 649 | // toggle lof if enabled |
| 650 | if (CUSTOM_REG(REG_BPLCON0) & BPLCON0_LACE) |
| 651 | CUSTOM_REG(REG_VPOSR) ^= VPOSR_LOF; |
| 652 | |
| 653 | 653 | // reset copper and ham color |
| 654 | 654 | amiga_copper_setpc(machine(), CUSTOM_REG_LONG(REG_COP1LCH)); |
| 655 | 655 | m_ham_color = CUSTOM_REG(REG_COLOR00); |
| r30693 | r30694 | |
| 658 | 658 | // in visible area? |
| 659 | 659 | if (bitmap.valid()) |
| 660 | 660 | { |
| 661 | | // if interlace is enabled and this is not our turn to draw, copy the previous scanline |
| 662 | | if (lace && ((scanline & 1) ^ BIT(CUSTOM_REG(REG_VPOSR), 15)) == 0) |
| 661 | bool lof = CUSTOM_REG(REG_VPOSR) & VPOSR_LOF; |
| 662 | |
| 663 | if ((scanline & 1) ^ lof) |
| 663 | 664 | { |
| 664 | | memcpy(&bitmap.pix16(scanline), &m_flickerfixer.pix16(scanline), amiga_state::SCREEN_WIDTH * 2); |
| 665 | | return; |
| 665 | // lof matches? then render this scanline |
| 666 | dst = &bitmap.pix16(scanline); |
| 666 | 667 | } |
| 667 | 668 | else |
| 668 | | dst = &bitmap.pix16(scanline); |
| 669 | { |
| 670 | // lof doesn't match, we don't render this scanline |
| 671 | // if we didn't switch lof we have a full non-interlace screen, |
| 672 | // so we fill the black gaps with the contents of the previous scanline |
| 673 | // otherwise just render the contents of the previous frame's scanline |
| 674 | int shift = (m_previous_lof == lof) ? 1 : 0; |
| 675 | |
| 676 | memcpy(&bitmap.pix16(scanline), &m_flickerfixer.pix16(scanline - shift), amiga_state::SCREEN_WIDTH * 2); |
| 677 | return; |
| 678 | } |
| 669 | 679 | } |
| 670 | 680 | |
| 671 | | if (lace) |
| 672 | | scanline /= 2; |
| 681 | scanline /= 2; |
| 673 | 682 | |
| 674 | 683 | m_last_scanline = scanline; |
| 675 | 684 | |
| r30693 | r30694 | |
| 685 | 694 | |
| 686 | 695 | /* loop over the line */ |
| 687 | 696 | next_copper_x = 0; |
| 688 | | for (x = 0; x < amiga_state::SCREEN_WIDTH / 2; x++) |
| 697 | for (int x = 0; x < amiga_state::SCREEN_WIDTH / 2; x++) |
| 689 | 698 | { |
| 690 | 699 | int sprpix; |
| 691 | 700 | |
| r30693 | r30694 | |
| 987 | 996 | #if GUESS_COPPER_OFFSET |
| 988 | 997 | if (m_screen->frame_number() % 64 == 0 && scanline == 0) |
| 989 | 998 | { |
| 990 | | if (machine.input().code_pressed(KEYCODE_Q)) |
| 999 | if (machine().input().code_pressed(KEYCODE_Q)) |
| 991 | 1000 | popmessage("%d", m_wait_offset -= 1); |
| 992 | | if (machine.input().code_pressed(KEYCODE_W)) |
| 1001 | if (machine().input().code_pressed(KEYCODE_W)) |
| 993 | 1002 | popmessage("%d", m_wait_offset += 1); |
| 994 | 1003 | } |
| 995 | 1004 | #endif |
| r30693 | r30694 | |
| 1038 | 1047 | // frame period |
| 1039 | 1048 | attoseconds_t period = HZ_TO_ATTOSECONDS(m_screen->clock()) * SCREEN_WIDTH * height; |
| 1040 | 1049 | |
| 1041 | | // interlace mode? |
| 1042 | | bool lace = CUSTOM_REG(REG_BPLCON0) & BPLCON0_LACE; |
| 1043 | | |
| 1044 | | if (lace) |
| 1045 | | { |
| 1046 | | // this doubles our vertical resolution |
| 1047 | | height *= 2; |
| 1048 | | height++; |
| 1049 | | vblank *= 2; |
| 1050 | | } |
| 1051 | | |
| 1052 | 1050 | // adjust visible area |
| 1053 | 1051 | rectangle visarea = m_screen->visible_area(); |
| 1054 | 1052 | visarea.sety(vblank, height - 1); |
| 1055 | 1053 | |
| 1056 | | #if 0 |
| 1057 | | logerror("screenmode changed: %dx%d%s\n", SCREEN_WIDTH, height, lace ? " (interlace)" : ""); |
| 1058 | | #endif |
| 1059 | | |
| 1060 | 1054 | // finally set our new mode |
| 1061 | 1055 | m_screen->configure(SCREEN_WIDTH, height, visarea, period); |
| 1062 | 1056 | } |
| r30693 | r30694 | |
| 1070 | 1064 | MCFG_SCREEN_ADD("screen", RASTER) |
| 1071 | 1065 | MCFG_SCREEN_RAW_PARAMS |
| 1072 | 1066 | ( |
| 1073 | | amiga_state::CLK_28M_PAL / 4 * 2, |
| 1067 | (amiga_state::CLK_28M_PAL / 4) * 2 * 2, |
| 1074 | 1068 | amiga_state::SCREEN_WIDTH, amiga_state::HBLANK, amiga_state::SCREEN_WIDTH, |
| 1075 | 1069 | amiga_state::SCREEN_HEIGHT_PAL, amiga_state::VBLANK_PAL, amiga_state::SCREEN_HEIGHT_PAL |
| 1076 | 1070 | ) |
| r30693 | r30694 | |
| 1082 | 1076 | MCFG_SCREEN_ADD("screen", RASTER) |
| 1083 | 1077 | MCFG_SCREEN_RAW_PARAMS |
| 1084 | 1078 | ( |
| 1085 | | amiga_state::CLK_28M_NTSC / 4 * 2, |
| 1079 | (amiga_state::CLK_28M_NTSC / 4) * 2 * 2, |
| 1086 | 1080 | amiga_state::SCREEN_WIDTH, amiga_state::HBLANK, amiga_state::SCREEN_WIDTH, |
| 1087 | 1081 | amiga_state::SCREEN_HEIGHT_NTSC, amiga_state::VBLANK_NTSC, amiga_state::SCREEN_HEIGHT_NTSC |
| 1088 | 1082 | ) |
trunk/src/mame/video/amigaaga.c
| r30693 | r30694 | |
| 76 | 76 | VIDEO_START_CALL_MEMBER( amiga ); |
| 77 | 77 | |
| 78 | 78 | m_aga_diwhigh_written = 0; |
| 79 | m_screen->register_screen_bitmap(m_flickerfixer32); |
| 79 | 80 | } |
| 80 | 81 | |
| 81 | 82 | |
| r30693 | r30694 | |
| 442 | 443 | * |
| 443 | 444 | *************************************/ |
| 444 | 445 | |
| 445 | | void amiga_aga_render_scanline(running_machine &machine, bitmap_rgb32 &bitmap, int scanline) |
| 446 | void amiga_state::aga_render_scanline(bitmap_rgb32 &bitmap, int scanline) |
| 446 | 447 | { |
| 447 | | amiga_state *state = machine.driver_data<amiga_state>(); |
| 448 | amiga_state *state = this; |
| 448 | 449 | UINT16 save_color0 = CUSTOM_REG(REG_COLOR00); |
| 449 | 450 | int ddf_start_pixel = 0, ddf_stop_pixel = 0; |
| 450 | 451 | int hires = 0, dualpf = 0, ham = 0; |
| r30693 | r30694 | |
| 453 | 454 | int pf1pri = 0, pf2pri = 0; |
| 454 | 455 | int planes = 0; |
| 455 | 456 | |
| 456 | | int x; |
| 457 | 457 | UINT32 *dst = NULL; |
| 458 | 458 | int ebitoffs = 0, obitoffs = 0; |
| 459 | 459 | int ecolmask = 0, ocolmask = 0; |
| r30693 | r30694 | |
| 461 | 461 | int next_copper_x; |
| 462 | 462 | int pl; |
| 463 | 463 | int defbitoffs = 0; |
| 464 | | rgb_t *aga_palette = state->m_aga_palette; |
| 464 | rgb_t *aga_palette = m_aga_palette; |
| 465 | 465 | |
| 466 | | state->m_last_scanline = scanline; |
| 466 | int save_scanline = scanline; |
| 467 | 467 | |
| 468 | 468 | /* on the first scanline, reset the COPPER and HAM color */ |
| 469 | 469 | if (scanline == 0) |
| 470 | 470 | { |
| 471 | | amiga_copper_setpc(machine, CUSTOM_REG_LONG(REG_COP1LCH)); |
| 472 | | state->m_ham_color = CUSTOM_REG(REG_COLOR00); |
| 471 | m_previous_lof = CUSTOM_REG(REG_VPOSR) & VPOSR_LOF; |
| 472 | |
| 473 | // toggle lof if enabled |
| 474 | if (CUSTOM_REG(REG_BPLCON0) & BPLCON0_LACE) |
| 475 | CUSTOM_REG(REG_VPOSR) ^= VPOSR_LOF; |
| 476 | |
| 477 | amiga_copper_setpc(machine(), CUSTOM_REG_LONG(REG_COP1LCH)); |
| 478 | m_ham_color = CUSTOM_REG(REG_COLOR00); |
| 473 | 479 | } |
| 474 | 480 | |
| 481 | // in visible area? |
| 482 | if (bitmap.valid()) |
| 483 | { |
| 484 | bool lof = CUSTOM_REG(REG_VPOSR) & VPOSR_LOF; |
| 485 | |
| 486 | if ((scanline & 1) ^ lof) |
| 487 | { |
| 488 | // lof matches? then render this scanline |
| 489 | dst = &bitmap.pix32(scanline); |
| 490 | } |
| 491 | else |
| 492 | { |
| 493 | // lof doesn't match, we don't render this scanline |
| 494 | // if we didn't switch lof we have a full non-interlace screen, |
| 495 | // so we fill the black gaps with the contents of the previous scanline |
| 496 | // otherwise just render the contents of the previous frame's scanline |
| 497 | int shift = (m_previous_lof == lof) ? 1 : 0; |
| 498 | |
| 499 | memcpy(&bitmap.pix32(scanline), &m_flickerfixer32.pix32(scanline - shift), amiga_state::SCREEN_WIDTH * 4); |
| 500 | return; |
| 501 | } |
| 502 | } |
| 503 | |
| 504 | scanline /= 2; |
| 505 | |
| 506 | m_last_scanline = scanline; |
| 507 | |
| 475 | 508 | /* update sprite data fetching */ |
| 476 | 509 | update_sprite_dma(state, scanline); |
| 477 | 510 | |
| 478 | | /* start of a new line, signal we're not done with it and fill up vars */ |
| 479 | | if (bitmap.valid()) |
| 480 | | dst = &bitmap.pix32(scanline); |
| 481 | | |
| 482 | 511 | /* all sprites off at the start of the line */ |
| 483 | | memset(state->m_sprite_remain, 0, sizeof(state->m_sprite_remain)); |
| 512 | memset(m_sprite_remain, 0, sizeof(m_sprite_remain)); |
| 484 | 513 | |
| 485 | 514 | /* temporary set color 0 to the genlock color */ |
| 486 | | if (state->m_genlock_color != 0xffff) |
| 487 | | CUSTOM_REG(REG_COLOR00) = state->m_genlock_color; |
| 515 | if (m_genlock_color != 0xffff) |
| 516 | CUSTOM_REG(REG_COLOR00) = m_genlock_color; |
| 488 | 517 | |
| 489 | 518 | /* loop over the line */ |
| 490 | 519 | next_copper_x = 2; /* copper runs on odd timeslots */ |
| 491 | | for (x = 0; x < 0xe8*2; x++) |
| 520 | for (int x = 0; x < amiga_state::SCREEN_WIDTH / 2; x++) |
| 492 | 521 | { |
| 493 | 522 | int sprpix; |
| 494 | 523 | |
| r30693 | r30694 | |
| 497 | 526 | { |
| 498 | 527 | /* execute the next batch, restoring and re-saving color 0 around it */ |
| 499 | 528 | CUSTOM_REG(REG_COLOR00) = save_color0; |
| 500 | | next_copper_x = amiga_copper_execute_next(machine, x); |
| 529 | next_copper_x = amiga_copper_execute_next(machine(), x); |
| 501 | 530 | save_color0 = CUSTOM_REG(REG_COLOR00); |
| 502 | | if (state->m_genlock_color != 0xffff) |
| 503 | | CUSTOM_REG(REG_COLOR00) = state->m_genlock_color; |
| 531 | if (m_genlock_color != 0xffff) |
| 532 | CUSTOM_REG(REG_COLOR00) = m_genlock_color; |
| 504 | 533 | |
| 505 | 534 | /* compute update-related register values */ |
| 506 | 535 | planes = (CUSTOM_REG(REG_BPLCON0) & (BPLCON0_BPU0 | BPLCON0_BPU1 | BPLCON0_BPU2)) >> 12; |
| r30693 | r30694 | |
| 532 | 561 | hstart = CUSTOM_REG(REG_DIWSTRT) & 0xff; |
| 533 | 562 | hstop = (CUSTOM_REG(REG_DIWSTOP) & 0xff); |
| 534 | 563 | |
| 535 | | if (state->m_aga_diwhigh_written) |
| 564 | if (m_aga_diwhigh_written) |
| 536 | 565 | { |
| 537 | 566 | hstart |= ((CUSTOM_REG(REG_DIWHIGH) >> 5) & 1) << 8; |
| 538 | 567 | hstop |= ((CUSTOM_REG(REG_DIWHIGH) >> 13) & 1) << 8; |
| r30693 | r30694 | |
| 550 | 579 | /* compute the vertical start/stop */ |
| 551 | 580 | vstart = CUSTOM_REG(REG_DIWSTRT) >> 8; |
| 552 | 581 | vstop = (CUSTOM_REG(REG_DIWSTOP) >> 8); |
| 553 | | if (state->m_aga_diwhigh_written) |
| 582 | if (m_aga_diwhigh_written) |
| 554 | 583 | { |
| 555 | 584 | vstart |= (CUSTOM_REG(REG_DIWHIGH) & 7) << 8; |
| 556 | 585 | vstop |= ((CUSTOM_REG(REG_DIWHIGH) >> 8) & 7) << 8; |
| r30693 | r30694 | |
| 598 | 627 | } |
| 599 | 628 | |
| 600 | 629 | for (pl = 0; pl < 8; pl++) |
| 601 | | state->m_aga_bpldat[pl] = 0; |
| 630 | m_aga_bpldat[pl] = 0; |
| 602 | 631 | } |
| 603 | 632 | |
| 604 | 633 | /* need to run the sprite engine every pixel to ensure display */ |
| r30693 | r30694 | |
| 758 | 787 | if (pix) |
| 759 | 788 | dst[x*2+0] = aga_palette[pix]; |
| 760 | 789 | else |
| 761 | | dst[x*2+0] = aga_palette[state->m_separate_bitplanes[(CUSTOM_REG(REG_BPLCON2) >> 6) & 1][pfpix0]]; |
| 790 | dst[x*2+0] = aga_palette[m_separate_bitplanes[(CUSTOM_REG(REG_BPLCON2) >> 6) & 1][pfpix0]]; |
| 762 | 791 | |
| 763 | 792 | /* mask out the sprite if it doesn't have priority */ |
| 764 | 793 | pix = sprpix & 0xff; |
| r30693 | r30694 | |
| 774 | 803 | if (pix) |
| 775 | 804 | dst[x*2+1] = aga_palette[pix]; |
| 776 | 805 | else |
| 777 | | dst[x*2+1] = aga_palette[state->m_separate_bitplanes[(CUSTOM_REG(REG_BPLCON2) >> 6) & 1][pfpix1]]; |
| 806 | dst[x*2+1] = aga_palette[m_separate_bitplanes[(CUSTOM_REG(REG_BPLCON2) >> 6) & 1][pfpix1]]; |
| 778 | 807 | } |
| 779 | 808 | |
| 780 | 809 | /* single playfield mode */ |
| r30693 | r30694 | |
| 839 | 868 | /* restore color00 */ |
| 840 | 869 | CUSTOM_REG(REG_COLOR00) = save_color0; |
| 841 | 870 | |
| 871 | // save |
| 872 | if (dst != NULL) |
| 873 | memcpy(&m_flickerfixer32.pix32(save_scanline), dst, amiga_state::SCREEN_WIDTH * 4); |
| 874 | |
| 842 | 875 | #if GUESS_COPPER_OFFSET |
| 843 | 876 | if (m_screen->frame_number() % 64 == 0 && scanline == 0) |
| 844 | 877 | { |
| r30693 | r30694 | |
| 860 | 893 | |
| 861 | 894 | UINT32 amiga_state::screen_update_amiga_aga(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
| 862 | 895 | { |
| 863 | | int y; |
| 896 | if (cliprect.min_y != cliprect.max_y) |
| 897 | return 0; |
| 864 | 898 | |
| 865 | | /* render each scanline in the visible region */ |
| 866 | | for (y = cliprect.min_y; y <= cliprect.max_y; y++) |
| 867 | | amiga_aga_render_scanline(machine(), bitmap, y); |
| 899 | // render each scanline in the visible region |
| 900 | for (int y = cliprect.min_y; y <= cliprect.max_y; y++) |
| 901 | aga_render_scanline(bitmap, y); |
| 868 | 902 | |
| 869 | 903 | return 0; |
| 870 | 904 | } |