mirror of
https://github.com/holub/mame
synced 2025-04-23 00:39:36 +03:00
new WORKING machine - Namennayo (Japan) (#7599)
* new WORKING machine ------ Namennayo (Japan) [ShouTime, David Haywood] * confirm input mapping * add bonus lives dip * set to 4-way stick * nitpicking * this is what plugins\portname is for, but whatever, be like that.
This commit is contained in:
parent
2e5406e4c0
commit
9936ec012b
@ -1924,6 +1924,24 @@ void galaxian_state::theend_map(address_map &map)
|
||||
map(0x8000, 0xffff).rw(FUNC(galaxian_state::theend_ppi8255_r), FUNC(galaxian_state::theend_ppi8255_w));
|
||||
}
|
||||
|
||||
void namenayo_state::namenayo_map(address_map &map)
|
||||
{
|
||||
map.unmap_value_high();
|
||||
map(0x0000, 0x3fff).rom();
|
||||
map(0x4000, 0x4fff).ram();
|
||||
map(0x5000, 0x6fff).rom();
|
||||
map(0xc800, 0xc8ff).ram().w(FUNC(galaxian_state::galaxian_objram_w)).share("spriteram");
|
||||
map(0xd000, 0xd3ff).ram().w(FUNC(galaxian_state::galaxian_videoram_w)).share("videoram");
|
||||
map(0xd800, 0xd800).w(FUNC(namenayo_state::namenayo_unk_d800_w)); // some kind of split position for bg colour maybe?
|
||||
map(0xe000, 0xe01f).ram().w(FUNC(namenayo_state::namenayo_extattr_w)).share("extattrram");
|
||||
map(0xe801, 0xe801).w(FUNC(galaxian_state::irq_enable_w));
|
||||
map(0xe806, 0xe806).mirror(0x07f8).w(FUNC(galaxian_state::galaxian_flip_screen_x_w));
|
||||
map(0xe807, 0xe807).mirror(0x07f8).w(FUNC(galaxian_state::galaxian_flip_screen_y_w));
|
||||
map(0xf900, 0xf903).rw("ppi8255_0", FUNC(i8255_device::read), FUNC(i8255_device::write));
|
||||
map(0xfa00, 0xfa03).rw("ppi8255_1", FUNC(i8255_device::read), FUNC(i8255_device::write));
|
||||
map(0xf000, 0xf000).r("watchdog", FUNC(watchdog_timer_device::reset_r));
|
||||
}
|
||||
|
||||
void galaxian_state::froggervd_map(address_map &map)
|
||||
{
|
||||
theend_map(map);
|
||||
@ -5309,6 +5327,54 @@ static INPUT_PORTS_START( scramble )
|
||||
PORT_BIT( 0xff, 0x00, IPT_UNUSED )
|
||||
INPUT_PORTS_END
|
||||
|
||||
// Input mapping confirmed from instruction sheet, Up is Jump, Down is release item, A is accelerate
|
||||
// There is a single bank of 6 dipswitches
|
||||
static INPUT_PORTS_START( namenayo )
|
||||
PORT_START("IN0")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY PORT_COCKTAIL PORT_NAME("P2 Jump")
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 )
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P1 Speed")
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 )
|
||||
|
||||
PORT_START("IN1")
|
||||
PORT_DIPNAME( 0x03, 0x03, DEF_STR( Bonus_Life ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( None ) )
|
||||
PORT_DIPSETTING( 0x01, "20,000" )
|
||||
PORT_DIPSETTING( 0x02, "10,000" )
|
||||
PORT_DIPSETTING( 0x03, "30,000" )
|
||||
PORT_DIPNAME( 0x04, 0x00, DEF_STR( Cabinet ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Upright ) )
|
||||
PORT_DIPSETTING( 0x04, DEF_STR( Cocktail ) )
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL PORT_NAME("P2 Speed")
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_COCKTAIL
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START2 )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 )
|
||||
|
||||
PORT_START("IN2")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_COCKTAIL PORT_NAME("P2 Bomb")
|
||||
PORT_DIPNAME( 0x06, 0x06, DEF_STR( Lives ) )
|
||||
PORT_DIPSETTING( 0x06, "2" )
|
||||
PORT_DIPSETTING( 0x04, "3" )
|
||||
PORT_DIPSETTING( 0x02, "4" )
|
||||
PORT_DIPSETTING( 0x00, "Unlimited" )
|
||||
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Coinage ) )
|
||||
PORT_DIPSETTING( 0x08, "A 1/1 B 1/2" )
|
||||
PORT_DIPSETTING( 0x00, "A 1/3 B 2/1" )
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY PORT_NAME("P1 Jump")
|
||||
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNUSED ) // is this checked?
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_NAME("P1 Bomb")
|
||||
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED ) // is this checked?
|
||||
|
||||
PORT_START("IN3") /* need for some PPI accesses */
|
||||
PORT_BIT( 0xff, 0x00, IPT_UNUSED )
|
||||
INPUT_PORTS_END
|
||||
|
||||
|
||||
static INPUT_PORTS_START( jungsub ) // TODO: are there more dip-switches?
|
||||
PORT_START("IN0")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN2 )
|
||||
@ -6770,7 +6836,13 @@ static GFXDECODE_START(gfx_gmgalax)
|
||||
GFXDECODE_SCALE("gfx1", 0x0000, galaxian_spritelayout, 0, 16, GALAXIAN_XSCALE,1)
|
||||
GFXDECODE_END
|
||||
|
||||
/* separate character and sprite ROMs */
|
||||
// separate color PROMs
|
||||
static GFXDECODE_START(gfx_namenayo)
|
||||
GFXDECODE_SCALE("gfx1", 0x0000, galaxian_charlayout, 0, 8, GALAXIAN_XSCALE,1)
|
||||
GFXDECODE_SCALE("gfx1", 0x0000, galaxian_spritelayout, 32, 8, GALAXIAN_XSCALE,1)
|
||||
GFXDECODE_END
|
||||
|
||||
// separate character and sprite ROMs
|
||||
static GFXDECODE_START(gfx_pacmanbl)
|
||||
GFXDECODE_SCALE("gfx1", 0x0000, galaxian_charlayout, 0, 8, GALAXIAN_XSCALE,1)
|
||||
GFXDECODE_SCALE("gfx2", 0x0000, galaxian_spritelayout, 0, 8, GALAXIAN_XSCALE,1)
|
||||
@ -7357,6 +7429,18 @@ void galaxian_state::ozon1(machine_config &config)
|
||||
}
|
||||
|
||||
|
||||
void namenayo_state::namenayo(machine_config &config)
|
||||
{
|
||||
konami_base(config);
|
||||
konami_sound_2x_ay8910(config);
|
||||
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &namenayo_state::namenayo_map);
|
||||
m_palette->set_entries(64);
|
||||
|
||||
/* video hardware */
|
||||
m_gfxdecode->set_info(gfx_namenayo);
|
||||
}
|
||||
|
||||
// TODO: should be derived from theend, re-sort machine configs later
|
||||
void galaxian_state::scramble(machine_config &config)
|
||||
{
|
||||
@ -8848,6 +8932,12 @@ void galaxian_state::init_mimonkey()
|
||||
init_mimonkeyb();
|
||||
}
|
||||
|
||||
void namenayo_state::init_namenayo()
|
||||
{
|
||||
/* video extensions */
|
||||
common_init(&galaxian_state::scramble_draw_bullet, &galaxian_state::namenayo_draw_background, &namenayo_state::namenayo_extend_tile_info, &namenayo_state::namenayo_extend_sprite_info);
|
||||
}
|
||||
|
||||
/*************************************
|
||||
*
|
||||
* ROM definitions
|
||||
@ -13108,6 +13198,27 @@ ROM_START( takeoff )
|
||||
ROM_LOAD( "6331-1j.86", 0x0000, 0x0020, CRC(24652bc4) SHA1(d89575f3749c75dc963317fe451ffeffd9856e4d) )
|
||||
ROM_END
|
||||
|
||||
ROM_START( namenayo )
|
||||
ROM_REGION( 0x100000, "maincpu", 0 )
|
||||
ROM_LOAD( "1.2d.2763", 0x0000, 0x2000, CRC(9830b4be) SHA1(541e59e892fbe46df24b68ab3cafea8a09f59f47) )
|
||||
ROM_LOAD( "2.2f.2763", 0x2000, 0x2000, CRC(cfaeb2de) SHA1(76c0019bf7815b056332d634ee1daec2e29407df) )
|
||||
ROM_LOAD( "4.2j.2763", 0x6000, 0x1000, CRC(4c3e8d42) SHA1(da7a77744953fcc3c3f1c03e86f5c6e589ddd545) ) // Scene 6
|
||||
ROM_CONTINUE(0x5000,0x1000) // Scene 4,5
|
||||
|
||||
ROM_REGION( 0x10000, "audiocpu", 0 )
|
||||
ROM_LOAD( "s1.5c.2732", 0x0000, 0x1000, CRC(31d4ebc1) SHA1(2f217daecb46228002b3981892b9cfe9ded6908b) )
|
||||
ROM_LOAD( "s2.5d.2732", 0x1000, 0x1000, CRC(5e170ba9) SHA1(6d786ac701ef8dd5e74f727e0805479dfb68866f) )
|
||||
|
||||
ROM_REGION( 0x8000, "gfx1", 0 )
|
||||
ROM_LOAD( "5.7d.2763", 0x0000, 0x2000, CRC(97245ee5) SHA1(59a375e074028685fc35f4b03761c7abe1ecce23) )
|
||||
ROM_LOAD( "6.7f.2763", 0x2000, 0x2000, CRC(7185c167) SHA1(dcd810d67eba8f4719968efbab08376fcb3ba10f) )
|
||||
ROM_LOAD( "7.7h.2763", 0x4000, 0x2000, CRC(942ca3c2) SHA1(6dac46e860fcf90f98cf9a7dd9a9a02ff1730935) )
|
||||
ROM_LOAD( "8.7j.2763", 0x6000, 0x2000, CRC(68b5b6bb) SHA1(e46e71c231d109db2bd51046d156b6b539efe403) )
|
||||
|
||||
ROM_REGION( 0x0040, "proms", 0 )
|
||||
ROM_LOAD( "10g.82s123", 0x00, 0x20, CRC(d8e44fa5) SHA1(1add9adc7ee4df01139e8647c060a0d0cd5c1b1e) )
|
||||
ROM_LOAD( "10h.82s123", 0x20, 0x20, CRC(1095e850) SHA1(ad38197df2e0512f94c140146add5f7081343f84) )
|
||||
ROM_END
|
||||
|
||||
ROM_START( scramble )
|
||||
ROM_REGION( 0x10000, "maincpu", 0 )
|
||||
@ -14962,3 +15073,6 @@ GAME( 1982, losttombh, losttomb, scobra, losttomb, galaxian_state, init_
|
||||
GAME( 1984, spdcoin, 0, scobra, spdcoin, galaxian_state, init_scobra, ROT90, "Stern Electronics", "Speed Coin (prototype)", MACHINE_SUPPORTS_SAVE )
|
||||
|
||||
GAME( 1985, superbon, 0, scobra, superbon, galaxian_state, init_superbon, ROT90, "Signatron USA", "Agent Super Bond (Super Cobra conversion)", MACHINE_WRONG_COLORS | MACHINE_SUPPORTS_SAVE )
|
||||
|
||||
// single player reference: https://www.nicovideo.jp/watch/sm16782405
|
||||
GAME( 1982, namenayo, 0, namenayo, namenayo, namenayo_state, init_namenayo, ROT0, "Cat's", "Namennayo (Japan)", MACHINE_SUPPORTS_SAVE )
|
||||
|
@ -81,13 +81,14 @@ public:
|
||||
, m_tenspot_game_dsw(*this, {"IN2_GAME0", "IN2_GAME1", "IN2_GAME2", "IN2_GAME3", "IN2_GAME4", "IN2_GAME5", "IN2_GAME6", "IN2_GAME7", "IN2_GAME8", "IN2_GAME9"})
|
||||
, m_spriteram(*this, "spriteram")
|
||||
, m_videoram(*this, "videoram")
|
||||
, m_exattrram(*this, "extattrram")
|
||||
, m_decrypted_opcodes(*this, "decrypted_opcodes")
|
||||
, m_lamps(*this, "lamp%u", 0U)
|
||||
, m_bank1(*this, "bank1")
|
||||
{ }
|
||||
|
||||
/* video extension callbacks */
|
||||
typedef void (galaxian_state::*galaxian_extend_tile_info_func)(uint16_t *code, uint8_t *color, uint8_t attrib, uint8_t x);
|
||||
typedef void (galaxian_state::*galaxian_extend_tile_info_func)(uint16_t *code, uint8_t *color, uint8_t attrib, uint8_t x, uint8_t y);
|
||||
typedef void (galaxian_state::*galaxian_extend_sprite_info_func)(const uint8_t *base, uint8_t *sx, uint8_t *sy, uint8_t *flipx, uint8_t *flipy, uint16_t *code, uint8_t *color);
|
||||
typedef void (galaxian_state::*galaxian_draw_bullet_func)(bitmap_rgb32 &bitmap, const rectangle &cliprect, int offs, int x, int y);
|
||||
typedef void (galaxian_state::*galaxian_draw_background_func)(bitmap_rgb32 &bitmap, const rectangle &cliprect);
|
||||
@ -265,31 +266,34 @@ public:
|
||||
void turtles_draw_background(bitmap_rgb32 &bitmap, const rectangle &cliprect);
|
||||
void sfx_draw_background(bitmap_rgb32 &bitmap, const rectangle &cliprect);
|
||||
void frogger_draw_background(bitmap_rgb32 &bitmap, const rectangle &cliprect);
|
||||
void namenayo_draw_background(bitmap_rgb32 &bitmap, const rectangle &cliprect);
|
||||
inline void galaxian_draw_pixel(bitmap_rgb32 &bitmap, const rectangle &cliprect, int y, int x, rgb_t color);
|
||||
void galaxian_draw_bullet(bitmap_rgb32 &bitmap, const rectangle &cliprect, int offs, int x, int y);
|
||||
void mshuttle_draw_bullet(bitmap_rgb32 &bitmap, const rectangle &cliprect, int offs, int x, int y);
|
||||
void scramble_draw_bullet(bitmap_rgb32 &bitmap, const rectangle &cliprect, int offs, int x, int y);
|
||||
void theend_draw_bullet(bitmap_rgb32 &bitmap, const rectangle &cliprect, int offs, int x, int y);
|
||||
void upper_extend_tile_info(uint16_t *code, uint8_t *color, uint8_t attrib, uint8_t x);
|
||||
void upper_extend_tile_info(uint16_t *code, uint8_t *color, uint8_t attrib, uint8_t x, uint8_t y);
|
||||
void upper_extend_sprite_info(const uint8_t *base, uint8_t *sx, uint8_t *sy, uint8_t *flipx, uint8_t *flipy, uint16_t *code, uint8_t *color);
|
||||
void frogger_extend_tile_info(uint16_t *code, uint8_t *color, uint8_t attrib, uint8_t x);
|
||||
void frogger_extend_tile_info(uint16_t *code, uint8_t *color, uint8_t attrib, uint8_t x, uint8_t y);
|
||||
void frogger_extend_sprite_info(const uint8_t *base, uint8_t *sx, uint8_t *sy, uint8_t *flipx, uint8_t *flipy, uint16_t *code, uint8_t *color);
|
||||
void gmgalax_extend_tile_info(uint16_t *code, uint8_t *color, uint8_t attrib, uint8_t x);
|
||||
void gmgalax_extend_tile_info(uint16_t *code, uint8_t *color, uint8_t attrib, uint8_t x, uint8_t y);
|
||||
void gmgalax_extend_sprite_info(const uint8_t *base, uint8_t *sx, uint8_t *sy, uint8_t *flipx, uint8_t *flipy, uint16_t *code, uint8_t *color);
|
||||
void pisces_extend_tile_info(uint16_t *code, uint8_t *color, uint8_t attrib, uint8_t x);
|
||||
void pisces_extend_tile_info(uint16_t *code, uint8_t *color, uint8_t attrib, uint8_t x, uint8_t y);
|
||||
void pisces_extend_sprite_info(const uint8_t *base, uint8_t *sx, uint8_t *sy, uint8_t *flipx, uint8_t *flipy, uint16_t *code, uint8_t *color);
|
||||
void batman2_extend_tile_info(uint16_t *code, uint8_t *color, uint8_t attrib, uint8_t x);
|
||||
void mooncrst_extend_tile_info(uint16_t *code, uint8_t *color, uint8_t attrib, uint8_t x);
|
||||
void batman2_extend_tile_info(uint16_t *code, uint8_t *color, uint8_t attrib, uint8_t x, uint8_t y);
|
||||
void mooncrst_extend_tile_info(uint16_t *code, uint8_t *color, uint8_t attrib, uint8_t x, uint8_t y);
|
||||
void mooncrst_extend_sprite_info(const uint8_t *base, uint8_t *sx, uint8_t *sy, uint8_t *flipx, uint8_t *flipy, uint16_t *code, uint8_t *color);
|
||||
void moonqsr_extend_tile_info(uint16_t *code, uint8_t *color, uint8_t attrib, uint8_t x);
|
||||
void moonqsr_extend_tile_info(uint16_t *code, uint8_t *color, uint8_t attrib, uint8_t x, uint8_t y);
|
||||
void moonqsr_extend_sprite_info(const uint8_t *base, uint8_t *sx, uint8_t *sy, uint8_t *flipx, uint8_t *flipy, uint16_t *code, uint8_t *color);
|
||||
void mshuttle_extend_tile_info(uint16_t *code, uint8_t *color, uint8_t attrib, uint8_t x);
|
||||
void mshuttle_extend_tile_info(uint16_t *code, uint8_t *color, uint8_t attrib, uint8_t x, uint8_t y);
|
||||
void mshuttle_extend_sprite_info(const uint8_t *base, uint8_t *sx, uint8_t *sy, uint8_t *flipx, uint8_t *flipy, uint16_t *code, uint8_t *color);
|
||||
void calipso_extend_sprite_info(const uint8_t *base, uint8_t *sx, uint8_t *sy, uint8_t *flipx, uint8_t *flipy, uint16_t *code, uint8_t *color);
|
||||
void jumpbug_extend_tile_info(uint16_t *code, uint8_t *color, uint8_t attrib, uint8_t x);
|
||||
void jumpbug_extend_tile_info(uint16_t *code, uint8_t *color, uint8_t attrib, uint8_t x, uint8_t y);
|
||||
void jumpbug_extend_sprite_info(const uint8_t *base, uint8_t *sx, uint8_t *sy, uint8_t *flipx, uint8_t *flipy, uint16_t *code, uint8_t *color);
|
||||
void mimonkey_extend_tile_info(uint16_t *code, uint8_t *color, uint8_t attrib, uint8_t x);
|
||||
void mimonkey_extend_tile_info(uint16_t *code, uint8_t *color, uint8_t attrib, uint8_t x, uint8_t y);
|
||||
void mimonkey_extend_sprite_info(const uint8_t *base, uint8_t *sx, uint8_t *sy, uint8_t *flipx, uint8_t *flipy, uint16_t *code, uint8_t *color);
|
||||
void namenayo_extend_tile_info(uint16_t *code, uint8_t *color, uint8_t attrib, uint8_t x, uint8_t y);
|
||||
void namenayo_extend_sprite_info(const uint8_t *base, uint8_t *sx, uint8_t *sy, uint8_t *flipx, uint8_t *flipy, uint16_t *code, uint8_t *color);
|
||||
void monsterz_set_latch();
|
||||
void decode_mooncrst(int length, uint8_t *dest);
|
||||
void decode_checkman();
|
||||
@ -473,6 +477,7 @@ protected:
|
||||
|
||||
required_shared_ptr<uint8_t> m_spriteram;
|
||||
required_shared_ptr<uint8_t> m_videoram;
|
||||
optional_shared_ptr<uint8_t> m_exattrram; // belongs in namenayo_state but the callbacks are problematic as things are set up
|
||||
optional_shared_ptr<uint8_t> m_decrypted_opcodes;
|
||||
output_finder<2> m_lamps;
|
||||
|
||||
@ -524,7 +529,7 @@ protected:
|
||||
void fourplay_rombank_w(offs_t offset, uint8_t data);
|
||||
void videight_rombank_w(offs_t offset, uint8_t data);
|
||||
void videight_gfxbank_w(offs_t offset, uint8_t data);
|
||||
void videight_extend_tile_info(uint16_t *code, uint8_t *color, uint8_t attrib, uint8_t x);
|
||||
void videight_extend_tile_info(uint16_t *code, uint8_t *color, uint8_t attrib, uint8_t x, uint8_t y);
|
||||
void videight_extend_sprite_info(const uint8_t *base, uint8_t *sx, uint8_t *sy, uint8_t *flipx, uint8_t *flipy, uint16_t *code, uint8_t *color);
|
||||
void fourplay_map(address_map &map);
|
||||
void videight_map(address_map &map);
|
||||
@ -552,4 +557,20 @@ private:
|
||||
required_ioport_array<3> m_gmin;
|
||||
};
|
||||
|
||||
class namenayo_state : public galaxian_state
|
||||
{
|
||||
public:
|
||||
namenayo_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: galaxian_state(mconfig, type, tag)
|
||||
{}
|
||||
|
||||
void namenayo(machine_config &config);
|
||||
void init_namenayo();
|
||||
|
||||
private:
|
||||
void namenayo_map(address_map &map);
|
||||
void namenayo_extattr_w(offs_t offset, uint8_t data);
|
||||
void namenayo_unk_d800_w(uint8_t data);
|
||||
};
|
||||
|
||||
#endif // MAME_INCLUDES_GALAXIAN_H
|
||||
|
@ -14326,6 +14326,7 @@ mshuttle2 // (c) 1981 Nichibutsu
|
||||
mshuttlea // (c) 1981 Nichibutsu
|
||||
mshuttlej // (c) 1981 Nichibutsu
|
||||
mshuttlej2 // (c) 1981 Nichibutsu
|
||||
namenayo // (c) 1982 Cat's
|
||||
ncentury // bootleg (Petaco S.A.)
|
||||
offensiv // bootleg (Video Dens)
|
||||
olmandingo // bootleg
|
||||
|
@ -475,13 +475,14 @@ TILE_GET_INFO_MEMBER(galaxian_state::bg_get_tile_info)
|
||||
{
|
||||
uint8_t *videoram = m_videoram;
|
||||
uint8_t x = tile_index & 0x1f;
|
||||
uint8_t y = tile_index >> 5;
|
||||
|
||||
uint16_t code = videoram[tile_index];
|
||||
uint8_t attrib = m_spriteram[x*2+1];
|
||||
uint8_t color = attrib & 7;
|
||||
|
||||
if (m_extend_tile_info_ptr != nullptr)
|
||||
(this->*m_extend_tile_info_ptr)(&code, &color, attrib, x);
|
||||
(this->*m_extend_tile_info_ptr)(&code, &color, attrib, x, y);
|
||||
|
||||
tileinfo.set(0, code, color, 0);
|
||||
}
|
||||
@ -1242,7 +1243,7 @@ void galaxian_state::theend_draw_bullet(bitmap_rgb32 &bitmap, const rectangle &c
|
||||
*************************************/
|
||||
|
||||
/*** generic ***/
|
||||
void galaxian_state::upper_extend_tile_info(uint16_t *code, uint8_t *color, uint8_t attrib, uint8_t x)
|
||||
void galaxian_state::upper_extend_tile_info(uint16_t *code, uint8_t *color, uint8_t attrib, uint8_t x, uint8_t y)
|
||||
{
|
||||
/* tiles are in the upper half of a larger ROM */
|
||||
*code += 0x100;
|
||||
@ -1256,7 +1257,7 @@ void galaxian_state::upper_extend_sprite_info(const uint8_t *base, uint8_t *sx,
|
||||
|
||||
|
||||
/*** Frogger ***/
|
||||
void galaxian_state::frogger_extend_tile_info(uint16_t *code, uint8_t *color, uint8_t attrib, uint8_t x)
|
||||
void galaxian_state::frogger_extend_tile_info(uint16_t *code, uint8_t *color, uint8_t attrib, uint8_t x, uint8_t y)
|
||||
{
|
||||
*color = ((*color >> 1) & 0x03) | ((*color << 2) & 0x04);
|
||||
}
|
||||
@ -1268,7 +1269,7 @@ void galaxian_state::frogger_extend_sprite_info(const uint8_t *base, uint8_t *sx
|
||||
|
||||
|
||||
/*** Ghostmuncher Galaxian ***/
|
||||
void galaxian_state::gmgalax_extend_tile_info(uint16_t *code, uint8_t *color, uint8_t attrib, uint8_t x)
|
||||
void galaxian_state::gmgalax_extend_tile_info(uint16_t *code, uint8_t *color, uint8_t attrib, uint8_t x, uint8_t y)
|
||||
{
|
||||
*code |= m_gfxbank[0] << 9;
|
||||
// *color |= m_gfxbank[0] << 3;
|
||||
@ -1282,7 +1283,7 @@ void galaxian_state::gmgalax_extend_sprite_info(const uint8_t *base, uint8_t *sx
|
||||
|
||||
|
||||
/*** Pisces ***/
|
||||
void galaxian_state::pisces_extend_tile_info(uint16_t *code, uint8_t *color, uint8_t attrib, uint8_t x)
|
||||
void galaxian_state::pisces_extend_tile_info(uint16_t *code, uint8_t *color, uint8_t attrib, uint8_t x, uint8_t y)
|
||||
{
|
||||
*code |= m_gfxbank[0] << 8;
|
||||
}
|
||||
@ -1294,7 +1295,7 @@ void galaxian_state::pisces_extend_sprite_info(const uint8_t *base, uint8_t *sx,
|
||||
|
||||
|
||||
/*** Mighty Monkey ***/
|
||||
void galaxian_state::mimonkey_extend_tile_info(uint16_t *code, uint8_t *color, uint8_t attrib, uint8_t x)
|
||||
void galaxian_state::mimonkey_extend_tile_info(uint16_t *code, uint8_t *color, uint8_t attrib, uint8_t x, uint8_t y)
|
||||
{
|
||||
*code |= m_gfxbank[0] << 8 | m_gfxbank[2] << 9;
|
||||
}
|
||||
@ -1306,7 +1307,7 @@ void galaxian_state::mimonkey_extend_sprite_info(const uint8_t *base, uint8_t *s
|
||||
|
||||
|
||||
/*** Batman Part 2 ***/
|
||||
void galaxian_state::batman2_extend_tile_info(uint16_t *code, uint8_t *color, uint8_t attrib, uint8_t x)
|
||||
void galaxian_state::batman2_extend_tile_info(uint16_t *code, uint8_t *color, uint8_t attrib, uint8_t x, uint8_t y)
|
||||
{
|
||||
if (*code & 0x80)
|
||||
*code |= m_gfxbank[0] << 8;
|
||||
@ -1314,7 +1315,7 @@ void galaxian_state::batman2_extend_tile_info(uint16_t *code, uint8_t *color, ui
|
||||
|
||||
|
||||
/*** Moon Cresta ***/
|
||||
void galaxian_state::mooncrst_extend_tile_info(uint16_t *code, uint8_t *color, uint8_t attrib, uint8_t x)
|
||||
void galaxian_state::mooncrst_extend_tile_info(uint16_t *code, uint8_t *color, uint8_t attrib, uint8_t x, uint8_t y)
|
||||
{
|
||||
if (m_gfxbank[2] && (*code & 0xc0) == 0x80)
|
||||
*code = (*code & 0x3f) | (m_gfxbank[0] << 6) | (m_gfxbank[1] << 7) | 0x0100;
|
||||
@ -1328,7 +1329,7 @@ void galaxian_state::mooncrst_extend_sprite_info(const uint8_t *base, uint8_t *s
|
||||
|
||||
|
||||
/*** Moon Quasar ***/
|
||||
void galaxian_state::moonqsr_extend_tile_info(uint16_t *code, uint8_t *color, uint8_t attrib, uint8_t x)
|
||||
void galaxian_state::moonqsr_extend_tile_info(uint16_t *code, uint8_t *color, uint8_t attrib, uint8_t x, uint8_t y)
|
||||
{
|
||||
*code |= (attrib & 0x20) << 3;
|
||||
}
|
||||
@ -1340,7 +1341,7 @@ void galaxian_state::moonqsr_extend_sprite_info(const uint8_t *base, uint8_t *sx
|
||||
|
||||
|
||||
/*** Moon Shuttle ***/
|
||||
void galaxian_state::mshuttle_extend_tile_info(uint16_t *code, uint8_t *color, uint8_t attrib, uint8_t x)
|
||||
void galaxian_state::mshuttle_extend_tile_info(uint16_t *code, uint8_t *color, uint8_t attrib, uint8_t x, uint8_t y)
|
||||
{
|
||||
*code |= (attrib & 0x30) << 4;
|
||||
}
|
||||
@ -1364,7 +1365,7 @@ void galaxian_state::calipso_extend_sprite_info(const uint8_t *base, uint8_t *sx
|
||||
|
||||
|
||||
/*** Jumpbug ***/
|
||||
void galaxian_state::jumpbug_extend_tile_info(uint16_t *code, uint8_t *color, uint8_t attrib, uint8_t x)
|
||||
void galaxian_state::jumpbug_extend_tile_info(uint16_t *code, uint8_t *color, uint8_t attrib, uint8_t x, uint8_t y)
|
||||
{
|
||||
if ((*code & 0xc0) == 0x80 && (m_gfxbank[2] & 0x01))
|
||||
*code += 128 + (( m_gfxbank[0] & 0x01) << 6) +
|
||||
@ -1382,6 +1383,62 @@ void galaxian_state::jumpbug_extend_sprite_info(const uint8_t *base, uint8_t *sx
|
||||
}
|
||||
}
|
||||
|
||||
void galaxian_state::namenayo_extend_tile_info(uint16_t *code, uint8_t *color, uint8_t attrib, uint8_t x, uint8_t y) // should be in namenayo_state
|
||||
{
|
||||
// main game display
|
||||
if ((attrib & 0x01) == 0x00)
|
||||
{
|
||||
int attr = m_exattrram[y & 0x1f];
|
||||
*code += ((attr & 0x38) >> 3) * 0x100;
|
||||
*color = attr & 0x07;
|
||||
}
|
||||
// status bar
|
||||
else
|
||||
{
|
||||
// course map
|
||||
if ((attrib & 0xfe) == 0x20)
|
||||
*code += 0x400;
|
||||
}
|
||||
}
|
||||
|
||||
void galaxian_state::namenayo_extend_sprite_info(const uint8_t *base, uint8_t *sx, uint8_t *sy, uint8_t *flipx, uint8_t *flipy, uint16_t *code, uint8_t *color)
|
||||
{
|
||||
if (base[2] & 0x08)
|
||||
*code += 0x40;
|
||||
|
||||
// sprite colours are from the 2nd PROM
|
||||
*color += 8;
|
||||
}
|
||||
|
||||
void namenayo_state::namenayo_unk_d800_w(uint8_t data)
|
||||
{
|
||||
// seems to be connected to scroll position?
|
||||
// popmessage("namenayo_unk_d800_w %02x", data);
|
||||
}
|
||||
|
||||
|
||||
void galaxian_state::namenayo_draw_background(bitmap_rgb32 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
bitmap.fill(rgb_t::black(), cliprect);
|
||||
|
||||
rectangle draw;
|
||||
|
||||
if (m_flipscreen_x)
|
||||
{
|
||||
draw = cliprect;
|
||||
draw.min_x = std::max(draw.min_x, 72 * m_x_scale);
|
||||
}
|
||||
else
|
||||
{
|
||||
draw = cliprect;
|
||||
draw.max_x = std::min(draw.max_x, 184 * m_x_scale - 1);
|
||||
}
|
||||
|
||||
// draw an opaque copy of the tilemap in part of the screen to ensure some of the graphics are correct
|
||||
// this can't extend past the playfield or you get unwanted fill near the status bar
|
||||
// this might not be 100% how the hardware works.
|
||||
m_bg_tilemap->draw(*m_screen, bitmap, draw, TILEMAP_DRAW_OPAQUE, 0);
|
||||
}
|
||||
|
||||
|
||||
/*************************************
|
||||
@ -1408,7 +1465,7 @@ void galaxian_state::fourplay_rombank_w(offs_t offset, uint8_t data)
|
||||
*
|
||||
*************************************/
|
||||
|
||||
void galaxian_state::videight_extend_tile_info(uint16_t *code, uint8_t *color, uint8_t attrib, uint8_t x)
|
||||
void galaxian_state::videight_extend_tile_info(uint16_t *code, uint8_t *color, uint8_t attrib, uint8_t x, uint8_t y)
|
||||
{
|
||||
*code |= (m_gfxbank[0] << 8);
|
||||
*color |= (m_gfxbank[4] << 3);
|
||||
@ -1457,3 +1514,9 @@ void galaxian_state::videight_gfxbank_w(offs_t offset, uint8_t data)
|
||||
galaxian_gfxbank_w( 0, data+4 );
|
||||
}
|
||||
|
||||
void namenayo_state::namenayo_extattr_w(offs_t offset, uint8_t data)
|
||||
{
|
||||
m_screen->update_partial(m_screen->vpos());
|
||||
m_exattrram[offset] = data;
|
||||
m_bg_tilemap->mark_all_dirty();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user