concept: Add master oscillator and some derivved clocks; hook up slot interrupts (nw)

This commit is contained in:
AJR 2019-01-22 20:46:52 -05:00
parent e4b7c93b07
commit 709559b754
4 changed files with 32 additions and 25 deletions

View File

@ -220,6 +220,7 @@ const double XTAL::known_xtals[] = {
16'000'000, /* 16_MHz_XTAL Extremely common, used on 100's of PCBs */ 16'000'000, /* 16_MHz_XTAL Extremely common, used on 100's of PCBs */
16'097'280, /* 16.09728_MHz_XTAL DEC VT240 (1024 * 262 * 60) */ 16'097'280, /* 16.09728_MHz_XTAL DEC VT240 (1024 * 262 * 60) */
16'128'000, /* 16.128_MHz_XTAL Fujitsu FM-7 */ 16'128'000, /* 16.128_MHz_XTAL Fujitsu FM-7 */
16'364'000, /* 16.364_MHz_XTAL Corvus Concept */
16'384'000, /* 16.384_MHz_XTAL - */ 16'384'000, /* 16.384_MHz_XTAL - */
16'400'000, /* 16.4_MHz_XTAL MS 6102 */ 16'400'000, /* 16.4_MHz_XTAL MS 6102 */
16'572'000, /* 16.572_MHz_XTAL Micro-Term ACT-5A */ 16'572'000, /* 16.572_MHz_XTAL Micro-Term ACT-5A */

View File

@ -13,7 +13,7 @@
LAN port (seems more or less similar to AppleTalk) LAN port (seems more or less similar to AppleTalk)
* 4 expansion ports enable to add expansion cards, namely floppy disk * 4 expansion ports enable to add expansion cards, namely floppy disk
and hard disk controllers (the expansion ports are partially compatible and hard disk controllers (the expansion ports are partially compatible
with Apple 2 expansion ports) with Apple 2 expansion ports; DMA is not supported)
Video: monochrome bitmapped display, 720*560 visible area (bitmaps are 768 Video: monochrome bitmapped display, 720*560 visible area (bitmaps are 768
pixels wide in memory). One interesting feature is the fact that the pixels wide in memory). One interesting feature is the fact that the
@ -39,6 +39,7 @@
#include "bus/a2bus/corvfdc01.h" #include "bus/a2bus/corvfdc01.h"
#include "bus/a2bus/corvfdc02.h" #include "bus/a2bus/corvfdc02.h"
#include "bus/rs232/rs232.h" #include "bus/rs232/rs232.h"
#include "machine/input_merger.h"
#include "emupal.h" #include "emupal.h"
#include "screen.h" #include "screen.h"
#include "speaker.h" #include "speaker.h"
@ -49,7 +50,7 @@ void concept_state::concept_memmap(address_map &map)
map(0x000008, 0x000fff).ram(); /* static RAM */ map(0x000008, 0x000fff).ram(); /* static RAM */
map(0x010000, 0x011fff).rom().region("maincpu", 0x010000); /* boot ROM */ map(0x010000, 0x011fff).rom().region("maincpu", 0x010000); /* boot ROM */
map(0x020000, 0x021fff).rom().region("macsbug", 0x0); /* macsbugs ROM (optional) */ map(0x020000, 0x021fff).rom().region("macsbug", 0x0); /* macsbugs ROM (optional) */
map(0x030000, 0x03ffff).rw(FUNC(concept_state::concept_io_r), FUNC(concept_state::concept_io_w)); /* I/O space */ map(0x030000, 0x03ffff).rw(FUNC(concept_state::io_r), FUNC(concept_state::io_w)).umask16(0x00ff); /* I/O space */
map(0x080000, 0x0fffff).ram().share("videoram");/* AM_RAMBANK(2) */ /* DRAM */ map(0x080000, 0x0fffff).ram().share("videoram");/* AM_RAMBANK(2) */ /* DRAM */
} }
@ -209,7 +210,7 @@ void concept_a2_cards(device_slot_interface &device)
void concept_state::concept(machine_config &config) void concept_state::concept(machine_config &config)
{ {
/* basic machine hardware */ /* basic machine hardware */
M68000(config, m_maincpu, 8182000); /* 16.364 MHz / 2 */ M68000(config, m_maincpu, 16.364_MHz_XTAL / 2);
m_maincpu->set_addrmap(AS_PROGRAM, &concept_state::concept_memmap); m_maincpu->set_addrmap(AS_PROGRAM, &concept_state::concept_memmap);
config.m_minimum_quantum = attotime::from_hz(60); config.m_minimum_quantum = attotime::from_hz(60);
@ -232,12 +233,12 @@ void concept_state::concept(machine_config &config)
SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 1.00); SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 1.00);
/* rtc */ /* rtc */
MM58274C(config, m_mm58274, 0); MM58274C(config, m_mm58274, 32.768_kHz_XTAL);
m_mm58274->set_mode24(0); // 12 hour m_mm58274->set_mode24(0); // 12 hour
m_mm58274->set_day1(1); // monday m_mm58274->set_day1(1); // monday
/* via */ /* via */
VIA6522(config, m_via0, 1022750); VIA6522(config, m_via0, 16.364_MHz_XTAL / 16);
m_via0->readpa_handler().set(FUNC(concept_state::via_in_a)); m_via0->readpa_handler().set(FUNC(concept_state::via_in_a));
m_via0->readpb_handler().set(FUNC(concept_state::via_in_b)); m_via0->readpb_handler().set(FUNC(concept_state::via_in_b));
m_via0->writepa_handler().set(FUNC(concept_state::via_out_a)); m_via0->writepa_handler().set(FUNC(concept_state::via_out_a));
@ -246,24 +247,28 @@ void concept_state::concept(machine_config &config)
m_via0->irq_handler().set(FUNC(concept_state::via_irq_func)); m_via0->irq_handler().set(FUNC(concept_state::via_irq_func));
/* ACIAs */ /* ACIAs */
MOS6551(config, m_acia0, 0); MOS6551(config, m_acia0, 16.364_MHz_XTAL / 16);
m_acia0->set_xtal(XTAL(1'843'200)); m_acia0->set_xtal(16.364_MHz_XTAL / 9);
m_acia0->txd_handler().set("rs232a", FUNC(rs232_port_device::write_txd)); m_acia0->txd_handler().set("rs232a", FUNC(rs232_port_device::write_txd));
MOS6551(config, m_acia1, 0); MOS6551(config, m_acia1, 16.364_MHz_XTAL / 16);
m_acia1->set_xtal(XTAL(1'843'200)); m_acia1->set_xtal(16.364_MHz_XTAL / 9);
m_acia1->txd_handler().set("rs232b", FUNC(rs232_port_device::write_txd)); m_acia1->txd_handler().set("rs232b", FUNC(rs232_port_device::write_txd));
MOS6551(config, m_kbdacia, 0); MOS6551(config, m_kbdacia, 16.364_MHz_XTAL / 16);
m_kbdacia->set_xtal(XTAL(1'843'200)); m_kbdacia->set_xtal(16.364_MHz_XTAL / 9);
/* Apple II bus */ /* Apple II bus */
A2BUS(config, m_a2bus, 0).set_space(m_maincpu, AS_PROGRAM); A2BUS(config, m_a2bus, 0).set_space(m_maincpu, AS_PROGRAM);
m_a2bus->nmi_w().set("iocint", FUNC(input_merger_device::in_w<0>));
m_a2bus->irq_w().set("iocint", FUNC(input_merger_device::in_w<1>));
A2BUS_SLOT(config, "sl1", m_a2bus, concept_a2_cards, nullptr); A2BUS_SLOT(config, "sl1", m_a2bus, concept_a2_cards, nullptr);
A2BUS_SLOT(config, "sl2", m_a2bus, concept_a2_cards, nullptr); A2BUS_SLOT(config, "sl2", m_a2bus, concept_a2_cards, nullptr);
A2BUS_SLOT(config, "sl3", m_a2bus, concept_a2_cards, nullptr); A2BUS_SLOT(config, "sl3", m_a2bus, concept_a2_cards, nullptr);
A2BUS_SLOT(config, "sl4", m_a2bus, concept_a2_cards, "fdc01"); A2BUS_SLOT(config, "sl4", m_a2bus, concept_a2_cards, "fdc01");
INPUT_MERGER_ANY_HIGH(config, "iocint").output_handler().set(FUNC(concept_state::ioc_interrupt));
/* 2x RS232 ports */ /* 2x RS232 ports */
rs232_port_device &rs232a(RS232_PORT(config, "rs232a", default_rs232_devices, nullptr)); rs232_port_device &rs232a(RS232_PORT(config, "rs232a", default_rs232_devices, nullptr));
rs232a.rxd_handler().set(m_acia0, FUNC(mos6551_device::write_rxd)); rs232a.rxd_handler().set(m_acia0, FUNC(mos6551_device::write_rxd));

View File

@ -41,6 +41,9 @@ public:
m_videoram(*this,"videoram") m_videoram(*this,"videoram")
{ } { }
void concept(machine_config &config);
private:
required_device<cpu_device> m_maincpu; required_device<cpu_device> m_maincpu;
required_device<mos6551_device> m_acia0; required_device<mos6551_device> m_acia0;
required_device<mos6551_device> m_acia1; required_device<mos6551_device> m_acia1;
@ -54,8 +57,8 @@ public:
uint8_t m_pending_interrupts; uint8_t m_pending_interrupts;
bool m_clock_enable; bool m_clock_enable;
uint8_t m_clock_address; uint8_t m_clock_address;
DECLARE_READ16_MEMBER(concept_io_r); DECLARE_READ8_MEMBER(io_r);
DECLARE_WRITE16_MEMBER(concept_io_w); DECLARE_WRITE8_MEMBER(io_w);
virtual void machine_start() override; virtual void machine_start() override;
virtual void machine_reset() override; virtual void machine_reset() override;
virtual void video_start() override; virtual void video_start() override;
@ -67,8 +70,9 @@ public:
DECLARE_WRITE8_MEMBER(via_out_b); DECLARE_WRITE8_MEMBER(via_out_b);
DECLARE_WRITE_LINE_MEMBER(via_out_cb2); DECLARE_WRITE_LINE_MEMBER(via_out_cb2);
DECLARE_WRITE_LINE_MEMBER(via_irq_func); DECLARE_WRITE_LINE_MEMBER(via_irq_func);
DECLARE_WRITE_LINE_MEMBER(ioc_interrupt);
void concept_set_interrupt(int level, int state); void concept_set_interrupt(int level, int state);
void concept(machine_config &config);
void concept_memmap(address_map &map); void concept_memmap(address_map &map);
}; };

View File

@ -73,6 +73,11 @@ uint32_t concept_state::screen_update(screen_device &screen, bitmap_ind16 &bitma
return 0; return 0;
} }
WRITE_LINE_MEMBER(concept_state::ioc_interrupt)
{
concept_set_interrupt(IOCINT_level, state);
}
void concept_state::concept_set_interrupt(int level, int state) void concept_state::concept_set_interrupt(int level, int state)
{ {
int interrupt_mask; int interrupt_mask;
@ -164,11 +169,8 @@ WRITE_LINE_MEMBER(concept_state::via_irq_func)
concept_set_interrupt(TIMINT_level, state); concept_set_interrupt(TIMINT_level, state);
} }
READ16_MEMBER(concept_state::concept_io_r) READ8_MEMBER(concept_state::io_r)
{ {
if (! ACCESSING_BITS_0_7)
return 0;
switch ((offset >> 8) & 7) switch ((offset >> 8) & 7)
{ {
case 0: case 0:
@ -216,7 +218,7 @@ READ16_MEMBER(concept_state::concept_io_r)
case 5: case 5:
/* slot status */ /* slot status */
LOG(("concept_io_r: Slot status read at address 0x03%4.4x\n", offset << 1)); LOG(("concept_io_r: Slot status read at address 0x03%4.4x\n", offset << 1));
break; return (~m_a2bus->get_a2bus_nmi_mask() & 0x0f) | (~m_a2bus->get_a2bus_irq_mask() & 0x0f) << 4;
case 6: case 6:
/* calendar R/W */ /* calendar R/W */
@ -275,13 +277,8 @@ READ16_MEMBER(concept_state::concept_io_r)
return 0; return 0;
} }
WRITE16_MEMBER(concept_state::concept_io_w) WRITE8_MEMBER(concept_state::io_w)
{ {
if (! ACCESSING_BITS_0_7)
return;
data &= 0xff;
switch ((offset >> 8) & 7) switch ((offset >> 8) & 7)
{ {
case 0: case 0: