mirror of
https://github.com/holub/mame
synced 2025-07-07 19:03:29 +03:00
nec/pc88va.cpp: preliminary C-Bus slot hookup
This commit is contained in:
parent
8fdb48c203
commit
16817fba26
@ -3,57 +3,55 @@
|
||||
// thanks-to: Fujix
|
||||
/**************************************************************************************************
|
||||
|
||||
PC-88VA (c) 1987 NEC
|
||||
PC-88VA (c) 1987 NEC
|
||||
|
||||
Here be dragons, a mostly compatible PC-8801 with extra V3 Mode for superset.
|
||||
Here be dragons, a mostly compatible PC-8801 with extra V3 Mode for superset.
|
||||
|
||||
preliminary driver by Angelo Salese
|
||||
Special thanks to Fujix for his documentation translation help
|
||||
TODO:
|
||||
- pc88va (stock version) has two bogus opcodes.
|
||||
One is at 0xf0b15 (0x0f 0xfe), another at 0xf0b31 (br 1000h:0c003h).
|
||||
Latter will make the program flow to jump to lalaland.
|
||||
This also happens if you load a regular V1/V2 game assuming you have FDC PIO properly
|
||||
hooked up, is the first opcode actually a Z80 mode switch?
|
||||
- pc88va is also known to have a slightly different banking scheme and
|
||||
regular YM2203 as default sound board.
|
||||
- video emulation is lacking many features, cfr. pc88va_v.cpp;
|
||||
- keyboard runs on undumped MCU, we currently stick irqs together on
|
||||
selected keys in order to have an easier QoL while testing this.
|
||||
- Backport from PC-8801 main map, apply supersets where applicable;
|
||||
\- IDP has EMUL for upd3301
|
||||
\- In emulation mode HW still relies to a i8214, so it bridges thru
|
||||
main ICU in cascaded mode via IRQ7;
|
||||
\- beeper or dac1bit (to be confirmed);
|
||||
\- (other stuff ...)
|
||||
- Convert FDC usage to pc88va2_fd_if_device, we also need PIO comms for sorcer anyway;
|
||||
- irq dispatch needs to be revisited, too many instances of sound irq failing for example.
|
||||
The current hook-ups aren't legal, V50 core bug?
|
||||
- Very inconsistent SW boot behaviours, either down to:
|
||||
\- the current hack in FDC PIO port returning RNG;
|
||||
\- V50 timings;
|
||||
\- FDC;
|
||||
- Every PC Engine OS boot tries to write TVRAM ASCII data on every boot to
|
||||
$exxxx ROM region, banking bug?
|
||||
- all N88 BASIC entries tries to do stuff with EMM, more banking?
|
||||
- Convert SASI from PC-9801 to a shared C-Bus device, apparently it's same i/f;
|
||||
- Is C-Bus I/O space shifted by +$200, as per micromus MIDI access at $e2d2?
|
||||
|
||||
TODO:
|
||||
- pc88va (stock version) has two bogus opcodes.
|
||||
One is at 0xf0b15 (0x0f 0xfe), another at 0xf0b31 (br 1000h:0c003h).
|
||||
Latter will make the program flow to jump to lalaland.
|
||||
This also happens if you load a regular V1/V2 game assuming you have FDC PIO properly
|
||||
hooked up, is the first opcode actually a Z80 mode switch?
|
||||
- pc88va is also known to have a slightly different banking scheme and
|
||||
regular YM2203 as default sound board.
|
||||
- video emulation is lacking many features, cfr. pc88va_v.cpp;
|
||||
- keyboard runs on undumped MCU, we currently stick irqs together on
|
||||
selected keys in order to have an easier QoL while testing this.
|
||||
- Backport from PC-8801 main map, apply supersets where applicable;
|
||||
\- IDP has EMUL for upd3301
|
||||
\- In emulation mode HW still relies to a i8214, so it bridges thru
|
||||
main ICU in cascaded mode via IRQ7;
|
||||
\- beeper or dac1bit (to be confirmed);
|
||||
\- (other stuff ...)
|
||||
- Convert FDC usage to pc88va2_fd_if_device, we also need PIO comms for sorcer anyway;
|
||||
- irq dispatch needs to be revisited, too many instances of sound irq failing for example.
|
||||
The current hook-ups aren't legal, V50 core bug?
|
||||
- Very inconsistent SW boot behaviours, either down to:
|
||||
\- the current hack in FDC PIO port returning RNG;
|
||||
\- V50 timings;
|
||||
\- FDC;
|
||||
- Every PC Engine OS boot tries to write TVRAM ASCII data on every boot to
|
||||
$exxxx ROM region, banking bug?
|
||||
- all N88 BASIC entries tries to do stuff with EMM, more banking?
|
||||
- Convert SASI from PC-9801 to a shared device, apparently it's same i/f;
|
||||
- Implement bus slot, which should still be PC-8801 EXPansion bus.
|
||||
(old notes, to be reordered)
|
||||
- fdc "intelligent mode" has 0x7f as irq vector ... 0x7f is ld a,a and it IS NOT correctly
|
||||
hooked up by the current z80 core
|
||||
- Fix floppy motor hook-up (floppy believes to be always in even if empty drive);
|
||||
- Support for PC8801 compatible mode & PC80S31K (floppy interface);
|
||||
|
||||
(old notes, to be reordered)
|
||||
- fdc "intelligent mode" has 0x7f as irq vector ... 0x7f is ld a,a and it IS NOT correctly
|
||||
hooked up by the current z80 core
|
||||
- Fix floppy motor hook-up (floppy believes to be always in even if empty drive);
|
||||
- Support for PC8801 compatible mode & PC80S31K (floppy interface);
|
||||
Notes:
|
||||
- hold F8 at POST to bring software dip settings menu
|
||||
- PC-88VA-91 is a ROM upgrade kit for a PC-88VA -> VA2/VA3.
|
||||
Has four roms, marked by VAEG as VUROM00.ROM, VUROM08.ROM, VUROM1.ROM, VUDIC.ROM.
|
||||
|
||||
Notes:
|
||||
- hold F8 at POST to bring software dip settings menu
|
||||
- PC-88VA-91 is a ROM upgrade kit for a PC-88VA -> VA2/VA3.
|
||||
Has four roms, marked by VAEG as VUROM00.ROM, VUROM08.ROM, VUROM1.ROM, VUDIC.ROM.
|
||||
|
||||
References:
|
||||
- PC-88VAテクニカルマニュアル
|
||||
- http://www.pc88.gr.jp/vafaq/view.php/articlelist/88va/vafaq
|
||||
References:
|
||||
- PC-88VAテクニカルマニュアル
|
||||
- http://www.pc88.gr.jp/vafaq/view.php/articlelist/88va/vafaq
|
||||
- I/O magazine 1987 08 (schematics)
|
||||
|
||||
===================================================================================================
|
||||
|
||||
@ -62,15 +60,15 @@ ICU
|
||||
irq 0 - 08h - timer 1
|
||||
irq 1 - 09h - keyboard irq
|
||||
irq 2 - 0Ah - VRTC
|
||||
irq 3 - 0Bh - UINT0 (B24)
|
||||
irq 3 - 0Bh - UINT0 (B24) C-Bus IR3
|
||||
irq 4 - 0Ch - RS-232C
|
||||
irq 5 - 0Dh - UINT1 (B25)
|
||||
irq 6 - 0Eh - UINT2 (B26)
|
||||
irq 5 - 0Dh - UINT1 (B25) C-Bus IR5
|
||||
irq 6 - 0Eh - UINT2 (B26) C-Bus IR6
|
||||
irq 7 - N/A - Slave (either secondary i8259 or i8214)
|
||||
i8259 slave
|
||||
irq 8 - 10H - SGP
|
||||
irq 9 - 11H - UINT3 (HDD, B27)
|
||||
irq 10 - 12H - UINT4 (B28)
|
||||
irq 9 - 11H - UINT3 (HDD, B27) C-Bus IR9
|
||||
irq 10 - 12H - UINT4 (B28) C-Bus IR10
|
||||
irq 11 - 13H - FDC
|
||||
irq 12 - 14H - Sound
|
||||
irq 13 - 15H - General timer 3 (mouse)
|
||||
@ -1120,6 +1118,47 @@ void pc88va_state::machine_reset()
|
||||
m_sound_irq_pending = false;
|
||||
}
|
||||
|
||||
// TODO: add just a subset for now, all needs to be verified if compatible with C-Bus.
|
||||
static void pc88va_cbus_devices(device_slot_interface &device)
|
||||
{
|
||||
device.option_add("pc9801_55u", PC9801_55U);
|
||||
device.option_add("pc9801_55l", PC9801_55L);
|
||||
device.option_add("mpu_pc98", MPU_PC98);
|
||||
}
|
||||
|
||||
// NOTE: PC-88VA implementation omits some C-Bus lines compared to PC-98.
|
||||
// - doesn't have ir12 and ir13, i.e. covers INT0 to INT4 only
|
||||
// - no /CPUKILL pin support
|
||||
// cfr. schematics pg. 260, "external bus, videoboard connector"
|
||||
void pc88va_state::pc88va_cbus(machine_config &config)
|
||||
{
|
||||
PC9801CBUS_SLOT(config, m_cbus[0], pc88va_cbus_devices, nullptr);
|
||||
m_cbus[0]->set_memspace(m_maincpu, AS_PROGRAM);
|
||||
m_cbus[0]->set_iospace(m_maincpu, AS_IO);
|
||||
m_cbus[0]->int_cb<0>().set("ir3", FUNC(input_merger_device::in_w<0>));
|
||||
m_cbus[0]->int_cb<1>().set("ir5", FUNC(input_merger_device::in_w<0>));
|
||||
m_cbus[0]->int_cb<2>().set("ir6", FUNC(input_merger_device::in_w<0>));
|
||||
m_cbus[0]->int_cb<3>().set("ir9", FUNC(input_merger_device::in_w<0>));
|
||||
m_cbus[0]->int_cb<4>().set("ir10", FUNC(input_merger_device::in_w<0>));
|
||||
|
||||
PC9801CBUS_SLOT(config, m_cbus[1], pc88va_cbus_devices, nullptr);
|
||||
m_cbus[1]->set_memspace(m_maincpu, AS_PROGRAM);
|
||||
m_cbus[1]->set_iospace(m_maincpu, AS_IO);
|
||||
m_cbus[1]->int_cb<0>().set("ir3", FUNC(input_merger_device::in_w<1>));
|
||||
m_cbus[1]->int_cb<1>().set("ir5", FUNC(input_merger_device::in_w<1>));
|
||||
m_cbus[1]->int_cb<2>().set("ir6", FUNC(input_merger_device::in_w<1>));
|
||||
m_cbus[1]->int_cb<3>().set("ir9", FUNC(input_merger_device::in_w<1>));
|
||||
m_cbus[1]->int_cb<4>().set("ir10", FUNC(input_merger_device::in_w<1>));
|
||||
|
||||
// TODO: check actual number of slots for each VA iteration
|
||||
|
||||
INPUT_MERGER_ANY_HIGH(config, "ir3").output_handler().set_inputline(m_maincpu, INPUT_LINE_IRQ3);
|
||||
INPUT_MERGER_ANY_HIGH(config, "ir5").output_handler().set_inputline(m_maincpu, INPUT_LINE_IRQ5);
|
||||
INPUT_MERGER_ANY_HIGH(config, "ir6").output_handler().set_inputline(m_maincpu, INPUT_LINE_IRQ6);
|
||||
INPUT_MERGER_ANY_HIGH(config, "ir9").output_handler().set("pic8259_slave", FUNC(pic8259_device::ir1_w));
|
||||
INPUT_MERGER_ANY_HIGH(config, "ir10").output_handler().set("pic8259_slave", FUNC(pic8259_device::ir2_w));
|
||||
}
|
||||
|
||||
void pc88va_state::pc88va(machine_config &config)
|
||||
{
|
||||
V50(config, m_maincpu, MASTER_CLOCK); // μPD9002, aka V50 + μPD70008AC (for PC8801 compatibility mode) in place of 8080
|
||||
@ -1138,6 +1177,8 @@ void pc88va_state::pc88va(machine_config &config)
|
||||
m_maincpu->in_memr_cb().set([this] (offs_t offset) { return m_maincpu->space(AS_PROGRAM).read_byte(offset); });
|
||||
m_maincpu->out_memw_cb().set([this] (offs_t offset, u8 data) { m_maincpu->space(AS_PROGRAM).write_byte(offset, data); });
|
||||
|
||||
pc88va_cbus(config);
|
||||
|
||||
// TODO: pc80s31k here
|
||||
|
||||
SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
|
||||
|
@ -14,18 +14,29 @@
|
||||
//#include "pc80s31k.h"
|
||||
#include "pc88va_sgp.h"
|
||||
|
||||
#include "bus/cbus/pc9801_cbus.h"
|
||||
#include "bus/msx/ctrl/ctrl.h"
|
||||
#include "cpu/nec/v5x.h"
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "imagedev/floppy.h"
|
||||
#include "machine/bankdev.h"
|
||||
#include "machine/i8255.h"
|
||||
#include "machine/input_merger.h"
|
||||
#include "machine/pic8259.h"
|
||||
#include "machine/timer.h"
|
||||
#include "machine/upd1990a.h"
|
||||
#include "machine/upd765.h"
|
||||
#include "sound/ymopn.h"
|
||||
|
||||
//#include "bus/cbus/amd98.h"
|
||||
//#include "bus/cbus/pc9801_26.h"
|
||||
#include "bus/cbus/pc9801_55.h"
|
||||
//#include "bus/cbus/pc9801_86.h"
|
||||
//#include "bus/cbus/pc9801_118.h"
|
||||
#include "bus/cbus/mpu_pc98.h"
|
||||
//#include "bus/cbus/sb16_ct2720.h"
|
||||
|
||||
|
||||
#include "emupal.h"
|
||||
#include "screen.h"
|
||||
#include "softlist.h"
|
||||
@ -46,6 +57,7 @@ public:
|
||||
, m_fdd(*this, "upd765:%u", 0U)
|
||||
, m_pic2(*this, "pic8259_slave")
|
||||
, m_rtc(*this, "rtc")
|
||||
, m_cbus(*this, "cbus%d", 0)
|
||||
, m_mouse_port(*this, "mouseport") // labelled "マウス" (mouse) - can't use "mouse" because of core -mouse option
|
||||
, m_opna(*this, "opna")
|
||||
, m_lspeaker(*this, "lspeaker")
|
||||
@ -97,6 +109,9 @@ protected:
|
||||
virtual void video_start() override ATTR_COLD;
|
||||
void palette_init(palette_device &palette) const;
|
||||
|
||||
protected:
|
||||
void pc88va_cbus(machine_config &config);
|
||||
|
||||
private:
|
||||
|
||||
required_device<v50_device> m_maincpu;
|
||||
@ -107,6 +122,7 @@ private:
|
||||
// required_device<pic8259_device> m_pic1;
|
||||
required_device<pic8259_device> m_pic2;
|
||||
required_device<upd4990a_device> m_rtc;
|
||||
required_device_array<pc9801_slot_device, 2> m_cbus;
|
||||
required_device<msx_general_purpose_port_device> m_mouse_port;
|
||||
required_device<ym2608_device> m_opna;
|
||||
required_device<speaker_device> m_lspeaker;
|
||||
|
Loading…
Reference in New Issue
Block a user