Previous 15994 Revisions Next

r8727 Saturday 7th August, 2010 at 10:25:34 UTC by Angelo Salese
[PC6001mk2]: Improved vram banking
[src/mess/drivers]pc6001.c

src/mess/drivers/pc6001.c
r8726r8727
1717           so this implementation will be used in the end.
1818        B) It's easier to me to see what the attribute vram does since I don't
1919           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;
2223
2324   TODO (game specific):
2425   - Arm Wrestling (PD): returns an "?OM Error" during loading, it seems to be a N66
r8726r8727
645646
646647static WRITE8_HANDLER ( pc6001m2_system_latch_w )
647648{
648   UINT8 *work_ram = memory_region(space->machine, "maincpu");
649//   UINT8 *work_ram = memory_region(space->machine, "maincpu");
649650
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
651652
652   pc6001_video_ram = work_ram + startaddr[(data >> 1) & 0x03];
653//   pc6001_video_ram = work_ram + startaddr[(data >> 1) & 0x03];
653654
654   printf("%08x\n",startaddr[(data >> 1) & 0x03]);
655//   printf("%08x\n",startaddr[(data >> 1) & 0x03]);
655656
656657   if((!(sys_latch & 8)) && data & 0x8) //PLAY tape cmd
657658   {
r8726r8727
669670   }
670671
671672   sys_latch = data;
672   printf("%02x\n",data);
673//   printf("%02x B0\n",data);
673674}
674675
676
677static 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
675690static ADDRESS_MAP_START(pc6001m2_map, ADDRESS_SPACE_PROGRAM, 8)
676691   ADDRESS_MAP_UNMAP_HIGH
677692   AM_RANGE(0x0000, 0x1fff) AM_ROMBANK("bank1") AM_WRITE(work_ram0_w)
r8726r8727
695710   AM_RANGE(0xa1, 0xa1) AM_DEVWRITE("ay8910", ay8910_data_w)
696711   AM_RANGE(0xa2, 0xa2) AM_DEVREAD("ay8910", ay8910_r)
697712   AM_RANGE(0xb0, 0xb0) AM_WRITE(pc6001m2_system_latch_w)
713   AM_RANGE(0xc1, 0xc1) AM_WRITE(pc6001m2_vram_bank_w)
698714   AM_RANGE(0xf0, 0xf0) AM_WRITE(pc6001m2_bank_r0_w)
699715   AM_RANGE(0xf1, 0xf1) AM_WRITE(pc6001m2_bank_r1_w)
700716   //0xf2 w bank

Previous 15994 Revisions Next


© 1998-2018 The MESS Team