mirror of
https://github.com/holub/mame
synced 2025-04-19 23:12:11 +03:00
Merge branch 'master' of https://github.com/mamedev/mame
This commit is contained in:
commit
47e2603657
@ -78461,14 +78461,14 @@ be better to redump them properly. -->
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="mc_22rb" supported="partial">
|
||||
<software name="mc_22rb">
|
||||
<description>22 in 1 (Reset Based)</description>
|
||||
<year>19??</year>
|
||||
<publisher><pirate></publisher>
|
||||
<info name="usage" value="Press reset to use multigame menu."/>
|
||||
<part name="cart" interface="nes_cart">
|
||||
<feature name="slot" value="bmc_22games" />
|
||||
<feature name="pcb" value="BMC-22GAMES" />
|
||||
<feature name="mirroring" value="vertical" />
|
||||
<dataarea name="prg" size="655360">
|
||||
<rom name="22 in 1 (reset based).prg" size="655360" crc="03fdefad" sha1="4e84be9a20c5e385ae71c466a02613d5a74de01e" offset="00000" status="baddump" />
|
||||
</dataarea>
|
||||
|
@ -301,8 +301,8 @@ nes_bmc_ball11_device::nes_bmc_ball11_device(const machine_config &mconfig, cons
|
||||
{
|
||||
}
|
||||
|
||||
nes_bmc_22games_device::nes_bmc_22games_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
: nes_nrom_device(mconfig, NES_BMC_22GAMES, tag, owner, clock)
|
||||
nes_bmc_22games_device::nes_bmc_22games_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
|
||||
: nes_nrom_device(mconfig, NES_BMC_22GAMES, tag, owner, clock), m_latch(0), m_reset(0)
|
||||
{
|
||||
}
|
||||
|
||||
@ -851,14 +851,25 @@ void nes_bmc_ball11_device::pcb_reset()
|
||||
void nes_bmc_22games_device::device_start()
|
||||
{
|
||||
common_start();
|
||||
save_item(NAME(m_latch));
|
||||
save_item(NAME(m_reset));
|
||||
}
|
||||
|
||||
void nes_bmc_22games_device::pcb_reset()
|
||||
{
|
||||
m_chr_source = m_vrom_chunks ? CHRROM : CHRRAM;
|
||||
prg16_89ab(0);
|
||||
prg16_cdef(7);
|
||||
chr8(0, m_chr_source);
|
||||
if (m_reset)
|
||||
{
|
||||
prg32(4);
|
||||
m_latch = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
prg16_89ab(0);
|
||||
prg16_cdef(7);
|
||||
set_nt_mirroring(PPU_MIRROR_VERT);
|
||||
m_reset = 1;
|
||||
}
|
||||
chr8(0, CHRRAM);
|
||||
}
|
||||
|
||||
void nes_bmc_64y2k_device::device_start()
|
||||
@ -2278,37 +2289,33 @@ void nes_bmc_ball11_device::write_h(offs_t offset, u8 data)
|
||||
BMC-22GAMES
|
||||
|
||||
Unknown Bootleg Multigame Board
|
||||
Games: 22 in 1
|
||||
Games: Contra/22 in 1 combo
|
||||
|
||||
iNES: mapper 230
|
||||
|
||||
In MESS: Partially Supported. It would need a reset
|
||||
to work (not possible yet)
|
||||
In MAME: Supported.
|
||||
|
||||
TODO: Determine whether reset works as written or
|
||||
whether it toggles between Contra and the game menu.
|
||||
Reset to Contra from the menu or other games often
|
||||
fails due to RAM contents it seems.
|
||||
|
||||
-------------------------------------------------*/
|
||||
|
||||
void nes_bmc_22games_device::write_h(offs_t offset, uint8_t data)
|
||||
void nes_bmc_22games_device::write_h(offs_t offset, u8 data)
|
||||
{
|
||||
LOG_MMC(("bmc_22games write_h, offset: %04x, data: %02x\n", offset, data));
|
||||
|
||||
if (1) // this should flip at reset
|
||||
if (m_latch)
|
||||
{
|
||||
prg16_89ab(data & 0x07);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (data & 0x20)
|
||||
{
|
||||
prg16_89ab((data & 0x1f) + 8);
|
||||
prg16_cdef((data & 0x1f) + 8);
|
||||
}
|
||||
else
|
||||
{
|
||||
prg16_89ab((data & 0x1f) + 8);
|
||||
prg16_cdef((data & 0x1f) + 9);
|
||||
}
|
||||
u8 bank = (data & 0x1f) + 8;
|
||||
u8 mode = !BIT(data, 5);
|
||||
prg16_89ab(bank & ~mode);
|
||||
prg16_cdef(bank | mode);
|
||||
set_nt_mirroring(BIT(data, 6) ? PPU_MIRROR_VERT : PPU_MIRROR_HORZ);
|
||||
}
|
||||
else
|
||||
prg16_89ab(data & 0x07);
|
||||
}
|
||||
|
||||
/*-------------------------------------------------
|
||||
|
@ -675,15 +675,18 @@ class nes_bmc_22games_device : public nes_nrom_device
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
nes_bmc_22games_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
nes_bmc_22games_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
|
||||
|
||||
virtual void write_h(offs_t offset, uint8_t data) override;
|
||||
virtual void write_h(offs_t offset, u8 data) override;
|
||||
|
||||
virtual void pcb_reset() override;
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_start() override;
|
||||
|
||||
private:
|
||||
int m_latch, m_reset;
|
||||
};
|
||||
|
||||
|
||||
|
@ -48,14 +48,16 @@ int is_path_separator(char c)
|
||||
|
||||
bool is_root(std::string_view path)
|
||||
{
|
||||
// FIXME: get rid of the assumption that paths are DOS-like
|
||||
|
||||
#if defined(OSD_WINDOWS)
|
||||
// skip drive letter
|
||||
if (path.length() >= 2 && isalpha(path[0]) && (path[1] == ':'))
|
||||
path.remove_prefix(2);
|
||||
|
||||
// skip path separators
|
||||
return path.find_first_not_of(PATH_SEPARATOR) == std::string_view::npos;
|
||||
#else
|
||||
return (path.length() == 1) && (path[0] == '/');
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@ -203,11 +205,15 @@ osd_file::error zippath_resolve(std::string_view path, osd::directory::entry::en
|
||||
bool went_up = false;
|
||||
do
|
||||
{
|
||||
// trim the path of trailing path separators
|
||||
auto i = apath.find_last_not_of(PATH_SEPARATOR);
|
||||
if (i == std::string::npos)
|
||||
break;
|
||||
apath = apath.substr(0, i + 1);
|
||||
if (!is_root(apath))
|
||||
{
|
||||
// trim the path of trailing path separators
|
||||
auto i = apath.find_last_not_of(PATH_SEPARATOR);
|
||||
if (i == std::string::npos)
|
||||
break;
|
||||
apath = apath.substr(0, i + 1);
|
||||
}
|
||||
|
||||
apath_trimmed = apath;
|
||||
|
||||
// stat the path
|
||||
|
Loading…
Reference in New Issue
Block a user