src/mess/drivers/pc6001.c
| r8726 | r8727 | |
| 17 | 17 | so this implementation will be used in the end. |
| 18 | 18 | B) It's easier to me to see what the attribute vram does since I don't |
| 19 | 19 | have any docs atm. |
| 20 | | - PC6001Mk2: crashes if you attempt to load the UI in debug mode (like putting partial keyboard |
| 21 | | emulation), dunno the reason |
| 20 | TODO (pc6001mk2 specific) |
| 21 | - vram banking model isn't yet 100% understood; |
| 22 | - extra gfx modes aren't handled yet; |
| 22 | 23 | |
| 23 | 24 | TODO (game specific): |
| 24 | 25 | - Arm Wrestling (PD): returns an "?OM Error" during loading, it seems to be a N66 |
| r8726 | r8727 | |
| 645 | 646 | |
| 646 | 647 | static WRITE8_HANDLER ( pc6001m2_system_latch_w ) |
| 647 | 648 | { |
| 648 | | UINT8 *work_ram = memory_region(space->machine, "maincpu"); |
| 649 | // UINT8 *work_ram = memory_region(space->machine, "maincpu"); |
| 649 | 650 | |
| 650 | | UINT32 startaddr[] = {WRAM(6), WRAM(6), WRAM(0), WRAM(5) }; //TODO: check me |
| 651 | // UINT32 startaddr[] = {WRAM(6), WRAM(6), WRAM(0), WRAM(5) }; //TODO: check me |
| 651 | 652 | |
| 652 | | pc6001_video_ram = work_ram + startaddr[(data >> 1) & 0x03]; |
| 653 | // pc6001_video_ram = work_ram + startaddr[(data >> 1) & 0x03]; |
| 653 | 654 | |
| 654 | | printf("%08x\n",startaddr[(data >> 1) & 0x03]); |
| 655 | // printf("%08x\n",startaddr[(data >> 1) & 0x03]); |
| 655 | 656 | |
| 656 | 657 | if((!(sys_latch & 8)) && data & 0x8) //PLAY tape cmd |
| 657 | 658 | { |
| r8726 | r8727 | |
| 669 | 670 | } |
| 670 | 671 | |
| 671 | 672 | sys_latch = data; |
| 672 | | printf("%02x\n",data); |
| 673 | // printf("%02x B0\n",data); |
| 673 | 674 | } |
| 674 | 675 | |
| 676 | |
| 677 | static WRITE8_HANDLER( pc6001m2_vram_bank_w ) |
| 678 | { |
| 679 | UINT8 *work_ram = memory_region(space->machine, "maincpu"); |
| 680 | |
| 681 | UINT32 startaddr[] = {WRAM(6), WRAM(6), WRAM(0), WRAM(4) }; |
| 682 | |
| 683 | pc6001_video_ram = work_ram + startaddr[(data >> 1) & 0x03]; |
| 684 | |
| 685 | printf("%08x\n",startaddr[(data >> 1) & 0x03]); |
| 686 | |
| 687 | printf("%02x c1\n",data); |
| 688 | } |
| 689 | |
| 675 | 690 | static ADDRESS_MAP_START(pc6001m2_map, ADDRESS_SPACE_PROGRAM, 8) |
| 676 | 691 | ADDRESS_MAP_UNMAP_HIGH |
| 677 | 692 | AM_RANGE(0x0000, 0x1fff) AM_ROMBANK("bank1") AM_WRITE(work_ram0_w) |
| r8726 | r8727 | |
| 695 | 710 | AM_RANGE(0xa1, 0xa1) AM_DEVWRITE("ay8910", ay8910_data_w) |
| 696 | 711 | AM_RANGE(0xa2, 0xa2) AM_DEVREAD("ay8910", ay8910_r) |
| 697 | 712 | AM_RANGE(0xb0, 0xb0) AM_WRITE(pc6001m2_system_latch_w) |
| 713 | AM_RANGE(0xc1, 0xc1) AM_WRITE(pc6001m2_vram_bank_w) |
| 698 | 714 | AM_RANGE(0xf0, 0xf0) AM_WRITE(pc6001m2_bank_r0_w) |
| 699 | 715 | AM_RANGE(0xf1, 0xf1) AM_WRITE(pc6001m2_bank_r1_w) |
| 700 | 716 | //0xf2 w bank |