mirror of
https://github.com/holub/mame
synced 2025-04-24 09:20:02 +03:00
pturn.c: added save state support (nw)
pooyan.c: removed unused member variable (nw)
This commit is contained in:
parent
c9a2700bb1
commit
11b1958854
@ -24,7 +24,7 @@
|
||||
*
|
||||
*************************************/
|
||||
|
||||
INTERRUPT_GEN_MEMBER(pooyan_state::pooyan_interrupt)
|
||||
INTERRUPT_GEN_MEMBER(pooyan_state::interrupt)
|
||||
{
|
||||
if (m_irq_enable)
|
||||
device.execute().set_input_line(INPUT_LINE_NMI, ASSERT_LINE);
|
||||
@ -47,8 +47,8 @@ WRITE8_MEMBER(pooyan_state::irq_enable_w)
|
||||
|
||||
static ADDRESS_MAP_START( main_map, AS_PROGRAM, 8, pooyan_state )
|
||||
AM_RANGE(0x0000, 0x7fff) AM_ROM
|
||||
AM_RANGE(0x8000, 0x83ff) AM_RAM_WRITE(pooyan_colorram_w) AM_SHARE("colorram")
|
||||
AM_RANGE(0x8400, 0x87ff) AM_RAM_WRITE(pooyan_videoram_w) AM_SHARE("videoram")
|
||||
AM_RANGE(0x8000, 0x83ff) AM_RAM_WRITE(colorram_w) AM_SHARE("colorram")
|
||||
AM_RANGE(0x8400, 0x87ff) AM_RAM_WRITE(videoram_w) AM_SHARE("videoram")
|
||||
AM_RANGE(0x8800, 0x8fff) AM_RAM
|
||||
AM_RANGE(0x9000, 0x90ff) AM_MIRROR(0x0b00) AM_RAM AM_SHARE("spriteram")
|
||||
AM_RANGE(0x9400, 0x94ff) AM_MIRROR(0x0b00) AM_RAM AM_SHARE("spriteram2")
|
||||
@ -62,7 +62,7 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 8, pooyan_state )
|
||||
AM_RANGE(0xa180, 0xa180) AM_MIRROR(0x5e78) AM_WRITE(irq_enable_w)
|
||||
AM_RANGE(0xa181, 0xa181) AM_MIRROR(0x5e78) AM_DEVWRITE("timeplt_audio", timeplt_audio_device, sh_irqtrigger_w)
|
||||
AM_RANGE(0xa183, 0xa183) AM_MIRROR(0x5e78) AM_WRITENOP // ???
|
||||
AM_RANGE(0xa187, 0xa187) AM_MIRROR(0x5e78) AM_WRITE(pooyan_flipscreen_w)
|
||||
AM_RANGE(0xa187, 0xa187) AM_MIRROR(0x5e78) AM_WRITE(flipscreen_w)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
|
||||
@ -187,7 +187,7 @@ static MACHINE_CONFIG_START( pooyan, pooyan_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", Z80, MASTER_CLOCK/3/2)
|
||||
MCFG_CPU_PROGRAM_MAP(main_map)
|
||||
MCFG_CPU_VBLANK_INT_DRIVER("screen", pooyan_state, pooyan_interrupt)
|
||||
MCFG_CPU_VBLANK_INT_DRIVER("screen", pooyan_state, interrupt)
|
||||
|
||||
|
||||
/* video hardware */
|
||||
@ -195,7 +195,7 @@ static MACHINE_CONFIG_START( pooyan, pooyan_state )
|
||||
MCFG_SCREEN_REFRESH_RATE(60)
|
||||
MCFG_SCREEN_SIZE(32*8, 32*8)
|
||||
MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
|
||||
MCFG_SCREEN_UPDATE_DRIVER(pooyan_state, screen_update_pooyan)
|
||||
MCFG_SCREEN_UPDATE_DRIVER(pooyan_state, screen_update)
|
||||
MCFG_SCREEN_PALETTE("palette")
|
||||
|
||||
MCFG_GFXDECODE_ADD("gfxdecode", "palette", pooyan)
|
||||
|
@ -84,13 +84,19 @@ class pturn_state : public driver_device
|
||||
public:
|
||||
pturn_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_videoram(*this, "videoram"),
|
||||
m_spriteram(*this, "spriteram"),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_gfxdecode(*this, "gfxdecode"),
|
||||
m_palette(*this, "palette") { }
|
||||
m_palette(*this, "palette"),
|
||||
m_videoram(*this, "videoram"),
|
||||
m_spriteram(*this, "spriteram") { }
|
||||
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<gfxdecode_device> m_gfxdecode;
|
||||
required_device<palette_device> m_palette;
|
||||
|
||||
required_shared_ptr<UINT8> m_videoram;
|
||||
required_shared_ptr<UINT8> m_spriteram;
|
||||
|
||||
tilemap_t *m_fgmap;
|
||||
tilemap_t *m_bgmap;
|
||||
int m_bgbank;
|
||||
@ -100,11 +106,10 @@ public:
|
||||
int m_bgcolor;
|
||||
int m_nmi_main;
|
||||
int m_nmi_sub;
|
||||
required_shared_ptr<UINT8> m_spriteram;
|
||||
DECLARE_WRITE8_MEMBER(pturn_videoram_w);
|
||||
|
||||
DECLARE_WRITE8_MEMBER(videoram_w);
|
||||
DECLARE_WRITE8_MEMBER(nmi_main_enable_w);
|
||||
DECLARE_WRITE8_MEMBER(nmi_sub_enable_w);
|
||||
DECLARE_WRITE8_MEMBER(sound_w);
|
||||
DECLARE_WRITE8_MEMBER(bgcolor_w);
|
||||
DECLARE_WRITE8_MEMBER(bg_scrollx_w);
|
||||
DECLARE_WRITE8_MEMBER(fgpalette_w);
|
||||
@ -112,20 +117,22 @@ public:
|
||||
DECLARE_WRITE8_MEMBER(fgbank_w);
|
||||
DECLARE_WRITE8_MEMBER(bgbank_w);
|
||||
DECLARE_WRITE8_MEMBER(flip_w);
|
||||
DECLARE_READ8_MEMBER(pturn_custom_r);
|
||||
DECLARE_READ8_MEMBER(pturn_protection_r);
|
||||
DECLARE_READ8_MEMBER(pturn_protection2_r);
|
||||
DECLARE_READ8_MEMBER(custom_r);
|
||||
DECLARE_READ8_MEMBER(protection_r);
|
||||
DECLARE_READ8_MEMBER(protection2_r);
|
||||
|
||||
TILE_GET_INFO_MEMBER(get_tile_info);
|
||||
TILE_GET_INFO_MEMBER(get_bg_tile_info);
|
||||
|
||||
DECLARE_DRIVER_INIT(pturn);
|
||||
TILE_GET_INFO_MEMBER(get_pturn_tile_info);
|
||||
TILE_GET_INFO_MEMBER(get_pturn_bg_tile_info);
|
||||
virtual void machine_start();
|
||||
virtual void machine_reset();
|
||||
virtual void video_start();
|
||||
UINT32 screen_update_pturn(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
INTERRUPT_GEN_MEMBER(pturn_sub_intgen);
|
||||
INTERRUPT_GEN_MEMBER(pturn_main_intgen);
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<gfxdecode_device> m_gfxdecode;
|
||||
required_device<palette_device> m_palette;
|
||||
|
||||
UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
|
||||
INTERRUPT_GEN_MEMBER(sub_intgen);
|
||||
INTERRUPT_GEN_MEMBER(main_intgen);
|
||||
};
|
||||
|
||||
|
||||
@ -139,11 +146,9 @@ static const UINT8 tile_lookup[0x10]=
|
||||
0xa0, 0xb0, 0xe0, 0xf0
|
||||
};
|
||||
|
||||
TILE_GET_INFO_MEMBER(pturn_state::get_pturn_tile_info)
|
||||
TILE_GET_INFO_MEMBER(pturn_state::get_tile_info)
|
||||
{
|
||||
UINT8 *videoram = m_videoram;
|
||||
int tileno;
|
||||
tileno = videoram[tile_index];
|
||||
int tileno = m_videoram[tile_index];
|
||||
|
||||
tileno=tile_lookup[tileno>>4]|(tileno&0xf)|(m_fgbank<<8);
|
||||
|
||||
@ -152,11 +157,10 @@ TILE_GET_INFO_MEMBER(pturn_state::get_pturn_tile_info)
|
||||
|
||||
|
||||
|
||||
TILE_GET_INFO_MEMBER(pturn_state::get_pturn_bg_tile_info)
|
||||
TILE_GET_INFO_MEMBER(pturn_state::get_bg_tile_info)
|
||||
{
|
||||
int tileno,palno;
|
||||
tileno = memregion("user1")->base()[tile_index];
|
||||
palno=m_bgpalette;
|
||||
int tileno = memregion("user1")->base()[tile_index];
|
||||
int palno=m_bgpalette;
|
||||
if(palno==1)
|
||||
{
|
||||
palno=25;
|
||||
@ -166,28 +170,29 @@ TILE_GET_INFO_MEMBER(pturn_state::get_pturn_bg_tile_info)
|
||||
|
||||
void pturn_state::video_start()
|
||||
{
|
||||
m_fgmap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(pturn_state::get_pturn_tile_info),this),TILEMAP_SCAN_ROWS,8, 8,32,32);
|
||||
m_fgmap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(pturn_state::get_tile_info),this),TILEMAP_SCAN_ROWS,8, 8,32,32);
|
||||
m_fgmap->set_transparent_pen(0);
|
||||
m_bgmap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(pturn_state::get_pturn_bg_tile_info),this),TILEMAP_SCAN_ROWS,8, 8,32,32*8);
|
||||
m_bgmap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(pturn_state::get_bg_tile_info),this),TILEMAP_SCAN_ROWS,8, 8,32,32*8);
|
||||
m_bgmap->set_transparent_pen(0);
|
||||
|
||||
save_item(NAME(m_bgbank));
|
||||
save_item(NAME(m_fgbank));
|
||||
save_item(NAME(m_bgpalette));
|
||||
save_item(NAME(m_fgpalette));
|
||||
save_item(NAME(m_bgcolor));
|
||||
}
|
||||
|
||||
UINT32 pturn_state::screen_update_pturn(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
UINT32 pturn_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
UINT8 *spriteram = m_spriteram;
|
||||
int offs;
|
||||
int sx, sy;
|
||||
int flipx, flipy;
|
||||
|
||||
bitmap.fill(m_bgcolor, cliprect);
|
||||
m_bgmap->draw(screen, bitmap, cliprect, 0,0);
|
||||
for ( offs = 0x80-4 ; offs >=0 ; offs -= 4)
|
||||
for (int offs = 0x80-4 ; offs >=0 ; offs -= 4)
|
||||
{
|
||||
sy=256-spriteram[offs]-16 ;
|
||||
sx=spriteram[offs+3]-16 ;
|
||||
int sy=256-m_spriteram[offs]-16 ;
|
||||
int sx=m_spriteram[offs+3]-16 ;
|
||||
|
||||
flipx=spriteram[offs+1]&0x40;
|
||||
flipy=spriteram[offs+1]&0x80;
|
||||
int flipx=m_spriteram[offs+1]&0x40;
|
||||
int flipy=m_spriteram[offs+1]&0x80;
|
||||
|
||||
|
||||
if (flip_screen_x())
|
||||
@ -205,8 +210,8 @@ UINT32 pturn_state::screen_update_pturn(screen_device &screen, bitmap_ind16 &bit
|
||||
if(sx|sy)
|
||||
{
|
||||
m_gfxdecode->gfx(2)->transpen(bitmap,cliprect,
|
||||
spriteram[offs+1] & 0x3f ,
|
||||
(spriteram[offs+2] & 0x1f),
|
||||
m_spriteram[offs+1] & 0x3f ,
|
||||
(m_spriteram[offs+2] & 0x1f),
|
||||
flipx, flipy,
|
||||
sx,sy,0);
|
||||
}
|
||||
@ -216,21 +221,20 @@ UINT32 pturn_state::screen_update_pturn(screen_device &screen, bitmap_ind16 &bit
|
||||
}
|
||||
|
||||
#ifdef UNUSED_FUNCTION
|
||||
READ8_MEMBER(pturn_state::pturn_protection_r)
|
||||
READ8_MEMBER(pturn_state::protection_r)
|
||||
{
|
||||
return 0x66;
|
||||
}
|
||||
|
||||
READ8_MEMBER(pturn_state::pturn_protection2_r)
|
||||
READ8_MEMBER(pturn_state::protection2_r)
|
||||
{
|
||||
return 0xfe;
|
||||
}
|
||||
#endif
|
||||
|
||||
WRITE8_MEMBER(pturn_state::pturn_videoram_w)
|
||||
WRITE8_MEMBER(pturn_state::videoram_w)
|
||||
{
|
||||
UINT8 *videoram = m_videoram;
|
||||
videoram[offset]=data;
|
||||
m_videoram[offset]=data;
|
||||
m_fgmap->mark_tile_dirty(offset);
|
||||
}
|
||||
|
||||
@ -245,12 +249,6 @@ WRITE8_MEMBER(pturn_state::nmi_sub_enable_w)
|
||||
m_nmi_sub = data;
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(pturn_state::sound_w)
|
||||
{
|
||||
soundlatch_byte_w(space,0,data);
|
||||
}
|
||||
|
||||
|
||||
WRITE8_MEMBER(pturn_state::bgcolor_w)
|
||||
{
|
||||
m_bgcolor=data;
|
||||
@ -292,7 +290,7 @@ WRITE8_MEMBER(pturn_state::flip_w)
|
||||
}
|
||||
|
||||
|
||||
READ8_MEMBER(pturn_state::pturn_custom_r)
|
||||
READ8_MEMBER(pturn_state::custom_r)
|
||||
{
|
||||
int addr = (int)offset + 0xc800;
|
||||
|
||||
@ -321,13 +319,13 @@ READ8_MEMBER(pturn_state::pturn_custom_r)
|
||||
static ADDRESS_MAP_START( main_map, AS_PROGRAM, 8, pturn_state )
|
||||
AM_RANGE(0x0000, 0x7fff) AM_ROM
|
||||
AM_RANGE(0xc000, 0xc7ff) AM_RAM
|
||||
AM_RANGE(0xc800, 0xcfff) AM_WRITENOP AM_READ(pturn_custom_r)
|
||||
AM_RANGE(0xc800, 0xcfff) AM_WRITENOP AM_READ(custom_r)
|
||||
|
||||
AM_RANGE(0xdfe0, 0xdfe0) AM_NOP
|
||||
|
||||
AM_RANGE(0xe000, 0xe3ff) AM_RAM_WRITE(pturn_videoram_w) AM_SHARE("videoram")
|
||||
AM_RANGE(0xe000, 0xe3ff) AM_RAM_WRITE(videoram_w) AM_SHARE("videoram")
|
||||
AM_RANGE(0xe400, 0xe400) AM_WRITE(fgpalette_w)
|
||||
AM_RANGE(0xe800, 0xe800) AM_WRITE(sound_w)
|
||||
AM_RANGE(0xe800, 0xe800) AM_WRITE(soundlatch_byte_w)
|
||||
|
||||
AM_RANGE(0xf000, 0xf0ff) AM_RAM AM_SHARE("spriteram")
|
||||
|
||||
@ -467,7 +465,7 @@ static INPUT_PORTS_START( pturn )
|
||||
PORT_DIPSETTING( 0x80, DEF_STR( Japanese ) )
|
||||
INPUT_PORTS_END
|
||||
|
||||
INTERRUPT_GEN_MEMBER(pturn_state::pturn_sub_intgen)
|
||||
INTERRUPT_GEN_MEMBER(pturn_state::sub_intgen)
|
||||
{
|
||||
if(m_nmi_sub)
|
||||
{
|
||||
@ -475,7 +473,7 @@ INTERRUPT_GEN_MEMBER(pturn_state::pturn_sub_intgen)
|
||||
}
|
||||
}
|
||||
|
||||
INTERRUPT_GEN_MEMBER(pturn_state::pturn_main_intgen)
|
||||
INTERRUPT_GEN_MEMBER(pturn_state::main_intgen)
|
||||
{
|
||||
if (m_nmi_main)
|
||||
{
|
||||
@ -483,6 +481,12 @@ INTERRUPT_GEN_MEMBER(pturn_state::pturn_main_intgen)
|
||||
}
|
||||
}
|
||||
|
||||
void pturn_state::machine_start()
|
||||
{
|
||||
save_item(NAME(m_nmi_main));
|
||||
save_item(NAME(m_nmi_sub));
|
||||
}
|
||||
|
||||
void pturn_state::machine_reset()
|
||||
{
|
||||
address_space &space = m_maincpu->space(AS_PROGRAM);
|
||||
@ -492,11 +496,11 @@ void pturn_state::machine_reset()
|
||||
static MACHINE_CONFIG_START( pturn, pturn_state )
|
||||
MCFG_CPU_ADD("maincpu", Z80, 12000000/3)
|
||||
MCFG_CPU_PROGRAM_MAP(main_map)
|
||||
MCFG_CPU_VBLANK_INT_DRIVER("screen", pturn_state, pturn_main_intgen)
|
||||
MCFG_CPU_VBLANK_INT_DRIVER("screen", pturn_state, main_intgen)
|
||||
|
||||
MCFG_CPU_ADD("audiocpu", Z80, 12000000/3)
|
||||
MCFG_CPU_PROGRAM_MAP(sub_map)
|
||||
MCFG_CPU_PERIODIC_INT_DRIVER(pturn_state, pturn_sub_intgen, 3*60)
|
||||
MCFG_CPU_PERIODIC_INT_DRIVER(pturn_state, sub_intgen, 3*60)
|
||||
|
||||
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
@ -504,7 +508,7 @@ static MACHINE_CONFIG_START( pturn, pturn_state )
|
||||
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
|
||||
MCFG_SCREEN_SIZE(32*8, 32*8)
|
||||
MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
|
||||
MCFG_SCREEN_UPDATE_DRIVER(pturn_state, screen_update_pturn)
|
||||
MCFG_SCREEN_UPDATE_DRIVER(pturn_state, screen_update)
|
||||
MCFG_SCREEN_PALETTE("palette")
|
||||
|
||||
MCFG_PALETTE_ADD_RRRRGGGGBBBB_PROMS("palette", 0x100)
|
||||
@ -561,9 +565,9 @@ ROM_END
|
||||
DRIVER_INIT_MEMBER(pturn_state,pturn)
|
||||
{
|
||||
/*
|
||||
m_maincpu->space(AS_PROGRAM).install_read_handler(0xc0dd, 0xc0dd, read8_delegate(FUNC(pturn_state::pturn_protection_r), this));
|
||||
m_maincpu->space(AS_PROGRAM).install_read_handler(0xc0db, 0xc0db, read8_delegate(FUNC(pturn_state::pturn_protection2_r), this));
|
||||
m_maincpu->space(AS_PROGRAM).install_read_handler(0xc0dd, 0xc0dd, read8_delegate(FUNC(pturn_state::protection_r), this));
|
||||
m_maincpu->space(AS_PROGRAM).install_read_handler(0xc0db, 0xc0db, read8_delegate(FUNC(pturn_state::protection2_r), this));
|
||||
*/
|
||||
}
|
||||
|
||||
GAME( 1984, pturn, 0, pturn, pturn, pturn_state, pturn, ROT90, "Jaleco", "Parallel Turn", GAME_IMPERFECT_COLORS )
|
||||
GAME( 1984, pturn, 0, pturn, pturn, pturn_state, pturn, ROT90, "Jaleco", "Parallel Turn", GAME_IMPERFECT_COLORS | GAME_SUPPORTS_SAVE )
|
||||
|
@ -3,13 +3,18 @@ class pooyan_state : public driver_device
|
||||
public:
|
||||
pooyan_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_gfxdecode(*this, "gfxdecode"),
|
||||
m_palette(*this, "palette"),
|
||||
m_colorram(*this, "colorram"),
|
||||
m_videoram(*this, "videoram"),
|
||||
m_spriteram(*this, "spriteram"),
|
||||
m_spriteram2(*this, "spriteram2"),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_gfxdecode(*this, "gfxdecode"),
|
||||
m_palette(*this, "palette") { }
|
||||
m_spriteram2(*this, "spriteram2") { }
|
||||
|
||||
/* devices */
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<gfxdecode_device> m_gfxdecode;
|
||||
required_device<palette_device> m_palette;
|
||||
|
||||
/* memory pointers */
|
||||
required_shared_ptr<UINT8> m_colorram;
|
||||
@ -21,24 +26,22 @@ public:
|
||||
tilemap_t *m_bg_tilemap;
|
||||
|
||||
/* misc */
|
||||
UINT8 m_irq_toggle;
|
||||
UINT8 m_irq_enable;
|
||||
|
||||
/* devices */
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<gfxdecode_device> m_gfxdecode;
|
||||
required_device<palette_device> m_palette;
|
||||
|
||||
DECLARE_WRITE8_MEMBER(irq_enable_w);
|
||||
DECLARE_WRITE8_MEMBER(pooyan_videoram_w);
|
||||
DECLARE_WRITE8_MEMBER(pooyan_colorram_w);
|
||||
DECLARE_WRITE8_MEMBER(pooyan_flipscreen_w);
|
||||
DECLARE_WRITE8_MEMBER(videoram_w);
|
||||
DECLARE_WRITE8_MEMBER(colorram_w);
|
||||
DECLARE_WRITE8_MEMBER(flipscreen_w);
|
||||
|
||||
TILE_GET_INFO_MEMBER(get_bg_tile_info);
|
||||
|
||||
virtual void machine_start();
|
||||
virtual void machine_reset();
|
||||
virtual void video_start();
|
||||
DECLARE_PALETTE_INIT(pooyan);
|
||||
UINT32 screen_update_pooyan(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
INTERRUPT_GEN_MEMBER(pooyan_interrupt);
|
||||
|
||||
UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect );
|
||||
|
||||
INTERRUPT_GEN_MEMBER(interrupt);
|
||||
};
|
||||
|
@ -124,21 +124,21 @@ void pooyan_state::video_start()
|
||||
*
|
||||
*************************************/
|
||||
|
||||
WRITE8_MEMBER(pooyan_state::pooyan_videoram_w)
|
||||
WRITE8_MEMBER(pooyan_state::videoram_w)
|
||||
{
|
||||
m_videoram[offset] = data;
|
||||
m_bg_tilemap->mark_tile_dirty(offset);
|
||||
}
|
||||
|
||||
|
||||
WRITE8_MEMBER(pooyan_state::pooyan_colorram_w)
|
||||
WRITE8_MEMBER(pooyan_state::colorram_w)
|
||||
{
|
||||
m_colorram[offset] = data;
|
||||
m_bg_tilemap->mark_tile_dirty(offset);
|
||||
}
|
||||
|
||||
|
||||
WRITE8_MEMBER(pooyan_state::pooyan_flipscreen_w)
|
||||
WRITE8_MEMBER(pooyan_state::flipscreen_w)
|
||||
{
|
||||
flip_screen_set(~data & 0x01);
|
||||
}
|
||||
@ -153,19 +153,15 @@ WRITE8_MEMBER(pooyan_state::pooyan_flipscreen_w)
|
||||
|
||||
void pooyan_state::draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect )
|
||||
{
|
||||
UINT8 *spriteram = m_spriteram;
|
||||
UINT8 *spriteram_2 = m_spriteram2;
|
||||
int offs;
|
||||
|
||||
for (offs = 0x10; offs < 0x40; offs += 2)
|
||||
for (int offs = 0x10; offs < 0x40; offs += 2)
|
||||
{
|
||||
int sx = spriteram[offs];
|
||||
int sy = 240 - spriteram_2[offs + 1];
|
||||
int sx = m_spriteram[offs];
|
||||
int sy = 240 - m_spriteram2[offs + 1];
|
||||
|
||||
int code = spriteram[offs + 1];
|
||||
int color = spriteram_2[offs] & 0x0f;
|
||||
int flipx = ~spriteram_2[offs] & 0x40;
|
||||
int flipy = spriteram_2[offs] & 0x80;
|
||||
int code = m_spriteram[offs + 1];
|
||||
int color = m_spriteram2[offs] & 0x0f;
|
||||
int flipx = ~m_spriteram2[offs] & 0x40;
|
||||
int flipy = m_spriteram2[offs] & 0x80;
|
||||
|
||||
|
||||
m_gfxdecode->gfx(1)->transmask(bitmap,cliprect,
|
||||
@ -185,7 +181,7 @@ void pooyan_state::draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect
|
||||
*
|
||||
*************************************/
|
||||
|
||||
UINT32 pooyan_state::screen_update_pooyan(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
UINT32 pooyan_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0);
|
||||
draw_sprites(bitmap, cliprect);
|
||||
|
Loading…
Reference in New Issue
Block a user