mirror of
https://github.com/holub/mame
synced 2025-04-16 05:24:54 +03:00
- appoooh.cpp: finders and other small cleanups
- royalmah.cpp: corrected year for ichiban
This commit is contained in:
parent
4cb71c31d2
commit
72de111bf2
@ -3393,8 +3393,6 @@ files {
|
||||
createMAMEProjects(_target, _subtarget, "sanritsu")
|
||||
files {
|
||||
MAME_DIR .. "src/mame/drivers/appoooh.cpp",
|
||||
MAME_DIR .. "src/mame/includes/appoooh.h",
|
||||
MAME_DIR .. "src/mame/video/appoooh.cpp",
|
||||
MAME_DIR .. "src/mame/drivers/bankp.cpp",
|
||||
MAME_DIR .. "src/mame/includes/bankp.h",
|
||||
MAME_DIR .. "src/mame/video/bankp.cpp",
|
||||
|
@ -164,24 +164,345 @@ Language
|
||||
***************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
#include "includes/appoooh.h"
|
||||
|
||||
#include "machine/segacrp2_device.h"
|
||||
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "machine/segacrp2_device.h"
|
||||
#include "sound/msm5205.h"
|
||||
#include "sound/sn76496.h"
|
||||
|
||||
#include "emupal.h"
|
||||
#include "screen.h"
|
||||
#include "speaker.h"
|
||||
#include "tilemap.h"
|
||||
|
||||
|
||||
WRITE_LINE_MEMBER(appoooh_state::adpcm_int)
|
||||
namespace {
|
||||
|
||||
class base_state : public driver_device
|
||||
{
|
||||
public:
|
||||
base_state(const machine_config &mconfig, device_type type, const char *tag) :
|
||||
driver_device(mconfig, type, tag),
|
||||
m_spriteram(*this, "spriteram%u", 1U),
|
||||
m_videoram(*this, "videoram%u", 1U), // 0 FG, 1 BG
|
||||
m_colorram(*this, "colorram%u", 1U), // 0 FG, 1 BG
|
||||
m_mainbank(*this, "mainbank"),
|
||||
m_adpcm_rom(*this, "adpcm"),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_gfxdecode(*this, "gfxdecode"),
|
||||
m_palette(*this, "palette"),
|
||||
m_msm(*this, "msm")
|
||||
{ }
|
||||
|
||||
protected:
|
||||
virtual void machine_start() override;
|
||||
virtual void machine_reset() override;
|
||||
virtual void video_start() override;
|
||||
|
||||
protected:
|
||||
// memory pointers
|
||||
required_shared_ptr_array<uint8_t, 2> m_spriteram;
|
||||
required_shared_ptr_array<uint8_t, 2> m_videoram;
|
||||
required_shared_ptr_array<uint8_t, 2> m_colorram;
|
||||
required_memory_bank m_mainbank;
|
||||
required_region_ptr<uint8_t> m_adpcm_rom;
|
||||
|
||||
// video-related
|
||||
tilemap_t *m_tilemap[2]{};
|
||||
uint8_t m_scroll_x = 0U;
|
||||
uint8_t m_priority = 0U;
|
||||
uint16_t m_spritebase = 0U;
|
||||
|
||||
// sound-related
|
||||
uint32_t m_adpcm_data = 0U;
|
||||
uint32_t m_adpcm_address = 0U;
|
||||
|
||||
// devices
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<gfxdecode_device> m_gfxdecode;
|
||||
required_device<palette_device> m_palette;
|
||||
required_device<msm5205_device> m_msm;
|
||||
|
||||
uint8_t m_nmi_mask = 0U;
|
||||
|
||||
void adpcm_w(uint8_t data);
|
||||
void scroll_w(uint8_t data);
|
||||
template <uint8_t Which> void videoram_w(offs_t offset, uint8_t data);
|
||||
template <uint8_t Which> void colorram_w(offs_t offset, uint8_t data);
|
||||
void out_w(uint8_t data);
|
||||
template <uint8_t Which> TILE_GET_INFO_MEMBER(get_tile_info);
|
||||
|
||||
INTERRUPT_GEN_MEMBER(vblank_irq);
|
||||
void draw_sprites(bitmap_ind16 &dest_bmp, const rectangle &cliprect, gfx_element *gfx, uint8_t *sprite);
|
||||
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
DECLARE_WRITE_LINE_MEMBER(adpcm_int);
|
||||
|
||||
void common(machine_config &config);
|
||||
void main_map(address_map &map);
|
||||
void main_portmap(address_map &map);
|
||||
};
|
||||
|
||||
class appoooh_state : public base_state
|
||||
{
|
||||
public:
|
||||
appoooh_state(const machine_config &mconfig, device_type type, const char *tag) :
|
||||
base_state(mconfig, type, tag)
|
||||
{ m_spritebase = 0; }
|
||||
|
||||
void appoooh(machine_config &config);
|
||||
|
||||
private:
|
||||
void palette(palette_device &palette) const;
|
||||
};
|
||||
|
||||
class robowres_state : public base_state
|
||||
{
|
||||
public:
|
||||
robowres_state(const machine_config &mconfig, device_type type, const char *tag) :
|
||||
base_state(mconfig, type, tag),
|
||||
m_decrypted_opcodes(*this, "decrypted_opcodes")
|
||||
{ m_spritebase = 0x200; }
|
||||
|
||||
void init_robowresb();
|
||||
|
||||
void robowres(machine_config &config);
|
||||
void robowrese(machine_config &config);
|
||||
|
||||
private:
|
||||
// memory pointers
|
||||
required_shared_ptr<uint8_t> m_decrypted_opcodes;
|
||||
|
||||
void palette(palette_device &palette) const;
|
||||
|
||||
void decrypted_opcodes_map(address_map &map);
|
||||
};
|
||||
|
||||
|
||||
// video
|
||||
|
||||
/***************************************************************************
|
||||
|
||||
Convert the color PROMs into a more useable format.
|
||||
|
||||
Palette information of Appoooh is not known.
|
||||
|
||||
The palette decoder of Bank Panic was used for this driver.
|
||||
Because these hardware is similar.
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
void appoooh_state::palette(palette_device &palette) const
|
||||
{
|
||||
const uint8_t *color_prom = memregion("proms")->base();
|
||||
|
||||
for (int i = 0; i < palette.entries(); i++)
|
||||
{
|
||||
uint8_t const pen = (color_prom[0x20 + i] & 0x0f) | ((i < 0x100) ? 0x00 : 0x10);
|
||||
|
||||
// red component
|
||||
int bit0 = BIT(color_prom[pen], 0);
|
||||
int bit1 = BIT(color_prom[pen], 1);
|
||||
int bit2 = BIT(color_prom[pen], 2);
|
||||
int const r = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
|
||||
|
||||
// green component
|
||||
bit0 = BIT(color_prom[pen], 3);
|
||||
bit1 = BIT(color_prom[pen], 4);
|
||||
bit2 = BIT(color_prom[pen], 5);
|
||||
int const g = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
|
||||
|
||||
// blue component
|
||||
bit0 = 0;
|
||||
bit1 = BIT(color_prom[pen], 6);
|
||||
bit2 = BIT(color_prom[pen], 7);
|
||||
int const b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
|
||||
|
||||
palette.set_pen_color(i, rgb_t(r, g, b));
|
||||
}
|
||||
}
|
||||
|
||||
void robowres_state::palette(palette_device &palette) const
|
||||
{
|
||||
const uint8_t *color_prom = memregion("proms")->base();
|
||||
|
||||
for (int i = 0; i < palette.entries(); i++)
|
||||
{
|
||||
uint8_t const pen = color_prom[0x20 + i] & 0x0f;
|
||||
|
||||
// red component
|
||||
int bit0 = BIT(color_prom[pen], 0);
|
||||
int bit1 = BIT(color_prom[pen], 1);
|
||||
int bit2 = BIT(color_prom[pen], 2);
|
||||
int const r = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
|
||||
|
||||
// green component
|
||||
bit0 = BIT(color_prom[pen], 3);
|
||||
bit1 = BIT(color_prom[pen], 4);
|
||||
bit2 = BIT(color_prom[pen], 5);
|
||||
int const g = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
|
||||
|
||||
// blue component
|
||||
bit0 = 0;
|
||||
bit1 = BIT(color_prom[pen], 6);
|
||||
bit2 = BIT(color_prom[pen], 7);
|
||||
int const b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
|
||||
|
||||
palette.set_pen_color(i, rgb_t(r, g, b));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
|
||||
Callbacks for the TileMap code
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
template <uint8_t Which>
|
||||
TILE_GET_INFO_MEMBER(base_state::get_tile_info)
|
||||
{
|
||||
int code = m_videoram[Which][tile_index] + 256 * ((m_colorram[Which][tile_index] >> 5) & 7);
|
||||
|
||||
tileinfo.set(Which,
|
||||
code,
|
||||
m_colorram[Which][tile_index] & 0x0f,
|
||||
(m_colorram[Which][tile_index] & 0x10 ) ? TILEMAP_FLIPX : 0
|
||||
);
|
||||
}
|
||||
|
||||
/***************************************************************************
|
||||
|
||||
Start the video hardware emulation.
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
void base_state::video_start()
|
||||
{
|
||||
m_tilemap[0] = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(base_state::get_tile_info<0>)), TILEMAP_SCAN_ROWS, 8, 8, 32, 32);
|
||||
m_tilemap[1] = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(base_state::get_tile_info<1>)), TILEMAP_SCAN_ROWS, 8, 8, 32, 32);
|
||||
|
||||
m_tilemap[0]->set_transparent_pen(0);
|
||||
m_tilemap[0]->set_scrolldy(8, 8);
|
||||
m_tilemap[1]->set_scrolldy(8, 8);
|
||||
|
||||
save_item(NAME(m_scroll_x));
|
||||
save_item(NAME(m_priority));
|
||||
}
|
||||
|
||||
void base_state::scroll_w(uint8_t data)
|
||||
{
|
||||
m_scroll_x = data;
|
||||
}
|
||||
|
||||
|
||||
template <uint8_t Which>
|
||||
void base_state::videoram_w(offs_t offset, uint8_t data)
|
||||
{
|
||||
m_videoram[Which][offset] = data;
|
||||
m_tilemap[Which]->mark_tile_dirty(offset);
|
||||
}
|
||||
|
||||
template <uint8_t Which>
|
||||
void base_state::colorram_w(offs_t offset, uint8_t data)
|
||||
{
|
||||
m_colorram[Which][offset] = data;
|
||||
m_tilemap[Which]->mark_tile_dirty(offset);
|
||||
}
|
||||
|
||||
void base_state::out_w(uint8_t data)
|
||||
{
|
||||
// bit 0 controls NMI
|
||||
m_nmi_mask = data & 1;
|
||||
|
||||
// bit 1 flip screen
|
||||
flip_screen_set(data & 0x02);
|
||||
|
||||
// bits 2-3 unknown
|
||||
|
||||
/* bits 4-5 are playfield/sprite priority
|
||||
TODO: understand how this works, currently the only thing I do is draw
|
||||
the front layer behind sprites when priority == 0, and invert the sprite
|
||||
order when priority == 1 */
|
||||
m_priority = (data & 0x30) >> 4;
|
||||
|
||||
// bit 6 ROM bank select
|
||||
m_mainbank->set_entry((data & 0x40) ? 1 : 0);
|
||||
|
||||
// bit 7 unknown (used)
|
||||
}
|
||||
|
||||
void base_state::draw_sprites(bitmap_ind16 &dest_bmp, const rectangle &cliprect, gfx_element *gfx, uint8_t *sprite)
|
||||
{
|
||||
int flipy = flip_screen();
|
||||
|
||||
for (int offs = 0x20 - 4; offs >= 0; offs -= 4)
|
||||
{
|
||||
int sy = 240 - sprite[offs + 0];
|
||||
int code = m_spritebase + (sprite[offs + 1] >> 2) + ((sprite[offs + 2] >> 5) & 0x07) * 0x40;
|
||||
int color = sprite[offs + 2] & 0x0f; // TODO: bit 4 toggles continuously, what is it?
|
||||
int sx = sprite[offs + 3];
|
||||
int flipx = sprite[offs + 1] & 0x01;
|
||||
|
||||
if(sx >= 248)
|
||||
sx -= 256;
|
||||
|
||||
if (flipy)
|
||||
{
|
||||
sx = 239 - sx;
|
||||
sy = 239 - sy;
|
||||
flipx = !flipx;
|
||||
}
|
||||
|
||||
gfx->transpen(dest_bmp, cliprect,
|
||||
code,
|
||||
color,
|
||||
flipx, flipy,
|
||||
sx, sy, 0);
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t base_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
// bg tilemap
|
||||
m_tilemap[1]->draw(screen, bitmap, cliprect, 0, 0);
|
||||
|
||||
if (m_priority == 0) // fg behind sprites
|
||||
m_tilemap[0]->draw(screen, bitmap, cliprect, 0, 0);
|
||||
|
||||
// draw sprites
|
||||
if (m_priority == 1)
|
||||
{
|
||||
// sprite set #1
|
||||
draw_sprites(bitmap, cliprect, m_gfxdecode->gfx(2), m_spriteram[0]);
|
||||
// sprite set #2
|
||||
draw_sprites(bitmap, cliprect, m_gfxdecode->gfx(3), m_spriteram[1]);
|
||||
}
|
||||
else
|
||||
{
|
||||
// sprite set #2
|
||||
draw_sprites(bitmap, cliprect, m_gfxdecode->gfx(3), m_spriteram[1]);
|
||||
// sprite set #1
|
||||
draw_sprites(bitmap, cliprect, m_gfxdecode->gfx(2), m_spriteram[0]);
|
||||
}
|
||||
|
||||
if (m_priority != 0) // fg in front of sprites
|
||||
m_tilemap[0]->draw(screen, bitmap, cliprect, 0, 0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// machine
|
||||
|
||||
WRITE_LINE_MEMBER(base_state::adpcm_int)
|
||||
{
|
||||
if (m_adpcm_address != 0xffffffff)
|
||||
{
|
||||
if (m_adpcm_data == 0xffffffff)
|
||||
{
|
||||
uint8_t *RAM = memregion("adpcm")->base();
|
||||
|
||||
m_adpcm_data = RAM[m_adpcm_address++];
|
||||
m_adpcm_data = m_adpcm_rom[m_adpcm_address++];
|
||||
m_msm->data_w(m_adpcm_data >> 4);
|
||||
|
||||
if (m_adpcm_data == 0x70)
|
||||
@ -198,8 +519,8 @@ WRITE_LINE_MEMBER(appoooh_state::adpcm_int)
|
||||
}
|
||||
}
|
||||
|
||||
/* adpcm address write */
|
||||
void appoooh_state::adpcm_w(uint8_t data)
|
||||
// adpcm address write
|
||||
void base_state::adpcm_w(uint8_t data)
|
||||
{
|
||||
m_adpcm_address = data << 8;
|
||||
m_msm->reset_w(0);
|
||||
@ -213,40 +534,40 @@ void appoooh_state::adpcm_w(uint8_t data)
|
||||
*
|
||||
*************************************/
|
||||
|
||||
void appoooh_state::main_map(address_map &map)
|
||||
void base_state::main_map(address_map &map)
|
||||
{
|
||||
map(0x0000, 0x7fff).rom();
|
||||
map(0x8000, 0x9fff).rom();
|
||||
map(0xa000, 0xdfff).bankr("bank1");
|
||||
map(0xa000, 0xdfff).bankr(m_mainbank);
|
||||
map(0xe000, 0xe7ff).ram();
|
||||
map(0xe800, 0xefff).ram(); /* RAM ? */
|
||||
map(0xe800, 0xefff).ram(); // RAM ?
|
||||
|
||||
map(0xf000, 0xf01f).ram().share("spriteram");
|
||||
map(0xf020, 0xf3ff).ram().w(FUNC(appoooh_state::fg_videoram_w)).share("fg_videoram");
|
||||
map(0xf000, 0xf01f).ram().share(m_spriteram[0]);
|
||||
map(0xf020, 0xf3ff).ram().w(FUNC(base_state::videoram_w<0>)).share(m_videoram[0]);
|
||||
map(0xf400, 0xf41f).ram();
|
||||
map(0xf420, 0xf7ff).ram().w(FUNC(appoooh_state::fg_colorram_w)).share("fg_colorram");
|
||||
map(0xf800, 0xf81f).ram().share("spriteram_2");
|
||||
map(0xf820, 0xfbff).ram().w(FUNC(appoooh_state::bg_videoram_w)).share("bg_videoram");
|
||||
map(0xf420, 0xf7ff).ram().w(FUNC(base_state::colorram_w<0>)).share(m_colorram[0]);
|
||||
map(0xf800, 0xf81f).ram().share(m_spriteram[1]);
|
||||
map(0xf820, 0xfbff).ram().w(FUNC(base_state::videoram_w<1>)).share(m_videoram[1]);
|
||||
map(0xfc00, 0xfc1f).ram();
|
||||
map(0xfc20, 0xffff).ram().w(FUNC(appoooh_state::bg_colorram_w)).share("bg_colorram");
|
||||
map(0xfc20, 0xffff).ram().w(FUNC(base_state::colorram_w<1>)).share(m_colorram[1]);
|
||||
}
|
||||
|
||||
void appoooh_state::decrypted_opcodes_map(address_map &map)
|
||||
void robowres_state::decrypted_opcodes_map(address_map &map)
|
||||
{
|
||||
map(0x0000, 0x7fff).rom().share("decrypted_opcodes");
|
||||
map(0x0000, 0x7fff).rom().share(m_decrypted_opcodes);
|
||||
map(0x8000, 0x9fff).rom().region("maincpu", 0x8000);
|
||||
map(0xa000, 0xdfff).bankr("bank1");
|
||||
map(0xa000, 0xdfff).bankr(m_mainbank);
|
||||
}
|
||||
|
||||
void appoooh_state::main_portmap(address_map &map)
|
||||
void base_state::main_portmap(address_map &map)
|
||||
{
|
||||
map.global_mask(0xff);
|
||||
map(0x00, 0x00).portr("P1").w("sn1", FUNC(sn76489_device::write));
|
||||
map(0x01, 0x01).portr("P2").w("sn2", FUNC(sn76489_device::write));
|
||||
map(0x02, 0x02).w("sn3", FUNC(sn76489_device::write));
|
||||
map(0x03, 0x03).portr("DSW1").w(FUNC(appoooh_state::adpcm_w));
|
||||
map(0x04, 0x04).portr("BUTTON3").w(FUNC(appoooh_state::out_w));
|
||||
map(0x05, 0x05).w(FUNC(appoooh_state::scroll_w)); /* unknown */
|
||||
map(0x03, 0x03).portr("DSW1").w(FUNC(base_state::adpcm_w));
|
||||
map(0x04, 0x04).portr("BUTTON3").w(FUNC(base_state::out_w));
|
||||
map(0x05, 0x05).w(FUNC(base_state::scroll_w)); // unknown
|
||||
}
|
||||
|
||||
|
||||
@ -281,7 +602,7 @@ static INPUT_PORTS_START( appoooh )
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON3 )
|
||||
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_COCKTAIL
|
||||
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN3 )
|
||||
PORT_BIT( 0xf8, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* probably unused */
|
||||
PORT_BIT( 0xf8, IP_ACTIVE_HIGH, IPT_UNKNOWN ) // probably unused
|
||||
|
||||
PORT_START("DSW1")
|
||||
PORT_DIPNAME( 0x07, 0x00, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:1,2,3")
|
||||
@ -313,7 +634,7 @@ static INPUT_PORTS_START( robowres )
|
||||
PORT_INCLUDE( appoooh )
|
||||
|
||||
PORT_MODIFY("DSW1")
|
||||
PORT_DIPUNUSED_DIPLOC(0x40,0x40, "SW1:7" ) /* Listed as "Unused" */
|
||||
PORT_DIPUNUSED_DIPLOC(0x40,0x40, "SW1:7" ) // Listed as "Unused"
|
||||
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Language ) ) PORT_DIPLOCATION("SW1:8")
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Japanese ) )
|
||||
PORT_DIPSETTING( 0x80, DEF_STR( English ) )
|
||||
@ -326,39 +647,8 @@ INPUT_PORTS_END
|
||||
*
|
||||
*************************************/
|
||||
|
||||
static const gfx_layout charlayout =
|
||||
{
|
||||
8,8, /* 8*8 characters */
|
||||
2048, /* 2048 characters */
|
||||
3, /* 3 bits per pixel */
|
||||
{ 2*2048*8*8, 1*2048*8*8, 0*2048*8*8 }, /* the bitplanes are separated */
|
||||
{ 7, 6, 5, 4, 3, 2, 1, 0 },
|
||||
{ 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },
|
||||
8*8 /* every char takes 8 consecutive bytes */
|
||||
};
|
||||
|
||||
static const gfx_layout spritelayout =
|
||||
{
|
||||
16,16, /* 8*8 characters */
|
||||
512, /* 512 characters */
|
||||
3, /* 3 bits per pixel */
|
||||
{ 2*2048*8*8, 1*2048*8*8, 0*2048*8*8 }, /* the bitplanes are separated */
|
||||
{ 7, 6, 5, 4, 3, 2, 1, 0 ,
|
||||
8*8+7,8*8+6,8*8+5,8*8+4,8*8+3,8*8+2,8*8+1,8*8+0},
|
||||
{ 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8,
|
||||
16*8, 17*8, 18*8, 19*8, 20*8, 21*8, 22*8, 23*8 },
|
||||
32*8 /* every char takes 8 consecutive bytes */
|
||||
};
|
||||
|
||||
static GFXDECODE_START( gfx_appoooh )
|
||||
GFXDECODE_ENTRY( "gfx1", 0, charlayout, 0, 32 )
|
||||
GFXDECODE_ENTRY( "gfx2", 0, charlayout, 32*8, 32 )
|
||||
GFXDECODE_ENTRY( "gfx1", 0, spritelayout, 0, 32 )
|
||||
GFXDECODE_ENTRY( "gfx2", 0, spritelayout, 32*8, 32 )
|
||||
GFXDECODE_END
|
||||
|
||||
|
||||
static const gfx_layout robowres_charlayout =
|
||||
static const gfx_layout charlayout =
|
||||
{
|
||||
8,8,
|
||||
RGN_FRAC(1,3),
|
||||
@ -369,7 +659,7 @@ static const gfx_layout robowres_charlayout =
|
||||
8*8
|
||||
};
|
||||
|
||||
static const gfx_layout robowres_spritelayout =
|
||||
static const gfx_layout spritelayout =
|
||||
{
|
||||
16,16,
|
||||
RGN_FRAC(1,3),
|
||||
@ -379,15 +669,15 @@ static const gfx_layout robowres_spritelayout =
|
||||
8*8+7,8*8+6,8*8+5,8*8+4,8*8+3,8*8+2,8*8+1,8*8+0},
|
||||
{ 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8,
|
||||
16*8, 17*8, 18*8, 19*8, 20*8, 21*8, 22*8, 23*8 },
|
||||
32*8 /* every char takes 8 consecutive bytes */
|
||||
32*8 // every char takes 8 consecutive bytes
|
||||
};
|
||||
|
||||
|
||||
static GFXDECODE_START( gfx_robowres )
|
||||
GFXDECODE_ENTRY( "gfx1", 0, robowres_charlayout, 0, 32 )
|
||||
GFXDECODE_ENTRY( "gfx2", 0, robowres_charlayout, 0, 32 )
|
||||
GFXDECODE_ENTRY( "gfx1", 0, robowres_spritelayout, 0, 32 )
|
||||
GFXDECODE_ENTRY( "gfx2", 0, robowres_spritelayout, 0, 32 )
|
||||
static GFXDECODE_START( gfx_appoooh )
|
||||
GFXDECODE_ENTRY( "gfx1", 0, charlayout, 0, 32 )
|
||||
GFXDECODE_ENTRY( "gfx2", 0, charlayout, 32*8, 32 )
|
||||
GFXDECODE_ENTRY( "gfx1", 0, spritelayout, 0, 32 )
|
||||
GFXDECODE_ENTRY( "gfx2", 0, spritelayout, 32*8, 32 )
|
||||
GFXDECODE_END
|
||||
|
||||
|
||||
@ -397,16 +687,15 @@ GFXDECODE_END
|
||||
*
|
||||
*************************************/
|
||||
|
||||
void appoooh_state::machine_start()
|
||||
void base_state::machine_start()
|
||||
{
|
||||
membank("bank1")->configure_entries(0, 2, memregion("maincpu")->base() + 0xa000, 0x6000);
|
||||
m_mainbank->configure_entries(0, 2, memregion("maincpu")->base() + 0xa000, 0x6000);
|
||||
|
||||
save_item(NAME(m_adpcm_data));
|
||||
save_item(NAME(m_adpcm_address));
|
||||
}
|
||||
|
||||
|
||||
void appoooh_state::machine_reset()
|
||||
void base_state::machine_reset()
|
||||
{
|
||||
m_adpcm_address = 0xffffffff;
|
||||
m_adpcm_data = 0;
|
||||
@ -414,79 +703,79 @@ void appoooh_state::machine_reset()
|
||||
m_priority = 0;
|
||||
}
|
||||
|
||||
INTERRUPT_GEN_MEMBER(appoooh_state::vblank_irq)
|
||||
INTERRUPT_GEN_MEMBER(base_state::vblank_irq)
|
||||
{
|
||||
if(m_nmi_mask)
|
||||
if (m_nmi_mask)
|
||||
device.execute().pulse_input_line(INPUT_LINE_NMI, attotime::zero);
|
||||
}
|
||||
|
||||
void appoooh_state::appoooh_common(machine_config &config)
|
||||
void base_state::common(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
Z80(config, m_maincpu, 18432000/6); /* ??? the main xtal is 18.432 MHz */
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &appoooh_state::main_map);
|
||||
m_maincpu->set_addrmap(AS_IO, &appoooh_state::main_portmap);
|
||||
m_maincpu->set_vblank_int("screen", FUNC(appoooh_state::vblank_irq));
|
||||
// basic machine hardware
|
||||
Z80(config, m_maincpu, 18.432_MHz_XTAL / 6); // divider unknown
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &base_state::main_map);
|
||||
m_maincpu->set_addrmap(AS_IO, &base_state::main_portmap);
|
||||
m_maincpu->set_vblank_int("screen", FUNC(base_state::vblank_irq));
|
||||
|
||||
/* sound hardware */
|
||||
// sound hardware
|
||||
SPEAKER(config, "mono").front_center();
|
||||
|
||||
SN76489(config, "sn1", 18432000/6).add_route(ALL_OUTPUTS, "mono", 0.30);
|
||||
SN76489(config, "sn2", 18432000/6).add_route(ALL_OUTPUTS, "mono", 0.30);
|
||||
SN76489(config, "sn3", 18432000/6).add_route(ALL_OUTPUTS, "mono", 0.30);
|
||||
SN76489(config, "sn1", 18.432_MHz_XTAL / 6).add_route(ALL_OUTPUTS, "mono", 0.30); // divider unknown
|
||||
SN76489(config, "sn2", 18.432_MHz_XTAL / 6).add_route(ALL_OUTPUTS, "mono", 0.30); // divider unknown
|
||||
SN76489(config, "sn3", 18.432_MHz_XTAL / 6).add_route(ALL_OUTPUTS, "mono", 0.30); // divider unknown
|
||||
|
||||
MSM5205(config, m_msm, 384000);
|
||||
m_msm->vck_legacy_callback().set(FUNC(appoooh_state::adpcm_int)); /* interrupt function */
|
||||
m_msm->set_prescaler_selector(msm5205_device::S64_4B); /* 6KHz */
|
||||
m_msm->vck_legacy_callback().set(FUNC(base_state::adpcm_int)); // interrupt function
|
||||
m_msm->set_prescaler_selector(msm5205_device::S64_4B); // 6KHz
|
||||
m_msm->add_route(ALL_OUTPUTS, "mono", 0.50);
|
||||
}
|
||||
|
||||
void appoooh_state::appoooh(machine_config &config)
|
||||
{
|
||||
appoooh_common(config);
|
||||
common(config);
|
||||
|
||||
/* video hardware */
|
||||
// video hardware
|
||||
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
|
||||
screen.set_refresh_hz(60);
|
||||
screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
|
||||
screen.set_size(32*8, 32*8);
|
||||
screen.set_visarea(0*8, 32*8-1, 2*8, 30*8-1);
|
||||
screen.set_screen_update(FUNC(appoooh_state::screen_update_appoooh));
|
||||
screen.set_screen_update(FUNC(appoooh_state::screen_update));
|
||||
screen.set_palette(m_palette);
|
||||
|
||||
GFXDECODE(config, m_gfxdecode, m_palette, gfx_appoooh);
|
||||
PALETTE(config, m_palette, FUNC(appoooh_state::appoooh_palette), 32*8+32*8);
|
||||
PALETTE(config, m_palette, FUNC(appoooh_state::palette), 32*8+32*8);
|
||||
}
|
||||
|
||||
|
||||
void appoooh_state::robowres(machine_config &config)
|
||||
void robowres_state::robowres(machine_config &config)
|
||||
{
|
||||
appoooh_common(config);
|
||||
common(config);
|
||||
|
||||
m_maincpu->set_addrmap(AS_OPCODES, &appoooh_state::decrypted_opcodes_map);
|
||||
m_maincpu->set_addrmap(AS_OPCODES, &robowres_state::decrypted_opcodes_map);
|
||||
|
||||
/* video hardware */
|
||||
// video hardware
|
||||
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
|
||||
screen.set_refresh_hz(60);
|
||||
screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
|
||||
screen.set_size(32*8, 32*8);
|
||||
screen.set_visarea(0*8, 32*8-1, 2*8, 30*8-1);
|
||||
screen.set_screen_update(FUNC(appoooh_state::screen_update_robowres));
|
||||
screen.set_screen_update(FUNC(robowres_state::screen_update));
|
||||
screen.set_palette(m_palette);
|
||||
|
||||
GFXDECODE(config, m_gfxdecode, m_palette, gfx_robowres);
|
||||
PALETTE(config, m_palette, FUNC(appoooh_state::robowres_palette), 32*8+32*8);
|
||||
GFXDECODE(config, m_gfxdecode, m_palette, gfx_appoooh);
|
||||
PALETTE(config, m_palette, FUNC(robowres_state::palette), 32*8+32*8);
|
||||
}
|
||||
|
||||
void appoooh_state::robowrese(machine_config &config)
|
||||
void robowres_state::robowrese(machine_config &config)
|
||||
{
|
||||
robowres(config);
|
||||
|
||||
sega_315_5179_device &maincpu(SEGA_315_5179(config.replace(), m_maincpu, 18432000/6)); /* ??? the main xtal is 18.432 MHz */
|
||||
maincpu.set_addrmap(AS_PROGRAM, &appoooh_state::main_map);
|
||||
maincpu.set_addrmap(AS_IO, &appoooh_state::main_portmap);
|
||||
maincpu.set_vblank_int("screen", FUNC(appoooh_state::vblank_irq));
|
||||
maincpu.set_addrmap(AS_OPCODES, &appoooh_state::decrypted_opcodes_map);
|
||||
sega_315_5179_device &maincpu(SEGA_315_5179(config.replace(), m_maincpu, 18.432_MHz_XTAL / 6)); // divider unknown
|
||||
maincpu.set_addrmap(AS_PROGRAM, &robowres_state::main_map);
|
||||
maincpu.set_addrmap(AS_IO, &robowres_state::main_portmap);
|
||||
maincpu.set_vblank_int("screen", FUNC(robowres_state::vblank_irq));
|
||||
maincpu.set_addrmap(AS_OPCODES, &robowres_state::decrypted_opcodes_map);
|
||||
maincpu.set_decrypted_tag(m_decrypted_opcodes);
|
||||
}
|
||||
|
||||
@ -497,33 +786,33 @@ void appoooh_state::robowrese(machine_config &config)
|
||||
*************************************/
|
||||
|
||||
ROM_START( appoooh )
|
||||
ROM_REGION( 0x14000, "maincpu", 0 ) /* 64k for code + 16k bank */
|
||||
ROM_REGION( 0x14000, "maincpu", 0 )
|
||||
ROM_LOAD( "epr-5906.bin", 0x00000, 0x2000, CRC(fffae7fe) SHA1(b4bb60eb6331e503759bd963eafefa69331d6b86) )
|
||||
ROM_LOAD( "epr-5907.bin", 0x02000, 0x2000, CRC(57696cd6) SHA1(74a005d18d55fed9ece9b579d2e7e6619a47538b) )
|
||||
ROM_LOAD( "epr-5908.bin", 0x04000, 0x2000, CRC(4537cddc) SHA1(ecb71cab7b9269d713399987cbc45ff54735019f) )
|
||||
ROM_LOAD( "epr-5909.bin", 0x06000, 0x2000, CRC(cf82718d) SHA1(4408c468a422735ae8f69c03003157782f1a0210) )
|
||||
ROM_LOAD( "epr-5910.bin", 0x08000, 0x2000, CRC(312636da) SHA1(18817df6f2e480810726f7b11f289c59e712ee45) )
|
||||
ROM_LOAD( "epr-5911.bin", 0x0a000, 0x2000, CRC(0bc2acaa) SHA1(1ae904658ce9e44cdb79f0a13202aaff5c9f9480) ) /* bank0 */
|
||||
ROM_LOAD( "epr-5913.bin", 0x0c000, 0x2000, CRC(f5a0e6a7) SHA1(7fad534d1fba52078c4ea580ca7601fdd23cbfa6) ) /* a000-dfff */
|
||||
ROM_LOAD( "epr-5912.bin", 0x10000, 0x2000, CRC(3c3915ab) SHA1(28b501bda992ac06b10dbb5f1f7d6009f2f5f48c) ) /* bank1 */
|
||||
ROM_LOAD( "epr-5914.bin", 0x12000, 0x2000, CRC(58792d4a) SHA1(8acdb0ebee5faadadd64bd64db1fdf881ee70333) ) /* a000-dfff */
|
||||
ROM_LOAD( "epr-5911.bin", 0x0a000, 0x2000, CRC(0bc2acaa) SHA1(1ae904658ce9e44cdb79f0a13202aaff5c9f9480) ) // bank0
|
||||
ROM_LOAD( "epr-5913.bin", 0x0c000, 0x2000, CRC(f5a0e6a7) SHA1(7fad534d1fba52078c4ea580ca7601fdd23cbfa6) ) // a000-dfff
|
||||
ROM_LOAD( "epr-5912.bin", 0x10000, 0x2000, CRC(3c3915ab) SHA1(28b501bda992ac06b10dbb5f1f7d6009f2f5f48c) ) // bank1
|
||||
ROM_LOAD( "epr-5914.bin", 0x12000, 0x2000, CRC(58792d4a) SHA1(8acdb0ebee5faadadd64bd64db1fdf881ee70333) ) // a000-dfff
|
||||
|
||||
ROM_REGION( 0x0c000, "gfx1", 0 )
|
||||
ROM_LOAD( "epr-5895.bin", 0x00000, 0x4000, CRC(4b0d4294) SHA1(f9f4d928c76b32cbcbaf7bfd0ebec2d4dfc37566) ) /* playfield #1 chars */
|
||||
ROM_LOAD( "epr-5895.bin", 0x00000, 0x4000, CRC(4b0d4294) SHA1(f9f4d928c76b32cbcbaf7bfd0ebec2d4dfc37566) ) // playfield #1 chars
|
||||
ROM_LOAD( "epr-5896.bin", 0x04000, 0x4000, CRC(7bc84d75) SHA1(36e98eaac1ba23ab842080205bdb5b76b888ddc2) )
|
||||
ROM_LOAD( "epr-5897.bin", 0x08000, 0x4000, CRC(745f3ffa) SHA1(03f5d1d567e786e7835defc6995d1b39aee2c28d) )
|
||||
|
||||
ROM_REGION( 0x0c000, "gfx2", 0 )
|
||||
ROM_LOAD( "epr-5898.bin", 0x00000, 0x4000, CRC(cf01644d) SHA1(0cc1b7f7a3b33b0edf4e277e320467b19dfc5bc8) ) /* playfield #2 chars */
|
||||
ROM_LOAD( "epr-5898.bin", 0x00000, 0x4000, CRC(cf01644d) SHA1(0cc1b7f7a3b33b0edf4e277e320467b19dfc5bc8) ) // playfield #2 chars
|
||||
ROM_LOAD( "epr-5899.bin", 0x04000, 0x4000, CRC(885ad636) SHA1(d040948f7cf030e4ab0f0509df23cb855e9c920c) )
|
||||
ROM_LOAD( "epr-5900.bin", 0x08000, 0x4000, CRC(a8ed13f3) SHA1(31c4a52fea8f26b4a79564c7e8443a88d43aee12) )
|
||||
|
||||
ROM_REGION( 0x0220, "proms", 0 )
|
||||
ROM_LOAD( "pr5921.prm", 0x0000, 0x020, CRC(f2437229) SHA1(8fb4240142f4c77f820d7c153c22ff82f66aa7b1) ) /* palette */
|
||||
ROM_LOAD( "pr5922.prm", 0x0020, 0x100, CRC(85c542bf) SHA1(371d92fca2ae609a47d3a2ea349f14f30b846da8) ) /* charset #1 lookup table */
|
||||
ROM_LOAD( "pr5923.prm", 0x0120, 0x100, CRC(16acbd53) SHA1(e5791646730c6232efa2c0327b484472c47baf21) ) /* charset #2 lookup table */
|
||||
ROM_LOAD( "pr5921.prm", 0x0000, 0x020, CRC(f2437229) SHA1(8fb4240142f4c77f820d7c153c22ff82f66aa7b1) ) // palette
|
||||
ROM_LOAD( "pr5922.prm", 0x0020, 0x100, CRC(85c542bf) SHA1(371d92fca2ae609a47d3a2ea349f14f30b846da8) ) // charset #1 lookup table
|
||||
ROM_LOAD( "pr5923.prm", 0x0120, 0x100, CRC(16acbd53) SHA1(e5791646730c6232efa2c0327b484472c47baf21) ) // charset #2 lookup table
|
||||
|
||||
ROM_REGION( 0xa000, "adpcm", 0 ) /* adpcm voice data */
|
||||
ROM_REGION( 0xa000, "adpcm", 0 )
|
||||
ROM_LOAD( "epr-5901.bin", 0x0000, 0x2000, CRC(170a10a4) SHA1(7b0c8427c69525cbcbe9f88b22b12aafb6949bfd) )
|
||||
ROM_LOAD( "epr-5902.bin", 0x2000, 0x2000, CRC(f6981640) SHA1(1a93913ecb64d1c459e5bbcc28c4ca3ea90f21e1) )
|
||||
ROM_LOAD( "epr-5903.bin", 0x4000, 0x2000, CRC(0439df50) SHA1(1f981c1867366fa57de25ff8f421c121d82d7321) )
|
||||
@ -532,7 +821,7 @@ ROM_START( appoooh )
|
||||
ROM_END
|
||||
|
||||
ROM_START( robowres )
|
||||
ROM_REGION( 0x1c000, "maincpu", 0 ) /* 64k for code + 16k bank */
|
||||
ROM_REGION( 0x1c000, "maincpu", 0 )
|
||||
ROM_LOAD( "epr-7540.13d", 0x00000, 0x8000, CRC(a2a54237) SHA1(06c80fe6725582d19aa957728977e871e79e79e1) )
|
||||
ROM_LOAD( "epr-7541.14d", 0x08000, 0x6000, CRC(cbf7d1a8) SHA1(5eb6d2130d4e5401a332df6db5cad07f3131e8e4) )
|
||||
ROM_CONTINUE( 0x10000, 0x2000 )
|
||||
@ -550,16 +839,16 @@ ROM_START( robowres )
|
||||
ROM_LOAD( "epr-7549.5d", 0x10000, 0x8000, CRC(f640afbb) SHA1(3aa563866f7160038ce6b1aa3204bd9d286e0a46) )
|
||||
|
||||
ROM_REGION( 0x0220, "proms", 0 )
|
||||
ROM_LOAD( "pr7571.10a", 0x00000, 0x0020, CRC(e82c6d5c) SHA1(de3090bf922171abd1c30f20ca163f387adc60e1) )
|
||||
ROM_LOAD( "pr7571.10a", 0x00000, 0x0020, CRC(e82c6d5c) SHA1(de3090bf922171abd1c30f20ca163f387adc60e1) )
|
||||
ROM_LOAD( "pr7572.7f", 0x00020, 0x0100, CRC(2b083d0c) SHA1(5b39bd4297bec788caac9e9de5128d43932a24e2) )
|
||||
ROM_LOAD( "pr7573.7g", 0x00120, 0x0100, CRC(2b083d0c) SHA1(5b39bd4297bec788caac9e9de5128d43932a24e2) )
|
||||
|
||||
ROM_REGION( 0x8000, "adpcm", 0 ) /* adpcm voice data */
|
||||
ROM_REGION( 0x8000, "adpcm", 0 )
|
||||
ROM_LOAD( "epr-7543.12b", 0x00000, 0x8000, CRC(4d108c49) SHA1(a7c3c5a5ad36917ea7f6d917377c2392fa9beea3) )
|
||||
ROM_END
|
||||
|
||||
ROM_START( robowresb )
|
||||
ROM_REGION( 0x1c000+0x8000, "maincpu", 0 ) /* 64k for code + 16k bank */
|
||||
ROM_REGION( 0x24000, "maincpu", 0 )
|
||||
ROM_LOAD( "dg4.e13", 0x00000, 0x8000, CRC(f7585d4f) SHA1(718879f8262681b6b66968eb49a0fb04fda5160b) )
|
||||
ROM_LOAD( "epr-7541.14d", 0x08000, 0x6000, CRC(cbf7d1a8) SHA1(5eb6d2130d4e5401a332df6db5cad07f3131e8e4) )
|
||||
ROM_CONTINUE( 0x10000, 0x2000 )
|
||||
@ -578,11 +867,11 @@ ROM_START( robowresb )
|
||||
ROM_LOAD( "epr-7549.5d", 0x10000, 0x8000, CRC(f640afbb) SHA1(3aa563866f7160038ce6b1aa3204bd9d286e0a46) )
|
||||
|
||||
ROM_REGION( 0x0220, "proms", 0 )
|
||||
ROM_LOAD( "pr7571.10a", 0x00000, 0x0020, CRC(e82c6d5c) SHA1(de3090bf922171abd1c30f20ca163f387adc60e1) )
|
||||
ROM_LOAD( "pr7571.10a", 0x00000, 0x0020, CRC(e82c6d5c) SHA1(de3090bf922171abd1c30f20ca163f387adc60e1) )
|
||||
ROM_LOAD( "pr7572.7f", 0x00020, 0x0100, CRC(2b083d0c) SHA1(5b39bd4297bec788caac9e9de5128d43932a24e2) )
|
||||
ROM_LOAD( "pr7573.7g", 0x00120, 0x0100, CRC(2b083d0c) SHA1(5b39bd4297bec788caac9e9de5128d43932a24e2) )
|
||||
|
||||
ROM_REGION( 0x8000, "adpcm", 0 ) /* adpcm voice data */
|
||||
ROM_REGION( 0x8000, "adpcm", 0 )
|
||||
ROM_LOAD( "epr-7543.12b", 0x00000, 0x8000, CRC(4d108c49) SHA1(a7c3c5a5ad36917ea7f6d917377c2392fa9beea3) )
|
||||
ROM_END
|
||||
|
||||
@ -595,11 +884,13 @@ ROM_END
|
||||
*************************************/
|
||||
|
||||
|
||||
void appoooh_state::init_robowresb()
|
||||
void robowres_state::init_robowresb()
|
||||
{
|
||||
memcpy(m_decrypted_opcodes, memregion("maincpu")->base() + 0x1c000, 0x8000);
|
||||
}
|
||||
|
||||
} // anonymous namespace
|
||||
|
||||
|
||||
/*************************************
|
||||
*
|
||||
@ -607,6 +898,6 @@ void appoooh_state::init_robowresb()
|
||||
*
|
||||
*************************************/
|
||||
|
||||
GAME( 1984, appoooh, 0, appoooh, appoooh, appoooh_state, empty_init, ROT0, "Sanritsu / Sega", "Appoooh", MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1986, robowres, 0, robowrese, robowres, appoooh_state, empty_init, ROT0, "Sanritsu / Sega", "Robo Wres 2001", MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1986, robowresb, robowres, robowres, robowres, appoooh_state, init_robowresb, ROT0, "bootleg", "Robo Wres 2001 (bootleg)", MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1984, appoooh, 0, appoooh, appoooh, appoooh_state, empty_init, ROT0, "Sanritsu / Sega", "Appoooh", MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1986, robowres, 0, robowrese, robowres, robowres_state, empty_init, ROT0, "Sanritsu / Sega", "Robo Wres 2001", MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1986, robowresb, robowres, robowres, robowres, robowres_state, init_robowresb, ROT0, "bootleg", "Robo Wres 2001 (bootleg)", MACHINE_SUPPORTS_SAVE )
|
||||
|
@ -34,11 +34,11 @@ Year + Game Board(s) CPU Company Not
|
||||
88 Almond Pinky D1401128L-0 + RM-1D Z80 Dynax
|
||||
89 Mahjong Shinkirou D210301BL2 + FRM-00? TLCS-90 Dynax
|
||||
89 Mahjong Derringer D2203018L Z80 Dynax Larger palette
|
||||
9? Ichi Ban Jian MJ911 Z80 Excel Larger palette, additional YM2413
|
||||
90 Mahjong If..? D2909278L TLCS-90 Dynax Larger palette
|
||||
91 Mahjong Vegas D5011308L1 + FRM-00 TLCS-90 Dynax Undumped internal rom (mjvegas set)
|
||||
92 Mahjong Cafe Time D6310128L1-1 TLCS-90 Dynax Larger palette, RTC
|
||||
93 Mahjong Cafe Doll D76052208L-2 TLCS-90 Dynax Larger palette, RTC, Undumped internal rom
|
||||
93 Ichi Ban Jian MJ911 Z80 Excel Larger palette, additional YM2413
|
||||
95 Mahjong Tensinhai D10010318L1 TLCS-90 Dynax Larger palette, RTC
|
||||
96 Janputer '96 NS503X0727 Z80 Dynax Larger palette, RTC
|
||||
97 Janputer Special CS166P008 + NS5110207 Z80 Dynax Larger palette, RTC
|
||||
@ -5499,7 +5499,7 @@ ROM_END
|
||||
/***************************************************************************
|
||||
|
||||
Ichi Ban Jyan
|
||||
Excel, 199?
|
||||
Excel, 1993
|
||||
|
||||
PCB Layout
|
||||
----------
|
||||
@ -5738,7 +5738,6 @@ GAME( 1989, mjdejavu, 0, mjdejavu, mjdejavu, royalmah_state, init_mjifb,
|
||||
GAME( 1989, mjdejav2, mjdejavu, mjdejavu, mjdejavu, royalmah_state, init_mjifb, ROT0, "Dynax", "Mahjong Shinkirou Deja Vu 2 (Japan)", MACHINE_NOT_WORKING )
|
||||
GAME( 1989, mjderngr, 0, mjderngr, mjderngr, royalmah_state, init_dynax, ROT0, "Dynax", "Mahjong Derringer (Japan)", 0 )
|
||||
GAME( 1989, daisyari, 0, daisyari, daisyari, royalmah_state, init_daisyari, ROT0, "Best System", "Daisyarin [BET] (Japan)", 0 )
|
||||
GAME( 199?, ichiban, 0, ichiban, ichiban, royalmah_state, empty_init, ROT0, "Excel", "Ichi Ban Jyan", MACHINE_NOT_WORKING | MACHINE_WRONG_COLORS | MACHINE_IMPERFECT_SOUND ) // should just need correct palette and ROM banking
|
||||
GAME( 1990, mjifb, 0, mjifb, mjifb, royalmah_state, init_mjifb, ROT0, "Dynax", "Mahjong If...? [BET]", 0 )
|
||||
GAME( 1990, mjifb2, mjifb, mjifb, mjifb, royalmah_state, init_mjifb, ROT0, "Dynax", "Mahjong If...? [BET](2921)", 0 )
|
||||
GAME( 1990, mjifb3, mjifb, mjifb, mjifb, royalmah_state, init_mjifb, ROT0, "Dynax", "Mahjong If...? [BET](2931)", 0 )
|
||||
@ -5746,6 +5745,7 @@ GAME( 1991, mjvegasa, 0, mjvegasa, mjvegasa, royalmah_state, init_mjvega
|
||||
GAME( 1991, mjvegas, mjvegasa, mjvegasa, mjvegasa, royalmah_state, init_mjvegasa, ROT0, "Dynax", "Mahjong Vegas (Japan)", MACHINE_NOT_WORKING )
|
||||
GAME( 1992, cafetime, 0, cafetime, cafetime, royalmah_state, init_cafetime, ROT0, "Dynax", "Mahjong Cafe Time", 0 )
|
||||
GAME( 1993, cafedoll, 0, mjifb, mjifb, royalmah_state, init_mjifb, ROT0, "Dynax", "Mahjong Cafe Doll (Japan)", MACHINE_NOT_WORKING )
|
||||
GAME( 1993, ichiban, 0, ichiban, ichiban, royalmah_state, empty_init, ROT0, "Excel", "Ichi Ban Jyan", MACHINE_NOT_WORKING | MACHINE_WRONG_COLORS | MACHINE_IMPERFECT_SOUND ) // should just need correct palette and ROM banking
|
||||
GAME( 1995, mjtensin, 0, mjtensin, mjtensin, royalmah_state, init_mjtensin, ROT0, "Dynax", "Mahjong Tensinhai (Japan)", MACHINE_NOT_WORKING )
|
||||
GAME( 1996, janptr96, 0, janptr96, janptr96, royalmah_state, init_janptr96, ROT0, "Dynax", "Janputer '96 (Japan)", 0 )
|
||||
GAME( 1997, janptrsp, 0, janptr96, janptr96, royalmah_state, init_janptr96, ROT0, "Dynax", "Janputer Special (Japan)", 0 )
|
||||
|
@ -1,91 +0,0 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Tatsuyuki Satoh
|
||||
#ifndef MAME_INCLUDES_APPOOOH_H
|
||||
#define MAME_INCLUDES_APPOOOH_H
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "sound/msm5205.h"
|
||||
#include "emupal.h"
|
||||
#include "tilemap.h"
|
||||
|
||||
class appoooh_state : public driver_device
|
||||
{
|
||||
public:
|
||||
appoooh_state(const machine_config &mconfig, device_type type, const char *tag) :
|
||||
driver_device(mconfig, type, tag),
|
||||
m_spriteram(*this, "spriteram"),
|
||||
m_fg_videoram(*this, "fg_videoram"),
|
||||
m_fg_colorram(*this, "fg_colorram"),
|
||||
m_spriteram_2(*this, "spriteram_2"),
|
||||
m_bg_videoram(*this, "bg_videoram"),
|
||||
m_bg_colorram(*this, "bg_colorram"),
|
||||
m_decrypted_opcodes(*this, "decrypted_opcodes"),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_gfxdecode(*this, "gfxdecode"),
|
||||
m_palette(*this, "palette"),
|
||||
m_msm(*this, "msm")
|
||||
{ }
|
||||
|
||||
void init_robowresb();
|
||||
void appoooh(machine_config &config);
|
||||
void robowres(machine_config &config);
|
||||
void robowrese(machine_config &config);
|
||||
|
||||
protected:
|
||||
void adpcm_w(uint8_t data);
|
||||
void scroll_w(uint8_t data);
|
||||
void fg_videoram_w(offs_t offset, uint8_t data);
|
||||
void fg_colorram_w(offs_t offset, uint8_t data);
|
||||
void bg_videoram_w(offs_t offset, uint8_t data);
|
||||
void bg_colorram_w(offs_t offset, uint8_t data);
|
||||
void out_w(uint8_t data);
|
||||
TILE_GET_INFO_MEMBER(get_fg_tile_info);
|
||||
TILE_GET_INFO_MEMBER(get_bg_tile_info);
|
||||
virtual void machine_start() override;
|
||||
virtual void machine_reset() override;
|
||||
virtual void video_start() override;
|
||||
void appoooh_palette(palette_device &palette) const;
|
||||
void robowres_palette(palette_device &palette) const;
|
||||
uint32_t screen_update_appoooh(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
uint32_t screen_update_robowres(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
INTERRUPT_GEN_MEMBER(vblank_irq);
|
||||
void appoooh_draw_sprites( bitmap_ind16 &dest_bmp, const rectangle &cliprect, gfx_element *gfx, uint8_t *sprite );
|
||||
void robowres_draw_sprites( bitmap_ind16 &dest_bmp, const rectangle &cliprect, gfx_element *gfx, uint8_t *sprite );
|
||||
DECLARE_WRITE_LINE_MEMBER(adpcm_int);
|
||||
|
||||
void appoooh_common(machine_config &config);
|
||||
void decrypted_opcodes_map(address_map &map);
|
||||
void main_map(address_map &map);
|
||||
void main_portmap(address_map &map);
|
||||
|
||||
private:
|
||||
/* memory pointers */
|
||||
required_shared_ptr<uint8_t> m_spriteram;
|
||||
required_shared_ptr<uint8_t> m_fg_videoram;
|
||||
required_shared_ptr<uint8_t> m_fg_colorram;
|
||||
required_shared_ptr<uint8_t> m_spriteram_2;
|
||||
required_shared_ptr<uint8_t> m_bg_videoram;
|
||||
required_shared_ptr<uint8_t> m_bg_colorram;
|
||||
optional_shared_ptr<uint8_t> m_decrypted_opcodes;
|
||||
|
||||
/* video-related */
|
||||
tilemap_t *m_fg_tilemap = nullptr;
|
||||
tilemap_t *m_bg_tilemap = nullptr;
|
||||
int m_scroll_x = 0;
|
||||
int m_priority = 0;
|
||||
|
||||
/* sound-related */
|
||||
uint32_t m_adpcm_data = 0U;
|
||||
uint32_t m_adpcm_address = 0U;
|
||||
|
||||
/* devices */
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<gfxdecode_device> m_gfxdecode;
|
||||
required_device<palette_device> m_palette;
|
||||
required_device<msm5205_device> m_msm;
|
||||
|
||||
uint8_t m_nmi_mask = 0U;
|
||||
};
|
||||
|
||||
#endif // MAME_INCLUDES_APPOOOH_H
|
@ -36851,7 +36851,7 @@ cafetime // "63" (c) 1992 Dynax
|
||||
chalgirl // bootleg
|
||||
daisyari // (c) 1989 Best System
|
||||
dondenmj // "03" (c) 1986 Dyna Electronics
|
||||
ichiban // (c) 199? Excel
|
||||
ichiban // (c) 1993 Excel
|
||||
ippatsu // 01? (c) 1986 Dyna Electronics
|
||||
jangtaku // (c) 1986 Dyna Computer
|
||||
janoh // (c) 1984 Toaplan
|
||||
|
@ -1,311 +0,0 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Tatsuyuki Satoh
|
||||
/***************************************************************************
|
||||
|
||||
video.c
|
||||
|
||||
Functions to emulate the video hardware of the machine.
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
#include "includes/appoooh.h"
|
||||
|
||||
/***************************************************************************
|
||||
|
||||
Convert the color PROMs into a more useable format.
|
||||
|
||||
Palette information of appoooh is not known.
|
||||
|
||||
The palette decoder of Bank Panic was used for this driver.
|
||||
Because these hardware is similar.
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
void appoooh_state::appoooh_palette(palette_device &palette) const
|
||||
{
|
||||
const uint8_t *color_prom = memregion("proms")->base();
|
||||
|
||||
for (int i = 0; i < palette.entries(); i++)
|
||||
{
|
||||
int bit0, bit1, bit2;
|
||||
|
||||
uint8_t const pen = (color_prom[0x20 + i] & 0x0f) | ((i < 0x100) ? 0x00 : 0x10);
|
||||
|
||||
// red component
|
||||
bit0 = BIT(color_prom[pen], 0);
|
||||
bit1 = BIT(color_prom[pen], 1);
|
||||
bit2 = BIT(color_prom[pen], 2);
|
||||
int const r = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
|
||||
|
||||
// green component
|
||||
bit0 = BIT(color_prom[pen], 3);
|
||||
bit1 = BIT(color_prom[pen], 4);
|
||||
bit2 = BIT(color_prom[pen], 5);
|
||||
int const g = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
|
||||
|
||||
// blue component
|
||||
bit0 = 0;
|
||||
bit1 = BIT(color_prom[pen], 6);
|
||||
bit2 = BIT(color_prom[pen], 7);
|
||||
int const b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
|
||||
|
||||
palette.set_pen_color(i, rgb_t(r, g, b));
|
||||
}
|
||||
}
|
||||
|
||||
void appoooh_state::robowres_palette(palette_device &palette) const
|
||||
{
|
||||
const uint8_t *color_prom = memregion("proms")->base();
|
||||
|
||||
for (int i = 0; i < palette.entries(); i++)
|
||||
{
|
||||
int bit0, bit1, bit2;
|
||||
|
||||
uint8_t const pen = color_prom[0x20 + i] & 0x0f;
|
||||
|
||||
// red component
|
||||
bit0 = BIT(color_prom[pen], 0);
|
||||
bit1 = BIT(color_prom[pen], 1);
|
||||
bit2 = BIT(color_prom[pen], 2);
|
||||
int const r = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
|
||||
|
||||
// green component
|
||||
bit0 = BIT(color_prom[pen], 3);
|
||||
bit1 = BIT(color_prom[pen], 4);
|
||||
bit2 = BIT(color_prom[pen], 5);
|
||||
int const g = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
|
||||
|
||||
// blue component
|
||||
bit0 = 0;
|
||||
bit1 = BIT(color_prom[pen], 6);
|
||||
bit2 = BIT(color_prom[pen], 7);
|
||||
int const b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
|
||||
|
||||
palette.set_pen_color(i, rgb_t(r, g, b));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
|
||||
Callbacks for the TileMap code
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
TILE_GET_INFO_MEMBER(appoooh_state::get_fg_tile_info)
|
||||
{
|
||||
int code = m_fg_videoram[tile_index] + 256 * ((m_fg_colorram[tile_index] >> 5) & 7);
|
||||
|
||||
tileinfo.set(0,
|
||||
code,
|
||||
m_fg_colorram[tile_index] & 0x0f,
|
||||
(m_fg_colorram[tile_index] & 0x10 ) ? TILEMAP_FLIPX : 0
|
||||
);
|
||||
}
|
||||
|
||||
TILE_GET_INFO_MEMBER(appoooh_state::get_bg_tile_info)
|
||||
{
|
||||
int code = m_bg_videoram[tile_index] + 256 * ((m_bg_colorram[tile_index] >> 5) & 7);
|
||||
|
||||
tileinfo.set(1,
|
||||
code,
|
||||
m_bg_colorram[tile_index] & 0x0f,
|
||||
(m_bg_colorram[tile_index] & 0x10 ) ? TILEMAP_FLIPX : 0
|
||||
);
|
||||
}
|
||||
|
||||
/***************************************************************************
|
||||
|
||||
Start the video hardware emulation.
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
void appoooh_state::video_start()
|
||||
{
|
||||
m_fg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(appoooh_state::get_fg_tile_info)), TILEMAP_SCAN_ROWS, 8, 8, 32, 32);
|
||||
m_bg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(appoooh_state::get_bg_tile_info)), TILEMAP_SCAN_ROWS, 8, 8, 32, 32);
|
||||
|
||||
m_fg_tilemap->set_transparent_pen(0);
|
||||
m_fg_tilemap->set_scrolldy(8, 8);
|
||||
m_bg_tilemap->set_scrolldy(8, 8);
|
||||
|
||||
save_item(NAME(m_scroll_x));
|
||||
save_item(NAME(m_priority));
|
||||
}
|
||||
|
||||
void appoooh_state::scroll_w(uint8_t data)
|
||||
{
|
||||
m_scroll_x = data;
|
||||
}
|
||||
|
||||
|
||||
void appoooh_state::fg_videoram_w(offs_t offset, uint8_t data)
|
||||
{
|
||||
m_fg_videoram[offset] = data;
|
||||
m_fg_tilemap->mark_tile_dirty(offset);
|
||||
}
|
||||
|
||||
void appoooh_state::fg_colorram_w(offs_t offset, uint8_t data)
|
||||
{
|
||||
m_fg_colorram[offset] = data;
|
||||
m_fg_tilemap->mark_tile_dirty(offset);
|
||||
}
|
||||
|
||||
void appoooh_state::bg_videoram_w(offs_t offset, uint8_t data)
|
||||
{
|
||||
m_bg_videoram[offset] = data;
|
||||
m_bg_tilemap->mark_tile_dirty(offset);
|
||||
}
|
||||
|
||||
void appoooh_state::bg_colorram_w(offs_t offset, uint8_t data)
|
||||
{
|
||||
m_bg_colorram[offset] = data;
|
||||
m_bg_tilemap->mark_tile_dirty(offset);
|
||||
}
|
||||
|
||||
void appoooh_state::out_w(uint8_t data)
|
||||
{
|
||||
/* bit 0 controls NMI */
|
||||
m_nmi_mask = data & 1;
|
||||
|
||||
/* bit 1 flip screen */
|
||||
flip_screen_set(data & 0x02);
|
||||
|
||||
/* bits 2-3 unknown */
|
||||
|
||||
/* bits 4-5 are playfield/sprite priority */
|
||||
/* TODO: understand how this works, currently the only thing I do is draw */
|
||||
/* the front layer behind sprites when priority == 0, and invert the sprite */
|
||||
/* order when priority == 1 */
|
||||
m_priority = (data & 0x30) >> 4;
|
||||
|
||||
/* bit 6 ROM bank select */
|
||||
{
|
||||
membank("bank1")->set_entry((data&0x40) ? 1 : 0);
|
||||
}
|
||||
|
||||
/* bit 7 unknown (used) */
|
||||
}
|
||||
|
||||
void appoooh_state::appoooh_draw_sprites( bitmap_ind16 &dest_bmp, const rectangle &cliprect, gfx_element *gfx, uint8_t *sprite )
|
||||
{
|
||||
int offs;
|
||||
int flipy = flip_screen();
|
||||
|
||||
for (offs = 0x20 - 4; offs >= 0; offs -= 4)
|
||||
{
|
||||
int sy = 240 - sprite[offs + 0];
|
||||
int code = (sprite[offs + 1] >> 2) + ((sprite[offs + 2] >> 5) & 0x07) * 0x40;
|
||||
int color = sprite[offs + 2] & 0x0f; /* TODO: bit 4 toggles continuously, what is it? */
|
||||
int sx = sprite[offs + 3];
|
||||
int flipx = sprite[offs + 1] & 0x01;
|
||||
|
||||
if(sx >= 248)
|
||||
sx -= 256;
|
||||
|
||||
if (flipy)
|
||||
{
|
||||
sx = 239 - sx;
|
||||
sy = 239 - sy;
|
||||
flipx = !flipx;
|
||||
}
|
||||
|
||||
gfx->transpen(dest_bmp,cliprect,
|
||||
code,
|
||||
color,
|
||||
flipx,flipy,
|
||||
sx, sy, 0);
|
||||
}
|
||||
}
|
||||
|
||||
void appoooh_state::robowres_draw_sprites( bitmap_ind16 &dest_bmp, const rectangle &cliprect, gfx_element *gfx, uint8_t *sprite )
|
||||
{
|
||||
int offs;
|
||||
int flipy = flip_screen();
|
||||
|
||||
for (offs = 0x20 - 4; offs >= 0; offs -= 4)
|
||||
{
|
||||
int sy = 240 - sprite[offs + 0];
|
||||
int code = 0x200 + (sprite[offs + 1] >> 2) + ((sprite[offs + 2] >> 5) & 0x07) * 0x40;
|
||||
int color = sprite[offs + 2] & 0x0f; /* TODO: bit 4 toggles continuously, what is it? */
|
||||
int sx = sprite[offs + 3];
|
||||
int flipx = sprite[offs + 1] & 0x01;
|
||||
|
||||
if(sx >= 248)
|
||||
sx -= 256;
|
||||
|
||||
if (flipy)
|
||||
{
|
||||
sx = 239 - sx;
|
||||
sy = 239 - sy;
|
||||
flipx = !flipx;
|
||||
}
|
||||
|
||||
gfx->transpen(dest_bmp,cliprect,
|
||||
code,
|
||||
color,
|
||||
flipx,flipy,
|
||||
sx, sy, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
uint32_t appoooh_state::screen_update_appoooh(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0);
|
||||
|
||||
if (m_priority == 0) /* fg behind sprites */
|
||||
m_fg_tilemap->draw(screen, bitmap, cliprect, 0, 0);
|
||||
|
||||
/* draw sprites */
|
||||
if (m_priority == 1)
|
||||
{
|
||||
/* sprite set #1 */
|
||||
appoooh_draw_sprites(bitmap, cliprect, m_gfxdecode->gfx(2), m_spriteram);
|
||||
/* sprite set #2 */
|
||||
appoooh_draw_sprites(bitmap, cliprect, m_gfxdecode->gfx(3), m_spriteram_2);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* sprite set #2 */
|
||||
appoooh_draw_sprites(bitmap, cliprect, m_gfxdecode->gfx(3), m_spriteram_2);
|
||||
/* sprite set #1 */
|
||||
appoooh_draw_sprites(bitmap, cliprect, m_gfxdecode->gfx(2), m_spriteram);
|
||||
}
|
||||
|
||||
if (m_priority != 0) /* fg in front of sprites */
|
||||
m_fg_tilemap->draw(screen, bitmap, cliprect, 0, 0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint32_t appoooh_state::screen_update_robowres(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0);
|
||||
|
||||
if (m_priority == 0) /* fg behind sprites */
|
||||
m_fg_tilemap->draw(screen, bitmap, cliprect, 0, 0);
|
||||
|
||||
/* draw sprites */
|
||||
if (m_priority == 1)
|
||||
{
|
||||
/* sprite set #1 */
|
||||
robowres_draw_sprites(bitmap, cliprect, m_gfxdecode->gfx(2), m_spriteram);
|
||||
/* sprite set #2 */
|
||||
robowres_draw_sprites(bitmap, cliprect, m_gfxdecode->gfx(3), m_spriteram_2);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* sprite set #2 */
|
||||
robowres_draw_sprites(bitmap, cliprect, m_gfxdecode->gfx(3), m_spriteram_2);
|
||||
/* sprite set #1 */
|
||||
robowres_draw_sprites(bitmap, cliprect, m_gfxdecode->gfx(2), m_spriteram);
|
||||
}
|
||||
|
||||
if (m_priority != 0) /* fg in front of sprites */
|
||||
m_fg_tilemap->draw(screen, bitmap, cliprect, 0, 0);
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user