Skip to content

Commit 202ceab

Browse files
committed
nec/pc9821.cpp: fix pc9821ce IDE loading
1 parent 66a3a22 commit 202ceab

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

src/mame/nec/pc9821.cpp

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,10 @@ TODO (pc9821as):
2929
- Update: it never goes into above after default of m_dma_access_ctrl changed to 0xfe?
3030
3131
TODO (pc9821ce):
32-
- Needs SCSI to boot stuff, or 2.5" option IDE for 98NOTE;
33-
- Can't boot any floppy, thinks it's never ready/leaves motor off;
32+
- Throws random TIMER errors at POST (soft reset to bypass);
33+
- Takes forever to load a floppy, throws (A)bort / (R)etry / (F)ail on DOS;
34+
- 3.5" floppies won't load without changing SDIP floppy to Fixed Mode,
35+
while 5.25" floppies want specifically Auto-Detect instead;
3436
3537
TODO (pc9821cx3):
3638
- Incomplete bank mapping, keeps looping over the same routine when hopping to PnP BIOS after
@@ -1311,6 +1313,7 @@ ROM_START( pc9821ce )
13111313
// 0x0c000 sound BIOS
13121314
// 0x10000 sound BIOS copy
13131315
// 0x16000 <to be identified>
1316+
// 0x18000 IDE BIOS
13141317
// 0x1a000 setup menu
13151318
ROM_COPY( "biosrom", 0x38000, 0x28000, 0x08000 )
13161319
ROM_COPY( "biosrom", 0x30000, 0x20000, 0x08000 )
@@ -1324,8 +1327,9 @@ ROM_START( pc9821ce )
13241327
ROM_COPY( "biosrom", 0x0c000, 0x00000, 0x04000 )
13251328

13261329
LOAD_KANJI_ROMS(ROMREGION_ERASEFF)
1327-
// Uses SCSI not IDE
1328-
// LOAD_IDE_ROM
1330+
1331+
ROM_REGION( 0x4000, "ide", ROMREGION_ERASEVAL(0xcb) )
1332+
ROM_COPY( "biosrom", 0x18000, 0x00000, 0x02000 )
13291333
ROM_END
13301334

13311335

src/mame/nec/pc98_sdip.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,14 @@ class pc98_sdip_device : public device_t,
2020
void bank_w(int state);
2121

2222
// legacy i/f
23-
// TODO: not necessarily linear
23+
// TODO: not necessarily linear, bit 7 is parity bit
2424
ioport_value dsw1_r() { return m_sdip_ram[0]; }
2525
ioport_value dsw2_r() { return m_sdip_ram[1]; }
26-
ioport_value dsw3_r() { return m_sdip_ram[2]; }
26+
ioport_value dsw3_r() {
27+
const u8 fdc_setting = (m_sdip_ram[2] & 3) ^ 2;
28+
//popmessage("%s %s", BIT(fdc_setting, 1) ? "2HD" : "2DD", BIT(fdc_setting, 0) ? "fixed" : "auto-detect");
29+
return (fdc_setting) | (m_sdip_ram[2] & 0x7c) | (0 << 7);
30+
}
2731

2832
protected:
2933
virtual void device_start() override ATTR_COLD;

0 commit comments

Comments
 (0)