Tie up a few loose ends in drivers:

neogeo.cpp: Added newer Universe BIOS versions to irrmaze - this allows
the Japanese version to be seen by switching the region, and joystick
play using a cheat (although 2.3 and later also support trackball play,
a joystick is still required for setup and to use the in-game menu).
Also changed roboarma to roboarmya, as this matches the software list,
and we prefer to make clone set names using suffixes.

neogeo.xml: Added irrmaze with usage note explaining that newer
Universe BIOS versions support joystick play as a cheat (must be enabled
each session - Universe BIOS does not save cheat state to NVRAM).

lwriter.cpp: Got rid of a couple of literal tags, make use of Allman
style a bit more consistent, and got rid of a redundant part of a
bitwise or expression.

runaway.cpp: Merged video code into main driver file, split state
classes, reduced a bit of redundancy, eliminated runtime input tag
lookups, and generally tidied up code.

dai3wksi.cpp: Noted manufacture in description for runaways.
This commit is contained in:
Vas Crabb 2021-07-21 01:12:43 +10:00
parent 5bb6a786a8
commit 1d106ea414
11 changed files with 380 additions and 340 deletions

View File

@ -6924,7 +6924,37 @@ license:CC0
. ??M-2360
NEO-MVS PROGBK1 / NEO-MVS CHA512Y
-->
<!-- Irritating Maze requires a Custom BIOS and controller -->
<software name="irrmaze">
<description>The Irritating Maze/ Ultra Denryu Iraira Bou</description>
<year>1997</year>
<publisher>SNK / Saurus</publisher>
<info name="serial" value="??M-2360"/>
<info name="alt_title" value="ウルトラ電流イライラ棒"/>
<info name="usage" value="Universe BIOS 2.2 and later support joystick play as a cheat." />
<sharedfeat name="release" value="MVS" /> <!-- MVS ONLY RELEASE -->
<sharedfeat name="compatibility" value="MVS" />
<part name="cart" interface="neo_cart">
<dataarea name="maincpu" width="16" endianness="big" size="0x200000">
<rom loadflag="load16_word_swap" name="236-p1.p1" offset="0x100000" size="0x100000" crc="4c2ff660" sha1="4a0cbd09044648ff9ec67723729f16d422c34bda" /> <!-- TC5316200 -->
<rom loadflag="continue" offset="0x000000" size="0x100000" />
</dataarea>
<dataarea name="fixed" size="0x040000">
<rom offset="0x000000" size="0x020000" name="236-s1.s1" crc="5d1ca640" sha1="40a9668a1742a44597a07ce72273d17119815637" /> <!-- TC531000 -->
</dataarea>
<dataarea name="audiocpu" size="0x020000">
<rom offset="0x000000" size="0x020000" name="236-m1.m1" crc="880a1abd" sha1="905afa157aba700e798243b842792e50729b19a0" /> <!-- TC531001 -->
</dataarea>
<dataarea name="ymsnd:adpcma" size="0x300000">
<rom offset="0x000000" size="0x200000" name="236-v1.v1" crc="5f89c3b4" sha1="dc8fd561cf8dfdd41696dcf14ea8d2d0ac4eec4b" /> <!-- TC5316200 -->
<rom offset="0x200000" size="0x100000" name="236-v2.v2" crc="72e3add7" sha1="dc49f05274693255416d2e41ecc088027b798eb9" /> <!-- TC538200 -->
</dataarea>
<dataarea name="sprites" size="0x800000">
<rom loadflag="load16_byte" offset="0x000000" size="0x400000" name="236-c1.c1" crc="c1d47902" sha1="727001c34f979226fc8f581113ce2aaac4fc0d42" /> <!-- Plane 0,1 --> <!-- TC5332205 -->
<rom loadflag="load16_byte" offset="0x000001" size="0x400000" name="236-c2.c2" crc="e15f972e" sha1="6a329559c57a67be73a6733513b59e9e6c8d61cc" /> <!-- Plane 2,3 --> <!-- TC5332205 -->
</dataarea>
</part>
</software>
<!--

View File

@ -1324,8 +1324,6 @@ files {
MAME_DIR .. "src/mame/includes/relief.h",
MAME_DIR .. "src/mame/video/relief.cpp",
MAME_DIR .. "src/mame/drivers/runaway.cpp",
MAME_DIR .. "src/mame/includes/runaway.h",
MAME_DIR .. "src/mame/video/runaway.cpp",
MAME_DIR .. "src/mame/drivers/sbrkout.cpp",
MAME_DIR .. "src/mame/drivers/shuuz.cpp",
MAME_DIR .. "src/mame/includes/shuuz.h",

View File

@ -200,6 +200,12 @@ void neogeo_arc_edge(device_slot_interface &device)
device.option_add("joy", NEOGEO_JOY_AC);
}
void neogeo_arc_edge_irrmaze(device_slot_interface &device)
{
device.option_add("joy", NEOGEO_JOY_AC);
device.option_add("irrmaze", NEOGEO_IRRMAZE);
}
void neogeo_arc_edge_fixed(device_slot_interface &device)
{
device.option_add("joy", NEOGEO_JOY_AC);

View File

@ -117,6 +117,7 @@ DECLARE_DEVICE_TYPE(NEOGEO_CTRL_EDGE_CONNECTOR, neogeo_ctrl_edge_port_device)
void neogeo_controls(device_slot_interface &device);
void neogeo_arc_edge(device_slot_interface &device);
void neogeo_arc_edge_irrmaze(device_slot_interface &device);
void neogeo_arc_edge_fixed(device_slot_interface &device);
void neogeo_arc_pin15(device_slot_interface &device);

View File

@ -715,7 +715,7 @@ ROM_END
*
*************************************/
GAME( 1979, runaways, 0, dai3wksi, runaways, dai3wksi_state, empty_init, ROT270, "Sun Electronics", "Runaway (Japan)", MACHINE_WRONG_COLORS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
GAME( 1979, runaways, 0, dai3wksi, runaways, dai3wksi_state, empty_init, ROT270, "Sun Electronics", "Runaway (Sun Electronics, Japan)", MACHINE_WRONG_COLORS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
GAME( 1979, dai3wksi, 0, dai3wksi, dai3wksi, dai3wksi_state, empty_init, ROT270, "Sun Electronics", "Dai 3 Wakusei (Japan)", MACHINE_IMPERFECT_COLORS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )

View File

@ -92,11 +92,15 @@
*/
#include "emu.h"
#include "cpu/m68000/m68000.h"
#include "bus/rs232/rs232.h"
#include "cpu/m68000/m68000.h"
#include "machine/6522via.h"
#include "machine/z80scc.h"
namespace {
enum print_state {
READING_CMD,
WRITING_RESULT
@ -230,11 +234,11 @@ void lwriter_state::maincpu_map(address_map &map)
map(0x000000, 0x1fffff).rw(FUNC(lwriter_state::bankedarea_r), FUNC(lwriter_state::bankedarea_w));
map(0x200000, 0x2fffff).rom().region("rom", 0); // 1MB ROM
//map(0x300000, 0x3fffff) // open bus?
map(0x400000, 0x5fffff).ram().share("dram"); // 2MB DRAM
map(0x400000, 0x5fffff).ram().share(m_dram_ptr); // 2MB DRAM
// DRAM appears to mirrored through 0x600000 but when written to does a bitwise-or with the existing data
// instead of replacing it. This presumeably improves the performance of these operations by avoiding
// an extra memory read.
map(0x600000, 0x7fffff).readonly().share("dram").w(FUNC(lwriter_state::dram_or_w));
map(0x600000, 0x7fffff).readonly().share(m_dram_ptr).w(FUNC(lwriter_state::dram_or_w));
map(0x800000, 0x800000).w(FUNC(lwriter_state::led_out_w)).mirror(0x1ffffe); // mirror is a guess given that the pals can only decode A18-A23
map(0x800001, 0x800001).w(FUNC(lwriter_state::fifo_out_w)).mirror(0x1ffffe); // mirror is a guess given that the pals can only decode A18-A23
map(0xc00001, 0xc00001).w(m_scc, FUNC(scc8530_device::cb_w)).mirror(0x1ffff8);
@ -292,7 +296,7 @@ uint16_t lwriter_state::bankedarea_r(offs_t offset)
if ((offset > 0x7ff) && !machine().side_effects_disabled()) { logerror("Attempt to read banked area (with overlay off) past end of SRAM from offset %08X!\n",offset<<1); }
return m_sram_ptr[offset&0x7FF];
}
if(!machine().side_effects_disabled()) { logerror("Attempt to read banked area (with overlay off) past end of SRAM from offset %08X! Returning 0xFFFF!\n",offset<<1); }
if (!machine().side_effects_disabled()) { logerror("Attempt to read banked area (with overlay off) past end of SRAM from offset %08X! Returning 0xFFFF!\n",offset<<1); }
return 0xFFFF;
}
@ -309,24 +313,25 @@ void lwriter_state::bankedarea_w(offs_t offset, uint16_t data, uint16_t mem_mask
COMBINE_DATA(&m_sram_ptr[offset&0x7FF]);
return;
}
if(!machine().side_effects_disabled()) { logerror("Attempt to write banked area (with overlay off) with data %04X to offset %08X IGNORED!\n", data, offset<<1); }
if (!machine().side_effects_disabled()) { logerror("Attempt to write banked area (with overlay off) with data %04X to offset %08X IGNORED!\n", data, offset<<1); }
}
void lwriter_state::dram_or_w(offs_t offset, uint16_t data, uint16_t mem_mask)
{
m_dram_ptr[offset] |= ((m_dram_ptr[offset] & ~mem_mask) | (data & mem_mask));
m_dram_ptr[offset] |= data & mem_mask;
}
uint8_t lwriter_state::eeprom_r(offs_t offset)
{
uint8_t result = 0;
// adjust offset to match real hardware mapping
switch (offset) {
switch (offset)
{
case 0x80:
case 0x81:
case 0x82:
case 0x83: {
uint8_t signature[] = {0x7a, 0x53, 0xda, 0x71};
constexpr uint8_t signature[] = {0x7a, 0x53, 0xda, 0x71};
result = signature[offset-0x80];
break;
}
@ -376,7 +381,8 @@ uint8_t lwriter_state::via_pa_r()
{
logerror(" VIA: Port A read!\n");
uint8_t result = m_dsw1->read();
if (m_sbsy) {
if (m_sbsy)
{
result |= 2;
}
result |= (m_print_sc << 7);
@ -455,25 +461,30 @@ WRITE_LINE_MEMBER(lwriter_state::scc_int)
#define EC7 0x4f
#define EC14 0x5d
void lwriter_state::write_dtr(int state) {
void lwriter_state::write_dtr(int state)
{
// DTR seems to be used as a clock for communication with
// the print controller. We arbitrarily choose state == 1
// to run our code
if (state == 1 && (m_cbsy || m_sbsy)) {
if (state == 1 && (m_cbsy || m_sbsy))
{
logerror("pb line %d %d %d!\n", m_via_pb & 1, m_print_state, m_print_bit);
switch (m_print_state) {
switch (m_print_state)
{
case READING_CMD: {
m_print_cmd <<= 1;
m_print_cmd |= (m_via_pb & 1);
m_print_bit += 1;
if (m_print_bit == 8) {
if (m_print_bit == 8)
{
logerror("PRINT_CMD %x!\n", m_print_cmd);
m_print_bit = 0;
m_print_state = WRITING_RESULT;
m_sbsy = true;
// The status messages have odd parity in the high bit
// right now we just manually make sure that's true.
switch (m_print_cmd) {
switch (m_print_cmd)
{
case SR1:
case SR2:
case SR4:
@ -495,7 +506,8 @@ void lwriter_state::write_dtr(int state) {
m_print_sc = m_print_result & 0x1;
m_print_result >>= 1;
m_print_bit += 1;
if (m_print_bit == 8) {
if (m_print_bit == 8)
{
logerror("PRINT_RESULT!\n");
m_print_bit = 0;
m_print_state = READING_CMD;
@ -523,16 +535,16 @@ void lwriter_state::lwriter(machine_config &config)
m_scc->out_dtrb_callback().set(FUNC(lwriter_state::write_dtr));
m_scc->out_rtsb_callback().set("rs232b", FUNC(rs232_port_device::write_rts));
/* Interrupt */
m_scc->out_int_callback().set("via", FUNC(via6522_device::write_ca1));
m_scc->out_int_callback().set(m_via, FUNC(via6522_device::write_ca1));
//m_scc->out_int_callback().set(FUNC(lwriter_state::scc_int));
rs232_port_device &rs232a(RS232_PORT(config, "rs232a", default_rs232_devices, "terminal"));
rs232a.rxd_handler().set("scc", FUNC(scc8530_device::rxa_w));
rs232a.cts_handler().set("scc", FUNC(scc8530_device::ctsa_w));
rs232a.rxd_handler().set(m_scc, FUNC(scc8530_device::rxa_w));
rs232a.cts_handler().set(m_scc, FUNC(scc8530_device::ctsa_w));
rs232_port_device &rs232b(RS232_PORT(config, "rs232b", default_rs232_devices, "terminal"));
rs232b.rxd_handler().set("scc", FUNC(scc8530_device::rxb_w));
rs232b.cts_handler().set("scc", FUNC(scc8530_device::ctsb_w));
rs232b.rxd_handler().set(m_scc, FUNC(scc8530_device::rxb_w));
rs232b.cts_handler().set(m_scc, FUNC(scc8530_device::ctsb_w));
R65NC22(config, m_via, CPU_CLK/10); // 68000 E clock presumed
m_via->readpa_handler().set(FUNC(lwriter_state::via_pa_r));
@ -591,5 +603,7 @@ ROM_START(lwriter)
ROM_END
} // anonymous namespace
/* YEAR NAME PARENT COMPAT MACHINE INPUT STATE INIT COMPANY FULLNAME FLAGS */
CONS( 1988, lwriter, 0, 0, lwriter, lwriter, lwriter_state, empty_init, "Apple Computer", "Apple Laser Writer II NT", MACHINE_IS_SKELETON)

View File

@ -2198,38 +2198,39 @@ void aes_state::aes_ntsc(machine_config &config)
#define ROM_LOAD16_WORD_SWAP_BIOS(bios,name,offset,length,hash) \
ROMX_LOAD(name, offset, length, hash, ROM_GROUPWORD | ROM_REVERSE | ROM_BIOS(bios))
#define NEOGEO_UNIBIOS(x) \
ROM_SYSTEM_BIOS( x+ 0, "unibios40", "Universe Bios (Hack, Ver. 4.0)" ) \
ROM_LOAD16_WORD_SWAP_BIOS( x+ 0, "uni-bios_4_0.rom", 0x00000, 0x020000, CRC(a7aab458) SHA1(938a0bda7d9a357240718c2cec319878d36b8f72) ) /* Universe Bios v4.0 (hack) */ \
ROM_SYSTEM_BIOS( x+ 1, "unibios33", "Universe Bios (Hack, Ver. 3.3)" ) \
ROM_LOAD16_WORD_SWAP_BIOS( x+ 1, "uni-bios_3_3.rom", 0x00000, 0x020000, CRC(24858466) SHA1(0ad92efb0c2338426635e0159d1f60b4473d0785) ) /* Universe Bios v3.3 (hack) */ \
ROM_SYSTEM_BIOS( x+ 2, "unibios32", "Universe Bios (Hack, Ver. 3.2)" ) \
ROM_LOAD16_WORD_SWAP_BIOS( x+ 2, "uni-bios_3_2.rom", 0x00000, 0x020000, CRC(a4e8b9b3) SHA1(c92f18c3f1edda543d264ecd0ea915240e7c8258) ) /* Universe Bios v3.2 (hack) */ \
ROM_SYSTEM_BIOS( x+ 3, "unibios31", "Universe Bios (Hack, Ver. 3.1)" ) \
ROM_LOAD16_WORD_SWAP_BIOS( x+ 3, "uni-bios_3_1.rom", 0x00000, 0x020000, CRC(0c58093f) SHA1(29329a3448c2505e1ff45ffa75e61e9693165153) ) /* Universe Bios v3.1 (hack) */ \
ROM_SYSTEM_BIOS( x+ 4, "unibios30", "Universe Bios (Hack, Ver. 3.0)" ) \
ROM_LOAD16_WORD_SWAP_BIOS( x+ 4, "uni-bios_3_0.rom", 0x00000, 0x020000, CRC(a97c89a9) SHA1(97a5eff3b119062f10e31ad6f04fe4b90d366e7f) ) /* Universe Bios v3.0 (hack) */ \
ROM_SYSTEM_BIOS( x+ 5, "unibios23", "Universe Bios (Hack, Ver. 2.3)" ) \
ROM_LOAD16_WORD_SWAP_BIOS( x+ 5, "uni-bios_2_3.rom", 0x00000, 0x020000, CRC(27664eb5) SHA1(5b02900a3ccf3df168bdcfc98458136fd2b92ac0) ) /* Universe Bios v2.3 (hack) */ \
ROM_SYSTEM_BIOS( x+ 6, "unibios23o", "Universe Bios (Hack, Ver. 2.3, older?)" ) \
ROM_LOAD16_WORD_SWAP_BIOS( x+ 6, "uni-bios_2_3o.rom", 0x00000, 0x020000, CRC(601720ae) SHA1(1b8a72c720cdb5ee3f1d735bbcf447b09204b8d9) ) /* Universe Bios v2.3 (hack) alt version, withdrawn? */ \
ROM_SYSTEM_BIOS( x+ 7, "unibios22", "Universe Bios (Hack, Ver. 2.2)" ) \
ROM_LOAD16_WORD_SWAP_BIOS( x+ 7, "uni-bios_2_2.rom", 0x00000, 0x020000, CRC(2d50996a) SHA1(5241a4fb0c63b1a23fd1da8efa9c9a9bd3b4279c) ) /* Universe Bios v2.2 (hack) */ \
ROM_SYSTEM_BIOS( x+ 8, "unibios21", "Universe Bios (Hack, Ver. 2.1)" ) \
ROM_LOAD16_WORD_SWAP_BIOS( x+ 8, "uni-bios_2_1.rom", 0x00000, 0x020000, CRC(8dabf76b) SHA1(c23732c4491d966cf0373c65c83c7a4e88f0082c) ) /* Universe Bios v2.1 (hack) */ \
ROM_SYSTEM_BIOS( x+ 9, "unibios20", "Universe Bios (Hack, Ver. 2.0)" ) \
ROM_LOAD16_WORD_SWAP_BIOS( x+ 9, "uni-bios_2_0.rom", 0x00000, 0x020000, CRC(0c12c2ad) SHA1(37bcd4d30f3892078b46841d895a6eff16dc921e) ) /* Universe Bios v2.0 (hack) */ \
ROM_SYSTEM_BIOS( x+10, "unibios13", "Universe Bios (Hack, Ver. 1.3)" ) \
ROM_LOAD16_WORD_SWAP_BIOS( x+10, "uni-bios_1_3.rom", 0x00000, 0x020000, CRC(b24b44a0) SHA1(eca8851d30557b97c309a0d9f4a9d20e5b14af4e) ) /* Universe Bios v1.3 (hack) */
#define NEOGEO_UNIBIOS_2_2_AND_NEWER(x) \
ROM_SYSTEM_BIOS( x+ 0, "unibios40", "Universe BIOS (Hack, Ver. 4.0)" ) \
ROM_LOAD16_WORD_SWAP_BIOS( x+ 0, "uni-bios_4_0.rom", 0x00000, 0x020000, CRC(a7aab458) SHA1(938a0bda7d9a357240718c2cec319878d36b8f72) ) /* Universe BIOS v4.0 (hack) */ \
ROM_SYSTEM_BIOS( x+ 1, "unibios33", "Universe BIOS (Hack, Ver. 3.3)" ) \
ROM_LOAD16_WORD_SWAP_BIOS( x+ 1, "uni-bios_3_3.rom", 0x00000, 0x020000, CRC(24858466) SHA1(0ad92efb0c2338426635e0159d1f60b4473d0785) ) /* Universe BIOS v3.3 (hack) */ \
ROM_SYSTEM_BIOS( x+ 2, "unibios32", "Universe BIOS (Hack, Ver. 3.2)" ) \
ROM_LOAD16_WORD_SWAP_BIOS( x+ 2, "uni-bios_3_2.rom", 0x00000, 0x020000, CRC(a4e8b9b3) SHA1(c92f18c3f1edda543d264ecd0ea915240e7c8258) ) /* Universe BIOS v3.2 (hack) */ \
ROM_SYSTEM_BIOS( x+ 3, "unibios31", "Universe BIOS (Hack, Ver. 3.1)" ) \
ROM_LOAD16_WORD_SWAP_BIOS( x+ 3, "uni-bios_3_1.rom", 0x00000, 0x020000, CRC(0c58093f) SHA1(29329a3448c2505e1ff45ffa75e61e9693165153) ) /* Universe BIOS v3.1 (hack) */ \
ROM_SYSTEM_BIOS( x+ 4, "unibios30", "Universe BIOS (Hack, Ver. 3.0)" ) \
ROM_LOAD16_WORD_SWAP_BIOS( x+ 4, "uni-bios_3_0.rom", 0x00000, 0x020000, CRC(a97c89a9) SHA1(97a5eff3b119062f10e31ad6f04fe4b90d366e7f) ) /* Universe BIOS v3.0 (hack) */ \
ROM_SYSTEM_BIOS( x+ 5, "unibios23", "Universe BIOS (Hack, Ver. 2.3)" ) \
ROM_LOAD16_WORD_SWAP_BIOS( x+ 5, "uni-bios_2_3.rom", 0x00000, 0x020000, CRC(27664eb5) SHA1(5b02900a3ccf3df168bdcfc98458136fd2b92ac0) ) /* Universe BIOS v2.3 (hack) */ \
ROM_SYSTEM_BIOS( x+ 6, "unibios23o", "Universe BIOS (Hack, Ver. 2.3, older?)" ) \
ROM_LOAD16_WORD_SWAP_BIOS( x+ 6, "uni-bios_2_3o.rom", 0x00000, 0x020000, CRC(601720ae) SHA1(1b8a72c720cdb5ee3f1d735bbcf447b09204b8d9) ) /* Universe BIOS v2.3 (hack) alt version, withdrawn? */ \
ROM_SYSTEM_BIOS( x+ 7, "unibios22", "Universe BIOS (Hack, Ver. 2.2)" ) \
ROM_LOAD16_WORD_SWAP_BIOS( x+ 7, "uni-bios_2_2.rom", 0x00000, 0x020000, CRC(2d50996a) SHA1(5241a4fb0c63b1a23fd1da8efa9c9a9bd3b4279c) ) /* Universe BIOS v2.2 (hack) */
#define NEOGEO_UNIBIOS_1_3_TO_2_1(x) \
ROM_SYSTEM_BIOS( x+ 8, "unibios21", "Universe BIOS (Hack, Ver. 2.1)" ) \
ROM_LOAD16_WORD_SWAP_BIOS( x+ 8, "uni-bios_2_1.rom", 0x00000, 0x020000, CRC(8dabf76b) SHA1(c23732c4491d966cf0373c65c83c7a4e88f0082c) ) /* Universe BIOS v2.1 (hack) */ \
ROM_SYSTEM_BIOS( x+ 9, "unibios20", "Universe BIOS (Hack, Ver. 2.0)" ) \
ROM_LOAD16_WORD_SWAP_BIOS( x+ 9, "uni-bios_2_0.rom", 0x00000, 0x020000, CRC(0c12c2ad) SHA1(37bcd4d30f3892078b46841d895a6eff16dc921e) ) /* Universe BIOS v2.0 (hack) */ \
ROM_SYSTEM_BIOS( x+10, "unibios13", "Universe BIOS (Hack, Ver. 1.3)" ) \
ROM_LOAD16_WORD_SWAP_BIOS( x+10, "uni-bios_1_3.rom", 0x00000, 0x020000, CRC(b24b44a0) SHA1(eca8851d30557b97c309a0d9f4a9d20e5b14af4e) ) /* Universe BIOS v1.3 (hack) */
#define NEOGEO_UNIBIOS_1_2_AND_OLDER(x) \
ROM_SYSTEM_BIOS( x+11, "unibios12", "Universe Bios (Hack, Ver. 1.2)" ) \
ROM_LOAD16_WORD_SWAP_BIOS( x+11, "uni-bios_1_2.rom", 0x00000, 0x020000, CRC(4fa698e9) SHA1(682e13ec1c42beaa2d04473967840c88fd52c75a) ) /* Universe Bios v1.2 (hack) */ \
ROM_SYSTEM_BIOS( x+12, "unibios12o", "Universe Bios (Hack, Ver. 1.2, older)" ) \
ROM_LOAD16_WORD_SWAP_BIOS( x+12, "uni-bios_1_2o.rom", 0x00000, 0x020000, CRC(e19d3ce9) SHA1(af88ef837f44a3af2d7144bb46a37c8512b67770) ) /* Universe Bios v1.2 (hack) alt version */ \
ROM_SYSTEM_BIOS( x+13, "unibios11", "Universe Bios (Hack, Ver. 1.1)" ) \
ROM_LOAD16_WORD_SWAP_BIOS( x+13, "uni-bios_1_1.rom", 0x00000, 0x020000, CRC(5dda0d84) SHA1(4153d533c02926a2577e49c32657214781ff29b7) ) /* Universe Bios v1.1 (hack) */ \
ROM_SYSTEM_BIOS( x+14, "unibios10", "Universe Bios (Hack, Ver. 1.0)" ) \
ROM_LOAD16_WORD_SWAP_BIOS( x+14, "uni-bios_1_0.rom", 0x00000, 0x020000, CRC(0ce453a0) SHA1(3b4c0cd26c176fc6b26c3a2f95143dd478f6abf9) ) /* Universe Bios v1.0 (hack) */
ROM_SYSTEM_BIOS( x+11, "unibios12", "Universe BIOS (Hack, Ver. 1.2)" ) \
ROM_LOAD16_WORD_SWAP_BIOS( x+11, "uni-bios_1_2.rom", 0x00000, 0x020000, CRC(4fa698e9) SHA1(682e13ec1c42beaa2d04473967840c88fd52c75a) ) /* Universe BIOS v1.2 (hack) */ \
ROM_SYSTEM_BIOS( x+12, "unibios12o", "Universe BIOS (Hack, Ver. 1.2, older)" ) \
ROM_LOAD16_WORD_SWAP_BIOS( x+12, "uni-bios_1_2o.rom", 0x00000, 0x020000, CRC(e19d3ce9) SHA1(af88ef837f44a3af2d7144bb46a37c8512b67770) ) /* Universe BIOS v1.2 (hack) alt version */ \
ROM_SYSTEM_BIOS( x+13, "unibios11", "Universe BIOS (Hack, Ver. 1.1)" ) \
ROM_LOAD16_WORD_SWAP_BIOS( x+13, "uni-bios_1_1.rom", 0x00000, 0x020000, CRC(5dda0d84) SHA1(4153d533c02926a2577e49c32657214781ff29b7) ) /* Universe BIOS v1.1 (hack) */ \
ROM_SYSTEM_BIOS( x+14, "unibios10", "Universe BIOS (Hack, Ver. 1.0)" ) \
ROM_LOAD16_WORD_SWAP_BIOS( x+14, "uni-bios_1_0.rom", 0x00000, 0x020000, CRC(0ce453a0) SHA1(3b4c0cd26c176fc6b26c3a2f95143dd478f6abf9) ) /* Universe BIOS v1.0 (hack) */
/* The number shown in the top right corner (only displayed on the colour test in early versions) should be connected to the revision, the actual numbering / naming here is a mess, possibly due to upgrades where stickers weren't replaced
The colour of the outside of the test grid appears to be connected to the region / cabinet type (most regions have a single colour, but for the US there are multiple colours, which seem to indicate defaults / intended cabinet type)
@ -2284,7 +2285,8 @@ void aes_state::aes_ntsc(machine_config &config)
ROM_SYSTEM_BIOS( 15, "japan-hotel", "Custom Japanese Hotel" ) \
ROM_LOAD16_WORD_SWAP_BIOS( 15, "sp-1v1_3db8c.bin", 0x00000, 0x020000, CRC(162f0ebe) SHA1(fe1c6dd3dfcf97d960065b1bb46c1e11cb7bf271) ) /* 6 Red - 'rare MVS found in japanese hotels' shows v1.3 in test mode */ \
\
NEOGEO_UNIBIOS(16) \
NEOGEO_UNIBIOS_2_2_AND_NEWER(16) \
NEOGEO_UNIBIOS_1_3_TO_2_1(16) \
NEOGEO_UNIBIOS_1_2_AND_OLDER(16)
@ -2397,12 +2399,13 @@ ROM_END
ROM_START( aes )
ROM_REGION16_BE( 0x20000, "mainbios", 0 )
ROM_SYSTEM_BIOS( 0, "asia", "Asia AES" )
ROM_LOAD16_WORD_SWAP_BIOS( 0, "neo-epo.bin", 0x00000, 0x020000, CRC(d27a71f1) SHA1(1b3b22092f30c4d1b2c15f04d1670eb1e9fbea07) ) // AES Console (Asia?) Bios
ROM_LOAD16_WORD_SWAP_BIOS( 0, "neo-epo.bin", 0x00000, 0x020000, CRC(d27a71f1) SHA1(1b3b22092f30c4d1b2c15f04d1670eb1e9fbea07) ) // AES Console (Asia?) BIOS
ROM_SYSTEM_BIOS( 1, "japan", "Japan AES" )
ROM_LOAD16_WORD_SWAP_BIOS( 1, "neo-po.bin", 0x00000, 0x020000, CRC(16d0c132) SHA1(4e4a440cae46f3889d20234aebd7f8d5f522e22c) ) // AES Console (Japan) Bios
ROM_LOAD16_WORD_SWAP_BIOS( 1, "neo-po.bin", 0x00000, 0x020000, CRC(16d0c132) SHA1(4e4a440cae46f3889d20234aebd7f8d5f522e22c) ) // AES Console (Japan) BIOS
ROM_SYSTEM_BIOS( 2, "devel", "Development System ROM" )
ROM_LOAD16_WORD_SWAP_BIOS( 2, "neodebug.rom", 0x00000, 0x020000, CRC(698ebb7d) SHA1(081c49aa8cc7dad5939833dc1b18338321ea0a07) ) // Official debug (development) ROM, for home-use base board
NEOGEO_UNIBIOS(3)
NEOGEO_UNIBIOS_2_2_AND_NEWER(3)
NEOGEO_UNIBIOS_1_3_TO_2_1(3)
ROM_REGION( 0x200000, "maincpu", ROMREGION_ERASEFF )
@ -2479,7 +2482,7 @@ void mvs_state::irrmaze(machine_config &config)
neogeo_arcade(config);
neogeo_mono(config);
NEOGEO_CTRL_EDGE_CONNECTOR(config, m_edge, neogeo_arc_edge_fixed, "irrmaze", true);
NEOGEO_CTRL_EDGE_CONNECTOR(config, m_edge, neogeo_arc_edge_irrmaze, "irrmaze", false);
config.set_default_layout(layout_irrmaze);
@ -4321,7 +4324,7 @@ ROM_START( roboarmy )
ROM_LOAD16_BYTE( "032-c4.c4", 0x200001, 0x080000, CRC(462571de) SHA1(5c3d610d492f91564423873b3b434dcda700373f) ) /* Plane 2,3 */ /* TC534200 */
ROM_END
ROM_START( roboarma ) /* MVS AND AES VERSION*/
ROM_START( roboarmya ) /* MVS AND AES VERSION*/
ROM_REGION( 0x100000, "cslot1:maincpu", ROMREGION_BE|ROMREGION_16BIT )
ROM_LOAD16_WORD_SWAP( "032-epr.p1", 0x000000, 0x080000, CRC(27c773cb) SHA1(597ca73f142b1129cc7780540bb9cfacd47bc6ce) ) /* D27C4000 */
/* Found on legitimate Robo Army MVS and AES Carts. Debug code button which check control a sound test has been patched out because in a multislot situation that code could have been enabled
@ -7977,8 +7980,11 @@ ROM_START( irrmaze ) /* MVS ONLY RELEASE */
NEO_SFIX_128K( "236-s1.s1", CRC(5d1ca640) SHA1(40a9668a1742a44597a07ce72273d17119815637) ) /* TC531000 */
ROM_REGION16_BE( 0x20000, "mainbios", 0 )
/* special BIOS with trackball support, we only have one Irritating Maze bios and that's Asian */
ROM_LOAD16_WORD_SWAP("236-bios.sp1", 0x00000, 0x020000, CRC(853e6b96) SHA1(de369cb4a7df147b55168fa7aaf0b98c753b735e) )
// special BIOS with trackball support, we only have one Irritating Maze bios and that's Asian
ROM_SYSTEM_BIOS( 0, "asia-sp1", "Asia MV1B 263" )
ROM_LOAD16_WORD_SWAP_BIOS( 0, "236-bios.sp1", 0x00000, 0x020000, CRC(853e6b96) SHA1(de369cb4a7df147b55168fa7aaf0b98c753b735e) )
// Universe BIOS 2.2 and later allow joystick play as a cheat
NEOGEO_UNIBIOS_2_2_AND_NEWER(1)
ROM_REGION( 0x30000, "cslot1:audiocpu", 0 )
ROM_LOAD( "236-m1.m1", 0x00000, 0x20000, CRC(880a1abd) SHA1(905afa157aba700e798243b842792e50729b19a0) ) /* TC531001 */
@ -11882,7 +11888,7 @@ GAME( 1991, socbrawl, neogeo, neobase, neogeo, mvs_led_state, empty_ini
GAME( 1991, socbrawlh, socbrawl, neobase, neogeo, mvs_led_state, empty_init, ROT0, "SNK", "Soccer Brawl (NGH-031)", MACHINE_SUPPORTS_SAVE )
GAME( 1991, fatfury1, neogeo, neobase, neogeo, mvs_led_state, empty_init, ROT0, "SNK", "Fatal Fury - King of Fighters / Garou Densetsu - Shukumei no Tatakai (NGM-033 ~ NGH-033)", MACHINE_SUPPORTS_SAVE )
GAME( 1991, roboarmy, neogeo, neobase, neogeo, mvs_led_state, empty_init, ROT0, "SNK", "Robo Army", MACHINE_SUPPORTS_SAVE )
GAME( 1991, roboarma, roboarmy, neobase, neogeo, mvs_led_state, empty_init, ROT0, "SNK", "Robo Army (NGM-032 ~ NGH-032)", MACHINE_SUPPORTS_SAVE )
GAME( 1991, roboarmya, roboarmy, neobase, neogeo, mvs_led_state, empty_init, ROT0, "SNK", "Robo Army (NGM-032 ~ NGH-032)", MACHINE_SUPPORTS_SAVE )
GAME( 1992, fbfrenzy, neogeo, neobase, neogeo, mvs_led_state, empty_init, ROT0, "SNK", "Football Frenzy (NGM-034 ~ NGH-034)", MACHINE_SUPPORTS_SAVE )
GAME( 1992, kotm2, neogeo, neobase, neogeo, mvs_led_state, empty_init, ROT0, "SNK", "King of the Monsters 2 - The Next Thing (NGM-039 ~ NGH-039)", MACHINE_SUPPORTS_SAVE )
GAME( 1992, kotm2a, kotm2, neobase, neogeo, mvs_led_state, empty_init, ROT0, "SNK", "King of the Monsters 2 - The Next Thing (older)", MACHINE_SUPPORTS_SAVE )

View File

@ -13,17 +13,101 @@
****************************************************************************/
#include "emu.h"
#include "includes/runaway.h"
#include "cpu/m6502/m6502.h"
#include "machine/74259.h"
#include "machine/er2055.h"
#include "sound/pokey.h"
#include "emupal.h"
#include "screen.h"
#include "speaker.h"
#include "tilemap.h"
TIMER_CALLBACK_MEMBER(runaway_state::interrupt_callback)
namespace {
class qwak_state : public driver_device
{
/* assume Centipede-style interrupt timing */
public:
qwak_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag)
, m_video_ram(*this, "video_ram")
, m_sprite_ram(*this, "sprite_ram")
, m_maincpu(*this, "maincpu")
, m_gfxdecode(*this, "gfxdecode")
, m_inputs(*this, { "3000D6", "3000D7" })
, m_pot(*this, "7000")
, m_screen(*this, "screen")
, m_palette(*this, "palette")
{ }
void qwak(machine_config &config);
protected:
virtual void machine_start() override;
virtual void machine_reset() override;
void qwak_map(address_map &map);
tilemap_t *m_bg_tilemap;
required_shared_ptr<uint8_t> m_video_ram;
required_shared_ptr<uint8_t> m_sprite_ram;
required_device<cpu_device> m_maincpu;
required_device<gfxdecode_device> m_gfxdecode;
private:
uint8_t input_r(offs_t offset);
void irq_ack_w(uint8_t data);
void paletteram_w(offs_t offset, uint8_t data);
void video_ram_w(offs_t offset, uint8_t data);
uint8_t pot_r(offs_t offset);
virtual TILE_GET_INFO_MEMBER(get_tile_info);
virtual void get_sprite_info(int n, unsigned &code, int &flipx, int &flipy);
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
TIMER_CALLBACK_MEMBER(interrupt_callback);
emu_timer *m_interrupt_timer;
required_ioport_array<2> m_inputs;
required_ioport m_pot;
required_device<screen_device> m_screen;
required_device<palette_device> m_palette;
};
class runaway_state : public qwak_state
{
public:
runaway_state(const machine_config &mconfig, device_type type, const char *tag)
: qwak_state(mconfig, type, tag)
, m_earom(*this, "earom")
{ }
void runaway(machine_config &config);
protected:
virtual void machine_start() override;
virtual void machine_reset() override;
void runaway_map(address_map &map);
private:
uint8_t earom_read();
void earom_write(offs_t offset, uint8_t data);
void earom_control_w(uint8_t data);
DECLARE_WRITE_LINE_MEMBER(tile_bank_w);
virtual TILE_GET_INFO_MEMBER(get_tile_info) override;
virtual void get_sprite_info(int n, unsigned &code, int &flipx, int &flipy) override;
required_device<er2055_device> m_earom;
uint8_t m_tile_bank;
};
TIMER_CALLBACK_MEMBER(qwak_state::interrupt_callback)
{
// assume Centipede-style interrupt timing
int scanline = param;
m_maincpu->set_input_line(0, (scanline & 32) ? ASSERT_LINE : CLEAR_LINE);
@ -36,43 +120,48 @@ TIMER_CALLBACK_MEMBER(runaway_state::interrupt_callback)
m_interrupt_timer->adjust(m_screen->time_until_pos(scanline), scanline);
}
void runaway_state::machine_start()
void qwak_state::machine_start()
{
m_interrupt_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(runaway_state::interrupt_callback),this));
m_bg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(qwak_state::get_tile_info)), TILEMAP_SCAN_ROWS, 8, 8, 32, 30);
}
void runaway_state::machine_start()
{
qwak_state::machine_start();
save_item(NAME(m_tile_bank));
}
void qwak_state::machine_reset()
{
m_interrupt_timer->adjust(m_screen->time_until_pos(16), 16);
}
void runaway_state::machine_reset()
{
m_interrupt_timer->adjust(m_screen->time_until_pos(16), 16);
if (m_earom.found())
earom_control_w(0);
qwak_state::machine_reset();
earom_control_w(0);
}
uint8_t runaway_state::runaway_input_r(offs_t offset)
uint8_t qwak_state::input_r(offs_t offset)
{
uint8_t val = 0;
if (ioport("3000D7")->read() & (1 << offset))
{
val |= 0x80;
}
if (ioport("3000D6")->read() & (1 << offset))
{
val |= 0x40;
}
return val;
return
(BIT(m_inputs[1]->read(), offset) << 7) |
(BIT(m_inputs[0]->read(), offset) << 6);
}
uint8_t runaway_state::runaway_pot_r(offs_t offset)
uint8_t qwak_state::pot_r(offs_t offset)
{
return (ioport("7000")->read() << (7 - offset)) & 0x80;
return BIT(m_pot->read(), offset) << 7;
}
void runaway_state::runaway_irq_ack_w(uint8_t data)
void qwak_state::irq_ack_w(uint8_t data)
{
m_maincpu->set_input_line(0, CLEAR_LINE);
}
@ -97,26 +186,141 @@ void runaway_state::earom_control_w(uint8_t data)
}
void runaway_state::qwak_map(address_map &map)
void qwak_state::paletteram_w(offs_t offset, uint8_t data)
{
int const b =
0x21 * 0 +
0x47 * BIT(~data, 0) +
0x97 * BIT(~data, 1);
int const r =
0x21 * BIT(~data, 2) +
0x47 * BIT(~data, 3) +
0x97 * BIT(~data, 4);
int const g =
0x21 * BIT(~data, 5) +
0x47 * BIT(~data, 6) +
0x97 * BIT(~data, 7);
m_palette->set_pen_color(offset, rgb_t(r, g, b));
}
void qwak_state::video_ram_w(offs_t offset, uint8_t data)
{
m_video_ram[offset] = data;
m_bg_tilemap->mark_tile_dirty(offset);
}
WRITE_LINE_MEMBER(runaway_state::tile_bank_w)
{
if (state != m_tile_bank)
{
m_tile_bank = state;
m_bg_tilemap->mark_all_dirty();
}
}
TILE_GET_INFO_MEMBER(qwak_state::get_tile_info)
{
uint8_t const code = m_video_ram[tile_index];
tileinfo.set(
0, // gfx
((code & 0x7f) << 1) | ((code & 0x80) >> 7), // code
0, // color
0); // flags
}
TILE_GET_INFO_MEMBER(runaway_state::get_tile_info)
{
uint8_t const code = m_video_ram[tile_index];
tileinfo.set(
0, // gfx
((code & 0x3f) << 1) | ((code & 0x40) >> 6) | (m_tile_bank << 7), // code
0, // color
(code & 0x80) ? TILE_FLIPY : 0); // flags
}
void qwak_state::get_sprite_info(int n, unsigned &code, int &flipx, int &flipy)
{
code = m_sprite_ram[n] & 0x7f;
flipx = 0;
flipy = m_sprite_ram[n] & 0x80;
code |= (m_sprite_ram[n + 0x30] << 2) & 0x1c0;
}
void runaway_state::get_sprite_info(int n, unsigned &code, int &flipx, int &flipy)
{
code = m_sprite_ram[n] & 0x3f;
flipx = m_sprite_ram[n] & 0x40;
flipy = m_sprite_ram[n] & 0x80;
code |= (m_sprite_ram[n + 0x30] << 2) & 0x1c0;
}
uint32_t qwak_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0);
for (int i = 0; i < 16; i++)
{
unsigned code;
int flipx, flipy;
get_sprite_info(i, code, flipx, flipy);
int const x = m_sprite_ram[i + 0x20];
int const y = m_sprite_ram[i + 0x10];
m_gfxdecode->gfx(1)->transpen(bitmap, cliprect,
code,
0,
flipx, flipy,
x, 240 - y, 0);
m_gfxdecode->gfx(1)->transpen(bitmap, cliprect,
code,
0,
flipx, flipy,
x - 256, 240 - y, 0);
}
return 0;
}
void qwak_state::qwak_map(address_map &map)
{
map(0x0000, 0x03ff).ram();
map(0x0400, 0x07bf).ram().w(FUNC(runaway_state::runaway_video_ram_w)).share("video_ram");
map(0x07c0, 0x07ff).ram().share("sprite_ram");
map(0x1000, 0x1000).w(FUNC(runaway_state::runaway_irq_ack_w));
map(0x1c00, 0x1c0f).w(FUNC(runaway_state::runaway_paletteram_w));
map(0x0400, 0x07bf).ram().w(FUNC(qwak_state::video_ram_w)).share(m_video_ram);
map(0x07c0, 0x07ff).ram().share(m_sprite_ram);
map(0x1000, 0x1000).w(FUNC(qwak_state::irq_ack_w));
map(0x1c00, 0x1c0f).w(FUNC(qwak_state::paletteram_w));
map(0x2000, 0x2007).w("mainlatch", FUNC(ls259_device::write_d0));
map(0x3000, 0x3007).r(FUNC(runaway_state::runaway_input_r));
map(0x3000, 0x3007).r(FUNC(qwak_state::input_r));
map(0x4000, 0x4000).portr("4000");
map(0x6000, 0x600f).rw("pokey1", FUNC(pokey_device::read), FUNC(pokey_device::write));
map(0x7000, 0x700f).rw("pokey2", FUNC(pokey_device::read), FUNC(pokey_device::write));
map(0x8000, 0xcfff).rom();
map(0xf000, 0xffff).rom(); /* for the interrupt vectors */
map(0xf000, 0xffff).rom(); // for the interrupt vectors
}
void runaway_state::runaway_map(address_map &map)
{
qwak_map(map);
map(0x1400, 0x143f).w(FUNC(runaway_state::earom_write));
map(0x1800, 0x1800).w(FUNC(runaway_state::earom_control_w));
map(0x5000, 0x5000).r(FUNC(runaway_state::earom_read));
@ -345,33 +549,31 @@ static GFXDECODE_START( gfx_qwak )
GFXDECODE_END
void runaway_state::runaway(machine_config &config)
void qwak_state::qwak(machine_config &config)
{
/* basic machine hardware */
M6502(config, m_maincpu, 12096000 / 8); /* ? */
m_maincpu->set_addrmap(AS_PROGRAM, &runaway_state::runaway_map);
m_maincpu->set_addrmap(AS_PROGRAM, &qwak_state::qwak_map);
ls259_device &mainlatch(LS259(config, "mainlatch"));
mainlatch.q_out_cb<0>().set_nop(); // coin counter?
mainlatch.q_out_cb<1>().set_nop(); // coin counter?
mainlatch.q_out_cb<3>().set_output("led0").invert();
mainlatch.q_out_cb<4>().set_output("led1").invert();
mainlatch.q_out_cb<5>().set(FUNC(runaway_state::tile_bank_w));
mainlatch.q_out_cb<5>().set_nop();
ER2055(config, m_earom);
/* video hardware */
// video hardware
SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
m_screen->set_refresh_hz(60);
m_screen->set_size(256, 263);
m_screen->set_visarea(0, 255, 0, 239);
m_screen->set_screen_update(FUNC(runaway_state::screen_update_runaway));
m_screen->set_screen_update(FUNC(qwak_state::screen_update));
m_screen->set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_runaway);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_qwak);
PALETTE(config, m_palette).set_entries(16);
/* sound hardware */
// sound hardware
SPEAKER(config, "mono").front_center();
pokey_device &pokey1(POKEY(config, "pokey1", 12096000 / 8));
@ -379,32 +581,30 @@ void runaway_state::runaway(machine_config &config)
pokey1.add_route(ALL_OUTPUTS, "mono", 0.50);
pokey_device &pokey2(POKEY(config, "pokey2", 12096000 / 8));
pokey2.pot_r<0>().set(FUNC(runaway_state::runaway_pot_r));
pokey2.pot_r<1>().set(FUNC(runaway_state::runaway_pot_r));
pokey2.pot_r<2>().set(FUNC(runaway_state::runaway_pot_r));
pokey2.pot_r<3>().set(FUNC(runaway_state::runaway_pot_r));
pokey2.pot_r<4>().set(FUNC(runaway_state::runaway_pot_r));
pokey2.pot_r<5>().set(FUNC(runaway_state::runaway_pot_r));
pokey2.pot_r<6>().set(FUNC(runaway_state::runaway_pot_r));
pokey2.pot_r<7>().set(FUNC(runaway_state::runaway_pot_r));
pokey2.pot_r<0>().set(FUNC(qwak_state::pot_r));
pokey2.pot_r<1>().set(FUNC(qwak_state::pot_r));
pokey2.pot_r<2>().set(FUNC(qwak_state::pot_r));
pokey2.pot_r<3>().set(FUNC(qwak_state::pot_r));
pokey2.pot_r<4>().set(FUNC(qwak_state::pot_r));
pokey2.pot_r<5>().set(FUNC(qwak_state::pot_r));
pokey2.pot_r<6>().set(FUNC(qwak_state::pot_r));
pokey2.pot_r<7>().set(FUNC(qwak_state::pot_r));
pokey2.add_route(ALL_OUTPUTS, "mono", 0.50);
}
void runaway_state::qwak(machine_config &config)
void runaway_state::runaway(machine_config &config)
{
runaway(config);
qwak(config);
/* basic machine hardware */
m_maincpu->set_addrmap(AS_PROGRAM, &runaway_state::qwak_map);
// basic machine hardware
m_maincpu->set_addrmap(AS_PROGRAM, &runaway_state::runaway_map);
config.device_remove("earom");
subdevice<ls259_device>("mainlatch")->q_out_cb<5>().set(FUNC(runaway_state::tile_bank_w));
/* video hardware */
m_gfxdecode->set_info(gfx_qwak);
ER2055(config, m_earom);
MCFG_VIDEO_START_OVERRIDE(runaway_state,qwak)
m_screen->set_screen_update(FUNC(runaway_state::screen_update_qwak));
// video hardware
m_gfxdecode->set_info(gfx_runaway);
}
ROM_START( runaway )
@ -438,6 +638,8 @@ ROM_START( qwak )
ROM_LOAD( "qwakgfx3.bin", 0x3000, 0x1000, CRC(e8416f2b) SHA1(171f6539575f2c06b431ab5118e5cbaf740f557d) )
ROM_END
} // anonymous namespace
GAME( 1982, qwak, 0, qwak, qwak, runaway_state, empty_init, ROT270, "Atari", "Qwak (prototype)", MACHINE_SUPPORTS_SAVE )
GAME( 1982, qwak, 0, qwak, qwak, qwak_state, empty_init, ROT270, "Atari", "Qwak (prototype)", MACHINE_SUPPORTS_SAVE )
GAME( 1982, runaway, 0, runaway, runaway, runaway_state, empty_init, ROT0, "Atari", "Runaway (Atari, prototype)", MACHINE_SUPPORTS_SAVE )

View File

@ -1,65 +0,0 @@
// license:BSD-3-Clause
// copyright-holders:Mike Balfour
#ifndef MAME_INCLUDES_RUNAWAY_H
#define MAME_INCLUDES_RUNAWAY_H
#pragma once
#include "machine/er2055.h"
#include "emupal.h"
#include "screen.h"
#include "tilemap.h"
class runaway_state : public driver_device
{
public:
runaway_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag)
, m_video_ram(*this, "video_ram")
, m_sprite_ram(*this, "sprite_ram")
, m_maincpu(*this, "maincpu")
, m_earom(*this, "earom")
, m_gfxdecode(*this, "gfxdecode")
, m_screen(*this, "screen")
, m_palette(*this, "palette")
{ }
void qwak(machine_config &config);
void runaway(machine_config &config);
private:
uint8_t runaway_input_r(offs_t offset);
void runaway_irq_ack_w(uint8_t data);
uint8_t earom_read();
void earom_write(offs_t offset, uint8_t data);
void earom_control_w(uint8_t data);
void runaway_paletteram_w(offs_t offset, uint8_t data);
void runaway_video_ram_w(offs_t offset, uint8_t data);
DECLARE_WRITE_LINE_MEMBER(tile_bank_w);
uint8_t runaway_pot_r(offs_t offset);
TILE_GET_INFO_MEMBER(runaway_get_tile_info);
TILE_GET_INFO_MEMBER(qwak_get_tile_info);
DECLARE_VIDEO_START(qwak);
uint32_t screen_update_runaway(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
uint32_t screen_update_qwak(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
TIMER_CALLBACK_MEMBER(interrupt_callback);
void runaway_map(address_map &map);
void qwak_map(address_map &map);
virtual void machine_start() override;
virtual void machine_reset() override;
virtual void video_start() override;
emu_timer *m_interrupt_timer;
required_shared_ptr<uint8_t> m_video_ram;
required_shared_ptr<uint8_t> m_sprite_ram;
tilemap_t *m_bg_tilemap;
int m_tile_bank;
required_device<cpu_device> m_maincpu;
optional_device<er2055_device> m_earom;
required_device<gfxdecode_device> m_gfxdecode;
required_device<screen_device> m_screen;
required_device<palette_device> m_palette;
};
#endif // MAME_INCLUDES_RUNAWAY_H

View File

@ -32584,7 +32584,7 @@ rbffspeck // 0124 (c) 1996 SNK
ridhero // 0006 (c) 1990 SNK
ridheroh // 0006 (c) 1990 SNK
roboarmy // 0032 (c) 1991 SNK
roboarma // 0032 (c) 1991 SNK
roboarmya // 0032 (c) 1991 SNK
rotd // 0264 (c) 2002 Evoga
rotdh // 0264 (c) 2002 Evoga
s1945p // 0254 (c) 1999 Psikyo

View File

@ -1,152 +0,0 @@
// license:BSD-3-Clause
// copyright-holders:Mike Balfour
/***************************************************************************
Atari Runaway video emulation
****************************************************************************/
#include "emu.h"
#include "includes/runaway.h"
void runaway_state::runaway_paletteram_w(offs_t offset, uint8_t data)
{
int R =
0x21 * ((~data >> 2) & 1) +
0x47 * ((~data >> 3) & 1) +
0x97 * ((~data >> 4) & 1);
int G =
0x21 * ((~data >> 5) & 1) +
0x47 * ((~data >> 6) & 1) +
0x97 * ((~data >> 7) & 1);
int B =
0x21 * 0 +
0x47 * ((~data >> 0) & 1) +
0x97 * ((~data >> 1) & 1);
m_palette->set_pen_color(offset, rgb_t(R, G, B));
}
void runaway_state::runaway_video_ram_w(offs_t offset, uint8_t data)
{
m_video_ram[offset] = data;
m_bg_tilemap->mark_tile_dirty(offset);
}
WRITE_LINE_MEMBER(runaway_state::tile_bank_w)
{
if (state != m_tile_bank)
{
m_tile_bank = state;
m_bg_tilemap->mark_all_dirty();
}
}
TILE_GET_INFO_MEMBER(runaway_state::runaway_get_tile_info)
{
uint8_t code = m_video_ram[tile_index];
tileinfo.set(0, ((code & 0x3f) << 1) | ((code & 0x40) >> 6) | (m_tile_bank << 7), 0, (code & 0x80) ? TILE_FLIPY : 0);
}
TILE_GET_INFO_MEMBER(runaway_state::qwak_get_tile_info)
{
uint8_t code = m_video_ram[tile_index];
tileinfo.set(0, ((code & 0x7f) << 1) | ((code & 0x80) >> 7), 0, 0);
}
void runaway_state::video_start()
{
m_bg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(runaway_state::runaway_get_tile_info)), TILEMAP_SCAN_ROWS, 8, 8, 32, 30);
save_item(NAME(m_tile_bank));
}
VIDEO_START_MEMBER(runaway_state,qwak)
{
m_bg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(runaway_state::qwak_get_tile_info)), TILEMAP_SCAN_ROWS, 8, 8, 32, 30);
save_item(NAME(m_tile_bank));
}
uint32_t runaway_state::screen_update_runaway(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
int i;
m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0);
for (i = 0; i < 16; i++)
{
unsigned code = m_sprite_ram[i] & 0x3f;
int x = m_sprite_ram[i + 0x20];
int y = m_sprite_ram[i + 0x10];
int flipx = m_sprite_ram[i] & 0x40;
int flipy = m_sprite_ram[i] & 0x80;
code |= (m_sprite_ram[i + 0x30] << 2) & 0x1c0;
m_gfxdecode->gfx(1)->transpen(bitmap,cliprect,
code,
0,
flipx, flipy,
x, 240 - y, 0);
m_gfxdecode->gfx(1)->transpen(bitmap,cliprect,
code,
0,
flipx, flipy,
x - 256, 240 - y, 0);
}
return 0;
}
uint32_t runaway_state::screen_update_qwak(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
int i;
m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0);
for (i = 0; i < 16; i++)
{
unsigned code = m_sprite_ram[i] & 0x7f;
int x = m_sprite_ram[i + 0x20];
int y = m_sprite_ram[i + 0x10];
int flipx = 0;
int flipy = m_sprite_ram[i] & 0x80;
code |= (m_sprite_ram[i + 0x30] << 2) & 0x1c0;
m_gfxdecode->gfx(1)->transpen(bitmap,cliprect,
code,
0,
flipx, flipy,
x, 240 - y, 0);
m_gfxdecode->gfx(1)->transpen(bitmap,cliprect,
code,
0,
flipx, flipy,
x - 256, 240 - y, 0);
}
return 0;
}