35
35
- Export mouse support to an actual PC9871 device;
36
36
- Implement IF-SEGA/98 support (Sega Saturn peripheral compatibility for Windows,
37
37
cfr. BeOS PnP driver);
38
- - Incomplete SDIP support:
39
- - SDIP never returns a valid state and returns default values even if machine is
40
- soft resetted. By logic should read-back the already existing state, instead
41
- all machines just returns a "set SDIP" warning message at POST no matter what;
42
- - SDIP bank hookup is different across machines, either unmapped or diverging
43
- implementation wise both in port select and behaviour;
44
- - In theory SDIP can be initialized via a BIOS menu, callable by holding down
45
- HELP key at POST. This actually doesn't work for any machine, is it expected to
46
- have key repeat support? Later BIOSes actually have strings for an extended menu
47
- with 3 or 4 pages strings, may be also requiring a jump/bankswitch to unmapped area?
48
- - Expose SDIP to an actual device_nvram_interface;
49
- - Derive defaults off what the model sets up at POST;
50
38
- clean-up functions/variables naming by actual documentation nomenclature;
51
39
- derive machine configs & romsets by actual default options, examples:
52
40
- 3.5 built-in floppy drives vs. default 5.25;
75
63
it's not a 286 CPU;
76
64
- Floppy boot fails;
77
65
78
- TODO (PC-9801US):
66
+ TODO (PC-9801US / PC-9801FS ):
79
67
- "Invalid Command Byte 13" for bitmap upd7220 at POST (?)
80
- - "SYSTEM SHUTDOWN" after BIOS sets up the SDIP values;
81
-
82
- TODO (PC-9801FS):
83
68
- RAM check detects more RAM than what's really installed (and saves previous detection in MEMSW);
84
- - Crashes with Japanese error for "HDD failure" when mounted with IDE BIOS,
69
+ - pc9801fs at least: Crashes with Japanese error for "HDD failure" when mounted with IDE BIOS,
85
70
incompatible with 512 bps or IDE itself?
86
71
87
72
TODO (PC-9801BX2)
@@ -1252,6 +1237,13 @@ void pc9801us_state::pc9801us_io(address_map &map)
1252
1237
{
1253
1238
pc9801rs_io (map);
1254
1239
map (0x0430 , 0x0433 ).rw (FUNC (pc9801us_state::ide_ctrl_r), FUNC (pc9801us_state::ide_ctrl_w)).umask16 (0x00ff );
1240
+ map (0x00f6 , 0x00f6 ).lw8 (NAME ([this ] (offs_t offset, u8 data) {
1241
+ // despite what undocumented mem claims US and FS actually access this for SDIP banking
1242
+ if (data == 0xa0 || data == 0xe0 )
1243
+ m_sdip->bank_w (BIT (data, 6 ));
1244
+ else
1245
+ logerror (" SDIP: I/O $00f6 unrecognized write %02x\n " , data);
1246
+ }));
1255
1247
map (0x841e , 0x841e ).rw (m_sdip, FUNC (pc98_sdip_device::read <0x0 >), FUNC (pc98_sdip_device::write <0x0 >));
1256
1248
map (0x851e , 0x851e ).rw (m_sdip, FUNC (pc98_sdip_device::read <0x1 >), FUNC (pc98_sdip_device::write <0x1 >));
1257
1249
map (0x861e , 0x861e ).rw (m_sdip, FUNC (pc98_sdip_device::read <0x2 >), FUNC (pc98_sdip_device::write <0x2 >));
@@ -1264,7 +1256,7 @@ void pc9801us_state::pc9801us_io(address_map &map)
1264
1256
map (0x8d1e , 0x8d1e ).rw (m_sdip, FUNC (pc98_sdip_device::read <0x9 >), FUNC (pc98_sdip_device::write <0x9 >));
1265
1257
map (0x8e1e , 0x8e1e ).rw (m_sdip, FUNC (pc98_sdip_device::read <0xa >), FUNC (pc98_sdip_device::write <0xa >));
1266
1258
map (0x8f1e , 0x8f1e ).rw (m_sdip, FUNC (pc98_sdip_device::read <0xb >), FUNC (pc98_sdip_device::write <0xb >));
1267
- map (0x8f1f , 0x8f1f ).w (m_sdip, FUNC (pc98_sdip_device::bank_w));
1259
+ // map(0x8f1f, 0x8f1f).w(m_sdip, FUNC(pc98_sdip_device::bank_w));
1268
1260
}
1269
1261
1270
1262
void pc9801bx_state::pc9801bx2_map (address_map &map)
@@ -1320,8 +1312,17 @@ void pc9801bx_state::gdc_31kHz_w(offs_t offset, u8 data)
1320
1312
void pc9801bx_state::pc9801bx2_io (address_map &map)
1321
1313
{
1322
1314
pc9801us_io (map);
1315
+ // NOP legacy SDIP bank access
1316
+ map (0x00f6 , 0x00f6 ).lw8 (NAME ([] (offs_t offset, u8 data) {}));
1323
1317
map (0x0534 , 0x0534 ).r (FUNC (pc9801bx_state::i486_cpu_mode_r));
1324
1318
map (0x09a8 , 0x09a8 ).rw (FUNC (pc9801bx_state::gdc_31kHz_r), FUNC (pc9801bx_state::gdc_31kHz_w));
1319
+ map (0x8f1f , 0x8f1f ).lw8 (NAME ([this ] (offs_t offset, u8 data) {
1320
+ // BA2 onward and every PC-9821 uses this method for SDIP bank
1321
+ if (data == 0x80 || data == 0xc0 )
1322
+ m_sdip->bank_w (BIT (data, 6 ));
1323
+ else
1324
+ logerror (" SDIP: I/O $8f1f unrecognized write %02x\n " , data);
1325
+ }));
1325
1326
}
1326
1327
1327
1328
/* uint8_t pc9801_state::winram_r(offs_t offset)
@@ -2598,13 +2599,16 @@ void pc9801vm_state::pc9801vx(machine_config &config)
2598
2599
void pc9801us_state::pc9801us (machine_config &config)
2599
2600
{
2600
2601
pc9801rs (config);
2601
- I386SX (config.replace (), m_maincpu, MAIN_CLOCK_X1*8 ); // unknown clock
2602
+ const XTAL xtal = BASE_CLOCK / 2 ; // ~16 MHz
2603
+ I386SX (config.replace (), m_maincpu, xtal);
2602
2604
m_maincpu->set_addrmap (AS_PROGRAM, &pc9801us_state::pc9801rs_map);
2603
2605
m_maincpu->set_addrmap (AS_IO, &pc9801us_state::pc9801us_io);
2604
2606
m_maincpu->set_irq_acknowledge_callback (" pic8259_master" , FUNC (pic8259_device::inta_cb));
2605
2607
2606
2608
config_floppy_35hd (config);
2607
2609
2610
+ pit_clock_config (config, xtal / 4 );
2611
+
2608
2612
PC98_SDIP (config, " sdip" , 0 );
2609
2613
}
2610
2614
0 commit comments