hds200: Hook up more devices

This commit is contained in:
Dirk Best 2021-12-07 18:00:40 +01:00
parent 78e60a6dd6
commit 105f67f905
2 changed files with 44 additions and 14 deletions

View File

@ -4,33 +4,35 @@
Human Designed Systems HDS200
ANSI/DEC-compatbile terminal
ANSI/DEC-compatible terminal
Hardware:
- Z80A (Z8400APS)
- Z80A DMA (Z8410APS)
- 2x SCN2681A
- SCN2674B
- 2x MB81416-12 DRAM (and two empty sockets)
- 2x TMM2016BP-90 (2k)
- 1x TMM2016AP-10 (2k)
- MK48Z02B-25 (2k)
- XTAL 3.6864 MHz (next go DUARTs)
- XTAL 8 MHz (CPU)
- XTAL 22.680 MHz and 35.640 MHz (video)
- XTAL 3.6864 MHz (next to DUARTs)
- XTAL 8 MHz (CPU)
- XTAL 22.680 MHz and 35.640 MHz (video)
TODO:
- Everything
Notes:
-
-
***************************************************************************/
#include "emu.h"
#include "cpu/z80/z80.h"
#include "machine/input_merger.h"
#include "machine/mc68681.h"
#include "machine/z80dma.h"
#include "machine/nvram.h"
#include "machine/z80dma.h"
#include "video/scn2674.h"
#include "emupal.h"
#include "screen.h"
@ -49,8 +51,10 @@ public:
hds200_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_dma(*this, "dma"),
m_screen(*this, "screen"),
m_avdc(*this, "avdc")
m_avdc(*this, "avdc"),
m_duart(*this, "duart%u", 0U)
{ }
void hds200(machine_config &config);
@ -63,8 +67,13 @@ private:
void io_map(address_map &map);
required_device<z80_device> m_maincpu;
required_device<z80dma_device> m_dma;
required_device<screen_device> m_screen;
required_device<scn2674_device> m_avdc;
required_device_array<scn2681_device, 2> m_duart;
void duart0_out_w(uint8_t data);
void duart1_out_w(uint8_t data);
};
@ -75,14 +84,17 @@ private:
void hds200_state::mem_map(address_map &map)
{
map(0x0000, 0x5fff).rom().region("maincpu", 0);
map(0x6000, 0x7fff).ram();
map(0x8000, 0x9fff).ram();
map(0xa000, 0xbfff).ram();
map(0x6800, 0x6fff).ram(); // nvram?
map(0x8000, 0xbfff).ram();
map(0xc000, 0xffff).noprw(); // expansion ram
}
void hds200_state::io_map(address_map &map)
{
map.global_mask(0xff);
map(0x00, 0x00).rw(m_dma, FUNC(z80dma_device::read), FUNC(z80dma_device::write));
map(0x20, 0x2f).rw(m_duart[0], FUNC(scn2681_device::read), FUNC(scn2681_device::write));
map(0x40, 0x4f).rw(m_duart[1], FUNC(scn2681_device::read), FUNC(scn2681_device::write));
map(0x60, 0x67).rw(m_avdc, FUNC(scn2674_device::read), FUNC(scn2674_device::write));
}
@ -111,6 +123,16 @@ GFXDECODE_END
// MACHINE EMULATION
//**************************************************************************
void hds200_state::duart0_out_w(uint8_t data)
{
logerror("duart0_out_w: %02x\n", data);
}
void hds200_state::duart1_out_w(uint8_t data)
{
logerror("duart1_out_w: %02x\n", data);
}
void hds200_state::machine_start()
{
}
@ -126,9 +148,13 @@ void hds200_state::hds200(machine_config &config)
m_maincpu->set_addrmap(AS_PROGRAM, &hds200_state::mem_map);
m_maincpu->set_addrmap(AS_IO, &hds200_state::io_map);
input_merger_device &duart_irq(INPUT_MERGER_ANY_HIGH(config, "duart_irq"));
duart_irq.output_handler().set_inputline(m_maincpu, INPUT_LINE_IRQ0);
// NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
Z80DMA(config, "z80dma", 8_MHz_XTAL / 2); // divider not verified
Z80DMA(config, m_dma, 8_MHz_XTAL / 2); // divider not verified
m_dma->out_int_callback().set_inputline(m_maincpu, INPUT_LINE_NMI);
SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
m_screen->set_color(rgb_t::amber());
@ -143,9 +169,13 @@ void hds200_state::hds200(machine_config &config)
m_avdc->set_character_width(9);
m_avdc->set_screen("screen");
SCN2681(config, "duart1", 3.6864_MHz_XTAL);
SCN2681(config, m_duart[0], 3.6864_MHz_XTAL);
m_duart[0]->irq_cb().set("duart_irq", FUNC(input_merger_device::in_w<0>));
m_duart[0]->outport_cb().set(FUNC(hds200_state::duart0_out_w));
SCN2681(config, "duart2", 3.6864_MHz_XTAL);
SCN2681(config, m_duart[1], 3.6864_MHz_XTAL);
m_duart[1]->irq_cb().set("duart_irq", FUNC(input_merger_device::in_w<1>));
m_duart[1]->outport_cb().set(FUNC(hds200_state::duart1_out_w));
}

View File

@ -9,7 +9,7 @@
Hardware:
- 2x Z0840008PSC
- 32 MHz XTAL
- MB8464A-15LL-SK (next go EPR-12646)
- MB8464A-15LL-SK (next to EPR-12646)
- 2x ASSP 5C68A
- 4x HM65256BLSP (next to 5C68A)
- 315-5338