mirror of
https://github.com/holub/mame
synced 2025-04-16 13:34:55 +03:00
New working clones
------------------ Monsters World 2 (bootleg of Super Pang) [Recreativas.org, David Torres, ClawGrip]
This commit is contained in:
parent
2f21f79a3c
commit
994b8d18ee
@ -1572,8 +1572,6 @@ files {
|
||||
MAME_DIR .. "src/mame/includes/lwings.h",
|
||||
MAME_DIR .. "src/mame/video/lwings.cpp",
|
||||
MAME_DIR .. "src/mame/drivers/mitchell.cpp",
|
||||
MAME_DIR .. "src/mame/includes/mitchell.h",
|
||||
MAME_DIR .. "src/mame/video/mitchell.cpp",
|
||||
MAME_DIR .. "src/mame/drivers/psrockman.cpp",
|
||||
MAME_DIR .. "src/mame/drivers/sf.cpp",
|
||||
MAME_DIR .. "src/mame/drivers/sidearms.cpp",
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,163 +0,0 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Nicola Salmoria
|
||||
/*************************************************************************
|
||||
|
||||
Mitchell hardware
|
||||
|
||||
*************************************************************************/
|
||||
|
||||
#include "machine/74157.h"
|
||||
#include "machine/nvram.h"
|
||||
#include "machine/eepromser.h"
|
||||
#include "machine/gen_latch.h"
|
||||
#include "machine/timer.h"
|
||||
#include "sound/msm5205.h"
|
||||
#include "sound/okim6295.h"
|
||||
#include "emupal.h"
|
||||
#include "tilemap.h"
|
||||
|
||||
class mitchell_state : public driver_device
|
||||
{
|
||||
public:
|
||||
mitchell_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_audiocpu(*this, "audiocpu"),
|
||||
m_oki(*this, "oki"),
|
||||
m_nvram(*this, "nvram"),
|
||||
m_eeprom(*this, "eeprom"),
|
||||
m_msm(*this, "msm"),
|
||||
m_adpcm_select(*this, "adpcm_select"),
|
||||
m_gfxdecode(*this, "gfxdecode"),
|
||||
m_palette(*this, "palette"),
|
||||
m_soundlatch(*this, "soundlatch"),
|
||||
m_colorram(*this, "colorram"),
|
||||
m_videoram(*this, "videoram"),
|
||||
m_bank1(*this, "bank1"),
|
||||
m_bank0d(*this, "bank0d"),
|
||||
m_bank1d(*this, "bank1d"),
|
||||
m_soundbank(*this, "soundbank") { }
|
||||
|
||||
void pkladiesbl(machine_config &config);
|
||||
void mstworld(machine_config &config);
|
||||
void mgakuen(machine_config &config);
|
||||
void marukin(machine_config &config);
|
||||
void pang(machine_config &config);
|
||||
void pangba(machine_config &config);
|
||||
void pangnv(machine_config &config);
|
||||
void spangbl(machine_config &config);
|
||||
|
||||
void init_mgakuen2();
|
||||
void init_block();
|
||||
void init_pangb();
|
||||
void init_qtono1();
|
||||
void init_mgakuen();
|
||||
void init_hatena();
|
||||
void init_mstworld();
|
||||
void init_spangbl();
|
||||
void init_pkladiesbl();
|
||||
void init_spang();
|
||||
void init_cworld();
|
||||
void init_spangj();
|
||||
void init_qsangoku();
|
||||
void init_marukin();
|
||||
void init_pang();
|
||||
void init_sbbros();
|
||||
void init_pkladies();
|
||||
void init_blockbl();
|
||||
void init_dokaben();
|
||||
|
||||
private:
|
||||
/* devices */
|
||||
required_device<cpu_device> m_maincpu;
|
||||
optional_device<cpu_device> m_audiocpu;
|
||||
optional_device<okim6295_device> m_oki;
|
||||
optional_device<nvram_device> m_nvram;
|
||||
optional_device<eeprom_serial_93cxx_device> m_eeprom;
|
||||
optional_device<msm5205_device> m_msm;
|
||||
optional_device<ls157_device> m_adpcm_select;
|
||||
required_device<gfxdecode_device> m_gfxdecode;
|
||||
required_device<palette_device> m_palette;
|
||||
optional_device<generic_latch_8_device> m_soundlatch;
|
||||
|
||||
/* memory pointers */
|
||||
required_shared_ptr<uint8_t> m_colorram;
|
||||
required_shared_ptr<uint8_t> m_videoram;
|
||||
required_memory_bank m_bank1;
|
||||
optional_memory_bank m_bank0d;
|
||||
optional_memory_bank m_bank1d;
|
||||
optional_memory_bank m_soundbank;
|
||||
|
||||
/* video-related */
|
||||
tilemap_t *m_bg_tilemap;
|
||||
std::vector<uint8_t> m_objram; /* Sprite RAM */
|
||||
int m_flipscreen;
|
||||
int m_video_bank;
|
||||
int m_paletteram_bank;
|
||||
std::vector<uint8_t> m_paletteram;
|
||||
|
||||
/* sound-related */
|
||||
bool m_sample_select;
|
||||
|
||||
/* misc */
|
||||
int m_input_type;
|
||||
int m_dial[2];
|
||||
int m_dial_selected;
|
||||
int m_dir[2];
|
||||
int m_keymatrix;
|
||||
std::unique_ptr<uint8_t[]> m_decoded;
|
||||
|
||||
uint8_t m_irq_source;
|
||||
uint8_t pang_port5_r();
|
||||
void pang_bankswitch_w(uint8_t data);
|
||||
uint8_t block_input_r(offs_t offset);
|
||||
void block_dial_control_w(uint8_t data);
|
||||
uint8_t mahjong_input_r(offs_t offset);
|
||||
void mahjong_input_select_w(uint8_t data);
|
||||
uint8_t input_r(offs_t offset);
|
||||
void input_w(uint8_t data);
|
||||
void mstworld_sound_w(uint8_t data);
|
||||
void pang_video_bank_w(uint8_t data);
|
||||
void mstworld_video_bank_w(uint8_t data);
|
||||
void mgakuen_videoram_w(offs_t offset, uint8_t data);
|
||||
uint8_t mgakuen_videoram_r(offs_t offset);
|
||||
void mgakuen_objram_w(offs_t offset, uint8_t data);
|
||||
uint8_t mgakuen_objram_r(offs_t offset);
|
||||
void pang_videoram_w(offs_t offset, uint8_t data);
|
||||
uint8_t pang_videoram_r(offs_t offset);
|
||||
void pang_colorram_w(offs_t offset, uint8_t data);
|
||||
uint8_t pang_colorram_r(offs_t offset);
|
||||
void pang_gfxctrl_w(uint8_t data);
|
||||
void pangbl_gfxctrl_w(uint8_t data);
|
||||
void mstworld_gfxctrl_w(uint8_t data);
|
||||
void pang_paletteram_w(offs_t offset, uint8_t data);
|
||||
uint8_t pang_paletteram_r(offs_t offset);
|
||||
void eeprom_cs_w(uint8_t data);
|
||||
void eeprom_clock_w(uint8_t data);
|
||||
void eeprom_serial_w(uint8_t data);
|
||||
void oki_banking_w(uint8_t data);
|
||||
|
||||
TILE_GET_INFO_MEMBER(get_tile_info);
|
||||
DECLARE_MACHINE_START(mitchell);
|
||||
DECLARE_MACHINE_RESET(mitchell);
|
||||
DECLARE_VIDEO_START(pang);
|
||||
uint32_t screen_update_pang(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(mitchell_irq);
|
||||
void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect );
|
||||
void bootleg_decode();
|
||||
void configure_banks(void (*decode)(uint8_t *src, uint8_t *dst, int size));
|
||||
void sound_bankswitch_w(uint8_t data);
|
||||
DECLARE_WRITE_LINE_MEMBER(spangbl_adpcm_int);
|
||||
|
||||
void decrypted_opcodes_map(address_map &map);
|
||||
void mgakuen_map(address_map &map);
|
||||
void mitchell_io_map(address_map &map);
|
||||
void mitchell_map(address_map &map);
|
||||
void mstworld_io_map(address_map &map);
|
||||
void mstworld_sound_map(address_map &map);
|
||||
void pangba_sound_map(address_map &map);
|
||||
void pkladiesbl_io_map(address_map &map);
|
||||
void spangbl_io_map(address_map &map);
|
||||
void spangbl_map(address_map &map);
|
||||
void spangbl_sound_map(address_map &map);
|
||||
};
|
@ -23881,6 +23881,7 @@ marukin // 17/10/1990 (c) 1990 Yuga (Japan)
|
||||
mgakuen // (c) 1988 Yuga
|
||||
mgakuen2 // (c) 1989 Face
|
||||
mstworld // (c) 1994
|
||||
mstworld2 // (c) 1994
|
||||
pang // (c) 1989 Mitchell (World)
|
||||
pangb // bootleg
|
||||
pangb2 // bootleg
|
||||
@ -31860,7 +31861,7 @@ finalaprj1 // (c) 1995
|
||||
speedrcr // (c) 1995
|
||||
|
||||
@source:namcona1.cpp
|
||||
bbbingo // (c) 1999? (Japan)
|
||||
bbbingo // (c) 1996 (Japan)
|
||||
bkrtmaq // (c) 1992 (Japan)
|
||||
cgangpzl // (c) 1992 (US)
|
||||
cgangpzlj // (c) 1992 (Japan)
|
||||
|
@ -1,293 +0,0 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Nicola Salmoria
|
||||
/***************************************************************************
|
||||
|
||||
Pang Video Hardware
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
#include "sound/okim6295.h"
|
||||
#include "includes/mitchell.h"
|
||||
|
||||
/***************************************************************************
|
||||
|
||||
Callbacks for the TileMap code
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
TILE_GET_INFO_MEMBER(mitchell_state::get_tile_info)
|
||||
{
|
||||
uint8_t attr = m_colorram[tile_index];
|
||||
int code = m_videoram[2 * tile_index] + (m_videoram[2 * tile_index + 1] << 8);
|
||||
tileinfo.set(0,
|
||||
code,
|
||||
attr & 0x7f,
|
||||
(attr & 0x80) ? TILE_FLIPX : 0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
|
||||
Start the video hardware emulation.
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
VIDEO_START_MEMBER(mitchell_state,pang)
|
||||
{
|
||||
m_bg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(mitchell_state::get_tile_info)), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
|
||||
m_bg_tilemap->set_transparent_pen(15);
|
||||
|
||||
/* OBJ RAM */
|
||||
m_objram.resize(m_videoram.bytes());
|
||||
|
||||
/* Palette RAM */
|
||||
m_paletteram.resize(2 * m_palette->entries());
|
||||
m_palette->basemem().set(m_paletteram, ENDIANNESS_LITTLE, 2);
|
||||
|
||||
save_item(NAME(m_objram));
|
||||
save_item(NAME(m_paletteram));
|
||||
}
|
||||
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
|
||||
Memory handlers
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
OBJ / CHAR RAM HANDLERS (BANK 0 = CHAR, BANK 1=OBJ)
|
||||
***************************************************************************/
|
||||
|
||||
void mitchell_state::pang_video_bank_w(uint8_t data)
|
||||
{
|
||||
/* Bank handler (sets base pointers for video write) (doesn't apply to mgakuen) */
|
||||
m_video_bank = data;
|
||||
}
|
||||
|
||||
void mitchell_state::mstworld_video_bank_w(uint8_t data)
|
||||
{
|
||||
/* Monsters World seems to freak out if more bits are used.. */
|
||||
m_video_bank = data & 1;
|
||||
}
|
||||
|
||||
|
||||
void mitchell_state::mgakuen_videoram_w(offs_t offset, uint8_t data)
|
||||
{
|
||||
m_videoram[offset] = data;
|
||||
m_bg_tilemap->mark_tile_dirty(offset / 2);
|
||||
}
|
||||
|
||||
uint8_t mitchell_state::mgakuen_videoram_r(offs_t offset)
|
||||
{
|
||||
return m_videoram[offset];
|
||||
}
|
||||
|
||||
void mitchell_state::mgakuen_objram_w(offs_t offset, uint8_t data)
|
||||
{
|
||||
m_objram[offset] = data;
|
||||
}
|
||||
|
||||
uint8_t mitchell_state::mgakuen_objram_r(offs_t offset)
|
||||
{
|
||||
return m_objram[offset];
|
||||
}
|
||||
|
||||
void mitchell_state::pang_videoram_w(offs_t offset, uint8_t data)
|
||||
{
|
||||
if (m_video_bank)
|
||||
mgakuen_objram_w(offset, data);
|
||||
else
|
||||
mgakuen_videoram_w(offset, data);
|
||||
}
|
||||
|
||||
uint8_t mitchell_state::pang_videoram_r(offs_t offset)
|
||||
{
|
||||
if (m_video_bank)
|
||||
return mgakuen_objram_r(offset);
|
||||
else
|
||||
return mgakuen_videoram_r(offset);
|
||||
}
|
||||
|
||||
/***************************************************************************
|
||||
COLOUR RAM
|
||||
****************************************************************************/
|
||||
|
||||
void mitchell_state::pang_colorram_w(offs_t offset, uint8_t data)
|
||||
{
|
||||
m_colorram[offset] = data;
|
||||
m_bg_tilemap->mark_tile_dirty(offset);
|
||||
}
|
||||
|
||||
uint8_t mitchell_state::pang_colorram_r(offs_t offset)
|
||||
{
|
||||
return m_colorram[offset];
|
||||
}
|
||||
|
||||
/***************************************************************************
|
||||
PALETTE HANDLERS (COLOURS: BANK 0 = 0x00-0x3f BANK 1=0x40-0xff)
|
||||
****************************************************************************/
|
||||
|
||||
void mitchell_state::pang_gfxctrl_w(uint8_t data)
|
||||
{
|
||||
logerror("PC %04x: pang_gfxctrl_w %02x\n",m_maincpu->pc(),data);
|
||||
{
|
||||
#if 0
|
||||
char baf[40];
|
||||
sprintf(baf,"%02x",data);
|
||||
popmessage(baf);
|
||||
#endif
|
||||
}
|
||||
|
||||
/* bit 0 is unknown (used, maybe back color enable?) */
|
||||
|
||||
/* bit 1 is coin counter */
|
||||
machine().bookkeeping().coin_counter_w(0, data & 2);
|
||||
|
||||
/* bit 2 is flip screen */
|
||||
if (m_flipscreen != (data & 0x04))
|
||||
{
|
||||
m_flipscreen = data & 0x04;
|
||||
machine().tilemap().set_flip_all(m_flipscreen ? (TILEMAP_FLIPY | TILEMAP_FLIPX) : 0);
|
||||
}
|
||||
|
||||
/* bit 3 is unknown (used, e.g. marukin pulses it on the title screen) */
|
||||
|
||||
/* bit 4 selects OKI M6295 bank */
|
||||
if (m_oki != nullptr)
|
||||
m_oki->set_rom_bank((data >> 4) & 1);
|
||||
|
||||
/* bit 5 is palette RAM bank selector (doesn't apply to mgakuen) */
|
||||
m_paletteram_bank = data & 0x20;
|
||||
|
||||
/* bits 6 and 7 are unknown, used in several places. At first I thought */
|
||||
/* they were bg and sprites enable, but this screws up spang (screen flickers */
|
||||
/* every time you pop a bubble). However, not using them as enable bits screws */
|
||||
/* up marukin - you can see partially built up screens during attract mode. */
|
||||
}
|
||||
|
||||
void mitchell_state::pangbl_gfxctrl_w(uint8_t data)
|
||||
{
|
||||
logerror("PC %04x: pang_gfxctrl_w %02x\n",m_maincpu->pc(),data);
|
||||
{
|
||||
#if 0
|
||||
char baf[40];
|
||||
sprintf(baf,"%02x",data);
|
||||
popmessage(baf);
|
||||
#endif
|
||||
}
|
||||
|
||||
/* bit 0 is unknown (used, maybe back color enable?) */
|
||||
|
||||
/* bit 1 is coin counter */
|
||||
machine().bookkeeping().coin_counter_w(0, data & 2);
|
||||
|
||||
/* bit 2 is flip screen */
|
||||
if (m_flipscreen != (data & 0x04))
|
||||
{
|
||||
m_flipscreen = data & 0x04;
|
||||
machine().tilemap().set_flip_all(m_flipscreen ? (TILEMAP_FLIPY | TILEMAP_FLIPX) : 0);
|
||||
}
|
||||
|
||||
/* bit 3 is unknown (used, e.g. marukin pulses it on the title screen) */
|
||||
|
||||
/* bit 4 selects OKI M6295 bank, nop'ed here */
|
||||
|
||||
/* bit 5 is palette RAM bank selector (doesn't apply to mgakuen) */
|
||||
m_paletteram_bank = data & 0x20;
|
||||
|
||||
/* bits 6 and 7 are unknown, used in several places. At first I thought */
|
||||
/* they were bg and sprites enable, but this screws up spang (screen flickers */
|
||||
/* every time you pop a bubble). However, not using them as enable bits screws */
|
||||
/* up marukin - you can see partially built up screens during attract mode. */
|
||||
}
|
||||
|
||||
void mitchell_state::mstworld_gfxctrl_w(uint8_t data)
|
||||
{
|
||||
logerror("PC %04x: pang_gfxctrl_w %02x\n",m_maincpu->pc(),data);
|
||||
{
|
||||
char baf[40];
|
||||
sprintf(baf,"%02x",data);
|
||||
// popmessage(baf);
|
||||
}
|
||||
|
||||
/* bit 0 is unknown (used, maybe back color enable?) */
|
||||
|
||||
/* bit 1 is coin counter */
|
||||
machine().bookkeeping().coin_counter_w(0, data & 2);
|
||||
|
||||
/* bit 2 is flip screen */
|
||||
if (m_flipscreen != (data & 0x04))
|
||||
{
|
||||
m_flipscreen = data & 0x04;
|
||||
machine().tilemap().set_flip_all(m_flipscreen ? (TILEMAP_FLIPY | TILEMAP_FLIPX) : 0);
|
||||
}
|
||||
|
||||
/* bit 3 is unknown (used, e.g. marukin pulses it on the title screen) */
|
||||
|
||||
/* bit 4 here does not select OKI M6295 bank: mstworld has its own z80 + sound banking */
|
||||
|
||||
/* bit 5 is palette RAM bank selector (doesn't apply to mgakuen) */
|
||||
m_paletteram_bank = data & 0x20;
|
||||
|
||||
/* bits 6 and 7 are unknown, used in several places. At first I thought */
|
||||
/* they were bg and sprites enable, but this screws up spang (screen flickers */
|
||||
/* every time you pop a bubble). However, not using them as enable bits screws */
|
||||
/* up marukin - you can see partially built up screens during attract mode. */
|
||||
}
|
||||
|
||||
void mitchell_state::pang_paletteram_w(offs_t offset, uint8_t data)
|
||||
{
|
||||
m_palette->write8(offset + (m_paletteram_bank ? 0x800 : 0x000), data);
|
||||
}
|
||||
|
||||
uint8_t mitchell_state::pang_paletteram_r(offs_t offset)
|
||||
{
|
||||
return m_paletteram[offset + (m_paletteram_bank ? 0x800 : 0x000)];
|
||||
}
|
||||
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
|
||||
Display refresh
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
void mitchell_state::draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect )
|
||||
{
|
||||
int offs, sx, sy;
|
||||
|
||||
/* the last entry is not a sprite, we skip it otherwise spang shows a bubble */
|
||||
/* moving diagonally across the screen */
|
||||
for (offs = 0x1000 - 0x40; offs >= 0; offs -= 0x20)
|
||||
{
|
||||
int code = m_objram[offs];
|
||||
int attr = m_objram[offs + 1];
|
||||
int color = attr & 0x0f;
|
||||
sx = m_objram[offs + 3] + ((attr & 0x10) << 4);
|
||||
sy = ((m_objram[offs + 2] + 8) & 0xff) - 8;
|
||||
code += (attr & 0xe0) << 3;
|
||||
if (m_flipscreen)
|
||||
{
|
||||
sx = 496 - sx;
|
||||
sy = 240 - sy;
|
||||
}
|
||||
m_gfxdecode->gfx(1)->transpen(bitmap,cliprect,
|
||||
code,
|
||||
color,
|
||||
m_flipscreen, m_flipscreen,
|
||||
sx,sy,15);
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t mitchell_state::screen_update_pang(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
bitmap.fill(0, cliprect);
|
||||
m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0);
|
||||
draw_sprites(bitmap, cliprect);
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user