-goldnpkr.cpp: Base screen parameters on how games program the CRTC.

* Filled in proper screen parameters for goldnpkr, witchcrd and
  megadpkr.  There may be other games that use different parameters.
* Demoted megadpkr and megadpkrb to not working as they can only boot
  once before writing timekeeper data that prevents booting again.

-Tidied up a few drivers a little.
This commit is contained in:
Vas Crabb 2021-09-13 06:24:23 +10:00
parent da0df4bb6c
commit f7d1c0dca4
14 changed files with 271 additions and 228 deletions

View File

@ -3296,7 +3296,6 @@ files {
MAME_DIR .. "src/mame/machine/osborne1.cpp",
MAME_DIR .. "src/mame/drivers/osbexec.cpp",
MAME_DIR .. "src/mame/drivers/vixen.cpp",
MAME_DIR .. "src/mame/includes/vixen.h",
}
createMESSProjects(_target, _subtarget, "osi")

View File

@ -1075,7 +1075,8 @@ void wd_fdc_device_base::do_generic()
void wd_fdc_device_base::do_cmd_w()
{
// it is actually possible to send another command even while in busy state.
// currently we simply accept any commands, but chip logic probably more complex (presumable it is possible change command of the same type only).
// currently we simply accept any commands, but chip logic is probably more complex
// (presumably it is only possible change to a command of the same type).
#if 0
// Only available command when busy is interrupt
if(main_state != IDLE && (cmd_buffer & 0xf0) != 0xd0) {

View File

@ -36,9 +36,9 @@
#define DEMONEYE_AY8910_CLOCK (DEMONEYE_AUDIO_PCB_CLOCK / 2) /* what's the real divisor? */
DEFINE_DEVICE_TYPE(IREM_M37B_AUDIO, irem_m37b_audio_device, "irem_m37b_audio", "Irem M37B audio")
DEFINE_DEVICE_TYPE(PANTHER_AUDIO, panther_audio_device, "panther_audio", "Irem M37B audio (Panther)")
DEFINE_DEVICE_TYPE(IREM_M37B_UE17B_AUDIO, irem_m37b_ue17b_audio_device, "irem_m37b_ue17b_audio", "Irem M37B/UE17B audio/voice")
DEFINE_DEVICE_TYPE(IREM_M37B_AUDIO, irem_m37b_audio_device, "irem_m37b_audio", "Irem M-37B audio")
DEFINE_DEVICE_TYPE(PANTHER_AUDIO, panther_audio_device, "panther_audio", "Irem M-37B audio (Panther)")
DEFINE_DEVICE_TYPE(IREM_M37B_UE17B_AUDIO, irem_m37b_ue17b_audio_device, "irem_m37b_ue17b_audio", "Irem M-37B/UE-17B audio/voice")
DEFINE_DEVICE_TYPE(DEMONEYE_AUDIO, demoneye_audio_device, "demoneye_audio", "Irem Demoneye-X audio")
@ -134,7 +134,7 @@ void irem_m37b_audio_device::analog_w(uint8_t data)
*
*************************************/
CUSTOM_INPUT_MEMBER(irem_m37b_audio_device::sound_status_r)
READ_LINE_MEMBER(irem_m37b_audio_device::sound_status_r)
{
// communication handshake between host and sound CPU
// at least Panther uses it, unconfirmed for Red Alert and Demoneye-X

View File

@ -24,7 +24,7 @@ public:
irem_m37b_audio_device(const machine_config &config, const char *tag, device_t *owner, uint32_t clock = 0U);
DECLARE_CUSTOM_INPUT_MEMBER(sound_status_r);
DECLARE_READ_LINE_MEMBER(sound_status_r);
void audio_command_w(uint8_t data);

View File

@ -10,20 +10,23 @@
****************************************************************************/
#include "emu.h"
#include "bus/rs232/rs232.h"
#include "cpu/z80/z80.h"
#include "imagedev/floppy.h"
#include "machine/z80daisy.h"
#include "imagedev/snapquik.h"
#include "machine/clock.h"
#include "machine/wd_fdc.h"
#include "machine/z80ctc.h"
#include "machine/z80daisy.h"
#include "machine/z80dma.h"
#include "machine/z80pio.h"
#include "machine/z80sio.h"
#include "machine/z80dma.h"
#include "machine/wd_fdc.h"
#include "machine/clock.h"
#include "softlist.h"
#include "imagedev/snapquik.h"
namespace {
class altos5_state : public driver_device
{
@ -37,12 +40,16 @@ public:
, m_p_prom(*this, "proms")
, m_floppy0(*this, "fdc:0")
, m_floppy1(*this, "fdc:1")
, m_bankr(*this, "bankr%d", 0)
, m_bankw(*this, "bankw%d", 0)
, m_bankr(*this, "bankr%x", 0)
, m_bankw(*this, "bankw%x", 0)
{ }
void altos5(machine_config &config);
protected:
virtual void machine_reset() override;
virtual void machine_start() override;
private:
DECLARE_QUICKLOAD_LOAD_MEMBER(quickload_cb);
uint8_t memory_read_byte(offs_t offset);
@ -69,8 +76,6 @@ private:
floppy_image_device *m_floppy;
std::unique_ptr<u8[]> m_ram; // main ram 192k
std::unique_ptr<u8[]> m_dummy; // for wrpt
void machine_reset() override;
void machine_start() override;
required_device<z80_device> m_maincpu;
required_device<z80pio_device> m_pio0;
required_device<z80dma_device> m_dma;
@ -86,22 +91,22 @@ private:
void altos5_state::mem_map(address_map &map)
{
map.unmap_value_high();
map(0x0000, 0x0fff).bankr("bankr0").bankw("bankw0");
map(0x1000, 0x1fff).bankr("bankr1").bankw("bankw1");
map(0x2000, 0x2fff).bankr("bankr2").bankw("bankw2");
map(0x3000, 0x3fff).bankr("bankr3").bankw("bankw3");
map(0x4000, 0x4fff).bankr("bankr4").bankw("bankw4");
map(0x5000, 0x5fff).bankr("bankr5").bankw("bankw5");
map(0x6000, 0x6fff).bankr("bankr6").bankw("bankw6");
map(0x7000, 0x7fff).bankr("bankr7").bankw("bankw7");
map(0x8000, 0x8fff).bankr("bankr8").bankw("bankw8");
map(0x9000, 0x9fff).bankr("bankr9").bankw("bankw9");
map(0xa000, 0xafff).bankr("bankr10").bankw("bankw10");
map(0xb000, 0xbfff).bankr("bankr11").bankw("bankw11");
map(0xc000, 0xcfff).bankr("bankr12").bankw("bankw12");
map(0xd000, 0xdfff).bankr("bankr13").bankw("bankw13");
map(0xe000, 0xefff).bankr("bankr14").bankw("bankw14");
map(0xf000, 0xffff).bankr("bankr15").bankw("bankw15");
map(0x0000, 0x0fff).bankr(m_bankr[0x0]).bankw(m_bankw[0x0]);
map(0x1000, 0x1fff).bankr(m_bankr[0x1]).bankw(m_bankw[0x1]);
map(0x2000, 0x2fff).bankr(m_bankr[0x2]).bankw(m_bankw[0x2]);
map(0x3000, 0x3fff).bankr(m_bankr[0x3]).bankw(m_bankw[0x3]);
map(0x4000, 0x4fff).bankr(m_bankr[0x4]).bankw(m_bankw[0x4]);
map(0x5000, 0x5fff).bankr(m_bankr[0x5]).bankw(m_bankw[0x5]);
map(0x6000, 0x6fff).bankr(m_bankr[0x6]).bankw(m_bankw[0x6]);
map(0x7000, 0x7fff).bankr(m_bankr[0x7]).bankw(m_bankw[0x7]);
map(0x8000, 0x8fff).bankr(m_bankr[0x8]).bankw(m_bankw[0x8]);
map(0x9000, 0x9fff).bankr(m_bankr[0x9]).bankw(m_bankw[0x9]);
map(0xa000, 0xafff).bankr(m_bankr[0xa]).bankw(m_bankw[0xa]);
map(0xb000, 0xbfff).bankr(m_bankr[0xb]).bankw(m_bankw[0xb]);
map(0xc000, 0xcfff).bankr(m_bankr[0xc]).bankw(m_bankw[0xc]);
map(0xd000, 0xdfff).bankr(m_bankr[0xd]).bankw(m_bankw[0xd]);
map(0xe000, 0xefff).bankr(m_bankr[0xe]).bankw(m_bankw[0xe]);
map(0xf000, 0xffff).bankr(m_bankr[0xf]).bankw(m_bankw[0xf]);
}
void altos5_state::io_map(address_map &map)
@ -454,6 +459,9 @@ ROM_START( altos5 )
ROM_LOAD("82s141.bin", 0x0000, 0x0200, CRC(35c8078c) SHA1(dce24374bfcc5d23959e2c03485d82a119c0c3c9)) // banking control
ROM_END
} // anonymous namespace
/* Driver */
/* YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS */

View File

@ -991,8 +991,11 @@
#include "upndown.lh"
namespace {
#define MASTER_CLOCK XTAL(10'000'000)
#define CPU_CLOCK (MASTER_CLOCK/16)
#define PIXEL_CLOCK (MASTER_CLOCK/2)
class goldnpkr_state : public driver_device
@ -1002,6 +1005,7 @@ public:
driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_pia(*this, "pia%u", 0U),
m_screen(*this, "screen"),
m_gfxdecode(*this, "gfxdecode"),
m_palette(*this, "palette"),
m_discrete(*this, "discrete"),
@ -1072,6 +1076,7 @@ protected:
required_device<cpu_device> m_maincpu;
required_device_array<pia6821_device, 2> m_pia;
required_device<screen_device> m_screen;
required_device<gfxdecode_device> m_gfxdecode;
required_device<palette_device> m_palette;
optional_device<discrete_device> m_discrete;
@ -4342,12 +4347,9 @@ void goldnpkr_state::goldnpkr_base(machine_config &config)
m_pia[1]->writepb_handler().set(FUNC(goldnpkr_state::mux_w));
// video hardware
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
screen.set_refresh_hz(60);
screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
screen.set_size((39+1)*8, (31+1)*8); // From MC6845 init, registers 00 & 04 (programmed with value-1).
screen.set_visarea(0*8, 32*8-1, 0*8, 29*8-1); // From MC6845 init, registers 01 & 06.
screen.set_screen_update(FUNC(goldnpkr_state::screen_update_goldnpkr));
SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
m_screen->set_raw(PIXEL_CLOCK, (39 + 1) * 8, 0, 32 * 8, ((31 + 1) * 8) + 4, 0, 29 * 8); // from MC6845 parameters
m_screen->set_screen_update(FUNC(goldnpkr_state::screen_update_goldnpkr));
mc6845_device &crtc(MC6845(config, "crtc", CPU_CLOCK)); // 68B45 or 6845s @ CPU clock
crtc.set_screen("screen");
@ -4410,6 +4412,7 @@ void goldnpkr_state::witchcrd(machine_config &config)
m_pia[0]->writepa_handler().set(FUNC(goldnpkr_state::mux_port_w));
// video hardware
m_screen->set_raw(PIXEL_CLOCK, (39 + 1) * 8, 0, 32 * 8, (38 + 1) * 8, 0, 32 * 8);
m_palette->set_init(FUNC(goldnpkr_state::witchcrd_palette));
// sound hardware
@ -4500,6 +4503,7 @@ void goldnpkr_state::wcrdxtnd(machine_config &config)
m_pia[0]->writepa_handler().set(FUNC(goldnpkr_state::mux_port_w));
// video hardware
m_screen->set_raw(PIXEL_CLOCK, (39 + 1) * 8, 0, 32 * 8, (38 + 1) * 8, 0, 32 * 8);
m_gfxdecode->set_info(gfx_wcrdxtnd);
m_palette->set_init(FUNC(goldnpkr_state::wcrdxtnd_palette));
MCFG_VIDEO_START_OVERRIDE(goldnpkr_state, wcrdxtnd)
@ -4771,12 +4775,9 @@ void blitz_state::megadpkr(machine_config &config)
m_pia[1]->writepb_handler().set(FUNC(goldnpkr_state::mux_w));
// video hardware
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
screen.set_refresh_hz(60);
screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
screen.set_size((32)*8, (32)*8);
screen.set_visarea_full();
screen.set_screen_update(FUNC(goldnpkr_state::screen_update_goldnpkr));
SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
m_screen->set_raw(PIXEL_CLOCK, (37 + 1) * 8, 0, 32 * 8, (38 + 1) * 8, 0, 32 * 8); // from MC6845 parameters
m_screen->set_screen_update(FUNC(goldnpkr_state::screen_update_goldnpkr));
mc6845_device &crtc(MC6845(config, "crtc", CPU_CLOCK));
crtc.set_screen("screen");
@ -11814,6 +11815,8 @@ void goldnpkr_state::init_super98()
ROM[0x69f6] = 0xea;
}
} // anonymous namespace
/*********************************************
* Game Drivers *
@ -11976,5 +11979,5 @@ GAME( 1998, super98, bsuerte, witchcrd, super98, goldnpkr_state, init_super
GAME( 198?, animpkr, 0, icp_ext, animpkr, goldnpkr_state, empty_init, ROT0, "<unknown>", "unknown rocket/animal-themed poker", MACHINE_IMPERFECT_COLORS ) // banked program. how to switch gfx?
GAME( 1990, megadpkr, 0, megadpkr, megadpkr, blitz_state, empty_init, ROT0, "Blitz System", "Mega Double Poker (conversion kit, version 2.3 MD)", 0 )
GAME( 1990, megadpkrb, megadpkr, megadpkr, megadpkr, blitz_state, empty_init, ROT0, "Blitz System", "Mega Double Poker (conversion kit, version 2.1 MD)", 0 ) // may need an extra reset to work the first time
GAME( 1990, megadpkr, 0, megadpkr, megadpkr, blitz_state, empty_init, ROT0, "Blitz System", "Mega Double Poker (conversion kit, version 2.3 MD)", MACHINE_NOT_WORKING )
GAME( 1990, megadpkrb, megadpkr, megadpkr, megadpkr, blitz_state, empty_init, ROT0, "Blitz System", "Mega Double Poker (conversion kit, version 2.1 MD)", MACHINE_NOT_WORKING ) // may need an extra reset to work the first time

View File

@ -34,17 +34,20 @@ MB7051 - fuse programmed prom.
****************************************************************************/
#include "emu.h"
#include "cpu/z80/z80.h"
#include "imagedev/cassette.h"
#include "imagedev/snapquik.h"
#include "machine/timer.h"
#include "sound/mea8000.h"
#include "sound/spkrdev.h"
#include "machine/timer.h"
#include "emupal.h"
#include "screen.h"
#include "speaker.h"
namespace {
class homelab_state : public driver_device
{
@ -66,7 +69,7 @@ protected:
u8 m_rows;
u8 m_cols;
required_device<cpu_device> m_maincpu;
required_memory_bank m_bank1;
required_memory_bank m_bank1;
required_region_ptr<u8> m_p_chargen;
required_device<speaker_sound_device> m_speaker;
required_device<cassette_image_device> m_cass;
@ -76,14 +79,14 @@ protected:
class homelab2_state : public homelab_state
{
public:
homelab2_state(const machine_config &mconfig, device_type type, const char *tag)
: homelab_state(mconfig, type, tag)
{ }
using homelab_state::homelab_state;
void homelab2(machine_config &config);
protected:
virtual void machine_start() override;
private:
void machine_start() override;
INTERRUPT_GEN_MEMBER(homelab_frame);
void homelab2_mem(address_map &map);
u8 cass2_r();
@ -98,21 +101,22 @@ private:
class homelab3_state : public homelab_state
{
public:
homelab3_state(const machine_config &mconfig, device_type type, const char *tag)
: homelab_state(mconfig, type, tag)
{ }
using homelab_state::homelab_state;
void homelab3(machine_config &config);
void brailab4(machine_config &config);
DECLARE_READ_LINE_MEMBER(cass3_r);
protected:
virtual void machine_start() override;
virtual void machine_reset() override;
private:
u8 exxx_r(offs_t offset);
std::unique_ptr<u8[]> m_ram;
void port7f_w(u8 data);
void portff_w(u8 data);
void machine_start() override;
void machine_reset() override;
void homelab3_io(address_map &map);
void homelab3_mem(address_map &map);
void brailab4_io(address_map &map);
@ -133,9 +137,9 @@ u8 homelab2_state::mem3800_r()
u8 homelab2_state::mem3a00_r(offs_t offset)
{
u8 i,data = 0xff;
u8 data = 0xff;
for (i=0; i<8; i++)
for (u8 i=0; i<8; i++)
if (!BIT(offset, i))
data &= m_io_keyboard[i]->read();
@ -231,7 +235,7 @@ void homelab2_state::homelab2_mem(address_map &map)
map(0x3c00, 0x3dff).w(FUNC(homelab2_state::mem3c00_w));
map(0x3e00, 0x3fff).w(FUNC(homelab2_state::mem3e00_w));
map(0x4000, 0x7fff).ram();
map(0xc000, 0xc3ff).mirror(0xc00).bankrw("bank1");
map(0xc000, 0xc3ff).mirror(0xc00).bankrw(m_bank1);
map(0xe000, 0xffff).r(FUNC(homelab2_state::cass2_r));
}
@ -240,7 +244,7 @@ void homelab3_state::homelab3_mem(address_map &map)
map(0x0000, 0x3fff).rom();
map(0x4000, 0xcfff).ram();
map(0xe800, 0xefff).r(FUNC(homelab3_state::exxx_r));
map(0xf800, 0xffff).bankrw("bank1");
map(0xf800, 0xffff).bankrw(m_bank1);
}
void homelab3_state::homelab3_io(address_map &map)
@ -880,6 +884,9 @@ ROM_START( brailab4 )
ROM_LOAD_OPTIONAL( "brlcpm.rom", 0x5000, 0x0020, CRC(b936d568) SHA1(150330eccbc4b664eba4103f051d6e932038e9e8) )
ROM_END
} // anonymous namespace
/* Driver */
/* YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS */

View File

@ -35,17 +35,21 @@ ToDo:
#include "emu.h"
#include "cpu/z80/z80.h"
#include "machine/z80daisy.h"
#include "machine/z80ctc.h"
#include "machine/z80pio.h"
#include "machine/keyboard.h"
#include "machine/z80ctc.h"
#include "machine/z80daisy.h"
#include "machine/z80pio.h"
#include "emupal.h"
#include "screen.h"
#include "llc1.lh"
namespace {
class llc1_state : public driver_device
{
public:
@ -55,15 +59,18 @@ public:
, m_ctc(*this, "ctc")
, m_p_chargen(*this, "chargen")
, m_vram(*this, "videoram")
, m_inputs(*this, "X%u", 4U)
, m_digits(*this, "digit%u", 0U)
{ }
void llc1(machine_config &config);
DECLARE_INPUT_CHANGED_MEMBER(z3_button);
protected:
virtual void machine_start() override;
virtual void machine_reset() override;
private:
void machine_start() override;
void machine_reset() override;
void kbd_put(u8 data);
u8 port1a_r();
u8 port2a_r();
@ -81,6 +88,7 @@ private:
required_device<z80ctc_device> m_ctc;
required_region_ptr<u8> m_p_chargen;
required_shared_ptr<u8> m_vram;
required_ioport_array<3> m_inputs;
output_finder<8> m_digits;
};
@ -182,11 +190,11 @@ u8 llc1_state::port1a_r()
{
u8 data = 0;
if (!BIT(m_porta, 4))
data = ioport("X4")->read();
data = m_inputs[0]->read();
if (!BIT(m_porta, 5))
data = ioport("X5")->read();
data = m_inputs[1]->read();
if (!BIT(m_porta, 6))
data = ioport("X6")->read();
data = m_inputs[2]->read();
if (data & 0xf0)
data = (data >> 4) | 0x80;
@ -353,6 +361,8 @@ ROM_START( llc1 )
ROM_LOAD ("llc1_zg.bin", 0x0000, 0x0400, CRC(fa2cd659) SHA1(1fa5f9992f35929f656c4ce55ed6980c5da1772b) )
ROM_END
} // anonymous namespace
/* Driver */

View File

@ -22,19 +22,23 @@ ToDo:
#include "emu.h"
#include "cpu/z80/z80.h"
#include "machine/z80daisy.h"
#include "imagedev/cassette.h"
#include "machine/k7659kb.h"
#include "machine/ram.h"
#include "machine/z80ctc.h"
#include "machine/z80daisy.h"
#include "machine/z80pio.h"
#include "imagedev/cassette.h"
#include "sound/spkrdev.h"
#include "emupal.h"
#include "screen.h"
#include "speaker.h"
namespace {
class llc2_state : public driver_device
{
public:
@ -55,9 +59,11 @@ public:
void init_llc2();
protected:
virtual void machine_start() override;
virtual void machine_reset() override;
private:
void machine_start() override;
void machine_reset() override;
void rom_disable_w(u8 data);
void basic_enable_w(u8 data);
u8 port1b_r();
@ -83,8 +89,8 @@ private:
/* Address maps */
void llc2_state::mem_map(address_map &map)
{
map(0x0000, 0x3fff).bankr("bankr0").bankw("bankw0");
map(0x4000, 0x5fff).bankr("bankr1").bankw("bankw1");
map(0x0000, 0x3fff).bankr(m_bankr[0]).bankw(m_bankw[0]);
map(0x4000, 0x5fff).bankr(m_bankr[1]).bankw(m_bankw[1]);
map(0x6000, 0xbfff).ram();
map(0xc000, 0xffff).ram().share("videoram");
}
@ -294,6 +300,8 @@ ROM_START( llc2 )
ROM_LOAD ("llc2font.d17", 0x0000, 0x0800, CRC(ce53e55d) SHA1(da23d93f14a8a1f8d82bb72470a96b0bfd81ed1b) )
ROM_END
} // anonymous namespace
/* Driver */

View File

@ -42,6 +42,7 @@ Issues:
#include "speaker.h"
namespace {
class rc702_state : public driver_device
{
@ -65,10 +66,11 @@ public:
void rc702(machine_config &config);
private:
void machine_reset() override;
void machine_start() override;
protected:
virtual void machine_start() override;
virtual void machine_reset() override;
private:
uint8_t memory_read_byte(offs_t offset);
void memory_write_byte(offs_t offset, uint8_t data);
void port14_w(uint8_t data);
@ -421,6 +423,9 @@ ROM_START( rc702 )
ROM_LOAD( "roa327.rom", 0x0800, 0x0800, CRC(bed7ddb0) SHA1(201ae9e4ac3812577244b9c9044fadd04fb2b82f) ) // semi_gfx
ROM_END
} // anonymous namespace
/* Driver */
// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS

View File

@ -273,7 +273,7 @@ static INPUT_PORTS_START( m27_base )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* Meter */
PORT_START("KEY2")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_DEVICE_MEMBER("soundboard", irem_m37b_audio_device, sound_status_r)
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("soundboard", irem_m37b_audio_device, sound_status_r)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* Meter */
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL
// TODO: 2-way/4-way ...?

View File

@ -40,6 +40,8 @@
#include "bus/rs232/rs232.h"
namespace {
class systec_state : public driver_device
{
public:
@ -47,15 +49,17 @@ public:
: driver_device(mconfig, type, tag)
, m_maincpu(*this, "maincpu")
, m_ram(*this, "mainram")
{ }
{ }
void systec(machine_config &config);
protected:
virtual void machine_reset() override;
private:
void io_map(address_map &map);
void mem_map(address_map &map);
virtual void machine_reset() override;
required_device<cpu_device> m_maincpu;
required_shared_ptr<u8> m_ram;
};
@ -115,6 +119,9 @@ ROM_START( systec )
ROM_LOAD( "systec.bin", 0x0000, 0x2000, CRC(967108ab) SHA1(a414db032ca7db0f9fdbe22aa68a099a93efb593))
ROM_END
} // anonymous namespace
/* Driver */
// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS

View File

@ -54,13 +54,145 @@ Notes:
#include "emu.h"
#include "includes/vixen.h"
#include "bus/ieee488/ieee488.h"
#include "bus/rs232/rs232.h"
#include "cpu/z80/z80.h"
#include "imagedev/floppy.h"
#include "machine/i8155.h"
#include "machine/i8251.h"
#include "machine/ram.h"
#include "machine/timer.h"
#include "machine/wd_fdc.h"
#include "sound/discrete.h"
#include "emupal.h"
#include "screen.h"
#include "softlist.h"
#include "speaker.h"
namespace {
#define Z8400A_TAG "5f"
#define FDC1797_TAG "5n"
#define P8155H_TAG "2n"
#define SCREEN_TAG "screen"
class vixen_state : public driver_device
{
public:
vixen_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag)
, m_maincpu(*this, Z8400A_TAG)
, m_fdc(*this, FDC1797_TAG)
, m_io_i8155(*this, "c7")
, m_usart(*this, "c3")
, m_discrete(*this, "discrete")
, m_ieee488(*this, IEEE488_TAG)
, m_palette(*this, "palette")
, m_ram(*this, RAM_TAG)
, m_floppy0(*this, FDC1797_TAG":0")
, m_floppy1(*this, FDC1797_TAG":1")
, m_rs232(*this, "rs232")
, m_rom(*this, Z8400A_TAG)
, m_sync_rom(*this, "video")
, m_char_rom(*this, "chargen")
, m_video_ram(*this, "video_ram")
, m_key(*this, "KEY.%u", 0)
, m_cmd_d1(0)
, m_fdint(0)
, m_vsync(0)
, m_srq(1)
, m_atn(1)
, m_rxrdy(0)
, m_txrdy(0)
{ }
void vixen(machine_config &config);
void init_vixen();
protected:
virtual void machine_start() override;
virtual void machine_reset() override;
private:
uint8_t status_r();
void cmd_w(uint8_t data);
uint8_t ieee488_r();
uint8_t port3_r();
uint8_t i8155_pa_r();
void i8155_pb_w(uint8_t data);
void i8155_pc_w(uint8_t data);
void io_i8155_pb_w(uint8_t data);
void io_i8155_pc_w(uint8_t data);
DECLARE_WRITE_LINE_MEMBER( io_i8155_to_w );
DECLARE_WRITE_LINE_MEMBER( srq_w );
DECLARE_WRITE_LINE_MEMBER( atn_w );
DECLARE_WRITE_LINE_MEMBER( rxrdy_w );
DECLARE_WRITE_LINE_MEMBER( txrdy_w );
DECLARE_WRITE_LINE_MEMBER( fdc_intrq_w );
TIMER_DEVICE_CALLBACK_MEMBER(vsync_tick);
IRQ_CALLBACK_MEMBER(vixen_int_ack);
uint8_t opram_r(offs_t offset);
uint8_t oprom_r(offs_t offset);
uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
void bios_mem(address_map &map);
void vixen_io(address_map &map);
void vixen_mem(address_map &map);
required_device<cpu_device> m_maincpu;
required_device<fd1797_device> m_fdc;
required_device<i8155_device> m_io_i8155;
required_device<i8251_device> m_usart;
required_device<discrete_sound_device> m_discrete;
required_device<ieee488_device> m_ieee488;
required_device<palette_device> m_palette;
required_device<ram_device> m_ram;
required_device<floppy_connector> m_floppy0;
required_device<floppy_connector> m_floppy1;
required_device<rs232_port_device> m_rs232;
required_region_ptr<uint8_t> m_rom;
required_region_ptr<uint8_t> m_sync_rom;
required_region_ptr<uint8_t> m_char_rom;
required_shared_ptr<uint8_t> m_video_ram;
required_ioport_array<8> m_key;
address_space *m_program;
void update_interrupt();
// keyboard state
uint8_t m_col;
// interrupt state
int m_cmd_d0;
int m_cmd_d1;
bool m_fdint;
int m_vsync;
int m_srq;
int m_atn;
int m_enb_srq_int;
int m_enb_atn_int;
int m_rxrdy;
int m_txrdy;
int m_int_clk;
int m_enb_xmt_int;
int m_enb_rcv_int;
int m_enb_ring_int;
// video state
bool m_alt;
bool m_256;
};
//**************************************************************************
// INTERRUPTS
//**************************************************************************
@ -708,7 +840,7 @@ void vixen_state::vixen(machine_config &config)
// sound hardware
SPEAKER(config, "mono").front_center();
DISCRETE(config, DISCRETE_TAG, vixen_discrete).add_route(ALL_OUTPUTS, "mono", 0.20);
DISCRETE(config, m_discrete, vixen_discrete).add_route(ALL_OUTPUTS, "mono", 0.20);
// devices
i8155_device &i8155(I8155(config, P8155H_TAG, 23.9616_MHz_XTAL / 6));
@ -716,11 +848,11 @@ void vixen_state::vixen(machine_config &config)
i8155.out_pb_callback().set(FUNC(vixen_state::i8155_pb_w));
i8155.out_pc_callback().set(FUNC(vixen_state::i8155_pc_w));
i8155_device &i8155_io(I8155(config, P8155H_IO_TAG, 23.9616_MHz_XTAL / 6));
i8155_io.out_pa_callback().set(m_ieee488, FUNC(ieee488_device::host_dio_w));
i8155_io.out_pb_callback().set(FUNC(vixen_state::io_i8155_pb_w));
i8155_io.out_pc_callback().set(FUNC(vixen_state::io_i8155_pc_w));
i8155_io.out_to_callback().set(FUNC(vixen_state::io_i8155_to_w));
I8155(config, m_io_i8155, 23.9616_MHz_XTAL / 6);
m_io_i8155->out_pa_callback().set(m_ieee488, FUNC(ieee488_device::host_dio_w));
m_io_i8155->out_pb_callback().set(FUNC(vixen_state::io_i8155_pb_w));
m_io_i8155->out_pc_callback().set(FUNC(vixen_state::io_i8155_pc_w));
m_io_i8155->out_to_callback().set(FUNC(vixen_state::io_i8155_to_w));
I8251(config, m_usart, 0);
m_usart->txd_handler().set(m_rs232, FUNC(rs232_port_device::write_txd));
@ -777,6 +909,9 @@ void vixen_state::init_vixen()
}
} // anonymous namespace
//**************************************************************************
// SYSTEM DRIVERS

View File

@ -1,140 +0,0 @@
// license:BSD-3-Clause
// copyright-holders:Curt Coder
#ifndef MAME_INCLUDES_VIXEN_H
#define MAME_INCLUDES_VIXEN_H
#pragma once
#include "bus/rs232/rs232.h"
#include "cpu/z80/z80.h"
#include "imagedev/floppy.h"
#include "machine/i8155.h"
#include "machine/i8251.h"
#include "machine/timer.h"
#include "bus/ieee488/ieee488.h"
#include "machine/ram.h"
#include "machine/wd_fdc.h"
#include "sound/discrete.h"
#include "emupal.h"
#define Z8400A_TAG "5f"
#define FDC1797_TAG "5n"
#define P8155H_TAG "2n"
#define P8155H_IO_TAG "c7"
#define P8251A_TAG "c3"
#define DISCRETE_TAG "discrete"
#define SCREEN_TAG "screen"
#define RS232_TAG "rs232"
class vixen_state : public driver_device
{
public:
vixen_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag)
, m_maincpu(*this, Z8400A_TAG)
, m_fdc(*this, FDC1797_TAG)
, m_io_i8155(*this, P8155H_IO_TAG)
, m_usart(*this, P8251A_TAG)
, m_discrete(*this, DISCRETE_TAG)
, m_ieee488(*this, IEEE488_TAG)
, m_palette(*this, "palette")
, m_ram(*this, RAM_TAG)
, m_floppy0(*this, FDC1797_TAG":0")
, m_floppy1(*this, FDC1797_TAG":1")
, m_rs232(*this, RS232_TAG)
, m_rom(*this, Z8400A_TAG)
, m_sync_rom(*this, "video")
, m_char_rom(*this, "chargen")
, m_video_ram(*this, "video_ram")
, m_key(*this, "KEY.%u", 0)
, m_cmd_d1(0)
, m_fdint(0)
, m_vsync(0)
, m_srq(1)
, m_atn(1)
, m_rxrdy(0)
, m_txrdy(0)
{ }
void vixen(machine_config &config);
void init_vixen();
private:
uint8_t status_r();
void cmd_w(uint8_t data);
uint8_t ieee488_r();
uint8_t port3_r();
uint8_t i8155_pa_r();
void i8155_pb_w(uint8_t data);
void i8155_pc_w(uint8_t data);
void io_i8155_pb_w(uint8_t data);
void io_i8155_pc_w(uint8_t data);
DECLARE_WRITE_LINE_MEMBER( io_i8155_to_w );
DECLARE_WRITE_LINE_MEMBER( srq_w );
DECLARE_WRITE_LINE_MEMBER( atn_w );
DECLARE_WRITE_LINE_MEMBER( rxrdy_w );
DECLARE_WRITE_LINE_MEMBER( txrdy_w );
DECLARE_WRITE_LINE_MEMBER( fdc_intrq_w );
TIMER_DEVICE_CALLBACK_MEMBER(vsync_tick);
IRQ_CALLBACK_MEMBER(vixen_int_ack);
uint8_t opram_r(offs_t offset);
uint8_t oprom_r(offs_t offset);
uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
void bios_mem(address_map &map);
void vixen_io(address_map &map);
void vixen_mem(address_map &map);
required_device<cpu_device> m_maincpu;
required_device<fd1797_device> m_fdc;
required_device<i8155_device> m_io_i8155;
required_device<i8251_device> m_usart;
required_device<discrete_sound_device> m_discrete;
required_device<ieee488_device> m_ieee488;
required_device<palette_device> m_palette;
required_device<ram_device> m_ram;
required_device<floppy_connector> m_floppy0;
required_device<floppy_connector> m_floppy1;
required_device<rs232_port_device> m_rs232;
required_region_ptr<uint8_t> m_rom;
required_region_ptr<uint8_t> m_sync_rom;
required_region_ptr<uint8_t> m_char_rom;
required_shared_ptr<uint8_t> m_video_ram;
required_ioport_array<8> m_key;
address_space *m_program;
virtual void machine_start() override;
virtual void machine_reset() override;
void update_interrupt();
// keyboard state
uint8_t m_col;
// interrupt state
int m_cmd_d0;
int m_cmd_d1;
bool m_fdint;
int m_vsync;
int m_srq;
int m_atn;
int m_enb_srq_int;
int m_enb_atn_int;
int m_rxrdy;
int m_txrdy;
int m_int_clk;
int m_enb_xmt_int;
int m_enb_rcv_int;
int m_enb_ring_int;
// video state
bool m_alt;
bool m_256;
};
#endif // MAME_INCLUDES_VIXEN_H