diff --git a/src/devices/cpu/h8/h8_timer16.cpp b/src/devices/cpu/h8/h8_timer16.cpp
index f5c16c6f691..059cb8b9a39 100644
--- a/src/devices/cpu/h8/h8_timer16.cpp
+++ b/src/devices/cpu/h8/h8_timer16.cpp
@@ -238,6 +238,7 @@ void h8_timer16_channel_device::update_counter(u64 cur_time)
}
u64 base_time = m_last_clock_update;
+ m_last_clock_update = cur_time;
u64 new_time = cur_time;
if(m_clock_divider) {
base_time = (base_time + m_phase) >> m_clock_divider;
@@ -289,7 +290,6 @@ void h8_timer16_channel_device::update_counter(u64 cur_time)
logerror("decrementing counter\n");
exit(1);
}
- m_last_clock_update = cur_time;
}
void h8_timer16_channel_device::recalc_event(u64 cur_time)
diff --git a/src/devices/cpu/h8/h8_timer8.cpp b/src/devices/cpu/h8/h8_timer8.cpp
index af0e1a27859..fe458e0922b 100644
--- a/src/devices/cpu/h8/h8_timer8.cpp
+++ b/src/devices/cpu/h8/h8_timer8.cpp
@@ -212,21 +212,22 @@ u64 h8_timer8_channel_device::internal_update(u64 current_time)
return m_event_time;
}
-void h8_timer8_channel_device::update_counter(u64 cur_time)
+void h8_timer8_channel_device::update_counter(u64 cur_time, u64 delta)
{
- if(m_clock_type != DIV)
- return;
+ if(m_clock_type == DIV) {
+ if(!cur_time)
+ cur_time = m_cpu->total_cycles();
- if(!cur_time)
- cur_time = m_cpu->total_cycles();
+ u64 base_time = (m_last_clock_update + m_clock_divider/2) / m_clock_divider;
+ m_last_clock_update = cur_time;
+ u64 new_time = (cur_time + m_clock_divider/2) / m_clock_divider;
+ delta = new_time - base_time;
+ }
- u64 base_time = (m_last_clock_update + m_clock_divider/2) / m_clock_divider;
- u64 new_time = (cur_time + m_clock_divider/2) / m_clock_divider;
- if(new_time == base_time)
+ if(!delta)
return;
u8 prev = m_tcnt;
- u64 delta = new_time - base_time;
u64 tt = m_tcnt + delta;
if(prev >= m_counter_cycle) {
@@ -264,7 +265,6 @@ void h8_timer8_channel_device::update_counter(u64 cur_time)
m_intc->internal_interrupt(m_irq_v);
}
}
- m_last_clock_update = cur_time;
}
void h8_timer8_channel_device::recalc_event(u64 cur_time)
@@ -317,45 +317,13 @@ void h8_timer8_channel_device::recalc_event(u64 cur_time)
void h8_timer8_channel_device::chained_timer_overflow()
{
if(m_clock_type == CHAIN_OVERFLOW)
- timer_tick();
+ update_counter(0, 1);
}
void h8_timer8_channel_device::chained_timer_tcora()
{
if(m_clock_type == CHAIN_A)
- timer_tick();
-}
-
-void h8_timer8_channel_device::timer_tick()
-{
- m_tcnt++;
-
- if(m_tcnt == m_tcor[0]) {
- if(m_chained_timer)
- m_chained_timer->chained_timer_tcora();
-
- if(!(m_tcsr & TCSR_CMFA)) {
- m_tcsr |= TCSR_CMFA;
- if(m_tcr & TCR_CMIEA)
- m_intc->internal_interrupt(m_irq_ca);
- }
- }
-
- if(!(m_tcsr & TCSR_CMFB) && m_tcnt == m_tcor[1]) {
- m_tcsr |= TCSR_CMFB;
- if(m_tcr & TCR_CMIEB)
- m_intc->internal_interrupt(m_irq_cb);
- }
-
- if(m_tcnt == 0x00) {
- if(m_chained_timer)
- m_chained_timer->chained_timer_overflow();
- if(!(m_tcsr & TCSR_OVF)) {
- m_tcsr |= TCSR_OVF;
- if(m_tcr & TCR_OVIE)
- m_intc->internal_interrupt(m_irq_v);
- }
- }
+ update_counter(0, 1);
}
h8h_timer8_channel_device::h8h_timer8_channel_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) :
diff --git a/src/devices/cpu/h8/h8_timer8.h b/src/devices/cpu/h8/h8_timer8.h
index c5f6dd98f39..c791892a3ce 100644
--- a/src/devices/cpu/h8/h8_timer8.h
+++ b/src/devices/cpu/h8/h8_timer8.h
@@ -100,10 +100,9 @@ protected:
virtual void device_start() override;
virtual void device_reset() override;
- void update_counter(u64 cur_time = 0);
+ void update_counter(u64 cur_time = 0, u64 delta = 0);
void recalc_event(u64 cur_time = 0);
- void timer_tick();
void update_tcr();
};
diff --git a/src/mame/layout/mastmind.lay b/src/mame/layout/mastmind.lay
index 64bdbf6b333..f732bd27c72 100644
--- a/src/mame/layout/mastmind.lay
+++ b/src/mame/layout/mastmind.lay
@@ -9,22 +9,20 @@ authors:hap
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+ ]]>
@@ -43,7 +41,7 @@ authors:hap
-
+
diff --git a/src/mame/layout/smastmind.lay b/src/mame/layout/smastmind.lay
index 2c9d9201237..e29685ac59f 100644
--- a/src/mame/layout/smastmind.lay
+++ b/src/mame/layout/smastmind.lay
@@ -9,27 +9,25 @@ authors:hap
-
-
-
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+ ]]>
@@ -49,7 +47,7 @@ authors:hap
-
+
diff --git a/src/mame/misc/coinmvga.cpp b/src/mame/misc/coinmvga.cpp
index 7114281c1f5..8d2bf031e90 100644
--- a/src/mame/misc/coinmvga.cpp
+++ b/src/mame/misc/coinmvga.cpp
@@ -219,12 +219,14 @@
*******************************************************************************/
#include "emu.h"
+
#include "cpu/h8/h83002.h"
//#include "cpu/h8/h83006.h"
#include "sound/ymz280b.h"
#include "machine/i2cmem.h"
#include "machine/msm6242.h"
#include "video/ramdac.h"
+
#include "emupal.h"
#include "screen.h"
#include "speaker.h"
@@ -250,9 +252,6 @@ public:
, m_palette(*this, "palette%u", 0U)
{ }
- void init_colorama();
- void init_cmrltv75();
-
void coinmvga(machine_config &config);
protected:
@@ -938,19 +937,6 @@ ROM_START( cmkenospa )
ROM_LOAD( "rwc497ym.sp4", 0x300000, 0x100000, CRC(b5729ae7) SHA1(0e63fbb81ff5f2fef3c653f769db8073dff1214b) )
ROM_END
-
-/*************************
-* Driver Init *
-*************************/
-
-void coinmvga_state::init_colorama()
-{
-}
-
-void coinmvga_state::init_cmrltv75()
-{
-}
-
} // anonymous namespace
@@ -958,11 +944,11 @@ void coinmvga_state::init_cmrltv75()
* Game Drivers *
*************************/
-// YEAR NAME PARENT MACHINE INPUT STATE INIT ROT COMPANY FULLNAME FLAGS
-GAME( 2000, colorama, 0, coinmvga, coinmvga, coinmvga_state, init_colorama, ROT0, "Coinmaster-Gaming, Ltd.", "Colorama (P521, English)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING )
-GAME( 2000, coloramas, colorama, coinmvga, coinmvga, coinmvga_state, init_colorama, ROT0, "Coinmaster-Gaming, Ltd.", "Colorama (P521 V13, Spanish)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING )
-GAME( 2000, wof_v16, 0, coinmvga, coinmvga, coinmvga_state, init_colorama, ROT0, "Coinmaster-Gaming, Ltd.", "Wheel of Fortune (P517 V16, English)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING )
-GAME( 2000, wof_v11, wof_v16, coinmvga, coinmvga, coinmvga_state, init_colorama, ROT0, "Coinmaster-Gaming, Ltd.", "Wheel of Fortune (P517 V11, English)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING )
-GAME( 2001, cmrltv75, 0, coinmvga, coinmvga, coinmvga_state, init_cmrltv75, ROT90, "Coinmaster-Gaming, Ltd.", "Coinmaster Roulette P497 V75 (Y2K, Spanish)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING )
-GAME( 2000, cmkenosp, 0, coinmvga, coinmvga, coinmvga_state, empty_init, ROT90, "Coinmaster-Gaming, Ltd.", "Coinmaster Keno (Y2K, Spanish, 2000-12-14)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING )
-GAME( 2000, cmkenospa, cmkenosp, coinmvga, coinmvga, coinmvga_state, empty_init, ROT90, "Coinmaster-Gaming, Ltd.", "Coinmaster Keno (Y2K, Spanish, 2000-12-02)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING )
+// YEAR NAME PARENT MACHINE INPUT STATE INIT ROT COMPANY FULLNAME FLAGS
+GAME( 2000, colorama, 0, coinmvga, coinmvga, coinmvga_state, empty_init, ROT0, "Coinmaster-Gaming, Ltd.", "Colorama (P521, English)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING )
+GAME( 2000, coloramas, colorama, coinmvga, coinmvga, coinmvga_state, empty_init, ROT0, "Coinmaster-Gaming, Ltd.", "Colorama (P521 V13, Spanish)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING )
+GAME( 2000, wof_v16, 0, coinmvga, coinmvga, coinmvga_state, empty_init, ROT0, "Coinmaster-Gaming, Ltd.", "Wheel of Fortune (P517 V16, English)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING )
+GAME( 2000, wof_v11, wof_v16, coinmvga, coinmvga, coinmvga_state, empty_init, ROT0, "Coinmaster-Gaming, Ltd.", "Wheel of Fortune (P517 V11, English)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING )
+GAME( 2001, cmrltv75, 0, coinmvga, coinmvga, coinmvga_state, empty_init, ROT90, "Coinmaster-Gaming, Ltd.", "Coinmaster Roulette P497 V75 (Y2K, Spanish)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING )
+GAME( 2000, cmkenosp, 0, coinmvga, coinmvga, coinmvga_state, empty_init, ROT90, "Coinmaster-Gaming, Ltd.", "Coinmaster Keno (Y2K, Spanish, 2000-12-14)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING )
+GAME( 2000, cmkenospa, cmkenosp, coinmvga, coinmvga, coinmvga_state, empty_init, ROT90, "Coinmaster-Gaming, Ltd.", "Coinmaster Keno (Y2K, Spanish, 2000-12-02)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING )
diff --git a/src/mame/misc/itgamble.cpp b/src/mame/misc/itgamble.cpp
index 17e9d189c9a..7524005c5db 100644
--- a/src/mame/misc/itgamble.cpp
+++ b/src/mame/misc/itgamble.cpp
@@ -4,7 +4,7 @@
Nazionale Elettronica + others (mostly Italian) Gambling games
mostly based on H8/3048 + OKI 6295 or similar.
-.
+
These all use MCUs with internal ROM for their programs,
they can't be dumped easily, and thus we can't emulate
them at the moment because there is nothing to emulate