diff options
author | 2021-09-20 10:34:57 -0800 | |
---|---|---|
committer | 2021-09-21 04:34:57 +1000 | |
commit | 91b4d0267b0ae21e7e079179b2d222dd0b571476 (patch) | |
tree | f2e292d49dffc0b0554b0618126455c148ee047f | |
parent | cdf1780074bf2af028f5aaaddcdf28e8ad5e382d (diff) |
bus/nes: Added support for Star Versus. (#8598)
New working software list additions (nes.xml)
-----------------------------------
Star Versus [anonymous]
-rw-r--r-- | hash/nes.xml | 15 | ||||
-rw-r--r-- | src/devices/bus/nes/batlab.cpp | 55 | ||||
-rw-r--r-- | src/devices/bus/nes/batlab.h | 17 | ||||
-rw-r--r-- | src/devices/bus/nes/nes_carts.cpp | 1 | ||||
-rw-r--r-- | src/devices/bus/nes/nes_ines.hxx | 2 | ||||
-rw-r--r-- | src/devices/bus/nes/nes_pcb.hxx | 1 | ||||
-rw-r--r-- | src/devices/bus/nes/nes_slot.h | 2 |
7 files changed, 89 insertions, 4 deletions
diff --git a/hash/nes.xml b/hash/nes.xml index 7eeb6eb0bd4..d9c27894325 100644 --- a/hash/nes.xml +++ b/hash/nes.xml @@ -78046,6 +78046,21 @@ be better to redump them properly. --> </part> </software> + <software name="starvers"> + <description>Star Versus</description> + <year>2015</year> + <publisher>Studio Dustmop</publisher> + <part name="cart" interface="nes_cart"> + <feature name="slot" value="batmap_000" /> + <dataarea name="prg" size="131072"> + <rom name="star versus.prg" size="131072" crc="9c987a2a" sha1="999535969f4ce9f3dbda1d1918f570209016a39c" status="baddump" /> + </dataarea> + <!-- 32k VRAM on cartridge --> + <dataarea name="vram" size="32768"> + </dataarea> + </part> + </software> + <software name="superrr"> <description>Super Russian Roulette</description> <year>2017</year> diff --git a/src/devices/bus/nes/batlab.cpp b/src/devices/bus/nes/batlab.cpp index f341e5bcd8b..cc39fb95466 100644 --- a/src/devices/bus/nes/batlab.cpp +++ b/src/devices/bus/nes/batlab.cpp @@ -8,7 +8,8 @@ Here we emulate the following homebrew PCBs - * BATLAP BATMAP-SRR-X [mapper 413] + * Batlab BATMAP-000 [mapper 399] + * Batlab BATMAP-SRR-X [mapper 413] ***********************************************************************************************************/ @@ -32,9 +33,15 @@ // constructor //------------------------------------------------- +DEFINE_DEVICE_TYPE(NES_BATMAP_000, nes_batmap_000_device, "nes_batmap_000", "NES Cart Batlab BATMAP-000 PCB") DEFINE_DEVICE_TYPE(NES_BATMAP_SRRX, nes_batmap_srrx_device, "nes_batmap_srrx", "NES Cart Batlab BATMAP-SRR-X PCB") +nes_batmap_000_device::nes_batmap_000_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : nes_txrom_device(mconfig, NES_BATMAP_000, tag, owner, clock) +{ +} + nes_batmap_srrx_device::nes_batmap_srrx_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : nes_nrom_device(mconfig, NES_BATMAP_SRRX, tag, owner, clock), m_reg(0), m_dpcm_addr(0), m_dpcm_ctrl(0), m_irq_count(0), m_irq_count_latch(0), m_irq_enable(0) { @@ -42,6 +49,16 @@ nes_batmap_srrx_device::nes_batmap_srrx_device(const machine_config &mconfig, co +void nes_batmap_000_device::pcb_reset() +{ + m_chr_source = m_vrom_chunks ? CHRROM : CHRRAM; + mmc3_common_initialize(0x0f, 0xff, 0); + + prg16_89ab(0); + prg16_cdef(m_prg_chunks - 1); + chr8(0, CHRRAM); +} + void nes_batmap_srrx_device::device_start() { common_start(); @@ -77,6 +94,42 @@ void nes_batmap_srrx_device::pcb_reset() /*------------------------------------------------- + Batlab BATMAP-000 board + + Games: Star Versus, Anamanaguchi carts? (not dumped?) + + These boards have been seen using a Xilinx XC9572XL CPLD. + This provides a clone of MMC3-style IRQ and mirroring + (not sure how it may differ) with simpler PRG/CHR banking. + Boards are marked as having 1MB PRG, swappable in 8K banks + at 0xa000 and 0xc000, and 32KB CHR, swappable in 4K banks. + + NES 2.0: mapper 399 + + In MAME: Supported. + + -------------------------------------------------*/ + +void nes_batmap_000_device::write_h(offs_t offset, u8 data) +{ + LOG_MMC(("batmap_000 write_h, offset: %04x, data: %02x\n", offset, data)); + + switch (offset & 0x6001) + { + case 0x0000: + chr4_x(BIT(data, 7) << 2, data & 0x07, CHRRAM); + break; + case 0x0001: + prg8_x(BIT(data, 7) + 1, data & 0x7f); + break; + default: + txrom_write(offset, data); + break; + } +} + +/*------------------------------------------------- + Batlab BATMAP-SRR-X board Games: Super Russian Roulette diff --git a/src/devices/bus/nes/batlab.h b/src/devices/bus/nes/batlab.h index 2b35d29951d..6027108eb8d 100644 --- a/src/devices/bus/nes/batlab.h +++ b/src/devices/bus/nes/batlab.h @@ -5,7 +5,21 @@ #pragma once -#include "nxrom.h" +#include "mmc3.h" + + +// ======================> nes_batmap_000_device + +class nes_batmap_000_device : public nes_txrom_device +{ +public: + // construction/destruction + nes_batmap_000_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + + virtual void write_h(offs_t offset, u8 data) override; + + virtual void pcb_reset() override; +}; // ======================> nes_batmap_srrx_device @@ -40,6 +54,7 @@ private: // device type definition +DECLARE_DEVICE_TYPE(NES_BATMAP_000, nes_batmap_000_device) DECLARE_DEVICE_TYPE(NES_BATMAP_SRRX, nes_batmap_srrx_device) #endif // MAME_BUS_NES_BATLAB_H diff --git a/src/devices/bus/nes/nes_carts.cpp b/src/devices/bus/nes/nes_carts.cpp index bbdaa3261da..b5ccf2c1db6 100644 --- a/src/devices/bus/nes/nes_carts.cpp +++ b/src/devices/bus/nes/nes_carts.cpp @@ -452,6 +452,7 @@ void nes_cart(device_slot_interface &device) device.option_add_internal("pjoy84", NES_PJOY84); device.option_add_internal("nocash_nochr", NES_NOCHR); device.option_add_internal("action53", NES_ACTION53); + device.option_add_internal("batmap_000", NES_BATMAP_000); device.option_add_internal("batmap_srrx", NES_BATMAP_SRRX); device.option_add_internal("cufrom", NES_CUFROM); device.option_add_internal("unrom512", NES_UNROM512); diff --git a/src/devices/bus/nes/nes_ines.hxx b/src/devices/bus/nes/nes_ines.hxx index 9e0a603d3db..0438a023b2c 100644 --- a/src/devices/bus/nes/nes_ines.hxx +++ b/src/devices/bus/nes/nes_ines.hxx @@ -434,7 +434,7 @@ static const nes_mmc mmc_list[] = { 396, BMC_850437C }, // 397 JY-082 multicart, not in nes.xml? // 398 JY-048 multicart, not in nes.xml? - // 399 homebrew game Star Versus + { 399, BATMAP_000 }, // homebrew game Star Versus // 400 retroUSB (Sealie?) 8-bit XMAS 2017 // 401 Super 19-in-1 VIP 19, not in nes.xml? // 402 22-in-1 Olympic Games, not in nes.xml? diff --git a/src/devices/bus/nes/nes_pcb.hxx b/src/devices/bus/nes/nes_pcb.hxx index b4e5dad9afa..54a40eda102 100644 --- a/src/devices/bus/nes/nes_pcb.hxx +++ b/src/devices/bus/nes/nes_pcb.hxx @@ -362,6 +362,7 @@ static const nes_pcb pcb_list[] = { "unl_eh8813a", UNL_EH8813A }, // Dr. Mario II { "nocash_nochr", NOCASH_NOCHR }, { "action53", UNL_ACTION53 }, + { "batmap_000", BATMAP_000 }, { "batmap_srrx", BATMAP_SRRX }, { "cufrom", UNL_CUFROM }, { "unrom512", UNL_UNROM512 }, diff --git a/src/devices/bus/nes/nes_slot.h b/src/devices/bus/nes/nes_slot.h index ec8c08b49e5..d57beff1760 100644 --- a/src/devices/bus/nes/nes_slot.h +++ b/src/devices/bus/nes/nes_slot.h @@ -144,7 +144,7 @@ enum // homebrew PCBs NOCASH_NOCHR, // homebrew PCB design which uses NTRAM for CHRRAM UNL_ACTION53, // homebrew PCB for homebrew multicarts - BATMAP_SRRX, UNL_CUFROM, UNL_UNROM512, UNL_2A03PURITANS, + BATMAP_000, BATMAP_SRRX, UNL_CUFROM, UNL_UNROM512, UNL_2A03PURITANS, // FFE boards, for mappers 6, 8, 17 FFE3_BOARD, FFE4_BOARD, FFE8_BOARD, TEST_BOARD, // Unsupported (for place-holder boards, with no working emulation) & no-board (at init) |