mirror of
https://github.com/holub/mame
synced 2025-07-09 03:38:23 +03:00
bus/nes: Added emulation for A Winner is You homebrew cart. (#8582)
This commit is contained in:
parent
4ba9d35e35
commit
f8a45bd24f
@ -460,6 +460,7 @@ void nes_cart(device_slot_interface &device)
|
|||||||
device.option_add_internal("cufrom", NES_CUFROM);
|
device.option_add_internal("cufrom", NES_CUFROM);
|
||||||
device.option_add_internal("unrom512", NES_UNROM512);
|
device.option_add_internal("unrom512", NES_UNROM512);
|
||||||
device.option_add_internal("2a03pur", NES_2A03PURITANS);
|
device.option_add_internal("2a03pur", NES_2A03PURITANS);
|
||||||
|
device.option_add_internal("dpcmcart", NES_DPCMCART);
|
||||||
// other unsupported...
|
// other unsupported...
|
||||||
device.option_add_internal("unl_dance", NES_NROM); // UNSUPPORTED
|
device.option_add_internal("unl_dance", NES_NROM); // UNSUPPORTED
|
||||||
device.option_add_internal("onebus", NES_NROM); // UNSUPPORTED
|
device.option_add_internal("onebus", NES_NROM); // UNSUPPORTED
|
||||||
|
@ -444,7 +444,7 @@ static const nes_mmc mmc_list[] =
|
|||||||
// 406 homebrew game Haradius Zero
|
// 406 homebrew game Haradius Zero
|
||||||
// 407 VT03 PnP
|
// 407 VT03 PnP
|
||||||
// 408 Konami PnP
|
// 408 Konami PnP
|
||||||
// 409 (Sealie) homebrew game A Winner is You, 64MB music cart, easy to support if dump is available
|
{ 409, UNL_DPCMCART }, // A Winner is You homebrew music cart
|
||||||
// 410 Unused or JY?
|
// 410 Unused or JY?
|
||||||
{ 411, BMC_A88S1 },
|
{ 411, BMC_A88S1 },
|
||||||
// 412 INTV 10-in-1 PnP 2nd edition
|
// 412 INTV 10-in-1 PnP 2nd edition
|
||||||
@ -643,8 +643,27 @@ void nes_cart_slot_device::call_load_ines()
|
|||||||
mapper |= (header[8] & 0x0f) << 8;
|
mapper |= (header[8] & 0x0f) << 8;
|
||||||
// read submappers (based on 20140116 specs)
|
// read submappers (based on 20140116 specs)
|
||||||
submapper = (header[8] & 0xf0) >> 4;
|
submapper = (header[8] & 0xf0) >> 4;
|
||||||
prg_size += ((header[9] & 0x0f) << 8) * 0x4000;
|
|
||||||
vrom_size += ((header[9] & 0xf0) << 4) * 0x2000;
|
// NES 2.0's extended exponential sizes, needed for loading PRG >= 64MB, CHR >= 32MB. These bizarrely go up to 7 * 2^63!
|
||||||
|
auto expsize = [] (u8 byte) { return (2*(byte & 0x03) + 1) << (byte >> 2); };
|
||||||
|
|
||||||
|
if ((header[9] & 0x0f) == 0x0f)
|
||||||
|
{
|
||||||
|
prg_size = expsize(header[4]);
|
||||||
|
if (prg_size == 0) // 0 only on overflow
|
||||||
|
fatalerror("NES 2.0 PRG size >= 4GB is unsupported.\n");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
prg_size += ((header[9] & 0x0f) << 8) * 0x4000;
|
||||||
|
|
||||||
|
if ((header[9] & 0xf0) == 0xf0)
|
||||||
|
{
|
||||||
|
vrom_size = expsize(header[5]);
|
||||||
|
if (vrom_size == 0) // 0 only on overflow
|
||||||
|
fatalerror("NES 2.0 CHR size >= 4GB is unsupported.\n");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
vrom_size += ((header[9] & 0xf0) << 4) * 0x2000;
|
||||||
}
|
}
|
||||||
ines_mapr_setup(mapper, &pcb_id);
|
ines_mapr_setup(mapper, &pcb_id);
|
||||||
|
|
||||||
|
@ -370,6 +370,7 @@ static const nes_pcb pcb_list[] =
|
|||||||
{ "cufrom", UNL_CUFROM },
|
{ "cufrom", UNL_CUFROM },
|
||||||
{ "unrom512", UNL_UNROM512 },
|
{ "unrom512", UNL_UNROM512 },
|
||||||
{ "2a03pur", UNL_2A03PURITANS },
|
{ "2a03pur", UNL_2A03PURITANS },
|
||||||
|
{ "dpcmcart", UNL_DPCMCART },
|
||||||
{ "ffe3", FFE3_BOARD },
|
{ "ffe3", FFE3_BOARD },
|
||||||
{ "ffe4", FFE4_BOARD },
|
{ "ffe4", FFE4_BOARD },
|
||||||
{ "ffe8", FFE8_BOARD },
|
{ "ffe8", FFE8_BOARD },
|
||||||
|
@ -143,7 +143,11 @@ enum
|
|||||||
// homebrew PCBs
|
// homebrew PCBs
|
||||||
NOCASH_NOCHR, // homebrew PCB design which uses NTRAM for CHRRAM
|
NOCASH_NOCHR, // homebrew PCB design which uses NTRAM for CHRRAM
|
||||||
UNL_ACTION53, // homebrew PCB for homebrew multicarts
|
UNL_ACTION53, // homebrew PCB for homebrew multicarts
|
||||||
BATMAP_000, BATMAP_SRRX, UNL_CUFROM, UNL_UNROM512, UNL_2A03PURITANS,
|
UNL_2A03PURITANS,
|
||||||
|
// Batlab Electronics
|
||||||
|
BATMAP_000, BATMAP_SRRX,
|
||||||
|
// Sealie
|
||||||
|
UNL_CUFROM, UNL_UNROM512, UNL_DPCMCART,
|
||||||
// FFE boards, for mappers 6, 8, 17
|
// FFE boards, for mappers 6, 8, 17
|
||||||
FFE3_BOARD, FFE4_BOARD, FFE8_BOARD, TEST_BOARD,
|
FFE3_BOARD, FFE4_BOARD, FFE8_BOARD, TEST_BOARD,
|
||||||
// Unsupported (for place-holder boards, with no working emulation) & no-board (at init)
|
// Unsupported (for place-holder boards, with no working emulation) & no-board (at init)
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
Here we emulate the following homebrew PCBs
|
Here we emulate the following homebrew PCBs
|
||||||
|
|
||||||
* SEALIE RET-CUFROM [mapper 29]
|
* SEALIE RET-CUFROM [mapper 29]
|
||||||
|
* SEALIE DPCMcart [mapper 409]
|
||||||
* SEALIE UNROM 512 [mapper 30]
|
* SEALIE UNROM 512 [mapper 30]
|
||||||
|
|
||||||
***********************************************************************************************************/
|
***********************************************************************************************************/
|
||||||
@ -32,6 +33,7 @@
|
|||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
|
|
||||||
DEFINE_DEVICE_TYPE(NES_CUFROM, nes_cufrom_device, "nes_cufrom", "NES Cart Sealie RET-CUFROM PCB")
|
DEFINE_DEVICE_TYPE(NES_CUFROM, nes_cufrom_device, "nes_cufrom", "NES Cart Sealie RET-CUFROM PCB")
|
||||||
|
DEFINE_DEVICE_TYPE(NES_DPCMCART, nes_dpcmcart_device, "nes_dpcmcart", "NES Cart Sealie DPCMcart PCB")
|
||||||
DEFINE_DEVICE_TYPE(NES_UNROM512, nes_unrom512_device, "nes_unrom512", "NES Cart Sealie UNROM 512 PCB")
|
DEFINE_DEVICE_TYPE(NES_UNROM512, nes_unrom512_device, "nes_unrom512", "NES Cart Sealie UNROM 512 PCB")
|
||||||
|
|
||||||
|
|
||||||
@ -40,6 +42,11 @@ nes_cufrom_device::nes_cufrom_device(const machine_config &mconfig, const char *
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
nes_dpcmcart_device::nes_dpcmcart_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
|
||||||
|
: nes_nrom_device(mconfig, NES_DPCMCART, tag, owner, clock)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
nes_unrom512_device::nes_unrom512_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
|
nes_unrom512_device::nes_unrom512_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
|
||||||
: nes_nrom_device(mconfig, NES_UNROM512, tag, owner, clock)
|
: nes_nrom_device(mconfig, NES_UNROM512, tag, owner, clock)
|
||||||
{
|
{
|
||||||
@ -54,6 +61,13 @@ void nes_cufrom_device::pcb_reset()
|
|||||||
chr8(0, CHRRAM);
|
chr8(0, CHRRAM);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void nes_dpcmcart_device::pcb_reset()
|
||||||
|
{
|
||||||
|
prg16_89ab(0);
|
||||||
|
prg16_cdef(m_prg_chunks - 1);
|
||||||
|
chr8(0, CHRRAM);
|
||||||
|
}
|
||||||
|
|
||||||
void nes_unrom512_device::pcb_reset()
|
void nes_unrom512_device::pcb_reset()
|
||||||
{
|
{
|
||||||
prg16_89ab(0);
|
prg16_89ab(0);
|
||||||
@ -93,6 +107,29 @@ void nes_cufrom_device::write_h(offs_t offset, u8 data)
|
|||||||
chr8(data & 0x03, CHRRAM);
|
chr8(data & 0x03, CHRRAM);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*-------------------------------------------------
|
||||||
|
|
||||||
|
Sealie DPCMcart board
|
||||||
|
|
||||||
|
Games: A Winner is You
|
||||||
|
|
||||||
|
This homebrew mapper supports a whopping 64MB which
|
||||||
|
is paged in 16K chucks at 0x8000. 0xc000 is fixed.
|
||||||
|
|
||||||
|
NES 2.0: mapper 409
|
||||||
|
|
||||||
|
In MAME: Partially supported.
|
||||||
|
|
||||||
|
TODO: Controls other than 'next track' don't work.
|
||||||
|
|
||||||
|
-------------------------------------------------*/
|
||||||
|
|
||||||
|
void nes_dpcmcart_device::write_h(offs_t offset, u8 data)
|
||||||
|
{
|
||||||
|
LOG_MMC(("dpcmcart write_h, offset: %04x, data: %02x\n", offset, data));
|
||||||
|
prg16_89ab(offset & 0x0fff);
|
||||||
|
}
|
||||||
|
|
||||||
/*-------------------------------------------------
|
/*-------------------------------------------------
|
||||||
|
|
||||||
Sealie UNROM 512 board
|
Sealie UNROM 512 board
|
||||||
|
@ -22,6 +22,20 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// ======================> nes_dpcmcart_device
|
||||||
|
|
||||||
|
class nes_dpcmcart_device : public nes_nrom_device
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
// construction/destruction
|
||||||
|
nes_dpcmcart_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_unrom512_device
|
// ======================> nes_unrom512_device
|
||||||
|
|
||||||
class nes_unrom512_device : public nes_nrom_device
|
class nes_unrom512_device : public nes_nrom_device
|
||||||
@ -38,6 +52,7 @@ public:
|
|||||||
|
|
||||||
// device type definition
|
// device type definition
|
||||||
DECLARE_DEVICE_TYPE(NES_CUFROM, nes_cufrom_device)
|
DECLARE_DEVICE_TYPE(NES_CUFROM, nes_cufrom_device)
|
||||||
|
DECLARE_DEVICE_TYPE(NES_DPCMCART, nes_dpcmcart_device)
|
||||||
DECLARE_DEVICE_TYPE(NES_UNROM512, nes_unrom512_device)
|
DECLARE_DEVICE_TYPE(NES_UNROM512, nes_unrom512_device)
|
||||||
|
|
||||||
#endif // MAME_BUS_NES_SEALIE_H
|
#endif // MAME_BUS_NES_SEALIE_H
|
||||||
|
Loading…
Reference in New Issue
Block a user