summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/devices/bus/s100/polyfdc.cpp108
-rw-r--r--src/devices/bus/s100/polyfdc.h18
-rw-r--r--src/devices/bus/s100/polyvti.cpp329
-rw-r--r--src/devices/bus/s100/polyvti.h18
-rw-r--r--src/devices/bus/s100/s100.h1
-rw-r--r--src/mame/drivers/poly88.cpp159
-rw-r--r--src/mame/drivers/saitek_stratos.cpp238
-rw-r--r--src/mame/drivers/slapshot.cpp8
-rw-r--r--src/mame/includes/poly88.h52
-rw-r--r--src/mame/layout/saitek_stratos.lay435
-rw-r--r--src/mame/machine/poly88.cpp87
-rw-r--r--src/mame/video/poly88.cpp102
12 files changed, 1136 insertions, 419 deletions
diff --git a/src/devices/bus/s100/polyfdc.cpp b/src/devices/bus/s100/polyfdc.cpp
new file mode 100644
index 00000000000..ca5defd523c
--- /dev/null
+++ b/src/devices/bus/s100/polyfdc.cpp
@@ -0,0 +1,108 @@
+// license:BSD-3-Clause
+// copyright-holders:AJR
+/***************************************************************************
+
+ PolyMorphic Systems Disk Controller
+
+ This board controls up to three Shugart SA-400 drives using only
+ generic serial and parallel interface chips and TTL (and an onboard
+ 4 MHz XTAL). No schematics for this board have been found.
+
+****************************************************************************/
+
+#include "emu.h"
+#include "polyfdc.h"
+
+#include "machine/i8255.h"
+#include "machine/mc6852.h"
+
+class poly_fdc_device : public device_t, public device_s100_card_interface
+{
+public:
+ // construction/destruction
+ poly_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
+
+ static constexpr feature_type unemulated_features() { return feature::DISK; }
+
+protected:
+ // device-level overrides
+ virtual void device_start() override;
+ virtual void device_add_mconfig(machine_config &config) override;
+
+ // device_s100_card_interface overrides
+ virtual u8 s100_sinp_r(offs_t offset) override;
+ virtual void s100_sout_w(offs_t offset, u8 data) override;
+
+private:
+ void pa_w(u8 data);
+ u8 pb_r();
+ void pc_w(u8 data);
+
+ // object finders
+ required_device<mc6852_device> m_ssda;
+ required_device<i8255_device> m_ppi;
+};
+
+DEFINE_DEVICE_TYPE_PRIVATE(S100_POLY_FDC, device_s100_card_interface, poly_fdc_device, "polyfdc", "PolyMorphic Systems Disk Controller")
+
+poly_fdc_device::poly_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
+ : device_t(mconfig, S100_POLY_FDC, tag, owner, clock)
+ , device_s100_card_interface(mconfig, *this)
+ , m_ssda(*this, "ssda")
+ , m_ppi(*this, "ppi")
+{
+}
+
+void poly_fdc_device::device_start()
+{
+}
+
+u8 poly_fdc_device::s100_sinp_r(offs_t offset)
+{
+ if ((offset & 0xf000) == 0x2000)
+ {
+ if (BIT(offset, 11))
+ return m_ppi->read(offset & 3);
+ else
+ return m_ssda->read(offset & 1);
+ }
+
+ return 0xff;
+}
+
+void poly_fdc_device::s100_sout_w(offs_t offset, u8 data)
+{
+ if ((offset & 0xf000) == 0x2000)
+ {
+ if (BIT(offset, 11))
+ m_ppi->write(offset & 3, data);
+ else
+ m_ssda->write(offset & 1, data);
+ }
+}
+
+void poly_fdc_device::pa_w(u8 data)
+{
+}
+
+u8 poly_fdc_device::pb_r()
+{
+ return 0xff;
+}
+
+void poly_fdc_device::pc_w(u8 data)
+{
+ // Port B interrupt
+ m_bus->vi5_w(BIT(data, 0) ? ASSERT_LINE : CLEAR_LINE);
+}
+
+void poly_fdc_device::device_add_mconfig(machine_config &config)
+{
+ MC6852(config, m_ssda, 4_MHz_XTAL / 4); // actual clock unknown
+
+ I8255(config, m_ppi);
+ m_ppi->out_pa_callback().set(FUNC(poly_fdc_device::pa_w));
+ m_ppi->in_pb_callback().set(FUNC(poly_fdc_device::pb_r));
+ m_ppi->out_pc_callback().set(FUNC(poly_fdc_device::pc_w));
+ m_ppi->tri_pc_callback().set_constant(0xfe);
+}
diff --git a/src/devices/bus/s100/polyfdc.h b/src/devices/bus/s100/polyfdc.h
new file mode 100644
index 00000000000..066a6503341
--- /dev/null
+++ b/src/devices/bus/s100/polyfdc.h
@@ -0,0 +1,18 @@
+// license:BSD-3-Clause
+// copyright-holders:AJR
+/**********************************************************************
+
+ PolyMorphic Systems Disk Controller
+
+**********************************************************************/
+
+#ifndef MAME_BUS_S100_POLYFDC_H
+#define MAME_BUS_S100_POLYFDC_H
+
+#pragma once
+
+#include "bus/s100/s100.h"
+
+DECLARE_DEVICE_TYPE(S100_POLY_FDC, device_s100_card_interface)
+
+#endif // MAME_BUS_S100_POLYFDC_H
diff --git a/src/devices/bus/s100/polyvti.cpp b/src/devices/bus/s100/polyvti.cpp
new file mode 100644
index 00000000000..03ba6a39413
--- /dev/null
+++ b/src/devices/bus/s100/polyvti.cpp
@@ -0,0 +1,329 @@
+// license:BSD-3-Clause
+// copyright-holders:Miodrag Milanovic, AJR
+/***************************************************************************
+
+ PolyMorphic Systems Video Terminal Interface
+
+ Original implementation by Miodrag Milanovic
+ Converted to S-100 bus device by AJR
+
+ This video and keyboard interface board was a primary component of
+ PolyMorphic's System 88, but was also sold for use in other S-100
+ systems.
+
+ Any generic keyboard with a parallel ASCII interface can be used.
+ The actual keyboard provided by PolyMorphic Systems is almost entirely
+ based on TTL/LSTTL components.
+
+ The video timing circuit has no fixed dot clock, which is instead
+ generated by a VCO connected to a user-adjustable potentiometer. The
+ blanking and sync frequencies, on the other hand, are divisions of
+ either pin 49 of the S-100 bus or an optionally installable 2 MHz XTAL.
+
+****************************************************************************/
+
+#include "emu.h"
+#include "polyvti.h"
+
+#include "machine/i8212.h"
+#include "machine/keyboard.h"
+#include "emupal.h"
+#include "screen.h"
+
+class poly_vti_device : public device_t, public device_s100_card_interface
+{
+ static const u8 s_mcm6571a_shift[];
+
+public:
+ // construction/destruction
+ poly_vti_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
+
+protected:
+ // device-level overrides
+ virtual void device_start() override;
+ virtual ioport_constructor device_input_ports() const override;
+ virtual void device_add_mconfig(machine_config &config) override;
+ virtual const tiny_rom_entry *device_rom_region() const override;
+
+ // device_s100_card_interface overrides
+ virtual u8 s100_smemr_r(offs_t offset) override;
+ virtual void s100_mwrt_w(offs_t offset, u8 data) override;
+ virtual u8 s100_sinp_r(offs_t offset) override;
+
+private:
+ u32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+
+ void kbd_put(u8 data);
+ DECLARE_WRITE_LINE_MEMBER(kbd_int_w);
+
+ // object finders
+ required_device<i8212_device> m_kbdlatch;
+ required_region_ptr<u8> m_FNT;
+ required_ioport m_address;
+
+ // internal state
+ std::unique_ptr<u8[]> m_video_ram;
+};
+
+DEFINE_DEVICE_TYPE_PRIVATE(S100_POLY_VTI, device_s100_card_interface, poly_vti_device, "polyvti", "PolyMorphic Systems Video Terminal Interface")
+
+poly_vti_device::poly_vti_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
+ : device_t(mconfig, S100_POLY_VTI, tag, owner, clock)
+ , device_s100_card_interface(mconfig, *this)
+ , m_kbdlatch(*this, "kbdlatch")
+ , m_FNT(*this, "chargen")
+ , m_address(*this, "ADDRESS")
+{
+}
+
+void poly_vti_device::device_start()
+{
+ m_video_ram = make_unique_clear<u8[]>(0x400);
+ save_pointer(NAME(m_video_ram), 0x400);
+}
+
+const u8 poly_vti_device::s_mcm6571a_shift[] =
+{
+ 0,1,1,0,0,0,1,0,0,0,0,1,0,0,0,0,
+ 1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,
+ 1,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0
+};
+
+u32 poly_vti_device::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
+{
+ for (int y = 0; y < 16; y++)
+ {
+ u16 addr = y*64;
+ int xpos = 0;
+ for (int x = 0; x < 64; x++)
+ {
+ u8 code = m_video_ram[addr + x];
+ if ((code & 0x80)==0)
+ {
+ for (int j = 0; j < 15; j++)
+ {
+ u8 l = j/5;
+ for (int b = 0; b < 10; b++)
+ {
+ u8 r = b/5;
+ if (l==0 && r==0)
+ bitmap.pix16(y*15+j, xpos+b ) = BIT(code,5) ? 0 : 1;
+
+ if (l==0 && r==1)
+ bitmap.pix16(y*15+j, xpos+b ) = BIT(code,2) ? 0 : 1;
+
+ if (l==1 && r==0)
+ bitmap.pix16(y*15+j, xpos+b ) = BIT(code,4) ? 0 : 1;
+
+ if (l==1 && r==1)
+ bitmap.pix16(y*15+j, xpos+b ) = BIT(code,1) ? 0 : 1;
+
+ if (l==2 && r==0)
+ bitmap.pix16(y*15+j, xpos+b ) = BIT(code,3) ? 0 : 1;
+
+ if (l==2 && r==1)
+ bitmap.pix16(y*15+j, xpos+b ) = BIT(code,0) ? 0 : 1;
+ }
+ }
+ }
+ else
+ {
+ for (int j = 0; j < 15; j++)
+ {
+ code &= 0x7f;
+ int l = 0;
+ if (s_mcm6571a_shift[code]==0)
+ {
+ if (j < 9)
+ l = m_FNT[code*16 + j];
+ }
+ else
+ {
+ if ((j > 2) && (j < 12))
+ l = m_FNT[code*16 + j - 3];
+ }
+
+ for (int b = 0; b < 7; b++)
+ bitmap.pix16(y*15+j, xpos+b ) = (l >> (6-b)) & 1;
+
+ bitmap.pix16(y*15+j, xpos+7 ) = 0;
+ bitmap.pix16(y*15+j, xpos+8 ) = 0;
+ bitmap.pix16(y*15+j, xpos+9 ) = 0;
+ }
+ }
+ xpos += 10;
+ }
+ }
+ return 0;
+}
+
+u8 poly_vti_device::s100_smemr_r(offs_t offset)
+{
+ if ((offset & 0xfc00) >> 10 == m_address->read())
+ return m_video_ram[offset & 0x3ff];
+
+ return 0xff;
+}
+
+void poly_vti_device::s100_mwrt_w(offs_t offset, u8 data)
+{
+ if ((offset & 0xfc00) >> 10 == m_address->read())
+ m_video_ram[offset & 0x3ff] = data;
+}
+
+u8 poly_vti_device::s100_sinp_r(offs_t offset)
+{
+ if ((offset & 0xfc00) >> 10 == m_address->read())
+ return m_kbdlatch->read(machine().dummy_space(), 0);
+
+ return 0xff;
+}
+
+void poly_vti_device::kbd_put(u8 data)
+{
+ if (data)
+ {
+ if (data==8)
+ data=127; // fix backspace
+ m_kbdlatch->strobe(machine().dummy_space(), 0, data);
+ }
+}
+
+WRITE_LINE_MEMBER(poly_vti_device::kbd_int_w)
+{
+ // TODO: jumper selectable
+ m_bus->vi2_w(state);
+}
+
+static INPUT_PORTS_START(polyvti)
+ PORT_START("ADDRESS")
+ PORT_DIPNAME(0x3f, 0x3e, "Address Range") PORT_DIPLOCATION("SW:2,3,4,5,6,7")
+ PORT_DIPSETTING(0x00, "0000-03FF")
+ PORT_DIPSETTING(0x01, "0400-07FF")
+ PORT_DIPSETTING(0x02, "0800-0BFF")
+ PORT_DIPSETTING(0x03, "0C00-0FFF")
+ PORT_DIPSETTING(0x04, "1000-13FF")
+ PORT_DIPSETTING(0x05, "1400-17FF")
+ PORT_DIPSETTING(0x06, "1800-1BFF")
+ PORT_DIPSETTING(0x07, "1C00-1FFF")
+ PORT_DIPSETTING(0x08, "2000-23FF")
+ PORT_DIPSETTING(0x09, "2400-27FF")
+ PORT_DIPSETTING(0x0a, "2800-2BFF")
+ PORT_DIPSETTING(0x0b, "2C00-2FFF")
+ PORT_DIPSETTING(0x0c, "3000-33FF")
+ PORT_DIPSETTING(0x0d, "3400-37FF")
+ PORT_DIPSETTING(0x0e, "3800-3BFF")
+ PORT_DIPSETTING(0x0f, "3C00-3FFF")
+ PORT_DIPSETTING(0x10, "4000-43FF")
+ PORT_DIPSETTING(0x11, "4400-47FF")
+ PORT_DIPSETTING(0x12, "4800-4BFF")
+ PORT_DIPSETTING(0x13, "4C00-4FFF")
+ PORT_DIPSETTING(0x14, "5000-53FF")
+ PORT_DIPSETTING(0x15, "5400-57FF")
+ PORT_DIPSETTING(0x16, "5800-5BFF")
+ PORT_DIPSETTING(0x17, "5C00-5FFF")
+ PORT_DIPSETTING(0x18, "6000-63FF")
+ PORT_DIPSETTING(0x19, "6400-67FF")
+ PORT_DIPSETTING(0x1a, "6800-6BFF")
+ PORT_DIPSETTING(0x1b, "6C00-6FFF")
+ PORT_DIPSETTING(0x1c, "7000-73FF")
+ PORT_DIPSETTING(0x1d, "7400-77FF")
+ PORT_DIPSETTING(0x1e, "7800-7BFF")
+ PORT_DIPSETTING(0x1f, "7C00-7FFF")
+ PORT_DIPSETTING(0x20, "8000-83FF")
+ PORT_DIPSETTING(0x21, "8400-87FF")
+ PORT_DIPSETTING(0x22, "8800-8BFF")
+ PORT_DIPSETTING(0x23, "8C00-8FFF")
+ PORT_DIPSETTING(0x24, "9000-93FF")
+ PORT_DIPSETTING(0x25, "9400-97FF")
+ PORT_DIPSETTING(0x26, "9800-9BFF")
+ PORT_DIPSETTING(0x27, "9C00-9FFF")
+ PORT_DIPSETTING(0x28, "A000-A3FF")
+ PORT_DIPSETTING(0x29, "A400-A7FF")
+ PORT_DIPSETTING(0x2a, "A800-ABFF")
+ PORT_DIPSETTING(0x2b, "AC00-AFFF")
+ PORT_DIPSETTING(0x2c, "B000-B3FF")
+ PORT_DIPSETTING(0x2d, "B400-B7FF")
+ PORT_DIPSETTING(0x2e, "B800-BBFF")
+ PORT_DIPSETTING(0x2f, "BC00-BFFF")
+ PORT_DIPSETTING(0x30, "C000-C3FF")
+ PORT_DIPSETTING(0x31, "C400-C7FF")
+ PORT_DIPSETTING(0x32, "C800-CBFF")
+ PORT_DIPSETTING(0x33, "CC00-CFFF")
+ PORT_DIPSETTING(0x34, "D000-D3FF")
+ PORT_DIPSETTING(0x35, "D400-D7FF")
+ PORT_DIPSETTING(0x36, "D800-DBFF")
+ PORT_DIPSETTING(0x37, "DC00-DFFF")
+ PORT_DIPSETTING(0x38, "E000-E3FF")
+ PORT_DIPSETTING(0x39, "E400-E7FF")
+ PORT_DIPSETTING(0x3a, "E800-EBFF")
+ PORT_DIPSETTING(0x3b, "EC00-EFFF")
+ PORT_DIPSETTING(0x3c, "F000-F3FF")
+ PORT_DIPSETTING(0x3d, "F400-F7FF")
+ PORT_DIPSETTING(0x3e, "F800-FBFF")
+ PORT_DIPSETTING(0x3f, "FC00-FFFF")
+
+ PORT_START("UNUSED")
+ PORT_DIPNAME(1, 1, DEF_STR(Unused)) PORT_DIPLOCATION("SW:1")
+ PORT_DIPSETTING(1, DEF_STR(Off))
+ PORT_DIPSETTING(0, DEF_STR(On))
+INPUT_PORTS_END
+
+ioport_constructor poly_vti_device::device_input_ports() const
+{
+ return INPUT_PORTS_NAME(polyvti);
+}
+
+/* F4 Character Displayer */
+static const gfx_layout vti_charlayout =
+{
+ 8, 16, /* text = 7 x 9 */
+ 128, /* 128 characters */
+ 1, /* 1 bits per pixel */
+ { 0 }, /* no bitplanes */
+ /* x offsets */
+ { 0, 1, 2, 3, 4, 5, 6, 7 },
+ /* y offsets */
+ { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8, 8*8, 9*8, 10*8, 11*8, 12*8, 13*8, 14*8, 15*8 },
+ 8*16 /* every char takes 16 bytes */
+};
+
+static GFXDECODE_START(gfx_vti)
+ GFXDECODE_ENTRY("chargen", 0x0000, vti_charlayout, 0, 1)
+GFXDECODE_END
+
+void poly_vti_device::device_add_mconfig(machine_config &config)
+{
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
+ screen.set_size(64*10, 16*15);
+ screen.set_visarea(0, 64*10-1, 0, 16*15-1);
+ screen.set_screen_update(FUNC(poly_vti_device::screen_update));
+ screen.set_palette("palette");
+
+ GFXDECODE(config, "gfxdecode", "palette", gfx_vti);
+ PALETTE(config, "palette", palette_device::MONOCHROME);
+
+ generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard", 0));
+ keyboard.set_keyboard_callback(FUNC(poly_vti_device::kbd_put));
+
+ I8212(config, m_kbdlatch);
+ m_kbdlatch->md_rd_callback().set_constant(0);
+ m_kbdlatch->int_wr_callback().set(FUNC(poly_vti_device::kbd_int_w));
+}
+
+ROM_START(polyvti)
+ ROM_REGION(0x800, "chargen", 0)
+ ROM_LOAD("6571.bin", 0x0000, 0x0800, CRC(5a25144b) SHA1(7b9fee0c8ef2605b85d12b6d9fe8feb82418c63a))
+ROM_END
+
+const tiny_rom_entry *poly_vti_device::device_rom_region() const
+{
+ return ROM_NAME(polyvti);
+}
diff --git a/src/devices/bus/s100/polyvti.h b/src/devices/bus/s100/polyvti.h
new file mode 100644
index 00000000000..dcc9efe3d46
--- /dev/null
+++ b/src/devices/bus/s100/polyvti.h
@@ -0,0 +1,18 @@
+// license:BSD-3-Clause
+// copyright-holders:AJR
+/**********************************************************************
+
+ PolyMorphic Systems Video Terminal Interface
+
+**********************************************************************/
+
+#ifndef MAME_BUS_S100_POLYVTI_H
+#define MAME_BUS_S100_POLYVTI_H
+
+#pragma once
+
+#include "bus/s100/s100.h"
+
+DECLARE_DEVICE_TYPE(S100_POLY_VTI, device_s100_card_interface)
+
+#endif // MAME_BUS_S100_POLYVTI_H
diff --git a/src/devices/bus/s100/s100.h b/src/devices/bus/s100/s100.h
index f231520f694..cbaefb802a4 100644
--- a/src/devices/bus/s100/s100.h
+++ b/src/devices/bus/s100/s100.h
@@ -228,6 +228,7 @@ public:
}
s100_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+protected:
// device-level overrides
virtual void device_start() override;
diff --git a/src/mame/drivers/poly88.cpp b/src/mame/drivers/poly88.cpp
index c4eed823ae1..d4f80d7fb15 100644
--- a/src/mame/drivers/poly88.cpp
+++ b/src/mame/drivers/poly88.cpp
@@ -10,9 +10,7 @@ Poly-88 driver by Miodrag Milanovic
All input must be UPPERcase.
ToDo:
-- POLY88 - Polyphase format not working because 8251 device doesn't support sync.
-- POLY8813 - Schematic shows a 8251 on the main board.
-- POLY8813 - Schematic of FDC shows a mc6852 and i8255, no dedicated fdc chip.
+- Polyphase format not working because 8251 device doesn't support sync.
Poly-8813 is a disk-based computer with 3 mini-floppy drives.
@@ -45,119 +43,87 @@ at least some models of the Poly-88 are known to have used.)
#include "emu.h"
#include "includes/poly88.h"
+#include "bus/s100/polyfdc.h"
+#include "bus/s100/polyvti.h"
+#include "bus/s100/seals8k.h"
+
#include "cpu/i8085/i8085.h"
-//#include "bus/s100/s100.h"
#include "imagedev/cassette.h"
-#include "machine/keyboard.h"
-#include "emupal.h"
-#include "screen.h"
#include "speaker.h"
-void poly88_state::poly88_mem(address_map &map)
+void poly88_state::s100_mem(address_map &map)
{
- map.unmap_value_high();
- map(0x0000, 0x03ff).rom(); // Monitor ROM
- map(0x0400, 0x0bff).rom(); // ROM Expansion
- map(0x0c00, 0x0dff).ram().mirror(0x200); // System RAM (mirrored)
- map(0x1000, 0x1fff).rom(); // System Expansion area
- map(0x2000, 0x3fff).ram(); // Minimal user RAM area
- map(0x4000, 0xf7ff).ram();
- map(0xf800, 0xfbff).ram().share("video_ram"); // Video RAM
+ map(0x0000, 0xffff).rw(FUNC(poly88_state::mem_r), FUNC(poly88_state::mem_w));
}
-void poly88_state::poly88_io(address_map &map)
+void poly88_state::s100_io(address_map &map)
{
- map.unmap_value_high();
- map.global_mask(0xff);
- map(0x00, 0x01).rw(m_usart, FUNC(i8251_device::read), FUNC(i8251_device::write));
- map(0x04, 0x04).w(FUNC(poly88_state::baud_rate_w));
- map(0x08, 0x08).w(FUNC(poly88_state::intr_w));
- map(0xf8, 0xf8).r(FUNC(poly88_state::keyboard_r));
+ map(0x00, 0xff).rw(FUNC(poly88_state::in_r), FUNC(poly88_state::out_w));
}
-void poly88_state::poly8813_mem(address_map &map)
+void poly88_state::poly88_io(address_map &map)
{
map.unmap_value_high();
- map(0x0000, 0x03ff).rom(); // Monitor ROM
- map(0x0400, 0x0bff).rom(); // Disk System ROM
- map(0x0c00, 0x0fff).ram(); // System RAM
- map(0x1800, 0x1bff).ram().share("video_ram"); // Video RAM
- map(0x2000, 0xffff).ram(); // RAM
+ map(0x00, 0x01).mirror(2).rw(m_usart, FUNC(i8251_device::read), FUNC(i8251_device::write));
+ map(0x04, 0x04).mirror(3).w(FUNC(poly88_state::baud_rate_w));
+ map(0x08, 0x08).mirror(3).w(FUNC(poly88_state::intr_w));
}
void poly88_state::poly8813_io(address_map &map)
{
map.unmap_value_high();
- map.global_mask(0xff);
- map(0x00, 0x01).rw(m_usart, FUNC(i8251_device::read), FUNC(i8251_device::write));
- map(0x04, 0x04).w(FUNC(poly88_state::baud_rate_w));
+ map(0x00, 0x01).mirror(2).rw(m_usart, FUNC(i8251_device::read), FUNC(i8251_device::write));
+ map(0x04, 0x04).mirror(3).w(FUNC(poly88_state::baud_rate_w));
map(0x08, 0x0b); //.r(ROM on for CPM).w(RTC reset);
map(0x0c, 0x0f); //.r(ROM off for CPM).w(Single-step trigger);
- map(0x18, 0x18).r(FUNC(poly88_state::keyboard_r));
- map(0x20, 0x2f);//single-density fdc
}
/* Input ports */
static INPUT_PORTS_START( poly88 )
PORT_START("CONFIG")
- PORT_CONFNAME( 0x80, 0x00, "Tape Mode")
- PORT_CONFSETTING( 0x00, "Byte (300 baud)")
- PORT_CONFSETTING( 0x80, "Polyphase (2400 baud)")
+ PORT_CONFNAME(0x80, 0x00, "Tape Mode")
+ PORT_CONFSETTING( 0x00, "Byte (300 baud)")
+ PORT_CONFSETTING( 0x80, "Polyphase (2400 baud)")
+
+ PORT_START("ONBOARD")
+ PORT_CONFNAME(7, 0, "Onboard Addresses")
+ PORT_CONFSETTING(0, "0000-0FFF (M), 00-0F (I/O)") // jumper J
+ PORT_CONFSETTING(4, "8000-8FFF (M), 80-8F (I/O)") // jumper S
+ PORT_CONFSETTING(7, "E000-EFFF (M), E0-EF (I/O)") // jumper T
INPUT_PORTS_END
-void poly88_state::kbd_put(u8 data)
+static void poly88_s100_devices(device_slot_interface &device)
{
- if (data)
- {
- if (data==8)
- data=127; // fix backspace
- m_last_code = data;
- m_int_vector = 0xef;
- m_maincpu->set_input_line(0, HOLD_LINE);
- }
+ device.option_add("vti", S100_POLY_VTI);
+ device.option_add("8ksc", S100_8K_SC);
+ device.option_add("8kscbb", S100_8K_SC_BB);
+ device.option_add("polyfdc", S100_POLY_FDC);
}
+DEVICE_INPUT_DEFAULTS_START(poly88_vti_1800)
+ DEVICE_INPUT_DEFAULTS("ADDRESS", 0x3f, 0x06) // 1800-1FFF
+DEVICE_INPUT_DEFAULTS_END
-/* F4 Character Displayer */
-static const gfx_layout poly88_charlayout =
-{
- 8, 16, /* text = 7 x 9 */
- 128, /* 128 characters */
- 1, /* 1 bits per pixel */
- { 0 }, /* no bitplanes */
- /* x offsets */
- { 0, 1, 2, 3, 4, 5, 6, 7 },
- /* y offsets */
- { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8, 8*8, 9*8, 10*8, 11*8, 12*8, 13*8, 14*8, 15*8 },
- 8*16 /* every char takes 16 bytes */
-};
-
-static GFXDECODE_START( gfx_poly88 )
- GFXDECODE_ENTRY( "chargen", 0x0000, poly88_charlayout, 0, 1 )
-GFXDECODE_END
+DEVICE_INPUT_DEFAULTS_START(poly88_8ksc_2000)
+ DEVICE_INPUT_DEFAULTS("DSW", 0xff, 0xfd) // 2000-3FFF
+DEVICE_INPUT_DEFAULTS_END
void poly88_state::poly88(machine_config &config)
{
/* basic machine hardware */
I8080A(config, m_maincpu, 16.5888_MHz_XTAL / 9); // uses 8224 clock generator
- m_maincpu->set_addrmap(AS_PROGRAM, &poly88_state::poly88_mem);
- m_maincpu->set_addrmap(AS_IO, &poly88_state::poly88_io);
- m_maincpu->set_vblank_int("screen", FUNC(poly88_state::poly88_interrupt));
+ m_maincpu->set_addrmap(AS_PROGRAM, &poly88_state::s100_mem);
+ m_maincpu->set_addrmap(AS_IO, &poly88_state::s100_io);
m_maincpu->set_irq_acknowledge_callback(FUNC(poly88_state::poly88_irq_callback));
- /* video hardware */
- screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
- screen.set_refresh_hz(60);
- screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
- screen.set_size(64*10, 16*15);
- screen.set_visarea(0, 64*10-1, 0, 16*15-1);
- screen.set_screen_update(FUNC(poly88_state::screen_update_poly88));
- screen.set_palette("palette");
+ ADDRESS_MAP_BANK(config, m_onboard_io);
+ m_onboard_io->set_addrmap(0, &poly88_state::poly88_io);
+ m_onboard_io->set_data_width(8);
+ m_onboard_io->set_addr_width(4);
- GFXDECODE(config, "gfxdecode", "palette", gfx_poly88);
- PALETTE(config, "palette", palette_device::MONOCHROME);
+ TIMER(config, "rtc").configure_periodic(FUNC(poly88_state::rtc_tick), attotime::from_hz(60)); // from AC power
/* audio hardware */
SPEAKER(config, "mono").front_center();
@@ -179,45 +145,56 @@ void poly88_state::poly88(machine_config &config)
MM5307AA(config, m_brg, 16.5888_MHz_XTAL / 18);
m_brg->output_cb().set(FUNC(poly88_state::cassette_clock_w));
- generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard", 0));
- keyboard.set_keyboard_callback(FUNC(poly88_state::kbd_put));
-
/* snapshot */
SNAPSHOT(config, "snapshot", "img", attotime::from_seconds(2)).set_load_callback(FUNC(poly88_state::snapshot_cb), this);
+
+ S100_BUS(config, m_s100, 16.5888_MHz_XTAL / 9);
+ m_s100->vi2().set(FUNC(poly88_state::vi2_w));
+ m_s100->vi5().set(FUNC(poly88_state::vi5_w));
+
+ S100_SLOT(config, m_s100_slot[0], poly88_s100_devices, "vti");
+ S100_SLOT(config, m_s100_slot[1], poly88_s100_devices, nullptr);
+ S100_SLOT(config, m_s100_slot[2], poly88_s100_devices, nullptr);
+ S100_SLOT(config, m_s100_slot[3], poly88_s100_devices, nullptr);
}
void poly88_state::poly8813(machine_config &config)
{
poly88(config);
- m_maincpu->set_addrmap(AS_PROGRAM, &poly88_state::poly8813_mem);
- m_maincpu->set_addrmap(AS_IO, &poly88_state::poly8813_io);
+ m_onboard_io->set_addrmap(0, &poly88_state::poly8813_io);
+
+ m_s100_slot[0]->set_option_device_input_defaults("vti", DEVICE_INPUT_DEFAULTS_NAME(poly88_vti_1800));
+ m_s100_slot[1]->set_default_option("8ksc");
+ m_s100_slot[1]->set_option_device_input_defaults("8ksc", DEVICE_INPUT_DEFAULTS_NAME(poly88_8ksc_2000));
+ m_s100_slot[2]->set_default_option("polyfdc");
+
+ // Poly-8813 backplane has 10 slots, but CPU uses one
+ S100_SLOT(config, m_s100_slot[4], poly88_s100_devices, nullptr);
+ S100_SLOT(config, m_s100_slot[5], poly88_s100_devices, nullptr);
+ S100_SLOT(config, m_s100_slot[6], poly88_s100_devices, nullptr);
+ S100_SLOT(config, m_s100_slot[7], poly88_s100_devices, nullptr);
+ S100_SLOT(config, m_s100_slot[8], poly88_s100_devices, nullptr);
}
/* ROM definition */
ROM_START( poly88 )
- ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF )
+ ROM_REGION( 0xc00, "maincpu", ROMREGION_ERASEFF )
ROM_LOAD( "polymon4.bin", 0x0000, 0x0400, CRC(0baa1a4c) SHA1(c6cf4b89bdde200813d34aab08150d5f3025ce33))
ROM_LOAD( "tbasic_1.rom", 0x0400, 0x0400, CRC(ec22740e) SHA1(bc606c58ef5f046200bdf402eda66ec070464306))
ROM_LOAD( "tbasic_2.rom", 0x0800, 0x0400, CRC(f2619232) SHA1(eb6fb0356d2fb153111cfddf39eab10253cb4c53))
-
- ROM_REGION( 0x800, "chargen", 0 )
- ROM_LOAD( "6571.bin", 0x0000, 0x0800, CRC(5a25144b) SHA1(7b9fee0c8ef2605b85d12b6d9fe8feb82418c63a) )
ROM_END
ROM_START( poly8813 )
- ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF )
+ ROM_REGION( 0xc00, "maincpu", ROMREGION_ERASEFF )
ROM_LOAD( "poly8813.27", 0x0000, 0x0400, CRC(0baa1a4c) SHA1(c6cf4b89bdde200813d34aab08150d5f3025ce33) )
ROM_LOAD( "poly8813.26", 0x0400, 0x0400, CRC(7011f3a3) SHA1(228eb54b9f62649b3b674e9f1bf21f2981e12c03) )
ROM_LOAD( "poly8813.25", 0x0800, 0x0400, CRC(9f7570e2) SHA1(767f2111b4eb856a077b1b4afe9209aca3866e52) )
//ROM_LOAD( "poly8813-1.bin", 0x0000, 0x0400, CRC(7fd980a0) SHA1(a71d5999deb4323a11db1c0ea0dcb1dacfaf47ef))
//ROM_LOAD( "poly8813-2.rom", 0x0400, 0x0400, CRC(1ad7c06c) SHA1(c96b8f03c184de58dbdcee18d297dbccf2d77176))
//ROM_LOAD( "poly8813-3.rom", 0x0800, 0x0400, CRC(3df57e5b) SHA1(5b0c4febfc7515fc07e63dcb21d0ab32bc6a2e46))
-
- ROM_REGION( 0x800, "chargen", 0 )
- ROM_LOAD( "6571.bin", 0x0000, 0x0800, CRC(5a25144b) SHA1(7b9fee0c8ef2605b85d12b6d9fe8feb82418c63a) )
ROM_END
/* Driver */
// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS
-COMP( 1976, poly88, 0, 0, poly88, poly88, poly88_state, init_poly88, "PolyMorphic Systems", "Poly-88", 0 )
-COMP( 1977, poly8813, poly88, 0, poly8813, poly88, poly88_state, init_poly88, "PolyMorphic Systems", "Poly-8813", MACHINE_NOT_WORKING )
+COMP( 1976, poly88, 0, 0, poly88, poly88, poly88_state, empty_init, "PolyMorphic Systems", "Poly-88", 0 )
+COMP( 1977, poly8813, poly88, 0, poly8813, poly88, poly88_state, empty_init, "PolyMorphic Systems", "Poly-8813", MACHINE_NOT_WORKING )
diff --git a/src/mame/drivers/saitek_stratos.cpp b/src/mame/drivers/saitek_stratos.cpp
index 8c09af2c0f1..d297f030b19 100644
--- a/src/mame/drivers/saitek_stratos.cpp
+++ b/src/mame/drivers/saitek_stratos.cpp
@@ -9,14 +9,12 @@ TODO:
- corona: different addressmap, 64 leds
- add endgame rom (softwarelist?)
- clean up driver
-- does nvram work? maybe both ram chips battery-backed
-- add soft power off with STOP button(writes 0 to control_w), power-on with GO button
+- does nvram.u7 work?
***************************************************************************/
#include "emu.h"
#include "cpu/m6502/m65c02.h"
-#include "cpu/m6502/r65c02.h"
#include "machine/nvram.h"
#include "machine/sensorboard.h"
#include "machine/timer.h"
@@ -34,10 +32,11 @@ public:
stratos_state(const machine_config &mconfig, device_type type, const char *tag) :
driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
- nvram(*this, "nvram"),
- bank_8000(*this, "bank_8000"),
- bank_4000(*this, "bank_4000"),
- nvram_bank(*this, "nvram_bank"),
+ m_nvram(*this, "nvram.u7"),
+ m_rombank(*this, "rombank"),
+ m_extbank(*this, "extbank"),
+ m_nvrambank(*this, "nvrambank"),
+ m_irqtimer(*this, "irqtimer"),
m_lcd_busy(*this, "lcd_busy"),
m_board(*this, "board"),
m_display(*this, "display"),
@@ -47,10 +46,10 @@ public:
void stratos(machine_config &config);
void corona(machine_config &config);
- void tking(machine_config &config);
- void tkingd(machine_config &config);
+ void tking2(machine_config &config);
- void init_stratos();
+ DECLARE_INPUT_CHANGED_MEMBER(cpu_freq) { set_cpu_freq(); }
+ DECLARE_INPUT_CHANGED_MEMBER(go_button);
private:
DECLARE_WRITE8_MEMBER(p2000_w);
@@ -64,26 +63,30 @@ private:
void stratos_mem(address_map &map);
- TIMER_DEVICE_CALLBACK_MEMBER(helios_tick);
+ TIMER_DEVICE_CALLBACK_MEMBER(interrupt);
+ void set_cpu_freq();
- std::unique_ptr<uint8_t[]> nvram_data;
- uint8_t control, m_select;
- uint32_t ind_leds;
+ std::unique_ptr<uint8_t[]> m_nvram_data;
+ u8 m_select;
+ u8 m_control;
+ u8 m_led_data;
bool m_lcd_written;
- u8 m_lcd_address;
- u8 m_lcd_ram[0x100];
- u8 m_lcd_latch;
+ //u8 m_lcd_address;
+ //u8 m_lcd_ram[0x100];
+ //u8 m_lcd_latch;
u8 m_lcd_data;
void show_leds();
virtual void machine_reset() override;
+ virtual void machine_start() override;
required_device<m65c02_device> m_maincpu;
- required_device<nvram_device> nvram;
- required_memory_bank bank_8000;
- required_memory_bank bank_4000;
- required_memory_bank nvram_bank;
+ required_device<nvram_device> m_nvram;
+ required_memory_bank m_rombank;
+ required_memory_bank m_extbank;
+ required_memory_bank m_nvrambank;
+ required_device<timer_device> m_irqtimer;
required_device<timer_device> m_lcd_busy;
required_device<sensorboard_device> m_board;
required_device<pwm_display_device> m_display;
@@ -91,44 +94,62 @@ private:
required_ioport_array<8> m_inputs;
};
-void stratos_state::init_stratos()
+
+void stratos_state::machine_start()
{
- nvram_data = std::make_unique<uint8_t[]>(0x2000);
- nvram->set_base(nvram_data.get(), 0x2000);
+ m_nvram_data = std::make_unique<uint8_t[]>(0x2000);
+ m_nvram->set_base(m_nvram_data.get(), 0x2000);
+
+ m_rombank->configure_entries(0, 2, memregion("maincpu")->base(), 0x8000);
+ m_extbank->configure_entries(0, 2, memregion("ext")->base(), 0x4000);
+ m_nvrambank->configure_entries(0, 2, m_nvram_data.get(), 0x1000);
- bank_8000 ->configure_entries(0, 2, memregion("roms_8000")->base(), 0x8000);
- bank_4000 ->configure_entries(0, 2, memregion("roms_4000")->base(), 0x4000);
- nvram_bank->configure_entries(0, 2, nvram_data.get(), 0x1000);
+ m_control = 0x40;
}
void stratos_state::machine_reset()
{
- control = 0x00;
+ set_cpu_freq();
+ m_control = 0x40;
m_select = 0x00;
- bank_8000 ->set_entry(0);
- bank_4000 ->set_entry(0);
- nvram_bank->set_entry(0);
+ m_rombank->set_entry(0);
+ m_extbank->set_entry(0);
+ m_nvrambank->set_entry(0);
}
-void stratos_state::show_leds()
+void stratos_state::set_cpu_freq()
{
- m_display->matrix_partial(2, 4, ~m_select >> 4 & 0xf, 1 << (m_select & 0xf), false);
- m_display->matrix_partial(0, 2, 1 << (control >> 5 & 1), (~ind_leds & 0xff) | (~control << 6 & 0x100));
+ m_maincpu->set_unscaled_clock((ioport("FAKE")->read() & 1) ? 5.67_MHz_XTAL : 5_MHz_XTAL);
+
+ attotime period = attotime::from_hz(m_maincpu->unscaled_clock() / 0x10000);
+ m_irqtimer->adjust(period, 0, period);
}
-TIMER_DEVICE_CALLBACK_MEMBER(stratos_state::helios_tick)
+void stratos_state::show_leds()
{
+ m_display->matrix_partial(0, 2, 1 << (m_control >> 5 & 1), (~m_led_data & 0xff) | (~m_control << 6 & 0x100));
+}
-
+TIMER_DEVICE_CALLBACK_MEMBER(stratos_state::interrupt)
+{
m_maincpu->set_input_line(M65C02_IRQ_LINE, HOLD_LINE);
}
+INPUT_CHANGED_MEMBER(stratos_state::go_button)
+{
+ if (newval && ~m_control & 0x40)
+ {
+ m_maincpu->set_input_line(INPUT_LINE_RESET, CLEAR_LINE);
+ machine_reset();
+ }
+}
+
WRITE8_MEMBER(stratos_state::p2000_w)
{
m_dac->write(0); // guessed
m_select = data;
- show_leds();
+ m_display->matrix_partial(2, 4, ~m_select >> 4 & 0xf, 1 << (m_select & 0xf));
}
READ8_MEMBER(stratos_state::p2200_r)
@@ -143,7 +164,7 @@ WRITE8_MEMBER(stratos_state::p2200_w)
WRITE8_MEMBER(stratos_state::p2400_w)
{
- ind_leds = data;
+ m_led_data = data;
show_leds();
}
@@ -172,12 +193,23 @@ READ8_MEMBER(stratos_state::control_r)
WRITE8_MEMBER(stratos_state::control_w)
{
- control = data;
- bank_8000->set_entry(data >> 0 & 1);
- bank_4000->set_entry(data >> 1 & 1); // ?
- nvram_bank->set_entry((data >> 1) & 1);
+ u8 prev = m_control;
+
+ m_control = data;
+ m_rombank->set_entry(data >> 0 & 1);
+ m_extbank->set_entry(data >> 1 & 1); // ?
+ m_nvrambank->set_entry((data >> 1) & 1);
show_leds();
+
+ // d6 falling edge: power-off request
+ if (~data & prev & 0x40)
+ {
+ m_maincpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
+
+ // clear display
+ m_display->matrix(0, 0);
+ }
}
@@ -196,72 +228,81 @@ WRITE8_MEMBER(stratos_state::lcd_w)
void stratos_state::stratos_mem(address_map &map)
{
- map(0x0000, 0x1fff).ram();
+ map(0x0000, 0x1fff).ram().share("nvram.u6");
map(0x2000, 0x2000).w(FUNC(stratos_state::p2000_w));
map(0x2200, 0x2200).rw(FUNC(stratos_state::p2200_r), FUNC(stratos_state::p2200_w));
map(0x2400, 0x2400).w(FUNC(stratos_state::p2400_w));
map(0x2600, 0x2600).rw(FUNC(stratos_state::control_r), FUNC(stratos_state::control_w));
- map(0x2800, 0x37ff).bankrw("nvram_bank");
+ map(0x2800, 0x37ff).bankrw("nvrambank");
map(0x3800, 0x3800).rw(FUNC(stratos_state::lcd_r), FUNC(stratos_state::lcd_w));
- map(0x4000, 0x7fff).bankr("bank_4000");
- map(0x8000, 0xffff).bankr("bank_8000");
+ map(0x4000, 0x7fff).bankr("extbank");
+ map(0x8000, 0xffff).bankr("rombank");
}
static INPUT_PORTS_START( stratos )
PORT_START("IN.0")
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_1) // setup
- PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_2) // level
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_3)
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_E) PORT_NAME("Set Up")
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_R) PORT_CODE(KEYCODE_L) PORT_NAME("Level")
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_UNUSED)
PORT_START("IN.1")
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_4) // sound
- PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_5) // stop?
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_6) // new game?
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_X) PORT_NAME("Sound")
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_Z) PORT_NAME("Stop")
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_S) PORT_CODE(KEYCODE_N) PORT_NAME("New Game")
PORT_START("IN.2")
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_7) // rook
- PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_8) // pawn
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_9) // bishop
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("Rook")
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("Pawn")
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("Bishop")
PORT_START("IN.3")
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_Q) // queen
- PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_W) // knight
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_E) // king
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("Queen")
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("Knight")
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("King")
PORT_START("IN.4")
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_R) // play
- PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_T) // tab/color
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_Y) // -
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_U) PORT_NAME("Play")
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_V) PORT_NAME("Tab / Color")
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_C) PORT_CODE(KEYCODE_MINUS) PORT_CODE(KEYCODE_MINUS_PAD) PORT_NAME("-")
PORT_START("IN.5")
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_U) // +
- PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_I) // function
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_O)
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_D) PORT_CODE(KEYCODE_EQUALS) PORT_CODE(KEYCODE_PLUS_PAD) PORT_NAME("+")
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_F) PORT_NAME("Function")
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_UNUSED)
PORT_START("IN.6")
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_A) // library
- PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_S) // info
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_D)
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_T) PORT_NAME("Library")
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_Y) PORT_NAME("Info")
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_UNUSED)
PORT_START("IN.7")
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_F)
- PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_G) // analysis
- PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_H) // normal
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_UNUSED)
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_W) PORT_NAME("Analysis")
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_Q) PORT_NAME("Normal")
+
+ PORT_START("RESET")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_A) PORT_CHANGED_MEMBER(DEVICE_SELF, stratos_state, go_button, nullptr) PORT_NAME("Go")
+
+ PORT_START("FAKE")
+ PORT_CONFNAME( 0x01, 0x00, "CPU Frequency" ) PORT_CHANGED_MEMBER(DEVICE_SELF, stratos_state, cpu_freq, nullptr) // factory set
+ PORT_CONFSETTING( 0x00, "5MHz" )
+ PORT_CONFSETTING( 0x01, "5.67MHz" )
INPUT_PORTS_END
void stratos_state::stratos(machine_config &config)
{
/* basic machine hardware */
- M65C02(config, m_maincpu, 5.67_MHz_XTAL);
+ M65C02(config, m_maincpu, 5_MHz_XTAL); // see set_cpu_freq
m_maincpu->set_addrmap(AS_PROGRAM, &stratos_state::stratos_mem);
- NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
+ NVRAM(config, "nvram.u6", nvram_device::DEFAULT_ALL_0);
+ NVRAM(config, "nvram.u7", nvram_device::DEFAULT_ALL_0);
SENSORBOARD(config, m_board).set_type(sensorboard_device::BUTTONS);
m_board->init_cb().set(m_board, FUNC(sensorboard_device::preset_chess));
m_board->set_delay(attotime::from_msec(350));
- TIMER(config, "helios").configure_periodic(FUNC(stratos_state::helios_tick), attotime::from_hz(5.67_MHz_XTAL / 0x10000));
+ TIMER(config, "irqtimer").configure_generic(FUNC(stratos_state::interrupt));
TIMER(config, "lcd_busy").configure_generic(timer_device::expired_delegate());
/* video hardware */
@@ -281,87 +322,76 @@ void stratos_state::corona(machine_config &config)
m_board->set_type(sensorboard_device::MAGNETS);
}
-void stratos_state::tking(machine_config &config)
+void stratos_state::tking2(machine_config &config)
{
stratos(config);
- /* basic machine hardware */
- R65C02(config.replace(), m_maincpu, 5_MHz_XTAL); // R65C02P4
- m_maincpu->set_addrmap(AS_PROGRAM, &stratos_state::stratos_mem);
-
- TIMER(config.replace(), "helios").configure_periodic(FUNC(stratos_state::helios_tick), attotime::from_hz(5_MHz_XTAL / 0x10000));
-}
-
-void stratos_state::tkingd(machine_config &config)
-{
- tking(config);
-
// seems much more responsive
m_board->set_delay(attotime::from_msec(200));
}
ROM_START( stratos )
- ROM_REGION( 0x10000, "roms_8000", 0 )
+ ROM_REGION( 0x10000, "maincpu", 0 )
ROM_LOAD("w1y01f_728m_u3.u3", 0x0000, 0x8000, CRC(b58a7256) SHA1(75b3a3a65f4ca8d52aa5b17a06319bff59d9014f) )
ROM_LOAD("bw1_819n_u4.u4", 0x8000, 0x8000, CRC(cb0de631) SHA1(f78d40213be21775966cbc832d64acd9b73de632) )
- ROM_REGION( 0x8000, "roms_4000", 0 )
+ ROM_REGION( 0x8000, "ext", 0 )
ROM_FILL( 0x0000, 0x8000, 0xff )
ROM_END
ROM_START( stratosl )
- ROM_REGION( 0x10000, "roms_8000", 0 )
+ ROM_REGION( 0x10000, "maincpu", 0 )
ROM_LOAD("w1y01f_728l_u3.u3", 0x0000, 0x8000, CRC(19a22058) SHA1(a5ca54d870c70b7ce9c7be2951800bf49cc57527) )
ROM_LOAD("bw1_819n_u4.u4", 0x8000, 0x8000, CRC(cb0de631) SHA1(f78d40213be21775966cbc832d64acd9b73de632) )
- ROM_REGION( 0x8000, "roms_4000", 0 )
+ ROM_REGION( 0x8000, "ext", 0 )
ROM_FILL( 0x0000, 0x8000, 0xff )
ROM_END
ROM_START( tking )
- ROM_REGION( 0x10000, "roms_8000", 0 )
+ ROM_REGION( 0x10000, "maincpu", 0 )
ROM_LOAD("y01f_713d_u3.u3", 0x0000, 0x8000, CRC(b8c6d853) SHA1(98923f44bbbd2ea17c269850971d3df229e6057e) )
ROM_LOAD("y01f_712a_u4.u4", 0x8000, 0x8000, CRC(7d3f8f7b) SHA1(8be5d8d988ff0577ccfec0a773bfd94599f2534f) )
- ROM_REGION( 0x8000, "roms_4000", 0 )
+ ROM_REGION( 0x8000, "ext", 0 )
ROM_FILL( 0x0000, 0x8000, 0xff )
ROM_END
ROM_START( tkingl )
- ROM_REGION( 0x10000, "roms_8000", 0 )
+ ROM_REGION( 0x10000, "maincpu", 0 )
ROM_LOAD("w1y01f_728l_u3.u3", 0x0000, 0x8000, CRC(19a22058) SHA1(a5ca54d870c70b7ce9c7be2951800bf49cc57527) )
ROM_LOAD("y01f-b_819o_u4.u4", 0x8000, 0x8000, CRC(336040d4) SHA1(aca662b8cc4d6bafd61ca158c768ba8896117169) )
- ROM_REGION( 0x8000, "roms_4000", 0 )
+ ROM_REGION( 0x8000, "ext", 0 )
ROM_FILL( 0x0000, 0x8000, 0xff )
ROM_END
ROM_START( tkingp )
- ROM_REGION( 0x10000, "roms_8000", 0 )
+ ROM_REGION( 0x10000, "maincpu", 0 )
ROM_LOAD("w1y01f_728p_u3.u3", 0x0000, 0x8000, CRC(ad77f83e) SHA1(598fdb1e40267d9d43a3d8f287723070b9afa349) )
ROM_LOAD("y01f-b_819o_u4.u4", 0x8000, 0x8000, CRC(336040d4) SHA1(aca662b8cc4d6bafd61ca158c768ba8896117169) )
- ROM_REGION( 0x8000, "roms_4000", 0 )
+ ROM_REGION( 0x8000, "ext", 0 )
ROM_FILL( 0x0000, 0x8000, 0xff )
ROM_END
ROM_START( corona )
- ROM_REGION( 0x10000, "roms_8000", 0 )
+ ROM_REGION( 0x10000, "maincpu", 0 )
ROM_LOAD("w2_708g_u2-a.u2", 0x0000, 0x8000, CRC(52568bb4) SHA1(83fe91787e17bbefc2b3ec651ddb11c88990060d) )
ROM_LOAD("bw2_708a_u3-b.u3", 0x8000, 0x8000, CRC(32848f73) SHA1(a447543e3eb4757f9afed26fde77b66985eb96a7) )
- ROM_REGION( 0x8000, "roms_4000", 0 )
+ ROM_REGION( 0x8000, "ext", 0 )
ROM_FILL( 0x0000, 0x8000, 0xff )
ROM_END
-/* YEAR NAME PARENT CMP MACHINE INPUT CLASS INIT COMPANY, FULLNAME, FLAGS */
-CONS( 1986, stratos, 0, 0, stratos, stratos, stratos_state, init_stratos, "SciSys", "Kasparov Stratos (rev. M)", MACHINE_NOT_WORKING | MACHINE_CLICKABLE_ARTWORK )
-CONS( 1986, stratosl, stratos, 0, stratos, stratos, stratos_state, init_stratos, "SciSys", "Kasparov Stratos (rev. L)", MACHINE_NOT_WORKING | MACHINE_CLICKABLE_ARTWORK )
+/* YEAR NAME PARENT CMP MACHINE INPUT CLASS INIT COMPANY, FULLNAME, FLAGS */
+CONS( 1986, stratos, 0, 0, stratos, stratos, stratos_state, empty_init, "SciSys", "Kasparov Stratos (rev. M)", MACHINE_NOT_WORKING | MACHINE_CLICKABLE_ARTWORK )
+CONS( 1986, stratosl, stratos, 0, stratos, stratos, stratos_state, empty_init, "SciSys", "Kasparov Stratos (rev. L)", MACHINE_NOT_WORKING | MACHINE_CLICKABLE_ARTWORK )
-CONS( 1990, tking, 0, 0, tkingd, stratos, stratos_state, init_stratos, "Saitek", "Kasparov Turbo King (rev. D)", MACHINE_NOT_WORKING | MACHINE_CLICKABLE_ARTWORK ) // aka Turbo King II
-CONS( 1988, tkingl, tking, 0, tking, stratos, stratos_state, init_stratos, "Saitek", "Kasparov Turbo King (rev. L)", MACHINE_NOT_WORKING | MACHINE_CLICKABLE_ARTWORK )
-CONS( 1988, tkingp, tking, 0, tking, stratos, stratos_state, init_stratos, "Saitek", "Kasparov Turbo King (rev. P)", MACHINE_NOT_WORKING | MACHINE_CLICKABLE_ARTWORK )
+CONS( 1990, tking, 0, 0, tking2, stratos, stratos_state, empty_init, "Saitek", "Kasparov Turbo King (rev. D)", MACHINE_NOT_WORKING | MACHINE_CLICKABLE_ARTWORK ) // aka Turbo King II
+CONS( 1988, tkingl, tking, 0, stratos, stratos, stratos_state, empty_init, "Saitek", "Kasparov Turbo King (rev. L)", MACHINE_NOT_WORKING | MACHINE_CLICKABLE_ARTWORK )
+CONS( 1988, tkingp, tking, 0, stratos, stratos, stratos_state, empty_init, "Saitek", "Kasparov Turbo King (rev. P)", MACHINE_NOT_WORKING | MACHINE_CLICKABLE_ARTWORK )
-CONS( 1988, corona, 0, 0, corona, stratos, stratos_state, init_stratos, "Saitek", "Kasparov Corona (rev. G)", MACHINE_NOT_WORKING | MACHINE_CLICKABLE_ARTWORK )
+CONS( 1988, corona, 0, 0, corona, stratos, stratos_state, empty_init, "Saitek", "Kasparov Corona (rev. G)", MACHINE_NOT_WORKING | MACHINE_CLICKABLE_ARTWORK )
diff --git a/src/mame/drivers/slapshot.cpp b/src/mame/drivers/slapshot.cpp
index 280c547b272..802f769b726 100644
--- a/src/mame/drivers/slapshot.cpp
+++ b/src/mame/drivers/slapshot.cpp
@@ -635,14 +635,14 @@ void slapshot_state::driver_init()
u8 *dest = srcdata;
for (int c = 0; c < gx0->elements(); c++)
{
- const u8 *c0base = gx0->get_data(c);
- const u8 *c1base = gx1->get_data(c);
+ const u16 *c0base = gx0->get_data(c);
+ const u16 *c1base = gx1->get_data(c);
// loop over height
for (int y = 0; y < gx0->height(); y++)
{
- const u8 *c0 = c0base;
- const u8 *c1 = c1base;
+ const u16 *c0 = c0base;
+ const u16 *c1 = c1base;
for (int x = 0; x < gx0->width(); x++)
{
diff --git a/src/mame/includes/poly88.h b/src/mame/includes/poly88.h
index 93a90caa2e7..5d063c9a813 100644
--- a/src/mame/includes/poly88.h
+++ b/src/mame/includes/poly88.h
@@ -10,6 +10,8 @@
#pragma once
+#include "bus/s100/s100.h"
+#include "machine/bankdev.h"
#include "machine/i8251.h"
#include "machine/mm5307.h"
#include "imagedev/cassette.h"
@@ -21,50 +23,66 @@ class poly88_state : public driver_device
public:
poly88_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag)
- , m_video_ram(*this, "video_ram")
, m_maincpu(*this, "maincpu")
+ , m_onboard_io(*this, "onboard_io")
+ , m_s100(*this, "s100")
+ , m_s100_slot(*this, "s100:%u", 1U)
, m_usart(*this, "usart")
, m_brg(*this, "brg")
, m_cassette(*this, "cassette")
+ , m_onboard_rom(*this, "maincpu")
, m_linec(*this, "CONFIG")
+ , m_onboard_config(*this, "ONBOARD")
{ }
void poly88(machine_config &config);
void poly8813(machine_config &config);
- void init_poly88();
+protected:
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
private:
- required_shared_ptr<uint8_t> m_video_ram;
- uint8_t *m_FNT;
- uint8_t m_last_code;
- uint8_t m_int_vector;
+ bool is_onboard(offs_t offset);
+ uint8_t mem_r(offs_t offset);
+ void mem_w(offs_t offset, uint8_t data);
+ uint8_t in_r(offs_t offset);
+ void out_w(offs_t offset, uint8_t data);
void baud_rate_w(uint8_t data);
- uint8_t keyboard_r();
void intr_w(uint8_t data);
- bool m_dtr, m_rts, m_txd, m_rxd, m_cassold;
- u8 m_cass_data[4];
- virtual void machine_reset() override;
- virtual void video_start() override;
- uint32_t screen_update_poly88(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- INTERRUPT_GEN_MEMBER(poly88_interrupt);
+
TIMER_DEVICE_CALLBACK_MEMBER(kansas_r);
DECLARE_WRITE_LINE_MEMBER(cassette_clock_w);
- void kbd_put(u8 data);
+ TIMER_DEVICE_CALLBACK_MEMBER(rtc_tick);
+ DECLARE_WRITE_LINE_MEMBER(vi2_w);
+ DECLARE_WRITE_LINE_MEMBER(vi5_w);
DECLARE_WRITE_LINE_MEMBER(usart_ready_w);
IRQ_CALLBACK_MEMBER(poly88_irq_callback);
DECLARE_SNAPSHOT_LOAD_MEMBER(snapshot_cb);
- void poly8813_io(address_map &map);
- void poly8813_mem(address_map &map);
- void poly88_io(address_map &map);
+ void s100_mem(address_map &map);
+ void s100_io(address_map &map);
void poly88_mem(address_map &map);
+ void poly88_io(address_map &map);
+ void poly8813_mem(address_map &map);
+ void poly8813_io(address_map &map);
required_device<cpu_device> m_maincpu;
+ required_device<address_map_bank_device> m_onboard_io;
+ required_device<s100_bus_device> m_s100;
+ optional_device_array<s100_slot_device, 9> m_s100_slot;
required_device<i8251_device> m_usart;
required_device<mm5307_device> m_brg;
required_device<cassette_image_device> m_cassette;
+ required_region_ptr<u8> m_onboard_rom;
required_ioport m_linec;
+ required_ioport m_onboard_config;
+
+ uint8_t m_int_vector;
+ bool m_dtr, m_rts, m_txd, m_rxd, m_cassold;
+ u8 m_cass_data[4];
+ std::unique_ptr<u8[]> m_onboard_ram;
+ bool m_onboard_disable;
};
#endif // MAME_INCLUDES_POLY88_H
diff --git a/src/mame/layout/saitek_stratos.lay b/src/mame/layout/saitek_stratos.lay
index 0fa12faa279..07c8be4afa6 100644
--- a/src/mame/layout/saitek_stratos.lay
+++ b/src/mame/layout/saitek_stratos.lay
@@ -3,6 +3,9 @@
<!-- define elements -->
+ <element name="black"><rect><color red="0.21" green="0.2" blue="0.2" /></rect></element>
+ <element name="text_mode"><text string="Mode" align="1"><color red="0.36" green="0.35" blue="0.35" /></text></element>
+
<element name="ledo">
<rect><color red="0.1" green="0.1" blue="0.1" /></rect>
</element>
@@ -15,6 +18,151 @@
<rect state="1"><color red="0" green="1" blue="0" /></rect>
</element>
+ <element name="hl" defstate="0">
+ <text string=" "/>
+ <rect state="1"><color red="1" green="1" blue="1" /></rect>
+ </element>
+
+ <element name="text_go">
+ <rect><color red="0.21" green="0.2" blue="0.2" /></rect>
+ <text string="Go"><color red="0.81" green="0.8" blue="0.79" /></text>
+ </element>
+ <element name="text_stop">
+ <rect><color red="0.21" green="0.2" blue="0.2" /></rect>
+ <text string="Stop"><color red="0.81" green="0.8" blue="0.79" /></text>
+ </element>
+ <element name="text_newgame">
+ <rect><color red="0.21" green="0.2" blue="0.2" /></rect>
+ <text string="New Game"> <color red="0.81" green="0.8" blue="0.79" /></text>
+ </element>
+ <element name="text_sound">
+ <rect><color red="0.21" green="0.2" blue="0.2" /></rect>
+ <text string="Sound"><color red="0.81" green="0.8" blue="0.79" /></text>
+ </element>
+ <element name="text_plus">
+ <rect><color red="0.21" green="0.2" blue="0.2" /></rect>
+ <text string="+"><color red="0.81" green="0.8" blue="0.79" /></text>
+ </element>
+ <element name="text_minus">
+ <rect><color red="0.21" green="0.2" blue="0.2" /></rect>
+ <text string="-"><color red="0.81" green="0.8" blue="0.79" /></text>
+ </element>
+ <element name="text_function">
+ <rect><color red="0.21" green="0.2" blue="0.2" /></rect>
+ <text string="Function"> <color red="0.81" green="0.8" blue="0.79" /></text>
+ </element>
+ <element name="text_tabcolor">
+ <rect><color red="0.21" green="0.2" blue="0.2" /></rect>
+ <text string="Tab/Color"><color red="0.81" green="0.8" blue="0.79" /></text>
+ </element>
+
+ <element name="text_normal">
+ <rect><color red="0.21" green="0.2" blue="0.2" /></rect>
+ <text string="Normal"><color red="0.81" green="0.8" blue="0.79" /></text>
+ </element>
+ <element name="text_analysis">
+ <rect><color red="0.21" green="0.2" blue="0.2" /></rect>
+ <text string="Analysis"><color red="0.81" green="0.8" blue="0.79" /></text>
+ </element>
+ <element name="text_setup">
+ <rect><color red="0.21" green="0.2" blue="0.2" /></rect>
+ <text string="Set Up"><color red="0.81" green="0.8" blue="0.79" /></text>
+ </element>
+ <element name="text_level">
+ <rect><color red="0.21" green="0.2" blue="0.2" /></rect>
+ <text string="Level"><color red="0.81" green="0.8" blue="0.79" /></text>
+ </element>
+ <element name="text_library">
+ <rect><color red="0.21" green="0.2" blue="0.2" /></rect>
+ <text string="Library"><color red="0.81" green="0.8" blue="0.79" /></text>
+ </element>
+ <element name="text_info">
+ <rect><color red="0.21" green="0.2" blue="0.2" /></rect>
+ <text string="Info"><color red="0.81" green="0.8" blue="0.79" /></text>
+ </element>
+ <element name="text_play">
+ <rect><color red="0.21" green="0.2" blue="0.2" /></rect>
+ <text string="Play"><color red="0.81" green="0.8" blue="0.79" /></text>
+ </element>
+
+ <element name="text_white"><text string="White"><color red="0.71" green="0.7" blue="0.7" /></text></element>
+ <element name="text_black"><text string="Black"><color red="0.71" green="0.7" blue="0.7" /></text></element>
+ <element name="text_check"><text string="Check"><color red="0.71" green="0.7" blue="0.7" /></text></element>
+ <element name="text_end"><text string="End"><color red="0.71" green="0.7" blue="0.7" /></text></element>
+
+ <element name="text_p1"><image file="chess/wk.png"/></element>
+ <element name="text_p2"><image file="chess/wq.png"/></element>
+ <element name="text_p3"><image file="chess/wr.png"/></element>
+ <element name="text_p4"><image file="chess/wb.png"/></element>
+ <element name="text_p5"><image file="chess/wn.png"/></element>
+ <element name="text_p6"><image file="chess/wp.png"/></element>
+
+ <element name="text_1">
+ <rect><color red="0.41" green="0.4" blue="0.39" /></rect>
+ <text string="1" align="1"><color red="0.9" green="0.9" blue="0.9" /></text>
+ </element>
+ <element name="text_2">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="2" align="1"><color red="0.05" green="0.05" blue="0.05" /></text>
+ </element>
+ <element name="text_3">
+ <rect><color red="0.41" green="0.4" blue="0.39" /></rect>
+ <text string="3" align="1"><color red="0.9" green="0.9" blue="0.9" /></text>
+ </element>
+ <element name="text_4">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="4" align="1"><color red="0.05" green="0.05" blue="0.05" /></text>
+ </element>
+ <element name="text_5">
+ <rect><color red="0.41" green="0.4" blue="0.39" /></rect>
+ <text string="5" align="1"><color red="0.9" green="0.9" blue="0.9" /></text>
+ </element>
+ <element name="text_6">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="6" align="1"><color red="0.05" green="0.05" blue="0.05" /></text>
+ </element>
+ <element name="text_7">
+ <rect><color red="0.41" green="0.4" blue="0.39" /></rect>
+ <text string="7" align="1"><color red="0.9" green="0.9" blue="0.9" /></text>
+ </element>
+ <element name="text_8">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="8" align="1"><color red="0.05" green="0.05" blue="0.05" /></text>
+ </element>
+
+ <element name="text_a">
+ <rect><color red="0.41" green="0.4" blue="0.39" /></rect>
+ <text string="A"><color red="0.9" green="0.9" blue="0.9" /></text>
+ </element>
+ <element name="text_b">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="B"><color red="0.05" green="0.05" blue="0.05" /></text>
+ </element>
+ <element name="text_c">
+ <rect><color red="0.41" green="0.4" blue="0.39" /></rect>
+ <text string="C"><color red="0.9" green="0.9" blue="0.9" /></text>
+ </element>
+ <element name="text_d">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="D"><color red="0.05" green="0.05" blue="0.05" /></text>
+ </element>
+ <element name="text_e">
+ <rect><color red="0.41" green="0.4" blue="0.39" /></rect>
+ <text string="E"><color red="0.9" green="0.9" blue="0.9" /></text>
+ </element>
+ <element name="text_f">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="F"><color red="0.05" green="0.05" blue="0.05" /></text>
+ </element>
+ <element name="text_g">
+ <rect><color red="0.41" green="0.4" blue="0.39" /></rect>
+ <text string="G"><color red="0.9" green="0.9" blue="0.9" /></text>
+ </element>
+ <element name="text_h">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="H"><color red="0.05" green="0.05" blue="0.05" /></text>
+ </element>
+
<!-- sb board -->
@@ -136,6 +284,25 @@
<bezel element="cblack"><bounds x="60" y="70" width="11" height="10" /></bezel>
<bezel element="cwhite"><bounds x="70" y="70" width="10" height="10" /></bezel>
+ <!-- coords -->
+ <bezel element="text_8"><bounds x="0.25" y="4.3" width="2" height="1.4" /></bezel>
+ <bezel element="text_7"><bounds x="0.25" y="14.3" width="2" height="1.4" /></bezel>
+ <bezel element="text_6"><bounds x="0.25" y="24.3" width="2" height="1.4" /></bezel>
+ <bezel element="text_5"><bounds x="0.25" y="34.3" width="2" height="1.4" /></bezel>
+ <bezel element="text_4"><bounds x="0.25" y="44.3" width="2" height="1.4" /></bezel>
+ <bezel element="text_3"><bounds x="0.25" y="54.3" width="2" height="1.4" /></bezel>
+ <bezel element="text_2"><bounds x="0.25" y="64.3" width="2" height="1.4" /></bezel>
+ <bezel element="text_1"><bounds x="0.25" y="74.3" width="2" height="1.4" /></bezel>
+
+ <bezel element="text_a"><bounds x="4" y="78.55" width="2" height="1.4" /></bezel>
+ <bezel element="text_b"><bounds x="14" y="78.55" width="2" height="1.4" /></bezel>
+ <bezel element="text_c"><bounds x="24" y="78.55" width="2" height="1.4" /></bezel>
+ <bezel element="text_d"><bounds x="34" y="78.55" width="2" height="1.4" /></bezel>
+ <bezel element="text_e"><bounds x="44" y="78.55" width="2" height="1.4" /></bezel>
+ <bezel element="text_f"><bounds x="54" y="78.55" width="2" height="1.4" /></bezel>
+ <bezel element="text_g"><bounds x="64" y="78.55" width="2" height="1.4" /></bezel>
+ <bezel element="text_h"><bounds x="74" y="78.55" width="2" height="1.4" /></bezel>
+
<!-- sensors, pieces -->
<repeat count="8">
<param name="y" start="0" increment="10" />
@@ -298,96 +465,188 @@
<!-- build screen -->
<view name="Internal Layout">
- <bounds left="-5" right="110" top="5" bottom="95" />
-
- <element ref="ledo"><bounds x="8" y="14" width="1" height="2" /></element>
- <element ref="ledo"><bounds x="8" y="24" width="1" height="2" /></element>
- <element ref="ledo"><bounds x="8" y="34" width="1" height="2" /></element>
- <element ref="ledo"><bounds x="8" y="44" width="1" height="2" /></element>
- <element ref="ledo"><bounds x="8" y="54" width="1" height="2" /></element>
- <element ref="ledo"><bounds x="8" y="64" width="1" height="2" /></element>
- <element ref="ledo"><bounds x="8" y="74" width="1" height="2" /></element>
- <element ref="ledo"><bounds x="8" y="84" width="1" height="2" /></element>
-
- <element ref="ledr" name="2.7" blend="add"><bounds x="8" y="14" width="1" height="2" /></element>
- <element ref="ledr" name="2.6" blend="add"><bounds x="8" y="24" width="1" height="2" /></element>
- <element ref="ledr" name="2.5" blend="add"><bounds x="8" y="34" width="1" height="2" /></element>
- <element ref="ledr" name="2.4" blend="add"><bounds x="8" y="44" width="1" height="2" /></element>
- <element ref="ledr" name="2.3" blend="add"><bounds x="8" y="54" width="1" height="2" /></element>
- <element ref="ledr" name="2.2" blend="add"><bounds x="8" y="64" width="1" height="2" /></element>
- <element ref="ledr" name="2.1" blend="add"><bounds x="8" y="74" width="1" height="2" /></element>
- <element ref="ledr" name="2.0" blend="add"><bounds x="8" y="84" width="1" height="2" /></element>
- <element ref="ledg" name="3.7" blend="add"><bounds x="8" y="14" width="1" height="2" /></element>
- <element ref="ledg" name="3.6" blend="add"><bounds x="8" y="24" width="1" height="2" /></element>
- <element ref="ledg" name="3.5" blend="add"><bounds x="8" y="34" width="1" height="2" /></element>
- <element ref="ledg" name="3.4" blend="add"><bounds x="8" y="44" width="1" height="2" /></element>
- <element ref="ledg" name="3.3" blend="add"><bounds x="8" y="54" width="1" height="2" /></element>
- <element ref="ledg" name="3.2" blend="add"><bounds x="8" y="64" width="1" height="2" /></element>
- <element ref="ledg" name="3.1" blend="add"><bounds x="8" y="74" width="1" height="2" /></element>
- <element ref="ledg" name="3.0" blend="add"><bounds x="8" y="84" width="1" height="2" /></element>
-
- <element ref="ledo"><bounds x="14" y="91" width="2" height="1" /></element>
- <element ref="ledo"><bounds x="24" y="91" width="2" height="1" /></element>
- <element ref="ledo"><bounds x="34" y="91" width="2" height="1" /></element>
- <element ref="ledo"><bounds x="44" y="91" width="2" height="1" /></element>
- <element ref="ledo"><bounds x="54" y="91" width="2" height="1" /></element>
- <element ref="ledo"><bounds x="64" y="91" width="2" height="1" /></element>
- <element ref="ledo"><bounds x="74" y="91" width="2" height="1" /></element>
- <element ref="ledo"><bounds x="84" y="91" width="2" height="1" /></element>
-
- <element ref="ledr" name="4.0" blend="add"><bounds x="14" y="91" width="2" height="1" /></element>
- <element ref="ledr" name="4.1" blend="add"><bounds x="24" y="91" width="2" height="1" /></element>
- <element ref="ledr" name="4.2" blend="add"><bounds x="34" y="91" width="2" height="1" /></element>
- <element ref="ledr" name="4.3" blend="add"><bounds x="44" y="91" width="2" height="1" /></element>
- <element ref="ledr" name="4.4" blend="add"><bounds x="54" y="91" width="2" height="1" /></element>
- <element ref="ledr" name="4.5" blend="add"><bounds x="64" y="91" width="2" height="1" /></element>
- <element ref="ledr" name="4.6" blend="add"><bounds x="74" y="91" width="2" height="1" /></element>
- <element ref="ledr" name="4.7" blend="add"><bounds x="84" y="91" width="2" height="1" /></element>
- <element ref="ledg" name="5.0" blend="add"><bounds x="14" y="91" width="2" height="1" /></element>
- <element ref="ledg" name="5.1" blend="add"><bounds x="24" y="91" width="2" height="1" /></element>
- <element ref="ledg" name="5.2" blend="add"><bounds x="34" y="91" width="2" height="1" /></element>
- <element ref="ledg" name="5.3" blend="add"><bounds x="44" y="91" width="2" height="1" /></element>
- <element ref="ledg" name="5.4" blend="add"><bounds x="54" y="91" width="2" height="1" /></element>
- <element ref="ledg" name="5.5" blend="add"><bounds x="64" y="91" width="2" height="1" /></element>
- <element ref="ledg" name="5.6" blend="add"><bounds x="74" y="91" width="2" height="1" /></element>
- <element ref="ledg" name="5.7" blend="add"><bounds x="84" y="91" width="2" height="1" /></element>
-
- <element ref="ledo"><bounds x="94" y="10" width="2" height="1" /></element>
- <element ref="ledo"><bounds x="94" y="15" width="2" height="1" /></element>
- <element ref="ledo"><bounds x="94" y="20" width="2" height="1" /></element>
- <element ref="ledo"><bounds x="94" y="25" width="2" height="1" /></element>
- <element ref="ledo"><bounds x="94" y="30" width="2" height="1" /></element>
- <element ref="ledo"><bounds x="94" y="35" width="2" height="1" /></element>
- <element ref="ledo"><bounds x="94" y="40" width="2" height="1" /></element>
- <element ref="ledo"><bounds x="94" y="45" width="2" height="1" /></element>
- <element ref="ledo"><bounds x="94" y="50" width="2" height="1" /></element>
- <element ref="ledo"><bounds x="94" y="55" width="2" height="1" /></element>
- <element ref="ledo"><bounds x="94" y="60" width="2" height="1" /></element>
-
- <element ref="ledg" name="1.7" blend="add"><bounds x="94" y="10" width="2" height="1" /></element>
- <element ref="ledg" name="1.6" blend="add"><bounds x="94" y="15" width="2" height="1" /></element>
- <element ref="ledg" name="1.5" blend="add"><bounds x="94" y="20" width="2" height="1" /></element>
- <element ref="ledg" name="1.4" blend="add"><bounds x="94" y="25" width="2" height="1" /></element>
- <element ref="ledg" name="1.3" blend="add"><bounds x="94" y="30" width="2" height="1" /></element>
- <element ref="ledg" name="1.2" blend="add"><bounds x="94" y="35" width="2" height="1" /></element>
-
- <element ref="ledr" name="0.7" blend="add"><bounds x="94" y="10" width="2" height="1" /></element>
- <element ref="ledr" name="0.6" blend="add"><bounds x="94" y="15" width="2" height="1" /></element>
- <element ref="ledr" name="0.5" blend="add"><bounds x="94" y="20" width="2" height="1" /></element>
- <element ref="ledr" name="0.4" blend="add"><bounds x="94" y="25" width="2" height="1" /></element>
- <element ref="ledr" name="0.3" blend="add"><bounds x="94" y="30" width="2" height="1" /></element>
- <element ref="ledr" name="0.2" blend="add"><bounds x="94" y="35" width="2" height="1" /></element>
-
- <element ref="ledr" name="0.1" blend="add"><bounds x="94" y="40" width="2" height="1" /></element>
- <element ref="ledr" name="1.1" blend="add"><bounds x="94" y="45" width="2" height="1" /></element>
- <element ref="ledr" name="0.0" blend="add"><bounds x="94" y="50" width="2" height="1" /></element>
- <element ref="ledr" name="1.0" blend="add"><bounds x="94" y="55" width="2" height="1" /></element>
-
- <element ref="ledg" name="1.8" blend="add"><bounds x="94" y="60" width="2" height="1" /></element>
- <element ref="ledr" name="0.8" blend="add"><bounds x="94" y="60" width="2" height="1" /></element>
+ <bounds left="-4" right="103" top="8.5" bottom="103" />
<group ref="sb_board"><bounds x="10" y="10" width="80" height="80" /></group>
- <group ref="sb_ui"><bounds x="-4" y="10" width="10" height="80" /></group>
+ <group ref="sb_ui"><bounds x="-3" y="10" width="10" height="80" /></group>
+
+ <!-- chessboard leds -->
+ <element ref="ledo"><bounds x="8.6" y="14.2" width="0.6" height="1.6" /></element>
+ <element ref="ledo"><bounds x="8.6" y="24.2" width="0.6" height="1.6" /></element>
+ <element ref="ledo"><bounds x="8.6" y="34.2" width="0.6" height="1.6" /></element>
+ <element ref="ledo"><bounds x="8.6" y="44.2" width="0.6" height="1.6" /></element>
+ <element ref="ledo"><bounds x="8.6" y="54.2" width="0.6" height="1.6" /></element>
+ <element ref="ledo"><bounds x="8.6" y="64.2" width="0.6" height="1.6" /></element>
+ <element ref="ledo"><bounds x="8.6" y="74.2" width="0.6" height="1.6" /></element>
+ <element ref="ledo"><bounds x="8.6" y="84.2" width="0.6" height="1.6" /></element>
+
+ <element ref="ledr" name="2.7" blend="add"><bounds x="8.6" y="14.2" width="0.6" height="1.6" /></element>
+ <element ref="ledr" name="2.6" blend="add"><bounds x="8.6" y="24.2" width="0.6" height="1.6" /></element>
+ <element ref="ledr" name="2.5" blend="add"><bounds x="8.6" y="34.2" width="0.6" height="1.6" /></element>
+ <element ref="ledr" name="2.4" blend="add"><bounds x="8.6" y="44.2" width="0.6" height="1.6" /></element>
+ <element ref="ledr" name="2.3" blend="add"><bounds x="8.6" y="54.2" width="0.6" height="1.6" /></element>
+ <element ref="ledr" name="2.2" blend="add"><bounds x="8.6" y="64.2" width="0.6" height="1.6" /></element>
+ <element ref="ledr" name="2.1" blend="add"><bounds x="8.6" y="74.2" width="0.6" height="1.6" /></element>
+ <element ref="ledr" name="2.0" blend="add"><bounds x="8.6" y="84.2" width="0.6" height="1.6" /></element>
+ <element ref="ledg" name="3.7" blend="add"><bounds x="8.6" y="14.2" width="0.6" height="1.6" /></element>
+ <element ref="ledg" name="3.6" blend="add"><bounds x="8.6" y="24.2" width="0.6" height="1.6" /></element>
+ <element ref="ledg" name="3.5" blend="add"><bounds x="8.6" y="34.2" width="0.6" height="1.6" /></element>
+ <element ref="ledg" name="3.4" blend="add"><bounds x="8.6" y="44.2" width="0.6" height="1.6" /></element>
+ <element ref="ledg" name="3.3" blend="add"><bounds x="8.6" y="54.2" width="0.6" height="1.6" /></element>
+ <element ref="ledg" name="3.2" blend="add"><bounds x="8.6" y="64.2" width="0.6" height="1.6" /></element>
+ <element ref="ledg" name="3.1" blend="add"><bounds x="8.6" y="74.2" width="0.6" height="1.6" /></element>
+ <element ref="ledg" name="3.0" blend="add"><bounds x="8.6" y="84.2" width="0.6" height="1.6" /></element>
+
+ <element ref="ledo"><bounds x="14.2" y="90.8" width="1.6" height="0.6" /></element>
+ <element ref="ledo"><bounds x="24.2" y="90.8" width="1.6" height="0.6" /></element>
+ <element ref="ledo"><bounds x="34.2" y="90.8" width="1.6" height="0.6" /></element>
+ <element ref="ledo"><bounds x="44.2" y="90.8" width="1.6" height="0.6" /></element>
+ <element ref="ledo"><bounds x="54.2" y="90.8" width="1.6" height="0.6" /></element>
+ <element ref="ledo"><bounds x="64.2" y="90.8" width="1.6" height="0.6" /></element>
+ <element ref="ledo"><bounds x="74.2" y="90.8" width="1.6" height="0.6" /></element>
+ <element ref="ledo"><bounds x="84.2" y="90.8" width="1.6" height="0.6" /></element>
+
+ <element ref="ledr" name="4.0" blend="add"><bounds x="14.2" y="90.8" width="1.6" height="0.6" /></element>
+ <element ref="ledr" name="4.1" blend="add"><bounds x="24.2" y="90.8" width="1.6" height="0.6" /></element>
+ <element ref="ledr" name="4.2" blend="add"><bounds x="34.2" y="90.8" width="1.6" height="0.6" /></element>
+ <element ref="ledr" name="4.3" blend="add"><bounds x="44.2" y="90.8" width="1.6" height="0.6" /></element>
+ <element ref="ledr" name="4.4" blend="add"><bounds x="54.2" y="90.8" width="1.6" height="0.6" /></element>
+ <element ref="ledr" name="4.5" blend="add"><bounds x="64.2" y="90.8" width="1.6" height="0.6" /></element>
+ <element ref="ledr" name="4.6" blend="add"><bounds x="74.2" y="90.8" width="1.6" height="0.6" /></element>
+ <element ref="ledr" name="4.7" blend="add"><bounds x="84.2" y="90.8" width="1.6" height="0.6" /></element>
+ <element ref="ledg" name="5.0" blend="add"><bounds x="14.2" y="90.8" width="1.6" height="0.6" /></element>
+ <element ref="ledg" name="5.1" blend="add"><bounds x="24.2" y="90.8" width="1.6" height="0.6" /></element>
+ <element ref="ledg" name="5.2" blend="add"><bounds x="34.2" y="90.8" width="1.6" height="0.6" /></element>
+ <element ref="ledg" name="5.3" blend="add"><bounds x="44.2" y="90.8" width="1.6" height="0.6" /></element>
+ <element ref="ledg" name="5.4" blend="add"><bounds x="54.2" y="90.8" width="1.6" height="0.6" /></element>
+ <element ref="ledg" name="5.5" blend="add"><bounds x="64.2" y="90.8" width="1.6" height="0.6" /></element>
+ <element ref="ledg" name="5.6" blend="add"><bounds x="74.2" y="90.8" width="1.6" height="0.6" /></element>
+ <element ref="ledg" name="5.7" blend="add"><bounds x="84.2" y="90.8" width="1.6" height="0.6" /></element>
+
+ <!-- button panel -->
+ <element ref="black"><bounds x="92.5" y="40.5" width="9" height="0.25" /></element>
+ <element ref="black"><bounds x="92.5" y="44.25" width="9" height="0.25" /></element>
+ <element ref="black"><bounds x="92.5" y="45.5" width="9" height="0.25" /></element>
+ <element ref="black"><bounds x="92.5" y="49.25" width="9" height="0.25" /></element>
+ <element ref="black"><bounds x="92.5" y="50.5" width="9" height="0.25" /></element>
+ <element ref="black"><bounds x="92.5" y="54.25" width="9" height="0.25" /></element>
+ <element ref="black"><bounds x="92.5" y="55.5" width="9" height="0.25" /></element>
+ <element ref="black"><bounds x="92.5" y="59.25" width="9" height="0.25" /></element>
+
+ <element ref="text_mode"><bounds x="92.5" y="59.4" width="9" height="1.4" /></element>
+ <element ref="black"><bounds x="91.75" y="60.5" width="0.25" height="24" /></element>
+ <element ref="black"><bounds x="102" y="60.5" width="0.25" height="24" /></element>
+
+ <element ref="black"><bounds x="92.5" y="10.5" width="9" height="4" /></element>
+ <element ref="black"><bounds x="92.5" y="15.5" width="9" height="4" /></element>
+ <element ref="black"><bounds x="92.5" y="20.5" width="9" height="4" /></element>
+ <element ref="black"><bounds x="92.5" y="25.5" width="9" height="4" /></element>
+ <element ref="black"><bounds x="92.5" y="30.5" width="9" height="4" /></element>
+ <element ref="black"><bounds x="92.5" y="35.5" width="9" height="4" /></element>
+
+ <element ref="black"><bounds x="92.5" y="60.5" width="9" height="4" /></element>
+ <element ref="black"><bounds x="92.5" y="65.5" width="9" height="4" /></element>
+ <element ref="black"><bounds x="92.5" y="70.5" width="9" height="4" /></element>
+ <element ref="black"><bounds x="92.5" y="75.5" width="9" height="4" /></element>
+ <element ref="black"><bounds x="92.5" y="80.5" width="9" height="4" /></element>
+ <element ref="black"><bounds x="92.5" y="85.5" width="9" height="4" /></element>
+ <element ref="black"><bounds x="92.5" y="92.5" width="9" height="9" /></element>
+
+ <element ref="black"><bounds x="45.5" y="92.5" width="9" height="4" /></element>
+ <element ref="black"><bounds x="45.5" y="97.5" width="9" height="4" /></element>
+ <element ref="black"><bounds x="55.5" y="92.5" width="9" height="4" /></element>
+ <element ref="black"><bounds x="55.5" y="97.5" width="9" height="4" /></element>
+ <element ref="black"><bounds x="70.5" y="92.5" width="9" height="4" /></element>
+ <element ref="black"><bounds x="70.5" y="97.5" width="9" height="4" /></element>
+ <element ref="black"><bounds x="80.5" y="92.5" width="9" height="4" /></element>
+ <element ref="black"><bounds x="80.5" y="97.5" width="9" height="4" /></element>
+
+ <element ref="text_go"> <bounds x="45.6" y="93.5" width="8.8" height="2" /></element>
+ <element ref="text_stop"> <bounds x="45.6" y="98.5" width="8.8" height="2" /></element>
+ <element ref="text_newgame"> <bounds x="55.6" y="93.5" width="8.8" height="2" /></element>
+ <element ref="text_sound"> <bounds x="55.6" y="98.5" width="8.8" height="2" /></element>
+ <element ref="text_plus"> <bounds x="70.6" y="93.0" width="8.8" height="3" /></element>
+ <element ref="text_minus"> <bounds x="70.6" y="97.6" width="8.8" height="3.8" /></element>
+ <element ref="text_function"><bounds x="80.6" y="93.5" width="8.8" height="2" /></element>
+ <element ref="text_tabcolor"><bounds x="80.6" y="98.5" width="8.8" height="2" /></element>
+
+ <element ref="text_p1"><bounds x="95.4" y="10.8" width="3.2" height="3.2" /><color alpha="0.75" /></element>
+ <element ref="text_p2"><bounds x="95.4" y="15.8" width="3.2" height="3.2" /><color alpha="0.75" /></element>
+ <element ref="text_p3"><bounds x="95.4" y="20.8" width="3.2" height="3.2" /><color alpha="0.75" /></element>
+ <element ref="text_p4"><bounds x="95.4" y="25.8" width="3.2" height="3.2" /><color alpha="0.75" /></element>
+ <element ref="text_p5"><bounds x="95.4" y="30.8" width="3.2" height="3.2" /><color alpha="0.75" /></element>
+ <element ref="text_p6"><bounds x="95.4" y="35.8" width="3.2" height="3.2" /><color alpha="0.75" /></element>
+
+ <element ref="text_white"> <bounds x="92.6" y="41.5" width="8.8" height="2" /></element>
+ <element ref="text_black"> <bounds x="92.6" y="46.5" width="8.8" height="2" /></element>
+ <element ref="text_check"> <bounds x="92.6" y="51.5" width="8.8" height="2" /></element>
+ <element ref="text_end"> <bounds x="92.6" y="56.5" width="8.8" height="2" /></element>
+
+ <element ref="text_normal"> <bounds x="92.6" y="61.5" width="8.8" height="2" /></element>
+ <element ref="text_analysis"><bounds x="92.6" y="66.5" width="8.8" height="2" /></element>
+ <element ref="text_setup"> <bounds x="92.6" y="71.5" width="8.8" height="2" /></element>
+ <element ref="text_level"> <bounds x="92.6" y="76.5" width="8.8" height="2" /></element>
+ <element ref="text_library"> <bounds x="92.6" y="81.5" width="8.8" height="2" /></element>
+ <element ref="text_info"> <bounds x="92.6" y="86.5" width="8.8" height="2" /></element>
+ <element ref="text_play"> <bounds x="92.6" y="96" width="8.8" height="2" /></element>
+
+ <element ref="ledo"><bounds x="93" y="11" width="1.6" height="0.6" /></element>
+ <element ref="ledo"><bounds x="93" y="16" width="1.6" height="0.6" /></element>
+ <element ref="ledo"><bounds x="93" y="21" width="1.6" height="0.6" /></element>
+ <element ref="ledo"><bounds x="93" y="26" width="1.6" height="0.6" /></element>
+ <element ref="ledo"><bounds x="93" y="31" width="1.6" height="0.6" /></element>
+ <element ref="ledo"><bounds x="93" y="36" width="1.6" height="0.6" /></element>
+ <element ref="ledo"><bounds x="93" y="41" width="1.6" height="0.6" /></element>
+ <element ref="ledo"><bounds x="93" y="46" width="1.6" height="0.6" /></element>
+ <element ref="ledo"><bounds x="93" y="51" width="1.6" height="0.6" /></element>
+ <element ref="ledo"><bounds x="93" y="56" width="1.6" height="0.6" /></element>
+ <element ref="ledo"><bounds x="93" y="61" width="1.6" height="0.6" /></element>
+
+ <element ref="ledg" name="1.7" blend="add"><bounds x="93" y="11" width="1.6" height="0.6" /></element>
+ <element ref="ledg" name="1.6" blend="add"><bounds x="93" y="16" width="1.6" height="0.6" /></element>
+ <element ref="ledg" name="1.5" blend="add"><bounds x="93" y="21" width="1.6" height="0.6" /></element>
+ <element ref="ledg" name="1.4" blend="add"><bounds x="93" y="26" width="1.6" height="0.6" /></element>
+ <element ref="ledg" name="1.3" blend="add"><bounds x="93" y="31" width="1.6" height="0.6" /></element>
+ <element ref="ledg" name="1.2" blend="add"><bounds x="93" y="36" width="1.6" height="0.6" /></element>
+
+ <element ref="ledr" name="0.7" blend="add"><bounds x="93" y="11" width="1.6" height="0.6" /></element>
+ <element ref="ledr" name="0.6" blend="add"><bounds x="93" y="16" width="1.6" height="0.6" /></element>
+ <element ref="ledr" name="0.5" blend="add"><bounds x="93" y="21" width="1.6" height="0.6" /></element>
+ <element ref="ledr" name="0.4" blend="add"><bounds x="93" y="26" width="1.6" height="0.6" /></element>
+ <element ref="ledr" name="0.3" blend="add"><bounds x="93" y="31" width="1.6" height="0.6" /></element>
+ <element ref="ledr" name="0.2" blend="add"><bounds x="93" y="36" width="1.6" height="0.6" /></element>
+
+ <element ref="ledr" name="0.1" blend="add"><bounds x="93" y="41" width="1.6" height="0.6" /></element>
+ <element ref="ledr" name="1.1" blend="add"><bounds x="93" y="46" width="1.6" height="0.6" /></element>
+ <element ref="ledr" name="0.0" blend="add"><bounds x="93" y="51" width="1.6" height="0.6" /></element>
+ <element ref="ledr" name="1.0" blend="add"><bounds x="93" y="56" width="1.6" height="0.6" /></element>
+
+ <element ref="ledg" name="1.8" blend="add"><bounds x="93" y="61" width="1.6" height="0.6" /></element>
+ <element ref="ledr" name="0.8" blend="add"><bounds x="93" y="61" width="1.6" height="0.6" /></element>
+
+ <element ref="hl" inputtag="IN.3" inputmask="0x04"><bounds x="92.5" y="10.5" width="9" height="4" /><color alpha="0.15" /></element>
+ <element ref="hl" inputtag="IN.3" inputmask="0x01"><bounds x="92.5" y="15.5" width="9" height="4" /><color alpha="0.15" /></element>
+ <element ref="hl" inputtag="IN.2" inputmask="0x01"><bounds x="92.5" y="20.5" width="9" height="4" /><color alpha="0.15" /></element>
+ <element ref="hl" inputtag="IN.2" inputmask="0x04"><bounds x="92.5" y="25.5" width="9" height="4" /><color alpha="0.15" /></element>
+ <element ref="hl" inputtag="IN.3" inputmask="0x02"><bounds x="92.5" y="30.5" width="9" height="4" /><color alpha="0.15" /></element>
+ <element ref="hl" inputtag="IN.2" inputmask="0x02"><bounds x="92.5" y="35.5" width="9" height="4" /><color alpha="0.15" /></element>
+
+ <element ref="hl" inputtag="IN.7" inputmask="0x04"><bounds x="92.5" y="60.5" width="9" height="4" /><color alpha="0.15" /></element>
+ <element ref="hl" inputtag="IN.7" inputmask="0x02"><bounds x="92.5" y="65.5" width="9" height="4" /><color alpha="0.15" /></element>
+ <element ref="hl" inputtag="IN.0" inputmask="0x01"><bounds x="92.5" y="70.5" width="9" height="4" /><color alpha="0.15" /></element>
+ <element ref="hl" inputtag="IN.0" inputmask="0x02"><bounds x="92.5" y="75.5" width="9" height="4" /><color alpha="0.15" /></element>
+ <element ref="hl" inputtag="IN.6" inputmask="0x01"><bounds x="92.5" y="80.5" width="9" height="4" /><color alpha="0.15" /></element>
+ <element ref="hl" inputtag="IN.6" inputmask="0x02"><bounds x="92.5" y="85.5" width="9" height="4" /><color alpha="0.15" /></element>
+ <element ref="hl" inputtag="IN.4" inputmask="0x01"><bounds x="92.5" y="92.5" width="9" height="9" /><color alpha="0.15" /></element>
+
+ <element ref="hl" inputtag="RESET" inputmask="0x01"><bounds x="45.5" y="92.5" width="9" height="4" /><color alpha="0.15" /></element>
+ <element ref="hl" inputtag="IN.1" inputmask="0x02"><bounds x="45.5" y="97.5" width="9" height="4" /><color alpha="0.15" /></element>
+ <element ref="hl" inputtag="IN.1" inputmask="0x04"><bounds x="55.5" y="92.5" width="9" height="4" /><color alpha="0.15" /></element>
+ <element ref="hl" inputtag="IN.1" inputmask="0x01"><bounds x="55.5" y="97.5" width="9" height="4" /><color alpha="0.15" /></element>
+ <element ref="hl" inputtag="IN.5" inputmask="0x01"><bounds x="70.5" y="92.5" width="9" height="4" /><color alpha="0.15" /></element>
+ <element ref="hl" inputtag="IN.4" inputmask="0x04"><bounds x="70.5" y="97.5" width="9" height="4" /><color alpha="0.15" /></element>
+ <element ref="hl" inputtag="IN.5" inputmask="0x02"><bounds x="80.5" y="92.5" width="9" height="4" /><color alpha="0.15" /></element>
+ <element ref="hl" inputtag="IN.4" inputmask="0x02"><bounds x="80.5" y="97.5" width="9" height="4" /><color alpha="0.15" /></element>
</view>
</mamelayout>
diff --git a/src/mame/machine/poly88.cpp b/src/mame/machine/poly88.cpp
index 3ab75038dcc..d922cdd5a1e 100644
--- a/src/mame/machine/poly88.cpp
+++ b/src/mame/machine/poly88.cpp
@@ -13,11 +13,60 @@
#include "includes/poly88.h"
+bool poly88_state::is_onboard(offs_t offset)
+{
+ return (offset & 0xf000) == m_onboard_config->read() << 13;
+}
+
+uint8_t poly88_state::mem_r(offs_t offset)
+{
+ if (!m_onboard_disable && is_onboard(offset))
+ {
+ if ((offset & 0xfff) >= 0xc00)
+ return m_onboard_ram[offset & 0x1ff]; // mirrored
+ else
+ return m_onboard_rom[offset & 0xfff];
+ }
+ else
+ return m_s100->smemr_r(offset);
+}
+
+void poly88_state::mem_w(offs_t offset, uint8_t data)
+{
+ if (!m_onboard_disable && is_onboard(offset))
+ {
+ if ((offset & 0xfff) >= 0xc00)
+ m_onboard_ram[offset & 0x1ff] = data; // mirrored
+ }
+ else
+ m_s100->mwrt_w(offset, data);
+}
+
+uint8_t poly88_state::in_r(offs_t offset)
+{
+ offset |= offset << 8;
+ if (is_onboard(offset))
+ return m_onboard_io->read8(offset & 0x0f);
+ else
+ return m_s100->sinp_r(offset);
+}
+
+void poly88_state::out_w(offs_t offset, uint8_t data)
+{
+ offset |= offset << 8;
+ if (is_onboard(offset))
+ m_onboard_io->write8(offset & 0x0f, data);
+ else
+ m_s100->sout_w(offset, data);
+}
+
// bits 0-3 baud rate; bit 4 (0=cassette, 1=rs232); bit 5 (1=disable rom and ram)
void poly88_state::baud_rate_w(uint8_t data)
{
logerror("poly88_baud_rate_w %02x\n",data);
m_brg->control_w(data & 15);
+
+ m_onboard_disable = BIT(data, 5);
}
IRQ_CALLBACK_MEMBER(poly88_state::poly88_irq_callback)
@@ -104,40 +153,51 @@ WRITE_LINE_MEMBER(poly88_state::cassette_clock_w)
}
-void poly88_state::init_poly88()
+void poly88_state::machine_start()
{
+ m_onboard_ram = make_unique_clear<u8[]>(0x200);
}
void poly88_state::machine_reset()
{
- m_last_code = 0;
m_usart->write_rxd(1);
m_usart->write_cts(0);
m_brg->control_w(0);
+ m_onboard_disable = false;
m_dtr = m_rts = m_txd = m_rxd = m_cassold = 1;
}
-INTERRUPT_GEN_MEMBER(poly88_state::poly88_interrupt)
+TIMER_DEVICE_CALLBACK_MEMBER(poly88_state::rtc_tick)
{
m_int_vector = 0xf7;
- device.execute().set_input_line(0, HOLD_LINE);
+ m_maincpu->set_input_line(0, HOLD_LINE);
}
-WRITE_LINE_MEMBER(poly88_state::usart_ready_w)
+WRITE_LINE_MEMBER(poly88_state::vi2_w)
{
- if (state)
+ if (state == ASSERT_LINE)
{
- m_int_vector = 0xe7;
+ m_int_vector = 0xef;
m_maincpu->set_input_line(0, HOLD_LINE);
}
}
-uint8_t poly88_state::keyboard_r()
+WRITE_LINE_MEMBER(poly88_state::vi5_w)
{
- uint8_t retVal = m_last_code;
- m_maincpu->set_input_line(0, CLEAR_LINE);
- m_last_code = 0x00;
- return retVal;
+ if (state == ASSERT_LINE)
+ {
+ m_int_vector = 0xd7;
+ m_maincpu->set_input_line(0, HOLD_LINE);
+ }
+}
+
+WRITE_LINE_MEMBER(poly88_state::usart_ready_w)
+{
+ if (state)
+ {
+ m_int_vector = 0xdf;
+ m_maincpu->set_input_line(0, HOLD_LINE);
+ }
}
void poly88_state::intr_w(uint8_t data)
@@ -179,7 +239,8 @@ SNAPSHOT_LOAD_MEMBER(poly88_state::snapshot_cb)
switch(recordType) {
case 0 :
/* 00 Absolute */
- memcpy(space.get_read_ptr(address ), data + pos ,recordLen);
+ for (uint16_t j = 0; j < recordLen; j++)
+ space.write_byte(address + j, data[pos + j]);
break;
case 1 :
/* 01 Comment */
diff --git a/src/mame/video/poly88.cpp b/src/mame/video/poly88.cpp
deleted file mode 100644
index 962edcf9b2a..00000000000
--- a/src/mame/video/poly88.cpp
+++ /dev/null
@@ -1,102 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Miodrag Milanovic
-/***************************************************************************
-
- Poly-88 video by Miodrag Milanovic
-
- 18/05/2009 Initial implementation
-
-****************************************************************************/
-
-#include "emu.h"
-#include "includes/poly88.h"
-
-static const uint8_t mcm6571a_shift[] =
-{
- 0,1,1,0,0,0,1,0,0,0,0,1,0,0,0,0,
- 1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,
- 0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,
- 0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,
- 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
- 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
- 0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,
- 1,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0
-};
-
-void poly88_state::video_start()
-{
- m_FNT = memregion("chargen")->base();
-}
-
-uint32_t poly88_state::screen_update_poly88(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
-{
- int x,y,j,b;
- uint16_t addr;
- int xpos;
- uint8_t l,r;
-
- for(y = 0; y < 16; y++ )
- {
- addr = y*64;
- xpos = 0;
- for(x = 0; x < 64; x++ )
- {
- uint8_t code = m_video_ram[addr + x];
- if ((code & 0x80)==0)
- {
- for(j = 0; j < 15; j++ )
- {
- l = j/5;
- for(b = 0; b < 10; b++ )
- {
- r = b/5;
- if (l==0 && r==0)
- bitmap.pix16(y*15+j, xpos+b ) = BIT(code,5) ? 0 : 1;
-
- if (l==0 && r==1)
- bitmap.pix16(y*15+j, xpos+b ) = BIT(code,2) ? 0 : 1;
-
- if (l==1 && r==0)
- bitmap.pix16(y*15+j, xpos+b ) = BIT(code,4) ? 0 : 1;
-
- if (l==1 && r==1)
- bitmap.pix16(y*15+j, xpos+b ) = BIT(code,1) ? 0 : 1;
-
- if (l==2 && r==0)
- bitmap.pix16(y*15+j, xpos+b ) = BIT(code,3) ? 0 : 1;
-
- if (l==2 && r==1)
- bitmap.pix16(y*15+j, xpos+b ) = BIT(code,0) ? 0 : 1;
- }
- }
- }
- else
- {
- for(j = 0; j < 15; j++ )
- {
- code &= 0x7f;
- l = 0;
- if (mcm6571a_shift[code]==0)
- {
- if (j < 9)
- l = m_FNT[code*16 + j];
- }
- else
- {
- if ((j > 2) && (j < 12))
- l = m_FNT[code*16 + j - 3];
- }
-
- for(b = 0; b < 7; b++ )
- bitmap.pix16(y*15+j, xpos+b ) = (l >> (6-b)) & 1;
-
- bitmap.pix16(y*15+j, xpos+7 ) = 0;
- bitmap.pix16(y*15+j, xpos+8 ) = 0;
- bitmap.pix16(y*15+j, xpos+9 ) = 0;
- }
- }
- xpos += 10;
- }
- }
- return 0;
-}