diff options
| author | 2025-10-25 12:08:43 +0200 | |
|---|---|---|
| committer | 2025-10-25 15:57:02 +0200 | |
| commit | 9b3f7e5717c31fc7672dd61704ab0fc8f6ea3256 (patch) | |
| tree | 88d24fd3bfa17215ca30b31dc6be2c65083a676e | |
| parent | 3c6f3972c0f0143302918744c5918b366cfa6957 (diff) | |
bus/pc98_cbus/pc9801_14.cpp: provide BIOS dump [Mike Stedman]
| -rw-r--r-- | src/devices/bus/pc98_cbus/amd98.cpp | 16 | ||||
| -rw-r--r-- | src/devices/bus/pc98_cbus/pc9801_14.cpp | 64 | ||||
| -rw-r--r-- | src/devices/bus/pc98_cbus/pc9801_14.h | 6 |
3 files changed, 64 insertions, 22 deletions
diff --git a/src/devices/bus/pc98_cbus/amd98.cpp b/src/devices/bus/pc98_cbus/amd98.cpp index e07eab7e01f..b0d9a168cf7 100644 --- a/src/devices/bus/pc98_cbus/amd98.cpp +++ b/src/devices/bus/pc98_cbus/amd98.cpp @@ -16,14 +16,14 @@ TODO: =================================================================================================== - Known games with AMD-98 support - Brown's Run (System Sacom) - Dome (System Sacom) - Highway Star (System Sacom) - Marchen Veil I (System Sacom) - Marchen Veil II (System Sacom) - Zone (System Sacom) - Relics (Bothtec) - Thexder (Game Arts) + brownrun + dome + highway + marchen1 + marchen2 + zone + relics + thexder **************************************************************************************************/ diff --git a/src/devices/bus/pc98_cbus/pc9801_14.cpp b/src/devices/bus/pc98_cbus/pc9801_14.cpp index 5d2ee3458c5..c55a213ecfd 100644 --- a/src/devices/bus/pc98_cbus/pc9801_14.cpp +++ b/src/devices/bus/pc98_cbus/pc9801_14.cpp @@ -5,8 +5,16 @@ PC9801-14 sound board TMS3631 sound chip (same as Siel DK-600 / Opera 6) +4 octaves, 12 notes, 8 channels +CH1 and CH2 are fixed to center with no envelope +CH3-5 are fixed to the left +CH6-8 to the right +7 knobs on back panel, F2/F4/F8/F16 then L/R and VOL -http://www.retropc.net/mm/archives/1530 +References: +- http://www.retropc.net/mm/archives/1530 +- https://yfl711.hateblo.jp/search?q=TMS3631%E5%88%B6%E5%BE%A1 +- undocumented mem io_music.txt TODO: - enough to make it talk with the sound interface and not much else. @@ -14,7 +22,7 @@ TODO: =================================================================================================== - Known games with PC9801-14 support - gamepac1:flappy + gamepac1 - flappy **************************************************************************************************/ @@ -43,10 +51,12 @@ pc9801_14_device::pc9801_14_device(const machine_config &mconfig, const char *ta } + void pc9801_14_device::device_add_mconfig(machine_config &config) { - SPEAKER(config, "speaker").front_center(); + SPEAKER(config, "speaker", 2).front(); + // 8253A PIT8253(config, m_pit); m_pit->set_clk<2>(1'996'800 / 8); m_pit->out_handler<2>().set([this] (int state) { @@ -58,10 +68,27 @@ void pc9801_14_device::device_add_mconfig(machine_config &config) m_ppi->out_pb_callback().set([this](uint8_t data) { LOG("TMS3631: PB envelope 2 %02x\n", data); }); // m_ppi->in_pc_callback().set_constant(0x08); m_ppi->out_pc_callback().set([this](uint8_t data) { LOG("TMS3631: data %02x\n", data); }); + + // TODO: TMS3631-RI104 & TMS3631-RI105 + // TMS3631(config, m_tms, 1'996'800); + // m_tms->add_route(0, "speaker", 0.5, 0); + // m_tms->add_route(1, "speaker", 0.5, 1); +} + +ROM_START( pc9801_14 ) + ROM_REGION( 0x4000, "sound_bios", ROMREGION_ERASEFF ) + ROM_LOAD16_BYTE( "vfz01_00.bin", 0x0001, 0x2000, CRC(3b227477) SHA1(85474b0550d58395ae9ca53658f93ad2f87fdd4d) ) + ROM_LOAD16_BYTE( "vfz02_00.bin", 0x0000, 0x2000, CRC(a386ab6b) SHA1(5b014c5de1b8e41a412cafd61d7e9d18abdeb6be) ) +ROM_END + +const tiny_rom_entry *pc9801_14_device::device_rom_region() const +{ + return ROM_NAME( pc9801_14 ); } + static INPUT_PORTS_START( pc9801_14 ) - // TODO: dipswitches for int line selection (at least) + // TODO: jumpers for int line and port selection INPUT_PORTS_END ioport_constructor pc9801_14_device::device_input_ports() const @@ -80,22 +107,37 @@ void pc9801_14_device::device_start() void pc9801_14_device::device_reset() { - m_bus->install_device(0x0000, 0x01ff, *this, &pc9801_14_device::io_map); + // assumed, loads up in n88bas61 with switch.n88 setup + m_bus->program_space().install_rom( + 0xcc000, + 0xcffff, + memregion(this->subtag("sound_bios").c_str())->base() + ); + + m_bus->install_device(0x0000, 0x3fff, *this, &pc9801_14_device::io_map); } void pc9801_14_device::io_map(address_map &map) { map(0x0088, 0x008f).rw(m_ppi, FUNC(i8255_device::read), FUNC(i8255_device::write)).umask16(0x00ff); - // TODO: identifier, should it be from PPI? - map(0x008e, 0x008e).lr8(NAME([] () { return 0x08; })); + // TODO: identifier + port select, mirrored over the full space? + // --xx xx0A xxxx 1AA0 + // x = selects active port (jumpers) + // - = don't care (mirrored?) + // A = card select + // 0x00 and 0xff values aren't valid + map(0x008e, 0x008e).lr8(NAME([this] () { LOG("PC9801-14: read base port / identifier\n"); return 0x08; })); + // mirror according to io_sound.txt map(0x0188, 0x0188).mirror(2).lw8(NAME([this] (offs_t offset, u8 data) { LOG("TMS3631 mask %02x\n", data); })); map(0x018c, 0x018c).lrw8( NAME([this] (offs_t offset) { return m_pit->read(2); }), - NAME([this] (offs_t offset, u8 data) { m_pit->write(2, data); })); + NAME([this] (offs_t offset, u8 data) { m_pit->write(2, data); }) + ); map(0x018e, 0x018e).lrw8( - NAME([this] (offs_t offset) { - LOG("PC9801-14: read DSW\n"); - return 0x80; // dip switch + NAME([this] () { + LOG("PC9801-14: read int line\n"); + // hardwire to INT5 for now + return 0x80; }), NAME([this] (offs_t offset, u8 data) { m_pit->write(3, data); diff --git a/src/devices/bus/pc98_cbus/pc9801_14.h b/src/devices/bus/pc98_cbus/pc9801_14.h index 70be09804bb..4528ca10ed1 100644 --- a/src/devices/bus/pc98_cbus/pc9801_14.h +++ b/src/devices/bus/pc98_cbus/pc9801_14.h @@ -14,7 +14,6 @@ class pc9801_14_device : public device_t { public: - // construction/destruction pc9801_14_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); static constexpr feature_type unemulated_features() { return feature::SOUND; } @@ -23,11 +22,12 @@ public: void write(offs_t offset, uint8_t data); protected: - // device-level overrides virtual void device_validity_check(validity_checker &valid) const override; virtual void device_start() override ATTR_COLD; virtual void device_reset() override ATTR_COLD; - // optional information overrides + + virtual const tiny_rom_entry *device_rom_region() const override ATTR_COLD; + virtual void device_add_mconfig(machine_config &config) override ATTR_COLD; virtual ioport_constructor device_input_ports() const override ATTR_COLD; |
