summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author cam900 <dbtlrchl@naver.com>2018-07-30 00:17:07 +0900
committer cam900 <dbtlrchl@naver.com>2018-07-30 00:17:07 +0900
commitebb49e8f0bb4764ea6e2c33f3090ec85f54681c0 (patch)
treec4cd1bd81fa1bf2adeef8268613395a3499416c5
parentfe8b1c978b5da5206c0091a60b02328723b19cd6 (diff)
parentc70d3cf470f805a751799a3dd77870a2dff826ae (diff)
Merge remote-tracking branch 'upstream/master' into ymf278_envelope
# Please enter a commit message to explain why this merge is necessary, # especially if it merges an updated upstream into a topic branch. # # Lines starting with '#' will be ignored, and an empty message aborts # the commit.
-rw-r--r--scripts/target/mame/mess.lua2
-rw-r--r--src/devices/bus/vme/vme_fccpu20.cpp10
-rw-r--r--src/emu/schedule.cpp57
-rw-r--r--src/emu/sound.cpp26
-rw-r--r--src/mame/drivers/indigo.cpp6
-rw-r--r--src/mame/drivers/mrgame.cpp231
-rw-r--r--src/mame/drivers/unkz80.cpp (renamed from src/mame/drivers/jade.cpp)41
-rw-r--r--src/mame/mame.lst6
-rw-r--r--src/mame/mess.flt2
9 files changed, 241 insertions, 140 deletions
diff --git a/scripts/target/mame/mess.lua b/scripts/target/mame/mess.lua
index 8c24fcadf41..3d36a02c25c 100644
--- a/scripts/target/mame/mess.lua
+++ b/scripts/target/mame/mess.lua
@@ -3671,7 +3671,6 @@ files {
MAME_DIR .. "src/mame/drivers/imsai.cpp",
MAME_DIR .. "src/mame/drivers/indiana.cpp",
MAME_DIR .. "src/mame/drivers/itt3030.cpp",
- MAME_DIR .. "src/mame/drivers/jade.cpp",
MAME_DIR .. "src/mame/drivers/jonos.cpp",
MAME_DIR .. "src/mame/drivers/konin.cpp",
MAME_DIR .. "src/mame/drivers/kron.cpp",
@@ -3766,6 +3765,7 @@ files {
MAME_DIR .. "src/mame/drivers/tsispch.cpp",
MAME_DIR .. "src/mame/includes/tsispch.h",
MAME_DIR .. "src/mame/drivers/tti.cpp",
+ MAME_DIR .. "src/mame/drivers/unkz80.cpp",
MAME_DIR .. "src/mame/drivers/unistar.cpp",
MAME_DIR .. "src/mame/drivers/v6809.cpp",
MAME_DIR .. "src/mame/drivers/vector4.cpp",
diff --git a/src/devices/bus/vme/vme_fccpu20.cpp b/src/devices/bus/vme/vme_fccpu20.cpp
index af999f0f664..1e38411a44f 100644
--- a/src/devices/bus/vme/vme_fccpu20.cpp
+++ b/src/devices/bus/vme/vme_fccpu20.cpp
@@ -243,6 +243,15 @@ void vme_fccpu20_device::cpu20_mem(address_map &map)
}
+static DEVICE_INPUT_DEFAULTS_START( terminal )
+ DEVICE_INPUT_DEFAULTS( "RS232_RXBAUD", 0xff, RS232_BAUD_9600 )
+ DEVICE_INPUT_DEFAULTS( "RS232_TXBAUD", 0xff, RS232_BAUD_9600 )
+ DEVICE_INPUT_DEFAULTS( "RS232_STARTBITS", 0xff, RS232_STARTBITS_1 )
+ DEVICE_INPUT_DEFAULTS( "RS232_DATABITS", 0xff, RS232_DATABITS_7 )
+ DEVICE_INPUT_DEFAULTS( "RS232_PARITY", 0xff, RS232_PARITY_NONE )
+ DEVICE_INPUT_DEFAULTS( "RS232_STOPBITS", 0xff, RS232_STOPBITS_2 )
+DEVICE_INPUT_DEFAULTS_END
+
MACHINE_CONFIG_START(vme_fccpu20_device::device_add_mconfig)
/* basic machine hardware */
MCFG_DEVICE_ADD ("maincpu", M68020, CLOCK50 / 3) /* Crytstal verified from picture HCI */
@@ -294,6 +303,7 @@ MACHINE_CONFIG_START(vme_fccpu20_device::device_add_mconfig)
MCFG_DEVICE_ADD (RS232P1_TAG, RS232_PORT, default_rs232_devices, "terminal")
MCFG_RS232_RXD_HANDLER (WRITELINE ("mpcc", mpcc68561_device, write_rx))
MCFG_RS232_CTS_HANDLER (WRITELINE ("mpcc", mpcc68561_device, cts_w))
+ MCFG_SLOT_OPTION_DEVICE_INPUT_DEFAULTS("terminal", terminal)
// MPCC2 - RS232
MCFG_DEVICE_ADD (RS232P2_TAG, RS232_PORT, default_rs232_devices, nullptr)
diff --git a/src/emu/schedule.cpp b/src/emu/schedule.cpp
index ba6c5e79302..e2b1497995f 100644
--- a/src/emu/schedule.cpp
+++ b/src/emu/schedule.cpp
@@ -452,12 +452,7 @@ void device_scheduler::timeslice()
{
// only process if this CPU is executing or truly halted (not yielding)
// and if our target is later than the CPU's current time (coarse check)
- if (exec->m_suspend != 0)
- {
- if (exec->m_eatcycles)
- exec->m_localtime = target;
- }
- else if (target.seconds() >= exec->m_localtime.seconds())
+ if (EXPECTED((exec->m_suspend == 0 || exec->m_eatcycles) && target.seconds() >= exec->m_localtime.seconds()))
{
// compute how many attoseconds to execute this CPU
attoseconds_t delta = target.attoseconds() - exec->m_localtime.attoseconds();
@@ -465,36 +460,44 @@ void device_scheduler::timeslice()
delta += ATTOSECONDS_PER_SECOND;
assert(delta == (target - exec->m_localtime).as_attoseconds());
+ if (exec->m_attoseconds_per_cycle == 0)
+ {
+ exec->m_localtime = target;
+ }
// if we have enough for at least 1 cycle, do the math
- if (delta >= exec->m_attoseconds_per_cycle)
+ else if (delta >= exec->m_attoseconds_per_cycle)
{
// compute how many cycles we want to execute
int ran = exec->m_cycles_running = divu_64x32(u64(delta) >> exec->m_divshift, exec->m_divisor);
LOG((" cpu '%s': %d (%d cycles)\n", exec->device().tag(), delta, exec->m_cycles_running));
- g_profiler.start(exec->m_profiler);
-
- // note that this global variable cycles_stolen can be modified
- // via the call to cpu_execute
- exec->m_cycles_stolen = 0;
- m_executing_device = exec;
- *exec->m_icountptr = exec->m_cycles_running;
- if (!call_debugger)
- exec->run();
- else
+ // if we're not suspended, actually execute
+ if (exec->m_suspend == 0)
{
- exec->debugger_start_cpu_hook(target);
- exec->run();
- exec->debugger_stop_cpu_hook();
+ g_profiler.start(exec->m_profiler);
+
+ // note that this global variable cycles_stolen can be modified
+ // via the call to cpu_execute
+ exec->m_cycles_stolen = 0;
+ m_executing_device = exec;
+ *exec->m_icountptr = exec->m_cycles_running;
+ if (!call_debugger)
+ exec->run();
+ else
+ {
+ exec->debugger_start_cpu_hook(target);
+ exec->run();
+ exec->debugger_stop_cpu_hook();
+ }
+
+ // adjust for any cycles we took back
+ assert(ran >= *exec->m_icountptr);
+ ran -= *exec->m_icountptr;
+ assert(ran >= exec->m_cycles_stolen);
+ ran -= exec->m_cycles_stolen;
+ g_profiler.stop();
}
- // adjust for any cycles we took back
- assert(ran >= *exec->m_icountptr);
- ran -= *exec->m_icountptr;
- assert(ran >= exec->m_cycles_stolen);
- ran -= exec->m_cycles_stolen;
- g_profiler.stop();
-
// account for these cycles
exec->m_totalcycles += ran;
diff --git a/src/emu/sound.cpp b/src/emu/sound.cpp
index cff1fb9dc25..ce72846a9c3 100644
--- a/src/emu/sound.cpp
+++ b/src/emu/sound.cpp
@@ -53,7 +53,7 @@ sound_stream::sound_stream(device_t &device, int inputs, int outputs, int sample
: m_device(device),
m_next(nullptr),
m_sample_rate(sample_rate),
- m_new_sample_rate(0),
+ m_new_sample_rate(0xffffffff),
m_attoseconds_per_sample(0),
m_max_samples_per_update(0),
m_input(inputs),
@@ -430,13 +430,13 @@ void sound_stream::update_with_accounting(bool second_tick)
void sound_stream::apply_sample_rate_changes()
{
// skip if nothing to do
- if (m_new_sample_rate == 0)
+ if (m_new_sample_rate == 0xffffffff)
return;
// update to the new rate and remember the old rate
u32 old_rate = m_sample_rate;
m_sample_rate = m_new_sample_rate;
- m_new_sample_rate = 0;
+ m_new_sample_rate = 0xffffffff;
// recompute all the data
recompute_sample_rate_data();
@@ -449,15 +449,16 @@ void sound_stream::apply_sample_rate_changes()
}
else
{
- m_output_sampindex = m_device.machine().sound().last_update().attoseconds() / m_attoseconds_per_sample;
+ m_output_sampindex = m_attoseconds_per_sample ? m_device.machine().sound().last_update().attoseconds() / m_attoseconds_per_sample : 0;
m_output_update_sampindex = m_output_sampindex;
}
m_output_base_sampindex = m_output_sampindex - m_max_samples_per_update;
// clear out the buffer
- for (auto & elem : m_output)
- memset(&elem.m_buffer[0], 0, m_max_samples_per_update * sizeof(elem.m_buffer[0]));
+ if (m_max_samples_per_update)
+ for (auto & elem : m_output)
+ memset(&elem.m_buffer[0], 0, m_max_samples_per_update * sizeof(elem.m_buffer[0]));
}
@@ -540,8 +541,13 @@ void sound_stream::recompute_sample_rate_data()
if (m_synchronous)
{
attotime time = m_device.machine().time();
- attoseconds_t next_edge = m_attoseconds_per_sample - (time.attoseconds() % m_attoseconds_per_sample);
- m_sync_timer->adjust(attotime(0, next_edge));
+ if (m_attoseconds_per_sample)
+ {
+ attoseconds_t next_edge = m_attoseconds_per_sample - (time.attoseconds() % m_attoseconds_per_sample);
+ m_sync_timer->adjust(attotime(0, next_edge));
+ }
+ else
+ m_sync_timer->adjust(attotime::never);
}
}
@@ -610,7 +616,7 @@ void sound_stream::postload()
memset(&elem.m_buffer[0], 0, m_output_bufalloc * sizeof(elem.m_buffer[0]));
// recompute the sample indexes to make sense
- m_output_sampindex = m_device.machine().sound().last_update().attoseconds() / m_attoseconds_per_sample;
+ m_output_sampindex = m_attoseconds_per_sample ? m_device.machine().sound().last_update().attoseconds() / m_attoseconds_per_sample : 0;
m_output_update_sampindex = m_output_sampindex;
m_output_base_sampindex = m_output_sampindex - m_max_samples_per_update;
}
@@ -676,7 +682,7 @@ stream_sample_t *sound_stream::generate_resampled_data(stream_input &input, u32
{
// if we don't have an output to pull data from, generate silence
stream_sample_t *dest = &input.m_resample[0];
- if (input.m_source == nullptr || input.m_source->m_buffer.size() == 0)
+ if (input.m_source == nullptr || input.m_source->m_stream->m_attoseconds_per_sample == 0)
{
memset(dest, 0, numsamples * sizeof(*dest));
return &input.m_resample[0];
diff --git a/src/mame/drivers/indigo.cpp b/src/mame/drivers/indigo.cpp
index 7d9b1939ccd..4281179f99b 100644
--- a/src/mame/drivers/indigo.cpp
+++ b/src/mame/drivers/indigo.cpp
@@ -627,7 +627,7 @@ MACHINE_CONFIG_START(indigo_state::indigo4k)
MACHINE_CONFIG_END
ROM_START( indigo3k )
- ROM_REGION( 0x40000, "user1", 0 )
+ ROM_REGION32_BE( 0x40000, "user1", 0 )
ROM_SYSTEM_BIOS( 0, "401-rev-c", "SGI Version 4.0.1 Rev C LG1/GR2, Jul 9, 1992" ) // dumped over serial connection from boot monitor and swapped
ROMX_LOAD( "ip12prom.070-8088-xxx.u56", 0x000000, 0x040000, CRC(25ca912f) SHA1(94b3753d659bfe50b914445cef41290122f43880), ROM_GROUPWORD | ROM_REVERSE | ROM_BIOS(0) )
ROM_SYSTEM_BIOS( 1, "401-rev-d", "SGI Version 4.0.1 Rev D LG1/GR2, Mar 24, 1992" ) // dumped with EPROM programmer
@@ -635,8 +635,8 @@ ROM_START( indigo3k )
ROM_END
ROM_START( indigo4k )
- ROM_REGION( 0x80000, "user1", 0 )
- ROM_LOAD( "ip20prom.070-8116-004.bin", 0x000000, 0x080000, CRC(940d960e) SHA1(596aba530b53a147985ff3f6f853471ce48c866c) )
+ ROM_REGION32_BE( 0x80000, "user1", 0 )
+ ROMX_LOAD( "ip20prom.070-8116-004.bin", 0x000000, 0x080000, CRC(940d960e) SHA1(596aba530b53a147985ff3f6f853471ce48c866c), ROM_GROUPDWORD | ROM_REVERSE )
ROM_END
// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS
diff --git a/src/mame/drivers/mrgame.cpp b/src/mame/drivers/mrgame.cpp
index 3c460b5ebd4..aa9ddfe0b45 100644
--- a/src/mame/drivers/mrgame.cpp
+++ b/src/mame/drivers/mrgame.cpp
@@ -10,7 +10,7 @@
Status:
- motrshow, motrshowa, dakar working in the electronic sense, but not mechanically
- macattck most roms are missing
-- wcup90 different hardware, not coded
+- wcup90 different hardware, partially coded based on macattck schematic
How to set up the machine (motrshow, motrshowa, dakar):
- These machines need to be loaded with default settings before they can accept coins
@@ -27,16 +27,17 @@ ToDo:
- Support for electronic volume control
- Audio rom banking
- Most sounds missing due to unemulated M114 chip
-- wcup90 is different hardware and there's no schematic
*****************************************************************************************/
#include "emu.h"
#include "cpu/m68000/m68000.h"
#include "cpu/z80/z80.h"
+#include "machine/74259.h"
#include "machine/i8255.h"
#include "machine/nvram.h"
#include "machine/timer.h"
+//#include "machine/watchdog.h"
#include "sound/dac.h"
#include "sound/tms5220.h"
#include "sound/volt_reg.h"
@@ -58,6 +59,7 @@ public:
, m_maincpu(*this, "maincpu")
, m_audiocpu1(*this, "audiocpu1")
, m_audiocpu2(*this, "audiocpu2")
+ , m_videocpu(*this, "videocpu")
, m_io_dsw0(*this, "DSW0")
, m_io_dsw1(*this, "DSW1")
, m_io_x0(*this, "X0")
@@ -65,6 +67,7 @@ public:
{ }
void mrgame(machine_config &config);
+ void wcup90(machine_config &config);
void init_mrgame();
@@ -77,42 +80,55 @@ private:
DECLARE_WRITE8_MEMBER(sound_w);
DECLARE_WRITE8_MEMBER(triple_w);
DECLARE_WRITE8_MEMBER(video_w);
- DECLARE_WRITE8_MEMBER(video_ctrl_w);
+ DECLARE_WRITE_LINE_MEMBER(video_a11_w);
+ DECLARE_WRITE_LINE_MEMBER(video_a12_w);
+ DECLARE_WRITE_LINE_MEMBER(video_a13_w);
+ DECLARE_WRITE_LINE_MEMBER(intst_w);
+ DECLARE_WRITE_LINE_MEMBER(nmi_intst_w);
+ DECLARE_WRITE_LINE_MEMBER(flip_w);
DECLARE_READ8_MEMBER(col_r);
DECLARE_READ8_MEMBER(sound_r);
DECLARE_READ8_MEMBER(porta_r);
DECLARE_READ8_MEMBER(portc_r);
DECLARE_READ8_MEMBER(rsw_r);
+ DECLARE_WRITE_LINE_MEMBER(vblank_int_w);
+ DECLARE_WRITE_LINE_MEMBER(vblank_nmi_w);
TIMER_DEVICE_CALLBACK_MEMBER(irq_timer);
uint32_t screen_update_mrgame(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- std::unique_ptr<bitmap_ind16> m_tile_bitmap;
- required_device<palette_device> m_palette;
- required_shared_ptr<uint8_t> m_p_videoram;
- required_shared_ptr<uint8_t> m_p_objectram;
- required_device<gfxdecode_device> m_gfxdecode;
+
void audio1_io(address_map &map);
void audio1_map(address_map &map);
void audio2_io(address_map &map);
void audio2_map(address_map &map);
void main_map(address_map &map);
void video_map(address_map &map);
+ void wcup90_video_map(address_map &map);
+
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
+
+ std::unique_ptr<bitmap_ind16> m_tile_bitmap;
+ required_device<palette_device> m_palette;
+ required_shared_ptr<uint8_t> m_p_videoram;
+ required_shared_ptr<uint8_t> m_p_objectram;
+ required_device<gfxdecode_device> m_gfxdecode;
bool m_ack1;
bool m_ack2;
bool m_ackv;
bool m_flip;
+ bool m_intst;
uint8_t m_irq_state;
uint8_t m_row_data;
uint8_t m_sound_data;
uint8_t m_gfx_bank;
uint8_t m_video_data;
uint8_t m_video_status;
- uint8_t m_video_ctrl[8];
- virtual void machine_start() override;
- virtual void machine_reset() override;
+
required_device<m68000_device> m_maincpu;
required_device<z80_device> m_audiocpu1;
required_device<z80_device> m_audiocpu2;
+ required_device<z80_device> m_videocpu;
required_ioport m_io_dsw0;
required_ioport m_io_dsw1;
required_ioport m_io_x0;
@@ -140,11 +156,22 @@ void mrgame_state::video_map(address_map &map)
map(0x4000, 0x47ff).ram();
map(0x4800, 0x4bff).mirror(0x0400).ram().share("videoram");
map(0x5000, 0x50ff).mirror(0x0700).ram().share("objectram");
- map(0x6800, 0x6807).mirror(0x07f8).w(FUNC(mrgame_state::video_ctrl_w));
- map(0x7000, 0x77ff).nopr(); //AFR - looks like a watchdog
+ map(0x6800, 0x6807).mirror(0x07f8).w("selectlatch", FUNC(ls259_device::write_d0));
+ map(0x7000, 0x7000).mirror(0x07ff).nopr(); //AFR - watchdog reset
map(0x8100, 0x8103).mirror(0x7efc).rw("ppi", FUNC(i8255_device::read), FUNC(i8255_device::write));
}
+void mrgame_state::wcup90_video_map(address_map &map)
+{
+ map(0x0000, 0x7fff).rom().region("video", 0);
+ map(0x8000, 0x87ff).ram();
+ map(0x8800, 0x8bff).mirror(0x0400).ram().share("videoram");
+ map(0x9000, 0x90ff).mirror(0x0700).ram().share("objectram");
+ map(0xa800, 0xa807).mirror(0x07f8).w("selectlatch", FUNC(ls259_device::write_d0));
+ map(0xb000, 0xb000).mirror(0x07ff).nopr(); //AFR - watchdog reset
+ map(0xc000, 0xc003).mirror(0x3ffc).rw("ppi", FUNC(i8255_device::read), FUNC(i8255_device::write));
+}
+
void mrgame_state::audio1_map(address_map &map)
{
map(0x0000, 0x7fff).rom().region("audio1", 0);
@@ -225,13 +252,13 @@ static INPUT_PORTS_START( mrgame )
PORT_BIT( 0xe9, IP_ACTIVE_LOW, IPT_UNUSED )
INPUT_PORTS_END
-READ8_MEMBER( mrgame_state::rsw_r )
+READ8_MEMBER(mrgame_state::rsw_r)
{
return m_io_dsw0->read() | ((uint8_t)m_ack1 << 5) | ((uint8_t)m_ack2 << 4);
}
// this is like a keyboard, energise a row and read the column data
-READ8_MEMBER( mrgame_state::col_r )
+READ8_MEMBER(mrgame_state::col_r)
{
if (m_row_data == 0)
return m_io_x0->read();
@@ -246,17 +273,17 @@ READ8_MEMBER( mrgame_state::col_r )
return 0xff;
}
-WRITE8_MEMBER( mrgame_state::row_w )
+WRITE8_MEMBER(mrgame_state::row_w)
{
m_row_data = data & 7;
}
-READ8_MEMBER( mrgame_state::sound_r )
+READ8_MEMBER(mrgame_state::sound_r)
{
return m_sound_data;
}
-WRITE8_MEMBER( mrgame_state::sound_w )
+WRITE8_MEMBER(mrgame_state::sound_w)
{
m_sound_data = data;
m_audiocpu1->set_input_line(INPUT_LINE_NMI, BIT(data, 7) ? CLEAR_LINE : ASSERT_LINE);
@@ -264,56 +291,73 @@ WRITE8_MEMBER( mrgame_state::sound_w )
}
// this produces 24 outputs from three driver chips to drive lamps & solenoids
-WRITE8_MEMBER( mrgame_state::triple_w )
+WRITE8_MEMBER(mrgame_state::triple_w)
{
if ((data & 0x18)==0)
m_ackv = BIT(data, 7);
}
-WRITE8_MEMBER( mrgame_state::video_w )
+WRITE8_MEMBER(mrgame_state::video_w)
{
m_video_data = data;
}
-WRITE8_MEMBER( mrgame_state::video_ctrl_w )
+WRITE_LINE_MEMBER(mrgame_state::video_a11_w)
{
- m_video_ctrl[offset] = data;
+ m_gfx_bank = (m_gfx_bank & 6) | (state ? 1 : 0);
+}
- if (offset == 0)
- m_gfx_bank = (m_gfx_bank & 6) | BIT(data, 0);
- else
- if (offset == 3)
- m_gfx_bank = (m_gfx_bank & 5) | (BIT(data, 0) << 1);
- else
- if (offset == 4)
- m_gfx_bank = (m_gfx_bank & 3) | (BIT(data, 0) << 2);
- else
- if (offset == 6)
- m_flip = BIT(data, 0);
+WRITE_LINE_MEMBER(mrgame_state::video_a12_w)
+{
+ m_gfx_bank = (m_gfx_bank & 5) | (state ? 2 : 0);
+}
+
+WRITE_LINE_MEMBER(mrgame_state::video_a13_w)
+{
+ m_gfx_bank = (m_gfx_bank & 3) | (state ? 4 : 0);
+}
+
+WRITE_LINE_MEMBER(mrgame_state::intst_w)
+{
+ m_intst = state;
+ if (!state)
+ m_videocpu->set_input_line(INPUT_LINE_IRQ0, CLEAR_LINE);
+}
+
+WRITE_LINE_MEMBER(mrgame_state::nmi_intst_w)
+{
+ m_intst = state;
+ if (!state)
+ m_videocpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE);
}
-WRITE8_MEMBER( mrgame_state::ack1_w )
+WRITE_LINE_MEMBER(mrgame_state::flip_w)
+{
+ m_flip = state;
+}
+
+WRITE8_MEMBER(mrgame_state::ack1_w)
{
m_ack1 = BIT(data, 0);
}
-WRITE8_MEMBER( mrgame_state::ack2_w )
+WRITE8_MEMBER(mrgame_state::ack2_w)
{
m_ack2 = BIT(data, 0);
}
-READ8_MEMBER( mrgame_state::porta_r )
+READ8_MEMBER(mrgame_state::porta_r)
{
return m_video_data;
}
-WRITE8_MEMBER( mrgame_state::portb_w )
+WRITE8_MEMBER(mrgame_state::portb_w)
{
m_video_status = data;
m_ackv = 0;
}
-READ8_MEMBER( mrgame_state::portc_r )
+READ8_MEMBER(mrgame_state::portc_r)
{
return m_io_dsw1->read() | ((uint8_t)m_ackv << 4);
}
@@ -341,9 +385,21 @@ void mrgame_state::init_mrgame()
{
}
+WRITE_LINE_MEMBER(mrgame_state::vblank_int_w)
+{
+ if (state && m_intst)
+ m_videocpu->set_input_line(INPUT_LINE_IRQ0, ASSERT_LINE);
+}
+
+WRITE_LINE_MEMBER(mrgame_state::vblank_nmi_w)
+{
+ if (state && m_intst)
+ m_videocpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE);
+}
+
// This pulses the IRQ pins of both audio cpus. The schematic does not
//show which 4040 output is used, so we have guessed.
-TIMER_DEVICE_CALLBACK_MEMBER( mrgame_state::irq_timer )
+TIMER_DEVICE_CALLBACK_MEMBER(mrgame_state::irq_timer)
{
m_irq_state++;
// pulse_line of IRQ not allowed, so trying this instead
@@ -383,12 +439,12 @@ static const gfx_layout spritelayout =
32*8
};
-static GFXDECODE_START( gfx_mrgame )
- GFXDECODE_ENTRY( "chargen", 0, charlayout, 0, 16 )
- GFXDECODE_ENTRY( "chargen", 0, spritelayout, 0, 16 )
+static GFXDECODE_START(gfx_mrgame)
+ GFXDECODE_ENTRY("chargen", 0, charlayout, 0, 16)
+ GFXDECODE_ENTRY("chargen", 0, spritelayout, 0, 16)
GFXDECODE_END
-PALETTE_INIT_MEMBER( mrgame_state, mrgame)
+PALETTE_INIT_MEMBER(mrgame_state, mrgame)
{
static const int resistances[3] = { 1000, 470, 220 };
double rweights[3], gweights[3], bweights[2];
@@ -479,31 +535,43 @@ uint32_t mrgame_state::screen_update_mrgame(screen_device &screen, bitmap_ind16
MACHINE_CONFIG_START(mrgame_state::mrgame)
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M68000, XTAL(6'000'000))
+ MCFG_DEVICE_ADD("maincpu", M68000, 6_MHz_XTAL)
MCFG_DEVICE_PROGRAM_MAP(main_map)
MCFG_DEVICE_PERIODIC_INT_DRIVER(mrgame_state, irq1_line_hold, 183)
- MCFG_DEVICE_ADD("videocpu", Z80, XTAL(18'432'000)/6)
+
+ MCFG_DEVICE_ADD("videocpu", Z80, 18.432_MHz_XTAL / 6)
MCFG_DEVICE_PROGRAM_MAP(video_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", mrgame_state, nmi_line_pulse)
- MCFG_DEVICE_ADD("audiocpu1", Z80, XTAL(4'000'000))
+
+ MCFG_DEVICE_ADD("audiocpu1", Z80, 4_MHz_XTAL)
MCFG_DEVICE_PROGRAM_MAP(audio1_map)
MCFG_DEVICE_IO_MAP(audio1_io)
- MCFG_DEVICE_ADD("audiocpu2", Z80, XTAL(4'000'000))
+
+ MCFG_DEVICE_ADD("audiocpu2", Z80, 4_MHz_XTAL)
MCFG_DEVICE_PROGRAM_MAP(audio2_map)
MCFG_DEVICE_IO_MAP(audio2_io)
- MCFG_NVRAM_ADD_0FILL("nvram")
+ MCFG_NVRAM_ADD_0FILL("nvram") // 5564 (x2) + battery
+
+ ls259_device &select(LS259(config, "selectlatch")); // 5B
+ select.q_out_cb<0>().set(FUNC(mrgame_state::video_a11_w));
+ select.q_out_cb<1>().set(FUNC(mrgame_state::nmi_intst_w));
+ select.q_out_cb<3>().set(FUNC(mrgame_state::video_a12_w));
+ select.q_out_cb<4>().set(FUNC(mrgame_state::video_a13_w));
+ select.q_out_cb<6>().set(FUNC(mrgame_state::flip_w));
+
+ //watchdog_timer_device &watchdog(WATCHDOG_TIMER(config, "watchdog")); // LS393 at 5D (video board) driven by VBLANK
+ //watchdog.set_vblank_count("screen", 8);
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(50)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
- MCFG_SCREEN_SIZE(256, 256)
- MCFG_SCREEN_VISIBLE_AREA(0, 255, 8, 247) // If you align with X on test screen some info is chopped off
+ MCFG_SCREEN_RAW_PARAMS(18.432_MHz_XTAL / 3, 384, 0, 256, 264, 8, 248) // If you align with X on test screen some info is chopped off
MCFG_SCREEN_UPDATE_DRIVER(mrgame_state, screen_update_mrgame)
MCFG_SCREEN_PALETTE("palette")
+ MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, mrgame_state, vblank_nmi_w))
+
MCFG_PALETTE_ADD("palette", 64)
MCFG_PALETTE_INIT_OWNER(mrgame_state, mrgame)
+
MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_mrgame)
/* Sound */
@@ -530,6 +598,19 @@ MACHINE_CONFIG_START(mrgame_state::mrgame)
MCFG_I8255_IN_PORTC_CB(READ8(*this, mrgame_state, portc_r))
MACHINE_CONFIG_END
+MACHINE_CONFIG_START(mrgame_state::wcup90)
+ mrgame(config);
+
+ MCFG_DEVICE_MODIFY("videocpu")
+ MCFG_DEVICE_PROGRAM_MAP(wcup90_video_map)
+
+ MCFG_DEVICE_MODIFY("selectlatch") // U48
+ MCFG_ADDRESSABLE_LATCH_Q1_OUT_CB(WRITELINE(*this, mrgame_state, intst_w))
+
+ MCFG_DEVICE_MODIFY("screen")
+ MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, mrgame_state, vblank_int_w))
+MACHINE_CONFIG_END
+
/*-------------------------------------------------------------------
/ Dakar (06/1988)
/-------------------------------------------------------------------*/
@@ -538,14 +619,14 @@ ROM_START(dakar)
ROM_LOAD16_BYTE("cpu_ic13.rom", 0x000001, 0x8000, CRC(83183929) SHA1(977ac10a1e78c759eb0550794f2639fe0e2d1507))
ROM_LOAD16_BYTE("cpu_ic14.rom", 0x000000, 0x8000, CRC(2010d28d) SHA1(d262dabd9298566df43df298cf71c974bee1434a))
- ROM_REGION(0x10000, "video", 0)
- ROM_LOAD("vid_ic14.rom", 0x00000, 0x8000, CRC(88a9ca81) SHA1(9660d416b2b8f1937cda7bca51bd287641c7730c))
+ ROM_REGION(0x8000, "video", 0)
+ ROM_LOAD("vid_ic14.rom", 0x0000, 0x8000, CRC(88a9ca81) SHA1(9660d416b2b8f1937cda7bca51bd287641c7730c))
- ROM_REGION( 0x10000, "chargen", 0 )
+ ROM_REGION(0x10000, "chargen", 0)
ROM_LOAD("vid_ic55.rom", 0x0000, 0x8000, CRC(3c68b448) SHA1(f416f00d2de0c71c021fec0e9702ba79b761d5e7))
ROM_LOAD("vid_ic56.rom", 0x8000, 0x8000, CRC(0aac43e9) SHA1(28edfeddb2d54e40425488bad37e3819e4488b0b))
- ROM_REGION( 0x0020, "proms", 0 )
+ ROM_REGION(0x0020, "proms", 0)
ROM_LOAD("vid_ic66.rom", 0x0000, 0x0020, CRC(c8269b27) SHA1(daa83bfdb1e255b846bbade7f200abeaa9399c06))
ROM_REGION(0x10000, "audio1", 0)
@@ -568,14 +649,14 @@ ROM_START(motrshow)
ROM_LOAD16_BYTE("cpu_ic13.rom", 0x000001, 0x8000, CRC(e862ca71) SHA1(b02e5f39f9427d58b70b7999a5ff6075beff05ae))
ROM_LOAD16_BYTE("cpu_ic14.rom", 0x000000, 0x8000, CRC(c898ae25) SHA1(f0e1369284a1e0f394f1d40281fd46252016602e))
- ROM_REGION(0x10000, "video", 0)
- ROM_LOAD("vid_ic14.rom", 0x00000, 0x8000, CRC(1d4568e2) SHA1(bfc2bb59708ce3a09f9a1b3460ed8d5269840c97))
+ ROM_REGION(0x8000, "video", 0)
+ ROM_LOAD("vid_ic14.rom", 0x0000, 0x8000, CRC(1d4568e2) SHA1(bfc2bb59708ce3a09f9a1b3460ed8d5269840c97))
- ROM_REGION( 0x10000, "chargen", 0 )
+ ROM_REGION(0x10000, "chargen", 0)
ROM_LOAD("vid_ic55.rom", 0x0000, 0x8000, CRC(c27a4ded) SHA1(9c2c9b17f1e71afb74bdfbdcbabb99ef935d32db))
ROM_LOAD("vid_ic56.rom", 0x8000, 0x8000, CRC(1664ec8d) SHA1(e7b15acdac7dfc51b668e908ca95f02a2b569737))
- ROM_REGION( 0x0020, "proms", 0 )
+ ROM_REGION(0x0020, "proms", 0)
ROM_LOAD("vid_ic66.rom", 0x0000, 0x0020, CRC(5b585252) SHA1(b88e56ebdce2c3a4b170aff4b05018e7c21a79b8))
ROM_REGION(0x10000, "audio1", 0)
@@ -594,14 +675,14 @@ ROM_START(motrshowa)
ROM_LOAD16_BYTE("cpuic13a.rom", 0x000001, 0x8000, CRC(2dbdd9d4) SHA1(b404814a4e83ead6da3c57818ae97f23d380f9da))
ROM_LOAD16_BYTE("cpuic14b.rom", 0x000000, 0x8000, CRC(0bd98fec) SHA1(b90a7e997db59740398003ba94a69118b1ee70af))
- ROM_REGION(0x10000, "video", 0)
- ROM_LOAD("vid_ic14.rom", 0x00000, 0x8000, CRC(1d4568e2) SHA1(bfc2bb59708ce3a09f9a1b3460ed8d5269840c97))
+ ROM_REGION(0x8000, "video", 0)
+ ROM_LOAD("vid_ic14.rom", 0x0000, 0x8000, CRC(1d4568e2) SHA1(bfc2bb59708ce3a09f9a1b3460ed8d5269840c97))
- ROM_REGION( 0x10000, "chargen", 0 )
+ ROM_REGION(0x10000, "chargen", 0)
ROM_LOAD("vid_ic55.rom", 0x0000, 0x8000, CRC(c27a4ded) SHA1(9c2c9b17f1e71afb74bdfbdcbabb99ef935d32db))
ROM_LOAD("vid_ic56.rom", 0x8000, 0x8000, CRC(1664ec8d) SHA1(e7b15acdac7dfc51b668e908ca95f02a2b569737))
- ROM_REGION( 0x0020, "proms", 0 )
+ ROM_REGION(0x0020, "proms", 0)
ROM_LOAD("vid_ic66.rom", 0x0000, 0x0020, CRC(5b585252) SHA1(b88e56ebdce2c3a4b170aff4b05018e7c21a79b8))
ROM_REGION(0x10000, "audio1", 0)
@@ -623,17 +704,17 @@ ROM_START(macattck)
ROM_LOAD16_BYTE("cpu_ic13.rom", 0x000001, 0x8000, NO_DUMP)
ROM_LOAD16_BYTE("cpu_ic14.rom", 0x000000, 0x8000, NO_DUMP)
- ROM_REGION(0x10000, "video", 0)
- ROM_LOAD("vid_ic91.rom", 0x00000, 0x8000, CRC(42d2ba01) SHA1(c13d38c2798575760461912cef65dde57dfd938c))
+ ROM_REGION(0x8000, "video", 0)
+ ROM_LOAD("vid_ic91.rom", 0x0000, 0x8000, CRC(42d2ba01) SHA1(c13d38c2798575760461912cef65dde57dfd938c))
- ROM_REGION( 0x30000, "chargen", 0 )
+ ROM_REGION(0x30000, "chargen", 0)
ROM_LOAD("vid_ic14.rom", 0x00000, 0x8000, CRC(f6e047fb) SHA1(6be712dda60257b9e7014315c8fee19812622bf6))
ROM_LOAD("vid_ic15.rom", 0x08000, 0x8000, CRC(405a8f54) SHA1(4d58915763db3c3be2bfc166be1a12285ff2c38b))
ROM_LOAD("vid_ic16.rom", 0x10000, 0x8000, CRC(063ea783) SHA1(385dbfcc8ecd3a784f9a8752d00e060b48d70d6a))
ROM_LOAD("vid_ic17.rom", 0x18000, 0x8000, CRC(9f95abf8) SHA1(d71cf36c8bf27ad41b2d3cebd0af620a34ce0062) BAD_DUMP)
ROM_LOAD("vid_ic18.rom", 0x20000, 0x8000, CRC(83ef25f8) SHA1(bab482badb8646b099dbb197ca9af3a126b274e3))
- ROM_REGION( 0x0020, "proms", 0 )
+ ROM_REGION(0x0020, "proms", 0)
ROM_LOAD("vid_ic61.rom", 0x0000, 0x0020, CRC(538c72ae) SHA1(f704492568257fcc4a4f1189207c6fb6526eb81c) BAD_DUMP)
ROM_REGION(0x10000, "audio1", 0)
@@ -655,17 +736,17 @@ ROM_START(wcup90)
ROM_LOAD16_BYTE("cpu_ic13.rom", 0x000001, 0x8000, CRC(0e2edfb0) SHA1(862fb1f6509fb1f560d0b2bb8a5764f64b259f04))
ROM_LOAD16_BYTE("cpu_ic14.rom", 0x000000, 0x8000, CRC(fdd03165) SHA1(6dc6e68197218f8808436098c26cd04fc3215b1c))
- ROM_REGION(0x10000, "video", 0)
- ROM_LOAD("vid_ic91.rom", 0x00000, 0x8000, CRC(3287ad20) SHA1(d5a453efc7292670073f157dca04897be857b8ed))
+ ROM_REGION(0x8000, "video", 0)
+ ROM_LOAD("vid_ic91.rom", 0x0000, 0x8000, CRC(3287ad20) SHA1(d5a453efc7292670073f157dca04897be857b8ed))
- ROM_REGION( 0x30000, "chargen", 0 )
+ ROM_REGION(0x30000, "chargen", 0)
ROM_LOAD("vid_ic14.rom", 0x00000, 0x8000, CRC(a101d562) SHA1(ad9ad3968f13169572ec60e22e84acf43382b51e))
ROM_LOAD("vid_ic15.rom", 0x08000, 0x8000, CRC(40791e7a) SHA1(788760b8527df48d1825be88099491b6e94f0a19))
ROM_LOAD("vid_ic16.rom", 0x10000, 0x8000, CRC(a7214157) SHA1(a4660180e8491a37028fec8533cf13daf839a7c4))
ROM_LOAD("vid_ic17.rom", 0x18000, 0x8000, CRC(caf4fb04) SHA1(81784a4dc7c671090cf39cafa7d34a6b34523168))
ROM_LOAD("vid_ic18.rom", 0x20000, 0x8000, CRC(83ad2a10) SHA1(37664e5872e6322ee6bb61ec9385876626598152))
- ROM_REGION( 0x0020, "proms", 0 )
+ ROM_REGION(0x0020, "proms", 0)
ROM_LOAD("vid_ic61.rom", 0x0000, 0x0020, CRC(538c72ae) SHA1(f704492568257fcc4a4f1189207c6fb6526eb81c))
ROM_REGION(0x10000, "audio1", 0)
@@ -686,5 +767,5 @@ ROM_END
GAME(1988, dakar, 0, mrgame, mrgame, mrgame_state, init_mrgame, ROT0, "Mr Game", "Dakar", MACHINE_MECHANICAL | MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND )
GAME(1989, motrshow, 0, mrgame, mrgame, mrgame_state, init_mrgame, ROT0, "Mr Game", "Motor Show (set 1)", MACHINE_MECHANICAL | MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND )
GAME(1989, motrshowa, motrshow, mrgame, mrgame, mrgame_state, init_mrgame, ROT0, "Mr Game", "Motor Show (set 2)", MACHINE_MECHANICAL | MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND )
-GAME(1990, macattck, 0, mrgame, mrgame, mrgame_state, init_mrgame, ROT0, "Mr Game", "Mac Attack", MACHINE_IS_SKELETON_MECHANICAL)
-GAME(1990, wcup90, 0, mrgame, mrgame, mrgame_state, init_mrgame, ROT0, "Mr Game", "World Cup 90", MACHINE_IS_SKELETON_MECHANICAL)
+GAME(1990, macattck, 0, wcup90, mrgame, mrgame_state, init_mrgame, ROT0, "Mr Game", "Mac Attack", MACHINE_IS_SKELETON_MECHANICAL)
+GAME(1990, wcup90, 0, wcup90, mrgame, mrgame_state, init_mrgame, ROT0, "Mr Game", "World Cup 90", MACHINE_MECHANICAL | MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS )
diff --git a/src/mame/drivers/jade.cpp b/src/mame/drivers/unkz80.cpp
index 41e619fb7a6..0b44b8f0f15 100644
--- a/src/mame/drivers/jade.cpp
+++ b/src/mame/drivers/unkz80.cpp
@@ -2,17 +2,19 @@
// copyright-holders:Robbbert
/***************************************************************************
- Jade JGZ80 (with Serial Parallel Interrupt Controller)
+Unknown Z80 (with Serial Parallel Interrupt Controller)
- Single board Z80 computer on a S100 card.
- The SPIO board adds four CTCs, two SIOs and one PIO.
+Single board Z80 computer on a S100 card.
+The SPIO board adds four CTCs, two SIOs and one PIO.
- 2013-09-12 Skeleton driver.
+2013-09-12 Skeleton driver.
- No info found as yet.
+No info found as yet.
- It takes about 8 seconds to start up.
- Type HE to get a list of commands.
+It should display P-Mon 4b 08/29/83 SPIC, then pause a bit,
+then show a # prompt. Type HE to get a list of commands.
+
+Currently does nothing due to a SIO regression.
****************************************************************************/
@@ -25,15 +27,15 @@
//#include "bus/s100/s100.h"
-class jade_state : public driver_device
+class unkz80_state : public driver_device
{
public:
- jade_state(const machine_config &mconfig, device_type type, const char *tag)
+ unkz80_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag)
, m_maincpu(*this, "maincpu")
{ }
- void jade(machine_config &config);
+ void unkz80(machine_config &config);
private:
void io_map(address_map &map);
@@ -43,14 +45,14 @@ private:
};
-void jade_state::mem_map(address_map &map)
+void unkz80_state::mem_map(address_map &map)
{
map.unmap_value_high();
map(0x0000, 0x07ff).rom().region("roms", 0);
map(0x0800, 0xffff).ram();
}
-void jade_state::io_map(address_map &map)
+void unkz80_state::io_map(address_map &map)
{
map.unmap_value_high();
map.global_mask(0xff);
@@ -60,13 +62,13 @@ void jade_state::io_map(address_map &map)
}
/* Input ports */
-static INPUT_PORTS_START( jade )
+static INPUT_PORTS_START( unkz80 )
INPUT_PORTS_END
-MACHINE_CONFIG_START(jade_state::jade)
+MACHINE_CONFIG_START(unkz80_state::unkz80)
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu",Z80, XTAL(4'000'000))
+ MCFG_DEVICE_ADD("maincpu",Z80, 4_MHz_XTAL)
MCFG_DEVICE_PROGRAM_MAP(mem_map)
MCFG_DEVICE_IO_MAP(io_map)
@@ -79,8 +81,7 @@ MACHINE_CONFIG_START(jade_state::jade)
CLOCK(config, "trg0", 4_MHz_XTAL / 2).signal_handler().set("ctc2", FUNC(z80ctc_device::trg0));
/* Devices */
- MCFG_DEVICE_ADD("sio", Z80SIO, XTAL(4'000'000))
- //MCFG_Z80SIO_OUT_INT_CB(INPUTLINE("maincpu", INPUT_LINE_IRQ0)) // no evidence of a daisy chain because IM2 is not set
+ MCFG_DEVICE_ADD("sio", Z80SIO, 4_MHz_XTAL)
MCFG_Z80SIO_OUT_TXDA_CB(WRITELINE("rs232", rs232_port_device, write_txd))
MCFG_Z80SIO_OUT_DTRA_CB(WRITELINE("rs232", rs232_port_device, write_dtr))
MCFG_Z80SIO_OUT_RTSA_CB(WRITELINE("rs232", rs232_port_device, write_rts))
@@ -91,12 +92,12 @@ MACHINE_CONFIG_START(jade_state::jade)
MACHINE_CONFIG_END
/* ROM definition */
-ROM_START( jgz80 )
+ROM_START( unkz80 )
ROM_REGION( 0x800, "roms", 0 )
- ROM_LOAD( "jgz80.rom", 0x0000, 0x0800, CRC(90c4a1ef) SHA1(8a93a11051cc27f3edca24f0f4297ebe0099964e) )
+ ROM_LOAD( "unkz80.rom", 0x0000, 0x0800, CRC(90c4a1ef) SHA1(8a93a11051cc27f3edca24f0f4297ebe0099964e) )
ROM_END
/* Driver */
// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS
-COMP( 1983, jgz80, 0, 0, jade, jade, jade_state, empty_init, "Jade Computer Products", "JGZ80", MACHINE_NOT_WORKING | MACHINE_NO_SOUND_HW )
+COMP( 1983, unkz80, 0, 0, unkz80, unkz80, unkz80_state, empty_init, "<unknown>", "Unknown Z80 computer", MACHINE_NOT_WORKING | MACHINE_NO_SOUND_HW )
diff --git a/src/mame/mame.lst b/src/mame/mame.lst
index 867b6da3793..53342be3015 100644
--- a/src/mame/mame.lst
+++ b/src/mame/mame.lst
@@ -15826,9 +15826,6 @@ jackie // (c) 1993 IGS
@source:jackpool.cpp
jackpool // (c) 1997 Electronic Projects
-@source:jade.cpp
-jgz80 // Jade JGZ-80
-
@source:jaguar.cpp
a51mxr3k // ?? (c) 1998
a51mxr3ka // ?? (c) 1998
@@ -37853,6 +37850,9 @@ uts20 //
@source:unkhorse.cpp
unkhorse //
+@source:unkz80.cpp
+unkz80 // Unknown
+
@source:upscope.cpp
upscope // (c) 1986 Grand products
diff --git a/src/mame/mess.flt b/src/mame/mess.flt
index f022750873e..90f375d1471 100644
--- a/src/mame/mess.flt
+++ b/src/mame/mess.flt
@@ -327,7 +327,6 @@ isbc8010.cpp
isbc8030.cpp
iskr103x.cpp
itt3030.cpp
-jade.cpp
jonos.cpp
jr100.cpp
jr200.cpp
@@ -748,6 +747,7 @@ tvc.cpp
tvgame.cpp
tx0.cpp
uknc.cpp
+unkz80.cpp
unichamp.cpp
unior.cpp
unistar.cpp