summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
author Robbbert <Robbbert@users.noreply.github.com>2019-07-16 20:37:47 +1000
committer Robbbert <Robbbert@users.noreply.github.com>2019-07-16 20:37:47 +1000
commit24e227510d8ec61b7086a727ca80449d886799bf (patch)
treeeebb8c6245cab7edf83b5405808eb32027c3eafb /src
parentbce49a8e554f76400176d373285ac8d606d3271e (diff)
parent2d8207f9178b01f45fec6c08ffd35bc7dafa5772 (diff)
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'src')
-rw-r--r--src/devices/bus/nscsi/devices.cpp2
-rw-r--r--src/devices/bus/ti99/peb/ti_rs232.cpp2
-rw-r--r--src/devices/cpu/f2mc16/f2mc16.cpp695
-rw-r--r--src/devices/cpu/f2mc16/f2mc16.h18
-rw-r--r--src/devices/cpu/f2mc16/f2mc16dasm.cpp136
-rw-r--r--src/devices/cpu/i86/i186.cpp2
-rw-r--r--src/devices/machine/wtl3132.cpp521
-rw-r--r--src/devices/machine/wtl3132.h171
-rw-r--r--src/devices/sound/mas3507d.cpp8
-rw-r--r--src/devices/sound/mas3507d.h4
-rw-r--r--src/emu/video.cpp40
-rw-r--r--src/emu/video.h2
-rw-r--r--src/frontend/mame/luaengine.cpp28
-rw-r--r--src/lib/formats/tzx_cas.cpp20
-rw-r--r--src/mame/drivers/aci_borisdpl.cpp5
-rw-r--r--src/mame/drivers/aci_ggm.cpp2
-rw-r--r--src/mame/drivers/aci_prodigy.cpp63
-rw-r--r--src/mame/drivers/binbug.cpp153
-rw-r--r--src/mame/drivers/cps1.cpp2
-rw-r--r--src/mame/drivers/cps2.cpp2
-rw-r--r--src/mame/drivers/deco32.cpp229
-rw-r--r--src/mame/drivers/equites.cpp8
-rw-r--r--src/mame/drivers/fcrash.cpp24
-rw-r--r--src/mame/drivers/fmtowns.cpp8
-rw-r--r--src/mame/drivers/gaelco2.cpp4
-rw-r--r--src/mame/drivers/konin.cpp27
-rw-r--r--src/mame/drivers/mephisto.cpp133
-rw-r--r--src/mame/drivers/mindset.cpp258
-rw-r--r--src/mame/drivers/miniboy7.cpp6
-rw-r--r--src/mame/drivers/model2.cpp2
-rw-r--r--src/mame/drivers/model3.cpp4
-rw-r--r--src/mame/drivers/nemesis.cpp5
-rw-r--r--src/mame/drivers/pgm.cpp264
-rw-r--r--src/mame/drivers/saitek_chesstrv.cpp2
-rw-r--r--src/mame/drivers/sc2.cpp5
-rw-r--r--src/mame/drivers/seta2.cpp6
-rw-r--r--src/mame/drivers/tomy_princ.cpp1
-rw-r--r--src/mame/includes/deco32.h110
-rw-r--r--src/mame/includes/equites.h2
-rw-r--r--src/mame/layout/aci_borisdpl.lay650
-rw-r--r--src/mame/layout/aci_ggm.lay2
-rw-r--r--src/mame/layout/aci_prodigy.lay50
-rw-r--r--src/mame/layout/intellect02.lay2
-rw-r--r--src/mame/layout/mephisto_bup.lay566
-rw-r--r--src/mame/layout/model1io2.lay6
-rw-r--r--src/mame/layout/saitek_chesstrv.lay14
-rw-r--r--src/mame/layout/sc2.lay460
-rw-r--r--src/mame/machine/pgmprot_igs027a_type3.cpp9
-rw-r--r--src/mame/machine/pgmprot_igs027a_type3.h1
-rw-r--r--src/mame/mame.lst14
-rw-r--r--src/mame/video/cps1.cpp7
-rw-r--r--src/mame/video/deco32.cpp92
52 files changed, 3908 insertions, 939 deletions
diff --git a/src/devices/bus/nscsi/devices.cpp b/src/devices/bus/nscsi/devices.cpp
index 5013bb12795..6702493313a 100644
--- a/src/devices/bus/nscsi/devices.cpp
+++ b/src/devices/bus/nscsi/devices.cpp
@@ -1,6 +1,8 @@
// license:BSD-3-Clause
// copyright-holders:AJR
+#include "emu.h"
+
#include "bus/nscsi/cd.h"
#include "bus/nscsi/cw7501.h"
#include "bus/nscsi/hd.h"
diff --git a/src/devices/bus/ti99/peb/ti_rs232.cpp b/src/devices/bus/ti99/peb/ti_rs232.cpp
index cbc164bbcb2..1ebae489d3a 100644
--- a/src/devices/bus/ti99/peb/ti_rs232.cpp
+++ b/src/devices/bus/ti99/peb/ti_rs232.cpp
@@ -1092,7 +1092,7 @@ INPUT_PORTS_START( ti_rs232 )
PORT_START( "CRURS232" )
PORT_DIPNAME( 0x01, 0x00, "TI-RS232 CRU base" )
PORT_DIPSETTING( 0x00, "1300" )
- PORT_DIPSETTING( 0x00, "1500" )
+ PORT_DIPSETTING( 0x01, "1500" )
PORT_START( "SERIALMAP" )
PORT_CONFNAME( 0x03, 0x00, "Serial cable pin mapping" )
diff --git a/src/devices/cpu/f2mc16/f2mc16.cpp b/src/devices/cpu/f2mc16/f2mc16.cpp
index 7f2c737d9da..fb4dbd10fff 100644
--- a/src/devices/cpu/f2mc16/f2mc16.cpp
+++ b/src/devices/cpu/f2mc16/f2mc16.cpp
@@ -209,6 +209,8 @@ void f2mc16_device::execute_run()
debugger_instruction_hook((m_pcb<<16) | m_pc);
+ // m_icount--;
+
switch (opcode)
{
case 0x00: // NOP
@@ -307,7 +309,6 @@ void f2mc16_device::execute_run()
// LSLW A
case 0x0c:
m_tmp16 = m_acc & 0xffff;
- m_acc &= 0xffff0000;
m_ps &= ~F_C;
if (m_tmp16 & 0x8000)
{
@@ -315,6 +316,7 @@ void f2mc16_device::execute_run()
}
m_tmp16 <<= 1;
setNZ_16(m_tmp16);
+ m_acc &= 0xffff0000;
m_acc |= m_tmp16;
m_pc++;
m_icount -= 2;
@@ -324,8 +326,28 @@ void f2mc16_device::execute_run()
// stream << "ASRW A";
break;
+ // LSRW A
case 0x0f:
- // stream << "LSRW A";
+ m_tmp16 = m_acc & 0xffff;
+ // T is set if either carry or T are set beforehand
+ if ((m_ps & F_C) || (m_ps & F_T))
+ {
+ m_ps |= F_T;
+ }
+ // C becomes the previous LSB
+ m_ps &= ~F_C;
+ if (m_tmp16 & 1)
+ {
+ m_ps |= F_C;
+ }
+
+ m_tmp16 >>= 1;
+ setNZ_16(m_tmp16);
+
+ m_acc &= 0xffff0000;
+ m_acc |= m_tmp16;
+ m_pc++;
+ m_icount-=2;
break;
case 0x10:
@@ -344,8 +366,16 @@ void f2mc16_device::execute_run()
// stream << "EXT";
break;
+ // ZEXT
case 0x15:
- // stream << "ZEXT";
+ m_acc &= 0xffff00ff;
+ m_ps &= ~(F_N|F_Z);
+ if ((m_acc & 0xffff) == 0)
+ {
+ m_ps |= F_Z;
+ }
+ m_pc++;
+ m_icount--;
break;
case 0x16:
@@ -392,8 +422,21 @@ void f2mc16_device::execute_run()
m_icount -= 2;
break;
+ // EXTW
case 0x1c:
- // stream << "EXTW";
+ m_acc &= 0xffff;
+ m_ps &= ~(F_N|F_Z);
+ if (m_acc & 0x8000)
+ {
+ m_acc |= 0xffff0000;
+ m_ps |= F_N;
+ }
+ else
+ {
+ m_ps |= F_Z;
+ }
+ m_pc++;
+ m_icount-=2;
break;
// ZEXTW
@@ -404,8 +447,13 @@ void f2mc16_device::execute_run()
m_icount--;
break;
+ // SWAPW
case 0x1e:
- // stream << "SWAPW";
+ m_tmp16 = (m_acc & 0xffff);
+ m_acc >>= 16;
+ m_acc |= (m_tmp16 << 16);
+ m_pc++;
+ m_icount -= 2;
break;
case 0x20:
@@ -451,6 +499,8 @@ void f2mc16_device::execute_run()
// ADDW A
case 0x28:
m_tmp16 = doADD_16((m_acc>>16) & 0xffff, m_acc & 0xffff);
+ m_acc &= 0xffff0000;
+ m_acc |= m_tmp16;
m_pc++;
m_icount -= 2;
break;
@@ -480,8 +530,11 @@ void f2mc16_device::execute_run()
}
break;
+ // CMPW A
case 0x2b:
- // stream << "CMPW A";
+ doCMP_16((m_acc>>16) & 0xffff, m_acc & 0xffff);
+ m_pc++;
+ m_icount--;
break;
// ANDW A
@@ -496,16 +549,40 @@ void f2mc16_device::execute_run()
m_icount -= 2;
break;
+ // ORW A
case 0x2d:
- // stream << "ORW A";
+ m_tmp16 = (m_acc>>16) & 0xffff;
+ m_acc |= m_tmp16;
+ setNZ_16(m_acc & 0xffff);
+ m_ps &= ~F_V;
+ m_pc++;
+ m_icount -= 2;
break;
+ // XORW A
case 0x2e:
- // stream << "XORW A";
+ m_tmp16 = (m_acc>>16) & 0xffff;
+ m_acc ^= m_tmp16;
+ setNZ_16(m_acc & 0xffff);
+ m_ps &= ~F_V;
+ m_pc++;
+ m_icount -= 2;
break;
+ // MULUW A
case 0x2f:
- // stream << "MULUW A";
+ m_tmp16 = (m_acc >> 16) & 0xffff;
+ if (m_tmp16 == 0)
+ {
+ m_acc = 0;
+ m_icount -= 3;
+ }
+ else
+ {
+ m_acc = m_tmp16 * (m_acc & 0xffff);
+ m_icount -= 11;
+ }
+ m_pc++;
break;
case 0x30:
@@ -528,32 +605,67 @@ void f2mc16_device::execute_run()
m_icount -= 2;
break;
+ // AND A, #imm8
case 0x34:
- // util::stream_format(stream, "AND A, #$%02x", operand);
+ m_tmp32 = read_8((m_pcb<<16) | (m_pc+1));
+ m_tmp32 |= 0xffffff00;
+ m_acc &= m_tmp32;
+ setNZ_8(m_acc & 0xff);
+ m_ps &= ~F_V;
+ m_pc += 2;
+ m_icount -= 2;
break;
case 0x35:
// util::stream_format(stream, "OR A, #$%02x", operand);
break;
+ // XOR A, #imm8
case 0x36:
- // util::stream_format(stream, "XOR A, #$%02x", operand);
+ m_tmp8 = read_8((m_pcb<<16) | (m_pc+1));
+ m_tmp16 = m_acc & 0xffff;
+ m_acc <<= 16;
+ m_acc |= m_tmp16;
+ m_acc ^= m_tmp8;
+ setNZ_8(m_acc & 0xff);
+ m_ps &= ~F_V;
+ m_pc += 2;
+ m_icount -= 2;
break;
case 0x37:
// stream << "NOT A";
break;
+ // ADDW A, #imm16
case 0x38:
- // util::stream_format(stream, "ADDW A, #$%04x", opcodes.r16(pc+1));
+ m_tmp16 = read_16((m_pcb<<16) | (m_pc+1));
+ m_tmp16 = doADD_16(m_acc & 0xffff, m_tmp16);
+ m_acc &= 0xffff0000;
+ m_acc |= m_tmp16;
+ m_pc += 3;
+ m_icount -= 2;
break;
case 0x39:
// util::stream_format(stream, "SUBW A, #$%04x", opcodes.r16(pc+1));
break;
+ // CWBNE A, #imm16, disp8
case 0x3a:
- // util::stream_format(stream, "CWBNE A, #$%04X, $%04X", opcodes.r16(pc+1), (s8)opcodes.r8(pc+3) + (pc & 0xffff) + 4);
+ m_tmp16 = read_16((m_pcb<<16) | (m_pc+1));
+ m_tmp8 = read_8((m_pcb<<16) | (m_pc+3));
+ doCMP_16(m_acc & 0xffff, m_tmp16);
+ if (m_ps & F_Z)
+ {
+ m_pc += 4;
+ m_icount -= 4;
+ }
+ else
+ {
+ m_pc = m_pc + 4 + (s8)m_tmp8;
+ m_icount -= 5;
+ }
break;
// CMPW A, #imm16
@@ -564,7 +676,7 @@ void f2mc16_device::execute_run()
m_icount -= 2;
break;
- // ANDW A, #imm16 fc4eb1
+ // ANDW A, #imm16
case 0x3c:
m_tmp32 = read_16((m_pcb<<16) | (m_pc+1));
m_tmp32 |= 0xffff0000;
@@ -575,10 +687,42 @@ void f2mc16_device::execute_run()
m_icount -= 2;
break;
+ // ORW A, #imm16
+ case 0x3d:
+ m_tmp16 = read_16((m_pcb<<16) | (m_pc+1));
+ m_acc |= m_tmp16;
+ setNZ_16(m_acc & 0xffff);
+ m_ps &= ~F_V;
+ m_pc += 3;
+ m_icount -= 2;
+ break;
+
case 0x3f:
// stream << "NOTW A";
break;
+ // MOV A, dir
+ case 0x40:
+ m_tmp32 = read_8((m_pcb<<16) | (m_pc+1));
+ m_tmp32 |= (m_dpr<<8) | (m_dtb<<8);
+ m_tmp8 = read_8(m_tmp32);
+ m_acc <<= 16;
+ m_acc |= m_tmp8;
+ setNZ_16(m_acc & 0xff);
+ m_pc += 2;
+ m_icount -= 3;
+ break;
+
+ // MOV dir, A
+ case 0x41:
+ m_tmp32 = read_8((m_pcb<<16) | (m_pc+1));
+ m_tmp32 |= (m_dpr<<8) | (m_dtb<<8);
+ write_8(m_tmp32, m_acc & 0xff);
+ setNZ_8(m_acc & 0xff);
+ m_pc += 2;
+ m_icount -= 3;
+ break;
+
// MOV A, #imm8
case 0x42:
m_tmp8 = read_8((m_pcb<<16) | (m_pc+1));
@@ -589,6 +733,16 @@ void f2mc16_device::execute_run()
m_icount -= 2;
break;
+ // MOV dir, #imm8
+ case 0x44:
+ m_tmp32 = read_8((m_pcb<<16) | (m_pc+1));
+ m_tmp8 = read_8((m_pcb<<16) | (m_pc+2));
+ m_tmp32 |= (m_dpr<<8) | (m_dtb<<8);
+ write_8(m_tmp32, m_tmp8);
+ m_pc += 3;
+ m_icount -= 5;
+ break;
+
case 0x46:
// util::stream_format(stream, "MOVW A, SP");
break;
@@ -607,6 +761,28 @@ void f2mc16_device::execute_run()
m_pc += 1;
break;
+ // MOVW A, dir
+ case 0x48:
+ m_tmp32 = read_8((m_pcb<<16) | (m_pc+1));
+ m_tmp32 |= (m_dpr<<8) | (m_dtb<<8);
+ m_tmp16 = read_16(m_tmp32);
+ m_acc <<= 16;
+ m_acc |= m_tmp16;
+ setNZ_16(m_acc & 0xffff);
+ m_pc += 2;
+ m_icount -= 3;
+ break;
+
+ // MOVW dir, A
+ case 0x49:
+ m_tmp32 = read_8((m_pcb<<16) | (m_pc+1));
+ m_tmp32 |= (m_dpr<<8) | (m_dtb<<8);
+ write_16(m_tmp32, m_acc & 0xffff);
+ setNZ_16(m_acc & 0xffff);
+ m_pc += 2;
+ m_icount -= 3;
+ break;
+
// MOVW A, #imm16
case 0x4a:
m_tmp16 = read_16((m_pcb<<16) | (m_pc+1));
@@ -668,24 +844,78 @@ void f2mc16_device::execute_run()
}
break;
+ // MOV A, adr16
case 0x52:
- // util::stream_format(stream, "MOV A, $%04x", opcodes.r16(pc+1));
+ m_tmp16 = read_16((m_pcb<<16) | (m_pc+1));
+ m_acc <<= 16;
+ if (m_prefix_valid)
+ {
+ m_prefix_valid = false;
+ m_acc |= read_8((m_prefix<<16) | m_tmp16);
+ }
+ else
+ {
+ m_acc |= read_8((m_dtb<<16) | m_tmp16);
+ }
+ setNZ_8(m_acc & 0xff);
+ m_pc += 3;
+ m_icount -= 4;
break;
+ // MOV adr16, A
case 0x53:
- // util::stream_format(stream, "MOV $%04x, A", opcodes.r16(pc+1));
+ m_tmp16 = read_16((m_pcb<<16) | (m_pc+1));
+ if (m_prefix_valid)
+ {
+ m_prefix_valid = false;
+ write_8((m_prefix<<16) | m_tmp16, m_acc & 0xff);
+ }
+ else
+ {
+ write_8((m_dtb<<16) | m_tmp16, m_acc & 0xff);
+ }
+ setNZ_8(m_acc & 0xff);
+ m_pc += 3;
+ m_icount -= 4;
break;
case 0x57:
// util::stream_format(stream, "MOVX A, $%04x", opcodes.r16(pc+1));
break;
+ // MOVW A, adr16
case 0x5a:
- // util::stream_format(stream, "MOVW A, $%04x", opcodes.r16(pc+1));
+ m_tmp16 = read_16((m_pcb<<16) | (m_pc+1));
+ m_acc <<= 16;
+ if (m_prefix_valid)
+ {
+ m_prefix_valid = false;
+ m_acc |= read_16((m_prefix<<16) | m_tmp16);
+ }
+ else
+ {
+ m_acc |= read_16((m_dtb<<16) | m_tmp16);
+ }
+ setNZ_16(m_acc & 0xffff);
+ m_pc += 3;
+ m_icount -= 4;
break;
+ // MOVW adr16, A
case 0x5b:
- // util::stream_format(stream, "MOVW $%04x, A", opcodes.r16(pc+1));
+ m_tmp16 = read_16((m_pcb<<16) | (m_pc+1));
+ if (m_prefix_valid)
+ {
+ m_prefix_valid = false;
+ write_16((m_prefix<<16) | m_tmp16, m_acc & 0xffff);
+ }
+ else
+ {
+ write_16((m_dtb<<16) | m_tmp16, m_acc & 0xffff);
+ }
+ setNZ_16(m_acc & 0xfff);
+ m_pc += 3;
+ m_icount -= 4;
break;
// POPW A
@@ -778,6 +1008,10 @@ void f2mc16_device::execute_run()
// stream << "RETI";
break;
+ case 0x6c: // bit operation instructions
+ opcodes_bo6c(read_8((m_pcb<<16) | (m_pc+1)));
+ break;
+
case 0x6e: // string instructions
opcodes_str6e(read_8((m_pcb<<16) | (m_pc+1)));
break;
@@ -892,7 +1126,14 @@ void f2mc16_device::execute_run()
// MOVX A, @Rx + disp8
case 0xc0: case 0xc1: case 0xc2: case 0xc3: case 0xc4: case 0xc5: case 0xc6: case 0xc7:
- // util::stream_format(stream, "MOVX A, @R%d+%02x", (opcode & 0x7), operand);
+ m_tmp8 = read_8((m_pcb<<16) | (m_pc+1));
+ m_tmpea = read_rwX(opcode & 0x7) + (s8)m_tmp8;
+ m_tmp8 = read_8(getRWbank(opcode & 7, m_tmpea));
+ m_tmp16 = (m_tmp8 & 0x80) ? (m_tmp8 | 0xff00) : m_tmp8;
+ m_acc <<= 16;
+ m_acc |= m_tmp16;
+ m_pc += 2;
+ m_icount -= 3;
break;
// MOVW @RWx + disp8, A
@@ -1149,7 +1390,7 @@ void f2mc16_device::execute_run()
break;
default:
- fatalerror("Unknown F2MC opcode %02x\n", opcode);
+ fatalerror("Unknown F2MC opcode %02x, PC=%02x%04x\n", opcode, m_pcb, m_pc);
break;
}
@@ -1187,10 +1428,185 @@ void f2mc16_device::opcodes_str6e(u8 operand)
}
}
+void f2mc16_device::opcodes_bo6c(u8 operand)
+{
+ switch (operand)
+ {
+ // CLRB adr16, bit
+ case 0x58: case 0x59: case 0x5a: case 0x5b: case 0x5c: case 0x5d: case 0x5e: case 0x5f:
+ m_tmp16 = read_16((m_pcb << 16) | (m_pc + 2));
+ if (m_prefix_valid)
+ {
+ m_prefix_valid = false;
+ m_tmp8 = read_8((m_prefix<<16) | m_tmp16);
+ m_tmp8 |= (1 << (operand & 7));
+ write_8((m_prefix<<16) | m_tmp16, m_tmp8);
+ }
+ else
+ {
+ m_tmp8= read_8((m_dtb<<16) | m_tmp16);
+ m_tmp8 |= (1 << (operand & 7));
+ write_8((m_dtb<<16) | m_tmp16, m_tmp8);
+ }
+ m_pc += 2;
+ m_icount -= 7;
+ break;
+
+ // SETB adr16, bit
+ case 0x78: case 0x79: case 0x7a: case 0x7b: case 0x7c: case 0x7d: case 0x7e: case 0x7f:
+ m_tmp16 = read_16((m_pcb << 16) | (m_pc + 2));
+ if (m_prefix_valid)
+ {
+ m_prefix_valid = false;
+ m_tmp8 = read_8((m_prefix<<16) | m_tmp16);
+ m_tmp8 |= (1 << (operand & 7));
+ write_8((m_prefix<<16) | m_tmp16, m_tmp8);
+ }
+ else
+ {
+ m_tmp8= read_8((m_dtb<<16) | m_tmp16);
+ m_tmp8 |= (1 << (operand & 7));
+ write_8((m_dtb<<16) | m_tmp16, m_tmp8);
+ }
+ m_pc += 2;
+ m_icount -= 7;
+ break;
+
+ // BBC adr16, bit, disp8
+ case 0x98: case 0x99: case 0x9a: case 0x9b: case 0x9c: case 0x9d: case 0x9e: case 0x9f:
+ m_tmp16 = read_16((m_pcb << 16) | (m_pc + 2));
+ m_tmp8 = read_8((m_pcb << 16) | (m_pc + 4));
+ m_ps &= ~F_Z;
+ m_pc += 5;
+ if (m_prefix_valid)
+ {
+ m_prefix_valid = false;
+ m_tmp32 = (m_prefix<<16) | m_tmp16;
+ }
+ else
+ {
+ m_tmp32 = (m_dtb<<16) | m_tmp16;
+ }
+
+ if (!(read_8(m_tmp32) & (1 << (operand & 7))))
+ {
+ m_ps |= F_Z;
+ m_pc += (s8)m_tmp8;
+ m_icount--;
+ }
+ m_icount -= 7;
+ break;
+
+ // BBS adr16, bit, disp8
+ case 0xb8: case 0xb9: case 0xba: case 0xbb: case 0xbc: case 0xbd: case 0xbe: case 0xbf:
+ m_tmp16 = read_16((m_pcb << 16) | (m_pc + 2));
+ m_tmp8 = read_8((m_pcb << 16) | (m_pc + 4));
+ m_ps &= ~F_Z;
+ m_pc += 5;
+ if (m_prefix_valid)
+ {
+ m_prefix_valid = false;
+ m_tmp32 = (m_prefix<<16) | m_tmp16;
+ }
+ else
+ {
+ m_tmp32 = (m_dtb<<16) | m_tmp16;
+ }
+
+ if (read_8(m_tmp32) & (1 << (operand & 7)))
+ {
+ m_pc += (s8)m_tmp8;
+ m_icount--;
+ }
+ else
+ {
+ m_ps |= F_Z;
+ }
+ m_icount -= 7;
+ break;
+
+ default:
+ fatalerror("Unknown F2MC 6C bit-op opcode %02x (PC=%x)\n", operand, (m_pcb<<16) | m_pc);
+ break;
+ }
+}
+
void f2mc16_device::opcodes_2b6f(u8 operand)
{
switch (operand)
{
+ // MOV A, DTB
+ case 0x00:
+ m_acc <<= 16;
+ m_acc |= m_dtb;
+ m_pc += 2;
+ m_icount -= 2;
+ break;
+
+ // MOV A, ADB
+ case 0x01:
+ m_acc <<= 16;
+ m_acc |= m_adb;
+ m_pc += 2;
+ m_icount -= 1;
+ break;
+
+ // MOV A, SSB
+ case 0x02:
+ m_acc <<= 16;
+ m_acc |= m_ssb;
+ m_pc += 2;
+ m_icount -= 1;
+ break;
+
+ // MOV A, USB
+ case 0x03:
+ m_acc <<= 16;
+ m_acc |= m_usb;
+ m_pc += 2;
+ m_icount -= 1;
+ break;
+
+ // MOV A, DPR
+ case 0x04:
+ m_acc <<= 16;
+ m_acc |= m_dpr;
+ m_pc += 2;
+ m_icount -= 2;
+ break;
+
+ // MOV A, PCB
+ case 0x06:
+ m_acc <<= 16;
+ m_acc |= m_pcb;
+ m_pc += 2;
+ m_icount -= 1;
+ break;
+
+ // LSLW A, R0
+ case 0x0c:
+ m_tmp8 = read_rX(0);
+ if (m_tmp8 == 0)
+ {
+ m_icount -= 6;
+ }
+ else
+ {
+ m_tmp16 = m_acc & 0xffff;
+ for (u8 count = 0; count < m_tmp8; count++)
+ {
+ m_ps &= ~F_C;
+ m_ps |= (m_tmp16 & 0x8000) ? F_C : 0;
+ m_tmp16 <<= 1;
+ m_icount -= 5;
+ }
+ setNZ_16(m_tmp16);
+ m_acc &= 0xffff0000;
+ m_acc |= m_tmp16;
+ }
+ m_pc += 2;
+ break;
+
// ASRW A, R0
case 0x0e:
m_tmp8 = read_rX(0);
@@ -1222,7 +1638,7 @@ void f2mc16_device::opcodes_2b6f(u8 operand)
if (m_tmp16 & 0x8000)
{
m_tmp16 >>= 1;
- m_tmp16 |= 1;
+ m_tmp16 |= 0x8000;
}
else
{
@@ -1239,6 +1655,45 @@ void f2mc16_device::opcodes_2b6f(u8 operand)
}
break;
+ // LSRW A, R0
+ case 0xf:
+ m_tmp8 = read_rX(0);
+ if (m_tmp8 == 0)
+ {
+ // docs don't say if N is cleared in this case or not
+ m_ps &= ~(F_C|F_T);
+ m_ps |= F_Z;
+ m_pc += 2;
+ m_icount -= 6;
+ }
+ else
+ {
+ m_tmp16 = m_acc & 0xffff;
+ for (u8 count = 0; count < m_tmp8; count++)
+ {
+ // T is set if either carry or T are set beforehand
+ if ((m_ps & F_C) || (m_ps & F_T))
+ {
+ m_ps |= F_T;
+ }
+ // C becomes the previous LSB
+ m_ps &= ~F_C;
+ if (m_tmp16 & 1)
+ {
+ m_ps |= F_C;
+ }
+
+ m_tmp16 >>= 1;
+ setNZ_16(m_tmp16);
+ m_icount -= 5;
+ }
+
+ m_acc &= 0xffff0000;
+ m_acc |= m_tmp16;
+ m_pc += 2;
+ }
+ break;
+
// MOV DTB, A
case 0x10:
m_dtb = m_acc & 0xff;
@@ -1274,27 +1729,48 @@ void f2mc16_device::opcodes_2b6f(u8 operand)
m_icount -= 1;
break;
- // MOV @RWx + #disp8, A
+ // MOV @RLx + #disp8, A
case 0x30: case 0x32: case 0x34: case 0x36:
m_tmp8 = read_8((m_pcb<<16) | (m_pc+2));
- m_tmp16 = read_rwX((operand>>1) & 0x3) + (s8)m_tmp8;
- write_8(getRWbank((operand>>1) & 0x3, m_tmp16), m_acc & 0xff);
+ m_tmp32 = read_rlX((operand>>1) & 0x3) + (s8)m_tmp8;
+ write_8(m_tmp32, m_acc & 0xff);
setNZ_8(m_acc & 0xff);
m_pc += 3;
m_icount -= 10;
break;
- // MOV A, @RWx + disp8
+ // MOVW @RLx + #disp8, A
+ case 0x38: case 0x3a: case 0x3c: case 0x3e:
+ m_tmp8 = read_8((m_pcb<<16) | (m_pc+2));
+ m_tmpea = read_rlX((operand>>1) & 0x3) + (s8)m_tmp8;
+ write_8(m_tmpea, m_acc & 0xffff);
+ setNZ_8(m_acc & 0xffff);
+ m_pc += 3;
+ m_icount -= 10;
+ break;
+
+ // MOV A, @RLx + disp8
case 0x40: case 0x42: case 0x44: case 0x46:
m_tmp8 = read_8((m_pcb<<16) | (m_pc+2));
- m_tmp16 = read_rwX((operand>>1) & 0x3) + (s8)m_tmp8;
+ m_tmp32 = read_rlX((operand>>1) & 0x3) + (s8)m_tmp8;
m_acc <<= 16;
- m_acc |= read_8(getRWbank((operand>>1) & 0x3, m_tmp16));
+ m_acc |= read_8(m_tmp32);
setNZ_8(m_acc & 0xff);
m_pc += 3;
m_icount -= 10;
break;
+ // MOVW A, @RLx + disp8
+ case 0x48: case 0x4a: case 0x4c: case 0x4e:
+ m_tmp8 = read_8((m_pcb<<16) | (m_pc+2));
+ m_tmp32 = read_rlX((operand>>1) & 0x3) + (s8)m_tmp8;
+ m_acc <<= 16;
+ m_acc |= read_16(m_tmp32);
+ setNZ_8(m_acc & 0xffff);
+ m_pc += 3;
+ m_icount -= 10;
+ break;
+
default:
fatalerror("Unknown F2MC 2B6F opcode %02x (PC=%x)\n", operand, (m_pcb<<16) | m_pc);
break;
@@ -1305,12 +1781,51 @@ void f2mc16_device::opcodes_ea70(u8 operand)
{
switch (operand)
{
+ // ADDL A, RLx
+ case 0x00: case 0x01: case 0x02: case 0x03: case 0x04: case 0x05: case 0x06: case 0x07:
+ m_acc = doADD_32(m_acc, read_rlX((operand>>1) & 3));
+ m_pc += 3;
+ m_icount -= 7;
+ break;
+
+ // ADDL A, @RWx + disp8
+ case 0x10: case 0x11: case 0x12: case 0x13: case 0x14: case 0x15: case 0x16: case 0x17:
+ m_tmp8 = read_32((m_pcb<<16) | (m_pc+2));
+ m_tmpea = read_rwX(operand & 7) + (s8)m_tmp8;
+ m_tmp32 = read_32(getRWbank(operand & 7, m_tmpea));
+ m_acc = doADD_32(m_acc, m_tmp32);
+ m_pc += 3;
+ m_icount -= 7;
+ break;
+
// SUBL A, @RWx + disp8
case 0x30: case 0x31: case 0x32: case 0x33: case 0x34: case 0x35: case 0x36: case 0x37:
m_tmp8 = read_32((m_pcb<<16) | (m_pc+2));
m_tmpea = read_rwX(operand & 7) + (s8)m_tmp8;
m_tmp32 = read_32(getRWbank(operand & 7, m_tmpea));
- m_acc = doSUB_32(m_acc, m_tmpea);
+ m_acc = doSUB_32(m_acc, m_tmp32);
+ m_pc += 3;
+ m_icount -= 7;
+ break;
+
+ // CMPL A, @RWx + disp8
+ case 0x70: case 0x71: case 0x72: case 0x73: case 0x74: case 0x75: case 0x76: case 0x77:
+ m_tmp8 = read_32((m_pcb<<16) | (m_pc+2));
+ m_tmpea = read_rwX(operand & 7) + (s8)m_tmp8;
+ m_tmp32 = read_32(getRWbank(operand & 7, m_tmpea));
+ doCMP_32(m_acc, m_tmp32);
+ m_pc += 3;
+ m_icount -= 7;
+ break;
+
+ // ANDL A, @RWx + disp8
+ case 0x90: case 0x91: case 0x92: case 0x93: case 0x94: case 0x95: case 0x96: case 0x97:
+ m_tmp8 = read_32((m_pcb<<16) | (m_pc+2));
+ m_tmpea = read_rwX(operand & 7) + (s8)m_tmp8;
+ m_tmp32 = read_32(getRWbank(operand & 7, m_tmpea));
+ m_acc &= m_tmp32;
+ setNZ_32(m_acc);
+ m_ps &= ~F_V;
m_pc += 3;
m_icount -= 7;
break;
@@ -1331,7 +1846,6 @@ void f2mc16_device::opcodes_ea71(u8 operand)
push_16(m_pc+4);
m_tmp8 = read_8((m_pcb << 16) | (m_pc + 2));
m_tmp16 = read_rwX(operand & 7) + (s8)m_tmp8;
- printf("CALLP EAR = %04x\n", m_tmp16);
m_tmp32 = read_32(getRWbank(operand & 7, m_tmp16));
m_pc = m_tmp32 & 0xffff;
m_pcb = (m_tmp32 >> 16) & 0xff;
@@ -1347,7 +1861,7 @@ void f2mc16_device::opcodes_ea71(u8 operand)
write_32(getRWbank(operand & 7, m_tmp16), m_tmp64 & 0xffffffff);
setNZ_32(m_tmp64 & 0xffffffff);
m_ps &= ~F_V;
- if (m_tmp32 & 0x100000000)
+ if (m_tmp64 & 0x100000000)
{
m_ps |= F_V;
}
@@ -1393,6 +1907,23 @@ void f2mc16_device::opcodes_ea71(u8 operand)
m_icount -= 4;
break;
+ // MOVL addr16, A
+ case 0xbf:
+ m_tmp16 = read_16((m_pcb<<16) | (m_pc+2));
+ if (m_prefix_valid)
+ {
+ m_prefix_valid = false;
+ write_32((m_prefix<<16) | m_tmp16, m_acc);
+ }
+ else
+ {
+ write_32((m_dtb<<16) | m_tmp16, m_acc);
+ }
+ setNZ_32(m_acc);
+ m_pc += 4;
+ m_icount -= 5;
+ break;
+
// MOV @RWx, #imm8
case 0xc8: case 0xc9: case 0xca: case 0xcb:
m_tmp8 = read_8((m_pcb<<16) | (m_pc+2));
@@ -1413,13 +1944,30 @@ void f2mc16_device::opcodes_ea72(u8 operand)
{
switch (operand)
{
- // MOVW A, @RWx + disp8
+ // INC @RWx + disp8
+ case 0x50: case 0x51: case 0x52: case 0x53: case 0x54: case 0x55: case 0x56: case 0x57:
+ m_tmp8 = read_8((m_pcb<<16) | (m_pc+2));
+ m_tmp16 = read_rwX(operand & 7) + (s8)m_tmp8;
+ m_tmp32 = read_16(getRWbank(operand & 7, m_tmp16));
+ m_tmp32++;
+ write_8(getRWbank(operand & 7, m_tmp16), m_tmp32 & 0xff);
+ setNZ_8(m_tmp32 & 0xff);
+ m_ps &= ~F_V;
+ if (m_tmp32 & 0x100)
+ {
+ m_ps |= F_V;
+ }
+ m_pc += 3;
+ m_icount -= 5;
+ break;
+
+ // MOV A, @RWx + disp8
case 0x90: case 0x91: case 0x92: case 0x93: case 0x94: case 0x95: case 0x96: case 0x97:
m_tmp8 = read_8((m_pcb<<16) | (m_pc+2));
m_tmp16 = read_rwX(operand & 7) + (s8)m_tmp8;
m_acc <<= 16;
- m_acc |= read_16(getRWbank(operand & 7, m_tmp16));
- setNZ_16(m_acc & 0xffff);
+ m_acc |= read_8(getRWbank(operand & 7, m_tmp16));
+ setNZ_8(m_acc & 0xff);
m_pc += 3;
m_icount -= 5;
break;
@@ -1461,6 +2009,33 @@ void f2mc16_device::opcodes_ea73(u8 operand)
m_icount -= 5;
break;
+ // MOVW @RWx + disp16, #imm16
+ case 0xd8: case 0xd9: case 0xda: case 0xdb:
+ m_tmp16 = read_16((m_pcb<<16) | (m_pc+2));
+ m_tmp32 = read_16((m_pcb<<16) | (m_pc+4));
+ m_tmpea = read_rwX(operand & 7) + (s16)m_tmp16;
+ write_16(getRWbank(operand & 7, m_tmpea), m_tmp32 & 0xffff);
+ m_pc += 6;
+ m_icount -= 4;
+ break;
+
+ // MOVW addr16, #imm16
+ case 0xdf:
+ m_tmp32 = read_16((m_pcb<<16) | (m_pc+2));
+ m_tmp16 = read_16((m_pcb<<16) | (m_pc+4));
+ if (m_prefix_valid)
+ {
+ m_prefix_valid = false;
+ write_16((m_prefix<<16) | m_tmp32, m_tmp16);
+ }
+ else
+ {
+ write_16((m_dtb<<16) | m_tmp32, m_tmp16);
+ }
+ m_pc += 6;
+ m_icount -= 4;
+ break;
+
default:
fatalerror("Unknown F2MC EA73 opcode %02x (PC=%x)\n", operand, (m_pcb<<16) | m_pc);
break;
@@ -1501,6 +2076,31 @@ void f2mc16_device::opcodes_ea76(u8 operand)
{
switch (operand)
{
+ // ADDW A, RWx
+ case 0x0: case 0x1: case 0x2: case 0x3: case 0x4: case 0x5: case 0x6: case 0x7:
+ m_tmp16 = doADD_16(m_acc & 0xffff, read_rwX(operand & 7));
+ m_acc &= 0xffff0000;
+ m_acc |= m_tmp16;
+ m_pc += 2;
+ m_icount -= 3;
+ break;
+
+ // SUBW A, RWx
+ case 0x20: case 0x21: case 0x22: case 0x23: case 0x24: case 0x25: case 0x26: case 0x27:
+ m_tmp16 = doSUB_16(m_acc & 0xffff, read_rwX(operand & 7));
+ m_acc &= 0xffff0000;
+ m_acc |= m_tmp16;
+ m_pc += 2;
+ m_icount -= 3;
+ break;
+
+ // CMPW A, RWx
+ case 0x60: case 0x61: case 0x62: case 0x63: case 0x64: case 0x65: case 0x66: case 0x67:
+ doCMP_16(m_acc & 0xffff, read_rwX(operand & 7));
+ m_pc += 2;
+ m_icount -= 2;
+ break;
+
// CMPW A, @RWx + disp8
case 0x70: case 0x71: case 0x72: case 0x73: case 0x74: case 0x75: case 0x76: case 0x77:
m_tmp8 = read_8((m_pcb<<16) | (m_pc+2));
@@ -1511,6 +2111,17 @@ void f2mc16_device::opcodes_ea76(u8 operand)
m_icount -= 10;
break;
+ // ORW A, @RWx
+ case 0xa0: case 0xa1: case 0xa2: case 0xa3: case 0xa4: case 0xa5: case 0xa6: case 0xa7:
+ m_tmp16 = read_rwX(operand & 7);
+ m_tmp16 = read_16(getRWbank(operand & 7, m_tmp16));
+ m_acc |= m_tmp16;
+ setNZ_16(m_acc & 0xffff);
+ m_ps &= ~F_V;
+ m_pc += 2;
+ m_icount -= 4;
+ break;
+
default:
fatalerror("Unknown F2MC EA76 opcode %02x (PC=%x)\n", operand, (m_pcb<<16) | m_pc);
break;
@@ -1531,6 +2142,24 @@ void f2mc16_device::opcodes_ea78(u8 operand)
{
switch (operand)
{
+ // MULUW A, @RWx + disp8
+ case 0x30: case 0x31: case 0x32: case 0x33: case 0x34: case 0x35: case 0x36: case 0x37:
+ m_tmp8 = read_8((m_pcb<<16) | (m_pc+2));
+ m_tmp16 = read_rwX(operand & 7) + (s8)m_tmp8;
+ m_tmp16 = read_16(getRWbank(operand & 7, m_tmp16));
+ if (m_tmp16 == 0)
+ {
+ m_icount -= 4;
+ m_acc <<= 16;
+ }
+ else
+ {
+ m_icount -= 12;
+ m_acc = m_tmp16 * (m_acc & 0xffff);
+ }
+ m_pc += 3;
+ break;
+
default:
fatalerror("Unknown F2MC EA78 opcode %02x (PC=%x)\n", operand, (m_pcb<<16) | m_pc);
break;
diff --git a/src/devices/cpu/f2mc16/f2mc16.h b/src/devices/cpu/f2mc16/f2mc16.h
index 1467aa1462c..edc0dda4148 100644
--- a/src/devices/cpu/f2mc16/f2mc16.h
+++ b/src/devices/cpu/f2mc16/f2mc16.h
@@ -98,10 +98,12 @@ private:
}
inline void write_8(u32 addr, u8 data)
{
+// printf("write %02x to %08x\n", data, addr);
m_program->write_byte(addr, data);
}
inline void write_16(u32 addr, u16 data)
{
+// printf("write %04x to %08x\n", data, addr);
if (addr & 1)
{
m_program->write_byte(addr, data & 0xff);
@@ -114,6 +116,7 @@ private:
}
inline void write_32(u32 addr, u32 data)
{
+ //printf("write %08x to %08x\n", data, addr);
if (addr & 3)
{
m_program->write_byte(addr, data & 0xff);
@@ -313,6 +316,20 @@ private:
m_ps |= F_V;
}
}
+ inline void doCMP_32(u32 lhs, u32 rhs)
+ {
+ m_tmp64 = lhs - rhs;
+ setNZ_32(m_tmp64 & 0xffffffff);
+ m_ps &= ~(F_C|F_V);
+ if (m_tmp64 & 0x100000000)
+ {
+ m_ps |= F_C;
+ }
+ if ((lhs ^ rhs) & (lhs ^ (m_tmp64 & 0xffffffff)) & 0x80000000)
+ {
+ m_ps |= F_V;
+ }
+ }
inline u8 doSUB_8(u8 lhs, u8 rhs)
{
@@ -402,6 +419,7 @@ private:
m_icount -= 4;
}
+ void opcodes_bo6c(u8 operand);
void opcodes_str6e(u8 operand);
void opcodes_2b6f(u8 operand);
void opcodes_ea70(u8 operand);
diff --git a/src/devices/cpu/f2mc16/f2mc16dasm.cpp b/src/devices/cpu/f2mc16/f2mc16dasm.cpp
index c00972bcc29..12799dec0f5 100644
--- a/src/devices/cpu/f2mc16/f2mc16dasm.cpp
+++ b/src/devices/cpu/f2mc16/f2mc16dasm.cpp
@@ -142,6 +142,10 @@ offs_t f2mc16_disassembler::disassemble(std::ostream &stream, offs_t pc, const d
stream << "NOP";
break;
+ case 0x01:
+ stream << "INT9";
+ break;
+
case 0x03:
util::stream_format(stream, "NEG A");
break;
@@ -386,15 +390,35 @@ offs_t f2mc16_disassembler::disassemble(std::ostream &stream, offs_t pc, const d
bytes = 3;
break;
+ case 0x3d:
+ util::stream_format(stream, "ORW A, #$%04x", opcodes.r16(pc+1));
+ bytes = 3;
+ break;
+
case 0x3f:
stream << "NOTW A";
break;
+ case 0x40:
+ util::stream_format(stream, "MOV A, dir(%02x)", operand);
+ bytes = 2;
+ break;
+
+ case 0x41:
+ util::stream_format(stream, "MOV dir(%02x), A", operand);
+ bytes = 2;
+ break;
+
case 0x42:
util::stream_format(stream, "MOV A, #$%02x", operand);
bytes = 2;
break;
+ case 0x44:
+ util::stream_format(stream, "MOV dir(%02x), #$%02x", operand, opcodes.r8(pc+2));
+ bytes = 3;
+ break;
+
case 0x46:
util::stream_format(stream, "MOVW A, SP");
break;
@@ -403,6 +427,16 @@ offs_t f2mc16_disassembler::disassemble(std::ostream &stream, offs_t pc, const d
util::stream_format(stream, "MOVW SP, A");
break;
+ case 0x48:
+ util::stream_format(stream, "MOVW A, dir(%02x)", operand);
+ bytes = 2;
+ break;
+
+ case 0x49:
+ util::stream_format(stream, "MOVW dir(%02x), A", operand);
+ bytes = 2;
+ break;
+
case 0x4a:
util::stream_format(stream, "MOVW A, #$%04x", opcodes.r16(pc+1));
bytes = 3;
@@ -524,6 +558,45 @@ offs_t f2mc16_disassembler::disassemble(std::ostream &stream, offs_t pc, const d
stream << "RETI";
break;
+ case 0x6c: // bit operations
+ switch (operand)
+ {
+ case 0x58: case 0x59: case 0x5a: case 0x5b: case 0x5c: case 0x5d: case 0x5e: case 0x5f:
+ util::stream_format(stream, "CLRB $%04x, %d", opcodes.r16(pc+2), operand & 7);
+ bytes = 2;
+ break;
+
+ case 0x78: case 0x79: case 0x7a: case 0x7b: case 0x7c: case 0x7d: case 0x7e: case 0x7f:
+ util::stream_format(stream, "SETB $%04x, %d", opcodes.r16(pc+2), operand & 7);
+ bytes = 2;
+ break;
+
+ case 0x88: case 0x89: case 0x8a: case 0x8b: case 0x8c: case 0x8d: case 0x8e: case 0x8f:
+ util::stream_format(stream, "BBC dir(%02x), %d, $%x", opcodes.r8(pc+2), operand & 7, pc+4+(s8)opcodes.r8(pc+3));
+ bytes = 4;
+ break;
+
+ case 0x98: case 0x99: case 0x9a: case 0x9b: case 0x9c: case 0x9d: case 0x9e: case 0x9f:
+ util::stream_format(stream, "BBC $%04x, %d, $%x", opcodes.r16(pc+2), operand & 7, pc+5+(s8)opcodes.r8(pc+4));
+ bytes = 5;
+ break;
+
+ case 0xa8: case 0xa9: case 0xaa: case 0xab: case 0xac: case 0xad: case 0xae: case 0xaf:
+ util::stream_format(stream, "BBS dir(%02x), %d, $%x", opcodes.r8(pc+2), operand & 7, pc+4+(s8)opcodes.r8(pc+3));
+ bytes = 4;
+ break;
+
+ case 0xb8: case 0xb9: case 0xba: case 0xbb: case 0xbc: case 0xbd: case 0xbe: case 0xbf:
+ util::stream_format(stream, "BBS $%04x, %d, $%x", opcodes.r16(pc+2), operand & 7, pc+5+(s8)opcodes.r8(pc+4));
+ bytes = 5;
+ break;
+
+ default:
+ stream << "UNK 6C bit op";
+ break;
+ }
+ break;
+
case 0x6e: // string instructions
switch (operand)
{
@@ -641,22 +714,22 @@ offs_t f2mc16_disassembler::disassemble(std::ostream &stream, offs_t pc, const d
break;
case 0x30: case 0x32: case 0x34: case 0x36:
- util::stream_format(stream, "MOV @RW%d + #$%02x, A", ((operand>>1) & 0x3), opcodes.r8(pc+2));
+ util::stream_format(stream, "MOV @RL%d + #$%02x, A", ((operand>>1) & 0x3), opcodes.r8(pc+2));
bytes = 3;
break;
case 0x38: case 0x3a: case 0x3c: case 0x3e:
- util::stream_format(stream, "MOVW @RW%d + #$%02x, A", ((operand>>1) & 0x3), opcodes.r8(pc+2));
+ util::stream_format(stream, "MOVW @RL%d + #$%02x, A", ((operand>>1) & 0x3), opcodes.r8(pc+2));
bytes = 3;
break;
case 0x40: case 0x42: case 0x44: case 0x46:
- util::stream_format(stream, "MOV A, @RW%d + #$%02x", ((operand>>1) & 0x3), opcodes.r8(pc+2));
+ util::stream_format(stream, "MOV A, @RL%d + #$%02x", ((operand>>1) & 0x3), opcodes.r8(pc+2));
bytes = 3;
break;
case 0x48: case 0x4a: case 0x4c: case 0x4e:
- util::stream_format(stream, "MOVW A, @RW%d + #$%02x", ((operand>>1) & 0x3), opcodes.r8(pc+2));
+ util::stream_format(stream, "MOVW A, @RL%d + #$%02x", ((operand>>1) & 0x3), opcodes.r8(pc+2));
bytes = 3;
break;
@@ -676,6 +749,10 @@ offs_t f2mc16_disassembler::disassemble(std::ostream &stream, offs_t pc, const d
util::stream_format(stream, "ADDL A, RL%d", (operand & 0x6)>>1);
bytes = 2;
break;
+
+ default:
+ stream << "UNK ea-type 70 0x";
+ break;
}
break;
@@ -686,6 +763,20 @@ offs_t f2mc16_disassembler::disassemble(std::ostream &stream, offs_t pc, const d
case 0xb: bytes = ea_form1_helper(stream, "ORL ", pc, operand, opcodes.r16(pc+2), true); break;
case 0xd: bytes = ea_form1_helper(stream, "XORL ", pc, operand, opcodes.r16(pc+2), true); break;
+ case 0x6:
+ switch (operand & 0xf)
+ {
+ case 0: case 1: case 2: case 3: case 4: case 5: case 6: case 7:
+ util::stream_format(stream, "CMPL A, RL%d", (operand & 0x6)>>1);
+ bytes = 2;
+ break;
+
+ default:
+ stream << "UNK ea-type 70 6x";
+ break;
+ }
+ break;
+
default:
stream << "UNK ea-type 70";
break;
@@ -785,8 +876,8 @@ offs_t f2mc16_disassembler::disassemble(std::ostream &stream, offs_t pc, const d
bytes = 3;
break;
- case 0xb8: case 0xb9: case 0xba: case 0xbb: case 0xbc: case 0xbd: case 0xbe: case 0xbf:
- util::stream_format(stream, "MOV @RW%d + #$%04x, A", (operand & 0x7), opcodes.r16(pc+2));
+ case 0xbf:
+ util::stream_format(stream, "MOVL $%04x, A", opcodes.r16(pc+2));
bytes = 4;
break;
@@ -804,23 +895,28 @@ offs_t f2mc16_disassembler::disassemble(std::ostream &stream, offs_t pc, const d
case 0x72: // ea-type instructions
switch (operand)
{
+ case 0x50: case 0x51: case 0x52: case 0x53: case 0x54: case 0x55: case 0x56: case 0x57:
+ util::stream_format(stream, "INC @RW%d + #$%02x", (operand & 0x7), opcodes.r8(pc+2));
+ bytes = 3;
+ break;
+
case 0x90: case 0x91: case 0x92: case 0x93: case 0x94: case 0x95: case 0x96: case 0x97:
- util::stream_format(stream, "MOVW A, @RW%d + #$%02x", (operand & 0x7), opcodes.r8(pc+2));
+ util::stream_format(stream, "MOV A, @RW%d + #$%02x", (operand & 0x7), opcodes.r8(pc+2));
bytes = 3;
break;
case 0x98: case 0x99: case 0x9a: case 0x9b:
- util::stream_format(stream, "MOVW A, @RW%d + #$%04x", (operand & 0x7), opcodes.r16(pc+2));
+ util::stream_format(stream, "MOV A, @RW%d + #$%04x", (operand & 0x7), opcodes.r16(pc+2));
bytes = 4;
break;
case 0x9c: case 0x9d:
- util::stream_format(stream, "MOVW A, @RW%d + RW7", (operand & 0x1));
+ util::stream_format(stream, "MOV A, @RW%d + RW7", (operand & 0x1));
bytes = 2;
break;
case 0x9e:
- util::stream_format(stream, "MOVW A, @PC + #$04x ($%04X)", (operand & 0x1), opcodes.r16(pc+2), (s16)opcodes.r16(pc+2) + (pc & 0xffff));
+ util::stream_format(stream, "MOV A, @PC + #$04x ($%04X)", (operand & 0x1), opcodes.r16(pc+2), (s16)opcodes.r16(pc+2) + (pc & 0xffff));
bytes = 4;
break;
@@ -869,7 +965,7 @@ offs_t f2mc16_disassembler::disassemble(std::ostream &stream, offs_t pc, const d
break;
case 0x5f:
- util::stream_format(stream, "INCW A, $%04x", (operand & 0x1), opcodes.r16(pc+2));
+ util::stream_format(stream, "INCW $%04x", opcodes.r16(pc+2));
bytes = 4;
break;
@@ -894,7 +990,7 @@ offs_t f2mc16_disassembler::disassemble(std::ostream &stream, offs_t pc, const d
break;
case 0x7f:
- util::stream_format(stream, "DECW A, $%04x", (operand & 0x1), opcodes.r16(pc+2));
+ util::stream_format(stream, "DECW $%04x", opcodes.r16(pc+2));
bytes = 4;
break;
@@ -1095,6 +1191,11 @@ offs_t f2mc16_disassembler::disassemble(std::ostream &stream, offs_t pc, const d
bytes = 4;
break;
+ case 0xa0: case 0xa1: case 0xa2: case 0xa3: case 0xa4: case 0xa5: case 0xa6: case 0xa7:
+ util::stream_format(stream, "ORW A, @RW%d", (operand & 0x1));
+ bytes = 2;
+ break;
+
default:
stream << "UNK ea-type 76";
break;
@@ -1128,6 +1229,11 @@ offs_t f2mc16_disassembler::disassemble(std::ostream &stream, offs_t pc, const d
bytes = 2;
break;
+ case 0x30: case 0x31: case 0x32: case 0x33: case 0x34: case 0x35: case 0x36: case 0x37:
+ util::stream_format(stream, "MULUW A, @RW%d + #$%02x", (operand & 0x7), opcodes.r8(pc+2));
+ bytes = 3;
+ break;
+
default:
stream << "UNK ea-type 78";
break;
@@ -1165,17 +1271,17 @@ offs_t f2mc16_disassembler::disassemble(std::ostream &stream, offs_t pc, const d
break;
case 0xb8: case 0xb9: case 0xba: case 0xbb: case 0xbc: case 0xbd: case 0xbe: case 0xbf:
- util::stream_format(stream, "MOVW A, @R%d + %02x", (opcode & 0x7), operand);
+ util::stream_format(stream, "MOVW A, @RW%d + #$%02x", (opcode & 0x7), operand);
bytes = 2;
break;
case 0xc0: case 0xc1: case 0xc2: case 0xc3: case 0xc4: case 0xc5: case 0xc6: case 0xc7:
- util::stream_format(stream, "MOVX A, @R%d + %02x", (opcode & 0x7), operand);
+ util::stream_format(stream, "MOVX A, @RW%d + #$%02x", (opcode & 0x7), operand);
bytes = 2;
break;
case 0xc8: case 0xc9: case 0xca: case 0xcb: case 0xcc: case 0xcd: case 0xce: case 0xcf:
- util::stream_format(stream, "MOVW @RW%d + %02x, A", (opcode & 0x7), operand);
+ util::stream_format(stream, "MOVW @RW%d + #$%02x, A", (opcode & 0x7), operand);
bytes = 2;
break;
diff --git a/src/devices/cpu/i86/i186.cpp b/src/devices/cpu/i86/i186.cpp
index 66798474c69..e20db304930 100644
--- a/src/devices/cpu/i86/i186.cpp
+++ b/src/devices/cpu/i86/i186.cpp
@@ -1635,7 +1635,7 @@ WRITE16_MEMBER(i80186_cpu_device::internal_port_w)
{
case 0x11:
if (LOG_PORTS) logerror("%05X:80186 EOI = %04X\n", m_pc, data);
- handle_eoi(0x8000);
+ handle_eoi(data);
update_interrupt_state();
break;
diff --git a/src/devices/machine/wtl3132.cpp b/src/devices/machine/wtl3132.cpp
new file mode 100644
index 00000000000..bc7088aa24f
--- /dev/null
+++ b/src/devices/machine/wtl3132.cpp
@@ -0,0 +1,521 @@
+// license:BSD-3-Clause
+// copyright-holders:Patrick Mackinlay
+
+/*
+ * An emulation of the Weitek 3132 floating point data path.
+ *
+ * Sources:
+ * - http://www.bitsavers.org/components/weitek/dataSheets/WTL-3132_3332_XL-3132_32-Bit_Floating_Point_Data_Path_Oct88.pdf
+ *
+ * TODO:
+ * - reciprocal via lookup table
+ * - fully analyze reversed C bus case
+ * - testing/logging undefined cases
+ */
+
+#include "emu.h"
+#include "wtl3132.h"
+
+#define LOG_GENERAL (1U << 0)
+#define LOG_REGS (1U << 1)
+#define LOG_IO (1U << 2)
+#define LOG_BYPASS (1U << 3)
+
+#define VERBOSE (LOG_GENERAL|LOG_REGS|LOG_IO|LOG_BYPASS)
+#include "logmacro.h"
+
+ALLOW_SAVE_TYPE(float32_t);
+
+// helper for extracting opcode fields
+#define OPF(c, x) ((c & M_##x) >> S_##x)
+
+DEFINE_DEVICE_TYPE(WTL3132, wtl3132_device, "wtl3132", "Weitek 3132")
+
+wtl3132_device::wtl3132_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock)
+ : device_t(mconfig, WTL3132, tag, owner, clock)
+ , m_fpcn_cb(*this)
+ , m_fpex_cb(*this)
+ , m_zero_cb(*this)
+{
+}
+
+void wtl3132_device::device_start()
+{
+ m_fpcn_cb.resolve_safe();
+ m_fpex_cb.resolve_safe();
+ m_zero_cb.resolve_safe();
+
+ save_item(NAME(m_fpcn_state));
+ save_item(NAME(m_fpex_state));
+ save_item(NAME(m_zero_state));
+
+ save_item(NAME(m_c_port));
+ save_item(NAME(m_x_port));
+ save_item(NAME(m_x_in));
+ save_item(NAME(m_x_out));
+
+ save_item(NAME(m_slot));
+ save_item(NAME(m_head));
+
+ save_item(NAME(m_mode));
+ save_item(NAME(m_f));
+ save_item(NAME(m_t1));
+ save_item(NAME(m_t2));
+ save_item(NAME(m_t3));
+ save_item(NAME(m_cr));
+ save_item(NAME(m_sr));
+ save_item(NAME(m_zr));
+
+ save_item(NAME(m_c_bus_data));
+ save_item(NAME(m_c_bus_addr));
+ save_item(NAME(m_c_bus_cwen));
+
+ save_item(NAME(m_ma_in));
+ save_item(NAME(m_mb_in));
+ save_item(NAME(m_m_out));
+
+ save_item(NAME(m_aa_in));
+ save_item(NAME(m_ab_in));
+ save_item(NAME(m_a_out));
+}
+
+void wtl3132_device::device_reset()
+{
+ m_abort = 1;
+ m_neut = 1;
+ m_stall = 1;
+
+ m_fpcn_state = 1;
+ m_fpex_state = 1;
+ m_zero_state = 1;
+
+ // initialize pipeline with fnop to minimize logging noise
+ for (u64 &slot : m_slot)
+ slot = (F_FSUB << S_F) | M_CWEN | M_ABIN | M_ADST;
+ m_head = 0;
+
+ m_mode = 0;
+}
+
+void wtl3132_device::clk_w(int state)
+{
+ // ignore falling edges for now
+ if (!state)
+ return;
+
+ // precompute pipeline slot indixes
+ unsigned const index0 = (m_head + 4) & 3;
+ unsigned const index1 = (m_head + 3) & 3;
+ unsigned const index2 = (m_head + 2) & 3;
+ unsigned const index3 = (m_head + 1) & 3;
+
+ LOG("code 0x%09x slot %d %s\n", m_c_port, index0, disassemble(m_c_port));
+
+ // store the next instruction in the pipeline
+ m_slot[index0] = m_c_port;
+
+ // STALL- and ABORT- prevent all processing of the next instruction
+ if (!m_stall || !m_abort)
+ {
+ LOG("slot %d stage instruction %s\n", index0, !m_stall ? "stalled" : "aborted");
+ m_slot[index0] |= M_CANCEL;
+ }
+
+ // retire pipeline stages in fifo order simplifying dependency forwarding
+ if (!(m_slot[index3] & M_CANCEL))
+ stage4(index3);
+
+ if (!(m_slot[index2] & M_CANCEL))
+ stage3(index2);
+
+ if (!(m_slot[index1] & M_CANCEL))
+ stage2(index1);
+
+ if (!(m_slot[index0] & M_CANCEL))
+ stage1(index0);
+
+ // write to the register file after the first pipeline stage has completed
+ // to ensure the effective 4 cycle delay for non-bypassed register access
+ if (!m_c_bus_cwen && !(m_slot[index3] & M_CANCEL))
+ {
+ m_f[m_c_bus_addr] = m_c_bus_data;
+ LOGMASKED(LOG_REGS, "slot %d stage 4 f%d = %f\n", index3, m_c_bus_addr, u2f(m_c_bus_data.v));
+ }
+
+ // NEUT- and ABORT- prevent writeback of the previous instruction, but
+ // allow i/o to complete normally
+ if (!m_neut || !m_abort)
+ {
+ LOG("slot %d stage instruction %s\n", index1, !m_neut ? "neutralized" : "aborted");
+ m_slot[index1] |= M_CANCEL;
+ }
+
+ m_head = index3;
+}
+
+void wtl3132_device::stage1(unsigned const index)
+{
+ u64 const code = m_slot[index];
+
+ // A and B buses are loaded from registers by default
+ float32_t a_bus = m_f[OPF(code, AADD)];
+ float32_t b_bus = m_f[OPF(code, BADD)];
+
+ // C-to-A bus internal bypass
+ if (((m_mode & MODE_IBA) && !m_c_bus_cwen && OPF(code, AADD) == m_c_bus_addr))
+ {
+ a_bus = m_c_bus_data;
+ LOGMASKED(LOG_BYPASS, "slot %d stage 1 C-to-A internal bypass %f\n", index, u2f(m_c_bus_data.v));
+ }
+
+ // C-to-B bus internal bypass
+ if (((m_mode & MODE_IBB) && !m_c_bus_cwen && OPF(code, BADD) == m_c_bus_addr))
+ {
+ b_bus = m_c_bus_data;
+ LOGMASKED(LOG_BYPASS, "slot %d stage 1 C-to-B internal bypass %f\n", index, u2f(m_c_bus_data.v));
+ }
+
+ // perform i/o
+ switch (OPF(code, IOCT))
+ {
+ case 1: // floadrc
+ m_f[OPF(code, DADD)] = m_x_port;
+ // FIXME: floadrc uses c bus, preventing result writeback except for flut
+ m_x_in = m_x_port;
+ LOGMASKED(LOG_IO, "slot %d stage 1 floadrc f%d = %f\n", index, OPF(code, DADD), u2f(m_x_port.v));
+ break;
+ case 2: // fstore
+ // C-to-X output bypass
+ if ((m_mode & MODE_OBP) && !m_c_bus_cwen && OPF(code, DADD) == m_c_bus_addr)
+ {
+ m_x_out = m_c_bus_data;
+ LOGMASKED(LOG_BYPASS, "slot %d stage 1 C-to-X output bypass %f\n", index, u2f(m_c_bus_data.v));
+ }
+ else
+ m_x_out = m_f[OPF(code, DADD)];
+ break;
+ case 3: // fload
+ m_f[OPF(code, DADD)] = m_x_port;
+ LOGMASKED(LOG_IO, "slot %d stage 1 fload f%d = %f\n", index, OPF(code, DADD), u2f(m_x_port.v));
+
+ // X-to-A bus input bypass
+ if ((m_mode & MODE_IBP) && OPF(code, AADD) == OPF(code, DADD))
+ {
+ a_bus = m_x_port;
+ LOGMASKED(LOG_BYPASS, "slot %d stage 1 X-to-A input bypass %f\n", index, u2f(m_x_port.v));
+ }
+ break;
+ }
+
+ // perform status and mode register operations
+ switch (OPF(code, F))
+ {
+ case F_MISC:
+ switch (OPF(code, BADD))
+ {
+ case MF_FCLSR:
+ m_sr = false;
+ break;
+ case MF_FSTSR:
+ m_x_port.v = m_sr;
+ break;
+
+ case MF_FMODE:
+ {
+ // check polarity inversion
+ bool const polarity = bool(m_mode & MODE_FXH) ^ bool((OPF(code, CADD) << 5) & MODE_FXH);
+
+ // update mode
+ m_mode = (OPF(code, ABIN) << 10) | (OPF(code, CADD) << 5) | OPF(code, AADD);
+ if (!(m_mode & MODE_FXO))
+ m_sr = false;
+
+ // force line update
+ if (polarity)
+ m_fpex_state = !m_sr;
+ }
+ break;
+ }
+ }
+
+ // select and load multiplier inputs
+ m_ma_in = a_bus;
+ m_mb_in = OPF(code, MBIN) ? m_x_in : b_bus;
+
+ // buffer accumulator inputs
+ m_aa_in[0] = a_bus;
+ m_ab_in[0] = b_bus;
+}
+
+void wtl3132_device::stage2(unsigned const index)
+{
+ u64 const code = m_slot[index];
+
+ // load AAin from multiplier output or buffered A bus
+ m_aa_in[1] = (OPF(code, F) & 4) ? m_m_out : m_aa_in[0];
+
+ // load ABin from source specified by ABIN opcode field
+ switch (OPF(code, ABIN))
+ {
+ case 0: m_ab_in[1] = m_x_in; break;
+ case 1: m_ab_in[1] = m_ab_in[0]; break;
+ case 2: m_ab_in[1] = m_t2; break;
+ case 3: m_ab_in[1] = m_t1; break;
+ case 4: m_ab_in[1] = m_t3; break;
+
+ case 6: m_ab_in[1] = i32_to_f32(2); break;
+ case 7: m_ab_in[1] = i32_to_f32(0); break;
+ }
+
+ // execute multiply and optional negate
+ switch (OPF(code, F))
+ {
+ case F_FMNA:
+ case F_FMNS:
+ // multiply and negate
+ m_m_out = f32_mul(f32_mul(m_ma_in, m_mb_in), i32_to_f32(-1));
+ LOG("slot %d stage 2 -(%f * %f) == %f\n", index, u2f(m_ma_in.v), u2f(m_mb_in.v), u2f(m_m_out.v));
+ break;
+ case F_FMAC:
+ // multiply
+ m_m_out = f32_mul(m_ma_in, m_mb_in);
+ LOG("slot %d stage 2 %f * %f == %f\n", index, u2f(m_ma_in.v), u2f(m_mb_in.v), u2f(m_m_out.v));
+ break;
+ }
+
+ // complete fstore
+ if (OPF(code, IOCT) == 2)
+ {
+ m_x_port = m_x_out;
+ LOGMASKED(LOG_IO, "slot %d stage 2 fstore %f\n", index, u2f(m_x_out.v));
+ }
+}
+
+void wtl3132_device::stage3(unsigned const index)
+{
+ u64 const code = m_slot[index];
+
+ softfloat_exceptionFlags = 0;
+
+ // execute accumulator operation
+ switch (OPF(code, F))
+ {
+ case F_MISC:
+ switch (OPF(code, BADD))
+ {
+ case MF_FABS:
+ if (f32_lt(m_aa_in[1], i32_to_f32(0)))
+ m_a_out = f32_mul(m_aa_in[1], i32_to_f32(-1));
+ else
+ m_a_out = m_aa_in[1];
+
+ if (m_mode & MODE_RTN)
+ m_cr = f32_eq(m_a_out, i32_to_f32(0));
+ LOG("slot %d stage 3 fabs %f == %f\n", index, u2f(m_aa_in[1].v), u2f(m_a_out.v));
+ break;
+ case MF_FLOAT:
+ if ((m_mode & MODE_RTN) && OPF(code, ENCN) == 1)
+ m_cr = (m_aa_in[1].v & 0xff000000) && (~m_aa_in[1].v & 0xff000000);
+
+ m_a_out = i32_to_f32(m_aa_in[1].v);
+ LOG("slot %d stage 3 float 0x%08x == %f\n", index, m_aa_in[1].v, u2f(m_a_out.v));
+ break;
+ case MF_FIX:
+ if ((m_mode & MODE_RTN) && OPF(code, ENCN) == 1)
+ m_cr = f32_lt(m_aa_in[1], i32_to_f32(-4194304)) || f32_lt(i32_to_f32(4194304), m_aa_in[1]);
+
+ m_a_out.v = (f32_to_i32(m_aa_in[1], (m_mode & MODE_RTN) ?
+ softfloat_round_near_even : softfloat_round_min, false) << 8) >> 8;
+ LOG("slot %d stage 3 fix %f == 0x%08x\n", index, u2f(m_aa_in[1].v), m_a_out.v);
+ break;
+ case MF_FLUT:
+ // TODO: replace with lookup table
+ m_a_out = f32_div(i32_to_f32(1), m_aa_in[1]);
+ LOG("slot %d stage 3 flut %f == %f\n", index, u2f(m_aa_in[1].v), u2f(m_a_out.v));
+ break;
+ }
+ break;
+ case F_FSUBR:
+ m_a_out = f32_sub(m_ab_in[1], m_aa_in[1]);
+ LOG("slot %d stage 3 fsubr %f - %f == %f\n", index, u2f(m_ab_in[1].v), u2f(m_aa_in[1].v), u2f(m_a_out.v));
+ break;
+ case F_FSUB:
+ m_a_out = f32_sub(m_aa_in[1], m_ab_in[1]);
+ LOG("slot %d stage 3 fsub %f - %f == %f\n", index, u2f(m_aa_in[1].v), u2f(m_ab_in[1].v), u2f(m_a_out.v));
+ break;
+ case F_FADD:
+ m_a_out = f32_add(m_aa_in[1], m_ab_in[1]);
+ LOG("slot %d stage 3 fadd %f + %f == %f\n", index, u2f(m_aa_in[1].v), u2f(m_ab_in[1].v), u2f(m_a_out.v));
+ break;
+
+ case F_FMNA:
+ m_a_out = f32_add(m_m_out, m_ab_in[1]);
+ LOG("slot %d stage 3 fmna %f + %f == %f\n", index, u2f(m_m_out.v), u2f(m_ab_in[1].v), u2f(m_a_out.v));
+ break;
+ case F_FMNS:
+ m_a_out = f32_sub(m_m_out, m_ab_in[1]);
+ LOG("slot %d stage 3 fmns %f - %f == %f\n", index, u2f(m_m_out.v), u2f(m_ab_in[1].v), u2f(m_a_out.v));
+ break;
+ case F_FMAC:
+ m_a_out = f32_add(m_m_out, m_ab_in[1]);
+ LOG("slot %d stage 3 fmac %f + %f == %f\n", index, u2f(m_m_out.v), u2f(m_ab_in[1].v), u2f(m_a_out.v));
+ break;
+ }
+
+ // update condition, zero and status registers
+ if (OPF(code, F))
+ {
+ switch (OPF(code, ENCN))
+ {
+ case 1:
+ m_cr = f32_le(m_a_out, i32_to_f32(0));
+ m_zr = f32_eq(m_a_out, i32_to_f32(0));
+ break;
+ case 2:
+ m_cr = f32_lt(m_a_out, i32_to_f32(0));
+ m_zr = f32_eq(m_a_out, i32_to_f32(0));
+ break;
+ case 3:
+ m_cr = f32_eq(m_a_out, i32_to_f32(0));
+ m_zr = f32_eq(m_a_out, i32_to_f32(0));
+ break;
+ }
+
+ if ((m_mode & MODE_FXH) || !m_sr)
+ m_sr = softfloat_exceptionFlags & softfloat_flag_overflow;
+ }
+}
+
+void wtl3132_device::stage4(unsigned const index)
+{
+ u64 const code = m_slot[index];
+
+ // update C bus
+ m_c_bus_data = m_a_out;
+ m_c_bus_addr = OPF(code, CADD);
+ m_c_bus_cwen = OPF(code, CWEN);
+
+ // update temporary registers
+ switch (OPF(code, ADST))
+ {
+ case 0: m_t3 = m_a_out; LOGMASKED(LOG_REGS, "slot %d stage 4 t3 = %f\n", index, u2f(m_t3.v)); break;
+ case 1: m_t2 = m_a_out; LOGMASKED(LOG_REGS, "slot %d stage 4 t2 = %f\n", index, u2f(m_t2.v)); break;
+ case 2: m_t1 = m_a_out; LOGMASKED(LOG_REGS, "slot %d stage 4 t1 = %f\n", index, u2f(m_t1.v)); break;
+ }
+
+ // update output lines
+ if (m_cr ^ m_fpcn_state)
+ {
+ m_fpcn_state = m_cr;
+ m_fpcn_cb(m_fpcn_state);
+ }
+
+ if (m_sr ^ m_fpex_state)
+ {
+ m_fpex_state = m_sr;
+ m_fpex_cb(!(m_fpex_state ^ bool(m_mode & MODE_FXH)));
+ }
+
+ if (m_zr ^ m_zero_state)
+ {
+ m_zero_state = m_zr;
+ m_zero_cb(m_zero_state);
+ }
+}
+
+std::string wtl3132_device::disassemble(u64 const code)
+{
+ std::string alu = "";
+
+ switch (OPF(code, F))
+ {
+ case F_MISC:
+ switch (OPF(code, BADD))
+ {
+ case MF_FCLSR: alu = std::string("fclsr"); break;
+ case MF_FSTSR: alu = std::string("fstsr"); break;
+
+ case MF_FMODE: alu = util::string_format("fmode 0x%04x", (OPF(code, ABIN) << 10) | (OPF(code, CADD) << 5) | OPF(code, AADD)); break;
+ case MF_FABS: alu = util::string_format("fabs %4s, %-12s", reg(OPF(code, AADD)), adst(code)); break;
+ case MF_FLOAT: alu = util::string_format("float %4s, %-12s", reg(OPF(code, AADD)), adst(code)); break;
+ case MF_FIX: alu = util::string_format("fix %4s, %-12s", reg(OPF(code, AADD)), adst(code)); break;
+ case MF_FLUT: alu = util::string_format("flut %4s, %-4s", reg(OPF(code, AADD)), reg(OPF(code, CADD))); break;
+
+ }
+ break;
+ case F_FSUBR: alu = util::string_format("fsubr %4s, %4s, %-12s", reg(OPF(code, AADD)), abin(code), adst(code)); break;
+ case F_FSUB:
+ if (!OPF(code, CWEN) || OPF(code, ADST) != 3 || OPF(code, ENCN))
+ alu = util::string_format("fsub %4s, %4s, %-12s", reg(OPF(code, AADD)), abin(code), adst(code));
+ else
+ alu = std::string("fnop");
+ break;
+ case F_FADD:
+ if (!OPF(code, CWEN) || OPF(code, ADST) != 3 || OPF(code, ENCN) || OPF(code, ABIN) != 7)
+ alu = util::string_format("fadd %4s, %4s, %-12s", reg(OPF(code, AADD)), abin(code), adst(code));
+ else
+ alu = std::string("fnop");
+ break;
+
+ case F_FMNA: alu = util::string_format("fmna %4s, %4s, %4s, %-12s", reg(OPF(code, AADD)), mbin(code), abin(code), adst(code)); break;
+ case F_FMNS: alu = util::string_format("fmns %4s, %4s, %4s, %-12s", reg(OPF(code, AADD)), mbin(code), abin(code), adst(code)); break;
+ case F_FMAC: alu = util::string_format("fmac %4s, %4s, %4s, %-12s", reg(OPF(code, AADD)), mbin(code), abin(code), adst(code)); break;
+ }
+
+ switch (OPF(code, IOCT))
+ {
+ case 1: return util::string_format("%-38s ; floadrc %4s", alu, reg(OPF(code, DADD))); break;
+ case 2: return util::string_format("%-38s ; fstore %4s", alu, reg(OPF(code, DADD))); break;
+ case 3: return util::string_format("%-38s ; fload %4s", alu, reg(OPF(code, DADD))); break;
+ default:
+ return alu;
+ }
+}
+
+std::string wtl3132_device::reg(unsigned const reg)
+{
+ return util::string_format(".f%d", reg);
+}
+
+std::string wtl3132_device::mbin(u64 const code)
+{
+ switch (OPF(code, MBIN))
+ {
+ case 0: return util::string_format(".f%d", OPF(code, BADD));
+ case 1: return util::string_format("Cbus");
+ }
+
+ // can't happen
+ return std::string();
+}
+
+std::string wtl3132_device::abin(u64 const code)
+{
+ switch (OPF(code, ABIN))
+ {
+ case 0: return util::string_format("Cbus");
+ case 1: return util::string_format(".f%d", OPF(code, BADD));
+ case 2: return util::string_format(".t2");
+ case 3: return util::string_format(".t1");
+ case 4: return util::string_format(".t3");
+
+ case 6: return util::string_format("2");
+ case 7: return util::string_format("0");
+ }
+
+ return std::string();
+}
+
+std::string wtl3132_device::adst(u64 const code)
+{
+ switch (OPF(code, ADST))
+ {
+ case 0: return OPF(code, CWEN) ? util::string_format(".t3") : util::string_format(".f%d and .t3", OPF(code, CADD));
+ case 1: return OPF(code, CWEN) ? util::string_format(".t2") : util::string_format(".f%d and .t2", OPF(code, CADD));
+ case 2: return OPF(code, CWEN) ? util::string_format(".t1") : util::string_format(".f%d and .t1", OPF(code, CADD));
+ case 3: return OPF(code, CWEN) ? std::string() : util::string_format(".f%d", OPF(code, CADD));
+ }
+
+ // can't happen
+ return std::string();
+}
diff --git a/src/devices/machine/wtl3132.h b/src/devices/machine/wtl3132.h
new file mode 100644
index 00000000000..23bf9e17744
--- /dev/null
+++ b/src/devices/machine/wtl3132.h
@@ -0,0 +1,171 @@
+// license:BSD-3-Clause
+// copyright-holders:Patrick Mackinlay
+
+#ifndef MAME_MACHINE_WTL3132_H
+#define MAME_MACHINE_WTL3132_H
+
+#pragma once
+
+#include "softfloat3/source/include/softfloat.h"
+
+class wtl3132_device : public device_t
+{
+public:
+ wtl3132_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock);
+
+ // output lines
+ auto out_fpcn() { return m_fpcn_cb.bind(); }
+ auto out_fpex() { return m_fpex_cb.bind(); }
+ auto out_zero() { return m_zero_cb.bind(); }
+
+ // code and data ports
+ void c_port_w(u64 data) { m_c_port = data; }
+ u32 x_port_r() { return m_x_port.v; }
+ void x_port_w(u32 data) { m_x_port.v = data; }
+
+ // input lines
+ void abort_w(int state) { m_abort = state; }
+ void clk_w(int state);
+ void neut_w(int state) { m_neut = state; }
+ void stall_w(int state) { m_stall = state; }
+
+ // disassembly helpers
+ static std::string disassemble(u64 const code);
+ static std::string reg(unsigned const reg);
+ static std::string mbin(u64 const code);
+ static std::string abin(u64 const code);
+ static std::string adst(u64 const code);
+
+ enum code_mask : u64
+ {
+ // opcode is 34 bits wide
+ M_ENCN = 0x0'00000003, // condition output select
+ M_MBIN = 0x0'00000004, // mbin input select
+ M_ADST = 0x0'00000018, // alu destination select
+ M_ABIN = 0x0'000000e0, // abin input select
+ M_DADD = 0x0'00001f00, // d port register address
+ M_IOCT = 0x0'00006000, // i/o control
+ M_CWEN = 0x0'00008000, // c port write enable (active low)
+ M_CADD = 0x0'001f0000, // c port register address
+ M_BADD = 0x0'03e00000, // b port register address
+ M_AADD = 0x0'7c000000, // a port register address
+ M_F = 0x3'80000000, // function code
+
+ // internal pipeline control flag
+ M_CANCEL = 0x80000000'00000000, // cancelled
+ };
+
+ enum code_shift : unsigned
+ {
+ S_ENCN = 0, // condition output select
+ S_MBIN = 2, // mbin input select
+ S_ADST = 3, // alu destination select
+ S_ABIN = 5, // abin input select
+ S_DADD = 8, // d port register address
+ S_IOCT = 13, // i/o control
+ S_CWEN = 15, // c port write enable (active low)
+ S_CADD = 16, // c port register address
+ S_BADD = 21, // b port register address
+ S_AADD = 26, // a port register address
+ S_F = 31, // function code
+ };
+
+ enum function_code : unsigned
+ {
+ F_MISC = 0, // miscellaneous
+ F_FSUBR = 1, // negate and add
+ F_FSUB = 2, // subtract
+ F_FADD = 3, // add
+ F_FMNA = 5, // multiply, negate and add
+ F_FMNS = 6, // multiply, negate and subtract
+ F_FMAC = 7, // multiply and accumulate
+ };
+
+ enum misc_code : unsigned
+ {
+ MF_FCLSR = 0, // clear status register
+ MF_FSTSR = 1, // read status register
+ MF_FMODE = 3, // load mode register
+ MF_FABS = 4, // absolute value
+ MF_FLOAT = 5, // fixed-to-float
+ MF_FIX = 6, // float-to-fixed
+ MF_FLUT = 7, // lookup operation
+ };
+
+ enum mode_mask : u16
+ {
+ MODE_IBA = 0x0001, // internal bypass A enable
+ MODE_RTN = 0x0002, // round to nearest
+ MODE_IBP = 0x0008, // input bypass enable
+ MODE_OBP = 0x0010, // output bypass enable
+ MODE_FXO = 0x0020, // fpex overflow enable
+ MODE_CPL = 0x0040, // coprocessor load enable
+ MODE_FXH = 0x0100, // fpex active high
+ MODE_DBP = 0x0200, // double pump enable (3332 only)
+ MODE_IBB = 0x0800, // internal bypass B enable
+ MODE_YLI = 0x1000, // Y late input enable (3332 only)
+ };
+
+protected:
+ virtual void device_start() override;
+ virtual void device_reset() override;
+
+ void stage1(unsigned const index);
+ void stage2(unsigned const index);
+ void stage3(unsigned const index);
+ void stage4(unsigned const index);
+
+private:
+ devcb_write_line m_fpcn_cb;
+ devcb_write_line m_fpex_cb;
+ devcb_write_line m_zero_cb;
+
+ // output line state
+ bool m_fpcn_state;
+ bool m_fpex_state;
+ bool m_zero_state;
+
+ // port state
+ u64 m_c_port;
+ float32_t m_x_port;
+ float32_t m_x_in;
+ float32_t m_x_out;
+
+ // input line state
+ int m_abort;
+ int m_neut;
+ int m_stall;
+
+ // pipeline state
+ u64 m_slot[4];
+ unsigned m_head;
+
+ // registers
+ u16 m_mode;
+ float32_t m_f[32];
+ float32_t m_t1;
+ float32_t m_t2;
+ float32_t m_t3;
+ bool m_cr;
+ bool m_sr;
+ bool m_zr;
+
+ // C bus
+ float32_t m_c_bus_data;
+ unsigned m_c_bus_addr;
+ bool m_c_bus_cwen;
+
+ // multiplier inputs and output
+ float32_t m_ma_in;
+ float32_t m_mb_in;
+ float32_t m_m_out;
+
+ // accumulator buffers, inputs and output
+ float32_t m_aa_in[2];
+ float32_t m_ab_in[2];
+ float32_t m_a_out;
+};
+
+DECLARE_DEVICE_TYPE(WTL3132, wtl3132_device)
+
+#endif // MAME_MACHINE_WTL3132_H
diff --git a/src/devices/sound/mas3507d.cpp b/src/devices/sound/mas3507d.cpp
index 762fa4f02f1..3581176ca53 100644
--- a/src/devices/sound/mas3507d.cpp
+++ b/src/devices/sound/mas3507d.cpp
@@ -48,6 +48,7 @@ void mas3507d_device::device_reset()
mp3_count = 0;
sample_count = 0;
total_frame_count = 0;
+ buffered_frame_count = 0;
}
void mas3507d_device::i2c_scl_w(bool line)
@@ -356,8 +357,6 @@ void mas3507d_device::fill_buffer()
current_rate = mp3_info.hz;
stream->set_sample_rate(current_rate);
}
-
- total_frame_count += scount;
}
void mas3507d_device::append_buffer(stream_sample_t **outputs, int &pos, int scount)
@@ -365,6 +364,8 @@ void mas3507d_device::append_buffer(stream_sample_t **outputs, int &pos, int sco
if(!sample_count)
return;
+ buffered_frame_count = scount;
+
int s1 = scount - pos;
if(s1 > sample_count)
s1 = sample_count;
@@ -385,6 +386,7 @@ void mas3507d_device::append_buffer(stream_sample_t **outputs, int &pos, int sco
if(s1 == sample_count) {
pos += s1;
sample_count = 0;
+ total_frame_count += s1;
return;
}
@@ -395,6 +397,7 @@ void mas3507d_device::append_buffer(stream_sample_t **outputs, int &pos, int sco
pos += s1;
sample_count -= s1;
+ total_frame_count += s1;
}
void mas3507d_device::sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int csamples)
@@ -414,6 +417,7 @@ void mas3507d_device::sound_stream_update(sound_stream &stream, stream_sample_t
mp3_count = 0;
sample_count = 0;
total_frame_count = 0;
+ buffered_frame_count = 0;
for(int i=pos; i != csamples; i++) {
outputs[0][i] = 0;
diff --git a/src/devices/sound/mas3507d.h b/src/devices/sound/mas3507d.h
index 2c894acddfb..64876cb321b 100644
--- a/src/devices/sound/mas3507d.h
+++ b/src/devices/sound/mas3507d.h
@@ -22,7 +22,7 @@ public:
void i2c_scl_w(bool line);
void i2c_sda_w(bool line);
- u32 get_frame_count() const { return total_frame_count; }
+ u32 get_frame_count() const { return total_frame_count - buffered_frame_count; }
protected:
virtual void device_start() override;
@@ -41,7 +41,7 @@ private:
int i2c_bus_curbit;
uint8_t i2c_bus_curval;
int mp3_count, sample_count, current_rate;
- u32 total_frame_count;
+ u32 total_frame_count, buffered_frame_count;
mp3dec_t mp3_dec;
mp3dec_frame_info_t mp3_info;
diff --git a/src/emu/video.cpp b/src/emu/video.cpp
index 8732fa9307e..c4ade5f7948 100644
--- a/src/emu/video.cpp
+++ b/src/emu/video.cpp
@@ -1261,10 +1261,8 @@ void video_manager::create_snapshot_bitmap(screen_device *screen)
}
// get the minimum width/height and set it on the target
- s32 width = m_snap_width;
- s32 height = m_snap_height;
- if (width == 0 || height == 0)
- m_snap_target->compute_minimum_size(width, height);
+ s32 width, height;
+ compute_snapshot_size(width, height);
m_snap_target->set_bounds(width, height);
// if we don't have a bitmap, or if it's not the right size, allocate a new one
@@ -1283,6 +1281,40 @@ void video_manager::create_snapshot_bitmap(screen_device *screen)
//-------------------------------------------------
+// compute_snapshot_size - computes width and
+// height of the current snapshot target
+// accounting for OPTION_SNAPSIZE
+//-------------------------------------------------
+
+void video_manager::compute_snapshot_size(s32 &width, s32 &height)
+{
+ width = m_snap_width;
+ height = m_snap_height;
+ if (width == 0 || height == 0)
+ m_snap_target->compute_minimum_size(width, height);
+}
+
+
+//-------------------------------------------------
+// pixels - fills the specified buffer with the
+// RGB values of each pixel in the snapshot target
+//-------------------------------------------------
+
+void video_manager::pixels(u32 *buffer)
+{
+ create_snapshot_bitmap(nullptr);
+ for (int y = 0; y < m_snap_bitmap.height(); y++)
+ {
+ const u32 *src = &m_snap_bitmap.pix(y, 0);
+ for (int x = 0; x < m_snap_bitmap.width(); x++)
+ {
+ *buffer++ = *src++;
+ }
+ }
+}
+
+
+//-------------------------------------------------
// open_next - open the next non-existing file of
// type filetype according to our numbering
// scheme
diff --git a/src/emu/video.h b/src/emu/video.h
index 725107e7db2..a5f76fa81f1 100644
--- a/src/emu/video.h
+++ b/src/emu/video.h
@@ -74,6 +74,8 @@ public:
void toggle_record_mng() { toggle_record_movie(MF_MNG); }
void toggle_record_avi() { toggle_record_movie(MF_AVI); }
osd_file::error open_next(emu_file &file, const char *extension, uint32_t index = 0);
+ void compute_snapshot_size(s32 &width, s32 &height);
+ void pixels(u32 *buffer);
// render a frame
void frame_update(bool from_debugger = false);
diff --git a/src/frontend/mame/luaengine.cpp b/src/frontend/mame/luaengine.cpp
index 156d2ef0488..d77fe21bf62 100644
--- a/src/frontend/mame/luaengine.cpp
+++ b/src/frontend/mame/luaengine.cpp
@@ -1819,7 +1819,9 @@ void lua_engine::initialize()
* video:skip_this_frame() - is current frame going to be skipped
* video:speed_factor() - get speed factor
* video:speed_percent() - get percent from realtime
- * video:frame_update()
+ * video:frame_update() - render a frame
+ * video:size() - get width and height of snapshot bitmap in pixels
+ * video:pixels() - get binary bitmap of all screens as string
*
* video.frameskip - current frameskip
* video.throttled - throttle state
@@ -1848,6 +1850,22 @@ void lua_engine::initialize()
"speed_factor", &video_manager::speed_factor,
"speed_percent", &video_manager::speed_percent,
"frame_update", &video_manager::frame_update,
+ "size", [](video_manager &vm) {
+ s32 width, height;
+ vm.compute_snapshot_size(width, height);
+ return std::tuple<s32, s32>(width, height);
+ },
+ "pixels", [](video_manager &vm, sol::this_state s) {
+ lua_State *L = s;
+ luaL_Buffer buff;
+ s32 width, height;
+ vm.compute_snapshot_size(width, height);
+ int size = width * height * 4;
+ u32 *ptr = (u32 *)luaL_buffinitsize(L, &buff, size);
+ vm.pixels(ptr);
+ luaL_pushresultsize(&buff, size);
+ return sol::make_reference(L, sol::stack_reference(L, -1));
+ },
"frameskip", sol::property(&video_manager::frameskip, &video_manager::set_frameskip),
"throttled", sol::property(&video_manager::throttled, &video_manager::set_throttled),
"throttle_rate", sol::property(&video_manager::throttle_rate, &video_manager::set_throttle_rate));
@@ -1920,7 +1938,7 @@ void lua_engine::initialize()
* target:hidden() - is target hidden
* target:is_ui_target() - is ui render target
* target:index() - target index
- * target:view_name(index) - current target layout view name
+ * target:view_name([opt] index) - current target layout view name
*
* target.max_update_rate -
* target.view - current target layout view
@@ -2005,8 +2023,9 @@ void lua_engine::initialize()
* screen:height() - screen height
* screen:width() - screen width
* screen:orientation() - screen angle, flipx, flipy
- * screen:refresh() - screen refresh rate
- * screen:snapshot() - save snap shot
+ * screen:refresh() - screen refresh rate in Hz
+ * screen:refresh_attoseconds() - screen refresh rate in attoseconds
+ * screen:snapshot([opt] filename) - save snap shot
* screen:type() - screen drawing type
* screen:frame_number() - screen frame count
* screen:name() - screen device full name
@@ -2095,6 +2114,7 @@ void lua_engine::initialize()
return std::tuple<int, bool, bool>(rotation_angle, flags & ORIENTATION_FLIP_X, flags & ORIENTATION_FLIP_Y);
},
"refresh", [](screen_device &sdev) { return ATTOSECONDS_TO_HZ(sdev.refresh_attoseconds()); },
+ "refresh_attoseconds", [](screen_device &sdev) { return sdev.refresh_attoseconds(); },
"snapshot", [this](screen_device &sdev, sol::object filename) -> sol::object {
emu_file file(machine().options().snapshot_directory(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS);
osd_file::error filerr;
diff --git a/src/lib/formats/tzx_cas.cpp b/src/lib/formats/tzx_cas.cpp
index ec5d06569df..28d363df433 100644
--- a/src/lib/formats/tzx_cas.cpp
+++ b/src/lib/formats/tzx_cas.cpp
@@ -25,18 +25,6 @@ TODO:
case 0x34: Emulation info
case 0x40: Snapshot block
-Notes:
-
-TZX format specification lists
-8064 pulses for a header block and 3220 for a data block
-
-but the documentation on worldofspectrum lists
-8063 pulses for a header block and 3223 for a data block
-
-see http://www.worldofspectrum.org/faq/reference/48kreference.htm#TapeDataStructure
-
-We are currently using the numbers from the TZX specification...
-
*/
#include <assert.h>
@@ -537,7 +525,7 @@ static int tzx_cas_do_work( int16_t **buffer )
case 0x10: /* Standard Speed Data Block (.TAP block) */
pause_time = cur_block[1] + (cur_block[2] << 8);
data_size = cur_block[3] + (cur_block[4] << 8);
- pilot_length = (cur_block[5] == 0x00) ? 8064 : 3220;
+ pilot_length = (cur_block[5] < 128) ? 8063 : 3223;
size += tzx_cas_handle_block(buffer, &cur_block[5], pause_time, data_size, 2168, pilot_length, 667, 735, 855, 1710, 8);
current_block++;
break;
@@ -815,8 +803,7 @@ static int tap_cas_to_wav_size( const uint8_t *casdata, int caslen )
while (p < casdata + caslen)
{
int data_size = p[0] + (p[1] << 8);
- int pilot_length = (p[2] == 0x00) ? 8064 : 3220; /* TZX specification */
-// int pilot_length = (p[2] == 0x00) ? 8063 : 3223; /* worldofspectrum */
+ int pilot_length = (p[2] == 0x00) ? 8063 : 3223;
LOG_FORMATS("tap_cas_to_wav_size: Handling TAP block containing 0x%X bytes", data_size);
p += 2;
size += tzx_cas_handle_block(nullptr, p, 1000, data_size, 2168, pilot_length, 667, 735, 855, 1710, 8);
@@ -834,8 +821,7 @@ static int tap_cas_fill_wave( int16_t *buffer, int length, uint8_t *bytes )
while (size < length)
{
int data_size = bytes[0] + (bytes[1] << 8);
- int pilot_length = (bytes[2] == 0x00) ? 8064 : 3220; /* TZX specification */
-// int pilot_length = (bytes[2] == 0x00) ? 8063 : 3223; /* worldofspectrum */
+ int pilot_length = (bytes[2] == 0x00) ? 8063 : 3223;
LOG_FORMATS("tap_cas_fill_wave: Handling TAP block containing 0x%X bytes\n", data_size);
bytes += 2;
size += tzx_cas_handle_block(&p, bytes, 1000, data_size, 2168, pilot_length, 667, 735, 855, 1710, 8);
diff --git a/src/mame/drivers/aci_borisdpl.cpp b/src/mame/drivers/aci_borisdpl.cpp
index 4bb14c2cbdf..77cccb8fbed 100644
--- a/src/mame/drivers/aci_borisdpl.cpp
+++ b/src/mame/drivers/aci_borisdpl.cpp
@@ -20,6 +20,7 @@ as SL90259.
#include "emu.h"
#include "cpu/f8/f8.h"
#include "machine/f3853.h"
+#include "machine/sensorboard.h"
#include "video/pwm.h"
// internal artwork
@@ -200,6 +201,10 @@ void borisdpl_state::borisdpl(machine_config &config)
psu.read_b().set(FUNC(borisdpl_state::ram_address_r));
psu.write_b().set(FUNC(borisdpl_state::ram_address_w));
+ // built-in chessboard is not electronic
+ sensorboard_device &board(SENSORBOARD(config, "board").set_type(sensorboard_device::NOSENSORS));
+ board.init_cb().set("board", FUNC(sensorboard_device::preset_chess));
+
/* video hardware */
PWM_DISPLAY(config, m_display).set_size(8, 7);
m_display->set_segmask(0xff, 0x7f);
diff --git a/src/mame/drivers/aci_ggm.cpp b/src/mame/drivers/aci_ggm.cpp
index 78930f53dab..6bdbfab46fb 100644
--- a/src/mame/drivers/aci_ggm.cpp
+++ b/src/mame/drivers/aci_ggm.cpp
@@ -213,7 +213,7 @@ WRITE_LINE_MEMBER(ggm_state::shift_data_w)
WRITE8_MEMBER(ggm_state::select_w)
{
- // input mux, digit select
+ // PA0-PA7: input mux, digit select
m_inp_mux = data;
update_display();
}
diff --git a/src/mame/drivers/aci_prodigy.cpp b/src/mame/drivers/aci_prodigy.cpp
index c2e57ced24f..4601b02f337 100644
--- a/src/mame/drivers/aci_prodigy.cpp
+++ b/src/mame/drivers/aci_prodigy.cpp
@@ -5,6 +5,8 @@
Applied Concepts Destiny Prodigy
Like most other chess computers by ACI, it was also distributed by Chafitz.
+The chess engine is Morphy, which in turn is based on Sargon 2.5.
+
*******************************************************************************
PCB notes:
@@ -170,14 +172,14 @@ READ8_MEMBER(prodigy_state::input1_r)
{
u8 data = 0;
- // d0-d7: multiplexed inputs
+ // PA0-PA7: multiplexed inputs
// read chessboard sensors via 74145 Q0-Q7
if (m_select < 8)
data = m_board->read_file(m_select);
- // read keypad(low) via 74145 Q8,Q9
+ // read keypad(high) via 74145 Q8,Q9
else if (m_select == 8 || m_select == 9)
- data = m_inputs[m_select - 8]->read() & 0xff;
+ data = m_inputs[m_select - 8]->read() >> 2 & 0xff;
return ~data;
}
@@ -186,22 +188,22 @@ READ8_MEMBER(prodigy_state::input2_r)
{
u8 data = 0;
- // d4,d5: keypad(high) via 74145 Q8,Q9
+ // PB4,PB5: keypad(low) via 74145 Q8,Q9
if (m_select == 8 || m_select == 9)
- data = (m_inputs[m_select - 8]->read() >> 8 & 3) << 4;
+ data = (m_inputs[m_select - 8]->read() & 3) << 4;
- // d6: ?
+ // PB6: ?
return ~data;
}
WRITE8_MEMBER(prodigy_state::control_w)
{
- // d0-d3: 74145
+ // PB0-PB3: 74145
m_select = data & 0xf;
update_display();
- // d7: speaker out
+ // PB7: speaker out
m_dac->write(BIT(data, 7));
}
@@ -213,9 +215,10 @@ WRITE8_MEMBER(prodigy_state::control_w)
void prodigy_state::main_map(address_map &map)
{
+ map.global_mask(0x7fff);
map(0x0000, 0x07ff).ram();
map(0x2000, 0x200f).m(m_via, FUNC(via6522_device::map));
- map(0x6000, 0x7fff).mirror(0x8000).rom();
+ map(0x6000, 0x7fff).rom();
}
@@ -226,28 +229,28 @@ void prodigy_state::main_map(address_map &map)
static INPUT_PORTS_START( prodigy )
PORT_START("IN.0")
- PORT_BIT(0x001, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_D) PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("D 4 / Rook")
- PORT_BIT(0x002, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_G) PORT_CODE(KEYCODE_7) PORT_CODE(KEYCODE_7_PAD) PORT_NAME("G 7")
- PORT_BIT(0x004, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_R) PORT_NAME("Restore")
- PORT_BIT(0x008, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_DEL) PORT_CODE(KEYCODE_BACKSPACE) PORT_NAME("CE") // clear entry
- PORT_BIT(0x010, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_L) PORT_NAME("Level")
- PORT_BIT(0x020, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_X) PORT_NAME("Change Board")
- PORT_BIT(0x040, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_V) PORT_NAME("Verify")
- PORT_BIT(0x080, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_ENTER_PAD) PORT_NAME("Enter")
- PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_O) PORT_NAME("Go")
- PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_A) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("A 1 / Pawn")
+ PORT_BIT(0x001, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_O) PORT_NAME("Go")
+ PORT_BIT(0x002, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_A) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("A 1 / Pawn")
+ PORT_BIT(0x004, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_D) PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("D 4 / Rook")
+ PORT_BIT(0x008, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_G) PORT_CODE(KEYCODE_7) PORT_CODE(KEYCODE_7_PAD) PORT_NAME("G 7")
+ PORT_BIT(0x010, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_R) PORT_NAME("Restore")
+ PORT_BIT(0x020, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_DEL) PORT_CODE(KEYCODE_BACKSPACE) PORT_NAME("CE") // clear entry
+ PORT_BIT(0x040, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_L) PORT_NAME("Level")
+ PORT_BIT(0x080, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_X) PORT_NAME("Change Board")
+ PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_V) PORT_NAME("Verify")
+ PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_ENTER_PAD) PORT_NAME("Enter")
PORT_START("IN.1")
- PORT_BIT(0x001, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_E) PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("E 5 / Queen")
- PORT_BIT(0x002, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_H) PORT_CODE(KEYCODE_8) PORT_CODE(KEYCODE_8_PAD) PORT_NAME("H 8")
- PORT_BIT(0x004, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_I) PORT_NAME("Halt / Hint")
- PORT_BIT(0x008, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_S) PORT_NAME("Audio")
- PORT_BIT(0x010, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_T) PORT_NAME("Time / Number")
- PORT_BIT(0x020, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_F) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("F 6 / King")
- PORT_BIT(0x040, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_C) PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("C 3 / Bishop")
- PORT_BIT(0x080, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_W) PORT_NAME("White")
- PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_Q) PORT_NAME("Black")
- PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_B) PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("B 2 / Knight")
+ PORT_BIT(0x001, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_Q) PORT_NAME("Black")
+ PORT_BIT(0x002, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_B) PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("B 2 / Knight")
+ PORT_BIT(0x004, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_E) PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("E 5 / Queen")
+ PORT_BIT(0x008, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_H) PORT_CODE(KEYCODE_8) PORT_CODE(KEYCODE_8_PAD) PORT_NAME("H 8")
+ PORT_BIT(0x010, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_I) PORT_NAME("Halt / Hint")
+ PORT_BIT(0x020, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_U) PORT_NAME("Audio")
+ PORT_BIT(0x040, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_T) PORT_NAME("Time / Number")
+ PORT_BIT(0x080, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_F) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("F 6 / King")
+ PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_C) PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("C 3 / Bishop")
+ PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_W) PORT_NAME("White")
INPUT_PORTS_END
@@ -293,7 +296,7 @@ void prodigy_state::prodigy(machine_config &config)
ROM_START( prodigy )
ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD("007-707101", 0x6000, 0x02000, CRC(8d60345a) SHA1(fff18ff12e1b1be91f8eac1178605a682564eff2) )
+ ROM_LOAD("007-707101", 0x6000, 0x2000, CRC(8d60345a) SHA1(fff18ff12e1b1be91f8eac1178605a682564eff2) )
ROM_END
} // anonymous namespace
diff --git a/src/mame/drivers/binbug.cpp b/src/mame/drivers/binbug.cpp
index ead8f633081..d8d00b8849a 100644
--- a/src/mame/drivers/binbug.cpp
+++ b/src/mame/drivers/binbug.cpp
@@ -57,6 +57,7 @@
#include "cpu/z80/z80.h"
#include "imagedev/cassette.h"
#include "imagedev/snapquik.h"
+#include "machine/clock.h"
#include "machine/timer.h"
#include "machine/z80ctc.h"
#include "machine/z80pio.h"
@@ -72,46 +73,100 @@ public:
: driver_device(mconfig, type, tag)
, m_maincpu(*this, "maincpu")
, m_cass(*this, "cassette")
+ , m_pio(*this, "pio")
, m_p_videoram(*this, "videoram")
, m_p_attribram(*this, "attribram")
, m_p_chargen(*this, "chargen")
, m_rs232(*this, "keyboard")
- {
- }
+ , m_clock(*this, "cass_clock")
+ { }
- DECLARE_WRITE8_MEMBER(binbug_ctrl_w);
- DECLARE_READ_LINE_MEMBER(binbug_serial_r);
- DECLARE_WRITE_LINE_MEMBER(binbug_serial_w);
- DECLARE_QUICKLOAD_LOAD_MEMBER(quickload_cb);
+ void binbug_base(machine_config &config);
+ void binbug(machine_config &config);
+
+protected:
+ DECLARE_WRITE_LINE_MEMBER(kansas_w);
+ TIMER_DEVICE_CALLBACK_MEMBER(kansas_r);
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
// needed by dg680 class
required_device<cpu_device> m_maincpu; // S2650 or Z80
required_device<cassette_image_device> m_cass;
+ optional_device<z80pio_device> m_pio;
- void binbug_base(machine_config &config);
- void binbug(machine_config &config);
+ uint8_t m_framecnt;
+ u8 m_cass_data[4];
+ bool m_cassold, m_cassinbit, m_cassoutbit;
+
+private:
void binbug_data(address_map &map);
void binbug_mem(address_map &map);
-private:
- uint8_t m_framecnt;
+ DECLARE_WRITE8_MEMBER(binbug_ctrl_w);
+ DECLARE_READ_LINE_MEMBER(binbug_serial_r);
+ DECLARE_WRITE_LINE_MEMBER(binbug_serial_w);
+ DECLARE_QUICKLOAD_LOAD_MEMBER(quickload_cb);
required_shared_ptr<uint8_t> m_p_videoram;
required_shared_ptr<uint8_t> m_p_attribram;
required_region_ptr<u8> m_p_chargen;
optional_device<rs232_port_device> m_rs232;
+
+public:
+ required_device<clock_device> m_clock;
};
WRITE8_MEMBER( binbug_state::binbug_ctrl_w )
{
}
+WRITE_LINE_MEMBER( binbug_state::kansas_w )
+{
+ u8 twobit = m_cass_data[3] & 15;
+
+ if (state)
+ {
+ if (twobit == 0)
+ m_cassold = m_cassoutbit;
+
+ if (m_cassold)
+ m_cass->output(BIT(m_cass_data[3], 0) ? -1.0 : +1.0); // 2400Hz
+ else
+ m_cass->output(BIT(m_cass_data[3], 1) ? -1.0 : +1.0); // 1200Hz
+
+ m_cass_data[3]++;
+ }
+}
+
+TIMER_DEVICE_CALLBACK_MEMBER( binbug_state::kansas_r )
+{
+ // no tape - set to idle
+ m_cass_data[1]++;
+ if (m_cass_data[1] > 32)
+ {
+ m_cass_data[1] = 32;
+ m_cassinbit = 1;
+ }
+
+ /* cassette - turn 1200/2400Hz to a bit */
+ uint8_t cass_ws = (m_cass->input() > +0.04) ? 1 : 0;
+
+ if (cass_ws != m_cass_data[0])
+ {
+ m_cass_data[0] = cass_ws;
+ m_cassinbit = (m_cass_data[1] < 12) ? 1 : 0;
+ m_cass_data[1] = 0;
+ if (m_pio)
+ m_pio->pb0_w(m_cassinbit);
+ }
+}
+
READ_LINE_MEMBER( binbug_state::binbug_serial_r )
{
- return m_rs232->rxd_r() & (m_cass->input() < 0.03);
+ return m_rs232->rxd_r() & m_cassinbit;
}
WRITE_LINE_MEMBER( binbug_state::binbug_serial_w )
{
- m_cass->output(state ? -1.0 : +1.0);
+ m_cassinbit = 1;
+ m_cassoutbit = state;
}
void binbug_state::binbug_mem(address_map &map)
@@ -318,8 +373,12 @@ void binbug_state::binbug_base(machine_config &config)
/* Cassette */
CASSETTE(config, m_cass);
- m_cass->set_default_state(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED);
+ m_cass->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED);
m_cass->add_route(ALL_OUTPUTS, "mono", 0.05);
+ TIMER(config, "kansas_r").configure_periodic(FUNC(binbug_state::kansas_r), attotime::from_hz(40000));
+
+ CLOCK(config, m_clock, 4'800); // 300 baud x 16(divider) = 4800
+ m_clock->signal_handler().set(FUNC(binbug_state::kansas_w));
}
void binbug_state::binbug(machine_config &config)
@@ -422,30 +481,27 @@ class dg680_state : public binbug_state
public:
dg680_state(const machine_config &mconfig, device_type type, const char *tag)
: binbug_state(mconfig, type, tag)
- , m_ctc(*this, "z80ctc")
- , m_pio(*this, "z80pio")
+ , m_ctc(*this, "ctc")
{ }
+ void dg680(machine_config &config);
+
+private:
DECLARE_READ8_MEMBER(porta_r);
DECLARE_READ8_MEMBER(portb_r);
DECLARE_WRITE8_MEMBER(portb_w);
DECLARE_READ8_MEMBER(port08_r);
DECLARE_WRITE8_MEMBER(port08_w);
void kbd_put(u8 data);
- TIMER_DEVICE_CALLBACK_MEMBER(time_tick);
- TIMER_DEVICE_CALLBACK_MEMBER(uart_tick);
- void dg680(machine_config &config);
void dg680_io(address_map &map);
void dg680_mem(address_map &map);
-private:
uint8_t m_pio_b;
uint8_t m_term_data;
uint8_t m_protection[0x100];
virtual void machine_reset() override;
required_device<z80ctc_device> m_ctc;
- required_device<z80pio_device> m_pio;
};
void dg680_state::dg680_mem(address_map &map)
@@ -473,13 +529,14 @@ void dg680_state::dg680_io(address_map &map)
void dg680_state::machine_reset()
{
m_maincpu->set_pc(0xd000);
+ m_pio_b = 0xFF;
}
// this is a guess there is no information available
static const z80_daisy_config dg680_daisy_chain[] =
{
- { "z80ctc" },
- { "z80pio" },
+ { "ctc" },
+ { "pio" },
{ 0x00 }
};
@@ -490,6 +547,8 @@ INPUT_PORTS_END
void dg680_state::kbd_put(u8 data)
{
+ if (data == 8)
+ data = 127; // fix backspace
m_term_data = data;
/* strobe in keyboard data */
m_pio->strobe_a(0);
@@ -505,14 +564,16 @@ READ8_MEMBER( dg680_state::porta_r )
READ8_MEMBER( dg680_state::portb_r )
{
- return m_pio_b | (m_cass->input() > 0.03);
+ return m_pio_b | m_cassinbit;
}
// bit 1 = cassout; bit 2 = motor on
WRITE8_MEMBER( dg680_state::portb_w )
{
+ if (BIT(m_pio_b ^ data, 2))
+ m_cass->change_state(BIT(data, 2) ? CASSETTE_MOTOR_ENABLED : CASSETTE_MOTOR_DISABLED, CASSETTE_MASK_MOTOR);
m_pio_b = data & 0xfe;
- m_cass->output(BIT(data, 1) ? -1.0 : +1.0);
+ m_cassoutbit = BIT(data, 1);
}
READ8_MEMBER( dg680_state::port08_r )
@@ -527,26 +588,14 @@ WRITE8_MEMBER( dg680_state::port08_w )
m_protection[breg] = data;
}
-TIMER_DEVICE_CALLBACK_MEMBER(dg680_state::time_tick)
-{
-// ch0 is for the clock
- m_ctc->trg0(1);
- m_ctc->trg0(0);
-// no idea about ch2
- m_ctc->trg2(1);
- m_ctc->trg2(0);
-}
-
-TIMER_DEVICE_CALLBACK_MEMBER(dg680_state::uart_tick)
-{
-// ch3 is for cassette
- m_ctc->trg3(1);
- m_ctc->trg3(0);
-}
void dg680_state::dg680(machine_config &config)
{
binbug_base(config);
+ m_clock->signal_handler().append(m_ctc, FUNC(z80ctc_device::trg2));
+ m_clock->signal_handler().append(m_ctc, FUNC(z80ctc_device::trg3));
+
+ m_cass->set_default_state(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED);
/* basic machine hardware */
z80_device& maincpu(Z80(config, m_maincpu, XTAL(8'000'000) / 4));
@@ -559,19 +608,17 @@ void dg680_state::dg680(machine_config &config)
keyb.set_keyboard_callback(FUNC(dg680_state::kbd_put));
/* Devices */
- z80ctc_device& ctc(Z80CTC(config, "z80ctc", XTAL(8'000'000) / 4));
- ctc.intr_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0);
- ctc.zc_callback<0>().set("z80ctc", FUNC(z80ctc_device::trg1));
-
- z80pio_device& pio(Z80PIO(config, "z80pio", XTAL(8'000'000) / 4));
- pio.out_int_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0);
- pio.in_pa_callback().set(FUNC(dg680_state::porta_r));
+ Z80CTC(config, m_ctc, XTAL(8'000'000) / 4);
+ m_ctc->intr_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0);
+ m_ctc->set_clk<0>(200);
+ m_ctc->zc_callback<0>().set(m_ctc, FUNC(z80ctc_device::trg1));
+
+ Z80PIO(config, m_pio, XTAL(8'000'000) / 4);
+ m_pio->out_int_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0);
+ m_pio->in_pa_callback().set(FUNC(dg680_state::porta_r));
// OUT_ARDY - this activates to ask for kbd data but not known if actually used
- pio.in_pb_callback().set(FUNC(dg680_state::portb_r));
- pio.out_pb_callback().set(FUNC(dg680_state::portb_w));
-
- TIMER(config, "ctc0").configure_periodic(FUNC(dg680_state::time_tick), attotime::from_hz(200));
- TIMER(config, "ctc3").configure_periodic(FUNC(dg680_state::uart_tick), attotime::from_hz(4800));
+ m_pio->in_pb_callback().set(FUNC(dg680_state::portb_r));
+ m_pio->out_pb_callback().set(FUNC(dg680_state::portb_w));
}
/* ROM definition */
@@ -589,4 +636,4 @@ ROM_END
/* Driver */
// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS
-COMP( 1980, dg680, 0, 0, dg680, dg680, dg680_state, empty_init, "David Griffiths", "DG680 with DGOS-Z80 1.4", MACHINE_NOT_WORKING | MACHINE_NO_SOUND_HW )
+COMP( 1980, dg680, 0, 0, dg680, dg680, dg680_state, empty_init, "David Griffiths", "DG680 with DGOS-Z80 1.4", MACHINE_NO_SOUND_HW )
diff --git a/src/mame/drivers/cps1.cpp b/src/mame/drivers/cps1.cpp
index a0b09cb6cf1..6a44dec9869 100644
--- a/src/mame/drivers/cps1.cpp
+++ b/src/mame/drivers/cps1.cpp
@@ -3404,7 +3404,7 @@ void cps_state::cps1_10MHz(machine_config &config)
m_screen->set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_cps1);
- PALETTE(config, m_palette).set_entries(0xc00);
+ PALETTE(config, m_palette, palette_device::BLACK).set_entries(0xc00);
/* sound hardware */
SPEAKER(config, "mono").front_center();
diff --git a/src/mame/drivers/cps2.cpp b/src/mame/drivers/cps2.cpp
index 3aaf9692d1c..fe1b82cce13 100644
--- a/src/mame/drivers/cps2.cpp
+++ b/src/mame/drivers/cps2.cpp
@@ -1322,7 +1322,7 @@ void cps2_state::cps2(machine_config &config)
m_screen->set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_cps1);
- PALETTE(config, m_palette).set_entries(0xc00);
+ PALETTE(config, m_palette, palette_device::BLACK).set_entries(0xc00);
/* sound hardware */
SPEAKER(config, "lspeaker").front_left();
diff --git a/src/mame/drivers/deco32.cpp b/src/mame/drivers/deco32.cpp
index 17eeb708f81..949dbef980e 100644
--- a/src/mame/drivers/deco32.cpp
+++ b/src/mame/drivers/deco32.cpp
@@ -394,9 +394,9 @@ void captaven_state::captaven_map(address_map &map)
map(0x130000, 0x131fff).ram().w(m_palette, FUNC(palette_device::write32)).share("palette");
map(0x148000, 0x14800f).m(m_deco_irq, FUNC(deco_irq_device::map)).umask32(0x000000ff);
map(0x160000, 0x167fff).ram(); /* Extra work RAM */
- map(0x168000, 0x168000).r(FUNC(captaven_state::captaven_dsw1_r));
- map(0x168001, 0x168001).r(FUNC(captaven_state::captaven_dsw2_r));
- map(0x168002, 0x168002).r(FUNC(captaven_state::captaven_dsw3_r));
+ map(0x168000, 0x168000).lr8("dsw1_r", [this]() { return m_io_dsw[0]->read(); });
+ map(0x168001, 0x168001).lr8("dsw2_r", [this]() { return m_io_dsw[1]->read(); });
+ map(0x168002, 0x168002).lr8("dsw3_r", [this]() { return m_io_dsw[2]->read(); });
map(0x168003, 0x168003).r(FUNC(captaven_state::captaven_soundcpu_status_r));
map(0x178000, 0x178003).w(FUNC(captaven_state::pri_w));
map(0x180000, 0x18001f).rw("tilegen1", FUNC(deco16ic_device::pf_control_dword_r), FUNC(deco16ic_device::pf_control_dword_w));
@@ -418,8 +418,8 @@ void fghthist_state::fghthist_map(address_map &map)
// map(0x000000, 0x001fff).rom().w(FUNC(fghthist_state::pf1_data_w)); // wtf??
map(0x000000, 0x0fffff).rom();
map(0x100000, 0x11ffff).ram();
- map(0x120020, 0x120021).r(FUNC(fghthist_state::fghthist_in0_r));
- map(0x120024, 0x120025).r(FUNC(fghthist_state::fghthist_in1_r));
+ map(0x120020, 0x120021).lr16("in0_r", [this]() { return m_io_in[0]->read(); });
+ map(0x120024, 0x120025).lr16("in1_r", [this]() { return m_io_in[1]->read(); });
map(0x120028, 0x120028).r(FUNC(fghthist_state::eeprom_r));
map(0x12002c, 0x12002c).w(FUNC(fghthist_state::eeprom_w));
map(0x12002d, 0x12002d).w(FUNC(fghthist_state::volume_w));
@@ -475,10 +475,10 @@ void fghthist_state::fghthsta_memmap(address_map &map)
// raster effects appear to need some work on it anyway?
void dragngun_state::dragngun_map(address_map &map)
{
- map(0x0000000, 0x00fffff).rom();
+ map(0x0000000, 0x00fffff).rom().region("maincpu", 0x000000);
map(0x0100000, 0x011ffff).ram();
map(0x0120000, 0x0127fff).rw(FUNC(dragngun_state::ioprot_r), FUNC(dragngun_state::ioprot_w)).umask32(0x0000ffff);
-// map(0x01204c0, 0x01204c3) AM_WRITE(sound_w)
+// map(0x01204c0, 0x01204c3).w(FUNC(dragngun_state::sound_w));
map(0x0128000, 0x012800f).m(m_deco_irq, FUNC(deco_irq_device::map)).umask32(0x000000ff);
map(0x0130000, 0x0131fff).ram().w(FUNC(dragngun_state::buffered_palette_w)).share("paletteram");
map(0x0138000, 0x0138003).noprw(); /* Palette dma complete in bit 0x8? ack? return 0 else tight loop */
@@ -507,7 +507,7 @@ void dragngun_state::dragngun_map(address_map &map)
map(0x0220000, 0x0221fff).ram().share("spriteram"); /* Main spriteram */
map(0x0228000, 0x02283ff).ram(); //0x10 byte increments only
map(0x0230000, 0x0230003).w(FUNC(dragngun_state::spriteram_dma_w));
- map(0x0300000, 0x03fffff).rom();
+ map(0x0300000, 0x03fffff).rom().region("maincpu", 0x100000);
map(0x0400000, 0x0400000).rw("oki3", FUNC(okim6295_device::read), FUNC(okim6295_device::write));
map(0x0410000, 0x0410003).w(FUNC(dragngun_state::volume_w));
map(0x0418000, 0x0418003).w(FUNC(dragngun_state::speaker_switch_w));
@@ -531,7 +531,7 @@ void dragngun_state::lockloadu_map(address_map &map)
void dragngun_state::lockload_map(address_map &map)
{
- map(0x000000, 0x0fffff).rom();
+ map(0x000000, 0x0fffff).rom().region("maincpu", 0x000000);
map(0x100000, 0x11ffff).ram();
map(0x120000, 0x127fff).rw(FUNC(dragngun_state::ioprot_r), FUNC(dragngun_state::ioprot_w)).umask32(0x0000ffff);
map(0x128000, 0x12800f).m(m_deco_irq, FUNC(deco_irq_device::map)).umask32(0x000000ff);
@@ -558,7 +558,7 @@ void dragngun_state::lockload_map(address_map &map)
map(0x220000, 0x221fff).ram().share("spriteram"); /* Main spriteram */
map(0x228000, 0x2283ff).ram(); //0x10 byte increments only
map(0x230000, 0x230003).w(FUNC(dragngun_state::spriteram_dma_w));
- map(0x300000, 0x3fffff).rom();
+ map(0x300000, 0x3fffff).rom().region("maincpu", 0x100000);
map(0x410000, 0x410003).w(FUNC(dragngun_state::volume_w));
map(0x420000, 0x420000).rw(FUNC(dragngun_state::eeprom_r), FUNC(dragngun_state::eeprom_w));
map(0x440000, 0x440003).portr("IN2");
@@ -648,8 +648,8 @@ void deco32_state::h6280_sound_map(address_map &map)
{
map(0x000000, 0x00ffff).rom();
map(0x110000, 0x110001).rw(m_ym2151, FUNC(ym2151_device::read), FUNC(ym2151_device::write));
- map(0x120000, 0x120001).rw("oki1", FUNC(okim6295_device::read), FUNC(okim6295_device::write));
- map(0x130000, 0x130001).rw("oki2", FUNC(okim6295_device::read), FUNC(okim6295_device::write));
+ map(0x120000, 0x120001).rw(m_oki[0], FUNC(okim6295_device::read), FUNC(okim6295_device::write));
+ map(0x130000, 0x130001).rw(m_oki[1], FUNC(okim6295_device::read), FUNC(okim6295_device::write));
map(0x140000, 0x140000).r(m_ioprot, FUNC(deco_146_base_device::soundlatch_r));
map(0x1f0000, 0x1f1fff).ram();
}
@@ -666,8 +666,8 @@ void deco32_state::z80_sound_map(address_map &map)
map(0x0000, 0x7fff).rom();
map(0x8000, 0x87ff).ram();
map(0xa000, 0xa001).rw(m_ym2151, FUNC(ym2151_device::read), FUNC(ym2151_device::write));
- map(0xb000, 0xb000).rw("oki1", FUNC(okim6295_device::read), FUNC(okim6295_device::write));
- map(0xc000, 0xc000).rw("oki2", FUNC(okim6295_device::read), FUNC(okim6295_device::write));
+ map(0xb000, 0xb000).rw(m_oki[0], FUNC(okim6295_device::read), FUNC(okim6295_device::write));
+ map(0xc000, 0xc000).rw(m_oki[1], FUNC(okim6295_device::read), FUNC(okim6295_device::write));
map(0xd000, 0xd000).r(m_ioprot, FUNC(deco_146_base_device::soundlatch_r));
}
@@ -694,20 +694,20 @@ void dragngun_state::lockloadu_sound_map(address_map &map)
// PROTECTION
//**************************************************************************
-READ16_MEMBER( deco32_state::ioprot_r )
+u16 deco32_state::ioprot_r(offs_t offset)
{
- offs_t real_address = 0 + (offset *2);
+ offs_t real_address = 0 + (offset * 2);
offs_t deco146_addr = bitswap<32>(real_address, /* NC */31,30,29,28,27,26,25,24,23,22,21,20,19,18, 13,12,11,/**/ 17,16,15,14, 10,9,8, 7,6,5,4, 3,2,1,0) & 0x7fff;
- uint8_t cs = 0;
+ u8 cs = 0;
- return m_ioprot->read_data( deco146_addr, cs );
+ return m_ioprot->read_data(deco146_addr, cs);
}
-WRITE16_MEMBER( deco32_state::ioprot_w )
+void deco32_state::ioprot_w(offs_t offset, u16 data, u16 mem_mask)
{
- offs_t real_address = 0 + (offset *2);
+ offs_t real_address = 0 + (offset * 2);
offs_t deco146_addr = bitswap<32>(real_address, /* NC */31,30,29,28,27,26,25,24,23,22,21,20,19,18, 13,12,11,/**/ 17,16,15,14, 10,9,8, 7,6,5,4, 3,2,1,0) & 0x7fff;
- uint8_t cs = 0;
+ u8 cs = 0;
m_ioprot->write_data( deco146_addr, data, mem_mask, cs );
}
@@ -717,10 +717,10 @@ WRITE16_MEMBER( deco32_state::ioprot_w )
// SOUND
//**************************************************************************
-WRITE8_MEMBER( deco32_state::volume_w )
+void deco32_state::volume_w(u8 data)
{
// TODO: assume linear with a 0.0-1.0 dB scale for now
- uint8_t raw_vol = 0xff - data;
+ const u8 raw_vol = 0xff - data;
float vol_output = ((float)raw_vol) / 255.0f;
m_ym2151->set_output_gain(ALL_OUTPUTS, vol_output);
@@ -728,7 +728,7 @@ WRITE8_MEMBER( deco32_state::volume_w )
m_oki[1]->set_output_gain(ALL_OUTPUTS, vol_output);
}
-READ8_MEMBER( captaven_state::captaven_soundcpu_status_r )
+u8 captaven_state::captaven_soundcpu_status_r()
{
// 7------- sound cpu status (0 = busy)
// -6543210 unknown
@@ -736,7 +736,7 @@ READ8_MEMBER( captaven_state::captaven_soundcpu_status_r )
return 0xff;
}
-WRITE32_MEMBER( dragngun_state::volume_w )
+void dragngun_state::volume_w(u32 data)
{
m_vol_main->ce_w(BIT(data, 2));
m_vol_main->clk_w(BIT(data, 1));
@@ -750,7 +750,7 @@ WRITE32_MEMBER( dragngun_state::volume_w )
}
}
-WRITE32_MEMBER( dragngun_state::speaker_switch_w )
+void dragngun_state::speaker_switch_w(u32 data)
{
// TODO: This should switch the oki3 output between the gun speaker and the standard speakers
m_gun_speaker_disabled = bool(BIT(data, 0));
@@ -788,20 +788,20 @@ WRITE_LINE_MEMBER( nslasher_state::tattass_sound_irq_w )
{
if (state)
{
- uint8_t data = m_ioprot->soundlatch_r();
+ u8 data = m_ioprot->soundlatch_r();
// Swap bits 0 and 3 to correct for design error from BSMT schematic
data = bitswap<8>(data, 7, 6, 5, 4, 0, 2, 1, 3);
m_decobsmt->bsmt_comms_w(data);
}
}
-WRITE8_MEMBER( deco32_state::sound_bankswitch_w )
+void deco32_state::sound_bankswitch_w(u8 data)
{
m_oki[0]->set_rom_bank((data >> 0) & 1);
m_oki[1]->set_rom_bank((data >> 1) & 1);
}
-WRITE8_MEMBER( dragngun_state::lockload_okibank_lo_w )
+void dragngun_state::lockload_okibank_lo_w(u8 data)
{
m_oki2_bank = (m_oki2_bank & 2) | ((data >> 1) & 1);
logerror("Load OKI2 Bank Low bits: %02x, Current : %02x\n",(data >> 1) & 1, m_oki2_bank);
@@ -809,7 +809,7 @@ WRITE8_MEMBER( dragngun_state::lockload_okibank_lo_w )
m_oki[1]->set_rom_bank(m_oki2_bank);
}
-WRITE8_MEMBER( dragngun_state::lockload_okibank_hi_w )
+void dragngun_state::lockload_okibank_hi_w(u8 data)
{
m_oki2_bank = (m_oki2_bank & 1) | ((data & 1) << 1); // TODO : Actually value unverified
logerror("Load OKI2 Bank Hi bits: %02x, Current : %02x\n",((data & 1) << 1), m_oki2_bank);
@@ -821,19 +821,19 @@ WRITE8_MEMBER( dragngun_state::lockload_okibank_hi_w )
// VIDEO
//**************************************************************************
-WRITE32_MEMBER( deco32_state::vblank_ack_w )
+void deco32_state::vblank_ack_w(u32 data)
{
m_maincpu->set_input_line(ARM_IRQ_LINE, CLEAR_LINE);
}
template<int Chip>
-READ32_MEMBER(deco32_state::spriteram_r)
+u32 deco32_state::spriteram_r(offs_t offset)
{
return m_spriteram16[Chip][offset] ^ 0xffff0000;
}
template<int Chip>
-WRITE32_MEMBER(deco32_state::spriteram_w)
+void deco32_state::spriteram_w(offs_t offset, u32 data, u32 mem_mask)
{
data &= 0x0000ffff;
mem_mask &= 0x0000ffff;
@@ -841,15 +841,15 @@ WRITE32_MEMBER(deco32_state::spriteram_w)
}
template<int Chip>
-WRITE32_MEMBER(deco32_state::buffer_spriteram_w)
+void deco32_state::buffer_spriteram_w(u32 data)
{
std::copy(&m_spriteram16[Chip][0], &m_spriteram16[Chip][0x2000/4], &m_spriteram16_buffered[Chip][0]);
}
// tattass tests these as 32-bit ram, even if only 16-bits are hooked up to the tilemap chip - does it mirror parts of the dword?
-template <int TileMap> WRITE32_MEMBER( deco32_state::pf_rowscroll_w ) { COMBINE_DATA(&m_pf_rowscroll32[TileMap][offset]); data &= 0x0000ffff; mem_mask &= 0x0000ffff; COMBINE_DATA(&m_pf_rowscroll[TileMap][offset]); }
+template <int TileMap> void deco32_state::pf_rowscroll_w(offs_t offset, u32 data, u32 mem_mask) { COMBINE_DATA(&m_pf_rowscroll32[TileMap][offset]); data &= 0x0000ffff; mem_mask &= 0x0000ffff; COMBINE_DATA(&m_pf_rowscroll[TileMap][offset]); }
-READ32_MEMBER( dragngun_state::unk_video_r)
+u32 dragngun_state::unk_video_r()
{
return machine().rand();
}
@@ -906,60 +906,53 @@ DECO16IC_BANK_CB_MEMBER( nslasher_state::bank_callback )
// INPUTS
//**************************************************************************
-READ8_MEMBER( captaven_state::captaven_dsw1_r ) { return ioport("DSW1")->read(); }
-READ8_MEMBER( captaven_state::captaven_dsw2_r ) { return ioport("DSW2")->read(); }
-READ8_MEMBER( captaven_state::captaven_dsw3_r ) { return ioport("DSW3")->read(); }
-
-READ16_MEMBER( fghthist_state::fghthist_in0_r ) { return ioport("IN0")->read(); }
-READ16_MEMBER( fghthist_state::fghthist_in1_r ) { return ioport("IN1")->read(); }
-
// TODO: probably clears both player 1 and player 2
-WRITE32_MEMBER( dragngun_state::gun_irq_ack_w )
+void dragngun_state::gun_irq_ack_w(u32 data)
{
m_deco_irq->lightgun_irq_ack_w(data);
}
// TODO: improve this, Y axis not understood at all
-READ32_MEMBER( dragngun_state::lockload_gun_mirror_r )
+u32 dragngun_state::lockload_gun_mirror_r(offs_t offset)
{
//logerror("%08x:Read gun %d\n",m_maincpu->pc(),offset);
- switch(offset)
+ switch (offset)
{
case 0:
- return ((ioport("INPUTS")->read() & 0x30) << 5) | (ioport("LIGHT0_X")->read()) | 0xffff800;
+ return ((m_io_inputs->read() & 0x30) << 5) | (m_io_light_x[0]->read()) | 0xffff800;
case 1:
- return ((ioport("INPUTS")->read() & 0x3000) >> 3) | (ioport("LIGHT1_X")->read()) | 0xffff800;
+ return ((m_io_inputs->read() & 0x3000) >> 3) | (m_io_light_x[1]->read()) | 0xffff800;
}
return ~0;
}
-READ32_MEMBER( dragngun_state::lightgun_r )
+u32 dragngun_state::lightgun_r()
{
/* Ports 0-3 are read, but seem unused */
switch (m_lightgun_port)
{
- case 4: return ioport("LIGHT0_X")->read();
- case 5: return ioport("LIGHT1_X")->read();
- case 6: return ioport("LIGHT0_Y")->read();
- case 7: return ioport("LIGHT1_Y")->read();
+ case 4: return m_io_light_x[0]->read();
+ case 5: return m_io_light_x[1]->read();
+ case 6: return m_io_light_y[0]->read();
+ case 7: return m_io_light_y[1]->read();
}
// logerror("Illegal lightgun port %d read \n",m_lightgun_port);
return 0;
}
-WRITE32_MEMBER( dragngun_state::lightgun_w )
+void dragngun_state::lightgun_w(offs_t offset, u32 data)
{
// logerror("Lightgun port %d\n",m_lightgun_port);
- m_lightgun_port=offset;
+ m_lightgun_port = offset;
}
INPUT_CHANGED_MEMBER( dragngun_state::lockload_gun_trigger )
{
- switch ((uint8_t)(uintptr_t)param)
+ switch ((u8)(uintptr_t)param)
{
case 0: m_deco_irq->lightgun1_trigger_w(!newval); break;
case 1: m_deco_irq->lightgun2_trigger_w(!newval); break;
@@ -971,12 +964,12 @@ INPUT_CHANGED_MEMBER( dragngun_state::lockload_gun_trigger )
// EEPROM
//**************************************************************************
-READ8_MEMBER( deco32_state::eeprom_r )
+u8 deco32_state::eeprom_r()
{
return 0xfe | m_eeprom->do_read();
}
-WRITE8_MEMBER( deco32_state::eeprom_w )
+void deco32_state::eeprom_w(u8 data)
{
// 7------- unknown
// -6------ eeprom cs
@@ -993,7 +986,7 @@ WRITE8_MEMBER( deco32_state::eeprom_w )
pri_w(data & 0x03);
}
-WRITE8_MEMBER( dragngun_state::eeprom_w )
+void dragngun_state::eeprom_w(u8 data)
{
// 76543--- unknown
// -----2-- eeprom cs
@@ -1005,7 +998,7 @@ WRITE8_MEMBER( dragngun_state::eeprom_w )
m_eeprom->cs_write(BIT(data, 2) ? ASSERT_LINE : CLEAR_LINE);
}
-WRITE32_MEMBER( nslasher_state::tattass_control_w )
+void nslasher_state::tattass_control_w(offs_t offset, u32 data, u32 mem_mask)
{
/* Eprom in low byte */
if (ACCESSING_BITS_0_7)
@@ -1034,9 +1027,8 @@ WRITE32_MEMBER( nslasher_state::tattass_control_w )
{
if (m_buf_ptr)
{
- int i;
logerror("Eprom reset (bit count %d): ", m_read_bit_count);
- for (i = 0; i < m_buf_ptr; i++)
+ for (int i = 0; i < m_buf_ptr; i++)
logerror("%s", BIT(m_buffer, m_buf_ptr - 1 - i) ? "1" : "0");
logerror("\n");
@@ -1058,10 +1050,10 @@ WRITE32_MEMBER( nslasher_state::tattass_control_w )
/* Handle pending read */
if (m_pending_command == 1)
{
- int d = m_read_bit_count >> 3;
- int m = 7 - (m_read_bit_count & 0x7);
- int a = (m_byte_addr + d) & 0x3ff;
- int b = m_eeprom->internal_read(a);
+ const int d = m_read_bit_count >> 3;
+ const int m = 7 - (m_read_bit_count & 0x7);
+ const int a = (m_byte_addr + d) & 0x3ff;
+ const int b = m_eeprom->internal_read(a);
m_tattass_eprom_bit = (b >> m) & 1;
@@ -1113,7 +1105,8 @@ WRITE32_MEMBER( nslasher_state::tattass_control_w )
}
else
{
- if (!(BIT(data, 6))) {
+ if (!(BIT(data, 6)))
+ {
logerror("Cs set low\n");
m_buf_ptr = 0;
}
@@ -1144,7 +1137,7 @@ WRITE32_MEMBER( nslasher_state::tattass_control_w )
//logerror("%08x: %08x data\n",data,mem_mask);
}
-READ16_MEMBER( nslasher_state::port_b_tattass )
+u16 nslasher_state::port_b_tattass()
{
return m_tattass_eprom_bit;
}
@@ -1154,18 +1147,18 @@ READ16_MEMBER( nslasher_state::port_b_tattass )
// MACHINE
//**************************************************************************
-READ32_MEMBER( fghthist_state::unk_status_r )
+u32 fghthist_state::unk_status_r()
{
// bit 3 needs to be 0
return 0xfffffff7;
}
-READ16_MEMBER( nslasher_state::nslasher_debug_r )
+u16 nslasher_state::nslasher_debug_r()
{
return 0xffff;
}
-READ32_MEMBER( captaven_state::_71_r )
+u32 captaven_state::_71_r()
{
/* Bit 0x80 goes high when sprite DMA is complete, and low
while it's in progress, we don't bother to emulate it */
@@ -1178,12 +1171,12 @@ void captaven_state::init_captaven()
deco56_decrypt_gfx(machine(), "gfx2");
}
-extern void process_dvi_data(device_t *device,uint8_t* dvi_data, int offset, int regionsize);
+extern void process_dvi_data(device_t *device,u8* dvi_data, int offset, int regionsize);
void dragngun_state::dragngun_init_common()
{
- const uint8_t *SRC_RAM = memregion("gfx1")->base();
- uint8_t *DST_RAM = memregion("gfx2")->base();
+ const u8 *SRC_RAM = memregion("gfx1")->base();
+ u8 *DST_RAM = memregion("gfx2")->base();
deco74_decrypt_gfx(machine(), "gfx1");
deco74_decrypt_gfx(machine(), "gfx2");
@@ -1194,7 +1187,7 @@ void dragngun_state::dragngun_init_common()
#if 0
{
- uint8_t *ROM = memregion("dvi")->base();
+ u8 *ROM = memregion("dvi")->base();
FILE *fp;
char filename[256];
@@ -1222,16 +1215,16 @@ void dragngun_state::init_dragngun()
{
dragngun_init_common();
- uint32_t *ROM = (uint32_t *)memregion("maincpu")->base();
- ROM[0x1b32c/4]=0xe1a00000; // bl $ee000: NOP test switch lock
+ u32 *ROM = (u32 *)memregion("maincpu")->base();
+ ROM[0x01b32c/4] = 0xe1a00000; // bl $ee000: NOP test switch lock
}
void dragngun_state::init_dragngunj()
{
dragngun_init_common();
- uint32_t *ROM = (uint32_t *)memregion("maincpu")->base();
- ROM[0x1a1b4/4]=0xe1a00000; // bl $ee000: NOP test switch lock
+ u32 *ROM = (u32 *)memregion("maincpu")->base();
+ ROM[0x01a1b4/4] = 0xe1a00000; // bl $ee000: NOP test switch lock
}
void fghthist_state::init_fghthist()
@@ -1242,23 +1235,23 @@ void fghthist_state::init_fghthist()
void dragngun_state::init_lockload()
{
-// uint32_t *ROM = (uint32_t *)memregion("maincpu")->base();
+// u32 *ROM = (u32 *)memregion("maincpu")->base();
deco74_decrypt_gfx(machine(), "gfx1");
deco74_decrypt_gfx(machine(), "gfx2");
deco74_decrypt_gfx(machine(), "gfx3");
-// ROM[0x3fe3c0/4]=0xe1a00000;// NOP test switch lock
-// ROM[0x3fe3cc/4]=0xe1a00000;// NOP test switch lock
-// ROM[0x3fe40c/4]=0xe1a00000;// NOP test switch lock
+// ROM[0x1fe3c0/4] = 0xe1a00000;// NOP test switch lock
+// ROM[0x1fe3cc/4] = 0xe1a00000;// NOP test switch lock
+// ROM[0x1fe40c/4] = 0xe1a00000;// NOP test switch lock
save_item(NAME(m_oki2_bank));
}
void nslasher_state::init_tattass()
{
- uint8_t *RAM = memregion("gfx1")->base();
- std::vector<uint8_t> tmp(0x80000);
+ u8 *RAM = memregion("gfx1")->base();
+ std::vector<u8> tmp(0x80000);
/* Reorder bitplanes to make decoding easier */
std::copy(&RAM[0x080000], &RAM[0x100000], tmp.begin());
@@ -1284,8 +1277,8 @@ void nslasher_state::init_tattass()
void nslasher_state::init_nslasher()
{
- uint8_t *RAM = memregion("gfx1")->base();
- std::vector<uint8_t> tmp(0x80000);
+ u8 *RAM = memregion("gfx1")->base();
+ std::vector<u8> tmp(0x80000);
/* Reorder bitplanes to make decoding easier */
std::copy(&RAM[0x080000], &RAM[0x100000], tmp.begin());
@@ -2844,15 +2837,15 @@ ROM_START( captavenj ) /* DE-0351-x PCB (x=3 or 4) */
ROM_END
ROM_START( dragngun )
- ROM_REGION(0x400000, "maincpu", 0 ) /* ARM 32 bit code */
+ ROM_REGION(0x200000, "maincpu", 0 ) /* ARM 32 bit code */
ROM_LOAD32_BYTE( "kb02.a9", 0x000000, 0x40000, CRC(4fb9cfea) SHA1(e20fbae32682fc5fdc82070d2d6c73b5b7ac13f8) )
ROM_LOAD32_BYTE( "kb06.c9", 0x000001, 0x40000, CRC(2395efec) SHA1(3c08299a6cdeebf9d3d5d367ab435eec76986194) )
ROM_LOAD32_BYTE( "kb00.a5", 0x000002, 0x40000, CRC(1539ff35) SHA1(6c82fe01f5ebf5cdd3a914cc823499fa6a26f9a9) )
ROM_LOAD32_BYTE( "kb04.c5", 0x000003, 0x40000, CRC(5b5c1ec2) SHA1(3c5c02b7e432cf1861e0c8db23b302dc47774a42) )
- ROM_LOAD32_BYTE( "kb03.a10", 0x300000, 0x40000, CRC(6c6a4f42) SHA1(ae96fe81f9ba587eb3194dbffa0233413d63c4c6) )
- ROM_LOAD32_BYTE( "kb07.c10", 0x300001, 0x40000, CRC(2637e8a1) SHA1(7bcd1b1f3a4e6aaa0a3b78ca77dc666948c87547) )
- ROM_LOAD32_BYTE( "kb01.a7", 0x300002, 0x40000, CRC(d780ba8d) SHA1(0e315c718c038962b6020945b48bcc632de6f5e1) )
- ROM_LOAD32_BYTE( "kb05.c7", 0x300003, 0x40000, CRC(fbad737b) SHA1(04e16abe8c4cec4f172bea29516535511db9db90) )
+ ROM_LOAD32_BYTE( "kb03.a10", 0x100000, 0x40000, CRC(6c6a4f42) SHA1(ae96fe81f9ba587eb3194dbffa0233413d63c4c6) )
+ ROM_LOAD32_BYTE( "kb07.c10", 0x100001, 0x40000, CRC(2637e8a1) SHA1(7bcd1b1f3a4e6aaa0a3b78ca77dc666948c87547) )
+ ROM_LOAD32_BYTE( "kb01.a7", 0x100002, 0x40000, CRC(d780ba8d) SHA1(0e315c718c038962b6020945b48bcc632de6f5e1) )
+ ROM_LOAD32_BYTE( "kb05.c7", 0x100003, 0x40000, CRC(fbad737b) SHA1(04e16abe8c4cec4f172bea29516535511db9db90) )
ROM_REGION(0x10000, "audiocpu", 0 ) /* Sound CPU */
ROM_LOAD( "kb10.n25", 0x00000, 0x10000, CRC(ec56f560) SHA1(feb9491683ba7f1000edebb568d6b3471fcc87fb) )
@@ -2924,15 +2917,15 @@ ROM_START( dragngun )
ROM_END
ROM_START( dragngunj )
- ROM_REGION(0x400000, "maincpu", 0 ) /* ARM 32 bit code */
+ ROM_REGION(0x200000, "maincpu", 0 ) /* ARM 32 bit code */
ROM_LOAD32_BYTE( "ka-02.a9", 0x000000, 0x40000, CRC(402a03f9) SHA1(cdd5da9e35191bd716eb6245360702adb6078a94) )
ROM_LOAD32_BYTE( "ka-06.c9", 0x000001, 0x40000, CRC(26822853) SHA1(8a9e61c9ac9a5aa4b21f063f700acfebac8d408b) )
ROM_LOAD32_BYTE( "ka-00.a5", 0x000002, 0x40000, CRC(cc9e321b) SHA1(591d5f13a558960dbf286ca4541be0e42b234f2f) )
ROM_LOAD32_BYTE( "ka-04.c5", 0x000003, 0x40000, CRC(5fd9d935) SHA1(8fd87b05325fae84860bbf1e169a3946f3197307) )
- ROM_LOAD32_BYTE( "ka-03.a10", 0x300000, 0x40000, CRC(e213c859) SHA1(aa0610427bbaa22da7f44289fdf9baf37b636710) )
- ROM_LOAD32_BYTE( "ka-07.c10", 0x300001, 0x40000, CRC(f34c54eb) SHA1(6b67cdb1d2dcc272de96292254914a212ff351cd) )
- ROM_LOAD32_BYTE( "ka-01.a7", 0x300002, 0x40000, CRC(1b52364c) SHA1(151365adc26bc7d71a4d2fc73bca598d3aa09f81) )
- ROM_LOAD32_BYTE( "ka-05.c7", 0x300003, 0x40000, CRC(4c975f52) SHA1(3c6b287c77a049e3f8822ed9d545733e8ea3357b) )
+ ROM_LOAD32_BYTE( "ka-03.a10", 0x100000, 0x40000, CRC(e213c859) SHA1(aa0610427bbaa22da7f44289fdf9baf37b636710) )
+ ROM_LOAD32_BYTE( "ka-07.c10", 0x100001, 0x40000, CRC(f34c54eb) SHA1(6b67cdb1d2dcc272de96292254914a212ff351cd) )
+ ROM_LOAD32_BYTE( "ka-01.a7", 0x100002, 0x40000, CRC(1b52364c) SHA1(151365adc26bc7d71a4d2fc73bca598d3aa09f81) )
+ ROM_LOAD32_BYTE( "ka-05.c7", 0x100003, 0x40000, CRC(4c975f52) SHA1(3c6b287c77a049e3f8822ed9d545733e8ea3357b) )
ROM_REGION(0x10000, "audiocpu", 0 ) /* Sound CPU */
ROM_LOAD( "ka-10.n25", 0x00000, 0x10000, CRC(ec56f560) SHA1(feb9491683ba7f1000edebb568d6b3471fcc87fb) )
@@ -3347,15 +3340,11 @@ ROM_START( fghthistjb ) /* DE-0380-1 PCB */
ROM_END
ROM_START( lockload ) /* Board No. DE-0420-1 + Bottom board DE-0421-0 slightly different hardware, a unique PCB and not a Dragongun conversion */
- ROM_REGION(0x400000, "maincpu", 0 ) /* ARM 32 bit code */
- ROM_LOAD32_BYTE( "nl-00-1.a6", 0x000002, 0x40000, CRC(7a39bf8d) SHA1(8b1a6407bab74b3960a243a6c04c0005a82126f1) )
- ROM_CONTINUE( 0x300002, 0x40000 )
- ROM_LOAD32_BYTE( "nl-01-1.a8", 0x000000, 0x40000, CRC(d23afcb7) SHA1(de7b5bc936a87cc6511d588b0bf082bbf745581c) )
- ROM_CONTINUE( 0x300000, 0x40000 )
- ROM_LOAD32_BYTE( "nl-02-1.d6", 0x000003, 0x40000, CRC(730e0168) SHA1(fdfa0d335c03c2c528326f90948e642f9ea43150) )
- ROM_CONTINUE( 0x300003, 0x40000 )
- ROM_LOAD32_BYTE( "nl-03-1.d8", 0x000001, 0x40000, CRC(51a53ece) SHA1(ee2c8858844a47fa1e83c30c06d78cf49219dc33) )
- ROM_CONTINUE( 0x300001, 0x40000 )
+ ROM_REGION(0x200000, "maincpu", 0 ) /* ARM 32 bit code */
+ ROM_LOAD32_BYTE( "nl-00-1.a6", 0x000002, 0x80000, CRC(7a39bf8d) SHA1(8b1a6407bab74b3960a243a6c04c0005a82126f1) )
+ ROM_LOAD32_BYTE( "nl-01-1.a8", 0x000000, 0x80000, CRC(d23afcb7) SHA1(de7b5bc936a87cc6511d588b0bf082bbf745581c) )
+ ROM_LOAD32_BYTE( "nl-02-1.d6", 0x000003, 0x80000, CRC(730e0168) SHA1(fdfa0d335c03c2c528326f90948e642f9ea43150) )
+ ROM_LOAD32_BYTE( "nl-03-1.d8", 0x000001, 0x80000, CRC(51a53ece) SHA1(ee2c8858844a47fa1e83c30c06d78cf49219dc33) )
ROM_REGION(0x10000, "audiocpu", 0 ) /* Sound CPU */
ROM_LOAD( "nm-06-.p22", 0x00000, 0x10000, CRC(31d1c245) SHA1(326e35e7ebd8ea761d90e856c50d86512327f2a5) )
@@ -3420,15 +3409,11 @@ ROM_START( lockload ) /* Board No. DE-0420-1 + Bottom board DE-0421-0 slightly d
ROM_END
ROM_START( gunhard ) /* Board No. DE-0420-1 + Bottom board DE-0421-0 slightly different hardware, a unique PCB and not a Dragongun conversion */
- ROM_REGION(0x400000, "maincpu", 0 ) /* ARM 32 bit code */
- ROM_LOAD32_BYTE( "nf-00-1.a6", 0x000002, 0x40000, CRC(2c8045d4) SHA1(4c900951d56bd22e30905969b8eb687d9b4363bd) )
- ROM_CONTINUE( 0x300002, 0x40000 )
- ROM_LOAD32_BYTE( "nf-01-1.a8", 0x000000, 0x40000, CRC(6f160117) SHA1(05738f61890e9d6d2b25330958c0e7369f2ff4a6) )
- ROM_CONTINUE( 0x300000, 0x40000 )
- ROM_LOAD32_BYTE( "nf-02-1.d6", 0x000003, 0x40000, CRC(bd353948) SHA1(ddcc12b3d1c8919eb7eb961d61f6286e6b37a58e) )
- ROM_CONTINUE( 0x300003, 0x40000 )
- ROM_LOAD32_BYTE( "nf-03-1.d8", 0x000001, 0x40000, CRC(118a9a72) SHA1(e0b2fd21f477e531d6a04256767874f13e031a48) )
- ROM_CONTINUE( 0x300001, 0x40000 )
+ ROM_REGION(0x200000, "maincpu", 0 ) /* ARM 32 bit code */
+ ROM_LOAD32_BYTE( "nf-00-1.a6", 0x000002, 0x80000, CRC(2c8045d4) SHA1(4c900951d56bd22e30905969b8eb687d9b4363bd) )
+ ROM_LOAD32_BYTE( "nf-01-1.a8", 0x000000, 0x80000, CRC(6f160117) SHA1(05738f61890e9d6d2b25330958c0e7369f2ff4a6) )
+ ROM_LOAD32_BYTE( "nf-02-1.d6", 0x000003, 0x80000, CRC(bd353948) SHA1(ddcc12b3d1c8919eb7eb961d61f6286e6b37a58e) )
+ ROM_LOAD32_BYTE( "nf-03-1.d8", 0x000001, 0x80000, CRC(118a9a72) SHA1(e0b2fd21f477e531d6a04256767874f13e031a48) )
ROM_REGION(0x10000, "audiocpu", 0 ) /* Sound CPU */
ROM_LOAD( "nj-06-1.p22", 0x00000, 0x10000, CRC(31d1c245) SHA1(326e35e7ebd8ea761d90e856c50d86512327f2a5) )
@@ -3493,15 +3478,11 @@ ROM_START( gunhard ) /* Board No. DE-0420-1 + Bottom board DE-0421-0 slightly di
ROM_END
ROM_START( lockloadu ) /* Board No. DE-0359-2 + Bottom board DE-0360-4, a Dragongun conversion */
- ROM_REGION(0x400000, "maincpu", 0 ) /* ARM 32 bit code */
- ROM_LOAD32_BYTE( "nh-00-0.b5", 0x000002, 0x40000, CRC(b8a57164) SHA1(b700a08db2ad1aa1bf0a32635ffbd5d3f08713ee) )
- ROM_CONTINUE( 0x300002, 0x40000 )
- ROM_LOAD32_BYTE( "nh-01-0.b8", 0x000000, 0x40000, CRC(e371ac50) SHA1(c448b54bc8962844b490994607b21b0c806d7714) )
- ROM_CONTINUE( 0x300000, 0x40000 )
- ROM_LOAD32_BYTE( "nh-02-0.d5", 0x000003, 0x40000, CRC(3e361e82) SHA1(b5445d44f2a775c141fdc561d5489234c39445a4) )
- ROM_CONTINUE( 0x300003, 0x40000 )
- ROM_LOAD32_BYTE( "nh-03-0.d8", 0x000001, 0x40000, CRC(d08ee9c3) SHA1(9a85710a11940df047e83e8d5977a23d6c67d665) )
- ROM_CONTINUE( 0x300001, 0x40000 )
+ ROM_REGION(0x200000, "maincpu", 0 ) /* ARM 32 bit code */
+ ROM_LOAD32_BYTE( "nh-00-0.b5", 0x000002, 0x80000, CRC(b8a57164) SHA1(b700a08db2ad1aa1bf0a32635ffbd5d3f08713ee) )
+ ROM_LOAD32_BYTE( "nh-01-0.b8", 0x000000, 0x80000, CRC(e371ac50) SHA1(c448b54bc8962844b490994607b21b0c806d7714) )
+ ROM_LOAD32_BYTE( "nh-02-0.d5", 0x000003, 0x80000, CRC(3e361e82) SHA1(b5445d44f2a775c141fdc561d5489234c39445a4) )
+ ROM_LOAD32_BYTE( "nh-03-0.d8", 0x000001, 0x80000, CRC(d08ee9c3) SHA1(9a85710a11940df047e83e8d5977a23d6c67d665) )
ROM_REGION(0x10000, "audiocpu", 0 ) /* Sound CPU */
ROM_LOAD( "nh-06-0.n25", 0x00000, 0x10000, CRC(7a1af51d) SHA1(54e6b16d3f5b787d3c6eb7203d8854e6e0fb9803) )
diff --git a/src/mame/drivers/equites.cpp b/src/mame/drivers/equites.cpp
index 7b07c03e707..3e3c6839c37 100644
--- a/src/mame/drivers/equites.cpp
+++ b/src/mame/drivers/equites.cpp
@@ -1036,7 +1036,7 @@ static const char *const alphamc07_sample_names[] =
#define MSM5232_BASE_VOLUME 1.0
-// the sound board is the same in all games but clsunk
+// the sound board is the same in all games but bngotime
void equites_state::common_sound(machine_config &config)
{
I8085A(config, m_audiocpu, 6.144_MHz_XTAL); /* verified on pcb */
@@ -1201,7 +1201,7 @@ void gekisou_state::gekisou(machine_config &config)
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
}
-void gekisou_state::clsunk(machine_config &config)
+void gekisou_state::bngotime(machine_config &config)
{
gekisou(config);
@@ -1962,7 +1962,7 @@ Sound:AY-3-8910A (unpopulated: another 8910 and a YM2203)
OSC :6.000MHz
*/
-ROM_START( clsunk )
+ROM_START( bngotime )
ROM_REGION( 0x10000, "maincpu", 0 ) // 68000 ROMs
ROM_LOAD16_BYTE( "1.b15", 0x00001, 0x4000, CRC(34a27f5c) SHA1(d30ac37d8665ccc92f6a10f6b0f55783096df687) )
ROM_LOAD16_BYTE( "0.d15", 0x00000, 0x4000, CRC(21c738ee) SHA1(8c14265fe1ea44945555b37cb13ff6b72c747053) )
@@ -2048,7 +2048,7 @@ GAME( 1984, bullfgtr, 0, equites, bullfgtr, equites_state, init_equite
GAME( 1984, bullfgtrs, bullfgtr, equites, bullfgtr, equites_state, init_equites, ROT90, "Alpha Denshi Co. (Sega license)", "Bull Fighter (Sega)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
GAME( 1985, kouyakyu, 0, equites, kouyakyu, equites_state, init_equites, ROT0, "Alpha Denshi Co.", "The Koukou Yakyuu", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
GAME( 1985, gekisou, 0, gekisou, gekisou, gekisou_state, init_equites, ROT90, "Eastern Corp.", "Gekisou (Japan)", MACHINE_UNEMULATED_PROTECTION | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
-GAME( 1986, clsunk, 0, clsunk, gekisou, gekisou_state, init_equites, ROT90, "CLS?", "unknown CLS bingo game", MACHINE_NOT_WORKING | MACHINE_UNEMULATED_PROTECTION | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) // 8505 MCU isn't dumped
+GAME( 1986, bngotime, 0, bngotime, gekisou, gekisou_state, init_equites, ROT90, "CLS", "Bingo Time", MACHINE_NOT_WORKING | MACHINE_UNEMULATED_PROTECTION | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) // 8505 MCU isn't dumped
// Splendor Blast Hardware
GAME( 1985, splndrbt, 0, splndrbt, splndrbt, splndrbt_state, init_splndrbt, ROT0, "Alpha Denshi Co.", "Splendor Blast (set 1)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/fcrash.cpp b/src/mame/drivers/fcrash.cpp
index 554832cd9c7..391f63ffdd9 100644
--- a/src/mame/drivers/fcrash.cpp
+++ b/src/mame/drivers/fcrash.cpp
@@ -654,7 +654,7 @@ void cps_state::fcrash_build_palette()
g = ((palette >> 4) & 0x0f) * 0x11 * bright / 0x2d;
b = ((palette >> 0) & 0x0f) * 0x11 * bright / 0x2d;
- m_palette->set_pen_color (offset, rgb_t(r, g, b));
+ m_palette->set_pen_color(offset, rgb_t(r, g, b));
}
}
@@ -1741,7 +1741,7 @@ void cps_state::fcrash(machine_config &config)
m_screen->set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_cps1);
- PALETTE(config, m_palette).set_entries(4096);
+ PALETTE(config, m_palette, palette_device::BLACK).set_entries(4096);
// sound hardware
SPEAKER(config, "mono").front_center();
@@ -1804,7 +1804,7 @@ void cps_state::kodb(machine_config &config)
m_screen->set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_cps1);
- PALETTE(config, m_palette).set_entries(0xc00);
+ PALETTE(config, m_palette, palette_device::BLACK).set_entries(0xc00);
/* sound hardware */
SPEAKER(config, "mono").front_center();
@@ -1845,7 +1845,7 @@ void cps_state::mtwinsb(machine_config &config)
m_screen->set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_cps1);
- PALETTE(config, m_palette).set_entries(0xc00);
+ PALETTE(config, m_palette, palette_device::BLACK).set_entries(0xc00);
/* sound hardware */
SPEAKER(config, "mono").front_center();
@@ -1886,7 +1886,7 @@ void cps_state::sf2mdt(machine_config &config)
m_screen->set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_cps1);
- PALETTE(config, m_palette).set_entries(4096);
+ PALETTE(config, m_palette, palette_device::BLACK).set_entries(4096);
/* sound hardware */
SPEAKER(config, "mono").front_center();
@@ -1937,7 +1937,7 @@ void cps_state::knightsb(machine_config &config)
m_screen->set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_cps1);
- PALETTE(config, m_palette).set_entries(0xc00);
+ PALETTE(config, m_palette, palette_device::BLACK).set_entries(0xc00);
/* sound hardware */
SPEAKER(config, "mono").front_center();
@@ -2319,7 +2319,7 @@ void cps_state::dinopic(machine_config &config)
m_screen->set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_cps1);
- PALETTE(config, m_palette).set_entries(0xc00);
+ PALETTE(config, m_palette, palette_device::BLACK).set_entries(0xc00);
/* sound hardware */
SPEAKER(config, "mono").front_center();
@@ -2506,7 +2506,7 @@ void cps_state::sgyxz(machine_config &config)
m_screen->screen_vblank().set(FUNC(cps_state::screen_vblank_cps1));
m_screen->set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_cps1);
- PALETTE(config, m_palette).set_entries(0xc00);
+ PALETTE(config, m_palette, palette_device::BLACK).set_entries(0xc00);
EEPROM_93C46_8BIT(config, "eeprom");
@@ -2631,7 +2631,7 @@ void cps_state::punipic(machine_config &config)
m_screen->set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_cps1);
- PALETTE(config, m_palette).set_entries(0xc00);
+ PALETTE(config, m_palette, palette_device::BLACK).set_entries(0xc00);
/* sound hardware */
SPEAKER(config, "mono").front_center();
@@ -2819,7 +2819,7 @@ void cps_state::sf2m1(machine_config &config)
m_screen->set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_cps1);
- PALETTE(config, m_palette).set_entries(0xc00);
+ PALETTE(config, m_palette, palette_device::BLACK).set_entries(0xc00);
/* sound hardware */
SPEAKER(config, "mono").front_center();
@@ -3198,7 +3198,7 @@ void cps_state::slampic(machine_config &config)
m_screen->set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_cps1);
- PALETTE(config, m_palette).set_entries(0xc00);
+ PALETTE(config, m_palette, palette_device::BLACK).set_entries(0xc00);
/* sound hardware */
SPEAKER(config, "mono").front_center();
@@ -3296,7 +3296,7 @@ void cps_state::varthb(machine_config &config)
m_screen->set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_cps1);
- PALETTE(config, m_palette).set_entries(0xc00);
+ PALETTE(config, m_palette, palette_device::BLACK).set_entries(0xc00);
/* sound hardware */
SPEAKER(config, "mono").front_center();
diff --git a/src/mame/drivers/fmtowns.cpp b/src/mame/drivers/fmtowns.cpp
index 98f089e485c..5d70f477ccd 100644
--- a/src/mame/drivers/fmtowns.cpp
+++ b/src/mame/drivers/fmtowns.cpp
@@ -224,7 +224,7 @@ inline uint32_t towns_state::msf_to_lbafm(uint32_t val) // because the CDROM co
f = bcd_to_byte(val & 0x0000ff);
s = (bcd_to_byte((val & 0x00ff00) >> 8));
m = (bcd_to_byte((val & 0xff0000) >> 16));
- return ((m * (60 * 75)) + (s * 75) + f);
+ return ((m * (60 * 75)) + (s * 75) + f) - 150;
}
void towns_state::init_serial_rom()
@@ -1481,13 +1481,7 @@ void towns_state::towns_cdrom_read(cdrom_image_device* device)
m_towns_cd.lba_current = msf_to_lbafm(lba1);
m_towns_cd.lba_last = msf_to_lbafm(lba2);
- // first track starts at 00:02:00 - this is hardcoded in the boot procedure
track = cdrom_get_track(device->get_cdrom_file(),m_towns_cd.lba_current);
- if(track < 2)
- { // recalculate LBA
- m_towns_cd.lba_current -= 150;
- m_towns_cd.lba_last -= 150;
- }
// parameter 7 = sector count?
// lemmings 2 sets this to 4 but hates 4 extra sectors being read
diff --git a/src/mame/drivers/gaelco2.cpp b/src/mame/drivers/gaelco2.cpp
index d3b3d6cea88..0a75914de40 100644
--- a/src/mame/drivers/gaelco2.cpp
+++ b/src/mame/drivers/gaelco2.cpp
@@ -617,7 +617,7 @@ ROM_END
SW1 = 4 dipswitches (default all open)
J6 = 12V out for fan
J5 = 6 pin connector (unused)
- MCU-1 = ST62T15C6 labeled as "1"
+ MCU-1 = ST62T15B6-HWD labeled as "1"
*/
ROM_START( sltpstep )
ROM_REGION( 0x040000, "maincpu", 0 ) /* 68000 code */
@@ -632,7 +632,7 @@ ROM_START( sltpstep )
ROM_FILL( 0x0200000, 0x0080000, 0x00 ) /* to decode GFX as 5bpp */
ROM_REGION( 0x0800, "iomcu", 0 ) // on IO board
- ROM_LOAD( "cpu_6022-1-st62t15c6.ic4", 0x0000, 0x0800, NO_DUMP ) // 2KBytes internal ROM
+ ROM_LOAD( "cpu_6022-1-st62t15b6.ic4", 0x0000, 0x0800, NO_DUMP ) // 2KBytes internal ROM
ROM_REGION( 0x0104, "pals", 0 )
ROM_LOAD( "6.pal16l8.u12", 0x0000, 0x0104, NO_DUMP )
diff --git a/src/mame/drivers/konin.cpp b/src/mame/drivers/konin.cpp
index 3628ad19d1b..70fc93ec311 100644
--- a/src/mame/drivers/konin.cpp
+++ b/src/mame/drivers/konin.cpp
@@ -11,32 +11,7 @@ No information has been found. All code is guesswork.
2011-12-29 Skeleton driver.
2016-07-15 Added terminal and uart.
-'maincpu' (0384): unmapped i/o memory write to 00F8 = 56 & FF
-'maincpu' (0388): unmapped i/o memory write to 00F8 = B6 & FF
-'maincpu' (038C): unmapped i/o memory write to 0024 = 00 & FF
-'maincpu' (0A0B): unmapped i/o memory write to 0080 = BE & FF
-'maincpu' (0A0F): unmapped i/o memory write to 0080 = 08 & FF
-'maincpu' (0A13): unmapped i/o memory write to 0080 = 0C & FF
-'maincpu' (0A15): unmapped i/o memory read from 0082 & FF
-'maincpu' (0A19): unmapped i/o memory write to 0080 = 05 & FF
-'maincpu' (04DE): unmapped i/o memory write to 00F6 = 27 & FF
-'maincpu' (04E2): unmapped i/o memory write to 00F6 = 40 & FF
-'maincpu' (04E6): unmapped i/o memory write to 00F6 = CE & FF
-'maincpu' (04EA): unmapped i/o memory write to 00F6 = 27 & FF
-'maincpu' (043B): unmapped i/o memory write to 00F8 = B6 & FF
-'maincpu' (043F): unmapped i/o memory write to 00F6 = 27 & FF
-'maincpu' (2AA3): unmapped i/o memory write to 00F8 = 14 & FF
-'maincpu' (2AA7): unmapped i/o memory write to 00FB = C0 & FF
-'maincpu' (2AC2): unmapped i/o memory write to 00F8 = 56 & FF
-'maincpu' (2AC6): unmapped i/o memory write to 00FA = 03 & FF
-'maincpu' (0082): unmapped i/o memory write to 0024 = 06 & FF
-
-Debug stuff:
-- Start it up
-- Write FF to 7D57 to see some messages
-- Write 00 to 7D57 to silence it
-
-Even though it gives an input prompt, there's no code to accept anything
+Press E to see some messages.
Terminal settings: 8 data bits, 2 stop bits, no parity @ 9600
diff --git a/src/mame/drivers/mephisto.cpp b/src/mame/drivers/mephisto.cpp
index 3c56c16caa8..bb3d8c4b660 100644
--- a/src/mame/drivers/mephisto.cpp
+++ b/src/mame/drivers/mephisto.cpp
@@ -69,10 +69,13 @@ Mephisto 4 Turbo Kit 18mhz - (mm4tk)
#include "machine/timer.h"
#include "sound/dac.h"
#include "sound/volt_reg.h"
+#include "bus/generic/slot.h"
+#include "bus/generic/carts.h"
#include "speaker.h"
// internal artwork
#include "mephisto_mm2.lh"
+#include "mephisto_bup.lh"
class mephisto_state : public driver_device
@@ -91,6 +94,7 @@ public:
void rebel5(machine_config &config);
void mm4tk(machine_config &config);
void mm2(machine_config &config);
+ void bup(machine_config &config);
void mephisto(machine_config &config);
private:
@@ -106,12 +110,10 @@ private:
DECLARE_READ8_MEMBER(read_keys);
DECLARE_WRITE_LINE_MEMBER(write_led7);
uint8_t m_lcd_shift_counter;
- //uint8_t *m_p_ram;
uint8_t m_led7;
uint8_t m_allowNMI;
virtual void machine_start() override;
virtual void machine_reset() override;
- DECLARE_MACHINE_START(mm2);
TIMER_DEVICE_CALLBACK_MEMBER(update_nmi);
TIMER_DEVICE_CALLBACK_MEMBER(update_nmi_r5);
TIMER_DEVICE_CALLBACK_MEMBER(update_irq);
@@ -149,7 +151,7 @@ READ8_MEMBER(mephisto_state::read_keys)
data = m_key2[offset]->read();
}
- logerror("Keyboard Port = %d-%d Data = %d\n ", !m_outlatch->q7_r() ? 0 : 1, offset, data);
+ //logerror("Keyboard Port = %d-%d Data = %d\n ", !m_outlatch->q7_r() ? 0 : 1, offset, data);
return data | 0x7f;
}
@@ -181,7 +183,7 @@ void mephisto_state::mephisto_mem(address_map &map)
map(0x3000, 0x3000).r("board", FUNC(mephisto_board_device::input_r));
map(0x3400, 0x3407).w("outlatch", FUNC(hc259_device::write_d7)); // Status LEDs+ buzzer
map(0x3800, 0x3800).w(FUNC(mephisto_state::mephisto_NMI)); // NMI enable
- map(0x4000, 0x7fff).rom(); // Opening Library
+ map(0x4000, 0x7fff).r("cartslot", FUNC(generic_slot_device::read_rom)); // Opening Library
map(0x8000, 0xffff).rom();
}
@@ -194,7 +196,7 @@ void mephisto_state::mm2_mem(address_map &map)
map(0x2800, 0x2800).w(FUNC(mephisto_state::write_lcd));
map(0x3000, 0x3000).w("board", FUNC(mephisto_board_device::led_w));
map(0x3800, 0x3800).w("board", FUNC(mephisto_board_device::mux_w));
- map(0x4000, 0x7fff).rom(); // Opening Library ?
+ map(0x4000, 0x7fff).r("cartslot", FUNC(generic_slot_device::read_rom)); // Opening Library
map(0x8000, 0xffff).rom();
}
@@ -235,6 +237,42 @@ static INPUT_PORTS_START( mephisto )
PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("D 4") PORT_CODE(KEYCODE_D) PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD)
INPUT_PORTS_END
+static INPUT_PORTS_START( bup )
+ PORT_START("KEY1_0")
+ PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("1") PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD)
+ PORT_START("KEY1_1")
+ PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("2") PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD)
+ PORT_START("KEY1_2")
+ PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("3") PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD)
+ PORT_START("KEY1_3")
+ PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("4") PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD)
+ PORT_START("KEY1_4")
+ PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("5") PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD)
+ PORT_START("KEY1_5")
+ PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("6") PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD)
+ PORT_START("KEY1_6")
+ PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("WHITE") PORT_CODE(KEYCODE_W)
+ PORT_START("KEY1_7")
+ PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("BLACK") PORT_CODE(KEYCODE_B)
+
+ PORT_START("KEY2_0")
+ PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("CL") PORT_CODE(KEYCODE_DEL) PORT_CODE(KEYCODE_BACKSPACE)
+ PORT_START("KEY2_1")
+ PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("ENT") PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_ENTER_PAD)
+ PORT_START("KEY2_2")
+ PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("BEST") PORT_CODE(KEYCODE_S)
+ PORT_START("KEY2_3")
+ PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("INFO") PORT_CODE(KEYCODE_I)
+ PORT_START("KEY2_4")
+ PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("MON") PORT_CODE(KEYCODE_N)
+ PORT_START("KEY2_5")
+ PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("POS") PORT_CODE(KEYCODE_O)
+ PORT_START("KEY2_6")
+ PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("LEV") PORT_CODE(KEYCODE_L)
+ PORT_START("KEY2_7")
+ PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("MEM") PORT_CODE(KEYCODE_M)
+INPUT_PORTS_END
+
TIMER_DEVICE_CALLBACK_MEMBER(mephisto_state::update_nmi)
{
@@ -265,14 +303,7 @@ void mephisto_state::machine_start()
m_lcd_shift_counter = 3;
m_allowNMI = 1;
-}
-
-MACHINE_START_MEMBER(mephisto_state,mm2)
-{
- mephisto_state::machine_start();
-
- m_led7=0xff;
- m_allowNMI = 0;
+ m_led7 = 0xff;
}
void mephisto_state::machine_reset()
@@ -285,7 +316,7 @@ void mephisto_state::machine_reset()
void mephisto_state::mephisto(machine_config &config)
{
/* basic machine hardware */
- M65C02(config, m_maincpu, 4915200); /* 65C02 */
+ M65C02(config, m_maincpu, 4.9152_MHz_XTAL); /* 65C02 */
m_maincpu->set_addrmap(AS_PROGRAM, &mephisto_state::mephisto_mem);
HC259(config, m_outlatch);
@@ -305,6 +336,9 @@ void mephisto_state::mephisto(machine_config &config)
TIMER(config, "nmi_timer").configure_periodic(FUNC(mephisto_state::update_nmi), attotime::from_hz(600));
+ GENERIC_CARTSLOT(config, "cartslot", generic_plain_slot, "mephisto_cart");
+ SOFTWARE_LIST(config, "cart_list").set_original("mephisto");
+
MEPHISTO_SENSORS_BOARD(config, "board");
config.set_default_layout(layout_mephisto_mm2);
}
@@ -313,8 +347,12 @@ void mephisto_state::rebel5(machine_config &config)
{
mephisto(config);
+ m_maincpu->set_clock(9.8304_MHz_XTAL / 2);
m_maincpu->set_addrmap(AS_PROGRAM, &mephisto_state::rebel5_mem);
+ config.device_remove("cartslot");
+ config.device_remove("cart_list");
+
config.device_remove("nmi_timer");
TIMER(config, "nmi_timer_r5").configure_periodic(FUNC(mephisto_state::update_nmi_r5), attotime::from_hz(600));
}
@@ -323,9 +361,8 @@ void mephisto_state::mm2(machine_config &config)
{
mephisto(config);
- m_maincpu->set_clock(3700000);
+ m_maincpu->set_clock(7.3728_MHz_XTAL / 2);
m_maincpu->set_addrmap(AS_PROGRAM, &mephisto_state::mm2_mem);
- MCFG_MACHINE_START_OVERRIDE(mephisto_state, mm2 )
config.device_remove("nmi_timer");
TIMER(config, "irq_timer").configure_periodic(FUNC(mephisto_state::update_irq), attotime::from_hz(450));
@@ -333,6 +370,12 @@ void mephisto_state::mm2(machine_config &config)
m_outlatch->q_out_cb<7>().set(FUNC(mephisto_state::write_led7)).invert();
}
+void mephisto_state::bup(machine_config &config)
+{
+ mm2(config);
+ config.set_default_layout(layout_mephisto_bup);
+}
+
void mephisto_state::mm4tk(machine_config &config)
{
mephisto(config);
@@ -343,45 +386,55 @@ void mephisto_state::mm4tk(machine_config &config)
ROM_START(rebel5)
ROM_REGION(0x10000,"maincpu",0)
- ROM_LOAD("rebel5.rom", 0x8000, 0x8000, CRC(8d02e1ef) SHA1(9972c75936613bd68cfd3fe62bd222e90e8b1083))
+ ROM_DEFAULT_BIOS("v2")
+ ROM_SYSTEM_BIOS( 0, "v1", "V1" )
+ ROMX_LOAD("rebel5_v1.rom", 0x8000, 0x8000, CRC(8d02e1ef) SHA1(9972c75936613bd68cfd3fe62bd222e90e8b1083), ROM_BIOS(0))
+ ROM_SYSTEM_BIOS( 1, "v2", "V2" )
+ ROMX_LOAD("rebel5_v2.rom", 0x8000, 0x8000, CRC(17232752) SHA1(3cd6893c0071f3dc02785bf99f1950eed81eba39), ROM_BIOS(1))
ROM_END
ROM_START(mm2)
ROM_REGION(0x10000,"maincpu",0)
- ROM_LOAD("mm2_1.bin", 0x8000, 0x4000, CRC(e2daac82) SHA1(c9fa59ca92362f8ee770733073bfa2ab8c7904ad))
- ROM_LOAD("mm2_2.bin", 0xc000, 0x4000, CRC(5e296939) SHA1(badd2a377259cf738cd076d8fb245c3dc284c24d))
+ ROM_DEFAULT_BIOS("v2a")
+ ROM_SYSTEM_BIOS( 0, "v1", "V1" )
+ ROMX_LOAD("mm2_v1_1.bin", 0x8000, 0x4000, CRC(b91dab77) SHA1(67762304afe51fb8f1eb91259567b2451bf9bbfd), ROM_BIOS(0))
+ ROMX_LOAD("mm2_v1_2.bin", 0xc000, 0x4000, CRC(01143cc1) SHA1(f78474b410dbecb209aa23ef81e9f894e8b54942), ROM_BIOS(0))
+ ROM_SYSTEM_BIOS( 1, "v2", "V2" )
+ ROMX_LOAD("mm2_v2_1.bin", 0x8000, 0x4000, CRC(e2daac82) SHA1(c9fa59ca92362f8ee770733073bfa2ab8c7904ad), ROM_BIOS(1))
+ ROMX_LOAD("mm2_v2_2.bin", 0xc000, 0x4000, CRC(5e296939) SHA1(badd2a377259cf738cd076d8fb245c3dc284c24d), ROM_BIOS(1))
+ ROM_SYSTEM_BIOS( 2, "v2a", "V2a" )
+ ROMX_LOAD("mm2_1_v2a.bin", 0x8000, 0x4000, CRC(e9adcb8f) SHA1(498f48f96678f7bf429fd43e4f392ec6dd649fc6), ROM_BIOS(2))
+ ROMX_LOAD("mm2_2_v2a.bin", 0xc000, 0x4000, CRC(d40cbfc2) SHA1(4e9b19b1a0ad97868b31d7a55143a1778110cc96), ROM_BIOS(2))
+ROM_END
+
+ROM_START(bup)
+ ROM_REGION(0x10000,"maincpu",0)
+ ROM_DEFAULT_BIOS("v2")
+ ROM_SYSTEM_BIOS( 0, "v1", "V1" )
+ ROMX_LOAD("bup_v1_1.bin", 0x8000, 0x4000, CRC(e1e9625a) SHA1(8a757e28b7afca2a092f8ff419087e06b07b743e), ROM_BIOS(0))
+ ROMX_LOAD("bup_v1_2.bin", 0xc000, 0x4000, CRC(708338ea) SHA1(d617c4aa2161865a22b4b0646ba793f8a1fda863), ROM_BIOS(0))
+ ROM_SYSTEM_BIOS( 1, "v2", "V2" )
+ ROMX_LOAD("bup_v2_1.bin", 0x8000, 0x4000, CRC(e1e9625a) SHA1(8a757e28b7afca2a092f8ff419087e06b07b743e), ROM_BIOS(1))
+ ROMX_LOAD("bup_v2_2.bin", 0xc000, 0x4000, CRC(6db30b80) SHA1(df4b379c4e916dff6b4110ec9c3591a9620c3424), ROM_BIOS(1))
ROM_END
ROM_START(mm4)
ROM_REGION(0x10000,"maincpu",0)
ROM_LOAD("mephisto4.rom", 0x8000, 0x8000, CRC(f68a4124) SHA1(d1d03a9aacc291d5cb720d2ee2a209eeba13a36c))
- ROM_SYSTEM_BIOS( 0, "none", "No Opening Library" )
- ROM_SYSTEM_BIOS( 1, "hg440", "HG440 Opening Library" )
- ROMX_LOAD( "hg440.rom", 0x4000, 0x4000, CRC(81ffcdfd) SHA1(b0f7bcc11d1e821daf92cde31e3446c8be0bbe19), ROM_BIOS(1))
ROM_END
ROM_START(mm4tk)
ROM_REGION(0x10000,"maincpu",0)
ROM_LOAD("mm4tk.rom", 0x8000, 0x8000, CRC(51cb36a4) SHA1(9e184b4e85bb721e794b88d8657ae8d2ff5a24af))
- ROM_SYSTEM_BIOS( 0, "none", "No Opening Library" )
- ROM_SYSTEM_BIOS( 1, "hg440", "HG440 Opening Library" )
- ROMX_LOAD( "hg440.rom", 0x4000, 0x4000, CRC(81ffcdfd) SHA1(b0f7bcc11d1e821daf92cde31e3446c8be0bbe19), ROM_BIOS(1))
ROM_END
ROM_START(mm5)
ROM_REGION(0x10000,"maincpu",0)
- ROM_LOAD("mephisto5.rom", 0x8000, 0x8000, CRC(89c3d9d2) SHA1(77cd6f8eeb03c713249db140d2541e3264328048))
- ROM_SYSTEM_BIOS( 0, "none", "No Opening Library" )
- ROM_SYSTEM_BIOS( 1, "hg550", "HG550 Opening Library" )
- ROMX_LOAD("hg550.rom", 0x4000, 0x4000, CRC(0359f13d) SHA1(833cef8302ad8d283d3f95b1d325353c7e3b8614), ROM_BIOS(1))
-ROM_END
-
-ROM_START(mm50)
- ROM_REGION(0x10000,"maincpu",0)
- ROM_LOAD("mm50.rom", 0x8000, 0x8000, CRC(fcfa7e6e) SHA1(afeac3a8c957ba58cefaa27b11df974f6f2066da))
- ROM_SYSTEM_BIOS( 0, "none", "No Opening Library" )
- ROM_SYSTEM_BIOS( 1, "hg550", "HG550 Opening Library" )
- ROMX_LOAD("hg550.rom", 0x4000, 0x4000, CRC(0359f13d) SHA1(833cef8302ad8d283d3f95b1d325353c7e3b8614), ROM_BIOS(1))
+ ROM_DEFAULT_BIOS("v51")
+ ROM_SYSTEM_BIOS( 0, "v50", "V5.0" )
+ ROMX_LOAD("mm50.rom", 0x8000, 0x8000, CRC(fcfa7e6e) SHA1(afeac3a8c957ba58cefaa27b11df974f6f2066da), ROM_BIOS(0))
+ ROM_SYSTEM_BIOS( 1, "v51", "V5.1" )
+ ROMX_LOAD("mephisto5.rom", 0x8000, 0x8000, CRC(89c3d9d2) SHA1(77cd6f8eeb03c713249db140d2541e3264328048), ROM_BIOS(1))
ROM_END
@@ -393,8 +446,8 @@ ROM_END
/* YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY, FULLNAME, FLAGS */
CONS( 1984, mm2, mm4, 0, mm2, mephisto, mephisto_state, empty_init, "Hegener & Glaser", "Mephisto MM II", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
+CONS( 1985, bup, mm4, 0, bup, bup, mephisto_state, empty_init, "Hegener & Glaser", "Mephisto B&P", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
CONS( 1986, rebel5, mm4, 0, rebel5, mephisto, mephisto_state, empty_init, "Hegener & Glaser", "Mephisto Rebell 5.0", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
CONS( 1987, mm4, 0, 0, mephisto, mephisto, mephisto_state, empty_init, "Hegener & Glaser", "Mephisto MM IV", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
-CONS( 1987, mm4tk, mm4, 0, mm4tk, mephisto, mephisto_state, empty_init, "hack", "Mephisto MM IV (TurboKit + HG440)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
-CONS( 1990, mm5, mm4, 0, mephisto, mephisto, mephisto_state, empty_init, "Hegener & Glaser", "Mephisto MM V (V5.1)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
-CONS( 1990, mm50, mm4, 0, mephisto, mephisto, mephisto_state, empty_init, "Hegener & Glaser", "Mephisto MM V (V5.0)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
+CONS( 1987, mm4tk, mm4, 0, mm4tk, mephisto, mephisto_state, empty_init, "hack", "Mephisto MM IV (TurboKit)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
+CONS( 1990, mm5, mm4, 0, mephisto, mephisto, mephisto_state, empty_init, "Hegener & Glaser", "Mephisto MM V", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
diff --git a/src/mame/drivers/mindset.cpp b/src/mame/drivers/mindset.cpp
index ff0feb4772a..3f3f006a381 100644
--- a/src/mame/drivers/mindset.cpp
+++ b/src/mame/drivers/mindset.cpp
@@ -30,6 +30,8 @@ protected:
required_device<floppy_connector> m_fdco[2];
required_shared_ptr<u16> m_vram;
required_ioport_array<11> m_kbd_row;
+ required_ioport_array<2> m_mouse_axis;
+ required_ioport m_mouse_btn, m_joystick;
output_finder<2> m_floppy_leds;
output_finder<> m_red_led;
output_finder<> m_yellow_led;
@@ -42,6 +44,7 @@ protected:
bool m_genlock[16];
u16 m_dispctrl, m_screenpos, m_intpos, m_intaddr, m_fdc_dma_count;
u8 m_kbd_p1, m_kbd_p2, m_borderidx;
+ u8 m_mouse_last_read[2], m_mouse_counter[2];
bool m_fdc_intext, m_fdc_int, m_fdc_drq, m_trap_int, m_trap_drq;
u16 m_trap_data[8];
@@ -128,6 +131,9 @@ mindset_state::mindset_state(const machine_config &mconfig, device_type type, co
m_fdco{{*this, "fdc:0"}, {*this, "fdc:1"}},
m_vram(*this, "vram"),
m_kbd_row(*this, "K%02u", 0U),
+ m_mouse_axis(*this, "MOUSEAXIS%u", 0U),
+ m_mouse_btn(*this, "MOUSEBTN"),
+ m_joystick(*this, "JOYSTICK"),
m_floppy_leds(*this, "drive%u_led", 0U),
m_red_led(*this, "red_led"),
m_yellow_led(*this, "yellow_led"),
@@ -174,6 +180,8 @@ void mindset_state::machine_start()
save_item(NAME(m_kbd_p1));
save_item(NAME(m_kbd_p2));
save_item(NAME(m_borderidx));
+ save_item(NAME(m_mouse_last_read));
+ save_item(NAME(m_mouse_counter));
}
void mindset_state::machine_reset()
@@ -185,6 +193,8 @@ void mindset_state::machine_reset()
memset(m_genlock, 0, sizeof(m_genlock));
m_dispctrl = m_screenpos = m_intpos = m_intaddr = m_fdc_dma_count = 0;
m_kbd_p1 = m_kbd_p2 = m_borderidx = 0;
+ memset(m_mouse_last_read, 0, sizeof(m_mouse_last_read));
+ memset(m_mouse_counter, 0, sizeof(m_mouse_counter));
}
int mindset_state::sys_t0_r()
@@ -251,7 +261,8 @@ int mindset_state::kbd_t1_r()
void mindset_state::snd_p1_w(u8 data)
{
- // logerror("snd p1 %02x\n", data);
+ if(data != 0x80)
+ logerror("snd p1 %02x\n", data);
}
void mindset_state::snd_p2_w(u8 data)
@@ -266,40 +277,28 @@ u16 mindset_state::keyscan()
for(unsigned int i=0; i<11; i++)
if(!(src & (1 << i)))
res &= m_kbd_row[i]->read();
- if(!(src & 0x2000)) {
- switch((src >> 1) & 3) {
- case 0:
- res &= 0xc0;
- break;
- case 1:
- res &= 0xc0;
- break;
- case 2:
- res &= 0xc0;
- break;
- case 3:
- res &= 0xc0;
- break;
- }
- }
+
if(!(src & 0x8000)) {
- switch((src >> 1) & 3) {
- case 0:
- res &= 0xc0;
- break;
- case 1:
- res &= 0xc0;
- break;
- case 2:
- res &= 0xc0;
- break;
- case 3:
- res &= 0xc0;
- break;
+ int axis = (src >> 12) & 1;
+ u8 aval = m_mouse_axis[axis]->read();
+ m_mouse_counter[axis] += aval - m_mouse_last_read[axis];
+ m_mouse_last_read[axis] = aval;
+
+ u8 nib;
+ if((src >> 11) & 1) {
+ nib = m_mouse_counter[axis] & 0xf;
+ m_mouse_counter[axis] &= 0xf0;
+ } else {
+ nib = m_mouse_counter[axis] >> 4;
+ m_mouse_counter[axis] &= 0x0f;
}
+
+ res &= m_mouse_btn->read() & (nib | 0x1f0);
}
- // logerror("scan src=%04x %04x %d%d/%d(%03x)\n", src, 0xffff ^ src, (src >> 15) & 1, (src >> 13) & 1, (src >> 11) & 3, m_kbdcpu->pc());
+ if(!(src & 0x2000))
+ res &= m_joystick->read();
+
return res;
}
@@ -418,44 +417,43 @@ u32 mindset_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, co
if(ibm_mode) {
if(large_pixels) {
- if(!interleave) {
- switch(pixels_per_byte_order) {
- case 1: {
- static int palind[4] = { 0, 1, 4, 5 };
- for(int field=0; field<2; field++) {
- for(u32 yy=0; yy<2; yy++) {
- const u16 *src = bank + 4096*yy;
- for(u32 y=yy; y<200; y+=2) {
- u32 *dest = &bitmap.pix32(2*y+field+dy, dx);
- for(u32 x=0; x<320; x+=8) {
- u16 sv = *src++;
- *dest++ = m_palette[palind[(sv >> 6) & 3]];
- *dest++ = m_palette[palind[(sv >> 6) & 3]];
- *dest++ = m_palette[palind[(sv >> 4) & 3]];
- *dest++ = m_palette[palind[(sv >> 4) & 3]];
- *dest++ = m_palette[palind[(sv >> 2) & 3]];
- *dest++ = m_palette[palind[(sv >> 2) & 3]];
- *dest++ = m_palette[palind[(sv >> 0) & 3]];
- *dest++ = m_palette[palind[(sv >> 0) & 3]];
- *dest++ = m_palette[palind[(sv >> 14) & 3]];
- *dest++ = m_palette[palind[(sv >> 14) & 3]];
- *dest++ = m_palette[palind[(sv >> 12) & 3]];
- *dest++ = m_palette[palind[(sv >> 12) & 3]];
- *dest++ = m_palette[palind[(sv >> 10) & 3]];
- *dest++ = m_palette[palind[(sv >> 10) & 3]];
- *dest++ = m_palette[palind[(sv >> 8) & 3]];
- *dest++ = m_palette[palind[(sv >> 8) & 3]];
- }
+ static int palind[4] = { 0, 1, 4, 5 };
+ for(int field=0; field<2; field++) {
+ for(u32 yy=0; yy<2; yy++) {
+ const u16 *src = bank + 4096*yy;
+ for(u32 y=yy; y<200; y+=2) {
+ u32 *dest = &bitmap.pix32(2*y+field+dy, dx);
+ for(u32 x=0; x<320; x+=8) {
+ u16 sv = sw(*src++);
+ for(u32 xx=0; xx<8; xx++) {
+ u32 color = m_palette[palind[(sv >> (14-2*xx)) & 3]];
+ *dest++ = color;
+ *dest++ = color;
}
}
}
- return 0;
}
+ }
+ return 0;
+ } else {
+ static int palind[4] = { 0, 4 };
+ for(int field=0; field<2; field++) {
+ for(u32 yy=0; yy<2; yy++) {
+ const u16 *src = bank + 4096*yy;
+ for(u32 y=yy; y<200; y+=2) {
+ u32 *dest = &bitmap.pix32(2*y+field+dy, dx);
+ for(u32 x=0; x<640; x+=16) {
+ u16 sv = sw(*src++);
+ for(u32 xx=0; xx<16; xx++) {
+ u32 color = m_palette[palind[(sv >> (15-xx)) & 1]];
+ *dest++ = color;
+ }
+ }
+ }
}
}
+ return 0;
}
-
- logerror("Unimplemented ibm-compatible graphics mode (%dx%d, ppb=%d)\n", large_pixels ? 320 : 640, interleave ? 400 : 200, 2 << pixels_per_byte_order);
} else {
if(large_pixels) {
if(!interleave) {
@@ -466,15 +464,12 @@ u32 mindset_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, co
for(u32 y=0; y<200; y++) {
u32 *dest = &bitmap.pix32(2*y+field+dy, dx);
for(u32 x=0; x<320; x+=4) {
- u16 sv = *src++;
- *dest++ = m_palette[(sv >> 4) & 15];
- *dest++ = m_palette[(sv >> 4) & 15];
- *dest++ = m_palette[(sv >> 0) & 15];
- *dest++ = m_palette[(sv >> 0) & 15];
- *dest++ = m_palette[(sv >> 12) & 15];
- *dest++ = m_palette[(sv >> 12) & 15];
- *dest++ = m_palette[(sv >> 8) & 15];
- *dest++ = m_palette[(sv >> 8) & 15];
+ u16 sv = sw(*src++);
+ for(u32 xx=0; xx<4; xx++) {
+ u32 color = m_palette[(sv >> (12-4*xx)) & 15];
+ *dest++ = color;
+ *dest++ = color;
+ }
}
}
}
@@ -487,68 +482,29 @@ u32 mindset_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, co
for(u32 y=0; y<200; y++) {
u32 *dest = &bitmap.pix32(2*y+field+dy, dx);
for(u32 x=0; x<320; x+=8) {
- u16 sv = *src++;
- *dest++ = m_palette[palind[(sv >> 6) & 3]];
- *dest++ = m_palette[palind[(sv >> 6) & 3]];
- *dest++ = m_palette[palind[(sv >> 4) & 3]];
- *dest++ = m_palette[palind[(sv >> 4) & 3]];
- *dest++ = m_palette[palind[(sv >> 2) & 3]];
- *dest++ = m_palette[palind[(sv >> 2) & 3]];
- *dest++ = m_palette[palind[(sv >> 0) & 3]];
- *dest++ = m_palette[palind[(sv >> 0) & 3]];
- *dest++ = m_palette[palind[(sv >> 14) & 3]];
- *dest++ = m_palette[palind[(sv >> 14) & 3]];
- *dest++ = m_palette[palind[(sv >> 12) & 3]];
- *dest++ = m_palette[palind[(sv >> 12) & 3]];
- *dest++ = m_palette[palind[(sv >> 10) & 3]];
- *dest++ = m_palette[palind[(sv >> 10) & 3]];
- *dest++ = m_palette[palind[(sv >> 8) & 3]];
- *dest++ = m_palette[palind[(sv >> 8) & 3]];
+ u16 sv = sw(*src++);
+ for(u32 xx=0; xx<8; xx++) {
+ u32 color = m_palette[palind[(sv >> (14-2*xx)) & 3]];
+ *dest++ = color;
+ *dest++ = color;
+ }
}
}
}
return 0;
}
case 2: {
- static int palind[4] = { 0, 1 };
for(int field=0; field<2; field++) {
const u16 *src = bank;
for(u32 y=0; y<200; y++) {
u32 *dest = &bitmap.pix32(2*y+field+dy, dx);
for(u32 x=0; x<320; x+=16) {
- u16 sv = *src++;
- *dest++ = m_palette[palind[(sv >> 7) & 1]];
- *dest++ = m_palette[palind[(sv >> 7) & 1]];
- *dest++ = m_palette[palind[(sv >> 6) & 1]];
- *dest++ = m_palette[palind[(sv >> 6) & 1]];
- *dest++ = m_palette[palind[(sv >> 5) & 1]];
- *dest++ = m_palette[palind[(sv >> 5) & 1]];
- *dest++ = m_palette[palind[(sv >> 4) & 1]];
- *dest++ = m_palette[palind[(sv >> 4) & 1]];
- *dest++ = m_palette[palind[(sv >> 3) & 1]];
- *dest++ = m_palette[palind[(sv >> 3) & 1]];
- *dest++ = m_palette[palind[(sv >> 2) & 1]];
- *dest++ = m_palette[palind[(sv >> 2) & 1]];
- *dest++ = m_palette[palind[(sv >> 1) & 1]];
- *dest++ = m_palette[palind[(sv >> 1) & 1]];
- *dest++ = m_palette[palind[(sv >> 0) & 1]];
- *dest++ = m_palette[palind[(sv >> 0) & 1]];
- *dest++ = m_palette[palind[(sv >> 15) & 1]];
- *dest++ = m_palette[palind[(sv >> 15) & 1]];
- *dest++ = m_palette[palind[(sv >> 14) & 1]];
- *dest++ = m_palette[palind[(sv >> 14) & 1]];
- *dest++ = m_palette[palind[(sv >> 13) & 1]];
- *dest++ = m_palette[palind[(sv >> 13) & 1]];
- *dest++ = m_palette[palind[(sv >> 12) & 1]];
- *dest++ = m_palette[palind[(sv >> 12) & 1]];
- *dest++ = m_palette[palind[(sv >> 11) & 1]];
- *dest++ = m_palette[palind[(sv >> 11) & 1]];
- *dest++ = m_palette[palind[(sv >> 10) & 1]];
- *dest++ = m_palette[palind[(sv >> 10) & 1]];
- *dest++ = m_palette[palind[(sv >> 9) & 1]];
- *dest++ = m_palette[palind[(sv >> 9) & 1]];
- *dest++ = m_palette[palind[(sv >> 8) & 1]];
- *dest++ = m_palette[palind[(sv >> 8) & 1]];
+ u16 sv = sw(*src++);
+ for(u32 xx=0; xx<16; xx++) {
+ u32 color = m_palette[(sv >> (15-xx)) & 1];
+ *dest++ = color;
+ *dest++ = color;
+ }
}
}
}
@@ -560,22 +516,18 @@ u32 mindset_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, co
if(!interleave) {
switch(pixels_per_byte_order) {
case 0: {
- static int palind[4] = { 0, 1, 4, 5 };
+ static int palind[4] = { 0, 4, 8, 12 };
for(int field=0; field<2; field++) {
m_palette[1] = 0xffffff;
const u16 *src = bank;
for(u32 y=0; y<200; y++) {
u32 *dest = &bitmap.pix32(2*y+field+dy, dx);
for(u32 x=0; x<640; x+=8) {
- u16 sv = *src++;
- *dest++ = m_palette[palind[(sv >> 6) & 3]];
- *dest++ = m_palette[palind[(sv >> 4) & 3]];
- *dest++ = m_palette[palind[(sv >> 2) & 3]];
- *dest++ = m_palette[palind[(sv >> 0) & 3]];
- *dest++ = m_palette[palind[(sv >> 14) & 3]];
- *dest++ = m_palette[palind[(sv >> 12) & 3]];
- *dest++ = m_palette[palind[(sv >> 10) & 3]];
- *dest++ = m_palette[palind[(sv >> 8) & 3]];
+ u16 sv = sw(*src++);
+ for(u32 xx=0; xx<8; xx++) {
+ u32 color = m_palette[palind[(sv >> (14-2*xx)) & 3]];
+ *dest++ = color;
+ }
}
}
}
@@ -588,23 +540,11 @@ u32 mindset_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, co
for(u32 y=0; y<200; y++) {
u32 *dest = &bitmap.pix32(2*y+field+dy, dx);
for(u32 x=0; x<640; x+=16) {
- u16 sv = *src++;
- *dest++ = m_palette[palind[(sv >> 7) & 1]];
- *dest++ = m_palette[palind[(sv >> 6) & 1]];
- *dest++ = m_palette[palind[(sv >> 5) & 1]];
- *dest++ = m_palette[palind[(sv >> 4) & 1]];
- *dest++ = m_palette[palind[(sv >> 3) & 1]];
- *dest++ = m_palette[palind[(sv >> 2) & 1]];
- *dest++ = m_palette[palind[(sv >> 1) & 1]];
- *dest++ = m_palette[palind[(sv >> 0) & 1]];
- *dest++ = m_palette[palind[(sv >> 15) & 1]];
- *dest++ = m_palette[palind[(sv >> 14) & 1]];
- *dest++ = m_palette[palind[(sv >> 13) & 1]];
- *dest++ = m_palette[palind[(sv >> 12) & 1]];
- *dest++ = m_palette[palind[(sv >> 11) & 1]];
- *dest++ = m_palette[palind[(sv >> 10) & 1]];
- *dest++ = m_palette[palind[(sv >> 9) & 1]];
- *dest++ = m_palette[palind[(sv >> 8) & 1]];
+ u16 sv = sw(*src++);
+ for(u32 xx=0; xx<16; xx++) {
+ u32 color = m_palette[palind[(sv >> (15-xx)) & 1]];
+ *dest++ = color;
+ }
}
}
}
@@ -1127,6 +1067,26 @@ static INPUT_PORTS_START(mindset)
PORT_BIT(0x040, IP_ACTIVE_LOW, IPT_UNUSED)
PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_UNUSED)
PORT_BIT(0x100, IP_ACTIVE_LOW, IPT_UNUSED)
+
+ PORT_START("MOUSEAXIS1")
+ PORT_BIT(0xff, 0x00, IPT_MOUSE_X) PORT_SENSITIVITY(50) PORT_KEYDELTA(1) PORT_MINMAX(0, 255) PORT_PLAYER(1)
+
+ PORT_START("MOUSEAXIS0")
+ PORT_BIT(0xff, 0x00, IPT_MOUSE_Y) PORT_SENSITIVITY(50) PORT_KEYDELTA(1) PORT_MINMAX(0, 255) PORT_PLAYER(1)
+
+ PORT_START("MOUSEBTN")
+ PORT_BIT(0x1cf, IP_ACTIVE_LOW, IPT_UNUSED)
+ PORT_BIT(0x010, IP_ACTIVE_LOW, IPT_BUTTON1) PORT_PLAYER(1)
+ PORT_BIT(0x020, IP_ACTIVE_LOW, IPT_BUTTON2) PORT_PLAYER(1)
+
+ PORT_START("JOYSTICK")
+ PORT_BIT(0x001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP) PORT_PLAYER(2) PORT_8WAY
+ PORT_BIT(0x002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN) PORT_PLAYER(2) PORT_8WAY
+ PORT_BIT(0x004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT) PORT_PLAYER(2) PORT_8WAY
+ PORT_BIT(0x008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT) PORT_PLAYER(2) PORT_8WAY
+ PORT_BIT(0x010, IP_ACTIVE_LOW, IPT_BUTTON1) PORT_PLAYER(2)
+ PORT_BIT(0x020, IP_ACTIVE_LOW, IPT_BUTTON2) PORT_PLAYER(2)
+ PORT_BIT(0x1c0, IP_ACTIVE_LOW, IPT_UNUSED)
INPUT_PORTS_END
ROM_START(mindset)
diff --git a/src/mame/drivers/miniboy7.cpp b/src/mame/drivers/miniboy7.cpp
index 3930bfcfa89..7b2ebac0f18 100644
--- a/src/mame/drivers/miniboy7.cpp
+++ b/src/mame/drivers/miniboy7.cpp
@@ -79,7 +79,7 @@
- 2x pots to handle the B-G background color/intensity.
- * Super Mini-Boy, Draw Poker
+ * Super Mini-Boy, Joker Poker
Board silkscreened on top:
be MVX-001-02 ('be' is a Bonanza Enterprises logo).
@@ -123,11 +123,11 @@ VR1-VR6: variable resistor to handle B-G background color/intensity & sound
* Denotes unpopulated
- - PRG ROMs: 5x 2764 (8Kb) - 3 for Draw Poker
+ - PRG ROMs: 5x 2764 (8Kb) - 3 for Joker Poker
- GFX ROMs: 1x 2764 (8Kb) for text layer.
3x 2764 (8Kb) for gfx tiles.
-NOTE: 10MHz XTAL verified for Draw Poker, Super Mini-Boy is stated as 12.4725MHz
+NOTE: 10MHz XTAL verified for Joker Poker, Super Mini-Boy is stated as 12.4725MHz
*******************************************************************************
diff --git a/src/mame/drivers/model2.cpp b/src/mame/drivers/model2.cpp
index 5676e4fea8d..f765fe836d6 100644
--- a/src/mame/drivers/model2.cpp
+++ b/src/mame/drivers/model2.cpp
@@ -3938,7 +3938,7 @@ ROM_START( motoraiddx ) /* Motor Raid DX, Model 2A, Sega ROM board ID# 834-13231
MODEL2A_VID_BOARD
ROM_END
-ROM_START( skytargt ) /* Sky Target, Model 2A, Sega game ID# 833-12178 , Sega ROM board ID# 834-12179 */
+ROM_START( skytargt ) /* Sky Target, Model 2A, Sega game ID# 833-12178, Sega ROM board ID# 834-12179 */
ROM_REGION( 0x200000, "maincpu", 0 ) // i960 program
ROM_LOAD32_WORD( "epr-18406.12", 0x000000, 0x080000, CRC(fde9c00a) SHA1(01cd519daaf6138d9df4940bf8bb5923a1f163df) )
ROM_LOAD32_WORD( "epr-18407.13", 0x000002, 0x080000, CRC(35f8b529) SHA1(faf6dcf8f345c1e7968823f2dba60afcd88f37c2) )
diff --git a/src/mame/drivers/model3.cpp b/src/mame/drivers/model3.cpp
index 0b0b0cdae62..ffa3fa73304 100644
--- a/src/mame/drivers/model3.cpp
+++ b/src/mame/drivers/model3.cpp
@@ -3612,7 +3612,7 @@ ROM_START( vs2v991 ) /* Step 2.0 */
ROM_PARAMETER( ":315_5881:key", "29222ac8" )
ROM_END
-ROM_START( vs299b ) /* Step 2.0, Sega game ID# is 833-13688, ROM board ID# 834-13689 VS2 VER99 STEP2, 337-13690-COM security board */
+ROM_START( vs299b ) /* Step 2.0, Sega game ID# is 833-13688, ROM board ID# 834-13689 VS2 VER99 STEP2, 837-13690-COM security board */
ROM_REGION64_BE( 0x8800000, "user1", 0 ) /* program + data ROMs */
// CROM
ROM_LOAD64_WORD_SWAP( "epr-21550b.17", 0x400006, 0x100000, CRC(c508e488) SHA1(3134d418beaee9f824a0bd0e5441a997b5911d16) )
@@ -3684,7 +3684,7 @@ ROM_START( vs299b ) /* Step 2.0, Sega game ID# is 833-13688, ROM board ID# 834-1
ROM_PARAMETER( ":315_5881:key", "29222ac8" )
ROM_END
-ROM_START( vs299a ) /* Step 2.0, Sega game ID# is 833-13688, ROM board ID# 834-13689 VS2 VER99 STEP2, 337-13690-COM security board */
+ROM_START( vs299a ) /* Step 2.0, Sega game ID# is 833-13688, ROM board ID# 834-13689 VS2 VER99 STEP2, 837-13690-COM security board */
ROM_REGION64_BE( 0x8800000, "user1", 0 ) /* program + data ROMs */
// CROM
ROM_LOAD64_WORD_SWAP( "epr-21535a.17", 0x400006, 0x100000, CRC(8e4ec341) SHA1(973c71e7a48e728cbcb2465b56e90669fee0ec53) )
diff --git a/src/mame/drivers/nemesis.cpp b/src/mame/drivers/nemesis.cpp
index 0b9970cc70c..e88ca99381c 100644
--- a/src/mame/drivers/nemesis.cpp
+++ b/src/mame/drivers/nemesis.cpp
@@ -27,6 +27,9 @@ driver by Bryan McPhail
TODO:
- hcrash: coin insertion isn't always recognized.
- hcrash: Konami GT-type inputs doesn't work properly.
+- gradiusb: requires ~16 seconds to resume after each death, way too much?
+- gradiusb: missing gfxs on title screen logo;
+- gradiusb: still needs proper MCU emulation;
modified by Hau
03/27/2009
@@ -2960,7 +2963,7 @@ void nemesis_state::bubsys_init()
}
GAME( 1985, bubsys, 0, bubsys, bubsys, nemesis_state, bubsys_init, ROT0, "Konami", "Bubble System BIOS", MACHINE_IS_BIOS_ROOT )
-GAME( 1985, gradiusb, bubsys, bubsys, bubsys, nemesis_state, bubsys_init, ROT0, "Konami", "Gradius (Bubble System)", 0 )
+GAME( 1985, gradiusb, bubsys, bubsys, bubsys, nemesis_state, bubsys_init, ROT0, "Konami", "Gradius (Bubble System)", MACHINE_UNEMULATED_PROTECTION )
// Bubble System Twinbee
// Bubble System RF2
// Bubble System Galactic Warriors
diff --git a/src/mame/drivers/pgm.cpp b/src/mame/drivers/pgm.cpp
index 64948c2d9a7..3cdd2d650cb 100644
--- a/src/mame/drivers/pgm.cpp
+++ b/src/mame/drivers/pgm.cpp
@@ -4841,182 +4841,182 @@ GAME( 1997, pgm, 0, pgm, pgm, pgm_state
//西游释厄传/Xīyóu shì è chuán (China; Simplified Chinese)
//西遊釋厄傳/Xīyóu shì è chuán (Taiwan; Traditional Chinese)
// the version numbering on these is a mess... date strings from ROM (and in some cases even those are missing..)
-GAME( 1997, orlegend, pgm, pgm_asic3, orlegend, pgm_asic3_state, init_orlegend, ROT0, "IGS", "Oriental Legend / Xiyou Shi E Chuan (ver. 126)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // V0001 01/14/98 18:16:38 - runs as World
-GAME( 1997, orlegende, orlegend, pgm_asic3, orlegend, pgm_asic3_state, init_orlegend, ROT0, "IGS", "Oriental Legend / Xiyou Shi E Chuan (ver. 112)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // V0001 07/14/97 11:19:45 - runs as World
-GAME( 1997, orlegendc, orlegend, pgm_asic3, orlegend, pgm_asic3_state, init_orlegend, ROT0, "IGS", "Oriental Legend / Xiyou Shi E Chuan (ver. 112, Chinese Board)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // V0001 05/05/97 10:08:21 - runs as World, Korea, China
-GAME( 1997, orlegendca, orlegend, pgm_asic3, orlegend, pgm_asic3_state, init_orlegend, ROT0, "IGS", "Oriental Legend / Xiyou Shi E Chuan (ver. ???, Chinese Board)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // V0001 04/02/97 13:35:43 - runs as HongKong, China, China
-GAME( 1997, orlegend111c, orlegend, pgm_asic3, orlegend, pgm_asic3_state, init_orlegend, ROT0, "IGS", "Oriental Legend / Xiyou Shi E Chuan (ver. 111, Chinese Board)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // V0001 no date! - runs as HongKong, China, China
-GAME( 1997, orlegend111t, orlegend, pgm_asic3, orlegendt, pgm_asic3_state, init_orlegend, ROT0, "IGS", "Oriental Legend / Xiyou Shi E Chuan (ver. 111, Taiwanese Board)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )// V0001 no date! - needs a different protection sequence
-GAME( 1997, orlegend111k, orlegend, pgm_asic3, orlegendk, pgm_asic3_state, init_orlegend, ROT0, "IGS", "Oriental Legend / Xiyou Shi E Chuan (ver. 111, Korean Board)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // not checked
-GAME( 1997, orlegend105k, orlegend, pgm_asic3, orlegendk, pgm_asic3_state, init_orlegend, ROT0, "IGS", "Oriental Legend / Xiyou Shi E Chuan (ver. 105, Korean Board)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // V0000 no date! - runs as Korea
+GAME( 1997, orlegend, pgm, pgm_asic3, orlegend, pgm_asic3_state, init_orlegend, ROT0, "IGS", "Oriental Legend / Xiyou Shi E Chuan (ver. 126)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // V0001 01/14/98 18:16:38 - runs as World
+GAME( 1997, orlegende, orlegend, pgm_asic3, orlegend, pgm_asic3_state, init_orlegend, ROT0, "IGS", "Oriental Legend / Xiyou Shi E Chuan (ver. 112)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // V0001 07/14/97 11:19:45 - runs as World
+GAME( 1997, orlegendc, orlegend, pgm_asic3, orlegend, pgm_asic3_state, init_orlegend, ROT0, "IGS", "Oriental Legend / Xiyou Shi E Chuan (ver. 112, Chinese Board)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // V0001 05/05/97 10:08:21 - runs as World, Korea, China
+GAME( 1997, orlegendca, orlegend, pgm_asic3, orlegend, pgm_asic3_state, init_orlegend, ROT0, "IGS", "Oriental Legend / Xiyou Shi E Chuan (ver. ???, Chinese Board)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // V0001 04/02/97 13:35:43 - runs as HongKong, China, China
+GAME( 1997, orlegend111c, orlegend, pgm_asic3, orlegend, pgm_asic3_state, init_orlegend, ROT0, "IGS", "Oriental Legend / Xiyou Shi E Chuan (ver. 111, Chinese Board)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // V0001 no date! - runs as HongKong, China, China
+GAME( 1997, orlegend111t, orlegend, pgm_asic3, orlegendt, pgm_asic3_state, init_orlegend, ROT0, "IGS", "Oriental Legend / Xiyou Shi E Chuan (ver. 111, Taiwanese Board)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )// V0001 no date! - needs a different protection sequence
+GAME( 1997, orlegend111k, orlegend, pgm_asic3, orlegendk, pgm_asic3_state, init_orlegend, ROT0, "IGS", "Oriental Legend / Xiyou Shi E Chuan (ver. 111, Korean Board)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // not checked
+GAME( 1997, orlegend105k, orlegend, pgm_asic3, orlegendk, pgm_asic3_state, init_orlegend, ROT0, "IGS", "Oriental Legend / Xiyou Shi E Chuan (ver. 105, Korean Board)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // V0000 no date! - runs as Korea
//Dragon World II
//中國龍II/Zhōngguó lóng II (China, Taiwan, Japan; Traditional Chinese only in title screen)
//東方之珠II/Dung1Fong1 Zi1 Zyu1 II (Hong Kong)/dongbang jiju II (Korea(undumped))
-GAME( 1997, drgw2, pgm, pgm_012_025_drgw2, pgm, pgm_012_025_state, init_drgw2, ROT0, "IGS", "Dragon World II (ver. 110X, Export)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
-GAME( 1997, dw2v100x, drgw2, pgm_012_025_drgw2, pgm, pgm_012_025_state, init_dw2v100x, ROT0, "IGS", "Dragon World II (ver. 100X, Export)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
-GAME( 1997, drgw2j, drgw2, pgm_012_025_drgw2, pgm, pgm_012_025_state, init_drgw2j, ROT0, "IGS (Alta license)", "Chuugokuryuu II (ver. 100J, Japan)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
-GAME( 1997, drgw2c, drgw2, pgm_012_025_drgw2, pgm, pgm_012_025_state, init_drgw2c, ROT0, "IGS", "Zhongguo Long II (ver. 100C, China)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
-GAME( 1997, drgw2hk, drgw2, pgm_012_025_drgw2, pgm, pgm_012_025_state, init_drgw2hk, ROT0, "IGS", "Dungfong Zi Zyu II (ver. 100H, Hong Kong)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING ) // (region is shown as Hokg Kong, Dragon World 3 is the same)
+GAME( 1997, drgw2, pgm, pgm_012_025_drgw2, pgm, pgm_012_025_state, init_drgw2, ROT0, "IGS", "Dragon World II (ver. 110X, Export)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
+GAME( 1997, dw2v100x, drgw2, pgm_012_025_drgw2, pgm, pgm_012_025_state, init_dw2v100x, ROT0, "IGS", "Dragon World II (ver. 100X, Export)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
+GAME( 1997, drgw2j, drgw2, pgm_012_025_drgw2, pgm, pgm_012_025_state, init_drgw2j, ROT0, "IGS (Alta license)", "Chuugokuryuu II (ver. 100J, Japan)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
+GAME( 1997, drgw2c, drgw2, pgm_012_025_drgw2, pgm, pgm_012_025_state, init_drgw2c, ROT0, "IGS", "Zhongguo Long II (ver. 100C, China)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
+GAME( 1997, drgw2hk, drgw2, pgm_012_025_drgw2, pgm, pgm_012_025_state, init_drgw2hk, ROT0, "IGS", "Dungfong Zi Zyu II (ver. 100H, Hong Kong)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING ) // (region is shown as Hokg Kong, Dragon World 3 is the same)
//The Killing Blade
//傲剑狂刀/Ào jiàn kuáng dāo (China, Hong Kong; Simplified Chinese)
//傲劍狂刀/Ào jiàn kuáng dāo (Taiwan; Traditional Chinese)
-GAME( 1998, killbld, pgm, pgm_022_025_killbld, killbld, pgm_022_025_state, init_killbld, ROT0, "IGS", "The Killing Blade / Ao Jian Kuang Dao (ver. 109, Chinese Board)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) /* region provided by protection device */
-GAME( 1998, killbld104, killbld, pgm_022_025_killbld, killbld, pgm_022_025_state, init_killbld, ROT0, "IGS", "The Killing Blade / Ao Jian Kuang Dao (ver. 104)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) /* region provided by protection device */
-GAME( 1998, killbld106, killbld, pgm_022_025_killbld, killbld, pgm_022_025_state, init_killbld, ROT0, "IGS", "The Killing Blade / Ao Jian Kuang Dao (ver. 106)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) /* region provided by protection device */
+GAME( 1998, killbld, pgm, pgm_022_025_killbld, killbld, pgm_022_025_state, init_killbld, ROT0, "IGS", "The Killing Blade / Ao Jian Kuang Dao (ver. 109, Chinese Board)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) /* region provided by protection device */
+GAME( 1998, killbld104, killbld, pgm_022_025_killbld, killbld, pgm_022_025_state, init_killbld, ROT0, "IGS", "The Killing Blade / Ao Jian Kuang Dao (ver. 104)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) /* region provided by protection device */
+GAME( 1998, killbld106, killbld, pgm_022_025_killbld, killbld, pgm_022_025_state, init_killbld, ROT0, "IGS", "The Killing Blade / Ao Jian Kuang Dao (ver. 106)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) /* region provided by protection device */
//中國龍3/Zhōngguó lóng 3 (China, Taiwan, Japan; Traditional chinese only in title screen)
//東方之珠3/Dung1Fong1 Zi1 Zyu1 3 (Hong Kong)/dongbang jiju 3 (Korea)
// these seem playable but the DMA mode transfering 68k code to RAM is not emulated so there could still be problems
// when set to Japan it has the extra subtitle and so gets referred to as Dragon World 3 Special / Chuugokuryuu 3 Special. The earliest versions seem to only contain the code for the Japanese region, presumably the support for other regions was added later.
-GAME( 1998, drgw3, pgm, pgm_022_025_dw3, dw3, pgm_022_025_state, init_drgw3, ROT0, "IGS", "Dragon World 3 / Zhongguo Long 3 / Dungfong Zi Zyu 3 / Chuugokuryuu 3 Special (ver. 106)", MACHINE_UNEMULATED_PROTECTION | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) /* region provided by protection device */
-GAME( 1998, drgw3105, drgw3, pgm_022_025_dw3, dw3, pgm_022_025_state, init_drgw3, ROT0, "IGS", "Dragon World 3 / Zhongguo Long 3 / Dungfong Zi Zyu 3 / Chuugokuryuu 3 Special (ver. 105)", MACHINE_UNEMULATED_PROTECTION | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) /* region provided by protection device */
-GAME( 1998, drgw3103, drgw3, pgm_022_025_dw3, dw3, pgm_022_025_state, init_drgw3, ROT0, "IGS", "Chuugokuryuu 3 Special (Japan, ver. 103)", MACHINE_UNEMULATED_PROTECTION | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // Japan only, has an extra game mode option!
-GAME( 1998, drgw3100, drgw3, pgm_022_025_dw3, dw3j, pgm_022_025_state, init_drgw3, ROT0, "IGS", "Chuugokuryuu 3 Special (Japan, ver. 100)", MACHINE_UNEMULATED_PROTECTION | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // ^
+GAME( 1998, drgw3, pgm, pgm_022_025_dw3, dw3, pgm_022_025_state, init_drgw3, ROT0, "IGS", "Dragon World 3 / Zhongguo Long 3 / Dungfong Zi Zyu 3 / Chuugokuryuu 3 Special (ver. 106)", MACHINE_UNEMULATED_PROTECTION | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) /* region provided by protection device */
+GAME( 1998, drgw3105, drgw3, pgm_022_025_dw3, dw3, pgm_022_025_state, init_drgw3, ROT0, "IGS", "Dragon World 3 / Zhongguo Long 3 / Dungfong Zi Zyu 3 / Chuugokuryuu 3 Special (ver. 105)", MACHINE_UNEMULATED_PROTECTION | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) /* region provided by protection device */
+GAME( 1998, drgw3103, drgw3, pgm_022_025_dw3, dw3, pgm_022_025_state, init_drgw3, ROT0, "IGS", "Chuugokuryuu 3 Special (Japan, ver. 103)", MACHINE_UNEMULATED_PROTECTION | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // Japan only, has an extra game mode option!
+GAME( 1998, drgw3100, drgw3, pgm_022_025_dw3, dw3j, pgm_022_025_state, init_drgw3, ROT0, "IGS", "Chuugokuryuu 3 Special (Japan, ver. 100)", MACHINE_UNEMULATED_PROTECTION | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // ^
// Share title screen graphics and region as drgw3
-GAME( 2000, dwex, pgm, pgm_022_025_dw3, dw3, pgm_022_025_state, init_drgw3, ROT0, "IGS", "Dragon World 3 EX / Zhongguo Long 3 EX / Dungfong Zi Zyu 3 EX / Chuugokuryuu 3 EX (ver. 100)", MACHINE_UNEMULATED_PROTECTION | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) /* region provided by protection device */
-GAME( 2001, dwex101cn, dwex, pgm_022_025_dw3, dw3, pgm_022_025_state, init_drgw3, ROT0, "IGS", "Dragon World 3 EX / Zhongguo Long 3 EX / Dungfong Zi Zyu 3 EX / Chuugokuryuu 3 EX (ver. 101CN)", MACHINE_UNEMULATED_PROTECTION | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) /* region provided by protection device */
+GAME( 2000, dwex, pgm, pgm_022_025_dw3, dw3, pgm_022_025_state, init_drgw3, ROT0, "IGS", "Dragon World 3 EX / Zhongguo Long 3 EX / Dungfong Zi Zyu 3 EX / Chuugokuryuu 3 EX (ver. 100)", MACHINE_UNEMULATED_PROTECTION | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) /* region provided by protection device */
+GAME( 2001, dwex101cn, dwex, pgm_022_025_dw3, dw3, pgm_022_025_state, init_drgw3, ROT0, "IGS", "Dragon World 3 EX / Zhongguo Long 3 EX / Dungfong Zi Zyu 3 EX / Chuugokuryuu 3 EX (ver. 101CN)", MACHINE_UNEMULATED_PROTECTION | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) /* region provided by protection device */
//超級比一比/Chāojí bǐ yī bǐ (Taiwan)
//大家来找碴/Dàjiā lái zhǎo chá/Daai6gaa1 Loi4 Zaau2 Caa4 (China, Hong Kong)
//リアルアンドフェイク/Riaruandofeiku(Real and Fake) (Japan)
// region provided by internal ARM rom
-GAME( 1999, photoy2k, pgm, pgm_arm_type1, photoy2k, pgm_arm_type1_state, init_photoy2k, ROT0, "IGS", "Photo Y2K / Chaoji Bi Yi Bi / Dajia Lai Zhao Cha / Real and Fake (ver. 105)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) /* region provided by protection device */
-GAME( 1999, photoy2k104, photoy2k, pgm_arm_type1, photoy2k, pgm_arm_type1_state, init_photoy2k, ROT0, "IGS", "Photo Y2K / Chaoji Bi Yi Bi / Dajia Lai Zhao Cha / Real and Fake (ver. 104)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) /* region provided by protection device */
-GAME( 1999, photoy2k103j, photoy2k, pgm_arm_type1, photoy2kj, pgm_arm_type1_state, init_photoy2k, ROT0, "IGS", "Photo Y2K / Chaoji Bi Yi Bi / Dajia Lai Zhao Cha / Real and Fake (ver. 103, Japanese Board)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) /* region provided by protection device */
-GAME( 1999, photoy2k102, photoy2k, pgm_arm_type1, photoy2k, pgm_arm_type1_state, init_photoy2k, ROT0, "IGS", "Photo Y2K / Chaoji Bi Yi Bi / Dajia Lai Zhao Cha / Real and Fake (ver. 102, Japanese Board)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) /* region provided by protection device */
+GAME( 1999, photoy2k, pgm, pgm_arm_type1, photoy2k, pgm_arm_type1_state, init_photoy2k, ROT0, "IGS", "Photo Y2K / Chaoji Bi Yi Bi / Dajia Lai Zhao Cha / Real and Fake (ver. 105)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) /* region provided by protection device */
+GAME( 1999, photoy2k104, photoy2k, pgm_arm_type1, photoy2k, pgm_arm_type1_state, init_photoy2k, ROT0, "IGS", "Photo Y2K / Chaoji Bi Yi Bi / Dajia Lai Zhao Cha / Real and Fake (ver. 104)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) /* region provided by protection device */
+GAME( 1999, photoy2k103j, photoy2k, pgm_arm_type1, photoy2kj, pgm_arm_type1_state, init_photoy2k, ROT0, "IGS", "Photo Y2K / Chaoji Bi Yi Bi / Dajia Lai Zhao Cha / Real and Fake (ver. 103, Japanese Board)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) /* region provided by protection device */
+GAME( 1999, photoy2k102, photoy2k, pgm_arm_type1, photoy2k, pgm_arm_type1_state, init_photoy2k, ROT0, "IGS", "Photo Y2K / Chaoji Bi Yi Bi / Dajia Lai Zhao Cha / Real and Fake (ver. 102, Japanese Board)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) /* region provided by protection device */
//三国战纪风云再起/Sānguó zhàn jì Fēngyún zàiqǐ (China, Hong Kong; Simplified Chinese)
//三國戰紀風雲再起/Sānguó zhàn jì Fēngyún zàiqǐ (Taiwan; Traditional Chinese)
//三國戰紀 Superheroes/Sangoku-Senki Superheroes (Japan; Traditional Chinese)
// region provided by internal ARM rom
-GAME( 1999, kovsh, pgm, pgm_arm_type1, kovsh, pgm_arm_type1_state, init_kovsh, ROT0, "IGS", "Knights of Valour Super Heroes / Sanguo Zhan Ji Fengyun Zaiqi / Sangoku Senki Super Heroes (ver. 104, CN)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // 68k: SANGO EX V104 03/24/00 11:15:25, ARM: China internal ROM
-GAME( 1999, kovsh103, kovsh, pgm_arm_type1, kovsh, pgm_arm_type1_state, init_kovsh, ROT0, "IGS", "Knights of Valour Super Heroes / Sanguo Zhan Ji Fengyun Zaiqi / Sangoku Senki Super Heroes (ver. 103, CN)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // 68k: SANGO EX V103 01/18/00 17:37:12, ARM: China internal ROM
-GAME( 1999, kovsh102, kovsh, pgm_arm_type1, kovsh, pgm_arm_type1_state, init_kovsh, ROT0, "IGS", "Knights of Valour Super Heroes / Sanguo Zhan Ji Fengyun Zaiqi / Sangoku Senki Super Heroes (ver. 102, CN)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // 68k: SANGO EX V102 12/23/99 15:17:57, ARM: China internal ROM
-GAME( 1999, kovsh101, kovsh, pgm_arm_type1, kovsh, pgm_arm_type1_state, init_kovsh, ROT0, "IGS", "Knights of Valour Super Heroes / Sanguo Zhan Ji Fengyun Zaiqi / Sangoku Senki Super Heroes (ver. 101, CN)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // 68k: SANGO EX V101 12/20/99 10:59:05, ARM: China internal ROM
-GAME( 1999, kovsh100, kovsh, pgm_arm_type1, kovsh, pgm_arm_type1_state, init_kovsh, ROT0, "IGS", "Knights of Valour Super Heroes / Sanguo Zhan Ji Fengyun Zaiqi / Sangoku Senki Super Heroes (ver. 100, CN)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // 68k: SANGO EX V100 12/06/99 13:36:04, ARM: China internal ROM
+GAME( 1999, kovsh, pgm, pgm_arm_type1, kovsh, pgm_arm_type1_state, init_kovsh, ROT0, "IGS", "Knights of Valour Super Heroes / Sanguo Zhan Ji Fengyun Zaiqi / Sangoku Senki Super Heroes (ver. 104, CN)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // 68k: SANGO EX V104 03/24/00 11:15:25, ARM: China internal ROM
+GAME( 1999, kovsh103, kovsh, pgm_arm_type1, kovsh, pgm_arm_type1_state, init_kovsh, ROT0, "IGS", "Knights of Valour Super Heroes / Sanguo Zhan Ji Fengyun Zaiqi / Sangoku Senki Super Heroes (ver. 103, CN)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // 68k: SANGO EX V103 01/18/00 17:37:12, ARM: China internal ROM
+GAME( 1999, kovsh102, kovsh, pgm_arm_type1, kovsh, pgm_arm_type1_state, init_kovsh, ROT0, "IGS", "Knights of Valour Super Heroes / Sanguo Zhan Ji Fengyun Zaiqi / Sangoku Senki Super Heroes (ver. 102, CN)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // 68k: SANGO EX V102 12/23/99 15:17:57, ARM: China internal ROM
+GAME( 1999, kovsh101, kovsh, pgm_arm_type1, kovsh, pgm_arm_type1_state, init_kovsh, ROT0, "IGS", "Knights of Valour Super Heroes / Sanguo Zhan Ji Fengyun Zaiqi / Sangoku Senki Super Heroes (ver. 101, CN)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // 68k: SANGO EX V101 12/20/99 10:59:05, ARM: China internal ROM
+GAME( 1999, kovsh100, kovsh, pgm_arm_type1, kovsh, pgm_arm_type1_state, init_kovsh, ROT0, "IGS", "Knights of Valour Super Heroes / Sanguo Zhan Ji Fengyun Zaiqi / Sangoku Senki Super Heroes (ver. 100, CN)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // 68k: SANGO EX V100 12/06/99 13:36:04, ARM: China internal ROM
// 拳皇三国特別版/Quánhuáng sānguó Tèbié bǎn
// nasty modern asian bootleg of Knights of Valour Super Heroes with characters ripped from SNK's The King of Fighters series!
-GAME( 2008, kovqhsgs, kovsh, pgm_arm_type1, kovsh, pgm_arm_type1_state, init_kovqhsgs, ROT0, "bootleg", "Quanhuang Sanguo Tebie Ban (bootleg of Knights of Valour Super Heroes, V303CN, Nov 21 2008 19:03:49)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
+GAME( 2008, kovqhsgs, kovsh, pgm_arm_type1, kovsh, pgm_arm_type1_state, init_kovqhsgs, ROT0, "bootleg", "Quanhuang Sanguo Tebie Ban (bootleg of Knights of Valour Super Heroes, V303CN, Nov 21 2008 19:03:49)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
//三國戰紀2/Sānguó zhàn jì 2 (Traditional Chinese only in title screen)
// region provided by internal ARM rom
-GAME( 2000, kov2, pgm, pgm_arm_type2, kov2, pgm_arm_type2_state, init_kov2, ROT0, "IGS", "Knights of Valour 2 / Sanguo Zhan Ji 2 / Sangoku Senki 2 (ver. 107, 102, 100HK)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // 05/10/01 14:24:08 V107 (Ext. Arm V102, Int. Arm V100HK)
-GAME( 2000, kov2106, kov2, pgm_arm_type2, kov2, pgm_arm_type2_state, init_kov2, ROT0, "IGS", "Knights of Valour 2 / Sanguo Zhan Ji 2 / Sangoku Senki 2 (ver. 106, 102, 100HK)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // 02/27/01 13:26:46 V106 (Ext. Arm V102, Int. Arm V100HK)
-GAME( 2000, kov2104, kov2, pgm_arm_type2, kov2, pgm_arm_type2_state, init_kov2, ROT0, "IGS", "Knights of Valour 2 / Sanguo Zhan Ji 2 / Sangoku Senki 2 (ver. 104, 102, 100HK)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // 01/19/01 10:19:38 V104 (Ext. Arm V102, Int. Arm V100HK)
-GAME( 2000, kov2103, kov2, pgm_arm_type2, kov2, pgm_arm_type2_state, init_kov2, ROT0, "IGS", "Knights of Valour 2 / Sanguo Zhan Ji 2 / Sangoku Senki 2 (ver. 103, 101, 100HK)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // 12/28/00 15:09:31 V103 (Ext. Arm V101, Int. Arm V100HK)
-GAME( 2000, kov2102, kov2, pgm_arm_type2, kov2, pgm_arm_type2_state, init_kov2, ROT0, "IGS", "Knights of Valour 2 / Sanguo Zhan Ji 2 / Sangoku Senki 2 (ver. 102, 101, 100HK)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // 12/14/00 10:33:36 V102 (Ext. Arm V101, Int. Arm V100HK)
-GAME( 2000, kov2101, kov2, pgm_arm_type2, kov2, pgm_arm_type2_state, init_kov2, ROT0, "IGS", "Knights of Valour 2 / Sanguo Zhan Ji 2 / Sangoku Senki 2 (ver. 101, 101, 100HK)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // 11/29/00 11:03:08 V100 (Ext. Arm V100, Int. Arm V100HK)
-GAME( 2000, kov2100, kov2, pgm_arm_type2, kov2, pgm_arm_type2_state, init_kov2, ROT0, "IGS", "Knights of Valour 2 / Sanguo Zhan Ji 2 / Sangoku Senki 2 (ver. 100, 100, 100HK)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // 11/29/00 11:03:08 V100 (Ext. Arm V100, Int. Arm V100HK)
+GAME( 2000, kov2, pgm, pgm_arm_type2, kov2, pgm_arm_type2_state, init_kov2, ROT0, "IGS", "Knights of Valour 2 / Sanguo Zhan Ji 2 / Sangoku Senki 2 (ver. 107, 102, 100HK)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // 05/10/01 14:24:08 V107 (Ext. Arm V102, Int. Arm V100HK)
+GAME( 2000, kov2106, kov2, pgm_arm_type2, kov2, pgm_arm_type2_state, init_kov2, ROT0, "IGS", "Knights of Valour 2 / Sanguo Zhan Ji 2 / Sangoku Senki 2 (ver. 106, 102, 100HK)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // 02/27/01 13:26:46 V106 (Ext. Arm V102, Int. Arm V100HK)
+GAME( 2000, kov2104, kov2, pgm_arm_type2, kov2, pgm_arm_type2_state, init_kov2, ROT0, "IGS", "Knights of Valour 2 / Sanguo Zhan Ji 2 / Sangoku Senki 2 (ver. 104, 102, 100HK)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // 01/19/01 10:19:38 V104 (Ext. Arm V102, Int. Arm V100HK)
+GAME( 2000, kov2103, kov2, pgm_arm_type2, kov2, pgm_arm_type2_state, init_kov2, ROT0, "IGS", "Knights of Valour 2 / Sanguo Zhan Ji 2 / Sangoku Senki 2 (ver. 103, 101, 100HK)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // 12/28/00 15:09:31 V103 (Ext. Arm V101, Int. Arm V100HK)
+GAME( 2000, kov2102, kov2, pgm_arm_type2, kov2, pgm_arm_type2_state, init_kov2, ROT0, "IGS", "Knights of Valour 2 / Sanguo Zhan Ji 2 / Sangoku Senki 2 (ver. 102, 101, 100HK)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // 12/14/00 10:33:36 V102 (Ext. Arm V101, Int. Arm V100HK)
+GAME( 2000, kov2101, kov2, pgm_arm_type2, kov2, pgm_arm_type2_state, init_kov2, ROT0, "IGS", "Knights of Valour 2 / Sanguo Zhan Ji 2 / Sangoku Senki 2 (ver. 101, 101, 100HK)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // 11/29/00 11:03:08 V100 (Ext. Arm V100, Int. Arm V100HK)
+GAME( 2000, kov2100, kov2, pgm_arm_type2, kov2, pgm_arm_type2_state, init_kov2, ROT0, "IGS", "Knights of Valour 2 / Sanguo Zhan Ji 2 / Sangoku Senki 2 (ver. 100, 100, 100HK)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // 11/29/00 11:03:08 V100 (Ext. Arm V100, Int. Arm V100HK)
//三國戰紀2 Nine Dragons/Sānguó zhàn jì 2 Nine Dragons (Overseas)
//三國戰紀2群雄争霸/Sānguó zhàn jì 2 Qúnxióng zhēngbà/Saam1Qwok3 Zin3 Gei2 2 Kwan4Hung4 Zang1Baa3 (China/Hong Kong; Mixed Traditional and Simplified Chinese)
//三國戰紀2飛龍在天/Sānguó zhàn jì 2 Fēilóng zài tiān (Taiwan; Traditional Chinese)
//三國戰紀武将争霸/Sangoku-Senki Bushō Souha (Japan; Mixed Traditional and Simplified Chinese, Busyou Souha in title screen)
// region provided by internal ARM rom (we only have a China internal ROM)
-GAME( 2001, kov2p, pgm, pgm_arm_type2, kov2, pgm_arm_type2_state, init_kov2p, ROT0, "IGS", "Knights of Valour 2 Plus - Nine Dragons / Sanguo Zhan Ji 2 Qunxiong Zhengba / Sanguo Zhan Ji 2 Feilong Zai Tian / Sangoku Senki Busyou Souha (ver. M205XX, 200, 100CN)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // 04/25/02 17:48:27 M205XX
-GAME( 2001, kov2p204, kov2p, pgm_arm_type2, kov2, pgm_arm_type2_state, init_kov2p, ROT0, "IGS", "Knights of Valour 2 Plus - Nine Dragons / Sanguo Zhan Ji 2 Qunxiong Zhengba / Sanguo Zhan Ji 2 Feilong Zai Tian / Sangoku Senki Busyou Souha (ver. M204XX, 200, 100CN)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // 08/28/01 09:11:49 M204XX
-GAME( 2001, kov2p202, kov2p, pgm_arm_type2, kov2, pgm_arm_type2_state, init_kov2p, ROT0, "IGS", "Knights of Valour 2 Plus - Nine Dragons / Sanguo Zhan Ji 2 Qunxiong Zhengba / Sanguo Zhan Ji 2 Feilong Zai Tian / Sangoku Senki Busyou Souha (ver. M202XX, 200, 100CN)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // 07/09/01 11:03:50 M202XX
-GAME( 2001, kov2p200, kov2p, pgm_arm_type2, kov2, pgm_arm_type2_state, init_kov2p, ROT0, "IGS", "Knights of Valour 2 Plus - Nine Dragons / Sanguo Zhan Ji 2 Qunxiong Zhengba / Sanguo Zhan Ji 2 Feilong Zai Tian / Sangoku Senki Busyou Souha (ver. M200XX, 200, 100CN)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // 06/18/01 22:59:12 M200XX
+GAME( 2001, kov2p, pgm, pgm_arm_type2, kov2, pgm_arm_type2_state, init_kov2p, ROT0, "IGS", "Knights of Valour 2 Plus - Nine Dragons / Sanguo Zhan Ji 2 Qunxiong Zhengba / Sanguo Zhan Ji 2 Feilong Zai Tian / Sangoku Senki Busyou Souha (ver. M205XX, 200, 100CN)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // 04/25/02 17:48:27 M205XX
+GAME( 2001, kov2p204, kov2p, pgm_arm_type2, kov2, pgm_arm_type2_state, init_kov2p, ROT0, "IGS", "Knights of Valour 2 Plus - Nine Dragons / Sanguo Zhan Ji 2 Qunxiong Zhengba / Sanguo Zhan Ji 2 Feilong Zai Tian / Sangoku Senki Busyou Souha (ver. M204XX, 200, 100CN)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // 08/28/01 09:11:49 M204XX
+GAME( 2001, kov2p202, kov2p, pgm_arm_type2, kov2, pgm_arm_type2_state, init_kov2p, ROT0, "IGS", "Knights of Valour 2 Plus - Nine Dragons / Sanguo Zhan Ji 2 Qunxiong Zhengba / Sanguo Zhan Ji 2 Feilong Zai Tian / Sangoku Senki Busyou Souha (ver. M202XX, 200, 100CN)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // 07/09/01 11:03:50 M202XX
+GAME( 2001, kov2p200, kov2p, pgm_arm_type2, kov2, pgm_arm_type2_state, init_kov2p, ROT0, "IGS", "Knights of Valour 2 Plus - Nine Dragons / Sanguo Zhan Ji 2 Qunxiong Zhengba / Sanguo Zhan Ji 2 Feilong Zai Tian / Sangoku Senki Busyou Souha (ver. M200XX, 200, 100CN)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // 06/18/01 22:59:12 M200XX
//形意拳/Xíng yì quán/Sin ī ken(Japanese label)
// region provided by internal ARM rom
-GAME( 2001, martmast, pgm, pgm_arm_type2_22m, martmast, pgm_arm_type2_state, init_martmast, ROT0, "IGS", "Martial Masters / Xing Yi Quan (ver. 104, 102, 102US)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // 68k V104, Ext Arm 102, Int Arm 102US
-GAME( 2001, martmastc, martmast, pgm_arm_type2_22m, martmast, pgm_arm_type2_state, init_martmast, ROT0, "IGS", "Martial Masters / Xing Yi Quan (ver. 104, 102, 101CN)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // 68k V104, Ext Arm 102, Int Arm 101CN
-GAME( 2001, martmastc103, martmast, pgm_arm_type2_22m, martmast, pgm_arm_type2_state, init_martmast, ROT0, "IGS", "Martial Masters / Xing Yi Quan (ver. 103, 102, 101CN)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // 68k V103, Ext Arm 102, Int Arm 101CN (actually 102 CN on the PCB, needs to be dumped)
-GAME( 2001, martmastc102, martmast, pgm_arm_type2_22m, martmast, pgm_arm_type2_state, init_martmast, ROT0, "IGS", "Martial Masters / Xing Yi Quan (ver. 102, 101, 101CN)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // 68k V102, Ext Arm 101, Int Arm 101CN
-GAME( 2001, martmasttw, martmast, pgm_arm_type2_22m, martmast, pgm_arm_type2_state, init_martmast, ROT0, "IGS", "Martial Masters / Xing Yi Quan (ver. 102, 101, 101TW)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING ) // 68k V102, Ext Arm 101, Int Arm 101TW
+GAME( 2001, martmast, pgm, pgm_arm_type2_22m, martmast, pgm_arm_type2_state, init_martmast, ROT0, "IGS", "Martial Masters / Xing Yi Quan (ver. 104, 102, 102US)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // 68k V104, Ext Arm 102, Int Arm 102US
+GAME( 2001, martmastc, martmast, pgm_arm_type2_22m, martmast, pgm_arm_type2_state, init_martmast, ROT0, "IGS", "Martial Masters / Xing Yi Quan (ver. 104, 102, 101CN)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // 68k V104, Ext Arm 102, Int Arm 101CN
+GAME( 2001, martmastc103, martmast, pgm_arm_type2_22m, martmast, pgm_arm_type2_state, init_martmast, ROT0, "IGS", "Martial Masters / Xing Yi Quan (ver. 103, 102, 101CN)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // 68k V103, Ext Arm 102, Int Arm 101CN (actually 102 CN on the PCB, needs to be dumped)
+GAME( 2001, martmastc102, martmast, pgm_arm_type2_22m, martmast, pgm_arm_type2_state, init_martmast, ROT0, "IGS", "Martial Masters / Xing Yi Quan (ver. 102, 101, 101CN)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // 68k V102, Ext Arm 101, Int Arm 101CN
+GAME( 2001, martmasttw, martmast, pgm_arm_type2_22m, martmast, pgm_arm_type2_state, init_martmast, ROT0, "IGS", "Martial Masters / Xing Yi Quan (ver. 102, 101, 101TW)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING ) // 68k V102, Ext Arm 101, Int Arm 101TW
//蜂暴/Fēng bào (Chinese, Title call excepting Japan)/Fung1 Bou6 (Hong Kong, Jyutping)
// region provided by internal ARM rom
-GAME( 2001, ddp2, pgm, pgm_arm_type2, pgm, pgm_arm_type2_state, init_ddp2, ROT270, "IGS", "DoDonPachi II - Bee Storm (World, ver. 102)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
-GAME( 2001, ddp2101, ddp2, pgm_arm_type2, pgm, pgm_arm_type2_state, init_ddp2, ROT270, "IGS", "DoDonPachi II - Bee Storm (World, ver. 101)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
-GAME( 2001, ddp2100, ddp2, pgm_arm_type2, pgm, pgm_arm_type2_state, init_ddp2, ROT270, "IGS", "DoDonPachi II - Bee Storm (World, ver. 100)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
-GAME( 2001, ddp2hk, ddp2, pgm_arm_type2, pgm, pgm_arm_type2_state, init_ddp2, ROT270, "IGS", "DoDonPachi II - Fung Bou (Hong Kong, ver. 102)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
-GAME( 2001, ddp2101hk, ddp2, pgm_arm_type2, pgm, pgm_arm_type2_state, init_ddp2, ROT270, "IGS", "DoDonPachi II - Fung Bou (Hong Kong, ver. 101)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
-GAME( 2001, ddp2100hk, ddp2, pgm_arm_type2, pgm, pgm_arm_type2_state, init_ddp2, ROT270, "IGS", "DoDonPachi II - Fung Bou (Hong Kong, ver. 100)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
-GAME( 2001, ddp2k, ddp2, pgm_arm_type2, pgm, pgm_arm_type2_state, init_ddp2, ROT270, "IGS", "DoDonPachi II - Bee Storm (Korea, ver. 102)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
-GAME( 2001, ddp2101k, ddp2, pgm_arm_type2, pgm, pgm_arm_type2_state, init_ddp2, ROT270, "IGS", "DoDonPachi II - Bee Storm (Korea, ver. 101)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
-GAME( 2001, ddp2100k, ddp2, pgm_arm_type2, pgm, pgm_arm_type2_state, init_ddp2, ROT270, "IGS", "DoDonPachi II - Bee Storm (Korea, ver. 100)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
-GAME( 2001, ddp2j, ddp2, pgm_arm_type2, pgm, pgm_arm_type2_state, init_ddp2, ROT270, "IGS (Cave license)", "DoDonPachi II (Japan, ver. 102)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
-GAME( 2001, ddp2101j, ddp2, pgm_arm_type2, pgm, pgm_arm_type2_state, init_ddp2, ROT270, "IGS (Cave license)", "DoDonPachi II (Japan, ver. 101)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
-GAME( 2001, ddp2100j, ddp2, pgm_arm_type2, pgm, pgm_arm_type2_state, init_ddp2, ROT270, "IGS (Cave license)", "DoDonPachi II (Japan, ver. 100)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
-GAME( 2001, ddp2t, ddp2, pgm_arm_type2, pgm, pgm_arm_type2_state, init_ddp2, ROT270, "IGS", "DoDonPachi - Feng Bao (Taiwan, ver. 102)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
-GAME( 2001, ddp2101t, ddp2, pgm_arm_type2, pgm, pgm_arm_type2_state, init_ddp2, ROT270, "IGS", "DoDonPachi - Feng Bao (Taiwan, ver. 101)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
-GAME( 2001, ddp2100t, ddp2, pgm_arm_type2, pgm, pgm_arm_type2_state, init_ddp2, ROT270, "IGS", "DoDonPachi - Feng Bao (Taiwan, ver. 100)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
-GAME( 2001, ddp2c, ddp2, pgm_arm_type2, pgm, pgm_arm_type2_state, init_ddp2, ROT270, "IGS", "DoDonPachi - Feng Bao (China, ver. 102)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
-GAME( 2001, ddp2101c, ddp2, pgm_arm_type2, pgm, pgm_arm_type2_state, init_ddp2, ROT270, "IGS", "DoDonPachi - Feng Bao (China, ver. 101)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
-GAME( 2001, ddp2100c, ddp2, pgm_arm_type2, pgm, pgm_arm_type2_state, init_ddp2, ROT270, "IGS", "DoDonPachi - Feng Bao (China, ver. 100)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
+GAME( 2001, ddp2, pgm, pgm_arm_type2, pgm, pgm_arm_type2_state, init_ddp2, ROT270, "IGS", "DoDonPachi II - Bee Storm (World, ver. 102)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
+GAME( 2001, ddp2101, ddp2, pgm_arm_type2, pgm, pgm_arm_type2_state, init_ddp2, ROT270, "IGS", "DoDonPachi II - Bee Storm (World, ver. 101)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
+GAME( 2001, ddp2100, ddp2, pgm_arm_type2, pgm, pgm_arm_type2_state, init_ddp2, ROT270, "IGS", "DoDonPachi II - Bee Storm (World, ver. 100)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
+GAME( 2001, ddp2hk, ddp2, pgm_arm_type2, pgm, pgm_arm_type2_state, init_ddp2, ROT270, "IGS", "DoDonPachi II - Fung Bou (Hong Kong, ver. 102)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
+GAME( 2001, ddp2101hk, ddp2, pgm_arm_type2, pgm, pgm_arm_type2_state, init_ddp2, ROT270, "IGS", "DoDonPachi II - Fung Bou (Hong Kong, ver. 101)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
+GAME( 2001, ddp2100hk, ddp2, pgm_arm_type2, pgm, pgm_arm_type2_state, init_ddp2, ROT270, "IGS", "DoDonPachi II - Fung Bou (Hong Kong, ver. 100)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
+GAME( 2001, ddp2k, ddp2, pgm_arm_type2, pgm, pgm_arm_type2_state, init_ddp2, ROT270, "IGS", "DoDonPachi II - Bee Storm (Korea, ver. 102)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
+GAME( 2001, ddp2101k, ddp2, pgm_arm_type2, pgm, pgm_arm_type2_state, init_ddp2, ROT270, "IGS", "DoDonPachi II - Bee Storm (Korea, ver. 101)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
+GAME( 2001, ddp2100k, ddp2, pgm_arm_type2, pgm, pgm_arm_type2_state, init_ddp2, ROT270, "IGS", "DoDonPachi II - Bee Storm (Korea, ver. 100)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
+GAME( 2001, ddp2j, ddp2, pgm_arm_type2, pgm, pgm_arm_type2_state, init_ddp2, ROT270, "IGS (Cave license)", "DoDonPachi II (Japan, ver. 102)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
+GAME( 2001, ddp2101j, ddp2, pgm_arm_type2, pgm, pgm_arm_type2_state, init_ddp2, ROT270, "IGS (Cave license)", "DoDonPachi II (Japan, ver. 101)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
+GAME( 2001, ddp2100j, ddp2, pgm_arm_type2, pgm, pgm_arm_type2_state, init_ddp2, ROT270, "IGS (Cave license)", "DoDonPachi II (Japan, ver. 100)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
+GAME( 2001, ddp2t, ddp2, pgm_arm_type2, pgm, pgm_arm_type2_state, init_ddp2, ROT270, "IGS", "DoDonPachi - Feng Bao (Taiwan, ver. 102)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
+GAME( 2001, ddp2101t, ddp2, pgm_arm_type2, pgm, pgm_arm_type2_state, init_ddp2, ROT270, "IGS", "DoDonPachi - Feng Bao (Taiwan, ver. 101)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
+GAME( 2001, ddp2100t, ddp2, pgm_arm_type2, pgm, pgm_arm_type2_state, init_ddp2, ROT270, "IGS", "DoDonPachi - Feng Bao (Taiwan, ver. 100)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
+GAME( 2001, ddp2c, ddp2, pgm_arm_type2, pgm, pgm_arm_type2_state, init_ddp2, ROT270, "IGS", "DoDonPachi - Feng Bao (China, ver. 102)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
+GAME( 2001, ddp2101c, ddp2, pgm_arm_type2, pgm, pgm_arm_type2_state, init_ddp2, ROT270, "IGS", "DoDonPachi - Feng Bao (China, ver. 101)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
+GAME( 2001, ddp2100c, ddp2, pgm_arm_type2, pgm, pgm_arm_type2_state, init_ddp2, ROT270, "IGS", "DoDonPachi - Feng Bao (China, ver. 100)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
// japan region only? service mode calls it Dragon World 2001 so I'm leaving that title in the description
-GAME( 2001, dw2001, pgm, pgm_arm_type2_22m, dw2001, pgm_arm_type2_state, init_dw2001, ROT0, "IGS", "Chuugokuryuu 2001 [Dragon World 2001] (V100 02/21/01 16:05:16, Japan)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // 02/21/01 16:05:16
+GAME( 2001, dw2001, pgm, pgm_arm_type2_22m, dw2001, pgm_arm_type2_state, init_dw2001, ROT0, "IGS", "Chuugokuryuu 2001 [Dragon World 2001] (V100 02/21/01 16:05:16, Japan)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // 02/21/01 16:05:16
// japan region only? service mode calls it Dragon World Pretty Chance so I'm leaving that title in the description
// english / chinese version also exists
-GAME( 2001, dwpc, pgm, pgm_arm_type2_22m, dw2001, pgm_arm_type2_state, init_dwpc, ROT0, "IGS", "Chuugokuryuu Pretty Chance [Dragon World Pretty Chance] (V101 09/26/01 10:23:26, Japan)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // 09/26/01 10:23:26
+GAME( 2001, dwpc, pgm, pgm_arm_type2_22m, dw2001, pgm_arm_type2_state, init_dwpc, ROT0, "IGS", "Chuugokuryuu Pretty Chance [Dragon World Pretty Chance] (V101 09/26/01 10:23:26, Japan)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // 09/26/01 10:23:26
//魔域戰線/Móyù zhànxiàn (Traditional Chinese)
//魔域战线/Móyù zhànxiàn (Simplified Chinese)
// we bypass the internal ARM rom on these, ideally it should still be dumped tho! the region screens show a blank string where the internal ROM revision would otherwise be displayed
// ARM version strings don't match 100% with labels... for 68k ROMs I'm using the build time / date stamp from near the start of the rom, there are some slightly different time stamps later
-GAME( 2002, dmnfrnt, pgm, pgm_arm_type3_22m, pgm, pgm_arm_type3_state, init_dmnfrnt, ROT0, "IGS", "Demon Front / Moyu Zhanxian (68k label V105, ROM M105XX 08/05/02) (ARM label V105, ROM 08/05/02 S105XX)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // 68k time: 10:24:11 ARM time: 10:33:23
-GAME( 2002, dmnfrntb, dmnfrnt, pgm_arm_type3_22m, pgm, pgm_arm_type3_state, init_dmnfrnt, ROT0, "IGS", "Demon Front / Moyu Zhanxian (68k label V103, ROM M103XX 07/05/02) (ARM label V103, ROM 07/05/02 S103XX)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // 68k time: 14:43:13 ARM time: 11:04:24
-GAME( 2002, dmnfrnta, dmnfrnt, pgm_arm_type3_22m, pgm, pgm_arm_type3_state, init_dmnfrnt, ROT0, "IGS", "Demon Front / Moyu Zhanxian (68k label V102, ROM M102XX 06/19/02) (ARM label V102, ROM 05/24/02 S101XX)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // 68k time: 13:44:08 ARM time: 13:04:31 (from the strings it looks like V102 only upgraded the 68k ROM)
-GAME( 2002, dmnfrntpcb, dmnfrnt, pgm_arm_type3_24m, pgm, pgm_arm_type3_state, init_dmnfrnt, ROT0, "IGS", "Demon Front V1.1 / Moyu Zhanxian V1.1 (68k label V107KR, ROM M107KR 11/03/03) (ARM label V106KR, ROM 10/16/03 S106KR) (JAMMA PCB)", MACHINE_IMPERFECT_SOUND | MACHINE_UNEMULATED_PROTECTION | MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // works but reports version mismatch (wants internal rom version and region to match external?)
+GAME( 2002, dmnfrnt, pgm, pgm_arm_type3_22m, pgm, pgm_arm_type3_state, init_dmnfrnt, ROT0, "IGS", "Demon Front / Moyu Zhanxian (68k label V105, ROM M105XX 08/05/02) (ARM label V105, ROM 08/05/02 S105XX)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // 68k time: 10:24:11 ARM time: 10:33:23
+GAME( 2002, dmnfrntb, dmnfrnt, pgm_arm_type3_22m, pgm, pgm_arm_type3_state, init_dmnfrnt, ROT0, "IGS", "Demon Front / Moyu Zhanxian (68k label V103, ROM M103XX 07/05/02) (ARM label V103, ROM 07/05/02 S103XX)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // 68k time: 14:43:13 ARM time: 11:04:24
+GAME( 2002, dmnfrnta, dmnfrnt, pgm_arm_type3_22m, pgm, pgm_arm_type3_state, init_dmnfrnt, ROT0, "IGS", "Demon Front / Moyu Zhanxian (68k label V102, ROM M102XX 06/19/02) (ARM label V102, ROM 05/24/02 S101XX)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // 68k time: 13:44:08 ARM time: 13:04:31 (from the strings it looks like V102 only upgraded the 68k ROM)
+GAME( 2002, dmnfrntpcb, dmnfrnt, pgm_arm_type3_24m, pgm, pgm_arm_type3_state, init_dmnfrnt, ROT0, "IGS", "Demon Front V1.1 / Moyu Zhanxian V1.1 (68k label V107KR, ROM M107KR 11/03/03) (ARM label V106KR, ROM 10/16/03 S106KR) (JAMMA PCB)", MACHINE_IMPERFECT_SOUND | MACHINE_UNEMULATED_PROTECTION | MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // works but reports version mismatch (wants internal rom version and region to match external?)
/* these don't use an External ARM rom, and don't have any weak internal functions which would allow the internal ROM to be read out */
-GAME( 2002, ddp3, 0, pgm_arm_type1_cave, ddp3, pgm_arm_type1_state, init_ddp3, ROT270, "Cave (AMI license)", "DoDonPachi III (World, 2002.05.15 Master Ver)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
-GAME( 2002, ddpdoj, ddp3, pgm_arm_type1_cave, ddp3, pgm_arm_type1_state, init_ddp3, ROT270, "Cave (AMI license)", "DoDonPachi Dai-Ou-Jou (Japan, 2002.04.05.Master Ver, 68k Label V101)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // is there a v101 without the . after 05?
-GAME( 2002, ddpdoja, ddp3, pgm_arm_type1_cave, ddp3, pgm_arm_type1_state, init_ddp3, ROT270, "Cave (AMI license)", "DoDonPachi Dai-Ou-Jou (Japan, 2002.04.05.Master Ver, 68k Label V100)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
-GAME( 2002, ddpdojb, ddp3, pgm_arm_type1_cave, ddp3, pgm_arm_type1_state, init_ddp3, ROT270, "Cave (AMI license)", "DoDonPachi Dai-Ou-Jou (Japan, 2002.04.05 Master Ver)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
-GAME( 2002, ddpdojblk, ddp3, pgm_arm_type1_cave, ddp3, pgm_arm_type1_state, init_ddp3, ROT270, "Cave (AMI license)", "DoDonPachi Dai-Ou-Jou Black Label (Japan, 2002.10.07.Black Ver)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // Displays "2002.04.05.Master Ver" (old) or "2002.10.07.Black Ver" (new)
-GAME( 2002, ddpdojblka, ddp3, pgm_arm_type1_cave, ddp3, pgm_arm_type1_state, init_ddp3, ROT270, "Cave (AMI license)", "DoDonPachi Dai-Ou-Jou Black Label (Japan, 2002.10.07 Black Ver)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // Displays "2002.04.05.Master Ver" (old) or "2002.10.07 Black Ver" (new)
-GAME( 2012, ddpdojblkbl,ddp3, pgm_arm_type1, pgm, pgm_arm_type1_state, init_kovsh, ROT270, "bootleg", "DoDonPachi Dai-Ou-Jou Black Label (Japan, 2002.10.07 Black Ver., bootleg Knights of Valour Super Heroes conversion)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // the extra . in the revision has been added by bootlegger
+GAME( 2002, ddp3, 0, pgm_arm_type1_cave, ddp3, pgm_arm_type1_state, init_ddp3, ROT270, "Cave (AMI license)", "DoDonPachi III (World, 2002.05.15 Master Ver)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
+GAME( 2002, ddpdoj, ddp3, pgm_arm_type1_cave, ddp3, pgm_arm_type1_state, init_ddp3, ROT270, "Cave (AMI license)", "DoDonPachi Dai-Ou-Jou (Japan, 2002.04.05.Master Ver, 68k Label V101)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // is there a v101 without the . after 05?
+GAME( 2002, ddpdoja, ddp3, pgm_arm_type1_cave, ddp3, pgm_arm_type1_state, init_ddp3, ROT270, "Cave (AMI license)", "DoDonPachi Dai-Ou-Jou (Japan, 2002.04.05.Master Ver, 68k Label V100)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
+GAME( 2002, ddpdojb, ddp3, pgm_arm_type1_cave, ddp3, pgm_arm_type1_state, init_ddp3, ROT270, "Cave (AMI license)", "DoDonPachi Dai-Ou-Jou (Japan, 2002.04.05 Master Ver)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
+GAME( 2002, ddpdojblk, ddp3, pgm_arm_type1_cave, ddp3, pgm_arm_type1_state, init_ddp3, ROT270, "Cave (AMI license)", "DoDonPachi Dai-Ou-Jou Black Label (Japan, 2002.10.07.Black Ver)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // Displays "2002.04.05.Master Ver" (old) or "2002.10.07.Black Ver" (new)
+GAME( 2002, ddpdojblka, ddp3, pgm_arm_type1_cave, ddp3, pgm_arm_type1_state, init_ddp3, ROT270, "Cave (AMI license)", "DoDonPachi Dai-Ou-Jou Black Label (Japan, 2002.10.07 Black Ver)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // Displays "2002.04.05.Master Ver" (old) or "2002.10.07 Black Ver" (new)
+GAME( 2012, ddpdojblkbl,ddp3, pgm_arm_type1, pgm, pgm_arm_type1_state, init_kovsh, ROT270, "bootleg", "DoDonPachi Dai-Ou-Jou Black Label (Japan, 2002.10.07 Black Ver., bootleg Knights of Valour Super Heroes conversion)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // the extra . in the revision has been added by bootlegger
// the exact text of the 'version' shows which revision of the game it is; the newest has 2 '.' symbols in the string, the oldest, none.
// the only difference between 'ket' and 'ket1' is the ROM fill at 0x1443bc-0x1c88cd, on ket1 it seems to be randomized / garbage data, on ket it's all 0xff, both have been seen on more than one PCB.
-GAME( 2002, ket, 0, pgm_arm_type1_cave, ddp3, pgm_arm_type1_state, init_ket, ROT270, "Cave (AMI license)", "Ketsui: Kizuna Jigoku Tachi (2003/01/01. Master Ver.)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
-GAME( 2002, ket1, ket, pgm_arm_type1_cave, ddp3, pgm_arm_type1_state, init_ket, ROT270, "Cave (AMI license)", "Ketsui: Kizuna Jigoku Tachi (2003/01/01. Master Ver.) (alt rom fill)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
-GAME( 2002, keta, ket, pgm_arm_type1_cave, ddp3, pgm_arm_type1_state, init_ket, ROT270, "Cave (AMI license)", "Ketsui: Kizuna Jigoku Tachi (2003/01/01 Master Ver.)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
-GAME( 2002, ketb, ket, pgm_arm_type1_cave, ddp3, pgm_arm_type1_state, init_ket, ROT270, "Cave (AMI license)", "Ketsui: Kizuna Jigoku Tachi (2003/01/01 Master Ver)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
-GAME( 2002, ketbl, ket, pgm_arm_type2, pgm, pgm_arm_type2_state, init_ddp2, ROT270, "bootleg", "Ketsui: Kizuna Jigoku Tachi (2003/01/01. Master Ver., bootleg cartridge conversion)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
+GAME( 2002, ket, 0, pgm_arm_type1_cave, ddp3, pgm_arm_type1_state, init_ket, ROT270, "Cave (AMI license)", "Ketsui: Kizuna Jigoku Tachi (2003/01/01. Master Ver.)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
+GAME( 2002, ket1, ket, pgm_arm_type1_cave, ddp3, pgm_arm_type1_state, init_ket, ROT270, "Cave (AMI license)", "Ketsui: Kizuna Jigoku Tachi (2003/01/01. Master Ver.) (alt rom fill)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
+GAME( 2002, keta, ket, pgm_arm_type1_cave, ddp3, pgm_arm_type1_state, init_ket, ROT270, "Cave (AMI license)", "Ketsui: Kizuna Jigoku Tachi (2003/01/01 Master Ver.)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
+GAME( 2002, ketb, ket, pgm_arm_type1_cave, ddp3, pgm_arm_type1_state, init_ket, ROT270, "Cave (AMI license)", "Ketsui: Kizuna Jigoku Tachi (2003/01/01 Master Ver)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
+GAME( 2002, ketbl, ket, pgm_arm_type2, pgm, pgm_arm_type2_state, init_ddp2, ROT270, "bootleg", "Ketsui: Kizuna Jigoku Tachi (2003/01/01. Master Ver., bootleg cartridge conversion)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
// these are modern hacks, some of them have been seen on original PCBs, also reportedly on a bootleg PCB with mostly original components but the ARM replaced with a custom chip.
// this is a significantly reworked version of the game
-GAME( 2014, ketarr, ket, pgm_arm_type1_cave, ddp3, pgm_arm_type1_state, init_ket, ROT270, "hack (trap15)", "Ketsui: Kizuna Jigoku Tachi (2014/07/16 ARRANGE 1.7 VER) (hack)", MACHINE_SUPPORTS_SAVE )
-GAME( 2012, ketarr151, ket, pgm_arm_type1_cave, ddp3, pgm_arm_type1_state, init_ket, ROT270, "hack (trap15)", "Ketsui: Kizuna Jigoku Tachi (2012/06/26 ARRANGE 1.51 VER) (hack)", MACHINE_SUPPORTS_SAVE ) // this apparently crashes on an original PGM PCB when displaying the text after starting a game, find out why and reproduce the issue in MAME.
-GAME( 2012, ketarr15, ket, pgm_arm_type1_cave, ddp3, pgm_arm_type1_state, init_ket, ROT270, "hack (trap15)", "Ketsui: Kizuna Jigoku Tachi (2012/06/26 ARRANGE 1.5 VER) (hack)", MACHINE_SUPPORTS_SAVE )
-GAME( 2012, ketarr10, ket, pgm_arm_type1_cave, ddp3, pgm_arm_type1_state, init_ket, ROT270, "hack (trap15)", "Ketsui: Kizuna Jigoku Tachi (2012/04/17 ARRANGE VER) (hack)", MACHINE_SUPPORTS_SAVE )
+GAME( 2014, ketarr, ket, pgm_arm_type1_cave, ddp3, pgm_arm_type1_state, init_ket, ROT270, "hack (trap15)", "Ketsui: Kizuna Jigoku Tachi (2014/07/16 ARRANGE 1.7 VER) (hack)", MACHINE_SUPPORTS_SAVE )
+GAME( 2012, ketarr151, ket, pgm_arm_type1_cave, ddp3, pgm_arm_type1_state, init_ket, ROT270, "hack (trap15)", "Ketsui: Kizuna Jigoku Tachi (2012/06/26 ARRANGE 1.51 VER) (hack)", MACHINE_SUPPORTS_SAVE ) // this apparently crashes on an original PGM PCB when displaying the text after starting a game, find out why and reproduce the issue in MAME.
+GAME( 2012, ketarr15, ket, pgm_arm_type1_cave, ddp3, pgm_arm_type1_state, init_ket, ROT270, "hack (trap15)", "Ketsui: Kizuna Jigoku Tachi (2012/06/26 ARRANGE 1.5 VER) (hack)", MACHINE_SUPPORTS_SAVE )
+GAME( 2012, ketarr10, ket, pgm_arm_type1_cave, ddp3, pgm_arm_type1_state, init_ket, ROT270, "hack (trap15)", "Ketsui: Kizuna Jigoku Tachi (2012/04/17 ARRANGE VER) (hack)", MACHINE_SUPPORTS_SAVE )
// these simplify the scoring system
-GAME( 2012, ketarrs151, ket, pgm_arm_type1_cave, ddp3, pgm_arm_type1_state, init_ket, ROT270, "hack (trap15)", "Ketsui: Kizuna Jigoku Tachi (2012/06/27 MR.STOIC 1.51 VER) (hack)", MACHINE_SUPPORTS_SAVE )
-GAME( 2012, ketarrs15, ket, pgm_arm_type1_cave, ddp3, pgm_arm_type1_state, init_ket, ROT270, "hack (trap15)", "Ketsui: Kizuna Jigoku Tachi (2012/06/27 MR.STOIC 1.5 VER) (hack)", MACHINE_SUPPORTS_SAVE )
+GAME( 2012, ketarrs151, ket, pgm_arm_type1_cave, ddp3, pgm_arm_type1_state, init_ket, ROT270, "hack (trap15)", "Ketsui: Kizuna Jigoku Tachi (2012/06/27 MR.STOIC 1.51 VER) (hack)", MACHINE_SUPPORTS_SAVE )
+GAME( 2012, ketarrs15, ket, pgm_arm_type1_cave, ddp3, pgm_arm_type1_state, init_ket, ROT270, "hack (trap15)", "Ketsui: Kizuna Jigoku Tachi (2012/06/27 MR.STOIC 1.5 VER) (hack)", MACHINE_SUPPORTS_SAVE )
// this has the 'programmed slowdown' removed.
-GAME( 2012, ketarrf, ket, pgm_arm_type1_cave, ddp3, pgm_arm_type1_state, init_ket, ROT270, "hack (trap15)", "Ketsui: Kizuna Jigoku Tachi (2012/04/17 FAST. VER) (hack)", MACHINE_SUPPORTS_SAVE )
+GAME( 2012, ketarrf, ket, pgm_arm_type1_cave, ddp3, pgm_arm_type1_state, init_ket, ROT270, "hack (trap15)", "Ketsui: Kizuna Jigoku Tachi (2012/04/17 FAST. VER) (hack)", MACHINE_SUPPORTS_SAVE )
// this version is stupid, it just simulates what happens if the protection chip isn't returning proper values
// ROM_LOAD16_WORD_SWAP( "ketarrb_v100.u38", 0x000000, 0x200000, CRC(ec7a4f92) SHA1(6351fb386586956fbdb5f0730c481fb539cc267a) )
// GAME( 2002, ketarrb, ket, pgm_arm_type1_cave, ddp3, pgm_arm_type1_state, init_ket, ROT270, "trap15", "Ketsui: Kizuna Jigoku Tachi (2012/04/17 BACK. VER)", MACHINE_SUPPORTS_SAVE )
-GAME( 2003, espgal, 0, pgm_arm_type1_cave, espgal, pgm_arm_type1_state, init_espgal, ROT270, "Cave (AMI license)", "Espgaluda (2003/10/15 Master Ver)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
-GAME( 2003, espgalbl, espgal, pgm_arm_type2, pgm, pgm_arm_type2_state, init_ddp2, ROT270, "bootleg", "Espgaluda (2003/10/15 Master Ver, bootleg cartridge conversion)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
+GAME( 2003, espgal, 0, pgm_arm_type1_cave, espgal, pgm_arm_type1_state, init_espgal, ROT270, "Cave (AMI license)", "Espgaluda (2003/10/15 Master Ver)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
+GAME( 2003, espgalbl, espgal, pgm_arm_type2, pgm, pgm_arm_type2_state, init_ddp2, ROT270, "bootleg", "Espgaluda (2003/10/15 Master Ver, bootleg cartridge conversion)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
//泡泡鱼/Pào pào yú (China)
//(i can't found any similar Traditional Chinese characters on Taiwan region title screen)
// protection simulated, but should be correct
-GAME( 1999, puzzli2, pgm, pgm_arm_type1_sim, puzzli2, pgm_arm_type1_state, init_puzzli2, ROT0, "IGS (Metro license)", "Puzzli 2 / Pao Pao Yu (ver. 100)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // ROM label is V100 ( V0001, 11/22/99 09:27:58 in program ROM )
-GAME( 2001, puzzli2s, puzzli2, pgm_arm_type1_sim, puzzli2, pgm_arm_type1_state, init_puzzli2, ROT0, "IGS (Metro license)", "Puzzli 2 Super / Pao Pao Yu Super (ver. 200)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // ( V200, 12/28/01 12:53:34 in program ROM )
+GAME( 1999, puzzli2, pgm, pgm_arm_type1_sim, puzzli2, pgm_arm_type1_state, init_puzzli2, ROT0, "IGS (Metro license)", "Puzzli 2 / Pao Pao Yu (ver. 100)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // ROM label is V100 ( V0001, 11/22/99 09:27:58 in program ROM )
+GAME( 2001, puzzli2s, puzzli2, pgm_arm_type1_sim, puzzli2, pgm_arm_type1_state, init_puzzli2, ROT0, "IGS (Metro license)", "Puzzli 2 Super / Pao Pao Yu Super (ver. 200)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // ( V200, 12/28/01 12:53:34 in program ROM )
//傲劍狂刀加强版/Ào jiàn kuáng dāo Jiāqiáng bǎn
-GAME( 2005, killbldp, pgm, pgm_arm_type3_22m, pgm, pgm_arm_type3_state, init_killbldp, ROT0, "IGS", "The Killing Blade Plus / Ao Jian Kuang Dao Jiaqiang Ban (China, ver. 300)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) /* using internal rom from bootleg */
+GAME( 2005, killbldp, pgm, pgm_arm_type3_33_8688m, pgm, pgm_arm_type3_state, init_killbldp, ROT0, "IGS", "The Killing Blade Plus / Ao Jian Kuang Dao Jiaqiang Ban (China, ver. 300)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) /* using internal rom from bootleg */
//神劍伏魔录/Shén jiàn fú mó lù/San4 Gim3 Fuk6 Mo1 Luk6 (China, Hong Kong; Mixed Traditional and Simplified Chinese)
//神劍風雲/Shén jiàn fēngyún (Taiwan and Title call; Traditional Chinese)
@@ -5024,24 +5024,24 @@ GAME( 2005, killbldp, pgm, pgm_arm_type3_22m, pgm, pgm_arm_t
//闘幻狂 Road of the Sword/Tōgenkyō Road of the Sword (Japan)
// we're using a partial dump of the internal rom (sans the execute only area) with handcrafted startup code..
// all 3 68k roms still have V100 strings, but are clearly different builds, there don't appear to be build string dates in them. Two of the external ARM roms are marked V100 but are different builds, the single PCB v100 appears to be a later revision than the cart V100 as it shares the internal ROM with the V107 cart version, the v100 cart has a different internal ROM
-GAME( 2003, theglad, pgm, pgm_arm_type3_22m, theglad, pgm_arm_type3_state, init_theglad, ROT0, "IGS", "The Gladiator / Shen Jian Fu Mo Lu / Shen Jian Fengyun (M68k label V101) (ARM label V107, ROM 06/06/03 SHEN JIAN V107)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // ARM time: 16:17:27
-GAME( 2003, theglad101, theglad, pgm_arm_type3_22m, theglad, pgm_arm_type3_state, init_theglad, ROT0, "IGS", "The Gladiator / Shen Jian Fu Mo Lu / Shen Jian Fengyun (M68k label V100) (ARM label V101, ROM 03/13/03 SHEN JIAN)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // ARM time: 14:06:44
+GAME( 2003, theglad, pgm, pgm_arm_type3_22m, theglad, pgm_arm_type3_state, init_theglad, ROT0, "IGS", "The Gladiator / Shen Jian Fu Mo Lu / Shen Jian Fengyun (M68k label V101) (ARM label V107, ROM 06/06/03 SHEN JIAN V107)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // ARM time: 16:17:27
+GAME( 2003, theglad101, theglad, pgm_arm_type3_22m, theglad, pgm_arm_type3_state, init_theglad, ROT0, "IGS", "The Gladiator / Shen Jian Fu Mo Lu / Shen Jian Fengyun (M68k label V100) (ARM label V101, ROM 03/13/03 SHEN JIAN)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // ARM time: 14:06:44
// the v100 68k ROM on this is older than the v101 set, this set also uses a different internal ROM to everything else, must be a very early release, maybe pre v100 proto with v100 strings?
-GAME( 2003, theglad100, theglad, pgm_arm_type3_22m, theglad, pgm_arm_type3_state, init_theglada, ROT0, "IGS", "The Gladiator / Shen Jian Fu Mo Lu / Shen Jian Fengyun (M68k label V100) (ARM label V100, ROM 01/16/03 SHEN JIAN)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) /* need correct internal rom of IGS027A - we currently patch the one we have */ // ARM time: 10:39:25
+GAME( 2003, theglad100, theglad, pgm_arm_type3_22m, theglad, pgm_arm_type3_state, init_theglada, ROT0, "IGS", "The Gladiator / Shen Jian Fu Mo Lu / Shen Jian Fengyun (M68k label V100) (ARM label V100, ROM 01/16/03 SHEN JIAN)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) /* need correct internal rom of IGS027A - we currently patch the one we have */ // ARM time: 10:39:25
// newer than ARM V100 Cart, older than ARM V101 Cart, same 68k rom as V101 Cart.
-GAME( 2003, thegladpcb, theglad, pgm_arm_type3_33m, pgm, pgm_arm_type3_state, init_theglad, ROT0, "IGS (Alta/AMI license)", "Tougenkyou - Road of the Sword (M68k label V100) (ARM label V100, ROM 02/25/03 SHEN JIAN) (Japan, JAMMA PCB)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )// ARM time: 16:32:21 // PCB version only released in Japan?
+GAME( 2003, thegladpcb, theglad, pgm_arm_type3_33m, pgm, pgm_arm_type3_state, init_theglad, ROT0, "IGS (Alta/AMI license)", "Tougenkyou - Road of the Sword (M68k label V100) (ARM label V100, ROM 02/25/03 SHEN JIAN) (Japan, JAMMA PCB)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )// ARM time: 16:32:21 // PCB version only released in Japan?
//圣魔世纪/Shèng mó shìjì (China)
//聖魔世紀/Shèng mó shìjì (Taiwan, Hong Kong)
-GAME( 2005, svg, pgm, pgm_arm_type3_33m, svg, pgm_arm_type3_state, init_svg, ROT0, "IGS / Idea Factory", "S.V.G. - Spectral vs Generation / Sheng Mo Shiji (M68k label V200) (ARM label V200, ROM 10/11/05 S.V.G V201)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // ARM label was 200, but it's code rev 201? // ARM time: 10:07:20
-GAME( 2005, svgtw, svg, pgm_arm_type3_33m, svgtw, pgm_arm_type3_state, init_svgpcb, ROT0, "IGS / Idea Factory", "S.V.G. - Spectral vs Generation / Sheng Mo Shiji (M68k label V101TW) (ARM label V101TW, ROM 06/20/05 S.V.G V100)", MACHINE_NOT_WORKING ) // 68k label was 101 but it's same as v100
-GAME( 2005, svgpcb, svg, pgm_arm_type3_33m, svgpcb, pgm_arm_type3_state, init_svgpcb, ROT0, "IGS / Idea Factory (AMI license)", "S.V.G. - Spectral vs Generation / Sheng Mo Shiji (M68k label V100JP) (ARM label V100JP, ROM 05/12/05 S.V.G V100) (Japan, JAMMA PCB)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )// ARM time: 15:31:35 // PCB version only released in Japan?
+GAME( 2005, svg, pgm, pgm_arm_type3_33m, svg, pgm_arm_type3_state, init_svg, ROT0, "IGS / Idea Factory", "S.V.G. - Spectral vs Generation / Sheng Mo Shiji (M68k label V200) (ARM label V200, ROM 10/11/05 S.V.G V201)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // ARM label was 200, but it's code rev 201? // ARM time: 10:07:20
+GAME( 2005, svgtw, svg, pgm_arm_type3_33m, svgtw, pgm_arm_type3_state, init_svgpcb, ROT0, "IGS / Idea Factory", "S.V.G. - Spectral vs Generation / Sheng Mo Shiji (M68k label V101TW) (ARM label V101TW, ROM 06/20/05 S.V.G V100)", MACHINE_NOT_WORKING ) // 68k label was 101 but it's same as v100
+GAME( 2005, svgpcb, svg, pgm_arm_type3_33m, svgpcb, pgm_arm_type3_state, init_svgpcb, ROT0, "IGS / Idea Factory (AMI license)", "S.V.G. - Spectral vs Generation / Sheng Mo Shiji (M68k label V100JP) (ARM label V100JP, ROM 05/12/05 S.V.G V100) (Japan, JAMMA PCB)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )// ARM time: 15:31:35 // PCB version only released in Japan?
//欢乐六合一/Huānlè liùhé yī (China, Singapore)
//歡樂六合一/Huānlè liùhé yī (Taiwan, Hong Kong, Oversea)
-GAME( 2004, happy6, pgm, pgm_arm_type3_24m, happy6, pgm_arm_type3_state, init_happy6, ROT0, "IGS", "Huanle Liuhe Yi (Happy 6-in-1) (M68K ver. V101, ARM ver. V102CN)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
-GAME( 2004, happy6101, happy6, pgm_arm_type3_24m, happy6, pgm_arm_type3_state, init_happy6, ROT0, "IGS", "Huanle Liuhe Yi (Happy 6-in-1) (M68K ver. V100, ARM ver. V101CN)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
-GAME( 2004, happy6100hk, happy6, pgm_arm_type3_24m, happy6hk, pgm_arm_type3_state, init_happy6, ROT0, "IGS", "Huanle Liuhe Yi (Happy 6-in-1) (M68K ver. V100HK, ARM ver. V100HK)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
+GAME( 2004, happy6, pgm, pgm_arm_type3_24m, happy6, pgm_arm_type3_state, init_happy6, ROT0, "IGS", "Huanle Liuhe Yi (Happy 6-in-1) (M68K ver. V101, ARM ver. V102CN)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
+GAME( 2004, happy6101, happy6, pgm_arm_type3_24m, happy6, pgm_arm_type3_state, init_happy6, ROT0, "IGS", "Huanle Liuhe Yi (Happy 6-in-1) (M68K ver. V100, ARM ver. V101CN)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
+GAME( 2004, happy6100hk, happy6, pgm_arm_type3_24m, happy6hk, pgm_arm_type3_state, init_happy6, ROT0, "IGS", "Huanle Liuhe Yi (Happy 6-in-1) (M68K ver. V100HK, ARM ver. V100HK)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
/* -----------------------------------------------------------------------------------------------------------------------
Partially Working, playable, but some imperfections
@@ -5049,29 +5049,29 @@ GAME( 2004, happy6100hk, happy6, pgm_arm_type3_24m, happy6hk, pgm_arm_t
//西游释厄传Super/Xīyóu shì è chuán Super (China; Simplified Chinese)
//西遊釋厄傳Super/Xīyóu shì è chuán Super (Taiwan; Traditional Chinese)
-GAME( 1998, olds, pgm, pgm_028_025_ol, olds, pgm_028_025_state, init_olds, ROT0, "IGS", "Oriental Legend Super / Xiyou Shi E Chuan Super (ver. 101, Korean Board)", MACHINE_IMPERFECT_SOUND | MACHINE_UNEMULATED_PROTECTION | MACHINE_SUPPORTS_SAVE ) /* region provided by protection device */
-GAME( 1998, olds100, olds, pgm_028_025_ol, olds, pgm_028_025_state, init_olds, ROT0, "IGS", "Oriental Legend Special / Xiyou Shi E Chuan Super (ver. 100, set 1)", MACHINE_IMPERFECT_SOUND | MACHINE_UNEMULATED_PROTECTION | MACHINE_SUPPORTS_SAVE ) /* region provided by protection device */
-GAME( 1998, olds100a, olds, pgm_028_025_ol, olds, pgm_028_025_state, init_olds, ROT0, "IGS", "Oriental Legend Special / Xiyou Shi E Chuan Super (ver. 100, set 2)", MACHINE_IMPERFECT_SOUND | MACHINE_UNEMULATED_PROTECTION | MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) /* region provided by protection device; OPCODE 1111 error at startup */
+GAME( 1998, olds, pgm, pgm_028_025_ol, olds, pgm_028_025_state, init_olds, ROT0, "IGS", "Oriental Legend Super / Xiyou Shi E Chuan Super (ver. 101, Korean Board)", MACHINE_IMPERFECT_SOUND | MACHINE_UNEMULATED_PROTECTION | MACHINE_SUPPORTS_SAVE ) /* region provided by protection device */
+GAME( 1998, olds100, olds, pgm_028_025_ol, olds, pgm_028_025_state, init_olds, ROT0, "IGS", "Oriental Legend Special / Xiyou Shi E Chuan Super (ver. 100, set 1)", MACHINE_IMPERFECT_SOUND | MACHINE_UNEMULATED_PROTECTION | MACHINE_SUPPORTS_SAVE ) /* region provided by protection device */
+GAME( 1998, olds100a, olds, pgm_028_025_ol, olds, pgm_028_025_state, init_olds, ROT0, "IGS", "Oriental Legend Special / Xiyou Shi E Chuan Super (ver. 100, set 2)", MACHINE_IMPERFECT_SOUND | MACHINE_UNEMULATED_PROTECTION | MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) /* region provided by protection device; OPCODE 1111 error at startup */
// This version was specially made for a Chinese online gaming company. While it may not be entirely suitable for MAME, it can give some insight into how protection should work.
-GAME( 1998, olds103t, olds, pgm, pgm, pgm_state, init_pgm, ROT0, "bootleg", "Xiyou Shi E Chuan Super (ver. 103, China, Tencent) (unprotected)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // without overseas region
+GAME( 1998, olds103t, olds, pgm, pgm, pgm_state, init_pgm, ROT0, "bootleg", "Xiyou Shi E Chuan Super (ver. 103, China, Tencent) (unprotected)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // without overseas region
//三国战纪/Sānguó zhàn jì (China, Hong Kong; Simplified Chinese)
//三國戰紀/Sānguó zhàn jì (Taiwan, Japan; Traditional Chinese)
-GAME( 1999, kov, pgm, pgm_arm_type1_sim, sango, pgm_arm_type1_state, init_kov, ROT0, "IGS", "Knights of Valour / Sanguo Zhan Ji / Sangoku Senki (ver. 117)", MACHINE_IMPERFECT_SOUND | MACHINE_UNEMULATED_PROTECTION | MACHINE_SUPPORTS_SAVE ) /* need internal rom of IGS027A */ // V0008 04/27/99 10:33:33
-GAME( 1999, kov115, kov, pgm_arm_type1_sim, sango, pgm_arm_type1_state, init_kov, ROT0, "IGS", "Knights of Valour / Sanguo Zhan Ji / Sangoku Senki (ver. 115)", MACHINE_IMPERFECT_SOUND | MACHINE_UNEMULATED_PROTECTION | MACHINE_SUPPORTS_SAVE ) /* need internal rom of IGS027A */ // V0006 02/22/99 11:53:18
-GAME( 1999, kov100, kov, pgm_arm_type1_sim, sango, pgm_arm_type1_state, init_kov, ROT0, "IGS", "Knights of Valour / Sanguo Zhan Ji / Sangoku Senki (ver. 100, Japanese Board)", MACHINE_IMPERFECT_SOUND | MACHINE_UNEMULATED_PROTECTION | MACHINE_SUPPORTS_SAVE ) /* need internal rom of IGS027A */ // V0002 01/31/99 01:54:16
-GAME( 1999, kov100hk, kov, pgm_arm_type1_sim, sango, pgm_arm_type1_state, init_kov, ROT0, "IGS", "Knights of Valour / Sanguo Zhan Ji / Sangoku Senki (ver. 100, Hong Kong)", MACHINE_IMPERFECT_SOUND | MACHINE_UNEMULATED_PROTECTION | MACHINE_SUPPORTS_SAVE ) /* need internal rom of IGS027A */
+GAME( 1999, kov, pgm, pgm_arm_type1_sim, sango, pgm_arm_type1_state, init_kov, ROT0, "IGS", "Knights of Valour / Sanguo Zhan Ji / Sangoku Senki (ver. 117)", MACHINE_IMPERFECT_SOUND | MACHINE_UNEMULATED_PROTECTION | MACHINE_SUPPORTS_SAVE ) /* need internal rom of IGS027A */ // V0008 04/27/99 10:33:33
+GAME( 1999, kov115, kov, pgm_arm_type1_sim, sango, pgm_arm_type1_state, init_kov, ROT0, "IGS", "Knights of Valour / Sanguo Zhan Ji / Sangoku Senki (ver. 115)", MACHINE_IMPERFECT_SOUND | MACHINE_UNEMULATED_PROTECTION | MACHINE_SUPPORTS_SAVE ) /* need internal rom of IGS027A */ // V0006 02/22/99 11:53:18
+GAME( 1999, kov100, kov, pgm_arm_type1_sim, sango, pgm_arm_type1_state, init_kov, ROT0, "IGS", "Knights of Valour / Sanguo Zhan Ji / Sangoku Senki (ver. 100, Japanese Board)", MACHINE_IMPERFECT_SOUND | MACHINE_UNEMULATED_PROTECTION | MACHINE_SUPPORTS_SAVE ) /* need internal rom of IGS027A */ // V0002 01/31/99 01:54:16
+GAME( 1999, kov100hk, kov, pgm_arm_type1_sim, sango, pgm_arm_type1_state, init_kov, ROT0, "IGS", "Knights of Valour / Sanguo Zhan Ji / Sangoku Senki (ver. 100, Hong Kong)", MACHINE_IMPERFECT_SOUND | MACHINE_UNEMULATED_PROTECTION | MACHINE_SUPPORTS_SAVE ) /* need internal rom of IGS027A */
//三国战纪正宗Plus/Sānguó zhàn jì Zhèngzōng Plus (China/Hong Kong; Simplified Chinese)
//三國戰紀正宗Plus/Sānguó zhàn jì Zhèngzōng Plus (Taiwan, Japan; Traditional Chinese)
-GAME( 1999, kovplus, pgm, pgm_arm_type1_sim, sango, pgm_arm_type1_state, init_kov, ROT0, "IGS", "Knights of Valour Plus / Sanguo Zhan Ji Zhengzong Plus / Sangoku Senki Masamune Plus (ver. 119, set 1)", MACHINE_IMPERFECT_SOUND | MACHINE_UNEMULATED_PROTECTION | MACHINE_SUPPORTS_SAVE ) /* need internal rom of IGS027A */
-GAME( 1999, kovplusa, kovplus, pgm_arm_type1_sim, sango, pgm_arm_type1_state, init_kov, ROT0, "IGS", "Knights of Valour Plus / Sanguo Zhan Ji Zhengzong Plus / Sangoku Senki Masamune Plus (ver. 119, set 2)", MACHINE_IMPERFECT_SOUND | MACHINE_UNEMULATED_PROTECTION | MACHINE_SUPPORTS_SAVE ) /* need internal rom of IGS027A */
+GAME( 1999, kovplus, pgm, pgm_arm_type1_sim, sango, pgm_arm_type1_state, init_kov, ROT0, "IGS", "Knights of Valour Plus / Sanguo Zhan Ji Zhengzong Plus / Sangoku Senki Masamune Plus (ver. 119, set 1)", MACHINE_IMPERFECT_SOUND | MACHINE_UNEMULATED_PROTECTION | MACHINE_SUPPORTS_SAVE ) /* need internal rom of IGS027A */
+GAME( 1999, kovplusa, kovplus, pgm_arm_type1_sim, sango, pgm_arm_type1_state, init_kov, ROT0, "IGS", "Knights of Valour Plus / Sanguo Zhan Ji Zhengzong Plus / Sangoku Senki Masamune Plus (ver. 119, set 2)", MACHINE_IMPERFECT_SOUND | MACHINE_UNEMULATED_PROTECTION | MACHINE_SUPPORTS_SAVE ) /* need internal rom of IGS027A */
//三國群英传正宗Plus/Sānguó qúnyīng chuán Zhèngzōng Plus (Mixed Simplified and Traditional Chinese in title screen)
// modified title screen is only visible for china region, so use that by default. Character select portraits don't seem quite right (different protection?)
-GAME( 1999, kovsgqyz, kovplus, pgm_arm_type1_sim, sango_ch, pgm_arm_type1_state, init_kovboot, ROT0, "bootleg", "Sanguo Qunying Chuan Zhengzong Plus (bootleg of Knights of Valour Plus, set 1)", MACHINE_IMPERFECT_SOUND | MACHINE_UNEMULATED_PROTECTION | MACHINE_SUPPORTS_SAVE ) /* need internal rom of IGS027A */
-GAME( 1999, kovsgqyza, kovplus, pgm_arm_type1_sim, sango_ch, pgm_arm_type1_state, init_kovboot, ROT0, "bootleg", "Sanguo Qunying Chuan Zhengzong Plus (bootleg of Knights of Valour Plus, set 2)", MACHINE_IMPERFECT_SOUND | MACHINE_UNEMULATED_PROTECTION | MACHINE_SUPPORTS_SAVE ) /* need internal rom of IGS027A */
-GAME( 1999, kovsgqyzb, kovplus, pgm_arm_type1_sim, sango_ch, pgm_arm_type1_state, init_kovboot, ROT0, "bootleg", "Sanguo Qunying Chuan Zhengzong Plus (bootleg of Knights of Valour Plus, set 3)", MACHINE_IMPERFECT_SOUND | MACHINE_UNEMULATED_PROTECTION | MACHINE_SUPPORTS_SAVE ) /* need internal rom of IGS027A */
+GAME( 1999, kovsgqyz, kovplus, pgm_arm_type1_sim, sango_ch, pgm_arm_type1_state, init_kovboot, ROT0, "bootleg", "Sanguo Qunying Chuan Zhengzong Plus (bootleg of Knights of Valour Plus, set 1)", MACHINE_IMPERFECT_SOUND | MACHINE_UNEMULATED_PROTECTION | MACHINE_SUPPORTS_SAVE ) /* need internal rom of IGS027A */
+GAME( 1999, kovsgqyza, kovplus, pgm_arm_type1_sim, sango_ch, pgm_arm_type1_state, init_kovboot, ROT0, "bootleg", "Sanguo Qunying Chuan Zhengzong Plus (bootleg of Knights of Valour Plus, set 2)", MACHINE_IMPERFECT_SOUND | MACHINE_UNEMULATED_PROTECTION | MACHINE_SUPPORTS_SAVE ) /* need internal rom of IGS027A */
+GAME( 1999, kovsgqyzb, kovplus, pgm_arm_type1_sim, sango_ch, pgm_arm_type1_state, init_kovboot, ROT0, "bootleg", "Sanguo Qunying Chuan Zhengzong Plus (bootleg of Knights of Valour Plus, set 3)", MACHINE_IMPERFECT_SOUND | MACHINE_UNEMULATED_PROTECTION | MACHINE_SUPPORTS_SAVE ) /* need internal rom of IGS027A */
/* -----------------------------------------------------------------------------------------------------------------------
@@ -5079,17 +5079,17 @@ GAME( 1999, kovsgqyzb, kovplus, pgm_arm_type1_sim, sango_ch, pgm_arm_t
-----------------------------------------------------------------------------------------------------------------------*/
//魔幻星座/Móhuàn xīngzuò
-GAME( 1999, puzlstar, pgm, pgm_arm_type1_sim, pstar, pgm_arm_type1_state, init_pstar, ROT0, "IGS (Metro license)", "Puzzle Star / Mohuan Xingzuo (ver. 100MG)", MACHINE_IMPERFECT_SOUND | MACHINE_UNEMULATED_PROTECTION | MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) /* need internal rom of IGS027A */
+GAME( 1999, puzlstar, pgm, pgm_arm_type1_sim, pstar, pgm_arm_type1_state, init_pstar, ROT0, "IGS (Metro license)", "Puzzle Star / Mohuan Xingzuo (ver. 100MG)", MACHINE_IMPERFECT_SOUND | MACHINE_UNEMULATED_PROTECTION | MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) /* need internal rom of IGS027A */
//超級比一比2/Chāojí bǐ yī bǐ 2 (Taiwan)
//大家来找碴2/Dàjiā lái zhǎo chá 2/Daai6gaa1 Loi4 Zaau2 Caa4 2 (China, Hong Kong)
//リアルアンドフェイク 2 Photo Y2K/Riaruandofeiku(Real and Fake) 2 Photo Y2K (Japan)
-GAME( 2001, py2k2, pgm, pgm_arm_type1_sim, py2k2, pgm_arm_type1_state, init_py2k2, ROT0, "IGS", "Photo Y2K 2 / Chaoji Bi Yi Bi 2 / Dajia Lai Zhao Cha 2 / Real and Fake 2 Photo Y2K (M101XX 05/25/01 11:02:54)", MACHINE_NOT_WORKING ) /* need internal rom of IGS027A */
-GAME( 2000, py2k2100, py2k2, pgm_arm_type1_sim, py2k2, pgm_arm_type1_state, init_py2k2, ROT0, "IGS", "Photo Y2K 2 / Chaoji Bi Yi Bi 2 / Dajia Lai Zhao Cha 2 / Real and Fake 2 Photo Y2K (ver. 100, Japanese Board)", MACHINE_NOT_WORKING ) /* need internal rom of IGS027A */
+GAME( 2001, py2k2, pgm, pgm_arm_type1_sim, py2k2, pgm_arm_type1_state, init_py2k2, ROT0, "IGS", "Photo Y2K 2 / Chaoji Bi Yi Bi 2 / Dajia Lai Zhao Cha 2 / Real and Fake 2 Photo Y2K (M101XX 05/25/01 11:02:54)", MACHINE_NOT_WORKING ) /* need internal rom of IGS027A */
+GAME( 2000, py2k2100, py2k2, pgm_arm_type1_sim, py2k2, pgm_arm_type1_state, init_py2k2, ROT0, "IGS", "Photo Y2K 2 / Chaoji Bi Yi Bi 2 / Dajia Lai Zhao Cha 2 / Real and Fake 2 Photo Y2K (ver. 100, Japanese Board)", MACHINE_NOT_WORKING ) /* need internal rom of IGS027A */
//閃亮三合一/Shǎn liàng sān hé yī (Taiwan, Hong Kong, Oversea)
//闪亮三合一/Shǎn liàng sān hé yī (China)
-GAME( 2004, pgm3in1, pgm, pgm_arm_type1_sim, pgm3in1, pgm_arm_type1_state, init_pgm3in1, ROT0, "IGS", "Shan Liang San He Yi (Flash 3-in-1) (V100 07/13/04 12:09:20)", MACHINE_NOT_WORKING ) /* need internal rom of IGS027A */
+GAME( 2004, pgm3in1, pgm, pgm_arm_type1_sim, pgm3in1, pgm_arm_type1_state, init_pgm3in1, ROT0, "IGS", "Shan Liang San He Yi (Flash 3-in-1) (V100 07/13/04 12:09:20)", MACHINE_NOT_WORKING ) /* need internal rom of IGS027A */
/* Games below this point are known to have an 'execute only' internal ROM area covering an area at the start of the internal ROM. This can't be read when running code from either internal or external ROM space. */
@@ -5098,7 +5098,7 @@ GAME( 2004, pgm3in1, pgm, pgm_arm_type1_sim, pgm3in1, pgm_arm_t
//西遊釋厄傳群魔亂舞/Xīyóu shì è chuán Qúnmóluànwǔ (Hong Kong, World, Taiwan; Traditional Chinese)
//Oriental Legend 2/손오공 2/Son Ogong 2 (Korea)
// Simulation doesn't seem 100% so marked as NOT WORKING. Probably wasn't released in all specified regions (protection device intenral ROM supplies the region) "Oriental Ex" is the identifier string used in test mode.
-GAME( 2004, oldsplus, pgm, pgm_arm_type1_sim, oldsplus, pgm_arm_type1_state, init_oldsplus, ROT0, "IGS", "Oriental Legend 2 (Korea) / Xiyou Shi E Chuan Qunmoluanwu (World, China, Japan, Hong Kong, Taiwan) (ver. 205) [Oriental Ex]", MACHINE_IMPERFECT_SOUND | MACHINE_UNEMULATED_PROTECTION | MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) /* need internal rom of IGS027A */
+GAME( 2004, oldsplus, pgm, pgm_arm_type1_sim, oldsplus, pgm_arm_type1_state, init_oldsplus, ROT0, "IGS", "Oriental Legend 2 (Korea) / Xiyou Shi E Chuan Qunmoluanwu (World, China, Japan, Hong Kong, Taiwan) (ver. 205) [Oriental Ex]", MACHINE_IMPERFECT_SOUND | MACHINE_UNEMULATED_PROTECTION | MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) /* need internal rom of IGS027A */
// we use the kovsh ARM rom for this, itercepting commands and changing them to match it, doesn't seem 100% correct tho so I'm leaving it as NOT WORKING; for example the ARM rom supplies addresses of Z80 music data sections, which have moved causing incorrect music, some damage rates could be different too.
// the game logo remains stuck on the screen during gameplay, but videos of the original board suggest this happens on real hardware as well
@@ -5107,18 +5107,18 @@ GAME( 2004, oldsplus, pgm, pgm_arm_type1_sim, oldsplus, pgm_arm_t
//三国战记乱世枭雄/Sānguó zhàn jì Luànshì xiāoxióng (China; Simplified Chinese, Official?)
//三國戰記亂世梟雄/Sānguó zhàn jì Luànshì xiāoxióng (Traditional Chinese, Official?)
-GAME( 2004, kovshp, pgm, pgm_arm_type1, kovsh, pgm_arm_type1_state, init_kovshp, ROT0, "IGS", "Knights of Valour Super Heroes Plus / Sanguo Zhan Ji Luanshi Xiaoxiong (ver. 101)", MACHINE_IMPERFECT_SOUND | MACHINE_UNEMULATED_PROTECTION | MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) /* need internal rom of IGS027A */
-GAME( 2004, kovshpa, kovshp, pgm_arm_type1, kovsh, pgm_arm_type1_state, init_kovshp, ROT0, "IGS", "Knights of Valour Super Heroes Plus / Sanguo Zhan Ji Luanshi Xiaoxiong (ver. 100)", MACHINE_IMPERFECT_SOUND | MACHINE_UNEMULATED_PROTECTION | MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) /* need internal rom of IGS027A */
+GAME( 2004, kovshp, pgm, pgm_arm_type1, kovsh, pgm_arm_type1_state, init_kovshp, ROT0, "IGS", "Knights of Valour Super Heroes Plus / Sanguo Zhan Ji Luanshi Xiaoxiong (ver. 101)", MACHINE_IMPERFECT_SOUND | MACHINE_UNEMULATED_PROTECTION | MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) /* need internal rom of IGS027A */
+GAME( 2004, kovshpa, kovshp, pgm_arm_type1, kovsh, pgm_arm_type1_state, init_kovshp, ROT0, "IGS", "Knights of Valour Super Heroes Plus / Sanguo Zhan Ji Luanshi Xiaoxiong (ver. 100)", MACHINE_IMPERFECT_SOUND | MACHINE_UNEMULATED_PROTECTION | MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) /* need internal rom of IGS027A */
// First(possibly) major updated version of kovsh with 3 game modes and new characters, Version is V201 and identification string is "SANGO EX+" instead "SANGO EX".
// 一统中原/Yītǒng zhōngyuán is game mode(this mode is similar as kovsh), and ROM labels too?
-GAME( 1999, kovytzy, pgm, pgm_arm_type1, kovsh, pgm_arm_type1_state, init_kovshp, ROT0, "IGS", "Knights of Valour Super Heroes / Sanguo Zhan Ji Fengyun Zaiqi / Sangoku Senki Super Heroes (SANGO EX+) (ver. 201 'Yitong Zhongyuan', China)", MACHINE_IMPERFECT_SOUND | MACHINE_UNEMULATED_PROTECTION | MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) /* need internal rom of IGS027A */
+GAME( 1999, kovytzy, pgm, pgm_arm_type1, kovsh, pgm_arm_type1_state, init_kovshp, ROT0, "IGS", "Knights of Valour Super Heroes / Sanguo Zhan Ji Fengyun Zaiqi / Sangoku Senki Super Heroes (SANGO EX+) (ver. 201 'Yitong Zhongyuan', China)", MACHINE_IMPERFECT_SOUND | MACHINE_UNEMULATED_PROTECTION | MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) /* need internal rom of IGS027A */
//傲世三国/Àoshì sānguó
// this bootleg is very close to kovshp
-GAME( 2008, kovshxas, kovshp, pgm_arm_type1, kovsh, pgm_arm_type1_state, init_kovshxas, ROT0, "bootleg", "Aoshi Sanguo (bootleg of Knights of Valour Super Heroes Plus, V202CN, Oct 6 2008 09:59:26)", MACHINE_IMPERFECT_SOUND | MACHINE_UNEMULATED_PROTECTION | MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) /* need internal rom of IGS027A */
+GAME( 2008, kovshxas, kovshp, pgm_arm_type1, kovsh, pgm_arm_type1_state, init_kovshxas, ROT0, "bootleg", "Aoshi Sanguo (bootleg of Knights of Valour Super Heroes Plus, V202CN, Oct 6 2008 09:59:26)", MACHINE_IMPERFECT_SOUND | MACHINE_UNEMULATED_PROTECTION | MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) /* need internal rom of IGS027A */
// these should be bootlegs of kovshp, but have further command changes in their ARMs and have a lot of code shuffled around, bootlegs of a different revision?
//乱世拳皇/Luànshì quánhuáng
-GAME( 200?, kovlsqh, kovshp, pgm_arm_type1, kovsh, pgm_arm_type1_state, init_kovlsqh2, ROT0, "bootleg", "Luanshi Quanhuang (bootleg of Knights of Valour Super Heroes Plus, ver. 200CN)", MACHINE_IMPERFECT_SOUND | MACHINE_UNEMULATED_PROTECTION | MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) /* need internal rom of IGS027A */
-GAME( 200?, kovlsqh2, kovshp, pgm_arm_type1, kovsh, pgm_arm_type1_state, init_kovlsqh2, ROT0, "bootleg", "Luanshi Quanhuang 2 (bootleg of Knights of Valour Super Heroes Plus, ver. 200CN)", MACHINE_IMPERFECT_SOUND | MACHINE_UNEMULATED_PROTECTION | MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) /* need internal rom of IGS027A */
+GAME( 200?, kovlsqh, kovshp, pgm_arm_type1, kovsh, pgm_arm_type1_state, init_kovlsqh2, ROT0, "bootleg", "Luanshi Quanhuang (bootleg of Knights of Valour Super Heroes Plus, ver. 200CN)", MACHINE_IMPERFECT_SOUND | MACHINE_UNEMULATED_PROTECTION | MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) /* need internal rom of IGS027A */
+GAME( 200?, kovlsqh2, kovshp, pgm_arm_type1, kovsh, pgm_arm_type1_state, init_kovlsqh2, ROT0, "bootleg", "Luanshi Quanhuang 2 (bootleg of Knights of Valour Super Heroes Plus, ver. 200CN)", MACHINE_IMPERFECT_SOUND | MACHINE_UNEMULATED_PROTECTION | MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) /* need internal rom of IGS027A */
//乱世街霸/Luànshì jiē bà
-GAME( 200?, kovlsjb, kovshp, pgm_arm_type1, kovsh, pgm_arm_type1_state, init_kovlsqh2, ROT0, "bootleg", "Luanshi Jie Ba (bootleg of Knights of Valour Super Heroes Plus, ver. 200CN, set 1)", MACHINE_IMPERFECT_SOUND | MACHINE_UNEMULATED_PROTECTION | MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) /* need internal rom of IGS027A */
-GAME( 200?, kovlsjba, kovshp, pgm_arm_type1, kovsh, pgm_arm_type1_state, init_kovlsqh2, ROT0, "bootleg", "Luanshi Jie Ba (bootleg of Knights of Valour Super Heroes Plus, ver. 200CN, set 2)", MACHINE_IMPERFECT_SOUND | MACHINE_UNEMULATED_PROTECTION | MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) /* need internal rom of IGS027A */
+GAME( 200?, kovlsjb, kovshp, pgm_arm_type1, kovsh, pgm_arm_type1_state, init_kovlsqh2, ROT0, "bootleg", "Luanshi Jie Ba (bootleg of Knights of Valour Super Heroes Plus, ver. 200CN, set 1)", MACHINE_IMPERFECT_SOUND | MACHINE_UNEMULATED_PROTECTION | MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) /* need internal rom of IGS027A */
+GAME( 200?, kovlsjba, kovshp, pgm_arm_type1, kovsh, pgm_arm_type1_state, init_kovlsqh2, ROT0, "bootleg", "Luanshi Jie Ba (bootleg of Knights of Valour Super Heroes Plus, ver. 200CN, set 2)", MACHINE_IMPERFECT_SOUND | MACHINE_UNEMULATED_PROTECTION | MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) /* need internal rom of IGS027A */
diff --git a/src/mame/drivers/saitek_chesstrv.cpp b/src/mame/drivers/saitek_chesstrv.cpp
index c21c0242a06..189a3fe808a 100644
--- a/src/mame/drivers/saitek_chesstrv.cpp
+++ b/src/mame/drivers/saitek_chesstrv.cpp
@@ -22,8 +22,8 @@ digit DP lights up).
#include "emu.h"
#include "cpu/f8/f8.h"
#include "machine/f3853.h"
-#include "video/pwm.h"
#include "machine/sensorboard.h"
+#include "video/pwm.h"
// internal artwork
#include "saitek_chesstrv.lh" // clickable
diff --git a/src/mame/drivers/sc2.cpp b/src/mame/drivers/sc2.cpp
index e5896f3f866..a76af305d31 100644
--- a/src/mame/drivers/sc2.cpp
+++ b/src/mame/drivers/sc2.cpp
@@ -29,6 +29,7 @@ Fidelity CC10 synonyms: RE, LV, RV, PB, ♪, CL, EN
#include "emu.h"
#include "cpu/z80/z80.h"
#include "machine/z80pio.h"
+#include "machine/sensorboard.h"
#include "video/pwm.h"
#include "sound/dac.h"
#include "sound/volt_reg.h"
@@ -207,6 +208,10 @@ void sc2_state::sc2(machine_config &config)
m_pio->in_pb_callback().set(FUNC(sc2_state::pio_port_b_r));
m_pio->out_pb_callback().set(FUNC(sc2_state::pio_port_b_w));
+ // built-in chessboard is not electronic
+ sensorboard_device &board(SENSORBOARD(config, "board").set_type(sensorboard_device::NOSENSORS));
+ board.init_cb().set("board", FUNC(sensorboard_device::preset_chess));
+
/* video hardware */
PWM_DISPLAY(config, m_display).set_size(4, 8);
m_display->set_segmask(0xf, 0x7f);
diff --git a/src/mame/drivers/seta2.cpp b/src/mame/drivers/seta2.cpp
index a4c8125676e..50a15b6c1b7 100644
--- a/src/mame/drivers/seta2.cpp
+++ b/src/mame/drivers/seta2.cpp
@@ -2330,6 +2330,7 @@ void seta2_state::seta2(machine_config &config)
void seta2_state::gundamex(machine_config &config)
{
seta2(config);
+ m_maincpu->set_clock(XTAL(32'530'400)/2); // verified
m_maincpu->set_addrmap(AS_PROGRAM, &seta2_state::gundamex_map);
downcast<tmp68301_device &>(*m_maincpu).in_parallel_callback().set(FUNC(seta2_state::gundamex_eeprom_r));
@@ -2339,16 +2340,21 @@ void seta2_state::gundamex(machine_config &config)
// video hardware
m_screen->set_visarea(0x00, 0x180-1, 0x000, 0x0e0-1);
+
+ subdevice<x1_010_device>("x1snd")->set_clock(XTAL(32'530'400)/2); // verified; reference : https://youtu.be/6f-znVzcrmg
}
void seta2_state::grdians(machine_config &config)
{
seta2(config);
+ m_maincpu->set_clock(XTAL(32'530'400)/2); // verified
m_maincpu->set_addrmap(AS_PROGRAM, &seta2_state::grdians_map);
// video hardware
m_screen->set_visarea(0x00, 0x130-1, 0x00, 0xe8 -1);
+
+ subdevice<x1_010_device>("x1snd")->set_clock(XTAL(32'530'400)/2); // verified; reference : https://youtu.be/Ung9XeLisV0
}
diff --git a/src/mame/drivers/tomy_princ.cpp b/src/mame/drivers/tomy_princ.cpp
index b49e769ab89..cf2e22b4ae2 100644
--- a/src/mame/drivers/tomy_princ.cpp
+++ b/src/mame/drivers/tomy_princ.cpp
@@ -46,6 +46,7 @@ uint32_t tomy_princ_state::screen_update_tomy_princ(screen_device &screen, bitma
void tomy_princ_state::princ_map(address_map &map)
{
+ map(0x68ff44, 0x68ff44).lr8("free0", [this]() -> u8 { return m_screen->vblank() ? 1 : 0; });
map(0xe00000, 0xe07fff).ram(); // stacks are placed here
map(0xf00000, 0xffffff).rom().region("maincpu", 0x00000);
}
diff --git a/src/mame/includes/deco32.h b/src/mame/includes/deco32.h
index 308911d3465..7017046f950 100644
--- a/src/mame/includes/deco32.h
+++ b/src/mame/includes/deco32.h
@@ -41,7 +41,7 @@ public:
, m_paletteram(*this, "paletteram")
{ }
- DECLARE_WRITE8_MEMBER(sound_bankswitch_w);
+ void sound_bankswitch_w(u8 data);
protected:
void h6280_sound_custom_latch_map(address_map &map);
@@ -50,24 +50,24 @@ protected:
void z80_sound_map(address_map &map);
// common
- DECLARE_READ16_MEMBER(ioprot_r);
- DECLARE_WRITE16_MEMBER(ioprot_w);
- DECLARE_READ8_MEMBER(eeprom_r);
- DECLARE_WRITE8_MEMBER(eeprom_w);
- DECLARE_WRITE8_MEMBER(volume_w);
- DECLARE_WRITE32_MEMBER(vblank_ack_w);
+ u16 ioprot_r(offs_t offset);
+ void ioprot_w(offs_t offset, u16 data, u16 mem_mask = ~0);
+ u8 eeprom_r();
+ void eeprom_w(u8 data);
+ void volume_w(u8 data);
+ void vblank_ack_w(u32 data);
- template<int Chip> DECLARE_WRITE32_MEMBER(pf_rowscroll_w);
+ template<int Chip> void pf_rowscroll_w(offs_t offset, u32 data, u32 mem_mask = ~0);
// captaven, fghthist, nslasher and tattass
- template<int Chip> DECLARE_READ32_MEMBER(spriteram_r);
- template<int Chip> DECLARE_WRITE32_MEMBER(spriteram_w);
- template<int Chip> DECLARE_WRITE32_MEMBER(buffer_spriteram_w);
+ template<int Chip> u32 spriteram_r(offs_t offset);
+ template<int Chip> void spriteram_w(offs_t offset, u32 data, u32 mem_mask = ~0);
+ template<int Chip> void buffer_spriteram_w(u32 data);
void pri_w(u32 data);
// all but captaven
- DECLARE_WRITE32_MEMBER(buffered_palette_w);
- DECLARE_WRITE32_MEMBER(palette_dma_w);
+ void buffered_palette_w(offs_t offset, u32 data, u32 mem_mask = ~0);
+ void palette_dma_w(u32 data);
optional_device<cpu_device> m_audiocpu;
optional_device_array<decospr_device, 2> m_sprgen;
@@ -90,16 +90,16 @@ protected:
virtual void video_start() override;
- std::unique_ptr<uint8_t[]> m_dirty_palette; // all but captaven
+ std::unique_ptr<u8[]> m_dirty_palette; // all but captaven
int m_pri; // all but dragngun
- std::unique_ptr<uint16_t[]> m_spriteram16[2]; // all but dragngun
- std::unique_ptr<uint16_t[]> m_spriteram16_buffered[2]; // all but dragngun
- std::unique_ptr<uint16_t[]> m_pf_rowscroll[4]; // common
+ std::unique_ptr<u16[]> m_spriteram16[2]; // all but dragngun
+ std::unique_ptr<u16[]> m_spriteram16_buffered[2]; // all but dragngun
+ std::unique_ptr<u16[]> m_pf_rowscroll[4]; // common
private:
// we use the pointers below to store a 32-bit copy..
- required_shared_ptr_array<uint32_t, 4> m_pf_rowscroll32;
- optional_shared_ptr<uint32_t> m_paletteram;
+ required_shared_ptr_array<u32, 4> m_pf_rowscroll32;
+ optional_shared_ptr<u32> m_paletteram;
};
class captaven_state : public deco32_state
@@ -107,6 +107,7 @@ class captaven_state : public deco32_state
public:
captaven_state(const machine_config &mconfig, device_type type, const char *tag)
: deco32_state(mconfig, type, tag)
+ , m_io_dsw(*this, "DSW%u", 1U)
{ }
void captaven(machine_config &config);
@@ -114,15 +115,13 @@ public:
void init_captaven();
private:
- DECLARE_READ32_MEMBER(_71_r);
- DECLARE_READ8_MEMBER(captaven_dsw1_r);
- DECLARE_READ8_MEMBER(captaven_dsw2_r);
- DECLARE_READ8_MEMBER(captaven_dsw3_r);
- DECLARE_READ8_MEMBER(captaven_soundcpu_status_r);
+ required_ioport_array<3> m_io_dsw;
+ u32 _71_r();
+ u8 captaven_soundcpu_status_r();
virtual void video_start() override;
- uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ u32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
DECO16IC_BANK_CB_MEMBER(bank_callback);
DECOSPR_PRIORITY_CB_MEMBER(captaven_pri_callback);
@@ -135,6 +134,7 @@ class fghthist_state : public deco32_state
public:
fghthist_state(const machine_config &mconfig, device_type type, const char *tag)
: deco32_state(mconfig, type, tag)
+ , m_io_in(*this, "IN%u", 0U)
{ }
void fghthist(machine_config &config);
@@ -144,14 +144,13 @@ public:
void init_fghthist();
private:
- DECLARE_WRITE32_MEMBER(sound_w);
- DECLARE_READ16_MEMBER(fghthist_in0_r);
- DECLARE_READ16_MEMBER(fghthist_in1_r);
- DECLARE_READ32_MEMBER(unk_status_r);
+ required_ioport_array<2> m_io_in;
+// DECLARE_WRITE32_MEMBER(sound_w);
+ u32 unk_status_r();
virtual void video_start() override;
- uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
+ u32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
DECO16IC_BANK_CB_MEMBER(bank_callback);
@@ -179,15 +178,15 @@ public:
private:
required_device<deco_ace_device> m_deco_ace;
- DECLARE_WRITE32_MEMBER(tattass_control_w);
+ void tattass_control_w(offs_t offset, u32 data, u32 mem_mask = ~0);
DECLARE_WRITE_LINE_MEMBER(tattass_sound_irq_w);
- DECLARE_READ16_MEMBER(nslasher_debug_r);
+ u16 nslasher_debug_r();
virtual void video_start() override;
- uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
+ u32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
- DECLARE_READ16_MEMBER(port_b_tattass);
+ u16 port_b_tattass();
DECO16IC_BANK_CB_MEMBER(bank_callback);
void nslasher_map(address_map &map);
@@ -199,7 +198,7 @@ private:
int m_tattass_eprom_bit;
int m_last_clock;
- uint32_t m_buffer;
+ u32 m_buffer;
int m_buf_ptr;
int m_pending_command;
int m_read_bit_count;
@@ -217,6 +216,9 @@ public:
, m_sprite_lookup_ram(*this, "look%u", 0)
, m_vol_main(*this, "vol_main")
, m_vol_gun(*this, "vol_gun")
+ , m_io_inputs(*this, "INPUTS")
+ , m_io_light_x(*this, "LIGHT%u_X", 0U)
+ , m_io_light_y(*this, "LIGHT%u_Y", 0U)
, m_gun_speaker_disabled(true)
{ }
@@ -234,37 +236,41 @@ private:
required_device<deco_zoomspr_device> m_sprgenzoom;
required_device<buffered_spriteram32_device> m_spriteram;
- required_shared_ptr_array<uint32_t, 2> m_sprite_layout_ram;
- required_shared_ptr_array<uint32_t, 2> m_sprite_lookup_ram;
+ required_shared_ptr_array<u32, 2> m_sprite_layout_ram;
+ required_shared_ptr_array<u32, 2> m_sprite_lookup_ram;
required_device<lc7535_device> m_vol_main;
optional_device<lc7535_device> m_vol_gun;
- uint32_t m_sprite_ctrl;
+ optional_ioport m_io_inputs;
+ optional_ioport_array<2> m_io_light_x;
+ optional_ioport_array<2> m_io_light_y;
+
+ u32 m_sprite_ctrl;
int m_lightgun_port;
int m_oki2_bank; // lockload
bitmap_rgb32 m_temp_render_bitmap;
- DECLARE_READ32_MEMBER(lightgun_r);
- DECLARE_WRITE32_MEMBER(lightgun_w);
- DECLARE_WRITE32_MEMBER(sprite_control_w);
- DECLARE_WRITE32_MEMBER(spriteram_dma_w);
- DECLARE_WRITE32_MEMBER(gun_irq_ack_w);
- DECLARE_READ32_MEMBER(unk_video_r);
- DECLARE_WRITE8_MEMBER(eeprom_w);
- DECLARE_READ32_MEMBER(lockload_gun_mirror_r);
-
- DECLARE_WRITE32_MEMBER(volume_w);
- DECLARE_WRITE32_MEMBER(speaker_switch_w);
+ u32 lightgun_r();
+ void lightgun_w(offs_t offset, u32 data = 0);
+ void sprite_control_w(u32 data);
+ void spriteram_dma_w(u32 data);
+ void gun_irq_ack_w(u32 data);
+ u32 unk_video_r();
+ void eeprom_w(u8 data);
+ u32 lockload_gun_mirror_r(offs_t offset);
+
+ void volume_w(u32 data);
+ void speaker_switch_w(u32 data);
LC7535_VOLUME_CHANGED(volume_main_changed);
LC7535_VOLUME_CHANGED(volume_gun_changed);
- DECLARE_WRITE8_MEMBER(lockload_okibank_lo_w);
- DECLARE_WRITE8_MEMBER(lockload_okibank_hi_w); // lockload
+ void lockload_okibank_lo_w(u8 data);
+ void lockload_okibank_hi_w(u8 data); // lockload
virtual void video_start() override;
void dragngun_init_common();
- uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
+ u32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
DECO16IC_BANK_CB_MEMBER(bank_1_callback);
DECO16IC_BANK_CB_MEMBER(bank_2_callback);
diff --git a/src/mame/includes/equites.h b/src/mame/includes/equites.h
index e60d8a851e1..b7b32ec1167 100644
--- a/src/mame/includes/equites.h
+++ b/src/mame/includes/equites.h
@@ -143,7 +143,7 @@ class gekisou_state : public equites_state
public:
using equites_state::equites_state;
DECLARE_CUSTOM_INPUT_MEMBER(gekisou_unknown_bit_r);
- void clsunk(machine_config &config);
+ void bngotime(machine_config &config);
void gekisou(machine_config &config);
protected:
diff --git a/src/mame/layout/aci_borisdpl.lay b/src/mame/layout/aci_borisdpl.lay
index d391a8cc101..3932e51ab36 100644
--- a/src/mame/layout/aci_borisdpl.lay
+++ b/src/mame/layout/aci_borisdpl.lay
@@ -3,10 +3,11 @@
<!-- define elements -->
- <element name="black"><rect><color red="0.17" green="0.15" blue="0.15" /></rect></element>
- <element name="white"><rect><color red="0.81" green="0.8" blue="0.79" /></rect></element>
- <element name="disk_black"><disk><color red="0.17" green="0.15" blue="0.15" /></disk></element>
- <element name="disk_white"><disk><color red="0.81" green="0.8" blue="0.79" /></disk></element>
+ <element name="black"><rect><color red="0.28" green="0.16" blue="0.08" /></rect></element>
+ <element name="white"><rect><color red="0.7" green="0.56" blue="0.42" /></rect></element>
+ <element name="disk_black"><disk><color red="0.28" green="0.16" blue="0.08" /></disk></element>
+ <element name="disk_white"><disk><color red="0.7" green="0.56" blue="0.42" /></disk></element>
+ <element name="disk_white2"><disk><color red="0.77" green="0.77" blue="0.77" /></disk></element>
<element name="digit" defstate="0">
<led7seg><color red="1.0" green="0.1" blue="0.15" /></led7seg>
@@ -31,15 +32,15 @@
</text>
<rect>
<bounds x="0" y="2.5" width="1" height="2.5" />
- <color red="0.7" green="0.6" blue="0.4" />
+ <color red="0.95" green="0.8" blue="0.6" />
</rect>
<rect>
<bounds x="5" y="2.5" width="1" height="2.5" />
- <color red="0.7" green="0.6" blue="0.4" />
+ <color red="0.95" green="0.8" blue="0.6" />
</rect>
<rect>
<bounds x="0" y="5" width="6" height="1" />
- <color red="0.7" green="0.6" blue="0.4" />
+ <color red="0.95" green="0.8" blue="0.6" />
</rect>
</element>
<element name="piece_2">
@@ -49,19 +50,19 @@
</text>
<rect>
<bounds x="0" y="0" width="1" height="3" />
- <color red="0.7" green="0.6" blue="0.4" />
+ <color red="0.95" green="0.8" blue="0.6" />
</rect>
<rect>
<bounds x="5" y="2" width="1" height="3" />
- <color red="0.7" green="0.6" blue="0.4" />
+ <color red="0.95" green="0.8" blue="0.6" />
</rect>
<rect>
<bounds x="0" y="2" width="6" height="1" />
- <color red="0.7" green="0.6" blue="0.4" />
+ <color red="0.95" green="0.8" blue="0.6" />
</rect>
<rect>
<bounds x="0" y="5" width="6" height="1" />
- <color red="0.7" green="0.6" blue="0.4" />
+ <color red="0.95" green="0.8" blue="0.6" />
</rect>
</element>
<element name="piece_3">
@@ -71,15 +72,15 @@
</text>
<rect>
<bounds x="0" y="0" width="1" height="6" />
- <color red="0.7" green="0.6" blue="0.4" />
+ <color red="0.95" green="0.8" blue="0.6" />
</rect>
<rect>
<bounds x="5" y="2.5" width="1" height="2.5" />
- <color red="0.7" green="0.6" blue="0.4" />
+ <color red="0.95" green="0.8" blue="0.6" />
</rect>
<rect>
<bounds x="0" y="5" width="6" height="1" />
- <color red="0.7" green="0.6" blue="0.4" />
+ <color red="0.95" green="0.8" blue="0.6" />
</rect>
</element>
<element name="piece_4">
@@ -89,19 +90,19 @@
</text>
<rect>
<bounds x="0" y="2" width="1" height="3" />
- <color red="0.7" green="0.6" blue="0.4" />
+ <color red="0.95" green="0.8" blue="0.6" />
</rect>
<rect>
<bounds x="5" y="2" width="1" height="3" />
- <color red="0.7" green="0.6" blue="0.4" />
+ <color red="0.95" green="0.8" blue="0.6" />
</rect>
<rect>
<bounds x="0" y="2" width="6" height="1" />
- <color red="0.7" green="0.6" blue="0.4" />
+ <color red="0.95" green="0.8" blue="0.6" />
</rect>
<rect>
<bounds x="0" y="5" width="6" height="1" />
- <color red="0.7" green="0.6" blue="0.4" />
+ <color red="0.95" green="0.8" blue="0.6" />
</rect>
</element>
<element name="piece_5">
@@ -111,15 +112,15 @@
</text>
<rect>
<bounds x="0" y="0" width="1" height="6" />
- <color red="0.7" green="0.6" blue="0.4" />
+ <color red="0.95" green="0.8" blue="0.6" />
</rect>
<rect>
<bounds x="5" y="0" width="1" height="6" />
- <color red="0.7" green="0.6" blue="0.4" />
+ <color red="0.95" green="0.8" blue="0.6" />
</rect>
<rect>
<bounds x="0" y="5" width="6" height="1" />
- <color red="0.7" green="0.6" blue="0.4" />
+ <color red="0.95" green="0.8" blue="0.6" />
</rect>
</element>
<element name="piece_6">
@@ -129,97 +130,538 @@
</text>
<rect>
<bounds x="0" y="0" width="1" height="6" />
- <color red="0.7" green="0.6" blue="0.4" />
+ <color red="0.95" green="0.8" blue="0.6" />
</rect>
<rect>
<bounds x="5" y="0" width="1" height="6" />
- <color red="0.7" green="0.6" blue="0.4" />
+ <color red="0.95" green="0.8" blue="0.6" />
</rect>
<rect>
<bounds x="0" y="2" width="6" height="1" />
- <color red="0.7" green="0.6" blue="0.4" />
+ <color red="0.95" green="0.8" blue="0.6" />
</rect>
<rect>
<bounds x="0" y="5" width="6" height="1" />
- <color red="0.7" green="0.6" blue="0.4" />
+ <color red="0.95" green="0.8" blue="0.6" />
</rect>
</element>
<element name="text_0">
- <rect><color red="0.17" green="0.15" blue="0.15" /></rect>
- <text string="0"><color red="0.81" green="0.8" blue="0.79" /></text>
+ <rect><color red="0.28" green="0.16" blue="0.08" /></rect>
+ <text string="0"><color red="0.7" green="0.56" blue="0.42" /></text>
</element>
<element name="text_1">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="A 1"><color red="0.17" green="0.15" blue="0.15" /></text>
+ <rect><color red="0.7" green="0.56" blue="0.42" /></rect>
+ <text string="A 1"><color red="0.28" green="0.16" blue="0.08" /></text>
</element>
<element name="text_2">
- <rect><color red="0.17" green="0.15" blue="0.15" /></rect>
- <text string="B 2"><color red="0.81" green="0.8" blue="0.79" /></text>
+ <rect><color red="0.28" green="0.16" blue="0.08" /></rect>
+ <text string="B 2"><color red="0.7" green="0.56" blue="0.42" /></text>
</element>
<element name="text_3">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="C 3"><color red="0.17" green="0.15" blue="0.15" /></text>
+ <rect><color red="0.7" green="0.56" blue="0.42" /></rect>
+ <text string="C 3"><color red="0.28" green="0.16" blue="0.08" /></text>
</element>
<element name="text_4">
- <rect><color red="0.17" green="0.15" blue="0.15" /></rect>
- <text string="D 4"><color red="0.81" green="0.8" blue="0.79" /></text>
+ <rect><color red="0.28" green="0.16" blue="0.08" /></rect>
+ <text string="D 4"><color red="0.7" green="0.56" blue="0.42" /></text>
</element>
<element name="text_5">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="E 5"><color red="0.17" green="0.15" blue="0.15" /></text>
+ <rect><color red="0.7" green="0.56" blue="0.42" /></rect>
+ <text string="E 5"><color red="0.28" green="0.16" blue="0.08" /></text>
</element>
<element name="text_6">
- <rect><color red="0.17" green="0.15" blue="0.15" /></rect>
- <text string="F 6"><color red="0.81" green="0.8" blue="0.79" /></text>
+ <rect><color red="0.28" green="0.16" blue="0.08" /></rect>
+ <text string="F 6"><color red="0.7" green="0.56" blue="0.42" /></text>
</element>
<element name="text_7">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="G 7"><color red="0.17" green="0.15" blue="0.15" /></text>
+ <rect><color red="0.7" green="0.56" blue="0.42" /></rect>
+ <text string="G 7"><color red="0.28" green="0.16" blue="0.08" /></text>
</element>
<element name="text_8">
- <rect><color red="0.17" green="0.15" blue="0.15" /></rect>
- <text string="H 8"><color red="0.81" green="0.8" blue="0.79" /></text>
+ <rect><color red="0.28" green="0.16" blue="0.08" /></rect>
+ <text string="H 8"><color red="0.7" green="0.56" blue="0.42" /></text>
</element>
<element name="text_9a">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="9" align="1"><color red="0.17" green="0.15" blue="0.15" /></text>
+ <rect><color red="0.7" green="0.56" blue="0.42" /></rect>
+ <text string="9" align="1"><color red="0.28" green="0.16" blue="0.08" /></text>
</element>
<element name="text_9b">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="SET" align="2"><color red="0.17" green="0.15" blue="0.15" /></text>
+ <rect><color red="0.7" green="0.56" blue="0.42" /></rect>
+ <text string="SET" align="2"><color red="0.28" green="0.16" blue="0.08" /></text>
</element>
<element name="text_ti">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="TIME"><color red="0.17" green="0.15" blue="0.15" /></text>
+ <rect><color red="0.7" green="0.56" blue="0.42" /></rect>
+ <text string="TIME"><color red="0.28" green="0.16" blue="0.08" /></text>
</element>
<element name="text_bw">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="B/W"><color red="0.17" green="0.15" blue="0.15" /></text>
+ <rect><color red="0.7" green="0.56" blue="0.42" /></rect>
+ <text string="B/W"><color red="0.28" green="0.16" blue="0.08" /></text>
</element>
<element name="text_ra">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="RANK"><color red="0.17" green="0.15" blue="0.15" /></text>
+ <rect><color red="0.7" green="0.56" blue="0.42" /></rect>
+ <text string="RANK"><color red="0.28" green="0.16" blue="0.08" /></text>
</element>
<element name="text_re">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="RESET"><color red="0.17" green="0.15" blue="0.15" /></text>
+ <rect><color red="0.7" green="0.56" blue="0.42" /></rect>
+ <text string="RESET"><color red="0.28" green="0.16" blue="0.08" /></text>
</element>
<element name="text_ce">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="CE"><color red="0.17" green="0.15" blue="0.15" /></text>
+ <rect><color red="0.7" green="0.56" blue="0.42" /></rect>
+ <text string="CE"><color red="0.28" green="0.16" blue="0.08" /></text>
</element>
<element name="text_en">
- <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
- <text string="ENTER"><color red="0.17" green="0.15" blue="0.15" /></text>
+ <rect><color red="0.7" green="0.56" blue="0.42" /></rect>
+ <text string="ENTER"><color red="0.28" green="0.16" blue="0.08" /></text>
</element>
+ <element name="text_cl00">
+ <rect><color red="0.7" green="0.56" blue="0.42" /></rect>
+ <text string="A" align="1"><color red="0.95" green="0.8" blue="0.6" /></text>
+ </element>
+ <element name="text_cl01">
+ <rect><color red="0.42" green="0.24" blue="0.12" /></rect>
+ <text string="B" align="1"><color red="0.95" green="0.8" blue="0.6" /></text>
+ </element>
+ <element name="text_cl02">
+ <rect><color red="0.7" green="0.56" blue="0.42" /></rect>
+ <text string="C" align="1"><color red="0.95" green="0.8" blue="0.6" /></text>
+ </element>
+ <element name="text_cl03">
+ <rect><color red="0.42" green="0.24" blue="0.12" /></rect>
+ <text string="D" align="1"><color red="0.95" green="0.8" blue="0.6" /></text>
+ </element>
+ <element name="text_cl04">
+ <rect><color red="0.7" green="0.56" blue="0.42" /></rect>
+ <text string="E" align="1"><color red="0.95" green="0.8" blue="0.6" /></text>
+ </element>
+ <element name="text_cl05">
+ <rect><color red="0.42" green="0.24" blue="0.12" /></rect>
+ <text string="F" align="1"><color red="0.95" green="0.8" blue="0.6" /></text>
+ </element>
+ <element name="text_cl06">
+ <rect><color red="0.7" green="0.56" blue="0.42" /></rect>
+ <text string="G" align="1"><color red="0.95" green="0.8" blue="0.6" /></text>
+ </element>
+ <element name="text_cl07">
+ <rect><color red="0.42" green="0.24" blue="0.12" /></rect>
+ <text string="H" align="1"><color red="0.95" green="0.8" blue="0.6" /></text>
+ </element>
-<!-- build screen -->
+ <element name="text_cl10">
+ <rect><color red="0.42" green="0.24" blue="0.12" /></rect>
+ <text string="A" align="1"><color red="0.95" green="0.8" blue="0.6" /></text>
+ </element>
+ <element name="text_cl11">
+ <rect><color red="0.7" green="0.56" blue="0.42" /></rect>
+ <text string="B" align="1"><color red="0.95" green="0.8" blue="0.6" /></text>
+ </element>
+ <element name="text_cl12">
+ <rect><color red="0.42" green="0.24" blue="0.12" /></rect>
+ <text string="C" align="1"><color red="0.95" green="0.8" blue="0.6" /></text>
+ </element>
+ <element name="text_cl13">
+ <rect><color red="0.7" green="0.56" blue="0.42" /></rect>
+ <text string="D" align="1"><color red="0.95" green="0.8" blue="0.6" /></text>
+ </element>
+ <element name="text_cl14">
+ <rect><color red="0.42" green="0.24" blue="0.12" /></rect>
+ <text string="E" align="1"><color red="0.95" green="0.8" blue="0.6" /></text>
+ </element>
+ <element name="text_cl15">
+ <rect><color red="0.7" green="0.56" blue="0.42" /></rect>
+ <text string="F" align="1"><color red="0.95" green="0.8" blue="0.6" /></text>
+ </element>
+ <element name="text_cl16">
+ <rect><color red="0.42" green="0.24" blue="0.12" /></rect>
+ <text string="G" align="1"><color red="0.95" green="0.8" blue="0.6" /></text>
+ </element>
+ <element name="text_cl17">
+ <rect><color red="0.7" green="0.56" blue="0.42" /></rect>
+ <text string="H" align="1"><color red="0.95" green="0.8" blue="0.6" /></text>
+ </element>
+
+ <element name="text_cn00">
+ <rect><color red="0.7" green="0.56" blue="0.42" /></rect>
+ <text string="8" align="2"><color red="0.95" green="0.8" blue="0.6" /></text>
+ </element>
+ <element name="text_cn01">
+ <rect><color red="0.42" green="0.24" blue="0.12" /></rect>
+ <text string="7" align="2"><color red="0.95" green="0.8" blue="0.6" /></text>
+ </element>
+ <element name="text_cn02">
+ <rect><color red="0.7" green="0.56" blue="0.42" /></rect>
+ <text string="6" align="2"><color red="0.95" green="0.8" blue="0.6" /></text>
+ </element>
+ <element name="text_cn03">
+ <rect><color red="0.42" green="0.24" blue="0.12" /></rect>
+ <text string="5" align="2"><color red="0.95" green="0.8" blue="0.6" /></text>
+ </element>
+ <element name="text_cn04">
+ <rect><color red="0.7" green="0.56" blue="0.42" /></rect>
+ <text string="4" align="2"><color red="0.95" green="0.8" blue="0.6" /></text>
+ </element>
+ <element name="text_cn05">
+ <rect><color red="0.42" green="0.24" blue="0.12" /></rect>
+ <text string="3" align="2"><color red="0.95" green="0.8" blue="0.6" /></text>
+ </element>
+ <element name="text_cn06">
+ <rect><color red="0.7" green="0.56" blue="0.42" /></rect>
+ <text string="2" align="2"><color red="0.95" green="0.8" blue="0.6" /></text>
+ </element>
+ <element name="text_cn07">
+ <rect><color red="0.42" green="0.24" blue="0.12" /></rect>
+ <text string="1" align="2"><color red="0.95" green="0.8" blue="0.6" /></text>
+ </element>
+
+ <element name="text_cn10">
+ <rect><color red="0.42" green="0.24" blue="0.12" /></rect>
+ <text string="8" align="2"><color red="0.95" green="0.8" blue="0.6" /></text>
+ </element>
+ <element name="text_cn11">
+ <rect><color red="0.7" green="0.56" blue="0.42" /></rect>
+ <text string="7" align="2"><color red="0.95" green="0.8" blue="0.6" /></text>
+ </element>
+ <element name="text_cn12">
+ <rect><color red="0.42" green="0.24" blue="0.12" /></rect>
+ <text string="6" align="2"><color red="0.95" green="0.8" blue="0.6" /></text>
+ </element>
+ <element name="text_cn13">
+ <rect><color red="0.7" green="0.56" blue="0.42" /></rect>
+ <text string="5" align="2"><color red="0.95" green="0.8" blue="0.6" /></text>
+ </element>
+ <element name="text_cn14">
+ <rect><color red="0.42" green="0.24" blue="0.12" /></rect>
+ <text string="4" align="2"><color red="0.95" green="0.8" blue="0.6" /></text>
+ </element>
+ <element name="text_cn15">
+ <rect><color red="0.7" green="0.56" blue="0.42" /></rect>
+ <text string="3" align="2"><color red="0.95" green="0.8" blue="0.6" /></text>
+ </element>
+ <element name="text_cn16">
+ <rect><color red="0.42" green="0.24" blue="0.12" /></rect>
+ <text string="2" align="2"><color red="0.95" green="0.8" blue="0.6" /></text>
+ </element>
+ <element name="text_cn17">
+ <rect><color red="0.7" green="0.56" blue="0.42" /></rect>
+ <text string="1" align="2"><color red="0.95" green="0.8" blue="0.6" /></text>
+ </element>
+
+ <element name="text_warning">
+ <rect><color red="0.7" green="0.56" blue="0.42" /></rect>
+ <text string="Boris Diplomat's built-in chessboard is not electronic, player uses keypad to enter moves.">
+ <color red="0.5" green="0.4" blue="0.3" />
+ </text>
+ </element>
+
+
+<!-- sb board -->
+
+ <element name="cblack"><rect><color red="0.42" green="0.24" blue="0.12" /></rect></element>
+ <element name="cwhite"><rect><color red="0.7" green="0.56" blue="0.42" /></rect></element>
+
+ <element name="hlbb" defstate="0">
+ <text string=" "><bounds x="0" y="0" width="1" height="1" /></text>
+ <disk state="1">
+ <bounds x="0.12" y="0.12" width="0.76" height="0.76" />
+ <color red="0" green="0" blue="0" />
+ </disk>
+ </element>
+
+ <element name="piece" defstate="0">
+ <image file="chess/wp.png" state="1"/>
+ <image file="chess/wn.png" state="2"/>
+ <image file="chess/wb.png" state="3"/>
+ <image file="chess/wr.png" state="4"/>
+ <image file="chess/wq.png" state="5"/>
+ <image file="chess/wk.png" state="6"/>
+
+ <image file="chess/bp.png" state="7"/>
+ <image file="chess/bn.png" state="8"/>
+ <image file="chess/bb.png" state="9"/>
+ <image file="chess/br.png" state="10"/>
+ <image file="chess/bq.png" state="11"/>
+ <image file="chess/bk.png" state="12"/>
+
+ <!-- selected pieces -->
+ <image file="chess/wp.png" state="13"><color alpha="0.5" /></image>
+ <image file="chess/wn.png" state="14"><color alpha="0.5" /></image>
+ <image file="chess/wb.png" state="15"><color alpha="0.5" /></image>
+ <image file="chess/wr.png" state="16"><color alpha="0.5" /></image>
+ <image file="chess/wq.png" state="17"><color alpha="0.5" /></image>
+ <image file="chess/wk.png" state="18"><color alpha="0.5" /></image>
+
+ <image file="chess/bp.png" state="19"><color alpha="0.5" /></image>
+ <image file="chess/bn.png" state="20"><color alpha="0.5" /></image>
+ <image file="chess/bb.png" state="21"><color alpha="0.5" /></image>
+ <image file="chess/br.png" state="22"><color alpha="0.5" /></image>
+ <image file="chess/bq.png" state="23"><color alpha="0.5" /></image>
+ <image file="chess/bk.png" state="24"><color alpha="0.5" /></image>
+ </element>
+
+ <group name="sb_board">
+ <bounds x="0" y="0" width="80" height="80" />
+
+ <!-- squares (avoid seams) -->
+ <bezel element="cwhite"><bounds x="0" y="0" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="10" y="0" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="20" y="0" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="30" y="0" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="40" y="0" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="50" y="0" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="60" y="0" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="70" y="0" width="10" height="11" /></bezel>
- <view name="Internal Layout">
- <bounds left="6" right="94" top="2" bottom="64" />
+ <bezel element="cblack"><bounds x="0" y="10" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="10" y="10" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="20" y="10" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="30" y="10" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="40" y="10" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="50" y="10" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="60" y="10" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="70" y="10" width="10" height="11" /></bezel>
+
+ <bezel element="cwhite"><bounds x="0" y="20" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="10" y="20" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="20" y="20" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="30" y="20" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="40" y="20" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="50" y="20" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="60" y="20" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="70" y="20" width="10" height="11" /></bezel>
+
+ <bezel element="cblack"><bounds x="0" y="30" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="10" y="30" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="20" y="30" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="30" y="30" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="40" y="30" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="50" y="30" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="60" y="30" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="70" y="30" width="10" height="11" /></bezel>
+
+ <bezel element="cwhite"><bounds x="0" y="40" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="10" y="40" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="20" y="40" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="30" y="40" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="40" y="40" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="50" y="40" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="60" y="40" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="70" y="40" width="10" height="11" /></bezel>
+
+ <bezel element="cblack"><bounds x="0" y="50" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="10" y="50" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="20" y="50" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="30" y="50" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="40" y="50" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="50" y="50" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="60" y="50" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="70" y="50" width="10" height="11" /></bezel>
+
+ <bezel element="cwhite"><bounds x="0" y="60" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="10" y="60" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="20" y="60" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="30" y="60" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="40" y="60" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="50" y="60" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="60" y="60" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="70" y="60" width="10" height="11" /></bezel>
+
+ <bezel element="cblack"><bounds x="0" y="70" width="11" height="10" /></bezel>
+ <bezel element="cwhite"><bounds x="10" y="70" width="11" height="10" /></bezel>
+ <bezel element="cblack"><bounds x="20" y="70" width="11" height="10" /></bezel>
+ <bezel element="cwhite"><bounds x="30" y="70" width="11" height="10" /></bezel>
+ <bezel element="cblack"><bounds x="40" y="70" width="11" height="10" /></bezel>
+ <bezel element="cwhite"><bounds x="50" y="70" width="11" height="10" /></bezel>
+ <bezel element="cblack"><bounds x="60" y="70" width="11" height="10" /></bezel>
+ <bezel element="cwhite"><bounds x="70" y="70" width="10" height="10" /></bezel>
+
+ <!-- coords -->
+ <repeat count="4">
+ <param name="y1" start="0.25" increment="20" />
+ <param name="y2" start="10.25" increment="20" />
+ <repeat count="8">
+ <param name="i" start="0" increment="1" />
+ <param name="x" start="0.5" increment="10" />
+ <bezel element="text_cl0~i~"><bounds x="~x~" y="~y1~" width="3" height="2" /></bezel>
+ <bezel element="text_cl1~i~"><bounds x="~x~" y="~y2~" width="3" height="2" /></bezel>
+ </repeat>
+ </repeat>
+
+ <repeat count="4">
+ <param name="x1" start="6" increment="20" />
+ <param name="x2" start="16" increment="20" />
+ <repeat count="8">
+ <param name="i" start="0" increment="1" />
+ <param name="y" start="7.75" increment="10" />
+ <bezel element="text_cn0~i~"><bounds x="~x1~" y="~y~" width="3.5" height="2" /></bezel>
+ <bezel element="text_cn1~i~"><bounds x="~x2~" y="~y~" width="3.5" height="2" /></bezel>
+ </repeat>
+ </repeat>
+
+ <!-- sensors, pieces -->
+ <repeat count="8">
+ <param name="y" start="0" increment="10" />
+ <param name="i" start="8" increment="-1" />
+
+ <bezel element="hlbb" inputtag="board:RANK.~i~" inputmask="0x01"><bounds x="0" y="~y~" width="10" height="10" /><color alpha="0.04" /></bezel>
+ <bezel element="hlbb" inputtag="board:RANK.~i~" inputmask="0x02"><bounds x="10" y="~y~" width="10" height="10" /><color alpha="0.04" /></bezel>
+ <bezel element="hlbb" inputtag="board:RANK.~i~" inputmask="0x04"><bounds x="20" y="~y~" width="10" height="10" /><color alpha="0.04" /></bezel>
+ <bezel element="hlbb" inputtag="board:RANK.~i~" inputmask="0x08"><bounds x="30" y="~y~" width="10" height="10" /><color alpha="0.04" /></bezel>
+ <bezel element="hlbb" inputtag="board:RANK.~i~" inputmask="0x10"><bounds x="40" y="~y~" width="10" height="10" /><color alpha="0.04" /></bezel>
+ <bezel element="hlbb" inputtag="board:RANK.~i~" inputmask="0x20"><bounds x="50" y="~y~" width="10" height="10" /><color alpha="0.04" /></bezel>
+ <bezel element="hlbb" inputtag="board:RANK.~i~" inputmask="0x40"><bounds x="60" y="~y~" width="10" height="10" /><color alpha="0.04" /></bezel>
+ <bezel element="hlbb" inputtag="board:RANK.~i~" inputmask="0x80"><bounds x="70" y="~y~" width="10" height="10" /><color alpha="0.04" /></bezel>
+
+ <bezel name="piece_a~i~" element="piece"><bounds x="0" y="~y~" width="10" height="10" /></bezel>
+ <bezel name="piece_b~i~" element="piece"><bounds x="10" y="~y~" width="10" height="10" /></bezel>
+ <bezel name="piece_c~i~" element="piece"><bounds x="20" y="~y~" width="10" height="10" /></bezel>
+ <bezel name="piece_d~i~" element="piece"><bounds x="30" y="~y~" width="10" height="10" /></bezel>
+ <bezel name="piece_e~i~" element="piece"><bounds x="40" y="~y~" width="10" height="10" /></bezel>
+ <bezel name="piece_f~i~" element="piece"><bounds x="50" y="~y~" width="10" height="10" /></bezel>
+ <bezel name="piece_g~i~" element="piece"><bounds x="60" y="~y~" width="10" height="10" /></bezel>
+ <bezel name="piece_h~i~" element="piece"><bounds x="70" y="~y~" width="10" height="10" /></bezel>
+ </repeat>
+ </group>
+
+
+<!-- sb ui -->
+
+ <element name="hlub" defstate="0">
+ <rect state="1"><color red="0" green="0" blue="0" /></rect>
+ </element>
+
+ <element name="text_uit1"><text string="S.BOARD"><color red="0.81" green="0.8" blue="0.79" /></text></element>
+ <element name="text_uit2"><text string="INTERFACE"><color red="0.81" green="0.8" blue="0.79" /></text></element>
+ <element name="text_uib1"><text string="BOARD:"><color red="0.81" green="0.8" blue="0.79" /></text></element>
+ <element name="text_uib2">
+ <rect><color red="0.7" green="0.56" blue="0.42" /></rect>
+ <text string="RESET"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_uib3">
+ <rect><color red="0.7" green="0.56" blue="0.42" /></rect>
+ <text string="CLEAR"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_uis1"><text string="SPAWN:"><color red="0.81" green="0.8" blue="0.79" /></text></element>
+ <element name="text_uih1"><text string="HAND:"><color red="0.81" green="0.8" blue="0.79" /></text></element>
+ <element name="text_uih2">
+ <rect><color red="0.7" green="0.56" blue="0.42" /></rect>
+ <text string="REMOVE"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_uiu1"><text string="UNDO:"><color red="0.81" green="0.8" blue="0.79" /></text></element>
+ <element name="text_uiu2a">
+ <rect><color red="0.7" green="0.56" blue="0.42" /></rect>
+ <text string=" &lt;&lt;"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_uiu2b">
+ <rect><color red="0.7" green="0.56" blue="0.42" /></rect>
+ <text string=" &lt; "><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_uiu2c">
+ <rect><color red="0.7" green="0.56" blue="0.42" /></rect>
+ <text string=" &gt;"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_uiu2d">
+ <rect><color red="0.7" green="0.56" blue="0.42" /></rect>
+ <text string=" &gt;&gt;"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_uiu3a" defstate="0">
+ <simplecounter maxstate="999" digits="1" align="2">
+ <color red="0.81" green="0.8" blue="0.79" />
+ </simplecounter>
+ </element>
+ <element name="text_uiu3b"><text string="/"><color red="0.81" green="0.8" blue="0.79" /></text></element>
+ <element name="text_uiu3c" defstate="0">
+ <simplecounter maxstate="999" digits="1" align="1">
+ <color red="0.81" green="0.8" blue="0.79" />
+ </simplecounter>
+ </element>
+
+ <group name="sb_ui">
+ <bounds x="0" y="0" width="10" height="80" />
+ <bezel element="cblack"><bounds x="0" y="0" width="10" height="1" /></bezel>
+ <bezel element="cblack"><bounds x="0" y="7" width="10" height="1" /></bezel>
+ <bezel element="cblack"><bounds x="0" y="79" width="10" height="1" /></bezel>
+ <bezel element="text_uit1"><bounds x="0" y="2" width="10" height="2" /></bezel>
+ <bezel element="text_uit2"><bounds x="0" y="4" width="10" height="2" /></bezel>
+
+ <!-- board -->
+ <bezel element="text_uib1"><bounds x="0" y="9" width="10" height="2" /></bezel>
+ <bezel element="cwhite"><bounds x="1" y="11.5" width="8" height="2.5" /></bezel>
+ <bezel element="cwhite"><bounds x="1" y="15" width="8" height="2.5" /></bezel>
+
+ <bezel element="text_uib2"><bounds x="1.5" y="11.75" width="7" height="2" /></bezel>
+ <bezel element="text_uib3"><bounds x="1.5" y="15.25" width="7" height="2" /></bezel>
+
+ <bezel element="hlub" inputtag="board:UI" inputmask="0x200"><bounds x="1" y="11.5" width="8" height="2.5" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:UI" inputmask="0x100"><bounds x="1" y="15" width="8" height="2.5" /><color alpha="0.25" /></bezel>
+
+ <!-- spawn -->
+ <bezel element="text_uis1"><bounds x="0" y="20.5" width="10" height="2" /></bezel>
+ <bezel element="cwhite"><bounds x="1" y="23" width="8" height="12" /></bezel>
+ <bezel element="cwhite"><bounds x="1" y="36" width="8" height="12" /></bezel>
+
+ <bezel name="piece_ui1" element="piece"><bounds x="1" y="23" width="4" height="4" /></bezel>
+ <bezel name="piece_ui2" element="piece"><bounds x="1" y="27" width="4" height="4" /></bezel>
+ <bezel name="piece_ui3" element="piece"><bounds x="1" y="31" width="4" height="4" /></bezel>
+ <bezel name="piece_ui4" element="piece"><bounds x="5" y="23" width="4" height="4" /></bezel>
+ <bezel name="piece_ui5" element="piece"><bounds x="5" y="27" width="4" height="4" /></bezel>
+ <bezel name="piece_ui6" element="piece"><bounds x="5" y="31" width="4" height="4" /></bezel>
+ <bezel name="piece_ui7" element="piece"><bounds x="1" y="36" width="4" height="4" /></bezel>
+ <bezel name="piece_ui8" element="piece"><bounds x="1" y="40" width="4" height="4" /></bezel>
+ <bezel name="piece_ui9" element="piece"><bounds x="1" y="44" width="4" height="4" /></bezel>
+ <bezel name="piece_ui10" element="piece"><bounds x="5" y="36" width="4" height="4" /></bezel>
+ <bezel name="piece_ui11" element="piece"><bounds x="5" y="40" width="4" height="4" /></bezel>
+ <bezel name="piece_ui12" element="piece"><bounds x="5" y="44" width="4" height="4" /></bezel>
+
+ <bezel element="hlub" inputtag="board:SPAWN" inputmask="0x0001"><bounds x="1" y="23" width="4" height="4" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:SPAWN" inputmask="0x0002"><bounds x="1" y="27" width="4" height="4" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:SPAWN" inputmask="0x0004"><bounds x="1" y="31" width="4" height="4" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:SPAWN" inputmask="0x0008"><bounds x="5" y="23" width="4" height="4" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:SPAWN" inputmask="0x0010"><bounds x="5" y="27" width="4" height="4" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:SPAWN" inputmask="0x0020"><bounds x="5" y="31" width="4" height="4" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:SPAWN" inputmask="0x0040"><bounds x="1" y="36" width="4" height="4" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:SPAWN" inputmask="0x0080"><bounds x="1" y="40" width="4" height="4" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:SPAWN" inputmask="0x0100"><bounds x="1" y="44" width="4" height="4" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:SPAWN" inputmask="0x0200"><bounds x="5" y="36" width="4" height="4" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:SPAWN" inputmask="0x0400"><bounds x="5" y="40" width="4" height="4" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:SPAWN" inputmask="0x0800"><bounds x="5" y="44" width="4" height="4" /><color alpha="0.25" /></bezel>
+
+ <!-- hand -->
+ <bezel element="text_uih1"><bounds x="0" y="51" width="10" height="2" /></bezel>
+ <bezel element="cblack"><bounds x="1" y="53.5" width="8" height="6" /></bezel>
+ <bezel name="piece_ui0" element="piece"><bounds x="2" y="53.5" width="6" height="6" /></bezel>
+
+ <bezel element="cwhite"><bounds x="1" y="60.5" width="8" height="2.5" /></bezel>
+ <bezel element="text_uih2"><bounds x="1.5" y="60.75" width="7" height="2" /></bezel>
+ <bezel element="hlub" inputtag="board:UI" inputmask="0x08"><bounds x="1" y="60.5" width="8" height="2.5" /><color alpha="0.25" /></bezel>
+
+ <!-- undo -->
+ <bezel element="text_uiu1"><bounds x="0" y="66" width="10" height="2" /></bezel>
+ <bezel element="cwhite"><bounds x="1" y="68.5" width="1.7" height="6" /></bezel>
+ <bezel element="cwhite"><bounds x="3.1" y="68.5" width="1.7" height="6" /></bezel>
+ <bezel element="cwhite"><bounds x="5.2" y="68.5" width="1.7" height="6" /></bezel>
+ <bezel element="cwhite"><bounds x="7.3" y="68.5" width="1.7" height="6" /></bezel>
+ <bezel element="text_uiu2a"><bounds x="1" y="69.5" width="1.7" height="4" /></bezel>
+ <bezel element="text_uiu2b"><bounds x="3.1" y="69.5" width="1.7" height="4" /></bezel>
+ <bezel element="text_uiu2c"><bounds x="5.2" y="69.5" width="1.7" height="4" /></bezel>
+ <bezel element="text_uiu2d"><bounds x="7.3" y="69.5" width="1.7" height="4" /></bezel>
+
+ <bezel element="hlub" inputtag="board:UI" inputmask="0x10"><bounds x="1" y="68.5" width="1.7" height="6" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:UI" inputmask="0x20"><bounds x="3.1" y="68.5" width="1.7" height="6" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:UI" inputmask="0x40"><bounds x="5.2" y="68.5" width="1.7" height="6" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:UI" inputmask="0x80"><bounds x="7.3" y="68.5" width="1.7" height="6" /><color alpha="0.25" /></bezel>
+
+ <bezel name="count_ui0" element="text_uiu3a"><bounds x="0" y="75" width="4" height="2" /></bezel>
+ <bezel name="count_ui1" element="text_uiu3c"><bounds x="6" y="75" width="4" height="2" /></bezel>
+ <bezel element="text_uiu3b"><bounds x="4" y="75" width="2" height="2" /></bezel>
+ </group>
+
+
+<!-- digits -->
+
+ <group name="digits">
+ <bounds x="10" y="4" width="80" height="19" />
<bezel name="digit0" element="digit"><bounds x="10" y="4" width="10" height="15" /></bezel>
<bezel name="digit1" element="digit"><bounds x="20" y="4" width="10" height="15" /></bezel>
@@ -230,18 +672,21 @@
<bezel name="digit6" element="digit"><bounds x="70" y="4" width="10" height="15" /></bezel>
<bezel name="digit7" element="digit"><bounds x="80" y="4" width="10" height="15" /></bezel>
- <bezel element="disk_white"><bounds x="14" y="21" width="2" height="2" /></bezel>
- <bezel element="disk_white"><bounds x="24" y="21" width="2" height="2" /></bezel>
- <bezel element="disk_white"><bounds x="34" y="21" width="2" height="2" /></bezel>
- <bezel element="disk_white"><bounds x="44" y="21" width="2" height="2" /></bezel>
- <bezel element="disk_white"><bounds x="54" y="21" width="2" height="2" /></bezel>
- <bezel element="disk_white"><bounds x="64" y="21" width="2" height="2" /></bezel>
- <bezel element="disk_white"><bounds x="74" y="21" width="2" height="2" /></bezel>
- <bezel element="disk_white"><bounds x="84" y="21" width="2" height="2" /></bezel>
+ <bezel element="disk_white2"><bounds x="14" y="21" width="2" height="2" /></bezel>
+ <bezel element="disk_white2"><bounds x="24" y="21" width="2" height="2" /></bezel>
+ <bezel element="disk_white2"><bounds x="34" y="21" width="2" height="2" /></bezel>
+ <bezel element="disk_white2"><bounds x="44" y="21" width="2" height="2" /></bezel>
+ <bezel element="disk_white2"><bounds x="54" y="21" width="2" height="2" /></bezel>
+ <bezel element="disk_white2"><bounds x="64" y="21" width="2" height="2" /></bezel>
+ <bezel element="disk_white2"><bounds x="74" y="21" width="2" height="2" /></bezel>
+ <bezel element="disk_white2"><bounds x="84" y="21" width="2" height="2" /></bezel>
+ </group>
- <bezel element="black"><bounds x="6" y="25" width="88" height="1" /></bezel>
- <!-- button panel -->
+<!-- button panel -->
+
+ <group name="buttons">
+ <bounds x="8" y="28" width="84" height="34" />
<bezel element="white"><bounds x="8" y="28" width="84" height="34" /></bezel>
<bezel element="black"><bounds x="10" y="30" width="10" height="10" /></bezel>
@@ -294,25 +739,48 @@
<bezel element="disk_white"><bounds x="34.5" y="54.5" width="1" height="1" /></bezel>
<bezel element="disk_black"><bounds x="44.5" y="54.5" width="1" height="1" /></bezel>
- <bezel element="hl" inputtag="IN.3" inputmask="0x01"><bounds x="20" y="30" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.3" inputmask="0x02"><bounds x="30" y="30" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.3" inputmask="0x04"><bounds x="40" y="30" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.0" inputmask="0x01"><bounds x="50" y="30" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.0" inputmask="0x04"><bounds x="60" y="30" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="RESET" inputmask="0x01"><bounds x="80" y="30" width="10" height="10" /><color alpha="0.4" /></bezel>
-
- <bezel element="hl" inputtag="IN.2" inputmask="0x08"><bounds x="10" y="40" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.2" inputmask="0x01"><bounds x="20" y="40" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.2" inputmask="0x02"><bounds x="30" y="40" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.2" inputmask="0x04"><bounds x="40" y="40" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.0" inputmask="0x02"><bounds x="60" y="40" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.3" inputmask="0x08"><bounds x="70" y="40" width="10" height="10" /><color alpha="0.4" /></bezel>
-
- <bezel element="hl" inputtag="IN.1" inputmask="0x01"><bounds x="20" y="50" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.1" inputmask="0x02"><bounds x="30" y="50" width="10" height="10" /><color alpha="0.2" /></bezel>
- <bezel element="hl" inputtag="IN.1" inputmask="0x04"><bounds x="40" y="50" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.1" inputmask="0x08"><bounds x="60" y="50" width="10" height="10" /><color alpha="0.4" /></bezel>
- <bezel element="hl" inputtag="IN.0" inputmask="0x08"><bounds x="80" y="50" width="10" height="10" /><color alpha="0.4" /></bezel>
+ <bezel element="hl" inputtag="IN.3" inputmask="0x01"><bounds x="20" y="30" width="10" height="10" /><color alpha="0.15" /></bezel>
+ <bezel element="hl" inputtag="IN.3" inputmask="0x02"><bounds x="30" y="30" width="10" height="10" /><color alpha="0.15" /></bezel>
+ <bezel element="hl" inputtag="IN.3" inputmask="0x04"><bounds x="40" y="30" width="10" height="10" /><color alpha="0.15" /></bezel>
+ <bezel element="hl" inputtag="IN.0" inputmask="0x01"><bounds x="50" y="30" width="10" height="10" /><color alpha="0.15" /></bezel>
+ <bezel element="hl" inputtag="IN.0" inputmask="0x04"><bounds x="60" y="30" width="10" height="10" /><color alpha="0.15" /></bezel>
+ <bezel element="hl" inputtag="RESET" inputmask="0x01"><bounds x="80" y="30" width="10" height="10" /><color alpha="0.15" /></bezel>
+
+ <bezel element="hl" inputtag="IN.2" inputmask="0x08"><bounds x="10" y="40" width="10" height="10" /><color alpha="0.15" /></bezel>
+ <bezel element="hl" inputtag="IN.2" inputmask="0x01"><bounds x="20" y="40" width="10" height="10" /><color alpha="0.15" /></bezel>
+ <bezel element="hl" inputtag="IN.2" inputmask="0x02"><bounds x="30" y="40" width="10" height="10" /><color alpha="0.15" /></bezel>
+ <bezel element="hl" inputtag="IN.2" inputmask="0x04"><bounds x="40" y="40" width="10" height="10" /><color alpha="0.15" /></bezel>
+ <bezel element="hl" inputtag="IN.0" inputmask="0x02"><bounds x="60" y="40" width="10" height="10" /><color alpha="0.15" /></bezel>
+ <bezel element="hl" inputtag="IN.3" inputmask="0x08"><bounds x="70" y="40" width="10" height="10" /><color alpha="0.15" /></bezel>
+
+ <bezel element="hl" inputtag="IN.1" inputmask="0x01"><bounds x="20" y="50" width="10" height="10" /><color alpha="0.15" /></bezel>
+ <bezel element="hl" inputtag="IN.1" inputmask="0x02"><bounds x="30" y="50" width="10" height="10" /><color alpha="0.15" /></bezel>
+ <bezel element="hl" inputtag="IN.1" inputmask="0x04"><bounds x="40" y="50" width="10" height="10" /><color alpha="0.15" /></bezel>
+ <bezel element="hl" inputtag="IN.1" inputmask="0x08"><bounds x="60" y="50" width="10" height="10" /><color alpha="0.15" /></bezel>
+ <bezel element="hl" inputtag="IN.0" inputmask="0x08"><bounds x="80" y="50" width="10" height="10" /><color alpha="0.15" /></bezel>
+ </group>
+
+
+<!-- build screen -->
+
+ <view name="Internal Layout (Full)">
+ <bounds left="-4" right="94" top="16.5" bottom="152" />
+ <bezel element="cwhite"><bounds x="8" y="30" width="84" height="84" /></bezel>
+ <bezel element="text_warning"><bounds x="10" y="30.02" width="80" height="1.98" /></bezel>
+ <group ref="sb_board"><bounds x="10" y="32" width="80" height="80" /></group>
+ <group ref="sb_ui"><bounds x="-3" y="32" width="10" height="80" /></group>
+
+ <group ref="digits"><bounds x="10" y="18.5" width="40" height="9.5" /></group>
+ <group ref="buttons"><bounds x="8" y="116" width="84" height="34" /></group>
+ </view>
+
+ <view name="Internal Layout (Buttons)">
+ <bounds left="6" right="94" top="11.5" bottom="64" />
+
+ <group ref="digits"><bounds x="10" y="13.5" width="40" height="9.5" /></group>
+ <bezel element="black"><bounds x="6" y="25" width="88" height="1" /></bezel>
+ <group ref="buttons"><bounds x="8" y="28" width="84" height="34" /></group>
</view>
+
</mamelayout>
diff --git a/src/mame/layout/aci_ggm.lay b/src/mame/layout/aci_ggm.lay
index 61e61c94084..1cce579b017 100644
--- a/src/mame/layout/aci_ggm.lay
+++ b/src/mame/layout/aci_ggm.lay
@@ -1,6 +1,8 @@
<?xml version="1.0"?>
<mamelayout version="2">
+<!-- NOTE: no chesspieces simulation here, ACI GGM is a multiple boardgame console, not just chess -->
+
<!-- define elements -->
<element name="black"><rect><color red="0.16" green="0.16" blue="0.16" /></rect></element>
diff --git a/src/mame/layout/aci_prodigy.lay b/src/mame/layout/aci_prodigy.lay
index 0c68ddb666d..522205b4faf 100644
--- a/src/mame/layout/aci_prodigy.lay
+++ b/src/mame/layout/aci_prodigy.lay
@@ -640,11 +640,11 @@
<!-- display -->
<bezel element="gold"><bounds x="471" y="197" width="303" height="121" /></bezel>
<bezel element="black"><bounds x="474" y="200" width="297" height="115" /></bezel>
- <bezel element="blackb"><bounds x="538.5" y="210" width="168" height="68" /></bezel>
- <bezel name="digit0" element="digit"><bounds x="558.5" y="220" width="32" height="48" /></bezel>
- <bezel name="digit1" element="digit"><bounds x="590.5" y="220" width="32" height="48" /></bezel>
- <bezel name="digit2" element="digit"><bounds x="622.5" y="220" width="32" height="48" /></bezel>
- <bezel name="digit3" element="digit"><bounds x="654.5" y="220" width="32" height="48" /></bezel>
+ <bezel element="blackb"><bounds x="523.5" y="210" width="198" height="49" /></bezel>
+ <bezel name="digit0" element="digit"><bounds x="542.5" y="215" width="26" height="39" /></bezel>
+ <bezel name="digit1" element="digit"><bounds x="587.5" y="215" width="26" height="39" /></bezel>
+ <bezel name="digit2" element="digit"><bounds x="631.5" y="215" width="26" height="39" /></bezel>
+ <bezel name="digit3" element="digit"><bounds x="676.5" y="215" width="26" height="39" /></bezel>
<!-- keypad -->
<bezel element="gold"><bounds x="471" y="328" width="303" height="273" /></bezel>
@@ -708,26 +708,26 @@
<bezel element="piece_5"><bounds x="575" y="465" width="20" height="20" /></bezel>
<bezel element="piece_6"><bounds x="650" y="465" width="20" height="20" /></bezel>
- <bezel element="hl" inputtag="IN.0" inputmask="0x004"><bounds x="474" y="331" width="72" height="51" /><color alpha="0.15" /></bezel>
- <bezel element="hl" inputtag="IN.0" inputmask="0x002"><bounds x="474" y="385" width="72" height="51" /><color alpha="0.15" /></bezel>
- <bezel element="hl" inputtag="IN.0" inputmask="0x001"><bounds x="474" y="439" width="72" height="51" /><color alpha="0.15" /></bezel>
- <bezel element="hl" inputtag="IN.0" inputmask="0x200"><bounds x="474" y="493" width="72" height="51" /><color alpha="0.15" /></bezel>
- <bezel element="hl" inputtag="IN.0" inputmask="0x100"><bounds x="474" y="547" width="72" height="51" /><color alpha="0.15" /></bezel>
- <bezel element="hl" inputtag="IN.1" inputmask="0x004"><bounds x="549" y="331" width="72" height="51" /><color alpha="0.15" /></bezel>
- <bezel element="hl" inputtag="IN.1" inputmask="0x002"><bounds x="549" y="385" width="72" height="51" /><color alpha="0.15" /></bezel>
- <bezel element="hl" inputtag="IN.1" inputmask="0x001"><bounds x="549" y="439" width="72" height="51" /><color alpha="0.15" /></bezel>
- <bezel element="hl" inputtag="IN.1" inputmask="0x200"><bounds x="549" y="493" width="72" height="51" /><color alpha="0.15" /></bezel>
- <bezel element="hl" inputtag="IN.1" inputmask="0x100"><bounds x="549" y="547" width="72" height="51" /><color alpha="0.15" /></bezel>
- <bezel element="hl" inputtag="IN.1" inputmask="0x008"><bounds x="624" y="331" width="72" height="51" /><color alpha="0.15" /></bezel>
- <bezel element="hl" inputtag="IN.1" inputmask="0x010"><bounds x="624" y="385" width="72" height="51" /><color alpha="0.15" /></bezel>
- <bezel element="hl" inputtag="IN.1" inputmask="0x020"><bounds x="624" y="439" width="72" height="51" /><color alpha="0.15" /></bezel>
- <bezel element="hl" inputtag="IN.1" inputmask="0x040"><bounds x="624" y="493" width="72" height="51" /><color alpha="0.15" /></bezel>
- <bezel element="hl" inputtag="IN.1" inputmask="0x080"><bounds x="624" y="547" width="72" height="51" /><color alpha="0.15" /></bezel>
- <bezel element="hl" inputtag="IN.0" inputmask="0x008"><bounds x="699" y="331" width="72" height="51" /><color alpha="0.15" /></bezel>
- <bezel element="hl" inputtag="IN.0" inputmask="0x010"><bounds x="699" y="385" width="72" height="51" /><color alpha="0.15" /></bezel>
- <bezel element="hl" inputtag="IN.0" inputmask="0x020"><bounds x="699" y="439" width="72" height="51" /><color alpha="0.15" /></bezel>
- <bezel element="hl" inputtag="IN.0" inputmask="0x040"><bounds x="699" y="493" width="72" height="51" /><color alpha="0.15" /></bezel>
- <bezel element="hl" inputtag="IN.0" inputmask="0x080"><bounds x="699" y="547" width="72" height="51" /><color alpha="0.15" /></bezel>
+ <bezel element="hl" inputtag="IN.0" inputmask="0x010"><bounds x="474" y="331" width="72" height="51" /><color alpha="0.15" /></bezel>
+ <bezel element="hl" inputtag="IN.0" inputmask="0x008"><bounds x="474" y="385" width="72" height="51" /><color alpha="0.15" /></bezel>
+ <bezel element="hl" inputtag="IN.0" inputmask="0x004"><bounds x="474" y="439" width="72" height="51" /><color alpha="0.15" /></bezel>
+ <bezel element="hl" inputtag="IN.0" inputmask="0x002"><bounds x="474" y="493" width="72" height="51" /><color alpha="0.15" /></bezel>
+ <bezel element="hl" inputtag="IN.0" inputmask="0x001"><bounds x="474" y="547" width="72" height="51" /><color alpha="0.15" /></bezel>
+ <bezel element="hl" inputtag="IN.1" inputmask="0x010"><bounds x="549" y="331" width="72" height="51" /><color alpha="0.15" /></bezel>
+ <bezel element="hl" inputtag="IN.1" inputmask="0x008"><bounds x="549" y="385" width="72" height="51" /><color alpha="0.15" /></bezel>
+ <bezel element="hl" inputtag="IN.1" inputmask="0x004"><bounds x="549" y="439" width="72" height="51" /><color alpha="0.15" /></bezel>
+ <bezel element="hl" inputtag="IN.1" inputmask="0x002"><bounds x="549" y="493" width="72" height="51" /><color alpha="0.15" /></bezel>
+ <bezel element="hl" inputtag="IN.1" inputmask="0x001"><bounds x="549" y="547" width="72" height="51" /><color alpha="0.15" /></bezel>
+ <bezel element="hl" inputtag="IN.1" inputmask="0x020"><bounds x="624" y="331" width="72" height="51" /><color alpha="0.15" /></bezel>
+ <bezel element="hl" inputtag="IN.1" inputmask="0x040"><bounds x="624" y="385" width="72" height="51" /><color alpha="0.15" /></bezel>
+ <bezel element="hl" inputtag="IN.1" inputmask="0x080"><bounds x="624" y="439" width="72" height="51" /><color alpha="0.15" /></bezel>
+ <bezel element="hl" inputtag="IN.1" inputmask="0x100"><bounds x="624" y="493" width="72" height="51" /><color alpha="0.15" /></bezel>
+ <bezel element="hl" inputtag="IN.1" inputmask="0x200"><bounds x="624" y="547" width="72" height="51" /><color alpha="0.15" /></bezel>
+ <bezel element="hl" inputtag="IN.0" inputmask="0x020"><bounds x="699" y="331" width="72" height="51" /><color alpha="0.15" /></bezel>
+ <bezel element="hl" inputtag="IN.0" inputmask="0x040"><bounds x="699" y="385" width="72" height="51" /><color alpha="0.15" /></bezel>
+ <bezel element="hl" inputtag="IN.0" inputmask="0x080"><bounds x="699" y="439" width="72" height="51" /><color alpha="0.15" /></bezel>
+ <bezel element="hl" inputtag="IN.0" inputmask="0x100"><bounds x="699" y="493" width="72" height="51" /><color alpha="0.15" /></bezel>
+ <bezel element="hl" inputtag="IN.0" inputmask="0x200"><bounds x="699" y="547" width="72" height="51" /><color alpha="0.15" /></bezel>
</view>
</mamelayout>
diff --git a/src/mame/layout/intellect02.lay b/src/mame/layout/intellect02.lay
index 51e8cd38e36..4f23cb0bc5c 100644
--- a/src/mame/layout/intellect02.lay
+++ b/src/mame/layout/intellect02.lay
@@ -1,6 +1,8 @@
<?xml version="1.0"?>
<mamelayout version="2">
+<!-- NOTE: no chesspieces simulation here, Intellect-2 is a multiple boardgame console, not just chess -->
+
<!-- define elements -->
<element name="static_black"><rect><color red="0.0" green="0.0" blue="0.0" /></rect></element>
diff --git a/src/mame/layout/mephisto_bup.lay b/src/mame/layout/mephisto_bup.lay
new file mode 100644
index 00000000000..f078ca8b507
--- /dev/null
+++ b/src/mame/layout/mephisto_bup.lay
@@ -0,0 +1,566 @@
+<?xml version="1.0"?>
+<mamelayout version="2">
+<!-- define elements -->
+
+ <!-- our digit element is bright-on-dark, this means the lcd panel is the wrong colour here -->
+ <element name="digit" defstate="0">
+ <led7seg>
+ <color red="1" green="1" blue="1" />
+ </led7seg>
+ </element>
+
+ <element name="led" defstate="0">
+ <disk state="0">
+ <color red="0.20" green="0.0" blue="0.0" />
+ </disk>
+ <disk state="1">
+ <color red="0.95" green="0.0" blue="0.0" />
+ </disk>
+ </element>
+ <element name="hlb" defstate="0">
+ <rect state="0">
+ <bounds x="0.0" y="0.0" width="1.0" height="1.0" />
+ <color red="0.4" green="0.4" blue="0.4" />
+ </rect>
+ <rect state="1">
+ <bounds x="0.0" y="0.0" width="1.0" height="1.0" />
+ <color red="0.4" green="0.4" blue="0.4" />
+ </rect>
+ </element>
+
+ <element name="text_1"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="1"><color red="0.87" green="0.87" blue="0.84" /></text> </element>
+ <element name="text_2"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="2"><color red="0.87" green="0.87" blue="0.84" /></text> </element>
+ <element name="text_3"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="3"><color red="0.87" green="0.87" blue="0.84" /></text> </element>
+ <element name="text_4"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="4"><color red="0.87" green="0.87" blue="0.84" /></text> </element>
+ <element name="text_5"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="5"><color red="0.87" green="0.87" blue="0.84" /></text> </element>
+ <element name="text_6"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="6"><color red="0.87" green="0.87" blue="0.84" /></text> </element>
+ <element name="text_7"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="7"><color red="0.87" green="0.87" blue="0.84" /></text> </element>
+ <element name="text_8"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="8"><color red="0.87" green="0.87" blue="0.84" /></text> </element>
+ <element name="text_a"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="A"><color red="0.87" green="0.87" blue="0.84" /></text> </element>
+ <element name="text_b"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="B"><color red="0.87" green="0.87" blue="0.84" /></text> </element>
+ <element name="text_c"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="C"><color red="0.87" green="0.87" blue="0.84" /></text> </element>
+ <element name="text_d"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="D"><color red="0.87" green="0.87" blue="0.84" /></text> </element>
+ <element name="text_e"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="E"><color red="0.87" green="0.87" blue="0.84" /></text> </element>
+ <element name="text_f"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="F"><color red="0.87" green="0.87" blue="0.84" /></text> </element>
+ <element name="text_g"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="G"><color red="0.87" green="0.87" blue="0.84" /></text> </element>
+ <element name="text_h"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="H"><color red="0.87" green="0.87" blue="0.84" /></text> </element>
+
+ <element name="piece" defstate="0">
+ <image file="chess/wp.png" state="1"/>
+ <image file="chess/wn.png" state="2"/>
+ <image file="chess/wb.png" state="3"/>
+ <image file="chess/wr.png" state="4"/>
+ <image file="chess/wq.png" state="5"/>
+ <image file="chess/wk.png" state="6"/>
+
+ <image file="chess/bp.png" state="7"/>
+ <image file="chess/bn.png" state="8"/>
+ <image file="chess/bb.png" state="9"/>
+ <image file="chess/br.png" state="10"/>
+ <image file="chess/bq.png" state="11"/>
+ <image file="chess/bk.png" state="12"/>
+
+ <!-- selected pieces -->
+ <image file="chess/wp.png" state="13"><color alpha="0.5" /></image>
+ <image file="chess/wn.png" state="14"><color alpha="0.5" /></image>
+ <image file="chess/wb.png" state="15"><color alpha="0.5" /></image>
+ <image file="chess/wr.png" state="16"><color alpha="0.5" /></image>
+ <image file="chess/wq.png" state="17"><color alpha="0.5" /></image>
+ <image file="chess/wk.png" state="18"><color alpha="0.5" /></image>
+
+ <image file="chess/bp.png" state="19"><color alpha="0.5" /></image>
+ <image file="chess/bn.png" state="20"><color alpha="0.5" /></image>
+ <image file="chess/bb.png" state="21"><color alpha="0.5" /></image>
+ <image file="chess/br.png" state="22"><color alpha="0.5" /></image>
+ <image file="chess/bq.png" state="23"><color alpha="0.5" /></image>
+ <image file="chess/bk.png" state="24"><color alpha="0.5" /></image>
+ </element>
+
+
+<!-- sb board -->
+
+ <element name="cblack"><rect><color red="0.56" green="0.33" blue="0.12" /></rect></element>
+ <element name="cwhite"><rect><color red="0.84" green="0.75" blue="0.50" /></rect></element>
+
+ <element name="hlbb" defstate="0">
+ <text string=" "><bounds x="0" y="0" width="1" height="1" /></text>
+ <disk state="1">
+ <bounds x="0.12" y="0.12" width="0.76" height="0.76" />
+ <color red="0" green="0" blue="0" />
+ </disk>
+ </element>
+
+ <group name="sb_board">
+ <bounds x="0" y="0" width="80" height="80" />
+
+ <!-- squares (avoid seams) -->
+ <bezel element="cwhite"><bounds x="0" y="0" width="10" height="10" /></bezel>
+ <bezel element="cblack"><bounds x="10" y="0" width="10" height="10" /></bezel>
+ <bezel element="cwhite"><bounds x="20" y="0" width="10" height="10" /></bezel>
+ <bezel element="cblack"><bounds x="30" y="0" width="10" height="10" /></bezel>
+ <bezel element="cwhite"><bounds x="40" y="0" width="10" height="10" /></bezel>
+ <bezel element="cblack"><bounds x="50" y="0" width="10" height="10" /></bezel>
+ <bezel element="cwhite"><bounds x="60" y="0" width="10" height="10" /></bezel>
+ <bezel element="cblack"><bounds x="70" y="0" width="10" height="10" /></bezel>
+
+ <bezel element="cblack"><bounds x="0" y="10" width="10" height="10" /></bezel>
+ <bezel element="cwhite"><bounds x="10" y="10" width="10" height="10" /></bezel>
+ <bezel element="cblack"><bounds x="20" y="10" width="10" height="10" /></bezel>
+ <bezel element="cwhite"><bounds x="30" y="10" width="10" height="10" /></bezel>
+ <bezel element="cblack"><bounds x="40" y="10" width="10" height="10" /></bezel>
+ <bezel element="cwhite"><bounds x="50" y="10" width="10" height="10" /></bezel>
+ <bezel element="cblack"><bounds x="60" y="10" width="10" height="10" /></bezel>
+ <bezel element="cwhite"><bounds x="70" y="10" width="10" height="10" /></bezel>
+
+ <bezel element="cwhite"><bounds x="0" y="20" width="10" height="10" /></bezel>
+ <bezel element="cblack"><bounds x="10" y="20" width="10" height="10" /></bezel>
+ <bezel element="cwhite"><bounds x="20" y="20" width="10" height="10" /></bezel>
+ <bezel element="cblack"><bounds x="30" y="20" width="10" height="10" /></bezel>
+ <bezel element="cwhite"><bounds x="40" y="20" width="10" height="10" /></bezel>
+ <bezel element="cblack"><bounds x="50" y="20" width="10" height="10" /></bezel>
+ <bezel element="cwhite"><bounds x="60" y="20" width="10" height="10" /></bezel>
+ <bezel element="cblack"><bounds x="70" y="20" width="10" height="10" /></bezel>
+
+ <bezel element="cblack"><bounds x="0" y="30" width="10" height="10" /></bezel>
+ <bezel element="cwhite"><bounds x="10" y="30" width="10" height="10" /></bezel>
+ <bezel element="cblack"><bounds x="20" y="30" width="10" height="10" /></bezel>
+ <bezel element="cwhite"><bounds x="30" y="30" width="10" height="10" /></bezel>
+ <bezel element="cblack"><bounds x="40" y="30" width="10" height="10" /></bezel>
+ <bezel element="cwhite"><bounds x="50" y="30" width="10" height="10" /></bezel>
+ <bezel element="cblack"><bounds x="60" y="30" width="10" height="10" /></bezel>
+ <bezel element="cwhite"><bounds x="70" y="30" width="10" height="10" /></bezel>
+
+ <bezel element="cwhite"><bounds x="0" y="40" width="10" height="10" /></bezel>
+ <bezel element="cblack"><bounds x="10" y="40" width="10" height="10" /></bezel>
+ <bezel element="cwhite"><bounds x="20" y="40" width="10" height="10" /></bezel>
+ <bezel element="cblack"><bounds x="30" y="40" width="10" height="10" /></bezel>
+ <bezel element="cwhite"><bounds x="40" y="40" width="10" height="10" /></bezel>
+ <bezel element="cblack"><bounds x="50" y="40" width="10" height="10" /></bezel>
+ <bezel element="cwhite"><bounds x="60" y="40" width="10" height="10" /></bezel>
+ <bezel element="cblack"><bounds x="70" y="40" width="10" height="10" /></bezel>
+
+ <bezel element="cblack"><bounds x="0" y="50" width="10" height="10" /></bezel>
+ <bezel element="cwhite"><bounds x="10" y="50" width="10" height="10" /></bezel>
+ <bezel element="cblack"><bounds x="20" y="50" width="10" height="10" /></bezel>
+ <bezel element="cwhite"><bounds x="30" y="50" width="10" height="10" /></bezel>
+ <bezel element="cblack"><bounds x="40" y="50" width="10" height="10" /></bezel>
+ <bezel element="cwhite"><bounds x="50" y="50" width="10" height="10" /></bezel>
+ <bezel element="cblack"><bounds x="60" y="50" width="10" height="10" /></bezel>
+ <bezel element="cwhite"><bounds x="70" y="50" width="10" height="10" /></bezel>
+
+ <bezel element="cwhite"><bounds x="0" y="60" width="10" height="10" /></bezel>
+ <bezel element="cblack"><bounds x="10" y="60" width="10" height="10" /></bezel>
+ <bezel element="cwhite"><bounds x="20" y="60" width="10" height="10" /></bezel>
+ <bezel element="cblack"><bounds x="30" y="60" width="10" height="10" /></bezel>
+ <bezel element="cwhite"><bounds x="40" y="60" width="10" height="10" /></bezel>
+ <bezel element="cblack"><bounds x="50" y="60" width="10" height="10" /></bezel>
+ <bezel element="cwhite"><bounds x="60" y="60" width="10" height="10" /></bezel>
+ <bezel element="cblack"><bounds x="70" y="60" width="10" height="10" /></bezel>
+
+ <bezel element="cblack"><bounds x="0" y="70" width="10" height="10" /></bezel>
+ <bezel element="cwhite"><bounds x="10" y="70" width="10" height="10" /></bezel>
+ <bezel element="cblack"><bounds x="20" y="70" width="10" height="10" /></bezel>
+ <bezel element="cwhite"><bounds x="30" y="70" width="10" height="10" /></bezel>
+ <bezel element="cblack"><bounds x="40" y="70" width="10" height="10" /></bezel>
+ <bezel element="cwhite"><bounds x="50" y="70" width="10" height="10" /></bezel>
+ <bezel element="cblack"><bounds x="60" y="70" width="10" height="10" /></bezel>
+ <bezel element="cwhite"><bounds x="70" y="70" width="10" height="10" /></bezel>
+
+ <!-- chessboard leds -->
+ <repeat count="8">
+ <param name="x" start="8.2" increment="10" />
+ <param name="la" start="0" increment="1" />
+ <param name="lb" start="8" increment="1" />
+ <param name="lc" start="16" increment="1" />
+ <param name="ld" start="24" increment="1" />
+ <param name="le" start="32" increment="1" />
+ <param name="lf" start="40" increment="1" />
+ <param name="lg" start="48" increment="1" />
+ <param name="lh" start="56" increment="1" />
+
+ <bezel name="led~la~" element="led"><bounds x="~x~" y="78.3" width="1.5" height="1.5" /></bezel>
+ <bezel name="led~lb~" element="led"><bounds x="~x~" y="68.3" width="1.5" height="1.5" /></bezel>
+ <bezel name="led~lc~" element="led"><bounds x="~x~" y="58.3" width="1.5" height="1.5" /></bezel>
+ <bezel name="led~ld~" element="led"><bounds x="~x~" y="48.3" width="1.5" height="1.5" /></bezel>
+ <bezel name="led~le~" element="led"><bounds x="~x~" y="38.3" width="1.5" height="1.5" /></bezel>
+ <bezel name="led~lf~" element="led"><bounds x="~x~" y="28.3" width="1.5" height="1.5" /></bezel>
+ <bezel name="led~lg~" element="led"><bounds x="~x~" y="18.3" width="1.5" height="1.5" /></bezel>
+ <bezel name="led~lh~" element="led"><bounds x="~x~" y="8.3" width="1.5" height="1.5" /></bezel>
+ </repeat>
+
+ <!-- sensors, pieces -->
+ <repeat count="8">
+ <param name="y" start="0" increment="10" />
+ <param name="i" start="8" increment="-1" />
+
+ <bezel element="hlbb" inputtag="board:board:RANK.~i~" inputmask="0x01"><bounds x="0" y="~y~" width="10" height="10" /><color alpha="0.04" /></bezel>
+ <bezel element="hlbb" inputtag="board:board:RANK.~i~" inputmask="0x02"><bounds x="10" y="~y~" width="10" height="10" /><color alpha="0.04" /></bezel>
+ <bezel element="hlbb" inputtag="board:board:RANK.~i~" inputmask="0x04"><bounds x="20" y="~y~" width="10" height="10" /><color alpha="0.04" /></bezel>
+ <bezel element="hlbb" inputtag="board:board:RANK.~i~" inputmask="0x08"><bounds x="30" y="~y~" width="10" height="10" /><color alpha="0.04" /></bezel>
+ <bezel element="hlbb" inputtag="board:board:RANK.~i~" inputmask="0x10"><bounds x="40" y="~y~" width="10" height="10" /><color alpha="0.04" /></bezel>
+ <bezel element="hlbb" inputtag="board:board:RANK.~i~" inputmask="0x20"><bounds x="50" y="~y~" width="10" height="10" /><color alpha="0.04" /></bezel>
+ <bezel element="hlbb" inputtag="board:board:RANK.~i~" inputmask="0x40"><bounds x="60" y="~y~" width="10" height="10" /><color alpha="0.04" /></bezel>
+ <bezel element="hlbb" inputtag="board:board:RANK.~i~" inputmask="0x80"><bounds x="70" y="~y~" width="10" height="10" /><color alpha="0.04" /></bezel>
+
+ <bezel name="piece_a~i~" element="piece"><bounds x="0" y="~y~" width="10" height="10" /></bezel>
+ <bezel name="piece_b~i~" element="piece"><bounds x="10" y="~y~" width="10" height="10" /></bezel>
+ <bezel name="piece_c~i~" element="piece"><bounds x="20" y="~y~" width="10" height="10" /></bezel>
+ <bezel name="piece_d~i~" element="piece"><bounds x="30" y="~y~" width="10" height="10" /></bezel>
+ <bezel name="piece_e~i~" element="piece"><bounds x="40" y="~y~" width="10" height="10" /></bezel>
+ <bezel name="piece_f~i~" element="piece"><bounds x="50" y="~y~" width="10" height="10" /></bezel>
+ <bezel name="piece_g~i~" element="piece"><bounds x="60" y="~y~" width="10" height="10" /></bezel>
+ <bezel name="piece_h~i~" element="piece"><bounds x="70" y="~y~" width="10" height="10" /></bezel>
+ </repeat>
+ </group>
+
+
+<!-- sb ui -->
+
+ <element name="hlub" defstate="0">
+ <rect state="1"><color red="0" green="0" blue="0" /></rect>
+ </element>
+
+ <element name="text_uit1"><text string="S.BOARD"><color red="0.81" green="0.8" blue="0.79" /></text></element>
+ <element name="text_uit2"><text string="INTERFACE"><color red="0.81" green="0.8" blue="0.79" /></text></element>
+ <element name="text_uib1"><text string="BOARD:"><color red="0.81" green="0.8" blue="0.79" /></text></element>
+ <element name="text_uib2">
+ <rect><color red="0.84" green="0.75" blue="0.50" /></rect>
+ <text string="RESET"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_uib3">
+ <rect><color red="0.84" green="0.75" blue="0.50" /></rect>
+ <text string="CLEAR"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_uis1"><text string="SPAWN:"><color red="0.81" green="0.8" blue="0.79" /></text></element>
+ <element name="text_uih1"><text string="HAND:"><color red="0.81" green="0.8" blue="0.79" /></text></element>
+ <element name="text_uih2">
+ <rect><color red="0.84" green="0.75" blue="0.50" /></rect>
+ <text string="REMOVE"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_uiu1"><text string="UNDO:"><color red="0.81" green="0.8" blue="0.79" /></text></element>
+ <element name="text_uiu2a">
+ <rect><color red="0.84" green="0.75" blue="0.50" /></rect>
+ <text string=" &lt;&lt;"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_uiu2b">
+ <rect><color red="0.84" green="0.75" blue="0.50" /></rect>
+ <text string=" &lt; "><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_uiu2c">
+ <rect><color red="0.84" green="0.75" blue="0.50" /></rect>
+ <text string=" &gt;"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_uiu2d">
+ <rect><color red="0.84" green="0.75" blue="0.50" /></rect>
+ <text string=" &gt;&gt;"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_uiu3a" defstate="0">
+ <simplecounter maxstate="999" digits="1" align="2">
+ <color red="0.81" green="0.8" blue="0.79" />
+ </simplecounter>
+ </element>
+ <element name="text_uiu3b"><text string="/"><color red="0.81" green="0.8" blue="0.79" /></text></element>
+ <element name="text_uiu3c" defstate="0">
+ <simplecounter maxstate="999" digits="1" align="1">
+ <color red="0.81" green="0.8" blue="0.79" />
+ </simplecounter>
+ </element>
+
+ <group name="sb_ui">
+ <bounds x="0" y="0" width="10" height="80" />
+ <bezel element="cblack"><bounds x="0" y="0" width="10" height="1" /></bezel>
+ <bezel element="cblack"><bounds x="0" y="7" width="10" height="1" /></bezel>
+ <bezel element="cblack"><bounds x="0" y="79" width="10" height="1" /></bezel>
+ <bezel element="text_uit1"><bounds x="0" y="2" width="10" height="2" /></bezel>
+ <bezel element="text_uit2"><bounds x="0" y="4" width="10" height="2" /></bezel>
+
+ <!-- board -->
+ <bezel element="text_uib1"><bounds x="0" y="9" width="10" height="2" /></bezel>
+ <bezel element="cwhite"><bounds x="1" y="11.5" width="8" height="2.5" /></bezel>
+ <bezel element="cwhite"><bounds x="1" y="15" width="8" height="2.5" /></bezel>
+
+ <bezel element="text_uib2"><bounds x="1.5" y="11.75" width="7" height="2" /></bezel>
+ <bezel element="text_uib3"><bounds x="1.5" y="15.25" width="7" height="2" /></bezel>
+
+ <bezel element="hlub" inputtag="board:board:UI" inputmask="0x200"><bounds x="1" y="11.5" width="8" height="2.5" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:board:UI" inputmask="0x100"><bounds x="1" y="15" width="8" height="2.5" /><color alpha="0.25" /></bezel>
+
+ <!-- spawn -->
+ <bezel element="text_uis1"><bounds x="0" y="20.5" width="10" height="2" /></bezel>
+ <bezel element="cwhite"><bounds x="1" y="23" width="8" height="12" /></bezel>
+ <bezel element="cwhite"><bounds x="1" y="36" width="8" height="12" /></bezel>
+
+ <bezel name="piece_ui1" element="piece"><bounds x="1" y="23" width="4" height="4" /></bezel>
+ <bezel name="piece_ui2" element="piece"><bounds x="1" y="27" width="4" height="4" /></bezel>
+ <bezel name="piece_ui3" element="piece"><bounds x="1" y="31" width="4" height="4" /></bezel>
+ <bezel name="piece_ui4" element="piece"><bounds x="5" y="23" width="4" height="4" /></bezel>
+ <bezel name="piece_ui5" element="piece"><bounds x="5" y="27" width="4" height="4" /></bezel>
+ <bezel name="piece_ui6" element="piece"><bounds x="5" y="31" width="4" height="4" /></bezel>
+ <bezel name="piece_ui7" element="piece"><bounds x="1" y="36" width="4" height="4" /></bezel>
+ <bezel name="piece_ui8" element="piece"><bounds x="1" y="40" width="4" height="4" /></bezel>
+ <bezel name="piece_ui9" element="piece"><bounds x="1" y="44" width="4" height="4" /></bezel>
+ <bezel name="piece_ui10" element="piece"><bounds x="5" y="36" width="4" height="4" /></bezel>
+ <bezel name="piece_ui11" element="piece"><bounds x="5" y="40" width="4" height="4" /></bezel>
+ <bezel name="piece_ui12" element="piece"><bounds x="5" y="44" width="4" height="4" /></bezel>
+
+ <bezel element="hlub" inputtag="board:board:SPAWN" inputmask="0x0001"><bounds x="1" y="23" width="4" height="4" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:board:SPAWN" inputmask="0x0002"><bounds x="1" y="27" width="4" height="4" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:board:SPAWN" inputmask="0x0004"><bounds x="1" y="31" width="4" height="4" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:board:SPAWN" inputmask="0x0008"><bounds x="5" y="23" width="4" height="4" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:board:SPAWN" inputmask="0x0010"><bounds x="5" y="27" width="4" height="4" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:board:SPAWN" inputmask="0x0020"><bounds x="5" y="31" width="4" height="4" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:board:SPAWN" inputmask="0x0040"><bounds x="1" y="36" width="4" height="4" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:board:SPAWN" inputmask="0x0080"><bounds x="1" y="40" width="4" height="4" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:board:SPAWN" inputmask="0x0100"><bounds x="1" y="44" width="4" height="4" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:board:SPAWN" inputmask="0x0200"><bounds x="5" y="36" width="4" height="4" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:board:SPAWN" inputmask="0x0400"><bounds x="5" y="40" width="4" height="4" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:board:SPAWN" inputmask="0x0800"><bounds x="5" y="44" width="4" height="4" /><color alpha="0.25" /></bezel>
+
+ <!-- hand -->
+ <bezel element="text_uih1"><bounds x="0" y="51" width="10" height="2" /></bezel>
+ <bezel element="cblack"><bounds x="1" y="53.5" width="8" height="6" /></bezel>
+ <bezel name="piece_ui0" element="piece"><bounds x="2" y="53.5" width="6" height="6" /></bezel>
+
+ <bezel element="cwhite"><bounds x="1" y="60.5" width="8" height="2.5" /></bezel>
+ <bezel element="text_uih2"><bounds x="1.5" y="60.75" width="7" height="2" /></bezel>
+ <bezel element="hlub" inputtag="board:board:UI" inputmask="0x08"><bounds x="1" y="60.5" width="8" height="2.5" /><color alpha="0.25" /></bezel>
+
+ <!-- undo -->
+ <bezel element="text_uiu1"><bounds x="0" y="66" width="10" height="2" /></bezel>
+ <bezel element="cwhite"><bounds x="1" y="68.5" width="1.7" height="6" /></bezel>
+ <bezel element="cwhite"><bounds x="3.1" y="68.5" width="1.7" height="6" /></bezel>
+ <bezel element="cwhite"><bounds x="5.2" y="68.5" width="1.7" height="6" /></bezel>
+ <bezel element="cwhite"><bounds x="7.3" y="68.5" width="1.7" height="6" /></bezel>
+ <bezel element="text_uiu2a"><bounds x="1" y="69.5" width="1.7" height="4" /></bezel>
+ <bezel element="text_uiu2b"><bounds x="3.1" y="69.5" width="1.7" height="4" /></bezel>
+ <bezel element="text_uiu2c"><bounds x="5.2" y="69.5" width="1.7" height="4" /></bezel>
+ <bezel element="text_uiu2d"><bounds x="7.3" y="69.5" width="1.7" height="4" /></bezel>
+
+ <bezel element="hlub" inputtag="board:board:UI" inputmask="0x10"><bounds x="1" y="68.5" width="1.7" height="6" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:board:UI" inputmask="0x20"><bounds x="3.1" y="68.5" width="1.7" height="6" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:board:UI" inputmask="0x40"><bounds x="5.2" y="68.5" width="1.7" height="6" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:board:UI" inputmask="0x80"><bounds x="7.3" y="68.5" width="1.7" height="6" /><color alpha="0.25" /></bezel>
+
+ <bezel name="count_ui0" element="text_uiu3a"><bounds x="0" y="75" width="4" height="2" /></bezel>
+ <bezel name="count_ui1" element="text_uiu3c"><bounds x="6" y="75" width="4" height="2" /></bezel>
+ <bezel element="text_uiu3b"><bounds x="4" y="75" width="2" height="2" /></bezel>
+ </group>
+
+
+<!-- 7seg panel -->
+
+ <group name="panel1">
+ <bezel name="digit0" element="digit"><bounds x="0" y="0" width="10" height="15" /></bezel>
+ <bezel name="digit1" element="digit"><bounds x="10" y="0" width="10" height="15" /></bezel>
+ <bezel name="digit2" element="digit"><bounds x="20" y="0" width="10" height="15" /></bezel>
+ <bezel name="digit3" element="digit"><bounds x="30" y="0" width="10" height="15" /></bezel>
+ </group>
+
+
+<!-- led panel -->
+
+ <element name="black"><rect><color red="0" green="0" blue="0" /></rect></element>
+ <element name="white2"><rect><color red="0.8" green="0.8" blue="0.8" /></rect></element>
+ <element name="dblack"><disk><color red="0" green="0" blue="0" /></disk></element>
+ <element name="dwhite"><disk><color red="0.8" green="0.8" blue="0.8" /></disk></element>
+
+ <element name="led_err"> <text string="Err" align="1"><color red="0.8" green="0.8" blue="0.8" /></text> </element>
+ <element name="led_end"> <text string="End" align="1"> <color red="0.8" green="0.8" blue="0.8" /></text> </element>
+ <element name="led_plus"><text string="+" align="1"> <color red="0.8" green="0.8" blue="0.8" /></text> </element>
+
+ <group name="panel2">
+ <bounds x="69.1" y="89.9" width="29" height="1.5" />
+
+ <bezel element="dwhite"><bounds x="70.7" y="89.9" width="1.4" height="1.4" /></bezel>
+ <bezel element="dblack"><bounds x="70.8" y="90.0" width="1.2" height="1.2" /></bezel>
+ <bezel element="dwhite"><bounds x="71.25" y="90.45" width="0.4" height="0.4" /></bezel>
+ <bezel element="led_end"> <bounds x="75.7" y="89.9" width="3.2" height="1.5" /></bezel>
+ <bezel element="led_err"> <bounds x="80.7" y="89.9" width="3.2" height="1.5" /></bezel>
+ <bezel element="led_plus"> <bounds x="86" y="89.9" width="2.2" height="1.5" /></bezel>
+ <bezel element="white2"><bounds x="90.9" y="90.0" width="1.2" height="1.2" /></bezel>
+ <bezel element="black"><bounds x="91.05" y="90.15" width="0.9" height="0.9" /></bezel>
+ <bezel element="white2"><bounds x="95.7" y="90.0" width="1.2" height="1.2" /></bezel>
+
+ <bezel name="led105" element="led"> <bounds x="69.1" y="90" width="1.3" height="1.3" /> </bezel>
+ <bezel name="led104" element="led"> <bounds x="74.1" y="90" width="1.3" height="1.3" /> </bezel>
+ <bezel name="led103" element="led"> <bounds x="79.1" y="90" width="1.3" height="1.3" /> </bezel>
+ <bezel name="led102" element="led"> <bounds x="84.1" y="90" width="1.3" height="1.3" /> </bezel>
+ <bezel name="led100" element="led"> <bounds x="89.1" y="90" width="1.3" height="1.3" /> </bezel>
+ <bezel name="led101" element="led"> <bounds x="94.1" y="90" width="1.3" height="1.3" /> </bezel>
+ </group>
+
+
+<!-- buttons -->
+
+ <element name="gray"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect></element>
+ <element name="white"><rect><color red="1" green="1" blue="1" /></rect></element>
+
+ <element name="keys" defstate="0">
+ <rect state="1"><color red="0.0" green="0.0" blue="0.0" /></rect>
+ </element>
+
+ <element name="text_cl"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect> <text string="CL"> <color red="1" green="1" blue="1" /></text> </element>
+ <element name="text_pos"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect> <text string="POS"> <color red="1" green="1" blue="1" /></text> </element>
+ <element name="text_mem"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect> <text string="MEM"> <color red="1" green="1" blue="1" /></text> </element>
+ <element name="text_info"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect> <text string="INFO"><color red="1" green="1" blue="1" /></text> </element>
+ <element name="text_lev"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect> <text string="LEV"> <color red="1" green="1" blue="1" /></text> </element>
+ <element name="text_ent"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect> <text string="ENT"> <color red="1" green="1" blue="1" /></text> </element>
+ <element name="text_res"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect> <text string="RES"> <color red="1" green="1" blue="1" /></text> </element>
+ <element name="text_best"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect> <text string="BEST"><color red="1" green="1" blue="1" /></text> </element>
+ <element name="text_mon"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect> <text string="MON"> <color red="1" green="1" blue="1" /></text> </element>
+
+ <element name="text_b1"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect> <text string="1"><color red="1" green="1" blue="1" /></text> </element>
+ <element name="text_b2"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect> <text string="2"> <color red="1" green="1" blue="1" /></text> </element>
+ <element name="text_b3"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect> <text string="3"> <color red="1" green="1" blue="1" /></text> </element>
+ <element name="text_b4"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect> <text string="4"> <color red="1" green="1" blue="1" /></text> </element>
+ <element name="text_b5"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect> <text string="5"> <color red="1" green="1" blue="1" /></text> </element>
+ <element name="text_b6"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect> <text string="6"> <color red="1" green="1" blue="1" /></text> </element>
+
+ <element name="text_p1"><image file="chess/wk.png"/></element>
+ <element name="text_p2"><image file="chess/wq.png"/></element>
+ <element name="text_p3"><image file="chess/wr.png"/></element>
+ <element name="text_p4"><image file="chess/wb.png"/></element>
+ <element name="text_p5"><image file="chess/wn.png"/></element>
+ <element name="text_p6"><image file="chess/wp.png"/></element>
+
+ <group name="buttons">
+ <bounds x="69" y="93" width="29" height="14" />
+
+ <bezel element="gray"><bounds x="69" y="93" width="4" height="4" /></bezel>
+ <bezel element="gray"><bounds x="74" y="93" width="4" height="4" /></bezel>
+ <bezel element="gray"><bounds x="79" y="93" width="4" height="4" /></bezel>
+ <bezel element="gray"><bounds x="84" y="93" width="4" height="4" /></bezel>
+ <bezel element="gray"><bounds x="89" y="93" width="4" height="4" /></bezel>
+ <bezel element="gray"><bounds x="94" y="93" width="4" height="4" /></bezel>
+
+ <bezel element="gray"><bounds x="69" y="98" width="4" height="4" /></bezel>
+ <bezel element="gray"><bounds x="74" y="98" width="4" height="4" /></bezel>
+ <bezel element="gray"><bounds x="79" y="98" width="4" height="4" /></bezel>
+ <bezel element="gray"><bounds x="84" y="98" width="4" height="4" /></bezel>
+ <bezel element="gray"><bounds x="89" y="98" width="4" height="4" /></bezel>
+ <bezel element="gray"><bounds x="94" y="98" width="4" height="4" /></bezel>
+
+ <bezel element="gray"><bounds x="69" y="103" width="4" height="4" /></bezel>
+ <bezel element="gray"><bounds x="74" y="103" width="4" height="4" /></bezel>
+ <bezel element="gray"><bounds x="79" y="103" width="4" height="4" /></bezel>
+ <bezel element="gray"><bounds x="84" y="103" width="4" height="4" /></bezel>
+ <bezel element="gray"><bounds x="89" y="103" width="4" height="4" /></bezel>
+ <bezel element="gray"><bounds x="94" y="103" width="4" height="4" /></bezel>
+
+ <bezel element="text_b1"> <bounds x="70.9" y="94" width="2.1" height="2.27" /></bezel>
+ <bezel element="text_b2"> <bounds x="75.9" y="94" width="2.1" height="2.27" /></bezel>
+ <bezel element="text_b3"> <bounds x="80.9" y="94" width="2.1" height="2.27" /></bezel>
+ <bezel element="text_b4"> <bounds x="85.9" y="94" width="2.1" height="2.27" /></bezel>
+ <bezel element="text_b5"> <bounds x="90.9" y="94" width="2.1" height="2.27" /></bezel>
+ <bezel element="text_b6"> <bounds x="95.9" y="94" width="2.1" height="2.27" /></bezel>
+
+ <bezel element="text_p6" ><bounds x="69.2" y="94.05" width="2.1" height="2.1" /></bezel>
+ <bezel element="text_p5" ><bounds x="74.2" y="94.05" width="2.1" height="2.1" /></bezel>
+ <bezel element="text_p4" ><bounds x="79.2" y="94.05" width="2.1" height="2.1" /></bezel>
+ <bezel element="text_p3" ><bounds x="84.2" y="94.05" width="2.1" height="2.1" /></bezel>
+ <bezel element="text_p2" ><bounds x="89.2" y="94.05" width="2.1" height="2.1" /></bezel>
+ <bezel element="text_p1" ><bounds x="94.2" y="94.05" width="2.1" height="2.1" /></bezel>
+
+ <bezel element="text_info"><bounds x="69.3" y="99" width="3.67" height="2.2" /></bezel>
+ <bezel element="text_pos"><bounds x="74.3" y="99" width="3.67" height="2.2" /></bezel>
+ <bezel element="text_lev"><bounds x="79.3" y="99" width="3.67" height="2.2" /></bezel>
+ <bezel element="text_mem"><bounds x="84.3" y="99" width="3.67" height="2.2" /></bezel>
+ <bezel element="text_cl"><bounds x="89.3" y="99" width="3.67" height="2.2" /></bezel>
+ <bezel element="text_ent"><bounds x="94.3" y="99" width="3.67" height="2.2" /></bezel>
+
+ <bezel element="text_res"><bounds x="69.3" y="104" width="3.67" height="2.2" /></bezel>
+ <bezel element="text_res"><bounds x="74.3" y="104" width="3.67" height="2.2" /></bezel>
+ <bezel element="text_best"><bounds x="79.3" y="104" width="3.67" height="2.2" /></bezel>
+ <bezel element="text_mon"><bounds x="84.3" y="104" width="3.67" height="2.2" /></bezel>
+ <bezel element="black"><bounds x="90.35" y="104.5" width="1.3" height="1.3" /></bezel>
+ <bezel element="white"><bounds x="95.35" y="104.5" width="1.3" height="1.3" /></bezel>
+
+ <bezel element="keys" inputtag="KEY1_0" inputmask="0x80"> <!-- 1 -->
+ <bounds x="69" y="93" width="4" height="4" /><color alpha="0.25" />
+ </bezel>
+ <bezel element="keys" inputtag="KEY1_1" inputmask="0x80"> <!-- 2 -->
+ <bounds x="74" y="93" width="4" height="4" /><color alpha="0.25" />
+ </bezel>
+ <bezel element="keys" inputtag="KEY1_2" inputmask="0x80"> <!-- 3 -->
+ <bounds x="79" y="93" width="4" height="4" /><color alpha="0.25" />
+ </bezel>
+ <bezel element="keys" inputtag="KEY1_3" inputmask="0x80"> <!-- 4 -->
+ <bounds x="84" y="93" width="4" height="4" /><color alpha="0.25" />
+ </bezel>
+ <bezel element="keys" inputtag="KEY1_4" inputmask="0x80"> <!-- 5 -->
+ <bounds x="89" y="93" width="4" height="4" /><color alpha="0.25" />
+ </bezel>
+ <bezel element="keys" inputtag="KEY1_5" inputmask="0x80"> <!-- 6 -->
+ <bounds x="94" y="93" width="4" height="4" /><color alpha="0.25" />
+ </bezel>
+
+ <bezel element="keys" inputtag="KEY2_3" inputmask="0x80"> <!-- INFO -->
+ <bounds x="69" y="98" width="4" height="4" /><color alpha="0.25" />
+ </bezel>
+ <bezel element="keys" inputtag="KEY2_5" inputmask="0x80"> <!-- POS -->
+ <bounds x="74" y="98" width="4" height="4" /><color alpha="0.25" />
+ </bezel>
+ <bezel element="keys" inputtag="KEY2_6" inputmask="0x80"> <!-- LEV -->
+ <bounds x="79" y="98" width="4" height="4" /><color alpha="0.25" />
+ </bezel>
+ <bezel element="keys" inputtag="KEY2_7" inputmask="0x80"> <!-- MEM -->
+ <bounds x="84" y="98" width="4" height="4" /><color alpha="0.25" />
+ </bezel>
+ <bezel element="keys" inputtag="KEY2_0" inputmask="0x80"> <!-- CL -->
+ <bounds x="89" y="98" width="4" height="4" /><color alpha="0.25" />
+ </bezel>
+ <bezel element="keys" inputtag="KEY2_1" inputmask="0x80"> <!-- ENT -->
+ <bounds x="94" y="98" width="4" height="4" /><color alpha="0.25" />
+ </bezel>
+
+ <bezel element="keys" inputtag="KEY2_2" inputmask="0x80"> <!-- BEST -->
+ <bounds x="79" y="103" width="4" height="4" /><color alpha="0.25" />
+ </bezel>
+ <bezel element="keys" inputtag="KEY2_4" inputmask="0x80"> <!-- MON -->
+ <bounds x="84" y="103" width="4" height="4" /><color alpha="0.25" />
+ </bezel>
+ <bezel element="keys" inputtag="KEY1_7" inputmask="0x80"> <!-- BLACK -->
+ <bounds x="89" y="103" width="4" height="4" /><color alpha="0.25" />
+ </bezel>
+ <bezel element="keys" inputtag="KEY1_6" inputmask="0x80"> <!-- WHITE -->
+ <bounds x="94" y="103" width="4" height="4" /><color alpha="0.25" />
+ </bezel>
+ </group>
+
+
+<!-- build screen -->
+
+ <view name="Internal Layout">
+ <bounds left="0" right="101" top="0" bottom="106.5" />
+ <bezel element="cblack"><bounds x="14" y="0" width="87" height="87" /></bezel>
+ <bezel element="cwhite"><bounds x="17" y="2" width="81" height="81" /></bezel>
+
+ <group ref="panel1"><bounds x="37.5" y="91" width="23" height="8" /></group>
+ <group ref="panel2"><bounds x="67.5" y="88.25" width="29" height="1.5" /></group>
+ <group ref="buttons"><bounds x="67.5" y="91" width="29" height="14" /></group>
+
+ <group ref="sb_board"><bounds x="17.5" y="2.5" width="80" height="80" /></group>
+ <group ref="sb_ui"><bounds x="1.5" y="3" width="10" height="80" /></group>
+
+ <!-- chessboard coords -->
+
+ <bezel element="text_8"><bounds x="14.7" y="7" width="2" height="2" /></bezel>
+ <bezel element="text_7"><bounds x="14.7" y="17" width="2" height="2" /></bezel>
+ <bezel element="text_6"><bounds x="14.7" y="27" width="2" height="2" /></bezel>
+ <bezel element="text_5"><bounds x="14.7" y="37" width="2" height="2" /></bezel>
+ <bezel element="text_4"><bounds x="14.7" y="47" width="2" height="2" /></bezel>
+ <bezel element="text_3"><bounds x="14.7" y="57" width="2" height="2" /></bezel>
+ <bezel element="text_2"><bounds x="14.7" y="67" width="2" height="2" /></bezel>
+ <bezel element="text_1"><bounds x="14.7" y="77" width="2" height="2" /></bezel>
+
+ <bezel element="text_a"><bounds x="21.5" y="84" width="2" height="2" /></bezel>
+ <bezel element="text_b"><bounds x="31.5" y="84" width="2" height="2" /></bezel>
+ <bezel element="text_c"><bounds x="41.5" y="84" width="2" height="2" /></bezel>
+ <bezel element="text_d"><bounds x="51.5" y="84" width="2" height="2" /></bezel>
+ <bezel element="text_e"><bounds x="61.5" y="84" width="2" height="2" /></bezel>
+ <bezel element="text_f"><bounds x="71.5" y="84" width="2" height="2" /></bezel>
+ <bezel element="text_g"><bounds x="81.5" y="84" width="2" height="2" /></bezel>
+ <bezel element="text_h"><bounds x="91.5" y="84" width="2" height="2" /></bezel>
+ </view>
+
+</mamelayout>
diff --git a/src/mame/layout/model1io2.lay b/src/mame/layout/model1io2.lay
index 1a552d3352c..9d7e21d2877 100644
--- a/src/mame/layout/model1io2.lay
+++ b/src/mame/layout/model1io2.lay
@@ -18,9 +18,9 @@
</element>
<view name="Default">
- <screen tag="ioboard:screen">
- <bounds left="0" top="0" right="1" bottom="1" />
- </screen>
+ <!-- workaround for MAME selecting a 3-screen view by default -->
+ <screen tag="ioboard:screen"><bounds left="0" top="0" right="1" bottom="1" /></screen>
+
<screen tag="screen">
<bounds left="0" top="0" right="4" bottom="3" />
</screen>
diff --git a/src/mame/layout/saitek_chesstrv.lay b/src/mame/layout/saitek_chesstrv.lay
index f71a5902764..252b0c75b62 100644
--- a/src/mame/layout/saitek_chesstrv.lay
+++ b/src/mame/layout/saitek_chesstrv.lay
@@ -178,6 +178,12 @@
<text string="1" align="2"><color red="0.17" green="0.15" blue="0.15" /></text>
</element>
+ <element name="text_warning">
+ <text string="Chess Traveler's built-in chessboard is not electronic, player uses keypad to enter moves.">
+ <color red="0.3" green="0.3" blue="0.3" />
+ </text>
+ </element>
+
<!-- sb board -->
@@ -481,7 +487,7 @@
</group>
-<!-- digits, button panel -->
+<!-- digits -->
<group name="digits">
<bounds x="0" y="0" width="45" height="15" />
@@ -491,6 +497,9 @@
<bezel name="digit0" element="digit"><bounds x="35" y="0" width="10" height="15" /></bezel>
</group>
+
+<!-- button panel -->
+
<group name="buttons">
<bounds x="-1" y="28.5" width="32" height="10.1" />
<bezel element="button" inputtag="IN.0" inputmask="0x01"><bounds x="0" y="30" width="3" height="2.2" /></bezel>
@@ -551,8 +560,9 @@
<!-- build screen -->
<view name="Internal Layout (Full)">
- <bounds left="-5" right="31.775" top="-11.8" bottom="39.3" />
+ <bounds left="-5" right="31.775" top="-11.2" bottom="39.3" />
+ <bezel element="text_warning"><bounds x="0" y="-4.7" width="31" height="0.76725" /></bezel>
<group ref="sb_board"><bounds x="0" y="-3.8" width="31" height="31" /></group>
<group ref="sb_ui"><bounds x="-4.5" y="-3.8" width="3.875" height="31" /></group>
diff --git a/src/mame/layout/sc2.lay b/src/mame/layout/sc2.lay
index e2fab6f2bea..86f280ebce2 100644
--- a/src/mame/layout/sc2.lay
+++ b/src/mame/layout/sc2.lay
@@ -3,11 +3,12 @@
<!-- define elements -->
- <element name="black"><rect><color red="0.22" green="0.22" blue="0.22" /></rect></element>
- <element name="white"><rect><color red="0.72" green="0.72" blue="0.72" /></rect></element>
+ <element name="black"><rect><color red="0.22" green="0.21" blue="0.20" /></rect></element>
+ <element name="black2"><rect><color red="0.02" green="0.02" blue="0.02" /></rect></element>
+ <element name="white"><rect><color red="0.81" green="0.8" blue="0.79" /></rect></element>
<element name="digit" defstate="0">
- <led7seg><color red="0.25" green="0.9" blue="0.1" /></led7seg>
+ <led7seg><color red="0.4" green="1" blue="0" /></led7seg>
</element>
<element name="led" defstate="0">
@@ -30,109 +31,461 @@
<element name="text_matt"><text string="MATT" align="2"><color red="0.8" green="0.8" blue="0.8" /></text></element>
<element name="text_b01">
- <rect><color red="0.22" green="0.22" blue="0.22" /></rect>
+ <rect><color red="0.22" green="0.21" blue="0.20" /></rect>
<text string="R"><color red="0.82" green="0.82" blue="0.82" /></text>
</element>
<element name="text_b02">
- <rect><color red="0.22" green="0.22" blue="0.22" /></rect>
+ <rect><color red="0.22" green="0.21" blue="0.20" /></rect>
<text string="K"><color red="0.82" green="0.82" blue="0.82" /></text>
</element>
<element name="text_b03">
- <rect><color red="0.22" green="0.22" blue="0.22" /></rect>
+ <rect><color red="0.22" green="0.21" blue="0.20" /></rect>
<text string="W"><color red="0.82" green="0.82" blue="0.82" /></text>
</element>
<element name="text_b04">
- <rect><color red="0.22" green="0.22" blue="0.22" /></rect>
+ <rect><color red="0.22" green="0.21" blue="0.20" /></rect>
<text string="P"><color red="0.82" green="0.82" blue="0.82" /></text>
</element>
<element name="text_b05">
- <rect><color red="0.22" green="0.22" blue="0.22" /></rect>
+ <rect><color red="0.22" green="0.21" blue="0.20" /></rect>
<text string="T"><color red="0.82" green="0.82" blue="0.82" /></text>
</element>
<element name="text_b06">
- <rect><color red="0.22" green="0.22" blue="0.22" /></rect>
+ <rect><color red="0.22" green="0.21" blue="0.20" /></rect>
<text string="L"><color red="0.82" green="0.82" blue="0.82" /></text>
</element>
<element name="text_b07">
- <rect><color red="0.22" green="0.22" blue="0.22" /></rect>
+ <rect><color red="0.22" green="0.21" blue="0.20" /></rect>
<text string="Q"><color red="0.82" green="0.82" blue="0.82" /></text>
</element>
<element name="text_b08a">
- <rect><color red="0.72" green="0.72" blue="0.72" /></rect>
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
<text string="A"><color red="0.08" green="0.08" blue="0.08" /></text>
</element>
<element name="text_b08b">
- <rect><color red="0.72" green="0.72" blue="0.72" /></rect>
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
<text string="1"><color red="0.08" green="0.08" blue="0.08" /></text>
</element>
<element name="text_b09a">
- <rect><color red="0.72" green="0.72" blue="0.72" /></rect>
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
<text string="B"><color red="0.08" green="0.08" blue="0.08" /></text>
</element>
<element name="text_b09b">
- <rect><color red="0.72" green="0.72" blue="0.72" /></rect>
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
<text string="2"><color red="0.08" green="0.08" blue="0.08" /></text>
</element>
<element name="text_b10a">
- <rect><color red="0.72" green="0.72" blue="0.72" /></rect>
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
<text string="C"><color red="0.08" green="0.08" blue="0.08" /></text>
</element>
<element name="text_b10b">
- <rect><color red="0.72" green="0.72" blue="0.72" /></rect>
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
<text string="3"><color red="0.08" green="0.08" blue="0.08" /></text>
</element>
<element name="text_b11a">
- <rect><color red="0.72" green="0.72" blue="0.72" /></rect>
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
<text string="D"><color red="0.08" green="0.08" blue="0.08" /></text>
</element>
<element name="text_b11b">
- <rect><color red="0.72" green="0.72" blue="0.72" /></rect>
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
<text string="4"><color red="0.08" green="0.08" blue="0.08" /></text>
</element>
<element name="text_b12a">
- <rect><color red="0.72" green="0.72" blue="0.72" /></rect>
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
<text string="E"><color red="0.08" green="0.08" blue="0.08" /></text>
</element>
<element name="text_b12b">
- <rect><color red="0.72" green="0.72" blue="0.72" /></rect>
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
<text string="5"><color red="0.08" green="0.08" blue="0.08" /></text>
</element>
<element name="text_b13a">
- <rect><color red="0.72" green="0.72" blue="0.72" /></rect>
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
<text string="F"><color red="0.08" green="0.08" blue="0.08" /></text>
</element>
<element name="text_b13b">
- <rect><color red="0.72" green="0.72" blue="0.72" /></rect>
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
<text string="6"><color red="0.08" green="0.08" blue="0.08" /></text>
</element>
<element name="text_b14a">
- <rect><color red="0.72" green="0.72" blue="0.72" /></rect>
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
<text string="G"><color red="0.08" green="0.08" blue="0.08" /></text>
</element>
<element name="text_b14b">
- <rect><color red="0.72" green="0.72" blue="0.72" /></rect>
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
<text string="7"><color red="0.08" green="0.08" blue="0.08" /></text>
</element>
<element name="text_b15a">
- <rect><color red="0.72" green="0.72" blue="0.72" /></rect>
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
<text string="H"><color red="0.08" green="0.08" blue="0.08" /></text>
</element>
<element name="text_b15b">
- <rect><color red="0.72" green="0.72" blue="0.72" /></rect>
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
<text string="8"><color red="0.08" green="0.08" blue="0.08" /></text>
</element>
+ <element name="text_1">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="1"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_2">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="2"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_3">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="3"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_4">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="4"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_5">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="5"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_6">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="6"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_7">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="7"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_8">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="8"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
-<!-- build screen -->
+ <element name="text_a">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="A"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_b">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="B"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_c">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="C"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_d">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="D"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_e">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="E"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_f">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="F"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_g">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="G"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_h">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="H"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+
+ <element name="text_warning">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="SC 2's built-in chessboard is not electronic, player uses keypad to enter moves.">
+ <color red="0.61" green="0.6" blue="0.59" />
+ </text>
+ </element>
+
+
+<!-- sb board -->
+
+ <element name="cblack"><rect><color red="0.41" green="0.4" blue="0.39" /></rect></element>
+ <element name="cwhite"><rect><color red="0.81" green="0.8" blue="0.79" /></rect></element>
+
+ <element name="hlbb" defstate="0">
+ <text string=" "><bounds x="0" y="0" width="1" height="1" /></text>
+ <disk state="1">
+ <bounds x="0.12" y="0.12" width="0.76" height="0.76" />
+ <color red="0" green="0" blue="0" />
+ </disk>
+ </element>
+
+ <element name="piece" defstate="0">
+ <image file="chess/wp.png" state="1"/>
+ <image file="chess/wn.png" state="2"/>
+ <image file="chess/wb.png" state="3"/>
+ <image file="chess/wr.png" state="4"/>
+ <image file="chess/wq.png" state="5"/>
+ <image file="chess/wk.png" state="6"/>
+
+ <image file="chess/bp.png" state="7"/>
+ <image file="chess/bn.png" state="8"/>
+ <image file="chess/bb.png" state="9"/>
+ <image file="chess/br.png" state="10"/>
+ <image file="chess/bq.png" state="11"/>
+ <image file="chess/bk.png" state="12"/>
+
+ <!-- selected pieces -->
+ <image file="chess/wp.png" state="13"><color alpha="0.5" /></image>
+ <image file="chess/wn.png" state="14"><color alpha="0.5" /></image>
+ <image file="chess/wb.png" state="15"><color alpha="0.5" /></image>
+ <image file="chess/wr.png" state="16"><color alpha="0.5" /></image>
+ <image file="chess/wq.png" state="17"><color alpha="0.5" /></image>
+ <image file="chess/wk.png" state="18"><color alpha="0.5" /></image>
+
+ <image file="chess/bp.png" state="19"><color alpha="0.5" /></image>
+ <image file="chess/bn.png" state="20"><color alpha="0.5" /></image>
+ <image file="chess/bb.png" state="21"><color alpha="0.5" /></image>
+ <image file="chess/br.png" state="22"><color alpha="0.5" /></image>
+ <image file="chess/bq.png" state="23"><color alpha="0.5" /></image>
+ <image file="chess/bk.png" state="24"><color alpha="0.5" /></image>
+ </element>
+
+ <group name="sb_board">
+ <bounds x="0" y="0" width="80" height="80" />
+
+ <!-- squares (avoid seams) -->
+ <bezel element="cwhite"><bounds x="0" y="0" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="10" y="0" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="20" y="0" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="30" y="0" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="40" y="0" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="50" y="0" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="60" y="0" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="70" y="0" width="10" height="11" /></bezel>
+
+ <bezel element="cblack"><bounds x="0" y="10" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="10" y="10" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="20" y="10" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="30" y="10" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="40" y="10" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="50" y="10" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="60" y="10" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="70" y="10" width="10" height="11" /></bezel>
+
+ <bezel element="cwhite"><bounds x="0" y="20" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="10" y="20" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="20" y="20" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="30" y="20" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="40" y="20" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="50" y="20" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="60" y="20" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="70" y="20" width="10" height="11" /></bezel>
+
+ <bezel element="cblack"><bounds x="0" y="30" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="10" y="30" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="20" y="30" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="30" y="30" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="40" y="30" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="50" y="30" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="60" y="30" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="70" y="30" width="10" height="11" /></bezel>
+
+ <bezel element="cwhite"><bounds x="0" y="40" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="10" y="40" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="20" y="40" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="30" y="40" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="40" y="40" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="50" y="40" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="60" y="40" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="70" y="40" width="10" height="11" /></bezel>
+
+ <bezel element="cblack"><bounds x="0" y="50" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="10" y="50" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="20" y="50" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="30" y="50" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="40" y="50" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="50" y="50" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="60" y="50" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="70" y="50" width="10" height="11" /></bezel>
+
+ <bezel element="cwhite"><bounds x="0" y="60" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="10" y="60" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="20" y="60" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="30" y="60" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="40" y="60" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="50" y="60" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="60" y="60" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="70" y="60" width="10" height="11" /></bezel>
+
+ <bezel element="cblack"><bounds x="0" y="70" width="11" height="10" /></bezel>
+ <bezel element="cwhite"><bounds x="10" y="70" width="11" height="10" /></bezel>
+ <bezel element="cblack"><bounds x="20" y="70" width="11" height="10" /></bezel>
+ <bezel element="cwhite"><bounds x="30" y="70" width="11" height="10" /></bezel>
+ <bezel element="cblack"><bounds x="40" y="70" width="11" height="10" /></bezel>
+ <bezel element="cwhite"><bounds x="50" y="70" width="11" height="10" /></bezel>
+ <bezel element="cblack"><bounds x="60" y="70" width="11" height="10" /></bezel>
+ <bezel element="cwhite"><bounds x="70" y="70" width="10" height="10" /></bezel>
+
+ <!-- sensors, pieces -->
+ <repeat count="8">
+ <param name="y" start="0" increment="10" />
+ <param name="i" start="8" increment="-1" />
+
+ <bezel element="hlbb" inputtag="board:RANK.~i~" inputmask="0x01"><bounds x="0" y="~y~" width="10" height="10" /><color alpha="0.04" /></bezel>
+ <bezel element="hlbb" inputtag="board:RANK.~i~" inputmask="0x02"><bounds x="10" y="~y~" width="10" height="10" /><color alpha="0.04" /></bezel>
+ <bezel element="hlbb" inputtag="board:RANK.~i~" inputmask="0x04"><bounds x="20" y="~y~" width="10" height="10" /><color alpha="0.04" /></bezel>
+ <bezel element="hlbb" inputtag="board:RANK.~i~" inputmask="0x08"><bounds x="30" y="~y~" width="10" height="10" /><color alpha="0.04" /></bezel>
+ <bezel element="hlbb" inputtag="board:RANK.~i~" inputmask="0x10"><bounds x="40" y="~y~" width="10" height="10" /><color alpha="0.04" /></bezel>
+ <bezel element="hlbb" inputtag="board:RANK.~i~" inputmask="0x20"><bounds x="50" y="~y~" width="10" height="10" /><color alpha="0.04" /></bezel>
+ <bezel element="hlbb" inputtag="board:RANK.~i~" inputmask="0x40"><bounds x="60" y="~y~" width="10" height="10" /><color alpha="0.04" /></bezel>
+ <bezel element="hlbb" inputtag="board:RANK.~i~" inputmask="0x80"><bounds x="70" y="~y~" width="10" height="10" /><color alpha="0.04" /></bezel>
- <view name="Internal Layout">
- <bounds left="0" right="270" top="0" bottom="395" />
+ <bezel name="piece_a~i~" element="piece"><bounds x="0" y="~y~" width="10" height="10" /></bezel>
+ <bezel name="piece_b~i~" element="piece"><bounds x="10" y="~y~" width="10" height="10" /></bezel>
+ <bezel name="piece_c~i~" element="piece"><bounds x="20" y="~y~" width="10" height="10" /></bezel>
+ <bezel name="piece_d~i~" element="piece"><bounds x="30" y="~y~" width="10" height="10" /></bezel>
+ <bezel name="piece_e~i~" element="piece"><bounds x="40" y="~y~" width="10" height="10" /></bezel>
+ <bezel name="piece_f~i~" element="piece"><bounds x="50" y="~y~" width="10" height="10" /></bezel>
+ <bezel name="piece_g~i~" element="piece"><bounds x="60" y="~y~" width="10" height="10" /></bezel>
+ <bezel name="piece_h~i~" element="piece"><bounds x="70" y="~y~" width="10" height="10" /></bezel>
+ </repeat>
+ </group>
- <bezel name="digit0" element="digit"><bounds x="10" y="10" width="50" height="80" /></bezel>
- <bezel name="digit1" element="digit"><bounds x="70" y="10" width="50" height="80" /></bezel>
- <bezel name="digit2" element="digit"><bounds x="150" y="10" width="50" height="80" /></bezel>
- <bezel name="digit3" element="digit"><bounds x="210" y="10" width="50" height="80" /></bezel>
+
+<!-- sb ui -->
+
+ <element name="hlub" defstate="0">
+ <rect state="1"><color red="0" green="0" blue="0" /></rect>
+ </element>
+
+ <element name="text_uit1"><text string="S.BOARD"><color red="0.81" green="0.8" blue="0.79" /></text></element>
+ <element name="text_uit2"><text string="INTERFACE"><color red="0.81" green="0.8" blue="0.79" /></text></element>
+ <element name="text_uib1"><text string="BOARD:"><color red="0.81" green="0.8" blue="0.79" /></text></element>
+ <element name="text_uib2">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="RESET"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_uib3">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="CLEAR"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_uis1"><text string="SPAWN:"><color red="0.81" green="0.8" blue="0.79" /></text></element>
+ <element name="text_uih1"><text string="HAND:"><color red="0.81" green="0.8" blue="0.79" /></text></element>
+ <element name="text_uih2">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="REMOVE"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_uiu1"><text string="UNDO:"><color red="0.81" green="0.8" blue="0.79" /></text></element>
+ <element name="text_uiu2a">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string=" &lt;&lt;"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_uiu2b">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string=" &lt; "><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_uiu2c">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string=" &gt;"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_uiu2d">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string=" &gt;&gt;"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_uiu3a" defstate="0">
+ <simplecounter maxstate="999" digits="1" align="2">
+ <color red="0.81" green="0.8" blue="0.79" />
+ </simplecounter>
+ </element>
+ <element name="text_uiu3b"><text string="/"><color red="0.81" green="0.8" blue="0.79" /></text></element>
+ <element name="text_uiu3c" defstate="0">
+ <simplecounter maxstate="999" digits="1" align="1">
+ <color red="0.81" green="0.8" blue="0.79" />
+ </simplecounter>
+ </element>
+
+ <group name="sb_ui">
+ <bounds x="0" y="0" width="10" height="80" />
+ <bezel element="cblack"><bounds x="0" y="0" width="10" height="1" /></bezel>
+ <bezel element="cblack"><bounds x="0" y="7" width="10" height="1" /></bezel>
+ <bezel element="cblack"><bounds x="0" y="79" width="10" height="1" /></bezel>
+ <bezel element="text_uit1"><bounds x="0" y="2" width="10" height="2" /></bezel>
+ <bezel element="text_uit2"><bounds x="0" y="4" width="10" height="2" /></bezel>
+
+ <!-- board -->
+ <bezel element="text_uib1"><bounds x="0" y="9" width="10" height="2" /></bezel>
+ <bezel element="cwhite"><bounds x="1" y="11.5" width="8" height="2.5" /></bezel>
+ <bezel element="cwhite"><bounds x="1" y="15" width="8" height="2.5" /></bezel>
+
+ <bezel element="text_uib2"><bounds x="1.5" y="11.75" width="7" height="2" /></bezel>
+ <bezel element="text_uib3"><bounds x="1.5" y="15.25" width="7" height="2" /></bezel>
+
+ <bezel element="hlub" inputtag="board:UI" inputmask="0x200"><bounds x="1" y="11.5" width="8" height="2.5" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:UI" inputmask="0x100"><bounds x="1" y="15" width="8" height="2.5" /><color alpha="0.25" /></bezel>
+
+ <!-- spawn -->
+ <bezel element="text_uis1"><bounds x="0" y="20.5" width="10" height="2" /></bezel>
+ <bezel element="cwhite"><bounds x="1" y="23" width="8" height="12" /></bezel>
+ <bezel element="cwhite"><bounds x="1" y="36" width="8" height="12" /></bezel>
+
+ <bezel name="piece_ui1" element="piece"><bounds x="1" y="23" width="4" height="4" /></bezel>
+ <bezel name="piece_ui2" element="piece"><bounds x="1" y="27" width="4" height="4" /></bezel>
+ <bezel name="piece_ui3" element="piece"><bounds x="1" y="31" width="4" height="4" /></bezel>
+ <bezel name="piece_ui4" element="piece"><bounds x="5" y="23" width="4" height="4" /></bezel>
+ <bezel name="piece_ui5" element="piece"><bounds x="5" y="27" width="4" height="4" /></bezel>
+ <bezel name="piece_ui6" element="piece"><bounds x="5" y="31" width="4" height="4" /></bezel>
+ <bezel name="piece_ui7" element="piece"><bounds x="1" y="36" width="4" height="4" /></bezel>
+ <bezel name="piece_ui8" element="piece"><bounds x="1" y="40" width="4" height="4" /></bezel>
+ <bezel name="piece_ui9" element="piece"><bounds x="1" y="44" width="4" height="4" /></bezel>
+ <bezel name="piece_ui10" element="piece"><bounds x="5" y="36" width="4" height="4" /></bezel>
+ <bezel name="piece_ui11" element="piece"><bounds x="5" y="40" width="4" height="4" /></bezel>
+ <bezel name="piece_ui12" element="piece"><bounds x="5" y="44" width="4" height="4" /></bezel>
+
+ <bezel element="hlub" inputtag="board:SPAWN" inputmask="0x0001"><bounds x="1" y="23" width="4" height="4" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:SPAWN" inputmask="0x0002"><bounds x="1" y="27" width="4" height="4" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:SPAWN" inputmask="0x0004"><bounds x="1" y="31" width="4" height="4" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:SPAWN" inputmask="0x0008"><bounds x="5" y="23" width="4" height="4" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:SPAWN" inputmask="0x0010"><bounds x="5" y="27" width="4" height="4" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:SPAWN" inputmask="0x0020"><bounds x="5" y="31" width="4" height="4" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:SPAWN" inputmask="0x0040"><bounds x="1" y="36" width="4" height="4" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:SPAWN" inputmask="0x0080"><bounds x="1" y="40" width="4" height="4" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:SPAWN" inputmask="0x0100"><bounds x="1" y="44" width="4" height="4" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:SPAWN" inputmask="0x0200"><bounds x="5" y="36" width="4" height="4" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:SPAWN" inputmask="0x0400"><bounds x="5" y="40" width="4" height="4" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:SPAWN" inputmask="0x0800"><bounds x="5" y="44" width="4" height="4" /><color alpha="0.25" /></bezel>
+
+ <!-- hand -->
+ <bezel element="text_uih1"><bounds x="0" y="51" width="10" height="2" /></bezel>
+ <bezel element="cblack"><bounds x="1" y="53.5" width="8" height="6" /></bezel>
+ <bezel name="piece_ui0" element="piece"><bounds x="2" y="53.5" width="6" height="6" /></bezel>
+
+ <bezel element="cwhite"><bounds x="1" y="60.5" width="8" height="2.5" /></bezel>
+ <bezel element="text_uih2"><bounds x="1.5" y="60.75" width="7" height="2" /></bezel>
+ <bezel element="hlub" inputtag="board:UI" inputmask="0x08"><bounds x="1" y="60.5" width="8" height="2.5" /><color alpha="0.25" /></bezel>
+
+ <!-- undo -->
+ <bezel element="text_uiu1"><bounds x="0" y="66" width="10" height="2" /></bezel>
+ <bezel element="cwhite"><bounds x="1" y="68.5" width="1.7" height="6" /></bezel>
+ <bezel element="cwhite"><bounds x="3.1" y="68.5" width="1.7" height="6" /></bezel>
+ <bezel element="cwhite"><bounds x="5.2" y="68.5" width="1.7" height="6" /></bezel>
+ <bezel element="cwhite"><bounds x="7.3" y="68.5" width="1.7" height="6" /></bezel>
+ <bezel element="text_uiu2a"><bounds x="1" y="69.5" width="1.7" height="4" /></bezel>
+ <bezel element="text_uiu2b"><bounds x="3.1" y="69.5" width="1.7" height="4" /></bezel>
+ <bezel element="text_uiu2c"><bounds x="5.2" y="69.5" width="1.7" height="4" /></bezel>
+ <bezel element="text_uiu2d"><bounds x="7.3" y="69.5" width="1.7" height="4" /></bezel>
+
+ <bezel element="hlub" inputtag="board:UI" inputmask="0x10"><bounds x="1" y="68.5" width="1.7" height="6" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:UI" inputmask="0x20"><bounds x="3.1" y="68.5" width="1.7" height="6" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:UI" inputmask="0x40"><bounds x="5.2" y="68.5" width="1.7" height="6" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:UI" inputmask="0x80"><bounds x="7.3" y="68.5" width="1.7" height="6" /><color alpha="0.25" /></bezel>
+
+ <bezel name="count_ui0" element="text_uiu3a"><bounds x="0" y="75" width="4" height="2" /></bezel>
+ <bezel name="count_ui1" element="text_uiu3c"><bounds x="6" y="75" width="4" height="2" /></bezel>
+ <bezel element="text_uiu3b"><bounds x="4" y="75" width="2" height="2" /></bezel>
+ </group>
+
+
+<!-- display, buttons -->
+
+ <group name="panel">
+ <bounds x="0" y="5" width="270" height="390" />
+
+ <bezel name="digit0" element="digit"><bounds x="10" y="15" width="50" height="75" /></bezel>
+ <bezel name="digit1" element="digit"><bounds x="70" y="15" width="50" height="75" /></bezel>
+ <bezel name="digit2" element="digit"><bounds x="150" y="15" width="50" height="75" /></bezel>
+ <bezel name="digit3" element="digit"><bounds x="210" y="15" width="50" height="75" /></bezel>
<bezel name="0.7" element="led"><bounds x="12.5" y="152.5" width="20" height="20" /></bezel>
<bezel name="1.7" element="led"><bounds x="237.5" y="152.5" width="20" height="20" /></bezel>
@@ -140,8 +493,6 @@
<bezel element="text_schach"><bounds x="5" y="110" width="100" height="20" /></bezel>
<bezel element="text_matt"><bounds x="165" y="110" width="100" height="20" /></bezel>
- <!-- button panel -->
-
<bezel element="black"><bounds x="42.5" y="135" width="55" height="55" /></bezel>
<bezel element="black"><bounds x="107.5" y="135" width="55" height="55" /></bezel>
<bezel element="black"><bounds x="172.5" y="135" width="55" height="55" /></bezel>
@@ -198,6 +549,45 @@
<bezel element="hl" inputtag="IN.2" inputmask="0x02"><bounds x="75" y="330" width="55" height="55" /><color alpha="0.25" /></bezel>
<bezel element="hl" inputtag="IN.2" inputmask="0x04"><bounds x="140" y="330" width="55" height="55" /><color alpha="0.25" /></bezel>
<bezel element="hl" inputtag="IN.2" inputmask="0x08"><bounds x="205" y="330" width="55" height="55" /><color alpha="0.25" /></bezel>
+ </group>
+
+<!-- build screen -->
+
+ <view name="Internal Layout (Full)">
+ <bounds left="-13" right="131.8" top="-1.5" bottom="87.5" />
+
+ <group ref="panel"><bounds x="91" y="29.4" width="38.0769" height="55" /></group>
+
+ <bezel element="white"><bounds x="-1" y="-1.5" width="89" height="89" /></bezel>
+ <bezel element="black2"><bounds x="3" y="2.5" width="81" height="81" /></bezel>
+ <group ref="sb_board"><bounds x="3.5" y="3" width="80" height="80" /></group>
+ <group ref="sb_ui"><bounds x="-12" y="3" width="10" height="80" /></group>
+
+ <bezel element="text_warning"><bounds x="3.5" y="-0.5" width="80" height="1.98" /></bezel>
+
+ <bezel element="text_8"><bounds x="0.2" y="7" width="2" height="2" /></bezel>
+ <bezel element="text_7"><bounds x="0.2" y="17" width="2" height="2" /></bezel>
+ <bezel element="text_6"><bounds x="0.2" y="27" width="2" height="2" /></bezel>
+ <bezel element="text_5"><bounds x="0.2" y="37" width="2" height="2" /></bezel>
+ <bezel element="text_4"><bounds x="0.2" y="47" width="2" height="2" /></bezel>
+ <bezel element="text_3"><bounds x="0.2" y="57" width="2" height="2" /></bezel>
+ <bezel element="text_2"><bounds x="0.2" y="67" width="2" height="2" /></bezel>
+ <bezel element="text_1"><bounds x="0.2" y="77" width="2" height="2" /></bezel>
+
+ <bezel element="text_a"><bounds x="7.5" y="84.5" width="2" height="2" /></bezel>
+ <bezel element="text_b"><bounds x="17.5" y="84.5" width="2" height="2" /></bezel>
+ <bezel element="text_c"><bounds x="27.5" y="84.5" width="2" height="2" /></bezel>
+ <bezel element="text_d"><bounds x="37.5" y="84.5" width="2" height="2" /></bezel>
+ <bezel element="text_e"><bounds x="47.5" y="84.5" width="2" height="2" /></bezel>
+ <bezel element="text_f"><bounds x="57.5" y="84.5" width="2" height="2" /></bezel>
+ <bezel element="text_g"><bounds x="67.5" y="84.5" width="2" height="2" /></bezel>
+ <bezel element="text_h"><bounds x="77.5" y="84.5" width="2" height="2" /></bezel>
</view>
+
+ <view name="Internal Layout (Buttons)">
+ <bounds left="0" right="270" top="0" bottom="390" />
+ <group ref="panel"><bounds x="0" y="0" width="270" height="390" /></group>
+ </view>
+
</mamelayout>
diff --git a/src/mame/machine/pgmprot_igs027a_type3.cpp b/src/mame/machine/pgmprot_igs027a_type3.cpp
index 2f835f91e69..fd513353011 100644
--- a/src/mame/machine/pgmprot_igs027a_type3.cpp
+++ b/src/mame/machine/pgmprot_igs027a_type3.cpp
@@ -193,7 +193,7 @@ void pgm_arm_type3_state::pgm_arm_type3(machine_config &config) // ARM7 Shared m
m_prot->set_addrmap(AS_PROGRAM, &pgm_arm_type3_state::_55857G_arm7_map);
}
-void pgm_arm_type3_state::pgm_arm_type3_22m(machine_config &config) // ARM7 uses 22MHz XTAL (dmnfrnt theglad killbldp)
+void pgm_arm_type3_state::pgm_arm_type3_22m(machine_config &config) // ARM7 uses 22MHz XTAL (dmnfrnt theglad)
{
pgm_arm_type3(config);
@@ -214,6 +214,13 @@ void pgm_arm_type3_state::pgm_arm_type3_33m(machine_config &config) // ARM7 uses
m_prot->set_clock(XTAL(33'000'000));
}
+void pgm_arm_type3_state::pgm_arm_type3_33_8688m(machine_config &config) // ARM7 uses 33.8688MHz XTAL (killbldp)
+{
+ pgm_arm_type3(config);
+
+ m_prot->set_clock(XTAL(33'868'800));
+}
+
void pgm_arm_type3_state::svg_basic_init()
{
diff --git a/src/mame/machine/pgmprot_igs027a_type3.h b/src/mame/machine/pgmprot_igs027a_type3.h
index 0922e7986d3..88f394d5920 100644
--- a/src/mame/machine/pgmprot_igs027a_type3.h
+++ b/src/mame/machine/pgmprot_igs027a_type3.h
@@ -22,6 +22,7 @@ public:
void pgm_arm_type3_22m(machine_config &config);
void pgm_arm_type3_24m(machine_config &config);
void pgm_arm_type3_33m(machine_config &config);
+ void pgm_arm_type3_33_8688m(machine_config &config);
protected:
virtual void machine_reset() override;
diff --git a/src/mame/mame.lst b/src/mame/mame.lst
index a131f547511..656b08da72a 100644
--- a/src/mame/mame.lst
+++ b/src/mame/mame.lst
@@ -12623,9 +12623,9 @@ klaxp1 // prototype
klaxp2 // prototype
@source:equites.cpp
+bngotime // (c) 1986 CLS?
bullfgtr // (c) 1984 Alpha Denshi Co.
bullfgtrs // (c) 1984 Alpha Denshi Co./Sega
-clsunk // (c) 1986 CLS?
equites // (c) 1984 Alpha Denshi Co.
equitess // (c) 1984 Alpha Denshi Co./Sega
gekisou // (c) 1985 Eastern
@@ -21389,12 +21389,12 @@ meijinsn // (c) 1986 SNK
mekd2 // 1977 Motorola Evaluation Kit
@source:mephisto.cpp
-mm2 // Mephisto 2
-mm4 // Mephisto 4
-mm4tk // Mephisto 4 Turbo Kit
-mm5 // Mephisto 5.1 ROM
-mm50 // Mephisto 5.0 ROM
-rebel5 // Mephisto 5
+mm2 // Mephisto MM II
+bup // Mephisto B&P
+mm4tk // Mephisto MM IV (Turbo Kit)
+mm4 // Mephisto MM IV
+mm5 // Mephisto MM V
+rebel5 // Mephisto Rebell 5.0
@source:mephisto_montec.cpp
mondial // 1985 Mephisto Mondial
diff --git a/src/mame/video/cps1.cpp b/src/mame/video/cps1.cpp
index d378aac4871..0229acb5188 100644
--- a/src/mame/video/cps1.cpp
+++ b/src/mame/video/cps1.cpp
@@ -2256,8 +2256,6 @@ void cps_state::cps1_update_transmasks()
void cps_state::video_start()
{
- int i;
-
MACHINE_RESET_CALL_MEMBER(cps);
/* Put in some const */
@@ -2279,9 +2277,6 @@ void cps_state::video_start()
/* front masks will change at runtime to handle sprite occluding */
cps1_update_transmasks();
- for (i = 0; i < cps1_palette_entries * 16; i++)
- m_palette->set_pen_color(i, rgb_t(0,0,0));
-
m_buffered_obj = make_unique_clear<uint16_t[]>(m_obj_size / 2);
/* clear RAM regions */
@@ -2387,7 +2382,7 @@ void cps_state::cps1_build_palette( const uint16_t* const palette_base )
g = ((palette >> 4) & 0x0f) * 0x11 * bright / 0x2d;
b = ((palette >> 0) & 0x0f) * 0x11 * bright / 0x2d;
- m_palette->set_pen_color (0x200 * page + offset, rgb_t(r, g, b));
+ m_palette->set_pen_color(0x200 * page + offset, rgb_t(r, g, b));
}
}
else
diff --git a/src/mame/video/deco32.cpp b/src/mame/video/deco32.cpp
index 44352932ebc..8e2f435ca62 100644
--- a/src/mame/video/deco32.cpp
+++ b/src/mame/video/deco32.cpp
@@ -10,12 +10,12 @@ void deco32_state::pri_w(u32 data)
m_pri = data;
}
-WRITE32_MEMBER( dragngun_state::sprite_control_w )
+void dragngun_state::sprite_control_w(u32 data)
{
m_sprite_ctrl = data;
}
-WRITE32_MEMBER( dragngun_state::spriteram_dma_w )
+void dragngun_state::spriteram_dma_w(u32 data)
{
/* DMA spriteram to private sprite chip area, and clear cpu ram */
m_spriteram->copy();
@@ -27,13 +27,13 @@ WRITE32_MEMBER( dragngun_state::spriteram_dma_w )
/* Later games have double buffered paletteram - the real palette ram is
only updated on a DMA call */
-WRITE32_MEMBER( deco32_state::buffered_palette_w )
+void deco32_state::buffered_palette_w(offs_t offset, u32 data, u32 mem_mask)
{
COMBINE_DATA(&m_paletteram[offset]);
- m_dirty_palette[offset]=1;
+ m_dirty_palette[offset] = 1;
}
-WRITE32_MEMBER( deco32_state::palette_dma_w )
+void deco32_state::palette_dma_w(u32 data)
{
for (int i = 0; i < m_palette->entries(); i++)
{
@@ -41,11 +41,11 @@ WRITE32_MEMBER( deco32_state::palette_dma_w )
{
m_dirty_palette[i] = 0;
- uint8_t b = (m_paletteram[i] >> 16) & 0xff;
- uint8_t g = (m_paletteram[i] >> 8) & 0xff;
- uint8_t r = (m_paletteram[i] >> 0) & 0xff;
+ const u8 b = (m_paletteram[i] >> 16) & 0xff;
+ const u8 g = (m_paletteram[i] >> 8) & 0xff;
+ const u8 r = (m_paletteram[i] >> 0) & 0xff;
- m_palette->set_pen_color(i,rgb_t(r,g,b));
+ m_palette->set_pen_color(i, rgb_t(r, g, b));
}
}
}
@@ -59,24 +59,24 @@ void deco32_state::video_start()
void deco32_state::allocate_spriteram(int chip)
{
- m_spriteram16[chip] = std::make_unique<uint16_t[]>(0x2000/4);
- m_spriteram16_buffered[chip] = std::make_unique<uint16_t[]>(0x2000/4);
+ m_spriteram16[chip] = std::make_unique<u16[]>(0x2000/4);
+ m_spriteram16_buffered[chip] = std::make_unique<u16[]>(0x2000/4);
save_pointer(NAME(m_spriteram16[chip]), 0x2000/4, chip);
save_pointer(NAME(m_spriteram16_buffered[chip]), 0x2000/4, chip);
}
void deco32_state::allocate_buffered_palette()
{
- m_dirty_palette = make_unique_clear<uint8_t[]>(2048);
+ m_dirty_palette = make_unique_clear<u8[]>(2048);
save_pointer(NAME(m_dirty_palette), 2048);
}
void deco32_state::allocate_rowscroll(int size1, int size2, int size3, int size4)
{
- m_pf_rowscroll[0] = make_unique_clear<uint16_t[]>(size1);
- m_pf_rowscroll[1] = make_unique_clear<uint16_t[]>(size2);
- m_pf_rowscroll[2] = make_unique_clear<uint16_t[]>(size3);
- m_pf_rowscroll[3] = make_unique_clear<uint16_t[]>(size4);
+ m_pf_rowscroll[0] = make_unique_clear<u16[]>(size1);
+ m_pf_rowscroll[1] = make_unique_clear<u16[]>(size2);
+ m_pf_rowscroll[2] = make_unique_clear<u16[]>(size3);
+ m_pf_rowscroll[3] = make_unique_clear<u16[]>(size4);
save_pointer(NAME(m_pf_rowscroll[0]), size1);
save_pointer(NAME(m_pf_rowscroll[1]), size2);
save_pointer(NAME(m_pf_rowscroll[2]), size3);
@@ -102,10 +102,9 @@ void fghthist_state::video_start()
void nslasher_state::video_start()
{
- int width, height;
- width = m_screen->width();
- height = m_screen->height();
- m_tilemap_alpha_bitmap=std::make_unique<bitmap_ind16>(width, height);
+ const int width = m_screen->width();
+ const int height = m_screen->height();
+ m_tilemap_alpha_bitmap = std::make_unique<bitmap_ind16>(width, height);
for (int chip = 0; chip < 2; chip++)
{
m_sprgen[chip]->alloc_sprite_bitmap();
@@ -128,9 +127,9 @@ void dragngun_state::video_start()
/******************************************************************************/
-uint32_t captaven_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
+u32 captaven_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
- uint16_t flip = m_deco_tilegen[0]->pf_control_r(0);
+ const u16 flip = m_deco_tilegen[0]->pf_control_r(0);
flip_screen_set(BIT(flip, 7));
m_sprgen[0]->set_flip_screen(BIT(flip, 7));
@@ -142,7 +141,7 @@ uint32_t captaven_state::screen_update(screen_device &screen, bitmap_ind16 &bitm
// pf4 not used (because pf3 is in 8bpp mode)
- if ((m_pri&1)==0)
+ if ((m_pri & 1) == 0)
{
m_deco_tilegen[1]->tilemap_1_draw(screen, bitmap, cliprect, 0, 1);
m_deco_tilegen[0]->tilemap_2_draw(screen, bitmap, cliprect, 0, 2);
@@ -161,7 +160,7 @@ uint32_t captaven_state::screen_update(screen_device &screen, bitmap_ind16 &bitm
return 0;
}
-uint32_t dragngun_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
+u32 dragngun_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
screen.priority().fill(0, cliprect);
bitmap.fill(m_palette->pen(0x400), cliprect); // Palette index not confirmed
@@ -185,7 +184,7 @@ uint32_t dragngun_state::screen_update(screen_device &screen, bitmap_rgb32 &bitm
{
rectangle clip(cliprect.left(), cliprect.right(), 8, 247);
- m_sprgenzoom->dragngun_draw_sprites(bitmap,clip,m_spriteram->buffer(), m_sprite_layout_ram[0], m_sprite_layout_ram[1], m_sprite_lookup_ram[0], m_sprite_lookup_ram[1], m_sprite_ctrl, screen.priority(), m_temp_render_bitmap );
+ m_sprgenzoom->dragngun_draw_sprites(bitmap,clip,m_spriteram->buffer(), m_sprite_layout_ram[0], m_sprite_layout_ram[1], m_sprite_lookup_ram[0], m_sprite_lookup_ram[1], m_sprite_ctrl, screen.priority(), m_temp_render_bitmap);
}
@@ -193,7 +192,7 @@ uint32_t dragngun_state::screen_update(screen_device &screen, bitmap_rgb32 &bitm
}
-uint32_t fghthist_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
+u32 fghthist_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
screen.priority().fill(0, cliprect);
bitmap.fill(m_palette->pen(0x300), cliprect); // Palette index not confirmed
@@ -208,7 +207,7 @@ uint32_t fghthist_state::screen_update(screen_device &screen, bitmap_rgb32 &bitm
/* Draw screen */
m_deco_tilegen[1]->tilemap_2_draw(screen, bitmap, cliprect, 0, 1);
- if(m_pri&1)
+ if (m_pri & 1)
{
m_deco_tilegen[0]->tilemap_2_draw(screen, bitmap, cliprect, 0, 2);
m_sprgen[0]->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0800, 0x0800, 1024, 0x1ff);
@@ -247,21 +246,21 @@ void nslasher_state::mixDualAlphaSprites(screen_device &screen, bitmap_rgb32 &bi
/* Mix sprites into main bitmap, based on priority & alpha */
for (int y = cliprect.top(); y <= cliprect.bottom(); y++)
{
- uint8_t* tilemapPri = &screen.priority().pix8(y);
- uint16_t* sprite0 = &sprite0_mix_bitmap.pix16(y);
- uint16_t* sprite1 = &sprite1_mix_bitmap.pix16(y);
- uint32_t* destLine = &bitmap.pix32(y);
- uint16_t* alphaTilemap = &m_tilemap_alpha_bitmap->pix16(y);
+ const u16* sprite0 = &sprite0_mix_bitmap.pix16(y);
+ const u16* sprite1 = &sprite1_mix_bitmap.pix16(y);
+ const u16* alphaTilemap = &m_tilemap_alpha_bitmap->pix16(y);
+ const u8* tilemapPri = &screen.priority().pix8(y);
+ u32* destLine = &bitmap.pix32(y);
for (int x = cliprect.left(); x <= cliprect.right(); x++)
{
- uint16_t const priColAlphaPal0 = sprite0[x];
- uint16_t const priColAlphaPal1 = sprite1[x];
- uint16_t const pri0 = (priColAlphaPal0 & 0x6000) >> 13;
- uint16_t const pri1 = (priColAlphaPal1 & 0x6000) >> 13;
- uint16_t const col0 = (((priColAlphaPal0 & 0x1f00) >> 8) % gfx0->colors()) * gfx0->granularity();
- uint16_t const col1 = (((priColAlphaPal1 & 0x0f00) >> 8) % gfx1->colors()) * gfx1->granularity();
- uint16_t const alpha1 = priColAlphaPal1 & 0x8000;
+ const u16 priColAlphaPal0 = sprite0[x];
+ const u16 priColAlphaPal1 = sprite1[x];
+ const u16 pri0 = (priColAlphaPal0 & 0x6000) >> 13;
+ const u16 pri1 = (priColAlphaPal1 & 0x6000) >> 13;
+ const u16 col0 = (((priColAlphaPal0 & 0x1f00) >> 8) % gfx0->colors()) * gfx0->granularity();
+ const u16 col1 = (((priColAlphaPal1 & 0x0f00) >> 8) % gfx1->colors()) * gfx1->granularity();
+ const u16 alpha1 = priColAlphaPal1 & 0x8000;
// Apply sprite bitmap 0 according to priority rules
if ((priColAlphaPal0 & 0xff) != 0)
@@ -346,7 +345,7 @@ void nslasher_state::mixDualAlphaSprites(screen_device &screen, bitmap_rgb32 &bi
/* Optionally mix in alpha tilemap */
if (mixAlphaTilemap)
{
- uint16_t p = alphaTilemap[x];
+ const u16 p = alphaTilemap[x];
if (p & 0xf)
{
/* Alpha tilemap under top two sprite 0 priorities */
@@ -366,15 +365,15 @@ void nslasher_state::mixDualAlphaSprites(screen_device &screen, bitmap_rgb32 &bi
}
}
-uint32_t nslasher_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
+u32 nslasher_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
- int alphaTilemap=0;
+ bool alphaTilemap = false;
m_deco_tilegen[0]->pf_update(m_pf_rowscroll[0].get(), m_pf_rowscroll[1].get());
m_deco_tilegen[1]->pf_update(m_pf_rowscroll[2].get(), m_pf_rowscroll[3].get());
/* This is not a conclusive test for deciding if tilemap needs alpha blending */
- if (m_deco_ace->get_aceram(0x17)!=0x0 && m_pri)
- alphaTilemap=1;
+ if (m_deco_ace->get_aceram(0x17) != 0x0 && m_pri)
+ alphaTilemap = true;
screen.priority().fill(0, cliprect);
@@ -390,12 +389,11 @@ uint32_t nslasher_state::screen_update(screen_device &screen, bitmap_rgb32 &bitm
m_sprgen[0]->draw_sprites(bitmap, cliprect, m_spriteram16_buffered[0].get(), 0x800);
m_sprgen[1]->draw_sprites(bitmap, cliprect, m_spriteram16_buffered[1].get(), 0x800);
-
/* Render alpha-blended tilemap to separate buffer for proper mixing */
m_tilemap_alpha_bitmap->fill(0, cliprect);
/* Draw playfields & sprites */
- if (m_pri&2)
+ if (m_pri & 2)
{
m_deco_tilegen[1]->tilemap_12_combine_draw(screen, bitmap, cliprect, 0, 1, 1);
m_deco_tilegen[0]->tilemap_2_draw(screen, bitmap, cliprect, 0, 4);
@@ -403,7 +401,7 @@ uint32_t nslasher_state::screen_update(screen_device &screen, bitmap_rgb32 &bitm
else
{
m_deco_tilegen[1]->tilemap_2_draw(screen, bitmap, cliprect, 0, 1);
- if (m_pri&1)
+ if (m_pri & 1)
{
m_deco_tilegen[0]->tilemap_2_draw(screen, bitmap, cliprect, 0, 2);
if (alphaTilemap)