src/mess/drivers/x1.c
| r5565 | r5566 | |
| 567 | 567 | * |
| 568 | 568 | *************************************/ |
| 569 | 569 | |
| 570 | | /* TODO: apparently this is for the alternative PCG mode */ |
| 571 | | #if 0 |
| 572 | 570 | static UINT16 check_pcg_addr(running_machine *machine) |
| 573 | 571 | { |
| 574 | 572 | if(colorram[0x7ff] & 0x20) return 0x7ff; |
| r5565 | r5566 | |
| 578 | 576 | |
| 579 | 577 | return 0x3ff; |
| 580 | 578 | } |
| 581 | | #endif |
| 582 | 579 | |
| 583 | 580 | static READ8_HANDLER( x1_pcg_r ) |
| 584 | 581 | { |
| r5565 | r5566 | |
| 628 | 625 | } |
| 629 | 626 | else |
| 630 | 627 | { |
| 631 | | // if(!ply_reg.pcg_mode) |
| 632 | | // { |
| 633 | | // |
| 634 | | // } |
| 635 | | // else |
| 628 | if(scrn_reg.pcg_mode) |
| 636 | 629 | { |
| 630 | used_pcg_addr = videoram[check_pcg_addr(space->machine)]*8; |
| 631 | pcg_index[addr-1] = (offset & 0xe) >> 1; |
| 632 | pcg_offset = (pcg_index[addr-1]+used_pcg_addr) & 0x7ff; |
| 633 | pcg_offset+=((addr-1)*0x800); |
| 634 | PCG_RAM[pcg_offset] = data; |
| 635 | |
| 636 | pcg_offset &= 0x7ff; |
| 637 | |
| 638 | gfx_element_mark_dirty(space->machine->gfx[4], pcg_offset >> 3); |
| 639 | gfx_element_mark_dirty(space->machine->gfx[5], pcg_offset >> 3); |
| 640 | gfx_element_mark_dirty(space->machine->gfx[6], pcg_offset >> 3); |
| 641 | gfx_element_mark_dirty(space->machine->gfx[7], pcg_offset >> 3); |
| 642 | |
| 643 | } |
| 644 | else |
| 645 | { |
| 637 | 646 | used_pcg_addr = pcg_write_addr*8; |
| 638 | 647 | pcg_offset = (pcg_index[addr-1]+used_pcg_addr) & 0x7ff; |
| 639 | 648 | pcg_offset+=((addr-1)*0x800); |