Skip to content

Commit 66a3a22

Browse files
committed
bus/pc98_cbus: refactor card implementations using address maps for I/Os
bus/pc98_cbus/pc9801_55.cpp: implement NEC I/O overlay for card PnP
1 parent 24faec6 commit 66a3a22

31 files changed

+328
-445
lines changed

hash/pc98.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44217,7 +44217,7 @@ Cannot install, gets stuck at "please insert disk and press mouse" prompt, tests
4421744217
</part>
4421844218
</software>
4421944219

44220-
<software name="silentsr">
44220+
<software name="silentsr" supported="yes">
4422144221
<description>The Silent Service - Chinmoku no Kantai</description>
4422244222
<year>1991</year>
4422344223
<publisher>ジーエーエム (GAM)</publisher>

hash/pc98_cd.xml

Lines changed: 32 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1404,7 +1404,7 @@ Media for undumped pc9821xa12
14041404
<year>1997</year>
14051405
<publisher>フォアナイン (Fournine)</publisher>
14061406
<info name="serial" value="FNN-003"/>
1407-
<info name="alt_title" value="カナン ~約束の地~" />
1407+
<info name="alt_title" value="カナン ~約束の地~" />
14081408
<part name="cdrom" interface="cdrom">
14091409
<diskarea name="cdrom">
14101410
<disk name="canaan - yakusoku no chi (japan)" sha1="5044b38ae088af496427f5a6d3a832b443bbb937" />
@@ -1488,7 +1488,7 @@ Media for undumped pc9821xa12
14881488
<description>Chuushaki - Hirasawa Nurse School</description>
14891489
<year>1996</year>
14901490
<publisher>アーヴォリオ (Aypio)</publisher>
1491-
<info name="alt_title" value="注射器 Hirasawa Nurse School" />
1491+
<info name="alt_title" value="注射器 Hirasawa Nurse School" />
14921492
<info name="release" value="19960726" />
14931493
<part name="cdrom" interface="cdrom">
14941494
<diskarea name="cdrom">
@@ -1997,7 +1997,7 @@ Not extensively tested
19971997
<year>1994</year>
19981998
<publisher>ディー・オー (D.O.)</publisher>
19991999
<info name="serial" value="HMF-130 / 2TD-3012"/>
2000-
<info name="alt_title" value="どきどきディスクCD版 第1巻 クラブD.O.事務局" />
2000+
<info name="alt_title" value="どきどきディスクCD版 第1巻 クラブD.O.事務局" />
20012001
<part name="cdrom" interface="cdrom">
20022002
<diskarea name="cdrom">
20032003
<disk name="doki doki disk cd-ban vol. 1 (japan)" sha1="8bf3875f21ba28d30b7e837344d5560b15fe32e3" />
@@ -2616,7 +2616,7 @@ Not extensively tested
26162616
<description>Etemible - Tenjou Mukyuu</description>
26172617
<year>1995</year>
26182618
<publisher>グローディア (Glodia)</publisher>
2619-
<info name="alt_title" value="エテミブル ~天壌無窮~" />
2619+
<info name="alt_title" value="エテミブル ~天壌無窮~" />
26202620
<info name="release" value="19950203" />
26212621
<part name="flop1" interface="floppy_5_25">
26222622
<feature name="part_id" value="System Disk" />
@@ -2992,7 +2992,7 @@ Fussy with HIMEM.SYS and EMM386.EXE as suggested by manual, use VEM486 instead.
29922992
-->
29932993
<description>Gokichi-kun Series - Igo Kinenban CD</description>
29942994
<year>1995</year>
2995-
<publisher>ジーエーエム (GAM)</publisher>
2995+
<publisher>ジーエーエム (GAM)</publisher>
29962996
<info name="alt_title" value="碁キチくんシリーズ 囲碁記念版CD" />
29972997
<part name="cdrom" interface="cdrom">
29982998
<diskarea name="cdrom">
@@ -3177,7 +3177,7 @@ Fussy with HIMEM.SYS and EMM386.EXE as suggested by manual, use VEM486 instead.
31773177
<year>1997</year>
31783178
<publisher>フォスター (Foster)</publisher>
31793179
<info name="serial" value="CBF-0007"/>
3180-
<info name="alt_title" value="花の記憶 ~第ニ章~" />
3180+
<info name="alt_title" value="花の記憶 ~第ニ章~" />
31813181
<info name="release" value="199702xx" />
31823182
<part name="cdrom" interface="cdrom">
31833183
<diskarea name="cdrom">
@@ -3368,7 +3368,7 @@ Fussy with HIMEM.SYS and EMM386.EXE as suggested by manual, use VEM486 instead.
33683368
<year>1993</year>
33693369
<publisher>アクティブ (Active)</publisher>
33703370
<info name="serial" value="HME-152 / MTC-1051"/>
3371-
<info name="alt_title" value="イフ Invitations from Fantastic Stories" />
3371+
<info name="alt_title" value="イフ Invitations from Fantastic Stories" />
33723372
<info name="release" value="199306xx" />
33733373
<part name="cdrom" interface="cdrom">
33743374
<diskarea name="cdrom">
@@ -3407,7 +3407,7 @@ Fussy with HIMEM.SYS and EMM386.EXE as suggested by manual, use VEM486 instead.
34073407
<year>1993</year>
34083408
<publisher>アクティブ (Active)</publisher>
34093409
<info name="serial" value="HMF-228 / 2TD-3003"/>
3410-
<info name="alt_title" value="イフ2 Invitations from Fantastic Stories" />
3410+
<info name="alt_title" value="イフ2 Invitations from Fantastic Stories" />
34113411
<info name="release" value="19931119" />
34123412
<part name="cdrom" interface="cdrom">
34133413
<diskarea name="cdrom">
@@ -3427,7 +3427,7 @@ Fussy with HIMEM.SYS and EMM386.EXE as suggested by manual, use VEM486 instead.
34273427
<year>1995</year>
34283428
<publisher>アクティブ (Active)</publisher>
34293429
<info name="serial" value="2TD-3021"/>
3430-
<info name="alt_title" value="イフ3 Invitations from Fantastic Stories" />
3430+
<info name="alt_title" value="イフ3 Invitations from Fantastic Stories" />
34313431
<info name="release" value="199504xx" />
34323432
<part name="cdrom" interface="cdrom">
34333433
<diskarea name="cdrom">
@@ -3988,7 +3988,7 @@ Fails on "Can't find the CD-ROM", loads NECCD.SYS
39883988
<description>Record of Lodoss War II - Goshiki no Maryuu</description>
39893989
<year>1994</year>
39903990
<publisher>ハミングバード (HummingBird)</publisher>
3991-
<info name="alt_title" value="ロードス島戦記Ⅱ ~五色の魔竜~" />
3991+
<info name="alt_title" value="ロードス島戦記Ⅱ ~五色の魔竜~" />
39923992
<info name="release" value="19940527" />
39933993
<part name="flop1" interface="floppy_5_25">
39943994
<feature name="part_id" value="Hozon-you Kidou Disk" />
@@ -4532,7 +4532,7 @@ Missing boot floppy
45324532
<description>Ms. Detective File #1 - Iwami Ginzan Satsujin Jiken</description>
45334533
<year>1993</year>
45344534
<publisher>データウエスト (Data West)</publisher>
4535-
<info name="alt_title" value="ミス・ディテクティヴ ファイル#1 石見銀山殺人事件" />
4535+
<info name="alt_title" value="ミス・ディテクティヴ ファイル#1 石見銀山殺人事件" />
45364536
<info name="release" value="19930417" />
45374537
<part name="flop1" interface="floppy_5_25">
45384538
<dataarea name="flop" size="1265664">
@@ -4558,7 +4558,7 @@ Missing boot floppy
45584558
<description>Ms. Detective File #2 - Sugata-naki Irainin</description>
45594559
<year>1993</year>
45604560
<publisher>データウエスト (Data West)</publisher>
4561-
<info name="alt_title" value="ミス・ディテクティヴ ファイル#2 姿なき依頼人" />
4561+
<info name="alt_title" value="ミス・ディテクティヴ ファイル#2 姿なき依頼人" />
45624562
<info name="release" value="19931029" />
45634563
<part name="flop1" interface="floppy_5_25">
45644564
<dataarea name="flop" size="1261568">
@@ -5319,7 +5319,7 @@ With .fdi disk, will either black screen or respond to user presses, eventually
53195319
Missing boot floppy
53205320
]]></notes>
53215321
<info name="serial" value="DWDC4023"/>
5322-
<info name="alt_title" value="サイキック・ディテクティヴ・シリーズ Vol.4 オルゴール" />
5322+
<info name="alt_title" value="サイキック・ディテクティヴ・シリーズ Vol.4 オルゴール" />
53235323
<info name="release" value="199412xx" />
53245324
<part name="cdrom" interface="cdrom">
53255325
<diskarea name="cdrom">
@@ -6012,7 +6012,7 @@ Missing boot floppy
60126012
<year>1995</year>
60136013
<publisher>工画堂 (Kogado)</publisher>
60146014
<info name="serial" value="9214-55HM10" />
6015-
<info name="alt_title" value="シュヴァルツシルトEX 鉄鎖の星群" />
6015+
<info name="alt_title" value="シュヴァルツシルトEX 鉄鎖の星群" />
60166016
<info name="release" value="19950718" />
60176017
<part name="cdrom" interface="cdrom">
60186018
<diskarea name="cdrom">
@@ -6200,7 +6200,7 @@ Missing boot floppy
62006200
-->
62016201
<description>The Silent Service - Chinmoku no Kantai</description>
62026202
<year>1993</year>
6203-
<publisher>ジーエーエム (GAM)</publisher>
6203+
<publisher>ジーエーエム (GAM)</publisher>
62046204
<info name="serial" value="DWPC3808" />
62056205
<info name="alt_title" value="沈黙の艦隊" />
62066206
<info name="release" value="19930410" />
@@ -6840,7 +6840,7 @@ Missing install floppy
68406840
[PC9801-86] no sound, keeps pushing IRQ clears with FIFO control at $a468
68416841
]]></notes>
68426842
<info name="serial" value="ENP-7020" />
6843-
<info name="alt_title" value="ウルティマⅧ ~ペイガン~" />
6843+
<info name="alt_title" value="ウルティマⅧ ~ペイガン~" />
68446844
<info name="release" value="19951122" />
68456845
<info name="usage" value="Sports The Chronicle of Pagan copy protection (initials)" />
68466846
<part name="cdrom" interface="cdrom">
@@ -6859,6 +6859,11 @@ Missing install floppy
68596859
<description>U.S. Navy Fighters Gold</description>
68606860
<year>1996</year>
68616861
<publisher>エレクトロニック・アーツ・ビクター (Electronic Arts Victor)</publisher>
6862+
<notes><![CDATA[
6863+
Requires 16MB minimum on Windows 95, and a DOS env
6864+
Runs too sluggish on pc9821ap2, requires better HW
6865+
No sound with [PC9801-86] on intro and main menu (verify)
6866+
]]></notes>
68626867
<info name="alt_title" value="U.S.ネイビーファイターズ ゴールド" />
68636868
<info name="release" value="19960426" />
68646869
<part name="cdrom" interface="cdrom">
@@ -6887,8 +6892,7 @@ Missing install floppy
68876892
</part>
68886893
</software>
68896894

6890-
<!-- Garbled text -->
6891-
<software name="umanari2" supported="no">
6895+
<software name="umanari2" supported="yes">
68926896
<!--
68936897
Origin: redump.org
68946898
<rom name="Umanari 1 Furlong Theater 2 (Japan).bin" size="9781968" crc="d352a37f" sha1="043617b7f2dca879d4ab379a12c380800c275055"/>
@@ -6906,7 +6910,6 @@ Missing install floppy
69066910
</software>
69076911

69086912
<!-- PC-98x1 / FM Towns hybrid, also included in fmtowns_cd.xml -->
6909-
<!-- Hangs at the text / voice selection screen -->
69106913
<software name="vastness" supported="no">
69116914
<!--
69126915
Origin: redump.org
@@ -6920,6 +6923,10 @@ Missing install floppy
69206923
<description>Vastness - Kuukyo no Ikenie-tachi</description>
69216924
<year>1995</year>
69226925
<publisher>CD Bros.</publisher>
6926+
<notes><![CDATA[
6927+
EMS issues once installed
6928+
Old note: Hangs at the text / voice selection screen (verify)
6929+
]]></notes>
69236930
<info name="serial" value="HMF-132 / CB-001"/>
69246931
<info name="alt_title" value="ヴアーストニス 空虚の生贄達" />
69256932
<info name="release" value="199502xx" />
@@ -6930,8 +6937,7 @@ Missing install floppy
69306937
</part>
69316938
</software>
69326939

6933-
<!-- Sounds play but nothing shows up on screen -->
6934-
<software name="venus" supported="no">
6940+
<software name="venus" supported="yes">
69356941
<!--
69366942
Origin: Neo Kobe Collection
69376943
CCD converted to CUE with GNU ccd2cue
@@ -6943,6 +6949,7 @@ Missing install floppy
69436949
<description>Venus &amp; Mug-R</description>
69446950
<year>1994</year>
69456951
<publisher>ソフトウェアハウスぱせり (Software House Parsley)</publisher>
6952+
<info name="usage" value="Prepare a floppy /s, run INST.EXE to install, needs GDC 2.5 MHz setting in gameplay" />
69466953
<part name="cdrom" interface="cdrom">
69476954
<diskarea name="cdrom">
69486955
<disk name="venus &amp; mug-r" sha1="e5baf67106a20b95a6eb7ee40ba0ed01eb3084cc" />
@@ -7243,8 +7250,7 @@ Missing install floppy
72437250
</part>
72447251
</software>
72457252

7246-
<!-- Garbled text -->
7247-
<software name="yumemi" supported="no">
7253+
<software name="yumemi" supported="yes">
72487254
<!--
72497255
Origin: redump.org
72507256
<rom name="Yumemizaka (Japan).bin" size="178062864" crc="c7f5ef68" sha1="d86e9185d5372efc5404dada1d01be250d8a1d7a"/>
@@ -7253,6 +7259,7 @@ Missing install floppy
72537259
<description>Yumemizaka</description>
72547260
<year>1995</year>
72557261
<publisher>ユーミソフト (U-me Soft)</publisher>
7262+
<!-- uses exact same installer as venus -->
72567263
<info name="alt_title" value="夢見坂" />
72577264
<info name="release" value="19950714" />
72587265
<part name="cdrom" interface="cdrom">
@@ -7349,7 +7356,7 @@ Missing install floppy
73497356
<year>1996</year>
73507357
<publisher>ディー・オー (D.O.)</publisher>
73517358
<info name="serial" value="MCD-008"/>
7352-
<info name="alt_title" value="CD‐ROM美少女戦士コレクション ~遊ディスクスペシャル~" />
7359+
<info name="alt_title" value="CD‐ROM美少女戦士コレクション ~遊ディスクスペシャル~" />
73537360
<info name="release" value="199604xx" />
73547361
<part name="cdrom" interface="cdrom">
73557362
<diskarea name="cdrom">
@@ -7378,7 +7385,7 @@ Missing install floppy
73787385
<description>Yuurou - Transient Sands</description>
73797386
<year>1996</year>
73807387
<publisher>ハーベスト (Hervest)</publisher>
7381-
<info name="alt_title" value="憂楼  -Transient Sands-" />
7388+
<info name="alt_title" value="憂楼 -Transient Sands-" />
73827389
<info name="release" value="19960802" />
73837390
<part name="cdrom" interface="cdrom">
73847391
<diskarea name="cdrom">

src/devices/bus/pc98_cbus/amd98.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,9 @@ void amd98_device::device_reset()
148148

149149
void amd98_device::io_map(address_map &map)
150150
{
151+
// TODO: configurable PnP, needs dip/jumper sheet
152+
map(0xf0, 0xf0).lr8(NAME([] () { return 0x18; }));
153+
151154
map(0xd8, 0xd8).w(m_ay1, FUNC(ay8910_device::address_w));
152155
map(0xd9, 0xd9).w(m_ay2, FUNC(ay8910_device::address_w));
153156
map(0xda, 0xda).rw(m_ay1, FUNC(ay8910_device::data_r), FUNC(ay8910_device::data_w));
@@ -160,8 +163,6 @@ void amd98_device::io_map(address_map &map)
160163
NAME([this] (offs_t offset) { return m_pit->read(3); }),
161164
NAME([this] (offs_t offset, u8 data) { m_pit->write(3, data); })
162165
);
163-
// TODO: configurable PnP, needs dip/jumper sheet
164-
map(0xf0, 0xf0).lr8(NAME([] () { return 0x18; }));
165166
}
166167

167168
void amd98_device::ay3_address_w(uint8_t data)

src/devices/bus/pc98_cbus/amd98.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class amd98_device : public device_t
3939
virtual ioport_constructor device_input_ports() const override ATTR_COLD;
4040

4141
private:
42-
void io_map(address_map &map);
42+
void io_map(address_map &map) ATTR_COLD;
4343
void ay3_address_w(uint8_t data);
4444
void ay3_data_latch_w(uint8_t data);
4545

src/devices/bus/pc98_cbus/fdd_2d.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ FDD 2D 320KB C-Bus bridge interface
66
77
For original 1st gen PC-98 only (VM already won't check the range), connects to the back thru
88
the 5" FLOPPY DISK port (not the 2DD option)
9+
Built-in only, no actual card exists (TBD)
910
1011
**************************************************************************************************/
1112

@@ -32,10 +33,10 @@ void fdd_2d_bridge_device::device_start()
3233

3334
void fdd_2d_bridge_device::device_reset()
3435
{
35-
m_bus->install_device(0x0050, 0x0057, *this, &fdd_2d_bridge_device::io_map);
36+
m_bus->install_device(0x0000, 0x00ff, *this, &fdd_2d_bridge_device::io_map);
3637
}
3738

3839
void fdd_2d_bridge_device::io_map(address_map &map)
3940
{
40-
map(0, 7).m(m_fdd_if, FUNC(pc80s31k_device::host_map)).umask16(0xff00);
41+
map(0x0050, 0x0057).m(m_fdd_if, FUNC(pc80s31k_device::host_map)).umask16(0xff00);
4142
}

src/devices/bus/pc98_cbus/fdd_2d.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class fdd_2d_bridge_device : public device_t
2424
required_device<pc98_cbus_slot_device> m_bus;
2525
required_device<pc80s31k_device> m_fdd_if;
2626

27-
void io_map(address_map &map);
27+
void io_map(address_map &map) ATTR_COLD;
2828
};
2929

3030
// device type definition

src/devices/bus/pc98_cbus/mif201.cpp

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -45,26 +45,31 @@ void mif201_device::device_add_mconfig(machine_config &config)
4545

4646
void mif201_device::device_start()
4747
{
48-
// sheet claims i8251-1 having swapped ports compared to i8251-2 but micromus just uses
49-
// $e2d2 for control, assume typo.
50-
m_bus->install_io(0xe2d0, 0xe2d3,
51-
read8sm_delegate(*this, [this](offs_t offset) { return m_uart[0]->read(offset); }, "uart1_r"),
52-
write8sm_delegate(*this, [this](offs_t offset, u8 data) { m_uart[0]->write(offset, data); }, "uart1_w")
53-
);
54-
m_bus->install_io(0xe4d0, 0xe4d3,
55-
read8sm_delegate(*this, [this](offs_t offset) { return m_uart[1]->read(offset); }, "uart2_r"),
56-
write8sm_delegate(*this, [this](offs_t offset, u8 data) { m_uart[1]->write(offset, data); }, "uart2_w")
57-
);
58-
m_bus->install_io(0xe6d0, 0xe6d3,
59-
read8sm_delegate(*this, [this](offs_t offset) { return m_pit->read(offset); }, "pit_low_r"),
60-
write8sm_delegate(*this, [this](offs_t offset, u8 data) { m_pit->write(offset, data); }, "pit_low_w")
61-
);
62-
m_bus->install_io(0xe7d0, 0xe7d3,
63-
read8sm_delegate(*this, [this](offs_t offset) { return m_pit->read(offset | 2); }, "pit_high_r"),
64-
write8sm_delegate(*this, [this](offs_t offset, u8 data) { m_pit->write(offset | 2, data); }, "pit_high_w")
65-
);
6648
}
6749

6850
void mif201_device::device_reset()
6951
{
52+
m_bus->install_device(0x0000, 0xffff, *this, &mif201_device::io_map);
53+
}
54+
55+
void mif201_device::io_map(address_map &map)
56+
{
57+
// sheet claims i8251-1 having swapped ports compared to i8251-2 but micromus just uses
58+
// $e2d2 for control, assume typo.
59+
map(0xe2d0, 0xe2d3).lrw8(
60+
NAME([this](offs_t offset) { return m_uart[0]->read(offset); }),
61+
NAME([this](offs_t offset, u8 data) { m_uart[0]->write(offset, data); })
62+
).umask16(0x00ff);
63+
map(0xe4d0, 0xe4d3).lrw8(
64+
NAME([this](offs_t offset) { return m_uart[1]->read(offset); }),
65+
NAME([this](offs_t offset, u8 data) { m_uart[1]->write(offset, data); })
66+
).umask16(0x00ff);
67+
map(0xe6d0, 0xe6d3).lrw8(
68+
NAME([this](offs_t offset) { return m_pit->read(offset); }),
69+
NAME([this](offs_t offset, u8 data) { m_pit->write(offset, data); })
70+
).umask16(0x00ff);
71+
map(0xe7d0, 0xe7d3).lrw8(
72+
NAME([this](offs_t offset) { return m_pit->read(offset | 2); }),
73+
NAME([this](offs_t offset, u8 data) { m_pit->write(offset | 2, data); })
74+
).umask16(0x00ff);
7075
}

src/devices/bus/pc98_cbus/mif201.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class mif201_device : public device_t
3636
required_device_array<i8251_device, 2> m_uart;
3737
required_device<pit8253_device> m_pit;
3838

39-
// void map(address_map &map);
39+
void io_map(address_map &map) ATTR_COLD;
4040
};
4141

4242

src/devices/bus/pc98_cbus/mpu_pc98.cpp

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,18 +62,12 @@ mpu_pc98_device::mpu_pc98_device(const machine_config &mconfig, const char *tag,
6262
{
6363
}
6464

65-
void mpu_pc98_device::map(address_map &map)
66-
{
67-
map(0x0, 0x3).rw(MPU_CORE_TAG, FUNC(mpu401_device::mpu_r), FUNC(mpu401_device::mpu_w)).umask16(0x00ff);
68-
}
69-
7065
//-------------------------------------------------
7166
// device_start - device-specific startup
7267
//-------------------------------------------------
7368

7469
void mpu_pc98_device::device_start()
7570
{
76-
m_bus->io_space().install_device(0xe0d0, 0xe0d3, *this, &mpu_pc98_device::map);
7771
}
7872

7973
//-------------------------------------------------
@@ -82,4 +76,11 @@ void mpu_pc98_device::device_start()
8276

8377
void mpu_pc98_device::device_reset()
8478
{
79+
m_bus->install_device(0x0000, 0xffff, *this, &mpu_pc98_device::io_map);
8580
}
81+
82+
void mpu_pc98_device::io_map(address_map &map)
83+
{
84+
map(0xe0d0, 0xe0d3).rw(MPU_CORE_TAG, FUNC(mpu401_device::mpu_r), FUNC(mpu401_device::mpu_w)).umask16(0x00ff);
85+
}
86+

0 commit comments

Comments
 (0)