Previous 15994 Revisions Next

r8302 Monday 21st June, 2010 at 16:39:00 UTC by Angelo Salese
[PC98] Various kludges to let the bios test the extended memory
[src/mess/drivers]pc98.c

src/mess/drivers/pc98.c
r8301r8302
1313    - run a first time without doing anything;
1414    - call the debugger then soft reset (the debugger will be called after the reset because the CPU is into an halt state);
1515    - wpiset 35,1,r -> do eip=90 -> bpset f926c -> do eip=128d -> run until HALT
16
1617    - soft reset -> wpiset 35,1,r -> do eip=90 again -> run until HALT
1718    - soft reset -> modify I/O $43d with a 0x02 (should bankswitch with the basic ROM) -> run
1819    - modify memory 0x53c from 0xc4 to 0x84 two times
r8301r8302
316317   if(cpu_get_pc(space->cpu) == 0xf9088)
317318      return 0x18; //FIXME: kludge to get over a probable PPI bug.
318319
320   if(cpu_get_pc(space->cpu) == 0xf90b2)
321      return 0x38;
322
323   if(cpu_get_pc(space->cpu) == 0xf90e9)
324      return 0x38;
325
326   if(cpu_get_pc(space->cpu) == 0xf9233)
327      return 0x38;
328
319329   if(offset & 1)
320330      return i8255a_r(devtag_get_device(space->machine, "ppi8255_0"), (offset & 6) >> 1);
321331
r8301r8302
565575
566576static READ8_HANDLER( pc98_mouse_r )
567577{
578   if(offset == 5)
579      return 0xfb;
580
568581   //TODO: 0x7fd8 bit 6 controls testing of bank 3 (0x80000-0x9ffff), afaik the mouse ppi is at odd addresses...
569582   return 0xff;
570583}
r8301r8302
587600   AM_RANGE(0x000a8000, 0x000bffff) AM_READWRITE(gfx_bitmap_ram_r,gfx_bitmap_ram_w)
588601   AM_RANGE(0x000c0000, 0x000dffff) AM_READWRITE(wram_ide_r,wram_ide_w)
589602   AM_RANGE(0x000e0000, 0x000fffff) AM_ROMBANK("bank1") AM_WRITE8(rom_bank_w,0xffffffff)
603   AM_RANGE(0x00100000, 0x007fffff) AM_RAM //extended memory, 7168 KB for now
604   AM_RANGE(0x00800000, 0x00ffffff) AM_NOP
605
590606   AM_RANGE(0xfffe0000, 0xffffffff) AM_ROMBANK("bank1") AM_WRITE8(rom_bank_w,0xffffffff)
591607ADDRESS_MAP_END
592608
r8301r8302
10331049   ROM_LOAD( "font.rom", 0x00000, 0x46800, BAD_DUMP CRC(a61c0649) SHA1(554b87377d176830d21bd03964dc71f8e98676b1) )
10341050ROM_END
10351051
1052static DRIVER_INIT( pc9801 )
1053{
1054   UINT8 *ROM = memory_region(machine, "cpudata");
10361055
1056   /* patch unimplemented opcodes verr / verw */
1057   ROM[0xf90be & 0x3ffff] = 0x90;
1058   ROM[0xf90bf & 0x3ffff] = 0x90;
1059   ROM[0xf90c0 & 0x3ffff] = 0x90;
1060
1061   ROM[0xf90c3 & 0x3ffff] = 0x90;
1062   ROM[0xf90c4 & 0x3ffff] = 0x90;
1063   ROM[0xf90c5 & 0x3ffff] = 0x90;
1064
1065   ROM[0xf90d8 & 0x3ffff] = 0x90;
1066   ROM[0xf90d9 & 0x3ffff] = 0x90;
1067   ROM[0xf90da & 0x3ffff] = 0x90;
1068
1069   ROM[0xf90dd & 0x3ffff] = 0x90;
1070   ROM[0xf90de & 0x3ffff] = 0x90;
1071   ROM[0xf90df & 0x3ffff] = 0x90;
1072
1073   /* patch verr / verw checks */
1074   ROM[0xf90c1 & 0x3ffff] = 0x90;
1075   ROM[0xf90c2 & 0x3ffff] = 0x90;
1076
1077   ROM[0xf90c6 & 0x3ffff] = 0x90;
1078   ROM[0xf90c7 & 0x3ffff] = 0x90;
1079
1080   ROM[0xf90e0 & 0x3ffff] = 0x90;
1081   ROM[0xf90e1 & 0x3ffff] = 0x90;
1082
1083   /* patch lldt / sldt checks (it tests a word at 0xf8070, and it wants zeroes on bits 8-15). */
1084   ROM[0xf9103 & 0x3ffff] = 0x90;
1085   ROM[0xf9104 & 0x3ffff] = 0x90;
1086
1087   /* patch ltr / str checks (it tests a word at 0xf8060, and it wants zeroes on bits 8-15).  */
1088   ROM[0xf9118 & 0x3ffff] = 0x90;
1089   ROM[0xf9119 & 0x3ffff] = 0x90;
1090   ROM[0xf911a & 0x3ffff] = 0x90;
1091
1092   /* patch unimplemented lar opcode */
1093   ROM[0xf91f6 & 0x3ffff] = 0x90;
1094   ROM[0xf91f7 & 0x3ffff] = 0x90;
1095   ROM[0xf91f8 & 0x3ffff] = 0x90;
1096
1097   /* patch lar checks */
1098   ROM[0xf91fe & 0x3ffff] = 0x90;
1099   ROM[0xf91ff & 0x3ffff] = 0x90;
1100
1101   /* can't avoid this??? */
1102   ROM[0xf9258 & 0x3ffff] = 0xeb;
1103   ROM[0xf9259 & 0x3ffff] = 0x33;
1104
1105   /* patch ROM checksum */
1106   ROM[0xf8595 & 0x3ffff] = 0x90;
1107   ROM[0xf8596 & 0x3ffff] = 0x90;
1108}
1109
1110
10371111/*    YEAR  NAME      PARENT   COMPAT MACHINE   INPUT     INIT    COMPANY                        FULLNAME    FLAGS */
1038COMP( 1981, pc9801,   0,       0,     pc9801,   pc9801,   0,      "Nippon Electronic Company",   "PC-9801",  GAME_NOT_WORKING | GAME_NO_SOUND)
1112COMP( 1981, pc9801,   0,       0,     pc9801,   pc9801,   pc9801,      "Nippon Electronic Company",   "PC-9801",  GAME_NOT_WORKING | GAME_NO_SOUND)
10391113COMP( 1993, pc9821,   0,       0,     pc9801,   pc9801,   0,      "Nippon Electronic Company",   "PC-9821 (98MATE)",  GAME_NOT_WORKING | GAME_NO_SOUND)

Previous 15994 Revisions Next


© 1998-2018 The MESS Team