mirror of
https://github.com/holub/mame
synced 2025-04-22 00:11:58 +03:00
New working machine
----------- Rebound [DICE team, Couriersud]
This commit is contained in:
parent
68c97d055c
commit
e80276bb23
@ -1198,6 +1198,8 @@ files {
|
||||
MAME_DIR .. "src/mame/machine/nl_pongd.h",
|
||||
MAME_DIR .. "src/mame/machine/nl_breakout.cpp",
|
||||
MAME_DIR .. "src/mame/machine/nl_breakout.h",
|
||||
MAME_DIR .. "src/mame/machine/nl_rebound.cpp",
|
||||
MAME_DIR .. "src/mame/machine/nl_rebound.h",
|
||||
MAME_DIR .. "src/mame/drivers/poolshrk.cpp",
|
||||
MAME_DIR .. "src/mame/includes/poolshrk.h",
|
||||
MAME_DIR .. "src/mame/audio/poolshrk.cpp",
|
||||
|
@ -128,6 +128,8 @@ files{
|
||||
MAME_DIR .. "src/mame/machine/nl_pongd.h",
|
||||
MAME_DIR .. "src/mame/machine/nl_breakout.cpp",
|
||||
MAME_DIR .. "src/mame/machine/nl_breakout.h",
|
||||
MAME_DIR .. "src/mame/machine/nl_rebound.cpp",
|
||||
MAME_DIR .. "src/mame/machine/nl_rebound.h",
|
||||
MAME_DIR .. "src/mame/machine/nl_hazelvid.cpp",
|
||||
MAME_DIR .. "src/mame/machine/nl_hazelvid.h",
|
||||
|
||||
|
@ -66,7 +66,7 @@ hpc_disassembler::hpc_disassembler(const char *const regs[])
|
||||
{
|
||||
}
|
||||
|
||||
u32 hpc_disassembler::opcode_alignment() const
|
||||
util::u32 hpc_disassembler::opcode_alignment() const
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
@ -79,7 +79,7 @@ void hpc_disassembler::format_register(std::ostream &stream, u16 reg) const
|
||||
if (name != nullptr)
|
||||
{
|
||||
stream << name;
|
||||
if (BIT(reg, 0))
|
||||
if (util::BIT(reg, 0))
|
||||
stream << "+1";
|
||||
return;
|
||||
}
|
||||
@ -160,7 +160,7 @@ void hpc_disassembler::disassemble_unary_op(std::ostream &stream, const char *op
|
||||
|
||||
void hpc_disassembler::disassemble_bit_op(std::ostream &stream, const char *op, u8 bit, u16 offset, u16 src, bool indir, bool idx) const
|
||||
{
|
||||
if (src >= 0x00c0 && src < 0x01c0 && BIT(src, 0) && !indir && m_regs[(src - 0x00c0) >> 1] != nullptr)
|
||||
if (src >= 0x00c0 && src < 0x01c0 && util::BIT(src, 0) && !indir && m_regs[(src - 0x00c0) >> 1] != nullptr)
|
||||
{
|
||||
src &= 0xfffe;
|
||||
bit += 8;
|
||||
@ -178,7 +178,7 @@ void hpc_disassembler::disassemble_bit_op(std::ostream &stream, const char *op,
|
||||
stream << "].b";
|
||||
}
|
||||
|
||||
offs_t hpc_disassembler::disassemble(std::ostream &stream, offs_t pc, const hpc_disassembler::data_buffer &opcodes, const hpc_disassembler::data_buffer ¶ms)
|
||||
util::disasm_interface::offs_t hpc_disassembler::disassemble(std::ostream &stream, util::disasm_interface::offs_t pc, const hpc_disassembler::data_buffer &opcodes, const hpc_disassembler::data_buffer ¶ms)
|
||||
{
|
||||
u8 opcode = opcodes.r8(pc);
|
||||
u16 reg = REGISTER_A;
|
||||
@ -253,7 +253,7 @@ offs_t hpc_disassembler::disassemble(std::ostream &stream, offs_t pc, const hpc_
|
||||
case 0xa0:
|
||||
dmode = true;
|
||||
indir = false;
|
||||
if (BIT(opcode, 1))
|
||||
if (util::BIT(opcode, 1))
|
||||
imm = true;
|
||||
|
||||
src = opcodes.r8(pc + 1);
|
||||
@ -266,7 +266,7 @@ offs_t hpc_disassembler::disassemble(std::ostream &stream, offs_t pc, const hpc_
|
||||
case 0xa4:
|
||||
dmode = true;
|
||||
indir = false;
|
||||
if (BIT(opcode, 1))
|
||||
if (util::BIT(opcode, 1))
|
||||
imm = true;
|
||||
|
||||
src = (opcodes.r8(pc + 1) << 8) | opcodes.r8(pc + 2);
|
||||
@ -279,7 +279,7 @@ offs_t hpc_disassembler::disassemble(std::ostream &stream, offs_t pc, const hpc_
|
||||
case 0xa1:
|
||||
dmode = true;
|
||||
indir = false;
|
||||
if (BIT(opcode, 1))
|
||||
if (util::BIT(opcode, 1))
|
||||
imm = true;
|
||||
|
||||
src = opcodes.r8(pc + 1);
|
||||
@ -300,7 +300,7 @@ offs_t hpc_disassembler::disassemble(std::ostream &stream, offs_t pc, const hpc_
|
||||
case 0xa5:
|
||||
dmode = true;
|
||||
indir = false;
|
||||
if (BIT(opcode, 1))
|
||||
if (util::BIT(opcode, 1))
|
||||
imm = true;
|
||||
|
||||
src = (opcodes.r8(pc + 1) << 8) | opcodes.r8(pc + 2);
|
||||
@ -583,17 +583,17 @@ offs_t hpc_disassembler::disassemble(std::ostream &stream, offs_t pc, const hpc_
|
||||
case 0xd4:
|
||||
case 0xe4:
|
||||
case 0xf4:
|
||||
disassemble_op(stream, "ld", reg, src, imm, indir, idx, BIT(opcode, 5));
|
||||
disassemble_op(stream, "ld", reg, src, imm, indir, idx, util::BIT(opcode, 5));
|
||||
break;
|
||||
|
||||
case 0x89:
|
||||
case 0xa9:
|
||||
disassemble_unary_op(stream, "inc", reg, src, indir, idx, BIT(opcode, 5));
|
||||
disassemble_unary_op(stream, "inc", reg, src, indir, idx, util::BIT(opcode, 5));
|
||||
break;
|
||||
|
||||
case 0x8a:
|
||||
case 0xaa:
|
||||
disassemble_unary_op(stream, "decsz", reg, src, indir, idx, BIT(opcode, 5));
|
||||
disassemble_unary_op(stream, "decsz", reg, src, indir, idx, util::BIT(opcode, 5));
|
||||
bytes |= STEP_OVER | (1 << OVERINSTSHIFT);
|
||||
break;
|
||||
|
||||
@ -603,7 +603,7 @@ offs_t hpc_disassembler::disassemble(std::ostream &stream, offs_t pc, const hpc_
|
||||
case 0xd6:
|
||||
case 0xe6:
|
||||
case 0xf6:
|
||||
disassemble_op(stream, dmode ? "ld" : "st", reg, src, imm, indir, idx, BIT(opcode, 5));
|
||||
disassemble_op(stream, dmode ? "ld" : "st", reg, src, imm, indir, idx, util::BIT(opcode, 5));
|
||||
break;
|
||||
|
||||
case 0x8d:
|
||||
@ -619,7 +619,7 @@ offs_t hpc_disassembler::disassemble(std::ostream &stream, offs_t pc, const hpc_
|
||||
case 0xd5:
|
||||
case 0xe5:
|
||||
case 0xf5:
|
||||
disassemble_op(stream, "x", reg, src, imm, indir, idx, BIT(opcode, 5));
|
||||
disassemble_op(stream, "x", reg, src, imm, indir, idx, util::BIT(opcode, 5));
|
||||
break;
|
||||
|
||||
case 0x94: case 0x95:
|
||||
@ -631,35 +631,35 @@ offs_t hpc_disassembler::disassemble(std::ostream &stream, offs_t pc, const hpc_
|
||||
break;
|
||||
|
||||
case 0x98: case 0xb8: case 0xd8: case 0xf8:
|
||||
disassemble_op(stream, "add", reg, src, imm, indir, idx, BIT(opcode, 5));
|
||||
disassemble_op(stream, "add", reg, src, imm, indir, idx, util::BIT(opcode, 5));
|
||||
break;
|
||||
|
||||
case 0x99: case 0xb9: case 0xd9: case 0xf9:
|
||||
disassemble_op(stream, "and", reg, src, imm, indir, idx, BIT(opcode, 5));
|
||||
disassemble_op(stream, "and", reg, src, imm, indir, idx, util::BIT(opcode, 5));
|
||||
break;
|
||||
|
||||
case 0x9a: case 0xba: case 0xda: case 0xfa:
|
||||
disassemble_op(stream, "or", reg, src, imm, indir, idx, BIT(opcode, 5));
|
||||
disassemble_op(stream, "or", reg, src, imm, indir, idx, util::BIT(opcode, 5));
|
||||
break;
|
||||
|
||||
case 0x9b: case 0xbb: case 0xdb: case 0xfb:
|
||||
disassemble_op(stream, "xor", reg, src, imm, indir, idx, BIT(opcode, 5));
|
||||
disassemble_op(stream, "xor", reg, src, imm, indir, idx, util::BIT(opcode, 5));
|
||||
break;
|
||||
|
||||
case 0x9c: case 0xbc: case 0xdc: case 0xfc:
|
||||
disassemble_op(stream, "ifeq", reg, src, imm, indir, idx, BIT(opcode, 5));
|
||||
disassemble_op(stream, "ifeq", reg, src, imm, indir, idx, util::BIT(opcode, 5));
|
||||
break;
|
||||
|
||||
case 0x9d: case 0xbd: case 0xdd: case 0xfd:
|
||||
disassemble_op(stream, "ifgt", reg, src, imm, indir, idx, BIT(opcode, 5));
|
||||
disassemble_op(stream, "ifgt", reg, src, imm, indir, idx, util::BIT(opcode, 5));
|
||||
break;
|
||||
|
||||
case 0x9e: case 0xbe: case 0xde: case 0xfe:
|
||||
disassemble_op(stream, "mult", reg, src, imm, indir, idx, BIT(opcode, 5));
|
||||
disassemble_op(stream, "mult", reg, src, imm, indir, idx, util::BIT(opcode, 5));
|
||||
break;
|
||||
|
||||
case 0x9f: case 0xbf: case 0xdf: case 0xff:
|
||||
disassemble_op(stream, "div", reg, src, imm, indir, idx, BIT(opcode, 5));
|
||||
disassemble_op(stream, "div", reg, src, imm, indir, idx, util::BIT(opcode, 5));
|
||||
break;
|
||||
|
||||
case 0xa7:
|
||||
@ -694,65 +694,65 @@ offs_t hpc_disassembler::disassemble(std::ostream &stream, offs_t pc, const hpc_
|
||||
case 0xc0: case 0xc2:
|
||||
case 0xe0: case 0xe2:
|
||||
util::stream_format(stream, "%-8sA,[B%c].%c", "lds",
|
||||
BIT(opcode, 1) ? '-' : '+',
|
||||
BIT(opcode, 5) ? 'w' : 'b');
|
||||
util::BIT(opcode, 1) ? '-' : '+',
|
||||
util::BIT(opcode, 5) ? 'w' : 'b');
|
||||
bytes |= STEP_OVER | (1 << OVERINSTSHIFT);
|
||||
break;
|
||||
|
||||
case 0xd0: case 0xd2:
|
||||
case 0xf0: case 0xf2:
|
||||
util::stream_format(stream, "%-8sA,[X%c].%c", "ld",
|
||||
BIT(opcode, 1) ? '-' : '+',
|
||||
BIT(opcode, 5) ? 'w' : 'b');
|
||||
util::BIT(opcode, 1) ? '-' : '+',
|
||||
util::BIT(opcode, 5) ? 'w' : 'b');
|
||||
break;
|
||||
|
||||
case 0xc1: case 0xc3:
|
||||
case 0xe1: case 0xe3:
|
||||
util::stream_format(stream, "%-8sA,[B%c].%c", "xs",
|
||||
BIT(opcode, 1) ? '-' : '+',
|
||||
BIT(opcode, 5) ? 'w' : 'b');
|
||||
util::BIT(opcode, 1) ? '-' : '+',
|
||||
util::BIT(opcode, 5) ? 'w' : 'b');
|
||||
bytes |= STEP_OVER | (1 << OVERINSTSHIFT);
|
||||
break;
|
||||
|
||||
case 0xd1: case 0xd3:
|
||||
case 0xf1: case 0xf3:
|
||||
util::stream_format(stream, "%-8sA,[X%c].%c", "x",
|
||||
BIT(opcode, 1) ? '-' : '+',
|
||||
BIT(opcode, 5) ? 'w' : 'b');
|
||||
util::BIT(opcode, 1) ? '-' : '+',
|
||||
util::BIT(opcode, 5) ? 'w' : 'b');
|
||||
break;
|
||||
|
||||
case 0xc7: case 0xe7:
|
||||
util::stream_format(stream, "%-8sA", BIT(opcode, 5) ? "shl" : "shr");
|
||||
util::stream_format(stream, "%-8sA", util::BIT(opcode, 5) ? "shl" : "shr");
|
||||
break;
|
||||
|
||||
case 0xd7: case 0xf7:
|
||||
util::stream_format(stream, "%-8sA", BIT(opcode, 5) ? "rlc" : "rrc");
|
||||
util::stream_format(stream, "%-8sA", util::BIT(opcode, 5) ? "rlc" : "rrc");
|
||||
break;
|
||||
|
||||
case 0xc8: case 0xe8:
|
||||
disassemble_op(stream, "adc", reg, src, imm, indir, idx, BIT(opcode, 5));
|
||||
disassemble_op(stream, "adc", reg, src, imm, indir, idx, util::BIT(opcode, 5));
|
||||
break;
|
||||
|
||||
case 0xc9: case 0xe9:
|
||||
disassemble_op(stream, "dadc", reg, src, imm, indir, idx, BIT(opcode, 5));
|
||||
disassemble_op(stream, "dadc", reg, src, imm, indir, idx, util::BIT(opcode, 5));
|
||||
break;
|
||||
|
||||
case 0xca: case 0xea:
|
||||
disassemble_op(stream, "dsubc", reg, src, imm, indir, idx, BIT(opcode, 5));
|
||||
disassemble_op(stream, "dsubc", reg, src, imm, indir, idx, util::BIT(opcode, 5));
|
||||
break;
|
||||
|
||||
case 0xcb: case 0xeb:
|
||||
disassemble_op(stream, "subc", reg, src, imm, indir, idx, BIT(opcode, 5));
|
||||
disassemble_op(stream, "subc", reg, src, imm, indir, idx, util::BIT(opcode, 5));
|
||||
break;
|
||||
|
||||
case 0xcc: case 0xec:
|
||||
stream << "jid";
|
||||
if (BIT(opcode, 5))
|
||||
if (util::BIT(opcode, 5))
|
||||
stream << "w";
|
||||
break;
|
||||
|
||||
case 0xcf: case 0xef:
|
||||
disassemble_op(stream, "divd", reg, src, imm, indir, idx, BIT(opcode, 5));
|
||||
disassemble_op(stream, "divd", reg, src, imm, indir, idx, util::BIT(opcode, 5));
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -271,7 +271,10 @@ NETDEV_ANALOG_CALLBACK_MEMBER(fixedfreq_device::update_composite_monochrome)
|
||||
int colv = (int) ((data - m_sync_threshold) * m_gain * 255.0);
|
||||
if (colv > 255)
|
||||
colv = 255;
|
||||
m_col = rgb_t(colv, colv, colv);
|
||||
if (colv < 0)
|
||||
m_col = rgb_t(255, 0, 0);
|
||||
else
|
||||
m_col = rgb_t(colv, colv, colv);
|
||||
}
|
||||
|
||||
NETDEV_ANALOG_CALLBACK_MEMBER(fixedfreq_device::update_red)
|
||||
|
@ -45,6 +45,7 @@ public:
|
||||
m_vsync = sync;
|
||||
m_vbackporch = backporch;
|
||||
}
|
||||
void set_horz_scale(int hscale) { m_hscale = hscale; }
|
||||
|
||||
// pre-defined configurations
|
||||
void set_mode_ntsc720() //ModeLine "720x480@30i" 13.5 720 736 799 858 480 486 492 525 interlace -hsync -vsync
|
||||
|
@ -147,7 +147,9 @@ namespace netlist
|
||||
{
|
||||
// FIXME: assumes GND is connected to 0V.
|
||||
|
||||
if (!m_RESET() && m_last_reset)
|
||||
const auto reset = m_RESET();
|
||||
|
||||
if (!reset && m_last_reset)
|
||||
{
|
||||
m_ff = false;
|
||||
}
|
||||
@ -163,7 +165,7 @@ namespace netlist
|
||||
m_ff = false;
|
||||
}
|
||||
|
||||
const bool out = (!m_RESET() ? false : m_ff);
|
||||
const bool out = (!reset ? false : m_ff);
|
||||
|
||||
if (m_last_out && !out)
|
||||
{
|
||||
@ -178,7 +180,7 @@ namespace netlist
|
||||
m_OUT.push(m_R1.m_P());
|
||||
m_RDIS.set_R(R_OFF);
|
||||
}
|
||||
m_last_reset = m_RESET();
|
||||
m_last_reset = reset;
|
||||
m_last_out = out;
|
||||
}
|
||||
|
||||
|
@ -12,6 +12,8 @@ static NETLIST_START(diode_models)
|
||||
NET_MODEL("D _(IS=1e-15 N=1)")
|
||||
|
||||
NET_MODEL("1N914 D(Is=2.52n Rs=.568 N=1.752 Cjo=4p M=.4 tt=20n Iave=200m Vpk=75 mfg=OnSemi type=silicon)")
|
||||
// FIXME: 1N916 currently only a copy of 1N914!
|
||||
NET_MODEL("1N916 D(Is=2.52n Rs=.568 N=1.752 Cjo=4p M=.4 tt=20n Iave=200m Vpk=75 mfg=OnSemi type=silicon)")
|
||||
NET_MODEL("1N4001 D(Is=14.11n N=1.984 Rs=33.89m Ikf=94.81 Xti=3 Eg=1.11 Cjo=25.89p M=.44 Vj=.3245 Fc=.5 Bv=75 Ibv=10u Tt=5.7u Iave=1 Vpk=50 mfg=GI type=silicon)")
|
||||
NET_MODEL("1N4148 D(Is=2.52n Rs=.568 N=1.752 Cjo=4p M=.4 tt=20n Iave=200m Vpk=75 mfg=OnSemi type=silicon)")
|
||||
NET_MODEL("1S1588 D(Is=2.52n Rs=.568 N=1.752 Cjo=4p M=.4 tt=20n Iave=200m Vpk=75)")
|
||||
|
@ -112,8 +112,8 @@ public:
|
||||
#define CHIP(n, t) TTL_ ## t ## _DIP(n)
|
||||
|
||||
#define OHM(x) x
|
||||
#define K_OHM(x) RES_K(X)
|
||||
#define M_OHM(x) RES_M(X)
|
||||
#define K_OHM(x) RES_K(x)
|
||||
#define M_OHM(x) RES_M(x)
|
||||
#define U_FARAD(x) CAP_U(x)
|
||||
#define N_FARAD(x) CAP_N(x)
|
||||
#define P_FARAD(x) CAP_P(x)
|
||||
@ -132,9 +132,9 @@ public:
|
||||
NET_C(name.6, name ## _R.1) \
|
||||
NET_C(name.6, name ## _C.1) \
|
||||
NET_C(name ## _R.2, V5) \
|
||||
NET_CSTR(# name "_C.2", "GND") \
|
||||
NET_C(name ## _C.2, GND) \
|
||||
NET_C(name.8, V5) \
|
||||
NET_CSTR(# name ".1", "GND")
|
||||
NET_C(name.1, GND)
|
||||
|
||||
#define CHIP_555_Astable(name, pdesc) \
|
||||
NE555_DIP(name) \
|
||||
@ -147,9 +147,9 @@ public:
|
||||
NET_C(name.6, name ## _C.1) \
|
||||
NET_C(name.2, name ## _C.1) \
|
||||
NET_C(name ## _R1.2, V5) \
|
||||
NET_CSTR(# name "_C.2", "GND") \
|
||||
NET_C(name ## _C.2, GND) \
|
||||
NET_C(name.8, V5) \
|
||||
NET_CSTR(# name ".1", "GND")
|
||||
NET_C(name.1, GND)
|
||||
|
||||
#define CHIP_9602_Mono(name, pdesc) \
|
||||
CHIP(# name, 9602) \
|
||||
@ -179,13 +179,13 @@ public:
|
||||
#define CHIP_INPUT_ACTIVE_LOW(name) \
|
||||
SWITCH2(name ## _SW) \
|
||||
NET_C(name ## _SW.1, V5) \
|
||||
NET_CSTR(# name "_SW.2", "GND") \
|
||||
NET_C(name ## _SW.2, GND) \
|
||||
ALIAS(name.1, name ## _SW.Q)
|
||||
|
||||
#define CHIP_INPUT_ACTIVE_HIGH(name) \
|
||||
SWITCH2(name ## _SW) \
|
||||
NET_C(name ## _SW.2, V5) \
|
||||
NET_CSTR(# name "_SW.1", "GND") \
|
||||
NET_C(name ## _SW.1, GND) \
|
||||
ALIAS(name.1, name ## _SW.Q)
|
||||
|
||||
#define CHIP_LATCH(name) \
|
||||
|
@ -58,10 +58,12 @@ TODO: Superpong is believed to use the Pong (Rev E) PCB with some minor modifica
|
||||
#include "machine/nl_breakout.h"
|
||||
#include "machine/nl_pong.h"
|
||||
#include "machine/nl_pongd.h"
|
||||
#include "machine/nl_rebound.h"
|
||||
|
||||
#include "screen.h"
|
||||
#include "speaker.h"
|
||||
|
||||
#include "rebound.lh"
|
||||
#include "breakout.lh"
|
||||
|
||||
#include <cmath>
|
||||
@ -115,13 +117,6 @@ TODO: Superpong is believed to use the Pong (Rev E) PCB with some minor modifica
|
||||
#define V_TOTAL_BREAKOUT (0xFC) // 252
|
||||
#define H_TOTAL_BREAKOUT (448) // 448
|
||||
|
||||
#if 0
|
||||
#define HBSTART (H_TOTAL_PONG)
|
||||
#define HBEND (80)
|
||||
#define VBSTART (V_TOTAL_PONG)
|
||||
#define VBEND (16)
|
||||
#endif
|
||||
|
||||
enum input_changed_enum
|
||||
{
|
||||
IC_PADDLE1,
|
||||
@ -269,15 +264,56 @@ private:
|
||||
|
||||
};
|
||||
|
||||
#if 0
|
||||
static NETLIST_START(pong)
|
||||
class rebound_state : public ttl_mono_state
|
||||
{
|
||||
public:
|
||||
rebound_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: ttl_mono_state(mconfig, type, tag)
|
||||
, m_sw1a(*this, "maincpu:dsw1a")
|
||||
, m_sw1b(*this, "maincpu:dsw1b")
|
||||
{
|
||||
}
|
||||
|
||||
MEMREGION_SOURCE("maincpu")
|
||||
PARAM(NETLIST.USE_DEACTIVATE, 1)
|
||||
INCLUDE(pong_schematics)
|
||||
// sub devices
|
||||
required_device<netlist_mame_logic_input_device> m_sw1a;
|
||||
required_device<netlist_mame_logic_input_device> m_sw1b;
|
||||
|
||||
DECLARE_INPUT_CHANGED_MEMBER(input_changed);
|
||||
|
||||
NETDEV_ANALOG_CALLBACK_MEMBER(led_credit_cb)
|
||||
{
|
||||
output().set_value("credit_led", (data < 3.5) ? 1 : 0);
|
||||
}
|
||||
|
||||
NETDEV_ANALOG_CALLBACK_MEMBER(coin_counter_cb)
|
||||
{
|
||||
machine().bookkeeping().coin_counter_w(0, (data < 1.0));
|
||||
}
|
||||
|
||||
void rebound(machine_config &config);
|
||||
|
||||
NETLIST_START(rebound)
|
||||
|
||||
//MEMREGION_SOURCE("maincpu")
|
||||
LOCAL_SOURCE(rebound_schematics)
|
||||
PARAM(NETLIST.USE_DEACTIVATE, 1)
|
||||
//FIXME: unknown name causes segmentation fault
|
||||
//INCLUDE(rebound)
|
||||
INCLUDE(rebound_schematics)
|
||||
|
||||
NETLIST_END()
|
||||
|
||||
protected:
|
||||
|
||||
// driver_device overrides
|
||||
virtual void machine_start() override { };
|
||||
virtual void machine_reset() override { };
|
||||
virtual void video_start() override { };
|
||||
|
||||
private:
|
||||
|
||||
};
|
||||
|
||||
NETLIST_END()
|
||||
#endif
|
||||
|
||||
INPUT_CHANGED_MEMBER(pong_state::input_changed)
|
||||
{
|
||||
@ -292,6 +328,20 @@ INPUT_CHANGED_MEMBER(pong_state::input_changed)
|
||||
}
|
||||
}
|
||||
|
||||
INPUT_CHANGED_MEMBER(rebound_state::input_changed)
|
||||
{
|
||||
int numpad = uintptr_t(param);
|
||||
|
||||
switch (numpad)
|
||||
{
|
||||
case IC_SWITCH:
|
||||
m_sw1a->write(newval ? 1 : 0);
|
||||
m_sw1b->write(newval ? 1 : 0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static INPUT_PORTS_START( pong )
|
||||
PORT_START( "PADDLE0" ) /* fake input port for player 1 paddle */
|
||||
PORT_BIT( 0xff, 0x00, IPT_PADDLE ) PORT_SENSITIVITY(2) PORT_KEYDELTA(100) PORT_CENTERDELTA(0) NETLIST_ANALOG_PORT_CHANGED("maincpu", "pot0")
|
||||
@ -386,6 +436,30 @@ static INPUT_PORTS_START( breakout )
|
||||
|
||||
INPUT_PORTS_END
|
||||
|
||||
static INPUT_PORTS_START( rebound )
|
||||
// FIXME later
|
||||
PORT_START( "PADDLE0" ) /* fake input port for player 1 paddle */
|
||||
PORT_BIT( 0xff, 0x00, IPT_PADDLE ) PORT_SENSITIVITY(1) PORT_KEYDELTA(100) PORT_CENTERDELTA(0) NETLIST_ANALOG_PORT_CHANGED("maincpu", "pot1")
|
||||
|
||||
PORT_START( "PADDLE1" ) /* fake input port for player 2 paddle */
|
||||
PORT_BIT( 0xff, 0x00, IPT_PADDLE ) PORT_SENSITIVITY(1) PORT_KEYDELTA(100) PORT_CENTERDELTA(0) PORT_PLAYER(2) NETLIST_ANALOG_PORT_CHANGED("maincpu", "pot2")
|
||||
|
||||
PORT_START("IN0") /* fake as well */
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) NETLIST_LOGIC_PORT_CHANGED("maincpu", "coinsw")
|
||||
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START1 ) NETLIST_LOGIC_PORT_CHANGED("maincpu", "startsw")
|
||||
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_NAME("Antenna") NETLIST_LOGIC_PORT_CHANGED("maincpu", "antenna")
|
||||
|
||||
PORT_START("DIPS")
|
||||
PORT_DIPNAME( 0x03, 0x00, "Game Won" ) PORT_DIPLOCATION("SW1A:1,SW1A:2") PORT_CHANGED_MEMBER(DEVICE_SELF, rebound_state, input_changed, IC_SWITCH)
|
||||
PORT_DIPSETTING( 0x00, "11" )
|
||||
PORT_DIPSETTING( 0x03, "15" )
|
||||
|
||||
PORT_DIPNAME( 0x04, 0x00, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW1A:3") NETLIST_LOGIC_PORT_CHANGED("maincpu", "dsw2")
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) )
|
||||
PORT_DIPSETTING( 0x04, DEF_STR( 1C_2C ) )
|
||||
INPUT_PORTS_END
|
||||
|
||||
|
||||
MACHINE_CONFIG_START(pong_state::pong)
|
||||
|
||||
/* basic machine hardware */
|
||||
@ -502,6 +576,7 @@ MACHINE_CONFIG_START(pong_state::pongd)
|
||||
MCFG_NETLIST_LOGIC_INPUT("maincpu", "sw1b", "DIPSW2.POS", 0)
|
||||
MCFG_NETLIST_LOGIC_INPUT("maincpu", "coinsw", "COIN_SW.POS", 0)
|
||||
MCFG_NETLIST_LOGIC_INPUT("maincpu", "startsw", "START_SW.POS", 0)
|
||||
|
||||
#if 0
|
||||
MCFG_NETLIST_LOGIC_INPUT("maincpu", "antenna", "antenna.IN", 0, 0x01)
|
||||
#endif
|
||||
@ -526,6 +601,53 @@ MACHINE_CONFIG_START(pong_state::pongd)
|
||||
vref.add_route(0, "dac", -1.0, DAC_VREF_NEG_INPUT);
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
MACHINE_CONFIG_START(rebound_state::rebound)
|
||||
|
||||
/* basic machine hardware */
|
||||
MCFG_DEVICE_ADD("maincpu", NETLIST_CPU, NETLIST_CLOCK)
|
||||
MCFG_NETLIST_SETUP(rebound_schematics)
|
||||
//FIXME: doesn't work - segmentation fault
|
||||
//MCFG_NETLIST_SETUP_MEMBER(this, &rebound_state::NETLIST_NAME(rebound))
|
||||
|
||||
// FIXME: Later
|
||||
MCFG_NETLIST_ANALOG_INPUT("maincpu", "pot1", "POTP1.DIAL")
|
||||
MCFG_NETLIST_ANALOG_INPUT("maincpu", "pot2", "POTP2.DIAL")
|
||||
MCFG_NETLIST_LOGIC_INPUT("maincpu", "antenna", "antenna.IN", 0)
|
||||
MCFG_NETLIST_LOGIC_INPUT("maincpu", "coinsw", "COIN1_SW.POS", 0)
|
||||
MCFG_NETLIST_LOGIC_INPUT("maincpu", "startsw", "START_SW.POS", 0)
|
||||
|
||||
MCFG_NETLIST_LOGIC_INPUT("maincpu", "dsw1a", "DSW1a.POS", 0)
|
||||
MCFG_NETLIST_LOGIC_INPUT("maincpu", "dsw1b", "DSW1b.POS", 0)
|
||||
MCFG_NETLIST_LOGIC_INPUT("maincpu", "dsw2", "DSW2.POS", 0)
|
||||
|
||||
MCFG_NETLIST_ANALOG_OUTPUT("maincpu", "snd0", "sound", rebound_state, sound_cb, "")
|
||||
MCFG_NETLIST_ANALOG_OUTPUT("maincpu", "vid0", "videomix", fixedfreq_device, update_composite_monochrome, "fixfreq")
|
||||
|
||||
MCFG_NETLIST_ANALOG_OUTPUT("maincpu", "led_credit", "CON11", rebound_state, led_credit_cb, "")
|
||||
MCFG_NETLIST_ANALOG_OUTPUT("maincpu", "coin_counter", "CON10", rebound_state, coin_counter_cb, "")
|
||||
|
||||
/* video hardware */
|
||||
SCREEN(config, "screen", SCREEN_TYPE_RASTER);
|
||||
FIXFREQ(config, m_video).set_screen("screen");
|
||||
m_video->set_monitor_clock(MASTER_CLOCK);
|
||||
//m_video->set_horz_params(H_TOTAL_PONG-67,H_TOTAL_PONG-40,H_TOTAL_PONG-8,H_TOTAL_PONG);
|
||||
m_video->set_horz_params(H_TOTAL_PONG-51,H_TOTAL_PONG-40,H_TOTAL_PONG-8,H_TOTAL_PONG);
|
||||
m_video->set_vert_params(V_TOTAL_PONG-22,V_TOTAL_PONG-19,V_TOTAL_PONG-12,V_TOTAL_PONG);
|
||||
m_video->set_fieldcount(1);
|
||||
m_video->set_threshold(1.0);
|
||||
m_video->set_gain(0.6);
|
||||
m_video->set_horz_scale(2);
|
||||
|
||||
/* sound hardware */
|
||||
SPEAKER(config, "speaker").front_center();
|
||||
//FIXME: this is not related to reality at all.
|
||||
DAC_16BIT_R2R_TWOS_COMPLEMENT(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.5); // unknown DAC
|
||||
voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
|
||||
vref.add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT);
|
||||
vref.add_route(0, "dac", -1.0, DAC_VREF_NEG_INPUT);
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
|
||||
Game driver(s)
|
||||
@ -549,6 +671,10 @@ ROM_START( pongd ) /* dummy to satisfy game entry*/
|
||||
ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASE00 )
|
||||
ROM_END
|
||||
|
||||
ROM_START( rebound ) /* dummy to satisfy game entry*/
|
||||
ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASE00 )
|
||||
ROM_END
|
||||
|
||||
/* // 100% TTL - NO ROMS
|
||||
|
||||
ROM_START( pongbarl ) // dummy to satisfy game entry
|
||||
@ -591,6 +717,7 @@ ROM_END
|
||||
GAME( 1972, pong, 0, pong, pong, pong_state, empty_init, ROT0, "Atari", "Pong (Rev E) external [TTL]", MACHINE_SUPPORTS_SAVE)
|
||||
GAME( 1972, pongf, 0, pongf, pong, pong_state, empty_init, ROT0, "Atari", "Pong (Rev E) [TTL]", MACHINE_SUPPORTS_SAVE)
|
||||
GAME( 1973, pongd, 0, pongd, pongd, pong_state, empty_init, ROT0, "Atari", "Pong Doubles [TTL]", MACHINE_SUPPORTS_SAVE)
|
||||
GAMEL( 1974, rebound, 0, rebound, rebound, rebound_state, empty_init, ROT0, "Atari", "Rebound (Rev B) [TTL]", MACHINE_SUPPORTS_SAVE, layout_rebound)
|
||||
GAMEL( 1976, breakout, 0, breakout, breakout, breakout_state, empty_init, ROT90, "Atari", "Breakout [TTL]", MACHINE_SUPPORTS_SAVE, layout_breakout)
|
||||
|
||||
// 100% TTL
|
||||
|
23
src/mame/layout/rebound.lay
Normal file
23
src/mame/layout/rebound.lay
Normal file
@ -0,0 +1,23 @@
|
||||
<?xml version="1.0"?>
|
||||
<mamelayout version="2">
|
||||
|
||||
<element name="credit_led" defstate="0">
|
||||
<disk state="1">
|
||||
<color red="1.0" green="0.3" blue="0.3" />
|
||||
</disk>
|
||||
<text string="CREDIT" state="1">
|
||||
<color red="0.0" green="0.0" blue="0.0" />
|
||||
<bounds x="0" y="0.1" width="1" height="0.8" />
|
||||
</text>
|
||||
</element>
|
||||
|
||||
|
||||
<view name="Credit Led Overlay">
|
||||
<screen index="0">
|
||||
<bounds left="0" top="0" right="4" bottom="3" />
|
||||
</screen>
|
||||
<bezel name="credit_led" element="credit_led">
|
||||
<bounds x="0.1" y="0.1" width="0.2" height="0.2" />
|
||||
</bezel>
|
||||
</view>
|
||||
</mamelayout>
|
1272
src/mame/machine/nl_rebound.cpp
Normal file
1272
src/mame/machine/nl_rebound.cpp
Normal file
File diff suppressed because it is too large
Load Diff
4
src/mame/machine/nl_rebound.h
Normal file
4
src/mame/machine/nl_rebound.h
Normal file
@ -0,0 +1,4 @@
|
||||
// license:GPL-2.0+
|
||||
// copyright-holders: Couriersud
|
||||
|
||||
NETLIST_EXTERNAL(rebound_schematics)
|
@ -83,7 +83,7 @@ stuntcyc // (c) 1976 Atari
|
||||
// Atari TTL Missing Rom Dumps
|
||||
//astrotrf // (c) 1975 Atari
|
||||
//lemans // (c) 1974 Atari
|
||||
//gtrak10 // (c) 1974 Atari / Kee
|
||||
gtrak10 // (c) 1974 Atari / Kee
|
||||
//gtrak20 // (c) 1976 Atari / Kee
|
||||
//qwak // (c) 1974 Atari
|
||||
// Atari 100% TTL
|
||||
@ -98,7 +98,6 @@ stuntcyc // (c) 1976 Atari
|
||||
//pinpong // (c) 1974 Atari
|
||||
//pursuit // (c) 1975 Atari / Kee
|
||||
//quadpong // (c) 1974 Atari
|
||||
//rebound // (c) 1974 Atari / Kee
|
||||
//spacrace // (c) 1973 Atari
|
||||
//touchme // (c) 1974 Atari
|
||||
//worldcup // (c) 1974 Atari
|
||||
@ -108,6 +107,7 @@ breakout // (c) 1976 Atari
|
||||
pong // (c) 1972 Atari
|
||||
pongd // (c) 1973 Atari
|
||||
pongf // (c) 1972 Atari
|
||||
rebound // (c) 1974 Atari
|
||||
//coupedav // (c) 1973 Atari France
|
||||
//pongbarl // (c) 1973 Atari
|
||||
//cktpong // (c) 1974 Atari / National Entertainment Co.
|
||||
|
Loading…
Reference in New Issue
Block a user