diff --git a/hash/pv1000.xml b/hash/pv1000.xml
index ff9de22bce1..e5497785aeb 100644
--- a/hash/pv1000.xml
+++ b/hash/pv1000.xml
@@ -181,4 +181,182 @@ Undumped carts:
+
+
+
+ Aerial
+ 2022
+ Inufuto
+
+
+
+
+
+
+
+
+ AntiAir
+ 2024
+ Inufuto
+
+
+
+
+
+
+
+
+ Ascend
+ 2022
+ Inufuto
+
+
+
+
+
+
+
+
+ Battlot
+ 2022
+ Inufuto
+
+
+
+
+
+
+
+
+ Bootskell
+ 2022
+ Inufuto
+
+
+
+
+
+
+
+
+ Cacorm
+ 2022
+ Inufuto
+
+
+
+
+
+
+
+
+ Cavit
+ 2022
+ Inufuto
+
+
+
+
+
+
+
+
+ Cracky
+ 2023
+ Inufuto
+
+
+
+
+
+
+
+
+ Guntus
+ 2022
+ Inufuto
+
+
+
+
+
+
+
+
+ Hopman
+ 2023
+ Inufuto
+
+
+
+
+
+
+
+
+ Lift
+ 2022
+ Inufuto
+
+
+
+
+
+
+
+
+ Mazy
+ 2022
+ Inufuto
+
+
+
+
+
+
+
+
+ Neuras
+ 2022
+ Inufuto
+
+
+
+
+
+
+
+
+ Osotos
+ 2024
+ Inufuto
+
+
+
+
+
+
+
+
+ Ruptus
+ 2022
+ Inufuto
+
+
+
+
+
+
+
+
+ Yewdow
+ 2023
+ Inufuto
+
+
+
+
+
+
+
diff --git a/src/devices/cpu/ccpu/ccpu.cpp b/src/devices/cpu/ccpu/ccpu.cpp
index 6fd7cdb744f..367df58c595 100644
--- a/src/devices/cpu/ccpu/ccpu.cpp
+++ b/src/devices/cpu/ccpu/ccpu.cpp
@@ -22,18 +22,18 @@ DEFINE_DEVICE_TYPE(CCPU, ccpu_cpu_device, "ccpu", "Cinematronics CPU")
MACROS
***************************************************************************/
-#define READOP(a) (m_cache.read_byte(a))
+#define READOP(a) (m_cache.read_byte(a))
-#define RDMEM(a) (m_data.read_word((a) & 0xfff))
-#define WRMEM(a,v) (m_data.write_word((a), (v)))
+#define RDMEM(a) (m_data.read_word((a) & 0xfff))
+#define WRMEM(a,v) (m_data.write_word((a), (v)))
-#define READPORT(a) (m_io.read_byte(a))
-#define WRITEPORT(a,v) (m_io.write_byte((a), (v)))
+#define READPORT(a) (m_io.read_byte(a))
+#define WRITEPORT(a,v) (m_io.write_byte((a), (v)))
#define SET_A0 do { m_a0flag = m_A; } while (0)
-#define SET_CMP_VAL(x) do { m_cmpacc = *m_acc; m_cmpval = (x) & 0xfff; } while (0)
-#define SET_NC(a) do { m_ncflag = ~(a); } while (0)
-#define SET_MI(a) do { m_nextnextmiflag = (a); } while (0)
+#define SET_CMP_VAL(x) do { m_cmpacc = *m_acc; m_cmpval = (x) & 0xfff; } while (0)
+#define SET_NC(a) do { m_ncflag = ~(a); } while (0)
+#define SET_MI(a) do { m_nextnextmiflag = (a); } while (0)
#define TEST_A0 (m_a0flag & 1)
#define TEST_NC ((m_ncflag >> 12) & 1)
@@ -52,10 +52,10 @@ DEFINE_DEVICE_TYPE(CCPU, ccpu_cpu_device, "ccpu", "Cinematronics CPU")
#define STANDARD_ACC_OP(resexp,cmpval) \
do { \
uint16_t result = resexp; \
- SET_A0; /* set the A0 bit based on the previous 'A' value */ \
- SET_CMP_VAL(cmpval); /* set the compare values to the previous accumulator and the cmpval */ \
- SET_NC(result); /* set the NC flag based on the unmasked result */ \
- *m_acc = result & 0xfff; /* store the low 12 bits of the new value */ \
+ SET_A0; /* set the A0 bit based on the previous 'A' value */ \
+ SET_CMP_VAL(cmpval); /* set the compare values to the previous accumulator and the cmpval */ \
+ SET_NC(result); /* set the NC flag based on the unmasked result */ \
+ *m_acc = result & 0xfff; /* store the low 12 bits of the new value */ \
} while (0)
@@ -92,12 +92,15 @@ uint8_t ccpu_cpu_device::read_jmi()
}
-void ccpu_cpu_device::wdt_timer_trigger()
+void ccpu_cpu_device::wdt_trigger(int state)
{
+ if (!state)
+ return;
+
m_waiting = false;
m_watchdog++;
if (m_watchdog >= 3)
- m_PC = 0;
+ device_reset();
}
diff --git a/src/devices/cpu/ccpu/ccpu.h b/src/devices/cpu/ccpu/ccpu.h
index f51cc9bf700..d5ee13d85ae 100644
--- a/src/devices/cpu/ccpu/ccpu.h
+++ b/src/devices/cpu/ccpu/ccpu.h
@@ -27,7 +27,7 @@ class ccpu_cpu_device : public cpu_device
// public because the cinemat driver accesses A/P/X/Y through state interace - should there be a proper public interface to read registers?
enum
{
- CCPU_PC=1,
+ CCPU_PC = 1,
CCPU_FLAGS,
CCPU_A,
CCPU_B,
@@ -50,7 +50,7 @@ class ccpu_cpu_device : public cpu_device
template void set_vector_func(T &&... args) { m_vector_callback.set(std::forward(args)...); }
uint8_t read_jmi();
- void wdt_timer_trigger();
+ void wdt_trigger(int state);
protected:
// device-level overrides
@@ -75,27 +75,27 @@ class ccpu_cpu_device : public cpu_device
address_space_config m_data_config;
address_space_config m_io_config;
- uint16_t m_PC;
- uint16_t m_A;
- uint16_t m_B;
- uint8_t m_I;
- uint16_t m_J;
- uint8_t m_P;
- uint16_t m_X;
- uint16_t m_Y;
- uint16_t m_T;
- uint16_t * m_acc;
-
- uint16_t m_a0flag, m_ncflag, m_cmpacc, m_cmpval;
- uint16_t m_miflag, m_nextmiflag, m_nextnextmiflag;
- uint16_t m_drflag;
-
- devcb_read8 m_external_input;
- vector_delegate m_vector_callback;
-
- uint8_t m_waiting;
- uint8_t m_watchdog;
- uint8_t m_extinput;
+ uint16_t m_PC;
+ uint16_t m_A;
+ uint16_t m_B;
+ uint8_t m_I;
+ uint16_t m_J;
+ uint8_t m_P;
+ uint16_t m_X;
+ uint16_t m_Y;
+ uint16_t m_T;
+ uint16_t * m_acc;
+
+ uint16_t m_a0flag, m_ncflag, m_cmpacc, m_cmpval;
+ uint16_t m_miflag, m_nextmiflag, m_nextnextmiflag;
+ uint16_t m_drflag;
+
+ devcb_read8 m_external_input;
+ vector_delegate m_vector_callback;
+
+ uint8_t m_waiting;
+ uint8_t m_watchdog;
+ uint8_t m_extinput;
int m_icount;
diff --git a/src/devices/sound/namco.cpp b/src/devices/sound/namco.cpp
index a83f0ccbb65..0b3f310270a 100644
--- a/src/devices/sound/namco.cpp
+++ b/src/devices/sound/namco.cpp
@@ -5,11 +5,10 @@
NAMCO sound driver.
This driver handles the four known types of NAMCO wavetable sounds:
-
- - 3-voice mono (PROM-based design: Pac-Man, Pengo, Dig Dug, etc)
- - 8-voice quadrophonic (Pole Position 1, Pole Position 2)
- - 8-voice mono (custom 15XX: Mappy, Dig Dug 2, etc)
- - 8-voice stereo (System 1)
+ - 3-voice mono (PROM-based design: Pac-Man, Pengo, Dig Dug, etc)
+ - 8-voice quadrophonic (Pole Position 1, Pole Position 2)
+ - 8-voice mono (custom 15XX: Mappy, Dig Dug 2, etc)
+ - 8-voice stereo (System 1)
The 15XX custom does not have a DAC of its own; instead, it streams
the 4-bit PROM data directly into the 99XX custom DAC. Most pre-99XX
@@ -31,18 +30,18 @@
#include "namco.h"
-/* quality parameter: internal sample rate is 192 KHz, output is 48 KHz */
+// quality parameter: internal sample rate is 192 KHz, output is 48 KHz
#define INTERNAL_RATE 192000
-/* 16 bits: sample bits of the stream buffer */
-/* 4 bits: volume */
-/* 4 bits: prom sample bits */
+// 16 bits: sample bits of the stream buffer
+// 4 bits: volume
+// 4 bits: prom sample bits
#define MIXLEVEL (1 << (16 - 4 - 4))
-/* stream output level */
+// stream output level
#define OUTPUT_LEVEL(n) ((n) * MIXLEVEL / m_voices)
-/* a position of waveform sample */
+// a position of waveform sample
#define WAVEFORM_POSITION(n) (((n) >> m_f_fracbits) & 0x1f)
DEFINE_DEVICE_TYPE(NAMCO, namco_device, "namco", "Namco")
@@ -73,7 +72,7 @@ namco_device::namco_device(const machine_config &mconfig, const char *tag, devic
}
namco_15xx_device::namco_15xx_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
- :namco_audio_device(mconfig, NAMCO_15XX, tag, owner, clock)
+ : namco_audio_device(mconfig, NAMCO_15XX, tag, owner, clock)
, m_soundregs(nullptr)
{
}
@@ -90,22 +89,22 @@ namco_cus30_device::namco_cus30_device(const machine_config &mconfig, const char
void namco_audio_device::device_start()
{
- /* extract globals from the interface */
+ // extract globals from the interface
m_last_channel = m_channel_list + m_voices;
- /* build the waveform table */
+ // build the waveform table
build_decoded_waveform(m_wave_ptr);
- /* get stream channels */
+ // get stream channels
if (m_stereo)
m_stream = stream_alloc(0, 2, 192000);
else
m_stream = stream_alloc(0, 1, 192000);
- /* start with sound enabled, many games don't have a sound enable register */
+ // start with sound enabled, many games don't have a sound enable register
m_sound_enable = true;
- /* register with the save state system */
+ // register with the save state system
if (m_wave_ptr == nullptr)
save_pointer(NAME(m_wavedata), 0x400);
@@ -114,7 +113,7 @@ void namco_audio_device::device_start()
for (int v = 0; v < MAX_VOLUME; v++)
save_pointer(NAME(m_waveform[v]), 32 * 8 * (1+m_wave_size), v);
- /* reset all the voices */
+ // reset all the voices
for (sound_channel *voice = m_channel_list; voice < m_last_channel; voice++)
{
voice->frequency = 0;
@@ -128,7 +127,7 @@ void namco_audio_device::device_start()
voice->noise_hold = 0;
}
- /* register with the save state system */
+ // register with the save state system
save_pointer(STRUCT_MEMBER(m_channel_list, frequency), m_voices);
save_pointer(STRUCT_MEMBER(m_channel_list, counter), m_voices);
save_pointer(STRUCT_MEMBER(m_channel_list, volume), m_voices);
@@ -163,14 +162,14 @@ void namco_audio_device::device_clock_changed()
{
int clock_multiple;
- /* adjust internal clock */
+ // adjust internal clock
m_namco_clock = clock();
for (clock_multiple = 0; m_namco_clock < INTERNAL_RATE; clock_multiple++)
m_namco_clock *= 2;
m_f_fracbits = clock_multiple + 15;
- /* adjust output clock */
+ // adjust output clock
m_sample_rate = m_namco_clock;
logerror("Namco: freq fractional bits = %d: internal freq = %d, output freq = %d\n", m_f_fracbits, m_namco_clock, m_sample_rate);
@@ -179,18 +178,15 @@ void namco_audio_device::device_clock_changed()
}
-/* update the decoded waveform data */
+// update the decoded waveform data
void namco_audio_device::update_namco_waveform(int offset, uint8_t data)
{
if (m_wave_size == 1)
{
- int16_t wdata;
- int v;
-
- /* use full byte, first 4 high bits, then low 4 bits */
- for (v = 0; v < MAX_VOLUME; v++)
+ // use full byte, first 4 high bits, then low 4 bits
+ for (int v = 0; v < MAX_VOLUME; v++)
{
- wdata = ((data >> 4) & 0x0f) - 8;
+ int16_t wdata = ((data >> 4) & 0x0f) - 8;
m_waveform[v][offset * 2] = OUTPUT_LEVEL(wdata * v);
wdata = (data & 0x0f) - 8;
m_waveform[v][offset * 2 + 1] = OUTPUT_LEVEL(wdata * v);
@@ -198,16 +194,14 @@ void namco_audio_device::update_namco_waveform(int offset, uint8_t data)
}
else
{
- int v;
-
- /* use only low 4 bits */
- for (v = 0; v < MAX_VOLUME; v++)
+ // use only low 4 bits
+ for (int v = 0; v < MAX_VOLUME; v++)
m_waveform[v][offset] = OUTPUT_LEVEL(((data & 0x0f) - 8) * v);
}
}
-/* build the decoded waveform table */
+// build the decoded waveform table
void namco_audio_device::build_decoded_waveform(uint8_t *rgnbase)
{
if (rgnbase != nullptr)
@@ -218,17 +212,17 @@ void namco_audio_device::build_decoded_waveform(uint8_t *rgnbase)
m_wavedata = m_waveram_alloc.get();
}
- /* 20pacgal has waves in RAM but old sound system */
+ // 20pacgal has waves in RAM but old sound system
int size;
if (rgnbase == nullptr && m_voices != 3)
{
m_wave_size = 1;
- size = 32 * 16; /* 32 samples, 16 waveforms */
+ size = 32 * 16; // 32 samples, 16 waveforms
}
else
{
m_wave_size = 0;
- size = 32 * 8; /* 32 samples, 8 waveforms */
+ size = 32 * 8; // 32 samples, 8 waveforms
}
for (int v = 0; v < MAX_VOLUME; v++)
@@ -239,7 +233,7 @@ void namco_audio_device::build_decoded_waveform(uint8_t *rgnbase)
}
-/* generate sound by oversampling */
+// generate sound by oversampling
uint32_t namco_audio_device::namco_update_one(write_stream_view &buffer, const int16_t *wave, uint32_t counter, uint32_t freq)
{
for (int sampindex = 0; sampindex < buffer.samples(); sampindex++)
@@ -285,10 +279,10 @@ void namco_device::pacman_sound_w(offs_t offset, uint8_t data)
if (m_soundregs[offset] == data)
return;
- /* update the streams */
+ // update the streams
m_stream->update();
- /* set the register */
+ // set the register
m_soundregs[offset] = data;
if (offset < 0x10)
@@ -301,7 +295,7 @@ void namco_device::pacman_sound_w(offs_t offset, uint8_t data)
if (ch >= m_voices)
return;
- /* recompute the voice parameters */
+ // recompute the voice parameters
voice = m_channel_list + ch;
switch (offset - ch * 5)
{
@@ -314,13 +308,13 @@ void namco_device::pacman_sound_w(offs_t offset, uint8_t data)
case 0x12:
case 0x13:
case 0x14:
- /* the frequency has 20 bits */
- /* the first voice has extra frequency bits */
+ // the frequency has 20 bits
+ // the first voice has extra frequency bits
voice->frequency = (ch == 0) ? m_soundregs[0x10] : 0;
voice->frequency += (m_soundregs[ch * 5 + 0x11] << 4);
voice->frequency += (m_soundregs[ch * 5 + 0x12] << 8);
voice->frequency += (m_soundregs[ch * 5 + 0x13] << 12);
- voice->frequency += (m_soundregs[ch * 5 + 0x14] << 16); /* always 0 */
+ voice->frequency += (m_soundregs[ch * 5 + 0x14] << 16); // always 0
break;
case 0x15:
@@ -340,10 +334,10 @@ void namco_cus30_device::pacman_sound_w(offs_t offset, uint8_t data)
if (soundregs[offset] == data)
return;
- /* update the streams */
+ // update the streams
m_stream->update();
- /* set the register */
+ // set the register
soundregs[offset] = data;
if (offset < 0x10)
@@ -356,7 +350,7 @@ void namco_cus30_device::pacman_sound_w(offs_t offset, uint8_t data)
if (ch >= m_voices)
return;
- /* recompute the voice parameters */
+ // recompute the voice parameters
voice = m_channel_list + ch;
switch (offset - ch * 5)
{
@@ -369,13 +363,13 @@ void namco_cus30_device::pacman_sound_w(offs_t offset, uint8_t data)
case 0x12:
case 0x13:
case 0x14:
- /* the frequency has 20 bits */
- /* the first voice has extra frequency bits */
+ // the frequency has 20 bits
+ // the first voice has extra frequency bits
voice->frequency = (ch == 0) ? soundregs[0x10] : 0;
voice->frequency += (soundregs[ch * 5 + 0x11] << 4);
voice->frequency += (soundregs[ch * 5 + 0x12] << 8);
voice->frequency += (soundregs[ch * 5 + 0x13] << 12);
- voice->frequency += (soundregs[ch * 5 + 0x14] << 16); /* always 0 */
+ voice->frequency += (soundregs[ch * 5 + 0x14] << 16); // always 0
break;
case 0x15:
@@ -433,21 +427,21 @@ void namco_device::polepos_sound_w(offs_t offset, uint8_t data)
if (m_soundregs[offset] == data)
return;
- /* update the streams */
+ // update the streams
m_stream->update();
- /* set the register */
+ // set the register
m_soundregs[offset] = data;
ch = (offset & 0x1f) / 4;
- /* recompute the voice parameters */
+ // recompute the voice parameters
voice = m_channel_list + ch;
switch (offset & 0x23)
{
case 0x00:
case 0x01:
- /* the frequency has 16 bits */
+ // the frequency has 16 bits
voice->frequency = m_soundregs[ch * 4 + 0x00];
voice->frequency += m_soundregs[ch * 4 + 0x01] << 8;
break;
@@ -468,7 +462,7 @@ void namco_device::polepos_sound_w(offs_t offset, uint8_t data)
voice->volume[0] /= 2;
voice->volume[1] /= 2;
- /* if 54XX or 52XX selected, silence this voice */
+ // if 54XX or 52XX selected, silence this voice
if (m_soundregs[ch * 4 + 0x23] & 8)
voice->volume[0] = voice->volume[1] = 0;
break;
@@ -509,19 +503,19 @@ void namco_15xx_device::namco_15xx_w(offs_t offset, uint8_t data)
if (m_soundregs[offset] == data)
return;
- /* update the streams */
+ // update the streams
m_stream->update();
- /* set the register */
+ // set the register
m_soundregs[offset] = data;
ch = offset / 8;
if (ch >= m_voices)
return;
- /* recompute the voice parameters */
+ // recompute the voice parameters
voice = m_channel_list + ch;
- switch (offset - ch * 8)
+ switch (offset & 7)
{
case 0x02:
voice->counter &= util::make_bitmask(m_f_fracbits);
@@ -537,10 +531,10 @@ void namco_15xx_device::namco_15xx_w(offs_t offset, uint8_t data)
[[fallthrough]];
case 0x04:
case 0x05:
- /* the frequency has 20 bits */
+ // the frequency has 20 bits
voice->frequency = m_soundregs[ch * 8 + 0x04];
voice->frequency += m_soundregs[ch * 8 + 0x05] << 8;
- voice->frequency += (m_soundregs[ch * 8 + 0x06] & 15) << 16; /* high bits are from here */
+ voice->frequency += (m_soundregs[ch * 8 + 0x06] & 15) << 16; // high bits are from here
break;
}
}
@@ -575,11 +569,8 @@ void namco_15xx_device::namco_15xx_w(offs_t offset, uint8_t data)
void namco_cus30_device::namcos1_sound_w(offs_t offset, uint8_t data)
{
sound_channel *voice;
- int ch;
- int nssw;
-
- /* verify the offset */
+ // verify the offset
if (offset > 63)
{
logerror("NAMCOS1 sound: Attempting to write past the 64 registers segment\n");
@@ -591,19 +582,19 @@ void namco_cus30_device::namcos1_sound_w(offs_t offset, uint8_t data)
if (soundregs[offset] == data)
return;
- /* update the streams */
+ // update the streams
m_stream->update();
- /* set the register */
+ // set the register
soundregs[offset] = data;
- ch = offset / 8;
+ int ch = offset / 8;
if (ch >= m_voices)
return;
- /* recompute the voice parameters */
+ // recompute the voice parameters
voice = m_channel_list + ch;
- switch (offset - ch * 8)
+ switch (offset & 7)
{
case 0x00:
voice->volume[0] = data & 0x0f;
@@ -614,8 +605,8 @@ void namco_cus30_device::namcos1_sound_w(offs_t offset, uint8_t data)
[[fallthrough]];
case 0x02:
case 0x03:
- /* the frequency has 20 bits */
- voice->frequency = (soundregs[ch * 8 + 0x01] & 15) << 16; /* high bits are from here */
+ // the frequency has 20 bits
+ voice->frequency = (soundregs[ch * 8 + 0x01] & 15) << 16; // high bits are from here
voice->frequency += soundregs[ch * 8 + 0x02] << 8;
voice->frequency += soundregs[ch * 8 + 0x03];
break;
@@ -623,7 +614,7 @@ void namco_cus30_device::namcos1_sound_w(offs_t offset, uint8_t data)
case 0x04:
voice->volume[1] = data & 0x0f;
- nssw = ((data & 0x80) >> 7);
+ int nssw = ((data & 0x80) >> 7);
if (++voice == m_last_channel)
voice = m_channel_list;
voice->noise_sw = nssw;
@@ -637,23 +628,36 @@ void namco_cus30_device::namcos1_cus30_w(offs_t offset, uint8_t data)
{
if (m_wavedata[offset] != data)
{
- /* update the streams */
+ // update the streams
m_stream->update();
m_wavedata[offset] = data;
- /* update the decoded waveform table */
+ // update the decoded waveform table
update_namco_waveform(offset, data);
}
}
else if (offset < 0x140)
- namcos1_sound_w(offset - 0x100,data);
+ namcos1_sound_w(offset - 0x100, data);
else
m_wavedata[offset] = data;
}
uint8_t namco_cus30_device::namcos1_cus30_r(offs_t offset)
{
+ if (offset >= 0x100 && offset < 0x140)
+ {
+ int ch = (offset - 0x100) / 8;
+ int reg = offset & 7;
+
+ // reading from register 5 returns the counter (used by baraduke)
+ if (ch < m_voices && reg == 5)
+ {
+ m_stream->update();
+ return WAVEFORM_POSITION(m_channel_list[ch].counter);
+ }
+ }
+
return m_wavedata[offset];
}
@@ -680,15 +684,15 @@ void namco_audio_device::sound_stream_update(sound_stream &stream, std::vectorfrequency & 0xff;
- /* only update if we have non-zero volume */
+ // only update if we have non-zero volume
if (lv || rv)
{
int hold_time = 1 << (m_f_fracbits - 16);
@@ -709,13 +713,10 @@ void namco_audio_device::sound_stream_update(sound_stream &stream, std::vectornoise_counter;
int16_t l_noise_data = OUTPUT_LEVEL(0x07 * (lv >> 1));
int16_t r_noise_data = OUTPUT_LEVEL(0x07 * (rv >> 1));
- int i;
- /* add our contribution */
- for (i = 0; i < lmix.samples(); i++)
+ // add our contribution
+ for (int i = 0; i < lmix.samples(); i++)
{
- int cnt;
-
if (voice->noise_state)
{
lmix.add_int(i, l_noise_data, 32768);
@@ -736,7 +737,7 @@ void namco_audio_device::sound_stream_update(sound_stream &stream, std::vector> 12);
+ int cnt = (c >> 12);
c &= (1 << 12) - 1;
for( ;cnt > 0; cnt--)
{
@@ -746,35 +747,35 @@ void namco_audio_device::sound_stream_update(sound_stream &stream, std::vectornoise_counter = c;
voice->noise_hold = hold;
}
}
else
{
- /* save the counter for this voice */
+ // save the counter for this voice
uint32_t c = voice->counter;
- /* only update if we have non-zero left volume */
+ // only update if we have non-zero left volume
if (lv)
{
const int16_t *lw = &m_waveform[lv][voice->waveform_select * 32];
- /* generate sound into the buffer */
+ // generate sound into the buffer
c = namco_update_one(lmix, lw, voice->counter, voice->frequency);
}
- /* only update if we have non-zero right volume */
+ // only update if we have non-zero right volume
if (rv)
{
const int16_t *rw = &m_waveform[rv][voice->waveform_select * 32];
- /* generate sound into the buffer */
+ // generate sound into the buffer
c = namco_update_one(rmix, rw, voice->counter, voice->frequency);
}
- /* update the counter for this voice */
+ // update the counter for this voice
voice->counter = c;
}
}
@@ -784,14 +785,15 @@ void namco_audio_device::sound_stream_update(sound_stream &stream, std::vectorvolume[0];
@@ -799,7 +801,7 @@ void namco_audio_device::sound_stream_update(sound_stream &stream, std::vectorfrequency & 0xff;
- /* only update if we have non-zero volume */
+ // only update if we have non-zero volume
if (v)
{
int hold_time = 1 << (m_f_fracbits - 16);
@@ -807,13 +809,10 @@ void namco_audio_device::sound_stream_update(sound_stream &stream, std::vectornoise_counter;
int16_t noise_data = OUTPUT_LEVEL(0x07 * (v >> 1));
- int i;
- /* add our contribution */
- for (i = 0; i < buffer.samples(); i++)
+ // add our contribution
+ for (int i = 0; i < buffer.samples(); i++)
{
- int cnt;
-
if (voice->noise_state)
buffer.add_int(i, noise_data, 32768);
else
@@ -828,7 +827,7 @@ void namco_audio_device::sound_stream_update(sound_stream &stream, std::vector> 12);
+ int cnt = (c >> 12);
c &= (1 << 12) - 1;
for( ;cnt > 0; cnt--)
{
@@ -838,19 +837,19 @@ void namco_audio_device::sound_stream_update(sound_stream &stream, std::vectornoise_counter = c;
voice->noise_hold = hold;
}
}
else
{
- /* only update if we have non-zero volume */
+ // only update if we have non-zero volume
if (v)
{
const int16_t *w = &m_waveform[v][voice->waveform_select * 32];
- /* generate sound into buffer and update the counter for this voice */
+ // generate sound into buffer and update the counter for this voice
voice->counter = namco_update_one(buffer, w, voice->counter, voice->frequency);
}
}
diff --git a/src/devices/sound/namco.h b/src/devices/sound/namco.h
index 01ca882b3b4..a5ce6814402 100644
--- a/src/devices/sound/namco.h
+++ b/src/devices/sound/namco.h
@@ -20,7 +20,7 @@ class namco_audio_device : public device_t,
static constexpr unsigned MAX_VOICES = 8;
static constexpr unsigned MAX_VOLUME = 16;
- /* this structure defines the parameters for a channel */
+ // this structure defines the parameters for a channel
struct sound_channel
{
uint32_t frequency;
@@ -41,20 +41,19 @@ class namco_audio_device : public device_t,
virtual void device_clock_changed() override;
// internal state
-
void build_decoded_waveform( uint8_t *rgnbase );
void update_namco_waveform(int offset, uint8_t data);
uint32_t namco_update_one(write_stream_view &buffer, const int16_t *wave, uint32_t counter, uint32_t freq);
- /* waveform region */
+ // waveform region
optional_region_ptr m_wave_ptr;
- /* data about the sound system */
+ // data about the sound system
sound_channel m_channel_list[MAX_VOICES];
sound_channel *m_last_channel;
uint8_t *m_wavedata;
- /* global sound parameters */
+ // global sound parameters
int m_wave_size;
bool m_sound_enable;
sound_stream *m_stream;
@@ -62,12 +61,12 @@ class namco_audio_device : public device_t,
int m_sample_rate;
int m_f_fracbits;
- int m_voices; /* number of voices */
- bool m_stereo; /* set to indicate stereo (e.g., System 1) */
+ int m_voices; // number of voices
+ bool m_stereo; // set to indicate stereo (e.g., System 1)
std::unique_ptr m_waveram_alloc;
- /* decoded waveform table */
+ // decoded waveform table
std::unique_ptr m_waveform[MAX_VOLUME];
virtual void sound_stream_update(sound_stream &stream, std::vector const &inputs, std::vector &outputs) override;
@@ -119,7 +118,7 @@ class namco_cus30_device : public namco_audio_device
public:
namco_cus30_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- void namcos1_cus30_w(offs_t offset, uint8_t data); /* wavedata + sound registers + RAM */
+ void namcos1_cus30_w(offs_t offset, uint8_t data); // wavedata + sound registers + RAM
uint8_t namcos1_cus30_r(offs_t offset);
void namcos1_sound_w(offs_t offset, uint8_t data);
diff --git a/src/emu/rendersw.hxx b/src/emu/rendersw.hxx
index 55cabd22ce7..d4fde37566e 100644
--- a/src/emu/rendersw.hxx
+++ b/src/emu/rendersw.hxx
@@ -474,9 +474,9 @@ private:
draw_aa_pixel(dstdata, pitch, x1, dy, apply_intensity(0xff & (~y1 >> 8), col));
dy++;
dx -= 0x10000 - (0xffff & y1); // take off amount plotted
- u8 a1 = (dx >> 8) & 0xff; // calc remainder pixel
- dx >>= 16; // adjust to pixel (solid) count
- while (dx--) // plot rest of pixels
+ u8 a1 = (dx >> 8) & 0xff; // calc remainder pixel
+ dx >>= 16; // adjust to pixel (solid) count
+ while (dx--) // plot rest of pixels
{
if (dy >= 0 && dy < height)
draw_aa_pixel(dstdata, pitch, x1, dy, col);
@@ -510,9 +510,9 @@ private:
draw_aa_pixel(dstdata, pitch, dx, y1, apply_intensity(0xff & (~x1 >> 8), col));
dx++;
dy -= 0x10000 - (0xffff & x1); // take off amount plotted
- u8 a1 = (dy >> 8) & 0xff; // remainder pixel
- dy >>= 16; // adjust to pixel (solid) count
- while (dy--) // plot rest of pixels
+ u8 a1 = (dy >> 8) & 0xff; // remainder pixel
+ dy >>= 16; // adjust to pixel (solid) count
+ while (dy--) // plot rest of pixels
{
if (dx >= 0 && dx < width)
draw_aa_pixel(dstdata, pitch, dx, y1, col);
diff --git a/src/emu/rendlay.cpp b/src/emu/rendlay.cpp
index be5413f99ae..489f232a1ad 100644
--- a/src/emu/rendlay.cpp
+++ b/src/emu/rendlay.cpp
@@ -2147,7 +2147,7 @@ class layout_element::rect_component : public component
for (u32 y = bounds.top(); y <= bounds.bottom(); ++y)
std::fill_n(&dest.pix(y, bounds.left()), width, f);
}
- else if (c.a)
+ else
{
// compute premultiplied color
u32 const a(c.a * 255.0F);
@@ -2156,6 +2156,9 @@ class layout_element::rect_component : public component
u32 const b(u32(c.b * (255.0F * 255.0F)) * a);
u32 const inva(255 - a);
+ if (!a)
+ return;
+
// we're translucent, add in the destination pixel contribution
for (u32 y = bounds.top(); y <= bounds.bottom(); ++y)
{
@@ -2189,6 +2192,7 @@ class layout_element::disk_component : public component
u32 const g(c.g * (255.0F * 255.0F) * a);
u32 const b(c.b * (255.0F * 255.0F) * a);
u32 const inva(255 - a);
+
if (!a)
return;
diff --git a/src/mame/alba/rmhaihai.cpp b/src/mame/alba/rmhaihai.cpp
index 5c403a70051..073be31b4e6 100644
--- a/src/mame/alba/rmhaihai.cpp
+++ b/src/mame/alba/rmhaihai.cpp
@@ -21,15 +21,13 @@ driver by Nicola Salmoria
protection (in rmhaisei the failure is more explicit, in rmhaijin it's
deviously delayed to a later part of the game).
In themj the checks are patched out, maybe it's a bootleg?
- ETA: it uses IOX, which is shared with speedatk.cpp and srmp2.cpp as well.
+ ETA: it uses IOX, which is nominally shared with speedatk.cpp and srmp2.cpp.
+ Most likely all three have undumped 8041 or 8042 MCUs.
- some unknown reads and writes.
- visible area uncertain.
-- rmhaihaibl stops at RAM clear. There are various small routines changed,
- probably to make up for missing IOX chip.
-
***************************************************************************/
#include "emu.h"
@@ -60,11 +58,13 @@ class rmhaihai_state : public driver_device
void init_rmhaihai();
void rmhaihai(machine_config &config);
+ void rmhaibl(machine_config &config);
protected:
void videoram_w(offs_t offset, uint8_t data);
void colorram_w(offs_t offset, uint8_t data);
uint8_t keyboard_r();
+ uint8_t bootleg_keyboard_r();
void keyboard_w(uint8_t data);
void ctrl_w(uint8_t data);
void adpcm_w(uint8_t data);
@@ -76,6 +76,7 @@ class rmhaihai_state : public driver_device
TILE_GET_INFO_MEMBER(get_bg_tile_info);
void rmhaihai_io_map(address_map &map) ATTR_COLD;
+ void rmhaihaibl_io_map(address_map &map) ATTR_COLD;
void rmhaihai_map(address_map &map) ATTR_COLD;
required_device m_maincpu;
@@ -212,6 +213,17 @@ uint8_t rmhaihai_state::keyboard_r()
return 0;
}
+uint8_t rmhaihai_state::bootleg_keyboard_r()
+{
+ // bootleg scans the key matrix directly without IOX
+ uint8_t ret = 0xff;
+ uint32_t keys = m_key[0]->read() | m_key[1]->read() << 16;
+ for (int i = 0; i < 5; i++)
+ if (!BIT(m_keyboard_cmd, i))
+ ret &= ~bitswap<3>(keys >> (i * 6 + BIT(m_keyboard_cmd, 6)), 4, 2, 0);
+ return ret;
+}
+
void rmhaihai_state::keyboard_w(uint8_t data)
{
logerror("%04x: keyboard_w %02x\n",m_maincpu->pc(),data);
@@ -286,6 +298,22 @@ void rmhaihai_state::rmhaihai_io_map(address_map &map)
map(0xbc0c, 0xbc0c).nopw(); // ??
}
+void rmhaihai_state::rmhaihaibl_io_map(address_map &map)
+{
+ map(0x0000, 0x7fff).rom().region("adpcm", 0);
+ map(0x8000, 0x8000).w(FUNC(rmhaihai_state::keyboard_w));
+ map(0x8001, 0x8001).portr("EXTRA");
+ map(0x8002, 0x8002).r(FUNC(rmhaihai_state::bootleg_keyboard_r));
+ map(0x8003, 0x8003).nopw(); // ??
+ map(0x8020, 0x8020).r("aysnd", FUNC(ay8910_device::data_r));
+ map(0x8020, 0x8021).w("aysnd", FUNC(ay8910_device::address_data_w));
+ map(0x8040, 0x8040).w(FUNC(rmhaihai_state::adpcm_w));
+ map(0x8060, 0x8060).w(FUNC(rmhaihai_state::ctrl_w));
+ map(0x8080, 0x8080).nopw(); // ??
+ map(0xbc02, 0xbc02).r(FUNC(rmhaihai_state::bootleg_keyboard_r));
+ map(0xbc0c, 0xbc0c).nopw(); // ??
+}
+
void themj_state::themj_map(address_map &map)
{
map(0x0000, 0x7fff).rom();
@@ -429,6 +457,26 @@ static INPUT_PORTS_START( rmhaihai )
PORT_INCLUDE( mjctrl )
INPUT_PORTS_END
+static INPUT_PORTS_START( rmhaibl )
+ PORT_INCLUDE( rmhaihai )
+
+ PORT_MODIFY("KEY1")
+ PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_UNUSED )
+
+ PORT_MODIFY("KEY3")
+ PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_UNUSED )
+
+ PORT_START("EXTRA")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET )
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 )
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 )
+INPUT_PORTS_END
+
static INPUT_PORTS_START( rmhaihib )
PORT_START("DSW2")
PORT_DIPNAME( 0x01, 0x01, "Unknown 2-1" )
@@ -546,6 +594,13 @@ void rmhaihai_state::rmhaihai(machine_config &config)
m_msm->add_route(ALL_OUTPUTS, "mono", 1.0);
}
+void rmhaihai_state::rmhaibl(machine_config &config)
+{
+ rmhaihai(config);
+
+ m_maincpu->set_addrmap(AS_IO, &rmhaihai_state::rmhaihaibl_io_map);
+}
+
void rmhaisei_state::rmhaisei(machine_config &config)
{
rmhaihai(config);
@@ -634,6 +689,7 @@ ROM_END
ROM_START( rmhaihaibl ) // seemingly bootleg PCB
ROM_REGION( 0x10000, "maincpu", 0 )
+ // code patched from rmhaihai2, with input routines heavily modified and protection checks removed
ROM_LOAD( "4.11g", 0x00000, 0x2000, CRC(a31394ba) SHA1(0cba4baa2c8addd7f127b21b26715ed79ec4cab7) )
ROM_CONTINUE( 0x06000, 0x2000 )
ROM_LOAD( "3.8g", 0x04000, 0x2000, CRC(aad71f3b) SHA1(fd0a7cc8478eaa09d1ee171f3cbbaeb6b94d414f) )
@@ -817,7 +873,7 @@ void rmhaihai_state::init_rmhaihai()
GAME( 1985, rmhaihai, 0, rmhaihai, rmhaihai, rmhaihai_state, init_rmhaihai, ROT0, "Alba", "Real Mahjong Haihai (Japan, newer)", MACHINE_SUPPORTS_SAVE ) // writes Homedata in NVRAM
GAME( 1985, rmhaihai2, rmhaihai, rmhaihai, rmhaihai, rmhaihai_state, init_rmhaihai, ROT0, "Alba", "Real Mahjong Haihai (Japan, older)", MACHINE_SUPPORTS_SAVE )
-GAME( 1985, rmhaihaibl, rmhaihai, rmhaihai, rmhaihai, rmhaihai_state, init_rmhaihai, ROT0, "bootleg", "Real Mahjong Haihai (Japan, bootleg)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE )
+GAME( 1985, rmhaihaibl, rmhaihai, rmhaibl, rmhaibl, rmhaihai_state, init_rmhaihai, ROT0, "bootleg", "Real Mahjong Haihai (Japan, bootleg)", MACHINE_SUPPORTS_SAVE )
GAME( 1985, rmhaihib, rmhaihai, rmhaihai, rmhaihib, rmhaihai_state, init_rmhaihai, ROT0, "Alba", "Real Mahjong Haihai (Japan, medal)", MACHINE_SUPPORTS_SAVE )
GAME( 1986, rmhaijin, 0, rmhaihai, rmhaihai, rmhaihai_state, init_rmhaihai, ROT0, "Alba", "Real Mahjong Haihai Jinji Idou Hen (Japan)", MACHINE_SUPPORTS_SAVE )
GAME( 1986, rmhaisei, 0, rmhaisei, rmhaihai, rmhaisei_state, init_rmhaihai, ROT0, "Visco", "Real Mahjong Haihai Seichouhen (Japan)", MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/apple/macadb.cpp b/src/mame/apple/macadb.cpp
index c2b4549878e..d3c3fcdbaf7 100644
--- a/src/mame/apple/macadb.cpp
+++ b/src/mame/apple/macadb.cpp
@@ -13,7 +13,7 @@
#define LOG_STATE (1U << 2)
#define LOG_LINESTATE (1U << 3)
#define VERBOSE (0)
-#define LOG_OUTPUT_FUNC osd_printf_info
+//#define LOG_OUTPUT_FUNC osd_printf_info
#include "logmacro.h"
diff --git a/src/mame/atari/irobot.cpp b/src/mame/atari/irobot.cpp
index cf10debf2e9..96e5c1cfe44 100644
--- a/src/mame/atari/irobot.cpp
+++ b/src/mame/atari/irobot.cpp
@@ -97,13 +97,13 @@
void irobot_state::irobot_clearirq_w(uint8_t data)
{
- m_maincpu->set_input_line(M6809_IRQ_LINE ,CLEAR_LINE);
+ m_maincpu->set_input_line(M6809_IRQ_LINE, CLEAR_LINE);
}
void irobot_state::irobot_clearfirq_w(uint8_t data)
{
- m_maincpu->set_input_line(M6809_FIRQ_LINE ,CLEAR_LINE);
+ m_maincpu->set_input_line(M6809_FIRQ_LINE, CLEAR_LINE);
}
@@ -372,10 +372,10 @@ ROM_START( irobot )
ROM_LOAD( "136029-121.bin", 0x2820, 0x0400, CRC(adebcb99) SHA1(4628f8af43d82e578833b1452ec747eeb822b4e4) )
ROM_LOAD( "136029-122.bin", 0x2c20, 0x0400, CRC(da7b6f79) SHA1(02398ba6e7c56d961bf92e2755e530db1144219d) )
ROM_LOAD( "136029-123.bin", 0x3020, 0x0400, CRC(39fff18f) SHA1(85f338eeff7d8ed58804611bf8446ebb697d196d) )
-ROM_END
/* Colorprom from John's driver. ? */
/* ROM_LOAD( "136029.125", 0x0000, 0x0020, CRC(c05abf82) ) */
+ROM_END
diff --git a/src/mame/atari/irobot.h b/src/mame/atari/irobot.h
index 7267fb798cb..ed3e1703d34 100644
--- a/src/mame/atari/irobot.h
+++ b/src/mame/atari/irobot.h
@@ -17,6 +17,7 @@
#include "screen.h"
#define IR_TIMING 1 /* try to emulate MB and VG running time */
+#define DISASSEMBLE_MB_ROM 0 /* generate a disassembly of the mathbox ROMs */
class irobot_state : public driver_device
{
@@ -41,11 +42,17 @@ class irobot_state : public driver_device
void irobot(machine_config &config);
+protected:
+ virtual void machine_start() override ATTR_COLD;
+ virtual void machine_reset() override ATTR_COLD;
+ virtual void video_start() override ATTR_COLD;
+
private:
struct irmb_ops
{
const struct irmb_ops *nxtop;
uint32_t func;
+ uint32_t nxtadd;
uint32_t diradd;
uint32_t latchmask;
uint32_t *areg;
@@ -56,36 +63,6 @@ class irobot_state : public driver_device
uint8_t ramsel;
};
- virtual void machine_start() override ATTR_COLD;
- virtual void machine_reset() override ATTR_COLD;
- virtual void video_start() override ATTR_COLD;
- void irobot_map(address_map &map) ATTR_COLD;
-
- void irobot_clearirq_w(uint8_t data);
- void irobot_clearfirq_w(uint8_t data);
- uint8_t irobot_sharedmem_r(offs_t offset);
- void irobot_sharedmem_w(offs_t offset, uint8_t data);
- void irobot_statwr_w(uint8_t data);
- void irobot_out0_w(uint8_t data);
- void irobot_rom_banksel_w(uint8_t data);
- uint8_t irobot_status_r();
- void irobot_paletteram_w(offs_t offset, uint8_t data);
- uint8_t quad_pokeyn_r(offs_t offset);
- void quad_pokeyn_w(offs_t offset, uint8_t data);
- void irobot_palette(palette_device &palette) const;
- uint32_t screen_update_irobot(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- TIMER_CALLBACK_MEMBER(scanline_callback);
- TIMER_DEVICE_CALLBACK_MEMBER(irobot_irvg_done_callback);
- TIMER_DEVICE_CALLBACK_MEMBER(irobot_irmb_done_callback);
- void irobot_poly_clear(uint8_t *bitmap_base);
- void irobot_poly_clear();
- void draw_line(uint8_t *polybitmap, int x1, int y1, int x2, int y2, int col);
- void irobot_run_video();
- uint32_t irmb_din(const irmb_ops *curop);
- void irmb_dout(const irmb_ops *curop, uint32_t d);
- void load_oproms();
- void irmb_run();
-
required_shared_ptr m_videoram;
uint8_t m_vg_clear = 0U;
uint8_t m_bufsel = 0U;
@@ -125,6 +102,39 @@ class irobot_state : public driver_device
required_device m_novram;
required_device_array m_pokey;
output_finder<2> m_leds;
+
+#if DISASSEMBLE_MB_ROM
+ void disassemble_instruction(uint16_t offset, const irmb_ops *op);
+#endif
+
+ void irobot_map(address_map &map) ATTR_COLD;
+
+ void irobot_clearirq_w(uint8_t data);
+ void irobot_clearfirq_w(uint8_t data);
+ uint8_t irobot_sharedmem_r(offs_t offset);
+ void irobot_sharedmem_w(offs_t offset, uint8_t data);
+ void irobot_statwr_w(uint8_t data);
+ void irobot_out0_w(uint8_t data);
+ void irobot_rom_banksel_w(uint8_t data);
+ uint8_t irobot_status_r();
+ void irobot_paletteram_w(offs_t offset, uint8_t data);
+ uint8_t quad_pokeyn_r(offs_t offset);
+ void quad_pokeyn_w(offs_t offset, uint8_t data);
+
+ void irobot_palette(palette_device &palette) const;
+ uint32_t screen_update_irobot(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ TIMER_CALLBACK_MEMBER(scanline_callback);
+ TIMER_DEVICE_CALLBACK_MEMBER(irobot_irvg_done_callback);
+ TIMER_DEVICE_CALLBACK_MEMBER(irobot_irmb_done_callback);
+ void irobot_poly_clear(uint8_t *bitmap_base);
+ void irobot_poly_clear();
+ void draw_line(uint8_t *polybitmap, int x1, int y1, int x2, int y2, int col);
+ void irobot_run_video();
+
+ uint32_t irmb_din(const irmb_ops *curop);
+ void irmb_dout(const irmb_ops *curop, uint32_t d);
+ void load_oproms();
+ void irmb_run();
};
#endif // MAME_ATARI_IROBOT_H
diff --git a/src/mame/atari/irobot_m.cpp b/src/mame/atari/irobot_m.cpp
index ab8753b2fac..d6bde9cf633 100644
--- a/src/mame/atari/irobot_m.cpp
+++ b/src/mame/atari/irobot_m.cpp
@@ -13,7 +13,7 @@
/* Note:
* There's probably something wrong with the way the Mathbox gets started.
* Try compiling with IR_TIMING=1, run with logging on and take a look at
- * the resulting logilfe.
+ * the resulting logfile.
* The mathbox is started in short intervals (<10 scanlines) without (!)
* checking its idle status.
* It also seems that the mathbox in this emulation would have to cope with
@@ -22,11 +22,8 @@
* too high.
*/
-#define DISASSEMBLE_MB_ROM 0 /* generate a disassembly of the mathbox ROMs */
-
#define IR_CPU_STATE() \
- logerror(\
- "%s, scanline: %d\n", machine().describe_context(), m_screen->vpos())
+ logerror("%s, scanline: %d\n", machine().describe_context(), m_screen->vpos())
uint8_t irobot_state::irobot_sharedmem_r(offs_t offset)
@@ -35,7 +32,7 @@ uint8_t irobot_state::irobot_sharedmem_r(offs_t offset)
return m_mbRAM[BYTE_XOR_BE(offset)];
if (m_outx == 2)
- return m_combase[BYTE_XOR_BE(offset & 0xFFF)];
+ return m_combase[BYTE_XOR_BE(offset & 0xfff)];
if (m_outx == 0)
return m_mbROM[((m_mpage & 1) << 13) + BYTE_XOR_BE(offset)];
@@ -43,7 +40,7 @@ uint8_t irobot_state::irobot_sharedmem_r(offs_t offset)
if (m_outx == 1)
return m_mbROM[0x4000 + ((m_mpage & 3) << 13) + BYTE_XOR_BE(offset)];
- return 0xFF;
+ return 0xff;
}
/* Comment out the mbRAM =, comRAM2 = or comRAM1 = and it will start working */
@@ -53,7 +50,7 @@ void irobot_state::irobot_sharedmem_w(offs_t offset, uint8_t data)
m_mbRAM[BYTE_XOR_BE(offset)] = data;
if (m_outx == 2)
- m_combase[BYTE_XOR_BE(offset & 0xFFF)] = data;
+ m_combase[BYTE_XOR_BE(offset & 0xfff)] = data;
}
TIMER_DEVICE_CALLBACK_MEMBER(irobot_state::irobot_irvg_done_callback)
@@ -86,7 +83,7 @@ void irobot_state::irobot_statwr_w(uint8_t data)
IR_CPU_STATE();
m_irvg_timer->adjust(attotime::from_msec(10));
#endif
- m_irvg_running=1;
+ m_irvg_running = 1;
}
if (BIT(data, 4) && !BIT(m_statwr, 4))
irmb_run();
@@ -104,13 +101,13 @@ void irobot_state::irobot_out0_w(uint8_t data)
switch (data & 0x60)
{
case 0:
- membank("bank2")->set_base(&RAM[0x1C000]);
+ membank("bank2")->set_base(&RAM[0x1c000]);
break;
case 0x20:
- membank("bank2")->set_base(&RAM[0x1C800]);
+ membank("bank2")->set_base(&RAM[0x1c800]);
break;
case 0x40:
- membank("bank2")->set_base(&RAM[0x1D000]);
+ membank("bank2")->set_base(&RAM[0x1d000]);
break;
}
m_outx = (data & 0x18) >> 3;
@@ -122,7 +119,7 @@ void irobot_state::irobot_rom_banksel_w(uint8_t data)
{
uint8_t *RAM = memregion("maincpu")->base();
- switch ((data & 0x0E) >> 1)
+ switch ((data & 0x0e) >> 1)
{
case 0:
membank("bank1")->set_base(&RAM[0x10000]);
@@ -140,7 +137,7 @@ void irobot_state::irobot_rom_banksel_w(uint8_t data)
membank("bank1")->set_base(&RAM[0x18000]);
break;
case 5:
- membank("bank1")->set_base(&RAM[0x1A000]);
+ membank("bank1")->set_base(&RAM[0x1a000]);
break;
}
m_leds[0] = BIT(data, 4);
@@ -151,8 +148,8 @@ TIMER_CALLBACK_MEMBER(irobot_state::scanline_callback)
{
int scanline = param;
- if (scanline == 0) m_irvg_vblank=0;
- if (scanline == 224) m_irvg_vblank=1;
+ if (scanline == 0) m_irvg_vblank = 0;
+ if (scanline == 224) m_irvg_vblank = 1;
logerror("SCANLINE CALLBACK %d\n",scanline);
/* set the IRQ line state based on the 32V line state */
m_maincpu->set_input_line(M6809_IRQ_LINE, (scanline & 32) ? ASSERT_LINE : CLEAR_LINE);
@@ -184,7 +181,7 @@ void irobot_state::machine_reset()
m_comRAM[0] = MB + 0x0e000;
m_comRAM[1] = MB + 0x0f000;
- m_irvg_vblank=0;
+ m_irvg_vblank = 0;
m_irvg_running = 0;
m_irmb_running = 0;
@@ -198,7 +195,7 @@ void irobot_state::machine_reset()
them to simulate the mathbox and vector generator running in real time */
uint8_t irobot_state::irobot_status_r()
{
- int d=0;
+ int d = 0;
logerror("status read. ");
IR_CPU_STATE();
@@ -211,8 +208,8 @@ uint8_t irobot_state::irobot_status_r()
#if IR_TIMING
/* flags are cleared by callbacks */
#else
- m_irmb_running=0;
- m_irvg_running=0;
+ m_irmb_running = 0;
+ m_irvg_running = 0;
#endif
return d;
}
@@ -270,11 +267,6 @@ uint8_t irobot_state::irobot_status_r()
#define FL_MBRW 0x80
-#if DISASSEMBLE_MB_ROM
-static void disassemble_instruction(irobot_state::irmb_ops const *op);
-#endif
-
-
uint32_t irobot_state::irmb_din(const irmb_ops *curop)
{
uint32_t d = 0;
@@ -286,9 +278,9 @@ uint32_t irobot_state::irmb_din(const irmb_ops *curop)
if (curop->diren || (m_irmb_latch & 0x6000) == 0)
d = ((uint16_t *)m_mbRAM)[ad & 0xfff]; /* MB RAM read */
else if (m_irmb_latch & 0x4000)
- d = ((uint16_t *)m_mbROM)[ad + 0x2000]; /* MB ROM read, CEMATH = 1 */
+ d = ((uint16_t *)m_mbROM)[ad + 0x2000]; /* MB ROM read, CEMATH = 1 */
else
- d = ((uint16_t *)m_mbROM)[ad & 0x1fff]; /* MB ROM read, CEMATH = 0 */
+ d = ((uint16_t *)m_mbROM)[ad & 0x1fff]; /* MB ROM read, CEMATH = 0 */
}
return d;
}
@@ -323,29 +315,30 @@ void irobot_state::load_oproms()
{
int nxtadd, func, ramsel, diradd, latchmask, dirmask, time;
- m_mbops[i].areg = &m_irmb_regs[MB[0x0000 + i] & 0x0F];
- m_mbops[i].breg = &m_irmb_regs[MB[0x0400 + i] & 0x0F];
- func = (MB[0x0800 + i] & 0x0F) << 5;
- func |= ((MB[0x0C00 +i] & 0x0F) << 1);
+ m_mbops[i].areg = &m_irmb_regs[MB[0x0000 + i] & 0x0f];
+ m_mbops[i].breg = &m_irmb_regs[MB[0x0400 + i] & 0x0f];
+ func = (MB[0x0800 + i] & 0x0f) << 5;
+ func |= ((MB[0x0c00 +i] & 0x0f) << 1);
func |= (MB[0x1000 + i] & 0x08) >> 3;
time = MB[0x1000 + i] & 0x03;
m_mbops[i].flags = (MB[0x1000 + i] & 0x04) >> 2;
- nxtadd = (MB[0x1400 + i] & 0x0C) >> 2;
+ nxtadd = (MB[0x1400 + i] & 0x0c) >> 2;
diradd = MB[0x1400 + i] & 0x03;
- nxtadd |= ((MB[0x1800 + i] & 0x0F) << 6);
- nxtadd |= ((MB[0x1C00 + i] & 0x0F) << 2);
- diradd |= (MB[0x2000 + i] & 0x0F) << 2;
- func |= (MB[0x2400 + i] & 0x0E) << 9;
+ nxtadd |= ((MB[0x1800 + i] & 0x0f) << 6);
+ nxtadd |= ((MB[0x1c00 + i] & 0x0f) << 2);
+ diradd |= (MB[0x2000 + i] & 0x0f) << 2;
+ func |= (MB[0x2400 + i] & 0x0e) << 9;
m_mbops[i].flags |= (MB[0x2400 + i] & 0x01) << 1;
- m_mbops[i].flags |= (MB[0x2800 + i] & 0x0F) << 2;
- m_mbops[i].flags |= ((MB[0x2C00 + i] & 0x01) << 6);
- m_mbops[i].flags |= (MB[0x2C00 + i] & 0x08) << 4;
- ramsel = (MB[0x2C00 + i] & 0x06) >> 1;
+ m_mbops[i].flags |= (MB[0x2800 + i] & 0x0f) << 2;
+ m_mbops[i].flags |= ((MB[0x2c00 + i] & 0x01) << 6);
+ m_mbops[i].flags |= (MB[0x2c00 + i] & 0x08) << 4;
+ ramsel = (MB[0x2c00 + i] & 0x06) >> 1;
diradd |= (MB[0x3000 + i] & 0x03) << 6;
if (m_mbops[i].flags & FL_shift) func |= 0x200;
m_mbops[i].func = func;
+ m_mbops[i].nxtadd = nxtadd;
m_mbops[i].nxtop = &m_mbops[nxtadd];
/* determine the number of 12MHz cycles for this operation */
@@ -357,13 +350,13 @@ void irobot_state::load_oproms()
/* precompute the hardcoded address bits and the mask to be used on the latch value */
if (ramsel == 0)
{
- dirmask = 0x00FC;
+ dirmask = 0x00fc;
latchmask = 0x3000;
}
else
{
dirmask = 0x0000;
- latchmask = 0x3FFC;
+ latchmask = 0x3ffc;
}
if (ramsel & 2)
latchmask |= 0x0003;
@@ -376,7 +369,7 @@ void irobot_state::load_oproms()
m_mbops[i].diren = (ramsel == 0);
#if DISASSEMBLE_MB_ROM
- disassemble_instruction(&m_mbops[i]);
+ disassemble_instruction(i, &m_mbops[i]);
#endif
}
}
@@ -400,53 +393,53 @@ TIMER_DEVICE_CALLBACK_MEMBER(irobot_state::irobot_irmb_done_callback)
#define COMPUTE_CI \
- CI = 0;\
- if (curop->flags & FL_DPSEL)\
- CI = cflag;\
- else\
- {\
- if (curop->flags & FL_carry)\
- CI = 1;\
- if (!(prevop->flags & FL_DIV) && !nflag)\
- CI = 1;\
+ CI = 0; \
+ if (curop->flags & FL_DPSEL) \
+ CI = cflag; \
+ else \
+ { \
+ if (curop->flags & FL_carry) \
+ CI = 1; \
+ if (!(prevop->flags & FL_DIV) && !nflag) \
+ CI = 1; \
}
#define ADD(r,s) \
- COMPUTE_CI;\
- result = r + s + CI;\
- cflag = (result >> 16) & 1;\
+ COMPUTE_CI; \
+ result = r + s + CI; \
+ cflag = (result >> 16) & 1; \
vflag = (((r & 0x7fff) + (s & 0x7fff) + CI) >> 15) ^ cflag
#define SUBR(r,s) \
- COMPUTE_CI;\
- result = (r ^ 0xFFFF) + s + CI; /*S - R + CI - 1*/ \
- cflag = (result >> 16) & 1;\
+ COMPUTE_CI; \
+ result = (r ^ 0xffff) + s + CI; /*S - R + CI - 1*/ \
+ cflag = (result >> 16) & 1; \
vflag = (((s & 0x7fff) + ((r ^ 0xffff) & 0x7fff) + CI) >> 15) ^ cflag
#define SUB(r,s) \
- COMPUTE_CI;\
- result = r + (s ^ 0xFFFF) + CI; /*R - S + CI - 1*/ \
- cflag = (result >> 16) & 1;\
+ COMPUTE_CI; \
+ result = r + (s ^ 0xffff) + CI; /*R - S + CI - 1*/ \
+ cflag = (result >> 16) & 1; \
vflag = (((r & 0x7fff) + ((s ^ 0xffff) & 0x7fff) + CI) >> 15) ^ cflag
#define OR(r,s) \
- result = r | s;\
+ result = r | s; \
vflag = cflag = 0
#define AND(r,s) \
- result = r & s;\
+ result = r & s; \
vflag = cflag = 0
#define IAND(r,s) \
- result = (r ^ 0xFFFF) & s;\
+ result = (r ^ 0xffff) & s; \
vflag = cflag = 0
#define XOR(r,s) \
- result = r ^ s;\
+ result = r ^ s; \
vflag = cflag = 0
#define IXOR(r,s) \
- result = (r ^ s) ^ 0xFFFF;\
+ result = (r ^ s) ^ 0xffff; \
vflag = cflag = 0
@@ -457,47 +450,47 @@ TIMER_DEVICE_CALLBACK_MEMBER(irobot_state::irobot_irmb_done_callback)
Y = zresult
#define DEST2 \
- Y = *curop->areg;\
+ Y = *curop->areg; \
*curop->breg = zresult
#define DEST3 \
- *curop->breg = zresult;\
+ *curop->breg = zresult; \
Y = zresult
#define DEST4_NOSHIFT \
- *curop->breg = (zresult >> 1) | ((curop->flags & 0x20) << 10);\
- Q = (Q >> 1) | ((curop->flags & 0x20) << 10);\
+ *curop->breg = (zresult >> 1) | ((curop->flags & 0x20) << 10); \
+ Q = (Q >> 1) | ((curop->flags & 0x20) << 10); \
Y = zresult
#define DEST4_SHIFT \
- *curop->breg = (zresult >> 1) | ((nflag ^ vflag) << 15);\
- Q = (Q >> 1) | ((zresult & 0x01) << 15);\
+ *curop->breg = (zresult >> 1) | ((nflag ^ vflag) << 15); \
+ Q = (Q >> 1) | ((zresult & 0x01) << 15); \
Y = zresult
#define DEST5_NOSHIFT \
- *curop->breg = (zresult >> 1) | ((curop->flags & 0x20) << 10);\
+ *curop->breg = (zresult >> 1) | ((curop->flags & 0x20) << 10); \
Y = zresult
#define DEST5_SHIFT \
- *curop->breg = (zresult >> 1) | ((nflag ^ vflag) << 15);\
+ *curop->breg = (zresult >> 1) | ((nflag ^ vflag) << 15); \
Y = zresult
#define DEST6_NOSHIFT \
- *curop->breg = zresult << 1;\
- Q = ((Q << 1) & 0xffff) | (nflag ^ 1);\
+ *curop->breg = zresult << 1; \
+ Q = ((Q << 1) & 0xffff) | (nflag ^ 1); \
Y = zresult
#define DEST6_SHIFT \
- *curop->breg = (zresult << 1) | ((Q & 0x8000) >> 15);\
- Q = (Q << 1) & 0xffff;\
+ *curop->breg = (zresult << 1) | ((Q & 0x8000) >> 15); \
+ Q = (Q << 1) & 0xffff; \
Y = zresult
#define DEST7_NOSHIFT \
- *curop->breg = zresult << 1;\
+ *curop->breg = zresult << 1; \
Y = zresult
#define DEST7_SHIFT \
- *curop->breg = (zresult << 1) | ((Q & 0x8000) >> 15);\
+ *curop->breg = (zresult << 1) | ((Q & 0x8000) >> 15); \
Y = zresult
@@ -516,278 +509,274 @@ void irobot_state::irmb_run()
{
uint32_t icount = 0;
+ const irmb_ops *prevop = &m_mbops[0];
+ const irmb_ops *curop = &m_mbops[0];
+
+ uint32_t Q = 0;
+ uint32_t Y = 0;
+ uint32_t nflag = 0;
+ uint32_t vflag = 0;
+ uint32_t cflag = 0;
+ uint32_t zresult = 1;
+ uint32_t CI = 0;
+ uint32_t SP = 0;
+
+ auto profile = g_profiler.start(PROFILER_USER1);
+
+ while ((prevop->flags & (FL_DPSEL | FL_carry)) != (FL_DPSEL | FL_carry))
{
- const irmb_ops *prevop = &m_mbops[0];
- const irmb_ops *curop = &m_mbops[0];
+ uint32_t result;
+ uint32_t fu;
+ uint32_t tmp;
- uint32_t Q = 0;
- uint32_t Y = 0;
- uint32_t nflag = 0;
- uint32_t vflag = 0;
- uint32_t cflag = 0;
- uint32_t zresult = 1;
- uint32_t CI = 0;
- uint32_t SP = 0;
+ icount += curop->cycles;
- auto profile = g_profiler.start(PROFILER_USER1);
+ /* Get function code */
+ fu = curop->func;
- while ((prevop->flags & (FL_DPSEL | FL_carry)) != (FL_DPSEL | FL_carry))
+ /* Modify function for MULT */
+ if (!(prevop->flags & FL_MULT) || (Q & 1))
+ fu = fu ^ 0x02;
+ else
+ fu = fu | 0x02;
+
+ /* Modify function for DIV */
+ if ((prevop->flags & FL_DIV) || nflag)
+ fu = fu ^ 0x08;
+ else
+ fu = fu | 0x08;
+
+ /* Do source and operation */
+ switch (fu & 0x03f)
{
- uint32_t result;
- uint32_t fu;
- uint32_t tmp;
+ case 0x00: ADD(*curop->areg, Q); break;
+ case 0x01: ADD(*curop->areg, *curop->breg); break;
+ case 0x02: ADD(0, Q); break;
+ case 0x03: ADD(0, *curop->breg); break;
+ case 0x04: ADD(0, *curop->areg); break;
+ case 0x05: tmp = irmb_din(curop); ADD(tmp, *curop->areg); break;
+ case 0x06: tmp = irmb_din(curop); ADD(tmp, Q); break;
+ case 0x07: tmp = irmb_din(curop); ADD(tmp, 0); break;
+ case 0x08: SUBR(*curop->areg, Q); break;
+ case 0x09: SUBR(*curop->areg, *curop->breg); break;
+ case 0x0a: SUBR(0, Q); break;
+ case 0x0b: SUBR(0, *curop->breg); break;
+ case 0x0c: SUBR(0, *curop->areg); break;
+ case 0x0d: tmp = irmb_din(curop); SUBR(tmp, *curop->areg); break;
+ case 0x0e: tmp = irmb_din(curop); SUBR(tmp, Q); break;
+ case 0x0f: tmp = irmb_din(curop); SUBR(tmp, 0); break;
+ case 0x10: SUB(*curop->areg, Q); break;
+ case 0x11: SUB(*curop->areg, *curop->breg); break;
+ case 0x12: SUB(0, Q); break;
+ case 0x13: SUB(0, *curop->breg); break;
+ case 0x14: SUB(0, *curop->areg); break;
+ case 0x15: tmp = irmb_din(curop); SUB(tmp, *curop->areg); break;
+ case 0x16: tmp = irmb_din(curop); SUB(tmp, Q); break;
+ case 0x17: tmp = irmb_din(curop); SUB(tmp, 0); break;
+ case 0x18: OR(*curop->areg, Q); break;
+ case 0x19: OR(*curop->areg, *curop->breg); break;
+ case 0x1a: OR(0, Q); break;
+ case 0x1b: OR(0, *curop->breg); break;
+ case 0x1c: OR(0, *curop->areg); break;
+ case 0x1d: OR(irmb_din(curop), *curop->areg); break;
+ case 0x1e: OR(irmb_din(curop), Q); break;
+ case 0x1f: OR(irmb_din(curop), 0); break;
+ case 0x20: AND(*curop->areg, Q); break;
+ case 0x21: AND(*curop->areg, *curop->breg); break;
+ case 0x22: AND(0, Q); break;
+ case 0x23: AND(0, *curop->breg); break;
+ case 0x24: AND(0, *curop->areg); break;
+ case 0x25: AND(irmb_din(curop), *curop->areg); break;
+ case 0x26: AND(irmb_din(curop), Q); break;
+ case 0x27: AND(irmb_din(curop), 0); break;
+ case 0x28: IAND(*curop->areg, Q); break;
+ case 0x29: IAND(*curop->areg, *curop->breg); break;
+ case 0x2a: IAND(0, Q); break;
+ case 0x2b: IAND(0, *curop->breg); break;
+ case 0x2c: IAND(0, *curop->areg); break;
+ case 0x2d: IAND(irmb_din(curop), *curop->areg); break;
+ case 0x2e: IAND(irmb_din(curop), Q); break;
+ case 0x2f: IAND(irmb_din(curop), 0); break;
+ case 0x30: XOR(*curop->areg, Q); break;
+ case 0x31: XOR(*curop->areg, *curop->breg); break;
+ case 0x32: XOR(0, Q); break;
+ case 0x33: XOR(0, *curop->breg); break;
+ case 0x34: XOR(0, *curop->areg); break;
+ case 0x35: XOR(irmb_din(curop), *curop->areg); break;
+ case 0x36: XOR(irmb_din(curop), Q); break;
+ case 0x37: XOR(irmb_din(curop), 0); break;
+ case 0x38: IXOR(*curop->areg, Q); break;
+ case 0x39: IXOR(*curop->areg, *curop->breg); break;
+ case 0x3a: IXOR(0, Q); break;
+ case 0x3b: IXOR(0, *curop->breg); break;
+ case 0x3c: IXOR(0, *curop->areg); break;
+ case 0x3d: IXOR(irmb_din(curop), *curop->areg); break;
+ case 0x3e: IXOR(irmb_din(curop), Q); break;
+ case 0x3f: IXOR(irmb_din(curop), 0); break;
+ }
- icount += curop->cycles;
+ /* Evaluate flags */
+ zresult = result & 0xffff;
+ nflag = zresult >> 15;
- /* Get function code */
- fu = curop->func;
+ prevop = curop;
- /* Modify function for MULT */
- if (!(prevop->flags & FL_MULT) || (Q & 1))
- fu = fu ^ 0x02;
- else
- fu = fu | 0x02;
+ /* Do destination and jump */
+ switch (fu >> 6)
+ {
+ case 0x00:
+ case 0x08: DEST0; JUMP0; break;
+ case 0x01:
+ case 0x09: DEST1; JUMP0; break;
+ case 0x02:
+ case 0x0a: DEST2; JUMP0; break;
+ case 0x03:
+ case 0x0b: DEST3; JUMP0; break;
+ case 0x04: DEST4_NOSHIFT; JUMP0; break;
+ case 0x05: DEST5_NOSHIFT; JUMP0; break;
+ case 0x06: DEST6_NOSHIFT; JUMP0; break;
+ case 0x07: DEST7_NOSHIFT; JUMP0; break;
+ case 0x0c: DEST4_SHIFT; JUMP0; break;
+ case 0x0d: DEST5_SHIFT; JUMP0; break;
+ case 0x0e: DEST6_SHIFT; JUMP0; break;
+ case 0x0f: DEST7_SHIFT; JUMP0; break;
+
+ case 0x10:
+ case 0x18: DEST0; JUMP1; break;
+ case 0x11:
+ case 0x19: DEST1; JUMP1; break;
+ case 0x12:
+ case 0x1a: DEST2; JUMP1; break;
+ case 0x13:
+ case 0x1b: DEST3; JUMP1; break;
+ case 0x14: DEST4_NOSHIFT; JUMP1; break;
+ case 0x15: DEST5_NOSHIFT; JUMP1; break;
+ case 0x16: DEST6_NOSHIFT; JUMP1; break;
+ case 0x17: DEST7_NOSHIFT; JUMP1; break;
+ case 0x1c: DEST4_SHIFT; JUMP1; break;
+ case 0x1d: DEST5_SHIFT; JUMP1; break;
+ case 0x1e: DEST6_SHIFT; JUMP1; break;
+ case 0x1f: DEST7_SHIFT; JUMP1; break;
+
+ case 0x20:
+ case 0x28: DEST0; JUMP2; break;
+ case 0x21:
+ case 0x29: DEST1; JUMP2; break;
+ case 0x22:
+ case 0x2a: DEST2; JUMP2; break;
+ case 0x23:
+ case 0x2b: DEST3; JUMP2; break;
+ case 0x24: DEST4_NOSHIFT; JUMP2; break;
+ case 0x25: DEST5_NOSHIFT; JUMP2; break;
+ case 0x26: DEST6_NOSHIFT; JUMP2; break;
+ case 0x27: DEST7_NOSHIFT; JUMP2; break;
+ case 0x2c: DEST4_SHIFT; JUMP2; break;
+ case 0x2d: DEST5_SHIFT; JUMP2; break;
+ case 0x2e: DEST6_SHIFT; JUMP2; break;
+ case 0x2f: DEST7_SHIFT; JUMP2; break;
+
+ case 0x30:
+ case 0x38: DEST0; JUMP3; break;
+ case 0x31:
+ case 0x39: DEST1; JUMP3; break;
+ case 0x32:
+ case 0x3a: DEST2; JUMP3; break;
+ case 0x33:
+ case 0x3b: DEST3; JUMP3; break;
+ case 0x34: DEST4_NOSHIFT; JUMP3; break;
+ case 0x35: DEST5_NOSHIFT; JUMP3; break;
+ case 0x36: DEST6_NOSHIFT; JUMP3; break;
+ case 0x37: DEST7_NOSHIFT; JUMP3; break;
+ case 0x3c: DEST4_SHIFT; JUMP3; break;
+ case 0x3d: DEST5_SHIFT; JUMP3; break;
+ case 0x3e: DEST6_SHIFT; JUMP3; break;
+ case 0x3f: DEST7_SHIFT; JUMP3; break;
+
+ case 0x40:
+ case 0x48: DEST0; JUMP4; break;
+ case 0x41:
+ case 0x49: DEST1; JUMP4; break;
+ case 0x42:
+ case 0x4a: DEST2; JUMP4; break;
+ case 0x43:
+ case 0x4b: DEST3; JUMP4; break;
+ case 0x44: DEST4_NOSHIFT; JUMP4; break;
+ case 0x45: DEST5_NOSHIFT; JUMP4; break;
+ case 0x46: DEST6_NOSHIFT; JUMP4; break;
+ case 0x47: DEST7_NOSHIFT; JUMP4; break;
+ case 0x4c: DEST4_SHIFT; JUMP4; break;
+ case 0x4d: DEST5_SHIFT; JUMP4; break;
+ case 0x4e: DEST6_SHIFT; JUMP4; break;
+ case 0x4f: DEST7_SHIFT; JUMP4; break;
+
+ case 0x50:
+ case 0x58: DEST0; JUMP5; break;
+ case 0x51:
+ case 0x59: DEST1; JUMP5; break;
+ case 0x52:
+ case 0x5a: DEST2; JUMP5; break;
+ case 0x53:
+ case 0x5b: DEST3; JUMP5; break;
+ case 0x54: DEST4_NOSHIFT; JUMP5; break;
+ case 0x55: DEST5_NOSHIFT; JUMP5; break;
+ case 0x56: DEST6_NOSHIFT; JUMP5; break;
+ case 0x57: DEST7_NOSHIFT; JUMP5; break;
+ case 0x5c: DEST4_SHIFT; JUMP5; break;
+ case 0x5d: DEST5_SHIFT; JUMP5; break;
+ case 0x5e: DEST6_SHIFT; JUMP5; break;
+ case 0x5f: DEST7_SHIFT; JUMP5; break;
+
+ case 0x60:
+ case 0x68: DEST0; JUMP6; break;
+ case 0x61:
+ case 0x69: DEST1; JUMP6; break;
+ case 0x62:
+ case 0x6a: DEST2; JUMP6; break;
+ case 0x63:
+ case 0x6b: DEST3; JUMP6; break;
+ case 0x64: DEST4_NOSHIFT; JUMP6; break;
+ case 0x65: DEST5_NOSHIFT; JUMP6; break;
+ case 0x66: DEST6_NOSHIFT; JUMP6; break;
+ case 0x67: DEST7_NOSHIFT; JUMP6; break;
+ case 0x6c: DEST4_SHIFT; JUMP6; break;
+ case 0x6d: DEST5_SHIFT; JUMP6; break;
+ case 0x6e: DEST6_SHIFT; JUMP6; break;
+ case 0x6f: DEST7_SHIFT; JUMP6; break;
+
+ case 0x70:
+ case 0x78: DEST0; JUMP7; break;
+ case 0x71:
+ case 0x79: DEST1; JUMP7; break;
+ case 0x72:
+ case 0x7a: DEST2; JUMP7; break;
+ case 0x73:
+ case 0x7b: DEST3; JUMP7; break;
+ case 0x74: DEST4_NOSHIFT; JUMP7; break;
+ case 0x75: DEST5_NOSHIFT; JUMP7; break;
+ case 0x76: DEST6_NOSHIFT; JUMP7; break;
+ case 0x77: DEST7_NOSHIFT; JUMP7; break;
+ case 0x7c: DEST4_SHIFT; JUMP7; break;
+ case 0x7d: DEST5_SHIFT; JUMP7; break;
+ case 0x7e: DEST6_SHIFT; JUMP7; break;
+ case 0x7f: DEST7_SHIFT; JUMP7; break;
+ }
+
+ /* Do write */
+ if (!(prevop->flags & FL_MBRW))
+ irmb_dout(prevop, Y);
- /* Modify function for DIV */
- if ((prevop->flags & FL_DIV) || nflag)
- fu = fu ^ 0x08;
+ /* ADDEN */
+ if (!(prevop->flags & FL_ADDEN))
+ {
+ if (prevop->flags & FL_MBRW)
+ m_irmb_latch = irmb_din(prevop);
else
- fu = fu | 0x08;
-
- /* Do source and operation */
- switch (fu & 0x03f)
- {
- case 0x00: ADD(*curop->areg, Q); break;
- case 0x01: ADD(*curop->areg, *curop->breg); break;
- case 0x02: ADD(0, Q); break;
- case 0x03: ADD(0, *curop->breg); break;
- case 0x04: ADD(0, *curop->areg); break;
- case 0x05: tmp = irmb_din(curop); ADD(tmp, *curop->areg); break;
- case 0x06: tmp = irmb_din(curop); ADD(tmp, Q); break;
- case 0x07: tmp = irmb_din(curop); ADD(tmp, 0); break;
- case 0x08: SUBR(*curop->areg, Q); break;
- case 0x09: SUBR(*curop->areg, *curop->breg); break;
- case 0x0a: SUBR(0, Q); break;
- case 0x0b: SUBR(0, *curop->breg); break;
- case 0x0c: SUBR(0, *curop->areg); break;
- case 0x0d: tmp = irmb_din(curop); SUBR(tmp, *curop->areg); break;
- case 0x0e: tmp = irmb_din(curop); SUBR(tmp, Q); break;
- case 0x0f: tmp = irmb_din(curop); SUBR(tmp, 0); break;
- case 0x10: SUB(*curop->areg, Q); break;
- case 0x11: SUB(*curop->areg, *curop->breg); break;
- case 0x12: SUB(0, Q); break;
- case 0x13: SUB(0, *curop->breg); break;
- case 0x14: SUB(0, *curop->areg); break;
- case 0x15: tmp = irmb_din(curop); SUB(tmp, *curop->areg); break;
- case 0x16: tmp = irmb_din(curop); SUB(tmp, Q); break;
- case 0x17: tmp = irmb_din(curop); SUB(tmp, 0); break;
- case 0x18: OR(*curop->areg, Q); break;
- case 0x19: OR(*curop->areg, *curop->breg); break;
- case 0x1a: OR(0, Q); break;
- case 0x1b: OR(0, *curop->breg); break;
- case 0x1c: OR(0, *curop->areg); break;
- case 0x1d: OR(irmb_din(curop), *curop->areg); break;
- case 0x1e: OR(irmb_din(curop), Q); break;
- case 0x1f: OR(irmb_din(curop), 0); break;
- case 0x20: AND(*curop->areg, Q); break;
- case 0x21: AND(*curop->areg, *curop->breg); break;
- case 0x22: AND(0, Q); break;
- case 0x23: AND(0, *curop->breg); break;
- case 0x24: AND(0, *curop->areg); break;
- case 0x25: AND(irmb_din(curop), *curop->areg); break;
- case 0x26: AND(irmb_din(curop), Q); break;
- case 0x27: AND(irmb_din(curop), 0); break;
- case 0x28: IAND(*curop->areg, Q); break;
- case 0x29: IAND(*curop->areg, *curop->breg); break;
- case 0x2a: IAND(0, Q); break;
- case 0x2b: IAND(0, *curop->breg); break;
- case 0x2c: IAND(0, *curop->areg); break;
- case 0x2d: IAND(irmb_din(curop), *curop->areg); break;
- case 0x2e: IAND(irmb_din(curop), Q); break;
- case 0x2f: IAND(irmb_din(curop), 0); break;
- case 0x30: XOR(*curop->areg, Q); break;
- case 0x31: XOR(*curop->areg, *curop->breg); break;
- case 0x32: XOR(0, Q); break;
- case 0x33: XOR(0, *curop->breg); break;
- case 0x34: XOR(0, *curop->areg); break;
- case 0x35: XOR(irmb_din(curop), *curop->areg); break;
- case 0x36: XOR(irmb_din(curop), Q); break;
- case 0x37: XOR(irmb_din(curop), 0); break;
- case 0x38: IXOR(*curop->areg, Q); break;
- case 0x39: IXOR(*curop->areg, *curop->breg); break;
- case 0x3a: IXOR(0, Q); break;
- case 0x3b: IXOR(0, *curop->breg); break;
- case 0x3c: IXOR(0, *curop->areg); break;
- case 0x3d: IXOR(irmb_din(curop), *curop->areg); break;
- case 0x3e: IXOR(irmb_din(curop), Q); break;
- default: case 0x3f: IXOR(irmb_din(curop), 0); break;
- }
-
- /* Evaluate flags */
- zresult = result & 0xFFFF;
- nflag = zresult >> 15;
-
- prevop = curop;
-
- /* Do destination and jump */
- switch (fu >> 6)
- {
- case 0x00:
- case 0x08: DEST0; JUMP0; break;
- case 0x01:
- case 0x09: DEST1; JUMP0; break;
- case 0x02:
- case 0x0a: DEST2; JUMP0; break;
- case 0x03:
- case 0x0b: DEST3; JUMP0; break;
- case 0x04: DEST4_NOSHIFT; JUMP0; break;
- case 0x05: DEST5_NOSHIFT; JUMP0; break;
- case 0x06: DEST6_NOSHIFT; JUMP0; break;
- case 0x07: DEST7_NOSHIFT; JUMP0; break;
- case 0x0c: DEST4_SHIFT; JUMP0; break;
- case 0x0d: DEST5_SHIFT; JUMP0; break;
- case 0x0e: DEST6_SHIFT; JUMP0; break;
- case 0x0f: DEST7_SHIFT; JUMP0; break;
-
- case 0x10:
- case 0x18: DEST0; JUMP1; break;
- case 0x11:
- case 0x19: DEST1; JUMP1; break;
- case 0x12:
- case 0x1a: DEST2; JUMP1; break;
- case 0x13:
- case 0x1b: DEST3; JUMP1; break;
- case 0x14: DEST4_NOSHIFT; JUMP1; break;
- case 0x15: DEST5_NOSHIFT; JUMP1; break;
- case 0x16: DEST6_NOSHIFT; JUMP1; break;
- case 0x17: DEST7_NOSHIFT; JUMP1; break;
- case 0x1c: DEST4_SHIFT; JUMP1; break;
- case 0x1d: DEST5_SHIFT; JUMP1; break;
- case 0x1e: DEST6_SHIFT; JUMP1; break;
- case 0x1f: DEST7_SHIFT; JUMP1; break;
-
- case 0x20:
- case 0x28: DEST0; JUMP2; break;
- case 0x21:
- case 0x29: DEST1; JUMP2; break;
- case 0x22:
- case 0x2a: DEST2; JUMP2; break;
- case 0x23:
- case 0x2b: DEST3; JUMP2; break;
- case 0x24: DEST4_NOSHIFT; JUMP2; break;
- case 0x25: DEST5_NOSHIFT; JUMP2; break;
- case 0x26: DEST6_NOSHIFT; JUMP2; break;
- case 0x27: DEST7_NOSHIFT; JUMP2; break;
- case 0x2c: DEST4_SHIFT; JUMP2; break;
- case 0x2d: DEST5_SHIFT; JUMP2; break;
- case 0x2e: DEST6_SHIFT; JUMP2; break;
- case 0x2f: DEST7_SHIFT; JUMP2; break;
-
- case 0x30:
- case 0x38: DEST0; JUMP3; break;
- case 0x31:
- case 0x39: DEST1; JUMP3; break;
- case 0x32:
- case 0x3a: DEST2; JUMP3; break;
- case 0x33:
- case 0x3b: DEST3; JUMP3; break;
- case 0x34: DEST4_NOSHIFT; JUMP3; break;
- case 0x35: DEST5_NOSHIFT; JUMP3; break;
- case 0x36: DEST6_NOSHIFT; JUMP3; break;
- case 0x37: DEST7_NOSHIFT; JUMP3; break;
- case 0x3c: DEST4_SHIFT; JUMP3; break;
- case 0x3d: DEST5_SHIFT; JUMP3; break;
- case 0x3e: DEST6_SHIFT; JUMP3; break;
- case 0x3f: DEST7_SHIFT; JUMP3; break;
-
- case 0x40:
- case 0x48: DEST0; JUMP4; break;
- case 0x41:
- case 0x49: DEST1; JUMP4; break;
- case 0x42:
- case 0x4a: DEST2; JUMP4; break;
- case 0x43:
- case 0x4b: DEST3; JUMP4; break;
- case 0x44: DEST4_NOSHIFT; JUMP4; break;
- case 0x45: DEST5_NOSHIFT; JUMP4; break;
- case 0x46: DEST6_NOSHIFT; JUMP4; break;
- case 0x47: DEST7_NOSHIFT; JUMP4; break;
- case 0x4c: DEST4_SHIFT; JUMP4; break;
- case 0x4d: DEST5_SHIFT; JUMP4; break;
- case 0x4e: DEST6_SHIFT; JUMP4; break;
- case 0x4f: DEST7_SHIFT; JUMP4; break;
-
- case 0x50:
- case 0x58: DEST0; JUMP5; break;
- case 0x51:
- case 0x59: DEST1; JUMP5; break;
- case 0x52:
- case 0x5a: DEST2; JUMP5; break;
- case 0x53:
- case 0x5b: DEST3; JUMP5; break;
- case 0x54: DEST4_NOSHIFT; JUMP5; break;
- case 0x55: DEST5_NOSHIFT; JUMP5; break;
- case 0x56: DEST6_NOSHIFT; JUMP5; break;
- case 0x57: DEST7_NOSHIFT; JUMP5; break;
- case 0x5c: DEST4_SHIFT; JUMP5; break;
- case 0x5d: DEST5_SHIFT; JUMP5; break;
- case 0x5e: DEST6_SHIFT; JUMP5; break;
- case 0x5f: DEST7_SHIFT; JUMP5; break;
-
- case 0x60:
- case 0x68: DEST0; JUMP6; break;
- case 0x61:
- case 0x69: DEST1; JUMP6; break;
- case 0x62:
- case 0x6a: DEST2; JUMP6; break;
- case 0x63:
- case 0x6b: DEST3; JUMP6; break;
- case 0x64: DEST4_NOSHIFT; JUMP6; break;
- case 0x65: DEST5_NOSHIFT; JUMP6; break;
- case 0x66: DEST6_NOSHIFT; JUMP6; break;
- case 0x67: DEST7_NOSHIFT; JUMP6; break;
- case 0x6c: DEST4_SHIFT; JUMP6; break;
- case 0x6d: DEST5_SHIFT; JUMP6; break;
- case 0x6e: DEST6_SHIFT; JUMP6; break;
- case 0x6f: DEST7_SHIFT; JUMP6; break;
-
- case 0x70:
- case 0x78: DEST0; JUMP7; break;
- case 0x71:
- case 0x79: DEST1; JUMP7; break;
- case 0x72:
- case 0x7a: DEST2; JUMP7; break;
- case 0x73:
- case 0x7b: DEST3; JUMP7; break;
- case 0x74: DEST4_NOSHIFT; JUMP7; break;
- case 0x75: DEST5_NOSHIFT; JUMP7; break;
- case 0x76: DEST6_NOSHIFT; JUMP7; break;
- case 0x77: DEST7_NOSHIFT; JUMP7; break;
- case 0x7c: DEST4_SHIFT; JUMP7; break;
- case 0x7d: DEST5_SHIFT; JUMP7; break;
- case 0x7e: DEST6_SHIFT; JUMP7; break;
- case 0x7f: DEST7_SHIFT; JUMP7; break;
- }
-
- /* Do write */
- if (!(prevop->flags & FL_MBRW))
- irmb_dout(prevop, Y);
-
- /* ADDEN */
- if (!(prevop->flags & FL_ADDEN))
- {
- if (prevop->flags & FL_MBRW)
- m_irmb_latch = irmb_din(prevop);
- else
- m_irmb_latch = Y;
- }
+ m_irmb_latch = Y;
}
- // stop profiling USER1
}
logerror("%d instructions for Mathbox \n", icount);
-
#if IR_TIMING
if (m_irmb_running == 0)
{
@@ -804,28 +793,25 @@ void irobot_state::irmb_run()
#else
m_maincpu->set_input_line(M6809_FIRQ_LINE, ASSERT_LINE);
#endif
- m_irmb_running=1;
+ m_irmb_running = 1;
}
-
#if DISASSEMBLE_MB_ROM
-static void disassemble_instruction(irobot_state::irmb_ops const *op)
+void irobot_state::disassemble_instruction(uint16_t offset, const irmb_ops *op)
{
- int lp;
-
- if (i==0)
- logerror(" Address a b func stor: Q :Y, R, S RDCSAESM da m rs\n");
- logerror("%04X : ",i);
- logerror("%X ",op->areg);
- logerror("%X ",op->breg);
-
- lp=(op->func & 0x38)>>3;
- if ((lp&1)==0)
- lp|=1;
+ if (offset == 0)
+ logerror(" Address a b func stor: Q :Y, R, S RDCSAESM da rs\n");
+ logerror("%04X : ", offset);
+ logerror("%X ", *op->areg);
+ logerror("%X ", *op->breg);
+
+ int lp = (op->func & 0x38) >> 3;
+ if ((lp & 1) == 0)
+ lp |= 1;
else if((op->flags & FL_DIV) != 0)
- lp&=6;
+ lp &= 6;
else
logerror("*");
@@ -857,7 +843,7 @@ static void disassemble_instruction(irobot_state::irmb_ops const *op)
break;
}
- switch ((op->func & 0x1c0)>>6)
+ switch ((op->func & 0x1c0) >> 6)
{
case 0:
logerror(" - : Q :F,");
@@ -866,52 +852,52 @@ static void disassemble_instruction(irobot_state::irmb_ops const *op)
logerror(" - : - :F,");
break;
case 2:
- logerror(" R%x: - :A,",op->breg);
+ logerror(" R%x: - :A,", *op->breg);
break;
case 3:
- logerror(" R%x: - :F,",op->breg);
+ logerror(" R%x: - :F,", *op->breg);
break;
case 4:
- logerror(">>R%x:>>Q:F,",op->breg);
+ logerror(">>R%x:>>Q:F,", *op->breg);
break;
case 5:
- logerror(">>R%x: - :F,",op->breg);
+ logerror(">>R%x: - :F,", *op->breg);
break;
case 6:
- logerror("<breg);
+ logerror("<breg);
break;
case 7:
- logerror("<breg);
+ logerror("<breg);
break;
}
- lp=(op->func & 0x7);
- if ((lp&2)==0)
- lp|=2;
- else if((op->flags & FL_MULT) == 0)
- lp&=5;
+ lp = (op->func & 0x7);
+ if ((lp & 2) == 0)
+ lp |= 2;
+ else if ((op->flags & FL_MULT) == 0)
+ lp &= 5;
else
logerror("*");
switch (lp)
{
case 0:
- logerror("R%x, Q ",op->areg);
+ logerror("R%x, Q ", *op->areg);
break;
case 1:
- logerror("R%x,R%x ",op->areg,op->breg);
+ logerror("R%x,R%x ", *op->areg, *op->breg);
break;
case 2:
logerror("00, Q ");
break;
case 3:
- logerror("00,R%x ",op->breg);
+ logerror("00,R%x ", *op->breg);
break;
case 4:
- logerror("00,R%x ",op->areg);
+ logerror("00,R%x ", *op->areg);
break;
case 5:
- logerror(" D,R%x ",op->areg);
+ logerror(" D,R%x ", *op->areg);
break;
case 6:
logerror(" D, Q ");
@@ -921,18 +907,19 @@ static void disassemble_instruction(irobot_state::irmb_ops const *op)
break;
}
- for (lp=0;lp<8;lp++)
- if (op->flags & (0x80>>lp))
+ for (lp = 0; lp < 8; lp++)
+ if (op->flags & (0x80 >> lp))
logerror("1");
else
logerror("0");
- logerror(" %02X ",op->diradd);
- logerror("%X\n",op->ramsel);
- if (op->jtype)
+ logerror(" %02X ", op->diradd);
+ logerror("%X\n", op->ramsel);
+
+ if (int jt = ((op->func >> 6 & 0xf) >= 4) ? (op->func >> 10) : 0; jt != 0)
{
logerror(" ");
- switch (op->jtype)
+ switch (jt)
{
case 1:
logerror("BO ");
@@ -956,8 +943,8 @@ static void disassemble_instruction(irobot_state::irmb_ops const *op)
logerror("Return\n\n");
break;
}
- if (op->jtype != 7) logerror(" %04X \n",op->nxtadd);
- if (op->jtype == 5) logerror("\n");
+ if (jt != 7) logerror(" %04X \n", op->nxtadd);
+ if (jt == 5) logerror("\n");
}
}
#endif // DISASSEMBLE_MB_ROM
diff --git a/src/mame/atari/irobot_v.cpp b/src/mame/atari/irobot_v.cpp
index a8f49d57898..9b30a745c98 100644
--- a/src/mame/atari/irobot_v.cpp
+++ b/src/mame/atari/irobot_v.cpp
@@ -164,29 +164,29 @@ void irobot_state::video_start()
void irobot_state::draw_line(uint8_t *polybitmap, int x1, int y1, int x2, int y2, int col)
{
- int dx,dy,sx,sy,cx,cy;
+ int dx, dy, sx, sy, cx, cy;
- dx = abs(x1-x2);
- dy = abs(y1-y2);
+ dx = abs(x1 - x2);
+ dy = abs(y1 - y2);
sx = (x1 <= x2) ? 1: -1;
sy = (y1 <= y2) ? 1: -1;
- cx = dx/2;
- cy = dy/2;
+ cx = dx / 2;
+ cy = dy / 2;
- if (dx>=dy)
+ if (dx >= dy)
{
for (;;)
{
if (x1 >= m_ir_xmin && x1 < m_ir_xmax && y1 >= m_ir_ymin && y1 < m_ir_ymax)
- draw_pixel (x1, y1, col);
- if (x1 == x2) break;
- x1 += sx;
- cx -= dy;
- if (cx < 0)
- {
- y1 += sy;
- cx += dx;
- }
+ draw_pixel (x1, y1, col);
+ if (x1 == x2) break;
+ x1 += sx;
+ cx -= dy;
+ if (cx < 0)
+ {
+ y1 += sy;
+ cx += dx;
+ }
}
}
else
@@ -200,8 +200,8 @@ void irobot_state::draw_line(uint8_t *polybitmap, int x1, int y1, int x2, int y2
cy -= dx;
if (cy < 0)
{
- x1 += sx;
- cy += dy;
+ x1 += sx;
+ cy += dy;
}
}
}
@@ -214,21 +214,21 @@ void irobot_state::irobot_run_video()
{
uint8_t *polybitmap;
uint16_t *combase16 = (uint16_t *)m_combase;
- int sx,sy,ex,ey,sx2,ey2;
+ int sx, sy, ex, ey, sx2, ey2;
int color;
uint32_t d1;
- int lpnt,spnt,spnt2;
+ int lpnt, spnt, spnt2;
int shp;
- int32_t word1,word2;
+ int32_t word1, word2;
- logerror("Starting Polygon Generator, Clear=%d\n",m_vg_clear);
+ logerror("Starting Polygon Generator, Clear=%d\n", m_vg_clear);
if (m_bufsel)
polybitmap = m_polybitmap2.get();
else
polybitmap = m_polybitmap1.get();
- lpnt=0;
+ lpnt = 0;
while (lpnt < 0x7ff)
{
d1 = combase16[lpnt++];
@@ -243,15 +243,15 @@ void irobot_state::irobot_run_video()
{
sx = combase16[spnt];
if (sx == 0xffff) break;
- sy = combase16[spnt+1];
+ sy = combase16[spnt + 1];
color = sy & 0x3f;
sx = ROUND_TO_PIXEL(sx);
sy = ROUND_TO_PIXEL(sy);
if (sx >= m_ir_xmin && sx < m_ir_xmax && sy >= m_ir_ymin && sy < m_ir_ymax)
- draw_pixel(sx,sy,color);
- spnt+=2;
- }//while object
- }//if point
+ draw_pixel(sx, sy, color);
+ spnt += 2;
+ } // while object
+ } // if point
/* line */
if (shp == 0xc)
@@ -261,45 +261,43 @@ void irobot_state::irobot_run_video()
ey = combase16[spnt];
if (ey == 0xffff) break;
ey = ROUND_TO_PIXEL(ey);
- sy = combase16[spnt+1];
+ sy = combase16[spnt + 1];
color = sy & 0x3f;
sy = ROUND_TO_PIXEL(sy);
- sx = combase16[spnt+3];
- word1 = (int16_t)combase16[spnt+2];
+ sx = combase16[spnt + 3];
+ word1 = (int16_t)combase16[spnt + 2];
ex = sx + word1 * (ey - sy + 1);
- draw_line(polybitmap, ROUND_TO_PIXEL(sx),sy,ROUND_TO_PIXEL(ex),ey,color);
- spnt+=4;
- }//while object
- }//if line
+ draw_line(polybitmap, ROUND_TO_PIXEL(sx), sy, ROUND_TO_PIXEL(ex), ey, color);
+ spnt += 4;
+ } // while object
+ } // if line
/* polygon */
if (shp == 0x4)
{
spnt2 = combase16[spnt] & 0x7ff;
- sx = combase16[spnt+1];
- sx2 = combase16[spnt+2];
- sy = combase16[spnt+3];
+ sx = combase16[spnt + 1];
+ sx2 = combase16[spnt + 2];
+ sy = combase16[spnt + 3];
color = sy & 0x3f;
sy = ROUND_TO_PIXEL(sy);
- spnt+=4;
+ spnt += 4;
word1 = (int16_t)combase16[spnt];
- ey = combase16[spnt+1];
+ ey = combase16[spnt + 1];
if (word1 != -1 || ey != 0xffff)
{
ey = ROUND_TO_PIXEL(ey);
- spnt+=2;
-
- // sx += word1;
+ spnt += 2;
+ //sx += word1;
word2 = (int16_t)combase16[spnt2];
- ey2 = ROUND_TO_PIXEL(combase16[spnt2+1]);
- spnt2+=2;
-
- // sx2 += word2;
+ ey2 = ROUND_TO_PIXEL(combase16[spnt2 + 1]);
+ spnt2 += 2;
+ //sx2 += word2;
- while(1)
+ while (1)
{
if (sy >= m_ir_ymin && sy < m_ir_ymax)
{
@@ -318,11 +316,11 @@ void irobot_state::irobot_run_video()
if (sy > ey)
{
word1 = (int16_t)combase16[spnt];
- ey = combase16[spnt+1];
+ ey = combase16[spnt + 1];
if (word1 == -1 && ey == 0xffff)
break;
ey = ROUND_TO_PIXEL(ey);
- spnt+=2;
+ spnt += 2;
}
else
sx += word1;
@@ -330,41 +328,36 @@ void irobot_state::irobot_run_video()
if (sy > ey2)
{
word2 = (int16_t)combase16[spnt2];
- ey2 = ROUND_TO_PIXEL(combase16[spnt2+1]);
- spnt2+=2;
+ ey2 = ROUND_TO_PIXEL(combase16[spnt2 + 1]);
+ spnt2 += 2;
}
else
sx2 += word2;
- } //while polygon
- }//if at least 2 sides
- } //if polygon
- } //while object
+ } // while polygon
+ } // if at least 2 sides
+ } // if polygon
+ } // while object
}
uint32_t irobot_state::screen_update_irobot(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
- uint8_t *videoram = m_videoram;
uint8_t *bitmap_base = m_bufsel ? m_polybitmap1.get() : m_polybitmap2.get();
- int x, y, offs;
/* copy the polygon bitmap */
- for (y = cliprect.top(); y <= cliprect.bottom(); y++)
+ for (int y = cliprect.top(); y <= cliprect.bottom(); y++)
draw_scanline8(bitmap, 0, y, BITMAP_WIDTH, &bitmap_base[y * BITMAP_WIDTH], nullptr);
/* redraw the non-zero characters in the alpha layer */
- for (y = offs = 0; y < 32; y++)
- for (x = 0; x < 32; x++, offs++)
+ for (int y = 0, offs = 0; y < 32; y++)
+ for (int x = 0; x < 32; x++, offs++)
{
- int code = videoram[offs] & 0x3f;
- int color = ((videoram[offs] & 0xc0) >> 6) | (m_alphamap >> 3);
+ int code = m_videoram[offs] & 0x3f;
+ int color = ((m_videoram[offs] & 0xc0) >> 6) | (m_alphamap >> 3);
- m_gfxdecode->gfx(0)->transpen(bitmap,cliprect,
- code, color,
- 0,0,
- 8*x,8*y,0);
+ m_gfxdecode->gfx(0)->transpen(bitmap,cliprect, code, color, 0, 0, 8 * x, 8 * y, 0);
}
return 0;
diff --git a/src/mame/capcom/chakumelo.cpp b/src/mame/capcom/chakumelo.cpp
index f1f3084df1e..97751a7c52c 100644
--- a/src/mame/capcom/chakumelo.cpp
+++ b/src/mame/capcom/chakumelo.cpp
@@ -95,6 +95,9 @@ ROM_START( chakumel )
ROM_LOAD( "cmc4b.4b", 0x000, 0x117, NO_DUMP )
ROM_LOAD( "cmc4c.4c", 0x200, 0x117, NO_DUMP )
ROM_LOAD( "cmc5c.5c", 0x400, 0x117, NO_DUMP )
+
+ DISK_REGION( "hdd" )
+ DISK_IMAGE( "chakumel", 0, NO_DUMP )
ROM_END
} // anonymous namespace
diff --git a/src/mame/cinematronics/cinemat.cpp b/src/mame/cinematronics/cinemat.cpp
index 9d65aded461..952bce5b6ca 100644
--- a/src/mame/cinematronics/cinemat.cpp
+++ b/src/mame/cinematronics/cinemat.cpp
@@ -44,8 +44,6 @@
#include "warrior.lh"
#include "wotw.lh"
-#define MASTER_CLOCK XTAL(19'923'000)
-
/*************************************
*
@@ -61,6 +59,7 @@ void cinemat_state::machine_start()
save_item(NAME(m_vector_color));
save_item(NAME(m_lastx));
save_item(NAME(m_lasty));
+
m_led.resolve();
m_pressed.resolve();
}
@@ -1024,7 +1023,7 @@ INPUT_PORTS_END
void cinemat_state::cinemat_nojmi_4k(machine_config &config)
{
// basic machine hardware
- CCPU(config, m_maincpu, MASTER_CLOCK/4);
+ CCPU(config, m_maincpu, 19.923_MHz_XTAL/4);
m_maincpu->set_vector_func(FUNC(cinemat_state::cinemat_vector_callback));
m_maincpu->external_func().set(FUNC(cinemat_state::joystick_read));
m_maincpu->set_addrmap(AS_PROGRAM, &cinemat_state::program_map_4k);
@@ -1037,12 +1036,14 @@ void cinemat_state::cinemat_nojmi_4k(machine_config &config)
// video hardware
VECTOR(config, "vector", 0);
+
SCREEN(config, m_screen, SCREEN_TYPE_VECTOR);
m_screen->set_video_attributes(VIDEO_ALWAYS_UPDATE);
- m_screen->set_refresh_hz(MASTER_CLOCK/4/16/16/16/16/2);
+ m_screen->set_refresh_hz(19.923_MHz_XTAL/4/16/16/16/16/2);
m_screen->set_size(1024, 768);
- m_screen->set_visarea(0, 1023, 0, 767);
+ m_screen->set_visarea_full();
m_screen->set_screen_update(FUNC(cinemat_state::screen_update_cinemat));
+ m_screen->screen_vblank().set(m_maincpu, FUNC(ccpu_cpu_device::wdt_trigger));
}
void cinemat_state::cinemat_jmi_4k(machine_config &config)
diff --git a/src/mame/cinematronics/cinemat.h b/src/mame/cinematronics/cinemat.h
index 5269b180a1b..9f20e619f08 100644
--- a/src/mame/cinematronics/cinemat.h
+++ b/src/mame/cinematronics/cinemat.h
@@ -5,6 +5,7 @@
Cinematronics vector hardware
*************************************************************************/
+
#ifndef MAME_CINEMATRONICS_CINEMAT_H
#define MAME_CINEMATRONICS_CINEMAT_H
@@ -36,13 +37,7 @@ class cinemat_state : public driver_device
, m_analog_y(*this, "ANALOGY")
, m_led(*this, "led")
, m_pressed(*this, "pressed%u", 0U)
- , m_coin_detected(0)
- , m_coin_last_reset(0)
- , m_mux_select(0)
- , m_gear(0)
, m_vector_color(255, 255, 255)
- , m_lastx(0)
- , m_lasty(0)
{ }
required_device m_maincpu;
@@ -61,13 +56,15 @@ class cinemat_state : public driver_device
output_finder<> m_led;
output_finder<10> m_pressed;
- u8 m_coin_detected;
- u8 m_coin_last_reset;
- u8 m_mux_select;
- u8 m_gear;
+ emu_timer *m_watchdog;
+ u8 m_coin_detected = 0;
+ u8 m_coin_last_reset = 0;
+ u8 m_mux_select = 0;
+ u8 m_gear = 0;
rgb_t m_vector_color;
- s16 m_lastx;
- s16 m_lasty;
+ s16 m_lastx = 0;
+ s16 m_lasty = 0;
+
u8 inputs_r(offs_t offset);
u8 switches_r(offs_t offset);
u8 coin_input_r();
@@ -196,10 +193,10 @@ class demon_state : public cinemat_state
void demon_sound_ports(address_map &map) ATTR_COLD;
private:
- u8 m_sound_fifo[16]{};
- u8 m_sound_fifo_in = 0U;
- u8 m_sound_fifo_out = 0U;
- u8 m_last_portb_write = 0U;
+ u8 m_sound_fifo[16] = { };
+ u8 m_sound_fifo_in = 0;
+ u8 m_sound_fifo_out = 0;
+ u8 m_last_portb_write = 0;
};
diff --git a/src/mame/cinematronics/cinemat_v.cpp b/src/mame/cinematronics/cinemat_v.cpp
index 61379305fc6..5abcf8dc026 100644
--- a/src/mame/cinematronics/cinemat_v.cpp
+++ b/src/mame/cinematronics/cinemat_v.cpp
@@ -147,8 +147,6 @@ uint32_t cinemat_state::screen_update_cinemat(screen_device &screen, bitmap_rgb3
m_vector->screen_update(screen, bitmap, cliprect);
m_vector->clear_list();
- m_maincpu->wdt_timer_trigger();
-
return 0;
}
diff --git a/src/mame/dynax/ddenlovr.cpp b/src/mame/dynax/ddenlovr.cpp
index 658dac37b1a..334568c69da 100644
--- a/src/mame/dynax/ddenlovr.cpp
+++ b/src/mame/dynax/ddenlovr.cpp
@@ -4710,7 +4710,7 @@ static INPUT_PORTS_START( ddenlovj )
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 )
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME(DEF_STR( Test )) PORT_CODE(KEYCODE_F1) // Test
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME(DEF_STR( Test )) // Test
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_CUSTOM ) // blitter busy flag
PORT_BIT( 0x60, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(FUNC(ddenlovr_state::ddenlovj_blitter_r)) // blitter irq flag? (bit 5) & RTC (bit 6)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM )
@@ -4815,7 +4815,7 @@ static INPUT_PORTS_START( ddenlovr )
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 )
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME(DEF_STR( Test )) PORT_CODE(KEYCODE_F1) // Test
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME(DEF_STR( Test )) // Test
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_CUSTOM ) // ? quiz365
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(FUNC(ddenlovr_state::blitter_irq_r)) // blitter irq flag
@@ -4871,7 +4871,7 @@ static INPUT_PORTS_START( nettoqc )
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 )
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME(DEF_STR( Test )) PORT_CODE(KEYCODE_F1) // Test
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME(DEF_STR( Test )) // Test
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_CUSTOM ) // blitter busy flag
PORT_BIT( 0x60, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(FUNC(ddenlovr_state::nettoqc_special_r)) // ? (bit 5) & blitter irq flag (bit 6)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM )
@@ -4968,7 +4968,7 @@ static INPUT_PORTS_START( ultrchmp )
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 )
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME(DEF_STR( Test )) PORT_CODE(KEYCODE_F1) // Test
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME(DEF_STR( Test )) // Test
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(FUNC(ddenlovr_state::blitter_irq_r)) // blitter irq flag
@@ -5147,7 +5147,7 @@ static INPUT_PORTS_START( quiz365 )
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 )
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME(DEF_STR( Test )) PORT_CODE(KEYCODE_F1) // Test
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME(DEF_STR( Test )) // Test
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_CUSTOM ) // ? quiz365
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(FUNC(ddenlovr_state::blitter_irq_r)) // blitter irq flag
@@ -5240,7 +5240,7 @@ static INPUT_PORTS_START( rongrong )
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 )
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME(DEF_STR( Test )) PORT_CODE(KEYCODE_F1) PORT_TOGGLE
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME(DEF_STR( Test )) PORT_TOGGLE
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_CUSTOM ) // ? quiz365
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_CUSTOM ) // ? blitter irq flag ?
@@ -5333,7 +5333,7 @@ static INPUT_PORTS_START( quizchq )
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 )
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME(DEF_STR( Test )) PORT_CODE(KEYCODE_F1) // Test
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME(DEF_STR( Test )) // Test
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_CUSTOM ) // ? quiz365
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_CUSTOM ) // ? blitter irq flag ?
@@ -5408,21 +5408,21 @@ static INPUT_PORTS_START( mmpanic )
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) // tested?
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 )
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME(DEF_STR( Test )) PORT_CODE(KEYCODE_F1) // Test
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME(DEF_STR( Test )) // Test
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) // tested?
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("8") PORT_CODE(KEYCODE_8_PAD)
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("9") PORT_CODE(KEYCODE_9_PAD)
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON8 ) PORT_CODE(KEYCODE_8_PAD) // top center
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON9 ) PORT_CODE(KEYCODE_9_PAD) // top right
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) // busy?
PORT_START("IN1") // 6b (68 = 0 & 1)
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("1") PORT_CODE(KEYCODE_1_PAD)
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("2") PORT_CODE(KEYCODE_2_PAD)
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("3") PORT_CODE(KEYCODE_3_PAD)
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("4") PORT_CODE(KEYCODE_4_PAD)
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("5") PORT_CODE(KEYCODE_5_PAD)
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("6") PORT_CODE(KEYCODE_6_PAD)
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("7") PORT_CODE(KEYCODE_7_PAD)
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_CODE(KEYCODE_1_PAD) // bottom left
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_CODE(KEYCODE_2_PAD) // bottom center
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_CODE(KEYCODE_3_PAD) // bottom right
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_CODE(KEYCODE_4_PAD) // middle left
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_CODE(KEYCODE_5_PAD) // middle center
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_CODE(KEYCODE_6_PAD) // middle right
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_CODE(KEYCODE_7_PAD) // top left
PORT_START("DSW1")
PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coinage ) )
@@ -5505,7 +5505,7 @@ static INPUT_PORTS_START( animaljr )
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 )
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME(DEF_STR( Test )) PORT_CODE(KEYCODE_F1) // Test
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME(DEF_STR( Test )) // Test
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -5513,12 +5513,12 @@ static INPUT_PORTS_START( animaljr )
PORT_START("IN1") // 6b (68 = 0 & 1)
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) // tested ?
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("1") PORT_CODE(KEYCODE_1_PAD)
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("2") PORT_CODE(KEYCODE_2_PAD)
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("3") PORT_CODE(KEYCODE_3_PAD)
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("4") PORT_CODE(KEYCODE_4_PAD)
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("5") PORT_CODE(KEYCODE_5_PAD)
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("6") PORT_CODE(KEYCODE_6_PAD)
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_CODE(KEYCODE_1_PAD) // bottom left
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_CODE(KEYCODE_2_PAD) // bottom center
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_CODE(KEYCODE_3_PAD) // bottom right
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_CODE(KEYCODE_4_PAD) // top left
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_CODE(KEYCODE_5_PAD) // top center
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_CODE(KEYCODE_6_PAD) // top right
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
// dipswitches are 2 banks of 10
@@ -6277,7 +6277,7 @@ static INPUT_PORTS_START( mjreach1 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN)
- PORT_INCLUDE( mahjong_matrix_2p_bet )
+ PORT_INCLUDE( mahjong_matrix_2p_bet_wup )
PORT_START("DSW1")
PORT_DIPNAME( 0x0f, 0x07, "Pay Out Rate (%)" )
@@ -6432,7 +6432,7 @@ static INPUT_PORTS_START( jongtei )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN)
- PORT_INCLUDE( mahjong_matrix_2p_bet )
+ PORT_INCLUDE( mahjong_matrix_2p_bet_wup )
PORT_START("DSW1")
PORT_DIPNAME( 0x0f, 0x07, "Pay Out Rate (%)" )
@@ -6643,7 +6643,7 @@ static INPUT_PORTS_START( mjchuuka )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN)
- PORT_INCLUDE( mahjong_matrix_2p_bet )
+ PORT_INCLUDE( mahjong_matrix_2p_bet_wup )
PORT_START("DSW1")
PORT_DIPNAME( 0x0f, 0x07, "Pay Out Rate (%)" )
@@ -6798,7 +6798,7 @@ static INPUT_PORTS_START( mjschuka )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN)
- PORT_INCLUDE( mahjong_matrix_2p_bet )
+ PORT_INCLUDE( mahjong_matrix_2p_bet_wup )
PORT_START("DSW1")
PORT_DIPNAME( 0x0f, 0x07, "Pay Out Rate (%)" )
@@ -6945,13 +6945,13 @@ INPUT_PORTS_END
static INPUT_PORTS_START( funkyfig )
PORT_START("IN0") // Keys (port 83 with port 80 = 20)
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("1") PORT_CODE(KEYCODE_1_PAD)
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("2") PORT_CODE(KEYCODE_2_PAD)
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("3") PORT_CODE(KEYCODE_3_PAD)
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("4") PORT_CODE(KEYCODE_4_PAD)
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("5") PORT_CODE(KEYCODE_5_PAD)
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("6") PORT_CODE(KEYCODE_6_PAD)
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("7") PORT_CODE(KEYCODE_7_PAD)
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_CODE(KEYCODE_1_PAD) // bottom left
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_CODE(KEYCODE_2_PAD) // bottom center
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_CODE(KEYCODE_3_PAD) // bottom right
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_CODE(KEYCODE_4_PAD) // middle left
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_CODE(KEYCODE_5_PAD) // middle center
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_CODE(KEYCODE_6_PAD) // middle right
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_CODE(KEYCODE_7_PAD) // top left
PORT_START("IN1") // ? (port 83 with port 80 = 21)
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START2 ) // ?
@@ -6961,10 +6961,10 @@ static INPUT_PORTS_START( funkyfig )
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 )
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME(DEF_STR( Test )) PORT_CODE(KEYCODE_F1)
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME(DEF_STR( Test ))
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("8") PORT_CODE(KEYCODE_8_PAD)
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("9") PORT_CODE(KEYCODE_9_PAD)
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON8 ) PORT_CODE(KEYCODE_8_PAD) // top center
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON9 ) PORT_CODE(KEYCODE_9_PAD) // top right
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("DSW1") // (low bits, port 1c with rombank = 1e)
@@ -7054,135 +7054,97 @@ static INPUT_PORTS_START( mjmyster )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN)
- PORT_INCLUDE( mahjong_matrix_2p_bet )
+ PORT_INCLUDE( mahjong_matrix_2p_bet_wup )
PORT_START("DSW1")
- PORT_DIPNAME( 0x0f, 0x07, "Pay Out Rate (%)" )
- PORT_DIPSETTING( 0x00, "50" )
- PORT_DIPSETTING( 0x01, "53" )
- PORT_DIPSETTING( 0x02, "56" )
- PORT_DIPSETTING( 0x03, "59" )
- PORT_DIPSETTING( 0x04, "62" )
- PORT_DIPSETTING( 0x05, "65" )
- PORT_DIPSETTING( 0x06, "68" )
- PORT_DIPSETTING( 0x07, "71" )
- PORT_DIPSETTING( 0x08, "75" )
- PORT_DIPSETTING( 0x09, "78" )
- PORT_DIPSETTING( 0x0a, "81" )
- PORT_DIPSETTING( 0x0b, "84" )
- PORT_DIPSETTING( 0x0c, "87" )
- PORT_DIPSETTING( 0x0d, "90" )
- PORT_DIPSETTING( 0x0e, "93" )
- PORT_DIPSETTING( 0x0f, "96" )
- PORT_DIPNAME( 0x30, 0x30, "Odds Rate" )
- PORT_DIPSETTING( 0x20, "2 3 6 8 12 15 30 50" )
+ MAHJONG_PAYOUT_RATE(0, "SW 1:1,2,3,4")
+ PORT_DIPNAME( 0x30, 0x00, "Odds Rate" ) PORT_DIPLOCATION("SW 1:5,6")
PORT_DIPSETTING( 0x30, "1 2 4 8 12 16 24 32" )
PORT_DIPSETTING( 0x00, "1 2 3 5 8 15 30 50" )
+ PORT_DIPSETTING( 0x20, "2 3 6 8 12 15 30 50" )
PORT_DIPSETTING( 0x10, "1 2 3 5 10 25 50 100" )
- PORT_DIPNAME( 0xc0, 0xc0, "Max Rate" )
+ PORT_DIPNAME( 0xc0, 0x40, "Maximum Bet" ) PORT_DIPLOCATION("SW 1:7,8")
PORT_DIPSETTING( 0xc0, "1" )
PORT_DIPSETTING( 0x80, "5" )
PORT_DIPSETTING( 0x40, "10" )
PORT_DIPSETTING( 0x00, "20" )
PORT_START("DSW2")
- PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_A ) )
- PORT_DIPSETTING( 0x03, DEF_STR( 1C_1C ) )
- PORT_DIPSETTING( 0x02, DEF_STR( 1C_2C ) )
- PORT_DIPSETTING( 0x01, DEF_STR( 1C_5C ) )
- PORT_DIPSETTING( 0x00, "1 Coin/10 Credits" )
- PORT_DIPNAME( 0x0c, 0x0c, "Min Rate To Play" )
+ MAHJONG_COINAGE(0, "SW 2:1,2")
+ PORT_DIPNAME( 0x0c, 0x0c, "Minimum Bet" ) PORT_DIPLOCATION("SW 2:3,4")
PORT_DIPSETTING( 0x0c, "1" )
PORT_DIPSETTING( 0x08, "2" )
PORT_DIPSETTING( 0x04, "3" )
PORT_DIPSETTING( 0x00, "5" )
- PORT_DIPNAME( 0x70, 0x70, "YAKUMAN Bonus" )
- PORT_DIPSETTING( 0x70, "Cut" )
- PORT_DIPSETTING( 0x60, "1 T" )
- PORT_DIPSETTING( 0x50, "300" )
- PORT_DIPSETTING( 0x40, "500" )
- PORT_DIPSETTING( 0x30, "700" )
- PORT_DIPSETTING( 0x20, "1000" )
- PORT_DIPSETTING( 0x10, "1000?" )
- PORT_DIPSETTING( 0x00, "1000?" )
- PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x70, 0x40, "Bonus Chance Cycle" ) PORT_DIPLOCATION("SW 2:5,6,7")
+ PORT_DIPSETTING( 0x70, "None" )
+ PORT_DIPSETTING( 0x60, "First time only" )
+ PORT_DIPSETTING( 0x50, "Every 300 coins" )
+ PORT_DIPSETTING( 0x40, "Every 500 coins" )
+ PORT_DIPSETTING( 0x30, "Every 700 coins" )
+ PORT_DIPSETTING( 0x20, "Every 1000 coins" )
+ //PORT_DIPSETTING( 0x10, "Every 1000 coins" )
+ //PORT_DIPSETTING( 0x00, "Every 1000 coins" )
+ PORT_DIPNAME( 0x80, 0x00, "Chances Per Cycle" ) PORT_DIPLOCATION("SW 2:8")
+ PORT_DIPSETTING( 0x00, "1" )
+ PORT_DIPSETTING( 0x80, "2" )
PORT_START("DSW3")
- PORT_DIPNAME( 0x03, 0x03, "YAKUMAN Times" )
-// PORT_DIPSETTING( 0x00, "1" )
- PORT_DIPSETTING( 0x03, "1" )
- PORT_DIPSETTING( 0x02, "2" )
- PORT_DIPSETTING( 0x01, "3?" )
- PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x18, 0x18, "Payout" )
- PORT_DIPSETTING( 0x18, "300" )
- PORT_DIPSETTING( 0x10, "500" )
- PORT_DIPSETTING( 0x08, "700" )
- PORT_DIPSETTING( 0x00, "1000" )
- PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x03, 0x03, "Game Mode" ) PORT_DIPLOCATION("SW 3:1,2")
+ PORT_DIPSETTING( 0x03, "Key-out" )
+ PORT_DIPSETTING( 0x02, "Hopper payout" )
+ PORT_DIPSETTING( 0x01, "Points with credit timer" )
+ PORT_DIPNAME( 0x04, 0x04, "Hopper Polarity" ) PORT_DIPLOCATION("SW 3:3")
+ PORT_DIPSETTING( 0x04, DEF_STR(Normal) )
+ PORT_DIPSETTING( 0x00, "Inverted" )
+ PORT_DIPUNKNOWN_DIPLOC( 0x08, 0x08, "SW 3:4" )
+ PORT_DIPUNKNOWN_DIPLOC( 0x10, 0x10, "SW 3:5" )
+ PORT_DIPUNKNOWN_DIPLOC( 0x20, 0x20, "SW 3:6" )
+ PORT_DIPNAME( 0x40, 0x00, "Double Bet" ) PORT_DIPLOCATION("SW 3:7")
+ PORT_DIPSETTING( 0x40, DEF_STR(Off) )
+ PORT_DIPSETTING( 0x00, DEF_STR(On) )
+ PORT_DIPNAME( 0x80, 0x00, "Last Chance" ) PORT_DIPLOCATION("SW 3:8")
+ PORT_DIPSETTING( 0x80, DEF_STR(Off) )
+ PORT_DIPSETTING( 0x00, DEF_STR(On) )
PORT_START("DSW4")
- PORT_DIPNAME( 0x01, 0x00, DEF_STR( Demo_Sounds ) )
- PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x02, 0x00, "In Game Music" )
- PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x40, 0x40, DEF_STR( Controls ) )
+ PORT_DIPNAME( 0x01, 0x00, DEF_STR(Demo_Sounds) ) PORT_DIPLOCATION("SW 4:1")
+ PORT_DIPSETTING( 0x01, DEF_STR(Off) )
+ PORT_DIPSETTING( 0x00, DEF_STR(On) )
+ PORT_DIPNAME( 0x02, 0x00, "In-Game Music" ) PORT_DIPLOCATION("SW 4:2")
+ PORT_DIPSETTING( 0x02, DEF_STR(Off) )
+ PORT_DIPSETTING( 0x00, DEF_STR(On) )
+ PORT_DIPNAME( 0x04, 0x00, "Show Gals" ) PORT_DIPLOCATION("SW 4:3")
+ PORT_DIPSETTING( 0x04, DEF_STR(Off) )
+ PORT_DIPSETTING( 0x00, DEF_STR(On) )
+ PORT_DIPUNKNOWN_DIPLOC( 0x08, 0x08, "SW 4:4" )
+ PORT_DIPUNKNOWN_DIPLOC( 0x10, 0x10, "SW 4:5" )
+ PORT_DIPUNKNOWN_DIPLOC( 0x20, 0x20, "SW 4:6" )
+ PORT_DIPNAME( 0x40, 0x40, DEF_STR( Controls ) ) PORT_DIPLOCATION("SW 4:7")
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x80, 0x80, DEF_STR( Region ) )
- PORT_DIPSETTING( 0x80, DEF_STR( Japan ) )
- PORT_DIPSETTING( 0x00, DEF_STR( Hong_Kong ) )
+ PORT_DIPNAME( 0x80, 0x80, DEF_STR(Region) ) PORT_DIPLOCATION("SW 4:8")
+ PORT_DIPSETTING( 0x80, DEF_STR(Japan) )
+ PORT_DIPSETTING( 0x00, DEF_STR(Hong_Kong) )
PORT_START("DSW5")
- PORT_DIPNAME( 0x03, 0x03, "Computer Strength?" )
+ PORT_DIPNAME( 0x03, 0x03, "Computer Strength?" ) PORT_DIPLOCATION("SW 4:9,10")
PORT_DIPSETTING( 0x03, "Weak" )
- PORT_DIPSETTING( 0x02, DEF_STR( Normal ))
+ PORT_DIPSETTING( 0x02, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x01, "Strong" )
PORT_DIPSETTING( 0x00, "Very Strong" )
- PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x08, 0x08, "DonDen Key" )
+ PORT_DIPNAME( 0x04, 0x00, "Auto Reach" ) PORT_DIPLOCATION("SW 3:9")
+ PORT_DIPSETTING( 0x04, DEF_STR(Off) )
+ PORT_DIPSETTING( 0x00, DEF_STR(On) )
+ PORT_DIPNAME( 0x08, 0x00, "Don Den Button" ) PORT_DIPLOCATION("SW 3:10")
PORT_DIPSETTING( 0x08, "Start" )
PORT_DIPSETTING( 0x00, "Flip Flop" )
- PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x40, 0x40, "Credits Per Note" )
- PORT_DIPSETTING( 0x40, "5" )
- PORT_DIPSETTING( 0x00, "10" )
- PORT_DIPNAME( 0x80, 0x00, DEF_STR( Flip_Screen ) )
- PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x80, DEF_STR( On ) )
+ PORT_DIPUNKNOWN_DIPLOC( 0x10, 0x10, "SW 2:9" )
+ PORT_DIPUNKNOWN_DIPLOC( 0x20, 0x20, "SW 2:10" )
+ MAHJONG_NOTE_CREDITS(6, "SW 1:9", "DSW2", 0)
+ PORT_DIPNAME( 0x80, 0x00, DEF_STR(Flip_Screen) ) PORT_DIPLOCATION("SW 1:10")
+ PORT_DIPSETTING( 0x00, DEF_STR(Off) )
+ PORT_DIPSETTING( 0x80, DEF_STR(On) )
INPUT_PORTS_END
static INPUT_PORTS_START( hginga )
@@ -7442,7 +7404,7 @@ static INPUT_PORTS_START( hgokou )
PORT_DIPSETTING( 0x40, "75%" )
PORT_DIPSETTING( 0x20, "70%" )
PORT_DIPSETTING( 0x00, "65%" ) // Hard
- PORT_DIPNAME( 0x80, 0x80, "Key-in Rate" ) PORT_DIPLOCATION("SW1:8")
+ PORT_DIPNAME( 0x80, 0x80, "Key-In Rate" ) PORT_DIPLOCATION("SW1:8")
PORT_DIPSETTING( 0x00, "5" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x03)
PORT_DIPSETTING( 0x00, "10" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x02)
PORT_DIPSETTING( 0x00, "25" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x01)
@@ -7548,6 +7510,13 @@ static INPUT_PORTS_START( hgokou )
INPUT_PORTS_END
static INPUT_PORTS_START( mjmyornt )
+ // The manual provides three sets of standard settings:
+ // 標準設定 シングル向け 標準設定 メダル コーナー向け 標準設定 アミューズ コーナー向け
+ // SW 1 OFF OFF OFF ON ON ON OFF ON ON OFF OFF OFF OFF ON ON ON OFF ON ON OFF ON OFF OFF ON OFF OFF ON OFF ON OFF
+ // SW 2 OFF OFF OFF OFF ON ON OFF ON ON ON OFF OFF OFF OFF OFF OFF ON ON ON ON OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF
+ // SW 3 OFF OFF OFF ON ON ON ON ON ON ON OFF OFF OFF ON ON ON ON ON ON OFF OFF ON OFF ON ON ON ON ON ON OFF
+ // SW 4 OFF ON ON ON ON ON OFF OFF OFF OFF ON ON ON ON ON ON OFF OFF OFF OFF ON ON ON ON ON ON OFF OFF OFF OFF
+
PORT_START("SYSTEM")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_CODE(KEYCODE_4) // pay
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) // 18B
@@ -7558,142 +7527,116 @@ static INPUT_PORTS_START( mjmyornt )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE1 )
- PORT_INCLUDE( mahjong_matrix_2p_bet )
+ PORT_INCLUDE( mahjong_matrix_2p_bet_wup )
PORT_START("DSW1")
- PORT_DIPNAME( 0x0f, 0x07, "Pay Out Rate (%)" ) PORT_DIPLOCATION("SW1:1,2,3,4")
- PORT_DIPSETTING( 0x00, "50" )
- PORT_DIPSETTING( 0x01, "53" )
- PORT_DIPSETTING( 0x02, "56" )
- PORT_DIPSETTING( 0x03, "59" )
- PORT_DIPSETTING( 0x04, "62" )
- PORT_DIPSETTING( 0x05, "65" )
- PORT_DIPSETTING( 0x06, "68" )
- PORT_DIPSETTING( 0x07, "71" )
- PORT_DIPSETTING( 0x08, "75" )
- PORT_DIPSETTING( 0x09, "78" )
- PORT_DIPSETTING( 0x0a, "81" )
- PORT_DIPSETTING( 0x0b, "84" )
- PORT_DIPSETTING( 0x0c, "87" )
- PORT_DIPSETTING( 0x0d, "90" )
- PORT_DIPSETTING( 0x0e, "93" )
- PORT_DIPSETTING( 0x0f, "96" )
- PORT_DIPNAME( 0x30, 0x30, "Odds Rate" ) PORT_DIPLOCATION("SW1:5,6")
- PORT_DIPSETTING( 0x20, "2 3 6 8 12 15 30 50" )
+ MAHJONG_PAYOUT_RATE(0, "SW 1:1,2,3,4") // PAY-OUT 管理
+ PORT_DIPNAME( 0x30, 0x00, "Odds Rate" ) PORT_DIPLOCATION("SW 1:5,6") // ODDS 設定
PORT_DIPSETTING( 0x30, "1 2 4 8 12 16 24 32" )
PORT_DIPSETTING( 0x00, "1 2 3 5 8 15 30 50" )
+ PORT_DIPSETTING( 0x20, "2 3 6 8 12 15 30 50" )
PORT_DIPSETTING( 0x10, "1 2 3 5 10 25 50 100" )
- PORT_DIPNAME( 0xc0, 0xc0, "Max Bet" ) PORT_DIPLOCATION("SW1:7,8")
+ PORT_DIPNAME( 0xc0, 0x40, "Maximum Bet" ) PORT_DIPLOCATION("SW 1:7,8") // BET-MAX
PORT_DIPSETTING( 0xc0, "1" )
PORT_DIPSETTING( 0x80, "5" )
PORT_DIPSETTING( 0x40, "10" )
PORT_DIPSETTING( 0x00, "20" )
PORT_START("DSW2")
- PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW2:1,2")
- PORT_DIPSETTING( 0x03, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW5",0x01,EQUALS,0x01)
- PORT_DIPSETTING( 0x02, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW5",0x01,EQUALS,0x01)
- PORT_DIPSETTING( 0x01, DEF_STR( 1C_5C ) ) PORT_CONDITION("DSW5",0x01,EQUALS,0x01)
- PORT_DIPSETTING( 0x00, "1 Coin/10 Credits" ) PORT_CONDITION("DSW5",0x01,EQUALS,0x01)
-
- PORT_DIPSETTING( 0x01, DEF_STR( 2C_2C ) ) PORT_CONDITION("DSW5",0x01,EQUALS,0x00)
- PORT_DIPSETTING( 0x03, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW5",0x01,EQUALS,0x00)
- PORT_DIPSETTING( 0x00, DEF_STR( 2C_3C ) ) PORT_CONDITION("DSW5",0x01,EQUALS,0x00)
- PORT_DIPSETTING( 0x02, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW5",0x01,EQUALS,0x00)
-
- PORT_DIPNAME( 0x0c, 0x0c, "Min Rate To Play" ) PORT_DIPLOCATION("SW2:3,4")
- PORT_DIPSETTING( 0x0c, "1" )
- PORT_DIPSETTING( 0x08, "2" )
- PORT_DIPSETTING( 0x04, "3" )
- PORT_DIPSETTING( 0x00, "5" )
- PORT_DIPNAME( 0x70, 0x70, "YAKUMAN Bonus" ) PORT_DIPLOCATION("SW2:5,6,7")
- PORT_DIPSETTING( 0x70, "Cut" )
- PORT_DIPSETTING( 0x60, "1 T" )
- PORT_DIPSETTING( 0x50, "300" )
- PORT_DIPSETTING( 0x40, "500" )
- PORT_DIPSETTING( 0x30, "700" )
- PORT_DIPSETTING( 0x20, "1000" )
- PORT_DIPSETTING( 0x10, "1000?" )
- PORT_DIPSETTING( 0x00, "1000?" )
- PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:8")
- PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x03, 0x03, DEF_STR(Coinage) ) PORT_DIPLOCATION("SW 2:1,2") // COIN RATE
+ PORT_DIPSETTING( 0x03, DEF_STR(1C_1C) ) PORT_CONDITION("DSW5", 0x01, EQUALS, 0x01) // 1コイン 1プレイ
+ PORT_DIPSETTING( 0x02, DEF_STR(1C_2C) ) PORT_CONDITION("DSW5", 0x01, EQUALS, 0x01) // 1コイン 2プレイ
+ PORT_DIPSETTING( 0x01, DEF_STR(1C_5C) ) PORT_CONDITION("DSW5", 0x01, EQUALS, 0x01) // 1コイン 5プレイ
+ PORT_DIPSETTING( 0x00, "1 Coin/10 Credits" ) PORT_CONDITION("DSW5", 0x01, EQUALS, 0x01) // 1コイン 10プレイ
+ PORT_DIPSETTING( 0x01, DEF_STR( 2C_2C ) ) PORT_CONDITION("DSW5", 0x01, EQUALS, 0x00)
+ PORT_DIPSETTING( 0x03, DEF_STR( 1C_1C ) ) PORT_CONDITION("DSW5", 0x01, EQUALS, 0x00)
+ PORT_DIPSETTING( 0x00, DEF_STR( 2C_3C ) ) PORT_CONDITION("DSW5", 0x01, EQUALS, 0x00)
+ PORT_DIPSETTING( 0x02, DEF_STR( 1C_2C ) ) PORT_CONDITION("DSW5", 0x01, EQUALS, 0x00)
+ PORT_DIPNAME( 0x0c, 0x0c, "Minimum Bet" ) PORT_DIPLOCATION("SW 2:3,4") // 最低 BET RATE
+ PORT_DIPSETTING( 0x0c, "1" ) // レート 1
+ PORT_DIPSETTING( 0x08, "2" ) // レート 2
+ PORT_DIPSETTING( 0x04, "3" ) // レート 3
+ PORT_DIPSETTING( 0x00, "5" ) // レート 5
+ PORT_DIPNAME( 0x70, 0x40, "Bonus Chance Cycle" ) PORT_DIPLOCATION("SW 2:5,6,7") // ボーナスチャンスの周期設定
+ PORT_DIPSETTING( 0x70, "None" ) // 無し
+ PORT_DIPSETTING( 0x60, "First time only" ) // 初回のみ
+ PORT_DIPSETTING( 0x50, "Every 300 coins" ) // 300コイン毎
+ PORT_DIPSETTING( 0x40, "Every 500 coins" ) // 500コイン毎
+ PORT_DIPSETTING( 0x30, "Every 700 coins" ) // 700コイン毎
+ PORT_DIPSETTING( 0x20, "Every 1000 coins" ) // 1000コイン毎
+ //PORT_DIPSETTING( 0x10, "Every 1000 coins" )
+ //PORT_DIPSETTING( 0x00, "Every 1000 coins" )
+ PORT_DIPNAME( 0x80, 0x00, "Chances Per Cycle" ) PORT_DIPLOCATION("SW 2:8") // 周期設定時のチャンス回数
+ PORT_DIPSETTING( 0x00, "1" ) // 1回
+ PORT_DIPSETTING( 0x80, "2" ) // 2回
PORT_START("DSW3")
- PORT_DIPNAME( 0x03, 0x03, "Bonus Game" ) PORT_DIPLOCATION("SW3:1,2")
- PORT_DIPSETTING( 0x00, "Slot? (duplicate)" )
- PORT_DIPSETTING( 0x03, "Slot?" )
- PORT_DIPSETTING( 0x02, "Slot + Girls?" )
- PORT_DIPSETTING( 0x01, "Girl Choice" ) // 4 choices in gal mode check (instead of 3)
- PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW3:3")
- PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x18, 0x18, "Payout" ) PORT_DIPLOCATION("SW3:4,5")
+ PORT_DIPNAME( 0x03, 0x03, "Game Mode" ) PORT_DIPLOCATION("SW 3:1,2")
+ PORT_DIPSETTING( 0x03, "Key-out" ) // クレジット・タイプ
+ PORT_DIPSETTING( 0x02, "Hopper payout" ) // ホッパー・タイプ
+ PORT_DIPSETTING( 0x01, "Key-out with credit timer" ) // クレジットタイマー・タイプ
+ PORT_DIPNAME( 0x04, 0x04, "Hopper Polarity" ) PORT_DIPLOCATION("SW 3:3") // ホッパー・アクティブ
+ PORT_DIPSETTING( 0x04, DEF_STR(Normal) ) // 通常
+ PORT_DIPSETTING( 0x00, "Inverted" ) // 反転
+ PORT_DIPNAME( 0x18, 0x00, "Credit Limit" ) PORT_DIPLOCATION("SW 3:4,5") // クレジット・コイン リミット
PORT_DIPSETTING( 0x18, "300" )
PORT_DIPSETTING( 0x10, "500" )
PORT_DIPSETTING( 0x08, "700" )
PORT_DIPSETTING( 0x00, "1000" )
- PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW3:6")
- PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW3:7")
- PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW3:8")
- PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x20, 0x00, "Computer Strength" ) PORT_DIPLOCATION("SW 3:6") // コンピューターの強さ
+ PORT_DIPSETTING( 0x00, DEF_STR(Normal) ) // 普通
+ PORT_DIPSETTING( 0x20, "Strong" ) // 強
+ PORT_DIPNAME( 0x40, 0x00, "Double Bet" ) PORT_DIPLOCATION("SW 3:7") // W-BET機能 有無
+ PORT_DIPSETTING( 0x40, DEF_STR(Off) ) // 無
+ PORT_DIPSETTING( 0x00, DEF_STR(On) ) // 有
+ PORT_DIPNAME( 0x80, 0x00, "Last Chance" ) PORT_DIPLOCATION("SW 3:8") // ラスト・チャンス 有無
+ PORT_DIPSETTING( 0x80, DEF_STR(Off) ) // 無
+ PORT_DIPSETTING( 0x00, DEF_STR(On) ) // 有
PORT_START("DSW4")
- PORT_DIPNAME( 0x01, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW4:1")
- PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x02, 0x00, "In Game Music" ) PORT_DIPLOCATION("SW4:2")
- PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW4:3")
- PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW4:4")
- PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW4:5")
- PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW4:6")
- PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x40, 0x40, "Set Clock" ) PORT_DIPLOCATION("SW4:7")
- PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW4:8")
- PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x01, 0x00, DEF_STR(Demo_Sounds) ) PORT_DIPLOCATION("SW 4:1") // デモ・サウンド 有無
+ PORT_DIPSETTING( 0x01, DEF_STR(Off) ) // 無
+ PORT_DIPSETTING( 0x00, DEF_STR(On) ) // 有
+ PORT_DIPNAME( 0x02, 0x00, "In-Game Music" ) PORT_DIPLOCATION("SW 4:2") // ゲーム・サウンド 有無
+ PORT_DIPSETTING( 0x02, DEF_STR(Off) ) // 無
+ PORT_DIPSETTING( 0x00, DEF_STR(On) ) // 有
+ PORT_DIPNAME( 0x04, 0x00, "Show Gals" ) PORT_DIPLOCATION("SW 4:3") // ギャル表示 有無
+ PORT_DIPSETTING( 0x04, DEF_STR(Off) ) // 無
+ PORT_DIPSETTING( 0x00, DEF_STR(On) ) // 有
+ PORT_DIPNAME( 0x08, 0x00, "Gal Select" ) PORT_DIPLOCATION("SW 4:4") // ギャル選択機能 有無
+ PORT_DIPSETTING( 0x08, DEF_STR(Off) ) // 無
+ PORT_DIPSETTING( 0x00, DEF_STR(On) ) // 有
+ PORT_DIPNAME( 0x10, 0x00, "Show Game Action" ) PORT_DIPLOCATION("SW 4:5") // ゲームアクション表示 有無
+ PORT_DIPSETTING( 0x10, DEF_STR(Off) ) // 無
+ PORT_DIPSETTING( 0x00, DEF_STR(On) ) // 有
+ PORT_DIPNAME( 0x20, 0x00, "In-Game Mat" ) PORT_DIPLOCATION("SW 4:6") // ゲーム中のマット変更
+ PORT_DIPSETTING( 0x00, "Plain" ) // 無地
+ PORT_DIPSETTING( 0x20, "With Character" ) // キャラクター有
+ PORT_DIPNAME( 0x40, 0x40, "Time Settings Mode" ) PORT_DIPLOCATION("SW 4:7") // 時間設定モード
+ PORT_DIPSETTING( 0x40, DEF_STR(Off) ) // 設定時
+ PORT_DIPSETTING( 0x00, DEF_STR(On) ) // 通常
+ PORT_DIPUNKNOWN_DIPLOC( 0x80, 0x80, "SW 4:8" ) // OFF固定
PORT_START("DSW5")
- PORT_DIPNAME( 0x01, 0x01, "Alternate Coinage" ) PORT_DIPLOCATION("SW4:9")
- PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW4:10")
- PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW3:9")
- PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x08, 0x08, "DonDen Key" ) PORT_DIPLOCATION("SW3:10")
- PORT_DIPSETTING( 0x08, "Start" )
- PORT_DIPSETTING( 0x00, "Flip Flop" )
- PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:9")
- PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:10")
- PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x40, 0x40, "Credits Per Note" ) PORT_DIPLOCATION("SW1:9")
- PORT_DIPSETTING( 0x40, "5" )
- PORT_DIPSETTING( 0x00, "10" )
- PORT_DIPNAME( 0x80, 0x00, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW1:10")
- PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x80, DEF_STR( On ) )
+ PORT_DIPNAME( 0x01, 0x01, "Alternate Coinage" ) PORT_DIPLOCATION("SW 4:9") // OFF固定
+ PORT_DIPSETTING( 0x01, DEF_STR(Off) )
+ PORT_DIPSETTING( 0x00, DEF_STR(On) )
+ PORT_DIPUNKNOWN_DIPLOC( 0x02, 0x02, "SW 4:10" ) // OFF固定
+ PORT_DIPNAME( 0x04, 0x00, "Auto Reach" ) PORT_DIPLOCATION("SW 3:9") // オート・リーチ機能の有無
+ PORT_DIPSETTING( 0x04, DEF_STR(Off) ) // 無
+ PORT_DIPSETTING( 0x00, DEF_STR(On) ) // 有
+ PORT_DIPNAME( 0x08, 0x00, "Don Den Button" ) PORT_DIPLOCATION("SW 3:10") // Don・Den 機能ボタン変更
+ PORT_DIPSETTING( 0x08, "Start" ) // スタート・ボタ
+ PORT_DIPSETTING( 0x00, "Flip Flop" ) // F/F・ボタン
+ PORT_DIPNAME( 0x30, 0x00, "Yakuman/Fever Chance Ratio" ) PORT_DIPLOCATION("SW 2:9,10") // ボーナスチャンス周期設定時の役満チャンス&フィバーチャンスの比率
+ PORT_DIPSETTING( 0x30, "Yakuman Chance Only" ) // 役満チャンスのみ
+ PORT_DIPSETTING( 0x20, "Equal Yakuman/Fever Chance" ) // 役満チャンスとフィバーチャンスが同等
+ PORT_DIPSETTING( 0x10, "Frequent Fever Chance" ) // フィバーチャンスが多い
+ PORT_DIPSETTING( 0x00, "Fever Chance Only" ) // フィバーチャンスのみ
+ MAHJONG_NOTE_CREDITS(6, "SW 1:9", "DSW2", 0) // NOTE RATE (TODO: this is affected by the alternate coinage setting)
+ PORT_DIPNAME( 0x80, 0x80, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW 1:10") // ー画面反転
+ PORT_DIPSETTING( 0x80, DEF_STR(Off) ) // 通常
+ PORT_DIPSETTING( 0x00, DEF_STR(On) ) // 反転
INPUT_PORTS_END
static INPUT_PORTS_START( mjmyorn2 )
@@ -7737,7 +7680,7 @@ static INPUT_PORTS_START( akamaru )
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 )
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME(DEF_STR( Test )) PORT_CODE(KEYCODE_F1) // Test
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME(DEF_STR( Test )) // Test
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_CUSTOM )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) // blitter irq flag
@@ -7796,12 +7739,12 @@ static INPUT_PORTS_START( mjflove )
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 )
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME(DEF_STR( Test )) PORT_CODE(KEYCODE_F1) PORT_TOGGLE
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME(DEF_STR( Test )) PORT_TOGGLE
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x60, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(FUNC(ddenlovr_state::mjflove_blitter_r)) // RTC (bit 5) & blitter irq flag (bit 6)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) // blitter busy flag
- PORT_INCLUDE( mahjong_matrix_2p_bet )
+ PORT_INCLUDE( mahjong_matrix_2p_bet_wup )
PORT_START("DSW2") // IN12 - DSW2
PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW1:1,2")
@@ -8042,7 +7985,7 @@ static INPUT_PORTS_START( sryudens )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN3 ) // note2
- PORT_INCLUDE( mahjong_matrix_2p_bet )
+ PORT_INCLUDE( mahjong_matrix_2p_bet_wup )
PORT_START("DSW1")
PORT_DIPNAME( 0x0f, 0x07, "Pay Out Rate (%)" )
@@ -8197,7 +8140,7 @@ static INPUT_PORTS_START( seljan2 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(5)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN3 ) // note2
- PORT_INCLUDE( mahjong_matrix_2p_bet )
+ PORT_INCLUDE( mahjong_matrix_2p_bet_wup )
PORT_START("DSW1")
PORT_DIPNAME( 0x0f, 0x07, "Pay Out Rate (%)" )
@@ -8352,7 +8295,7 @@ static INPUT_PORTS_START( janshinp )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN3 ) // service coin (test mode)
- PORT_INCLUDE( mahjong_matrix_2p_bet )
+ PORT_INCLUDE( mahjong_matrix_2p_bet_wup )
PORT_START("DSW1")
PORT_DIPNAME( 0x0f, 0x07, "Pay Out Rate (%)" )
@@ -8506,7 +8449,7 @@ static INPUT_PORTS_START( dtoyoken )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN3 ) // service coin (test mode)
- PORT_INCLUDE( mahjong_matrix_2p_bet )
+ PORT_INCLUDE( mahjong_matrix_2p_bet_wup )
PORT_START("DSW1")
PORT_DIPNAME( 0x0f, 0x07, "Pay Out Rate (%)" )
@@ -8660,7 +8603,7 @@ static INPUT_PORTS_START( daimyojn )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(5)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN3 ) // note2
- PORT_INCLUDE( mahjong_matrix_2p_bet )
+ PORT_INCLUDE( mahjong_matrix_2p_bet_wup )
PORT_START("DSW1")
PORT_DIPNAME( 0x0f, 0x07, "Pay Out Rate (%)" )
diff --git a/src/mame/dynax/dynax.cpp b/src/mame/dynax/dynax.cpp
index 0866e8909fb..8cf25c31eb5 100644
--- a/src/mame/dynax/dynax.cpp
+++ b/src/mame/dynax/dynax.cpp
@@ -1577,25 +1577,6 @@ INPUT_PORTS_END
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) /* Coin */ \
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE1 ) /* Service */
-#define MAHJONG_PAYOUT_RATE(shift, loc) \
- PORT_DIPNAME( 0x0f << shift, 0x07 << shift, "Payout Rate" ) PORT_DIPLOCATION(loc) \
- PORT_DIPSETTING( 0x00 << shift, "50%" ) \
- PORT_DIPSETTING( 0x01 << shift, "53%" ) \
- PORT_DIPSETTING( 0x02 << shift, "56%" ) \
- PORT_DIPSETTING( 0x03 << shift, "59%" ) \
- PORT_DIPSETTING( 0x04 << shift, "62%" ) \
- PORT_DIPSETTING( 0x05 << shift, "65%" ) \
- PORT_DIPSETTING( 0x06 << shift, "68%" ) \
- PORT_DIPSETTING( 0x07 << shift, "71%" ) \
- PORT_DIPSETTING( 0x08 << shift, "75%" ) \
- PORT_DIPSETTING( 0x09 << shift, "78%" ) \
- PORT_DIPSETTING( 0x0a << shift, "81%" ) \
- PORT_DIPSETTING( 0x0b << shift, "84%" ) \
- PORT_DIPSETTING( 0x0c << shift, "87%" ) \
- PORT_DIPSETTING( 0x0d << shift, "90%" ) \
- PORT_DIPSETTING( 0x0e << shift, "93%" ) \
- PORT_DIPSETTING( 0x0f << shift, "96%" )
-
#define MAHJONG_ODDS_RATE(shift, loc) \
PORT_DIPNAME( 0x03 << shift, 0x00 << shift, "Odds Rate" ) PORT_DIPLOCATION(loc) \
PORT_DIPSETTING( 0x03 << shift, "1 2 4 8 12 16 24 32" ) \
@@ -1603,35 +1584,6 @@ INPUT_PORTS_END
PORT_DIPSETTING( 0x01 << shift, "1 2 3 5 10 25 50 100" ) \
PORT_DIPSETTING( 0x02 << shift, "1 2 3 5 10 50 100 200" )
-#define MAHJONG_COINAGE(shift, loc) \
- PORT_DIPNAME( 0x03 << shift, 0x03 << shift, DEF_STR(Coinage) ) PORT_DIPLOCATION(loc) /* COIN RATE */ \
- PORT_DIPSETTING( 0x03 << shift, DEF_STR(1C_1C) ) /* 1コイン 1プレイ */ \
- PORT_DIPSETTING( 0x02 << shift, DEF_STR(1C_2C) ) /* 1コイン 2プレイ */ \
- PORT_DIPSETTING( 0x01 << shift, DEF_STR(1C_5C) ) /* 1コイン 5プレイ */ \
- PORT_DIPSETTING( 0x00 << shift, "1 Coin/10 Credits" ) /* 1コイン 10プレイ */
-
-#define MAHJONG_NOTE_CREDITS(shift, loc, ct, cs) \
- PORT_DIPNAME( 0x01 << shift, 0x00 << shift, "Credits Per Note" ) PORT_DIPLOCATION(loc) /* NOTE RATE */ \
- PORT_DIPSETTING( 0x01 << shift, "5" ) PORT_CONDITION(ct, 0x03 << cs, EQUALS, 0x03 << cs) /* COIN×5 */ \
- PORT_DIPSETTING( 0x01 << shift, "10" ) PORT_CONDITION(ct, 0x03 << cs, EQUALS, 0x02 << cs) \
- PORT_DIPSETTING( 0x01 << shift, "25" ) PORT_CONDITION(ct, 0x03 << cs, EQUALS, 0x01 << cs) \
- PORT_DIPSETTING( 0x01 << shift, "50" ) PORT_CONDITION(ct, 0x03 << cs, EQUALS, 0x00 << cs) \
- PORT_DIPSETTING( 0x00 << shift, "10" ) PORT_CONDITION(ct, 0x03 << cs, EQUALS, 0x03 << cs) /* COIN×10 */ \
- PORT_DIPSETTING( 0x00 << shift, "20" ) PORT_CONDITION(ct, 0x03 << cs, EQUALS, 0x02 << cs) \
- PORT_DIPSETTING( 0x00 << shift, "50" ) PORT_CONDITION(ct, 0x03 << cs, EQUALS, 0x01 << cs) \
- PORT_DIPSETTING( 0x00 << shift, "100" ) PORT_CONDITION(ct, 0x03 << cs, EQUALS, 0x00 << cs)
-
-#define MAHJONG_YAKUMAN_BONUS(shift, loc) \
- PORT_DIPNAME( 0x07 << shift, 0x04 << shift, "Yakuman Bonus Cycle" ) PORT_DIPLOCATION(loc) /* 役満ボーナスの設定周期 */ \
- PORT_DIPSETTING( 0x07 << shift, "None" ) /* 無し */ \
- PORT_DIPSETTING( 0x06 << shift, "First time only" ) /* 初回のみ */ \
- PORT_DIPSETTING( 0x05 << shift, "Every 300 coins" ) /* 300コイン毎 */ \
- PORT_DIPSETTING( 0x04 << shift, "Every 500 coins" ) /* 500コイン毎 */ \
- PORT_DIPSETTING( 0x03 << shift, "Every 700 coins" ) /* 700コイン毎 */ \
- PORT_DIPSETTING( 0x02 << shift, "Every 1000 coins" ) /* 1000コイン毎 */ \
- /* PORT_DIPSETTING( 0x01 << shift, "Every 1000 coins" )*/ \
- /* PORT_DIPSETTING( 0x00 << shift, "Every 1000 coins" )*/
-
static INPUT_PORTS_START( cdracula )
PORT_START("P1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1)
@@ -3004,7 +2956,7 @@ static INPUT_PORTS_START( mjembase )
PORT_DIPNAME( 0x04, 0x00, "Auto Tsumo" ) PORT_DIPLOCATION("SW 4:3")
PORT_DIPSETTING( 0x04, DEF_STR(Off) )
PORT_DIPSETTING( 0x00, DEF_STR(On) )
- PORT_DIPNAME( 0x08, 0x00, "Double Up" ) PORT_DIPLOCATION("SW 4:4")
+ PORT_DIPNAME( 0x08, 0x00, "Double Bet" ) PORT_DIPLOCATION("SW 4:4")
PORT_DIPSETTING( 0x08, DEF_STR(Off) )
PORT_DIPSETTING( 0x00, DEF_STR(On) ) // press Bet during game to double the bet
PORT_DIPNAME( 0x10, 0x00, DEF_STR(Demo_Sounds) ) PORT_DIPLOCATION("SW 4:5")
@@ -3027,7 +2979,7 @@ static INPUT_PORTS_START( mjembase )
MAHJONG_COIN_TEST("DSW1", 0x40)
- PORT_INCLUDE( mahjong_matrix_2p_bet )
+ PORT_INCLUDE( mahjong_matrix_2p_bet_wup )
INPUT_PORTS_END
@@ -3035,7 +2987,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( mjelct3 )
MAHJONG_COIN_TEST("DSW1", 0x40)
- PORT_INCLUDE( mahjong_matrix_2p_bet )
+ PORT_INCLUDE( mahjong_matrix_2p_bet_wup )
PORT_START("SW1") // port 85
PORT_DIPUNKNOWN_DIPLOC(0x01, 0x01, "SW1:1")
@@ -3134,7 +3086,7 @@ static INPUT_PORTS_START( mjelctrn )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) // Coin
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE1 ) // Service
- PORT_INCLUDE( mahjong_matrix_2p_bet )
+ PORT_INCLUDE( mahjong_matrix_2p_bet_wup )
PORT_START("SW1") // port 85
PORT_DIPUNKNOWN_DIPLOC(0x01, 0x01, "SW1:1")
@@ -3262,10 +3214,10 @@ static INPUT_PORTS_START( majxtal7 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) // Coin
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE1 ) // Service
- PORT_INCLUDE( mahjong_matrix_2p_bet )
+ PORT_INCLUDE( mahjong_matrix_2p_bet_wup )
PORT_START("DSW0") /* select = 00 */
- MAHJONG_ODDS_RATE(0, "DIP2:1,2") // sometimes offers double rate for 1, 2 or 3 han
+ MAHJONG_ODDS_RATE(0, "DIP2:1,2")
MAHJONG_COINAGE(2, "DIP2:3,4")
PORT_DIPNAME( 0x30, 0x30, "Minimum Bet" ) PORT_DIPLOCATION("DIP2:5,6")
PORT_DIPSETTING( 0x30, "1" )
@@ -3472,7 +3424,7 @@ static INPUT_PORTS_START( tenkai )
PORT_DIPNAME( 0x04, 0x00, "Tenkaigen Day" ) PORT_DIPLOCATION("SW 3:3") // 天開眼の日
PORT_DIPSETTING( 0x04, DEF_STR(Off) ) // 無
PORT_DIPSETTING( 0x00, DEF_STR(On) ) // 有
- PORT_DIPNAME( 0x08, 0x00, "Double Up" ) PORT_DIPLOCATION("SW 3:4") // W-BET
+ PORT_DIPNAME( 0x08, 0x00, "Double Bet" ) PORT_DIPLOCATION("SW 3:4") // W-BET
PORT_DIPSETTING( 0x08, DEF_STR(Off) ) // 無
PORT_DIPSETTING( 0x00, DEF_STR(On) ) // 有
PORT_DIPNAME( 0x10, 0x00, "Renchan Rate" ) PORT_DIPLOCATION("SW 3:5") // 連荘レート
@@ -3489,7 +3441,7 @@ static INPUT_PORTS_START( tenkai )
PORT_DIPSETTING( 0x00, "Flip Flop" ) // F/F・ボタン
PORT_START("DSW3")
- PORT_DIPNAME( 0x01, 0x00, DEF_STR(Demo_Sounds )) PORT_DIPLOCATION("SW 4:1") // デモ・サウンド
+ PORT_DIPNAME( 0x01, 0x00, DEF_STR(Demo_Sounds) ) PORT_DIPLOCATION("SW 4:1") // デモ・サウンド
PORT_DIPSETTING( 0x01, DEF_STR(Off) ) // 無
PORT_DIPSETTING( 0x00, DEF_STR(On) ) // 有
PORT_DIPNAME( 0x02, 0x00, "In-Game Music" ) PORT_DIPLOCATION("SW 4:2") // ゲーム・サウンド
@@ -3515,7 +3467,7 @@ static INPUT_PORTS_START( tenkai )
PORT_DIPSETTING( 0x00, DEF_STR(On) ) // 有
PORT_START("DSW4") /* (top) */
- MAHJONG_NOTE_CREDITS(0, "SW 1:9", "DSW1", 0) // NOTE RATE
+ MAHJONG_NOTE_CREDITS(0, "SW 1:9", "DSW1", 0) // NOTE RATE
PORT_DIPNAME( 0x02, 0x02, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW 1:10") // モニター画面反転
PORT_DIPSETTING( 0x02, DEF_STR(Off) ) // 通常
PORT_DIPSETTING( 0x00, DEF_STR(On) ) // 反転
@@ -3543,7 +3495,7 @@ static INPUT_PORTS_START( tenkai )
MAHJONG_COIN_TEST("DSW2", 0x01)
- PORT_INCLUDE( mahjong_matrix_2p_bet )
+ PORT_INCLUDE( mahjong_matrix_2p_bet_wup )
INPUT_PORTS_END
@@ -3635,7 +3587,7 @@ static INPUT_PORTS_START( mjreach )
PORT_DIPNAME( 0x02, 0x02, "Hopper Polarity" ) PORT_DIPLOCATION("DIP3:2")
PORT_DIPSETTING( 0x02, DEF_STR(Normal) )
PORT_DIPSETTING( 0x00, "Inverted" )
- PORT_DIPNAME( 0x04, 0x00, "Double Up" ) PORT_DIPLOCATION("DIP3:3")
+ PORT_DIPNAME( 0x04, 0x00, "Double Bet" ) PORT_DIPLOCATION("DIP3:3")
PORT_DIPSETTING( 0x04, DEF_STR(Off) )
PORT_DIPSETTING( 0x00, DEF_STR(On) )
PORT_DIPNAME( 0x08, 0x08, DEF_STR(Unknown) ) PORT_DIPLOCATION("DIP3:4")
@@ -3704,7 +3656,7 @@ static INPUT_PORTS_START( mjreach )
MAHJONG_COIN_TEST("DSW2", 0x01)
- PORT_INCLUDE( mahjong_matrix_2p_bet )
+ PORT_INCLUDE( mahjong_matrix_2p_bet_wup )
INPUT_PORTS_END
static INPUT_PORTS_START( gekisha )
@@ -3765,7 +3717,7 @@ static INPUT_PORTS_START( gekisha )
PORT_DIPNAME( 0x04, 0x04, "Auto Tsumo after Reach" ) PORT_DIPLOCATION( "SW4:3" ) // オート ツモ
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x08, 0x08, "Double Up" ) PORT_DIPLOCATION( "SW4:4" ) // W-BET
+ PORT_DIPNAME( 0x08, 0x08, "Double Bet" ) PORT_DIPLOCATION( "SW4:4" ) // W-BET
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x10, 0x10, "Girls (Demo)" ) PORT_DIPLOCATION( "SW4:5" ) // ギャル カット
@@ -3796,7 +3748,7 @@ static INPUT_PORTS_START( gekisha )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) // Coin
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_INCLUDE( mahjong_matrix_2p_bet )
+ PORT_INCLUDE( mahjong_matrix_2p_bet_wup )
INPUT_PORTS_END
diff --git a/src/mame/dynax/dynax.h b/src/mame/dynax/dynax.h
index 061a660a6b3..f4b46e20e37 100644
--- a/src/mame/dynax/dynax.h
+++ b/src/mame/dynax/dynax.h
@@ -462,4 +462,52 @@ class cdracula_state : public dynax_state
INPUT_PORTS_EXTERN(dynax_mahjong_keys);
INPUT_PORTS_EXTERN(dynax_hanafuda_keys_bet);
+#define MAHJONG_PAYOUT_RATE(shift, loc) \
+ PORT_DIPNAME( 0x0f << shift, 0x07 << shift, "Payout Rate" ) PORT_DIPLOCATION(loc) \
+ PORT_DIPSETTING( 0x00 << shift, "50%" ) \
+ PORT_DIPSETTING( 0x01 << shift, "53%" ) \
+ PORT_DIPSETTING( 0x02 << shift, "56%" ) \
+ PORT_DIPSETTING( 0x03 << shift, "59%" ) \
+ PORT_DIPSETTING( 0x04 << shift, "62%" ) \
+ PORT_DIPSETTING( 0x05 << shift, "65%" ) \
+ PORT_DIPSETTING( 0x06 << shift, "68%" ) \
+ PORT_DIPSETTING( 0x07 << shift, "71%" ) \
+ PORT_DIPSETTING( 0x08 << shift, "75%" ) \
+ PORT_DIPSETTING( 0x09 << shift, "78%" ) \
+ PORT_DIPSETTING( 0x0a << shift, "81%" ) \
+ PORT_DIPSETTING( 0x0b << shift, "84%" ) \
+ PORT_DIPSETTING( 0x0c << shift, "87%" ) \
+ PORT_DIPSETTING( 0x0d << shift, "90%" ) \
+ PORT_DIPSETTING( 0x0e << shift, "93%" ) \
+ PORT_DIPSETTING( 0x0f << shift, "96%" )
+
+#define MAHJONG_COINAGE(shift, loc) \
+ PORT_DIPNAME( 0x03 << shift, 0x03 << shift, DEF_STR(Coinage) ) PORT_DIPLOCATION(loc) /* COIN RATE */ \
+ PORT_DIPSETTING( 0x03 << shift, DEF_STR(1C_1C) ) /* 1コイン 1プレイ */ \
+ PORT_DIPSETTING( 0x02 << shift, DEF_STR(1C_2C) ) /* 1コイン 2プレイ */ \
+ PORT_DIPSETTING( 0x01 << shift, DEF_STR(1C_5C) ) /* 1コイン 5プレイ */ \
+ PORT_DIPSETTING( 0x00 << shift, "1 Coin/10 Credits" ) /* 1コイン 10プレイ */
+
+#define MAHJONG_NOTE_CREDITS(shift, loc, ct, cs) \
+ PORT_DIPNAME( 0x01 << shift, 0x00 << shift, "Credits Per Note" ) PORT_DIPLOCATION(loc) /* NOTE RATE */ \
+ PORT_DIPSETTING( 0x01 << shift, "5" ) PORT_CONDITION(ct, 0x03 << cs, EQUALS, 0x03 << cs) /* COIN×5 */ \
+ PORT_DIPSETTING( 0x01 << shift, "10" ) PORT_CONDITION(ct, 0x03 << cs, EQUALS, 0x02 << cs) \
+ PORT_DIPSETTING( 0x01 << shift, "25" ) PORT_CONDITION(ct, 0x03 << cs, EQUALS, 0x01 << cs) \
+ PORT_DIPSETTING( 0x01 << shift, "50" ) PORT_CONDITION(ct, 0x03 << cs, EQUALS, 0x00 << cs) \
+ PORT_DIPSETTING( 0x00 << shift, "10" ) PORT_CONDITION(ct, 0x03 << cs, EQUALS, 0x03 << cs) /* COIN×10 */ \
+ PORT_DIPSETTING( 0x00 << shift, "20" ) PORT_CONDITION(ct, 0x03 << cs, EQUALS, 0x02 << cs) \
+ PORT_DIPSETTING( 0x00 << shift, "50" ) PORT_CONDITION(ct, 0x03 << cs, EQUALS, 0x01 << cs) \
+ PORT_DIPSETTING( 0x00 << shift, "100" ) PORT_CONDITION(ct, 0x03 << cs, EQUALS, 0x00 << cs)
+
+#define MAHJONG_YAKUMAN_BONUS(shift, loc) \
+ PORT_DIPNAME( 0x07 << shift, 0x04 << shift, "Yakuman Bonus Cycle" ) PORT_DIPLOCATION(loc) /* 役満ボーナスの設定周期 */ \
+ PORT_DIPSETTING( 0x07 << shift, "None" ) /* 無し */ \
+ PORT_DIPSETTING( 0x06 << shift, "First time only" ) /* 初回のみ */ \
+ PORT_DIPSETTING( 0x05 << shift, "Every 300 coins" ) /* 300コイン毎 */ \
+ PORT_DIPSETTING( 0x04 << shift, "Every 500 coins" ) /* 500コイン毎 */ \
+ PORT_DIPSETTING( 0x03 << shift, "Every 700 coins" ) /* 700コイン毎 */ \
+ PORT_DIPSETTING( 0x02 << shift, "Every 1000 coins" ) /* 1000コイン毎 */ \
+ /* PORT_DIPSETTING( 0x01 << shift, "Every 1000 coins" )*/ \
+ /* PORT_DIPSETTING( 0x00 << shift, "Every 1000 coins" )*/
+
#endif // MAME_DYNAX_DYNAX_H
diff --git a/src/mame/dynax/hnayayoi.cpp b/src/mame/dynax/hnayayoi.cpp
index d1ae40e96b2..713a682bff1 100644
--- a/src/mame/dynax/hnayayoi.cpp
+++ b/src/mame/dynax/hnayayoi.cpp
@@ -666,7 +666,7 @@ static INPUT_PORTS_START( hnayayoi ) // test mode shows and test 3 dip banks, bu
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME(DEF_STR( Test )) // there is also a dip switch
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_NAME("Analizer")
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) // "Anarizer"
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) // "Non Use" in service mode
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) // "Note" ("Paper Money") = 10 Credits
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2)
@@ -756,7 +756,7 @@ static INPUT_PORTS_START( hnfubuki )
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME(DEF_STR( Test ))
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_NAME("Analizer")
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) // "Anarizer"
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MEMORY_RESET )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) // "Note" ("Paper Money") = 10 Credits
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2)
@@ -820,7 +820,7 @@ static INPUT_PORTS_START( untoucha )
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME(DEF_STR( Test ))
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_NAME("Analizer")
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) // "Analizer Key"
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MEMORY_RESET )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) // "Note" ("Paper Money") = 5 or 8 Credits
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2)
diff --git a/src/mame/igs/goldstar.cpp b/src/mame/igs/goldstar.cpp
index a2fc62701f8..aed3faa96fa 100644
--- a/src/mame/igs/goldstar.cpp
+++ b/src/mame/igs/goldstar.cpp
@@ -524,6 +524,7 @@ class wingco_state : public goldstar_state
void init_lucky8f();
void init_lucky8l();
void init_lucky8m();
+ void init_lucky8n();
void init_magoddsc();
void init_flaming7();
void init_flam7_tw();
@@ -14522,6 +14523,40 @@ ROM_START( lucky8m )
ROM_LOAD( "g13", 0x0000, 0x0020, BAD_DUMP CRC(6df3f972) SHA1(0096a7f7452b70cac6c0752cb62e24b643015b5c) )
ROM_END
+ROM_START( lucky8n )
+ ROM_REGION( 0x10000, "maincpu", 0 )
+ ROM_LOAD( "gold.ic8.sub", 0x0000, 0x8000, CRC(f2fc90a2) SHA1(ab9f9166a3b15d69d2f70e1bcc562f54452628e7) )
+
+ ROM_REGION( 0x18000, "gfx1", 0 )
+ ROM_LOAD( "5.7h", 0x00000, 0x8000, CRC(59026af3) SHA1(3d7f7e78968ca26275635aeaa0e994468a3da575) )
+ ROM_LOAD( "6.8h", 0x08000, 0x8000, CRC(67a073c1) SHA1(36194d57d0dc0601fa1fdf2e6806f11b2ea6da36) )
+ ROM_LOAD( "7.10h", 0x10000, 0x8000, CRC(c415b9d0) SHA1(fd558fe8a116c33bbd712a639224d041447a45c1) )
+
+ ROM_REGION( 0x8000, "gfx2", 0 ) // all 1ST AND 2ND HALF IDENTICAL, match many other lucky8 sets otherwise
+ ROM_LOAD( "1.1h", 0x0000, 0x2000, CRC(8ca19ee7) SHA1(2e0cd4a74bd9abef60ed561ba4e5bb2681ce1222) )
+ ROM_IGNORE( 0x2000)
+ ROM_LOAD( "2.3h", 0x2000, 0x2000, CRC(3b5a992d) SHA1(bc862caa6bab654aad80c615ec5a9114bf060300) )
+ ROM_IGNORE( 0x2000)
+ ROM_LOAD( "3.4h", 0x4000, 0x2000, CRC(0219b22d) SHA1(faf7c6804ff36bdff31b5584660e4f2613d0e220) )
+ ROM_IGNORE( 0x2000)
+ ROM_LOAD( "4.6h", 0x6000, 0x2000, CRC(d26c3262) SHA1(c7f1868a66180fc58d65dc90f700df3e33af63a2) )
+ ROM_IGNORE( 0x2000)
+
+ // PROMs weren't dumped for this set, but GFX match so color PROMs should match too
+ ROM_REGION( 0x200, "proms", 0 )
+ ROM_LOAD( "d12", 0x000, 0x100, BAD_DUMP CRC(23e81049) SHA1(78071dae70fad870e972d944642fb3a2374be5e4) )
+ ROM_LOAD( "prom4", 0x100, 0x100, BAD_DUMP CRC(526cf9d3) SHA1(eb779d70f2507d0f26d225ac8f5de8f2243599ca) )
+
+ ROM_REGION( 0x20, "proms2", 0 )
+ ROM_LOAD( "d13", 0x00, 0x20, BAD_DUMP CRC(c6b41352) SHA1(d7c3b5aa32e4e456c9432a13bede1db6d62eb270) )
+
+ ROM_REGION( 0x100, "unkprom", 0 )
+ ROM_LOAD( "g14", 0x000, 0x100, BAD_DUMP CRC(bd48de71) SHA1(e4fa1e774af1499bc568be5b2deabb859d8c8172) )
+
+ ROM_REGION( 0x20, "unkprom2", 0 )
+ ROM_LOAD( "g13", 0x00, 0x20, BAD_DUMP CRC(6df3f972) SHA1(0096a7f7452b70cac6c0752cb62e24b643015b5c) )
+ROM_END
+
ROM_START( animalw ) // according to the dumper: runs on the same HW as lucky8 but at the two 8255 has some shorts
ROM_REGION( 0x10000, "maincpu", 0 )
ROM_LOAD( "rom8.bin", 0x0000, 0x8000, CRC(8826e4e7) SHA1(70cff8c5ce75ab0f568e8cdf39ef9165b73fa2c0) )
@@ -21362,6 +21397,45 @@ void wingco_state::init_lucky8m()
}
}
+void wingco_state::init_lucky8n()
+{
+ uint8_t *rom = memregion("maincpu")->base();
+
+ for (int i = 0; i < 0x8000; i++)
+ {
+ m_decrypted_opcodes[i] = rom[i];
+
+ if (i < 0x100 || (i >= 0x300 && i < 0x400) || (i >= 0x500 && i < 0x600) ||
+ (i >= 0xa00 && i < 0xb00) || (i >= 0xc00 && i < 0xd00) || (i >= 0x6e00 && i < 0x6f00) ||
+ (i >= 0x7100 && i < 0x7200))
+ {
+ uint8_t x = rom[i];
+
+ switch(i & 0x1e)
+ {
+ case 0x00: x = bitswap<8>(x ^ 0xaa, 3, 6, 7, 4, 1, 5, 2, 0); break;
+ case 0x02: x = bitswap<8>(x ^ 0xaa, 3, 6, 7, 4, 1, 5, 2, 0); break;
+ case 0x04: x = bitswap<8>(x ^ 0x02, 6, 7, 3, 4, 1, 5, 2, 0); break;
+ case 0x06: x = bitswap<8>(x ^ 0x02, 6, 7, 3, 4, 1, 5, 2, 0); break;
+ case 0x08: x = bitswap<8>(x ^ 0x04, 1, 6, 5, 4, 3, 2, 7, 0); break;
+ case 0x0a: x = bitswap<8>(x ^ 0x04, 1, 6, 5, 4, 3, 2, 7, 0); break;
+ case 0x0c: x = bitswap<8>(x ^ 0xcc, 6, 2, 7, 4, 5, 1, 3, 0); break;
+ case 0x0e: x = bitswap<8>(x ^ 0xa0, 7, 2, 6, 4, 5, 3, 1, 0); break;
+ case 0x10: x = bitswap<8>(x ^ 0xaa, 3, 6, 7, 4, 1, 5, 2, 0); break;
+ case 0x12: x = bitswap<8>(x ^ 0xaa, 3, 6, 7, 4, 1, 5, 2, 0); break;
+ case 0x14: x = bitswap<8>(x ^ 0x60, 6, 5, 2, 4, 7, 3, 1, 0); break;
+ case 0x16: x = bitswap<8>(x ^ 0x60, 6, 5, 2, 4, 7, 3, 1, 0); break;
+ case 0x18: x = bitswap<8>(x ^ 0x04, 1, 6, 5, 4, 3, 2, 7, 0); break;
+ case 0x1a: x = bitswap<8>(x ^ 0x04, 1, 6, 5, 4, 3, 2, 7, 0); break;
+ case 0x1c: x = bitswap<8>(x ^ 0x60, 6, 5, 2, 4, 7, 3, 1, 0); break;
+ case 0x1e: x = bitswap<8>(x ^ 0x60, 6, 5, 2, 4, 7, 3, 1, 0); break;
+ }
+
+ m_decrypted_opcodes[i] = x;
+ }
+ }
+}
+
void wingco_state::init_nd8lines()
{
uint8_t *rom = memregion("maincpu")->base();
@@ -22285,6 +22359,7 @@ GAMEL( 199?, lucky8j, lucky8, lucky8, lucky8, wingco_state, empty_ini
GAMEL( 1989, lucky8k, lucky8, lucky8k, lucky8, wingco_state, empty_init, ROT0, "Wing Co., Ltd.", "New Lucky 8 Lines (set 10, W-4, encrypted NEC D315-5136)", 0, layout_lucky8 ) // 2 control sets...
GAMEL( 1989, lucky8l, lucky8, lucky8, lucky8, wingco_state, init_lucky8l, ROT0, "Wing Co., Ltd.", "New Lucky 8 Lines (set 11, W-4)", MACHINE_WRONG_COLORS, layout_lucky8 ) // uses a strange mix of PLDs and PROMs for colors
GAMEL( 1989, lucky8m, lucky8, lucky8f, lucky8, wingco_state, init_lucky8m, ROT0, "Wing Co., Ltd.", "New Lucky 8 Lines (set 12, W-4, encrypted)", 0, layout_lucky8 )
+GAMEL( 1989, lucky8n, lucky8, lucky8f, lucky8, wingco_state, init_lucky8n, ROT0, "Wing Co., Ltd.", "New Lucky 8 Lines (set 13)", 0, layout_lucky8 ) // 2 control sets...
GAMEL( 198?, ns8lines, 0, lucky8, lucky8b, wingco_state, empty_init, ROT0, "", "New Lucky 8 Lines / New Super 8 Lines (W-4)", 0, layout_lucky8p1 ) // only 1 control set...
GAMEL( 1985, ns8linesa, ns8lines, lucky8, lucky8b, wingco_state, empty_init, ROT0, "Yamate (bootleg)", "New Lucky 8 Lines / New Super 8 Lines (W-4, Lucky97 HW)", 0, layout_lucky8p1 ) // only 1 control set...
GAMEL( 198?, ns8linew, ns8lines, lucky8, ns8linew, wingco_state, empty_init, ROT0, "", "New Lucky 8 Lines / New Super 8 Lines (F-5, Witch Bonus)", 0, layout_lucky8 ) // 2 control sets...
diff --git a/src/mame/igs/igs011.cpp b/src/mame/igs/igs011.cpp
index 45d0369ae3f..c5d695c0734 100644
--- a/src/mame/igs/igs011.cpp
+++ b/src/mame/igs/igs011.cpp
@@ -67,12 +67,18 @@ To do:
***************************************************************************/
#include "emu.h"
+
+#include "igsmahjong.h"
+
+#include "mahjong.h"
+
#include "cpu/m68000/m68000.h"
+#include "machine/nvram.h"
+#include "machine/timer.h"
#include "sound/ics2115.h"
#include "sound/okim6295.h"
#include "sound/ymopl.h"
-#include "machine/nvram.h"
-#include "machine/timer.h"
+
#include "emupal.h"
#include "screen.h"
#include "speaker.h"
@@ -108,37 +114,42 @@ class igs011_state : public driver_device
int igs_hopper_r();
- void init_lhbv33c();
- void init_drgnwrldv21j();
- void init_wlcc();
- void init_nkishusp();
- void init_drgnwrldv21();
- void init_dbc();
- void init_lhb();
- void init_drgnwrld();
- void init_drgnwrldv30();
- void init_drgnwrldv11h();
- void init_lhb2();
- void init_xymg();
- void init_drgnwrldv10c();
- void init_drgnwrldv20j();
- void init_drgnwrldv40k();
- void init_ryukobou();
- void init_tygn();
-
- void igs011_base(machine_config &config);
- void drgnwrld(machine_config &config);
- void nkishusp(machine_config &config);
- void tygn(machine_config &config);
- void wlcc(machine_config &config);
- void xymg(machine_config &config);
- void lhb2(machine_config &config);
- void lhb(machine_config &config);
- void drgnwrld_igs012(machine_config &config);
+ void init_lhbv33c() ATTR_COLD;
+ void init_drgnwrldv21j() ATTR_COLD;
+ void init_wlcc() ATTR_COLD;
+ void init_nkishusp() ATTR_COLD;
+ void init_drgnwrldv21() ATTR_COLD;
+ void init_dbc() ATTR_COLD;
+ void init_lhb() ATTR_COLD;
+ void init_drgnwrld() ATTR_COLD;
+ void init_drgnwrldv30() ATTR_COLD;
+ void init_drgnwrldv11h() ATTR_COLD;
+ void init_lhb2() ATTR_COLD;
+ void init_xymg() ATTR_COLD;
+ void init_drgnwrldv10c() ATTR_COLD;
+ void init_drgnwrldv20j() ATTR_COLD;
+ void init_drgnwrldv40k() ATTR_COLD;
+ void init_ryukobou() ATTR_COLD;
+ void init_tygn() ATTR_COLD;
+
+ void drgnwrld(machine_config &config) ATTR_COLD;
+ void nkishusp(machine_config &config) ATTR_COLD;
+ void tygn(machine_config &config) ATTR_COLD;
+ void wlcc(machine_config &config) ATTR_COLD;
+ void xymg(machine_config &config) ATTR_COLD;
+ void lhb2(machine_config &config) ATTR_COLD;
+ void lhb(machine_config &config) ATTR_COLD;
+ void drgnwrld_igs012(machine_config &config) ATTR_COLD;
protected:
- virtual void machine_start() override ATTR_COLD;
- virtual void video_start() override ATTR_COLD;
+ struct blitter_t
+ {
+ u16 x, y, w, h,
+ gfx_lo, gfx_hi,
+ depth,
+ pen,
+ flags;
+ };
/* devices */
required_device m_maincpu;
@@ -176,15 +187,6 @@ class igs011_state : public driver_device
u16 m_igs003_reg;
u16 m_lhb_irq_enable;
- struct blitter_t
- {
- u16 x, y, w, h,
- gfx_lo, gfx_hi,
- depth,
- pen,
- flags;
- };
-
blitter_t m_blitter;
u16 m_igs003_prot_hold;
@@ -194,6 +196,11 @@ class igs011_state : public driver_device
u8 m_igs003_prot_h1;
u8 m_igs003_prot_h2;
+ virtual void machine_start() override ATTR_COLD;
+ virtual void video_start() override ATTR_COLD;
+
+ void igs011_base(machine_config &config) ATTR_COLD;
+
void igs011_priority_w(offs_t offset, u16 data, u16 mem_mask = ~0);
u16 igs011_layers_r(offs_t offset);
void igs011_layers_w(offs_t offset, u16 data, u16 mem_mask = ~0);
@@ -291,12 +298,12 @@ class vbowl_state : public igs011_state
{
}
- void init_vbowl();
- void init_vbowlj();
- void init_vbowlhk();
+ void init_vbowl() ATTR_COLD;
+ void init_vbowlj() ATTR_COLD;
+ void init_vbowlhk() ATTR_COLD;
- void vbowl(machine_config &config);
- void vbowlhk(machine_config &config);
+ void vbowl(machine_config &config) ATTR_COLD;
+ void vbowlhk(machine_config &config) ATTR_COLD;
private:
/* devices */
@@ -3290,262 +3297,194 @@ INPUT_PORTS_END
static INPUT_PORTS_START( lhb2 )
PORT_START("DSW1")
- PORT_DIPNAME( 0x07, 0x02, "Pay Out (%)" )
- PORT_DIPSETTING( 0x07, "50" )
- PORT_DIPSETTING( 0x06, "54" )
- PORT_DIPSETTING( 0x05, "58" )
- PORT_DIPSETTING( 0x04, "62" )
- PORT_DIPSETTING( 0x03, "66" )
- PORT_DIPSETTING( 0x02, "70" )
- PORT_DIPSETTING( 0x01, "74" )
- PORT_DIPSETTING( 0x00, "78" )
- PORT_DIPNAME( 0x08, 0x00, "Odds Rate" )
+ PORT_DIPNAME( 0x07, 0x02, "Payout Rate" ) PORT_DIPLOCATION("SW1:1,2,3") // 機率調整
+ PORT_DIPSETTING( 0x07, "50%" )
+ PORT_DIPSETTING( 0x06, "54%" )
+ PORT_DIPSETTING( 0x05, "58%" )
+ PORT_DIPSETTING( 0x04, "62%" )
+ PORT_DIPSETTING( 0x03, "66%" )
+ PORT_DIPSETTING( 0x02, "70%" )
+ PORT_DIPSETTING( 0x01, "74%" )
+ PORT_DIPSETTING( 0x00, "78%" )
+ PORT_DIPNAME( 0x08, 0x00, "Odds Rate" ) PORT_DIPLOCATION("SW1:4") // 倍數?
PORT_DIPSETTING( 0x00, "1,2,3,4,5,6,7,8" )
PORT_DIPSETTING( 0x08, "1,2,3,5,8,15,30,50" )
- PORT_DIPNAME( 0x10, 0x00, "Max Bet" )
+ PORT_DIPNAME( 0x10, 0x00, "Maximum Bet" ) PORT_DIPLOCATION("SW1:5") // 最大押注
PORT_DIPSETTING( 0x00, "5" )
PORT_DIPSETTING( 0x10, "10" )
- PORT_DIPNAME( 0x60, 0x60, "Min Bet" )
+ PORT_DIPNAME( 0x60, 0x60, "Minimum Bet" ) PORT_DIPLOCATION("SW1:6,7") // 最小押注
PORT_DIPSETTING( 0x60, "1" )
PORT_DIPSETTING( 0x40, "2" )
PORT_DIPSETTING( 0x20, "3" )
PORT_DIPSETTING( 0x00, "5" )
- PORT_DIPUNKNOWN( 0x80, 0x80 )
+ PORT_DIPNAME( 0x80, 0x80, "Credit Timer" ) PORT_DIPLOCATION("SW1:8") // ??清除 (clears credits after timeout if you don't start a game)
+ PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) // ?
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) ) // ?
PORT_START("DSW2")
- PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coinage ) ) // Only when bit 4 = 1
+ PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW2:1,2") // 投幣比率
PORT_DIPSETTING( 0x00, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x03, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x02, DEF_STR( 1C_2C ) )
PORT_DIPSETTING( 0x01, DEF_STR( 1C_3C ) )
- PORT_DIPNAME( 0x04, 0x04, "Credits Per Note" ) // Only when bit 4 = 0
+ PORT_DIPNAME( 0x04, 0x04, "Key-in Rate" ) PORT_DIPLOCATION("SW2:3") // 開分比率
PORT_DIPSETTING( 0x04, "10" )
PORT_DIPSETTING( 0x00, "100" )
- PORT_DIPNAME( 0x08, 0x08, "Max Note Credits" )
+ PORT_DIPNAME( 0x08, 0x08, "Credit Limit" ) PORT_DIPLOCATION("SW2:4") // 進分上限
PORT_DIPSETTING( 0x08, "100" )
PORT_DIPSETTING( 0x00, "500" )
- PORT_DIPNAME( 0x10, 0x10, "Money Type" ) // Decides whether to use bits 0&1 or bit 2
- PORT_DIPSETTING( 0x10, "Coins" )
- PORT_DIPSETTING( 0x00, "Notes" )
- PORT_DIPNAME( 0x20, 0x20, "Pay Out Type" )
- PORT_DIPSETTING( 0x20, "Coins" )
- PORT_DIPSETTING( 0x00, "Notes" )
- PORT_DIPUNKNOWN( 0x40, 0x40 )
- PORT_DIPNAME( 0x80, 0x80, DEF_STR( Demo_Sounds ) )
- PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x80, DEF_STR( On ) )
+ PORT_DIPNAME( 0x10, 0x10, "Credit Mode" ) PORT_DIPLOCATION("SW2:5") // 進分方式
+ PORT_DIPSETTING( 0x10, "Coin Acceptor" ) // 投幣
+ PORT_DIPSETTING( 0x00, "Key-In" ) // 開分
+ PORT_DIPNAME( 0x20, 0x20, "Payout Mode" ) PORT_DIPLOCATION("SW2:6") // 退分方式
+ PORT_DIPSETTING( 0x20, "Key-Out" ) // 洗分
+ PORT_DIPSETTING( 0x00, "Return Coins" ) // 退幣 (doesn't seem to work properly)
+ PORT_DIPUNKNOWN_DIPLOC( 0x40, 0x40, "SW2:7" ) // ????
+ PORT_DIPNAME( 0x80, 0x80, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW2:8") // ??音?
+ PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) // ?
+ PORT_DIPSETTING( 0x80, DEF_STR( On ) ) // ?
PORT_START("DSW3")
- PORT_DIPNAME( 0x03, 0x03, DEF_STR( Unknown ) )
+ PORT_DIPNAME( 0x03, 0x03, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW3:1,2") // ??限?
PORT_DIPSETTING( 0x03, "500" )
PORT_DIPSETTING( 0x02, "1000" )
PORT_DIPSETTING( 0x01, "2000" )
- PORT_DIPSETTING( 0x00, "30000" )
- PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x0c, "0" )
- PORT_DIPSETTING( 0x08, "1" )
- PORT_DIPSETTING( 0x04, "2" )
-// PORT_DIPSETTING( 0x00, "2" )
- PORT_DIPNAME( 0x70, 0x70, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x70, "1 : 1" )
- PORT_DIPSETTING( 0x60, "1 : 2" )
- PORT_DIPSETTING( 0x50, "1 : 5" )
- PORT_DIPSETTING( 0x40, "1 : 6" )
- PORT_DIPSETTING( 0x30, "1 : 7" )
- PORT_DIPSETTING( 0x20, "1 : 8" )
- PORT_DIPSETTING( 0x10, "1 : 9" )
- PORT_DIPSETTING( 0x00, "1 : 10" )
- PORT_DIPUNKNOWN( 0x80, 0x80 )
+ PORT_DIPSETTING( 0x00, "?" ) // ?限?
+ PORT_DIPNAME( 0x0c, 0x0c, "Gals" ) PORT_DIPLOCATION("SW3:3,4") // 美女
+ PORT_DIPSETTING( 0x0c, "0?" ) // ?美女
+ PORT_DIPSETTING( 0x08, "1?" ) // ?美女
+ PORT_DIPSETTING( 0x04, "2?" ) // ?開女
+ PORT_DIPSETTING( 0x00, "3?" ) // ?開女
+ PORT_DIPUNKNOWN_DIPLOC( 0x10, 0x10, "SW3:5" ) // (not shown in settings display)
+ PORT_DIPUNKNOWN_DIPLOC( 0x20, 0x20, "SW3:6" ) // (not shown in settings display)
+ PORT_DIPUNKNOWN_DIPLOC( 0x40, 0x40, "SW3:7" ) // (not shown in settings display)
+ PORT_DIPUNKNOWN_DIPLOC( 0x80, 0x80, "SW3:8" ) // (not shown in settings display)
PORT_START("COIN")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 ) // data clear
- PORT_SERVICE_NO_TOGGLE( 0x04, IP_ACTIVE_LOW ) // keep pressed while booting
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(FUNC(igs011_state::igs_hopper_r)) // hopper switch
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE2 ) // stats
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Pay Out") PORT_CODE(KEYCODE_O) // clear coin
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CONDITION("DSW2", 0x10, EQUALS, 0x10) // 投幣
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_KEYIN ) PORT_CONDITION("DSW2", 0x10, EQUALS, 0x00) // 投幣
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // 清除
+ PORT_SERVICE_NO_TOGGLE( 0x04, IP_ACTIVE_LOW ) // 測試 (hold on start for input test)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(FUNC(igs011_state::igs_hopper_r)) // 哈巴
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) // 查帳
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_CONDITION("DSW2", 0x20, EQUALS, 0x20) // 洗分
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_CONDITION("DSW2", 0x20, EQUALS, 0x00) // 洗分
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_START("KEY0")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_A )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_E )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_I )
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_M )
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_KAN )
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 )
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) // ? set to 0 both
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) // ? and you can't start a game
-
- PORT_START("KEY1")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_B )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_F )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_J )
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_N )
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_REACH )
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_BET )
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_INCLUDE(mahjong_matrix_1p)
- PORT_START("KEY2")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_C )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_G )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_K )
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_CHI )
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_RON )
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_MODIFY("KEY0")
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) // ? set to 0 both
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) // ? and you can't start a game
- PORT_START("KEY3")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_D )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_H )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_L )
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_PON )
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_MODIFY("KEY1")
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_BET ) // doesn't use any other gambling keys
+ PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_START("KEY4")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_MODIFY("KEY2")
+ PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNKNOWN )
+
+ PORT_MODIFY("KEY3")
+ PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNKNOWN )
+
+ PORT_MODIFY("KEY4")
+ PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNKNOWN )
INPUT_PORTS_END
static INPUT_PORTS_START( nkishusp )
PORT_START("DSW1")
- PORT_DIPNAME( 0x07, 0x02, "Pay Out (%)" )
- PORT_DIPSETTING( 0x07, "74" )
- PORT_DIPSETTING( 0x06, "77" )
- PORT_DIPSETTING( 0x05, "80" )
- PORT_DIPSETTING( 0x04, "83" )
- PORT_DIPSETTING( 0x03, "86" )
- PORT_DIPSETTING( 0x02, "89" )
- PORT_DIPSETTING( 0x01, "92" )
- PORT_DIPSETTING( 0x00, "95" )
- PORT_DIPNAME( 0x08, 0x00, "Odds Rate" )
+ PORT_DIPNAME( 0x07, 0x02, "Payout Rate" ) PORT_DIPLOCATION("SW1:1,2,3")
+ PORT_DIPSETTING( 0x07, "74%" )
+ PORT_DIPSETTING( 0x06, "77%" )
+ PORT_DIPSETTING( 0x05, "80%" )
+ PORT_DIPSETTING( 0x04, "83%" )
+ PORT_DIPSETTING( 0x03, "86%" )
+ PORT_DIPSETTING( 0x02, "89%" )
+ PORT_DIPSETTING( 0x01, "92%" )
+ PORT_DIPSETTING( 0x00, "95%" )
+ PORT_DIPNAME( 0x08, 0x00, "Odds Rate" ) PORT_DIPLOCATION("SW1:4")
PORT_DIPSETTING( 0x00, "1,2,3,4,5,6,7,8" )
PORT_DIPSETTING( 0x08, "1,2,3,5,8,15,30,50" )
- PORT_DIPNAME( 0x10, 0x00, "Max Bet" )
+ PORT_DIPNAME( 0x10, 0x00, "Maximum Bet" ) PORT_DIPLOCATION("SW1:5")
PORT_DIPSETTING( 0x00, "5" )
PORT_DIPSETTING( 0x10, "10" )
- PORT_DIPNAME( 0x60, 0x60, "Min Bet" )
+ PORT_DIPNAME( 0x60, 0x60, "Minimum Bet" ) PORT_DIPLOCATION("SW1:6,7")
PORT_DIPSETTING( 0x60, "1" )
PORT_DIPSETTING( 0x40, "2" )
PORT_DIPSETTING( 0x20, "3" )
PORT_DIPSETTING( 0x00, "5" )
- PORT_DIPNAME( 0x80, 0x00, "Credit Timer" )
+ PORT_DIPNAME( 0x80, 0x80, "Credit Timer" ) PORT_DIPLOCATION("SW1:8") // (clears credits after timeout if you don't start a game)
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("DSW2")
- PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coinage ) ) // Only when bit 3 = 1
+ PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW2:1,2")
PORT_DIPSETTING( 0x00, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x03, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x02, DEF_STR( 1C_2C ) )
PORT_DIPSETTING( 0x01, DEF_STR( 1C_3C ) )
- PORT_DIPNAME( 0x04, 0x04, "Credits Per Note" ) // Only when bit 3 = 0
+ PORT_DIPNAME( 0x04, 0x04, "Key-in Rate" ) PORT_DIPLOCATION("SW2:3")
PORT_DIPSETTING( 0x04, "10" )
PORT_DIPSETTING( 0x00, "100" )
- PORT_DIPNAME( 0x08, 0x08, "Money Type" ) // Decides whether to use bits 0&1 or bit 2
- PORT_DIPSETTING( 0x08, "Coins" )
- PORT_DIPSETTING( 0x00, "Notes" )
- PORT_DIPNAME( 0x10, 0x10, "Auto Play" )
+ PORT_DIPNAME( 0x08, 0x08, "Credit Mode" ) PORT_DIPLOCATION("SW2:4")
+ PORT_DIPSETTING( 0x08, "Coin Acceptor" )
+ PORT_DIPSETTING( 0x00, "Key-In" )
+ PORT_DIPNAME( 0x10, 0x10, "Auto Play" ) PORT_DIPLOCATION("SW2:5") // (automatically draws and discards tiles after reach)
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x10, DEF_STR( On ) )
- PORT_DIPNAME( 0x20, 0x20, DEF_STR( Demo_Sounds ) )
+ PORT_DIPNAME( 0x20, 0x20, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW2:6")
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x20, DEF_STR( On ) )
- PORT_DIPNAME( 0x40, 0x40, "Undress Girl" )
+ PORT_DIPNAME( 0x40, 0x40, "Nudity" ) PORT_DIPLOCATION("SW2:7")
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPUNKNOWN( 0x80, 0x80 )
+ PORT_DIPUNKNOWN_DIPLOC( 0x80, 0x80, "SW2:8" ) // (not shown in settings display)
PORT_START("DSW3")
- PORT_DIPNAME( 0x03, 0x03, "Credit Limit" )
+ PORT_DIPNAME( 0x03, 0x03, "Credit Limit" ) PORT_DIPLOCATION("SW3:1,2")
PORT_DIPSETTING( 0x03, "500" )
PORT_DIPSETTING( 0x02, "1000" )
PORT_DIPSETTING( 0x01, "2000" )
- PORT_DIPSETTING( 0x00, "30000" )
- PORT_DIPUNKNOWN( 0x04, 0x04 )
- PORT_DIPUNKNOWN( 0x08, 0x08 )
- PORT_DIPNAME( 0x70, 0x70, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x70, "1 : 1" )
- PORT_DIPSETTING( 0x60, "1 : 2" )
- PORT_DIPSETTING( 0x50, "1 : 5" )
- PORT_DIPSETTING( 0x40, "1 : 6" )
- PORT_DIPSETTING( 0x30, "1 : 7" )
- PORT_DIPSETTING( 0x20, "1 : 8" )
- PORT_DIPSETTING( 0x10, "1 : 9" )
- PORT_DIPSETTING( 0x00, "1 : 10" )
- PORT_DIPUNKNOWN( 0x80, 0x80 )
+ PORT_DIPSETTING( 0x00, "Unlimited" ) // (seems to be limited to 9,999 trying to exceed this gives "RECORD ERROR 10")
+ PORT_DIPUNKNOWN_DIPLOC( 0x04, 0x04, "SW3:3" ) // (not shown in settings display)
+ PORT_DIPUNKNOWN_DIPLOC( 0x08, 0x08, "SW3:4" ) // (not shown in settings display)
+ PORT_DIPUNKNOWN_DIPLOC( 0x10, 0x10, "SW3:5" ) // (not shown in settings display)
+ PORT_DIPUNKNOWN_DIPLOC( 0x20, 0x20, "SW3:6" ) // (not shown in settings display)
+ PORT_DIPUNKNOWN_DIPLOC( 0x40, 0x40, "SW3:7" ) // (not shown in settings display)
+ PORT_DIPUNKNOWN_DIPLOC( 0x80, 0x80, "SW3:8" ) // (not shown in settings display)
PORT_START("COIN")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 ) // data clear
- PORT_SERVICE_NO_TOGGLE( 0x04, IP_ACTIVE_LOW ) // keep pressed while booting
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(FUNC(igs011_state::igs_hopper_r)) // hopper switch
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE2 ) // stats
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Pay Out") PORT_CODE(KEYCODE_O) // clear coin
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CONDITION("DSW2", 0x08, EQUALS, 0x08) // 投幣
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_KEYIN ) PORT_CONDITION("DSW2", 0x08, EQUALS, 0x00) // 投幣
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // 清除
+ PORT_SERVICE_NO_TOGGLE( 0x04, IP_ACTIVE_LOW ) // 測試 (hold on start for input test)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(FUNC(igs011_state::igs_hopper_r)) // 哈巴
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) // 查帳
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) // 洗分
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_START("KEY0")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_A )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_E )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_I )
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_M )
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_KAN )
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 )
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) // ? set to 0 both
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) // ? and you can't start a game
-
- PORT_START("KEY1")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_B )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_F )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_J )
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_N )
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_REACH )
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_BET )
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_INCLUDE(mahjong_matrix_1p)
- PORT_START("KEY2")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_C )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_G )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_K )
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_CHI )
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_RON )
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_START("KEY3")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_D )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_H )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_L )
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_PON )
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_MODIFY("KEY0")
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) // ? set to 0 both
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) // ? and you can't start a game
- PORT_START("KEY4")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_MODIFY("KEY1")
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_BET ) // doesn't use any other gambling keys
+ PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNKNOWN )
+
+ PORT_MODIFY("KEY2")
+ PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNKNOWN )
+
+ PORT_MODIFY("KEY3")
+ PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNKNOWN )
+
+ PORT_MODIFY("KEY4")
+ PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNKNOWN )
INPUT_PORTS_END
@@ -3830,63 +3769,18 @@ static INPUT_PORTS_START( lhb )
PORT_START("COIN")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(FUNC(igs011_state::igs_hopper_r)) // hopper switch
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE2 ) // system reset
- PORT_SERVICE_NO_TOGGLE( 0x04, IP_ACTIVE_LOW ) // keep pressed while booting
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE1 ) // stats
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 ) // system reset
+ PORT_SERVICE_NO_TOGGLE( 0x04, IP_ACTIVE_LOW ) // keep pressed while booting
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) // stats
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(5)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Pay Out") PORT_CODE(KEYCODE_O) // clear coins
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("0") PORT_CODE(KEYCODE_0_PAD) // shown in test mode
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_START("KEY0")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_A )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_E )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_I )
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_M )
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_KAN )
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 )
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
-
- PORT_START("KEY1")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_B )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_F )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_J )
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_N )
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_REACH )
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_BET )
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_INCLUDE(igs_mahjong_matrix)
- PORT_START("KEY2")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_C )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_G )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_K )
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_CHI )
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_RON )
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
-
- PORT_START("KEY3")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_D )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_H )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_L )
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_PON )
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
-
- PORT_START("KEY4")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_LAST_CHANCE )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_SCORE )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_DOUBLE_UP )
-PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN2) // shown in test mode
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_BIG )
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_SMALL )
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_MODIFY("KEY4")
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN2) // shown in test mode
INPUT_PORTS_END
@@ -4035,45 +3929,48 @@ INPUT_PORTS_END
static INPUT_PORTS_START( xymg )
PORT_START("DSW1")
- PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coinage ) )
+ PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW1:1,2") // 投幣比率
PORT_DIPSETTING( 0x03, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x02, DEF_STR( 1C_2C ) )
PORT_DIPSETTING( 0x01, DEF_STR( 1C_3C ) )
PORT_DIPSETTING( 0x00, DEF_STR( 1C_4C ) )
- PORT_DIPNAME( 0x0c, 0x0c, "Credits Per Note" )
+ PORT_DIPNAME( 0x0c, 0x0c, "Key-in Rate" ) PORT_DIPLOCATION("SW1:3,4") // 開分比率
PORT_DIPSETTING( 0x0c, "10" )
PORT_DIPSETTING( 0x08, "20" )
PORT_DIPSETTING( 0x04, "50" )
PORT_DIPSETTING( 0x00, "100" )
- PORT_DIPNAME( 0x10, 0x10, "Max Note Credits" )
+ PORT_DIPNAME( 0x10, 0x10, "Credit Limit" ) PORT_DIPLOCATION("SW1:5") // 進分上限
PORT_DIPSETTING( 0x10, "500" )
- PORT_DIPSETTING( 0x00, "9999" )
- PORT_DIPNAME( 0x20, 0x20, "Money Type" )
- PORT_DIPSETTING( 0x20, "Coins" ) // use bits 0-1
- PORT_DIPSETTING( 0x00, "Notes" ) // use bits 2-3
- PORT_DIPUNKNOWN( 0x40, 0x40 )
- PORT_DIPNAME( 0x80, 0x80, DEF_STR( Demo_Sounds ) )
- PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x80, DEF_STR( On ) )
+ PORT_DIPSETTING( 0x00, "Unlimited" ) // 無限制 (if you have 10,000 or more credits, further credits will be rejected)
+ PORT_DIPNAME( 0x20, 0x20, "Credit Mode" ) PORT_DIPLOCATION("SW1:6") // 進分方式
+ PORT_DIPSETTING( 0x20, "Coin Acceptor" ) // 投幣
+ PORT_DIPSETTING( 0x00, "Key-In" ) // 開分
+ PORT_DIPNAME( 0x40, 0x40, "Payout Mode" ) PORT_DIPLOCATION("SW1:7") // 退分方式
+ PORT_DIPSETTING( 0x40, "Return Coins" ) // 退幣
+ PORT_DIPSETTING( 0x00, "Key-Out" ) // 洗分
+ PORT_DIPNAME( 0x80, 0x80, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW1:8") // 示範音樂
+ PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) // 無
+ PORT_DIPSETTING( 0x80, DEF_STR( On ) ) // 有
PORT_START("DSW2")
- PORT_DIPNAME( 0x03, 0x03, DEF_STR( Unknown ) )
+ PORT_DIPNAME( 0x03, 0x03, "Double Up Jackpot" ) PORT_DIPLOCATION("SW2:1,2") // 比倍爆機
PORT_DIPSETTING( 0x03, "1000" )
PORT_DIPSETTING( 0x02, "1500" )
PORT_DIPSETTING( 0x01, "2000" )
PORT_DIPSETTING( 0x00, "3000" )
- PORT_DIPNAME( 0x0c, 0x0c, "Min Bet" )
+ PORT_DIPNAME( 0x0c, 0x0c, "Minimum Bet" ) PORT_DIPLOCATION("SW2:3,4") // 最小押注
PORT_DIPSETTING( 0x0c, "1" )
PORT_DIPSETTING( 0x08, "2" )
PORT_DIPSETTING( 0x04, "3" )
PORT_DIPSETTING( 0x00, "5" )
- PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) // shown in test mode
- PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPUNKNOWN( 0x20, 0x20 )
- PORT_DIPUNKNOWN( 0x40, 0x40 )
- PORT_DIPUNKNOWN( 0x80, 0x80 )
-
+ PORT_DIPNAME( 0x10, 0x10, "Double Up Game" ) PORT_DIPLOCATION("SW2:5") // 比倍遊戲
+ PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) // 無
+ PORT_DIPSETTING( 0x10, DEF_STR( On ) ) // 有
+ PORT_DIPUNKNOWN_DIPLOC( 0x20, 0x20, "SW2:6" ) // (not shown in settings display)
+ PORT_DIPUNKNOWN_DIPLOC( 0x40, 0x40, "SW2:7" ) // (not shown in settings display)
+ PORT_DIPUNKNOWN_DIPLOC( 0x80, 0x80, "SW2:8" ) // (not shown in settings display)
+
+ // FIXME: SW3 doesn't respond in input test - are these hooked up correctly?
PORT_START("DSW3")
PORT_DIPUNKNOWN( 0x01, 0x01 )
PORT_DIPUNKNOWN( 0x02, 0x02 )
@@ -4087,62 +3984,16 @@ static INPUT_PORTS_START( xymg )
PORT_START("COIN")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(FUNC(igs011_state::igs_hopper_r)) // hopper switch
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_SERVICE_NO_TOGGLE( 0x04, IP_ACTIVE_LOW ) // keep pressed while booting
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE1 ) // stats
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN1 )
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Pay Out") PORT_CODE(KEYCODE_O) // clear coin
+ PORT_SERVICE_NO_TOGGLE( 0x04, IP_ACTIVE_LOW ) // keep pressed while booting
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) // stats
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CONDITION("DSW1", 0x20, EQUALS, 0x20)
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_KEYIN ) PORT_CONDITION("DSW1", 0x20, EQUALS, 0x00)
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_CONDITION("DSW1", 0x40, EQUALS, 0x40)
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_CONDITION("DSW1", 0x40, EQUALS, 0x00)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_START("KEY0")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_A )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_E )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_I )
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_M )
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_KAN )
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 )
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
-
- PORT_START("KEY1")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_B )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_F )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_J )
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_N )
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_REACH )
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_BET )
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
-
- PORT_START("KEY2")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_C )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_G )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_K )
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_CHI )
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_RON )
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
-
- PORT_START("KEY3")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_D )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_H )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_L )
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_PON )
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
-
- PORT_START("KEY4")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_LAST_CHANCE )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_SCORE )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_DOUBLE_UP )
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_BIG )
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_SMALL )
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_INCLUDE(igs_mahjong_matrix)
INPUT_PORTS_END
diff --git a/src/mame/igs/igsmahjong.cpp b/src/mame/igs/igsmahjong.cpp
index 1e25adec847..12d315e18e4 100644
--- a/src/mame/igs/igsmahjong.cpp
+++ b/src/mame/igs/igsmahjong.cpp
@@ -7,7 +7,7 @@
INPUT_PORTS_START( igs_mahjong_matrix )
- PORT_INCLUDE(mahjong_matrix_1p_bet)
+ PORT_INCLUDE(mahjong_matrix_1p_bet_wup)
PORT_MODIFY("KEY0")
PORT_BIT(0xc0, IP_ACTIVE_LOW, IPT_UNKNOWN)
diff --git a/src/mame/igt/gkigt.cpp b/src/mame/igt/gkigt.cpp
index e1061e77f97..1c8b3b3ec71 100644
--- a/src/mame/igt/gkigt.cpp
+++ b/src/mame/igt/gkigt.cpp
@@ -710,22 +710,22 @@ PIXEL VERSION: C0000176 - PIXEL DATE: 10/15/97 - PIXEL TIME: 10:30:00
*/
ROM_START( brhino )
ROM_REGION( 0x80000, "maincpu", 0 )
- ROM_LOAD( "base.402", 0x00000, 0x80000, CRC(d8f7a957) SHA1(fb9665534e68c3d1539c50358787ce484fb38684) )
+ ROM_LOAD( "i0000114 base,1-4002.bin", 0x00000, 0x80000, CRC(d8f7a957) SHA1(fb9665534e68c3d1539c50358787ce484fb38684) )
ROM_REGION32_LE( 0x200000, "game", 0 )
- ROM_LOAD16_BYTE( "gme1.080", 0x000000, 0x100000, CRC(3584b0b3) SHA1(55eddb4a785fece9f86f173c1933f0c8c53bb3a8) )
- ROM_LOAD16_BYTE( "gme2.080", 0x000001, 0x100000, CRC(64a70488) SHA1(ba683a08fa55dc09c836c4e53538d13cfc76ec8d) )
+ ROM_LOAD16_BYTE( "g0000143 gme1 1 of 2,2-80.bin", 0x000000, 0x100000, CRC(3584b0b3) SHA1(55eddb4a785fece9f86f173c1933f0c8c53bb3a8) )
+ ROM_LOAD16_BYTE( "g0000143 gme2 2 of 2,2-80.bin", 0x000001, 0x100000, CRC(64a70488) SHA1(ba683a08fa55dc09c836c4e53538d13cfc76ec8d) )
ROM_REGION( 0x100000, "cg", 0 )
- ROM_LOAD16_BYTE( "cg1c0176.040", 0x000000, 0x080000, CRC(2782968a) SHA1(f62295a75d81179b7314bc4a01d724d2ec38d473) )
- ROM_LOAD16_BYTE( "cg2c0176.040", 0x000001, 0x080000, CRC(52534609) SHA1(0584965e63ecbbe229c1a7152bdad310224d9b6c) )
+ ROM_LOAD16_BYTE( "c0000176 cg1 1 of 4,2-40.bin", 0x000000, 0x080000, CRC(2782968a) SHA1(f62295a75d81179b7314bc4a01d724d2ec38d473) )
+ ROM_LOAD16_BYTE( "c0000176 cg2 2 of 4,2-40.bin", 0x000001, 0x080000, CRC(52534609) SHA1(0584965e63ecbbe229c1a7152bdad310224d9b6c) )
ROM_REGION32_LE( 0x200000, "pxl", 0 )
- ROM_LOAD16_BYTE( "pxl1.080", 0x000000, 0x100000, CRC(e0fcd660) SHA1(0c179121b8772a331f768bdac9fc58781a341adb) )
- ROM_LOAD16_BYTE( "pxl2.080", 0x000001, 0x100000, CRC(d2c0116f) SHA1(a4cd72f0d6d56f1455728af78baf5bfafbcc5b1c) )
+ ROM_LOAD16_BYTE( "c0000176 pxl1 3 of 4,2-80.bin", 0x000000, 0x100000, CRC(e0fcd660) SHA1(0c179121b8772a331f768bdac9fc58781a341adb) )
+ ROM_LOAD16_BYTE( "c0000176 pxl2 4 of 4,2-80.bin", 0x000001, 0x100000, CRC(d2c0116f) SHA1(a4cd72f0d6d56f1455728af78baf5bfafbcc5b1c) )
ROM_REGION32_LE( 0x200000, "snd", ROMREGION_ERASE00 )
- ROM_LOAD( "sndswc00002.080", 0x000000, 0x100000, CRC(d8d41f3d) SHA1(45f3124da07d021361ac84d69d234dc1f0398476) )
+ ROM_LOAD( "swc00002 snd1 1 of 1,1-80.rom1", 0x000000, 0x100000, CRC(d8d41f3d) SHA1(45f3124da07d021361ac84d69d234dc1f0398476) ) // Add-on sound board @ U6
ROM_END
/*
@@ -735,22 +735,22 @@ PIXEL VERSION: C0000180 - PIXEL DATE: 12/04/97 - PIXEL TIME: 15:00:00
*/
ROM_START( wofigt )
ROM_REGION( 0x80000, "maincpu", 0 )
- ROM_LOAD( "base.402", 0x00000, 0x80000, CRC(7de6ff13) SHA1(33145364fa6df7d772b1931404c7f13a89db267f) )
+ ROM_LOAD( "i0000123 base,1-4002.bin", 0x00000, 0x80000, CRC(7de6ff13) SHA1(33145364fa6df7d772b1931404c7f13a89db267f) )
ROM_REGION32_LE( 0x200000, "game", 0 )
- ROM_LOAD16_BYTE( "gme1.080", 0x000000, 0x100000, CRC(b5ffe32d) SHA1(5c120e5157d81edb3b739dcad0fe49a92b4e610b) )
- ROM_LOAD16_BYTE( "gme2.080", 0x000001, 0x100000, CRC(46279275) SHA1(a40180607893ca63de865d3023730f4929e62b67) )
+ ROM_LOAD16_BYTE( "g0000176 gme1 1 of 2,2-80.bin", 0x000000, 0x100000, CRC(b5ffe32d) SHA1(5c120e5157d81edb3b739dcad0fe49a92b4e610b) )
+ ROM_LOAD16_BYTE( "g0000176 gme2 2 of 2,2-80.bin", 0x000001, 0x100000, CRC(46279275) SHA1(a40180607893ca63de865d3023730f4929e62b67) )
ROM_REGION( 0x100000, "cg", 0 )
- ROM_LOAD16_BYTE( "cg1.040", 0x000000, 0x080000, CRC(24ec6600) SHA1(6e3a8ef0d09b92141bc556b5c00436a0ccc7f294) )
- ROM_LOAD16_BYTE( "cg2.040", 0x000001, 0x080000, CRC(84f55a7d) SHA1(46cccc382203ec5a28dd0e5a29ba3f27541f883b) )
+ ROM_LOAD16_BYTE( "c0000180 cg1 1 of 4,2-40.bin", 0x000000, 0x080000, CRC(24ec6600) SHA1(6e3a8ef0d09b92141bc556b5c00436a0ccc7f294) )
+ ROM_LOAD16_BYTE( "c0000180 cg2 2 of 4,2-40.bin", 0x000001, 0x080000, CRC(84f55a7d) SHA1(46cccc382203ec5a28dd0e5a29ba3f27541f883b) )
ROM_REGION32_LE( 0x200000, "pxl", 0 )
- ROM_LOAD16_BYTE( "pxl1.080", 0x000000, 0x100000, CRC(5d150993) SHA1(1790b5451e8a8fe8d7f05ab9c2ba4ae9e09af353) )
- ROM_LOAD16_BYTE( "pxl2.080", 0x000001, 0x100000, CRC(d86f2e7f) SHA1(8d02aec29f40393948df295f79621d086d20ef89) )
+ ROM_LOAD16_BYTE( "c0000180 pxl1 3 of 4,2-80.bin", 0x000000, 0x100000, CRC(5d150993) SHA1(1790b5451e8a8fe8d7f05ab9c2ba4ae9e09af353) )
+ ROM_LOAD16_BYTE( "c0000180 pxl2 4 of 4,2-80.bin", 0x000001, 0x100000, CRC(d86f2e7f) SHA1(8d02aec29f40393948df295f79621d086d20ef89) )
ROM_REGION32_LE( 0x200000, "snd", ROMREGION_ERASE00 )
- ROM_LOAD( "snd1.080", 0x000000, 0x100000, CRC(2d75ae0b) SHA1(419c9517cdf17137b032c1446f0526a85e3b2aeb) )
+ ROM_LOAD( "swc00003 snd1 1 of 1,1-80.rom1", 0x000000, 0x100000, CRC(2d75ae0b) SHA1(419c9517cdf17137b032c1446f0526a85e3b2aeb) ) // Add-on sound board @ U6
ROM_END
/*
@@ -760,22 +760,22 @@ PIXEL VERSION: C0000102 - PIXEL DATE: 10/15/96 - PIXEL TIME: 14:40:00
*/
ROM_START( sup8race )
ROM_REGION( 0x80000, "maincpu", 0 )
- ROM_LOAD( "base.4096", 0x00000, 0x80000, CRC(2e9b9c7f) SHA1(6ed33ca50b8a01da46f7d58b774f43fde60a2ef5) )
+ ROM_LOAD( "i0000007 base,1-4002.bin", 0x00000, 0x80000, CRC(2e9b9c7f) SHA1(6ed33ca50b8a01da46f7d58b774f43fde60a2ef5) )
ROM_REGION32_LE( 0x200000, "game", 0 )
- ROM_LOAD16_BYTE( "gme1.8mg", 0x000000, 0x100000, CRC(1334b795) SHA1(25ae7ad1825f5d27eaf36b4c03245fc86c362e0f) )
- ROM_LOAD16_BYTE( "gme2.8mg", 0x000001, 0x100000, CRC(58d3c394) SHA1(cff735f66da2874f3a67be13b39c2507fc695a93) )
+ ROM_LOAD16_BYTE( "g0000080 gme1 1 of 2,2-80.bin", 0x000000, 0x100000, CRC(1334b795) SHA1(25ae7ad1825f5d27eaf36b4c03245fc86c362e0f) )
+ ROM_LOAD16_BYTE( "g0000080 gme2 2 of 2,2-80.bin", 0x000001, 0x100000, CRC(58d3c394) SHA1(cff735f66da2874f3a67be13b39c2507fc695a93) )
ROM_REGION( 0x100000, "cg", ROMREGION_ERASE00 )
- ROM_LOAD16_BYTE( "cg1.2mg", 0x000000, 0x040000, CRC(234507e4) SHA1(76b1931e9e8877b1fae69b830b03d19b3fea7b07) ) // 1xxxxxxxxxxxxxxxxx = 0x00
- ROM_LOAD16_BYTE( "cg2.2mg", 0x000001, 0x040000, CRC(54420c19) SHA1(e3a16d41177b7a209a25eac6dbab2ff396d432ea) ) // 1xxxxxxxxxxxxxxxxx = 0x00
+ ROM_LOAD16_BYTE( "c0000102 cg1 1 of 4,2-20.bin", 0x000000, 0x040000, CRC(234507e4) SHA1(76b1931e9e8877b1fae69b830b03d19b3fea7b07) ) // 1xxxxxxxxxxxxxxxxx = 0x00
+ ROM_LOAD16_BYTE( "c0000102 cg2 2 of 4,2-20.bin", 0x000001, 0x040000, CRC(54420c19) SHA1(e3a16d41177b7a209a25eac6dbab2ff396d432ea) ) // 1xxxxxxxxxxxxxxxxx = 0x00
ROM_REGION32_LE( 0x200000, "pxl", ROMREGION_ERASE00 )
- ROM_LOAD16_BYTE( "pxl1.4mg", 0x000000, 0x080000, CRC(0dadfc8c) SHA1(9bf634c0e1b57f413d750d0df96dfd491e9a5a2f) )
- ROM_LOAD16_BYTE( "pxl2.4mg", 0x000001, 0x080000, CRC(cf69ee9f) SHA1(5edead51c4d537ad134fb7dca0da1e33d81bd6f9) )
+ ROM_LOAD16_BYTE( "c0000102 pxl1 3 of 4,2-40.bin", 0x000000, 0x080000, CRC(0dadfc8c) SHA1(9bf634c0e1b57f413d750d0df96dfd491e9a5a2f) )
+ ROM_LOAD16_BYTE( "c0000102 pxl2 4 of 4,2-40.bin", 0x000001, 0x080000, CRC(cf69ee9f) SHA1(5edead51c4d537ad134fb7dca0da1e33d81bd6f9) )
ROM_REGION32_LE( 0x200000, "snd", ROMREGION_ERASE00 )
- ROM_LOAD( "snd1.4mg", 0x000000, 0x080000, CRC(0d40d44e) SHA1(3c28db7fc656494cb4271f55f2a5138611a51449) )
+ ROM_LOAD( "swc00004 snd1 1 of 1,1-40.rom1", 0x000000, 0x080000, CRC(0d40d44e) SHA1(3c28db7fc656494cb4271f55f2a5138611a51449) ) // Add-on sound board @ U6
ROM_END
ROM_START( dblheart )
@@ -855,19 +855,19 @@ PIXEL VERSION: C0000074 - PIXEL DATE: 06/07/96 - PIXEL TIME: 14:40:00
*/
ROM_START( igtmg133 )
ROM_REGION( 0x80000, "maincpu", 0 )
- ROM_LOAD( "m0000133base.402", 0x00000, 0x80000, CRC(292d85e8) SHA1(490a6b5cb055e12534f872c49ae1baf896fdaa02) )
+ ROM_LOAD( "m0000133 base,1-4002.bin", 0x00000, 0x80000, CRC(292d85e8) SHA1(490a6b5cb055e12534f872c49ae1baf896fdaa02) )
ROM_REGION32_LE( 0x200000, "game", 0 ) // outputs game CRC error so one or both could be bad dumps
- ROM_LOAD16_BYTE( "g000073gme1.080", 0x000000, 0x100000, CRC(5b638c47) SHA1(f55d9925a7c3a4aeab0fb58f0d5a21f78a11fa16) )
- ROM_LOAD16_BYTE( "g000073gme2.080", 0x000001, 0x100000, CRC(98e13542) SHA1(9afefad038234a0c308724478899790269325a0c) )
+ ROM_LOAD16_BYTE( "g000073 gme1 1 of 2,2-80.bin", 0x000000, 0x100000, CRC(5b638c47) SHA1(f55d9925a7c3a4aeab0fb58f0d5a21f78a11fa16) )
+ ROM_LOAD16_BYTE( "g000073 gme2 2 of 2,2-80.bin", 0x000001, 0x100000, CRC(98e13542) SHA1(9afefad038234a0c308724478899790269325a0c) )
ROM_REGION( 0x100000, "cg", ROMREGION_ERASE00 ) // same as igtmg159
- ROM_LOAD16_BYTE( "c000074cg1.020", 0x000000, 0x040000, CRC(1cda421b) SHA1(c4b4df2a0c60d5bf78b635679a1293003010e15d) )
- ROM_LOAD16_BYTE( "c000074cg2.020", 0x000001, 0x040000, CRC(ebc14b9d) SHA1(37812e5de9fd1c70b700ad170290ac7e5163a7b2) )
+ ROM_LOAD16_BYTE( "c0000074 cg1 1 of 4,2-20.bin", 0x000000, 0x040000, CRC(1cda421b) SHA1(c4b4df2a0c60d5bf78b635679a1293003010e15d) )
+ ROM_LOAD16_BYTE( "c0000074 cg2 2 of 4,2-20.bin", 0x000001, 0x040000, CRC(ebc14b9d) SHA1(37812e5de9fd1c70b700ad170290ac7e5163a7b2) )
ROM_REGION32_LE( 0x200000, "pxl", 0 ) // same as igtmg159
- ROM_LOAD16_BYTE( "c000074pxl1.080", 0x000000, 0x100000, CRC(8fb6f1dd) SHA1(67601c63c1b915c21e69e20f8b0734a0aa243f78) )
- ROM_LOAD16_BYTE( "c000074pxl2.080", 0x000001, 0x100000, CRC(f1f4c70b) SHA1(1335565e4ac6830f89f7c0dabbfe7ad9fd667e64) )
+ ROM_LOAD16_BYTE( "c0000074 pxl1 3 of 4,2-80.bin", 0x000000, 0x100000, CRC(8fb6f1dd) SHA1(67601c63c1b915c21e69e20f8b0734a0aa243f78) )
+ ROM_LOAD16_BYTE( "c0000074 pxl2 4 of 4,2-80.bin", 0x000001, 0x100000, CRC(f1f4c70b) SHA1(1335565e4ac6830f89f7c0dabbfe7ad9fd667e64) )
ROM_REGION32_LE( 0x200000, "snd", ROMREGION_ERASE00 )
ROM_LOAD( "snd", 0x000000, 0x100000, NO_DUMP ) // no sound ROMs were included (could also be 2 ROMs)
@@ -880,19 +880,19 @@ PIXEL VERSION: C0000074 - PIXEL DATE: 06/07/96 - PIXEL TIME: 14:40:00
*/
ROM_START( igtmg156 ) // was called Game King 1 in the archive, to be verified once it boots
ROM_REGION( 0x80000, "maincpu", 0 )
- ROM_LOAD( "base", 0x00000, 0x80000, CRC(2a73d7bc) SHA1(d83053161e0d67da02c0d3f2ffa23edcf92bd5cb) )
+ ROM_LOAD( "m0000156 base,1-4002.bin", 0x00000, 0x80000, CRC(2a73d7bc) SHA1(d83053161e0d67da02c0d3f2ffa23edcf92bd5cb) )
ROM_REGION32_LE( 0x200000, "game", 0 )
- ROM_LOAD16_BYTE( "gme1", 0x000000, 0x100000, CRC(369d3d98) SHA1(90080f3f20498f4f61487f1c9f552cfb52dd0eeb) )
- ROM_LOAD16_BYTE( "gme2", 0x000001, 0x100000, CRC(8aec46ef) SHA1(e9bb853ddbeb701af7e64bab6ff6d448ee5f8416) )
+ ROM_LOAD16_BYTE( "g0000120 gme1 1 of 2,2-80.bin", 0x000000, 0x100000, CRC(369d3d98) SHA1(90080f3f20498f4f61487f1c9f552cfb52dd0eeb) )
+ ROM_LOAD16_BYTE( "g0000120 gme2 2 of 2,2-80.bin", 0x000001, 0x100000, CRC(8aec46ef) SHA1(e9bb853ddbeb701af7e64bab6ff6d448ee5f8416) )
ROM_REGION( 0x100000, "cg", ROMREGION_ERASE00 ) // same as igtmg133 and igtmg159
- ROM_LOAD16_BYTE( "cg1", 0x000000, 0x040000, CRC(1cda421b) SHA1(c4b4df2a0c60d5bf78b635679a1293003010e15d) )
- ROM_LOAD16_BYTE( "cg2", 0x000001, 0x040000, CRC(ebc14b9d) SHA1(37812e5de9fd1c70b700ad170290ac7e5163a7b2) )
+ ROM_LOAD16_BYTE( "c0000074 cg1 1 of 4,2-20.bin", 0x000000, 0x040000, CRC(1cda421b) SHA1(c4b4df2a0c60d5bf78b635679a1293003010e15d) )
+ ROM_LOAD16_BYTE( "c0000074 cg2 2 of 4,2-20.bin", 0x000001, 0x040000, CRC(ebc14b9d) SHA1(37812e5de9fd1c70b700ad170290ac7e5163a7b2) )
ROM_REGION32_LE( 0x200000, "pxl", 0 ) // same as igtmg133 and igtmg159
- ROM_LOAD16_BYTE( "pxl1", 0x000000, 0x100000, CRC(8fb6f1dd) SHA1(67601c63c1b915c21e69e20f8b0734a0aa243f78) )
- ROM_LOAD16_BYTE( "pxl2", 0x000001, 0x100000, CRC(f1f4c70b) SHA1(1335565e4ac6830f89f7c0dabbfe7ad9fd667e64) )
+ ROM_LOAD16_BYTE( "c0000074 pxl1 3 of 4,2-80.bin", 0x000000, 0x100000, CRC(8fb6f1dd) SHA1(67601c63c1b915c21e69e20f8b0734a0aa243f78) )
+ ROM_LOAD16_BYTE( "c0000074 pxl2 4 of 4,2-80.bin", 0x000001, 0x100000, CRC(f1f4c70b) SHA1(1335565e4ac6830f89f7c0dabbfe7ad9fd667e64) )
ROM_REGION32_LE( 0x200000, "snd", ROMREGION_ERASE00 )
ROM_LOAD( "snd", 0x000000, 0x100000, NO_DUMP ) // no sound ROMs were included (could also be 2 ROMs)
@@ -905,19 +905,19 @@ PIXEL VERSION: C0000074 - PIXEL DATE: 06/07/96 - PIXEL TIME: 14:40:00
*/
ROM_START( igtmg159 ) // was called New Multi Game in the archive, to be verified once it boots
ROM_REGION( 0x80000, "maincpu", 0 )
- ROM_LOAD( "base_m0000159", 0x00000, 0x80000, CRC(4762259a) SHA1(ea101a1626172415e66bd48700aebdabb74679c3) )
+ ROM_LOAD( "m0000159 base,1-4002.bin", 0x00000, 0x80000, CRC(4762259a) SHA1(ea101a1626172415e66bd48700aebdabb74679c3) )
ROM_REGION32_LE( 0x200000, "game", 0 )
- ROM_LOAD16_BYTE( "gme1_g0000139", 0x000000, 0x100000, CRC(3c87cadd) SHA1(3c018111f88ca37a049414426a74d9afe3215768) )
- ROM_LOAD16_BYTE( "gme2_g0000139", 0x000001, 0x100000, CRC(b39fe864) SHA1(3e53d848e9d8c1ed5f07c7b191f12704b58bb2ad) )
+ ROM_LOAD16_BYTE( "g0000139 gme1 1 of 2,2-80.bin", 0x000000, 0x100000, CRC(3c87cadd) SHA1(3c018111f88ca37a049414426a74d9afe3215768) )
+ ROM_LOAD16_BYTE( "g0000139 gme2 2 of 2,2-80.bin", 0x000001, 0x100000, CRC(b39fe864) SHA1(3e53d848e9d8c1ed5f07c7b191f12704b58bb2ad) )
ROM_REGION( 0x100000, "cg", ROMREGION_ERASE00 )
- ROM_LOAD16_BYTE( "cg1_c0000074", 0x000000, 0x040000, CRC(1cda421b) SHA1(c4b4df2a0c60d5bf78b635679a1293003010e15d) )
- ROM_LOAD16_BYTE( "cg2_c0000074", 0x000001, 0x040000, CRC(ebc14b9d) SHA1(37812e5de9fd1c70b700ad170290ac7e5163a7b2) )
+ ROM_LOAD16_BYTE( "c0000074 cg1 1 of 4,2-20.bin", 0x000000, 0x040000, CRC(1cda421b) SHA1(c4b4df2a0c60d5bf78b635679a1293003010e15d) )
+ ROM_LOAD16_BYTE( "c0000074 cg2 2 of 4,2-20.bin", 0x000001, 0x040000, CRC(ebc14b9d) SHA1(37812e5de9fd1c70b700ad170290ac7e5163a7b2) )
- ROM_REGION32_LE( 0x200000, "pxl", 0 )
- ROM_LOAD16_BYTE( "pxl1_c0000074", 0x000000, 0x100000, CRC(8fb6f1dd) SHA1(67601c63c1b915c21e69e20f8b0734a0aa243f78) )
- ROM_LOAD16_BYTE( "pxl2_c0000074", 0x000001, 0x100000, CRC(f1f4c70b) SHA1(1335565e4ac6830f89f7c0dabbfe7ad9fd667e64) )
+ ROM_REGION32_LE( 0x200000, "pxl", 0 ) // same as igtmg133 and igtmg159
+ ROM_LOAD16_BYTE( "c0000074 pxl1 3 of 4,2-80.bin", 0x000000, 0x100000, CRC(8fb6f1dd) SHA1(67601c63c1b915c21e69e20f8b0734a0aa243f78) )
+ ROM_LOAD16_BYTE( "c0000074 pxl2 4 of 4,2-80.bin", 0x000001, 0x100000, CRC(f1f4c70b) SHA1(1335565e4ac6830f89f7c0dabbfe7ad9fd667e64) )
ROM_REGION32_LE( 0x200000, "snd", ROMREGION_ERASE00 )
ROM_LOAD( "snd", 0x000000, 0x100000, NO_DUMP ) // no sound ROMs were included (could also be 2 ROMs)
@@ -930,19 +930,19 @@ PIXEL VERSION: C0000136 - PIXEL DATE: 06/02/97 - PIXEL TIME: 23:59:00
*/
ROM_START( igtmg164 )
ROM_REGION( 0x80000, "maincpu", 0 )
- ROM_LOAD( "base.402", 0x00000, 0x80000, CRC(79b438d5) SHA1(fef5e14f4f83f663adde33b5d6453399a712ff47) )
+ ROM_LOAD( "m0000164 base,1-4002.bin", 0x00000, 0x80000, CRC(79b438d5) SHA1(fef5e14f4f83f663adde33b5d6453399a712ff47) )
ROM_REGION32_LE( 0x200000, "game", 0 )
- ROM_LOAD16_BYTE( "gme1.801", 0x000000, 0x100000, CRC(ff42cd6d) SHA1(22c93cada24c9a6e9b9e3b8ae07b542c4c52c34d) )
- ROM_LOAD16_BYTE( "gme2.801", 0x000001, 0x100000, CRC(37c8d93c) SHA1(a70cc1e6cea02ef6be062889633e1e25268d643e) )
+ ROM_LOAD16_BYTE( "g0000152 gme1 1 of 2,2-80.bin", 0x000000, 0x100000, CRC(ff42cd6d) SHA1(22c93cada24c9a6e9b9e3b8ae07b542c4c52c34d) )
+ ROM_LOAD16_BYTE( "g0000152 gme2 2 of 2,2-80.bin", 0x000001, 0x100000, CRC(37c8d93c) SHA1(a70cc1e6cea02ef6be062889633e1e25268d643e) )
ROM_REGION( 0x100000, "cg", 0 )
- ROM_LOAD16_BYTE( "cg1.040", 0x000000, 0x080000, CRC(9815e9bc) SHA1(d661bf807abcecff697640f485ab854cf9ed0fa6) )
- ROM_LOAD16_BYTE( "cg2.040", 0x000001, 0x080000, CRC(cd622938) SHA1(9f235b7fccda20468925cc6487212107d63d750c) )
+ ROM_LOAD16_BYTE( "c0000136 cg1 1 of 4,2-40.bin", 0x000000, 0x080000, CRC(9815e9bc) SHA1(d661bf807abcecff697640f485ab854cf9ed0fa6) )
+ ROM_LOAD16_BYTE( "c0000136 cg2 2 of 4,2-40.bin", 0x000001, 0x080000, CRC(cd622938) SHA1(9f235b7fccda20468925cc6487212107d63d750c) )
ROM_REGION32_LE( 0x200000, "pxl", 0 )
- ROM_LOAD16_BYTE( "pxl1.801", 0x000000, 0x100000, CRC(6f20559b) SHA1(218f59f434ccb2df56e41f2371d1af0951ff48a4) ) // 2ND HALF = 00xx
- ROM_LOAD16_BYTE( "pxl2.801", 0x000001, 0x100000, CRC(2ecbc0f7) SHA1(14c0b1ee1dc2005983d64227ee85c6676c26eb7b) ) // 2ND HALF = 00xx
+ ROM_LOAD16_BYTE( "c0000136 pxl1 3 of 4,2-80.bin", 0x000000, 0x100000, CRC(6f20559b) SHA1(218f59f434ccb2df56e41f2371d1af0951ff48a4) ) // 2ND HALF = 00xx
+ ROM_LOAD16_BYTE( "c0000136 pxl2 4 of 4,2-80.bin", 0x000001, 0x100000, CRC(2ecbc0f7) SHA1(14c0b1ee1dc2005983d64227ee85c6676c26eb7b) ) // 2ND HALF = 00xx
ROM_REGION32_LE( 0x200000, "snd", ROMREGION_ERASE00 )
ROM_LOAD( "snd", 0x000000, 0x100000, NO_DUMP ) // no sound ROMs were included (could also be 2 ROMs)
@@ -955,19 +955,19 @@ PIXEL VERSION: C0000074 - PIXEL DATE: 06/07/96 - PIXEL TIME: 14:40:00
*/
ROM_START( igtmg166 )
ROM_REGION( 0x80000, "maincpu", 0 )
- ROM_LOAD( "base", 0x00000, 0x80000, CRC(bb2abc98) SHA1(7a8da6772c9e0a8cd9568b0f04ec21e33a1de004) )
+ ROM_LOAD( "m0000166 base,1-4002.bin", 0x00000, 0x80000, CRC(bb2abc98) SHA1(7a8da6772c9e0a8cd9568b0f04ec21e33a1de004) )
ROM_REGION32_LE( 0x200000, "game", 0 )
- ROM_LOAD16_BYTE( "gme1", 0x000000, 0x100000, CRC(68775094) SHA1(c3c3eb747e9c78e2cdace43b0ca25ce38d649df8) )
- ROM_LOAD16_BYTE( "gme2", 0x000001, 0x100000, CRC(37af5837) SHA1(d8973ecfd353e0987ad2e35da45a68e0e341dde7) )
+ ROM_LOAD16_BYTE( "g0000109 gme1 1 of 2,2-80.bin", 0x000000, 0x100000, CRC(68775094) SHA1(c3c3eb747e9c78e2cdace43b0ca25ce38d649df8) )
+ ROM_LOAD16_BYTE( "g0000109 gme2 2 of 2,2-80.bin", 0x000001, 0x100000, CRC(37af5837) SHA1(d8973ecfd353e0987ad2e35da45a68e0e341dde7) )
ROM_REGION( 0x100000, "cg", ROMREGION_ERASE00 ) // same as igtmg133 and igtmg159
- ROM_LOAD16_BYTE( "cg1", 0x000000, 0x040000, CRC(1cda421b) SHA1(c4b4df2a0c60d5bf78b635679a1293003010e15d) )
- ROM_LOAD16_BYTE( "cg2", 0x000001, 0x040000, CRC(ebc14b9d) SHA1(37812e5de9fd1c70b700ad170290ac7e5163a7b2) )
+ ROM_LOAD16_BYTE( "c0000074 cg1 1 of 4,2-20.bin", 0x000000, 0x040000, CRC(1cda421b) SHA1(c4b4df2a0c60d5bf78b635679a1293003010e15d) )
+ ROM_LOAD16_BYTE( "c0000074 cg2 2 of 4,2-20.bin", 0x000001, 0x040000, CRC(ebc14b9d) SHA1(37812e5de9fd1c70b700ad170290ac7e5163a7b2) )
ROM_REGION32_LE( 0x200000, "pxl", 0 ) // same as igtmg133 and igtmg159
- ROM_LOAD16_BYTE( "pxl1", 0x000000, 0x100000, CRC(8fb6f1dd) SHA1(67601c63c1b915c21e69e20f8b0734a0aa243f78) )
- ROM_LOAD16_BYTE( "pxl2", 0x000001, 0x100000, CRC(f1f4c70b) SHA1(1335565e4ac6830f89f7c0dabbfe7ad9fd667e64) )
+ ROM_LOAD16_BYTE( "c0000074 pxl1 3 of 4,2-80.bin", 0x000000, 0x100000, CRC(8fb6f1dd) SHA1(67601c63c1b915c21e69e20f8b0734a0aa243f78) )
+ ROM_LOAD16_BYTE( "c0000074 pxl2 4 of 4,2-80.bin", 0x000001, 0x100000, CRC(f1f4c70b) SHA1(1335565e4ac6830f89f7c0dabbfe7ad9fd667e64) )
ROM_REGION32_LE( 0x200000, "snd", ROMREGION_ERASE00 )
ROM_LOAD( "snd", 0x000000, 0x100000, NO_DUMP ) // no sound ROMs were included (could also be 2 ROMs)
@@ -980,23 +980,23 @@ PIXEL VERSION: C0000235 - PIXEL DATE: 09/16/98 - PIXEL TIME: 11:25:00
*/
ROM_START( igtmg214 )
ROM_REGION( 0x80000, "maincpu", 0 )
- ROM_LOAD( "base.402", 0x00000, 0x80000, CRC(f832ddd3) SHA1(6f4ba8e2967091499e84d860a7a95cd2d5a1ee6d) )
+ ROM_LOAD( "m0000214 base,1-4002.bin", 0x00000, 0x80000, CRC(f832ddd3) SHA1(6f4ba8e2967091499e84d860a7a95cd2d5a1ee6d) )
ROM_REGION32_LE( 0x200000, "game", 0 )
- ROM_LOAD16_BYTE( "gme1.080", 0x000000, 0x100000, CRC(57d530c7) SHA1(ea67b7b96b6d007ffa793a2cb209c1d0df0b5ae8) )
- ROM_LOAD16_BYTE( "gme2.080", 0x000001, 0x100000, CRC(8339edd7) SHA1(f7167ce39669a3cd6ada3be351cebb51b2fd9938) )
+ ROM_LOAD16_BYTE( "g0000177 gme1 1 of 2,2-80.bin", 0x000000, 0x100000, CRC(57d530c7) SHA1(ea67b7b96b6d007ffa793a2cb209c1d0df0b5ae8) )
+ ROM_LOAD16_BYTE( "g0000177 gme2 2 of 2,2-80.bin", 0x000001, 0x100000, CRC(8339edd7) SHA1(f7167ce39669a3cd6ada3be351cebb51b2fd9938) )
ROM_REGION( 0x100000, "cg", 0 )
- ROM_LOAD16_BYTE( "cg1.040", 0x000000, 0x080000, CRC(4b0e06d6) SHA1(33c158e7a857a2237fdd4a80b67abc158763dca1) )
- ROM_LOAD16_BYTE( "cg2.040", 0x000001, 0x080000, CRC(3e78e5be) SHA1(382a5d4c663d8132f1b17b24f6981a75cec2f0c4) )
+ ROM_LOAD16_BYTE( "c0000235 cg1 1 of 4,2-40.bin", 0x000000, 0x080000, CRC(4b0e06d6) SHA1(33c158e7a857a2237fdd4a80b67abc158763dca1) )
+ ROM_LOAD16_BYTE( "c0000235 cg2 2 of 4,2-40.bin", 0x000001, 0x080000, CRC(3e78e5be) SHA1(382a5d4c663d8132f1b17b24f6981a75cec2f0c4) )
ROM_REGION32_LE( 0x200000, "pxl", 0 )
- ROM_LOAD16_BYTE( "pxl1.080", 0x000000, 0x100000, CRC(29819cd7) SHA1(07243f6c6175b01bfdcbabe411ebec11d73aa289) )
- ROM_LOAD16_BYTE( "pxl2.080", 0x000001, 0x100000, CRC(60b92b5e) SHA1(1b8aa0d16b16705c1a7a1869f15d62da6f0c6800) )
+ ROM_LOAD16_BYTE( "c0000235 pxl1 3 of 4,2-80.bin", 0x000000, 0x100000, CRC(29819cd7) SHA1(07243f6c6175b01bfdcbabe411ebec11d73aa289) )
+ ROM_LOAD16_BYTE( "c0000235 pxl2 4 of 4,2-80.bin", 0x000001, 0x100000, CRC(60b92b5e) SHA1(1b8aa0d16b16705c1a7a1869f15d62da6f0c6800) )
ROM_REGION32_LE( 0x200000, "snd", 0 )
- ROM_LOAD( "snd1", 0x000000, 0x100000, CRC(12af1bc9) SHA1(c0d17da6aa45e4d2a8986e8ab043673733325eda) )
- ROM_LOAD( "snd2", 0x100000, 0x100000, CRC(9c68744f) SHA1(6f33b6d87ca8c6340c9ec612a6419e4e1fa6d6c3) )
+ ROM_LOAD( "swc00030 snd1 1 of 2,2-80.rom1", 0x000000, 0x100000, CRC(12af1bc9) SHA1(c0d17da6aa45e4d2a8986e8ab043673733325eda) )
+ ROM_LOAD( "swc00030 snd2 2 of 2,2-80.rom2", 0x100000, 0x100000, CRC(9c68744f) SHA1(6f33b6d87ca8c6340c9ec612a6419e4e1fa6d6c3) )
ROM_END
/*
@@ -1006,23 +1006,23 @@ PIXEL VERSION: C0000265 - PIXEL DATE: 05/05/99 - PIXEL TIME: 17:15:00
*/
ROM_START( igtmg247 ) // key00017 was in the archive
ROM_REGION( 0x80000, "maincpu", 0 )
- ROM_LOAD( "base", 0x00000, 0x80000, CRC(03cf1431) SHA1(3e7f0a1ed192ffe353424713546c2671725f1c88) )
+ ROM_LOAD( "m0000247 base,1-4002.bin", 0x00000, 0x80000, CRC(03cf1431) SHA1(3e7f0a1ed192ffe353424713546c2671725f1c88) )
ROM_REGION32_LE( 0x200000, "game", 0 )
- ROM_LOAD16_BYTE( "gme1", 0x000000, 0x100000, CRC(c9429c7b) SHA1(15d97bbbe356fa5018172d3ea1afb975b89a9840) )
- ROM_LOAD16_BYTE( "gme2", 0x000001, 0x100000, CRC(e56c617e) SHA1(80189ae9f9cca88500a038e8d729ba28b6bcf842) )
+ ROM_LOAD16_BYTE( "g0000397 gme1 1 of 2,2-80.bin", 0x000000, 0x100000, CRC(c9429c7b) SHA1(15d97bbbe356fa5018172d3ea1afb975b89a9840) )
+ ROM_LOAD16_BYTE( "g0000397 gme2 2 of 2,2-80.bin", 0x000001, 0x100000, CRC(e56c617e) SHA1(80189ae9f9cca88500a038e8d729ba28b6bcf842) )
ROM_REGION( 0x100000, "cg", 0 )
- ROM_LOAD16_BYTE( "cg1", 0x000000, 0x080000, NO_DUMP ) // not included for this set
- ROM_LOAD16_BYTE( "cg2", 0x000001, 0x080000, NO_DUMP ) // not included for this set
+ ROM_LOAD16_BYTE( "c0000265 cg1 1 of 4,2-x0.bin", 0x000000, 0x080000, NO_DUMP ) // not included for this set (x is 2==27C020, 4==270C40, 8==27C080 ROM type)
+ ROM_LOAD16_BYTE( "c0000265 cg2 2 of 4,2-x0.bin", 0x000001, 0x080000, NO_DUMP ) // not included for this set
ROM_REGION32_LE( 0x200000, "pxl", 0 )
- ROM_LOAD16_BYTE( "pxl1", 0x000000, 0x100000, CRC(88ed5614) SHA1(6dde8956d344b7aa699167fcd0260d074a74287e) )
- ROM_LOAD16_BYTE( "pxl2", 0x000001, 0x100000, CRC(b535d175) SHA1(c253344ed54a072cb6d35d816927d80c12565ab8) )
+ ROM_LOAD16_BYTE( "c0000265 pxl1 3 of 4,2-80.bin", 0x000000, 0x100000, CRC(88ed5614) SHA1(6dde8956d344b7aa699167fcd0260d074a74287e) )
+ ROM_LOAD16_BYTE( "c0000265 pxl2 4 of 4,2-80.bin", 0x000001, 0x100000, CRC(b535d175) SHA1(c253344ed54a072cb6d35d816927d80c12565ab8) )
ROM_REGION32_LE( 0x200000, "snd", 0 ) // same as gkigt4ms and others
- ROM_LOAD( "snd1", 0x000000, 0x100000, CRC(8213aeac) SHA1(4beff02fed64e607270e0e8e322a96f112bd2093) )
- ROM_LOAD( "snd2", 0x100000, 0x100000, CRC(a7ef9b46) SHA1(031373fb8e39c4ed828a58bb63a9395a205c6b6b) )
+ ROM_LOAD( "swc00046 snd1 1 of 2,2-80.rom1", 0x000000, 0x100000, CRC(8213aeac) SHA1(4beff02fed64e607270e0e8e322a96f112bd2093) )
+ ROM_LOAD( "swc00046 snd2 2 of 2,2-80.rom2", 0x100000, 0x100000, CRC(a7ef9b46) SHA1(031373fb8e39c4ed828a58bb63a9395a205c6b6b) )
ROM_END
/*
@@ -1032,23 +1032,25 @@ PIXEL VERSION: C0000351 - PIXEL DATE: 02/16/00 - PIXEL TIME: 15:40:00
*/
ROM_START( igtmg394 ) // key00017 was in the archive
ROM_REGION( 0x80000, "maincpu", 0 )
- ROM_LOAD( "base.u8", 0x00000, 0x80000, CRC(d6c48b14) SHA1(08b9a822a6822a94afcac843ff3740bbd4c53f08) )
+ ROM_LOAD( "m0000394 base,1-4002.u8", 0x00000, 0x80000, CRC(d6c48b14) SHA1(08b9a822a6822a94afcac843ff3740bbd4c53f08) )
ROM_REGION32_LE( 0x200000, "game", 0 )
- ROM_LOAD16_BYTE( "gme1.u21", 0x000000, 0x100000, CRC(64048a70) SHA1(74ab372686b3a79d09f105a1e78aba86f5d728f8) )
- ROM_LOAD16_BYTE( "gme2.u5", 0x000001, 0x100000, CRC(150315bc) SHA1(75e41a483b88e0b31c5e58a294261f4b484a4576) )
+ ROM_LOAD16_BYTE( "g0000619 gme1 1 of 2,2-80.u21", 0x000000, 0x100000, CRC(64048a70) SHA1(74ab372686b3a79d09f105a1e78aba86f5d728f8) )
+ ROM_LOAD16_BYTE( "g0000619 gme2 2 of 2,2-80.u5", 0x000001, 0x100000, CRC(150315bc) SHA1(75e41a483b88e0b31c5e58a294261f4b484a4576) )
ROM_REGION( 0x100000, "cg", 0 ) // same as gkigt4ms and others
- ROM_LOAD16_BYTE( "cg1.u48", 0x000000, 0x080000, CRC(2e841b28) SHA1(492b54e092b0d4028fd8edcb981bd1fd25dca47d) )
- ROM_LOAD16_BYTE( "cg2.u47", 0x000001, 0x080000, CRC(673fc86c) SHA1(4d844330c5602d725253b4f78781fa9e213b8556) )
+ ROM_LOAD16_BYTE( "c000351 cg1 1 of 4,2-40,ms.u30", 0x000000, 0x80000, CRC(2e841b28) SHA1(492b54e092b0d4028fd8edcb981bd1fd25dca47d) )
+ ROM_LOAD16_BYTE( "c000351 cg2 2 of 4,2-40,ms.u53", 0x000001, 0x80000, CRC(673fc86c) SHA1(4d844330c5602d725253b4f78781fa9e213b8556) )
- ROM_REGION32_LE( 0x200000, "pxl", 0 ) // same as gkigt4ms and others
- ROM_LOAD16_BYTE( "pxl1.u20", 0x000000, 0x100000, CRC(438fb625) SHA1(369c860dffa323c2e9be155da1989252f6b0e694) )
- ROM_LOAD16_BYTE( "pxl2.u4", 0x000001, 0x100000, CRC(22ec9c65) SHA1(bd944ae79faa8ceb73ed8f6f244fce6ff543ccd1) )
+ ROM_REGION32_LE( 0x200000, "pxl", 0 )
+ ROM_LOAD16_BYTE( "c000351 pxl1 3 of 4,2-80,ms.u14", 0x000000, 0x100000, CRC(438fb625) SHA1(369c860dffa323c2e9be155da1989252f6b0e694) )
+ ROM_LOAD16_BYTE( "c000351 pxl2 4 of 4,2-80,ms.u37", 0x000001, 0x100000, CRC(22ec9c65) SHA1(bd944ae79faa8ceb73ed8f6f244fce6ff543ccd1) )
- ROM_REGION32_LE( 0x200000, "snd", 0 )
- ROM_LOAD( "snd1.u6", 0x000000, 0x100000, CRC(9c40caa2) SHA1(14c3ce95e09411325d219377dadf754a8bc9fad6) )
- ROM_LOAD( "snd2.u7", 0x100000, 0x100000, CRC(eaf1b8df) SHA1(b336afdb0edbc8f864f873285b29e9998819c782) )
+ ROM_REGION32_LE( 0x200000, "snd", 0 ) // Notes say snd1.u6 & snd2.u7 are swc0046 and "not used" but don't match known swc0046 sets
+ ROM_LOAD( "snd1.u6", 0x000000, 0x100000, CRC(9c40caa2) SHA1(14c3ce95e09411325d219377dadf754a8bc9fad6) ) // The listed checksum8 didn't match checksum8 for swc0046 ROMs
+ ROM_LOAD( "snd2.u7", 0x100000, 0x100000, CRC(eaf1b8df) SHA1(b336afdb0edbc8f864f873285b29e9998819c782) ) // The listed checksum8 didn't match checksum8 for swc0046 ROMs
+ ROM_LOAD( "swc00046 snd1 1 of 2,2-80.rom1", 0x000000, 0x100000, CRC(8213aeac) SHA1(4beff02fed64e607270e0e8e322a96f112bd2093) ) // load in swc0046 sound ROMs because they were specifically mentioned in readme / notes
+ ROM_LOAD( "swc00046 snd2 2 of 2,2-80.rom2", 0x100000, 0x100000, CRC(a7ef9b46) SHA1(031373fb8e39c4ed828a58bb63a9395a205c6b6b) )
ROM_END
/*
@@ -1056,25 +1058,25 @@ GAME VERSION: G0001125 - GAME DATE: 11/27/01 - GAME TIME: 15:11:00
CONFIG VERSION: M0000535 - CONFIG DATE: 02/01/01 - CONFIG TIME: 10:30:00
PIXEL VERSION: C0000351 - PIXEL DATE: 02/16/00 - PIXEL TIME: 15:40:00
*/
-ROM_START( igtmg535 )
+ROM_START( igtmg535 ) // close to gkigtez? Same graphics & sound, game ROMs G0001126 vs this games G0001125
ROM_REGION( 0x80000, "maincpu", 0 )
- ROM_LOAD( "base.042", 0x00000, 0x80000, CRC(4577258e) SHA1(ad3b907727f7cef71d73e58ec4e43ff6bb092129) )
+ ROM_LOAD( "m0000535 base,1-4002.bin", 0x00000, 0x80000, CRC(4577258e) SHA1(ad3b907727f7cef71d73e58ec4e43ff6bb092129) )
ROM_REGION32_LE( 0x200000, "game", 0 )
- ROM_LOAD16_BYTE( "gme1.080", 0x000000, 0x100000, CRC(d4d2e987) SHA1(4c0ffc02d7dcc8f94828763e12e61d926d30d749) )
- ROM_LOAD16_BYTE( "gme2.080", 0x000001, 0x100000, CRC(9068fbac) SHA1(223efff9823cd92a4f83b74986c47bc2a8e4420f) )
+ ROM_LOAD16_BYTE( "g0001125 gme1 1 of 2,2-80.bin", 0x000000, 0x100000, CRC(d4d2e987) SHA1(4c0ffc02d7dcc8f94828763e12e61d926d30d749) )
+ ROM_LOAD16_BYTE( "g0001125 gme2 2 of 2,2-80.bin", 0x000001, 0x100000, CRC(9068fbac) SHA1(223efff9823cd92a4f83b74986c47bc2a8e4420f) )
ROM_REGION( 0x100000, "cg", 0 )
- ROM_LOAD16_BYTE( "cg1.040", 0x000000, 0x080000, CRC(2e841b28) SHA1(492b54e092b0d4028fd8edcb981bd1fd25dca47d) )
- ROM_LOAD16_BYTE( "cg2.040", 0x000001, 0x080000, CRC(673fc86c) SHA1(4d844330c5602d725253b4f78781fa9e213b8556) )
+ ROM_LOAD16_BYTE( "c000351 cg1 1 of 4,2-40,ms.u30", 0x000000, 0x80000, CRC(2e841b28) SHA1(492b54e092b0d4028fd8edcb981bd1fd25dca47d) )
+ ROM_LOAD16_BYTE( "c000351 cg2 2 of 4,2-40,ms.u53", 0x000001, 0x80000, CRC(673fc86c) SHA1(4d844330c5602d725253b4f78781fa9e213b8556) )
ROM_REGION32_LE( 0x200000, "pxl", 0 )
- ROM_LOAD16_BYTE( "pxl1.u20", 0x000000, 0x100000, CRC(438fb625) SHA1(369c860dffa323c2e9be155da1989252f6b0e694) )
- ROM_LOAD16_BYTE( "pxl2.u4", 0x000001, 0x100000, CRC(22ec9c65) SHA1(bd944ae79faa8ceb73ed8f6f244fce6ff543ccd1) )
+ ROM_LOAD16_BYTE( "c000351 pxl1 3 of 4,2-80,ms.u14", 0x000000, 0x100000, CRC(438fb625) SHA1(369c860dffa323c2e9be155da1989252f6b0e694) )
+ ROM_LOAD16_BYTE( "c000351 pxl2 4 of 4,2-80,ms.u37", 0x000001, 0x100000, CRC(22ec9c65) SHA1(bd944ae79faa8ceb73ed8f6f244fce6ff543ccd1) )
- ROM_REGION32_LE( 0x200000, "snd", 0 )
- ROM_LOAD( "snd1", 0x000000, 0x100000, CRC(8213aeac) SHA1(4beff02fed64e607270e0e8e322a96f112bd2093) )
- ROM_LOAD( "snd2", 0x100000, 0x100000, CRC(a7ef9b46) SHA1(031373fb8e39c4ed828a58bb63a9395a205c6b6b) )
+ ROM_REGION32_LE( 0x200000, "snd", 0 ) // same as gkigt4
+ ROM_LOAD( "swc00046 snd1 1 of 2,2-80.rom1", 0x000000, 0x100000, CRC(8213aeac) SHA1(4beff02fed64e607270e0e8e322a96f112bd2093) )
+ ROM_LOAD( "swc00046 snd2 2 of 2,2-80.rom2", 0x100000, 0x100000, CRC(a7ef9b46) SHA1(031373fb8e39c4ed828a58bb63a9395a205c6b6b) )
ROM_END
ROM_START( gkigt4 )
@@ -1231,11 +1233,11 @@ PIXEL VERSION: C000???? - PIXEL DATE: ??/??/?? - PIXEL TIME: ??:??:??
*/
ROM_START( munsters ) // key00017 was in the archive
ROM_REGION( 0x80000, "maincpu", 0 )
- ROM_LOAD( "base.042", 0x00000, 0x80000, CRC(d173af36) SHA1(d6b468e1aecf849deee7e37a906c16f8b1cdd721) )
+ ROM_LOAD( "i0000500 base,1-4002.bin", 0x00000, 0x80000, CRC(d173af36) SHA1(d6b468e1aecf849deee7e37a906c16f8b1cdd721) )
ROM_REGION32_LE( 0x200000, "game", 0 )
- ROM_LOAD16_BYTE( "gme1.801", 0x000000, 0x100000, CRC(5ad6361b) SHA1(e7d45f37ecd4b725665f39d8ce0db6bd8de9ea26) )
- ROM_LOAD16_BYTE( "gme2.801", 0x000001, 0x100000, CRC(62f65eef) SHA1(df3d777847d23b9d9e7f6b1edb048cadcbf1cb33) )
+ ROM_LOAD16_BYTE( "g0000912 gme1 1 of 2,2-80.bin", 0x000000, 0x100000, CRC(5ad6361b) SHA1(e7d45f37ecd4b725665f39d8ce0db6bd8de9ea26) )
+ ROM_LOAD16_BYTE( "g0000912 gme1 2 of 2,2-80.bin", 0x000001, 0x100000, CRC(62f65eef) SHA1(df3d777847d23b9d9e7f6b1edb048cadcbf1cb33) )
ROM_REGION32_LE( 0x100000, "game_clrram", 0 ) // ??
ROM_LOAD16_BYTE( "gme1clrram.040", 0x000000, 0x080000, CRC(84848907) SHA1(3474af27304b96e8946315e0f10be2608444f533) )
diff --git a/src/mame/konami/twin16.cpp b/src/mame/konami/twin16.cpp
index 7d65f2fb352..aa9b8945781 100644
--- a/src/mame/konami/twin16.cpp
+++ b/src/mame/konami/twin16.cpp
@@ -58,8 +58,6 @@ Known Issues:
#include "speaker.h"
-
-
int twin16_state::spriteram_process_enable()
{
return (m_CPUA_register & 0x40) == 0;
@@ -133,6 +131,7 @@ void fround_state::fround_CPU_register_w(offs_t offset, uint16_t data, uint16_t
*/
uint16_t old = m_CPUA_register;
COMBINE_DATA(&m_CPUA_register);
+
if (m_CPUA_register != old)
{
if ((old & 0x08) == 0 && (m_CPUA_register & 0x08))
@@ -171,7 +170,7 @@ void twin16_state::sound_map(address_map &map)
map(0xd000, 0xd000).w(m_upd7759, FUNC(upd7759_device::port_w));
map(0xe000, 0xe000).w(FUNC(twin16_state::upd_start_w));
map(0xf000, 0xf000).r(FUNC(twin16_state::upd_busy_r)); // miaj writes 0 to it
- }
+}
void twin16_state::main_map(address_map &map)
{
diff --git a/src/mame/mame.lst b/src/mame/mame.lst
index 8aedfd14070..0c77c411eed 100644
--- a/src/mame/mame.lst
+++ b/src/mame/mame.lst
@@ -20180,6 +20180,7 @@ lucky8j // 199?, hack
lucky8k // (c) 1989 Wing. With CPU NEC D315-5136
lucky8l // (c) 1989 Wing Co. Ltd
lucky8m // (c) 1989 Wing Co. Ltd
+lucky8n // (c) 1989 Wing Co. Ltd
luckybar // unknown
luckylad // (c) 1985 Wing Co. Ltd
magodds // 198? (c) Micro Manufacturing Ltd.
@@ -42917,6 +42918,9 @@ vector3 //
@source:skeleton/vectrix.cpp
vectrix // (c) 19?? Olympia?
+@source:skeleton/venteta.cpp
+venteta
+
@source:skeleton/vgame.cpp
hilice //
diff --git a/src/mame/misc/ampoker2.cpp b/src/mame/misc/ampoker2.cpp
index 42c96cd8bca..484a136d146 100644
--- a/src/mame/misc/ampoker2.cpp
+++ b/src/mame/misc/ampoker2.cpp
@@ -653,7 +653,7 @@ void ampoker2_state::io_map(address_map &map)
map(0x36, 0x36).w(FUNC(ampoker2_state::port36_w)); /* see write handlers */
map(0x37, 0x37).w(FUNC(ampoker2_state::watchdog_reset_w));
map(0x38, 0x39).w("aysnd", FUNC(ay8910_device::address_data_w));
- map(0x3A, 0x3A).r("aysnd", FUNC(ay8910_device::data_r));
+ map(0x3a, 0x3a).r("aysnd", FUNC(ay8910_device::data_r));
}
/*
diff --git a/src/mame/misc/mole.cpp b/src/mame/misc/mole.cpp
index 016834683a1..6a1e913aed7 100644
--- a/src/mame/misc/mole.cpp
+++ b/src/mame/misc/mole.cpp
@@ -254,20 +254,20 @@ static INPUT_PORTS_START( mole )
PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("IN0") /* 0x8d40 */
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P1 Pad 1") PORT_CODE(KEYCODE_1_PAD)
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P1 Pad 2") PORT_CODE(KEYCODE_2_PAD)
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P1 Pad 3") PORT_CODE(KEYCODE_3_PAD)
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P1 Pad 4") PORT_CODE(KEYCODE_4_PAD)
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P1 Pad 5") PORT_CODE(KEYCODE_5_PAD)
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P1 Pad 6") PORT_CODE(KEYCODE_6_PAD)
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P1 Pad 7") PORT_CODE(KEYCODE_7_PAD)
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P1 Pad 8") PORT_CODE(KEYCODE_8_PAD)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("P1 Pad 1") PORT_CODE(KEYCODE_1_PAD)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("P1 Pad 2") PORT_CODE(KEYCODE_2_PAD)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("P1 Pad 3") PORT_CODE(KEYCODE_3_PAD)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("P1 Pad 4") PORT_CODE(KEYCODE_4_PAD)
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_NAME("P1 Pad 5") PORT_CODE(KEYCODE_5_PAD)
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON6 ) PORT_NAME("P1 Pad 6") PORT_CODE(KEYCODE_6_PAD)
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON7 ) PORT_NAME("P1 Pad 7") PORT_CODE(KEYCODE_7_PAD)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON8 ) PORT_NAME("P1 Pad 8") PORT_CODE(KEYCODE_8_PAD)
PORT_START("IN1") /* 0x8d80 */
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P1 Pad 9") PORT_CODE(KEYCODE_9_PAD)
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P2 Pad 1") PORT_CODE(KEYCODE_Q) PORT_COCKTAIL
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P2 Pad 2") PORT_CODE(KEYCODE_W) PORT_COCKTAIL
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P2 Pad 3") PORT_CODE(KEYCODE_E) PORT_COCKTAIL
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON9 ) PORT_NAME("P1 Pad 9") PORT_CODE(KEYCODE_9_PAD)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("P2 Pad 1") PORT_CODE(KEYCODE_Q) PORT_COCKTAIL
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("P2 Pad 2") PORT_CODE(KEYCODE_W) PORT_COCKTAIL
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("P2 Pad 3") PORT_CODE(KEYCODE_E) PORT_COCKTAIL
PORT_DIPNAME( 0x10, 0x00, DEF_STR( Cabinet ) )
PORT_DIPSETTING( 0x00, DEF_STR( Upright ) )
PORT_DIPSETTING( 0x10, DEF_STR( Cocktail ) )
@@ -276,12 +276,12 @@ static INPUT_PORTS_START( mole )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN1 )
PORT_START("IN2") /* 0x8dc0 */
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P2 Pad 8") PORT_CODE(KEYCODE_X) PORT_COCKTAIL
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P2 Pad 7") PORT_CODE(KEYCODE_Z) PORT_COCKTAIL
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P2 Pad 4") PORT_CODE(KEYCODE_A) PORT_COCKTAIL
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P2 Pad 9") PORT_CODE(KEYCODE_C) PORT_COCKTAIL
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P2 Pad 6") PORT_CODE(KEYCODE_D) PORT_COCKTAIL
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P2 Pad 5") PORT_CODE(KEYCODE_S) PORT_COCKTAIL
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON8 ) PORT_NAME("P2 Pad 8") PORT_CODE(KEYCODE_X) PORT_COCKTAIL
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON7 ) PORT_NAME("P2 Pad 7") PORT_CODE(KEYCODE_Z) PORT_COCKTAIL
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("P2 Pad 4") PORT_CODE(KEYCODE_A) PORT_COCKTAIL
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON9 ) PORT_NAME("P2 Pad 9") PORT_CODE(KEYCODE_C) PORT_COCKTAIL
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON6 ) PORT_NAME("P2 Pad 6") PORT_CODE(KEYCODE_D) PORT_COCKTAIL
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_NAME("P2 Pad 5") PORT_CODE(KEYCODE_S) PORT_COCKTAIL
PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_UNUSED )
INPUT_PORTS_END
diff --git a/src/mame/misc/vroulet.cpp b/src/mame/misc/vroulet.cpp
index 5344c1b2f38..4537cabb0f6 100644
--- a/src/mame/misc/vroulet.cpp
+++ b/src/mame/misc/vroulet.cpp
@@ -37,10 +37,12 @@ Tomasz Slanina 20050225
*/
#include "emu.h"
+
#include "cpu/z80/z80.h"
#include "machine/i8255.h"
#include "machine/nvram.h"
#include "sound/ay8910.h"
+
#include "emupal.h"
#include "screen.h"
#include "speaker.h"
@@ -52,8 +54,8 @@ namespace {
class vroulet_state : public driver_device
{
public:
- vroulet_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ vroulet_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_gfxdecode(*this, "gfxdecode"),
m_palette(*this, "palette"),
@@ -64,6 +66,9 @@ class vroulet_state : public driver_device
void vroulet(machine_config &config);
+protected:
+ virtual void video_start() override ATTR_COLD;
+
private:
required_device m_maincpu;
required_device m_gfxdecode;
@@ -85,8 +90,6 @@ class vroulet_state : public driver_device
TILE_GET_INFO_MEMBER(get_bg_tile_info);
- virtual void video_start() override ATTR_COLD;
-
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
void vroulet_io_map(address_map &map) ATTR_COLD;
void vroulet_map(address_map &map) ATTR_COLD;
@@ -95,7 +98,6 @@ class vroulet_state : public driver_device
/* video */
-
void vroulet_state::paletteram_w(offs_t offset, uint8_t data)
{
/*
@@ -103,15 +105,15 @@ void vroulet_state::paletteram_w(offs_t offset, uint8_t data)
but... each palette has 8 colors only, not 16 as expected...
*/
- int i,j,a,b;
m_generic_paletteram_8[offset]=data;
- for(i=0;i<32;i++)
+
+ for (int i = 0; i < 32; i++)
{
- for(j=0;j<16;j++)
+ for (int j = 0; j < 16; j++)
{
- a=m_generic_paletteram_8[((i*8+j)*2)&0xff ];
- b=m_generic_paletteram_8[((i*8+j)*2+1)&0xff ];
- m_palette->set_pen_color(i*16+j,pal4bit(b),pal4bit(b>>4),pal4bit(a));
+ int a = m_generic_paletteram_8[((i * 8 + j) * 2) & 0xff];
+ int b = m_generic_paletteram_8[((i * 8 + j) * 2 + 1) & 0xff];
+ m_palette->set_pen_color(i * 16 + j, pal4bit(b), pal4bit(b >> 4), pal4bit(a));
}
}
}
@@ -151,6 +153,7 @@ uint32_t vroulet_state::screen_update(screen_device &screen, bitmap_ind16 &bitma
m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0);
m_gfxdecode->gfx(0)->transpen(bitmap,cliprect, 0x320, 1, 0, 0,
m_ball[1], m_ball[0] - 12, 0);
+
return 0;
}
@@ -271,21 +274,21 @@ static const gfx_layout charlayout =
/* Graphics Decode Information */
static GFXDECODE_START( gfx_vroulet )
- GFXDECODE_ENTRY( "gfx1", 0x0000, charlayout, 0, 32 )
+ GFXDECODE_ENTRY( "gfx1", 0x0000, charlayout, 0, 32 )
GFXDECODE_END
/* PPI8255 Interface */
-void vroulet_state::ppi8255_a_w(uint8_t data) {}// watchdog ?
-void vroulet_state::ppi8255_b_w(uint8_t data) {}// lamps ?
-void vroulet_state::ppi8255_c_w(uint8_t data) {}
+void vroulet_state::ppi8255_a_w(uint8_t data) { } // watchdog ?
+void vroulet_state::ppi8255_b_w(uint8_t data) { } // lamps ?
+void vroulet_state::ppi8255_c_w(uint8_t data) { }
/* Machine Driver */
void vroulet_state::vroulet(machine_config &config)
{
// basic machine hardware
- Z80(config, m_maincpu, 4000000); //???
+ Z80(config, m_maincpu, 4000000); // ???
m_maincpu->set_addrmap(AS_PROGRAM, &vroulet_state::vroulet_map);
m_maincpu->set_addrmap(AS_IO, &vroulet_state::vroulet_io_map);
m_maincpu->set_vblank_int("screen", FUNC(vroulet_state::irq0_line_hold));
diff --git a/src/mame/namco/baraduke.cpp b/src/mame/namco/baraduke.cpp
index e24782b5635..8500cd479fb 100644
--- a/src/mame/namco/baraduke.cpp
+++ b/src/mame/namco/baraduke.cpp
@@ -97,9 +97,6 @@ PCB Layout
written out of order and hooking them up in the usual way causes the MCU to
stop receiving interrupts.
-- remove the sound kludge in Baraduke. This might actually be a feature of the
- CUS30 chip.
-
DIP locations verified for:
--------------------------
@@ -154,7 +151,6 @@ class baraduke_state : public driver_device
uint8_t inputport_r();
void lamps_w(uint8_t data);
void irq_ack_w(uint8_t data);
- uint8_t soundkludge_r();
void videoram_w(offs_t offset, uint8_t data);
void textram_w(offs_t offset, uint8_t data);
template void scroll_w(offs_t offset, uint8_t data);
@@ -187,7 +183,6 @@ class baraduke_state : public driver_device
output_finder<2> m_lamps;
uint8_t m_inputport_selected = 0;
- uint16_t m_counter = 0;
tilemap_t *m_tx_tilemap = nullptr;
tilemap_t *m_bg_tilemap[2]{};
uint16_t m_xscroll[2]{};
@@ -251,11 +246,12 @@ void baraduke_state::palette(palette_device &palette) const
***************************************************************************/
-// convert from 32x32 to 36x28
TILEMAP_MAPPER_MEMBER(baraduke_state::tx_tilemap_scan)
{
+ // convert from 32x32 to 36x28
row += 2;
col -= 2;
+
if (col & 0x20)
return row + ((col & 0x1f) << 5);
else
@@ -378,7 +374,7 @@ void baraduke_state::spriteram_w(offs_t offset, uint8_t data)
void baraduke_state::draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
uint8_t *spriteram = m_spriteram + 0x1800;
- const uint8_t *source = &spriteram[0x0800 - 32]; // the last is NOT a sprite
+ const uint8_t *source = &spriteram[0x0800 - 32]; // the last is NOT a sprite
const uint8_t *finish = &spriteram[0x0000];
int const sprite_xoffs = spriteram[0x07f5] - 256 * (spriteram[0x07f4] & 1);
@@ -392,14 +388,14 @@ void baraduke_state::draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, c
while (source >= finish)
{
-/*
- source[10] S-FT ---P
- source[11] TTTT TTTT
- source[12] CCCC CCCX
- source[13] XXXX XXXX
- source[14] ---T -S-F
- source[15] YYYY YYYY
-*/
+ /* sprite format:
+ source[10] S-FT ---P
+ source[11] TTTT TTTT
+ source[12] CCCC CCCX
+ source[13] XXXX XXXX
+ source[14] ---T -S-F
+ source[15] YYYY YYYY
+ */
int const priority = source[10] & 0x01;
uint32_t const pri_mask = priority ? 0 : GFX_PMASK_2;
int const attr1 = source[10];
@@ -573,18 +569,9 @@ void baraduke_state::main_map(address_map &map)
map(0x6000, 0xffff).rom();
}
-uint8_t baraduke_state::soundkludge_r()
-{
- uint8_t ret = (m_counter >> 4) & 0xff;
- if (!machine().side_effects_disabled())
- m_counter++;
- return ret;
-}
-
void baraduke_state::mcu_map(address_map &map)
{
map(0x1000, 0x13ff).rw(m_cus30, FUNC(namco_cus30_device::namcos1_cus30_r), FUNC(namco_cus30_device::namcos1_cus30_w)); // PSG device, shared RAM
- map(0x1105, 0x1105).r(FUNC(baraduke_state::soundkludge_r)); // cures speech
map(0x8000, 0xbfff).rom().region("mcusub", 0); // MCU external ROM
map(0x8000, 0x8000).nopw(); // watchdog reset?
map(0x8800, 0x8800).nopw(); // IRQ acknowledge?
@@ -745,7 +732,6 @@ void baraduke_state::machine_start()
m_lamps.resolve();
save_item(NAME(m_inputport_selected));
- save_item(NAME(m_counter));
}
@@ -759,10 +745,10 @@ void baraduke_state::baraduke(machine_config &config)
m_mcu->set_addrmap(AS_PROGRAM, &baraduke_state::mcu_map);
m_mcu->in_p1_cb().set(FUNC(baraduke_state::inputport_r));
m_mcu->out_p1_cb().set(FUNC(baraduke_state::inputport_select_w));
- m_mcu->in_p2_cb().set_constant(0xff); // LEDs won't work otherwise
+ m_mcu->in_p2_cb().set_constant(0xff); // LEDs won't work otherwise
m_mcu->out_p2_cb().set(FUNC(baraduke_state::lamps_w));
- config.set_maximum_quantum(attotime::from_hz(6000)); // we need heavy synch
+ config.set_maximum_quantum(attotime::from_hz(6000)); // we need heavy synch
WATCHDOG_TIMER(config, "watchdog");
diff --git a/src/mame/omori/battlex.cpp b/src/mame/omori/battlex.cpp
index 45a40af8c05..89ff70feeb3 100644
--- a/src/mame/omori/battlex.cpp
+++ b/src/mame/omori/battlex.cpp
@@ -51,9 +51,6 @@
00011000 0x74 88844777
-
-
-
TO DO :
- missing starfield
@@ -169,6 +166,13 @@ class dodgeman_state : public battlex_state
void io_map(address_map &map) ATTR_COLD;
};
+
+/*************************************
+ *
+ * Video hardware
+ *
+ *************************************/
+
void battlex_state::palette_w(offs_t offset, uint8_t data)
{
int const palette_num = offset / 8;
@@ -479,7 +483,6 @@ void battlex_state::battlex(machine_config &config)
m_maincpu->set_addrmap(AS_IO, &battlex_state::io_map);
m_maincpu->set_periodic_int(FUNC(battlex_state::interrupt), attotime::from_hz(400)); // controls game speed?
-
// video hardware
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
screen.set_refresh_hz(60);
@@ -503,7 +506,6 @@ void dodgeman_state::dodgeman(machine_config &config)
m_maincpu->set_addrmap(AS_IO, &dodgeman_state::io_map);
-
AY8910(config, "ay2", XTAL(10'000'000) / 8).add_route(ALL_OUTPUTS, "mono", 0.40); // divider not verified
}
diff --git a/src/mame/omori/carjmbre.cpp b/src/mame/omori/carjmbre.cpp
index 90f6953f821..8782792fe9c 100644
--- a/src/mame/omori/carjmbre.cpp
+++ b/src/mame/omori/carjmbre.cpp
@@ -42,10 +42,12 @@
***************************************************************************/
#include "emu.h"
+
#include "cpu/z80/z80.h"
#include "machine/gen_latch.h"
#include "sound/ay8910.h"
#include "video/resnet.h"
+
#include "emupal.h"
#include "screen.h"
#include "speaker.h"
@@ -67,6 +69,13 @@ class carjmbre_state : public driver_device
m_palette(*this, "palette")
{ }
+ void carjmbre(machine_config &config);
+
+protected:
+ virtual void machine_start() override ATTR_COLD;
+ virtual void video_start() override ATTR_COLD;
+
+private:
// devices/pointers
required_device m_maincpu;
required_device m_audiocpu;
@@ -90,21 +99,13 @@ class carjmbre_state : public driver_device
void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);
TILE_GET_INFO_MEMBER(get_tile_info);
- void carjmbre(machine_config &config);
void main_map(address_map &map) ATTR_COLD;
void sound_io_map(address_map &map) ATTR_COLD;
void sound_map(address_map &map) ATTR_COLD;
-protected:
- virtual void machine_start() override ATTR_COLD;
- virtual void video_start() override ATTR_COLD;
};
void carjmbre_state::machine_start()
{
- // zerofill
- m_nmi_enabled = false;
- m_bgcolor = 0;
-
// register for savestates
save_item(NAME(m_nmi_enabled));
save_item(NAME(m_bgcolor));
diff --git a/src/mame/omori/popper.cpp b/src/mame/omori/popper.cpp
index 9e48793ee63..740c2075bac 100644
--- a/src/mame/omori/popper.cpp
+++ b/src/mame/omori/popper.cpp
@@ -39,10 +39,12 @@
***************************************************************************/
#include "emu.h"
+
#include "cpu/z80/z80.h"
#include "machine/74259.h"
#include "sound/ay8910.h"
#include "video/resnet.h"
+
#include "emupal.h"
#include "screen.h"
#include "speaker.h"
diff --git a/src/mame/omori/spaceg.cpp b/src/mame/omori/spaceg.cpp
index 3f9ecf37a00..19583c219ba 100644
--- a/src/mame/omori/spaceg.cpp
+++ b/src/mame/omori/spaceg.cpp
@@ -168,6 +168,7 @@ SBC-A |-----------------------------|
#include "cpu/z80/z80.h"
#include "sound/samples.h"
#include "sound/sn76477.h"
+
#include "emupal.h"
#include "screen.h"
#include "speaker.h"
@@ -184,8 +185,8 @@ namespace {
class spaceg_state : public driver_device
{
public:
- spaceg_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ spaceg_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
m_colorram(*this, "colorram"),
m_videoram(*this, "videoram"),
m_io9400(*this, "io9400"),
@@ -238,6 +239,7 @@ void spaceg_state::driver_start()
save_item(NAME(m_sound3));
}
+
/*************************************
*
* Video emulation
@@ -251,7 +253,7 @@ void spaceg_state::spaceg_palette(palette_device &palette) const
// proms are currently undumped...
palette.set_pen_color( 0, rgb_t(0x00, 0x00, 0x00)); //ok czarny
- palette.set_pen_color( 1, rgb_t(0x7f, 0x00, 0x00));//???
+ palette.set_pen_color( 1, rgb_t(0x7f, 0x00, 0x00)); //???
palette.set_pen_color( 2, rgb_t(0xff, 0xff, 0xff)); //ok+ bialy
palette.set_pen_color( 3, rgb_t(0xff, 0x00, 0x00)); //ok j.czerw.
palette.set_pen_color( 4, rgb_t(0x3f, 0x3f, 0xff)); //ok j.niebieski
@@ -261,12 +263,12 @@ void spaceg_state::spaceg_palette(palette_device &palette) const
palette.set_pen_color( 8, rgb_t(0xff, 0x7f, 0x00)); //ok+ pomaranczowy
palette.set_pen_color( 9, rgb_t(0x3f, 0xbf, 0xff)); //ok j.niebieski (ciemniejszy od 13)
- palette.set_pen_color(10, rgb_t(0x3f, 0xbf, 0x3f)); //ok+ c.zielony
- palette.set_pen_color(11, rgb_t(0x00, 0xff, 0x00)); //ok j.zielony
- palette.set_pen_color(12, rgb_t(0x7f, 0x00, 0x00)); //ok brazowy (c.czerw)
- palette.set_pen_color(13, rgb_t(0x7f, 0xbf, 0xff)); //ok j.niebieski (jasniejszy od 9)
- palette.set_pen_color(14, rgb_t(0x00, 0xff, 0xff));//???
- palette.set_pen_color(15, rgb_t(0x7f, 0x7f, 0x7f));//???
+ palette.set_pen_color(10, rgb_t(0x3f, 0xbf, 0x3f)); //ok+ c.zielony
+ palette.set_pen_color(11, rgb_t(0x00, 0xff, 0x00)); //ok j.zielony
+ palette.set_pen_color(12, rgb_t(0x7f, 0x00, 0x00)); //ok brazowy (c.czerw)
+ palette.set_pen_color(13, rgb_t(0x7f, 0xbf, 0xff)); //ok j.niebieski (jasniejszy od 9)
+ palette.set_pen_color(14, rgb_t(0x00, 0xff, 0xff)); //???
+ palette.set_pen_color(15, rgb_t(0x7f, 0x7f, 0x7f)); //???
}
void spaceg_state::zvideoram_w(offs_t offset, uint8_t data)
@@ -290,8 +292,8 @@ void spaceg_state::zvideoram_w(offs_t offset, uint8_t data)
vram_data |= sdata;
// update colorram
- if (sdata&0xff00) m_colorram[offset] = col;
- if (sdata&0x00ff) m_colorram[offset2] = col;
+ if (sdata & 0xff00) m_colorram[offset] = col;
+ if (sdata & 0x00ff) m_colorram[offset2] = col;
break;
// erase
@@ -305,18 +307,16 @@ void spaceg_state::zvideoram_w(offs_t offset, uint8_t data)
return;
}
- m_videoram[offset]=vram_data>>8;
- m_videoram[offset2]=vram_data&0xff;
+ m_videoram[offset] = vram_data >> 8;
+ m_videoram[offset2] = vram_data & 0xff;
}
uint8_t spaceg_state::colorram_r(offs_t offset)
{
- int rgbcolor;
-
if (offset < 0x400)
{
- rgbcolor = (m_colorram[offset] << 1) | ((offset &0x100) >> 8);
+ int rgbcolor = (m_colorram[offset] << 1) | ((offset & 0x100) >> 8);
if ((offset >= 0x200) && (offset < 0x220)) /* 0xa200- 0xa21f */
{
@@ -361,6 +361,13 @@ uint32_t spaceg_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap
return 0;
}
+
+/*************************************
+ *
+ * Sound emulation
+ *
+ *************************************/
+
static const char *const invaders_sample_names[] =
{
"*invaders",
@@ -418,6 +425,7 @@ void spaceg_state::sound3_w(uint8_t data)
if (data & ~0x0f) logerror("spaceg sound3 unmapped %02x\n", data & ~0x0f);
}
+
/*************************************
*
* Memory maps
@@ -454,7 +462,6 @@ void spaceg_state::spaceg_map(address_map &map)
}
-
/*************************************
*
* Input ports
diff --git a/src/mame/omori/yakyuken.cpp b/src/mame/omori/yakyuken.cpp
index beb93847b8e..a252163c8cf 100644
--- a/src/mame/omori/yakyuken.cpp
+++ b/src/mame/omori/yakyuken.cpp
@@ -1,9 +1,14 @@
// license:BSD-3-Clause
-// copyright-holders:
+// copyright-holders: hap
/*
+
Bootleg of Omori's 野球拳 - The Yakyuken
+It's a strip rock-paper-scissors game in a cocktail cabinet, each side has
+7 buttons. One of the buttons apparently is for relinquishing controls to
+the other side.
+
PCB is marked 20282 and LC (stands for "lato componenti", so components side)
with a small riser board marked W 15482 plugged into one of the main CPU ROMs'
sockets
@@ -13,25 +18,30 @@ SGS Z80CPUB1 main CPU (clock measured 3.07 MHz)
18.432 MHz XTAL
SGS Z80CPUB1 audio CPU (clock measured 1.53 MHz)
AY-3-8910 sound chip
-MK4802 RAM (near audio CPU) and snd chip Ay-3-8910
+MK4802 RAM (near audio CPU)
6x 2114 RAM (near GFX ROMs)
Bank of 8 switches
The riser board has a pair of HM4334 1K*4 static RAMs and a quad 2-input NAND gate.
TODO:
-- sound
-- is visible area correct?
-- remaining DIPs
-- colors aren't 100% correct (see i.e. the stripes in the curtains)
- reference video: https://www.youtube.com/watch?v=zTOFIhuwR2w
-*/
+- dump/add Omori's version, it's assumed it will have a title screen, as seen
+ inside the gfx roms (OEC logo is still in there too)
+- find out win rate dipswitch values, or is it max payout rate?
+- doesn't it have a hopper? or maybe the bootleg version removed that?
+- game sometimes leaves gaps when the lady is undressing
+- colors aren't 100% correct (see i.e. the stripes in the curtains), reference video:
+ https://www.youtube.com/watch?v=zTOFIhuwR2w
+- verify sound pitch (unfortunately, no pcb sound in above video)
+- verify irq frequency, though it looks similar to the pcb video
+*/
#include "emu.h"
#include "cpu/z80/z80.h"
#include "machine/gen_latch.h"
+#include "machine/nvram.h"
#include "sound/ay8910.h"
#include "emupal.h"
@@ -50,30 +60,34 @@ class yakyuken_state : public driver_device
m_maincpu(*this, "maincpu"),
m_audiocpu(*this, "audiocpu"),
m_gfxdecode(*this, "gfxdecode"),
- m_bgram(*this, "bgram"),
- m_fgram(*this, "fgram")
+ m_screen(*this, "screen"),
+ m_ay(*this, "ay"),
+ m_vram(*this, "vram", 0x400*2, ENDIANNESS_LITTLE)
{ }
void yakyuken(machine_config &config);
protected:
+ virtual void machine_start() override ATTR_COLD;
virtual void video_start() override ATTR_COLD;
private:
required_device m_maincpu;
required_device m_audiocpu;
required_device m_gfxdecode;
+ required_device m_screen;
+ required_device m_ay;
+
+ memory_share_creator m_vram;
- required_shared_ptr m_bgram;
- required_shared_ptr m_fgram;
+ uint8_t m_ay_data = 0;
+ tilemap_t *m_tilemap = nullptr;
- tilemap_t *m_bg_tilemap = nullptr;
- tilemap_t *m_fg_tilemap = nullptr;
+ TILEMAP_MAPPER_MEMBER(tilemap_scan_rows);
+ TILE_GET_INFO_MEMBER(get_tile_info);
- TILE_GET_INFO_MEMBER(get_bg_tile_info);
- TILE_GET_INFO_MEMBER(get_fg_tile_info);
- void bgram_w(offs_t offset, uint8_t data);
- void fgram_w(offs_t offset, uint8_t data);
+ void vram_w(offs_t offset, uint8_t data);
+ void palette(palette_device &palette) const ATTR_COLD;
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
void main_io_map(address_map &map) ATTR_COLD;
@@ -82,60 +96,81 @@ class yakyuken_state : public driver_device
void sound_io_map(address_map &map) ATTR_COLD;
};
-
-TILE_GET_INFO_MEMBER(yakyuken_state::get_bg_tile_info)
+void yakyuken_state::machine_start()
{
- int const code = m_bgram[tile_index];
-
- tileinfo.set(0, code, 0, 0);
+ save_item(NAME(m_ay_data));
}
-TILE_GET_INFO_MEMBER(yakyuken_state::get_fg_tile_info)
-{
- int code = m_fgram[tile_index];
- if (code == 0x00) code = 0x2ff; // why? is this another 'big sprite' thing?
+/*************************************
+ *
+ * Video hardware
+ *
+ *************************************/
- tileinfo.set(1, code, 0, 0);
-}
+void yakyuken_state::palette(palette_device &palette) const
+{
+ for (int i = 0; i < 8; i++)
+ {
+ palette.set_pen_color(i, pal1bit(BIT(i, 0)), pal1bit(BIT(i, 1)), pal1bit(BIT(i, 2)));
+ // second half is brighter
+ palette.set_pen_color(i | 8, pal1bit(BIT(i, 0)) | 0x80, pal1bit(BIT(i, 1)) | 0x80, pal1bit(BIT(i, 2)) | 0x80);
+ }
+}
-void yakyuken_state::video_start()
+TILEMAP_MAPPER_MEMBER(yakyuken_state::tilemap_scan_rows)
{
- m_bg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(yakyuken_state::get_bg_tile_info)), TILEMAP_SCAN_ROWS, 8, 8, 32, 32);
- m_fg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(yakyuken_state::get_fg_tile_info)), TILEMAP_SCAN_ROWS, 8, 8, 32, 32);
+ row += 2;
+ col -= 1;
+
+ // upper 2 rows are left and right columns
+ if (col & 0x20)
+ return (col & 1) << 5 | row;
+ else
+ return row << 5 | col;
+}
- m_fg_tilemap->set_transparent_pen(0);
+TILE_GET_INFO_MEMBER(yakyuken_state::get_tile_info)
+{
+ int const code = m_vram[tile_index];
+ tileinfo.set(0, code, 0, 0);
}
-void yakyuken_state::fgram_w(offs_t offset, uint8_t data)
+static GFXDECODE_START( gfx_yakyuken )
+ GFXDECODE_ENTRY( "tiles", 0, gfx_8x8x4_planar, 0, 1 )
+GFXDECODE_END
+
+
+void yakyuken_state::video_start()
{
- m_fgram[offset] = data;
- m_fg_tilemap->mark_tile_dirty(offset);
+ m_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(yakyuken_state::get_tile_info)), tilemap_mapper_delegate(*this, FUNC(yakyuken_state::tilemap_scan_rows)), 8, 8, 34, 28);
}
-void yakyuken_state::bgram_w(offs_t offset, uint8_t data)
+void yakyuken_state::vram_w(offs_t offset, uint8_t data)
{
- m_bgram[offset] = data;
- m_bg_tilemap->mark_tile_dirty(offset);
+ m_vram[offset & 0x3ff] = (offset >> 2 & 0x300) | data;
+ m_tilemap->mark_tile_dirty(offset & 0x3ff);
}
uint32_t yakyuken_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
- m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0);
- m_fg_tilemap->draw(screen, bitmap, cliprect, 0, 0);
-
+ m_tilemap->draw(screen, bitmap, cliprect, 0, 0);
return 0;
}
+/*************************************
+ *
+ * Memory maps
+ *
+ *************************************/
+
void yakyuken_state::main_program_map(address_map &map)
{
- map(0x0000, 0x3fff).rom();
- map(0x6400, 0x67ff).ram();
- map(0x7000, 0x73ff).ram().w(FUNC(yakyuken_state::bgram_w)).share(m_bgram);
- map(0x7400, 0x77ff).ram().w(FUNC(yakyuken_state::fgram_w)).share(m_fgram);
- map(0x7c00, 0x7fff).ram(); // only seems to be initialized with 0xff at start up
+ map(0x0000, 0x37ff).rom();
+ map(0x6400, 0x67ff).ram().share("nvram");
+ map(0x7000, 0x73ff).select(0xc00).w(FUNC(yakyuken_state::vram_w));
}
void yakyuken_state::main_io_map(address_map &map)
@@ -144,9 +179,9 @@ void yakyuken_state::main_io_map(address_map &map)
map(0x00, 0x00).portr("SW");
map(0x01, 0x01).portr("IN0");
map(0x02, 0x02).portr("IN1");
- map(0x17, 0x17).lw8(NAME([this] (uint8_t data) { if (data & 0xfe) logerror("flip w: %02x\n", data); flip_screen_set(BIT(data, 0)); }));
- // map(0x30, 0x30).w() // lamps?
- // .w("soundlatch", FUNC(generic_latch_8_device::write));
+ map(0x03, 0x03).portr("IN2");
+ map(0x17, 0x17).lw8(NAME([this] (uint8_t data) { flip_screen_set(BIT(data, 0)); }));
+ map(0x30, 0x30).w("soundlatch", FUNC(generic_latch_8_device::write));
}
void yakyuken_state::sound_program_map(address_map &map)
@@ -158,96 +193,127 @@ void yakyuken_state::sound_program_map(address_map &map)
void yakyuken_state::sound_io_map(address_map &map)
{
map.global_mask(0xff);
- // .r("soundlatch", FUNC(generic_latch_8_device::read));
- // .w("ay", FUNC(ay8910_device::address_data_w));
- // .r("ay", FUNC(ay8910_device::data_r));
+ map(0x00, 0x00).r("soundlatch", FUNC(generic_latch_8_device::read));
+ map(0x01, 0x01).w("soundlatch", FUNC(generic_latch_8_device::clear_w));
+ map(0x02, 0x02).lw8(NAME([this] (uint8_t data) { m_ay_data = data; }));
+ map(0x03, 0x03).lw8(NAME([this] (uint8_t data) { m_ay->write_bc1_bc2(data & 3, m_ay_data); }));
}
+/*************************************
+ *
+ * Input ports
+ *
+ *************************************/
+
static INPUT_PORTS_START( yakyuken )
PORT_START("IN0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) // 100 in book-keeping
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) // 500 in book-keeping
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 ) // 1000 in book-keeping
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT )
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START3 ) PORT_NAME("P1 Control")
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START4 ) PORT_NAME("P2 Control")
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) // only works without credits inserted
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("IN1")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_BET )
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("P1 Bet")
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) // Gu (rock)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON2 ) // Choki (scissors)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON3 ) // Pa (paper)
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_TAKE )
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("P1 Take Score")
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
+
+ PORT_START("IN2")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_COCKTAIL PORT_NAME("P2 Bet")
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 )
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_COCKTAIL
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_COCKTAIL PORT_NAME("P2 Take Score")
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("SW")
- PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW:1,2")
+ PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW:1,2")
PORT_DIPSETTING( 0x03, "A 1C / B 5C / C 10C" )
PORT_DIPSETTING( 0x02, "A 2C / B 10C / C 20C" )
PORT_DIPSETTING( 0x01, "A 4C / B 20C / C 40C" )
PORT_DIPSETTING( 0x00, "A 5C / B 25C / C 50C" )
- PORT_DIPNAME( 0x04, 0x04, "Max Bet" ) PORT_DIPLOCATION("SW:3")
+ PORT_DIPNAME( 0x04, 0x04, "Max Bet" ) PORT_DIPLOCATION("SW:3")
PORT_DIPSETTING( 0x04, "10" )
PORT_DIPSETTING( 0x00, "30" )
- PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW:4") // some combination of the following 3 seems to affect win probability
- PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW:5")
- PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW:6")
- PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x38, 0x38, "Win Rate" ) PORT_DIPLOCATION("SW:4,5,6")
+ PORT_DIPSETTING( 0x38, "?%" )
+ PORT_DIPSETTING( 0x30, "?%" )
+ PORT_DIPSETTING( 0x28, "?%" )
+ PORT_DIPSETTING( 0x20, "?%" )
+ PORT_DIPSETTING( 0x18, "?%" )
+ PORT_DIPSETTING( 0x10, "?%" )
+ PORT_DIPSETTING( 0x08, "?%" )
+ PORT_DIPSETTING( 0x00, "100%" ) // test
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Service_Mode ) ) PORT_DIPLOCATION("SW:7")
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x80, 0x80, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW:8")
+ PORT_DIPNAME( 0x80, 0x80, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW:8")
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
INPUT_PORTS_END
-static GFXDECODE_START( gfx_yakyuken )
- GFXDECODE_ENTRY( "tiles", 0, gfx_8x8x4_planar, 0, 1 )
- GFXDECODE_ENTRY( "tiles", 0x800, gfx_8x8x4_planar, 0, 1 )
-GFXDECODE_END
-
+/*************************************
+ *
+ * Machine config
+ *
+ *************************************/
void yakyuken_state::yakyuken(machine_config &config)
{
- Z80(config, m_maincpu, 18.432_MHz_XTAL / 6); // 3.07 MHz
+ // basic machine hardware
+ Z80(config, m_maincpu, 18.432_MHz_XTAL / 3 / 2); // 3.072 MHz
m_maincpu->set_addrmap(AS_PROGRAM, &yakyuken_state::main_program_map);
m_maincpu->set_addrmap(AS_IO, &yakyuken_state::main_io_map);
- m_maincpu->set_vblank_int("screen", FUNC(yakyuken_state::irq0_line_hold));
- Z80(config, m_audiocpu, 18.432_MHz_XTAL / 12); // 1.53 MHz
+ attotime irq_period = attotime::from_ticks(0x2000, 18.432_MHz_XTAL / 3);
+ m_maincpu->set_periodic_int(FUNC(yakyuken_state::irq0_line_hold), irq_period);
+
+ Z80(config, m_audiocpu, 18.432_MHz_XTAL / 3 / 4); // 1.536 MHz
m_audiocpu->set_addrmap(AS_PROGRAM, &yakyuken_state::sound_program_map);
m_audiocpu->set_addrmap(AS_IO, &yakyuken_state::sound_io_map);
+ config.set_maximum_quantum(attotime::from_hz(600));
+
+ NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
+
// video hardware
- screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
- screen.set_refresh_hz(60);
- screen.set_size(256, 256);
- screen.set_visarea(0, 256-1, 0, 256-1);
- screen.set_screen_update(FUNC(yakyuken_state::screen_update));
- screen.set_palette("palette");
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_refresh_hz(60);
+ m_screen->set_size(34*8, 28*8);
+ m_screen->set_visarea(0*8, 34*8-1, 0*8, 28*8-1);
+ m_screen->set_screen_update(FUNC(yakyuken_state::screen_update));
+ m_screen->set_palette("palette");
GFXDECODE(config, m_gfxdecode, "palette", gfx_yakyuken);
- PALETTE(config, "palette").set_entries(0x10); // TODO
+ PALETTE(config, "palette", FUNC(yakyuken_state::palette), 0x10);
+ // sound hardware
SPEAKER(config, "mono").front_center();
GENERIC_LATCH_8(config, "soundlatch");
- AY8910(config, "ay", 18.432_MHz_XTAL / 12).add_route(ALL_OUTPUTS, "mono", 0.35);
+ AY8910(config, m_ay, 18.432_MHz_XTAL / 3 / 16).add_route(ALL_OUTPUTS, "mono", 0.35);
}
+/*************************************
+ *
+ * ROM definitions
+ *
+ *************************************/
+
ROM_START( yakyuken )
ROM_REGION( 0x4000, "maincpu", 0 )
ROM_LOAD( "4210.bt1", 0x0000, 0x1000, CRC(6cf83735) SHA1(3d0a978adb1c1b4526fa00dedd08e2879f4af283) )
@@ -272,4 +338,10 @@ ROM_END
} // anonymous namespace
-GAME( 198?, yakyuken, 0, yakyuken, yakyuken, yakyuken_state, empty_init, ROT0, "bootleg", "The Yakyuken", MACHINE_IS_SKELETON )
+/*************************************
+ *
+ * Game drivers
+ *
+ *************************************/
+
+GAME( 1982, yakyuken, 0, yakyuken, yakyuken, yakyuken_state, empty_init, ROT0, "bootleg", "The Yakyuken", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_COLORS | MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/shared/mahjong.cpp b/src/mame/shared/mahjong.cpp
index e4ccdf3eb90..2ebaffa2978 100644
--- a/src/mame/shared/mahjong.cpp
+++ b/src/mame/shared/mahjong.cpp
@@ -95,6 +95,13 @@ INPUT_PORTS_START(mahjong_matrix_1p_bet)
PORT_MODIFY("KEY4")
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_MAHJONG_LAST_CHANCE)
+INPUT_PORTS_END
+
+
+INPUT_PORTS_START(mahjong_matrix_1p_bet_wup)
+ PORT_INCLUDE(mahjong_matrix_1p_bet)
+
+ PORT_MODIFY("KEY4")
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_MAHJONG_SCORE)
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_MAHJONG_DOUBLE_UP)
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_MAHJONG_BIG)
@@ -160,16 +167,25 @@ INPUT_PORTS_START(mahjong_matrix_2p_bet)
PORT_MODIFY("KEY4")
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_MAHJONG_LAST_CHANCE)
- PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_MAHJONG_SCORE)
- PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_MAHJONG_DOUBLE_UP)
- PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_MAHJONG_BIG)
- PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_MAHJONG_SMALL)
PORT_MODIFY("KEY6")
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_MAHJONG_BET) PORT_PLAYER(2)
PORT_MODIFY("KEY9")
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_MAHJONG_LAST_CHANCE) PORT_PLAYER(2)
+INPUT_PORTS_END
+
+
+INPUT_PORTS_START(mahjong_matrix_2p_bet_wup)
+ PORT_INCLUDE(mahjong_matrix_2p_bet)
+
+ PORT_MODIFY("KEY4")
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_MAHJONG_SCORE)
+ PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_MAHJONG_DOUBLE_UP)
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_MAHJONG_BIG)
+ PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_MAHJONG_SMALL)
+
+ PORT_MODIFY("KEY9")
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_MAHJONG_SCORE) PORT_PLAYER(2)
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_MAHJONG_DOUBLE_UP) PORT_PLAYER(2)
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_MAHJONG_BIG) PORT_PLAYER(2)
diff --git a/src/mame/shared/mahjong.h b/src/mame/shared/mahjong.h
index d32eca66179..14a6a72eaa6 100644
--- a/src/mame/shared/mahjong.h
+++ b/src/mame/shared/mahjong.h
@@ -6,12 +6,14 @@
#pragma once
-INPUT_PORTS_EXTERN(mahjong_matrix_1p); // letters, start, kan/pon/chi/reach/ron
-INPUT_PORTS_EXTERN(mahjong_matrix_1p_ff); // adds flip flop
-INPUT_PORTS_EXTERN(mahjong_matrix_1p_bet); // adds bet/take/double/big/small/last chance
+INPUT_PORTS_EXTERN(mahjong_matrix_1p); // letters, start, kan/pon/chi/reach/ron
+INPUT_PORTS_EXTERN(mahjong_matrix_1p_ff); // adds flip flop
+INPUT_PORTS_EXTERN(mahjong_matrix_1p_bet); // adds bet/last chance
+INPUT_PORTS_EXTERN(mahjong_matrix_1p_bet_wup); // adds take score/double up/big/small
-INPUT_PORTS_EXTERN(mahjong_matrix_2p); // letters, start, kan/pon/chi/reach/ron
-INPUT_PORTS_EXTERN(mahjong_matrix_2p_ff); // adds flip flop
-INPUT_PORTS_EXTERN(mahjong_matrix_2p_bet); // adds bet/take/double/big/small/last chance
+INPUT_PORTS_EXTERN(mahjong_matrix_2p); // letters, start, kan/pon/chi/reach/ron
+INPUT_PORTS_EXTERN(mahjong_matrix_2p_ff); // adds flip flop
+INPUT_PORTS_EXTERN(mahjong_matrix_2p_bet); // adds bet/last chance
+INPUT_PORTS_EXTERN(mahjong_matrix_2p_bet_wup); // adds take score/double up/big/small
#endif // MAME_SHARED_MAHJONG_H
diff --git a/src/mame/sigma/nyny.cpp b/src/mame/sigma/nyny.cpp
index 13ce21abb09..d03f52ad412 100644
--- a/src/mame/sigma/nyny.cpp
+++ b/src/mame/sigma/nyny.cpp
@@ -17,6 +17,7 @@
* What is the main CPU clock? 11.2Mhz / 16 goes through
a MC4044 and a MC4024 analog chips before going to the EXTAL
pin of the M6809
+ * Stars are blinking too fast.
Notes:
* The Sigma set has Japanese voice samples, while the Gottlieb
@@ -85,15 +86,6 @@
namespace {
-#define MAIN_CPU_MASTER_CLOCK XTAL(11'200'000)
-#define PIXEL_CLOCK (MAIN_CPU_MASTER_CLOCK / 2)
-#define CRTC_CLOCK (MAIN_CPU_MASTER_CLOCK / 16)
-#define AUDIO_1_MASTER_CLOCK XTAL(4'000'000)
-#define AUDIO_CPU_1_CLOCK AUDIO_1_MASTER_CLOCK
-#define AUDIO_2_MASTER_CLOCK XTAL(4'000'000)
-#define AUDIO_CPU_2_CLOCK AUDIO_2_MASTER_CLOCK
-
-
class nyny_state : public driver_device
{
public:
@@ -323,9 +315,10 @@ MC6845_END_UPDATE( nyny_state::crtc_end_update )
for (int x = cliprect.min_x; x <= cliprect.max_x; x++)
{
/* check if the star status */
- if (m_star_enable && (bitmap.pix(y, x) == m_palette->pen_color(0)) &&
- ((m_star_shift_reg & 0x80ff) == 0x00ff) &&
- (((y & 0x01) ^ m_flipscreen) ^ (((x & 0x08) >> 3) ^ m_flipscreen)))
+ const bool enabled = m_star_enable && (bitmap.pix(y, x) == m_palette->pen_color(0));
+ const int flip = m_flipscreen ? 1 : 0;
+
+ if (enabled && ((m_star_shift_reg & 0x80ff) == 0x00ff) && (((y & 0x01) ^ flip) ^ (((x & 0x08) >> 3) ^ flip)))
{
uint8_t color = ((m_star_shift_reg & 0x0100) >> 8) | /* R */
((m_star_shift_reg & 0x0400) >> 9) | /* G */
@@ -602,27 +595,28 @@ void nyny_state::machine_reset()
void nyny_state::nyny(machine_config &config)
{
- /* basic machine hardware */
- MC6809(config, m_maincpu, 5600000); /* 1.40 MHz? The clock signal is generated by analog chips */
+ // basic machine hardware
+ MC6809(config, m_maincpu, 5'600'000); // 5.6 MHz? The clock signal is generated by analog chips
m_maincpu->set_addrmap(AS_PROGRAM, &nyny_state::main_map);
m_maincpu->set_periodic_int(FUNC(nyny_state::update_pia_1), attotime::from_hz(25));
- M6802(config, m_audiocpu, AUDIO_CPU_1_CLOCK);
+ M6802(config, m_audiocpu, 4_MHz_XTAL);
m_audiocpu->set_addrmap(AS_PROGRAM, &nyny_state::audio_1_map);
- M6802(config, m_audiocpu2, AUDIO_CPU_2_CLOCK);
+ M6802(config, m_audiocpu2, 4_MHz_XTAL); // physically a different XTAL
m_audiocpu2->set_addrmap(AS_PROGRAM, &nyny_state::audio_2_map);
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
- /* video hardware */
+ // video hardware
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
- screen.set_raw(PIXEL_CLOCK, 360, 0, 256, 276, 0, 224);
+ screen.set_video_attributes(VIDEO_ALWAYS_UPDATE);
+ screen.set_raw(11.2_MHz_XTAL / 2, 360, 0, 256, 276, 0, 224);
screen.set_screen_update("crtc", FUNC(mc6845_device::screen_update));
PALETTE(config, m_palette, palette_device::RGB_3BIT);
- MC6845(config, m_mc6845, CRTC_CLOCK); // HD46505P
+ MC6845(config, m_mc6845, 11.2_MHz_XTAL / 16); // HD46505P
m_mc6845->set_screen("screen");
m_mc6845->set_show_border_area(false);
m_mc6845->set_char_width(8);
@@ -630,15 +624,15 @@ void nyny_state::nyny(machine_config &config)
m_mc6845->set_end_update_callback(FUNC(nyny_state::crtc_end_update));
m_mc6845->out_de_callback().set(m_ic48_1, FUNC(ttl74123_device::a_w));
- /* 74LS123: This timer is responsible for delaying the setting of PIA2's CA1 line. */
- /* This delay ensures that CA1 is only changed in the VBLANK region, but not in HBLANK. */
+ // 74LS123: This timer is responsible for delaying the setting of PIA2's CA1 line.
+ // This delay ensures that CA1 is only changed in the VBLANK region, but not in HBLANK.
TTL74123(config, m_ic48_1, 0);
- m_ic48_1->set_connection_type(TTL74123_GROUNDED); /* the hook up type */
- m_ic48_1->set_resistor_value(RES_K(22)); /* resistor connected to RCext */
- m_ic48_1->set_capacitor_value(CAP_U(0.01)); /* capacitor connected to Cext and RCext */
- m_ic48_1->set_a_pin_value(1); /* A pin - driven by the CRTC */
- m_ic48_1->set_b_pin_value(1); /* B pin - pulled high */
- m_ic48_1->set_clear_pin_value(1); /* Clear pin - pulled high */
+ m_ic48_1->set_connection_type(TTL74123_GROUNDED); // the hook up type
+ m_ic48_1->set_resistor_value(RES_K(22)); // resistor connected to RCext
+ m_ic48_1->set_capacitor_value(CAP_U(0.01)); // capacitor connected to Cext and RCext
+ m_ic48_1->set_a_pin_value(1); // A pin - driven by the CRTC
+ m_ic48_1->set_b_pin_value(1); // B pin - pulled high
+ m_ic48_1->set_clear_pin_value(1); // Clear pin - pulled high
m_ic48_1->out_cb().set(m_pia2, FUNC(pia6821_device::ca1_w));
PIA6821(config, m_pia1);
@@ -655,24 +649,24 @@ void nyny_state::nyny(machine_config &config)
m_pia2->irqa_handler().set(FUNC(nyny_state::main_cpu_firq));
m_pia2->irqb_handler().set(FUNC(nyny_state::main_cpu_irq));
- /* audio hardware */
+ // audio hardware
SPEAKER(config, "speaker").front_center();
GENERIC_LATCH_8(config, m_soundlatch);
GENERIC_LATCH_8(config, m_soundlatch2);
GENERIC_LATCH_8(config, m_soundlatch3);
- ay8910_device &ay1(AY8910(config, "ay1", AUDIO_CPU_1_CLOCK));
+ ay8910_device &ay1(AY8910(config, "ay1", 4_MHz_XTAL / 4));
ay1.port_a_write_callback().set(FUNC(nyny_state::ay8910_37_port_a_w));
ay1.port_b_write_callback().set(FUNC(nyny_state::ay8910_37_port_b_w));
ay1.add_route(ALL_OUTPUTS, "speaker", 0.25);
- ay8910_device &ay2(AY8910(config, "ay2", AUDIO_CPU_1_CLOCK));
+ ay8910_device &ay2(AY8910(config, "ay2", 4_MHz_XTAL / 4));
ay2.port_a_read_callback().set_ioport("SW2");
ay2.port_b_read_callback().set_ioport("SW1");
ay2.add_route(ALL_OUTPUTS, "speaker", 0.25);
- AY8910(config, "ay3", AUDIO_CPU_2_CLOCK).add_route(ALL_OUTPUTS, "speaker", 0.03);
+ AY8910(config, "ay3", 4_MHz_XTAL / 4).add_route(ALL_OUTPUTS, "speaker", 0.1);
DAC_8BIT_R2R(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.25); // unknown DAC
}
diff --git a/src/mame/skeleton/falconun.cpp b/src/mame/skeleton/falconun.cpp
index 31941c7b079..f6c43b99272 100644
--- a/src/mame/skeleton/falconun.cpp
+++ b/src/mame/skeleton/falconun.cpp
@@ -5,6 +5,9 @@
#include "emu.h"
#include "cpu/m6800/m6800.h"
+#include "cpu/mcs48/mcs48.h"
+#include "machine/6821pia.h"
+#include "machine/input_merger.h"
#include "screen.h"
@@ -27,17 +30,18 @@ class falconun_state : public driver_device
public:
falconun_state(const machine_config &mconfig, device_type type, const char *tag) :
driver_device(mconfig, type, tag),
- m_maincpu(*this, "falcon_terminal"),
+ m_maincpu(*this, "maincpu"),
m_screen(*this, "screen")
{ }
void falconun(machine_config &config);
private:
- required_device m_maincpu;
+ required_device m_maincpu;
required_device m_screen;
void memmap(address_map &map) ATTR_COLD;
+ void slavemap(address_map &map) ATTR_COLD;
uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { return 0; }
};
@@ -47,13 +51,30 @@ INPUT_PORTS_END
void falconun_state::memmap(address_map &map)
{
- map(0x0000, 0xffff).rom();
+ map(0x0000, 0x07ff).ram();
+ map(0x2000, 0x2003).rw("pia", FUNC(pia6821_device::read), FUNC(pia6821_device::write));
+ map(0xc000, 0xffff).rom().region("falcon_terminal", 0xc000);
+}
+
+void falconun_state::slavemap(address_map &map)
+{
+ map(0x000, 0xfff).rom().region("slave", 0);
}
void falconun_state::falconun(machine_config &config)
{
M6802(config, m_maincpu, 40'000'000 / 4); // TODO 10 MHz for a M6802??
m_maincpu->set_addrmap(AS_PROGRAM, &falconun_state::memmap);
+ m_maincpu->set_ram_enable(false);
+
+ INPUT_MERGER_ANY_HIGH(config, "mainirq").output_handler().set_inputline(m_maincpu, M6802_IRQ_LINE);
+
+ pia6821_device &pia(PIA6821(config, "pia"));
+ pia.irqa_handler().set("mainirq", FUNC(input_merger_device::in_w<0>));
+ pia.irqb_handler().set("mainirq", FUNC(input_merger_device::in_w<1>));
+
+ i8035_device &slavemcu(I8035(config, "slavemcu", 6'000'000));
+ slavemcu.set_addrmap(AS_PROGRAM, &falconun_state::slavemap);
SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
m_screen->set_refresh_hz(60);
diff --git a/src/mame/skeleton/venteta.cpp b/src/mame/skeleton/venteta.cpp
new file mode 100644
index 00000000000..5163eff2ebd
--- /dev/null
+++ b/src/mame/skeleton/venteta.cpp
@@ -0,0 +1,140 @@
+// license:BSD-3-Clause
+// copyright-holders:
+
+/*
+Venteta by Rania (?)
+
+MegaRani SYSTEM Version 2001
+
+Main components:
+
+ATMEGA103 MCU (undumped internal ROM)
+PSD813F1 (not dumped)
+M48T08-100PC1
+EPM7064LC68-10
+24 MHz XTAL
+4x 6264
+ISD2564P audio chip
+1 reset switch
+*/
+
+#include "emu.h"
+
+#include "cpu/avr8/avr8.h"
+
+#include "emupal.h"
+#include "screen.h"
+#include "speaker.h"
+#include "tilemap.h"
+
+
+namespace {
+
+class venteta_state : public driver_device
+{
+public:
+ venteta_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
+ m_maincpu(*this, "maincpu"),
+ m_gfxdecode(*this, "gfxdecode")
+ { }
+
+ void venteta(machine_config &config);
+
+private:
+ required_device m_maincpu;
+ required_device m_gfxdecode;
+
+ uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
+
+ void program_map(address_map &map) ATTR_COLD;
+};
+
+
+uint32_t venteta_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
+{
+ bitmap.fill(rgb_t::black(), cliprect);
+
+ return 0;
+}
+
+
+void venteta_state::program_map(address_map &map)
+{
+ map(0x0000, 0xffff).rom();
+}
+
+
+static INPUT_PORTS_START(venteta)
+ PORT_START("IN0")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
+
+ PORT_START("IN1")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
+INPUT_PORTS_END
+
+
+static GFXDECODE_START( gfx_venteta ) // TODO
+ GFXDECODE_ENTRY( "tiles1", 0, gfx_8x8x8_raw, 0, 16 ) // not correct
+ GFXDECODE_ENTRY( "tiles2", 0, gfx_8x8x8_raw, 0, 16 ) // not correct
+GFXDECODE_END
+
+
+void venteta_state::venteta(machine_config &config)
+{
+ ATMEGA168(config, m_maincpu, 24_MHz_XTAL); // TODO: actually ATMEGA103
+ m_maincpu->set_addrmap(AS_PROGRAM, &venteta_state::program_map);
+ m_maincpu->set_eeprom_tag("eeprom");
+
+ // TODO: everything
+ 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(64*8, 32*8);
+ screen.set_visarea(0*8, 64*8-1, 2*8, 30*8-1);
+ screen.set_screen_update(FUNC(venteta_state::screen_update));
+
+ GFXDECODE(config, m_gfxdecode, "palette", gfx_venteta);
+
+ PALETTE(config, "palette").set_entries(0x100); // TODO
+
+ SPEAKER(config, "mono").front_center();
+}
+
+
+ROM_START( venteta )
+ ROM_REGION( 0x20000, "maincpu", ROMREGION_ERASE00 )
+ ROM_LOAD( "internal_rom.ic22", 0x00000, 0x20000, NO_DUMP ) // size not verified
+
+ ROM_REGION( 0x20000, "psd813f1", ROMREGION_ERASE00 )
+ ROM_LOAD( "psd813.ic10", 0x00000, 0x20000, NO_DUMP ) // size not verified
+
+ ROM_REGION( 0x1000, "eeprom", ROMREGION_ERASE00 )
+
+ ROM_REGION( 0x200000, "tiles1", 0 )
+ ROM_LOAD( "27c801.ic1", 0x000000, 0x100000, CRC(2f7a62e7) SHA1(684c6a83f4ed8ce35042826d327627cf493b7654) ) // 1xxxxxxxxxxxxxxxxxxx = 0xFF
+ ROM_LOAD( "27c801.ic2", 0x100000, 0x100000, CRC(654f70fe) SHA1(0d8dfe5196fee48224f847cd0c7e17c2cd0ecf45) ) // 1xxxxxxxxxxxxxxxxxxx = 0xFF
+
+ ROM_REGION( 0x200000, "tiles2", 0 )
+ ROM_LOAD( "27c801.ic11", 0x000000, 0x100000, CRC(c1ad4498) SHA1(a5f9a3bc0af37d43bb8b38cc01c927ca18a4ccb2) ) // 1xxxxxxxxxxxxxxxxxxx = 0xFF
+ ROM_LOAD( "27c801.ic12", 0x100000, 0x100000, CRC(25fe1d01) SHA1(530f80ed5de836af1876d6a7aec70a0ec3f81d47) ) // 1xxxxxxxxxxxxxxxxxxx = 0xFF
+ROM_END
+
+} // anonymous namespace
+
+
+GAME( 200?, venteta, 0, venteta, venteta, venteta_state, empty_init, ROT0, "Rania", "Venteta", MACHINE_IS_SKELETON )
diff --git a/src/mame/tecfri/ambush.cpp b/src/mame/tecfri/ambush.cpp
index 35cc9bbd955..af533148c59 100644
--- a/src/mame/tecfri/ambush.cpp
+++ b/src/mame/tecfri/ambush.cpp
@@ -973,6 +973,7 @@ GAME( 1983, ambush, 0, ambush, ambusht, ambush_state, empty_init,
GAME( 1983, ambushh, ambush, ambush, ambusht, ambush_state, empty_init, ROT0, "Tecfri", "Ambush (hack?)", MACHINE_SUPPORTS_SAVE )
GAME( 1983, ambushj, ambush, ambush, ambush, ambush_state, empty_init, ROT0, "Tecfri (Nippon Amuse license)", "Ambush (Japan)", MACHINE_SUPPORTS_SAVE )
GAME( 1983, ambushv, ambush, ambush, ambush, ambush_state, empty_init, ROT0, "Tecfri (Volt Electronics license)", "Ambush (Volt Electronics)", MACHINE_SUPPORTS_SAVE )
+
GAME( 1983, mariobl, mario, mariobl, mariobl, ambush_state, empty_init, ROT180, "bootleg", "Mario Bros. (bootleg on Ambush Hardware, set 1)", MACHINE_SUPPORTS_SAVE )
GAME( 1983, mariobla, mario, mariobla, mariobl, ambush_state, empty_init, ROT180, "bootleg", "Mario Bros. (bootleg on Ambush Hardware, set 2)", MACHINE_SUPPORTS_SAVE )
GAME( 1983, dkong3abl, dkong3, dkong3abl, dkong3abl, ambush_state, empty_init, ROT90, "bootleg", "Donkey Kong 3 (bootleg on Ambush hardware)", MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/tecfri/holeland.cpp b/src/mame/tecfri/holeland.cpp
index d89ec0741f7..5042b9101c9 100644
--- a/src/mame/tecfri/holeland.cpp
+++ b/src/mame/tecfri/holeland.cpp
@@ -11,9 +11,7 @@
- In stop mode press p1 start to freeze the screen, p2 start to resume
TODO:
- - missing high bit of sprite X coordinate? (see round 2 and 3 of attract
- mode in crzrally)
- - crzrally: emulate steering wheel;
+ - crzrally: emulate steering wheel
***************************************************************************/
@@ -246,7 +244,21 @@ void crzrally_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprec
int const code = m_spriteram[offs + 1] + ((m_spriteram[offs + 3] & 0x01) << 8);
int const color = (m_spriteram[offs + 3] >> 4) + ((m_spriteram[offs + 3] & 0x01) << 4);
- // Bit 1 unknown but somehow related to X offset (clipping range?)
+ // Bit 1 somehow related to X offset (clipping range?)
+ if (m_spriteram[offs + 3] & 0x02)
+ {
+ if (sx > 0xc0)
+ {
+ // Sign extend
+ sx = int8_t(sx);
+ }
+ }
+ else
+ {
+ if (sx < 0x40)
+ continue;
+ }
+
int flipx = m_spriteram[offs + 3] & 0x04;
int flipy = m_spriteram[offs + 3] & 0x08;
@@ -317,7 +329,7 @@ void crzrally_state::prg_map(address_map &map)
void base_state::io_map(address_map &map)
{
map.global_mask(0xff);
- map(0x01, 0x01).r("watchdog", FUNC(watchdog_timer_device::reset_r)); // ?
+ map(0x01, 0x01).r("watchdog", FUNC(watchdog_timer_device::reset_r)); // ?
map(0x04, 0x04).r("ay1", FUNC(ay8910_device::data_r));
map(0x04, 0x05).w("ay1", FUNC(ay8910_device::address_data_w));
map(0x06, 0x06).r("ay2", FUNC(ay8910_device::data_r));
@@ -584,7 +596,7 @@ void holeland_state::holeland(machine_config &config)
void crzrally_state::crzrally(machine_config &config)
{
// basic machine hardware
- Z80(config, m_maincpu, 20_MHz_XTAL / 4); // 5 MHz
+ Z80(config, m_maincpu, 20_MHz_XTAL / 4); // 5 MHz
m_maincpu->set_addrmap(AS_PROGRAM, &crzrally_state::prg_map);
m_maincpu->set_addrmap(AS_IO, &crzrally_state::io_map);
m_maincpu->set_vblank_int("screen", FUNC(crzrally_state::irq0_line_hold));
@@ -850,6 +862,7 @@ ROM_END
GAME( 1984, holeland, 0, holeland, holeland, holeland_state, empty_init, ROT0, "Tecfri", "Hole Land (Japan)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
GAME( 1984, holeland2, holeland, holeland, holeland2, holeland_state, empty_init, ROT0, "Tecfri", "Hole Land (Spain)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) //attract is different
+
GAME( 1985, crzrally, 0, crzrally, crzrally, crzrally_state, empty_init, ROT270, "Tecfri", "Crazy Rally (set 1)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
GAME( 1985, crzrallya, crzrally, crzrally, crzrally, crzrally_state, empty_init, ROT270, "Tecfri", "Crazy Rally (set 2)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
GAME( 1985, crzrallyg, crzrally, crzrally, crzrally, crzrally_state, empty_init, ROT270, "Tecfri (Gecas license)", "Crazy Rally (Gecas license)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/tecfri/sauro.cpp b/src/mame/tecfri/sauro.cpp
index 2b61c3faf42..f1b0dbef055 100644
--- a/src/mame/tecfri/sauro.cpp
+++ b/src/mame/tecfri/sauro.cpp
@@ -63,10 +63,12 @@ TODO
- What do the rest of the ports in the range c0-ce do?
+
Tricky Doc
----------
Addition by Reip
+Applause by hap
Stephh's notes (based on the games Z80 code and some tests) :
@@ -167,8 +169,7 @@ class base_state : public driver_device
required_shared_ptr m_bg_colorram;
tilemap_t *m_bg_tilemap = nullptr;
- uint8_t m_palette_bank = 0U;
-
+ uint8_t m_palette_bank = 0;
bool m_irq_enable = 0;
// common
@@ -327,14 +328,10 @@ void sauro_state::scroll_fg_w(uint8_t data)
void sauro_state::video_start()
{
- m_bg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(sauro_state::get_tile_info_bg)), TILEMAP_SCAN_COLS,
- 8, 8, 32, 32);
-
- m_fg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(sauro_state::get_tile_info_fg)), TILEMAP_SCAN_COLS,
- 8, 8, 32, 32);
+ m_bg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(sauro_state::get_tile_info_bg)), TILEMAP_SCAN_COLS, 8, 8, 32, 32);
+ m_fg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(sauro_state::get_tile_info_fg)), TILEMAP_SCAN_COLS, 8, 8, 32, 32);
m_fg_tilemap->set_transparent_pen(0);
- m_palette_bank = 0;
save_item(NAME(m_palette_bank));
}
@@ -343,10 +340,12 @@ void sauro_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect)
{
int const flipy = flip_screen();
+ // Weird, sprites entries don't start on DWORD boundary
for (int offs = 3; offs < m_spriteram.bytes() - 1; offs += 4)
{
int sy = m_spriteram[offs];
- if (sy == 0xf8) continue;
+ if (sy == 0xf8)
+ continue;
int const code = m_spriteram[offs + 1] + ((m_spriteram[offs + 3] & 0x03) << 8);
int sx = m_spriteram[offs + 2];
@@ -359,12 +358,13 @@ void sauro_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect)
if (sx > 0xc0)
{
// Sign extend
- sx = (signed int)(signed char)sx;
+ sx = int8_t(sx);
}
}
else
{
- if (sx < 0x40) continue;
+ if (sx < 0x40)
+ continue;
}
int flipx = m_spriteram[offs + 3] & 0x04;
@@ -372,7 +372,7 @@ void sauro_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect)
if (flipy)
{
flipx = !flipx;
- sx = (235 - sx) & 0xff; // The &0xff is not 100% percent correct
+ sx = (235 - sx) & 0xff; // The & 0xff is not 100% percent correct
sy = 240 - sy;
}
@@ -396,29 +396,16 @@ uint32_t sauro_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap,
void trckydoc_state::video_start()
{
- m_bg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(trckydoc_state::get_tile_info_bg)), TILEMAP_SCAN_COLS,
- 8, 8, 32, 32);
-
- m_palette_bank = 0;
+ m_bg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(trckydoc_state::get_tile_info_bg)), TILEMAP_SCAN_COLS, 8, 8, 32, 32);
}
void trckydoc_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect)
{
- int const flipy = flip_screen();
-
// Weird, sprites entries don't start on DWORD boundary
for (int offs = 3; offs < m_spriteram.bytes() - 1; offs += 4)
{
int sy = m_spriteram[offs];
-
- if (m_spriteram[offs + 3] & 0x08)
- {
- // needed by the elevator cable (2nd stage), balls bouncing (3rd stage) and maybe other things
- sy += 6;
- }
-
int const code = m_spriteram[offs + 1] + ((m_spriteram[offs + 3] & 0x01) << 8);
-
int sx = m_spriteram[offs + 2] - 2;
int const color = (m_spriteram[offs + 3] >> 4) & 0x0f;
@@ -430,20 +417,23 @@ void trckydoc_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprec
if (sx > 0xc0)
{
// Sign extend
- sx = (signed int)(signed char)sx;
+ sx = int8_t(sx);
}
}
else
{
- if (sx < 0x40) continue;
+ if (sx < 0x40)
+ continue;
}
int flipx = m_spriteram[offs + 3] & 0x04;
+ int flipy = m_spriteram[offs + 3] & 0x08;
- if (flipy)
+ if (flip_screen())
{
flipx = !flipx;
- sx = (235 - sx) & 0xff; // The &0xff is not 100% percent correct
+ flipy = !flipy;
+ sx = (235 - sx) & 0xff; // The & 0xff is not 100% percent correct
sy = 240 - sy;
}
@@ -532,7 +522,7 @@ void sauro_state::sauro_sound_map(address_map &map)
map(0xc000, 0xc001).w("ymsnd", FUNC(ym3812_device::write));
map(0xa000, 0xa000).w("speech", FUNC(sp0256_device::ald_w));
map(0xe000, 0xe000).r(FUNC(sauro_state::sound_command_r));
- map(0xe000, 0xe006).nopw(); // echo from write to e0000
+ map(0xe000, 0xe006).nopw(); // echo from write to e0000
map(0xe00e, 0xe00f).nopw();
}
@@ -544,7 +534,7 @@ void sauro_state::saurobl_sound_map(address_map &map)
map(0xc000, 0xc001).w("ymsnd", FUNC(ym3812_device::write));
map(0xa000, 0xa000).nopw();
map(0xe000, 0xe000).r(FUNC(sauro_state::sound_command_r));
- map(0xe000, 0xe006).nopw(); // echo from write to e0000
+ map(0xe000, 0xe006).nopw(); // echo from write to e0000
map(0xe00e, 0xe00f).nopw();
}
@@ -579,7 +569,7 @@ static INPUT_PORTS_START( tecfri )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY
- PORT_START("P2") // See notes
+ PORT_START("P2") // See notes
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_COCKTAIL
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
@@ -657,7 +647,7 @@ static INPUT_PORTS_START( saurobl )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY
- PORT_START("P2") // See notes
+ PORT_START("P2") // See notes
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 )
@@ -765,7 +755,7 @@ GFXDECODE_END
void base_state::tecfri(machine_config &config)
{
// Basic machine hardware
- Z80(config, m_maincpu, XTAL(20'000'000) / 4); // Verified on PCB
+ Z80(config, m_maincpu, XTAL(20'000'000) / 4); // Verified on PCB
LS259(config, m_mainlatch);
m_mainlatch->q_out_cb<4>().set(FUNC(base_state::irq_reset_w));
@@ -788,7 +778,7 @@ void base_state::tecfri(machine_config &config)
// Sound hardware
SPEAKER(config, "mono").front_center();
- YM3812(config, "ymsnd", XTAL(20'000'000) / 8).add_route(ALL_OUTPUTS, "mono", 1.0); // Verified on PCB
+ YM3812(config, "ymsnd", XTAL(20'000'000) / 8).add_route(ALL_OUTPUTS, "mono", 1.0); // Verified on PCB
}
void trckydoc_state::trckydoc(machine_config &config)
@@ -821,7 +811,7 @@ void sauro_state::saurobl(machine_config &config)
m_mainlatch->q_out_cb<5>().set(FUNC(sauro_state::palette_bank0_w));
m_mainlatch->q_out_cb<6>().set(FUNC(sauro_state::palette_bank1_w));
- z80_device &audiocpu(Z80(config, "audiocpu", XTAL(20'000'000) / 5)); // Verified on PCB
+ z80_device &audiocpu(Z80(config, "audiocpu", XTAL(20'000'000) / 5)); // Verified on PCB
audiocpu.set_addrmap(AS_PROGRAM, &sauro_state::saurobl_sound_map);
audiocpu.set_periodic_int(FUNC(sauro_state::irq0_line_hold), attotime::from_hz(8 * 60)); // ?
@@ -831,7 +821,7 @@ void sauro_state::saurobl(machine_config &config)
GENERIC_LATCH_8(config, m_soundlatch);
- subdevice("ymsnd")->set_clock(XTAL(20'000'000) / 5); // Verified on PCB
+ subdevice("ymsnd")->set_clock(XTAL(20'000'000) / 5); // Verified on PCB
}
void sauro_state::sauro(machine_config &config)
@@ -841,7 +831,7 @@ void sauro_state::sauro(machine_config &config)
subdevice("audiocpu")->set_addrmap(AS_PROGRAM, &sauro_state::sauro_sound_map);
// Sound hardware
- sp0256_device &sp0256(SP0256(config, "speech", XTAL(20'000'000) / 5)); // Verified on PCB
+ sp0256_device &sp0256(SP0256(config, "speech", XTAL(20'000'000) / 5)); // Verified on PCB
sp0256.data_request_callback().set_inputline("audiocpu", INPUT_LINE_NMI);
sp0256.add_route(ALL_OUTPUTS, "mono", 1.0);
}
diff --git a/src/mame/tecfri/speedbal.cpp b/src/mame/tecfri/speedbal.cpp
index 0c57d9d4d97..2e84d25a625 100644
--- a/src/mame/tecfri/speedbal.cpp
+++ b/src/mame/tecfri/speedbal.cpp
@@ -606,6 +606,6 @@ void speedbal_state::init_musicbal()
} // anonymous namespace
-GAMEL( 1987, speedbal, 0, speedbal, speedbal, speedbal_state, init_speedbal, ROT270, "Tecfri / Desystem S.A.", "Speed Ball (set 1)", MACHINE_SUPPORTS_SAVE, layout_speedbal )
+GAMEL( 1987, speedbal, 0, speedbal, speedbal, speedbal_state, init_speedbal, ROT270, "Tecfri / Desystem S.A.", "Speed Ball (set 1)", MACHINE_SUPPORTS_SAVE, layout_speedbal )
GAMEL( 1987, speedbala, speedbal, speedbal, speedbal, speedbal_state, init_speedbal, ROT270, "Tecfri / Desystem S.A.", "Speed Ball (set 2)", MACHINE_SUPPORTS_SAVE, layout_speedbal )
-GAMEL( 1988, musicbal, 0, speedbal, musicbal, speedbal_state, init_musicbal, ROT270, "Tecfri / Desystem S.A.", "Music Ball", MACHINE_SUPPORTS_SAVE, layout_speedbal )
+GAMEL( 1988, musicbal, 0, speedbal, musicbal, speedbal_state, init_musicbal, ROT270, "Tecfri / Desystem S.A.", "Music Ball", MACHINE_SUPPORTS_SAVE, layout_speedbal )
diff --git a/src/mame/toaplan/dt7.cpp b/src/mame/toaplan/dt7.cpp
index d4059dd20c9..a8ab367ef92 100644
--- a/src/mame/toaplan/dt7.cpp
+++ b/src/mame/toaplan/dt7.cpp
@@ -5,17 +5,16 @@
differences to keep it separate
TODO:
- - verify audio CPU opcodes
+ - verify audio CPU opcodes (see toaplan_v25_tables.h)
- correctly hook up interrupts (especially V25)
- correctly hook up inputs (there's a steering wheel test? is the game switchable)
- serial comms (needs support in V25 core?) for linked units
- verify frequencies on chips
- verify alt titles, some regions have 'Car Fighting' as a subtitle, region comes from EEPROM?
- verify text layer palettes
- - currently only coins up with service button
- - course selection cursor doesn't move?
- - sound dies after one stage?
- - game crashes after two stages?
+ - service mode doesn't display properly
+ - currently only coins up with service button
+ - sound dies after one stage?
*/
@@ -55,12 +54,19 @@ class dt7_state : public driver_device
, m_palette(*this, "palette%u", 0U)
, m_shared_ram(*this, "shared_ram")
, m_tx_videoram(*this, "tx_videoram")
+ , m_lineram(*this, "lineram")
+ , m_eepromport(*this, "EEPROM")
+ , m_sysport(*this, "SYS")
+ , m_p1port(*this, "IN1")
+ , m_p2port(*this, "IN2")
{ }
public:
void dt7(machine_config &config) ATTR_COLD;
protected:
+ virtual void machine_start() override ATTR_COLD;
+ virtual void machine_reset() override ATTR_COLD;
virtual void video_start() override ATTR_COLD;
private:
@@ -71,7 +77,9 @@ class dt7_state : public driver_device
void tx_videoram_dt7_w(offs_t offset, u16 data, u16 mem_mask = ~0);
- TILE_GET_INFO_MEMBER(get_text_dt7_tile_info);
+ TILE_GET_INFO_MEMBER(get_tx_dt7_tile_info);
+
+ void draw_tx_tilemap(screen_device& screen, bitmap_ind16& bitmap, const rectangle& cliprect, int table);
void dt7_68k_0_mem(address_map &map);
void dt7_68k_1_mem(address_map &map);
@@ -79,21 +87,26 @@ class dt7_state : public driver_device
void dt7_shared_mem(address_map &map);
void dt7_irq(int state);
- void dt7_unk_w(u8 data);
+ void dt7_sndreset_coin_w(offs_t offset, u16 data, u16 mem_mask);
+
+ u8 unmapped_v25_io1_r();
+ u8 unmapped_v25_io2_r();
+
+ u8 read_port_t();
+ u8 read_port_2();
+ void write_port_2(u8 data);
- uint8_t unmapped_v25_io1_r();
- uint8_t unmapped_v25_io2_r();
+ u8 eeprom_r();
+ void eeprom_w(u8 data);
- uint8_t read_port_t();
- uint8_t read_port_2();
- void write_port_2(uint8_t data);
u8 dt7_shared_ram_hack_r(offs_t offset);
void shared_ram_w(offs_t offset, u8 data);
+ void shared_ram_audio_w(offs_t offset, u8 data);
void screen_vblank(int state);
- uint8_t m_ioport_state = 0x00;
+ u8 m_ioport_state;
tilemap_t *m_tx_tilemap[2]; /* Tilemap for extra-text-layer */
@@ -110,6 +123,11 @@ class dt7_state : public driver_device
required_device_array m_palette;
required_shared_ptr m_shared_ram; // 8 bit RAM shared between 68K and sound CPU
required_shared_ptr m_tx_videoram;
+ required_shared_ptr m_lineram;
+ required_ioport m_eepromport;
+ required_ioport m_sysport;
+ required_ioport m_p1port;
+ required_ioport m_p2port;
};
@@ -129,22 +147,38 @@ void dt7_state::dt7_irq(int state)
// this is conditional on the unknown type of branch (see #define G_B0 in the table0
-uint8_t dt7_state::read_port_t()
+u8 dt7_state::read_port_t()
{
- logerror("%s: read port t\n", machine().describe_context()); return machine().rand();
+ logerror("%s: read port t\n", machine().describe_context());
+ return machine().rand();
}
-uint8_t dt7_state::read_port_2()
+u8 dt7_state::eeprom_r()
{
- logerror("%s: read port 2\n", machine().describe_context());
+ logerror("%s: eeprom_r\n", machine().describe_context());
+ // if you allow eeprom hookup at the moment (remove the ram hack reads)
+ // the game will init it the first time but then 2nd boot will be upside
+ // down as Japan region, and hang after the region warning
+ //return 0xff;
+ return m_eepromport->read();
+}
- return 0xff;
+void dt7_state::eeprom_w(u8 data)
+{
+ logerror("%s: eeprom_w %02x\n", machine().describe_context(), data);
+ m_eepromport->write(data);
+}
+
+u8 dt7_state::read_port_2()
+{
+ logerror("%s: read port 2\n", machine().describe_context());
+ return m_ioport_state;
}
// it seems to attempt to read inputs (including the tilt switch?) here on startup
// strangely all the EEPROM access code (which is otherwise very similar to FixEight
// also has accesses to this port added, maybe something is sitting in the middle?
-void dt7_state::write_port_2(uint8_t data)
+void dt7_state::write_port_2(u8 data)
{
if ((m_ioport_state & 0x01) != (data & 0x01))
{
@@ -219,28 +253,22 @@ u8 dt7_state::dt7_shared_ram_hack_r(offs_t offset)
{
u16 ret = m_shared_ram[offset];
+ int pc = m_maincpu->pc();
+
+ if (pc == 0x7d84) { return 0xff; } // status?
+
u32 addr = (offset * 2) + 0x610000;
+
+ if (addr == 0x061f00c) { return m_sysport->read(); }
+ if (addr == 0x061d000) { return 0x00; } // settings (from EEPROM?) including flipscreen
+ if (addr == 0x061d002) { return 0x00; } // settings (from EEPROM?) dipswitch?
+ if (addr == 0x061d004) { return 0x00; } // settings (from EEPROM?) region
+ if (addr == 0x061f004) { return m_p1port->read(); } // P1 inputs
+ if (addr == 0x061f006) { return m_p2port->read(); } // P2 inputs
+ //if (addr == 0x061f00e) { return machine().rand(); } // P2 coin / start
+
+ logerror("%08x: dt7_shared_ram_hack_r address %08x ret %02x\n", pc, addr, ret);
- if (addr == 0x061f00c)
- return ioport("SYS")->read();// machine().rand();
-
- //return ret;
-
-
- u32 pc = m_maincpu->pc();
- if (pc == 0x7d84)
- return 0xff;
- if (addr == 0x061d000) // settings (from EEPROM?) including flipscreen
- return 0x00;
- if (addr == 0x061d002) // settings (from EEPROM?) dipswitch?
- return 0x00;
- if (addr == 0x061d004) // settings (from EEPROM?) region
- return 0xff;
- if (addr == 0x061f004)
- return ioport("IN1")->read(); ;// machine().rand(); // p1 inputs
- if (addr == 0x061f006)
- return ioport("IN2")->read();// machine().rand(); // P2 inputs
-// logerror("%08x: dt7_shared_ram_hack_r address %08x ret %02x\n", pc, addr, ret);
return ret;
}
@@ -249,10 +277,20 @@ void dt7_state::shared_ram_w(offs_t offset, u8 data)
m_shared_ram[offset] = data;
}
+void dt7_state::shared_ram_audio_w(offs_t offset, u8 data)
+{
+ // just a helper function to try and debug the sound CPU a bit more easily
+ //int pc = m_audiocpu->pc();
+ //if (offset == 0xf004 / 2)
+ // logerror("%08x: shared_ram_audio_w address %08x data %02x\n", pc, offset, data);
+ shared_ram_w(offset, data);
+}
-void dt7_state::dt7_unk_w(u8 data)
+void dt7_state::dt7_sndreset_coin_w(offs_t offset, u16 data, u16 mem_mask)
{
- m_audiocpu->set_input_line(INPUT_LINE_RESET, (data & 0x80) ? CLEAR_LINE : ASSERT_LINE);
+ m_audiocpu->set_input_line(INPUT_LINE_RESET, (data & 0x8000) ? CLEAR_LINE : ASSERT_LINE);
+ logerror("%s: dt7_sndreset_coin_w %04x %04x\n", machine().describe_context(), data, mem_mask);
+ // coin counters in lower byte?
}
@@ -266,7 +304,7 @@ void dt7_state::dt7_68k_0_mem(address_map &map)
map(0x200000, 0x200fff).ram().w(m_palette[0], FUNC(palette_device::write16)).share("palette0");
map(0x280000, 0x280fff).ram().w(m_palette[1], FUNC(palette_device::write16)).share("palette1");
- map(0x300000, 0x300000).w(FUNC(dt7_state::dt7_unk_w));
+ map(0x300000, 0x300001).w(FUNC(dt7_state::dt7_sndreset_coin_w));
map(0x400000, 0x40000d).rw(m_vdp[0], FUNC(gp9001vdp_device::read), FUNC(gp9001vdp_device::write));
map(0x480000, 0x48000d).rw(m_vdp[1], FUNC(gp9001vdp_device::read), FUNC(gp9001vdp_device::write));
@@ -282,6 +320,7 @@ void dt7_state::dt7_shared_mem(address_map &map)
map(0x500000, 0x50ffff).ram().share("shared_ram2");
// is this really in the middle of shared RAM, or is there a DMA to get it out?
map(0x509000, 0x50afff).ram().w(FUNC(dt7_state::tx_videoram_dt7_w)).share("tx_videoram");
+ map(0x50f000, 0x50ffff).ram().share("lineram");
}
void dt7_state::dt7_68k_1_mem(address_map &map)
@@ -291,29 +330,39 @@ void dt7_state::dt7_68k_1_mem(address_map &map)
}
-uint8_t dt7_state::unmapped_v25_io1_r()
+u8 dt7_state::unmapped_v25_io1_r()
{
logerror("%s: 0x58008 unknown read\n", machine().describe_context());
return machine().rand();
}
-uint8_t dt7_state::unmapped_v25_io2_r()
+u8 dt7_state::unmapped_v25_io2_r()
{
logerror("%s: 0x5800a unknown read\n", machine().describe_context());
return machine().rand();
}
+void dt7_state::machine_start()
+{
+ save_item(NAME(m_ioport_state));
+}
+
+void dt7_state::machine_reset()
+{
+ m_ioport_state = 0x00;
+}
void dt7_state::dt7_v25_mem(address_map &map)
{
// exact mirroring unknown, don't cover up where the inputs/sound maps
- map(0x00000, 0x07fff).ram().share("shared_ram");
- map(0x20000, 0x27fff).ram().share("shared_ram");
- map(0x28000, 0x2ffff).ram().share("shared_ram");
- map(0x60000, 0x67fff).ram().share("shared_ram");
- map(0x68000, 0x6ffff).ram().share("shared_ram");
- map(0x70000, 0x77fff).ram().share("shared_ram");
- map(0xf8000, 0xfffff).ram().share("shared_ram");
+ // is it meant to mirror in all these locations, or is there a different issue in play?
+ map(0x00000, 0x07fff).ram().w(FUNC(dt7_state::shared_ram_audio_w)).share("shared_ram");
+ map(0x20000, 0x27fff).ram().w(FUNC(dt7_state::shared_ram_audio_w)).share("shared_ram");
+ map(0x28000, 0x2ffff).ram().w(FUNC(dt7_state::shared_ram_audio_w)).share("shared_ram");
+ map(0x60000, 0x67fff).ram().w(FUNC(dt7_state::shared_ram_audio_w)).share("shared_ram");
+ map(0x68000, 0x6ffff).ram().w(FUNC(dt7_state::shared_ram_audio_w)).share("shared_ram");
+ map(0x70000, 0x77fff).ram().w(FUNC(dt7_state::shared_ram_audio_w)).share("shared_ram");
+ map(0xf8000, 0xfffff).ram().w(FUNC(dt7_state::shared_ram_audio_w)).share("shared_ram");
map(0x58000, 0x58001).rw("ymsnd", FUNC(ym2151_device::read), FUNC(ym2151_device::write));
map(0x58002, 0x58002).rw(m_oki[0], FUNC(okim6295_device::read), FUNC(okim6295_device::write));
@@ -356,8 +405,8 @@ void dt7_state::dt7(machine_config &config)
audiocpu.pt_in_cb().set(FUNC(dt7_state::read_port_t));
audiocpu.p2_in_cb().set(FUNC(dt7_state::read_port_2));
audiocpu.p2_out_cb().set(FUNC(dt7_state::write_port_2));
- //audiocpu.p1_in_cb().set_ioport("EEPROM");
- //audiocpu.p1_out_cb().set_ioport("EEPROM");
+ audiocpu.p1_in_cb().set(FUNC(dt7_state::eeprom_r));
+ audiocpu.p1_out_cb().set(FUNC(dt7_state::eeprom_w));
// eeprom type confirmed, and gets inited after first boot, but then game won't boot again?
EEPROM_93C66_16BIT(config, m_eeprom);
@@ -436,7 +485,7 @@ static INPUT_PORTS_START( dt7 )
PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", FUNC(eeprom_serial_93cxx_device::do_read))
INPUT_PORTS_END
-TILE_GET_INFO_MEMBER(dt7_state::get_text_dt7_tile_info)
+TILE_GET_INFO_MEMBER(dt7_state::get_tx_dt7_tile_info)
{
const u16 attrib = m_tx_videoram[tile_index];
const u32 tile_number = attrib & 0x3ff;
@@ -460,8 +509,8 @@ void dt7_state::video_start()
// a different part of this tilemap is displayed on each screen
// each screen has a different palette and uses a ROM in a different location on the PCB
- m_tx_tilemap[0] = &machine().tilemap().create(*m_gfxdecode[0], tilemap_get_info_delegate(*this, FUNC(dt7_state::get_text_dt7_tile_info)), TILEMAP_SCAN_ROWS, 8, 8, 64, 64);
- m_tx_tilemap[1] = &machine().tilemap().create(*m_gfxdecode[1], tilemap_get_info_delegate(*this, FUNC(dt7_state::get_text_dt7_tile_info)), TILEMAP_SCAN_ROWS, 8, 8, 64, 64);
+ m_tx_tilemap[0] = &machine().tilemap().create(*m_gfxdecode[0], tilemap_get_info_delegate(*this, FUNC(dt7_state::get_tx_dt7_tile_info)), TILEMAP_SCAN_ROWS, 8, 8, 64, 64);
+ m_tx_tilemap[1] = &machine().tilemap().create(*m_gfxdecode[1], tilemap_get_info_delegate(*this, FUNC(dt7_state::get_tx_dt7_tile_info)), TILEMAP_SCAN_ROWS, 8, 8, 64, 64);
m_tx_tilemap[0]->set_transparent_pen(0);
m_tx_tilemap[1]->set_transparent_pen(0);
@@ -470,10 +519,34 @@ void dt7_state::video_start()
void dt7_state::tx_videoram_dt7_w(offs_t offset, u16 data, u16 mem_mask)
{
COMBINE_DATA(&m_tx_videoram[offset]);
- if (offset < 64 * 64)
+ m_tx_tilemap[0]->mark_tile_dirty(offset);
+ m_tx_tilemap[1]->mark_tile_dirty(offset);
+}
+
+
+void dt7_state::draw_tx_tilemap(screen_device& screen, bitmap_ind16& bitmap, const rectangle& cliprect, int table)
+{
+ // there seems to be RAM for another tx tilemap
+ // but there were 2 empty sockets / sockets with blank tx ROMs, so
+ // it's likely only one of them is used
+
+ // see comments in other toaplan drivers, this is likely per-line
+ int flipx = m_lineram[(table * 2)] & 0x8000;
+ m_tx_tilemap[table / 2]->set_flip(flipx ? 0 : TILEMAP_FLIPX);
+
+ rectangle clip = cliprect;
+ for (int y = cliprect.min_y; y <= cliprect.max_y; y++)
{
- m_tx_tilemap[0]->mark_tile_dirty(offset);
- m_tx_tilemap[1]->mark_tile_dirty(offset);
+ clip.min_y = clip.max_y = y;
+
+ u16 scroll1 = m_lineram[((y * 8) + (table * 2) + 0) & 0x7ff]; // lineselect
+ //u16 scroll2 = m_lineram[((y * 8) + (table * 2) + 1) & 0x7ff]; // xscroll
+
+ scroll1 &= 0x7fff; // 0x8000 is per-line flip
+ scroll1 -= 0x0900; // are all these scroll bits?
+
+ m_tx_tilemap[table / 2]->set_scrolly(0, scroll1 - y);
+ m_tx_tilemap[table / 2]->draw(screen, bitmap, clip, 0);
}
}
@@ -482,22 +555,17 @@ u32 dt7_state::screen_update_dt7_1(screen_device &screen, bitmap_ind16 &bitmap,
bitmap.fill(0, cliprect);
m_custom_priority_bitmap.fill(0, cliprect);
m_vdp[0]->render_vdp(bitmap, cliprect);
-
- m_tx_tilemap[0]->set_scrolldy(0, 0);
- m_tx_tilemap[0]->draw(screen, bitmap, cliprect, 0);
-
+ draw_tx_tilemap(screen, bitmap, cliprect, 0);
return 0;
}
+
u32 dt7_state::screen_update_dt7_2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
bitmap.fill(0, cliprect);
m_custom_priority_bitmap.fill(0, cliprect);
m_vdp[1]->render_vdp(bitmap, cliprect);
-
- m_tx_tilemap[1]->set_scrolldy(256 + 16, 256 + 16);
- m_tx_tilemap[1]->draw(screen, bitmap, cliprect, 0);
-
+ draw_tx_tilemap(screen, bitmap, cliprect, 2);
return 0;
}
@@ -558,4 +626,4 @@ ROM_END
} // anonymous namespace
// The region comes from the EEPROM? so will need clones like FixEight
-GAME( 1993, dt7, 0, dt7, dt7, dt7_state,empty_init, ROT270, "Toaplan", "DT7 (prototype)", MACHINE_NOT_WORKING )
+GAME( 1993, dt7, 0, dt7, dt7, dt7_state,empty_init, ROT270, "Toaplan", "DT7 (prototype)", MACHINE_NOT_WORKING ) // flyer shows "Survival Battle Dynamic Trial 7"
diff --git a/src/mame/toaplan/toaplan_v25_tables.h b/src/mame/toaplan/toaplan_v25_tables.h
index fcce0870303..03474cbee7a 100644
--- a/src/mame/toaplan/toaplan_v25_tables.h
+++ b/src/mame/toaplan/toaplan_v25_tables.h
@@ -109,15 +109,15 @@ class toaplan_v25_tables
// some kind of branch, not sure which
// it's used after compares in blocks, sometimes with a 'be' then a 'br' straight after, so it must be a condition that could also fail a be and fall to the br
//#define G_B0 0x74
- #define G_B0 0x79
+ #define G_B0 0x77 // context suggests that this might instead be 0x77 (it follows comparing a bit position against 7)
//#define G_B0 0x75
- // 6b @ 73827
- #define G_6B 0x34 // must be a 2 byte operation on al? after an AND, 2nd byte is 0x08
+ // 6b @ 73827 // must be a 2 byte operation on al? after an AND, at end of interrupt, 2nd byte is 0x08
+ #define G_6B 0x34 // treat as XOR, could be OR?
- // 59 @ 73505 and 7379B (maybe ret?, or di?)
+ // 59 @ 73505 and 7379B
//#define G_59 0xfa
- #define G_59 0xc3
+ #define G_59 0xc3 // almost certainly has to be ret
static constexpr u8 dt7_decryption_table[256] = {
// 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07, 0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f, /* 00 */
diff --git a/src/mame/zaccaria/galaxia.cpp b/src/mame/zaccaria/galaxia.cpp
index 4fb523ab6ea..d455e89c8a4 100644
--- a/src/mame/zaccaria/galaxia.cpp
+++ b/src/mame/zaccaria/galaxia.cpp
@@ -668,6 +668,7 @@ static INPUT_PORTS_START( galaxia )
PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION("2N:2")
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_UNUSED )
INPUT_PORTS_END
static INPUT_PORTS_START( galaxiaa )
diff --git a/src/mame/zaccaria/quasar.cpp b/src/mame/zaccaria/quasar.cpp
index a6cc31ed18c..76d2f1ec021 100644
--- a/src/mame/zaccaria/quasar.cpp
+++ b/src/mame/zaccaria/quasar.cpp
@@ -36,7 +36,7 @@ Quasar by Zaccaria (1980)
2650A CPU
-I8085 Sound Board
+I8035 Sound Board
*******************************************************************************/