summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/devices/bus/isa/ide.cpp7
-rw-r--r--src/devices/bus/isa/mcd.cpp7
-rw-r--r--src/devices/bus/odyssey2/voice.cpp2
-rw-r--r--src/devices/cpu/i960/i960.cpp2
-rw-r--r--src/devices/cpu/z80/r800.cpp5
-rw-r--r--src/devices/cpu/z80/z80.cpp1
-rw-r--r--src/devices/cpu/z80/z80.h1
-rw-r--r--src/devices/cpu/z80/z80.inc3
-rw-r--r--src/devices/cpu/z80/z80.lst4636
-rw-r--r--src/devices/cpu/z80/z80make.py10
-rw-r--r--src/devices/machine/netlist.cpp35
-rw-r--r--src/devices/machine/netlist.h12
-rw-r--r--src/devices/sound/disc_cls.h14
-rw-r--r--src/devices/sound/disc_inp.hxx7
-rw-r--r--src/devices/sound/discrete.cpp5
-rw-r--r--src/devices/sound/spkrdev.cpp2
-rw-r--r--src/emu/resampler.cpp142
-rw-r--r--src/emu/resampler.h41
-rw-r--r--src/emu/sound.cpp128
-rw-r--r--src/emu/sound.h32
-rw-r--r--src/frontend/mame/ui/audioeffects.cpp199
-rw-r--r--src/frontend/mame/ui/audioeffects.h13
-rw-r--r--src/mame/bmc/bmcpokr.cpp384
-rw-r--r--src/mame/bmc/koftball.cpp297
-rw-r--r--src/mame/capcom/cps2.cpp22
-rw-r--r--src/mame/casio/cps2000.cpp21
-rw-r--r--src/mame/casio/pickytlk.cpp10
-rw-r--r--src/mame/igs/igs_m027.cpp6
-rw-r--r--src/mame/itech/itech32.cpp9
-rw-r--r--src/mame/mame.lst1
-rw-r--r--src/mame/misc/carrera.cpp477
-rw-r--r--src/mame/misc/gms.cpp581
-rw-r--r--src/mame/misc/xtom3d.cpp11
-rw-r--r--src/mame/nec/pc9801.cpp7
-rw-r--r--src/mame/phoenix/phoenix.cpp9
-rw-r--r--src/mame/pinball/macp.cpp8
-rw-r--r--src/mame/skeleton/alesis_qs.cpp7
-rw-r--r--src/mame/tvgames/generalplus_gp327902.cpp3
-rw-r--r--src/mame/tvgames/generalplus_gpm453x_nand.cpp3
-rw-r--r--src/osd/modules/sound/pulse_sound.cpp14
40 files changed, 3962 insertions, 3212 deletions
diff --git a/src/devices/bus/isa/ide.cpp b/src/devices/bus/isa/ide.cpp
index 9565851fafc..22ac0defe64 100644
--- a/src/devices/bus/isa/ide.cpp
+++ b/src/devices/bus/isa/ide.cpp
@@ -50,8 +50,8 @@ void isa16_ide_device::ide_interrupt(int state)
void isa16_ide_device::cdrom_headphones(device_t *device)
{
cdda_device *cdda = device->subdevice<cdda_device>("cdda");
- cdda->add_route(0, "^^lheadphone", 1.0);
- cdda->add_route(1, "^^rheadphone", 1.0);
+ cdda->add_route(0, "^^headphone", 1.0, 0);
+ cdda->add_route(1, "^^headphone", 1.0, 1);
}
static INPUT_PORTS_START( ide )
@@ -76,8 +76,7 @@ void isa16_ide_device::device_add_mconfig(machine_config &config)
IDE_CONTROLLER(config, m_ide).options(ata_devices, "hdd", nullptr, false);
m_ide->irq_handler().set(FUNC(isa16_ide_device::ide_interrupt));
- SPEAKER(config, "lheadphone").front_left();
- SPEAKER(config, "rheadphone").front_right();
+ SPEAKER(config, "headphone", 2).front();
m_ide->slot(0).set_option_machine_config("cdrom", cdrom_headphones);
m_ide->slot(1).set_option_machine_config("cdrom", cdrom_headphones);
diff --git a/src/devices/bus/isa/mcd.cpp b/src/devices/bus/isa/mcd.cpp
index 085ab3676b9..0b78d68a98f 100644
--- a/src/devices/bus/isa/mcd.cpp
+++ b/src/devices/bus/isa/mcd.cpp
@@ -26,11 +26,10 @@ DEFINE_DEVICE_TYPE(ISA16_MCD, mcd_isa_device, "mcd_isa", "Mitsumi ISA CD-ROM Ada
void mcd_isa_device::device_add_mconfig(machine_config &config)
{
- SPEAKER(config, "lheadphone").front_left();
- SPEAKER(config, "rheadphone").front_right();
+ SPEAKER(config, "headphone", 2).front();
CDDA(config, m_cdda);
- m_cdda->add_route(0, "lheadphone", 1.0);
- m_cdda->add_route(1, "rheadphone", 1.0);
+ m_cdda->add_route(0, "headphone", 1.0, 0);
+ m_cdda->add_route(1, "headphone", 1.0, 1);
m_cdda->set_cdrom_tag(*this);
}
diff --git a/src/devices/bus/odyssey2/voice.cpp b/src/devices/bus/odyssey2/voice.cpp
index 9ca1ea26101..678757bb775 100644
--- a/src/devices/bus/odyssey2/voice.cpp
+++ b/src/devices/bus/odyssey2/voice.cpp
@@ -139,7 +139,7 @@ void o2_voice_device::device_add_mconfig(machine_config &config)
// The Voice uses a speaker with its own volume control so the relative volumes to use are subjective, these sound good
m_speech->add_route(ALL_OUTPUTS, "mono", 1.00);
- O2_CART_SLOT(config, m_subslot, o2_cart, nullptr);
+ O2_CART_SLOT(config, m_subslot, o2_cart, nullptr).set_must_be_loaded(true);
}
ROM_START( o2voice )
diff --git a/src/devices/cpu/i960/i960.cpp b/src/devices/cpu/i960/i960.cpp
index 7d31ad031bf..738037e60b5 100644
--- a/src/devices/cpu/i960/i960.cpp
+++ b/src/devices/cpu/i960/i960.cpp
@@ -469,7 +469,7 @@ void i960_cpu_device::take_interrupt(int vector, int lvl)
}
SP = (SP + 63) & ~63;
- SP += 128; // emulate ElSemi's core, this fixes the crash in sonic the fighters
+ SP += 64; // add padding to prevent buffer underflow when saving processor state
do_call(IRQV, 7, SP);
diff --git a/src/devices/cpu/z80/r800.cpp b/src/devices/cpu/z80/r800.cpp
index 648735462e6..419bbacef05 100644
--- a/src/devices/cpu/z80/r800.cpp
+++ b/src/devices/cpu/z80/r800.cpp
@@ -63,11 +63,6 @@ void r800_device::device_validity_check(validity_checker &valid) const
/***************************************************************
- * adjust cycle count by n T-states
- ***************************************************************/
-#define T(icount) { m_icount -= icount; }
-
-/***************************************************************
* SLL r8
***************************************************************/
u8 r800_device::r800_sll(u8 value)
diff --git a/src/devices/cpu/z80/z80.cpp b/src/devices/cpu/z80/z80.cpp
index c95474999d5..9d2c5958dd7 100644
--- a/src/devices/cpu/z80/z80.cpp
+++ b/src/devices/cpu/z80/z80.cpp
@@ -571,7 +571,6 @@ void z80_device::device_start()
save_item(NAME(m_ea));
save_item(NAME(m_service_attention));
save_item(NAME(m_tmp_irq_vector));
- save_item(NAME(m_shared_addr.w));
save_item(NAME(m_shared_data.w));
save_item(NAME(m_shared_data2.w));
save_item(NAME(m_rtemp));
diff --git a/src/devices/cpu/z80/z80.h b/src/devices/cpu/z80/z80.h
index b40e697d81f..3498f100dcd 100644
--- a/src/devices/cpu/z80/z80.h
+++ b/src/devices/cpu/z80/z80.h
@@ -181,7 +181,6 @@ protected:
int m_icount;
int m_tmp_irq_vector;
- PAIR16 m_shared_addr;
PAIR16 m_shared_data;
PAIR16 m_shared_data2;
u8 m_rtemp;
diff --git a/src/devices/cpu/z80/z80.inc b/src/devices/cpu/z80/z80.inc
index caf7ce22c8f..1c7dd7843a0 100644
--- a/src/devices/cpu/z80/z80.inc
+++ b/src/devices/cpu/z80/z80.inc
@@ -60,9 +60,6 @@
#define WZ_L m_wz.b.l
-#define TADR m_shared_addr.w // Typically represents values from A0..15 pins. 16bit input in steps.
-#define TADR_H m_shared_addr.b.h
-#define TADR_L m_shared_addr.b.l
#define TDAT m_shared_data.w // 16bit input(if use as second parameter) or output in steps.
#define TDAT2 m_shared_data2.w
#define TDAT_H m_shared_data.b.h
diff --git a/src/devices/cpu/z80/z80.lst b/src/devices/cpu/z80/z80.lst
index a31e651748b..17298dffca5 100644
--- a/src/devices/cpu/z80/z80.lst
+++ b/src/devices/cpu/z80/z80.lst
@@ -3,76 +3,85 @@
##########################################################
# macros
##########################################################
-macro nomreq_addr
+macro nomreq_addr %addr
if (nomemrq_en)
- m_nomreq_cb(TADR, 0x00, 0xff);
+ m_nomreq_cb(%addr, 0x00, 0xff);
+ 1
macro nomreq_ir %cycles
- TADR = (m_i << 8) | (m_r2 & 0x80) | (m_r & 0x7f);
- %cycles * call nomreq_addr
+ %cycles * @nomreq_addr (m_i << 8) | (m_r2 & 0x80) | (m_r & 0x7f)
-macro in
- m_iorq_cycles !! TDAT8 = m_io.read_interruptible(TADR);
+macro in %port
+ m_iorq_cycles !! TDAT8 = m_io.read_interruptible(%port);
-macro out
- m_iorq_cycles !! m_io.write_interruptible(TADR, TDAT8);
+macro out %port
+ m_iorq_cycles !! m_io.write_interruptible(%port, TDAT8);
-macro rm
- m_memrq_cycles !! TDAT8 = data_read(TADR);
+macro rm %addr
+ m_memrq_cycles !! TDAT8 = data_read(%addr);
-macro rm_reg
- call rm
- call nomreq_addr
+macro rm_reg %addr
+ @rm %addr
+ @nomreq_addr %addr
-macro rm16
- call rm
- TDAT_H = TDAT_L; TADR++;
- call rm
- using std::swap; std::swap(TDAT_H, TDAT_L);
+macro rm16 %addr
+ @rm %addr
+ TDAT_H = TDAT_L;
+ @rm %addr+1
+ using std::swap;
+ swap(TDAT_H, TDAT_L);
-macro wm
- m_memrq_cycles !! data_write(TADR, TDAT8);
+macro wm %addr
+ m_memrq_cycles !! data_write(%addr, TDAT8);
-macro wm16
- call wm
- TADR++; TDAT8 = TDAT_H;
- call wm
+macro wm16 %addr
+ @wm %addr
+ TDAT8 = TDAT_H;
+ @wm %addr+1
-macro wm16_sp
+macro wm16_sp %d16
SP--;
- m_memrq_cycles !! stack_write(SP, TDAT_H);
+ m_memrq_cycles !! stack_write(SP, (%d16) >> 8);
SP--;
- m_memrq_cycles !! stack_write(SP, TDAT_L);
+ m_memrq_cycles !! stack_write(SP, %d16);
macro rop
m_m1_cycles-2 !! TDAT8 = opcode_read();
if (refresh_en)
m_refresh_cb((I << 8) | (R2 & 0x80) | (R & 0x7f), 0x00, 0xff);
+ 2
- PC++; R++; Q = QT; QT = YF | XF;
+ PC++;
+ R++;
+ Q = QT;
+ QT = YF | XF;
macro r800:rop
m_m1_cycles !! TDAT8 = opcode_read();
- PC++; R++; Q = QT; QT = YF | XF;
+ PC++;
+ R++;
+ Q = QT;
+ QT = YF | XF;
macro arg
m_memrq_cycles !! TDAT8 = arg_read();
PC++;
macro arg16
- call arg
+ @arg
TDAT_H = TDAT_L;
- call arg
- using std::swap; swap(TDAT_H, TDAT_L);
+ @arg
+ using std::swap;
+ swap(TDAT_H, TDAT_L);
macro eax
- call arg
- m_ea = (u16)(IX + (s8)TDAT8); WZ = m_ea;
+ @arg
+ m_ea = (u16)(IX + (s8)TDAT8);
+ WZ = m_ea;
macro eay
- call arg
- m_ea = (u16)(IY + (s8)TDAT8); WZ = m_ea;
+ @arg
+ m_ea = (u16)(IY + (s8)TDAT8);
+ WZ = m_ea;
macro pop
m_memrq_cycles !! TDAT_L = stack_read(SP);
@@ -80,463 +89,690 @@ macro pop
m_memrq_cycles !! TDAT_H = stack_read(SP);
SP++;
-macro push
- call nomreq_ir 1
- call wm16_sp
+macro push %d16
+ @nomreq_ir 1
+ @wm16_sp %d16
macro jp
- call arg16
- PC = TDAT; WZ = PC;
+ @arg16
+ PC = TDAT;
+ WZ = PC;
macro t6a84:jp
- call arg16
- PC = TDAT; WZ = PC;
+ @arg16
+ PC = TDAT;
+ WZ = PC;
paged_jump();
macro jp_cond
if (TDAT8) {
- call arg16
- PC = TDAT; WZ = PC;
+ @arg16
+ PC = TDAT;
+ WZ = PC;
} else {
// implicit do PC += 2
- call arg16
+ @arg16
WZ = TDAT;
}
macro t6a84:jp_cond
if (TDAT8) {
- call arg16
- PC = TDAT; WZ = PC;
+ @arg16
+ PC = TDAT;
+ WZ = PC;
paged_jump();
} else {
// implicit do PC += 2
- call arg16
+ @arg16
WZ = TDAT;
}
macro jr
- call arg
- TADR = PC-1;
- 5 * call nomreq_addr
- PC += (s8)TDAT8; WZ = PC;
+ @arg
+ 5 * @nomreq_addr PC-1
+ PC += (s8)TDAT8;
+ WZ = PC;
macro t6a84:jr
- call arg
- TADR = PC-1;
- 5 * call nomreq_addr
- PC += (s8)TDAT8; WZ = PC;
+ @arg
+ 5 * @nomreq_addr PC-1
+ PC += (s8)TDAT8;
+ WZ = PC;
paged_jump();
macro r800:jr
- call arg
- TADR = PC-1;
+ @arg
+ 1
- PC += (s8)TDAT8; WZ = PC;
+ PC += (s8)TDAT8;
+ WZ = PC;
macro jr_cond
if (TDAT8) {
- call jr
+ @jr
} else {
- call arg
+ @arg
}
macro arg16_call
- call arg16
- m_ea = TDAT; TADR = PC-1;
- call nomreq_addr
- WZ = m_ea; TDAT = PC;
- call wm16_sp
+ @arg16
+ m_ea = TDAT;
+ @nomreq_addr PC-1
+ WZ = m_ea;
+ @wm16_sp PC
PC = m_ea;
macro r800:arg16_call
- call arg16
- m_ea = TDAT; TADR = PC-1;
- call nomreq_addr
- WZ = m_ea; TDAT = PC;
- call wm16_sp
+ @arg16
+ m_ea = TDAT;
+ @nomreq_addr PC-1
+ WZ = m_ea;
+ @wm16_sp PC
PC = m_ea;
macro call_cond
if (TDAT8) {
- call arg16_call
+ @arg16_call
} else {
- call arg16
+ @arg16
WZ = TDAT;
}
macro ret_cond
- call nomreq_ir 1
+ @nomreq_ir 1
if (TDAT8) {
- call pop
- PC = TDAT; WZ = PC;
+ @pop
+ PC = TDAT;
+ WZ = PC;
}
macro retn
- call pop
- PC = TDAT; LOGMASKED(LOG_INT, "RETN m_iff1:%d m_iff2:%d\n", m_iff1, m_iff2); WZ = PC; m_iff1 = m_iff2;
+ @pop
+ PC = TDAT;
+ LOGMASKED(LOG_INT, "RETN m_iff1:%d m_iff2:%d\n", m_iff1, m_iff2);
+ WZ = PC;
+ m_iff1 = m_iff2;
macro z80n:retn
m_out_retn_seen_cb(0);
- call pop
+ @pop
if (m_stackless) {
m_pc.b.l = m_in_nextreg_cb(0xc2);
m_pc.b.h = m_in_nextreg_cb(0xc3);
} else {
PC = TDAT;
}
- LOGMASKED(LOG_INT, "RETN m_iff1:%d m_iff2:%d\n", m_iff1, m_iff2); WZ = PC; m_iff1 = m_iff2;
+ LOGMASKED(LOG_INT, "RETN m_iff1:%d m_iff2:%d\n", m_iff1, m_iff2);
+ WZ = PC;
+ m_iff1 = m_iff2;
macro reti
- call pop
- PC = TDAT; WZ = PC; m_iff1 = m_iff2;
+ @pop
+ PC = TDAT;
+ WZ = PC;
+ m_iff1 = m_iff2;
daisy_call_reti_device();
macro t6a84:reti
- call pop
- PC = TDAT; WZ = PC; m_iff1 = m_iff2;
+ @pop
+ PC = TDAT;
+ WZ = PC;
+ m_iff1 = m_iff2;
paged_reti();
daisy_call_reti_device();
macro ld_r_a
- call nomreq_ir 1
- m_r = A; m_r2 = A & 0x80; // keep bit 7 of r
+ @nomreq_ir 1
+ m_r = A;
+ m_r2 = A & 0x80; // keep bit 7 of r
macro r800:ld_r_a
- m_r = A; m_r2 = A & 0x80; // keep bit 7 of r
+ m_r = A;
+ m_r2 = A & 0x80; // keep bit 7 of r
macro ld_a_r
- call nomreq_ir 1
- A = (m_r & 0x7f) | m_r2; set_f((F & CF) | SZ[A] | (m_iff2 << 2));
+ @nomreq_ir 1
+ A = (m_r & 0x7f) | m_r2;
+ set_f((F & CF) | SZ[A] | (m_iff2 << 2));
if (HAS_LDAIR_QUIRK)
set_service_attention<SA_AFTER_LDAIR, 1>();
macro r800:ld_a_r
- A = (m_r & 0x7f) | m_r2; set_f((F & CF) | SZ[A] | (m_iff2 << 2));
+ A = (m_r & 0x7f) | m_r2;
+ set_f((F & CF) | SZ[A] | (m_iff2 << 2));
if (HAS_LDAIR_QUIRK)
set_service_attention<SA_AFTER_LDAIR, 1>();
macro ld_i_a
- call nomreq_ir 1
+ @nomreq_ir 1
m_i = A;
macro r800:ld_i_a
m_i = A;
macro ld_a_i
- call nomreq_ir 1
- A = m_i; set_f((F & CF) | SZ[A] | (m_iff2 << 2));
+ @nomreq_ir 1
+ A = m_i;
+ set_f((F & CF) | SZ[A] | (m_iff2 << 2));
if (HAS_LDAIR_QUIRK)
set_service_attention<SA_AFTER_LDAIR, 1>();
macro r800:ld_a_i
- A = m_i; set_f((F & CF) | SZ[A] | (m_iff2 << 2));
+ A = m_i;
+ set_f((F & CF) | SZ[A] | (m_iff2 << 2));
if (HAS_LDAIR_QUIRK)
set_service_attention<SA_AFTER_LDAIR, 1>();
macro rst addr
- TDAT = PC;
- call push
- PC = addr; WZ = PC;
+ @push PC
+ PC = addr;
+ WZ = PC;
macro rrd
- TADR = HL;
- call rm
+ @rm HL
WZ = HL+1;
- 4 * call nomreq_addr
- TDAT_H = TDAT8; TDAT8 = (TDAT8 >> 4) | (A << 4);
- call wm
- A = (A & 0xf0) | (TDAT_H & 0x0f); set_f((F & CF) | SZP[A]);
+ 4 * @nomreq_addr HL
+ TDAT_H = TDAT8;
+ TDAT8 = (TDAT8 >> 4) | (A << 4);
+ @wm HL
+ A = (A & 0xf0) | (TDAT_H & 0x0f);
+ set_f((F & CF) | SZP[A]);
macro rld
- TADR = HL;
- call rm
+ @rm HL
WZ = HL+1;
- 4 * call nomreq_addr
- TDAT_H = TDAT8; TDAT8 = (TDAT8 << 4) | (A & 0x0f);
- call wm
- A = (A & 0xf0) | (TDAT_H >> 4); set_f((F & CF) | SZP[A]);
-
-macro ex_sp
- TDAT2 = TDAT;
- call pop
- TADR = SP-1;
- call nomreq_addr
- using std::swap; std::swap(TDAT, TDAT2);
- call wm16_sp
- TADR = SP;
- 2 * call nomreq_addr
- using std::swap; std::swap(TDAT, TDAT2); WZ = TDAT;
+ 4 * @nomreq_addr HL
+ TDAT_H = TDAT8;
+ TDAT8 = (TDAT8 << 4) | (A & 0x0f);
+ @wm HL
+ A = (A & 0xf0) | (TDAT_H >> 4);
+ set_f((F & CF) | SZP[A]);
+
+macro ex_sp %d16
+ @pop
+ @nomreq_addr SP-1
+ @wm16_sp %d16
+ %d16 = TDAT;
+ 2 * @nomreq_addr SP
+ WZ = TDAT;
macro add16
- call nomreq_ir 7
- { u32 res = TDAT + TDAT2; WZ = TDAT + 1; set_f((F & (SF | ZF | VF)) | (((TDAT ^ res ^ TDAT2) >> 8) & HF) | ((res >> 16) & CF) | ((res >> 8) & (YF | XF))); TDAT = (u16)res; }
+{
+ @nomreq_ir 7
+ u32 res = TDAT + TDAT2;
+ WZ = TDAT + 1;
+ set_f((F & (SF | ZF | VF)) | (((TDAT ^ res ^ TDAT2) >> 8) & HF) | ((res >> 16) & CF) | ((res >> 8) & (YF | XF)));
+ TDAT = (u16)res;
+}
macro r800:add16
- { u32 res = TDAT + TDAT2; WZ = TDAT + 1; set_f((F & (SF | ZF | VF)) | (((TDAT ^ res ^ TDAT2) >> 8) & HF) | ((res >> 16) & CF) | ((res >> 8) & (YF | XF))); TDAT = (u16)res; }
+{
+ u32 res = TDAT + TDAT2;
+ WZ = TDAT + 1;
+ set_f((F & (SF | ZF | VF)) | (((TDAT ^ res ^ TDAT2) >> 8) & HF) | ((res >> 16) & CF) | ((res >> 8) & (YF | XF)));
+ TDAT = (u16)res;
+}
macro adc_hl
- call nomreq_ir 7
- { u32 res = HL + TDAT + (F & CF); WZ = HL + 1; set_f((((HL ^ res ^ TDAT) >> 8) & HF) | ((res >> 16) & CF) | ((res >> 8) & (SF | YF | XF)) | ((res & 0xffff) ? 0 : ZF) | (((TDAT ^ HL ^ 0x8000) & (TDAT ^ res) & 0x8000) >> 13)); HL = (u16)res; }
+{
+ @nomreq_ir 7
+ u32 res = HL + TDAT + (F & CF);
+ WZ = HL + 1;
+ set_f((((HL ^ res ^ TDAT) >> 8) & HF) | ((res >> 16) & CF) | ((res >> 8) & (SF | YF | XF)) | ((res & 0xffff) ? 0 : ZF) | (((TDAT ^ HL ^ 0x8000) & (TDAT ^ res) & 0x8000) >> 13));
+ HL = (u16)res;
+}
macro r800:adc_hl
- { u32 res = HL + TDAT + (F & CF); WZ = HL + 1; set_f((((HL ^ res ^ TDAT) >> 8) & HF) | ((res >> 16) & CF) | ((res >> 8) & (SF | YF | XF)) | ((res & 0xffff) ? 0 : ZF) | (((TDAT ^ HL ^ 0x8000) & (TDAT ^ res) & 0x8000) >> 13)); HL = (u16)res; }
+{
+ u32 res = HL + TDAT + (F & CF);
+ WZ = HL + 1;
+ set_f((((HL ^ res ^ TDAT) >> 8) & HF) | ((res >> 16) & CF) | ((res >> 8) & (SF | YF | XF)) | ((res & 0xffff) ? 0 : ZF) | (((TDAT ^ HL ^ 0x8000) & (TDAT ^ res) & 0x8000) >> 13));
+ HL = (u16)res;
+}
macro sbc_hl
- call nomreq_ir 7
- { u32 res = HL - TDAT - (F & CF); WZ = HL + 1; set_f((((HL ^ res ^ TDAT) >> 8) & HF) | NF | ((res >> 16) & CF) | ((res >> 8) & (SF | YF | XF)) | ((res & 0xffff) ? 0 : ZF) | (((TDAT ^ HL) & (HL ^ res) &0x8000) >> 13)); HL = (u16)res; }
+{
+ @nomreq_ir 7
+ u32 res = HL - TDAT - (F & CF);
+ WZ = HL + 1;
+ set_f((((HL ^ res ^ TDAT) >> 8) & HF) | NF | ((res >> 16) & CF) | ((res >> 8) & (SF | YF | XF)) | ((res & 0xffff) ? 0 : ZF) | (((TDAT ^ HL) & (HL ^ res) & 0x8000) >> 13));
+ HL = (u16)res;
+}
macro r800:sbc_hl
- { u32 res = HL - TDAT - (F & CF); WZ = HL + 1; set_f((((HL ^ res ^ TDAT) >> 8) & HF) | NF | ((res >> 16) & CF) | ((res >> 8) & (SF | YF | XF)) | ((res & 0xffff) ? 0 : ZF) | (((TDAT ^ HL) & (HL ^ res) &0x8000) >> 13)); HL = (u16)res; }
+{
+ u32 res = HL - TDAT - (F & CF);
+ WZ = HL + 1;
+ set_f((((HL ^ res ^ TDAT) >> 8) & HF) | NF | ((res >> 16) & CF) | ((res >> 8) & (SF | YF | XF)) | ((res & 0xffff) ? 0 : ZF) | (((TDAT ^ HL) & (HL ^ res) & 0x8000) >> 13));
+ HL = (u16)res;
+}
macro ldi
- TADR = HL;
- call rm
- TADR = DE;
- call wm
- 2 * call nomreq_addr
- set_f(F & (SF | ZF | CF)); if ((A + TDAT8) & 0x02) F |= YF; if ((A + TDAT8) & 0x08) F |= XF; HL++; DE++; BC--; if(BC) F |= VF;
+ @rm HL
+ @wm DE
+ 2 * @nomreq_addr DE
+ set_f(F & (SF | ZF | CF));
+ if ((A + TDAT8) & 0x02)
+ F |= YF;
+ if ((A + TDAT8) & 0x08)
+ F |= XF;
+ HL++;
+ DE++;
+ BC--;
+ if (BC)
+ F |= VF;
macro r800:ldi
- TADR = HL;
- call rm
- TADR = DE;
- call wm
- call nomreq_addr
- set_f(F & (SF | ZF | CF)); if ((A + TDAT8) & 0x02) F |= YF; if ((A + TDAT8) & 0x08) F |= XF; HL++; DE++; BC--; if(BC) F |= VF;
+ @rm HL
+ @wm DE
+ @nomreq_addr DE
+ set_f(F & (SF | ZF | CF));
+ if ((A + TDAT8) & 0x02)
+ F |= YF;
+ if ((A + TDAT8) & 0x08)
+ F |= XF;
+ HL++;
+ DE++;
+ BC--;
+ if (BC)
+ F |= VF;
macro cpi
- TADR = HL;
- call rm
- 5 * call nomreq_addr
- { u8 res = A - TDAT8; WZ++; HL++; BC--; set_f((F & CF) | (SZ[res]&~(YF|XF)) | ((A^TDAT8^res)&HF) | NF); if (F & HF) res -= 1; if (res & 0x02) F |= YF; if (res & 0x08) F |= XF; if (BC) F |= VF; }
+{
+ @rm HL
+ 5 * @nomreq_addr HL
+ u8 res = A - TDAT8;
+ WZ++;
+ HL++;
+ BC--;
+ set_f((F & CF) | (SZ[res]&~(YF|XF)) | ((A^TDAT8^res)&HF) | NF);
+ if (F & HF)
+ res -= 1;
+ if (res & 0x02)
+ F |= YF;
+ if (res & 0x08)
+ F |= XF;
+ if (BC)
+ F |= VF;
+}
macro r800:cpi
- TADR = HL;
- call rm
- call nomreq_addr
- { u8 res = A - TDAT8; WZ++; HL++; BC--; set_f((F & CF) | (SZ[res]&~(YF|XF)) | ((A^TDAT8^res)&HF) | NF); if (F & HF) res -= 1; if (res & 0x02) F |= YF; if (res & 0x08) F |= XF; if (BC) F |= VF; }
+{
+ @rm HL
+ @nomreq_addr HL
+ u8 res = A - TDAT8;
+ WZ++;
+ HL++;
+ BC--;
+ set_f((F & CF) | (SZ[res]&~(YF|XF)) | ((A^TDAT8^res)&HF) | NF);
+ if (F & HF)
+ res -= 1;
+ if (res & 0x02)
+ F |= YF;
+ if (res & 0x08)
+ F |= XF;
+ if (BC)
+ F |= VF;
+}
macro ini
- call nomreq_ir 1
- TADR = BC;
- call in
- WZ = BC + 1; B--; TADR = HL;
- call wm
- { HL++; set_f(SZ[B]); unsigned t = (unsigned)((C + 1) & 0xff) + (unsigned)TDAT8; if (TDAT8 & SF) F |= NF; if (t & 0x100) F |= HF | CF; F |= SZP[(u8)(t & 0x07) ^ B] & PF; }
+{
+ @nomreq_ir 1
+ @in BC
+ WZ = BC + 1;
+ B--;
+ @wm HL
+ HL++;
+ set_f(SZ[B]);
+ unsigned t = (unsigned)((C + 1) & 0xff) + (unsigned)TDAT8;
+ if (TDAT8 & SF)
+ F |= NF;
+ if (t & 0x100)
+ F |= HF | CF;
+ F |= SZP[(u8)(t & 0x07) ^ B] & PF;
+}
macro r800:ini
- TADR = BC;
- call in
- WZ = BC + 1; B--; TADR = HL;
- call wm
- { HL++; set_f(SZ[B]); unsigned t = (unsigned)((C + 1) & 0xff) + (unsigned)TDAT8; if (TDAT8 & SF) F |= NF; if (t & 0x100) F |= HF | CF; F |= SZP[(u8)(t & 0x07) ^ B] & PF; }
+{
+ @in BC
+ WZ = BC + 1;
+ B--;
+ @wm HL
+ HL++;
+ set_f(SZ[B]);
+ unsigned t = (unsigned)((C + 1) & 0xff) + (unsigned)TDAT8;
+ if (TDAT8 & SF)
+ F |= NF;
+ if (t & 0x100)
+ F |= HF | CF;
+ F |= SZP[(u8)(t & 0x07) ^ B] & PF;
+}
macro outi
- call nomreq_ir 1
- TADR = HL;
- call rm
- B--; WZ = BC + 1; TADR = BC;
- call out
- { HL++; set_f(SZ[B]); unsigned t = (unsigned)L + (unsigned)TDAT8; if (TDAT8 & SF) F |= NF; if (t & 0x100) F |= HF | CF; F |= SZP[(u8)(t & 0x07) ^ B] & PF; }
+{
+ @nomreq_ir 1
+ @rm HL
+ B--;
+ WZ = BC + 1;
+ @out BC
+ HL++;
+ set_f(SZ[B]);
+ unsigned t = (unsigned)L + (unsigned)TDAT8;
+ if (TDAT8 & SF)
+ F |= NF;
+ if (t & 0x100)
+ F |= HF | CF;
+ F |= SZP[(u8)(t & 0x07) ^ B] & PF;
+}
macro r800:outi
- TADR = HL;
- call rm
- B--; WZ = BC + 1; TADR = BC;
- call out
- { HL++; set_f(SZ[B]); unsigned t = (unsigned)L + (unsigned)TDAT8; if (TDAT8 & SF) F |= NF; if (t & 0x100) F |= HF | CF; F |= SZP[(u8)(t & 0x07) ^ B] & PF; }
+{
+ @rm HL
+ B--;
+ WZ = BC + 1;
+ @out BC
+ HL++;
+ set_f(SZ[B]);
+ unsigned t = (unsigned)L + (unsigned)TDAT8;
+ if (TDAT8 & SF)
+ F |= NF;
+ if (t & 0x100)
+ F |= HF | CF;
+ F |= SZP[(u8)(t & 0x07) ^ B] & PF;
+}
macro ldd
- TADR = HL;
- call rm
- TADR = DE;
- call wm
- 2 * call nomreq_addr
- { set_f(F & (SF | ZF | CF)); if ((A + TDAT8) & 0x02) F |= YF; if ((A + TDAT8) & 0x08) F |= XF; HL--; DE--; BC--; if (BC) F |= VF; }
+{
+ @rm HL
+ @wm DE
+ 2 * @nomreq_addr DE
+ set_f(F & (SF | ZF | CF));
+ if ((A + TDAT8) & 0x02)
+ F |= YF;
+ if ((A + TDAT8) & 0x08)
+ F |= XF;
+ HL--;
+ DE--;
+ BC--;
+ if (BC)
+ F |= VF;
+}
macro r800:ldd
- TADR = HL;
- call rm
- TADR = DE;
- call wm
- call nomreq_addr
- { set_f(F & (SF | ZF | CF)); if ((A + TDAT8) & 0x02) F |= YF; if ((A + TDAT8) & 0x08) F |= XF; HL--; DE--; BC--; if (BC) F |= VF; }
+{
+ @rm HL
+ @wm DE
+ @nomreq_addr DE
+ set_f(F & (SF | ZF | CF));
+ if ((A + TDAT8) & 0x02)
+ F |= YF;
+ if ((A + TDAT8) & 0x08)
+ F |= XF;
+ HL--;
+ DE--;
+ BC--;
+ if (BC)
+ F |= VF;
+}
macro cpd
- TADR = HL;
- call rm
- TADR = HL;
- 5 * call nomreq_addr
- { u8 res = A - TDAT8; WZ--; HL--; BC--; set_f((F & CF) | (SZ[res]&~(YF|XF)) | ((A^TDAT8^res)&HF) | NF); if (F & HF) res -= 1; if (res & 0x02) F |= YF; if (res & 0x08) F |= XF; if (BC) F |= VF; }
+{
+ @rm HL
+ 5 * @nomreq_addr HL
+ u8 res = A - TDAT8;
+ WZ--;
+ HL--;
+ BC--;
+ set_f((F & CF) | (SZ[res]&~(YF|XF)) | ((A^TDAT8^res)&HF) | NF);
+ if (F & HF)
+ res -= 1;
+ if (res & 0x02)
+ F |= YF;
+ if (res & 0x08)
+ F |= XF;
+ if (BC)
+ F |= VF;
+}
macro r800:cpd
- TADR = HL;
- call rm
- TADR = HL;
- call nomreq_addr
- { u8 res = A - TDAT8; WZ--; HL--; BC--; set_f((F & CF) | (SZ[res]&~(YF|XF)) | ((A^TDAT8^res)&HF) | NF); if (F & HF) res -= 1; if (res & 0x02) F |= YF; if (res & 0x08) F |= XF; if (BC) F |= VF; }
+{
+ @rm HL
+ @nomreq_addr HL
+ u8 res = A - TDAT8;
+ WZ--;
+ HL--;
+ BC--;
+ set_f((F & CF) | (SZ[res]&~(YF|XF)) | ((A^TDAT8^res)&HF) | NF);
+ if (F & HF)
+ res -= 1;
+ if (res & 0x02)
+ F |= YF;
+ if (res & 0x08)
+ F |= XF;
+ if (BC)
+ F |= VF;
+}
macro ind
- call nomreq_ir 1
- TADR = BC;
- call in
- WZ = BC - 1; B--; TADR = HL;
- call wm
- { HL--; set_f(SZ[B]); unsigned t = ((unsigned)(C - 1) & 0xff) + (unsigned)TDAT8; if (TDAT8 & SF) F |= NF; if (t & 0x100) F |= HF | CF; F |= SZP[(u8)(t & 0x07) ^ B] & PF; }
+{
+ @nomreq_ir 1
+ @in BC
+ WZ = BC - 1;
+ B--;
+ @wm HL
+ HL--;
+ set_f(SZ[B]);
+ unsigned t = ((unsigned)(C - 1) & 0xff) + (unsigned)TDAT8;
+ if (TDAT8 & SF)
+ F |= NF;
+ if (t & 0x100)
+ F |= HF | CF;
+ F |= SZP[(u8)(t & 0x07) ^ B] & PF;
+}
macro r800:ind
- TADR = BC;
- call in
- WZ = BC - 1; B--; TADR = HL;
- call wm
- { HL--; set_f(SZ[B]); unsigned t = ((unsigned)(C - 1) & 0xff) + (unsigned)TDAT8; if (TDAT8 & SF) F |= NF; if (t & 0x100) F |= HF | CF; F |= SZP[(u8)(t & 0x07) ^ B] & PF; }
+{
+ @in BC
+ WZ = BC - 1;
+ B--;
+ @wm HL
+ HL--;
+ set_f(SZ[B]);
+ unsigned t = ((unsigned)(C - 1) & 0xff) + (unsigned)TDAT8;
+ if (TDAT8 & SF)
+ F |= NF;
+ if (t & 0x100)
+ F |= HF | CF;
+ F |= SZP[(u8)(t & 0x07) ^ B] & PF;
+}
macro outd
- call nomreq_ir 1
- TADR = HL;
- call rm
- B--; WZ = BC - 1; TADR = BC;
- call out
- { HL--; set_f(SZ[B]); unsigned t = (unsigned)L + (unsigned)TDAT8; if (TDAT8 & SF) F |= NF; if (t & 0x100) F |= HF | CF; F |= SZP[(u8)(t & 0x07) ^ B] & PF; }
+{
+ @nomreq_ir 1
+ @rm HL
+ B--;
+ WZ = BC - 1;
+ @out BC
+ HL--;
+ set_f(SZ[B]);
+ unsigned t = (unsigned)L + (unsigned)TDAT8;
+ if (TDAT8 & SF)
+ F |= NF;
+ if (t & 0x100)
+ F |= HF | CF;
+ F |= SZP[(u8)(t & 0x07) ^ B] & PF;
+}
macro r800:outd
- TADR = HL;
- call rm
- B--; WZ = BC - 1; TADR = BC;
- call out
- { HL--; set_f(SZ[B]); unsigned t = (unsigned)L + (unsigned)TDAT8; if (TDAT8 & SF) F |= NF; if (t & 0x100) F |= HF | CF; F |= SZP[(u8)(t & 0x07) ^ B] & PF; }
+{
+ @rm HL
+ B--;
+ WZ = BC - 1;
+ @out BC
+ HL--;
+ set_f(SZ[B]);
+ unsigned t = (unsigned)L + (unsigned)TDAT8;
+ if (TDAT8 & SF)
+ F |= NF;
+ if (t & 0x100)
+ F |= HF | CF;
+ F |= SZP[(u8)(t & 0x07) ^ B] & PF;
+}
macro ldir
- call ldi
+ @ldi
if (BC != 0) {
- TADR = DE;
- 5 * call nomreq_addr
- PC -= 2; WZ = PC + 1; F &= ~(YF | XF); F |= (PC >> 8) & (YF | XF);
+ 5 * @nomreq_addr DE
+ PC -= 2;
+ WZ = PC + 1;
+ F &= ~(YF | XF);
+ F |= (PC >> 8) & (YF | XF);
}
macro r800:ldir
- call ldi
+ @ldi
if (BC != 0) {
- TADR = DE;
- call nomreq_addr
- PC -= 2; WZ = PC + 1; F &= ~(YF | XF); F |= (PC >> 8) & (YF | XF);
+ @nomreq_addr DE
+ PC -= 2;
+ WZ = PC + 1;
+ F &= ~(YF | XF);
+ F |= (PC >> 8) & (YF | XF);
}
macro cpir
- call cpi
+ @cpi
if (BC != 0 && !(F & ZF)) {
- TADR = HL;
- 5 * call nomreq_addr
- PC -= 2; WZ = PC + 1; F &= ~(YF | XF); F |= (PC >> 8) & (YF | XF);
+ 5 * @nomreq_addr HL
+ PC -= 2;
+ WZ = PC + 1;
+ F &= ~(YF | XF);
+ F |= (PC >> 8) & (YF | XF);
}
macro r800:cpir
- call cpi
- call nomreq_addr
+ @cpi
+ @nomreq_addr HL
if (BC != 0 && !(F & ZF)) {
- TADR = HL;
- PC -= 2; WZ = PC + 1; F &= ~(YF | XF); F |= (PC >> 8) & (YF | XF);
+ PC -= 2;
+ WZ = PC + 1;
+ F &= ~(YF | XF);
+ F |= (PC >> 8) & (YF | XF);
}
macro inir
- call ini
+ @ini
if (B != 0) {
- TADR = HL;
- 5 * call nomreq_addr
- PC -= 2; block_io_interrupted_flags();
+ 5 * @nomreq_addr HL
+ PC -= 2;
+ block_io_interrupted_flags();
}
macro r800:inir
- if (B == 1)
- T(1);
- call ini
+ if (B == 1) {
+ + 1
+ ;
+ }
+ @ini
if (B != 0) {
- TADR = HL;
- PC -= 2; block_io_interrupted_flags();
+ PC -= 2;
+ block_io_interrupted_flags();
}
macro otir
- call outi
+ @outi
if (B != 0) {
- TADR = BC;
- 5 * call nomreq_addr
- PC -= 2; block_io_interrupted_flags();
+ 5 * @nomreq_addr BC
+ PC -= 2;
+ block_io_interrupted_flags();
}
macro r800:otir
- if (B == 1)
- T(1);
- call outi
+ if (B == 1) {
+ + 1
+ ;
+ }
+ @outi
if (B != 0) {
- TADR = BC;
- 5 * call nomreq_addr
- PC -= 2; block_io_interrupted_flags();
+ 5 * @nomreq_addr BC
+ PC -= 2;
+ block_io_interrupted_flags();
}
macro lddr
- call ldd
+ @ldd
if (BC != 0) {
- TADR = DE;
- 5 * call nomreq_addr
- PC -= 2; WZ = PC + 1; F &= ~(YF | XF); F |= (PC >> 8) & (YF | XF);
+ 5 * @nomreq_addr DE
+ PC -= 2;
+ WZ = PC + 1;
+ F &= ~(YF | XF);
+ F |= (PC >> 8) & (YF | XF);
}
macro r800:lddr
- call ldd
+ @ldd
if (BC != 0) {
- TADR = DE;
- call nomreq_addr
- PC -= 2; WZ = PC + 1; F &= ~(YF | XF); F |= (PC >> 8) & (YF | XF);
+ @nomreq_addr DE
+ PC -= 2;
+ WZ = PC + 1;
+ F &= ~(YF | XF);
+ F |= (PC >> 8) & (YF | XF);
}
macro cpdr
- call cpd
+ @cpd
if (BC != 0 && !(F & ZF)) {
- TADR = HL;
- 5 * call nomreq_addr
- PC -= 2; WZ = PC + 1; F &= ~(YF | XF); F |= (PC >> 8) & (YF | XF);
+ 5 * @nomreq_addr HL
+ PC -= 2;
+ WZ = PC + 1;
+ F &= ~(YF | XF);
+ F |= (PC >> 8) & (YF | XF);
}
macro r800:cpdr
- call cpd
- call nomreq_addr
+ @cpd
+ @nomreq_addr HL /* suspected wrong. must be inside if? */
if (BC != 0 && !(F & ZF)) {
- TADR = HL;
- PC -= 2; WZ = PC + 1; F &= ~(YF | XF); F |= (PC >> 8) & (YF | XF);
+ PC -= 2;
+ WZ = PC + 1;
+ F &= ~(YF | XF);
+ F |= (PC >> 8) & (YF | XF);
}
macro indr
- call ind
+ @ind
if (B != 0) {
- TADR = HL;
- 5 * call nomreq_addr
- PC -= 2; block_io_interrupted_flags();
+ 5 * @nomreq_addr HL
+ PC -= 2;
+ block_io_interrupted_flags();
}
macro r800:indr
- if (B == 1)
- T(1);
- call ind
+ if (B == 1) {
+ + 1
+ ;
+ }
+ @ind
if (B != 0) {
- TADR = HL;
- PC -= 2; block_io_interrupted_flags();
+ PC -= 2;
+ block_io_interrupted_flags();
}
macro otdr
- call outd
+ @outd
if (B != 0) {
- TADR = BC;
- 5 * call nomreq_addr
- PC -= 2; block_io_interrupted_flags();
+ 5 * @nomreq_addr BC
+ PC -= 2;
+ block_io_interrupted_flags();
}
macro r800:otdr
- if (B == 1)
- T(1);
- call outd
+ if (B == 1) {
+ + 1
+ ;
+ }
+ @outd
if (B != 0) {
- TADR = BC;
- PC -= 2; block_io_interrupted_flags();
+ PC -= 2;
+ block_io_interrupted_flags();
}
macro jump %po
@@ -556,28 +792,27 @@ macro take_nmi
m_iff1 = 0;
m_r++;
+ 5
- TDAT = PC;
- call wm16_sp
+ @wm16_sp PC
PC = 0x0066;
WZ = PC;
set_service_attention<SA_NMI_PENDING, 0>();
macro irqfetch
- {
- // fetch the IRQ vector
- device_z80daisy_interface *intf = daisy_get_irq_device();
- m_tmp_irq_vector = (intf != nullptr) ? intf->z80daisy_irq_ack() : standard_irq_callback(0, m_pc.w);
- LOGMASKED(LOG_INT, "single INT m_tmp_irq_vector $%02x\n", m_tmp_irq_vector);
- }
+{
+ // fetch the IRQ vector
+ device_z80daisy_interface *intf = daisy_get_irq_device();
+ m_tmp_irq_vector = (intf != nullptr) ? intf->z80daisy_irq_ack() : standard_irq_callback(0, m_pc.w);
+ LOGMASKED(LOG_INT, "single INT m_tmp_irq_vector $%02x\n", m_tmp_irq_vector);
+}
macro t6a84:irqfetch
- {
- // fetch the IRQ vector
- paged_irqfetch();
- device_z80daisy_interface *intf = daisy_get_irq_device();
- m_tmp_irq_vector = (intf != nullptr) ? intf->z80daisy_irq_ack() : standard_irq_callback(0, m_pc.w);
- LOGMASKED(LOG_INT, "single INT m_tmp_irq_vector $%02x\n", m_tmp_irq_vector);
- }
+{
+ // fetch the IRQ vector
+ paged_irqfetch();
+ device_z80daisy_interface *intf = daisy_get_irq_device();
+ m_tmp_irq_vector = (intf != nullptr) ? intf->z80daisy_irq_ack() : standard_irq_callback(0, m_pc.w);
+ LOGMASKED(LOG_INT, "single INT m_tmp_irq_vector $%02x\n", m_tmp_irq_vector);
+}
macro take_interrupt
// check if processor was halted
@@ -588,7 +823,7 @@ macro take_interrupt
// Not precise in all cases. z80 must finish current instruction (NOP) to reach this state - in such case frame timings are shifter from cb event if calculated based on it.
m_irqack_cb(1);
m_r++;
- call irqfetch
+ @irqfetch
// 'interrupt latency' cycles
+ 2
// Interrupt mode 2. Call [i:databyte]
@@ -598,11 +833,9 @@ macro take_interrupt
// even, and all 8 bits will be used; even $FF is handled normally.
// CALL opcode timing
+ 5
- TDAT = PC;
- call wm16_sp
+ @wm16_sp PC
m_tmp_irq_vector = (m_tmp_irq_vector & 0xff) | (m_i << 8);
- TADR = m_tmp_irq_vector;
- call rm16
+ @rm16 m_tmp_irq_vector
PC = TDAT;
LOGMASKED(LOG_INT, "IM2 [$%04x] = $%04x\n", m_tmp_irq_vector, PC);
} else if (m_im == 1) {
@@ -610,8 +843,7 @@ macro take_interrupt
LOGMASKED(LOG_INT, "'%s' IM1 $0038\n", tag());
// RST $38
+ 5
- TDAT = PC;
- call wm16_sp
+ @wm16_sp PC
PC = 0x0038;
} else {
/* Interrupt mode 0. We check for CALL and JP instructions,
@@ -624,8 +856,7 @@ macro take_interrupt
if ((m_tmp_irq_vector & 0xff0000) == 0xcd0000) {
// CALL $xxxx cycles
+ 11
- TDAT = PC;
- call wm16_sp
+ @wm16_sp PC
PC = m_tmp_irq_vector & 0xffff;
} else if ((m_tmp_irq_vector & 0xff0000) == 0xc30000) {
// JP $xxxx cycles
@@ -634,8 +865,7 @@ macro take_interrupt
} else if ((m_tmp_irq_vector & 0xc7) == 0xc7) {
// RST $xx cycles
+ 5
- TDAT = PC;
- call wm16_sp
+ @wm16_sp PC
PC = m_tmp_irq_vector & 0x0038;
} else if (m_tmp_irq_vector == 0xfb) {
// EI cycles
@@ -653,9 +883,9 @@ macro take_interrupt
macro check_interrupts
if (get_service_attention<SA_NMI_PENDING>()) {
- call take_nmi
+ @take_nmi
} else if (m_irq_state != CLEAR_LINE && m_iff1 && !get_service_attention<SA_AFTER_EI>()) { // SA_IRQ_ON
- call take_interrupt
+ @take_interrupt
}
macro z80n:check_interrupts
@@ -665,9 +895,9 @@ macro z80n:check_interrupts
m_out_nextreg_cb(0xc2, m_pc.b.l);
m_out_nextreg_cb(0xc3, m_pc.b.h);
}
- call take_nmi
+ @take_nmi
} else if (m_irq_state != CLEAR_LINE && m_iff1 && !get_service_attention<SA_AFTER_EI>()) {
- call take_interrupt
+ @take_interrupt
}
macro nsc800_take_interrupt
@@ -678,16 +908,13 @@ macro nsc800_take_interrupt
// 'interrupt latency' cycles
+ 7
if (m_nsc800_irq_state[0]) {
- TDAT = PC;
- call wm16_sp
+ @wm16_sp PC
PC = 0x003c;
} else if (m_nsc800_irq_state[1]) {
- TDAT = PC;
- call wm16_sp
+ @wm16_sp PC
PC = 0x0034;
} else if (m_nsc800_irq_state[2]) {
- TDAT = PC;
- call wm16_sp
+ @wm16_sp PC
PC = 0x002c;
} else {
+ 2 * m_memrq_cycles
@@ -700,11 +927,11 @@ macro nsc800_take_interrupt
macro nsc800:check_interrupts
if (get_service_attention<SA_NMI_PENDING>()) {
- call take_nmi
+ @take_nmi
} else if (get_service_attention<SA_NSC800_IRQ_ON>() && m_iff1 && !get_service_attention<SA_AFTER_EI>()) {
- call nsc800_take_interrupt
+ @nsc800_take_interrupt
} else if (m_irq_state != CLEAR_LINE && m_iff1 && !get_service_attention<SA_AFTER_EI>()) { // SA_IRQ_ON
- call take_interrupt
+ @take_interrupt
}
@@ -732,20 +959,20 @@ ffff
set_service_attention<SA_BUSACK, 0>();
m_busack_cb(0);
}
- call check_interrupts
- set_service_attention<SA_AFTER_EI, 0>(); // SA_AFTER_EI
+ @check_interrupts
+ set_service_attention<SA_AFTER_EI, 0>();
if (HAS_LDAIR_QUIRK)
- set_service_attention<SA_AFTER_LDAIR, 0>(); // SA_AFTER_LDAIR
+ set_service_attention<SA_AFTER_LDAIR, 0>();
if (m_halt) { // SA_HALT
debugger_wait_hook();
- call rop
+ @rop
PC--;
continue;
}
}
PRVPC = PC;
debugger_instruction_hook(PC);
- call rop
+ @rop
m_ref = (0x00 << 16) | (TDAT8 << 8);
goto process;
@@ -773,10 +1000,9 @@ cb05 # RLC L
L = rlc(L);
cb06 # RLC (HL)
- TADR = HL;
- call rm_reg
+ @rm_reg HL
TDAT8 = rlc(TDAT8);
- call wm
+ @wm HL
cb07 # RLC A
A = rlc(A);
@@ -800,10 +1026,9 @@ cb0d # RRC L
L = rrc(L);
cb0e # RRC (HL)
- TADR = HL;
- call rm_reg
+ @rm_reg HL
TDAT8 = rrc(TDAT8);
- call wm
+ @wm HL
cb0f # RRC A
A = rrc(A);
@@ -827,10 +1052,9 @@ cb15 # RL L
L = rl(L);
cb16 # RL (HL)
- TADR = HL;
- call rm_reg
+ @rm_reg HL
TDAT8 = rl(TDAT8);
- call wm
+ @wm HL
cb17 # RL A
A = rl(A);
@@ -854,10 +1078,9 @@ cb1d # RR L
L = rr(L);
cb1e # RR (HL)
- TADR = HL;
- call rm_reg
+ @rm_reg HL
TDAT8 = rr(TDAT8);
- call wm
+ @wm HL
cb1f # RR A
A = rr(A);
@@ -881,10 +1104,9 @@ cb25 # SLA L
L = sla(L);
cb26 # SLA (HL)
- TADR = HL;
- call rm_reg
+ @rm_reg HL
TDAT8 = sla(TDAT8);
- call wm
+ @wm HL
cb27 # SLA A
A = sla(A);
@@ -908,10 +1130,9 @@ cb2d # SRA L
L = sra(L);
cb2e # SRA (HL)
- TADR = HL;
- call rm_reg
+ @rm_reg HL
TDAT8 = sra(TDAT8);
- call wm
+ @wm HL
cb2f # SRA A
A = sra(A);
@@ -935,10 +1156,9 @@ cb35 # SLL L
L = sll(L);
cb36 # SLL (HL)
- TADR = HL;
- call rm_reg
+ @rm_reg HL
TDAT8 = sll(TDAT8);
- call wm
+ @wm HL
cb37 # SLL A
A = sll(A);
@@ -962,10 +1182,9 @@ cb3d # SRL L
L = srl(L);
cb3e # SRL (HL)
- TADR = HL;
- call rm_reg
+ @rm_reg HL
TDAT8 = srl(TDAT8);
- call wm
+ @wm HL
cb3f # SRL A
A = srl(A);
@@ -989,8 +1208,7 @@ cb45 # BIT 0,L
bit(0, L);
cb46 # BIT 0,(HL)
- TADR = HL;
- call rm_reg
+ @rm_reg HL
bit_hl(0, TDAT8);
cb47 # BIT 0,A
@@ -1015,8 +1233,7 @@ cb4d # BIT 1,L
bit(1, L);
cb4e # BIT 1,(HL)
- TADR = HL;
- call rm_reg
+ @rm_reg HL
bit_hl(1, TDAT8);
cb4f # BIT 1,A
@@ -1041,8 +1258,7 @@ cb55 # BIT 2,L
bit(2, L);
cb56 # BIT 2,(HL)
- TADR = HL;
- call rm_reg
+ @rm_reg HL
bit_hl(2, TDAT8);
cb57 # BIT 2,A
@@ -1067,8 +1283,7 @@ cb5d # BIT 3,L
bit(3, L);
cb5e # BIT 3,(HL)
- TADR = HL;
- call rm_reg
+ @rm_reg HL
bit_hl(3, TDAT8);
cb5f # BIT 3,A
@@ -1093,8 +1308,7 @@ cb65 # BIT 4,L
bit(4, L);
cb66 # BIT 4,(HL)
- TADR = HL;
- call rm_reg
+ @rm_reg HL
bit_hl(4, TDAT8);
cb67 # BIT 4,A
@@ -1119,8 +1333,7 @@ cb6d # BIT 5,L
bit(5, L);
cb6e # BIT 5,(HL)
- TADR = HL;
- call rm_reg
+ @rm_reg HL
bit_hl(5, TDAT8);
cb6f # BIT 5,A
@@ -1145,8 +1358,7 @@ cb75 # BIT 6,L
bit(6, L);
cb76 # BIT 6,(HL)
- TADR = HL;
- call rm_reg
+ @rm_reg HL
bit_hl(6, TDAT8);
cb77 # BIT 6,A
@@ -1171,8 +1383,7 @@ cb7d # BIT 7,L
bit(7, L);
cb7e # BIT 7,(HL)
- TADR = HL;
- call rm_reg
+ @rm_reg HL
bit_hl(7, TDAT8);
cb7f # BIT 7,A
@@ -1197,10 +1408,9 @@ cb85 # RES 0,L
L = res(0, L);
cb86 # RES 0,(HL)
- TADR = HL;
- call rm_reg
+ @rm_reg HL
TDAT8 = res(0, TDAT8);
- call wm
+ @wm HL
cb87 # RES 0,A
A = res(0, A);
@@ -1224,10 +1434,9 @@ cb8d # RES 1,L
L = res(1, L);
cb8e # RES 1,(HL)
- TADR = HL;
- call rm_reg
+ @rm_reg HL
TDAT8 = res(1, TDAT8);
- call wm
+ @wm HL
cb8f # RES 1,A
A = res(1, A);
@@ -1251,10 +1460,9 @@ cb95 # RES 2,L
L = res(2, L);
cb96 # RES 2,(HL)
- TADR = HL;
- call rm_reg
+ @rm_reg HL
TDAT8 = res(2, TDAT8);
- call wm
+ @wm HL
cb97 # RES 2,A
A = res(2, A);
@@ -1278,10 +1486,9 @@ cb9d # RES 3,L
L = res(3, L);
cb9e # RES 3,(HL)
- TADR = HL;
- call rm_reg
+ @rm_reg HL
TDAT8 = res(3, TDAT8);
- call wm
+ @wm HL
cb9f # RES 3,A
A = res(3, A);
@@ -1305,10 +1512,9 @@ cba5 # RES 4,L
L = res(4, L);
cba6 # RES 4,(HL)
- TADR = HL;
- call rm_reg
+ @rm_reg HL
TDAT8 = res(4, TDAT8);
- call wm
+ @wm HL
cba7 # RES 4,A
A = res(4, A);
@@ -1332,10 +1538,9 @@ cbad # RES 5,L
L = res(5, L);
cbae # RES 5,(HL)
- TADR = HL;
- call rm_reg
+ @rm_reg HL
TDAT8 = res(5, TDAT8);
- call wm
+ @wm HL
cbaf # RES 5,A
A = res(5, A);
@@ -1359,10 +1564,9 @@ cbb5 # RES 6,L
L = res(6, L);
cbb6 # RES 6,(HL)
- TADR = HL;
- call rm_reg
+ @rm_reg HL
TDAT8 = res(6, TDAT8);
- call wm
+ @wm HL
cbb7 # RES 6,A
A = res(6, A);
@@ -1386,10 +1590,9 @@ cbbd # RES 7,L
L = res(7, L);
cbbe # RES 7,(HL)
- TADR = HL;
- call rm_reg
+ @rm_reg HL
TDAT8 = res(7, TDAT8);
- call wm
+ @wm HL
cbbf # RES 7,A
A = res(7, A);
@@ -1413,10 +1616,9 @@ cbc5 # SET 0,L
L = set(0, L);
cbc6 # SET 0,(HL)
- TADR = HL;
- call rm_reg
+ @rm_reg HL
TDAT8 = set(0, TDAT8);
- call wm
+ @wm HL
cbc7 # SET 0,A
A = set(0, A);
@@ -1440,10 +1642,9 @@ cbcd # SET 1,L
L = set(1, L);
cbce # SET 1,(HL)
- TADR = HL;
- call rm_reg
+ @rm_reg HL
TDAT8 = set(1, TDAT8);
- call wm
+ @wm HL
cbcf # SET 1,A
A = set(1, A);
@@ -1467,10 +1668,9 @@ cbd5 # SET 2,L
L = set(2, L);
cbd6 # SET 2,(HL)
- TADR = HL;
- call rm_reg
+ @rm_reg HL
TDAT8 = set(2, TDAT8);
- call wm
+ @wm HL
cbd7 # SET 2,A
A = set(2, A);
@@ -1494,10 +1694,9 @@ cbdd # SET 3,L
L = set(3, L);
cbde # SET 3,(HL)
- TADR = HL;
- call rm_reg
+ @rm_reg HL
TDAT8 = set(3, TDAT8);
- call wm
+ @wm HL
cbdf # SET 3,A
A = set(3, A);
@@ -1521,10 +1720,9 @@ cbe5 # SET 4,L
L = set(4, L);
cbe6 # SET 4,(HL)
- TADR = HL;
- call rm_reg
+ @rm_reg HL
TDAT8 = set(4, TDAT8);
- call wm
+ @wm HL
cbe7 # SET 4,A
A = set(4, A);
@@ -1548,10 +1746,9 @@ cbed # SET 5,L
L = set(5, L);
cbee # SET 5,(HL)
- TADR = HL;
- call rm_reg
+ @rm_reg HL
TDAT8 = set(5, TDAT8);
- call wm
+ @wm HL
cbef # SET 5,A
A = set(5, A);
@@ -1575,10 +1772,9 @@ cbf5 # SET 6,L
L = set(6, L);
cbf6 # SET 6,(HL)
- TADR = HL;
- call rm_reg
+ @rm_reg HL
TDAT8 = set(6, TDAT8);
- call wm
+ @wm HL
cbf7 # SET 6,A
A = set(6, A);
@@ -1602,10 +1798,9 @@ cbfd # SET 7,L
L = set(7, L);
cbfe # SET 7,(HL)
- TADR = HL;
- call rm_reg
+ @rm_reg HL
TDAT8 = set(7, TDAT8);
- call wm
+ @wm HL
cbff # SET 7,A
A = set(7, A);
@@ -1616,1364 +1811,1332 @@ cbff # SET 7,A
# rotate, shift and bit operations with (IX+o)
##########################################################
fe00 # RLC B = (XY+o)
- TADR = m_ea;
- call rm_reg
- B = rlc(TDAT8); TDAT8 = B;
- call wm
+ @rm_reg m_ea
+ B = rlc(TDAT8);
+ TDAT8 = B;
+ @wm m_ea
fe01 # RLC C = (XY+o)
- TADR = m_ea;
- call rm_reg
- C = rlc(TDAT8); TDAT8 = C;
- call wm
+ @rm_reg m_ea
+ C = rlc(TDAT8);
+ TDAT8 = C;
+ @wm m_ea
fe02 # RLC D = (XY+o)
- TADR = m_ea;
- call rm_reg
- D = rlc(TDAT8); TDAT8 = D;
- call wm
+ @rm_reg m_ea
+ D = rlc(TDAT8);
+ TDAT8 = D;
+ @wm m_ea
fe03 # RLC E = (XY+o)
- TADR = m_ea;
- call rm_reg
- E = rlc(TDAT8); TDAT8 = E;
- call wm
+ @rm_reg m_ea
+ E = rlc(TDAT8);
+ TDAT8 = E;
+ @wm m_ea
fe04 # RLC H = (XY+o)
- TADR = m_ea;
- call rm_reg
- H = rlc(TDAT8); TDAT8 = H;
- call wm
+ @rm_reg m_ea
+ H = rlc(TDAT8);
+ TDAT8 = H;
+ @wm m_ea
fe05 # RLC L = (XY+o)
- TADR = m_ea;
- call rm_reg
- L = rlc(TDAT8); TDAT8 = L;
- call wm
+ @rm_reg m_ea
+ L = rlc(TDAT8);
+ TDAT8 = L;
+ @wm m_ea
fe06 # RLC (XY+o)
- TADR = m_ea;
- call rm_reg
+ @rm_reg m_ea
TDAT8 = rlc(TDAT8);
- call wm
+ @wm m_ea
fe07 # RLC A = (XY+o)
- TADR = m_ea;
- call rm_reg
- A = rlc(TDAT8); TDAT8 = A;
- call wm
+ @rm_reg m_ea
+ A = rlc(TDAT8);
+ TDAT8 = A;
+ @wm m_ea
fe08 # RRC B = (XY+o)
- TADR = m_ea;
- call rm_reg
- B = rrc(TDAT8); TDAT8 = B;
- call wm
+ @rm_reg m_ea
+ B = rrc(TDAT8);
+ TDAT8 = B;
+ @wm m_ea
fe09 # RRC C = (XY+o)
- TADR = m_ea;
- call rm_reg
- C = rrc(TDAT8); TDAT8 = C;
- call wm
+ @rm_reg m_ea
+ C = rrc(TDAT8);
+ TDAT8 = C;
+ @wm m_ea
fe0a # RRC D = (XY+o)
- TADR = m_ea;
- call rm_reg
- D = rrc(TDAT8); TDAT8 = D;
- call wm
+ @rm_reg m_ea
+ D = rrc(TDAT8);
+ TDAT8 = D;
+ @wm m_ea
fe0b # RRC E = (XY+o)
- TADR = m_ea;
- call rm_reg
- E = rrc(TDAT8); TDAT8 = E;
- call wm
+ @rm_reg m_ea
+ E = rrc(TDAT8);
+ TDAT8 = E;
+ @wm m_ea
fe0c # RRC H = (XY+o)
- TADR = m_ea;
- call rm_reg
- H = rrc(TDAT8); TDAT8 = H;
- call wm
+ @rm_reg m_ea
+ H = rrc(TDAT8);
+ TDAT8 = H;
+ @wm m_ea
fe0d # RRC L = (XY+o)
- TADR = m_ea;
- call rm_reg
- L = rrc(TDAT8); TDAT8 = L;
- call wm
+ @rm_reg m_ea
+ L = rrc(TDAT8);
+ TDAT8 = L;
+ @wm m_ea
fe0e # RRC (XY+o)
- TADR = m_ea;
- call rm_reg
+ @rm_reg m_ea
TDAT8 = rrc(TDAT8);
- call wm
+ @wm m_ea
fe0f # RRC A = (XY+o)
- TADR = m_ea;
- call rm_reg
- A = rrc(TDAT8); TDAT8 = A;
- call wm
+ @rm_reg m_ea
+ A = rrc(TDAT8);
+ TDAT8 = A;
+ @wm m_ea
fe10 # RL B = (XY+o)
- TADR = m_ea;
- call rm_reg
- B = rl(TDAT8); TDAT8 = B;
- call wm
+ @rm_reg m_ea
+ B = rl(TDAT8);
+ TDAT8 = B;
+ @wm m_ea
fe11 # RL C = (XY+o)
- TADR = m_ea;
- call rm_reg
- C = rl(TDAT8); TDAT8 = C;
- call wm
+ @rm_reg m_ea
+ C = rl(TDAT8);
+ TDAT8 = C;
+ @wm m_ea
fe12 # RL D = (XY+o)
- TADR = m_ea;
- call rm_reg
- D = rl(TDAT8); TDAT8 = D;
- call wm
+ @rm_reg m_ea
+ D = rl(TDAT8);
+ TDAT8 = D;
+ @wm m_ea
fe13 # RL E = (XY+o)
- TADR = m_ea;
- call rm_reg
- E = rl(TDAT8); TDAT8 = E;
- call wm
+ @rm_reg m_ea
+ E = rl(TDAT8);
+ TDAT8 = E;
+ @wm m_ea
fe14 # RL H = (XY+o)
- TADR = m_ea;
- call rm_reg
- H = rl(TDAT8); TDAT8 = H;
- call wm
+ @rm_reg m_ea
+ H = rl(TDAT8);
+ TDAT8 = H;
+ @wm m_ea
fe15 # RL L = (XY+o)
- TADR = m_ea;
- call rm_reg
- L = rl(TDAT8); TDAT8 = L;
- call wm
+ @rm_reg m_ea
+ L = rl(TDAT8);
+ TDAT8 = L;
+ @wm m_ea
fe16 # RL (XY+o)
- TADR = m_ea;
- call rm_reg
+ @rm_reg m_ea
TDAT8 = rl(TDAT8);
- call wm
+ @wm m_ea
fe17 # RL A = (XY+o)
- TADR = m_ea;
- call rm_reg
- A = rl(TDAT8); TDAT8 = A;
- call wm
+ @rm_reg m_ea
+ A = rl(TDAT8);
+ TDAT8 = A;
+ @wm m_ea
fe18 # RR B = (XY+o)
- TADR = m_ea;
- call rm_reg
- B = rr(TDAT8); TDAT8 = B;
- call wm
+ @rm_reg m_ea
+ B = rr(TDAT8);
+ TDAT8 = B;
+ @wm m_ea
fe19 # RR C = (XY+o)
- TADR = m_ea;
- call rm_reg
- C = rr(TDAT8); TDAT8 = C;
- call wm
+ @rm_reg m_ea
+ C = rr(TDAT8);
+ TDAT8 = C;
+ @wm m_ea
fe1a # RR D = (XY+o)
- TADR = m_ea;
- call rm_reg
- D = rr(TDAT8); TDAT8 = D;
- call wm
+ @rm_reg m_ea
+ D = rr(TDAT8);
+ TDAT8 = D;
+ @wm m_ea
fe1b # RR E = (XY+o)
- TADR = m_ea;
- call rm_reg
- E = rr(TDAT8); TDAT8 = E;
- call wm
+ @rm_reg m_ea
+ E = rr(TDAT8);
+ TDAT8 = E;
+ @wm m_ea
fe1c # RR H = (XY+o)
- TADR = m_ea;
- call rm_reg
- H = rr(TDAT8); TDAT8 = H;
- call wm
+ @rm_reg m_ea
+ H = rr(TDAT8);
+ TDAT8 = H;
+ @wm m_ea
fe1d # RR L = (XY+o)
- TADR = m_ea;
- call rm_reg
- L = rr(TDAT8); TDAT8 = L;
- call wm
+ @rm_reg m_ea
+ L = rr(TDAT8);
+ TDAT8 = L;
+ @wm m_ea
fe1e # RR (XY+o)
- TADR = m_ea;
- call rm_reg
+ @rm_reg m_ea
TDAT8 = rr(TDAT8);
- call wm
+ @wm m_ea
fe1f # RR A = (XY+o)
- TADR = m_ea;
- call rm_reg
- A = rr(TDAT8); TDAT8 = A;
- call wm
+ @rm_reg m_ea
+ A = rr(TDAT8);
+ TDAT8 = A;
+ @wm m_ea
fe20 # SLA B = (XY+o)
- TADR = m_ea;
- call rm_reg
- B = sla(TDAT8); TDAT8 = B;
- call wm
+ @rm_reg m_ea
+ B = sla(TDAT8);
+ TDAT8 = B;
+ @wm m_ea
fe21 # SLA C = (XY+o)
- TADR = m_ea;
- call rm_reg
- C = sla(TDAT8); TDAT8 = C;
- call wm
+ @rm_reg m_ea
+ C = sla(TDAT8);
+ TDAT8 = C;
+ @wm m_ea
fe22 # SLA D = (XY+o)
- TADR = m_ea;
- call rm_reg
- D = sla(TDAT8); TDAT8 = D;
- call wm
+ @rm_reg m_ea
+ D = sla(TDAT8);
+ TDAT8 = D;
+ @wm m_ea
fe23 # SLA E = (XY+o)
- TADR = m_ea;
- call rm_reg
- E = sla(TDAT8); TDAT8 = E;
- call wm
+ @rm_reg m_ea
+ E = sla(TDAT8);
+ TDAT8 = E;
+ @wm m_ea
fe24 # SLA H = (XY+o)
- TADR = m_ea;
- call rm_reg
- H = sla(TDAT8); TDAT8 = H;
- call wm
+ @rm_reg m_ea
+ H = sla(TDAT8);
+ TDAT8 = H;
+ @wm m_ea
fe25 # SLA L = (XY+o)
- TADR = m_ea;
- call rm_reg
- L = sla(TDAT8); TDAT8 = L;
- call wm
+ @rm_reg m_ea
+ L = sla(TDAT8);
+ TDAT8 = L;
+ @wm m_ea
fe26 # SLA (XY+o)
- TADR = m_ea;
- call rm_reg
+ @rm_reg m_ea
TDAT8 = sla(TDAT8);
- call wm
+ @wm m_ea
fe27 # SLA A = (XY+o)
- TADR = m_ea;
- call rm_reg
- A = sla(TDAT8); TDAT8 = A;
- call wm
+ @rm_reg m_ea
+ A = sla(TDAT8);
+ TDAT8 = A;
+ @wm m_ea
fe28 # SRA B = (XY+o)
- TADR = m_ea;
- call rm_reg
- B = sra(TDAT8); TDAT8 = B;
- call wm
+ @rm_reg m_ea
+ B = sra(TDAT8);
+ TDAT8 = B;
+ @wm m_ea
fe29 # SRA C = (XY+o)
- TADR = m_ea;
- call rm_reg
- C = sra(TDAT8); TDAT8 = C;
- call wm
+ @rm_reg m_ea
+ C = sra(TDAT8);
+ TDAT8 = C;
+ @wm m_ea
fe2a # SRA D = (XY+o)
- TADR = m_ea;
- call rm_reg
- D = sra(TDAT8); TDAT8 = D;
- call wm
+ @rm_reg m_ea
+ D = sra(TDAT8);
+ TDAT8 = D;
+ @wm m_ea
fe2b # SRA E = (XY+o)
- TADR = m_ea;
- call rm_reg
- E = sra(TDAT8); TDAT8 = E;
- call wm
+ @rm_reg m_ea
+ E = sra(TDAT8);
+ TDAT8 = E;
+ @wm m_ea
fe2c # SRA H = (XY+o)
- TADR = m_ea;
- call rm_reg
- H = sra(TDAT8); TDAT8 = H;
- call wm
+ @rm_reg m_ea
+ H = sra(TDAT8);
+ TDAT8 = H;
+ @wm m_ea
fe2d # SRA L = (XY+o)
- TADR = m_ea;
- call rm_reg
- L = sra(TDAT8); TDAT8 = L;
- call wm
+ @rm_reg m_ea
+ L = sra(TDAT8);
+ TDAT8 = L;
+ @wm m_ea
fe2e # SRA (XY+o)
- TADR = m_ea;
- call rm_reg
+ @rm_reg m_ea
TDAT8 = sra(TDAT8);
- call wm
+ @wm m_ea
fe2f # SRA A = (XY+o)
- TADR = m_ea;
- call rm_reg
- A = sra(TDAT8); TDAT8 = A;
- call wm
+ @rm_reg m_ea
+ A = sra(TDAT8);
+ TDAT8 = A;
+ @wm m_ea
fe30 # SLL B = (XY+o)
- TADR = m_ea;
- call rm_reg
- B = sll(TDAT8); TDAT8 = B;
- call wm
+ @rm_reg m_ea
+ B = sll(TDAT8);
+ TDAT8 = B;
+ @wm m_ea
fe31 # SLL C = (XY+o)
- TADR = m_ea;
- call rm_reg
- C = sll(TDAT8); TDAT8 = C;
- call wm
+ @rm_reg m_ea
+ C = sll(TDAT8);
+ TDAT8 = C;
+ @wm m_ea
fe32 # SLL D = (XY+o)
- TADR = m_ea;
- call rm_reg
- D = sll(TDAT8); TDAT8 = D;
- call wm
+ @rm_reg m_ea
+ D = sll(TDAT8);
+ TDAT8 = D;
+ @wm m_ea
fe33 # SLL E = (XY+o)
- TADR = m_ea;
- call rm_reg
- E = sll(TDAT8); TDAT8 = E;
- call wm
+ @rm_reg m_ea
+ E = sll(TDAT8);
+ TDAT8 = E;
+ @wm m_ea
fe34 # SLL H = (XY+o)
- TADR = m_ea;
- call rm_reg
- H = sll(TDAT8); TDAT8 = H;
- call wm
+ @rm_reg m_ea
+ H = sll(TDAT8);
+ TDAT8 = H;
+ @wm m_ea
fe35 # SLL L = (XY+o)
- TADR = m_ea;
- call rm_reg
- L = sll(TDAT8); TDAT8 = L;
- call wm
+ @rm_reg m_ea
+ L = sll(TDAT8);
+ TDAT8 = L;
+ @wm m_ea
fe36 # SLL (XY+o)
- TADR = m_ea;
- call rm_reg
+ @rm_reg m_ea
TDAT8 = sll(TDAT8);
- call wm
+ @wm m_ea
fe37 # SLL A = (XY+o)
- TADR = m_ea;
- call rm_reg
- A = sll(TDAT8); TDAT8 = A;
- call wm
+ @rm_reg m_ea
+ A = sll(TDAT8);
+ TDAT8 = A;
+ @wm m_ea
fe38 # SRL B = (XY+o)
- TADR = m_ea;
- call rm_reg
- B = srl(TDAT8); TDAT8 = B;
- call wm
+ @rm_reg m_ea
+ B = srl(TDAT8);
+ TDAT8 = B;
+ @wm m_ea
fe39 # SRL C = (XY+o)
- TADR = m_ea;
- call rm_reg
- C = srl(TDAT8); TDAT8 = C;
- call wm
+ @rm_reg m_ea
+ C = srl(TDAT8);
+ TDAT8 = C;
+ @wm m_ea
fe3a # SRL D = (XY+o)
- TADR = m_ea;
- call rm_reg
- D = srl(TDAT8); TDAT8 = D;
- call wm
+ @rm_reg m_ea
+ D = srl(TDAT8);
+ TDAT8 = D;
+ @wm m_ea
fe3b # SRL E = (XY+o)
- TADR = m_ea;
- call rm_reg
- E = srl(TDAT8); TDAT8 = E;
- call wm
+ @rm_reg m_ea
+ E = srl(TDAT8);
+ TDAT8 = E;
+ @wm m_ea
fe3c # SRL H = (XY+o)
- TADR = m_ea;
- call rm_reg
- H = srl(TDAT8); TDAT8 = H;
- call wm
+ @rm_reg m_ea
+ H = srl(TDAT8);
+ TDAT8 = H;
+ @wm m_ea
fe3d # SRL L = (XY+o)
- TADR = m_ea;
- call rm_reg
- L = srl(TDAT8); TDAT8 = L;
- call wm
+ @rm_reg m_ea
+ L = srl(TDAT8);
+ TDAT8 = L;
+ @wm m_ea
fe3e # SRL (XY+o)
- TADR = m_ea;
- call rm_reg
+ @rm_reg m_ea
TDAT8 = srl(TDAT8);
- call wm
+ @wm m_ea
fe3f # SRL A = (XY+o)
- TADR = m_ea;
- call rm_reg
- A = srl(TDAT8); TDAT8 = A;
- call wm
+ @rm_reg m_ea
+ A = srl(TDAT8);
+ TDAT8 = A;
+ @wm m_ea
fe40 # BIT 0,(XY+o)
- call jump fe46
+ @jump fe46
fe41 # BIT 0,(XY+o)
- call jump fe46
+ @jump fe46
fe42 # BIT 0,(XY+o)
- call jump fe46
+ @jump fe46
fe43 # BIT 0,(XY+o)
- call jump fe46
+ @jump fe46
fe44 # BIT 0,(XY+o)
- call jump fe46
+ @jump fe46
fe45 # BIT 0,(XY+o)
- call jump fe46
+ @jump fe46
fe46 # BIT 0,(XY+o)
- TADR = m_ea;
- call rm_reg
+ @rm_reg m_ea
bit_xy(0, TDAT8);
fe47 # BIT 0,(XY+o)
- call jump fe46
+ @jump fe46
fe48 # BIT 1,(XY+o)
- call jump fe4e
+ @jump fe4e
fe49 # BIT 1,(XY+o)
- call jump fe4e
+ @jump fe4e
fe4a # BIT 1,(XY+o)
- call jump fe4e
+ @jump fe4e
fe4b # BIT 1,(XY+o)
- call jump fe4e
+ @jump fe4e
fe4c # BIT 1,(XY+o)
- call jump fe4e
+ @jump fe4e
fe4d # BIT 1,(XY+o)
- call jump fe4e
+ @jump fe4e
fe4e # BIT 1,(XY+o)
- TADR = m_ea;
- call rm_reg
+ @rm_reg m_ea
bit_xy(1, TDAT8);
fe4f # BIT 1,(XY+o)
- call jump fe4e
+ @jump fe4e
fe50 # BIT 2,(XY+o)
- call jump fe56
+ @jump fe56
fe51 # BIT 2,(XY+o)
- call jump fe56
+ @jump fe56
fe52 # BIT 2,(XY+o)
- call jump fe56
+ @jump fe56
fe53 # BIT 2,(XY+o)
- call jump fe56
+ @jump fe56
fe54 # BIT 2,(XY+o)
- call jump fe56
+ @jump fe56
fe55 # BIT 2,(XY+o)
- call jump fe56
+ @jump fe56
fe56 # BIT 2,(XY+o)
- TADR = m_ea;
- call rm_reg
+ @rm_reg m_ea
bit_xy(2, TDAT8);
fe57 # BIT 2,(XY+o)
- call jump fe56
+ @jump fe56
fe58 # BIT 3,(XY+o)
- call jump fe5e
+ @jump fe5e
fe59 # BIT 3,(XY+o)
- call jump fe5e
+ @jump fe5e
fe5a # BIT 3,(XY+o)
- call jump fe5e
+ @jump fe5e
fe5b # BIT 3,(XY+o)
- call jump fe5e
+ @jump fe5e
fe5c # BIT 3,(XY+o)
- call jump fe5e
+ @jump fe5e
fe5d # BIT 3,(XY+o)
- call jump fe5e
+ @jump fe5e
fe5e # BIT 3,(XY+o)
- TADR = m_ea;
- call rm_reg
+ @rm_reg m_ea
bit_xy(3, TDAT8);
fe5f # BIT 3,(XY+o)
- call jump fe5e
+ @jump fe5e
fe60 # BIT 4,(XY+o)
- call jump fe66
+ @jump fe66
fe61 # BIT 4,(XY+o)
- call jump fe66
+ @jump fe66
fe62 # BIT 4,(XY+o)
- call jump fe66
+ @jump fe66
fe63 # BIT 4,(XY+o)
- call jump fe66
+ @jump fe66
fe64 # BIT 4,(XY+o)
- call jump fe66
+ @jump fe66
fe65 # BIT 4,(XY+o)
- call jump fe66
+ @jump fe66
fe66 # BIT 4,(XY+o)
- TADR = m_ea;
- call rm_reg
+ @rm_reg m_ea
bit_xy(4, TDAT8);
fe67 # BIT 4,(XY+o)
- call jump fe66
+ @jump fe66
fe68 # BIT 5,(XY+o)
- call jump fe6e
+ @jump fe6e
fe69 # BIT 5,(XY+o)
- call jump fe6e
+ @jump fe6e
fe6a # BIT 5,(XY+o)
- call jump fe6e
+ @jump fe6e
fe6b # BIT 5,(XY+o)
- call jump fe6e
+ @jump fe6e
fe6c # BIT 5,(XY+o)
- call jump fe6e
+ @jump fe6e
fe6d # BIT 5,(XY+o)
- call jump fe6e
+ @jump fe6e
fe6e # BIT 5,(XY+o)
- TADR = m_ea;
- call rm_reg
+ @rm_reg m_ea
bit_xy(5, TDAT8);
fe6f # BIT 5,(XY+o)
- call jump fe6e
+ @jump fe6e
fe70 # BIT 6,(XY+o)
- call jump fe76
+ @jump fe76
fe71 # BIT 6,(XY+o)
- call jump fe76
+ @jump fe76
fe72 # BIT 6,(XY+o)
- call jump fe76
+ @jump fe76
fe73 # BIT 6,(XY+o)
- call jump fe76
+ @jump fe76
fe74 # BIT 6,(XY+o)
- call jump fe76
+ @jump fe76
fe75 # BIT 6,(XY+o)
- call jump fe76
+ @jump fe76
fe76 # BIT 6,(XY+o)
- TADR = m_ea;
- call rm_reg
+ @rm_reg m_ea
bit_xy(6, TDAT8);
fe77 # BIT 6,(XY+o)
- call jump fe76
+ @jump fe76
fe78 # BIT 7,(XY+o)
- call jump fe7e
+ @jump fe7e
fe79 # BIT 7,(XY+o)
- call jump fe7e
+ @jump fe7e
fe7a # BIT 7,(XY+o)
- call jump fe7e
+ @jump fe7e
fe7b # BIT 7,(XY+o)
- call jump fe7e
+ @jump fe7e
fe7c # BIT 7,(XY+o)
- call jump fe7e
+ @jump fe7e
fe7d # BIT 7,(XY+o)
- call jump fe7e
+ @jump fe7e
fe7e # BIT 7,(XY+o)
- TADR = m_ea;
- call rm_reg
+ @rm_reg m_ea
bit_xy(7, TDAT8);
fe7f # BIT 7,(XY+o)
- call jump fe7e
+ @jump fe7e
fe80 # RES 0,B = (XY+o)
- TADR = m_ea;
- call rm_reg
- B = res(0, TDAT8); TDAT8 = B;
- call wm
+ @rm_reg m_ea
+ B = res(0, TDAT8);
+ TDAT8 = B;
+ @wm m_ea
fe81 # RES 0,C = (XY+o)
- TADR = m_ea;
- call rm_reg
- C = res(0, TDAT8); TDAT8 = C;
- call wm
+ @rm_reg m_ea
+ C = res(0, TDAT8);
+ TDAT8 = C;
+ @wm m_ea
fe82 # RES 0,D = (XY+o)
- TADR = m_ea;
- call rm_reg
- D = res(0, TDAT8); TDAT8 = D;
- call wm
+ @rm_reg m_ea
+ D = res(0, TDAT8);
+ TDAT8 = D;
+ @wm m_ea
fe83 # RES 0,E = (XY+o)
- TADR = m_ea;
- call rm_reg
- E = res(0, TDAT8); TDAT8 = E;
- call wm
+ @rm_reg m_ea
+ E = res(0, TDAT8);
+ TDAT8 = E;
+ @wm m_ea
fe84 # RES 0,H = (XY+o)
- TADR = m_ea;
- call rm_reg
- H = res(0, TDAT8); TDAT8 = H;
- call wm
+ @rm_reg m_ea
+ H = res(0, TDAT8);
+ TDAT8 = H;
+ @wm m_ea
fe85 # RES 0,L = (XY+o)
- TADR = m_ea;
- call rm_reg
- L = res(0, TDAT8); TDAT8 = L;
- call wm
+ @rm_reg m_ea
+ L = res(0, TDAT8);
+ TDAT8 = L;
+ @wm m_ea
fe86 # RES 0,(XY+o)
- TADR = m_ea;
- call rm_reg
+ @rm_reg m_ea
TDAT8 = res(0, TDAT8);
- call wm
+ @wm m_ea
fe87 # RES 0,A = (XY+o)
- TADR = m_ea;
- call rm_reg
- A = res(0, TDAT8); TDAT8 = A;
- call wm
+ @rm_reg m_ea
+ A = res(0, TDAT8);
+ TDAT8 = A;
+ @wm m_ea
fe88 # RES 1,B = (XY+o)
- TADR = m_ea;
- call rm_reg
- B = res(1, TDAT8); TDAT8 = B;
- call wm
+ @rm_reg m_ea
+ B = res(1, TDAT8);
+ TDAT8 = B;
+ @wm m_ea
fe89 # RES 1,C = (XY+o)
- TADR = m_ea;
- call rm_reg
- C = res(1, TDAT8); TDAT8 = C;
- call wm
+ @rm_reg m_ea
+ C = res(1, TDAT8);
+ TDAT8 = C;
+ @wm m_ea
fe8a # RES 1,D = (XY+o)
- TADR = m_ea;
- call rm_reg
- D = res(1, TDAT8); TDAT8 = D;
- call wm
+ @rm_reg m_ea
+ D = res(1, TDAT8);
+ TDAT8 = D;
+ @wm m_ea
fe8b # RES 1,E = (XY+o)
- TADR = m_ea;
- call rm_reg
- E = res(1, TDAT8); TDAT8 = E;
- call wm
+ @rm_reg m_ea
+ E = res(1, TDAT8);
+ TDAT8 = E;
+ @wm m_ea
fe8c # RES 1,H = (XY+o)
- TADR = m_ea;
- call rm_reg
- H = res(1, TDAT8); TDAT8 = H;
- call wm
+ @rm_reg m_ea
+ H = res(1, TDAT8);
+ TDAT8 = H;
+ @wm m_ea
fe8d # RES 1,L = (XY+o)
- TADR = m_ea;
- call rm_reg
- L = res(1, TDAT8); TDAT8 = L;
- call wm
+ @rm_reg m_ea
+ L = res(1, TDAT8);
+ TDAT8 = L;
+ @wm m_ea
fe8e # RES 1,(XY+o)
- TADR = m_ea;
- call rm_reg
+ @rm_reg m_ea
TDAT8 = res(1, TDAT8);
- call wm
+ @wm m_ea
fe8f # RES 1,A = (XY+o)
- TADR = m_ea;
- call rm_reg
- A = res(1, TDAT8); TDAT8 = A;
- call wm
+ @rm_reg m_ea
+ A = res(1, TDAT8);
+ TDAT8 = A;
+ @wm m_ea
fe90 # RES 2,B = (XY+o)
- TADR = m_ea;
- call rm_reg
- B = res(2, TDAT8); TDAT8 = B;
- call wm
+ @rm_reg m_ea
+ B = res(2, TDAT8);
+ TDAT8 = B;
+ @wm m_ea
fe91 # RES 2,C = (XY+o)
- TADR = m_ea;
- call rm_reg
- C = res(2, TDAT8); TDAT8 = C;
- call wm
+ @rm_reg m_ea
+ C = res(2, TDAT8);
+ TDAT8 = C;
+ @wm m_ea
fe92 # RES 2,D = (XY+o)
- TADR = m_ea;
- call rm_reg
- D = res(2, TDAT8); TDAT8 = D;
- call wm
+ @rm_reg m_ea
+ D = res(2, TDAT8);
+ TDAT8 = D;
+ @wm m_ea
fe93 # RES 2,E = (XY+o)
- TADR = m_ea;
- call rm_reg
- E = res(2, TDAT8); TDAT8 = E;
- call wm
+ @rm_reg m_ea
+ E = res(2, TDAT8);
+ TDAT8 = E;
+ @wm m_ea
fe94 # RES 2,H = (XY+o)
- TADR = m_ea;
- call rm_reg
- H = res(2, TDAT8); TDAT8 = H;
- call wm
+ @rm_reg m_ea
+ H = res(2, TDAT8);
+ TDAT8 = H;
+ @wm m_ea
fe95 # RES 2,L = (XY+o)
- TADR = m_ea;
- call rm_reg
- L = res(2, TDAT8); TDAT8 = L;
- call wm
+ @rm_reg m_ea
+ L = res(2, TDAT8);
+ TDAT8 = L;
+ @wm m_ea
fe96 # RES 2,(XY+o)
- TADR = m_ea;
- call rm_reg
+ @rm_reg m_ea
TDAT8 = res(2, TDAT8);
- call wm
+ @wm m_ea
fe97 # RES 2,A = (XY+o)
- TADR = m_ea;
- call rm_reg
- A = res(2, TDAT8); TDAT8 = A;
- call wm
+ @rm_reg m_ea
+ A = res(2, TDAT8);
+ TDAT8 = A;
+ @wm m_ea
fe98 # RES 3,B = (XY+o)
- TADR = m_ea;
- call rm_reg
- B = res(3, TDAT8); TDAT8 = B;
- call wm
+ @rm_reg m_ea
+ B = res(3, TDAT8);
+ TDAT8 = B;
+ @wm m_ea
fe99 # RES 3,C = (XY+o)
- TADR = m_ea;
- call rm_reg
- C = res(3, TDAT8); TDAT8 = C;
- call wm
+ @rm_reg m_ea
+ C = res(3, TDAT8);
+ TDAT8 = C;
+ @wm m_ea
fe9a # RES 3,D = (XY+o)
- TADR = m_ea;
- call rm_reg
- D = res(3, TDAT8); TDAT8 = D;
- call wm
+ @rm_reg m_ea
+ D = res(3, TDAT8);
+ TDAT8 = D;
+ @wm m_ea
fe9b # RES 3,E = (XY+o)
- TADR = m_ea;
- call rm_reg
- E = res(3, TDAT8); TDAT8 = E;
- call wm
+ @rm_reg m_ea
+ E = res(3, TDAT8);
+ TDAT8 = E;
+ @wm m_ea
fe9c # RES 3,H = (XY+o)
- TADR = m_ea;
- call rm_reg
- H = res(3, TDAT8); TDAT8 = H;
- call wm
+ @rm_reg m_ea
+ H = res(3, TDAT8);
+ TDAT8 = H;
+ @wm m_ea
fe9d # RES 3,L = (XY+o)
- TADR = m_ea;
- call rm_reg
- L = res(3, TDAT8); TDAT8 = L;
- call wm
+ @rm_reg m_ea
+ L = res(3, TDAT8);
+ TDAT8 = L;
+ @wm m_ea
fe9e # RES 3,(XY+o)
- TADR = m_ea;
- call rm_reg
+ @rm_reg m_ea
TDAT8 = res(3, TDAT8);
- call wm
+ @wm m_ea
fe9f # RES 3,A = (XY+o)
- TADR = m_ea;
- call rm_reg
- A = res(3, TDAT8); TDAT8 = A;
- call wm
+ @rm_reg m_ea
+ A = res(3, TDAT8);
+ TDAT8 = A;
+ @wm m_ea
fea0 # RES 4,B = (XY+o)
- TADR = m_ea;
- call rm_reg
- B = res(4, TDAT8); TDAT8 = B;
- call wm
+ @rm_reg m_ea
+ B = res(4, TDAT8);
+ TDAT8 = B;
+ @wm m_ea
fea1 # RES 4,C = (XY+o)
- TADR = m_ea;
- call rm_reg
- C = res(4, TDAT8); TDAT8 = C;
- call wm
+ @rm_reg m_ea
+ C = res(4, TDAT8);
+ TDAT8 = C;
+ @wm m_ea
fea2 # RES 4,D = (XY+o)
- TADR = m_ea;
- call rm_reg
- D = res(4, TDAT8); TDAT8 = D;
- call wm
+ @rm_reg m_ea
+ D = res(4, TDAT8);
+ TDAT8 = D;
+ @wm m_ea
fea3 # RES 4,E = (XY+o)
- TADR = m_ea;
- call rm_reg
- E = res(4, TDAT8); TDAT8 = E;
- call wm
+ @rm_reg m_ea
+ E = res(4, TDAT8);
+ TDAT8 = E;
+ @wm m_ea
fea4 # RES 4,H = (XY+o)
- TADR = m_ea;
- call rm_reg
- H = res(4, TDAT8); TDAT8 = H;
- call wm
+ @rm_reg m_ea
+ H = res(4, TDAT8);
+ TDAT8 = H;
+ @wm m_ea
fea5 # RES 4,L = (XY+o)
- TADR = m_ea;
- call rm_reg
- L = res(4, TDAT8); TDAT8 = L;
- call wm
+ @rm_reg m_ea
+ L = res(4, TDAT8);
+ TDAT8 = L;
+ @wm m_ea
fea6 # RES 4,(XY+o)
- TADR = m_ea;
- call rm_reg
+ @rm_reg m_ea
TDAT8 = res(4, TDAT8);
- call wm
+ @wm m_ea
fea7 # RES 4,A = (XY+o)
- TADR = m_ea;
- call rm_reg
- A = res(4, TDAT8); TDAT8 = A;
- call wm
+ @rm_reg m_ea
+ A = res(4, TDAT8);
+ TDAT8 = A;
+ @wm m_ea
fea8 # RES 5,B = (XY+o)
- TADR = m_ea;
- call rm_reg
- B = res(5, TDAT8); TDAT8 = B;
- call wm
+ @rm_reg m_ea
+ B = res(5, TDAT8);
+ TDAT8 = B;
+ @wm m_ea
fea9 # RES 5,C = (XY+o)
- TADR = m_ea;
- call rm_reg
- C = res(5, TDAT8); TDAT8 = C;
- call wm
+ @rm_reg m_ea
+ C = res(5, TDAT8);
+ TDAT8 = C;
+ @wm m_ea
feaa # RES 5,D = (XY+o)
- TADR = m_ea;
- call rm_reg
- D = res(5, TDAT8); TDAT8 = D;
- call wm
+ @rm_reg m_ea
+ D = res(5, TDAT8);
+ TDAT8 = D;
+ @wm m_ea
feab # RES 5,E = (XY+o)
- TADR = m_ea;
- call rm_reg
- E = res(5, TDAT8); TDAT8 = E;
- call wm
+ @rm_reg m_ea
+ E = res(5, TDAT8);
+ TDAT8 = E;
+ @wm m_ea
feac # RES 5,H = (XY+o)
- TADR = m_ea;
- call rm_reg
- H = res(5, TDAT8); TDAT8 = H;
- call wm
+ @rm_reg m_ea
+ H = res(5, TDAT8);
+ TDAT8 = H;
+ @wm m_ea
fead # RES 5,L = (XY+o)
- TADR = m_ea;
- call rm_reg
- L = res(5, TDAT8); TDAT8 = L;
- call wm
+ @rm_reg m_ea
+ L = res(5, TDAT8);
+ TDAT8 = L;
+ @wm m_ea
feae # RES 5,(XY+o)
- TADR = m_ea;
- call rm_reg
+ @rm_reg m_ea
TDAT8 = res(5, TDAT8);
- call wm
+ @wm m_ea
feaf # RES 5,A = (XY+o)
- TADR = m_ea;
- call rm_reg
- A = res(5, TDAT8); TDAT8 = A;
- call wm
+ @rm_reg m_ea
+ A = res(5, TDAT8);
+ TDAT8 = A;
+ @wm m_ea
feb0 # RES 6,B = (XY+o)
- TADR = m_ea;
- call rm_reg
- B = res(6, TDAT8); TDAT8 = B;
- call wm
+ @rm_reg m_ea
+ B = res(6, TDAT8);
+ TDAT8 = B;
+ @wm m_ea
feb1 # RES 6,C = (XY+o)
- TADR = m_ea;
- call rm_reg
- C = res(6, TDAT8); TDAT8 = C;
- call wm
+ @rm_reg m_ea
+ C = res(6, TDAT8);
+ TDAT8 = C;
+ @wm m_ea
feb2 # RES 6,D = (XY+o)
- TADR = m_ea;
- call rm_reg
- D = res(6, TDAT8); TDAT8 = D;
- call wm
+ @rm_reg m_ea
+ D = res(6, TDAT8);
+ TDAT8 = D;
+ @wm m_ea
feb3 # RES 6,E = (XY+o)
- TADR = m_ea;
- call rm_reg
- E = res(6, TDAT8); TDAT8 = E;
- call wm
+ @rm_reg m_ea
+ E = res(6, TDAT8);
+ TDAT8 = E;
+ @wm m_ea
feb4 # RES 6,H = (XY+o)
- TADR = m_ea;
- call rm_reg
- H = res(6, TDAT8); TDAT8 = H;
- call wm
+ @rm_reg m_ea
+ H = res(6, TDAT8);
+ TDAT8 = H;
+ @wm m_ea
feb5 # RES 6,L = (XY+o)
- TADR = m_ea;
- call rm_reg
- L = res(6, TDAT8); TDAT8 = L;
- call wm
+ @rm_reg m_ea
+ L = res(6, TDAT8);
+ TDAT8 = L;
+ @wm m_ea
feb6 # RES 6,(XY+o)
- TADR = m_ea;
- call rm_reg
+ @rm_reg m_ea
TDAT8 = res(6, TDAT8);
- call wm
+ @wm m_ea
feb7 # RES 6,A = (XY+o)
- TADR = m_ea;
- call rm_reg
- A = res(6, TDAT8); TDAT8 = A;
- call wm
+ @rm_reg m_ea
+ A = res(6, TDAT8);
+ TDAT8 = A;
+ @wm m_ea
feb8 # RES 7,B = (XY+o)
- TADR = m_ea;
- call rm_reg
- B = res(7, TDAT8); TDAT8 = B;
- call wm
+ @rm_reg m_ea
+ B = res(7, TDAT8);
+ TDAT8 = B;
+ @wm m_ea
feb9 # RES 7,C = (XY+o)
- TADR = m_ea;
- call rm_reg
- C = res(7, TDAT8); TDAT8 = C;
- call wm
+ @rm_reg m_ea
+ C = res(7, TDAT8);
+ TDAT8 = C;
+ @wm m_ea
feba # RES 7,D = (XY+o)
- TADR = m_ea;
- call rm_reg
- D = res(7, TDAT8); TDAT8 = D;
- call wm
+ @rm_reg m_ea
+ D = res(7, TDAT8);
+ TDAT8 = D;
+ @wm m_ea
febb # RES 7,E = (XY+o)
- TADR = m_ea;
- call rm_reg
- E = res(7, TDAT8); TDAT8 = E;
- call wm
+ @rm_reg m_ea
+ E = res(7, TDAT8);
+ TDAT8 = E;
+ @wm m_ea
febc # RES 7,H = (XY+o)
- TADR = m_ea;
- call rm_reg
- H = res(7, TDAT8); TDAT8 = H;
- call wm
+ @rm_reg m_ea
+ H = res(7, TDAT8);
+ TDAT8 = H;
+ @wm m_ea
febd # RES 7,L = (XY+o)
- TADR = m_ea;
- call rm_reg
- L = res(7, TDAT8); TDAT8 = L;
- call wm
+ @rm_reg m_ea
+ L = res(7, TDAT8);
+ TDAT8 = L;
+ @wm m_ea
febe # RES 7,(XY+o)
- TADR = m_ea;
- call rm_reg
+ @rm_reg m_ea
TDAT8 = res(7, TDAT8);
- call wm
+ @wm m_ea
febf # RES 7,A = (XY+o)
- TADR = m_ea;
- call rm_reg
- A = res(7, TDAT8); TDAT8 = A;
- call wm
+ @rm_reg m_ea
+ A = res(7, TDAT8);
+ TDAT8 = A;
+ @wm m_ea
fec0 # SET 0,B = (XY+o)
- TADR = m_ea;
- call rm_reg
- B = set(0, TDAT8); TDAT8 = B;
- call wm
+ @rm_reg m_ea
+ B = set(0, TDAT8);
+ TDAT8 = B;
+ @wm m_ea
fec1 # SET 0,C = (XY+o)
- TADR = m_ea;
- call rm_reg
- C = set(0, TDAT8); TDAT8 = C;
- call wm
+ @rm_reg m_ea
+ C = set(0, TDAT8);
+ TDAT8 = C;
+ @wm m_ea
fec2 # SET 0,D = (XY+o)
- TADR = m_ea;
- call rm_reg
- D = set(0, TDAT8); TDAT8 = D;
- call wm
+ @rm_reg m_ea
+ D = set(0, TDAT8);
+ TDAT8 = D;
+ @wm m_ea
fec3 # SET 0,E = (XY+o)
- TADR = m_ea;
- call rm_reg
- E = set(0, TDAT8); TDAT8 = E;
- call wm
+ @rm_reg m_ea
+ E = set(0, TDAT8);
+ TDAT8 = E;
+ @wm m_ea
fec4 # SET 0,H = (XY+o)
- TADR = m_ea;
- call rm_reg
- H = set(0, TDAT8); TDAT8 = H;
- call wm
+ @rm_reg m_ea
+ H = set(0, TDAT8);
+ TDAT8 = H;
+ @wm m_ea
fec5 # SET 0,L = (XY+o)
- TADR = m_ea;
- call rm_reg
- L = set(0, TDAT8); TDAT8 = L;
- call wm
+ @rm_reg m_ea
+ L = set(0, TDAT8);
+ TDAT8 = L;
+ @wm m_ea
fec6 # SET 0,(XY+o)
- TADR = m_ea;
- call rm_reg
+ @rm_reg m_ea
TDAT8 = set(0, TDAT8);
- call wm
+ @wm m_ea
fec7 # SET 0,A = (XY+o)
- TADR = m_ea;
- call rm_reg
- A = set(0, TDAT8); TDAT8 = A;
- call wm
+ @rm_reg m_ea
+ A = set(0, TDAT8);
+ TDAT8 = A;
+ @wm m_ea
fec8 # SET 1,B = (XY+o)
- TADR = m_ea;
- call rm_reg
- B = set(1, TDAT8); TDAT8 = B;
- call wm
+ @rm_reg m_ea
+ B = set(1, TDAT8);
+ TDAT8 = B;
+ @wm m_ea
fec9 # SET 1,C = (XY+o)
- TADR = m_ea;
- call rm_reg
- C = set(1, TDAT8); TDAT8 = C;
- call wm
+ @rm_reg m_ea
+ C = set(1, TDAT8);
+ TDAT8 = C;
+ @wm m_ea
feca # SET 1,D = (XY+o)
- TADR = m_ea;
- call rm_reg
- D = set(1, TDAT8); TDAT8 = D;
- call wm
+ @rm_reg m_ea
+ D = set(1, TDAT8);
+ TDAT8 = D;
+ @wm m_ea
fecb # SET 1,E = (XY+o)
- TADR = m_ea;
- call rm_reg
- E = set(1, TDAT8); TDAT8 = E;
- call wm
+ @rm_reg m_ea
+ E = set(1, TDAT8);
+ TDAT8 = E;
+ @wm m_ea
fecc # SET 1,H = (XY+o)
- TADR = m_ea;
- call rm_reg
- H = set(1, TDAT8); TDAT8 = H;
- call wm
+ @rm_reg m_ea
+ H = set(1, TDAT8);
+ TDAT8 = H;
+ @wm m_ea
fecd # SET 1,L = (XY+o)
- TADR = m_ea;
- call rm_reg
- L = set(1, TDAT8); TDAT8 = L;
- call wm
+ @rm_reg m_ea
+ L = set(1, TDAT8);
+ TDAT8 = L;
+ @wm m_ea
fece # SET 1,(XY+o)
- TADR = m_ea;
- call rm_reg
+ @rm_reg m_ea
TDAT8 = set(1, TDAT8);
- call wm
+ @wm m_ea
fecf # SET 1,A = (XY+o)
- TADR = m_ea;
- call rm_reg
- A = set(1, TDAT8); TDAT8 = A;
- call wm
+ @rm_reg m_ea
+ A = set(1, TDAT8);
+ TDAT8 = A;
+ @wm m_ea
fed0 # SET 2,B = (XY+o)
- TADR = m_ea;
- call rm_reg
- B = set(2, TDAT8); TDAT8 = B;
- call wm
+ @rm_reg m_ea
+ B = set(2, TDAT8);
+ TDAT8 = B;
+ @wm m_ea
fed1 # SET 2,C = (XY+o)
- TADR = m_ea;
- call rm_reg
- C = set(2, TDAT8); TDAT8 = C;
- call wm
+ @rm_reg m_ea
+ C = set(2, TDAT8);
+ TDAT8 = C;
+ @wm m_ea
fed2 # SET 2,D = (XY+o)
- TADR = m_ea;
- call rm_reg
- D = set(2, TDAT8); TDAT8 = D;
- call wm
+ @rm_reg m_ea
+ D = set(2, TDAT8);
+ TDAT8 = D;
+ @wm m_ea
fed3 # SET 2,E = (XY+o)
- TADR = m_ea;
- call rm_reg
- E = set(2, TDAT8); TDAT8 = E;
- call wm
+ @rm_reg m_ea
+ E = set(2, TDAT8);
+ TDAT8 = E;
+ @wm m_ea
fed4 # SET 2,H = (XY+o)
- TADR = m_ea;
- call rm_reg
- H = set(2, TDAT8); TDAT8 = H;
- call wm
+ @rm_reg m_ea
+ H = set(2, TDAT8);
+ TDAT8 = H;
+ @wm m_ea
fed5 # SET 2,L = (XY+o)
- TADR = m_ea;
- call rm_reg
- L = set(2, TDAT8); TDAT8 = L;
- call wm
+ @rm_reg m_ea
+ L = set(2, TDAT8);
+ TDAT8 = L;
+ @wm m_ea
fed6 # SET 2,(XY+o)
- TADR = m_ea;
- call rm_reg
+ @rm_reg m_ea
TDAT8 = set(2, TDAT8);
- call wm
+ @wm m_ea
fed7 # SET 2,A = (XY+o)
- TADR = m_ea;
- call rm_reg
- A = set(2, TDAT8); TDAT8 = A;
- call wm
+ @rm_reg m_ea
+ A = set(2, TDAT8);
+ TDAT8 = A;
+ @wm m_ea
fed8 # SET 3,B = (XY+o)
- TADR = m_ea;
- call rm_reg
- B = set(3, TDAT8); TDAT8 = B;
- call wm
+ @rm_reg m_ea
+ B = set(3, TDAT8);
+ TDAT8 = B;
+ @wm m_ea
fed9 # SET 3,C = (XY+o)
- TADR = m_ea;
- call rm_reg
- C = set(3, TDAT8); TDAT8 = C;
- call wm
+ @rm_reg m_ea
+ C = set(3, TDAT8);
+ TDAT8 = C;
+ @wm m_ea
feda # SET 3,D = (XY+o)
- TADR = m_ea;
- call rm_reg
- D = set(3, TDAT8); TDAT8 = D;
- call wm
+ @rm_reg m_ea
+ D = set(3, TDAT8);
+ TDAT8 = D;
+ @wm m_ea
fedb # SET 3,E = (XY+o)
- TADR = m_ea;
- call rm_reg
- E = set(3, TDAT8); TDAT8 = E;
- call wm
+ @rm_reg m_ea
+ E = set(3, TDAT8);
+ TDAT8 = E;
+ @wm m_ea
fedc # SET 3,H = (XY+o)
- TADR = m_ea;
- call rm_reg
- H = set(3, TDAT8); TDAT8 = H;
- call wm
+ @rm_reg m_ea
+ H = set(3, TDAT8);
+ TDAT8 = H;
+ @wm m_ea
fedd # SET 3,L = (XY+o)
- TADR = m_ea;
- call rm_reg
- L = set(3, TDAT8); TDAT8 = L;
- call wm
+ @rm_reg m_ea
+ L = set(3, TDAT8);
+ TDAT8 = L;
+ @wm m_ea
fede # SET 3,(XY+o)
- TADR = m_ea;
- call rm_reg
+ @rm_reg m_ea
TDAT8 = set(3, TDAT8);
- call wm
+ @wm m_ea
fedf # SET 3,A = (XY+o)
- TADR = m_ea;
- call rm_reg
- A = set(3, TDAT8); TDAT8 = A;
- call wm
+ @rm_reg m_ea
+ A = set(3, TDAT8);
+ TDAT8 = A;
+ @wm m_ea
fee0 # SET 4,B = (XY+o)
- TADR = m_ea;
- call rm_reg
- B = set(4, TDAT8); TDAT8 = B;
- call wm
+ @rm_reg m_ea
+ B = set(4, TDAT8);
+ TDAT8 = B;
+ @wm m_ea
fee1 # SET 4,C = (XY+o)
- TADR = m_ea;
- call rm_reg
- C = set(4, TDAT8); TDAT8 = C;
- call wm
+ @rm_reg m_ea
+ C = set(4, TDAT8);
+ TDAT8 = C;
+ @wm m_ea
fee2 # SET 4,D = (XY+o)
- TADR = m_ea;
- call rm_reg
- D = set(4, TDAT8); TDAT8 = D;
- call wm
+ @rm_reg m_ea
+ D = set(4, TDAT8);
+ TDAT8 = D;
+ @wm m_ea
fee3 # SET 4,E = (XY+o)
- TADR = m_ea;
- call rm_reg
- E = set(4, TDAT8); TDAT8 = E;
- call wm
+ @rm_reg m_ea
+ E = set(4, TDAT8);
+ TDAT8 = E;
+ @wm m_ea
fee4 # SET 4,H = (XY+o)
- TADR = m_ea;
- call rm_reg
- H = set(4, TDAT8); TDAT8 = H;
- call wm
+ @rm_reg m_ea
+ H = set(4, TDAT8);
+ TDAT8 = H;
+ @wm m_ea
fee5 # SET 4,L = (XY+o)
- TADR = m_ea;
- call rm_reg
- L = set(4, TDAT8); TDAT8 = L;
- call wm
+ @rm_reg m_ea
+ L = set(4, TDAT8);
+ TDAT8 = L;
+ @wm m_ea
fee6 # SET 4,(XY+o)
- TADR = m_ea;
- call rm_reg
+ @rm_reg m_ea
TDAT8 = set(4, TDAT8);
- call wm
+ @wm m_ea
fee7 # SET 4,A = (XY+o)
- TADR = m_ea;
- call rm_reg
- A = set(4, TDAT8); TDAT8 = A;
- call wm
+ @rm_reg m_ea
+ A = set(4, TDAT8);
+ TDAT8 = A;
+ @wm m_ea
fee8 # SET 5,B = (XY+o)
- TADR = m_ea;
- call rm_reg
- B = set(5, TDAT8); TDAT8 = B;
- call wm
+ @rm_reg m_ea
+ B = set(5, TDAT8);
+ TDAT8 = B;
+ @wm m_ea
fee9 # SET 5,C = (XY+o)
- TADR = m_ea;
- call rm_reg
- C = set(5, TDAT8); TDAT8 = C;
- call wm
+ @rm_reg m_ea
+ C = set(5, TDAT8);
+ TDAT8 = C;
+ @wm m_ea
feea # SET 5,D = (XY+o)
- TADR = m_ea;
- call rm_reg
- D = set(5, TDAT8); TDAT8 = D;
- call wm
+ @rm_reg m_ea
+ D = set(5, TDAT8);
+ TDAT8 = D;
+ @wm m_ea
feeb # SET 5,E = (XY+o)
- TADR = m_ea;
- call rm_reg
- E = set(5, TDAT8); TDAT8 = E;
- call wm
+ @rm_reg m_ea
+ E = set(5, TDAT8);
+ TDAT8 = E;
+ @wm m_ea
feec # SET 5,H = (XY+o)
- TADR = m_ea;
- call rm_reg
- H = set(5, TDAT8); TDAT8 = H;
- call wm
+ @rm_reg m_ea
+ H = set(5, TDAT8);
+ TDAT8 = H;
+ @wm m_ea
feed # SET 5,L = (XY+o)
- TADR = m_ea;
- call rm_reg
- L = set(5, TDAT8); TDAT8 = L;
- call wm
+ @rm_reg m_ea
+ L = set(5, TDAT8);
+ TDAT8 = L;
+ @wm m_ea
feee # SET 5,(XY+o)
- TADR = m_ea;
- call rm_reg
+ @rm_reg m_ea
TDAT8 = set(5, TDAT8);
- call wm
+ @wm m_ea
feef # SET 5,A = (XY+o)
- TADR = m_ea;
- call rm_reg
- A = set(5, TDAT8); TDAT8 = A;
- call wm
+ @rm_reg m_ea
+ A = set(5, TDAT8);
+ TDAT8 = A;
+ @wm m_ea
fef0 # SET 6,B = (XY+o)
- TADR = m_ea;
- call rm_reg
- B = set(6, TDAT8); TDAT8 = B;
- call wm
+ @rm_reg m_ea
+ B = set(6, TDAT8);
+ TDAT8 = B;
+ @wm m_ea
fef1 # SET 6,C = (XY+o)
- TADR = m_ea;
- call rm_reg
- C = set(6, TDAT8); TDAT8 = C;
- call wm
+ @rm_reg m_ea
+ C = set(6, TDAT8);
+ TDAT8 = C;
+ @wm m_ea
fef2 # SET 6,D = (XY+o)
- TADR = m_ea;
- call rm_reg
- D = set(6, TDAT8); TDAT8 = D;
- call wm
+ @rm_reg m_ea
+ D = set(6, TDAT8);
+ TDAT8 = D;
+ @wm m_ea
fef3 # SET 6,E = (XY+o)
- TADR = m_ea;
- call rm_reg
- E = set(6, TDAT8); TDAT8 = E;
- call wm
+ @rm_reg m_ea
+ E = set(6, TDAT8);
+ TDAT8 = E;
+ @wm m_ea
fef4 # SET 6,H = (XY+o)
- TADR = m_ea;
- call rm_reg
- H = set(6, TDAT8); TDAT8 = H;
- call wm
+ @rm_reg m_ea
+ H = set(6, TDAT8);
+ TDAT8 = H;
+ @wm m_ea
fef5 # SET 6,L = (XY+o)
- TADR = m_ea;
- call rm_reg
- L = set(6, TDAT8); TDAT8 = L;
- call wm
+ @rm_reg m_ea
+ L = set(6, TDAT8);
+ TDAT8 = L;
+ @wm m_ea
fef6 # SET 6,(XY+o)
- TADR = m_ea;
- call rm_reg
+ @rm_reg m_ea
TDAT8 = set(6, TDAT8);
- call wm
+ @wm m_ea
fef7 # SET 6,A = (XY+o)
- TADR = m_ea;
- call rm_reg
- A = set(6, TDAT8); TDAT8 = A;
- call wm
+ @rm_reg m_ea
+ A = set(6, TDAT8);
+ TDAT8 = A;
+ @wm m_ea
fef8 # SET 7,B = (XY+o)
- TADR = m_ea;
- call rm_reg
- B = set(7, TDAT8); TDAT8 = B;
- call wm
+ @rm_reg m_ea
+ B = set(7, TDAT8);
+ TDAT8 = B;
+ @wm m_ea
fef9 # SET 7,C = (XY+o)
- TADR = m_ea;
- call rm_reg
- C = set(7, TDAT8); TDAT8 = C;
- call wm
+ @rm_reg m_ea
+ C = set(7, TDAT8);
+ TDAT8 = C;
+ @wm m_ea
fefa # SET 7,D = (XY+o)
- TADR = m_ea;
- call rm_reg
- D = set(7, TDAT8); TDAT8 = D;
- call wm
+ @rm_reg m_ea
+ D = set(7, TDAT8);
+ TDAT8 = D;
+ @wm m_ea
fefb # SET 7,E = (XY+o)
- TADR = m_ea;
- call rm_reg
- E = set(7, TDAT8); TDAT8 = E;
- call wm
+ @rm_reg m_ea
+ E = set(7, TDAT8);
+ TDAT8 = E;
+ @wm m_ea
fefc # SET 7,H = (XY+o)
- TADR = m_ea;
- call rm_reg
- H = set(7, TDAT8); TDAT8 = H;
- call wm
+ @rm_reg m_ea
+ H = set(7, TDAT8);
+ TDAT8 = H;
+ @wm m_ea
fefd # SET 7,L = (XY+o)
- TADR = m_ea;
- call rm_reg
- L = set(7, TDAT8); TDAT8 = L;
- call wm
+ @rm_reg m_ea
+ L = set(7, TDAT8);
+ TDAT8 = L;
+ @wm m_ea
fefe # SET 7,(XY+o)
- TADR = m_ea;
- call rm_reg
+ @rm_reg m_ea
TDAT8 = set(7, TDAT8);
- call wm
+ @wm m_ea
feff # SET 7,A = (XY+o)
- TADR = m_ea;
- call rm_reg
- A = set(7, TDAT8); TDAT8 = A;
- call wm
+ @rm_reg m_ea
+ A = set(7, TDAT8);
+ TDAT8 = A;
+ @wm m_ea
##########################################################
@@ -2981,150 +3144,153 @@ feff # SET 7,A = (XY+o)
##########################################################
dd00 # DB DD
illegal_1();
- call jump 0000
+ @jump 0000
dd01 # DB DD
illegal_1();
- call jump 0001
+ @jump 0001
dd02 # DB DD
illegal_1();
- call jump 0002
+ @jump 0002
dd03 # DB DD
illegal_1();
- call jump 0003
+ @jump 0003
dd04 # DB DD
illegal_1();
- call jump 0004
+ @jump 0004
dd05 # DB DD
illegal_1();
- call jump 0005
+ @jump 0005
dd06 # DB DD
illegal_1();
- call jump 0006
+ @jump 0006
dd07 # DB DD
illegal_1();
- call jump 0007
+ @jump 0007
dd08 # DB DD
illegal_1();
- call jump 0008
+ @jump 0008
dd09 # ADD IX,BC
- TDAT = IX; TDAT2 = BC;
- call add16
+ TDAT = IX;
+ TDAT2 = BC;
+ @add16
IX = TDAT;
dd0a # DB DD
illegal_1();
- call jump 000a
+ @jump 000a
dd0b # DB DD
illegal_1();
- call jump 000b
+ @jump 000b
dd0c # DB DD
illegal_1();
- call jump 000c
+ @jump 000c
dd0d # DB DD
illegal_1();
- call jump 000d
+ @jump 000d
dd0e # DB DD
illegal_1();
- call jump 000e
+ @jump 000e
dd0f # DB DD
illegal_1();
- call jump 000f
+ @jump 000f
dd10 # DB DD
illegal_1();
- call jump 0010
+ @jump 0010
dd11 # DB DD
illegal_1();
- call jump 0011
+ @jump 0011
dd12 # DB DD
illegal_1();
- call jump 0012
+ @jump 0012
dd13 # DB DD
illegal_1();
- call jump 0013
+ @jump 0013
dd14 # DB DD
illegal_1();
- call jump 0014
+ @jump 0014
dd15 # DB DD
illegal_1();
- call jump 0015
+ @jump 0015
dd16 # DB DD
illegal_1();
- call jump 0016
+ @jump 0016
dd17 # DB DD
illegal_1();
- call jump 0017
+ @jump 0017
dd18 # DB DD
illegal_1();
- call jump 0018
+ @jump 0018
dd19 # ADD IX,DE
- TDAT = IX; TDAT2 = DE;
- call add16
+ TDAT = IX;
+ TDAT2 = DE;
+ @add16
IX = TDAT;
dd1a # DB DD
illegal_1();
- call jump 001a
+ @jump 001a
dd1b # DB DD
illegal_1();
- call jump 001b
+ @jump 001b
dd1c # DB DD
illegal_1();
- call jump 001c
+ @jump 001c
dd1d # DB DD
illegal_1();
- call jump 001d
+ @jump 001d
dd1e # DB DD
illegal_1();
- call jump 001e
+ @jump 001e
dd1f # DB DD
illegal_1();
- call jump 001f
+ @jump 001f
dd20 # DB DD
illegal_1();
- call jump 0020
+ @jump 0020
dd21 # LD IX,w
- call arg16
+ @arg16
IX = TDAT;
dd22 # LD (w),IX
- call arg16
- m_ea = TDAT; TADR = m_ea; TDAT = IX;
- call wm16
+ @arg16
+ m_ea = TDAT;
+ TDAT = IX;
+ @wm16 m_ea
WZ = m_ea + 1;
dd23 # INC IX
- call nomreq_ir 2
+ @nomreq_ir 2
IX++;
dd24 # INC HX
@@ -3134,30 +3300,32 @@ dd25 # DEC HX
dec(HX);
dd26 # LD HX,n
- call arg
+ @arg
HX = TDAT8;
dd27 # DB DD
illegal_1();
- call jump 0027
+ @jump 0027
dd28 # DB DD
illegal_1();
- call jump 0028
+ @jump 0028
dd29 # ADD IX,IX
- TDAT = IX; TDAT2 = IX;
- call add16
+ TDAT = IX;
+ TDAT2 = IX;
+ @add16
IX = TDAT;
dd2a # LD IX,(w)
- call arg16
- m_ea = TDAT; TADR = m_ea;
- call rm16
- IX = TDAT; WZ = m_ea + 1;
+ @arg16
+ m_ea = TDAT;
+ @rm16 m_ea
+ IX = TDAT;
+ WZ = m_ea + 1;
dd2b # DEC IX
- call nomreq_ir 2
+ @nomreq_ir 2
IX--;
dd2c # INC LX
@@ -3167,107 +3335,102 @@ dd2d # DEC LX
dec(LX);
dd2e # LD LX,n
- call arg
+ @arg
LX = TDAT8;
dd2f # DB DD
illegal_1();
- call jump 002f
+ @jump 002f
dd30 # DB DD
illegal_1();
- call jump 0030
+ @jump 0030
dd31 # DB DD
illegal_1();
- call jump 0031
+ @jump 0031
dd32 # DB DD
illegal_1();
- call jump 0032
+ @jump 0032
dd33 # DB DD
illegal_1();
- call jump 0033
+ @jump 0033
dd34 # INC (IX+o)
- call eax
- TADR = PC-1;
- 5 * call nomreq_addr
- TADR = m_ea;
- call rm_reg
+ @eax
+ 5 * @nomreq_addr PC-1
+ @rm_reg m_ea
inc(TDAT8);
- call wm
+ @wm m_ea
dd35 # DEC (IX+o)
- call eax
- TADR = PC-1;
- 5 * call nomreq_addr
- TADR = m_ea;
- call rm_reg
+ @eax
+ 5 * @nomreq_addr PC-1
+ @rm_reg m_ea
dec(TDAT8);
- call wm
+ @wm m_ea
dd36 # LD (IX+o),n
- call eax
- call arg
- TADR = PC-1;
- 2 * call nomreq_addr
- TADR = m_ea;
- call wm
+ @eax
+ @arg
+ 2 * @nomreq_addr PC-1
+ @wm m_ea
dd37 # DB DD
illegal_1();
- call jump 0037
+ @jump 0037
dd38 # DB DD
illegal_1();
- call jump 0038
+ @jump 0038
dd39 # ADD IX,SP
- TDAT = IX; TDAT2 = SP;
- call add16
+ TDAT = IX;
+ TDAT2 = SP;
+ @add16
IX = TDAT;
dd3a # DB DD
illegal_1();
- call jump 003a
+ @jump 003a
dd3b # DB DD
illegal_1();
- call jump 003b
+ @jump 003b
dd3c # DB DD
illegal_1();
- call jump 003c
+ @jump 003c
dd3d # DB DD
illegal_1();
- call jump 003d
+ @jump 003d
dd3e # DB DD
illegal_1();
- call jump 003e
+ @jump 003e
dd3f # DB DD
illegal_1();
- call jump 003f
+ @jump 003f
dd40 # DB DD
illegal_1();
- call jump 0040
+ @jump 0040
dd41 # DB DD
illegal_1();
- call jump 0041
+ @jump 0041
dd42 # DB DD
illegal_1();
- call jump 0042
+ @jump 0042
dd43 # DB DD
illegal_1();
- call jump 0043
+ @jump 0043
dd44 # LD B,HX
B = HX;
@@ -3276,32 +3439,30 @@ dd45 # LD B,LX
B = LX;
dd46 # LD B,(IX+o)
- call eax
- TADR = PC-1;
- 5 * call nomreq_addr
- TADR = m_ea;
- call rm
+ @eax
+ 5 * @nomreq_addr PC-1
+ @rm m_ea
B = TDAT8;
dd47 # DB DD
illegal_1();
- call jump 0047
+ @jump 0047
dd48 # DB DD
illegal_1();
- call jump 0048
+ @jump 0048
dd49 # DB DD
illegal_1();
- call jump 0049
+ @jump 0049
dd4a # DB DD
illegal_1();
- call jump 004a
+ @jump 004a
dd4b # DB DD
illegal_1();
- call jump 004b
+ @jump 004b
dd4c # LD C,HX
C = HX;
@@ -3310,32 +3471,30 @@ dd4d # LD C,LX
C = LX;
dd4e # LD C,(IX+o)
- call eax
- TADR = PC-1;
- 5 * call nomreq_addr
- TADR = m_ea;
- call rm
+ @eax
+ 5 * @nomreq_addr PC-1
+ @rm m_ea
C = TDAT8;
dd4f # DB DD
illegal_1();
- call jump 004f
+ @jump 004f
dd50 # DB DD
illegal_1();
- call jump 0050
+ @jump 0050
dd51 # DB DD
illegal_1();
- call jump 0051
+ @jump 0051
dd52 # DB DD
illegal_1();
- call jump 0052
+ @jump 0052
dd53 # DB DD
illegal_1();
- call jump 0053
+ @jump 0053
dd54 # LD D,HX
D = HX;
@@ -3344,32 +3503,30 @@ dd55 # LD D,LX
D = LX;
dd56 # LD D,(IX+o)
- call eax
- TADR = PC-1;
- 5 * call nomreq_addr
- TADR = m_ea;
- call rm
+ @eax
+ 5 * @nomreq_addr PC-1
+ @rm m_ea
D = TDAT8;
dd57 # DB DD
illegal_1();
- call jump 0057
+ @jump 0057
dd58 # DB DD
illegal_1();
- call jump 0058
+ @jump 0058
dd59 # DB DD
illegal_1();
- call jump 0059
+ @jump 0059
dd5a # DB DD
illegal_1();
- call jump 005a
+ @jump 005a
dd5b # DB DD
illegal_1();
- call jump 005b
+ @jump 005b
dd5c # LD E,HX
E = HX;
@@ -3378,16 +3535,14 @@ dd5d # LD E,LX
E = LX;
dd5e # LD E,(IX+o)
- call eax
- TADR = PC-1;
- 5 * call nomreq_addr
- TADR = m_ea;
- call rm
+ @eax
+ 5 * @nomreq_addr PC-1
+ @rm m_ea
E = TDAT8;
dd5f # DB DD
illegal_1();
- call jump 005f
+ @jump 005f
dd60 # LD HX,B
HX = B;
@@ -3407,11 +3562,9 @@ dd65 # LD HX,LX
HX = LX;
dd66 # LD H,(IX+o)
- call eax
- TADR = PC-1;
- 5 * call nomreq_addr
- TADR = m_ea;
- call rm
+ @eax
+ 5 * @nomreq_addr PC-1
+ @rm m_ea
H = TDAT8;
dd67 # LD HX,A
@@ -3435,84 +3588,75 @@ dd6c # LD LX,HX
dd6d # LD LX,LX
dd6e # LD L,(IX+o)
- call eax
- TADR = PC-1;
- 5 * call nomreq_addr
- TADR = m_ea;
- call rm
+ @eax
+ 5 * @nomreq_addr PC-1
+ @rm m_ea
L = TDAT8;
dd6f # LD LX,A
LX = A;
dd70 # LD (IX+o),B
- call eax
- TADR = PC-1;
- 5 * call nomreq_addr
- TADR = m_ea; TDAT8 = B;
- call wm
+ @eax
+ 5 * @nomreq_addr PC-1
+ TDAT8 = B;
+ @wm m_ea
dd71 # LD (IX+o),C
- call eax
- TADR = PC-1;
- 5 * call nomreq_addr
- TADR = m_ea; TDAT8 = C;
- call wm
+ @eax
+ 5 * @nomreq_addr PC-1
+ TDAT8 = C;
+ @wm m_ea
dd72 # LD (IX+o),D
- call eax
- TADR = PC-1;
- 5 * call nomreq_addr
- TADR = m_ea; TDAT8 = D;
- call wm
+ @eax
+ 5 * @nomreq_addr PC-1
+ TDAT8 = D;
+ @wm m_ea
dd73 # LD (IX+o),E
- call eax
- TADR = PC-1;
- 5 * call nomreq_addr
- TADR = m_ea; TDAT8 = E;
- call wm
+ @eax
+ 5 * @nomreq_addr PC-1
+ TDAT8 = E;
+ @wm m_ea
dd74 # LD (IX+o),H
- call eax
- TADR = PC-1;
- 5 * call nomreq_addr
- TADR = m_ea; TDAT8 = H;
- call wm
+ @eax
+ 5 * @nomreq_addr PC-1
+ TDAT8 = H;
+ @wm m_ea
dd75 # LD (IX+o),L
- call eax
- TADR = PC-1;
- 5 * call nomreq_addr
- TADR = m_ea; TDAT8 = L;
- call wm
+ @eax
+ 5 * @nomreq_addr PC-1
+ TDAT8 = L;
+ @wm m_ea
dd76 # DB DD
illegal_1();
- call jump 0076
+ @jump 0076
dd77 # LD (IX+o),A
- call eax
- TADR = PC-1;
- 5 * call nomreq_addr
- TADR = m_ea; TDAT8 = A;
- call wm
+ @eax
+ 5 * @nomreq_addr PC-1
+ TDAT8 = A;
+ @wm m_ea
dd78 # DB DD
illegal_1();
- call jump 0078
+ @jump 0078
dd79 # DB DD
illegal_1();
- call jump 0079
+ @jump 0079
dd7a # DB DD
illegal_1();
- call jump 007a
+ @jump 007a
dd7b # DB DD
illegal_1();
- call jump 007b
+ @jump 007b
dd7c # LD A,HX
A = HX;
@@ -3521,32 +3665,30 @@ dd7d # LD A,LX
A = LX;
dd7e # LD A,(IX+o)
- call eax
- TADR = PC-1;
- 5 * call nomreq_addr
- TADR = m_ea;
- call rm
+ @eax
+ 5 * @nomreq_addr PC-1
+ @rm m_ea
A = TDAT8;
dd7f # DB DD
illegal_1();
- call jump 007f
+ @jump 007f
dd80 # DB DD
illegal_1();
- call jump 0080
+ @jump 0080
dd81 # DB DD
illegal_1();
- call jump 0081
+ @jump 0081
dd82 # DB DD
illegal_1();
- call jump 0082
+ @jump 0082
dd83 # DB DD
illegal_1();
- call jump 0083
+ @jump 0083
dd84 # ADD A,HX
add_a(HX);
@@ -3555,32 +3697,30 @@ dd85 # ADD A,LX
add_a(LX);
dd86 # ADD A,(IX+o)
- call eax
- TADR = PC-1;
- 5 * call nomreq_addr
- TADR = m_ea;
- call rm
+ @eax
+ 5 * @nomreq_addr PC-1
+ @rm m_ea
add_a(TDAT8);
dd87 # DB DD
illegal_1();
- call jump 0087
+ @jump 0087
dd88 # DB DD
illegal_1();
- call jump 0088
+ @jump 0088
dd89 # DB DD
illegal_1();
- call jump 0089
+ @jump 0089
dd8a # DB DD
illegal_1();
- call jump 008a
+ @jump 008a
dd8b # DB DD
illegal_1();
- call jump 008b
+ @jump 008b
dd8c # ADC A,HX
adc_a(HX);
@@ -3589,32 +3729,30 @@ dd8d # ADC A,LX
adc_a(LX);
dd8e # ADC A,(IX+o)
- call eax
- TADR = PC-1;
- 5 * call nomreq_addr
- TADR = m_ea;
- call rm
+ @eax
+ 5 * @nomreq_addr PC-1
+ @rm m_ea
adc_a(TDAT8);
dd8f # DB DD
illegal_1();
- call jump 008f
+ @jump 008f
dd90 # DB DD
illegal_1();
- call jump 0090
+ @jump 0090
dd91 # DB DD
illegal_1();
- call jump 0091
+ @jump 0091
dd92 # DB DD
illegal_1();
- call jump 0092
+ @jump 0092
dd93 # DB DD
illegal_1();
- call jump 0093
+ @jump 0093
dd94 # SUB HX
sub_a(HX);
@@ -3623,32 +3761,30 @@ dd95 # SUB LX
sub_a(LX);
dd96 # SUB (IX+o)
- call eax
- TADR = PC-1;
- 5 * call nomreq_addr
- TADR = m_ea;
- call rm
+ @eax
+ 5 * @nomreq_addr PC-1
+ @rm m_ea
sub_a(TDAT8);
dd97 # DB DD
illegal_1();
- call jump 0097
+ @jump 0097
dd98 # DB DD
illegal_1();
- call jump 0098
+ @jump 0098
dd99 # DB DD
illegal_1();
- call jump 0099
+ @jump 0099
dd9a # DB DD
illegal_1();
- call jump 009a
+ @jump 009a
dd9b # DB DD
illegal_1();
- call jump 009b
+ @jump 009b
dd9c # SBC A,HX
sbc_a(HX);
@@ -3657,32 +3793,30 @@ dd9d # SBC A,LX
sbc_a(LX);
dd9e # SBC A,(IX+o)
- call eax
- TADR = PC-1;
- 5 * call nomreq_addr
- TADR = m_ea;
- call rm
+ @eax
+ 5 * @nomreq_addr PC-1
+ @rm m_ea
sbc_a(TDAT8);
dd9f # DB DD
illegal_1();
- call jump 009f
+ @jump 009f
dda0 # DB DD
illegal_1();
- call jump 00a0
+ @jump 00a0
dda1 # DB DD
illegal_1();
- call jump 00a1
+ @jump 00a1
dda2 # DB DD
illegal_1();
- call jump 00a2
+ @jump 00a2
dda3 # DB DD
illegal_1();
- call jump 00a3
+ @jump 00a3
dda4 # AND HX
and_a(HX);
@@ -3691,32 +3825,30 @@ dda5 # AND LX
and_a(LX);
dda6 # AND (IX+o)
- call eax
- TADR = PC-1;
- 5 * call nomreq_addr
- TADR = m_ea;
- call rm
+ @eax
+ 5 * @nomreq_addr PC-1
+ @rm m_ea
and_a(TDAT8);
dda7 # DB DD
illegal_1();
- call jump 00a7
+ @jump 00a7
dda8 # DB DD
illegal_1();
- call jump 00a8
+ @jump 00a8
dda9 # DB DD
illegal_1();
- call jump 00a9
+ @jump 00a9
ddaa # DB DD
illegal_1();
- call jump 00aa
+ @jump 00aa
ddab # DB DD
illegal_1();
- call jump 00ab
+ @jump 00ab
ddac # XOR HX
xor_a(HX);
@@ -3725,32 +3857,30 @@ ddad # XOR LX
xor_a(LX);
ddae # XOR (IX+o)
- call eax
- TADR = PC-1;
- 5 * call nomreq_addr
- TADR = m_ea;
- call rm
+ @eax
+ 5 * @nomreq_addr PC-1
+ @rm m_ea
xor_a(TDAT8);
ddaf # DB DD
illegal_1();
- call jump 00af
+ @jump 00af
ddb0 # DB DD
illegal_1();
- call jump 00b0
+ @jump 00b0
ddb1 # DB DD
illegal_1();
- call jump 00b1
+ @jump 00b1
ddb2 # DB DD
illegal_1();
- call jump 00b2
+ @jump 00b2
ddb3 # DB DD
illegal_1();
- call jump 00b3
+ @jump 00b3
ddb4 # OR HX
or_a(HX);
@@ -3759,32 +3889,30 @@ ddb5 # OR LX
or_a(LX);
ddb6 # OR (IX+o)
- call eax
- TADR = PC-1;
- 5 * call nomreq_addr
- TADR = m_ea;
- call rm
+ @eax
+ 5 * @nomreq_addr PC-1
+ @rm m_ea
or_a(TDAT8);
ddb7 # DB DD
illegal_1();
- call jump 00b7
+ @jump 00b7
ddb8 # DB DD
illegal_1();
- call jump 00b8
+ @jump 00b8
ddb9 # DB DD
illegal_1();
- call jump 00b9
+ @jump 00b9
ddba # DB DD
illegal_1();
- call jump 00ba
+ @jump 00ba
ddbb # DB DD
illegal_1();
- call jump 00bb
+ @jump 00bb
ddbc # CP HX
cp(HX);
@@ -3793,275 +3921,269 @@ ddbd # CP LX
cp(LX);
ddbe # CP (IX+o)
- call eax
- TADR = PC-1;
- 5 * call nomreq_addr
- TADR = m_ea;
- call rm
+ @eax
+ 5 * @nomreq_addr PC-1
+ @rm m_ea
cp(TDAT8);
ddbf # DB DD
illegal_1();
- call jump 00bf
+ @jump 00bf
ddc0 # DB DD
illegal_1();
- call jump 00c0
+ @jump 00c0
ddc1 # DB DD
illegal_1();
- call jump 00c1
+ @jump 00c1
ddc2 # DB DD
illegal_1();
- call jump 00c2
+ @jump 00c2
ddc3 # DB DD
illegal_1();
- call jump 00c3
+ @jump 00c3
ddc4 # DB DD
illegal_1();
- call jump 00c4
+ @jump 00c4
ddc5 # DB DD
illegal_1();
- call jump 00c5
+ @jump 00c5
ddc6 # DB DD
illegal_1();
- call jump 00c6
+ @jump 00c6
ddc7 # DB DD
illegal_1();
- call jump 00c7
+ @jump 00c7
ddc8 # DB DD
illegal_1();
- call jump 00c8
+ @jump 00c8
ddc9 # DB DD
illegal_1();
- call jump 00c9
+ @jump 00c9
ddca # DB DD
illegal_1();
- call jump 00ca
+ @jump 00ca
ddcb # ** DD CB xx
- call eax
- call arg
- TADR = PC-1;
- 2 * call nomreq_addr
- call jump_prefixed 0xfe
+ @eax
+ @arg
+ 2 * @nomreq_addr PC-1
+ @jump_prefixed 0xfe
ddcc # DB DD
illegal_1();
- call jump 00cc
+ @jump 00cc
ddcd # DB DD
illegal_1();
- call jump 00cd
+ @jump 00cd
ddce # DB DD
illegal_1();
- call jump 00ce
+ @jump 00ce
ddcf # DB DD
illegal_1();
- call jump 00cf
+ @jump 00cf
ddd0 # DB DD
illegal_1();
- call jump 00d0
+ @jump 00d0
ddd1 # DB DD
illegal_1();
- call jump 00d1
+ @jump 00d1
ddd2 # DB DD
illegal_1();
- call jump 00d2
+ @jump 00d2
ddd3 # DB DD
illegal_1();
- call jump 00d3
+ @jump 00d3
ddd4 # DB DD
illegal_1();
- call jump 00d4
+ @jump 00d4
ddd5 # DB DD
illegal_1();
- call jump 00d5
+ @jump 00d5
ddd6 # DB DD
illegal_1();
- call jump 00d6
+ @jump 00d6
ddd7 # DB DD
illegal_1();
- call jump 00d7
+ @jump 00d7
ddd8 # DB DD
illegal_1();
- call jump 00d8
+ @jump 00d8
ddd9 # DB DD
illegal_1();
- call jump 00d9
+ @jump 00d9
ddda # DB DD
illegal_1();
- call jump 00da
+ @jump 00da
dddb # DB DD
illegal_1();
- call jump 00db
+ @jump 00db
dddc # DB DD
illegal_1();
- call jump 00dc
+ @jump 00dc
dddd # DB DD
illegal_1();
- call jump 00dd
+ @jump 00dd
ddde # DB DD
illegal_1();
- call jump 00de
+ @jump 00de
dddf # DB DD
illegal_1();
- call jump 00df
+ @jump 00df
dde0 # DB DD
illegal_1();
- call jump 00e0
+ @jump 00e0
dde1 # POP IX
- call pop
+ @pop
IX = TDAT;
dde2 # DB DD
illegal_1();
- call jump 00e2
+ @jump 00e2
dde3 # EX (SP),IX
- TDAT = IX;
- call ex_sp
- IX = TDAT;
+ @ex_sp IX
dde4 # DB DD
illegal_1();
- call jump 00e4
+ @jump 00e4
dde5 # PUSH IX
- TDAT = IX;
- call push
+ @push IX
dde6 # DB DD
illegal_1();
- call jump 00e6
+ @jump 00e6
dde7 # DB DD
illegal_1();
- call jump 00e7
+ @jump 00e7
dde8 # DB DD
illegal_1();
- call jump 00e8
+ @jump 00e8
dde9 # JP (IX)
PC = IX;
ddea # DB DD
illegal_1();
- call jump 00ea
+ @jump 00ea
ddeb # DB DD
illegal_1();
- call jump 00eb
+ @jump 00eb
ddec # DB DD
illegal_1();
- call jump 00ec
+ @jump 00ec
dded # DB DD
illegal_1();
- call jump 00ed
+ @jump 00ed
ddee # DB DD
illegal_1();
- call jump 00ee
+ @jump 00ee
ddef # DB DD
illegal_1();
- call jump 00ef
+ @jump 00ef
ddf0 # DB DD
illegal_1();
- call jump 00f0
+ @jump 00f0
ddf1 # DB DD
illegal_1();
- call jump 00f1
+ @jump 00f1
ddf2 # DB DD
illegal_1();
- call jump 00f2
+ @jump 00f2
ddf3 # DB DD
illegal_1();
- call jump 00f3
+ @jump 00f3
ddf4 # DB DD
illegal_1();
- call jump 00f4
+ @jump 00f4
ddf5 # DB DD
illegal_1();
- call jump 00f5
+ @jump 00f5
ddf6 # DB DD
illegal_1();
- call jump 00f6
+ @jump 00f6
ddf7 # DB DD
illegal_1();
- call jump 00f7
+ @jump 00f7
ddf8 # DB DD
illegal_1();
- call jump 00f8
+ @jump 00f8
ddf9 # LD SP,IX
- call nomreq_ir 2
+ @nomreq_ir 2
SP = IX;
ddfa # DB DD
illegal_1();
- call jump 00fa
+ @jump 00fa
ddfb # DB DD
illegal_1();
- call jump 00fb
+ @jump 00fb
ddfc # DB DD
illegal_1();
- call jump 00fc
+ @jump 00fc
ddfd # DB DD
illegal_1();
- call jump 00fd
+ @jump 00fd
ddfe # DB DD
illegal_1();
- call jump 00fe
+ @jump 00fe
ddff # DB DD
illegal_1();
- call jump 00ff
+ @jump 00ff
##########################################################
@@ -4069,150 +4191,153 @@ ddff # DB DD
##########################################################
fd00 # DB FD
illegal_1();
- call jump 0000
+ @jump 0000
fd01 # DB FD
illegal_1();
- call jump 0001
+ @jump 0001
fd02 # DB FD
illegal_1();
- call jump 0002
+ @jump 0002
fd03 # DB FD
illegal_1();
- call jump 0003
+ @jump 0003
fd04 # DB FD
illegal_1();
- call jump 0004
+ @jump 0004
fd05 # DB FD
illegal_1();
- call jump 0005
+ @jump 0005
fd06 # DB FD
illegal_1();
- call jump 0006
+ @jump 0006
fd07 # DB FD
illegal_1();
- call jump 0007
+ @jump 0007
fd08 # DB FD
illegal_1();
- call jump 0008
+ @jump 0008
fd09 # ADD IY,BC
- TDAT = IY; TDAT2 = BC;
- call add16
+ TDAT = IY;
+ TDAT2 = BC;
+ @add16
IY = TDAT;
fd0a # DB FD
illegal_1();
- call jump 000a
+ @jump 000a
fd0b # DB FD
illegal_1();
- call jump 000b
+ @jump 000b
fd0c # DB FD
illegal_1();
- call jump 000c
+ @jump 000c
fd0d # DB FD
illegal_1();
- call jump 000d
+ @jump 000d
fd0e # DB FD
illegal_1();
- call jump 000e
+ @jump 000e
fd0f # DB FD
illegal_1();
- call jump 000f
+ @jump 000f
fd10 # DB FD
illegal_1();
- call jump 0010
+ @jump 0010
fd11 # DB FD
illegal_1();
- call jump 0011
+ @jump 0011
fd12 # DB FD
illegal_1();
- call jump 0012
+ @jump 0012
fd13 # DB FD
illegal_1();
- call jump 0013
+ @jump 0013
fd14 # DB FD
illegal_1();
- call jump 0014
+ @jump 0014
fd15 # DB FD
illegal_1();
- call jump 0015
+ @jump 0015
fd16 # DB FD
illegal_1();
- call jump 0016
+ @jump 0016
fd17 # DB FD
illegal_1();
- call jump 0017
+ @jump 0017
fd18 # DB FD
illegal_1();
- call jump 0018
+ @jump 0018
fd19 # ADD IY,DE
- TDAT = IY; TDAT2 = DE;
- call add16
+ TDAT = IY;
+ TDAT2 = DE;
+ @add16
IY = TDAT;
fd1a # DB FD
illegal_1();
- call jump 001a
+ @jump 001a
fd1b # DB FD
illegal_1();
- call jump 001b
+ @jump 001b
fd1c # DB FD
illegal_1();
- call jump 001c
+ @jump 001c
fd1d # DB FD
illegal_1();
- call jump 001d
+ @jump 001d
fd1e # DB FD
illegal_1();
- call jump 001e
+ @jump 001e
fd1f # DB FD
illegal_1();
- call jump 001f
+ @jump 001f
fd20 # DB FD
illegal_1();
- call jump 0020
+ @jump 0020
fd21 # LD IY,w
- call arg16
+ @arg16
IY = TDAT;
fd22 # LD (w),IY
- call arg16
- m_ea = TDAT; TADR = m_ea; TDAT = IY;
- call wm16
+ @arg16
+ m_ea = TDAT;
+ TDAT = IY;
+ @wm16 m_ea
WZ = m_ea + 1;
fd23 # INC IY
- call nomreq_ir 2
+ @nomreq_ir 2
IY++;
fd24 # INC HY
@@ -4222,30 +4347,32 @@ fd25 # DEC HY
dec(HY);
fd26 # LD HY,n
- call arg
+ @arg
HY = TDAT8;
fd27 # DB FD
illegal_1();
- call jump 0027
+ @jump 0027
fd28 # DB FD
illegal_1();
- call jump 0028
+ @jump 0028
fd29 # ADD IY,IY
- TDAT = IY; TDAT2 = IY;
- call add16
+ TDAT = IY;
+ TDAT2 = IY;
+ @add16
IY = TDAT;
fd2a # LD IY,(w)
- call arg16
- m_ea = TDAT; TADR = m_ea;
- call rm16
- IY = TDAT; WZ = m_ea + 1;
+ @arg16
+ m_ea = TDAT;
+ @rm16 m_ea
+ IY = TDAT;
+ WZ = m_ea + 1;
fd2b # DEC IY
- call nomreq_ir 2
+ @nomreq_ir 2
IY--;
fd2c # INC LY
@@ -4255,107 +4382,102 @@ fd2d # DEC LY
dec(LY);
fd2e # LD LY,n
- call arg
+ @arg
LY = TDAT8;
fd2f # DB FD
illegal_1();
- call jump 002f
+ @jump 002f
fd30 # DB FD
illegal_1();
- call jump 0030
+ @jump 0030
fd31 # DB FD
illegal_1();
- call jump 0031
+ @jump 0031
fd32 # DB FD
illegal_1();
- call jump 0032
+ @jump 0032
fd33 # DB FD
illegal_1();
- call jump 0033
+ @jump 0033
fd34 # INC (IY+o)
- call eay
- TADR = PC-1;
- 5 * call nomreq_addr
- TADR = m_ea;
- call rm_reg
+ @eay
+ 5 * @nomreq_addr PC-1
+ @rm_reg m_ea
inc(TDAT8);
- call wm
+ @wm m_ea
fd35 # DEC (IY+o)
- call eay
- TADR = PC-1;
- 5 * call nomreq_addr
- TADR = m_ea;
- call rm_reg
+ @eay
+ 5 * @nomreq_addr PC-1
+ @rm_reg m_ea
dec(TDAT8);
- call wm
+ @wm m_ea
fd36 # LD (IY+o),n
- call eay
- call arg
- TADR = PC-1;
- 2 * call nomreq_addr
- TADR = m_ea;
- call wm
+ @eay
+ @arg
+ 2 * @nomreq_addr PC-1
+ @wm m_ea
fd37 # DB FD
illegal_1();
- call jump 0037
+ @jump 0037
fd38 # DB FD
illegal_1();
- call jump 0038
+ @jump 0038
fd39 # ADD IY,SP
- TDAT = IY; TDAT2 = SP;
- call add16
+ TDAT = IY;
+ TDAT2 = SP;
+ @add16
IY = TDAT;
fd3a # DB FD
illegal_1();
- call jump 003a
+ @jump 003a
fd3b # DB FD
illegal_1();
- call jump 003b
+ @jump 003b
fd3c # DB FD
illegal_1();
- call jump 003c
+ @jump 003c
fd3d # DB FD
illegal_1();
- call jump 003d
+ @jump 003d
fd3e # DB FD
illegal_1();
- call jump 003e
+ @jump 003e
fd3f # DB FD
illegal_1();
- call jump 003f
+ @jump 003f
fd40 # DB FD
illegal_1();
- call jump 0040
+ @jump 0040
fd41 # DB FD
illegal_1();
- call jump 0041
+ @jump 0041
fd42 # DB FD
illegal_1();
- call jump 0042
+ @jump 0042
fd43 # DB FD
illegal_1();
- call jump 0043
+ @jump 0043
fd44 # LD B,HY
B = HY;
@@ -4364,32 +4486,30 @@ fd45 # LD B,LY
B = LY;
fd46 # LD B,(IY+o)
- call eay
- TADR = PC-1;
- 5 * call nomreq_addr
- TADR = m_ea;
- call rm
+ @eay
+ 5 * @nomreq_addr PC-1
+ @rm m_ea
B = TDAT8;
fd47 # DB FD
illegal_1();
- call jump 0047
+ @jump 0047
fd48 # DB FD
illegal_1();
- call jump 0048
+ @jump 0048
fd49 # DB FD
illegal_1();
- call jump 0049
+ @jump 0049
fd4a # DB FD
illegal_1();
- call jump 004a
+ @jump 004a
fd4b # DB FD
illegal_1();
- call jump 004b
+ @jump 004b
fd4c # LD C,HY
C = HY;
@@ -4398,32 +4518,30 @@ fd4d # LD C,LY
C = LY;
fd4e # LD C,(IY+o)
- call eay
- TADR = PC-1;
- 5 * call nomreq_addr
- TADR = m_ea;
- call rm
+ @eay
+ 5 * @nomreq_addr PC-1
+ @rm m_ea
C = TDAT8;
fd4f # DB FD
illegal_1();
- call jump 004f
+ @jump 004f
fd50 # DB FD
illegal_1();
- call jump 0050
+ @jump 0050
fd51 # DB FD
illegal_1();
- call jump 0051
+ @jump 0051
fd52 # DB FD
illegal_1();
- call jump 0052
+ @jump 0052
fd53 # DB FD
illegal_1();
- call jump 0053
+ @jump 0053
fd54 # LD D,HY
D = HY;
@@ -4432,32 +4550,30 @@ fd55 # LD D,LY
D = LY;
fd56 # LD D,(IY+o)
- call eay
- TADR = PC-1;
- 5 * call nomreq_addr
- TADR = m_ea;
- call rm
+ @eay
+ 5 * @nomreq_addr PC-1
+ @rm m_ea
D = TDAT8;
fd57 # DB FD
illegal_1();
- call jump 0057
+ @jump 0057
fd58 # DB FD
illegal_1();
- call jump 0058
+ @jump 0058
fd59 # DB FD
illegal_1();
- call jump 0059
+ @jump 0059
fd5a # DB FD
illegal_1();
- call jump 005a
+ @jump 005a
fd5b # DB FD
illegal_1();
- call jump 005b
+ @jump 005b
fd5c # LD E,HY
E = HY;
@@ -4466,16 +4582,14 @@ fd5d # LD E,LY
E = LY;
fd5e # LD E,(IY+o)
- call eay
- TADR = PC-1;
- 5 * call nomreq_addr
- TADR = m_ea;
- call rm
+ @eay
+ 5 * @nomreq_addr PC-1
+ @rm m_ea
E = TDAT8;
fd5f # DB FD
illegal_1();
- call jump 005f
+ @jump 005f
fd60 # LD HY,B
HY = B;
@@ -4495,11 +4609,9 @@ fd65 # LD HY,LY
HY = LY;
fd66 # LD H,(IY+o)
- call eay
- TADR = PC-1;
- 5 * call nomreq_addr
- TADR = m_ea;
- call rm
+ @eay
+ 5 * @nomreq_addr PC-1
+ @rm m_ea
H = TDAT8;
fd67 # LD HY,A
@@ -4523,84 +4635,75 @@ fd6c # LD LY,HY
fd6d # LD LY,LY
fd6e # LD L,(IY+o)
- call eay
- TADR = PC-1;
- 5 * call nomreq_addr
- TADR = m_ea;
- call rm
+ @eay
+ 5 * @nomreq_addr PC-1
+ @rm m_ea
L = TDAT8;
fd6f # LD LY,A
LY = A;
fd70 # LD (IY+o),B
- call eay
- TADR = PC-1;
- 5 * call nomreq_addr
- TADR = m_ea; TDAT8 = B;
- call wm
+ @eay
+ 5 * @nomreq_addr PC-1
+ TDAT8 = B;
+ @wm m_ea
fd71 # LD (IY+o),C
- call eay
- TADR = PC-1;
- 5 * call nomreq_addr
- TADR = m_ea; TDAT8 = C;
- call wm
+ @eay
+ 5 * @nomreq_addr PC-1
+ TDAT8 = C;
+ @wm m_ea
fd72 # LD (IY+o),D
- call eay
- TADR = PC-1;
- 5 * call nomreq_addr
- TADR = m_ea; TDAT8 = D;
- call wm
+ @eay
+ 5 * @nomreq_addr PC-1
+ TDAT8 = D;
+ @wm m_ea
fd73 # LD (IY+o),E
- call eay
- TADR = PC-1;
- 5 * call nomreq_addr
- TADR = m_ea; TDAT8 = E;
- call wm
+ @eay
+ 5 * @nomreq_addr PC-1
+ TDAT8 = E;
+ @wm m_ea
fd74 # LD (IY+o),H
- call eay
- TADR = PC-1;
- 5 * call nomreq_addr
- TADR = m_ea; TDAT8 = H;
- call wm
+ @eay
+ 5 * @nomreq_addr PC-1
+ TDAT8 = H;
+ @wm m_ea
fd75 # LD (IY+o),L
- call eay
- TADR = PC-1;
- 5 * call nomreq_addr
- TADR = m_ea; TDAT8 = L;
- call wm
+ @eay
+ 5 * @nomreq_addr PC-1
+ TDAT8 = L;
+ @wm m_ea
fd76 # DB FD
illegal_1();
- call jump 0076
+ @jump 0076
fd77 # LD (IY+o),A
- call eay
- TADR = PC-1;
- 5 * call nomreq_addr
- TADR = m_ea; TDAT8 = A;
- call wm
+ @eay
+ 5 * @nomreq_addr PC-1
+ TDAT8 = A;
+ @wm m_ea
fd78 # DB FD
illegal_1();
- call jump 0078
+ @jump 0078
fd79 # DB FD
illegal_1();
- call jump 0079
+ @jump 0079
fd7a # DB FD
illegal_1();
- call jump 007a
+ @jump 007a
fd7b # DB FD
illegal_1();
- call jump 007b
+ @jump 007b
fd7c # LD A,HY
A = HY;
@@ -4609,32 +4712,30 @@ fd7d # LD A,LY
A = LY;
fd7e # LD A,(IY+o)
- call eay
- TADR = PC-1;
- 5 * call nomreq_addr
- TADR = m_ea;
- call rm
+ @eay
+ 5 * @nomreq_addr PC-1
+ @rm m_ea
A = TDAT8;
fd7f # DB FD
illegal_1();
- call jump 007f
+ @jump 007f
fd80 # DB FD
illegal_1();
- call jump 0080
+ @jump 0080
fd81 # DB FD
illegal_1();
- call jump 0081
+ @jump 0081
fd82 # DB FD
illegal_1();
- call jump 0082
+ @jump 0082
fd83 # DB FD
illegal_1();
- call jump 0083
+ @jump 0083
fd84 # ADD A,HY
add_a(HY);
@@ -4643,32 +4744,30 @@ fd85 # ADD A,LY
add_a(LY);
fd86 # ADD A,(IY+o)
- call eay
- TADR = PC-1;
- 5 * call nomreq_addr
- TADR = m_ea;
- call rm
+ @eay
+ 5 * @nomreq_addr PC-1
+ @rm m_ea
add_a(TDAT8);
fd87 # DB FD
illegal_1();
- call jump 0087
+ @jump 0087
fd88 # DB FD
illegal_1();
- call jump 0088
+ @jump 0088
fd89 # DB FD
illegal_1();
- call jump 0089
+ @jump 0089
fd8a # DB FD
illegal_1();
- call jump 008a
+ @jump 008a
fd8b # DB FD
illegal_1();
- call jump 008b
+ @jump 008b
fd8c # ADC A,HY
adc_a(HY);
@@ -4677,32 +4776,30 @@ fd8d # ADC A,LY
adc_a(LY);
fd8e # ADC A,(IY+o)
- call eay
- TADR = PC-1;
- 5 * call nomreq_addr
- TADR = m_ea;
- call rm
+ @eay
+ 5 * @nomreq_addr PC-1
+ @rm m_ea
adc_a(TDAT8);
fd8f # DB FD
illegal_1();
- call jump 008f
+ @jump 008f
fd90 # DB FD
illegal_1();
- call jump 0090
+ @jump 0090
fd91 # DB FD
illegal_1();
- call jump 0091
+ @jump 0091
fd92 # DB FD
illegal_1();
- call jump 0092
+ @jump 0092
fd93 # DB FD
illegal_1();
- call jump 0093
+ @jump 0093
fd94 # SUB HY
sub_a(HY);
@@ -4711,32 +4808,30 @@ fd95 # SUB LY
sub_a(LY);
fd96 # SUB (IY+o)
- call eay
- TADR = PC-1;
- 5 * call nomreq_addr
- TADR = m_ea;
- call rm
+ @eay
+ 5 * @nomreq_addr PC-1
+ @rm m_ea
sub_a(TDAT8);
fd97 # DB FD
illegal_1();
- call jump 0097
+ @jump 0097
fd98 # DB FD
illegal_1();
- call jump 0098
+ @jump 0098
fd99 # DB FD
illegal_1();
- call jump 0099
+ @jump 0099
fd9a # DB FD
illegal_1();
- call jump 009a
+ @jump 009a
fd9b # DB FD
illegal_1();
- call jump 009b
+ @jump 009b
fd9c # SBC A,HY
sbc_a(HY);
@@ -4745,32 +4840,30 @@ fd9d # SBC A,LY
sbc_a(LY);
fd9e # SBC A,(IY+o)
- call eay
- TADR = PC-1;
- 5 * call nomreq_addr
- TADR = m_ea;
- call rm
+ @eay
+ 5 * @nomreq_addr PC-1
+ @rm m_ea
sbc_a(TDAT8);
fd9f # DB FD
illegal_1();
- call jump 009f
+ @jump 009f
fda0 # DB FD
illegal_1();
- call jump 00a0
+ @jump 00a0
fda1 # DB FD
illegal_1();
- call jump 00a1
+ @jump 00a1
fda2 # DB FD
illegal_1();
- call jump 00a2
+ @jump 00a2
fda3 # DB FD
illegal_1();
- call jump 00a3
+ @jump 00a3
fda4 # AND HY
and_a(HY);
@@ -4779,32 +4872,30 @@ fda5 # AND LY
and_a(LY);
fda6 # AND (IY+o)
- call eay
- TADR = PC-1;
- 5 * call nomreq_addr
- TADR = m_ea;
- call rm
+ @eay
+ 5 * @nomreq_addr PC-1
+ @rm m_ea
and_a(TDAT8);
fda7 # DB FD
illegal_1();
- call jump 00a7
+ @jump 00a7
fda8 # DB FD
illegal_1();
- call jump 00a8
+ @jump 00a8
fda9 # DB FD
illegal_1();
- call jump 00a9
+ @jump 00a9
fdaa # DB FD
illegal_1();
- call jump 00aa
+ @jump 00aa
fdab # DB FD
illegal_1();
- call jump 00ab
+ @jump 00ab
fdac # XOR HY
xor_a(HY);
@@ -4813,32 +4904,30 @@ fdad # XOR LY
xor_a(LY);
fdae # XOR (IY+o)
- call eay
- TADR = PC-1;
- 5 * call nomreq_addr
- TADR = m_ea;
- call rm
+ @eay
+ 5 * @nomreq_addr PC-1
+ @rm m_ea
xor_a(TDAT8);
fdaf # DB FD
illegal_1();
- call jump 00af
+ @jump 00af
fdb0 # DB FD
illegal_1();
- call jump 00b0
+ @jump 00b0
fdb1 # DB FD
illegal_1();
- call jump 00b1
+ @jump 00b1
fdb2 # DB FD
illegal_1();
- call jump 00b2
+ @jump 00b2
fdb3 # DB FD
illegal_1();
- call jump 00b3
+ @jump 00b3
fdb4 # OR HY
or_a(HY);
@@ -4847,32 +4936,30 @@ fdb5 # OR LY
or_a(LY);
fdb6 # OR (IY+o)
- call eay
- TADR = PC-1;
- 5 * call nomreq_addr
- TADR = m_ea;
- call rm
+ @eay
+ 5 * @nomreq_addr PC-1
+ @rm m_ea
or_a(TDAT8);
fdb7 # DB FD
illegal_1();
- call jump 00b7
+ @jump 00b7
fdb8 # DB FD
illegal_1();
- call jump 00b8
+ @jump 00b8
fdb9 # DB FD
illegal_1();
- call jump 00b9
+ @jump 00b9
fdba # DB FD
illegal_1();
- call jump 00ba
+ @jump 00ba
fdbb # DB FD
illegal_1();
- call jump 00bb
+ @jump 00bb
fdbc # CP HY
cp(HY);
@@ -4881,275 +4968,269 @@ fdbd # CP LY
cp(LY);
fdbe # CP (IY+o)
- call eay
- TADR = PC-1;
- 5 * call nomreq_addr
- TADR = m_ea;
- call rm
+ @eay
+ 5 * @nomreq_addr PC-1
+ @rm m_ea
cp(TDAT8);
fdbf # DB FD
illegal_1();
- call jump 00bf
+ @jump 00bf
fdc0 # DB FD
illegal_1();
- call jump 00c0
+ @jump 00c0
fdc1 # DB FD
illegal_1();
- call jump 00c1
+ @jump 00c1
fdc2 # DB FD
illegal_1();
- call jump 00c2
+ @jump 00c2
fdc3 # DB FD
illegal_1();
- call jump 00c3
+ @jump 00c3
fdc4 # DB FD
illegal_1();
- call jump 00c4
+ @jump 00c4
fdc5 # DB FD
illegal_1();
- call jump 00c5
+ @jump 00c5
fdc6 # DB FD
illegal_1();
- call jump 00c6
+ @jump 00c6
fdc7 # DB FD
illegal_1();
- call jump 00c7
+ @jump 00c7
fdc8 # DB FD
illegal_1();
- call jump 00c8
+ @jump 00c8
fdc9 # DB FD
illegal_1();
- call jump 00c9
+ @jump 00c9
fdca # DB FD
illegal_1();
- call jump 00ca
+ @jump 00ca
fdcb # ** FD CB xx
- call eay
- call arg
- TADR = PC-1;
- 2 * call nomreq_addr
- call jump_prefixed 0xfe
+ @eay
+ @arg
+ 2 * @nomreq_addr PC-1
+ @jump_prefixed 0xfe
fdcc # DB FD
illegal_1();
- call jump 00cc
+ @jump 00cc
fdcd # DB FD
illegal_1();
- call jump 00cd
+ @jump 00cd
fdce # DB FD
illegal_1();
- call jump 00ce
+ @jump 00ce
fdcf # DB FD
illegal_1();
- call jump 00cf
+ @jump 00cf
fdd0 # DB FD
illegal_1();
- call jump 00d0
+ @jump 00d0
fdd1 # DB FD
illegal_1();
- call jump 00d1
+ @jump 00d1
fdd2 # DB FD
illegal_1();
- call jump 00d2
+ @jump 00d2
fdd3 # DB FD
illegal_1();
- call jump 00d3
+ @jump 00d3
fdd4 # DB FD
illegal_1();
- call jump 00d4
+ @jump 00d4
fdd5 # DB FD
illegal_1();
- call jump 00d5
+ @jump 00d5
fdd6 # DB FD
illegal_1();
- call jump 00d6
+ @jump 00d6
fdd7 # DB FD
illegal_1();
- call jump 00d7
+ @jump 00d7
fdd8 # DB FD
illegal_1();
- call jump 00d8
+ @jump 00d8
fdd9 # DB FD
illegal_1();
- call jump 00d9
+ @jump 00d9
fdda # DB FD
illegal_1();
- call jump 00da
+ @jump 00da
fddb # DB FD
illegal_1();
- call jump 00db
+ @jump 00db
fddc # DB FD
illegal_1();
- call jump 00dc
+ @jump 00dc
fddd # DB FD
illegal_1();
- call jump 00dd
+ @jump 00dd
fdde # DB FD
illegal_1();
- call jump 00de
+ @jump 00de
fddf # DB FD
illegal_1();
- call jump 00df
+ @jump 00df
fde0 # DB FD
illegal_1();
- call jump 00e0
+ @jump 00e0
fde1 # POP IY
- call pop
+ @pop
IY = TDAT;
fde2 # DB FD
illegal_1();
- call jump 00e2
+ @jump 00e2
fde3 # EX (SP),IY
- TDAT = IY;
- call ex_sp
- IY = TDAT;
+ @ex_sp IY
fde4 # DB FD
illegal_1();
- call jump 00e4
+ @jump 00e4
fde5 # PUSH IY
- TDAT = IY;
- call push
+ @push IY
fde6 # DB FD
illegal_1();
- call jump 00e6
+ @jump 00e6
fde7 # DB FD
illegal_1();
- call jump 00e7
+ @jump 00e7
fde8 # DB FD
illegal_1();
- call jump 00e8
+ @jump 00e8
fde9 # JP (IY)
PC = IY;
fdea # DB FD
illegal_1();
- call jump 00ea
+ @jump 00ea
fdeb # DB FD
illegal_1();
- call jump 00eb
+ @jump 00eb
fdec # DB FD
illegal_1();
- call jump 00ec
+ @jump 00ec
fded # DB FD
illegal_1();
- call jump 00ed
+ @jump 00ed
fdee # DB FD
illegal_1();
- call jump 00ee
+ @jump 00ee
fdef # DB FD
illegal_1();
- call jump 00ef
+ @jump 00ef
fdf0 # DB FD
illegal_1();
- call jump 00f0
+ @jump 00f0
fdf1 # DB FD
illegal_1();
- call jump 00f1
+ @jump 00f1
fdf2 # DB FD
illegal_1();
- call jump 00f2
+ @jump 00f2
fdf3 # DB FD
illegal_1();
- call jump 00f3
+ @jump 00f3
fdf4 # DB FD
illegal_1();
- call jump 00f4
+ @jump 00f4
fdf5 # DB FD
illegal_1();
- call jump 00f5
+ @jump 00f5
fdf6 # DB FD
illegal_1();
- call jump 00f6
+ @jump 00f6
fdf7 # DB FD
illegal_1();
- call jump 00f7
+ @jump 00f7
fdf8 # DB FD
illegal_1();
- call jump 00f8
+ @jump 00f8
fdf9 # LD SP,IY
- call nomreq_ir 2
+ @nomreq_ir 2
SP = IY;
fdfa # DB FD
illegal_1();
- call jump 00fa
+ @jump 00fa
fdfb # DB FD
illegal_1();
- call jump 00fb
+ @jump 00fb
fdfc # DB FD
illegal_1();
- call jump 00fc
+ @jump 00fc
fdfd # DB FD
illegal_1();
- call jump 00fd
+ @jump 00fd
fdfe # DB FD
illegal_1();
- call jump 00fe
+ @jump 00fe
fdff # DB FD
illegal_1();
- call jump 00ff
+ @jump 00ff
##########################################################
@@ -5348,222 +5429,235 @@ ed3f # DB ED
illegal_2();
ed40 # IN B,(C)
- TADR = BC;
- call in
- B = TDAT8; set_f((F & CF) | SZP[B]); WZ = TADR + 1;
+ @in BC
+ B = TDAT8;
+ set_f((F & CF) | SZP[B]);
+ WZ = BC + 1;
ed41 # OUT (C),B
- TADR = BC; TDAT8 = B;
- call out
- WZ = TADR + 1;
+ TDAT8 = B;
+ @out BC
+ WZ = BC + 1;
ed42 # SBC HL,BC
TDAT = BC;
- call sbc_hl
+ @sbc_hl
ed43 # LD (w),BC
- call arg16
- m_ea = TDAT; TADR = m_ea; TDAT = BC;
- call wm16
+ @arg16
+ m_ea = TDAT;
+ TDAT = BC;
+ @wm16 m_ea
WZ = m_ea + 1;
ed44 # NEG
neg();
ed45 # RETN
- call retn
+ @retn
ed46 # IM 0
m_im = 0;
ed47 # LD i,A
- call ld_i_a
+ @ld_i_a
ed48 # IN C,(C)
- TADR = BC;
- call in
- C = TDAT8; set_f((F & CF) | SZP[C]); WZ = TADR + 1;
+ @in BC
+ C = TDAT8;
+ set_f((F & CF) | SZP[C]);
+ WZ = BC + 1;
ed49 # OUT (C),C
- TADR = BC; TDAT8 = C;
- call out
- WZ = TADR + 1;
+ TDAT8 = C;
+ @out BC
+ WZ = BC + 1;
ed4a # ADC HL,BC
TDAT = BC;
- call adc_hl
+ @adc_hl
ed4b # LD BC,(w)
- call arg16
- m_ea = TDAT; TADR = m_ea;
- call rm16
- BC = TDAT; WZ = m_ea + 1;
+ @arg16
+ m_ea = TDAT;
+ @rm16 m_ea
+ BC = TDAT;
+ WZ = m_ea + 1;
ed4c # NEG
neg();
ed4d # RETI
- call reti
+ @reti
ed4e # IM 0
m_im = 0;
ed4f # LD r,A
- call ld_r_a
+ @ld_r_a
ed50 # IN D,(C)
- TADR = BC;
- call in
- D = TDAT8; set_f((F & CF) | SZP[D]); WZ = TADR + 1;
+ @in BC
+ D = TDAT8;
+ set_f((F & CF) | SZP[D]);
+ WZ = BC + 1;
ed51 # OUT (C),D
- TADR = BC; TDAT8 = D;
- call out
- WZ = TADR + 1;
+ TDAT8 = D;
+ @out BC
+ WZ = BC + 1;
ed52 # SBC HL,DE
TDAT = DE;
- call sbc_hl
+ @sbc_hl
ed53 # LD (w),DE
- call arg16
- m_ea = TDAT; TADR = m_ea; TDAT = DE;
- call wm16
+ @arg16
+ m_ea = TDAT;
+ TDAT = DE;
+ @wm16 m_ea
WZ = m_ea + 1;
ed54 # NEG
neg();
ed55 # RETN
- call retn
+ @retn
ed56 # IM 1
m_im = 1;
ed57 # LD A,i
- call ld_a_i
+ @ld_a_i
ed58 # IN E,(C)
- TADR = BC;
- call in
- E = TDAT8; set_f((F & CF) | SZP[E]); WZ = TADR + 1;
+ @in BC
+ E = TDAT8;
+ set_f((F & CF) | SZP[E]);
+ WZ = BC + 1;
ed59 # OUT (C),E
- TADR = BC; TDAT8 = E;
- call out
- WZ = TADR + 1;
+ TDAT8 = E;
+ @out BC
+ WZ = BC + 1;
ed5a # ADC HL,DE
TDAT = DE;
- call adc_hl
+ @adc_hl
ed5b # LD DE,(w)
- call arg16
- m_ea = TDAT; TADR = m_ea;
- call rm16
- DE = TDAT; WZ = m_ea + 1;
+ @arg16
+ m_ea = TDAT;
+ @rm16 m_ea
+ DE = TDAT;
+ WZ = m_ea + 1;
ed5c # NEG
neg();
ed5d # RETI
- call reti
+ @reti
ed5e # IM 2
m_im = 2;
ed5f # LD A,r
- call ld_a_r
+ @ld_a_r
ed60 # IN H,(C)
- TADR = BC;
- call in
- H = TDAT8; set_f((F & CF) | SZP[H]); WZ = TADR + 1;
+ @in BC
+ H = TDAT8;
+ set_f((F & CF) | SZP[H]);
+ WZ = BC + 1;
ed61 # OUT (C),H
- TADR = BC; TDAT8 = H;
- call out
- WZ = TADR + 1;
+ TDAT8 = H;
+ @out BC
+ WZ = BC + 1;
ed62 # SBC HL,HL
TDAT = HL;
- call sbc_hl
+ @sbc_hl
ed63 # LD (w),HL
- call arg16
- m_ea = TDAT; TADR = m_ea; TDAT = HL;
- call wm16
+ @arg16
+ m_ea = TDAT;
+ TDAT = HL;
+ @wm16 m_ea
WZ = m_ea + 1;
ed64 # NEG
neg();
ed65 # RETN
- call retn
+ @retn
ed66 # IM 0
m_im = 0;
ed67 # RRD (HL)
- call rrd
+ @rrd
ed68 # IN L,(C)
- TADR = BC;
- call in
- L = TDAT8; set_f((F & CF) | SZP[L]); WZ = TADR + 1;
+ @in BC
+ L = TDAT8;
+ set_f((F & CF) | SZP[L]);
+ WZ = BC + 1;
ed69 # OUT (C),L
- TADR = BC; TDAT8 = L;
- call out
- WZ = TADR + 1;
+ TDAT8 = L;
+ @out BC
+ WZ = BC + 1;
ed6a # ADC HL,HL
TDAT = HL;
- call adc_hl
+ @adc_hl
ed6b # LD HL,(w)
- call arg16
- m_ea = TDAT; TADR = m_ea;
- call rm16
- HL = TDAT; WZ = m_ea + 1;
+ @arg16
+ m_ea = TDAT;
+ @rm16 m_ea
+ HL = TDAT;
+ WZ = m_ea + 1;
ed6c # NEG
neg();
ed6d # RETI
- call reti
+ @reti
ed6e # IM 0
m_im = 0;
ed6f # RLD (HL)
- call rld
+ @rld
ed70 # IN 0,(C)
- TADR = BC;
- call in
- set_f((F & CF) | SZP[TDAT8]); WZ = TADR + 1;
+ @in BC
+ set_f((F & CF) | SZP[TDAT8]);
+ WZ = BC + 1;
ed71 # OUT (C),0
- TADR = BC; TDAT8 = 0;
- call out
- WZ = TADR + 1;
+ TDAT8 = 0;
+ @out BC
+ WZ = BC + 1;
ed72 # SBC HL,SP
TDAT = SP;
- call sbc_hl
+ @sbc_hl
ed73 # LD (w),SP
- call arg16
- m_ea = TDAT; TADR = m_ea; TDAT = SP;
- call wm16
+ @arg16
+ m_ea = TDAT;
+ TDAT = SP;
+ @wm16 m_ea
WZ = m_ea + 1;
ed74 # NEG
neg();
ed75 # RETN
- call retn
+ @retn
ed76 # IM 1
m_im = 1;
@@ -5572,30 +5666,32 @@ ed77 # DB ED,77
illegal_2();
ed78 # IN A,(C)
- TADR = BC;
- call in
- A = TDAT8; set_f((F & CF) | SZP[A]); WZ = TADR + 1;
+ @in BC
+ A = TDAT8;
+ set_f((F & CF) | SZP[A]);
+ WZ = BC + 1;
ed79 # OUT (C),A
- TADR = BC; TDAT8 = A;
- call out
- WZ = TADR + 1;
+ TDAT8 = A;
+ @out BC
+ WZ = BC + 1;
ed7a # ADC HL,SP
TDAT = SP;
- call adc_hl
+ @adc_hl
ed7b # LD SP,(w)
- call arg16
- m_ea = TDAT; TADR = m_ea;
- call rm16
- SP = TDAT; WZ = m_ea + 1;
+ @arg16
+ m_ea = TDAT;
+ @rm16 m_ea
+ SP = TDAT;
+ WZ = m_ea + 1;
ed7c # NEG
neg();
ed7d # RETI
- call reti
+ @reti
ed7e # IM 2
m_im = 2;
@@ -5700,16 +5796,16 @@ ed9f # DB ED
illegal_2();
eda0 # LDI
- call ldi
+ @ldi
eda1 # CPI
- call cpi
+ @cpi
eda2 # INI
- call ini
+ @ini
eda3 # OUTI
- call outi
+ @outi
eda4 # DB ED
illegal_2();
@@ -5724,16 +5820,16 @@ eda7 # DB ED
illegal_2();
eda8 # LDD
- call ldd
+ @ldd
eda9 # CPD
- call cpd
+ @cpd
edaa # IND
- call ind
+ @ind
edab # OUTD
- call outd
+ @outd
edac # DB ED
illegal_2();
@@ -5748,16 +5844,16 @@ edaf # DB ED
illegal_2();
edb0 # LDIR
- call ldir
+ @ldir
edb1 # CPIR
- call cpir
+ @cpir
edb2 # INIR
- call inir
+ @inir
edb3 # OTIR
- call otir
+ @otir
edb4 # DB ED
illegal_2();
@@ -5772,16 +5868,16 @@ edb7 # DB ED
illegal_2();
edb8 # LDDR
- call lddr
+ @lddr
edb9 # CPDR
- call cpdr
+ @cpdr
edba # INDR
- call indr
+ @indr
edbb # OTDR
- call otdr
+ @otdr
edbc # DB ED
illegal_2();
@@ -5994,16 +6090,17 @@ edff # DB ED
0000 # NOP
0001 # LD BC,w
- call arg16
+ @arg16
BC = TDAT;
0002 # LD (BC),A
- TADR = BC; TDAT8 = A;
- call wm
- WZ_L = (BC + 1) & 0xFF; WZ_H = A;
+ TDAT8 = A;
+ @wm BC
+ WZ_L = (BC + 1) & 0xFF;
+ WZ_H = A;
0003 # INC BC
- call nomreq_ir 2
+ @nomreq_ir 2
BC++;
0004 # INC B
@@ -6013,27 +6110,29 @@ edff # DB ED
dec(B);
0006 # LD B,n
- call arg
+ @arg
B = TDAT8;
0007 # RLCA
rlca();
0008 # EX AF,AF'
- using std::swap; swap(m_af, m_af2);
+ using std::swap;
+ swap(m_af, m_af2);
0009 # ADD HL,BC
- TDAT = HL; TDAT2 = BC;
- call add16
+ TDAT = HL;
+ TDAT2 = BC;
+ @add16
HL = TDAT;
000a # LD A,(BC)
- TADR = BC;
- call rm
- A = TDAT8; WZ = BC+1;
+ @rm BC
+ A = TDAT8;
+ WZ = BC+1;
000b # DEC BC
- call nomreq_ir 2
+ @nomreq_ir 2
BC--;
000c # INC C
@@ -6043,28 +6142,29 @@ edff # DB ED
dec(C);
000e # LD C,n
- call arg
+ @arg
C = TDAT8;
000f # RRCA
rrca();
0010 # DJNZ o
- call nomreq_ir 1
+ @nomreq_ir 1
TDAT8 = --B;
- call jr_cond
+ @jr_cond
0011 # LD DE,w
- call arg16
+ @arg16
DE = TDAT;
0012 # LD (DE),A
- TADR = DE; TDAT8 = A;
- call wm
- WZ_L = (DE + 1) & 0xFF; WZ_H = A;
+ TDAT8 = A;
+ @wm DE
+ WZ_L = (DE + 1) & 0xFF;
+ WZ_H = A;
0013 # INC DE
- call nomreq_ir 2
+ @nomreq_ir 2
DE++;
0014 # INC D
@@ -6074,27 +6174,28 @@ edff # DB ED
dec(D);
0016 # LD D,n
- call arg
+ @arg
D = TDAT8;
0017 # RLA
rla();
0018 # JR o
- call jr
+ @jr
0019 # ADD HL,DE
- TDAT = HL; TDAT2 = DE;
- call add16
+ TDAT = HL;
+ TDAT2 = DE;
+ @add16
HL = TDAT;
001a # LD A,(DE)
- TADR = DE;
- call rm
- A = TDAT8; WZ = DE + 1;
+ @rm DE
+ A = TDAT8;
+ WZ = DE + 1;
001b # DEC DE
- call nomreq_ir 2
+ @nomreq_ir 2
DE--;
001c # INC E
@@ -6104,7 +6205,7 @@ edff # DB ED
dec(E);
001e # LD E,n
- call arg
+ @arg
E = TDAT8;
001f # RRA
@@ -6112,20 +6213,21 @@ edff # DB ED
0020 # JR NZ,o
TDAT8 = !(F & ZF);
- call jr_cond
+ @jr_cond
0021 # LD HL,w
- call arg16
+ @arg16
HL = TDAT;
0022 # LD (w),HL
- call arg16
- m_ea = TDAT; TADR = TDAT; TDAT = HL;
- call wm16
+ @arg16
+ m_ea = TDAT;
+ TDAT = HL;
+ @wm16 m_ea
WZ = m_ea + 1;
0023 # INC HL
- call nomreq_ir 2
+ @nomreq_ir 2
HL++;
0024 # INC H
@@ -6135,7 +6237,7 @@ edff # DB ED
dec(H);
0026 # LD H,n
- call arg
+ @arg
H = TDAT8;
0027 # DAA
@@ -6143,21 +6245,23 @@ edff # DB ED
0028 # JR Z,o
TDAT8 = F & ZF;
- call jr_cond
+ @jr_cond
0029 # ADD HL,HL
- TDAT = HL; TDAT2 = HL;
- call add16
+ TDAT = HL;
+ TDAT2 = HL;
+ @add16
HL = TDAT;
002a # LD HL,(w)
- call arg16
- m_ea = TDAT; TADR = TDAT;
- call rm16
- HL = TDAT; WZ = m_ea + 1;
+ @arg16
+ m_ea = TDAT;
+ @rm16 m_ea
+ HL = TDAT;
+ WZ = m_ea + 1;
002b # DEC HL
- call nomreq_ir 2
+ @nomreq_ir 2
HL--;
002c # INC L
@@ -6167,67 +6271,69 @@ edff # DB ED
dec(L);
002e # LD L,n
- call arg
+ @arg
L = TDAT8;
002f # CPL
- A ^= 0xff; set_f((F & (SF | ZF | PF | CF)) | HF | NF | (A & (YF | XF)));
+ A ^= 0xff;
+ set_f((F & (SF | ZF | PF | CF)) | HF | NF | (A & (YF | XF)));
0030 # JR NC,o
TDAT8 = !(F & CF);
- call jr_cond
+ @jr_cond
0031 # LD SP,w
- call arg16
+ @arg16
SP = TDAT;
0032 # LD (w),A
- call arg16
- m_ea = TDAT; TADR = m_ea; TDAT8 = A;
- call wm
- WZ_L = (m_ea + 1) & 0xFF; WZ_H = A;
+ @arg16
+ m_ea = TDAT;
+ TDAT8 = A;
+ @wm m_ea
+ WZ_L = (m_ea + 1) & 0xFF;
+ WZ_H = A;
0033 # INC SP
- call nomreq_ir 2
+ @nomreq_ir 2
SP++;
0034 # INC (HL)
- TADR = HL;
- call rm_reg
+ @rm_reg HL
inc(TDAT8);
- call wm
+ @wm HL
0035 # DEC (HL)
- TADR = HL;
- call rm_reg
+ @rm_reg HL
dec(TDAT8);
- call wm
+ @wm HL
0036 # LD (HL),n
- call arg
- TADR = HL;
- call wm
+ @arg
+ @wm HL
0037 # SCF
set_f((F & (SF | ZF | PF)) | CF | (((F & Q) | A) & (YF | XF)));
0038 # JR C,o
TDAT8 = F & CF;
- call jr_cond
+ @jr_cond
0039 # ADD HL,SP
- TDAT = HL; TDAT2 = SP;
- call add16
+ TDAT = HL;
+ TDAT2 = SP;
+ @add16
HL = TDAT;
003a # LD A,(w)
- call arg16
- m_ea = TDAT; TADR = TDAT;
- call rm
- A = TDAT8; WZ = m_ea + 1;
+ @arg16
+ m_ea = TDAT;
+ @rm m_ea
+ A = TDAT8;
+ WZ = m_ea + 1;
003b # DEC SP
- call nomreq_ir 2
+ @nomreq_ir 2
SP--;
003c # INC A
@@ -6237,7 +6343,7 @@ edff # DB ED
dec(A);
003e # LD A,n
- call arg
+ @arg
A = TDAT8;
003f # CCF
@@ -6261,8 +6367,7 @@ edff # DB ED
B = L;
0046 # LD B,(HL)
- TADR = HL;
- call rm
+ @rm HL
B = TDAT8;
0047 # LD B,A
@@ -6286,8 +6391,7 @@ edff # DB ED
C = L;
004e # LD C,(HL)
- TADR = HL;
- call rm
+ @rm HL
C = TDAT8;
004f # LD C,A
@@ -6311,8 +6415,7 @@ edff # DB ED
D = L;
0056 # LD D,(HL)
- TADR = HL;
- call rm
+ @rm HL
D = TDAT8;
0057 # LD D,A
@@ -6336,8 +6439,7 @@ edff # DB ED
E = L;
005e # LD E,(HL)
- TADR = HL;
- call rm
+ @rm HL
E = TDAT8;
005f # LD E,A
@@ -6361,8 +6463,7 @@ edff # DB ED
H = L;
0066 # LD H,(HL)
- TADR = HL;
- call rm
+ @rm HL
H = TDAT8;
0067 # LD H,A
@@ -6386,43 +6487,42 @@ edff # DB ED
006d # LD L,L
006e # LD L,(HL)
- TADR = HL;
- call rm
+ @rm HL
L = TDAT8;
006f # LD L,A
L = A;
0070 # LD (HL),B
- TADR = HL; TDAT = B;
- call wm
+ TDAT = B;
+ @wm HL
0071 # LD (HL),C
- TADR = HL; TDAT = C;
- call wm
+ TDAT = C;
+ @wm HL
0072 # LD (HL),D
- TADR = HL; TDAT = D;
- call wm
+ TDAT = D;
+ @wm HL
0073 # LD (HL),E
- TADR = HL; TDAT = E;
- call wm
+ TDAT = E;
+ @wm HL
0074 # LD (HL),H
- TADR = HL; TDAT = H;
- call wm
+ TDAT = H;
+ @wm HL
0075 # LD (HL),L
- TADR = HL; TDAT = L;
- call wm
+ TDAT = L;
+ @wm HL
0076 # HALT
halt();
0077 # LD (HL),A
- TADR = HL; TDAT = A;
- call wm
+ TDAT = A;
+ @wm HL
0078 # LD A,B
A = B;
@@ -6443,8 +6543,7 @@ edff # DB ED
A = L;
007e # LD A,(HL)
- TADR = HL;
- call rm
+ @rm HL
A = TDAT8;
007f # LD A,A
@@ -6468,8 +6567,7 @@ edff # DB ED
add_a(L);
0086 # ADD A,(HL)
- TADR = HL;
- call rm
+ @rm HL
add_a(TDAT8);
0087 # ADD A,A
@@ -6494,8 +6592,7 @@ edff # DB ED
adc_a(L);
008e # ADC A,(HL)
- TADR = HL;
- call rm
+ @rm HL
adc_a(TDAT8);
008f # ADC A,A
@@ -6520,8 +6617,7 @@ edff # DB ED
sub_a(L);
0096 # SUB (HL)
- TADR = HL;
- call rm
+ @rm HL
sub_a(TDAT8);
0097 # SUB A
@@ -6546,8 +6642,7 @@ edff # DB ED
sbc_a(L);
009e # SBC A,(HL)
- TADR = HL;
- call rm
+ @rm HL
sbc_a(TDAT8);
009f # SBC A,A
@@ -6572,8 +6667,7 @@ edff # DB ED
and_a(L);
00a6 # AND (HL)
- TADR = HL;
- call rm
+ @rm HL
and_a(TDAT8);
00a7 # AND A
@@ -6598,8 +6692,7 @@ edff # DB ED
xor_a(L);
00ae # XOR (HL)
- TADR = HL;
- call rm
+ @rm HL
xor_a(TDAT8);
00af # XOR A
@@ -6624,8 +6717,7 @@ edff # DB ED
or_a(L);
00b6 # OR (HL)
- TADR = HL;
- call rm
+ @rm HL
or_a(TDAT8);
00b7 # OR A
@@ -6650,8 +6742,7 @@ edff # DB ED
cp(L);
00be # CP (HL)
- TADR = HL;
- call rm
+ @rm HL
cp(TDAT8);
00bf # CP A
@@ -6659,249 +6750,248 @@ edff # DB ED
00c0 # RET NZ
TDAT8 = !(F & ZF);
- call ret_cond
+ @ret_cond
00c1 # POP BC
- call pop
+ @pop
BC = TDAT;
00c2 # JP NZ,a
TDAT8 = !(F & ZF);
- call jp_cond
+ @jp_cond
00c3 # JP a
- call jp
+ @jp
00c4 # CALL NZ,a
TDAT8 = !(F & ZF);
- call call_cond
+ @call_cond
00c5 # PUSH BC
- TDAT = BC;
- call push
+ @push BC
00c6 # ADD A,n
- call arg
+ @arg
add_a(TDAT8);
00c7 # RST 0
- call rst 0x00
+ @rst 0x00
00c8 # RET Z
TDAT8 = (F & ZF);
- call ret_cond
+ @ret_cond
00c9 # RET
- call pop
- PC = TDAT; WZ = PC;
+ @pop
+ PC = TDAT;
+ WZ = PC;
00ca # JP Z,a
TDAT8 = F & ZF;
- call jp_cond
+ @jp_cond
00cb # **** CB xx
- call rop
- call jump_prefixed 0xcb
+ @rop
+ @jump_prefixed 0xcb
00cc # CALL Z,a
TDAT8 = F & ZF;
- call call_cond
+ @call_cond
00cd # CALL a
- call arg16_call
+ @arg16_call
00ce # ADC A,n
- call arg
+ @arg
adc_a(TDAT8);
00cf # RST 1
- call rst 0x08
+ @rst 0x08
00d0 # RET NC
TDAT8 = !(F & CF);
- call ret_cond
+ @ret_cond
00d1 # POP DE
- call pop
+ @pop
DE = TDAT;
00d2 # JP NC,a
TDAT8 = !(F & CF);
- call jp_cond
+ @jp_cond
00d3 # OUT (n),A
- call arg
- TADR = TDAT8 | (A << 8); TDAT = A;
- call out
- WZ_L = ((TADR & 0xff) + 1) & 0xff; WZ_H = A;
+ @arg
+ TDAT2 = TDAT8 | (A << 8);
+ TDAT = A;
+ @out TDAT2
+ WZ_L = ((TDAT2 & 0xff) + 1) & 0xff;
+ WZ_H = A;
00d4 # CALL NC,a
TDAT8 = !(F & CF);
- call call_cond
+ @call_cond
00d5 # PUSH DE
- TDAT = DE;
- call push
+ @push DE
00d6 # SUB n
- call arg
+ @arg
sub_a(TDAT8);
00d7 # RST 2
- call rst 0x10
+ @rst 0x10
00d8 # RET C
TDAT8 = (F & CF);
- call ret_cond
+ @ret_cond
00d9 # EXX
exx();
00da # JP C,a
TDAT8 = F & CF;
- call jp_cond
+ @jp_cond
00db # IN A,(n)
- call arg
- TADR = TDAT8 | (A << 8);
- call in
- A = TDAT8; WZ = TADR + 1;
+ @arg
+ TDAT2 = TDAT8 | (A << 8);
+ @in TDAT2
+ A = TDAT8;
+ WZ = TDAT2 + 1;
00dc # CALL C,a
TDAT8 = F & CF;
- call call_cond
+ @call_cond
00dd # **** DD xx
- call rop
- call jump_prefixed 0xdd
+ @rop
+ @jump_prefixed 0xdd
00de # SBC A,n
- call arg
+ @arg
sbc_a(TDAT8);
00df # RST 3
- call rst 0x18
+ @rst 0x18
00e0 # RET PO
TDAT8 = !(F & PF);
- call ret_cond
+ @ret_cond
00e1 # POP HL
- call pop
+ @pop
HL = TDAT;
00e2 # JP PO,a
TDAT8 = !(F & PF);
- call jp_cond
+ @jp_cond
00e3 # EX HL,(SP)
- TDAT = HL;
- call ex_sp
- HL = TDAT;
+ @ex_sp HL
00e4 # CALL PO,a
TDAT8 = !(F & PF);
- call call_cond
+ @call_cond
00e5 # PUSH HL
- TDAT = HL;
- call push
+ @push HL
00e6 # AND n
- call arg
+ @arg
and_a(TDAT8);
00e7 # RST 4
- call rst 0x20
+ @rst 0x20
00e8 # RET PE
TDAT8 = (F & PF);
- call ret_cond
+ @ret_cond
00e9 # JP (HL)
PC = HL;
00ea # JP PE,a
TDAT8 = F & PF;
- call jp_cond
+ @jp_cond
00eb # EX DE,HL
- using std::swap; swap(DE, HL);
+ using std::swap;
+ swap(DE, HL);
00ec # CALL PE,a
TDAT8 = F & PF;
- call call_cond
+ @call_cond
00ed # **** ED xx
- call rop
- call jump_prefixed 0xed
+ @rop
+ @jump_prefixed 0xed
00ee # XOR n
- call arg
+ @arg
xor_a(TDAT8);
00ef # RST 5
- call rst 0x28
+ @rst 0x28
00f0 # RET P
TDAT8 = !(F & SF);
- call ret_cond
+ @ret_cond
00f1 # POP AF
- call pop
+ @pop
AF = TDAT;
00f2 # JP P,a
TDAT8 = !(F & SF);
- call jp_cond
+ @jp_cond
00f3 # DI
m_iff1 = m_iff2 = 0;
00f4 # CALL P,a
TDAT8 = !(F & SF);
- call call_cond
+ @call_cond
00f5 # PUSH AF
- TDAT = AF;
- call push
+ @push AF
00f6 # OR n
- call arg
+ @arg
or_a(TDAT8);
00f7 # RST 6
- call rst 0x30
+ @rst 0x30
00f8 # RET M
TDAT8 = (F & SF);
- call ret_cond
+ @ret_cond
00f9 # LD SP,HL
- call nomreq_ir 2
+ @nomreq_ir 2
SP = HL;
00fa # JP M,a
TDAT8 = F & SF;
- call jp_cond
+ @jp_cond
00fb # EI
ei();
00fc # CALL M,a
TDAT8 = F & SF;
- call call_cond
+ @call_cond
00fd # **** FD xx
- call rop
- call jump_prefixed 0xfd
+ @rop
+ @jump_prefixed 0xfd
00fe # CP n
- call arg
+ @arg
cp(TDAT8);
00ff # RST 7
- call rst 0x38
+ @rst 0x38
@@ -7600,10 +7690,9 @@ r800:cb35 # SLL L
L = r800_sll(L);
r800:cb36 # SLL (HL)
- TADR = HL;
- call rm_reg
+ @rm_reg HL
TDAT8 = r800_sll(TDAT8);
- call wm
+ @wm HL
r800:cb37 # SLL A
A = r800_sll(A);
@@ -8629,7 +8718,8 @@ r800:fdff # illegal
illegal_1();
r800:ed46 # IM 0
- m_im = 0; T(1);
+ m_im = 0;
+ + 1
r800:ed4c # illegal
illegal_2();
@@ -8644,7 +8734,8 @@ r800:ed55 # illegal
illegal_2();
r800:ed56 # IM 1
- m_im = 1; T(1);
+ m_im = 1;
+ + 1
r800:ed5c # illegal
illegal_2();
@@ -8653,7 +8744,8 @@ r800:ed5d # illegal
illegal_2();
r800:ed5e # IM 2
- m_im = 2; T(1);
+ m_im = 2;
+ + 1
r800:ed64 # illegal
illegal_2();
@@ -8668,7 +8760,8 @@ r800:ed6c # illegal
illegal_2();
r800:ed6e # IM 0
- m_im = 0; T(1);
+ m_im = 0;
+ + 1
# ed70 became legal IN F,(C)
@@ -8697,37 +8790,48 @@ r800:ed7f # illegal
illegal_2();
r800:edc1 # MULUB A,B
- mulub(B); T(12);
+ mulub(B);
+ + 12
r800:edc3 # MULUW HL,BC
- muluw(BC); T(34);
+ muluw(BC);
+ + 34
r800:edc9 # MULUB A,C
- mulub(C); T(12);
+ mulub(C);
+ + 12
r800:edd1 # MULUB A,D
- mulub(D); T(12);
+ mulub(D);
+ + 12
r800:edd9 # MULUB A,E
- mulub(E); T(12);
+ mulub(E);
+ + 12
r800:ede1 # MULUB A,H (undocumented)
- mulub(H); T(12);
+ mulub(H);
+ + 12
r800:ede9 # MULUB A,L (undocumented)
- mulub(L); T(12);
+ mulub(L);
+ + 12
r800:edf1 # MULUB A,A (undocumented)
- mulub(A); T(12);
+ mulub(A);
+ + 12
r800:edf3 # MULUW HL,SP
- muluw(SP); T(34);
+ muluw(SP);
+ + 34
r800:edf9 # MULUB A,A (undocumented)
- mulub(A); T(12);
+ mulub(A);
+ + 12
r800:00f3 # DI
- m_iff1 = m_iff2 = 0; T(1);
+ m_iff1 = m_iff2 = 0;
+ + 1
@@ -8735,32 +8839,28 @@ r800:00f3 # DI
# Z80N
##########################################################
macro ldix
- {
- TADR = HL;
- call rm
- if (TDAT8 != A) {
- TADR = DE;
- call wm
- ;
- }
- HL++;
- DE++;
- BC--;
+{
+ @rm HL
+ if (TDAT8 != A) {
+ @wm DE
+ ;
}
+ HL++;
+ DE++;
+ BC--;
+}
macro lddx
- {
- TADR = HL;
- call rm
- if (TDAT8 != A) {
- TADR = DE;
- call wm
- ;
- }
- DE++;
- HL--;
- BC--;
+{
+ @rm HL
+ if (TDAT8 != A) {
+ @wm DE
+ ;
}
+ DE++;
+ HL--;
+ BC--;
+}
z80n:ed23 # swapnib
A = (A << 4) | (A >> 4);
@@ -8770,7 +8870,7 @@ z80n:ed24 # mirror a
z80n:ed27 # test *
TDAT_H = A;
- call arg
+ @arg
and_a(TDAT8);
A = TDAT_H;
@@ -8778,10 +8878,10 @@ z80n:ed28 # bsla de,b
DE <<= std::min(B & 31, 16);
z80n:ed29 # bsra de,b
- {
- const u16 fill = (DE & 0x8000) ? ~u16(0) : u16(0);
- DE = (DE >> std::min(B & 31, 16)) | (fill << (16 - std::min(B & 31, 16)));
- }
+{
+ const u16 fill = (DE & 0x8000) ? ~u16(0) : u16(0);
+ DE = (DE >> std::min(B & 31, 16)) | (fill << (16 - std::min(B & 31, 16)));
+}
z80n:ed2a # bsrl de,b
DE >>= std::min(B & 31, 16);
@@ -8805,35 +8905,34 @@ z80n:ed33 # add bc,a
BC += A;
z80n:ed34 # add hl,**
- call arg16
+ @arg16
HL += TDAT;
z80n:ed35 # add de,**
- call arg16
+ @arg16
DE += TDAT;
z80n:ed36 # add bc,**
- call arg16
+ @arg16
BC += TDAT;
z80n:ed8a # push **
- call arg16
- using std::swap; swap(TDAT_H, TDAT_L);
- call push
+ @arg
+ TDAT_H = TDAT_L;
+ @arg
+ @push TDAT
z80n:ed90 # outinb
- TADR = HL;
- call rm
- TADR = BC;
- call out
+ @rm HL
+ @out BC
HL++;
z80n:ed91 # nextreg *,*
- call arg16
+ @arg16
m_out_nextreg_cb(TDAT_L, TDAT_H);
z80n:ed92 # nextreg *,a
- call arg
+ @arg
m_out_nextreg_cb(TDAT8, A);
z80n:ed93 # pixeldn
@@ -8851,35 +8950,30 @@ z80n:ed95 # setae
A = 0x80 >> (E & 7);
z80n:ed98 # jp (c)
- TADR = BC;
- call in
+ @in BC
PC = (PC & 0xc000) + (TDAT8 << 6);
z80n:eda4 # ldix
- call ldix
+ @ldix
z80n:eda5 # ldws
- TADR = HL;
- call rm
- TADR = DE;
- call wm
+ @rm HL
+ @wm DE
L++;
inc(D);
z80n:edac # lddx
- call lddx
+ @lddx
z80n:edb4 # ldirx
- call ldix
+ @ldix
if (BC != 0)
PC -= 2;
z80n:edb7 # ldpirx
- TADR = (HL & 0xfff8) + (E & 7);
- call rm
+ @rm (HL & 0xfff8) + (E & 7)
if (TDAT8 != A) {
- TADR = DE;
- call wm
+ @wm DE
;
}
DE++;
@@ -8888,6 +8982,6 @@ z80n:edb7 # ldpirx
PC -= 2;
z80n:edbc # lddrx
- call lddx
+ @lddx
if (BC != 0)
PC -= 2;
diff --git a/src/devices/cpu/z80/z80make.py b/src/devices/cpu/z80/z80make.py
index 023cdfd29ba..c1c75d12fb6 100644
--- a/src/devices/cpu/z80/z80make.py
+++ b/src/devices/cpu/z80/z80make.py
@@ -29,7 +29,7 @@ class IndStr:
return not self.str
def has_indent(self):
- return self.indent != ''
+ return self.indent != '' or self.str[0] == "{" or self.str[0] == "}"
def strip_indent(self, n):
if self.indent != '':
@@ -240,11 +240,11 @@ class OpcodeList:
line_toc = line_toc[2:]
line = " ".join(line_toc)
for i in range(times):
- if line_toc[0] == 'call':
- name = line_toc[1]
+ if line_toc[0].startswith('@'):
+ name = line_toc[0][1:]
arg = None
- if len(line_toc) > 2:
- arg = " ".join(line_toc[2:])
+ if len(line_toc) > 1:
+ arg = " ".join(line_toc[1:])
if name in self.macros:
macro = self.macros[name]
([out.extend(self.pre_process(il)) for il in macro.apply(arg)])
diff --git a/src/devices/machine/netlist.cpp b/src/devices/machine/netlist.cpp
index 8d4d6cedf4d..a3d6ae3e656 100644
--- a/src/devices/machine/netlist.cpp
+++ b/src/devices/machine/netlist.cpp
@@ -322,6 +322,7 @@ class NETLIB_NAME(sound_in) : public sound_in_type
public:
using base_type = sound_in_type;
using base_type::base_type;
+ sound_stream *m_stream = nullptr;
};
netlist::setup_t &netlist_mame_device::setup()
@@ -1387,6 +1388,11 @@ void netlist_mame_sound_device::device_start()
std::vector<nld_sound_in *> indevs = netlist().get_device_list<nld_sound_in>();
for (auto &e : indevs)
{
+ // We cannot use the resampler because the stream is not
+ // always audio. In particular the ay8910 may send a stream
+ // of resistor values, which would be destroyed by resampling.
+
+ e->m_stream = stream_alloc(1, 0, SAMPLE_RATE_INPUT_ADAPTIVE);
m_in.emplace(e->id(), e);
const auto sample_time = netlist::netlist_time::from_raw(static_cast<netlist::netlist_time::internal_type>(nltime_from_attotime(m_attotime_per_clock).as_raw()));
e->resolve_params(sample_time);
@@ -1399,7 +1405,7 @@ void netlist_mame_sound_device::device_start()
m_inbuffer.resize(m_in.size());
/* initialize the stream(s) */
- m_stream = stream_alloc(m_in.size(), m_out.size(), m_sound_clock);
+ m_stream = stream_alloc(0, m_out.size(), m_sound_clock);
LOGDEVCALLS("sound device_start exit\n");
}
@@ -1444,21 +1450,30 @@ void netlist_mame_sound_device::update_to_current_time()
void netlist_mame_sound_device::sound_stream_update(sound_stream &stream)
{
- for (auto &e : m_in)
+ if (stream.input_count() == 1)
{
- auto clock_period = stream.sample_period();
- auto sample_time = netlist::netlist_time::from_raw(static_cast<netlist::netlist_time::internal_type>(nltime_from_attotime(clock_period).as_raw()));
- m_inbuffer[e.first] = netlist_mame_sound_input_buffer(stream, e.first);
- e.second->buffer_reset(sample_time, stream.samples(), &m_inbuffer[e.first]);
+ for (auto &e : m_in)
+ if (e.second->m_stream == &stream)
+ {
+ auto clock_period = stream.sample_period();
+ auto sample_time = netlist::netlist_time::from_raw(static_cast<netlist::netlist_time::internal_type>(nltime_from_attotime(clock_period).as_raw()));
+ m_inbuffer[e.first] = netlist_mame_sound_input_buffer(stream);
+ e.second->buffer_reset(sample_time, stream.samples(), &m_inbuffer[e.first]);
+ return;
+ }
+ fatalerror("netlist: Got input from an unknown stream\n");
}
int samples = stream.samples();
LOGDEBUG("samples %d\n", samples);
- // end_time() is the time at the END of the last sample we're generating
- // however, the sample value is the value at the START of that last sample,
- // so subtract one sample period so that we only process up to the minimum
- auto nl_target_time = nltime_from_attotime(stream.end_time() - stream.sample_period());
+ // Ensure all input streams are up-to-date
+ for (auto &e : m_in)
+ if (e.second->m_stream)
+ e.second->m_stream->update();
+
+ // Get the start time of the last sample to generate
+ auto nl_target_time = nltime_from_attotime(stream.sample_to_time(stream.end_index() - 1));
auto nltime(netlist().exec().time());
if (nltime < nl_target_time)
diff --git a/src/devices/machine/netlist.h b/src/devices/machine/netlist.h
index 67b6b7d143c..57fc6b05c3a 100644
--- a/src/devices/machine/netlist.h
+++ b/src/devices/machine/netlist.h
@@ -255,14 +255,18 @@ private:
class netlist_mame_sound_input_buffer
{
public:
- sound_stream *m_stream = nullptr;
- int m_stream_input = 0;
+ std::vector<sound_stream::sample_t> m_buffer;
netlist_mame_sound_input_buffer() {}
- netlist_mame_sound_input_buffer(sound_stream &stream, int input) : m_stream(&stream), m_stream_input(input) { }
+ netlist_mame_sound_input_buffer(sound_stream &stream) {
+ int samples = stream.samples();
+ m_buffer.resize(samples);
+ for (int i=0; i != samples; i++)
+ m_buffer[i] = stream.get(0, i);
+ }
- sound_stream::sample_t operator[](std::size_t index) { return m_stream->get(m_stream_input, index); }
+ sound_stream::sample_t operator[](std::size_t index) { return m_buffer[index]; }
};
// ----------------------------------------------------------------------------------------
diff --git a/src/devices/sound/disc_cls.h b/src/devices/sound/disc_cls.h
index 2ea8498d2f1..72a5c39920a 100644
--- a/src/devices/sound/disc_cls.h
+++ b/src/devices/sound/disc_cls.h
@@ -120,14 +120,14 @@ public:
/* Add gain to the output and put into the buffers */
/* Clipping will be handled by the main sound system */
double val = DISCRETE_INPUT(0) * DISCRETE_INPUT(1);
- m_stream->put(m_stream_output, m_outview_sample++, val * (1.0 / 32768.0));
+ m_stream->put(m_stream_output, m_stream_sample++, val * (1.0 / 32768.0));
}
virtual int max_output() override { return 0; }
- virtual void set_output_ptr(sound_stream &stream, int output) override { m_stream = &stream; m_stream_output = output; m_outview_sample = 0; }
+ virtual void set_output_ptr(sound_stream &stream, int output) override { m_stream = &stream; m_stream_output = output; m_stream_sample = 0; }
private:
sound_stream *m_stream = nullptr;
int m_stream_output = 0;
- u32 m_outview_sample = 0U;
+ u32 m_stream_sample = 0U;
};
DISCRETE_CLASS(dso_csvlog, 0,
@@ -228,13 +228,15 @@ public:
virtual void start() override;
virtual void input_write(int sub_node, uint8_t data ) override;
virtual bool is_buffered() { return false; }
+ void set_input_ptr(sound_stream &stream, int input) { m_stream = &stream; m_stream_input = input; m_stream_sample = 0; }
/* This is called by discrete_sound_device */
void stream_start();
-//protected:
- uint32_t m_stream_in_number = 0;
- uint32_t m_inview_sample = 0;
+protected:
+ sound_stream *m_stream = nullptr;
+ uint32_t m_stream_input = 0;
+ uint32_t m_stream_sample = 0;
private:
double m_gain = 0.0; /* node gain */
double m_offset = 0.0; /* node offset */
diff --git a/src/devices/sound/disc_inp.hxx b/src/devices/sound/disc_inp.hxx
index 432f8c076bf..ef000e6b331 100644
--- a/src/devices/sound/disc_inp.hxx
+++ b/src/devices/sound/disc_inp.hxx
@@ -246,12 +246,9 @@ DISCRETE_STEP(dss_input_stream)
{
/* the context pointer is set to point to the current input stream data in discrete_stream_update */
if (m_is_buffered)
- {
set_output(0, m_data * m_gain + m_offset);
- m_inview_sample++;
- }
else
- set_output(0, 0);
+ set_output(0, m_stream->get(m_stream_input, m_stream_sample ++) * 32768.0 * m_gain + m_offset);
}
DISCRETE_RESET(dss_input_stream)
@@ -282,8 +279,6 @@ DISCRETE_START(dss_input_stream)
{
discrete_base_node::start();
- /* Stream out number is set during start */
- m_stream_in_number = DSS_INPUT_STREAM__STREAM;
m_gain = DSS_INPUT_STREAM__GAIN;
m_offset = DSS_INPUT_STREAM__OFFSET;
diff --git a/src/devices/sound/discrete.cpp b/src/devices/sound/discrete.cpp
index 5e5c1a05ecf..3e97bff89da 100644
--- a/src/devices/sound/discrete.cpp
+++ b/src/devices/sound/discrete.cpp
@@ -1056,10 +1056,13 @@ void discrete_sound_device::sound_stream_update(sound_stream &stream)
outputnum++;
}
+ int inputnum = 0;
+
/* Setup any input streams */
for (discrete_dss_input_stream_node *node : m_input_stream_list)
{
- node->m_inview_sample = 0;
+ node->set_input_ptr(stream, inputnum);
+ inputnum++;
}
/* just process it */
diff --git a/src/devices/sound/spkrdev.cpp b/src/devices/sound/spkrdev.cpp
index 841656ab4ac..16dc6199c2f 100644
--- a/src/devices/sound/spkrdev.cpp
+++ b/src/devices/sound/spkrdev.cpp
@@ -268,7 +268,7 @@ void speaker_sound_device::level_w(int new_level)
/* This is redundant because time update has to be done within sound_stream_update() anyway,
* however this ensures synchronization between the speaker and stream timing:
*/
- m_channel_last_sample_time = m_channel->sample_time();
+ m_channel_last_sample_time = m_channel->end_time();
/* sample_time() may be ahead of us */
if (m_channel_last_sample_time > time)
diff --git a/src/emu/resampler.cpp b/src/emu/resampler.cpp
index b95fe80dfba..18a5d9f4a21 100644
--- a/src/emu/resampler.cpp
+++ b/src/emu/resampler.cpp
@@ -149,7 +149,7 @@
// Having the sum of coefficients being 1 ensures that.
-audio_resampler::audio_resampler(u32 fs, u32 ft)
+audio_resampler_hq::audio_resampler_hq(u32 fs, u32 ft, float latency, u32 max_order_per_lane, u32 max_lanes)
{
m_ft = ft;
m_fs = fs;
@@ -160,13 +160,13 @@ audio_resampler::audio_resampler(u32 fs, u32 ft)
m_fsm = ft / gcd;
// Compute the per-phase filter length to limit the latency to 5ms and capping it
- m_order_per_lane = u32(fs * 0.005 * 2);
- if(m_order_per_lane > 400)
- m_order_per_lane = 400;
+ m_order_per_lane = u32(fs * latency * 2);
+ if(m_order_per_lane > max_order_per_lane)
+ m_order_per_lane = max_order_per_lane;
- // Reduce the number of phases to be less than 200
+ // Reduce the number of phases to be less than max_lanes
m_phase_shift = 0;
- while(((m_fsm - 1) >> m_phase_shift) >= 200)
+ while(((m_fsm - 1) >> m_phase_shift) >= max_lanes)
m_phase_shift ++;
m_phases = ((m_fsm - 1) >> m_phase_shift) + 1;
@@ -217,7 +217,7 @@ audio_resampler::audio_resampler(u32 fs, u32 ft)
m_skip = m_ftm / m_fsm;
}
-u32 audio_resampler::compute_gcd(u32 fs, u32 ft)
+u32 audio_resampler_hq::compute_gcd(u32 fs, u32 ft)
{
u32 v1 = fs > ft ? fs : ft;
u32 v2 = fs > ft ? ft : fs;
@@ -229,7 +229,12 @@ u32 audio_resampler::compute_gcd(u32 fs, u32 ft)
return v1;
}
-void audio_resampler::apply(const emu::detail::output_buffer_flat<sample_t> &src, std::vector<sample_t> &dest, u64 dest_sample, u32 srcc, float gain, u32 samples) const
+u32 audio_resampler_hq::history_size() const
+{
+ return m_order_per_lane + m_skip + 1;
+}
+
+void audio_resampler_hq::apply(const emu::detail::output_buffer_flat<sample_t> &src, std::vector<sample_t> &dest, u64 dest_sample, u32 srcc, float gain, u32 samples) const
{
u32 seconds = dest_sample / m_ft;
u32 dsamp = dest_sample % m_ft;
@@ -255,7 +260,7 @@ void audio_resampler::apply(const emu::detail::output_buffer_flat<sample_t> &src
}
}
-void audio_resampler::apply(const emu::detail::output_buffer_interleaved<s16> &src, std::vector<sample_t> &dest, u64 dest_sample, u32 srcc, float gain, u32 samples) const
+void audio_resampler_hq::apply(const emu::detail::output_buffer_interleaved<s16> &src, std::vector<sample_t> &dest, u64 dest_sample, u32 srcc, float gain, u32 samples) const
{
u32 seconds = dest_sample / m_ft;
u32 dsamp = dest_sample % m_ft;
@@ -287,7 +292,7 @@ void audio_resampler::apply(const emu::detail::output_buffer_interleaved<s16> &s
}
-void audio_resampler::apply(const emu::detail::output_buffer_flat<sample_t> &src, std::vector<s16> &dest, u32 destc, int dchannels, u64 dest_sample, u32 srcc, float gain, u32 samples) const
+void audio_resampler_hq::apply(const emu::detail::output_buffer_flat<sample_t> &src, std::vector<s16> &dest, u32 destc, int dchannels, u64 dest_sample, u32 srcc, float gain, u32 samples) const
{
u32 seconds = dest_sample / m_ft;
u32 dsamp = dest_sample % m_ft;
@@ -315,3 +320,120 @@ void audio_resampler::apply(const emu::detail::output_buffer_flat<sample_t> &src
}
}
}
+
+
+// Now for the lo-fi version
+//
+// We mostly forget about filtering, and just try to do a decent
+// interpolation. There's a nice 4-point formula used in yamaha
+// devices from around 2000:
+// f0(t) = (t - t**3)/6
+// f1(t) = t + (t**2 - t**3)/2
+//
+// The polynoms are used with the decimal part 'p' (as in phase) of
+// the sample position. The computation from the four samples s0..s3
+// is:
+// s = - s0 * f0(1-p) + s1 * f1(1-p) + s2 * f1(p) - s3 * f0(p)
+//
+// The target sample must be between s1 and s2.
+//
+// When upsampling, that's enough. When downsampling, it feels like a
+// good idea to filter a little with a moving average, dividing the
+// source frequency by an integer just big enough to make the final
+// source frequency lower.
+
+// Sample interpolation functions f0 and f1
+
+const std::array<std::array<float, 0x1001>, 2> audio_resampler_lofi::interpolation_table = []() {
+ std::array<std::array<float, 0x1001>, 2> result;
+
+ // The exact way of doing the computations replicate the values
+ // actually used by the chip (which are very probably a rom, of
+ // course).
+
+ for(u32 i=1; i != 4096; i++) {
+ float p = i / 4096.0;
+ result[0][i] = (p - p*p*p) / 6;
+ }
+ for(u32 i=1; i != 2049; i++) {
+ float p = i / 4096.0;
+ result[1][i] = p + (p*p - p*p*p) / 2;
+ }
+ for(u32 i=2049; i != 4096; i++)
+ // When interpolating, f1 is added and f0 is subtracted, and the total must be 1
+ result[1][i] = 1.0 + result[0][i] + result[0][4096-i] - result[1][4096-i];
+
+ result[0][ 0] = 0.0;
+ result[0][0x1000] = 0.0;
+ result[1][ 0] = 0.0;
+ result[1][0x1000] = 1.0;
+ return result;
+}();
+
+audio_resampler_lofi::audio_resampler_lofi(u32 fs, u32 ft)
+{
+ m_fs = fs;
+ m_ft = ft;
+
+ m_source_divide = fs <= ft ? 1 : 1+fs/ft;
+ m_step = u64(fs) * 0x1000 / ft / m_source_divide;
+}
+
+
+u32 audio_resampler_lofi::history_size() const
+{
+ return 5 * m_source_divide + m_fs / m_ft + 1;
+}
+
+void audio_resampler_lofi::apply(const emu::detail::output_buffer_flat<sample_t> &src, std::vector<sample_t> &dest, u64 dest_sample, u32 srcc, float gain, u32 samples) const
+{
+ u32 seconds = dest_sample / m_ft;
+ u32 dsamp = dest_sample % m_ft;
+ u64 ssamp = (u64(dsamp) * m_fs * 0x1000) / m_ft;
+ u64 ssample = (ssamp >> 12) + u64(m_fs) * seconds;
+ u32 phase = ssamp & 0xfff;
+ if(m_source_divide > 1) {
+ u32 delta = ssample % m_source_divide;
+ phase = (phase | (delta << 12)) / m_source_divide;
+ ssample -= delta;
+ }
+
+ // We're getting 2 samples latency, which is small enough
+
+ ssample -= 4*m_source_divide;
+
+ const sample_t *s = src.ptrs(srcc, ssample - src.sync_sample());
+
+ std::function<sample_t()> reader;
+ if(m_source_divide == 1)
+ reader = [s]() mutable -> sample_t { return *s++; };
+ else
+ reader = [s, count = m_source_divide]() mutable -> sample_t { sample_t sm = 0; for(u32 i=0; i != count; i++) { sm += *s++; } return sm / count; };
+
+ sample_t s0 = reader();
+ sample_t s1 = reader();
+ sample_t s2 = reader();
+ sample_t s3 = reader();
+
+ sample_t *d = dest.data();
+ for(u32 sample = 0; sample != samples; sample++) {
+ *d++ += gain * (- s0 * interpolation_table[0][0x1000-phase] + s1 * interpolation_table[1][0x1000-phase] + s2 * interpolation_table[1][phase] - s3 * interpolation_table[0][phase]);
+
+ phase += m_step;
+ if(phase & 0x1000) {
+ phase &= 0xfff;
+ s0 = s1;
+ s1 = s2;
+ s2 = s3;
+ s3 = reader();
+ }
+ }
+}
+
+void audio_resampler_lofi::apply(const emu::detail::output_buffer_interleaved<s16> &src, std::vector<sample_t> &dest, u64 dest_sample, u32 srcc, float gain, u32 samples) const
+{
+}
+
+void audio_resampler_lofi::apply(const emu::detail::output_buffer_flat<sample_t> &src, std::vector<s16> &dest, u32 destc, int dchannels, u64 dest_sample, u32 srcc, float gain, u32 samples) const
+{
+}
diff --git a/src/emu/resampler.h b/src/emu/resampler.h
index c1b2f88f3e9..d0758b5ae7e 100644
--- a/src/emu/resampler.h
+++ b/src/emu/resampler.h
@@ -15,13 +15,26 @@ class audio_resampler
public:
using sample_t = sound_stream::sample_t;
- audio_resampler(u32 fs, u32 ft);
+ virtual ~audio_resampler() = default;
- u32 history_size() const { return m_order_per_lane; }
+ virtual u32 history_size() const = 0;
- void apply(const emu::detail::output_buffer_flat<sample_t> &src, std::vector<sample_t> &dest, u64 dest_sample, u32 srcc, float gain, u32 samples) const;
- void apply(const emu::detail::output_buffer_interleaved<s16> &src, std::vector<sample_t> &dest, u64 dest_sample, u32 srcc, float gain, u32 samples) const;
- void apply(const emu::detail::output_buffer_flat<sample_t> &src, std::vector<s16> &dest, u32 destc, int dchannels, u64 dest_sample, u32 srcc, float gain, u32 samples) const;
+ virtual void apply(const emu::detail::output_buffer_flat<sample_t> &src, std::vector<sample_t> &dest, u64 dest_sample, u32 srcc, float gain, u32 samples) const = 0;
+ virtual void apply(const emu::detail::output_buffer_interleaved<s16> &src, std::vector<sample_t> &dest, u64 dest_sample, u32 srcc, float gain, u32 samples) const = 0;
+ virtual void apply(const emu::detail::output_buffer_flat<sample_t> &src, std::vector<s16> &dest, u32 destc, int dchannels, u64 dest_sample, u32 srcc, float gain, u32 samples) const = 0;
+};
+
+class audio_resampler_hq : public audio_resampler
+{
+public:
+ audio_resampler_hq(u32 fs, u32 ft, float latency, u32 max_order_per_lane, u32 max_lanes);
+ virtual ~audio_resampler_hq() = default;
+
+ virtual u32 history_size() const override;
+
+ virtual void apply(const emu::detail::output_buffer_flat<sample_t> &src, std::vector<sample_t> &dest, u64 dest_sample, u32 srcc, float gain, u32 samples) const override;
+ virtual void apply(const emu::detail::output_buffer_interleaved<s16> &src, std::vector<sample_t> &dest, u64 dest_sample, u32 srcc, float gain, u32 samples) const override;
+ virtual void apply(const emu::detail::output_buffer_flat<sample_t> &src, std::vector<s16> &dest, u32 destc, int dchannels, u64 dest_sample, u32 srcc, float gain, u32 samples) const override;
private:
u32 m_order_per_lane, m_ftm, m_fsm, m_ft, m_fs, m_delta, m_skip, m_phases, m_phase_shift;
@@ -31,5 +44,23 @@ private:
static u32 compute_gcd(u32 fs, u32 ft);
};
+class audio_resampler_lofi : public audio_resampler
+{
+public:
+ audio_resampler_lofi(u32 fs, u32 ft);
+ virtual ~audio_resampler_lofi() = default;
+
+ virtual u32 history_size() const override;
+
+ virtual void apply(const emu::detail::output_buffer_flat<sample_t> &src, std::vector<sample_t> &dest, u64 dest_sample, u32 srcc, float gain, u32 samples) const override;
+ virtual void apply(const emu::detail::output_buffer_interleaved<s16> &src, std::vector<sample_t> &dest, u64 dest_sample, u32 srcc, float gain, u32 samples) const override;
+ virtual void apply(const emu::detail::output_buffer_flat<sample_t> &src, std::vector<s16> &dest, u32 destc, int dchannels, u64 dest_sample, u32 srcc, float gain, u32 samples) const override;
+
+private:
+ static const std::array<std::array<float, 0x1001>, 2> interpolation_table;
+ u32 m_source_divide, m_fs, m_ft;
+ u32 m_step;
+};
+
#endif
diff --git a/src/emu/sound.cpp b/src/emu/sound.cpp
index 5ff9e86e1ed..a08ede3f471 100644
--- a/src/emu/sound.cpp
+++ b/src/emu/sound.cpp
@@ -1,5 +1,5 @@
// license:BSD-3-Clause
-// copyright-holders:Aaron Giles
+// copyright-holders:O. Galibert, Aaron Giles
/***************************************************************************
sound.cpp
@@ -23,6 +23,8 @@
#include "osdepend.h"
+#include "util/language.h"
+
#include <algorithm>
//**************************************************************************
@@ -189,7 +191,7 @@ template<typename S> void emu::detail::output_buffer_flat<S>::resample(u32 previ
return;
auto si = [](attotime time, u32 rate) -> s64 {
- return time.m_seconds * rate + ((time.m_attoseconds / 100'000'000) * rate) / 10'000'000'000LL;
+ return time.m_seconds * rate + ((time.m_attoseconds / 100000000) * rate) / 10000000000LL;
};
auto cv = [](u32 source_rate, u32 dest_rate, s64 time) -> std::pair<s64, double> {
@@ -496,12 +498,12 @@ u64 sound_stream::get_current_sample_index() const
void sound_stream::update()
{
- if(!is_active() || m_in_update)
+ if(!is_active() || m_in_update || m_device.machine().phase() <= machine_phase::RESET)
return;
// Find out where we are and how much we have to do
u64 idx = get_current_sample_index();
- m_samples_to_update = idx - m_output_buffer.write_sample();
+ m_samples_to_update = idx - m_output_buffer.write_sample() + 1; // We want to include the current sample, hence the +1
if(m_samples_to_update > 0) {
m_in_update = true;
@@ -518,12 +520,12 @@ void sound_stream::update()
void sound_stream::update_nodeps()
{
- if(!is_active() || m_in_update)
+ if(!is_active() || m_in_update || m_device.machine().phase() <= machine_phase::RESET)
return;
// Find out where we are and how much we have to do
u64 idx = get_current_sample_index();
- m_samples_to_update = idx - m_output_buffer.write_sample();
+ m_samples_to_update = idx - m_output_buffer.write_sample() + 1; // We want to include the current sample, hence the +1
if(m_samples_to_update > 0) {
m_in_update = true;
@@ -635,7 +637,7 @@ void sound_stream::reprime_sync_timer()
u64 next_sample = m_output_buffer.write_sample() + 1;
attotime next_time = sample_to_time(next_sample);
- next_time.m_attoseconds += 1'000'000'000; // Go to the next nanosecond
+ next_time.m_attoseconds += 1'000'000'000; // Go to the next nanosecond '
m_sync_timer->adjust(next_time - m_device.machine().time());
}
@@ -657,7 +659,11 @@ sound_manager::sound_manager(running_machine &machine) :
m_muted(0),
m_nosound_mode(machine.osd().no_sound()),
m_unique_id(0),
- m_wavfile()
+ m_wavfile(),
+ m_resampler_type(RESAMPLER_LOFI),
+ m_resampler_hq_latency(0.005),
+ m_resampler_hq_length(400),
+ m_resampler_hq_phases(200)
{
// register callbacks
machine.configuration().config_register(
@@ -838,13 +844,8 @@ void sound_manager::after_devices_init()
m_record_buffer.resize(m_outputs_count * machine().sample_rate(), 0);
m_record_samples = 0;
- // Have all streams create their initial resamplers
- for(auto &stream : m_stream_list)
- stream->create_resamplers();
-
- // Then get the initial history sizes
- for(auto &stream : m_stream_list)
- stream->lookup_history_sizes();
+ // Create resamplers and setup history
+ rebuild_all_resamplers();
m_effects_done = false;
@@ -858,7 +859,7 @@ void sound_manager::after_devices_init()
void sound_manager::input_get(int id, sound_stream &stream)
{
u32 samples = stream.samples();
- u64 end_pos = stream.sample_index();
+ u64 end_pos = stream.end_index();
u32 skip = stream.output_count();
for(const auto &step : m_microphones[id].m_input_mixing_steps) {
@@ -911,6 +912,7 @@ void sound_manager::output_push(int id, sound_stream &stream)
*outb1 = std::clamp(int(*inb++ * 32768), -32768, 32767);
outb1 += m_outputs_count;
}
+ outb++;
}
}
@@ -1116,11 +1118,24 @@ void sound_manager::config_load(config_type cfg_type, config_level cfg_level, ut
// In the global config, get the default effect chain configuration
util::xml::data_node const *efl_node = parentnode->get_child("default_audio_effects");
- for(util::xml::data_node const *ef_node = efl_node->get_child("effect"); ef_node != nullptr; ef_node = ef_node->get_next_sibling("effect")) {
- unsigned int id = ef_node->get_attribute_int("step", 0);
- std::string type = ef_node->get_attribute_string("type", "");
- if(id >= 1 && id <= m_default_effects.size() && audio_effect::effect_names[m_default_effects[id-1]->type()] == type)
- m_default_effects[id-1]->config_load(ef_node);
+ if(efl_node) {
+ for(util::xml::data_node const *ef_node = efl_node->get_child("effect"); ef_node != nullptr; ef_node = ef_node->get_next_sibling("effect")) {
+ unsigned int id = ef_node->get_attribute_int("step", 0);
+ std::string type = ef_node->get_attribute_string("type", "");
+ if(id >= 1 && id <= m_default_effects.size() && audio_effect::effect_names[m_default_effects[id-1]->type()] == type)
+ m_default_effects[id-1]->config_load(ef_node);
+ }
+ }
+
+ // and the resampler configuration
+ util::xml::data_node const *rs_node = parentnode->get_child("resampler");
+ if(rs_node) {
+ m_resampler_hq_latency = rs_node->get_attribute_float("hq_latency", 0.0050);
+ m_resampler_hq_length = rs_node->get_attribute_int("hq_length", 400);
+ m_resampler_hq_phases = rs_node->get_attribute_int("hq_phases", 200);
+
+ // this also applies the hq settings if resampler is hq
+ set_resampler_type(rs_node->get_attribute_int("type", RESAMPLER_LOFI));
}
break;
}
@@ -1211,6 +1226,12 @@ void sound_manager::config_save(config_type cfg_type, util::xml::data_node *pare
ef_node->set_attribute("type", audio_effect::effect_names[e->type()]);
e->config_save(ef_node);
}
+
+ util::xml::data_node *const rs_node = parentnode->add_child("resampler", nullptr);
+ rs_node->set_attribute_int("type", m_resampler_type);
+ rs_node->set_attribute_float("hq_latency", m_resampler_hq_latency);
+ rs_node->set_attribute_int("hq_length", m_resampler_hq_length);
+ rs_node->set_attribute_int("hq_phases", m_resampler_hq_phases);
break;
}
@@ -2390,7 +2411,7 @@ void sound_manager::mapping_update()
u64 sound_manager::rate_and_time_to_index(attotime time, u32 sample_rate) const
{
- return time.m_seconds * sample_rate + ((time.m_attoseconds / 100'000'000) * sample_rate) / 10'000'000'000LL;
+ return time.m_seconds * sample_rate + ((time.m_attoseconds / 100'000'000) * sample_rate) / 10'000'000'000LL; //'
}
void sound_manager::update(s32)
@@ -2456,20 +2477,77 @@ void sound_manager::streams_update()
machine().osd().add_audio_to_recording(m_record_buffer.data(), m_record_samples);
machine().video().add_sound_to_recording(m_record_buffer.data(), m_record_samples);
if(m_wavfile)
- util::wav_add_data_16(*m_wavfile, m_record_buffer.data(), m_record_samples);
+ util::wav_add_data_16(*m_wavfile, m_record_buffer.data(), m_record_samples * m_outputs_count);
m_effects_condition.notify_all();
}
//**// Resampler management
-
const audio_resampler *sound_manager::get_resampler(u32 fs, u32 ft)
{
auto key = std::make_pair(fs, ft);
auto i = m_resamplers.find(key);
if(i != m_resamplers.end())
return i->second.get();
- auto *res = new audio_resampler(fs, ft);
+
+ audio_resampler *res;
+ if(m_resampler_type == RESAMPLER_HQ)
+ res = new audio_resampler_hq(fs, ft, m_resampler_hq_latency, m_resampler_hq_length, m_resampler_hq_phases);
+ else
+ res = new audio_resampler_lofi(fs, ft);
m_resamplers[key].reset(res);
return res;
}
+
+void sound_manager::rebuild_all_resamplers()
+{
+ m_resamplers.clear();
+
+ for(auto &stream : m_stream_list)
+ stream->create_resamplers();
+
+ for(auto &stream : m_stream_list)
+ stream->lookup_history_sizes();
+}
+
+void sound_manager::set_resampler_type(u32 type)
+{
+ if(type != m_resampler_type) {
+ m_resampler_type = type;
+ rebuild_all_resamplers();
+ }
+}
+
+void sound_manager::set_resampler_hq_latency(double latency)
+{
+ if(latency != m_resampler_hq_latency) {
+ m_resampler_hq_latency = latency;
+ rebuild_all_resamplers();
+ }
+}
+
+void sound_manager::set_resampler_hq_length(u32 length)
+{
+ if(length != m_resampler_hq_length) {
+ m_resampler_hq_length = length;
+ rebuild_all_resamplers();
+ }
+}
+
+void sound_manager::set_resampler_hq_phases(u32 phases)
+{
+ if(phases != m_resampler_hq_phases) {
+ m_resampler_hq_phases = phases;
+ rebuild_all_resamplers();
+ }
+}
+
+const char *sound_manager::resampler_type_names(u32 type) const
+{
+ using util::lang_translate;
+
+ if(type == RESAMPLER_HQ)
+ return _("HQ");
+ else
+ return _("LoFi");
+}
diff --git a/src/emu/sound.h b/src/emu/sound.h
index 8039948362b..57c96683f0a 100644
--- a/src/emu/sound.h
+++ b/src/emu/sound.h
@@ -1,5 +1,5 @@
// license:BSD-3-Clause
-// copyright-holders:Aaron Giles
+// copyright-holders:O. Galibert, Aaron Giles
/***************************************************************************
sound.h
@@ -35,7 +35,7 @@
For example, if you have a 10Hz clock, and call stream.update() at
t=0.91, it will compute 10 samples (for clock edges 0.0, 0.1, 0.2,
..., 0.7, 0.8, and 0.9). And then if you ask the stream what its
- current end time is (via stream.sample_time()), it will say t=1.0,
+ current end time is (via stream.end_time()), it will say t=1.0,
which is in the future, because it knows it will hold that last
sample until 1.0s.
@@ -210,11 +210,9 @@ public:
// sample id and timing of the first and last sample of the current update block, and first of the next sample block
u64 start_index() const { return m_output_buffer.write_sample(); }
- u64 end_index() const { return m_output_buffer.write_sample() + samples() - 1; }
- u64 sample_index() const { return m_output_buffer.write_sample() + samples(); }
+ u64 end_index() const { return m_output_buffer.write_sample() + samples(); }
attotime start_time() const { return sample_to_time(start_index()); }
attotime end_time() const { return sample_to_time(end_index()); }
- attotime sample_time() const { return sample_to_time(sample_index()); }
// convert from absolute sample index to time
attotime sample_to_time(u64 index) const;
@@ -379,6 +377,11 @@ class sound_manager
public:
using sample_t = sound_stream::sample_t;
+ enum {
+ RESAMPLER_LOFI,
+ RESAMPLER_HQ
+ };
+
struct mapping {
struct node_mapping {
u32 m_node;
@@ -465,6 +468,18 @@ public:
void mapping_update();
+ const char *resampler_type_names(u32 type) const;
+
+ u32 resampler_type() const { return m_resampler_type; }
+ double resampler_hq_latency() const { return m_resampler_hq_latency; }
+ u32 resampler_hq_length() const { return m_resampler_hq_length; }
+ u32 resampler_hq_phases() const { return m_resampler_hq_phases; }
+
+ void set_resampler_type(u32 type);
+ void set_resampler_hq_latency(double latency);
+ void set_resampler_hq_length(u32 length);
+ void set_resampler_hq_phases(u32 phases);
+
private:
struct effect_step {
std::unique_ptr<audio_effect> m_effect;
@@ -583,7 +598,7 @@ private:
void update_osd_streams();
void update_osd_input();
void speakers_update(attotime endtime);
-
+ void rebuild_all_resamplers();
void run_effects();
u64 rate_and_time_to_index(attotime time, u32 sample_rate) const;
@@ -642,6 +657,11 @@ private:
std::vector<std::unique_ptr<sound_stream>> m_stream_list; // list of streams
std::vector<sound_stream *> m_ordered_streams; // Streams in update order
u32 m_outputs_count;
+
+ // resampler data
+ u32 m_resampler_type;
+ double m_resampler_hq_latency;
+ u32 m_resampler_hq_length, m_resampler_hq_phases;
};
diff --git a/src/frontend/mame/ui/audioeffects.cpp b/src/frontend/mame/ui/audioeffects.cpp
index 6ac84e22954..eb94667f99f 100644
--- a/src/frontend/mame/ui/audioeffects.cpp
+++ b/src/frontend/mame/ui/audioeffects.cpp
@@ -32,9 +32,64 @@ menu_audio_effects::~menu_audio_effects()
{
}
+double menu_audio_effects::change_f(const double *table, double value, int change)
+{
+ u32 bi = 0;
+ double dt = 1e300;
+ u32 index;
+ for(index = 0; table[index]; index++) {
+ double d1 = value - table[index];
+ if(d1 < 0)
+ d1 = -d1;
+ if(d1 < dt) {
+ dt = d1;
+ bi = index;
+ }
+ }
+ if((change != -1 || bi != 0) && (change != 1 || bi != index-1))
+ bi += change;
+ return table[bi];
+}
+
+u32 menu_audio_effects::change_u32(const u32 *table, u32 value, int change)
+{
+ u32 bi = 0;
+ s32 dt = 2e9;
+ u32 index;
+ for(index = 0; table[index]; index++) {
+ s32 d1 = value - table[index];
+ if(d1 < 0)
+ d1 = -d1;
+ if(d1 < dt) {
+ dt = d1;
+ bi = index;
+ }
+ }
+ if((change != -1 || bi != 0) && (change != 1 || bi != index-1))
+ bi += change;
+ return table[bi];
+}
+
bool menu_audio_effects::handle(event const *ev)
{
- if(ev && (ev->iptkey == IPT_UI_SELECT)) {
+ static const double latencies[] = {
+ 0.0005, 0.0010, 0.0025, 0.0050, 0.0100, 0.0250, 0.0500, 0
+ };
+
+ static const u32 lengths[] = {
+ 10, 20, 30, 40, 50, 75, 100, 200, 300, 400, 500, 0
+ };
+
+ static const u32 phases[] = {
+ 10, 20, 30, 40, 50, 75, 100, 200, 300, 400, 500, 1000, 0
+ };
+
+
+ if(!ev)
+ return false;
+
+ switch(ev->iptkey) {
+ case IPT_UI_SELECT: {
u16 chain = (uintptr_t(ev->itemref)) >> 16;
u16 entry = (uintptr_t(ev->itemref)) & 0xffff;
audio_effect *eff = chain == 0xffff ? machine().sound().default_effect_chain()[entry] : machine().sound().effect_chain(chain)[entry];
@@ -50,10 +105,146 @@ bool menu_audio_effects::handle(event const *ev)
return true;
}
+ case IPT_UI_CLEAR: {
+ switch(uintptr_t(ev->itemref)) {
+ case RS_TYPE:
+ machine().sound().set_resampler_type(sound_manager::RESAMPLER_LOFI);
+ reset(reset_options::REMEMBER_POSITION);
+ return true;
+
+ case RS_LATENCY:
+ machine().sound().set_resampler_hq_latency(0.005);
+ reset(reset_options::REMEMBER_POSITION);
+ return true;
+
+ case RS_LENGTH:
+ machine().sound().set_resampler_hq_length(400);
+ reset(reset_options::REMEMBER_POSITION);
+ return true;
+
+ case RS_PHASES:
+ machine().sound().set_resampler_hq_phases(200);
+ reset(reset_options::REMEMBER_POSITION);
+ return true;
+ }
+ break;
+ }
+
+ case IPT_UI_LEFT: {
+ switch(uintptr_t(ev->itemref)) {
+ case RS_TYPE:
+ machine().sound().set_resampler_type(sound_manager::RESAMPLER_LOFI);
+ reset(reset_options::REMEMBER_POSITION);
+ return true;
+
+ case RS_LATENCY:
+ machine().sound().set_resampler_hq_latency(change_f(latencies, machine().sound().resampler_hq_latency(), -1));
+ reset(reset_options::REMEMBER_POSITION);
+ return true;
+
+ case RS_LENGTH:
+ machine().sound().set_resampler_hq_length(change_u32(lengths, machine().sound().resampler_hq_length(), -1));
+ reset(reset_options::REMEMBER_POSITION);
+ return true;
+
+ case RS_PHASES:
+ machine().sound().set_resampler_hq_phases(change_u32(phases, machine().sound().resampler_hq_phases(), -1));
+ reset(reset_options::REMEMBER_POSITION);
+ return true;
+ }
+ break;
+ }
+
+ case IPT_UI_RIGHT: {
+ switch(uintptr_t(ev->itemref)) {
+ case RS_TYPE:
+ machine().sound().set_resampler_type(sound_manager::RESAMPLER_HQ);
+ reset(reset_options::REMEMBER_POSITION);
+ return true;
+
+ case RS_LATENCY:
+ machine().sound().set_resampler_hq_latency(change_f(latencies, machine().sound().resampler_hq_latency(), 1));
+ reset(reset_options::REMEMBER_POSITION);
+ return true;
+
+ case RS_LENGTH:
+ machine().sound().set_resampler_hq_length(change_u32(lengths, machine().sound().resampler_hq_length(), 1));
+ reset(reset_options::REMEMBER_POSITION);
+ return true;
+
+ case RS_PHASES:
+ machine().sound().set_resampler_hq_phases(change_u32(phases, machine().sound().resampler_hq_phases(), 1));
+ reset(reset_options::REMEMBER_POSITION);
+ return true;
+ }
+ break;
+ }
+ }
+
return false;
}
+std::string menu_audio_effects::format_lat(double latency)
+{
+ return util::string_format("%3.1fms", 1000*latency);
+}
+
+std::string menu_audio_effects::format_u32(u32 val)
+{
+ return util::string_format("%u", val);
+}
+
+u32 menu_audio_effects::flag_type() const
+{
+ u32 flag = 0;
+ u32 type = machine().sound().resampler_type();
+ if(type != sound_manager::RESAMPLER_LOFI)
+ flag |= FLAG_LEFT_ARROW;
+ if(type != sound_manager::RESAMPLER_HQ)
+ flag |= FLAG_RIGHT_ARROW;
+ return flag;
+}
+
+u32 menu_audio_effects::flag_lat() const
+{
+ u32 flag = 0;
+ double latency = machine().sound().resampler_hq_latency();
+ if(latency > 0.0005)
+ flag |= FLAG_LEFT_ARROW;
+ if(latency < 0.0500)
+ flag |= FLAG_RIGHT_ARROW;
+ if(machine().sound().resampler_type() != sound_manager::RESAMPLER_HQ)
+ flag |= FLAG_INVERT | FLAG_DISABLE;
+ return flag;
+}
+
+u32 menu_audio_effects::flag_length() const
+{
+ u32 flag = 0;
+ double latency = machine().sound().resampler_hq_length();
+ if(latency > 10)
+ flag |= FLAG_LEFT_ARROW;
+ if(latency < 500)
+ flag |= FLAG_RIGHT_ARROW;
+ if(machine().sound().resampler_type() != sound_manager::RESAMPLER_HQ)
+ flag |= FLAG_INVERT | FLAG_DISABLE;
+ return flag;
+}
+
+u32 menu_audio_effects::flag_phases() const
+{
+ u32 flag = 0;
+ double latency = machine().sound().resampler_hq_phases();
+ if(latency > 10)
+ flag |= FLAG_LEFT_ARROW;
+ if(latency < 1000)
+ flag |= FLAG_RIGHT_ARROW;
+ if(machine().sound().resampler_type() != sound_manager::RESAMPLER_HQ)
+ flag |= FLAG_INVERT | FLAG_DISABLE;
+ return flag;
+}
+
void menu_audio_effects::populate()
{
auto &sound = machine().sound();
@@ -68,6 +259,12 @@ void menu_audio_effects::populate()
auto eff = sound.default_effect_chain();
for(u32 e = 0; e != eff.size(); e++)
item_append(_(audio_effect::effect_names[eff[e]->type()]), 0, (void *)intptr_t((0xffff << 16) | e));
+
+ item_append(_("Resampler"), FLAG_UI_HEADING | FLAG_DISABLE, nullptr);
+ item_append(_("Type"), sound.resampler_type_names(sound.resampler_type()), flag_type(), (void *)RS_TYPE);
+ item_append(_("HQ latency"), format_lat(sound.resampler_hq_latency()), flag_lat(), (void *)RS_LATENCY);
+ item_append(_("HQ filter max size"), format_u32(sound.resampler_hq_length()), flag_length(), (void *)RS_LENGTH);
+ item_append(_("HQ filter max phases"), format_u32(sound.resampler_hq_phases()), flag_phases(), (void *)RS_PHASES);
item_append(menu_item_type::SEPARATOR);
}
diff --git a/src/frontend/mame/ui/audioeffects.h b/src/frontend/mame/ui/audioeffects.h
index 1ee15da82f9..f61d82fe825 100644
--- a/src/frontend/mame/ui/audioeffects.h
+++ b/src/frontend/mame/ui/audioeffects.h
@@ -31,8 +31,21 @@ protected:
virtual void menu_deactivated() override;
private:
+ enum { RS_TYPE, RS_LATENCY, RS_LENGTH, RS_PHASES };
+
virtual void populate() override;
virtual bool handle(event const *ev) override;
+
+ u32 flag_type() const;
+ u32 flag_lat() const;
+ u32 flag_length() const;
+ u32 flag_phases() const;
+
+ static double change_f(const double *table, double value, int change);
+ static u32 change_u32(const u32 *table, u32 value, int change);
+
+ static std::string format_lat(double latency);
+ static std::string format_u32(u32 val);
};
} // namespace ui
diff --git a/src/mame/bmc/bmcpokr.cpp b/src/mame/bmc/bmcpokr.cpp
index 95c0ec5808e..5b94ac115a4 100644
--- a/src/mame/bmc/bmcpokr.cpp
+++ b/src/mame/bmc/bmcpokr.cpp
@@ -681,7 +681,7 @@ static INPUT_PORTS_START( bmcpokr )
PORT_DIPNAME( 0x01, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("DIP1:1")
PORT_DIPSETTING( 0x00, DEF_STR( Yes ) )
PORT_DIPSETTING( 0x01, DEF_STR( No ) )
- PORT_DIPNAME( 0x02, 0x00, "Double-Up Game" ) PORT_DIPLOCATION("DIP1:2")
+ PORT_DIPNAME( 0x02, 0x00, "Double Up Game" ) PORT_DIPLOCATION("DIP1:2")
PORT_DIPSETTING( 0x00, DEF_STR( Yes ) )
PORT_DIPSETTING( 0x02, DEF_STR( No ) )
PORT_DIPNAME( 0x04, 0x00, "Slot Machine" ) PORT_DIPLOCATION("DIP1:3")
@@ -719,7 +719,7 @@ static INPUT_PORTS_START( bmcpokr )
PORT_DIPSETTING( 0x01, "97" )
PORT_DIPSETTING( 0x03, "98" )
PORT_DIPSETTING( 0x00, "99" )
- PORT_DIPNAME( 0x0c, 0x0c, "Double-Up Rate" ) PORT_DIPLOCATION("DIP3:3,4")
+ PORT_DIPNAME( 0x0c, 0x0c, "Double Up Rate" ) PORT_DIPLOCATION("DIP3:3,4")
PORT_DIPSETTING( 0x08, "93" )
PORT_DIPSETTING( 0x04, "94" )
PORT_DIPSETTING( 0x00, "95" )
@@ -780,21 +780,21 @@ static INPUT_PORTS_START( mjmaglmp )
PORT_START("DSW1")
PORT_DIPNAME( 0x01, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("DIP1:1")
- PORT_DIPSETTING( 0x01, DEF_STR( No ) )
- PORT_DIPSETTING( 0x00, DEF_STR( Yes ) )
- PORT_DIPNAME( 0x02, 0x00, "Double-Up Game" ) PORT_DIPLOCATION("DIP1:2")
- PORT_DIPSETTING( 0x02, DEF_STR( No ) )
- PORT_DIPSETTING( 0x00, DEF_STR( Yes ) )
+ PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x02, 0x00, "Double Up Game" ) PORT_DIPLOCATION("DIP1:2")
+ PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x04, 0x04, "Coin Sw. Function" ) PORT_DIPLOCATION("DIP1:3")
PORT_DIPSETTING( 0x00, "Coin" )
PORT_DIPSETTING( 0x04, "Note" )
PORT_DIPNAME( 0x08, 0x08, "Pay Sw. Function" ) PORT_DIPLOCATION("DIP1:4")
PORT_DIPSETTING( 0x00, "Pay-Out" )
- PORT_DIPSETTING( 0x08, "Key-Down" )
+ PORT_DIPSETTING( 0x08, "Key-Out" )
PORT_DIPNAME( 0x10, 0x10, "Game Hint" ) PORT_DIPLOCATION("DIP1:5")
PORT_DIPSETTING( 0x10, DEF_STR( No ) )
PORT_DIPSETTING( 0x00, DEF_STR( Yes ) )
- PORT_DIPNAME( 0x20, 0x20, "Direct Double" ) PORT_DIPLOCATION("DIP1:6")
+ PORT_DIPNAME( 0x20, 0x20, "Direct Double Up" ) PORT_DIPLOCATION("DIP1:6")
PORT_DIPSETTING( 0x20, DEF_STR( No ) )
PORT_DIPSETTING( 0x00, DEF_STR( Yes ) )
PORT_DIPNAME( 0x40, 0x40, "Coin Acceptor" ) PORT_DIPLOCATION("DIP1:7")
@@ -822,42 +822,42 @@ static INPUT_PORTS_START( mjmaglmp )
PORT_DIPUNKNOWN_DIPLOC( 0x80, 0x80, "DIP2:8" )
PORT_START("DSW3")
- PORT_DIPNAME( 0x03, 0x03, "Pay-Out Rate" ) PORT_DIPLOCATION("DIP3:1,2")
- PORT_DIPSETTING( 0x02, "75" )
- PORT_DIPSETTING( 0x01, "82" )
- PORT_DIPSETTING( 0x03, "85" )
- PORT_DIPSETTING( 0x00, "88" )
- PORT_DIPNAME( 0x0c, 0x0c, "Double-Up Rate" ) PORT_DIPLOCATION("DIP3:3,4")
- PORT_DIPSETTING( 0x08, "95" )
- PORT_DIPSETTING( 0x04, "96" )
- PORT_DIPSETTING( 0x00, "97" )
- PORT_DIPSETTING( 0x0c, "98" )
- PORT_DIPNAME( 0x30, 0x30, "Game Enhance Type" ) PORT_DIPLOCATION("DIP3:5,6")
+ PORT_DIPNAME( 0x03, 0x03, "Payout Rate" ) PORT_DIPLOCATION("DIP3:1,2")
+ PORT_DIPSETTING( 0x02, "75%" )
+ PORT_DIPSETTING( 0x01, "82%" )
+ PORT_DIPSETTING( 0x03, "85%" )
+ PORT_DIPSETTING( 0x00, "88%" )
+ PORT_DIPNAME( 0x0c, 0x0c, "Double Up Game Payout Rate" ) PORT_DIPLOCATION("DIP3:3,4")
+ PORT_DIPSETTING( 0x08, "95%" )
+ PORT_DIPSETTING( 0x04, "96%" )
+ PORT_DIPSETTING( 0x00, "97%" )
+ PORT_DIPSETTING( 0x0c, "98%" )
+ PORT_DIPNAME( 0x30, 0x30, "Game Enhance Type" ) PORT_DIPLOCATION("DIP3:5,6")
PORT_DIPSETTING( 0x10, "Small" )
PORT_DIPSETTING( 0x00, "Big" )
PORT_DIPSETTING( 0x30, "Normal" )
PORT_DIPSETTING( 0x20, "Bonus" )
- PORT_DIPNAME( 0xc0, 0xc0, "Credit Limit" ) PORT_DIPLOCATION("DIP3:7,8")
+ PORT_DIPNAME( 0xc0, 0xc0, "Credit Limit" ) PORT_DIPLOCATION("DIP3:7,8")
PORT_DIPSETTING( 0x00, "300" )
PORT_DIPSETTING( 0x80, "500" )
PORT_DIPSETTING( 0x40, "1000" )
PORT_DIPSETTING( 0xc0, "2000" )
PORT_START("DSW4")
- PORT_DIPNAME( 0x01, 0x01, "Max Bet" ) PORT_DIPLOCATION("DIP4:1")
+ PORT_DIPNAME( 0x01, 0x01, "Maximum Bet" ) PORT_DIPLOCATION("DIP4:1")
PORT_DIPSETTING( 0x01, "10" )
PORT_DIPSETTING( 0x00, "20" )
- PORT_DIPNAME( 0x06, 0x06, "Min Bet" ) PORT_DIPLOCATION("DIP4:2,3")
+ PORT_DIPNAME( 0x06, 0x06, "Minimum Bet" ) PORT_DIPLOCATION("DIP4:2,3")
PORT_DIPSETTING( 0x00, "1" )
PORT_DIPSETTING( 0x06, "3" )
PORT_DIPSETTING( 0x04, "6" )
PORT_DIPSETTING( 0x02, "9" )
- PORT_DIPNAME( 0x18, 0x18, DEF_STR( Coinage ) ) PORT_DIPLOCATION("DIP4:4,5")
+ PORT_DIPNAME( 0x18, 0x18, DEF_STR( Coinage ) ) PORT_DIPLOCATION("DIP4:4,5")
PORT_DIPSETTING( 0x00, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x18, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x10, DEF_STR( 1C_2C ) )
PORT_DIPSETTING( 0x08, DEF_STR( 1C_3C ) )
- PORT_DIPNAME( 0x60, 0x60, "Credits Per Key-In" ) PORT_DIPLOCATION("DIP4:6,7")
+ PORT_DIPNAME( 0x60, 0x60, "Credits Per Key-In" ) PORT_DIPLOCATION("DIP4:6,7")
PORT_DIPSETTING( 0x40, "5" )
PORT_DIPSETTING( 0x60, "10" )
PORT_DIPSETTING( 0x20, "50" )
@@ -889,92 +889,95 @@ static INPUT_PORTS_START( fengyunh )
MAHJONG_KEYS_COMMON("DSW3", 0x01)
PORT_START("DSW1")
- PORT_DIPNAME( 0x01, 0x01, "Max Bet" ) PORT_DIPLOCATION("DIP4:1") // 最大押分
+ PORT_DIPNAME( 0x01, 0x01, "Maximum Bet" ) PORT_DIPLOCATION("DIP4:1") // 最大押分
PORT_DIPSETTING( 0x01, "10" )
PORT_DIPSETTING( 0x00, "20" )
- PORT_DIPNAME( 0x06, 0x06, "Min Bet" ) PORT_DIPLOCATION("DIP4:2,3") // 最小押分
+ PORT_DIPNAME( 0x06, 0x06, "Minimum Bet" ) PORT_DIPLOCATION("DIP4:2,3") // 最小押分
PORT_DIPSETTING( 0x00, "1" )
PORT_DIPSETTING( 0x04, "3" )
PORT_DIPSETTING( 0x06, "6" )
PORT_DIPSETTING( 0x02, "9" )
- PORT_DIPNAME( 0x18, 0x18, DEF_STR( Coinage ) ) PORT_DIPLOCATION("DIP4:4,5") // 投幣單位
- PORT_DIPSETTING( 0x18, DEF_STR( 1C_1C ) )
- PORT_DIPSETTING( 0x10, DEF_STR( 1C_2C ) )
- PORT_DIPSETTING( 0x08, DEF_STR( 1C_3C ) )
- PORT_DIPSETTING( 0x00, DEF_STR( 1C_5C ) )
- PORT_DIPNAME( 0x60, 0x60, "Credits Per Key-In" ) PORT_DIPLOCATION("DIP4:6,7") // 開分單位
+ PORT_DIPNAME( 0x18, 0x18, DEF_STR(Coinage) ) PORT_DIPLOCATION("DIP4:4,5") // 投幣單位
+ PORT_DIPSETTING( 0x18, DEF_STR(1C_1C) )
+ PORT_DIPSETTING( 0x10, DEF_STR(1C_2C) )
+ PORT_DIPSETTING( 0x08, DEF_STR(1C_3C) )
+ PORT_DIPSETTING( 0x00, DEF_STR(1C_5C) )
+ PORT_DIPNAME( 0x60, 0x60, "Key-In Unit" ) PORT_DIPLOCATION("DIP4:6,7") // 開分單位
PORT_DIPSETTING( 0x40, "5" )
PORT_DIPSETTING( 0x60, "10" )
PORT_DIPSETTING( 0x20, "50" )
PORT_DIPSETTING( 0x00, "100" )
- PORT_DIPNAME( 0x80, 0x80, "Score Display Mode" ) PORT_DIPLOCATION("DIP4:8") // 計分方式 (sets how points, credits, bets, etc. are displayed)
- PORT_DIPSETTING( 0x80, "Numbers" ) // 數字 (Arabic numerals)
- PORT_DIPSETTING( 0x00, "Circle Tiles" ) // 筒子 (tong mahjong tiles representing digits)
+ PORT_DIPNAME( 0x80, 0x80, "Score Display Mode" ) PORT_DIPLOCATION("DIP4:8") // 計分方式 (sets how points, credits, bets, etc. are displayed)
+ PORT_DIPSETTING( 0x80, "Numbers" ) // 數字 (Arabic numerals)
+ PORT_DIPSETTING( 0x00, "Circle Tiles" ) // 筒子 (tong mahjong tiles representing digits)
PORT_START("DSW2")
- PORT_DIPNAME( 0x03, 0x03, "Pay-Out Rate" ) PORT_DIPLOCATION("DIP3:1,2") // 遊戲機率
- PORT_DIPSETTING( 0x02, "75" )
- PORT_DIPSETTING( 0x01, "78" )
- PORT_DIPSETTING( 0x03, "80" )
- PORT_DIPSETTING( 0x00, "85" )
- PORT_DIPNAME( 0x0c, 0x0c, "Double-Up Rate" ) PORT_DIPLOCATION("DIP3:3,4") // 比倍機率
- PORT_DIPSETTING( 0x08, "95" )
- PORT_DIPSETTING( 0x04, "96" )
- PORT_DIPSETTING( 0x00, "97" )
- PORT_DIPSETTING( 0x0c, "98" )
- PORT_DIPUNKNOWN_DIPLOC( 0x10, 0x10, "DIP3:5" ) // 出牌方式
- PORT_DIPUNKNOWN_DIPLOC( 0x20, 0x20, "DIP3:6" ) // "
- PORT_DIPNAME( 0xc0, 0xc0, "Credit Limit" ) PORT_DIPLOCATION("DIP3:7,8")
+ PORT_DIPNAME( 0x03, 0x03, "Payout Rate" ) PORT_DIPLOCATION("DIP3:1,2") // 遊戲機率
+ PORT_DIPSETTING( 0x02, "75%" )
+ PORT_DIPSETTING( 0x01, "78%" )
+ PORT_DIPSETTING( 0x03, "80%" )
+ PORT_DIPSETTING( 0x00, "85%" )
+ PORT_DIPNAME( 0x0c, 0x0c, "Double Up Game Payout Rate" ) PORT_DIPLOCATION("DIP3:3,4") // 比倍機率
+ PORT_DIPSETTING( 0x08, "95%" )
+ PORT_DIPSETTING( 0x04, "96%" )
+ PORT_DIPSETTING( 0x00, "97%" )
+ PORT_DIPSETTING( 0x0c, "98%" )
+ PORT_DIPNAME( 0x30, 0x30, "Deal Mode" ) PORT_DIPLOCATION("DIP3:5,6") // 出牌方式
+ PORT_DIPSETTING( 0x30, DEF_STR(Normal) ) // 正常
+ PORT_DIPSETTING( 0x20, "Increase Manguan" ) // 滿貫加強
+ PORT_DIPSETTING( 0x10, "Increase Xiaopai" ) // 小牌加強
+ PORT_DIPSETTING( 0x00, "Increase Dapai" ) // 大牌加強
+ PORT_DIPNAME( 0xc0, 0xc0, "Credit Limit" ) PORT_DIPLOCATION("DIP3:7,8") // 破台限制
PORT_DIPSETTING( 0x80, "500" )
PORT_DIPSETTING( 0x40, "1000" )
PORT_DIPSETTING( 0xc0, "2000" )
PORT_DIPSETTING( 0x00, "3000" )
PORT_START("DSW3")
- PORT_DIPNAME( 0x01, 0x01, DEF_STR( Controls ) ) PORT_DIPLOCATION("DIP2:1") // not displayed in test mode
+ PORT_DIPNAME( 0x01, 0x01, DEF_STR(Controls) ) PORT_DIPLOCATION("DIP2:1") // not displayed in test mode
PORT_DIPSETTING( 0x01, "Keyboard" )
- PORT_DIPSETTING( 0x00, DEF_STR( Joystick ) )
- PORT_DIPNAME( 0x02, 0x02, "Key-In Limit" ) PORT_DIPLOCATION("DIP2:2") // 開分限制
+ PORT_DIPSETTING( 0x00, DEF_STR(Joystick) )
+ PORT_DIPNAME( 0x02, 0x02, "Key-In Limit" ) PORT_DIPLOCATION("DIP2:2") // 開分限制
PORT_DIPSETTING( 0x02, "1000" )
PORT_DIPSETTING( 0x00, "5000" )
- PORT_DIPNAME( 0x04, 0x04, "Jackpot" ) PORT_DIPLOCATION("DIP2:3") // 累積彩金
+ PORT_DIPNAME( 0x04, 0x04, "Jackpot" ) PORT_DIPLOCATION("DIP2:3") // 累積彩金
PORT_DIPSETTING( 0x00, "50" )
PORT_DIPSETTING( 0x04, "100" )
- PORT_DIPNAME( 0x18, 0x18, "Double Over / Round Bonus" ) PORT_DIPLOCATION("DIP2:4,5")
+ PORT_DIPNAME( 0x18, 0x18, "Double Over / Round Bonus" ) PORT_DIPLOCATION("DIP2:4,5") // 比倍破台/比倍贈分
PORT_DIPSETTING( 0x10, "100 / 10" )
PORT_DIPSETTING( 0x18, "200 / 10" )
PORT_DIPSETTING( 0x08, "300 / 15" )
PORT_DIPSETTING( 0x00, "500 / 25" )
- PORT_DIPNAME( 0x60, 0x60, "Credits Per Key-Out" ) PORT_DIPLOCATION("DIP2:6,7") // 洗分單位
+ PORT_DIPNAME( 0x60, 0x60, "Credits Per Key-Out" ) PORT_DIPLOCATION("DIP2:6,7") // 洗分單位
PORT_DIPSETTING( 0x40, "10" )
PORT_DIPSETTING( 0x20, "20" )
PORT_DIPSETTING( 0x60, "30" )
PORT_DIPSETTING( 0x00, "50" )
- PORT_DIPUNKNOWN_DIPLOC( 0x80, 0x80, "DIP2:8" ) // not displayed in test mode
+ PORT_DIPUNKNOWN_DIPLOC( 0x80, 0x80, "DIP2:8" ) // not displayed in test mode
PORT_START("DSW4")
- PORT_DIPNAME( 0x01, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("DIP1:1") // not displayed in test mode
- PORT_DIPSETTING( 0x01, DEF_STR( No ) )
- PORT_DIPSETTING( 0x00, DEF_STR( Yes ) )
- PORT_DIPNAME( 0x02, 0x00, "Double-Up Game" ) PORT_DIPLOCATION("DIP1:2") // 比倍遊戲
- PORT_DIPSETTING( 0x02, DEF_STR( No ) ) // 無
- PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) // 有
- PORT_DIPNAME( 0x04, 0x04, "Credit Mode" ) PORT_DIPLOCATION("DIP1:3") // 進分方式 (sets coin input function)
- PORT_DIPSETTING( 0x04, "Key-In" ) // 開分
- PORT_DIPSETTING( 0x00, "Coin" ) // 投幣
- PORT_DIPNAME( 0x08, 0x08, "Payout Mode" ) PORT_DIPLOCATION("DIP1:4") // 退分方式
- PORT_DIPSETTING( 0x08, "Key-Out" ) // 洗分 (Pay Out key pays out score at Key-Out rate)
- PORT_DIPSETTING( 0x00, "Cash Out" ) // 退幣 (Pay Out key pays out score at rate set for coin input)
- PORT_DIPNAME( 0x10, 0x10, "Game Hint" ) PORT_DIPLOCATION("DIP1:5") // 吃碰提示
- PORT_DIPSETTING( 0x10, DEF_STR( No ) ) // 無
- PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) // 有
- PORT_DIPNAME( 0x20, 0x20, "Direct Double" ) PORT_DIPLOCATION("DIP1:6") // 直接比倍
- PORT_DIPSETTING( 0x20, DEF_STR( No ) ) // 無
- PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) // 有
- PORT_DIPNAME( 0x40, 0x40, "Coin Acceptor" ) PORT_DIPLOCATION("DIP1:7") // 投幣器
- PORT_DIPSETTING( 0x00, "Mechanical" ) // 機械式
- PORT_DIPSETTING( 0x40, "Electronic" ) // 電子式
- PORT_DIPUNKNOWN_DIPLOC( 0x80, 0x80, "DIP1:8" ) // not displayed in test mode
+ PORT_DIPNAME( 0x01, 0x00, DEF_STR(Demo_Sounds) ) PORT_DIPLOCATION("DIP1:1") // not displayed in test mode
+ PORT_DIPSETTING( 0x01, DEF_STR(Off) )
+ PORT_DIPSETTING( 0x00, DEF_STR(On) )
+ PORT_DIPNAME( 0x02, 0x00, "Double Up Game" ) PORT_DIPLOCATION("DIP1:2") // 比倍遊戲
+ PORT_DIPSETTING( 0x02, DEF_STR(Off) ) // 無
+ PORT_DIPSETTING( 0x00, DEF_STR(On) ) // 有
+ PORT_DIPNAME( 0x04, 0x04, "Credit Mode" ) PORT_DIPLOCATION("DIP1:3") // 進分方式 (sets coin input function)
+ PORT_DIPSETTING( 0x04, "Key-In" ) // 開分
+ PORT_DIPSETTING( 0x00, "Coin" ) // 投幣
+ PORT_DIPNAME( 0x08, 0x08, "Payout Mode" ) PORT_DIPLOCATION("DIP1:4") // 退分方式
+ PORT_DIPSETTING( 0x08, "Key-Out" ) // 洗分 (Pay Out key pays out score at Key-Out rate)
+ PORT_DIPSETTING( 0x00, "Return Coins" ) // 退幣 (Pay Out key pays out score at rate set for coin input)
+ PORT_DIPNAME( 0x10, 0x10, "Game Hint" ) PORT_DIPLOCATION("DIP1:5") // 吃碰提示
+ PORT_DIPSETTING( 0x10, DEF_STR( No ) ) // 無
+ PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) // 有
+ PORT_DIPNAME( 0x20, 0x20, "Direct Double Up" ) PORT_DIPLOCATION("DIP1:6") // 直接比倍
+ PORT_DIPSETTING( 0x20, DEF_STR( No ) ) // 無
+ PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) // 有
+ PORT_DIPNAME( 0x40, 0x40, "Coin Acceptor" ) PORT_DIPLOCATION("DIP1:7") // 投幣器
+ PORT_DIPSETTING( 0x00, "Mechanical" ) // 機械式
+ PORT_DIPSETTING( 0x40, "Electronic" ) // 電子式
+ PORT_DIPUNKNOWN_DIPLOC( 0x80, 0x80, "DIP1:8" ) // not displayed in test mode
// Credit Mode Payout Mode | Pay Out Rate Key Out Rate
// -----------------------------+------------------------------
@@ -988,95 +991,98 @@ static INPUT_PORTS_START( shendeng )
PORT_INCLUDE(fengyunh)
PORT_MODIFY("DSW1")
- PORT_DIPNAME( 0x01, 0x01, "Max Bet" ) PORT_DIPLOCATION("DIP4:1") // 最大押分
+ PORT_DIPNAME( 0x01, 0x01, "Maximum Bet" ) PORT_DIPLOCATION("DIP4:1") // 最大押分
PORT_DIPSETTING( 0x01, "10" )
PORT_DIPSETTING( 0x00, "20" )
- PORT_DIPNAME( 0x06, 0x06, "Min Bet" ) PORT_DIPLOCATION("DIP4:2,3") // 最小押分
+ PORT_DIPNAME( 0x06, 0x06, "Minimum Bet" ) PORT_DIPLOCATION("DIP4:2,3") // 最小押分
PORT_DIPSETTING( 0x06, "1" )
PORT_DIPSETTING( 0x04, "2" )
PORT_DIPSETTING( 0x02, "3" )
PORT_DIPSETTING( 0x00, "5" )
- PORT_DIPNAME( 0x18, 0x18, DEF_STR( Coinage ) ) PORT_DIPLOCATION("DIP4:4,5") // 投幣單位
- PORT_DIPSETTING( 0x00, DEF_STR( 2C_1C ) )
- PORT_DIPSETTING( 0x18, DEF_STR( 1C_1C ) )
- PORT_DIPSETTING( 0x10, DEF_STR( 1C_2C ) )
- PORT_DIPSETTING( 0x08, DEF_STR( 1C_3C ) )
- PORT_DIPNAME( 0x60, 0x60, "Credits Per Key-In" ) PORT_DIPLOCATION("DIP4:6,7") // 開分單位
+ PORT_DIPNAME( 0x18, 0x18, DEF_STR(Coinage) ) PORT_DIPLOCATION("DIP4:4,5") // 投幣單位
+ PORT_DIPSETTING( 0x00, DEF_STR(2C_1C) )
+ PORT_DIPSETTING( 0x18, DEF_STR(1C_1C) )
+ PORT_DIPSETTING( 0x10, DEF_STR(1C_2C) )
+ PORT_DIPSETTING( 0x08, DEF_STR(1C_3C) )
+ PORT_DIPNAME( 0x60, 0x60, "Key-In Unit" ) PORT_DIPLOCATION("DIP4:6,7") // 開分單位
PORT_DIPSETTING( 0x40, "5" )
PORT_DIPSETTING( 0x60, "10" )
PORT_DIPSETTING( 0x20, "50" )
PORT_DIPSETTING( 0x00, "100" )
- PORT_DIPNAME( 0x80, 0x80, "Score Display Mode" ) PORT_DIPLOCATION("DIP4:8") // 計分方式 (sets how points, credits, bets, etc. are displayed)
- PORT_DIPSETTING( 0x80, "Numbers" ) // 數字 (Arabic numerals)
- PORT_DIPSETTING( 0x00, "Bamboo Tiles" ) // 索子 (suo mahjong tiles representing digits)
+ PORT_DIPNAME( 0x80, 0x80, "Score Display Mode" ) PORT_DIPLOCATION("DIP4:8") // 計分方式 (sets how points, credits, bets, etc. are displayed)
+ PORT_DIPSETTING( 0x80, "Numbers" ) // 數字 (Arabic numerals)
+ PORT_DIPSETTING( 0x00, "Bamboo Tiles" ) // 索子 (suo mahjong tiles representing digits)
PORT_MODIFY("DSW2")
- PORT_DIPNAME( 0x03, 0x03, "Pay-Out Rate" ) PORT_DIPLOCATION("DIP3:1,2") // 遊戲機率
- PORT_DIPSETTING( 0x02, "82" )
- PORT_DIPSETTING( 0x01, "88" )
- PORT_DIPSETTING( 0x03, "90" )
- PORT_DIPSETTING( 0x00, "93" )
- PORT_DIPNAME( 0x0c, 0x0c, "Double-Up Rate" ) PORT_DIPLOCATION("DIP3:3,4") // 比倍機率
- PORT_DIPSETTING( 0x08, "93" )
- PORT_DIPSETTING( 0x04, "94" )
- PORT_DIPSETTING( 0x00, "95" )
- PORT_DIPSETTING( 0x0c, "96" )
- PORT_DIPUNKNOWN_DIPLOC( 0x10, 0x10, "DIP3:5" ) // 出牌方式
- PORT_DIPUNKNOWN_DIPLOC( 0x20, 0x20, "DIP3:6" ) // "
- PORT_DIPNAME( 0xc0, 0xc0, "Credit Limit" ) PORT_DIPLOCATION("DIP3:7,8")
+ PORT_DIPNAME( 0x03, 0x03, "Payout Rate" ) PORT_DIPLOCATION("DIP3:1,2") // 遊戲機率
+ PORT_DIPSETTING( 0x02, "82%" )
+ PORT_DIPSETTING( 0x01, "88%" )
+ PORT_DIPSETTING( 0x03, "90%" )
+ PORT_DIPSETTING( 0x00, "93%" )
+ PORT_DIPNAME( 0x0c, 0x0c, "Double Up Game Payout Rate" ) PORT_DIPLOCATION("DIP3:3,4") // 比倍機率
+ PORT_DIPSETTING( 0x08, "93%" )
+ PORT_DIPSETTING( 0x04, "94%" )
+ PORT_DIPSETTING( 0x00, "95%" )
+ PORT_DIPSETTING( 0x0c, "96%" )
+ PORT_DIPNAME( 0x30, 0x30, "Deal Mode" ) PORT_DIPLOCATION("DIP3:5,6") // 出牌方式
+ PORT_DIPSETTING( 0x30, DEF_STR(Normal) ) // 正常
+ PORT_DIPSETTING( 0x20, "Increase Zhima" ) // 芝麻加強
+ PORT_DIPSETTING( 0x10, "Increase Xiaopai" ) // 小牌加強
+ PORT_DIPSETTING( 0x00, "Increase Dapai" ) // 大牌加強
+ PORT_DIPNAME( 0xc0, 0xc0, "Credit Limit" ) PORT_DIPLOCATION("DIP3:7,8") // 破台限制
PORT_DIPSETTING( 0x80, "500" )
PORT_DIPSETTING( 0xc0, "1000" )
PORT_DIPSETTING( 0x40, "2000" )
PORT_DIPSETTING( 0x00, "3000" )
PORT_MODIFY("DSW3")
- PORT_DIPNAME( 0x01, 0x01, DEF_STR( Controls ) ) PORT_DIPLOCATION("DIP2:1") // not displayed in test mode
+ PORT_DIPNAME( 0x01, 0x01, DEF_STR(Controls) ) PORT_DIPLOCATION("DIP2:1") // not displayed in test mode
PORT_DIPSETTING( 0x01, "Keyboard" )
- PORT_DIPSETTING( 0x00, DEF_STR( Joystick ) )
- PORT_DIPNAME( 0x02, 0x02, "Key-In Limit" ) PORT_DIPLOCATION("DIP2:2") // 開分限制
+ PORT_DIPSETTING( 0x00, DEF_STR(Joystick) )
+ PORT_DIPNAME( 0x02, 0x02, "Key-In Limit" ) PORT_DIPLOCATION("DIP2:2") // 開分限制
PORT_DIPSETTING( 0x02, "1000" )
PORT_DIPSETTING( 0x00, "5000" )
- PORT_DIPNAME( 0x04, 0x04, "Jackpot" ) PORT_DIPLOCATION("DIP2:3") // 累積彩金
+ PORT_DIPNAME( 0x04, 0x04, "Jackpot" ) PORT_DIPLOCATION("DIP2:3") // 累積彩金
PORT_DIPSETTING( 0x00, "50" )
PORT_DIPSETTING( 0x04, "100" )
- PORT_DIPNAME( 0x18, 0x18, "Double Over / Round Bonus" ) PORT_DIPLOCATION("DIP2:4,5")
+ PORT_DIPNAME( 0x18, 0x18, "Double Over / Round Bonus" ) PORT_DIPLOCATION("DIP2:4,5") // 比倍破台/比倍贈分
PORT_DIPSETTING( 0x10, "100 / 10" )
PORT_DIPSETTING( 0x18, "200 / 10" )
PORT_DIPSETTING( 0x08, "300 / 15" )
PORT_DIPSETTING( 0x00, "500 / 25" )
- PORT_DIPNAME( 0xe0, 0xe0, "Cash Out Per Credit" ) PORT_DIPLOCATION("DIP2:6,7,8") // 彩票單位 (sets coins/tickets paid out per credit in cash out mode)
- PORT_DIPSETTING( 0xe0, "1" )
- PORT_DIPSETTING( 0xc0, "2" )
- PORT_DIPSETTING( 0xa0, "5" )
- PORT_DIPSETTING( 0x80, "6" )
- PORT_DIPSETTING( 0x60, "7" )
- PORT_DIPSETTING( 0x40, "8" )
- PORT_DIPSETTING( 0x20, "9" )
- PORT_DIPSETTING( 0x00, "10" )
+ PORT_DIPNAME( 0xe0, 0xe0, "Payout Unit" ) PORT_DIPLOCATION("DIP2:6,7,8") // 彩票單位 (sets coins/tickets paid out per credit in cash out mode)
+ PORT_DIPSETTING( 0xe0, DEF_STR(1C_1C) )
+ PORT_DIPSETTING( 0xc0, DEF_STR(2C_1C) )
+ PORT_DIPSETTING( 0xa0, DEF_STR(5C_1C) )
+ PORT_DIPSETTING( 0x80, DEF_STR(6C_1C) )
+ PORT_DIPSETTING( 0x60, DEF_STR(7C_1C) )
+ PORT_DIPSETTING( 0x40, DEF_STR(8C_1C) )
+ PORT_DIPSETTING( 0x20, DEF_STR(9C_1C) )
+ PORT_DIPSETTING( 0x00, "10 Coins/1 Credit" )
PORT_MODIFY("DSW4")
- PORT_DIPNAME( 0x01, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("DIP1:1") // not displayed in test mode
- PORT_DIPSETTING( 0x01, DEF_STR( No ) )
- PORT_DIPSETTING( 0x00, DEF_STR( Yes ) )
- PORT_DIPNAME( 0x02, 0x00, "Double-Up Game" ) PORT_DIPLOCATION("DIP1:2") // 比倍遊戲
- PORT_DIPSETTING( 0x02, DEF_STR( No ) ) // 無
- PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) // 有
- PORT_DIPNAME( 0x04, 0x04, "Credit Mode" ) PORT_DIPLOCATION("DIP1:3") // 進分方式 (sets coin input function)
- PORT_DIPSETTING( 0x04, "Key-In" ) // 開分
- PORT_DIPSETTING( 0x00, "Coin" ) // 投幣
- PORT_DIPNAME( 0x08, 0x08, "Payout Mode" ) PORT_DIPLOCATION("DIP1:4") // 退分方式
- PORT_DIPSETTING( 0x08, "Key-Out" ) // 洗分 (Pay Out key pays out score at rate set for coin input)
- PORT_DIPSETTING( 0x00, "Cash Out" ) // 退幣 (Pay Out key pays out score at cash out rate)
- PORT_DIPNAME( 0x10, 0x10, "Game Hint" ) PORT_DIPLOCATION("DIP1:5") // 吃碰提示
- PORT_DIPSETTING( 0x10, DEF_STR( No ) ) // 無
- PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) // 有
- PORT_DIPNAME( 0x20, 0x20, "Direct Double" ) PORT_DIPLOCATION("DIP1:6") // 直接比倍
- PORT_DIPSETTING( 0x20, DEF_STR( No ) ) // 無
- PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) // 有
- PORT_DIPNAME( 0x40, 0x40, "Coin Acceptor" ) PORT_DIPLOCATION("DIP1:7") // 投幣器
- PORT_DIPSETTING( 0x00, "Mechanical" ) // 機械式
- PORT_DIPSETTING( 0x40, "Electronic" ) // 電子式
- PORT_DIPUNKNOWN_DIPLOC( 0x80, 0x80, "DIP1:8" ) // not displayed in test mode
+ PORT_DIPNAME( 0x01, 0x00, DEF_STR(Demo_Sounds) ) PORT_DIPLOCATION("DIP1:1") // not displayed in test mode
+ PORT_DIPSETTING( 0x01, DEF_STR(Off) )
+ PORT_DIPSETTING( 0x00, DEF_STR(On) )
+ PORT_DIPNAME( 0x02, 0x00, "Double Up Game" ) PORT_DIPLOCATION("DIP1:2") // 比倍遊戲
+ PORT_DIPSETTING( 0x02, DEF_STR(Off) ) // 無
+ PORT_DIPSETTING( 0x00, DEF_STR(On) ) // 有
+ PORT_DIPNAME( 0x04, 0x04, "Credit Mode" ) PORT_DIPLOCATION("DIP1:3") // 進分方式 (sets coin input function)
+ PORT_DIPSETTING( 0x04, "Key-In" ) // 開分
+ PORT_DIPSETTING( 0x00, "Coin" ) // 投幣
+ PORT_DIPNAME( 0x08, 0x08, "Payout Mode" ) PORT_DIPLOCATION("DIP1:4") // 退分方式
+ PORT_DIPSETTING( 0x08, "Key-Out" ) // 洗分 (Pay Out key pays out score at rate set for coin input)
+ PORT_DIPSETTING( 0x00, "Return Coins" ) // 退幣 (Pay Out key pays out score at cash out rate)
+ PORT_DIPNAME( 0x10, 0x10, "Game Hint" ) PORT_DIPLOCATION("DIP1:5") // 吃碰提示
+ PORT_DIPSETTING( 0x10, DEF_STR( No ) ) // 無
+ PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) // 有
+ PORT_DIPNAME( 0x20, 0x20, "Direct Double Up" ) PORT_DIPLOCATION("DIP1:6") // 直接比倍
+ PORT_DIPSETTING( 0x20, DEF_STR( No ) ) // 無
+ PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) // 有
+ PORT_DIPNAME( 0x40, 0x40, "Coin Acceptor" ) PORT_DIPLOCATION("DIP1:7") // 投幣器
+ PORT_DIPSETTING( 0x00, "Mechanical" ) // 機械式
+ PORT_DIPSETTING( 0x40, "Electronic" ) // 電子式
+ PORT_DIPUNKNOWN_DIPLOC( 0x80, 0x80, "DIP1:8" ) // not displayed in test mode
// Credit Mode Payout Mode | Pay Out Rate Key Out Rate
// -----------------------------+------------------------------
@@ -1089,22 +1095,22 @@ INPUT_PORTS_END
static INPUT_PORTS_START( xyddzhh )
PORT_START("INPUTS")
// Entertainment controls:
- PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_START1 ) PORT_CONDITION("DSW2",0x01,EQUALS,0x00)
- PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_CONDITION("DSW2",0x01,EQUALS,0x00)
- PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_CONDITION("DSW2",0x01,EQUALS,0x00)
- PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_CONDITION("DSW2",0x01,EQUALS,0x00)
+ PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_START1 ) PORT_CONDITION("DSW2",0x01,EQUALS,0x00)
+ PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_CONDITION("DSW2",0x01,EQUALS,0x00)
+ PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_CONDITION("DSW2",0x01,EQUALS,0x00)
+ PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_CONDITION("DSW2",0x01,EQUALS,0x00)
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_CONDITION("DSW2",0x01,EQUALS,0x00)
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_CONDITION("DSW2",0x01,EQUALS,0x00) // choose
- PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_GAMBLE_KEYIN )
- PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT )
- PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Pay Out") PORT_CODE(KEYCODE_O)
- PORT_BIT( 0x0200, IP_ACTIVE_HIGH,IPT_CUSTOM ) PORT_READ_LINE_MEMBER(FUNC(bmcpokr_state::hopper_r)) // TODO: verify?
- PORT_SERVICE_NO_TOGGLE( 0x0400, IP_ACTIVE_LOW )
- PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_SERVICE1 )
- PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("DSW2",0x01,EQUALS,0x00) // no effect in test mode
- PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_GAMBLE_BET ) PORT_CONDITION("DSW2",0x01,EQUALS,0x00)
- PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_CONDITION("DSW2",0x01,EQUALS,0x00) // pass
- PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_COIN1 )
+ PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_GAMBLE_KEYIN )
+ PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT )
+ PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_CODE(KEYCODE_O)
+ PORT_BIT( 0x0200, IP_ACTIVE_HIGH,IPT_CUSTOM ) PORT_READ_LINE_MEMBER(FUNC(bmcpokr_state::hopper_r))
+ PORT_SERVICE_NO_TOGGLE( 0x0400, IP_ACTIVE_LOW )
+ PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_SERVICE1 )
+ PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("DSW2",0x01,EQUALS,0x00) // no effect in test mode
+ PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_CONDITION("DSW2",0x01,EQUALS,0x00) // bet
+ PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_CONDITION("DSW2",0x01,EQUALS,0x00) // pass
+ PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_COIN1 )
MAHJONG_KEYS_COMMON("DSW2", 0x01)
@@ -1113,22 +1119,22 @@ static INPUT_PORTS_START( xyddzhh )
// Maximum Bet is fixed to 40 according to test mode (no DIP determines it)
PORT_START("DSW1")
- PORT_DIPNAME( 0x01, 0x00, DEF_STR(Demo_Sounds) ) PORT_DIPLOCATION("DIP1:1")
- PORT_DIPSETTING( 0x01, DEF_STR(Off) )
- PORT_DIPSETTING( 0x00, DEF_STR(On) )
- PORT_DIPNAME( 0x02, 0x02, "Key-Out Rate" ) PORT_DIPLOCATION("DIP1:2")
- PORT_DIPSETTING( 0x02, "Key-In Rate" )
- PORT_DIPSETTING( 0x00, DEF_STR(Coinage) )
- PORT_DIPNAME( 0x04, 0x04, "Return Coins" ) PORT_DIPLOCATION("DIP1:3")
- PORT_DIPSETTING( 0x04, DEF_STR(No) )
- PORT_DIPSETTING( 0x00, DEF_STR(Yes) )
- PORT_DIPNAME( 0x08, 0x08, "Siren Sound" ) PORT_DIPLOCATION("DIP1:4")
- PORT_DIPSETTING( 0x00, DEF_STR(Off) )
- PORT_DIPSETTING( 0x08, DEF_STR(On) )
- PORT_DIPNAME( 0x10, 0x10, "Auto Pass" ) PORT_DIPLOCATION("DIP1:5")
- PORT_DIPSETTING( 0x00, DEF_STR(Off) )
- PORT_DIPSETTING( 0x10, DEF_STR(On) )
- PORT_DIPNAME( 0xe0, 0xe0, "Double-Up Game Jackpot" ) PORT_DIPLOCATION("DIP1:6,7,8")
+ PORT_DIPNAME( 0x01, 0x00, DEF_STR(Demo_Sounds) ) PORT_DIPLOCATION("DIP1:1") // 示範音樂
+ PORT_DIPSETTING( 0x01, DEF_STR(Off) ) // 無
+ PORT_DIPSETTING( 0x00, DEF_STR(On) ) // 有
+ PORT_DIPNAME( 0x02, 0x02, "Key-Out Rate" ) PORT_DIPLOCATION("DIP1:2") // 洗分錶同
+ PORT_DIPSETTING( 0x02, "Key-In Rate" ) // 開分
+ PORT_DIPSETTING( 0x00, DEF_STR(Coinage) ) // 投幣
+ PORT_DIPNAME( 0x04, 0x04, "Return Coins" ) PORT_DIPLOCATION("DIP1:3") // 退幣有無
+ PORT_DIPSETTING( 0x04, DEF_STR(No) ) // 無
+ PORT_DIPSETTING( 0x00, DEF_STR(Yes) ) // 有
+ PORT_DIPNAME( 0x08, 0x08, "Siren Sound" ) PORT_DIPLOCATION("DIP1:4") // 報警音效
+ PORT_DIPSETTING( 0x00, DEF_STR(Off) ) // 無
+ PORT_DIPSETTING( 0x08, DEF_STR(On) ) // 有
+ PORT_DIPNAME( 0x10, 0x10, "Auto Pass" ) PORT_DIPLOCATION("DIP1:5") // 自動PASS
+ PORT_DIPSETTING( 0x00, DEF_STR(Off) ) // 無
+ PORT_DIPSETTING( 0x10, DEF_STR(On) ) // 有
+ PORT_DIPNAME( 0xe0, 0xe0, "Double Up Game Jackpot" ) PORT_DIPLOCATION("DIP1:6,7,8") // 續玩破台
PORT_DIPSETTING( 0xc0, "5,000" )
PORT_DIPSETTING( 0xe0, "10,000" )
PORT_DIPSETTING( 0xa0, "15,000" )
@@ -1139,18 +1145,18 @@ static INPUT_PORTS_START( xyddzhh )
PORT_DIPSETTING( 0x00, "50,000" )
PORT_START("DSW2")
- PORT_DIPNAME( 0x01, 0x00, "Controls" ) PORT_DIPLOCATION("DIP2:1")
- PORT_DIPSETTING( 0x01, "Mahjong" )
- PORT_DIPSETTING( 0x00, "Entertainment" )
- PORT_DIPNAME( 0x06, 0x06, "Double-Up Game Threshold" ) PORT_DIPLOCATION("DIP2:2,3")
+ PORT_DIPNAME( 0x01, 0x00, "Controls" ) PORT_DIPLOCATION("DIP2:1") // 版本
+ PORT_DIPSETTING( 0x01, "Mahjong" ) // 麻將版
+ PORT_DIPSETTING( 0x00, DEF_STR(Joystick) ) // 娛樂版
+ PORT_DIPNAME( 0x06, 0x06, "Double Up Game Threshold" ) PORT_DIPLOCATION("DIP2:2,3") // 續玩過關
PORT_DIPSETTING( 0x06, "3000" )
PORT_DIPSETTING( 0x04, "4000" )
PORT_DIPSETTING( 0x02, "5000" )
PORT_DIPSETTING( 0x01, "6000" )
- PORT_DIPNAME( 0x08, 0x08, "Accumulated Bonus" ) PORT_DIPLOCATION("DIP2:4")
+ PORT_DIPNAME( 0x08, 0x08, "Accumulated Bonus" ) PORT_DIPLOCATION("DIP2:4") // 累積彩金
PORT_DIPSETTING( 0x08, "300" )
PORT_DIPSETTING( 0x00, "400" )
- PORT_DIPNAME( 0x70, 0x70, "Double-Up Game Payout Rate" ) PORT_DIPLOCATION("DIP2:5,6,7")
+ PORT_DIPNAME( 0x70, 0x70, "Double Up Game Payout Rate" ) PORT_DIPLOCATION("DIP2:5,6,7") // 續玩機率
PORT_DIPSETTING( 0x60, "92%" )
PORT_DIPSETTING( 0x50, "93%" )
PORT_DIPSETTING( 0x40, "94%" )
@@ -1159,12 +1165,12 @@ static INPUT_PORTS_START( xyddzhh )
PORT_DIPSETTING( 0x20, "97%" )
PORT_DIPSETTING( 0x10, "98%" )
PORT_DIPSETTING( 0x00, "99%" )
- PORT_DIPNAME( 0x80, 0x80, "Double-Up Game" ) PORT_DIPLOCATION("DIP2:8")
- PORT_DIPSETTING( 0x00, DEF_STR(Off) )
- PORT_DIPSETTING( 0x80, DEF_STR(On) )
+ PORT_DIPNAME( 0x80, 0x80, "Double Up Game" ) PORT_DIPLOCATION("DIP2:8") // 續玩遊戲
+ PORT_DIPSETTING( 0x00, DEF_STR(Off) ) // 無
+ PORT_DIPSETTING( 0x80, DEF_STR(On) ) // 有
PORT_START("DSW3")
- PORT_DIPNAME( 0x07, 0x07, DEF_STR(Coinage) ) PORT_DIPLOCATION("DIP3:1,2,3")
+ PORT_DIPNAME( 0x07, 0x07, DEF_STR(Coinage) ) PORT_DIPLOCATION("DIP3:1,2,3") // 投幣單位
PORT_DIPSETTING( 0x06, DEF_STR(1C_1C) )
PORT_DIPSETTING( 0x05, DEF_STR(1C_2C) )
PORT_DIPSETTING( 0x04, DEF_STR(1C_5C) )
@@ -1173,7 +1179,7 @@ static INPUT_PORTS_START( xyddzhh )
PORT_DIPSETTING( 0x01, "1 Coin/50 Credits" )
PORT_DIPSETTING( 0x07, "1 Coin/100 Credits" )
PORT_DIPSETTING( 0x00, "1 Coin/200 Credits" )
- PORT_DIPNAME( 0x38, 0x38, "Key-In Rate" ) PORT_DIPLOCATION("DIP3:4,5,6")
+ PORT_DIPNAME( 0x38, 0x38, "Key-In Unit" ) PORT_DIPLOCATION("DIP3:4,5,6") // 開分單位
PORT_DIPSETTING( 0x30, "40" )
PORT_DIPSETTING( 0x28, "50" )
PORT_DIPSETTING( 0x38, "100" )
@@ -1182,15 +1188,15 @@ static INPUT_PORTS_START( xyddzhh )
PORT_DIPSETTING( 0x10, "500" )
PORT_DIPSETTING( 0x08, "1000" )
PORT_DIPSETTING( 0x00, "2000" )
- PORT_DIPNAME( 0x40, 0x40, "Credit Limit" ) PORT_DIPLOCATION("DIP3:7")
+ PORT_DIPNAME( 0x40, 0x40, "Key-In Limit" ) PORT_DIPLOCATION("DIP3:7") // 開分限制
PORT_DIPSETTING( 0x00, "10,000" )
PORT_DIPSETTING( 0x40, "99,000" )
- PORT_DIPNAME( 0x80, 0x80, "Card Type" ) PORT_DIPLOCATION("DIP3:8")
- PORT_DIPSETTING( 0x80, DEF_STR ( Normal ) )
- PORT_DIPSETTING( 0x00, "Graphics" )
+ PORT_DIPNAME( 0x80, 0x80, "Card Type" ) PORT_DIPLOCATION("DIP3:8") // 牌型選項
+ PORT_DIPSETTING( 0x80, DEF_STR(Normal) ) // 正常
+ PORT_DIPSETTING( 0x00, "Graphics" ) // 圖型
PORT_START("DSW4")
- PORT_DIPNAME( 0x07, 0x07, "Minimum Bet" ) PORT_DIPLOCATION("DIP4:1,2,3")
+ PORT_DIPNAME( 0x07, 0x07, "Minimum Bet" ) PORT_DIPLOCATION("DIP4:1,2,3") // 最小押分
PORT_DIPSETTING( 0x06, "1" )
PORT_DIPSETTING( 0x05, "2" )
PORT_DIPSETTING( 0x04, "3" )
@@ -1199,7 +1205,7 @@ static INPUT_PORTS_START( xyddzhh )
PORT_DIPSETTING( 0x02, "15" )
PORT_DIPSETTING( 0x01, "20" )
PORT_DIPSETTING( 0x00, "40" )
- PORT_DIPNAME( 0x38, 0x38, "Payout Rate" ) PORT_DIPLOCATION("DIP4:4,5,6")
+ PORT_DIPNAME( 0x38, 0x38, "Payout Rate" ) PORT_DIPLOCATION("DIP4:4,5,6") // 遊戲機率
PORT_DIPSETTING( 0x30, "90%" )
PORT_DIPSETTING( 0x28, "91%" )
PORT_DIPSETTING( 0x20, "92%" )
@@ -1208,10 +1214,10 @@ static INPUT_PORTS_START( xyddzhh )
PORT_DIPSETTING( 0x10, "95%" )
PORT_DIPSETTING( 0x08, "96%" )
PORT_DIPSETTING( 0x00, "97%" )
- PORT_DIPNAME( 0x40, 0x40, "Market Setting" ) PORT_DIPLOCATION("DIP4:7")
- PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x40, DEF_STR( On ) )
- PORT_DIPNAME( 0x80, 0x80, "Jackpot" ) PORT_DIPLOCATION("DIP4:8")
+ PORT_DIPNAME( 0x40, 0x40, "Market Setting" ) PORT_DIPLOCATION("DIP4:7") // 炒場設定
+ PORT_DIPSETTING( 0x00, DEF_STR(Off) ) // 無
+ PORT_DIPSETTING( 0x40, DEF_STR(On) ) // 有
+ PORT_DIPNAME( 0x80, 0x80, "Jackpot" ) PORT_DIPLOCATION("DIP4:8") // 系統破台
PORT_DIPSETTING( 0x00, "50,000" )
PORT_DIPSETTING( 0x80, "100,000" )
INPUT_PORTS_END
diff --git a/src/mame/bmc/koftball.cpp b/src/mame/bmc/koftball.cpp
index a29413b5391..4c0b27894b4 100644
--- a/src/mame/bmc/koftball.cpp
+++ b/src/mame/bmc/koftball.cpp
@@ -7,14 +7,17 @@ King Of Football (c)1995 BMC
preliminary driver by Tomasz Slanina
TODO:
-- lots of unknown writes / reads;
-- one of the customs could contain a VIA6522-like core. bmc/bmcbowl.cpp uses the VIA6522 and the
- accesses are similar;
-- probably jxzh also supports the mahjong keyboard. Check if one of the dips enable it and where it
- is read;
-- better understanding of the koftball protection.
+- Lots of unknown writes/reads.
+- One of the customs could contain a VIA6522-like core. bmc/bmcbowl.cpp
+ uses the VIA6522 and the accesses are similar.
+- jxzh and kaimenhu show a full mahjong keyboard in their key tests - is
+ this actually supported or is it vestigial?
+- jxzh and kaimenhu bookkeeping menus do not clear the background.
+- jxzh stops responding to inputs properly after winning a hand if
+ stripping sequences are enabled.
+- jxzh last chance type A tiles are not visible.
+- Better understanding of the koftball protection.
---
MC68000P10
M28 (OKI 6295, next to ROM C9)
@@ -22,7 +25,7 @@ BMC ADB40817(80 Pin PQFP - Google hits, but no datasheet or description)
RAMDAC TRC1710-80PCA (Monolithic 256-word by 18bit Look-up Table & Triple Video DAC with 6-bit DACs)
File 89C67 (Clone of YM2413. Next to 3.57954MHz OSC)
OSC: 21.47727MHz & 3.57954MHz
-2 8-way dipswitches
+2 8-way DIP switches
part # scratched 64 pin PLCC (soccer ball sticker over this chip ;-)
ft5_v16_c5.u14 \
@@ -35,6 +38,61 @@ ft5_v6_c2.u60 | Graphics
ft5_v6_c3.u61 |
ft5_v6_c4.u58 /
+
+koftball has a full set of soft settings accessible from the bookeeping menu:
+
+English translation Default Chinese
+
+odds adjustment 機率調整
+five of a kind boost 0 五梅加强
+royal flush boost 0 同花大順加强
+straight flush boost 0 同花順加强
+four of a kind boost 0 四梅加强
+ 0 小牌加强
+odds 98.5 機率
+double up odds 98 比倍
+
+system settings 系統設定
+minimum bet to win jackpot 30 中彩金最小押分
+payout unit 100 退分單位
+maximum bet 100 押分上限
+bet unit 2 押分單位
+minimum bet 20 最小押分
+key-in unit 200 上分單位
+key-in limit 5000 上分上限
+credit limit 50000 得分上限
+
+
+jxzh uses an unusual control scheme:
+* use Start to draw a tile
+* use Big (left) and Small (right) to select a tile to discard
+* use Start to discard the selected tile
+* Kan, Pon, Chi, Reach, Ron, Flip Flop and Bet function as expected in the main game
+* use Big (left) and Small (right) to select a tile to exchange during "first chance"
+* use Flip Flop to exchange the selected tile during "first chance"
+* use Start to end "first chance"
+* use Start to select a tile during "last chance"
+* use Flip Flop to stake winnings on the double up game
+* use Ron to take winnings
+
+kaimenhu appears to be just the first chance and double up games from
+jxzh (i.e. like a draw poker game but with mahjong tiles and hands).
+
+
+jxzh/kaimenhu test menu:
+
+pon input test 碰:按鍵測試
+kan graphics test 槓:圖型測試
+reach sound test 聽:音樂測試
+ron memory test 胡:記憶體測試
+chi DIP switch test 吃:DIP 測試
+big last hand test 大:前手牌測試
+test exit 離開 按《測試》
+
+
+kaimenhu has a full set of soft settings accessible from the bookeeping menu
+(default password is Start eight times)
+
*/
#include "emu.h"
@@ -107,11 +165,12 @@ private:
u8 m_gfx_ctrl = 0;
u8 m_priority = 0;
u8 m_backpen = 0;
- std::unique_ptr<bitmap_ind16> m_pixbitmap;
+ bitmap_ind16 m_pixbitmap;
u8 m_pixpal = 0;
void irq_ack_w(u8 data);
- void outputs_w(u8 data);
+ void koftball_outputs_w(u8 data);
+ void kaimenhu_outputs_w(u8 data);
u16 random_number_r();
u16 prot_r();
u16 kaimenhu_prot_r();
@@ -125,9 +184,11 @@ private:
u32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
TIMER_DEVICE_CALLBACK_MEMBER(interrupt);
+
+ void common_mem(address_map &map) ATTR_COLD;
+ void koftball_mem(address_map &map) ATTR_COLD;
void jxzh_mem(address_map &map) ATTR_COLD;
void kaimenhu_mem(address_map &map) ATTR_COLD;
- void koftball_mem(address_map &map) ATTR_COLD;
void ramdac_map(address_map &map) ATTR_COLD;
};
@@ -169,7 +230,7 @@ void koftball_state::video_start()
m_tilemap[1]->set_transparent_pen(0);
m_tilemap[3]->set_transparent_pen(0);
- m_pixbitmap = std::make_unique<bitmap_ind16>(512, 256);
+ m_pixbitmap.allocate(512, 256);
}
// linear 512x256x4bpp
@@ -221,13 +282,13 @@ u32 koftball_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, c
girl select after coin up prev screen prev screen over under 0x13 0x3a
*/
- m_pixbitmap->fill(0, cliprect);
- draw_pixlayer(*m_pixbitmap, cliprect);
+ m_pixbitmap.fill(0, cliprect);
+ draw_pixlayer(m_pixbitmap, cliprect);
bitmap.fill(m_backpen, cliprect);
if (BIT(m_priority, 3))
- copyscrollbitmap_trans(bitmap, *m_pixbitmap, 0, 0, 0, 0, cliprect, 0);
+ copyscrollbitmap_trans(bitmap, m_pixbitmap, 0, 0, 0, 0, cliprect, 0);
// TODO: or bit 1?
if (BIT(m_gfx_ctrl, 5))
@@ -242,7 +303,7 @@ u32 koftball_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, c
}
if (!BIT(m_priority, 3))
- copyscrollbitmap_trans(bitmap, *m_pixbitmap, 0, 0, 0, 0, cliprect, 0);
+ copyscrollbitmap_trans(bitmap, m_pixbitmap, 0, 0, 0, 0, cliprect, 0);
return 0;
}
@@ -300,7 +361,15 @@ void koftball_state::irq_ack_w(u8 data)
m_maincpu->set_input_line(i, CLEAR_LINE);
}
-void koftball_state::outputs_w(u8 data)
+void koftball_state::koftball_outputs_w(u8 data)
+{
+ machine().bookkeeping().coin_counter_w(1, BIT(data, 0)); // credits paid out by key-out
+ machine().bookkeeping().coin_counter_w(0, BIT(data, 1)); // credits in
+ // bit 3 always set?
+ // bit 7 always set?
+}
+
+void koftball_state::kaimenhu_outputs_w(u8 data)
{
m_hopper->motor_w(BIT(data, 0));
machine().bookkeeping().coin_counter_w(0, BIT(data, 1)); // credits in
@@ -308,28 +377,25 @@ void koftball_state::outputs_w(u8 data)
// bit 7 always set?
}
-// FIXME: merge video maps
-void koftball_state::koftball_mem(address_map &map)
+void koftball_state::common_mem(address_map &map)
{
- map(0x000000, 0x01ffff).rom();
- map(0x220000, 0x22ffff).ram().share(m_main_ram);
-
map(0x260000, 0x260fff).ram().w(FUNC(koftball_state::videoram_w<0>)).share(m_videoram[0]);
map(0x261000, 0x261fff).ram().w(FUNC(koftball_state::videoram_w<1>)).share(m_videoram[1]);
map(0x262000, 0x262fff).ram().w(FUNC(koftball_state::videoram_w<2>)).share(m_videoram[2]);
map(0x263000, 0x263fff).ram().w(FUNC(koftball_state::videoram_w<3>)).share(m_videoram[3]);
+
map(0x268000, 0x26ffff).ram();
map(0x280000, 0x29ffff).ram().share(m_pixram);
+
map(0x2a0007, 0x2a0007).w(FUNC(koftball_state::irq_ack_w));
map(0x2a0009, 0x2a0009).lw8(NAME([this] (u8 data) { m_irq_enable = data; }));
map(0x2a000f, 0x2a000f).lw8(NAME([this] (u8 data) { m_priority = data; LOGGFX("GFX ctrl $2a000f (priority) %02x\n", data); }));
map(0x2a0017, 0x2a0017).w(FUNC(koftball_state::pixpal_w));
map(0x2a0019, 0x2a0019).lw8(NAME([this] (u8 data) { m_backpen = data; LOGGFX("GFX ctrl $2a0019 (backpen) %02x\n", data); }));
- map(0x2a001a, 0x2a001b).nopw();
- map(0x2a0000, 0x2a001f).r(FUNC(koftball_state::random_number_r));
+
map(0x2b0000, 0x2b0001).portr("DSW");
- map(0x2d8000, 0x2d8001).r(FUNC(koftball_state::random_number_r));
+
map(0x2da000, 0x2da003).w("ymsnd", FUNC(ym2413_device::write)).umask16(0xff00);
map(0x2db001, 0x2db001).w("ramdac", FUNC(ramdac_device::index_w));
@@ -338,45 +404,43 @@ void koftball_state::koftball_mem(address_map &map)
map(0x2db005, 0x2db005).w("ramdac", FUNC(ramdac_device::mask_w));
map(0x2dc000, 0x2dc000).rw("oki", FUNC(okim6295_device::read), FUNC(okim6295_device::write));
- map(0x2f0000, 0x2f0003).portr("INPUTS");
- map(0x300000, 0x300001).nopw();
+
+ map(0x2f0000, 0x2f0001).portr("INPUTS");
+
map(0x320000, 0x320000).lw8(NAME([this] (u8 data) { m_gfx_ctrl = data; LOGGFX("GFX ctrl $320000 (layer enable) %02x\n", data); }));
+}
+
+void koftball_state::koftball_mem(address_map &map)
+{
+ common_mem(map);
+
+ map(0x000000, 0x01ffff).rom();
+ map(0x220000, 0x22ffff).ram().share(m_main_ram);
+
+ map(0x2a001a, 0x2a001b).nopw();
+ map(0x2a0000, 0x2a001f).r(FUNC(koftball_state::random_number_r));
+ map(0x2d8000, 0x2d8001).r(FUNC(koftball_state::random_number_r));
+
+ map(0x300001, 0x300001).w(FUNC(koftball_state::koftball_outputs_w));
+
map(0x340000, 0x340001).r(FUNC(koftball_state::prot_r));
map(0x360000, 0x360001).w(FUNC(koftball_state::prot_w));
}
void koftball_state::jxzh_mem(address_map &map)
{
+ common_mem(map);
+
map(0x000000, 0x03ffff).rom();
map(0x200000, 0x200fff).ram().share("nvram");
- map(0x260000, 0x260fff).ram().w(FUNC(koftball_state::videoram_w<0>)).share(m_videoram[0]);
- map(0x261000, 0x261fff).ram().w(FUNC(koftball_state::videoram_w<1>)).share(m_videoram[1]);
- map(0x262000, 0x262fff).ram().w(FUNC(koftball_state::videoram_w<2>)).share(m_videoram[2]);
- map(0x263000, 0x263fff).ram().w(FUNC(koftball_state::videoram_w<3>)).share(m_videoram[3]);
map(0x264b00, 0x264dff).ram(); // TODO: writes here at least at girl selection after coin up. Some kind of effect?
- map(0x268000, 0x26ffff).ram();
- map(0x280000, 0x29ffff).ram().share(m_pixram);
- map(0x2a0007, 0x2a0007).w(FUNC(koftball_state::irq_ack_w));
- map(0x2a0009, 0x2a0009).lw8(NAME([this] (u8 data) { m_irq_enable = data; }));
- map(0x2a000f, 0x2a000f).lw8(NAME([this] (u8 data) { m_priority = data; LOGGFX("GFX ctrl $2a000f (priority) %02x\n", data); }));
- map(0x2a0017, 0x2a0017).w(FUNC(koftball_state::pixpal_w));
- map(0x2a0019, 0x2a0019).lw8(NAME([this] (u8 data) { m_backpen = data; LOGGFX("GFX ctrl $2a0019 (backpen) %02x\n", data); }));
map(0x2a001a, 0x2a001d).nopw();
map(0x2a0000, 0x2a001f).r(FUNC(koftball_state::random_number_r));
- map(0x2b0000, 0x2b0001).portr("DSW");
- map(0x2da000, 0x2da003).umask16(0xff00).w("ymsnd", FUNC(ym2413_device::write));
- map(0x2db001, 0x2db001).w("ramdac", FUNC(ramdac_device::index_w));
- map(0x2db002, 0x2db003).nopr(); // reads here during some scene changes
- map(0x2db003, 0x2db003).w("ramdac", FUNC(ramdac_device::pal_w));
- map(0x2db005, 0x2db005).w("ramdac", FUNC(ramdac_device::mask_w));
+ map(0x300001, 0x300001).w(FUNC(koftball_state::kaimenhu_outputs_w));
- map(0x2dc000, 0x2dc000).rw("oki", FUNC(okim6295_device::read), FUNC(okim6295_device::write));
- map(0x2f0000, 0x2f0001).portr("INPUTS");
- map(0x300001, 0x300001).w(FUNC(koftball_state::outputs_w));
- map(0x320000, 0x320000).lw8(NAME([this] (u8 data) { m_gfx_ctrl = data; LOGGFX("GFX ctrl $320000 (layer enable) %02x\n", data); }));
map(0x340000, 0x340001).r(FUNC(koftball_state::prot_r));
map(0x360000, 0x360001).w(FUNC(koftball_state::prot_w));
map(0x380000, 0x380001).w(FUNC(koftball_state::prot_w));
@@ -399,71 +463,71 @@ static INPUT_PORTS_START( koftball )
PORT_START("INPUTS")
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_GAMBLE_KEYIN )
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_POKER_HOLD5 )
- PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_POKER_HOLD4 ) // also decrease in sound test
- PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_POKER_HOLD2 ) // also increase in sound test
- PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_POKER_HOLD1 )
- PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_POKER_HOLD3 )
+ PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_POKER_HOLD4 ) // Decrease in settings menus
+ PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_POKER_HOLD2 ) // Down in settings menus
+ PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_POKER_HOLD1 ) // Up in settings menus
+ PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_POKER_HOLD3 ) // Increase in settings menus
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_GAMBLE_TAKE )
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_GAMBLE_BET )
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK )
- PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT )
+ PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) // Default in settings menus
PORT_SERVICE_NO_TOGGLE( 0x1000, IP_ACTIVE_LOW ) // test mode enter
PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_GAMBLE_LOW )
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_GAMBLE_HIGH )
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_GAMBLE_D_UP )
PORT_START("DSW")
- PORT_DIPNAME( 0x0001, 0x0001, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:!8")
- PORT_DIPSETTING( 0x0001, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:!7")
- PORT_DIPSETTING( 0x0002, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0004, 0x0004, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:!6")
- PORT_DIPSETTING( 0x0004, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0008, 0x0008, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:!5")
- PORT_DIPSETTING( 0x0008, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0010, 0x0010, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:!4")
- PORT_DIPSETTING( 0x0010, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:!3")
- PORT_DIPSETTING( 0x0020, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:!2")
- PORT_DIPSETTING( 0x0040, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:!1")
- PORT_DIPSETTING( 0x0080, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0100, 0x0100, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:!8")
- PORT_DIPSETTING( 0x0100, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0200, 0x0200, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:!7")
- PORT_DIPSETTING( 0x0200, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0400, 0x0400, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:!6")
- PORT_DIPSETTING( 0x0400, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0800, 0x0800, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:!5")
- PORT_DIPSETTING( 0x0800, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x1000, 0x1000, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:!4")
- PORT_DIPSETTING( 0x1000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x2000, 0x2000, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:!3")
- PORT_DIPSETTING( 0x2000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x4000, 0x4000, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:!2")
- PORT_DIPSETTING( 0x4000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x8000, 0x0000, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW2:!1")
- PORT_DIPSETTING( 0x8000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
+ PORT_DIPNAME( 0x0001, 0x0001, DEF_STR(Unknown) ) PORT_DIPLOCATION("SW1:8")
+ PORT_DIPSETTING( 0x0001, DEF_STR(Off) )
+ PORT_DIPSETTING( 0x0000, DEF_STR(On) )
+ PORT_DIPNAME( 0x0002, 0x0002, DEF_STR(Unknown) ) PORT_DIPLOCATION("SW1:7")
+ PORT_DIPSETTING( 0x0002, DEF_STR(Off) )
+ PORT_DIPSETTING( 0x0000, DEF_STR(On) )
+ PORT_DIPNAME( 0x0004, 0x0004, DEF_STR(Unknown) ) PORT_DIPLOCATION("SW1:6")
+ PORT_DIPSETTING( 0x0004, DEF_STR(Off) )
+ PORT_DIPSETTING( 0x0000, DEF_STR(On) )
+ PORT_DIPNAME( 0x0008, 0x0008, DEF_STR(Unknown) ) PORT_DIPLOCATION("SW1:5")
+ PORT_DIPSETTING( 0x0008, DEF_STR(Off) )
+ PORT_DIPSETTING( 0x0000, DEF_STR(On) )
+ PORT_DIPNAME( 0x0010, 0x0010, DEF_STR(Unknown) ) PORT_DIPLOCATION("SW1:4")
+ PORT_DIPSETTING( 0x0010, DEF_STR(Off) )
+ PORT_DIPSETTING( 0x0000, DEF_STR(On) )
+ PORT_DIPNAME( 0x0020, 0x0020, "Show Spend" ) PORT_DIPLOCATION("SW1:3") // shows the amount you've spent as well above current credits when on
+ PORT_DIPSETTING( 0x0020, DEF_STR(Off) )
+ PORT_DIPSETTING( 0x0000, DEF_STR(On) )
+ PORT_DIPNAME( 0x0040, 0x0040, DEF_STR(Unknown) ) PORT_DIPLOCATION("SW1:2")
+ PORT_DIPSETTING( 0x0040, DEF_STR(Off) )
+ PORT_DIPSETTING( 0x0000, DEF_STR(On) )
+ PORT_DIPNAME( 0x0080, 0x0080, DEF_STR(Unknown) ) PORT_DIPLOCATION("SW1:1")
+ PORT_DIPSETTING( 0x0080, DEF_STR(Off) )
+ PORT_DIPSETTING( 0x0000, DEF_STR(On) )
+ PORT_DIPNAME( 0x0100, 0x0100, DEF_STR(Unknown) ) PORT_DIPLOCATION("SW2:8")
+ PORT_DIPSETTING( 0x0100, DEF_STR(Off) )
+ PORT_DIPSETTING( 0x0000, DEF_STR(On) )
+ PORT_DIPNAME( 0x0200, 0x0200, DEF_STR(Unknown) ) PORT_DIPLOCATION("SW2:7")
+ PORT_DIPSETTING( 0x0200, DEF_STR(Off) )
+ PORT_DIPSETTING( 0x0000, DEF_STR(On) )
+ PORT_DIPNAME( 0x0400, 0x0400, DEF_STR(Unknown) ) PORT_DIPLOCATION("SW2:6")
+ PORT_DIPSETTING( 0x0400, DEF_STR(Off) )
+ PORT_DIPSETTING( 0x0000, DEF_STR(On) )
+ PORT_DIPNAME( 0x0800, 0x0800, DEF_STR(Unknown) ) PORT_DIPLOCATION("SW2:5")
+ PORT_DIPSETTING( 0x0800, DEF_STR(Off) )
+ PORT_DIPSETTING( 0x0000, DEF_STR(On) )
+ PORT_DIPNAME( 0x1000, 0x1000, DEF_STR(Unknown) ) PORT_DIPLOCATION("SW2:4")
+ PORT_DIPSETTING( 0x1000, DEF_STR(Off) )
+ PORT_DIPSETTING( 0x0000, DEF_STR(On) )
+ PORT_DIPNAME( 0x2000, 0x2000, DEF_STR(Unknown) ) PORT_DIPLOCATION("SW2:3")
+ PORT_DIPSETTING( 0x2000, DEF_STR(Off) )
+ PORT_DIPSETTING( 0x0000, DEF_STR(On) )
+ PORT_DIPNAME( 0x4000, 0x4000, DEF_STR(Unknown) ) PORT_DIPLOCATION("SW2:2")
+ PORT_DIPSETTING( 0x4000, DEF_STR(Off) )
+ PORT_DIPSETTING( 0x0000, DEF_STR(On) )
+ PORT_DIPNAME( 0x8000, 0x0000, DEF_STR(Demo_Sounds) ) PORT_DIPLOCATION("SW2:1")
+ PORT_DIPSETTING( 0x8000, DEF_STR(Off) )
+ PORT_DIPSETTING( 0x0000, DEF_STR(On) )
INPUT_PORTS_END
static INPUT_PORTS_START( kaimenhu )
@@ -475,16 +539,16 @@ static INPUT_PORTS_START( kaimenhu )
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_MAHJONG_KAN )
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_MAHJONG_CHI )
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_START1 )
- PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_MAHJONG_SCORE )
+ PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_MAHJONG_RON ) PORT_NAME("%p Mahjong Ron / Take Score" ) // called take score (得分) in key test
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_MAHJONG_BET )
- PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("hopper", FUNC(hopper_device::line_r))
+ PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("hopper", FUNC(hopper_device::line_r))
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK )
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT )
PORT_SERVICE_NO_TOGGLE( 0x1000, IP_ACTIVE_LOW )
- PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_MAHJONG_SMALL ) PORT_NAME("%p Mahjong Small / Right")
- PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_MAHJONG_BIG ) PORT_NAME("%p Mahjong Big / Left")
- PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_MAHJONG_DOUBLE_UP) PORT_NAME("%p Mahjong Double Up / Change Tile")
+ PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_MAHJONG_SMALL ) PORT_NAME("%p Mahjong Small / Right")
+ PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_MAHJONG_BIG ) PORT_NAME("%p Mahjong Big / Left")
+ PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_MAHJONG_FLIP_FLOP ) PORT_NAME("%p Mahjong Flip Flop / Double Up" ) // called double up (比倍) in key test
PORT_START("DSW")
PORT_DIPNAME( 0x0001, 0x0001, DEF_STR(Unknown) ) PORT_DIPLOCATION("SW1:8")
@@ -508,7 +572,7 @@ static INPUT_PORTS_START( kaimenhu )
PORT_DIPNAME( 0x0040, 0x0040, DEF_STR(Unknown) ) PORT_DIPLOCATION("SW1:2")
PORT_DIPSETTING( 0x0040, DEF_STR(Off) )
PORT_DIPSETTING( 0x0000, DEF_STR(On) )
- PORT_DIPNAME( 0x0080, 0x0080, DEF_STR(Unknown) ) PORT_DIPLOCATION("SW1:1")
+ PORT_DIPNAME( 0x0080, 0x0080, "Double Up Game" ) PORT_DIPLOCATION("SW1:1")
PORT_DIPSETTING( 0x0080, DEF_STR(Off) )
PORT_DIPSETTING( 0x0000, DEF_STR(On) )
PORT_DIPNAME( 0x0100, 0x0100, DEF_STR(Service_Mode) ) PORT_DIPLOCATION("SW2:8")
@@ -546,6 +610,18 @@ static INPUT_PORTS_START( jxzh )
PORT_DIPSETTING( 0x0002, "1 2 4 8 12 16 24 32" )
PORT_DIPSETTING( 0x0001, "1 2 3 5 8 15 30 50" )
PORT_DIPSETTING( 0x0000, "1 2 3 5 10 25 50 100" )
+ PORT_DIPNAME( 0x0040, 0x0040, "Last Chance Type" ) PORT_DIPLOCATION("SW1:2")
+ PORT_DIPSETTING( 0x0040, "A" ) // choose three of ten tiles
+ PORT_DIPSETTING( 0x0000, "B" ) // draw ten tiles
+ PORT_DIPNAME( 0x0400, 0x0400, "Nudity" ) PORT_DIPLOCATION("SW2:6")
+ PORT_DIPSETTING( 0x0400, DEF_STR(Off) )
+ PORT_DIPSETTING( 0x0000, DEF_STR(On) )
+ PORT_DIPNAME( 0x0800, 0x0800, "Auto Last Chance B" ) PORT_DIPLOCATION("SW2:5")
+ PORT_DIPSETTING( 0x0800, DEF_STR(Off) )
+ PORT_DIPSETTING( 0x0000, DEF_STR(On) ) // automatically draws tiles for last chance type B
+ PORT_DIPNAME( 0x2000, 0x0000, "Gal Voice" ) PORT_DIPLOCATION("SW2:3")
+ PORT_DIPSETTING( 0x2000, DEF_STR(Off) )
+ PORT_DIPSETTING( 0x0000, DEF_STR(On) ) // calls discarded tiles
INPUT_PORTS_END
@@ -632,6 +708,7 @@ void koftball_state::kaimenhu(machine_config &config)
}
+// 足球王 (Zúqiú Wáng), BMC 1995
ROM_START( koftball )
ROM_REGION( 0x20000, "maincpu", 0 ) // 68000 Code
ROM_LOAD16_BYTE( "ft5_v16_c6.u15", 0x00000, 0x10000, CRC(5e1784a5) SHA1(5690d315500fb533b12b598cb0a51bd1eadd0505) )
@@ -769,6 +846,6 @@ void koftball_state::init_koftball()
} // anonymous namespace
-GAME( 1995, koftball, 0, koftball, koftball, koftball_state, init_koftball, ROT0, "BMC", "King of Football", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
-GAME( 1996, jxzh, 0, jxzh, jxzh, koftball_state, empty_init, ROT0, "BMC", "Jinxiu Zhonghua", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
-GAME( 1996, kaimenhu, jxzh, kaimenhu, kaimenhu, koftball_state, empty_init, ROT0, "BMC", "Kaimen Hu", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
+GAME( 1995, koftball, 0, koftball, koftball, koftball_state, init_koftball, ROT0, "BMC", "Zuqiu Wang - King of Football", MACHINE_UNEMULATED_PROTECTION | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
+GAME( 1996, jxzh, 0, jxzh, jxzh, koftball_state, empty_init, ROT0, "BMC", "Jinxiu Zhonghua", MACHINE_UNEMULATED_PROTECTION | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING )
+GAME( 1996, kaimenhu, 0, kaimenhu, kaimenhu, koftball_state, empty_init, ROT0, "BMC", "Kaimen Hu", MACHINE_UNEMULATED_PROTECTION | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/capcom/cps2.cpp b/src/mame/capcom/cps2.cpp
index 44c61e0a4e4..f7d6e36bdce 100644
--- a/src/mame/capcom/cps2.cpp
+++ b/src/mame/capcom/cps2.cpp
@@ -12893,17 +12893,17 @@ GAME( 2000, mmatrixj, mmatrix, cps2, cps2_2p1b, cps2_state, init_cps2, RO
// Games released on CPS-2 hardware by Mitchell
-GAME( 2000, mpang, 0, cps2, cps2_2p1b, cps2_state, init_cps2, ROT0, "Mitchell (Capcom license)", "Mighty! Pang (Europe 001010)", MACHINE_SUPPORTS_SAVE )
-GAME( 2000, mpangr1, mpang, cps2, cps2_2p1b, cps2_state, init_cps2, ROT0, "Mitchell (Capcom license)", "Mighty! Pang (Europe 000925)", MACHINE_SUPPORTS_SAVE )
-GAME( 2000, mpangu, mpang, cps2, cps2_2p1b, cps2_state, init_cps2, ROT0, "Mitchell (Capcom license)", "Mighty! Pang (USA 001010)", MACHINE_SUPPORTS_SAVE )
-GAME( 2000, mpangj, mpang, cps2, cps2_2p1b, cps2_state, init_cps2, ROT0, "Mitchell (Capcom license)", "Mighty! Pang (Japan 001011)", MACHINE_SUPPORTS_SAVE )
-GAME( 2000, mpanga, mpang, cps2, cps2_2p1b, cps2_state, init_cps2, ROT0, "Mitchell (Capcom license)", "Mighty! Pang (Asia 001010)", MACHINE_SUPPORTS_SAVE )
-GAME( 2001, pzloop2, 0, cps2, pzloop2, cps2_state, init_pzloop2, ROT0, "Mitchell (Capcom license)", "Puzz Loop 2 (Europe 010302)", MACHINE_SUPPORTS_SAVE )
-GAME( 2001, pzloop2j, pzloop2, cps2, pzloop2, cps2_state, init_pzloop2, ROT0, "Mitchell (Capcom license)", "Puzz Loop 2 (Japan 010226)", MACHINE_SUPPORTS_SAVE )
-GAME( 2001, pzloop2jr1, pzloop2, cps2, pzloop2, cps2_state, init_pzloop2, ROT0, "Mitchell (Capcom license)", "Puzz Loop 2 (Japan 010205)", MACHINE_SUPPORTS_SAVE )
-GAME( 2001, pzloop2jp, pzloop2, dead_cps2, pzloop2,cps2_state, init_pzloop2,ROT0, "Mitchell (Capcom license)", "Puzz Loop 2 (Japan 010201 Publicity)", MACHINE_SUPPORTS_SAVE )
-GAME( 2001, choko, 0, cps2, choko, cps2_state, init_cps2, ROT0, "Mitchell (Capcom license)", "Janpai Puzzle Choukou (Japan 010820)", MACHINE_SUPPORTS_SAVE )
-GAME( 2001, chokop, 0, dead_cps2, choko,cps2_state, init_cps2, ROT0, "Mitchell (Capcom license)", "Janpai Puzzle Choukou (Japan 010820 Publicity)", MACHINE_SUPPORTS_SAVE )
+GAME( 2000, mpang, 0, cps2, cps2_2p1b, cps2_state, init_cps2, ROT0, "Mitchell (Capcom license)", "Mighty! Pang (Europe 001010)", MACHINE_SUPPORTS_SAVE )
+GAME( 2000, mpangr1, mpang, cps2, cps2_2p1b, cps2_state, init_cps2, ROT0, "Mitchell (Capcom license)", "Mighty! Pang (Europe 000925)", MACHINE_SUPPORTS_SAVE )
+GAME( 2000, mpangu, mpang, cps2, cps2_2p1b, cps2_state, init_cps2, ROT0, "Mitchell (Capcom license)", "Mighty! Pang (USA 001010)", MACHINE_SUPPORTS_SAVE )
+GAME( 2000, mpangj, mpang, cps2, cps2_2p1b, cps2_state, init_cps2, ROT0, "Mitchell (Capcom license)", "Mighty! Pang (Japan 001011)", MACHINE_SUPPORTS_SAVE )
+GAME( 2000, mpanga, mpang, cps2, cps2_2p1b, cps2_state, init_cps2, ROT0, "Mitchell (Capcom license)", "Mighty! Pang (Asia 001010)", MACHINE_SUPPORTS_SAVE )
+GAME( 2001, pzloop2, 0, cps2, pzloop2, cps2_state, init_pzloop2, ROT0, "Mitchell (Capcom license)", "Puzz Loop 2 (Europe 010302)", MACHINE_SUPPORTS_SAVE )
+GAME( 2001, pzloop2j, pzloop2, cps2, pzloop2, cps2_state, init_pzloop2, ROT0, "Mitchell (Capcom license)", "Puzz Loop 2 (Japan 010226)", MACHINE_SUPPORTS_SAVE )
+GAME( 2001, pzloop2jr1, pzloop2, cps2, pzloop2, cps2_state, init_pzloop2, ROT0, "Mitchell (Capcom license)", "Puzz Loop 2 (Japan 010205)", MACHINE_SUPPORTS_SAVE )
+GAME( 2001, pzloop2jp, pzloop2, dead_cps2, pzloop2, cps2_state, init_pzloop2, ROT0, "Mitchell (Capcom license)", "Puzz Loop 2 (Japan 010201 Publicity)", MACHINE_SUPPORTS_SAVE )
+GAME( 2001, choko, 0, cps2, choko, cps2_state, init_cps2, ROT0, "Mitchell (Capcom license)", "Janpai Puzzle Choukou (Japan 010820)", MACHINE_SUPPORTS_SAVE )
+GAME( 2001, chokop, choko, dead_cps2, choko, cps2_state, init_cps2, ROT0, "Mitchell (Capcom license)", "Janpai Puzzle Choukou (Japan 010820 Publicity)", MACHINE_SUPPORTS_SAVE )
// Games released on CPS-2 hardware by Eighting/Raizing
diff --git a/src/mame/casio/cps2000.cpp b/src/mame/casio/cps2000.cpp
index eba186ad19a..df68b1f60a3 100644
--- a/src/mame/casio/cps2000.cpp
+++ b/src/mame/casio/cps2000.cpp
@@ -312,8 +312,7 @@ void cps2000_state::cps2000(machine_config &config)
MSM6200(config, m_kbd, 4.9468_MHz_XTAL);
m_kbd->irq_cb().set_inputline(m_maincpu, UPD7810_INTF1);
- SPEAKER(config, "lspeaker").front_left();
- SPEAKER(config, "rspeaker").front_right();
+ SPEAKER(config, "speaker", 2).front();
// UPD932(config, "upd932a", 4.9468_MHz_XTAL);
// UPD932(config, "upd932b", 4.9468_MHz_XTAL);
@@ -326,17 +325,17 @@ void cps2000_state::cps2000(machine_config &config)
FILTER_RC(config, "bass_rc1").set_lowpass(RES_K(47), CAP_N(47)).add_route(0, "bass_rc2", 1.0);
FILTER_RC(config, "bass_rc2").set_lowpass(RES_K(22), CAP_N(47))
- .add_route(0, "lspeaker", 0.25).add_route(0, "rspeaker", 0.25);
+ .add_route(0, "speaker", 0.25, 0).add_route(0, "speaker", 0.25, 1);
UPD934G(config, m_pcm, 4.9468_MHz_XTAL / 4);
- m_pcm->add_route(0, "lspeaker", 0.25);
- m_pcm->add_route(0, "rspeaker", 0.125);
- m_pcm->add_route(1, "lspeaker", 0.25);
- m_pcm->add_route(1, "rspeaker", 0.125);
- m_pcm->add_route(2, "lspeaker", 0.125);
- m_pcm->add_route(2, "rspeaker", 0.25);
- m_pcm->add_route(3, "lspeaker", 0.125);
- m_pcm->add_route(3, "rspeaker", 0.25);
+ m_pcm->add_route(0, "speaker", 0.25, 0);
+ m_pcm->add_route(0, "speaker", 0.125, 1);
+ m_pcm->add_route(1, "speaker", 0.25, 0);
+ m_pcm->add_route(1, "speaker", 0.125, 1);
+ m_pcm->add_route(2, "speaker", 0.125, 0);
+ m_pcm->add_route(2, "speaker", 0.25, 1);
+ m_pcm->add_route(3, "speaker", 0.125, 0);
+ m_pcm->add_route(3, "speaker", 0.25, 1);
}
/**************************************************************************/
diff --git a/src/mame/casio/pickytlk.cpp b/src/mame/casio/pickytlk.cpp
index 508b82cc636..9830111499c 100644
--- a/src/mame/casio/pickytlk.cpp
+++ b/src/mame/casio/pickytlk.cpp
@@ -570,6 +570,13 @@ ROM_START(jd364)
ROM_LOAD("d23c8000lwgx-c12.lsi5", 0x00000, 0x100000, CRC(c023b709) SHA1(0c081a62f00d0fbee496a5c9067fb145cb79c8cd))
ROM_END
+ROM_START(jd366)
+ CPU_ROM_MULTICOLOR
+
+ ROM_REGION(0x100000, "mask_rom", 0)
+ ROM_LOAD("d23c8000xgx-c15.lsi5", 0x00000, 0x100000, CRC(d8a84c6a) SHA1(6a64dff0070c0016457c69fc0518df57da9c1b75))
+ROM_END
+
ROM_START(jd368)
CPU_ROM_MULTICOLOR
@@ -610,6 +617,9 @@ COMP(1995?, pickydis, 0, 0, pickytlk_monocolor, pickytlk, pickytlk_monocolor_sta
// Release date 1995-10 from "Casio Game Perfect Catalogue"
COMP(1995, jd364, 0, 0, pickytlk_multicolor, pickytlk, pickytlk_multicolor_state, empty_init, "Casio", "Color Picky Talk - Super Denshi Techou", MACHINE_NO_SOUND | MACHINE_NOT_WORKING)
+// ROM date 9635K7021
+COMP(1996?, jd366, 0, 0, pickytlk_multicolor, pickytlk, pickytlk_multicolor_state, empty_init, "Casio", "Super Picky Talk - My room fantasy", MACHINE_NO_SOUND | MACHINE_NOT_WORKING)
+
// ROM date 9737K7041
COMP(1997?, jd368, 0, 0, pickytlk_multicolor, pickytlk, pickytlk_multicolor_state, empty_init, "Casio", "Super Picky Talk - Access Pet", MACHINE_NO_SOUND | MACHINE_NOT_WORKING)
diff --git a/src/mame/igs/igs_m027.cpp b/src/mame/igs/igs_m027.cpp
index 45a2f96fba3..1d2297a4c1d 100644
--- a/src/mame/igs/igs_m027.cpp
+++ b/src/mame/igs/igs_m027.cpp
@@ -725,7 +725,7 @@ INPUT_PORTS_START( jking02 )
PORT_DIPNAME( 0x10, 0x10, "Password" ) PORT_DIPLOCATION("SW2:5")
PORT_DIPSETTING( 0x10, DEF_STR(No) )
PORT_DIPSETTING( 0x00, DEF_STR(Yes) )
- PORT_DIPNAME( 0x20, 0x20, "Double-Up Game" ) PORT_DIPLOCATION("SW2:6")
+ PORT_DIPNAME( 0x20, 0x20, "Double Up Game" ) PORT_DIPLOCATION("SW2:6")
PORT_DIPSETTING( 0x20, DEF_STR(Off) )
PORT_DIPSETTING( 0x00, DEF_STR(On) )
PORT_DIPNAME( 0x40, 0x40, "Auto Stop" ) PORT_DIPLOCATION("SW2:7")
@@ -1418,10 +1418,10 @@ INPUT_PORTS_START( oceanpar101us )
PORT_DIPNAME( 0x10, 0x10, "Auto Take" ) PORT_DIPLOCATION("SW1:5")
PORT_DIPSETTING( 0x10, DEF_STR(No) )
PORT_DIPSETTING( 0x00, DEF_STR(Yes) )
- PORT_DIPNAME( 0x20, 0x20, "Double-Up Game" ) PORT_DIPLOCATION("SW1:6")
+ PORT_DIPNAME( 0x20, 0x20, "Double Up Game" ) PORT_DIPLOCATION("SW1:6")
PORT_DIPSETTING( 0x00, DEF_STR(Off) )
PORT_DIPSETTING( 0x20, DEF_STR(On) )
- PORT_DIPNAME( 0xc0, 0xc0, "Double-Up Game Type" ) PORT_DIPLOCATION("SW1:7,8")
+ PORT_DIPNAME( 0xc0, 0xc0, "Double Up Game Type" ) PORT_DIPLOCATION("SW1:7,8")
PORT_DIPSETTING( 0xc0, "Poker 1" )
PORT_DIPSETTING( 0x80, "Poker 2" )
PORT_DIPSETTING( 0x40, "Symbol" )
diff --git a/src/mame/itech/itech32.cpp b/src/mame/itech/itech32.cpp
index ceb01d738a1..ca31776556d 100644
--- a/src/mame/itech/itech32.cpp
+++ b/src/mame/itech/itech32.cpp
@@ -1867,12 +1867,13 @@ void drivedge_state::drivedge(machine_config &config)
m_screen->screen_vblank().set_nop(); // interrupt not used?
- SPEAKER(config, "left_back").front_left(); // Sound PCB has hook-ups & AMPs for 5 channels
- SPEAKER(config, "right_back").front_right(); // As per Sound Tests Menu: Left Front, Right Front, Left Rear, Right Rear, Under Seat
+ // Sound PCB has hook-ups & AMPs for 5 channels
+ // As per Sound Tests Menu: Left Front, Right Front, Left Rear, Right Rear, Under Seat
+ SPEAKER(config, "back", 2).rear();
m_ensoniq->set_channels(2);
- m_ensoniq->add_route(2, "right_back", 0.1); // swapped stereo
- m_ensoniq->add_route(3, "left_back", 0.1);
+ m_ensoniq->add_route(2, "back", 0.1, 1); // swapped stereo
+ m_ensoniq->add_route(3, "back", 0.1, 0);
}
void shoottv_state::shoottv(machine_config &config)
diff --git a/src/mame/mame.lst b/src/mame/mame.lst
index 95d72fcf26b..50e3d6a2d8d 100644
--- a/src/mame/mame.lst
+++ b/src/mame/mame.lst
@@ -16249,6 +16249,7 @@ pb2000c
@source:casio/pickytlk.cpp
jd363
jd364
+jd366
jd368
pickydis
pickytlk
diff --git a/src/mame/misc/carrera.cpp b/src/mame/misc/carrera.cpp
index 9e2bb3242db..3ad4b5be6d0 100644
--- a/src/mame/misc/carrera.cpp
+++ b/src/mame/misc/carrera.cpp
@@ -1,56 +1,117 @@
// license:BSD-3-Clause
-// copyright-holders: David Haywood
-
-/*
-
-This is a simple 'Pairs' game called
-Carrera or Bomberman by BS Electronics
-
-
-
-PCB Layout
-----------
-
-|----------------------------------------------|
-| 22.1184MHz Z80 |
-| ROM.IC1 |
-|_ BATTERY ROM.IC22 |
- | |
- _| 6116 ROM.IC2 |
-| |
-| |
-|J AY-3-8910 ROM.IC3 |
-|A DSW1(8) |
-|M |
-|M DSW2(8) ROM.IC4 |
-|A |
-| DSW3(8) |
-| ROM.IC5 |
-|_ PROM.IC39 DSW4(8) |
- | 6116 |
- _| |
-| HD6845 6116 |
-|----------------------------------------------|
-Notes:
- Z80 @ 3.6864MHz [22.1184/6]
- AY-3-8910 @ 1.8432MHz [22.1184/12]
-
-
-Emulation Notes:
- Corrupt Tile on the first R in Carrera? (unlikely to be a bug, HW is very simple..)
-
-TODO:
-- Are colors 100% correct? Needs a reference to be sure.
-- There are reel GFXs on the ROMs (near the end), left-over or there's a way to enable it?
- Update: if you trigger a normal irq 0 instead of a NMI the game will change into a proper 8 liner game without inputs. Investigate on it...
- Update 2: alantin, bsebmanbl, bsebmanbl2, drkseal start directly with the 8 liner game
-- ncarrera has an undumped AT90S8515 MCU (8 bit AVR RISC core)
-
-*/
+// copyright-holders: David Haywood, Roberto Fresca, Grull Osgo
+
+/***********************************************************************
+
+ Carrera / Bomberman
+ by BS Electronics.
+
+ Video slots stealth games with selectable bomberman or fruits themes.
+ The front game is normally a "memory" pairs game, where the objetive
+ is to clear the screen.
+
+ You can change the tileset, the game title (Carrera/Bomberman), and
+ switch the type of game (amusement/gambling).
+
+ Some sets don't allow the title change.
+
+
+ PCB Layout
+ ----------
+
+ |----------------------------------------------|
+ | 22.1184MHz Z80 |
+ | ROM.IC1 |
+ |_ BATTERY ROM.IC22 |
+ | |
+ _| 6116 ROM.IC2 |
+ | |
+ | |
+ |J AY-3-8910 ROM.IC3 |
+ |A DSW1(8) |
+ |M |
+ |M DSW2(8) ROM.IC4 |
+ |A |
+ | DSW3(8) |
+ | ROM.IC5 |
+ |_ PROM.IC39 DSW4(8) |
+ | 6116 |
+ _| |
+ | HD6845 6116 |
+ |----------------------------------------------|
+
+ Notes:
+ Z80 @ 3.6864MHz [22.1184/6]
+ AY-3-8910 @ 1.8432MHz [22.1184/12]
+
+
+************************************************************************
+
+ Technical notes:
+ ----------------
+
+ The two first sets (carrera and bsebman) have a "bug" in the title if
+ the NVRAM was created from zero. This "bug" is intended to see at first
+ sight if the game NVRAM was manipulated in some way.
+
+ In fact, each boot the code paint the game title properly, and then
+ force the graphics bug if a special value hardcoded in NVRAM doesn't
+ match the expected.
+
+ $1da3.......$1dd6 ; loops to paint the title/logo on screen.
+
+ then...
+
+ $1dd7 ld, a ($e300) 3a 00 e3 ; take the hardcoded value from NVRAM.
+ $1dda ld, ($f616), a 32 16 f6 ; place this value as tile index,
+ ; halfway the title top line ($f616),
+ ; creating the intended GFX bug.
+
+ $1ddd ret c9 ; return from subroutine.
+
+
+ For other bootleg sets, if the hardcoded value doesn't match, they force
+ another tile index very close to the original, so is way less notorious
+ and only the technical trained people can see these minimal differences.
+
+ Note: This behavior is by design and should not be interpreted as a software
+ defect. It allows operators to instantly identify units with reset or modified
+ NVRAM and maintains system integrity without preventing gameplay functionality.
+
+
+************************************************************************
+
+ Updates:
+
+ [2025-05]
+
+ - Fix color bipolar PROM decode and palette calculation,
+ based on real games screenshots.
+ - Added NVRAM support for all games.
+ - Created default NVRAM for carrera and bsebman sets,
+ with harcoded critical values/registers needed to get
+ the games working.
+ - Workaround that fix the titles corruption for both
+ carrera and bsebman sets.
+ - Inputs and DIP switches.
+ - Fix alantin colors, based on the real game screenshots.
+ - Changed bsebman description to:
+ Carrera (Version 6.7) / Bomberman (Version 6.6)
+ - Added technical and game notes.
+
+
+ TODO:
+
+ - Analyze the carrera/bomberman sets and rename them accordingly.
+ - ncarrera has an undumped AT90S8515 MCU (8 bit AVR RISC core)
+
+
+***********************************************************************/
#include "emu.h"
#include "cpu/z80/z80.h"
+#include "machine/nvram.h"
#include "sound/ay8910.h"
#include "video/mc6845.h"
@@ -88,10 +149,69 @@ private:
};
+/*************************************************
+* Video Hardware *
+*************************************************/
+
+uint32_t carrera_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
+{
+ int count = 0;
+
+ for (int y = 0; y < 32; y++)
+ {
+ for (int x = 0; x < 64; x++)
+ {
+ int tile = m_tileram[count & 0x7ff] | m_tileram[(count & 0x7ff) + 0x800] << 8;
+
+ m_gfxdecode->gfx(0)->opaque(bitmap, cliprect, tile, 0, 0, 0, x * 8, y * 8);
+ count++;
+ }
+ }
+ return 0;
+}
+
+void carrera_state::palette(palette_device &palette) const
+{
+ uint8_t const *const color_prom = memregion("proms")->base();
+ for (int i = 0; i < 0x20; ++i)
+ {
+ int bit0, bit1;
+ int const br_bit0 = BIT(color_prom[i], 6);
+ int const br_bit1 = BIT(color_prom[i], 7);
+
+ bit0 = BIT(color_prom[i], 0);
+ bit1 = BIT(color_prom[i], 3);
+ int const b = 0x0e * br_bit1 + 0x1f * br_bit0 + 0x43 * bit0 + 0x8f * bit1;
+ bit0 = BIT(color_prom[i], 1);
+ bit1 = BIT(color_prom[i], 4);
+ int const g = 0x0e * br_bit1 + 0x1f * br_bit0 + 0x43 * bit0 + 0x8f * bit1;
+ bit0 = BIT(color_prom[i], 2);
+ bit1 = BIT(color_prom[i], 5);
+ int const r = 0x0e * br_bit1 + 0x1f * br_bit0 + 0x43 * bit0 + 0x8f * bit1;
+
+ palette.set_pen_color(i, rgb_t(r, g, b));
+ }
+}
+
+
+/*************************************************
+* Read Write Handlers *
+*************************************************/
+
+uint8_t carrera_state::unknown_r()
+{
+ return machine().rand();
+}
+
+
+/*************************************************
+* Memory map information *
+*************************************************/
+
void carrera_state::prg_map(address_map &map)
{
map(0x0000, 0x7fff).rom();
- map(0xe000, 0xe7ff).ram();
+ map(0xe000, 0xe7ff).ram().share("nvram");
map(0xe800, 0xe800).w("crtc", FUNC(mc6845_device::address_w));
map(0xe801, 0xe801).w("crtc", FUNC(mc6845_device::register_w));
map(0xf000, 0xffff).ram().share(m_tileram);
@@ -106,48 +226,35 @@ void carrera_state::io_map(address_map &map)
map(0x03, 0x03).portr("IN3");
map(0x04, 0x04).portr("IN4");
map(0x05, 0x05).portr("IN5");
- map(0x06, 0x06).nopw(); // ?
+ map(0x06, 0x06).nopw(); // ?
map(0x08, 0x09).w("aysnd", FUNC(ay8910_device::address_data_w));
}
+
+/*************************************************
+* Input ports *
+*************************************************/
+
static INPUT_PORTS_START( carrera )
PORT_START("IN0") // Port 0
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT )
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT )
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
- // unused / unknown inputs, not dips
- PORT_DIPNAME( 0x20, 0x20, "0" )
- PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Master Reset")
- PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_NAME("Up - Bet")
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_NAME("Down - Start")
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT )
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT )
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Auto Start") // autoplay
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("0-6") PORT_CODE(KEYCODE_Z)
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Master Reset")
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT )
PORT_START("IN1") // Port 1
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
- // unused / unknown inputs, not dips
- PORT_DIPNAME( 0x04, 0x04, "1" )
- 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, 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, 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_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("1-3") PORT_CODE(KEYCODE_A)
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("1-4") PORT_CODE(KEYCODE_S)
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("1-5") PORT_CODE(KEYCODE_D)
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("1-6") PORT_CODE(KEYCODE_F)
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("1-7") PORT_CODE(KEYCODE_G)
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_NAME("Reset")
// I suspect the 4 below are the 4xDSWs
PORT_START("IN2") // Port 2
@@ -175,7 +282,7 @@ static INPUT_PORTS_START( carrera )
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
-
+
PORT_START("IN3") // Port 3
PORT_DIPNAME( 0x01, 0x01, "3" )
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
@@ -203,58 +310,67 @@ static INPUT_PORTS_START( carrera )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("IN4") // Port 4
- PORT_DIPNAME( 0x01, 0x01, "4" )
- PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
- 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, 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, 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( 0x07, 0x00, "Coinage B" ) PORT_DIPLOCATION("IN4:6,7,8")
+ PORT_DIPSETTING( 0x07, "5" )
+ PORT_DIPSETTING( 0x00, "10" )
+ PORT_DIPSETTING( 0x01, "20" )
+ PORT_DIPSETTING( 0x02, "50" )
+ PORT_DIPSETTING( 0x03, "100" )
+ PORT_DIPSETTING( 0x04, "500" )
+ PORT_DIPSETTING( 0x05, "1000" )
+ PORT_DIPSETTING( 0x06, "1100" )
+ PORT_DIPNAME( 0x08, 0x08, "Game Name" ) PORT_DIPLOCATION("IN4:5")
+ PORT_DIPSETTING( 0x08, "Bomber Man" )
+ PORT_DIPSETTING( 0x00, "Carrera" )
+ PORT_DIPNAME( 0x10, 0x10, "Bonus 10%" ) PORT_DIPLOCATION("IN4:4")
+ PORT_DIPSETTING( 0x10, DEF_STR( No ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( Yes ) )
+ PORT_DIPNAME( 0x20, 0x20, "Key Out" ) PORT_DIPLOCATION("IN4:3")
+ PORT_DIPSETTING( 0x00, "10" )
+ PORT_DIPSETTING( 0x20, "100" )
+ PORT_DIPNAME( 0x40, 0x40, DEF_STR( Difficult ) ) PORT_DIPLOCATION("IN4:2")
+ PORT_DIPSETTING( 0x40, DEF_STR( Normal ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( Easy ) )
+ PORT_DIPNAME( 0x80, 0x80, "Max Bet" ) PORT_DIPLOCATION("IN4:1")
+ PORT_DIPSETTING( 0x80, "9" )
+ PORT_DIPSETTING( 0x00, "5" )
PORT_START("IN5") // Port 5
- PORT_DIPNAME( 0x01, 0x01, "5" )
- PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
- 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, "Playing Graphics" )
+ PORT_DIPNAME( 0x07, 0x00, "Coinage A" ) PORT_DIPLOCATION("IN5:1,2,3")
+ PORT_DIPSETTING( 0x07, "5" )
+ PORT_DIPSETTING( 0x00, "10" )
+ PORT_DIPSETTING( 0x01, "20" )
+ PORT_DIPSETTING( 0x02, "50" )
+ PORT_DIPSETTING( 0x03, "100" )
+ PORT_DIPSETTING( 0x04, "500" )
+ PORT_DIPSETTING( 0x05, "1000" )
+ PORT_DIPSETTING( 0x06, "1100" )
+ PORT_DIPNAME( 0x08, 0x00, "Playing Graphics" ) PORT_DIPLOCATION("IN5:4")
PORT_DIPSETTING( 0x08, "Bricks" )
PORT_DIPSETTING( 0x00, "Fruits" )
- PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
+
+ PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) PORT_DIPLOCATION("IN5:5")
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
+ PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) PORT_DIPLOCATION("IN5:6")
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, "Debug?" ) // displays numbers over the game area
+
+ PORT_DIPNAME( 0x40, 0x40, "Game Mode" ) PORT_DIPLOCATION("IN5:7")
+ PORT_DIPSETTING( 0x40, "Gamble" )
+ PORT_DIPSETTING( 0x00, "Amusement" )
+
+ // this one displays numbers over the game area
+ PORT_DIPNAME( 0x80, 0x80, "Debug?" ) PORT_DIPLOCATION("IN5:8")
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
INPUT_PORTS_END
+
+/*************************************************
+* Graphics Layouts *
+*************************************************/
+
static const gfx_layout tiles8x8_layout =
{
8,8,
@@ -266,55 +382,19 @@ static const gfx_layout tiles8x8_layout =
8*8
};
+
+/*************************************************
+* Graphics Decode Information *
+*************************************************/
+
static GFXDECODE_START( gfx_carrera )
GFXDECODE_ENTRY( "tiles", 0, tiles8x8_layout, 0, 1 )
GFXDECODE_END
-uint32_t carrera_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
-{
- int count = 0;
-
- for (int y = 0; y < 32; y++)
- {
- for (int x = 0; x < 64; x++)
- {
- int tile = m_tileram[count & 0x7ff] | m_tileram[(count & 0x7ff) + 0x800] << 8;
-
- m_gfxdecode->gfx(0)->opaque(bitmap, cliprect, tile, 0, 0, 0, x * 8, y * 8);
- count++;
- }
- }
- return 0;
-}
-
-uint8_t carrera_state::unknown_r()
-{
- return machine().rand();
-}
-
-void carrera_state::palette(palette_device &palette) const
-{
- uint8_t const *const color_prom = memregion("proms")->base();
- for (int i = 0; i < 0x20; ++i)
- {
- int bit0, bit1;
- int const br_bit0 = BIT(color_prom[i], 6);
- int const br_bit1 = BIT(color_prom[i], 7);
-
- bit0 = BIT(color_prom[i], 0);
- bit1 = BIT(color_prom[i], 3);
- int const b = 0x0e * br_bit0 + 0x1f * br_bit1 + 0x43 * bit0 + 0x8f * bit1;
- bit0 = BIT(color_prom[i], 1);
- bit1 = BIT(color_prom[i], 4);
- int const g = 0x0e * br_bit0 + 0x1f * br_bit1 + 0x43 * bit0 + 0x8f * bit1;
- bit0 = BIT(color_prom[i], 2);
- bit1 = BIT(color_prom[i], 5);
- int const r = 0x0e * br_bit0 + 0x1f * br_bit1 + 0x43 * bit0 + 0x8f * bit1;
-
- palette.set_pen_color(i, rgb_t(r, g, b));
- }
-}
+/*************************************************
+* Machine Drivers *
+*************************************************/
void carrera_state::carrera(machine_config &config)
{
@@ -325,10 +405,11 @@ void carrera_state::carrera(machine_config &config)
m_maincpu->set_addrmap(AS_PROGRAM, &carrera_state::prg_map);
m_maincpu->set_addrmap(AS_IO, &carrera_state::io_map);
+ 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_vblank_time(ATTOSECONDS_IN_USEC(0));
screen.set_size(512, 256);
screen.set_visarea_full();
screen.set_screen_update(FUNC(carrera_state::screen_update));
@@ -353,6 +434,10 @@ void carrera_state::carrera(machine_config &config)
}
+/*************************************************
+* ROM Load *
+*************************************************/
+
ROM_START( carrera )
ROM_REGION( 0x10000, "maincpu", 0 )
ROM_LOAD( "27512.ic22", 0x00000, 0x10000, CRC(2385b9c8) SHA1(12d4397779e074096fbb23b114985f104366b79c) )
@@ -364,6 +449,9 @@ ROM_START( carrera )
ROM_LOAD( "27512.ic4", 0x30000, 0x10000, CRC(97433f36) SHA1(39f3c6b76ad540693682832aba6e4fc400ca3753) )
ROM_LOAD( "27512.ic5", 0x40000, 0x10000, CRC(ffa75920) SHA1(aa5619f5aabcdfa250bb24bcad101a8c512a1776) )
+ ROM_REGION( 0x800, "nvram", 0 ) // default NVRAM
+ ROM_LOAD( "carrera_nvram.bin", 0x0000, 0x0800, CRC(b2ac3ddd) SHA1(22886fba71badbdfa754489057889b5326bbaf78) )
+
ROM_REGION( 0x20, "proms", 0 )
ROM_LOAD( "82s123.ic39", 0x00, 0x20, CRC(af16359f) SHA1(1ff5c9d7807e52be09c0ded56fb68a47e41b3fcf) )
ROM_END
@@ -379,15 +467,18 @@ ROM_START( bsebman )
ROM_LOAD( "ic4", 0x30000, 0x10000, CRC(6b569989) SHA1(e00263fae310094ad5119e3a9673fb342f643ddc) )
ROM_LOAD( "ic5", 0x40000, 0x10000, CRC(21635791) SHA1(514078694269582c33fb7dddd6171089f9e21ee2) )
+ ROM_REGION( 0x800, "nvram", 0 ) // default NVRAM
+ ROM_LOAD( "carrera_nvram.bin", 0x0000, 0x0800, CRC(b2ac3ddd) SHA1(22886fba71badbdfa754489057889b5326bbaf78) )
+
ROM_REGION( 0x20, "proms", 0 )
ROM_LOAD( "am27s19.ic39", 0x00, 0x20, CRC(af16359f) SHA1(1ff5c9d7807e52be09c0ded56fb68a47e41b3fcf) )
ROM_END
ROM_START( bsebmanbl )
ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD( "27512.ic22", 0x00000, 0x10000, CRC(7b896b33) SHA1(841d5c7853e18109b74cad44c9f0d91398add146) ) // SLDH
+ ROM_LOAD( "27512.ic22", 0x00000, 0x10000, CRC(7b896b33) SHA1(841d5c7853e18109b74cad44c9f0d91398add146) ) // SLDH
- ROM_REGION( 0x50000, "tiles", 0 ) // still has BS GFX
+ ROM_REGION( 0x50000, "tiles", 0 ) // still has BS GFX
ROM_LOAD( "27512.ic1", 0x00000, 0x10000, CRC(a16e914e) SHA1(09f2271f193a7bffd62ef6e428ecbf9aa1154860) )
ROM_LOAD( "27512.ic2", 0x10000, 0x10000, CRC(147036a5) SHA1(34b4818fe61c5b13220b0a2001987b68b655b2cb) )
ROM_LOAD( "27512.ic3", 0x20000, 0x10000, CRC(920eee0e) SHA1(85e6d5292b751c57c64d17858bd00292356599e3) )
@@ -399,10 +490,10 @@ ROM_START( bsebmanbl )
ROM_END
ROM_START( bsebmanbl2 )
- ROM_REGION( 0x10000, "maincpu", 0 ) // has Carrera, Avraam and Ballas strings
+ ROM_REGION( 0x10000, "maincpu", 0 ) // has Carrera, Avraam and Ballas strings
ROM_LOAD( "27512.ic22", 0x00000, 0x10000, CRC(ca2c8962) SHA1(140a217bb0365ec55116ba483208bdf1d820a7af) )
- ROM_REGION( 0x50000, "tiles", 0 ) // hacked J.T. GFX instead of BS
+ ROM_REGION( 0x50000, "tiles", 0 ) // hacked J.T. GFX instead of BS
ROM_LOAD( "27512.ic1", 0x00000, 0x10000, CRC(65ad616a) SHA1(e87d6d187ec5c99628d767a9720dd9d634e39c2d) )
ROM_LOAD( "27512.ic2", 0x10000, 0x10000, CRC(64004dcb) SHA1(f9af56035f00d3d914c8e83e941762cb6153fc16) )
ROM_LOAD( "27512.ic3", 0x20000, 0x10000, CRC(c6e0a838) SHA1(e30d0f28845f331839afc44fb7358be72d2a88cb) )
@@ -415,24 +506,24 @@ ROM_END
ROM_START( alantin )
ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD( "alpro.ic22", 0x00000, 0x10000, CRC(1eb97b31) SHA1(7097cf344734a2b553356f9b9fd6453e584a6e3f) ) // 27512
+ ROM_LOAD( "alpro.ic22", 0x00000, 0x10000, CRC(1eb97b31) SHA1(7097cf344734a2b553356f9b9fd6453e584a6e3f) ) // 27512
- ROM_REGION( 0x50000, "tiles", 0 ) // still has BS GFX
+ ROM_REGION( 0x50000, "tiles", 0 ) // still has BS GFX
ROM_LOAD( "alantin1.ic1", 0x00000, 0x10000, CRC(feb49cfd) SHA1(696683375c832b4cd6db9eef0edf4919b90c97ef) )
ROM_LOAD( "alantin2.ic2", 0x10000, 0x10000, CRC(e79da4b9) SHA1(a80c5f6431fc755645a0c8cd0cb290669f0cbada) )
ROM_LOAD( "alantin3.ic3", 0x20000, 0x10000, CRC(73d7c748) SHA1(bf688b8f506859ed3c514915676b13cecfec0a81) )
ROM_LOAD( "alantin4.ic4", 0x30000, 0x10000, CRC(6a061afd) SHA1(f6d736bd284e97ab915adb249c371617daa02a36) )
ROM_LOAD( "alantin5.ic5", 0x40000, 0x10000, CRC(35d8fb1b) SHA1(5d7ff8089e16ebb792543eeb9cc682f9f5eba6fe) )
- ROM_REGION( 0x20, "proms", 0 )
- ROM_LOAD( "82s123.ic39", 0x00, 0x20, CRC(5b0e598f) SHA1(99a8e80229d684f2083634ae2d96bf1d4f13677c) )
+ ROM_REGION( 0x20, "proms", 0 ) // swapping bytes through a driver init has no palette response.
+ ROM_LOAD16_WORD_SWAP( "82s123.ic39", 0x00, 0x20, CRC(5b0e598f) SHA1(99a8e80229d684f2083634ae2d96bf1d4f13677c) )
ROM_END
ROM_START( drkseal )
- ROM_REGION( 0x10000, "maincpu", 0 ) // still shows Alantin and Avraam strings
- ROM_LOAD( "27512.ic22", 0x00000, 0x10000, CRC(8a1732e5) SHA1(191de15d0ccf439991e3c0c258cbfeb79ef19002) ) // 1xxxxxxxxxxxxxxx = 0xFF
+ ROM_REGION( 0x10000, "maincpu", 0 ) // still shows Alantin and Avraam strings
+ ROM_LOAD( "27512.ic22", 0x00000, 0x10000, CRC(8a1732e5) SHA1(191de15d0ccf439991e3c0c258cbfeb79ef19002) ) // 1xxxxxxxxxxxxxxx = 0xFF
- ROM_REGION( 0x50000, "tiles", 0 ) // shows Vegas copyright
+ ROM_REGION( 0x50000, "tiles", 0 ) // shows Vegas copyright
ROM_LOAD( "27512.ic1", 0x00000, 0x10000, CRC(fd3b6bbc) SHA1(b1fe09772a5d9a07077038244517fc7169266893) )
ROM_LOAD( "27512.ic2", 0x10000, 0x10000, CRC(d3a048e3) SHA1(687d58b84ca5985f51755b09c8a8b2ef68d16399) )
ROM_LOAD( "27512.ic3", 0x20000, 0x10000, CRC(50b8f9ee) SHA1(4f31e36eb54fde40e409f0ac18bf87126174be33) )
@@ -443,16 +534,17 @@ ROM_START( drkseal )
ROM_LOAD( "82s123.ic39", 0x00, 0x20, CRC(03aadf73) SHA1(e5baf8c5e7276eb207357e4cbb694c75e8caab6a) )
ROM_END
-// this set uses a newer 'TYPE C-2000' board with a 'Rania Original 2000 Type 8515' riser board (the Z80 and MC6845 have been moved here along with a AT90S8515 MCU)
+// this set uses a newer 'TYPE C-2000' board with a 'Rania Original 2000 Type 8515' riser board
+// (the Z80 and MC6845 have been moved here along with a AT90S8515 MCU)
ROM_START( ncarrera )
- ROM_REGION( 0x10000, "maincpu", 0 ) // has 2001, Mpampis and Avraam strings
- ROM_LOAD( "27512.ic22", 0x00000, 0x10000, CRC(3ec2dbca) SHA1(896fbccaf844c1fa5861b176c09e4a3707b3524f) ) // 1xxxxxxxxxxxxxxx = 0xFF
+ ROM_REGION( 0x10000, "maincpu", 0 ) // has 2001, Mpampis and Avraam strings
+ ROM_LOAD( "27512.ic22", 0x00000, 0x10000, CRC(3ec2dbca) SHA1(896fbccaf844c1fa5861b176c09e4a3707b3524f) ) // 1xxxxxxxxxxxxxxx = 0xFF
ROM_REGION( 0x2200, "mcu", 0 )
ROM_LOAD( "internal_eeprom", 0x0000, 0x0200, NO_DUMP )
ROM_LOAD( "internal_flash", 0x0200, 0x2000, NO_DUMP )
- ROM_REGION( 0x50000, "tiles", 0 ) // has both New Carrera and New Bomberman GFX
+ ROM_REGION( 0x50000, "tiles", 0 ) // has both New Carrera and New Bomberman GFX
ROM_LOAD( "27512.ic1", 0x00000, 0x10000, CRC(dbec54c7) SHA1(ca7e54c198ca8abeffba1b323a514678384c35f9) )
ROM_LOAD( "27512.ic2", 0x10000, 0x10000, CRC(8e8c2b6d) SHA1(001121e0b91d8e0efdc3f5f99c43e1751b4be758) )
ROM_LOAD( "27512.ic3", 0x20000, 0x10000, CRC(ac66cda8) SHA1(65fae21de9f9727c5d8198ff57b27d703a7518fc) )
@@ -466,10 +558,15 @@ ROM_END
} // anonymous namespace
-GAME( 19??, carrera, 0, carrera, carrera, carrera_state, empty_init, ROT0, "BS Electronics", "Carrera (Version 6.7)", MACHINE_SUPPORTS_SAVE )
-GAME( 19??, bsebman, carrera, carrera, carrera, carrera_state, empty_init, ROT0, "BS Electronics", "Bomberman (Version 6.6)", MACHINE_SUPPORTS_SAVE )
-GAME( 1999, bsebmanbl, carrera, carrera, carrera, carrera_state, empty_init, ROT0, "bootleg (Ballas / Avraam)", "Bomberman (Version 6.6, Avraam bootleg)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // needs verifying of inputs
-GAME( 1999, bsebmanbl2, carrera, carrera, carrera, carrera_state, empty_init, ROT0, "bootleg (J.T.)", "Bomberman (Version 6.6, J.T. bootleg)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // needs verifying of inputs
-GAME( 1999, alantin, 0, carrera, carrera, carrera_state, empty_init, ROT0, "bootleg (Robert / Avraam)", "Alantin - Aladdin's Magic Lamp", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // needs verifying of inputs
-GAME( 1999, drkseal, 0, carrera, carrera, carrera_state, empty_init, ROT0, "bootleg (Vegas)", "Dark Seal (8-liner)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // needs verifying of inputs
-GAME( 2001, ncarrera, 0, carrera, carrera, carrera_state, empty_init, ROT0, "bootleg (J.T.)", "New Carrera - Version 2000", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // needs MCU dump
+/*********************************************
+* Game Drivers *
+*********************************************/
+
+// YEAR NAME PARENT MACHINE INPUT CLASS INIT ROT COMPANY FULLNAME FLAGS
+GAME( 19??, carrera, 0, carrera, carrera, carrera_state, empty_init, ROT0, "BS Electronics", "Carrera (Version 6.7)", MACHINE_SUPPORTS_SAVE )
+GAME( 19??, bsebman, carrera, carrera, carrera, carrera_state, empty_init, ROT0, "BS Electronics", "Carrera (Version 6.7) / Bomberman (Version 6.6)", MACHINE_SUPPORTS_SAVE )
+GAME( 1999, bsebmanbl, carrera, carrera, carrera, carrera_state, empty_init, ROT0, "bootleg (Ballas / Avraam)", "Bomberman (Version 6.6, Avraam bootleg)", MACHINE_SUPPORTS_SAVE )
+GAME( 1999, bsebmanbl2, carrera, carrera, carrera, carrera_state, empty_init, ROT0, "bootleg (J.T.)", "Bomberman (Version 6.6, J.T. bootleg)", MACHINE_SUPPORTS_SAVE )
+GAME( 1999, alantin, 0, carrera, carrera, carrera_state, empty_init, ROT0, "bootleg (Robert / Avraam)", "Alantin - Aladdin's Magic Lamp", MACHINE_SUPPORTS_SAVE )
+GAME( 1999, drkseal, 0, carrera, carrera, carrera_state, empty_init, ROT0, "bootleg (Vegas)", "Dark Seal (8-liner)", MACHINE_SUPPORTS_SAVE )
+GAME( 2001, ncarrera, 0, carrera, carrera, carrera_state, empty_init, ROT0, "bootleg (J.T.)", "New Carrera - Version 2000", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // needs MCU dump
diff --git a/src/mame/misc/gms.cpp b/src/mame/misc/gms.cpp
index c35e44609ca..1ec7172a253 100644
--- a/src/mame/misc/gms.cpp
+++ b/src/mame/misc/gms.cpp
@@ -68,15 +68,19 @@ Hold service credit (9) and reset (F3) to enter service mode.
TODO:
+- work out how flip flop input is read in mahjong games in mahjong keyboard mode
+- work out how payout/key-out input is read in mahjong games in mahjong keyboard mode
+- work out how payout/key-out input is read in mahjong games in joystick mode
- correct EEPROM hookup for all games (this would get rid of a lot of ROM patches)
- hookup MCU and YM2151 / YM3812 sound for the mahjong games
- hookup PIC16F84 for rbspm
- emulate protection devices correctly instead of patching
- hookup lamps and do layouts
-- keyboard inputs for mahjong games
- use real values for reel tilemaps offsets instead of hardcoded ones (would fix magslot)
- complete inputs for baile, yyhm, jinpaish, ssanguoj, cjdlz (needs someone who understands
Chinese and knows how to play)
+- game logic seems broken in mahjong games (reach permitted when it shouldn't be, chi not
+ permitted when it should be, other issues)
- game logic in baile seems broken (you always win), maybe due to the patches?
- broken title GFX in yyhm (transparent pen problem?)
- the newer games seem to use range 0x9e1000-0x9e1fff during gameplay
@@ -131,6 +135,7 @@ public:
, m_oki(*this, "oki")
, m_ymsnd(*this, "ymsnd")
, m_dsw(*this, "DSW%u", 1U)
+ , m_key(*this, "KEY%u", 0U)
{
}
@@ -150,6 +155,8 @@ public:
void init_sscs() ATTR_COLD;
void init_super555() ATTR_COLD;
+ template <unsigned Shift> ioport_value keyboard_r();
+
protected:
virtual void video_start() override ATTR_COLD;
@@ -165,6 +172,7 @@ protected:
required_device<okim6295_device> m_oki;
optional_device<ym2151_device> m_ymsnd;
optional_ioport_array<4> m_dsw;
+ optional_ioport_array<5> m_key;
uint16_t m_reels_toggle = 0;
uint16_t m_tilebank = 0;
@@ -225,6 +233,19 @@ private:
TILE_GET_INFO_MEMBER(get_tile1_info);
};
+template <unsigned Shift>
+ioport_value gms_2layers_state::keyboard_r()
+{
+ unsigned const select = bitswap<5>(m_input_matrix, 6, 1, 5, 0, 4);
+ ioport_value result = 0x3f;
+ for (unsigned i = 0; 5 > i; ++i)
+ {
+ if (BIT(select, i))
+ result &= m_key[i]->read();
+ }
+ return result >> Shift;
+}
+
uint16_t gms_2layers_state::unk_r()
{
return machine().rand();
@@ -457,29 +478,129 @@ void gms_2layers_state::mcu_io(address_map &map)
map(0x0ff00, 0x0ffff).rw(FUNC(gms_2layers_state::mcu_io_r), FUNC(gms_2layers_state::mcu_io_w));
}
+
+#define GMS_MAHJONG_COMMON(dsw_port, dsw_bit, dsw_on) \
+ PORT_START("IN1") \
+ PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \
+ PORT_SERVICE_NO_TOGGLE(0x02, IP_ACTIVE_LOW) \
+ PORT_BIT( 0x00fc, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \
+ PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \
+ PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_GAMBLE_KEYIN ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \
+ PORT_BIT( 0x0c00, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \
+ PORT_BIT( 0xf000, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) PORT_CUSTOM_MEMBER(FUNC(gms_3layers_state::keyboard_r<0>)) \
+ PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CONDITION(dsw_port, dsw_bit, NOTEQUALS, dsw_on) \
+ PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_START1 ) PORT_CONDITION(dsw_port, dsw_bit, NOTEQUALS, dsw_on) \
+ PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_CONDITION(dsw_port, dsw_bit, NOTEQUALS, dsw_on) \
+ PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_CONDITION(dsw_port, dsw_bit, NOTEQUALS, dsw_on) \
+ PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_CONDITION(dsw_port, dsw_bit, NOTEQUALS, dsw_on) \
+ PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_CONDITION(dsw_port, dsw_bit, NOTEQUALS, dsw_on) \
+ PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_CONDITION(dsw_port, dsw_bit, NOTEQUALS, dsw_on) \
+ PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_CONDITION(dsw_port, dsw_bit, NOTEQUALS, dsw_on) \
+ PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_CONDITION(dsw_port, dsw_bit, NOTEQUALS, dsw_on) \
+ PORT_START("IN2") \
+ PORT_BIT( 0x0003, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) PORT_CUSTOM_MEMBER(FUNC(gms_3layers_state::keyboard_r<4>)) \
+ PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \
+ PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_CONDITION(dsw_port, dsw_bit, NOTEQUALS, dsw_on) \
+ PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) PORT_CONDITION(dsw_port, dsw_bit, NOTEQUALS, dsw_on) \
+ PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_GAMBLE_KEYIN ) PORT_CONDITION(dsw_port, dsw_bit, NOTEQUALS, dsw_on) \
+ PORT_START("KEY0") \
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_KAN ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_M ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_I ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_E ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_A ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \
+ PORT_BIT( 0x3f, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION(dsw_port, dsw_bit, NOTEQUALS, dsw_on) \
+ PORT_START("KEY1") \
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_BET ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_REACH ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_N ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_J ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_F ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_B ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \
+ PORT_BIT( 0x3f, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION(dsw_port, dsw_bit, NOTEQUALS, dsw_on) \
+ PORT_START("KEY2") \
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_RON ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_CHI ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_K ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_G ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_C ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \
+ PORT_BIT( 0x3f, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION(dsw_port, dsw_bit, NOTEQUALS, dsw_on) \
+ PORT_START("KEY3") \
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_PON ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_L ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_H ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_D ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \
+ PORT_BIT( 0x3f, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION(dsw_port, dsw_bit, NOTEQUALS, dsw_on) \
+ PORT_START("KEY4") \
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_BIG ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_SCORE ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_DOUBLE_UP ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_SMALL ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_LAST_CHANCE ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \
+ PORT_BIT( 0x3f, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION(dsw_port, dsw_bit, NOTEQUALS, dsw_on)
+
+#define GMS_MAHJONG_COINAGE(tag, loc) \
+ PORT_DIPNAME( 0x0007, 0x0000, DEF_STR(Coinage) ) PORT_DIPLOCATION(loc ":1,2,3") /* 投幣比例 */ \
+ PORT_DIPSETTING( 0x0000, DEF_STR(1C_1C) ) \
+ PORT_DIPSETTING( 0x0001, DEF_STR(1C_2C) ) \
+ PORT_DIPSETTING( 0x0002, DEF_STR(1C_3C) ) \
+ PORT_DIPSETTING( 0x0003, DEF_STR(1C_5C) ) \
+ PORT_DIPSETTING( 0x0004, "1 Coin/10 Credits" ) \
+ PORT_DIPSETTING( 0x0005, "1 Coin/20 Credits" ) \
+ PORT_DIPSETTING( 0x0006, "1 Coin/50 Credits" ) \
+ PORT_DIPSETTING( 0x0007, "1 Coin/100 Credits" ) \
+ PORT_DIPNAME( 0x0018, 0x0000, "Key-In Rate" ) PORT_DIPLOCATION(loc ":4,5") /* 投幣×開分倍率 */ \
+ PORT_DIPSETTING( 0x0018, "5" ) PORT_CONDITION(tag, 0x0007, EQUALS, 0x0000) \
+ PORT_DIPSETTING( 0x0000, "10" ) PORT_CONDITION(tag, 0x0007, EQUALS, 0x0000) \
+ PORT_DIPSETTING( 0x0008, "20" ) PORT_CONDITION(tag, 0x0007, EQUALS, 0x0000) \
+ PORT_DIPSETTING( 0x0010, "50" ) PORT_CONDITION(tag, 0x0007, EQUALS, 0x0000) \
+ PORT_DIPSETTING( 0x0018, "10" ) PORT_CONDITION(tag, 0x0007, EQUALS, 0x0001) \
+ PORT_DIPSETTING( 0x0000, "20" ) PORT_CONDITION(tag, 0x0007, EQUALS, 0x0001) \
+ PORT_DIPSETTING( 0x0008, "40" ) PORT_CONDITION(tag, 0x0007, EQUALS, 0x0001) \
+ PORT_DIPSETTING( 0x0010, "100" ) PORT_CONDITION(tag, 0x0007, EQUALS, 0x0001) \
+ PORT_DIPSETTING( 0x0018, "15" ) PORT_CONDITION(tag, 0x0007, EQUALS, 0x0002) \
+ PORT_DIPSETTING( 0x0000, "30" ) PORT_CONDITION(tag, 0x0007, EQUALS, 0x0002) \
+ PORT_DIPSETTING( 0x0008, "60" ) PORT_CONDITION(tag, 0x0007, EQUALS, 0x0002) \
+ PORT_DIPSETTING( 0x0010, "150" ) PORT_CONDITION(tag, 0x0007, EQUALS, 0x0002) \
+ PORT_DIPSETTING( 0x0018, "25" ) PORT_CONDITION(tag, 0x0007, EQUALS, 0x0003) \
+ PORT_DIPSETTING( 0x0000, "50" ) PORT_CONDITION(tag, 0x0007, EQUALS, 0x0003) \
+ PORT_DIPSETTING( 0x0008, "100" ) PORT_CONDITION(tag, 0x0007, EQUALS, 0x0003) \
+ PORT_DIPSETTING( 0x0010, "250" ) PORT_CONDITION(tag, 0x0007, EQUALS, 0x0003) \
+ PORT_DIPSETTING( 0x0018, "50" ) PORT_CONDITION(tag, 0x0007, EQUALS, 0x0004) \
+ PORT_DIPSETTING( 0x0000, "100" ) PORT_CONDITION(tag, 0x0007, EQUALS, 0x0004) \
+ PORT_DIPSETTING( 0x0008, "200" ) PORT_CONDITION(tag, 0x0007, EQUALS, 0x0004) \
+ PORT_DIPSETTING( 0x0010, "500" ) PORT_CONDITION(tag, 0x0007, EQUALS, 0x0004) \
+ PORT_DIPSETTING( 0x0018, "100" ) PORT_CONDITION(tag, 0x0007, EQUALS, 0x0005) \
+ PORT_DIPSETTING( 0x0000, "200" ) PORT_CONDITION(tag, 0x0007, EQUALS, 0x0005) \
+ PORT_DIPSETTING( 0x0008, "400" ) PORT_CONDITION(tag, 0x0007, EQUALS, 0x0005) \
+ PORT_DIPSETTING( 0x0010, "1000" ) PORT_CONDITION(tag, 0x0007, EQUALS, 0x0005) \
+ PORT_DIPSETTING( 0x0018, "250" ) PORT_CONDITION(tag, 0x0007, EQUALS, 0x0006) \
+ PORT_DIPSETTING( 0x0000, "500" ) PORT_CONDITION(tag, 0x0007, EQUALS, 0x0006) \
+ PORT_DIPSETTING( 0x0008, "1000" ) PORT_CONDITION(tag, 0x0007, EQUALS, 0x0006) \
+ PORT_DIPSETTING( 0x0010, "2500" ) PORT_CONDITION(tag, 0x0007, EQUALS, 0x0006) \
+ PORT_DIPSETTING( 0x0018, "500" ) PORT_CONDITION(tag, 0x0007, EQUALS, 0x0007) \
+ PORT_DIPSETTING( 0x0000, "1000" ) PORT_CONDITION(tag, 0x0007, EQUALS, 0x0007) \
+ PORT_DIPSETTING( 0x0008, "2000" ) PORT_CONDITION(tag, 0x0007, EQUALS, 0x0007) \
+ PORT_DIPSETTING( 0x0010, "5000" ) PORT_CONDITION(tag, 0x0007, EQUALS, 0x0007)
+
+
static INPUT_PORTS_START( rbmk )
- PORT_START("IN1") // 16bit
- PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_SERVICE1 )
- PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_COIN1 )
- PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_START1 )
- PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_MAHJONG_DOUBLE_UP )
- PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT )
- PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT )
- PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_BUTTON1 )
- PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_MAHJONG_BET )
- PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON2 )
- PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ GMS_MAHJONG_COMMON("DSW2", 0x0080, 0x0000)
- PORT_START("IN2") // 16bit
- PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_TOGGLE
- PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) PORT_TOGGLE
- PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_COIN2 )
+ PORT_MODIFY("IN1") // 16bit
+ PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW2", 0x0080, EQUALS, 0x0080)
+ PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW2", 0x0080, EQUALS, 0x0080)
+ PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW2", 0x0080, EQUALS, 0x0080)
+ PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW2", 0x0080, EQUALS, 0x0080)
+ PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW2", 0x0080, EQUALS, 0x0080)
+ PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW2", 0x0080, EQUALS, 0x0080)
+
+ PORT_MODIFY("IN2") // 16bit
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -544,31 +665,17 @@ static INPUT_PORTS_START( rbmk )
PORT_DIPSETTING( 0x8000, "Mahjong" )
PORT_DIPSETTING( 0x0000, "Chess" )
-
PORT_START("DSW2") // 16bit, in test mode first 8 are recognized as dsw2, second 8 as dsw5
- PORT_DIPNAME( 0x0007, 0x0000, DEF_STR( Coinage ) ) PORT_DIPLOCATION("DSW2:1,2,3")
- PORT_DIPSETTING( 0x0000, DEF_STR( 1C_1C ) )
- PORT_DIPSETTING( 0x0001, DEF_STR( 1C_2C ) )
- PORT_DIPSETTING( 0x0002, DEF_STR( 1C_3C ) )
- PORT_DIPSETTING( 0x0003, DEF_STR( 1C_5C ) )
- PORT_DIPSETTING( 0x0004, "1 Coin/10 Credits" )
- PORT_DIPSETTING( 0x0005, "1 Coin/20 Credits" )
- PORT_DIPSETTING( 0x0006, "1 Coin/50 Credits" )
- PORT_DIPSETTING( 0x0007, "1 Coin/100 Credits" )
- PORT_DIPNAME( 0x0018, 0x0000, "Credits per Note" ) PORT_DIPLOCATION("DSW2:4,5,")
- PORT_DIPSETTING( 0x0018, "1 Note/5 Credits" )
- PORT_DIPSETTING( 0x0000, "1 Note/10 Credits" )
- PORT_DIPSETTING( 0x0008, "1 Note/20 Credits" )
- PORT_DIPSETTING( 0x0010, "1 Note/50 Credits" )
+ GMS_MAHJONG_COINAGE("DSW2", "DSW2")
PORT_DIPNAME( 0x0020, 0x0000, "Show Tiles after Reach" ) PORT_DIPLOCATION("DSW2:6")
PORT_DIPSETTING( 0x0020, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0040, 0x0000, "Pay Out Type" ) PORT_DIPLOCATION("DSW2:7")
PORT_DIPSETTING( 0x0040, "Credits" )
PORT_DIPSETTING( 0x0000, "Coins" )
- PORT_DIPNAME( 0x0080, 0x0080, "Controls" ) PORT_DIPLOCATION("DSW2:8") // should default to keyboard, but set on joystick since the former isn't emulated yet
+ PORT_DIPNAME( 0x0080, 0x0080, "Controls" ) PORT_DIPLOCATION("DSW2:8")
+ PORT_DIPSETTING( 0x0000, "Mahjong" )
PORT_DIPSETTING( 0x0080, DEF_STR( Joystick ) )
- PORT_DIPSETTING( 0x0000, "Keyboard" )
PORT_DIPNAME( 0x0100, 0x0000, DEF_STR( Unused ) ) PORT_DIPLOCATION("DSW5:1")
PORT_DIPSETTING( 0x0100, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
@@ -654,28 +761,17 @@ INPUT_PORTS_END
static INPUT_PORTS_START( ssanguoj )
- PORT_START("IN1") // 16bit
- PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_SERVICE1 )
- PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_COIN1 )
- PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_START1 )
- PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_MAHJONG_DOUBLE_UP )
- PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT )
- PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT )
- PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_BUTTON1 )
- PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_MAHJONG_BET )
- PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON2 )
- PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ GMS_MAHJONG_COMMON("DSW1", 0x0080, 0x0000)
- PORT_START("IN2") // 16bit
- PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_TOGGLE
- PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) PORT_TOGGLE
- PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_COIN2 )
+ PORT_MODIFY("IN1") // 16bit
+ PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW2", 0x0080, EQUALS, 0x0080)
+ PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW2", 0x0080, EQUALS, 0x0080)
+ PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW2", 0x0080, EQUALS, 0x0080)
+ PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW2", 0x0080, EQUALS, 0x0080)
+ PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW2", 0x0080, EQUALS, 0x0080)
+ PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW2", 0x0080, EQUALS, 0x0080)
+
+ PORT_MODIFY("IN2") // 16bit
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -691,32 +787,18 @@ static INPUT_PORTS_START( ssanguoj )
PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", FUNC(eeprom_serial_93cxx_device::do_read))
// Only 4 DIP banks are actually populated on PCBs (2 empty spaces), but test mode reads all 6.
- // TODO: dips
- PORT_START("DSW1") // 16bit, in test mode first 8 are recognized as dsw1, second 8 as dsw4.
- PORT_DIPNAME( 0x0001, 0x0000, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW1:1")
- PORT_DIPSETTING( 0x0001, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0002, 0x0000, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW1:2")
- PORT_DIPSETTING( 0x0002, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0004, 0x0000, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW1:3")
- PORT_DIPSETTING( 0x0004, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0008, 0x0000, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW1:4")
- PORT_DIPSETTING( 0x0008, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0010, 0x0000, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW1:5")
- PORT_DIPSETTING( 0x0010, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
+ // TODO: DIPs (apparently no settings display in game)
+ PORT_START("DSW1") // 16bit, in test mode first 8 are recognized as DSW1, second 8 as DSW4.
+ GMS_MAHJONG_COINAGE("DSW1", "DSW1")
PORT_DIPNAME( 0x0020, 0x0000, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW1:6")
PORT_DIPSETTING( 0x0020, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0040, 0x0000, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW1:7")
PORT_DIPSETTING( 0x0040, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0080, 0x0080, "Controls" ) PORT_DIPLOCATION("DSW1:8") // should default to keyboard, but set on joystick since the former isn't emulated yet
- PORT_DIPSETTING( 0x0080, DEF_STR( Joystick ) )
- PORT_DIPSETTING( 0x0000, "Keyboard" )
+ PORT_DIPNAME( 0x0080, 0x0000, "Controls" ) PORT_DIPLOCATION("DSW1:8")
+ PORT_DIPSETTING( 0x0000, "Mahjong" )
+ PORT_DIPSETTING( 0x0080, DEF_STR(Joystick) )
PORT_DIPNAME( 0x0100, 0x0000, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW4:1")
PORT_DIPSETTING( 0x0100, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
@@ -742,11 +824,10 @@ static INPUT_PORTS_START( ssanguoj )
PORT_DIPSETTING( 0x8000, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
-
- PORT_START("DSW2") // 16bit, in test mode first 8 are recognized as dsw2, second 8 as dsw5
- PORT_DIPNAME( 0x0001, 0x0000, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW2:1")
- PORT_DIPSETTING( 0x0001, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
+ PORT_START("DSW2") // 16bit, in test mode first 8 are recognized as DSW2, second 8 as DSW5
+ PORT_DIPNAME( 0x0001, 0x0000, DEF_STR(Demo_Sounds) ) PORT_DIPLOCATION("DSW2:1")
+ PORT_DIPSETTING( 0x0001, DEF_STR(Off) )
+ PORT_DIPSETTING( 0x0000, DEF_STR(On) )
PORT_DIPNAME( 0x0002, 0x0000, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW2:2")
PORT_DIPSETTING( 0x0002, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
@@ -765,9 +846,9 @@ static INPUT_PORTS_START( ssanguoj )
PORT_DIPNAME( 0x0040, 0x0000, DEF_STR( Version ) ) PORT_DIPLOCATION("DSW2:7")
PORT_DIPSETTING( 0x0040, "8.9" )
PORT_DIPSETTING( 0x0000, "8.9-" )
- PORT_DIPNAME( 0x0080, 0x0000, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW2:8")
- PORT_DIPSETTING( 0x0080, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
+ PORT_DIPNAME( 0x0080, 0x0000, "Score Display Mode" ) PORT_DIPLOCATION("DSW2:8") // sets how points, credits, bets, etc. are displayed
+ PORT_DIPSETTING( 0x0080, "Numbers" ) // Arabic numerals
+ PORT_DIPSETTING( 0x0000, "Circle Tiles" ) // tong mahjong tiles representing digits
PORT_DIPNAME( 0x0100, 0x0000, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW5:1")
PORT_DIPSETTING( 0x0100, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
@@ -793,7 +874,7 @@ static INPUT_PORTS_START( ssanguoj )
PORT_DIPSETTING( 0x8000, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_START("DSW3") // 16bit, in test mode first 8 are recognized as dsw3, second 8 as dsw6
+ PORT_START("DSW3") // 16bit, in test mode first 8 are recognized as DSW3, second 8 as DSW6
PORT_DIPNAME( 0x0001, 0x0000, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW3:1")
PORT_DIPSETTING( 0x0001, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
@@ -803,9 +884,9 @@ static INPUT_PORTS_START( ssanguoj )
PORT_DIPNAME( 0x0004, 0x0000, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW3:3")
PORT_DIPSETTING( 0x0004, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0008, 0x0000, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW3:4")
- PORT_DIPSETTING( 0x0008, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
+ PORT_DIPNAME( 0x0008, 0x0000, "Odds Rate" ) PORT_DIPLOCATION("DSW3:4")
+ PORT_DIPSETTING( 0x0000, DEF_STR(Low) ) // 1 1 1 1 10 10 / 10 10 10 10 10 10)
+ PORT_DIPSETTING( 0x0008, DEF_STR(High) ) // 2 2 3 3 20 60 / 20 30 30 40 40 40)
PORT_DIPNAME( 0x0010, 0x0000, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW3:5")
PORT_DIPSETTING( 0x0010, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
@@ -1344,46 +1425,36 @@ static INPUT_PORTS_START( baile )
INPUT_PORTS_END
static INPUT_PORTS_START( yyhm )
- PORT_INCLUDE( sc2in1 )
+ GMS_MAHJONG_COMMON("DSW1", 0x0080, 0x0080)
- PORT_MODIFY("IN1") // TODO: likely incomplete
- PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_SERVICE_NO_TOGGLE(0x02, IP_ACTIVE_LOW)
- PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_COIN1 )
- PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_START1 )
- PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN )
- PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT )
- PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT )
- PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_BUTTON1 )
- PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON2 ) // also used to select in test mode
- PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_MODIFY("IN1")
+ PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0000)
+ PORT_BIT( 0xf800, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0000)
- // Only 1 8-DIP bank on PCB. Dips' effects as per test mode.
- PORT_MODIFY("DSW1")
- PORT_DIPNAME( 0x0001, 0x0001, DEF_STR( Test ) ) PORT_DIPLOCATION("SW1:1")
- PORT_DIPSETTING( 0x0001, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0002, 0x0002, "Voice Announcements" ) PORT_DIPLOCATION("SW1:2")
- PORT_DIPSETTING( 0x0000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0002, DEF_STR( On ) )
- PORT_DIPNAME( 0x0004, 0x0004, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW1:3")
- PORT_DIPSETTING( 0x0000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0004, DEF_STR( On ) )
- PORT_DIPNAME( 0x0008, 0x0008, "Scoring Type" ) PORT_DIPLOCATION("SW1:4")
- PORT_DIPSETTING( 0x0000, "Mahjong Tile Scoring" )
- PORT_DIPSETTING( 0x0008, "Numeric Scoring" )
+ PORT_MODIFY("IN2")
+ PORT_BIT( 0xfff8, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ //PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", FUNC(eeprom_serial_93cxx_device::do_read)) // TODO: verify
+
+ // Only 1 8-DIP bank on PCB. DIPs' effects as per test mode.
+ PORT_START("DSW1")
+ PORT_DIPNAME( 0x0001, 0x0001, DEF_STR(Service_Mode) ) PORT_DIPLOCATION("SW1:1") // 遊戲設定
+ PORT_DIPSETTING( 0x0001, DEF_STR(Off) ) // 正常
+ PORT_DIPSETTING( 0x0000, DEF_STR(On) ) // 開機進入
+ PORT_DIPNAME( 0x0002, 0x0002, "Gal Voice" ) PORT_DIPLOCATION("SW1:2") // 語音報牌
+ PORT_DIPSETTING( 0x0000, DEF_STR(Off) ) // 無
+ PORT_DIPSETTING( 0x0002, DEF_STR(On) ) // 有 (calls discarded tiles)
+ PORT_DIPNAME( 0x0004, 0x0004, DEF_STR(Demo_Sounds) ) PORT_DIPLOCATION("SW1:3") // 示範音樂
+ PORT_DIPSETTING( 0x0000, DEF_STR(Off) ) // 無
+ PORT_DIPSETTING( 0x0004, DEF_STR(On) ) // 有
+ PORT_DIPNAME( 0x0008, 0x0008, "Score Display" ) PORT_DIPLOCATION("SW1:4") // 計分方式
+ PORT_DIPSETTING( 0x0008, "Numbers" ) // 數字計分
+ PORT_DIPSETTING( 0x0000, "Circle Tiles" ) // 筒子計分
PORT_DIPUNUSED_DIPLOC( 0x0010, 0x0010, "SW1:5") // No effect listed in test mode
PORT_DIPUNUSED_DIPLOC( 0x0020, 0x0020, "SW1:6") // "
PORT_DIPUNUSED_DIPLOC( 0x0040, 0x0040, "SW1:7") // "
- PORT_DIPNAME( 0x0080, 0x0000, "Connector" ) PORT_DIPLOCATION("SW1:8")
- PORT_DIPSETTING( 0x0000, "Joystick" )
- PORT_DIPSETTING( 0x0080, "Mahjong" )
+ PORT_DIPNAME( 0x0080, 0x0080, DEF_STR(Controls) ) PORT_DIPLOCATION("SW1:8") // 操作方式
+ PORT_DIPSETTING( 0x0080, "Mahjong" ) // 鍵盤
+ PORT_DIPSETTING( 0x0000, DEF_STR(Joystick) ) // 搖桿
INPUT_PORTS_END
static INPUT_PORTS_START( ballch )
@@ -1718,29 +1789,18 @@ static INPUT_PORTS_START( sball2k1 ) // default password for accessing game sett
PORT_DIPUNKNOWN_DIPLOC( 0x0080, 0x0080, "SW3:8" )
INPUT_PORTS_END
-static INPUT_PORTS_START( cjdlz ) // TODO
- PORT_START("IN1") // 16bit
- PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_SERVICE1 )
- PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_COIN1 )
- PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_START1 )
- PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_MAHJONG_DOUBLE_UP )
- PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT )
- PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT )
- PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_BUTTON1 )
- PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_MAHJONG_BET )
- PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON2 )
- PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
+static INPUT_PORTS_START( cjdlz )
+ GMS_MAHJONG_COMMON("DSW2", 0x0080, 0x0000)
- PORT_START("IN2") // 16bit
- PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_TOGGLE
- PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) PORT_TOGGLE
- PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_COIN2 )
+ PORT_MODIFY("IN1") // 16bit
+ PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW2", 0x0080, EQUALS, 0x0080)
+ PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW2", 0x0080, EQUALS, 0x0080)
+ PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW2", 0x0080, EQUALS, 0x0080)
+ PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW2", 0x0080, EQUALS, 0x0080)
+ PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW2", 0x0080, EQUALS, 0x0080)
+ PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW2", 0x0080, EQUALS, 0x0080)
+
+ PORT_MODIFY("IN2") // 16bit
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -1756,152 +1816,107 @@ static INPUT_PORTS_START( cjdlz ) // TODO
PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", FUNC(eeprom_serial_93cxx_device::do_read))
// Only 4 DIP banks are actually populated on PCBs, but test mode reads all 6.
- // TODO: dips
- PORT_START("DSW1") // 16bit, in test mode first 8 are recognized as dsw1, second 8 as dsw4.
- PORT_DIPNAME( 0x0007, 0x0000, "Pay Out Rate" ) PORT_DIPLOCATION("DSW1:1,2,3")
- PORT_DIPSETTING( 0x0000, "72" )
- PORT_DIPSETTING( 0x0001, "75" )
- PORT_DIPSETTING( 0x0002, "78" )
- PORT_DIPSETTING( 0x0003, "80" )
- PORT_DIPSETTING( 0x0004, "82" )
- PORT_DIPSETTING( 0x0005, "85" )
- PORT_DIPSETTING( 0x0006, "88" )
- PORT_DIPSETTING( 0x0007, "90" )
- PORT_DIPNAME( 0x0008, 0x0000, "Odd Rate" ) PORT_DIPLOCATION("DSW1:4")
- PORT_DIPSETTING( 0x0008, DEF_STR( High ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( Low ) )
- PORT_DIPNAME( 0x0010, 0x0000, "Double Up Direct" ) PORT_DIPLOCATION("DSW1:5")
- PORT_DIPSETTING( 0x0010, DEF_STR( No ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( Yes ) )
- PORT_DIPNAME( 0x0020, 0x0000, "Double Up" ) PORT_DIPLOCATION("DSW1:6")
- PORT_DIPSETTING( 0x0020, DEF_STR( No ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( Yes ) )
- PORT_DIPNAME( 0x00c0, 0x0000, "Double Up Rate" ) PORT_DIPLOCATION("DSW1:7,8")
- PORT_DIPSETTING( 0x0000, "70" )
- PORT_DIPSETTING( 0x0040, "75" )
- PORT_DIPSETTING( 0x0080, "80" )
- PORT_DIPSETTING( 0x00c0, "85" )
- PORT_DIPNAME( 0x0100, 0x0000, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("DSW4:1")
- PORT_DIPSETTING( 0x0100, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0e00, 0x0000, "Break Max" ) PORT_DIPLOCATION("DSW4:2,3,4")
- PORT_DIPSETTING( 0x0000, "1000" )
- PORT_DIPSETTING( 0x0200, "2000" )
- PORT_DIPSETTING( 0x0400, "3000" )
- PORT_DIPSETTING( 0x0600, "5000" )
- PORT_DIPSETTING( 0x0800, "10000" )
- PORT_DIPSETTING( 0x0a00, "20000" )
- PORT_DIPSETTING( 0x0c00, "30000" )
- PORT_DIPSETTING( 0x0e00, "50000" )
- PORT_DIPNAME( 0x3000, 0x0000, "Credits Max" ) PORT_DIPLOCATION("DSW4:5,6")
+ PORT_START("DSW1") // 16bit, in test mode first 8 are recognized as DSW1, second 8 as DSW4.
+ PORT_DIPNAME( 0x0007, 0x0000, "Payout Rate" ) PORT_DIPLOCATION("DSW1:1,2,3") // 出牌率
+ PORT_DIPSETTING( 0x0000, "72%" )
+ PORT_DIPSETTING( 0x0001, "75%" )
+ PORT_DIPSETTING( 0x0002, "78%" )
+ PORT_DIPSETTING( 0x0003, "80%" )
+ PORT_DIPSETTING( 0x0004, "82%" )
+ PORT_DIPSETTING( 0x0005, "85%" )
+ PORT_DIPSETTING( 0x0006, "88%" )
+ PORT_DIPSETTING( 0x0007, "90%" )
+ PORT_DIPNAME( 0x0008, 0x0000, "Odds Rate" ) PORT_DIPLOCATION("DSW1:4") // 役牌倍率
+ PORT_DIPSETTING( 0x0000, DEF_STR(Low) ) // 低倍率 (1 2 3 3 5 20 / 5 8 10 10 10 10)
+ PORT_DIPSETTING( 0x0008, DEF_STR(High) ) // 高倍率 (2 3 5 5 10 50 / 10 20 30 40 40 40)
+ PORT_DIPNAME( 0x0010, 0x0000, "Direct Double Up" ) PORT_DIPLOCATION("DSW1:5") // 直接比倍
+ PORT_DIPSETTING( 0x0000, DEF_STR(No) ) // 無
+ PORT_DIPSETTING( 0x0010, DEF_STR(Yes) ) // 有
+ PORT_DIPNAME( 0x0020, 0x0000, "Double Up Game" ) PORT_DIPLOCATION("DSW1:6") // 比倍有無
+ PORT_DIPSETTING( 0x0020, DEF_STR(Off) ) // 無
+ PORT_DIPSETTING( 0x0000, DEF_STR(On) ) // 有
+ PORT_DIPNAME( 0x00c0, 0x0000, "Double Up Game Payout Rate" ) PORT_DIPLOCATION("DSW1:7,8") // 比倍機率
+ PORT_DIPSETTING( 0x0000, "70%" )
+ PORT_DIPSETTING( 0x0040, "75%" )
+ PORT_DIPSETTING( 0x0080, "80%" )
+ PORT_DIPSETTING( 0x00c0, "85%" )
+ PORT_DIPNAME( 0x0100, 0x0000, DEF_STR(Demo_Sounds) ) PORT_DIPLOCATION("DSW4:1") // 示範音樂
+ PORT_DIPSETTING( 0x0100, DEF_STR(Off) ) // 無
+ PORT_DIPSETTING( 0x0000, DEF_STR(On) ) // 有
+ PORT_DIPNAME( 0x0e00, 0x0000, "Score Limit" ) PORT_DIPLOCATION("DSW4:2,3,4") // 破台限制 (presumably limits winnings)
+ PORT_DIPSETTING( 0x0000, "1,000" )
+ PORT_DIPSETTING( 0x0200, "2,000" )
+ PORT_DIPSETTING( 0x0400, "3,000" )
+ PORT_DIPSETTING( 0x0600, "5,000" )
+ PORT_DIPSETTING( 0x0800, "10,000" )
+ PORT_DIPSETTING( 0x0a00, "20,000" )
+ PORT_DIPSETTING( 0x0c00, "30,000" )
+ PORT_DIPSETTING( 0x0e00, "50,000" )
+ PORT_DIPNAME( 0x3000, 0x0000, "Credit Limit" ) PORT_DIPLOCATION("DSW4:5,6") // 進分上限 (presumably limits credits purchased)
PORT_DIPSETTING( 0x0000, "500" )
PORT_DIPSETTING( 0x1000, "1000" )
PORT_DIPSETTING( 0x2000, "2000" )
PORT_DIPSETTING( 0x3000, "5000" )
- PORT_DIPNAME( 0x4000, 0x0000, "Golden Rush" ) PORT_DIPLOCATION("DSW4:7")
- PORT_DIPSETTING( 0x4000, "Less" )
- PORT_DIPSETTING( 0x0000, "More" )
- PORT_DIPNAME( 0x8000, 0x0000, "Number Type" ) PORT_DIPLOCATION("DSW4:8")
- PORT_DIPSETTING( 0x8000, "Dice" )
- PORT_DIPSETTING( 0x0000, "Number" )
-
-
- PORT_START("DSW2") // 16bit, in test mode first 8 are recognized as dsw2, second 8 as dsw5
- PORT_DIPNAME( 0x0007, 0x0000, DEF_STR( Coinage ) ) PORT_DIPLOCATION("DSW2:1,2,3")
- PORT_DIPSETTING( 0x0000, DEF_STR( 1C_1C ) )
- PORT_DIPSETTING( 0x0001, DEF_STR( 1C_2C ) )
- PORT_DIPSETTING( 0x0002, DEF_STR( 1C_3C ) )
- PORT_DIPSETTING( 0x0003, DEF_STR( 1C_5C ) )
- PORT_DIPSETTING( 0x0004, "1 Coin/10 Credits" )
- PORT_DIPSETTING( 0x0005, "1 Coin/20 Credits" )
- PORT_DIPSETTING( 0x0006, "1 Coin/50 Credits" )
- PORT_DIPSETTING( 0x0007, "1 Coin/100 Credits" )
- PORT_DIPNAME( 0x0018, 0x0000, "Credits per Note" ) PORT_DIPLOCATION("DSW2:4,5,")
- PORT_DIPSETTING( 0x0018, "1 Note/5 Credits" )
- PORT_DIPSETTING( 0x0000, "1 Note/10 Credits" )
- PORT_DIPSETTING( 0x0008, "1 Note/20 Credits" )
- PORT_DIPSETTING( 0x0010, "1 Note/50 Credits" )
- PORT_DIPNAME( 0x0020, 0x0000, "Show Credits" ) PORT_DIPLOCATION("DSW2:6")
- PORT_DIPSETTING( 0x0020, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0040, 0x0000, "Pay Out Type" ) PORT_DIPLOCATION("DSW2:7")
- PORT_DIPSETTING( 0x0040, "Credits" )
- PORT_DIPSETTING( 0x0000, "Coins" )
- PORT_DIPNAME( 0x0080, 0x0080, "Controls" ) PORT_DIPLOCATION("DSW2:8") // should default to keyboard, but set on joystick since the former isn't emulated yet
- PORT_DIPSETTING( 0x0080, DEF_STR( Joystick ) )
- PORT_DIPSETTING( 0x0000, "Keyboard" )
- PORT_DIPNAME( 0x0100, 0x0000, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW5:1")
- PORT_DIPSETTING( 0x0100, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0200, 0x0000, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW5:2")
- PORT_DIPSETTING( 0x0200, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0400, 0x0000, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW5:3")
- PORT_DIPSETTING( 0x0400, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0800, 0x0000, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW5:4")
- PORT_DIPSETTING( 0x0800, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x1000, 0x0000, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW5:5")
- PORT_DIPSETTING( 0x1000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x2000, 0x0000, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW5:6")
- PORT_DIPSETTING( 0x2000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x4000, 0x0000, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW5:7")
- PORT_DIPSETTING( 0x4000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x8000, 0x0000, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW5:8")
- PORT_DIPSETTING( 0x8000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
-
- PORT_START("DSW3") // 16bit, in test mode first 8 are recognized as dsw3, second 8 as dsw6
- PORT_DIPNAME( 0x0003, 0x0000, "Min Bet" ) PORT_DIPLOCATION("DSW3:1,2")
+ PORT_DIPNAME( 0x4000, 0x0000, "Dapai Frequency" ) PORT_DIPLOCATION("DSW4:7") // 大牌出現
+ PORT_DIPSETTING( 0x4000, DEF_STR(Low) ) // 少
+ PORT_DIPSETTING( 0x0000, DEF_STR(High) ) // 多
+ PORT_DIPNAME( 0x8000, 0x0000, "Score Display Mode" ) PORT_DIPLOCATION("DSW4:8") // 計分方式 (sets how points, credits, bets, etc. are displayed)
+ PORT_DIPSETTING( 0x0000, "Numbers" ) // 數字計分 (Arabic numerals)
+ PORT_DIPSETTING( 0x8000, "Circle Tiles" ) // 筒子計分 (tong mahjong tiles representing digits)
+
+ PORT_START("DSW2") // 16bit, in test mode first 8 are recognized as DSW2, second 8 as DSW5
+ GMS_MAHJONG_COINAGE("DSW2", "DSW2")
+ PORT_DIPNAME( 0x0020, 0x0000, "Hide Credits" ) PORT_DIPLOCATION("DSW2:6") // 遊戲分數
+ PORT_DIPSETTING( 0x0000, DEF_STR(Off) ) // 顯示
+ PORT_DIPSETTING( 0x0020, DEF_STR(On) ) // 不顯示
+ PORT_DIPNAME( 0x0040, 0x0000, "Payout Mode" ) PORT_DIPLOCATION("DSW2:7") // 退幣退票方式
+ PORT_DIPSETTING( 0x0000, "Return Coins" ) // 以投幣計
+ PORT_DIPSETTING( 0x0040, "Key-Out" ) // 以開分計
+ PORT_DIPNAME( 0x0080, 0x0000, DEF_STR(Controls) ) PORT_DIPLOCATION("DSW2:8") // 操作方式
+ PORT_DIPSETTING( 0x0000, "Mahjong" ) // 鍵盤
+ PORT_DIPSETTING( 0x0080, DEF_STR(Joystick) ) // 搖桿
+ PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED ) // DSW5 shown in input test but not physically present
+ //PORT_DIPUNUSED_DIPLOC( 0x0100, 0x0000, "DSW5:1")
+ //PORT_DIPUNUSED_DIPLOC( 0x0200, 0x0000, "DSW5:2")
+ //PORT_DIPUNUSED_DIPLOC( 0x0400, 0x0000, "DSW5:3")
+ //PORT_DIPUNUSED_DIPLOC( 0x0800, 0x0000, "DSW5:4")
+ //PORT_DIPUNUSED_DIPLOC( 0x1000, 0x0000, "DSW5:5")
+ //PORT_DIPUNUSED_DIPLOC( 0x2000, 0x0000, "DSW5:6")
+ //PORT_DIPUNUSED_DIPLOC( 0x4000, 0x0000, "DSW5:7")
+ //PORT_DIPUNUSED_DIPLOC( 0x8000, 0x0000, "DSW5:8")
+
+ PORT_START("DSW3") // 16bit, in test mode first 8 are recognized as DSW3, second 8 as DSW6
+ PORT_DIPNAME( 0x0003, 0x0000, "Minimum Bet" ) PORT_DIPLOCATION("DSW3:1,2") // 最小押分
PORT_DIPSETTING( 0x0000, "1" )
PORT_DIPSETTING( 0x0001, "2" )
PORT_DIPSETTING( 0x0002, "5" )
PORT_DIPSETTING( 0x0003, "10" )
- PORT_DIPNAME( 0x000c, 0x0000, "Max Bet" ) PORT_DIPLOCATION("DSW3:3,4")
+ PORT_DIPNAME( 0x000c, 0x0000, "Maximum Bet" ) PORT_DIPLOCATION("DSW3:3,4") // 最大押分
PORT_DIPSETTING( 0x0000, "10" )
PORT_DIPSETTING( 0x0004, "20" )
PORT_DIPSETTING( 0x0008, "30" )
PORT_DIPSETTING( 0x000c, "50" )
- PORT_DIPNAME( 0x0010, 0x0000, "Main Credits Game" ) PORT_DIPLOCATION("DSW3:5")
- PORT_DIPSETTING( 0x0010, "Introduction" )
- PORT_DIPSETTING( 0x0000, "Lucky Door" )
- PORT_DIPNAME( 0x0020, 0x0000, "Insert Coin Continue" ) PORT_DIPLOCATION("DSW3:6")
- PORT_DIPSETTING( 0x0000, "30 Seconds" )
- PORT_DIPSETTING( 0x0020, "Unlimited" )
- PORT_DIPNAME( 0x0040, 0x0000, "Introduction" ) PORT_DIPLOCATION("DSW3:7")
+ PORT_DIPNAME( 0x0010, 0x0000, "Main Credits Game" ) PORT_DIPLOCATION("DSW3:5") // 餘分遊戲
+ PORT_DIPSETTING( 0x0010, "Introduction" ) // 入門篇
+ PORT_DIPSETTING( 0x0000, "Lucky Door" ) // 幸運門
+ PORT_DIPNAME( 0x0020, 0x0000, "Credit Timer" ) PORT_DIPLOCATION("DSW3:6") // 等待投幣時間
+ PORT_DIPSETTING( 0x0020, DEF_STR(Off) ) // 無限
+ PORT_DIPSETTING( 0x0000, DEF_STR(On) ) // 30
+ PORT_DIPNAME( 0x0040, 0x0000, "Introduction" ) PORT_DIPLOCATION("DSW3:7") // 入門篇
PORT_DIPSETTING( 0x0040, "1" )
PORT_DIPSETTING( 0x0000, "2" )
- PORT_DIPNAME( 0x0080, 0x0000, "Tiles Sound" ) PORT_DIPLOCATION("DSW3:8")
- PORT_DIPSETTING( 0x0080, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0100, 0x0000, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW6:1")
- PORT_DIPSETTING( 0x0100, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0200, 0x0000, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW6:2")
- PORT_DIPSETTING( 0x0200, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0400, 0x0000, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW6:3")
- PORT_DIPSETTING( 0x0400, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0800, 0x0000, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW6:4")
- PORT_DIPSETTING( 0x0800, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x1000, 0x0000, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW6:5")
- PORT_DIPSETTING( 0x1000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x2000, 0x0000, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW6:6")
- PORT_DIPSETTING( 0x2000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x4000, 0x0000, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW6:7")
- PORT_DIPSETTING( 0x4000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x8000, 0x0000, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW6:8")
- PORT_DIPSETTING( 0x8000, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
+ PORT_DIPNAME( 0x0080, 0x0000, "Gal Voice" ) PORT_DIPLOCATION("DSW3:8") // 語音報牌
+ PORT_DIPSETTING( 0x0080, DEF_STR(Off) ) // 無
+ PORT_DIPSETTING( 0x0000, DEF_STR(On) ) // 有 (calls discarded tiles)
+ PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED ) // DSW6 shown in input test but not physically present
+ //PORT_DIPUNUSED_DIPLOC( 0x0100, 0x0000, "DSW6:1")
+ //PORT_DIPUNUSED_DIPLOC( 0x0200, 0x0000, "DSW6:2")
+ //PORT_DIPUNUSED_DIPLOC( 0x0400, 0x0000, "DSW6:3")
+ //PORT_DIPUNUSED_DIPLOC( 0x0800, 0x0000, "DSW6:4")
+ //PORT_DIPUNUSED_DIPLOC( 0x1000, 0x0000, "DSW6:5")
+ //PORT_DIPUNUSED_DIPLOC( 0x2000, 0x0000, "DSW6:6")
+ //PORT_DIPUNUSED_DIPLOC( 0x4000, 0x0000, "DSW6:7")
+ //PORT_DIPUNUSED_DIPLOC( 0x8000, 0x0000, "DSW6:8")
INPUT_PORTS_END
static INPUT_PORTS_START( hgly )
@@ -2304,13 +2319,13 @@ void gms_2layers_state::ssanguoj(machine_config &config)
config.device_remove("ymsnd");
ym3812_device &ym(YM3812(config, "ym3812", 22_MHz_XTAL / 8));
- ym.add_route(0, "speaker", 0.60, 0);
- ym.add_route(1, "speaker", 0.60, 1);
+ ym.add_route(ALL_OUTPUTS, "speaker", 0.60);
}
void gms_2layers_state::super555(machine_config &config)
{
rbmk(config);
+
m_maincpu->set_addrmap(AS_PROGRAM, &gms_2layers_state::super555_mem);
config.device_remove("mcu");
diff --git a/src/mame/misc/xtom3d.cpp b/src/mame/misc/xtom3d.cpp
index d714f134d9b..e479ac7a535 100644
--- a/src/mame/misc/xtom3d.cpp
+++ b/src/mame/misc/xtom3d.cpp
@@ -661,8 +661,8 @@ void xtom3d_state::romdisk_config(device_t *device)
void xtom3d_state::piu10_config(device_t *device)
{
isa16_piu10 &piu10 = *downcast<isa16_piu10 *>(device);
- piu10.add_route(0, ":lmicrophone", 0.25);
- piu10.add_route(1, ":rmicrophone", 0.25);
+ piu10.add_route(0, ":microphone", 0.25, 0);
+ piu10.add_route(1, ":microphone", 0.25, 1);
}
// TODO: unverified PCI config space
@@ -728,16 +728,15 @@ void xtom3d_state::xtom3d(machine_config &config)
// TODO: stub for drive options (speed/drive type etc.)
static void cdrom_config(device_t *device)
{
- device->subdevice<cdda_device>("cdda")->add_route(0, ":lmicrophone", 0.25);
- device->subdevice<cdda_device>("cdda")->add_route(1, ":rmicrophone", 0.25);
+ device->subdevice<cdda_device>("cdda")->add_route(0, ":microphone", 0.25, 0);
+ device->subdevice<cdda_device>("cdda")->add_route(1, ":microphone", 0.25, 1);
}
void xtom3d_state::pumpitup(machine_config &config)
{
xtom3d(config);
- SPEAKER(config, "lmicrophone").front_left();
- SPEAKER(config, "rmicrophone").front_right();
+ SPEAKER(config, "microphone", 2).front();
m_pci_ide->subdevice<bus_master_ide_controller_device>("ide1")->slot(0).set_default_option("cdrom");
m_pci_ide->subdevice<bus_master_ide_controller_device>("ide1")->slot(0).set_option_machine_config("cdrom", cdrom_config);
diff --git a/src/mame/nec/pc9801.cpp b/src/mame/nec/pc9801.cpp
index c9e7bcb0211..641d6426563 100644
--- a/src/mame/nec/pc9801.cpp
+++ b/src/mame/nec/pc9801.cpp
@@ -2343,14 +2343,13 @@ void pc9801_state::pc9801_sasi(machine_config &config)
void pc9801vm_state::cdrom_headphones(device_t *device)
{
cdda_device *cdda = device->subdevice<cdda_device>("cdda");
- cdda->add_route(0, "^^lheadphone", 1.0);
- cdda->add_route(1, "^^rheadphone", 1.0);
+ cdda->add_route(0, "^^headphone", 1.0, 0);
+ cdda->add_route(1, "^^headphone", 1.0, 1);
}
void pc9801vm_state::pc9801_ide(machine_config &config)
{
- SPEAKER(config, "lheadphone").front_left();
- SPEAKER(config, "rheadphone").front_right();
+ SPEAKER(config, "headphone", 2).front();
ATA_INTERFACE(config, m_ide[0]).options(ata_devices, "hdd", nullptr, false);
m_ide[0]->irq_handler().set("ideirq", FUNC(input_merger_device::in_w<0>));
ATA_INTERFACE(config, m_ide[1]).options(pc9801_atapi_devices, "pc98_cd", nullptr, false);
diff --git a/src/mame/phoenix/phoenix.cpp b/src/mame/phoenix/phoenix.cpp
index b169b73c689..63e62fec3dc 100644
--- a/src/mame/phoenix/phoenix.cpp
+++ b/src/mame/phoenix/phoenix.cpp
@@ -1349,17 +1349,16 @@ ROM_START( nextfase )
ROM_LOAD( "7910cg", 0x000, 0x800, NO_DUMP ) // actual size unknown, needs decapping
ROM_REGION( 0x1000, "bgtiles", 0 )
- ROM_LOAD( "nf11.bin", 0x0000, 0x0800, CRC(3c7e623f) SHA1(e7ff5fc371664af44785c079e92eeb2d8530187b) )
- ROM_LOAD( "nf12.bin", 0x0800, 0x0800, CRC(59916d3b) SHA1(71aec70a8e096ed1f0c2297b3ae7dca1b8ecc38d) )
+ ROM_LOAD( "nf11.bin", 0x0000, 0x0800, CRC(3c7e623f) SHA1(e7ff5fc371664af44785c079e92eeb2d8530187b) )
+ ROM_LOAD( "nf12.bin", 0x0800, 0x0800, CRC(59916d3b) SHA1(71aec70a8e096ed1f0c2297b3ae7dca1b8ecc38d) )
ROM_REGION( 0x1000, "fgtiles", 0 )
ROM_LOAD( "nf09.bin", 0x0000, 0x0800, CRC(bacbfa88) SHA1(bf378a729726db01448f2cc4820f06e17659d674) )
ROM_LOAD( "nf10.bin", 0x0800, 0x0800, CRC(3143a9ee) SHA1(371bb314dc9e4ec6ed469eb81391061296c547ec) )
- // PROMs were missing from this dump, these might not be correct
ROM_REGION( 0x0200, "proms", 0 )
- ROM_LOAD( "mmi6301.ic40", 0x0000, 0x0100, CRC(79350b25) SHA1(57411be4c1d89677f7919ae295446da90612c8a8) ) // palette low bits
- ROM_LOAD( "mmi6301.ic41", 0x0100, 0x0100, CRC(e176b768) SHA1(e2184dd495ed579f10b6da0b78379e02d7a6229f) ) // palette high bits
+ ROM_LOAD( "nf.ic40", 0x0000, 0x0100, CRC(725747be) SHA1(c8a4cc47149230ac859c19a24d2860d7d58885f2) ) // palette low bits
+ ROM_LOAD( "nf.ic41", 0x0100, 0x0100, CRC(a91055ab) SHA1(14273bde9e05b7e2e14e77cac400ffda0ce7e71f) ) // palette high bits
ROM_END
ROM_START( phoenixs )
diff --git a/src/mame/pinball/macp.cpp b/src/mame/pinball/macp.cpp
index 9ae7e1ae167..3805fa57246 100644
--- a/src/mame/pinball/macp.cpp
+++ b/src/mame/pinball/macp.cpp
@@ -363,20 +363,20 @@ void macp_state::mac16k(machine_config &config)
genpin_audio(config);
//2x AY8910
- SPEAKER(config, "lspkr").front_left();
+ SPEAKER(config, "speaker", 2).front();
+
AY8910(config, m_ay8910[0], 3'800'000/2);
m_ay8910[0]->set_resistors_load(10e3,10e3,10e3);
m_ay8910[0]->port_a_write_callback().set(FUNC(macp_state::ay0_a_w));
m_ay8910[0]->port_b_write_callback().set(FUNC(macp_state::ay0_b_w));
- m_ay8910[0]->add_route(ALL_OUTPUTS, "lspkr", 0.50);
+ m_ay8910[0]->add_route(ALL_OUTPUTS, "speaker", 0.50, 0);
- SPEAKER(config, "rspkr").front_right();
AY8910(config, m_ay8910[1], 3'800'000/2);
m_ay8910[1]->set_resistors_load(10e3,10e3,10e3);
m_ay8910[1]->port_a_write_callback().set(FUNC(macp_state::ay1_a_w));
m_ay8910[1]->port_b_write_callback().set(FUNC(macp_state::ay1_b_w));
m_ay8910[1]->port_b_read_callback().set(FUNC(macp_state::ay1_b_r));
- m_ay8910[1]->add_route(ALL_OUTPUTS, "rspkr", 0.50);
+ m_ay8910[1]->add_route(ALL_OUTPUTS, "speaker", 0.50, 1);
}
void macp_state::mac32k(machine_config &config)
diff --git a/src/mame/skeleton/alesis_qs.cpp b/src/mame/skeleton/alesis_qs.cpp
index af28367e06e..73fe9aa2683 100644
--- a/src/mame/skeleton/alesis_qs.cpp
+++ b/src/mame/skeleton/alesis_qs.cpp
@@ -71,11 +71,10 @@ void qs_state::qs7(machine_config &config)
//TODO: add LCD display controller here
/* sound hardware */
- //SPEAKER(config, "left").front_left();
- //SPEAKER(config, "right").front_right();
+ //SPEAKER(config, "speaker", 2).front();
//alesis_qs_series_device &sound(ALESIS_QS_SERIES(config, "sound", SND_CLOCK));
- //sound.add_route(0, "left", 1.0);
- //sound.add_route(1, "right", 1.0);
+ //sound.add_route(0, "speaker", 1.0, 0);
+ //sound.add_route(1, "speaker", 1.0, 1);
/* Interfaces */
//PCMCIA
diff --git a/src/mame/tvgames/generalplus_gp327902.cpp b/src/mame/tvgames/generalplus_gp327902.cpp
index 6b142d7c26a..b9ca53e121e 100644
--- a/src/mame/tvgames/generalplus_gp327902.cpp
+++ b/src/mame/tvgames/generalplus_gp327902.cpp
@@ -133,8 +133,7 @@ void generalplus_gp327902_game_state::gp327902(machine_config &config)
m_screen->set_visarea(0, 320-1, 0, 240-1);
m_screen->set_screen_update(FUNC(generalplus_gp327902_game_state::screen_update_gp327902));
- SPEAKER(config, "lspeaker").front_left();
- SPEAKER(config, "rspeaker").front_right();
+ SPEAKER(config, "speaker", 2).front();
TIMER(config, "timer").configure_periodic(FUNC(generalplus_gp327902_game_state::timer), attotime::from_hz(1000));
}
diff --git a/src/mame/tvgames/generalplus_gpm453x_nand.cpp b/src/mame/tvgames/generalplus_gpm453x_nand.cpp
index 124e4825bda..90daafa1b53 100644
--- a/src/mame/tvgames/generalplus_gpm453x_nand.cpp
+++ b/src/mame/tvgames/generalplus_gpm453x_nand.cpp
@@ -91,8 +91,7 @@ void generalplus_gpm453x_game_state::gpm453x(machine_config &config)
m_screen->set_visarea(0, 320-1, 0, 240-1);
m_screen->set_screen_update(FUNC(generalplus_gpm453x_game_state::screen_update));
- SPEAKER(config, "lspeaker").front_left();
- SPEAKER(config, "rspeaker").front_right();
+ SPEAKER(config, "speaker", 2).front();
}
ROM_START( leapland )
diff --git a/src/osd/modules/sound/pulse_sound.cpp b/src/osd/modules/sound/pulse_sound.cpp
index 4b7c87b6b9b..820ca149c39 100644
--- a/src/osd/modules/sound/pulse_sound.cpp
+++ b/src/osd/modules/sound/pulse_sound.cpp
@@ -152,7 +152,6 @@ void sound_pulse::generic_pa_error(const char *msg, int err)
void sound_pulse::context_notify()
{
- fprintf(stderr, "context notify\n");
pa_context_state state = pa_context_get_state(m_context);
if(state == PA_CONTEXT_READY) {
pa_context_subscribe(m_context, PA_SUBSCRIPTION_MASK_ALL, nullptr, this);
@@ -173,7 +172,6 @@ void sound_pulse::stream_notify(stream_info *stream)
{
pa_stream_state state = pa_stream_get_state(stream->m_stream);
- fprintf(stderr, "stream notify\n");
if(state == PA_STREAM_READY || state == PA_STREAM_FAILED || state == PA_STREAM_TERMINATED) {
m_wait_stream = false;
pa_threaded_mainloop_signal(m_mainloop, 0);
@@ -216,7 +214,6 @@ void sound_pulse::server_info(const pa_server_info *i)
{
m_default_audio_sink = i->default_sink_name;
m_default_audio_source = i->default_source_name;
- fprintf(stderr, "defaults %s %s\n", i->default_sink_name, i->default_source_name);
m_generation++;
if(m_wait_init) {
m_wait_init = false;
@@ -243,7 +240,6 @@ void sound_pulse::source_info(const pa_source_info *i, int eol)
return;
}
- fprintf(stderr, "new source %d (%s)\n", i->index, i->description);
m_node_osdid_to_id[m_node_current_id] = i->index;
auto &node = m_nodes.emplace(i->index, node_info(this, i->index, m_node_current_id++, AREC, i->name, i->description)).first->second;
@@ -274,8 +270,6 @@ void sound_pulse::sink_info_new(const pa_sink_info *i, int eol)
return;
}
- fprintf(stderr, "new sink %d (%s)\n", i->index, i->description);
- fprintf(stderr, "rate %d\n", i->sample_spec.rate);
m_node_osdid_to_id[m_node_current_id] = i->index;
auto &node = m_nodes.emplace(i->index, node_info(this, i->index, m_node_current_id++, APLAY, i->name, i->description)).first->second;
@@ -312,13 +306,11 @@ void sound_pulse::sink_input_info_change(stream_info *stream, const pa_sink_inpu
for(uint32_t port = 0; port != stream->m_channels; port++)
stream->m_volumes[port] = pa_sw_volume_to_dB(i->volume.values[port]);
- fprintf(stderr, "change stream %d/%d sink=%s [%f %f]\n", stream->m_osdid, stream->m_pulse_id, stream->m_target_node->m_desc.c_str(), stream->m_volumes[0], stream->m_volumes[1]);
m_generation++;
}
void sound_pulse::i_sink_input_info_change(pa_context *, const pa_sink_input_info *i, int eol, void *self)
{
- fprintf(stderr, "i_sink_input_info_change %p %d\n", i, eol);
stream_info *stream = static_cast<stream_info *>(self);
stream->m_pulse->sink_input_info_change(stream, i, eol);
}
@@ -326,15 +318,12 @@ void sound_pulse::i_sink_input_info_change(pa_context *, const pa_sink_input_inf
void sound_pulse::context_subscribe(pa_subscription_event_type_t t, uint32_t idx)
{
// This is called with the thread locked
- static const char *const evt[] = { "sink", "source", "sink-input", "source-output", "module", "client", "cache", "server", "autoload", "card" };
- static const char *const evt2[] = { "new", "change", "remove" };
switch(int(t)) {
case PA_SUBSCRIPTION_EVENT_REMOVE | PA_SUBSCRIPTION_EVENT_SINK:
case PA_SUBSCRIPTION_EVENT_REMOVE | PA_SUBSCRIPTION_EVENT_SOURCE: {
auto si = m_nodes.find(idx);
if(si == m_nodes.end())
break;
- fprintf(stderr, "removing %s\n", si->second.m_desc.c_str());
for(auto &istream : m_streams)
if(istream.second.m_target_node == &si->second)
istream.second.m_target_node = nullptr;
@@ -367,7 +356,7 @@ void sound_pulse::context_subscribe(pa_subscription_event_type_t t, uint32_t idx
}
default:
- fprintf(stderr, "event %s %s %d\n", evt2[t>>4], evt[t&15], idx);
+ break;
}
}
@@ -489,7 +478,6 @@ uint32_t sound_pulse::stream_sink_open(uint32_t node, std::string name, uint32_t
stream.m_pulse_id = pa_stream_get_index(stream.m_stream);
m_stream_pulse_id_to_osdid[stream.m_pulse_id] = id;
- fprintf(stderr, "stream id %d\n", stream.m_pulse_id);
pa_threaded_mainloop_unlock(m_mainloop);
return id;