mirror of
https://github.com/holub/mame
synced 2025-04-20 15:32:45 +03:00
Misc cleanups of the day (nw)
This commit is contained in:
parent
4cf62f82b6
commit
633a456c1d
@ -351,7 +351,7 @@ UINT32 galpani3_state::screen_update_galpani3(screen_device &screen, bitmap_rgb3
|
||||
|
||||
m_sprite_bitmap_1.fill(0x0000, cliprect);
|
||||
|
||||
m_spritegen->skns_draw_sprites(machine(), m_sprite_bitmap_1, cliprect, &m_spriteram32[0], 0x4000, memregion("gfx1")->base(), memregion ("gfx1")->bytes(), m_spc_regs );
|
||||
m_spritegen->skns_draw_sprites(m_sprite_bitmap_1, cliprect, &m_spriteram32[0], 0x4000, memregion("gfx1")->base(), memregion ("gfx1")->bytes(), m_spc_regs );
|
||||
|
||||
// ignoring priority bits for now..
|
||||
for (y=0;y<240;y++)
|
||||
|
@ -319,8 +319,8 @@ UINT32 jchan_state::screen_update_jchan(screen_device &screen, bitmap_ind16 &bit
|
||||
m_sprite_bitmap_1->fill(0x0000, cliprect);
|
||||
m_sprite_bitmap_2->fill(0x0000, cliprect);
|
||||
|
||||
m_spritegen1->skns_draw_sprites(machine(), *m_sprite_bitmap_1, cliprect, m_sprite_ram32_1, 0x4000, memregion("gfx1")->base(), memregion ("gfx1")->bytes(), m_sprite_regs32_1 );
|
||||
m_spritegen2->skns_draw_sprites(machine(), *m_sprite_bitmap_2, cliprect, m_sprite_ram32_2, 0x4000, memregion("gfx2")->base(), memregion ("gfx2")->bytes(), m_sprite_regs32_2 );
|
||||
m_spritegen1->skns_draw_sprites(*m_sprite_bitmap_1, cliprect, m_sprite_ram32_1, 0x4000, memregion("gfx1")->base(), memregion ("gfx1")->bytes(), m_sprite_regs32_1 );
|
||||
m_spritegen2->skns_draw_sprites(*m_sprite_bitmap_2, cliprect, m_sprite_ram32_2, 0x4000, memregion("gfx2")->base(), memregion ("gfx2")->bytes(), m_sprite_regs32_2 );
|
||||
|
||||
// ignoring priority bits for now - might use alpha too, check 0x8000 of palette writes
|
||||
for (y=0;y<240;y++)
|
||||
|
@ -136,7 +136,7 @@ public:
|
||||
DECLARE_WRITE32_MEMBER(darkhors_tmapram2_w);
|
||||
DECLARE_WRITE32_MEMBER(darkhors_input_sel_w);
|
||||
DECLARE_READ32_MEMBER(darkhors_input_sel_r);
|
||||
DECLARE_READ32_MEMBER(p_4e0000);
|
||||
DECLARE_READ32_MEMBER(p_4e0000);
|
||||
DECLARE_READ32_MEMBER(p_580000);
|
||||
DECLARE_READ32_MEMBER(p_580004);
|
||||
DECLARE_READ32_MEMBER(p_580008);
|
||||
@ -996,7 +996,7 @@ VIDEO_START_MEMBER(darkhors_state,jclub2)
|
||||
UINT32 darkhors_state::screen_update_jclub2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
// this isn't an st0020..
|
||||
m_gdfs_st0020->st0020_draw_all(machine(), bitmap, cliprect);
|
||||
m_gdfs_st0020->st0020_draw_all(bitmap, cliprect);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -1066,7 +1066,7 @@ VIDEO_START_MEMBER(darkhors_state,jclub2o)
|
||||
|
||||
UINT32 darkhors_state::screen_update_jclub2o(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
m_gdfs_st0020->st0020_draw_all(machine(), bitmap, cliprect);
|
||||
m_gdfs_st0020->st0020_draw_all(bitmap, cliprect);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1360,7 +1360,7 @@ DRIVER_INIT_MEMBER(tatsumi_state,apache3)
|
||||
m_rom_clut0 = memregion("gfx2")->base()+ 0x100000 - 0x800;
|
||||
m_rom_clut1 = memregion("gfx3")->base()+ 0x100000 - 0x800;
|
||||
|
||||
tatsumi_reset(machine());
|
||||
tatsumi_reset();
|
||||
|
||||
// TODO: ym2151_set_port_write_handler for CT1/CT2 outputs
|
||||
}
|
||||
@ -1387,7 +1387,7 @@ DRIVER_INIT_MEMBER(tatsumi_state,roundup5)
|
||||
m_rom_clut0 = memregion("gfx2")->base()+ 0xc0000 - 0x800;
|
||||
m_rom_clut1 = memregion("gfx3")->base()+ 0xc0000 - 0x800;
|
||||
|
||||
tatsumi_reset(machine());
|
||||
tatsumi_reset();
|
||||
}
|
||||
|
||||
DRIVER_INIT_MEMBER(tatsumi_state,cyclwarr)
|
||||
@ -1422,7 +1422,7 @@ DRIVER_INIT_MEMBER(tatsumi_state,cyclwarr)
|
||||
m_rom_clut0 = memregion("gfx2")->base() + len1 - 0x1000;
|
||||
m_rom_clut1 = memregion("gfx3")->base() + len2 - 0x1000;
|
||||
|
||||
tatsumi_reset(machine());
|
||||
tatsumi_reset();
|
||||
}
|
||||
|
||||
/***************************************************************************/
|
||||
|
@ -58,6 +58,7 @@ public:
|
||||
INTERRUPT_GEN_MEMBER(asterix_interrupt);
|
||||
K05324X_CB_MEMBER(sprite_callback);
|
||||
K056832_CB_MEMBER(tile_callback);
|
||||
void reset_spritebank();
|
||||
|
||||
protected:
|
||||
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
|
||||
|
@ -337,6 +337,7 @@ public:
|
||||
|
||||
|
||||
/* cps video */
|
||||
inline UINT16 *cps1_base( int offset, int boundary );
|
||||
void cps1_get_video_base();
|
||||
void unshuffle(UINT64 *buf, int len);
|
||||
void cps2_gfx_decode();
|
||||
|
@ -155,6 +155,8 @@ public:
|
||||
|
||||
void konamigx_esc_alert(UINT32 *srcbase, int srcoffs, int count, int mode);
|
||||
void konamigx_precache_registers(void);
|
||||
|
||||
void wipezbuf(int noshadow);
|
||||
|
||||
void dmastart_callback(int data);
|
||||
|
||||
|
@ -9,16 +9,28 @@ class snk_state : public driver_device
|
||||
public:
|
||||
snk_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_bg_videoram(*this, "bg_videoram"),
|
||||
m_tx_videoram(*this, "tx_videoram"),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_audiocpu(*this, "audiocpu"),
|
||||
m_subcpu(*this, "sub"),
|
||||
m_gfxdecode(*this, "gfxdecode"),
|
||||
m_screen(*this, "screen"),
|
||||
m_palette(*this, "palette") { }
|
||||
m_palette(*this, "palette"),
|
||||
m_spriteram(*this, "spriteram"),
|
||||
m_fg_videoram(*this, "fg_videoram"),
|
||||
m_bg_videoram(*this, "bg_videoram"),
|
||||
m_tx_videoram(*this, "tx_videoram") { }
|
||||
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<cpu_device> m_audiocpu;
|
||||
required_device<cpu_device> m_subcpu;
|
||||
required_device<gfxdecode_device> m_gfxdecode;
|
||||
required_device<screen_device> m_screen;
|
||||
required_device<palette_device> m_palette;
|
||||
|
||||
required_shared_ptr<UINT8> m_spriteram;
|
||||
optional_shared_ptr<UINT8> m_fg_videoram;
|
||||
required_shared_ptr<UINT8> m_bg_videoram;
|
||||
required_shared_ptr<UINT8> m_tx_videoram;
|
||||
|
||||
int m_countryc_trackball;
|
||||
int m_last_value[2];
|
||||
@ -27,12 +39,7 @@ public:
|
||||
int m_marvins_sound_busy_flag;
|
||||
// FIXME this should be initialised on machine reset
|
||||
int m_sound_status;
|
||||
|
||||
required_shared_ptr<UINT8> m_spriteram;
|
||||
optional_shared_ptr<UINT8> m_fg_videoram;
|
||||
required_shared_ptr<UINT8> m_bg_videoram;
|
||||
required_shared_ptr<UINT8> m_tx_videoram;
|
||||
|
||||
|
||||
tilemap_t *m_tx_tilemap;
|
||||
tilemap_t *m_fg_tilemap;
|
||||
tilemap_t *m_bg_tilemap;
|
||||
@ -174,20 +181,17 @@ public:
|
||||
UINT32 screen_update_tnk3(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
UINT32 screen_update_ikari(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
UINT32 screen_update_gwar(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
UINT32 screen_update_tdfever(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
UINT32 screen_update_tdfever(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
TIMER_CALLBACK_MEMBER(sgladiat_sndirq_update_callback);
|
||||
TIMER_CALLBACK_MEMBER(sndirq_update_callback);
|
||||
DECLARE_WRITE_LINE_MEMBER(ymirq_callback_2);
|
||||
void marvins_draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, const int scrollx, const int scrolly, const int from, const int to);
|
||||
void tnk3_draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, const int xscroll, const int yscroll);
|
||||
void ikari_draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, const int start, const int xscroll, const int yscroll, const UINT8 *source, const int gfxnum );
|
||||
void tdfever_draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, const int xscroll, const int yscroll, const UINT8 *source, const int gfxnum, const int hw_xflip, const int from, const int to);
|
||||
int hardflags_check(int num);
|
||||
int hardflags_check8(int num);
|
||||
int turbofront_check(int small, int num);
|
||||
int turbofront_check8(int small, int num);
|
||||
DECLARE_WRITE_LINE_MEMBER(ymirq_callback_1);
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<cpu_device> m_audiocpu;
|
||||
required_device<cpu_device> m_subcpu;
|
||||
required_device<gfxdecode_device> m_gfxdecode;
|
||||
required_device<screen_device> m_screen;
|
||||
required_device<palette_device> m_palette;
|
||||
};
|
||||
|
@ -6,6 +6,13 @@ class tatsumi_state : public driver_device
|
||||
public:
|
||||
tatsumi_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_audiocpu(*this, "audiocpu"),
|
||||
m_subcpu(*this, "sub"),
|
||||
m_subcpu2(*this, "sub2"),
|
||||
m_oki(*this, "oki"),
|
||||
m_gfxdecode(*this, "gfxdecode"),
|
||||
m_palette(*this, "palette"),
|
||||
m_videoram(*this, "videoram"),
|
||||
m_cyclwarr_cpua_ram(*this, "cw_cpua_ram"),
|
||||
m_cyclwarr_cpub_ram(*this, "cw_cpub_ram"),
|
||||
@ -23,26 +30,20 @@ public:
|
||||
m_roundup_r_ram(*this, "roundup_r_ram"),
|
||||
m_roundup_p_ram(*this, "roundup_p_ram"),
|
||||
m_roundup_l_ram(*this, "roundup_l_ram"),
|
||||
m_spriteram(*this, "spriteram") ,
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_audiocpu(*this, "audiocpu"),
|
||||
m_subcpu(*this, "sub"),
|
||||
m_subcpu2(*this, "sub2"),
|
||||
m_oki(*this, "oki"),
|
||||
m_gfxdecode(*this, "gfxdecode"),
|
||||
m_palette(*this, "palette") { }
|
||||
m_spriteram(*this, "spriteram") { }
|
||||
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<cpu_device> m_audiocpu;
|
||||
required_device<m68000_base_device> m_subcpu;
|
||||
optional_device<cpu_device> m_subcpu2;
|
||||
required_device<okim6295_device> m_oki;
|
||||
required_device<gfxdecode_device> m_gfxdecode;
|
||||
required_device<palette_device> m_palette;
|
||||
|
||||
optional_shared_ptr<UINT16> m_videoram;
|
||||
optional_shared_ptr<UINT16> m_cyclwarr_cpua_ram;
|
||||
optional_shared_ptr<UINT16> m_cyclwarr_cpub_ram;
|
||||
UINT16 m_bigfight_a20000[8];
|
||||
UINT16 m_bigfight_a60000[2];
|
||||
optional_shared_ptr<UINT16> m_apache3_g_ram;
|
||||
UINT16 m_bigfight_a40000[2];
|
||||
UINT8 *m_rom_sprite_lookup1;
|
||||
UINT8 *m_rom_sprite_lookup2;
|
||||
UINT8 *m_rom_clut0;
|
||||
UINT8 *m_rom_clut1;
|
||||
optional_shared_ptr<UINT16> m_roundup5_d0000_ram;
|
||||
optional_shared_ptr<UINT16> m_roundup5_e0000_ram;
|
||||
optional_shared_ptr<UINT16> m_roundup5_unknown0;
|
||||
@ -50,14 +51,23 @@ public:
|
||||
optional_shared_ptr<UINT16> m_roundup5_unknown2;
|
||||
optional_shared_ptr<UINT16> m_68k_ram;
|
||||
optional_shared_ptr<UINT8> m_apache3_z80_ram;
|
||||
UINT16 m_control_word;
|
||||
UINT16 m_apache3_rotate_ctrl[12];
|
||||
required_shared_ptr<UINT16> m_sprite_control_ram;
|
||||
optional_shared_ptr<UINT16> m_cyclwarr_videoram0;
|
||||
optional_shared_ptr<UINT16> m_cyclwarr_videoram1;
|
||||
optional_shared_ptr<UINT16> m_roundup_r_ram;
|
||||
optional_shared_ptr<UINT16> m_roundup_p_ram;
|
||||
optional_shared_ptr<UINT16> m_roundup_l_ram;
|
||||
required_shared_ptr<UINT16> m_spriteram;
|
||||
|
||||
UINT16 m_bigfight_a20000[8];
|
||||
UINT16 m_bigfight_a60000[2];
|
||||
UINT16 m_bigfight_a40000[2];
|
||||
UINT8 *m_rom_sprite_lookup1;
|
||||
UINT8 *m_rom_sprite_lookup2;
|
||||
UINT8 *m_rom_clut0;
|
||||
UINT8 *m_rom_clut1;
|
||||
UINT16 m_control_word;
|
||||
UINT16 m_apache3_rotate_ctrl[12];
|
||||
UINT16 m_last_control;
|
||||
UINT8 m_apache3_adc;
|
||||
int m_apache3_rot_idx;
|
||||
@ -75,7 +85,6 @@ public:
|
||||
UINT8 m_roundupt_crt_selected_reg;
|
||||
UINT8 m_roundupt_crt_reg[64];
|
||||
UINT8* m_shadow_pen_array;
|
||||
required_shared_ptr<UINT16> m_spriteram;
|
||||
DECLARE_READ16_MEMBER(cyclwarr_sprite_r);
|
||||
DECLARE_WRITE16_MEMBER(cyclwarr_sprite_w);
|
||||
DECLARE_WRITE16_MEMBER(bigfight_a20000_w);
|
||||
@ -131,14 +140,5 @@ public:
|
||||
DECLARE_READ8_MEMBER(tatsumi_hack_ym2151_r);
|
||||
DECLARE_READ8_MEMBER(tatsumi_hack_oki_r);
|
||||
DECLARE_WRITE_LINE_MEMBER(apache3_68000_reset);
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<cpu_device> m_audiocpu;
|
||||
required_device<m68000_base_device> m_subcpu;
|
||||
optional_device<cpu_device> m_subcpu2;
|
||||
required_device<okim6295_device> m_oki;
|
||||
required_device<gfxdecode_device> m_gfxdecode;
|
||||
required_device<palette_device> m_palette;
|
||||
void tatsumi_reset();
|
||||
};
|
||||
|
||||
/*----------- defined in machine/tatsumi.c -----------*/
|
||||
void tatsumi_reset(running_machine &machine);
|
||||
|
@ -6,17 +6,16 @@
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
void tatsumi_reset(running_machine &machine)
|
||||
void tatsumi_state::tatsumi_reset()
|
||||
{
|
||||
tatsumi_state *state = machine.driver_data<tatsumi_state>();
|
||||
state->m_last_control = 0;
|
||||
state->m_control_word = 0;
|
||||
state->m_apache3_adc = 0;
|
||||
state->m_apache3_rot_idx = 0;
|
||||
m_last_control = 0;
|
||||
m_control_word = 0;
|
||||
m_apache3_adc = 0;
|
||||
m_apache3_rot_idx = 0;
|
||||
|
||||
state->save_item(NAME(state->m_last_control));
|
||||
state->save_item(NAME(state->m_control_word));
|
||||
state->save_item(NAME(state->m_apache3_adc));
|
||||
save_item(NAME(m_last_control));
|
||||
save_item(NAME(m_control_word));
|
||||
save_item(NAME(m_apache3_adc));
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
|
@ -296,8 +296,8 @@ UINT32 aerofgt_state::screen_update_pspikes(screen_device &screen, bitmap_ind16
|
||||
screen.priority().fill(0, cliprect);
|
||||
|
||||
m_bg1_tilemap->draw(screen, bitmap, cliprect, 0, 0);
|
||||
m_spr_old->turbofrc_draw_sprites(m_spriteram3,m_spriteram3.bytes(),m_spritepalettebank, machine(), bitmap, cliprect, screen.priority(), 0);
|
||||
m_spr_old->turbofrc_draw_sprites(m_spriteram3,m_spriteram3.bytes(),m_spritepalettebank, machine(), bitmap, cliprect, screen.priority(), 1);
|
||||
m_spr_old->turbofrc_draw_sprites(m_spriteram3,m_spriteram3.bytes(),m_spritepalettebank, bitmap, cliprect, screen.priority(), 0);
|
||||
m_spr_old->turbofrc_draw_sprites(m_spriteram3,m_spriteram3.bytes(),m_spritepalettebank, bitmap, cliprect, screen.priority(), 1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -315,11 +315,11 @@ UINT32 aerofgt_state::screen_update_karatblz(screen_device &screen, bitmap_ind16
|
||||
m_bg2_tilemap->draw(screen, bitmap, cliprect, 0, 0);
|
||||
|
||||
/* we use the priority buffer so sprites are drawn front to back */
|
||||
m_spr_old2->turbofrc_draw_sprites(m_spriteram3+0x200,m_spriteram3.bytes()/2,m_spritepalettebank, machine(), bitmap, cliprect, screen.priority(), 0);
|
||||
m_spr_old2->turbofrc_draw_sprites(m_spriteram3+0x200,m_spriteram3.bytes()/2,m_spritepalettebank, machine(), bitmap, cliprect, screen.priority(), 1);
|
||||
m_spr_old2->turbofrc_draw_sprites(m_spriteram3+0x200,m_spriteram3.bytes()/2,m_spritepalettebank, bitmap, cliprect, screen.priority(), 0);
|
||||
m_spr_old2->turbofrc_draw_sprites(m_spriteram3+0x200,m_spriteram3.bytes()/2,m_spritepalettebank, bitmap, cliprect, screen.priority(), 1);
|
||||
|
||||
m_spr_old->turbofrc_draw_sprites(m_spriteram3+0x000,m_spriteram3.bytes()/2,m_spritepalettebank, machine(), bitmap, cliprect, screen.priority(), 0);
|
||||
m_spr_old->turbofrc_draw_sprites(m_spriteram3+0x000,m_spriteram3.bytes()/2,m_spritepalettebank, machine(), bitmap, cliprect, screen.priority(), 1);
|
||||
m_spr_old->turbofrc_draw_sprites(m_spriteram3+0x000,m_spriteram3.bytes()/2,m_spritepalettebank, bitmap, cliprect, screen.priority(), 0);
|
||||
m_spr_old->turbofrc_draw_sprites(m_spriteram3+0x000,m_spriteram3.bytes()/2,m_spritepalettebank, bitmap, cliprect, screen.priority(), 1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -341,11 +341,11 @@ UINT32 aerofgt_state::screen_update_spinlbrk(screen_device &screen, bitmap_ind16
|
||||
m_bg2_tilemap->draw(screen, bitmap, cliprect, 0, 1);
|
||||
|
||||
/* we use the priority buffer so sprites are drawn front to back */
|
||||
m_spr_old->turbofrc_draw_sprites(m_spriteram3+0x000,m_spriteram3.bytes()/2,m_spritepalettebank, machine(), bitmap, cliprect, screen.priority(), 1);
|
||||
m_spr_old->turbofrc_draw_sprites(m_spriteram3+0x000,m_spriteram3.bytes()/2,m_spritepalettebank, machine(), bitmap, cliprect, screen.priority(), 0);
|
||||
m_spr_old->turbofrc_draw_sprites(m_spriteram3+0x000,m_spriteram3.bytes()/2,m_spritepalettebank, bitmap, cliprect, screen.priority(), 1);
|
||||
m_spr_old->turbofrc_draw_sprites(m_spriteram3+0x000,m_spriteram3.bytes()/2,m_spritepalettebank, bitmap, cliprect, screen.priority(), 0);
|
||||
|
||||
m_spr_old2->turbofrc_draw_sprites(m_spriteram3+0x200,m_spriteram3.bytes()/2,m_spritepalettebank, machine(), bitmap, cliprect, screen.priority(), 1);
|
||||
m_spr_old2->turbofrc_draw_sprites(m_spriteram3+0x200,m_spriteram3.bytes()/2,m_spritepalettebank, machine(), bitmap, cliprect, screen.priority(), 0);
|
||||
m_spr_old2->turbofrc_draw_sprites(m_spriteram3+0x200,m_spriteram3.bytes()/2,m_spritepalettebank, bitmap, cliprect, screen.priority(), 1);
|
||||
m_spr_old2->turbofrc_draw_sprites(m_spriteram3+0x200,m_spriteram3.bytes()/2,m_spritepalettebank, bitmap, cliprect, screen.priority(), 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -368,11 +368,11 @@ UINT32 aerofgt_state::screen_update_turbofrc(screen_device &screen, bitmap_ind16
|
||||
m_bg2_tilemap->draw(screen, bitmap, cliprect, 0, 1);
|
||||
|
||||
/* we use the priority buffer so sprites are drawn front to back */
|
||||
m_spr_old2->turbofrc_draw_sprites(m_spriteram3+0x200,m_spriteram3.bytes()/2,m_spritepalettebank, machine(), bitmap, cliprect, screen.priority(), 0); //enemy
|
||||
m_spr_old2->turbofrc_draw_sprites(m_spriteram3+0x200,m_spriteram3.bytes()/2,m_spritepalettebank, machine(), bitmap, cliprect, screen.priority(), 1); //enemy
|
||||
m_spr_old2->turbofrc_draw_sprites(m_spriteram3+0x200,m_spriteram3.bytes()/2,m_spritepalettebank, bitmap, cliprect, screen.priority(), 0); //enemy
|
||||
m_spr_old2->turbofrc_draw_sprites(m_spriteram3+0x200,m_spriteram3.bytes()/2,m_spritepalettebank, bitmap, cliprect, screen.priority(), 1); //enemy
|
||||
|
||||
m_spr_old->turbofrc_draw_sprites(m_spriteram3+0x000,m_spriteram3.bytes()/2,m_spritepalettebank, machine(), bitmap, cliprect, screen.priority(), 0); //ship
|
||||
m_spr_old->turbofrc_draw_sprites(m_spriteram3+0x000,m_spriteram3.bytes()/2,m_spritepalettebank, machine(), bitmap, cliprect, screen.priority(), 1); //intro
|
||||
m_spr_old->turbofrc_draw_sprites(m_spriteram3+0x000,m_spriteram3.bytes()/2,m_spritepalettebank, bitmap, cliprect, screen.priority(), 0); //ship
|
||||
m_spr_old->turbofrc_draw_sprites(m_spriteram3+0x000,m_spriteram3.bytes()/2,m_spritepalettebank, bitmap, cliprect, screen.priority(), 1); //intro
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -834,7 +834,7 @@ UINT32 aerofgt_state::screen_update_wbbc97(screen_device &screen, bitmap_rgb32 &
|
||||
m_bg1_tilemap->draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
|
||||
}
|
||||
|
||||
m_spr_old->turbofrc_draw_sprites(m_spriteram3,m_spriteram3.bytes(),m_spritepalettebank, machine(), bitmap, cliprect, screen.priority(), 0);
|
||||
m_spr_old->turbofrc_draw_sprites(m_spriteram3,m_spriteram3.bytes(),m_spritepalettebank, machine(), bitmap, cliprect, screen.priority(), 1);
|
||||
m_spr_old->turbofrc_draw_sprites(m_spriteram3,m_spriteram3.bytes(),m_spritepalettebank, bitmap, cliprect, screen.priority(), 0);
|
||||
m_spr_old->turbofrc_draw_sprites(m_spriteram3,m_spriteram3.bytes(),m_spritepalettebank, bitmap, cliprect, screen.priority(), 1);
|
||||
return 0;
|
||||
}
|
||||
|
@ -2,20 +2,19 @@
|
||||
#include "includes/asterix.h"
|
||||
|
||||
|
||||
static void reset_spritebank( running_machine &machine )
|
||||
void asterix_state::reset_spritebank()
|
||||
{
|
||||
asterix_state *state = machine.driver_data<asterix_state>();
|
||||
state->m_k053244->bankselect(state->m_spritebank & 7);
|
||||
state->m_spritebanks[0] = (state->m_spritebank << 12) & 0x7000;
|
||||
state->m_spritebanks[1] = (state->m_spritebank << 9) & 0x7000;
|
||||
state->m_spritebanks[2] = (state->m_spritebank << 6) & 0x7000;
|
||||
state->m_spritebanks[3] = (state->m_spritebank << 3) & 0x7000;
|
||||
m_k053244->bankselect(m_spritebank & 7);
|
||||
m_spritebanks[0] = (m_spritebank << 12) & 0x7000;
|
||||
m_spritebanks[1] = (m_spritebank << 9) & 0x7000;
|
||||
m_spritebanks[2] = (m_spritebank << 6) & 0x7000;
|
||||
m_spritebanks[3] = (m_spritebank << 3) & 0x7000;
|
||||
}
|
||||
|
||||
WRITE16_MEMBER(asterix_state::asterix_spritebank_w)
|
||||
{
|
||||
COMBINE_DATA(&m_spritebank);
|
||||
reset_spritebank(machine());
|
||||
reset_spritebank();
|
||||
}
|
||||
|
||||
K05324X_CB_MEMBER(asterix_state::sprite_callback)
|
||||
|
@ -1684,10 +1684,9 @@ MACHINE_RESET_MEMBER(cps_state,cps)
|
||||
}
|
||||
|
||||
|
||||
INLINE UINT16 *cps1_base( running_machine &machine, int offset, int boundary )
|
||||
inline UINT16 *cps_state::cps1_base( int offset, int boundary )
|
||||
{
|
||||
cps_state *state = machine.driver_data<cps_state>();
|
||||
int base = state->m_cps_a_regs[offset] * 256;
|
||||
int base = m_cps_a_regs[offset] * 256;
|
||||
|
||||
/*
|
||||
The scroll RAM must start on a 0x4000 boundary.
|
||||
@ -1698,7 +1697,7 @@ INLINE UINT16 *cps1_base( running_machine &machine, int offset, int boundary )
|
||||
Mask out the irrelevant bits.
|
||||
*/
|
||||
base &= ~(boundary - 1);
|
||||
return &state->m_gfxram[(base & 0x3ffff) / 2];
|
||||
return &m_gfxram[(base & 0x3ffff) / 2];
|
||||
}
|
||||
|
||||
|
||||
@ -1716,7 +1715,7 @@ WRITE16_MEMBER(cps_state::cps1_cps_a_w)
|
||||
fixes glitches in the ghouls intro, but it might happen at next vblank.
|
||||
*/
|
||||
if (offset == CPS1_PALETTE_BASE)
|
||||
cps1_build_palette(cps1_base(machine(), CPS1_PALETTE_BASE, m_palette_align));
|
||||
cps1_build_palette(cps1_base(CPS1_PALETTE_BASE, m_palette_align));
|
||||
|
||||
// pzloop2 write to register 24 on startup. This is probably just a bug.
|
||||
if (offset == 0x24 / 2 && m_cps_version == 2)
|
||||
@ -1902,19 +1901,19 @@ void cps_state::cps1_get_video_base()
|
||||
int layercontrol=0, videocontrol=0, scroll1xoff=0, scroll2xoff=0, scroll3xoff=0;
|
||||
|
||||
/* Re-calculate the VIDEO RAM base */
|
||||
if (m_scroll1 != cps1_base(machine(), CPS1_SCROLL1_BASE, m_scroll_size))
|
||||
if (m_scroll1 != cps1_base(CPS1_SCROLL1_BASE, m_scroll_size))
|
||||
{
|
||||
m_scroll1 = cps1_base(machine(), CPS1_SCROLL1_BASE, m_scroll_size);
|
||||
m_scroll1 = cps1_base(CPS1_SCROLL1_BASE, m_scroll_size);
|
||||
m_bg_tilemap[0]->mark_all_dirty();
|
||||
}
|
||||
if (m_scroll2 != cps1_base(machine(), CPS1_SCROLL2_BASE, m_scroll_size))
|
||||
if (m_scroll2 != cps1_base(CPS1_SCROLL2_BASE, m_scroll_size))
|
||||
{
|
||||
m_scroll2 = cps1_base(machine(), CPS1_SCROLL2_BASE, m_scroll_size);
|
||||
m_scroll2 = cps1_base(CPS1_SCROLL2_BASE, m_scroll_size);
|
||||
m_bg_tilemap[1]->mark_all_dirty();
|
||||
}
|
||||
if (m_scroll3 != cps1_base(machine(), CPS1_SCROLL3_BASE, m_scroll_size))
|
||||
if (m_scroll3 != cps1_base(CPS1_SCROLL3_BASE, m_scroll_size))
|
||||
{
|
||||
m_scroll3 = cps1_base(machine(), CPS1_SCROLL3_BASE, m_scroll_size);
|
||||
m_scroll3 = cps1_base(CPS1_SCROLL3_BASE, m_scroll_size);
|
||||
m_bg_tilemap[2]->mark_all_dirty();
|
||||
}
|
||||
|
||||
@ -1942,8 +1941,8 @@ void cps_state::cps1_get_video_base()
|
||||
scroll3xoff = -0x0c;
|
||||
}
|
||||
|
||||
m_obj = cps1_base(machine(), CPS1_OBJ_BASE, m_obj_size);
|
||||
m_other = cps1_base(machine(), CPS1_OTHER_BASE, m_other_size);
|
||||
m_obj = cps1_base(CPS1_OBJ_BASE, m_obj_size);
|
||||
m_other = cps1_base(CPS1_OTHER_BASE, m_other_size);
|
||||
|
||||
/* Get scroll values */
|
||||
m_scroll1x = m_cps_a_regs[CPS1_SCROLL1_SCROLLX] + scroll1xoff;
|
||||
|
@ -195,13 +195,13 @@ UINT32 f1gp_state::screen_update_f1gp(screen_device &screen, bitmap_ind16 &bitma
|
||||
/* quick kludge for "continue" screen priority */
|
||||
if (m_gfxctrl == 0x00)
|
||||
{
|
||||
m_spr_old->turbofrc_draw_sprites(m_spr1vram, m_spr1vram.bytes(), 0, machine(), bitmap, cliprect, screen.priority(), 0x02);
|
||||
m_spr_old2->turbofrc_draw_sprites(m_spr2vram, m_spr2vram.bytes(), 0, machine(), bitmap, cliprect, screen.priority(), 0x02);
|
||||
m_spr_old->turbofrc_draw_sprites(m_spr1vram, m_spr1vram.bytes(), 0, bitmap, cliprect, screen.priority(), 0x02);
|
||||
m_spr_old2->turbofrc_draw_sprites(m_spr2vram, m_spr2vram.bytes(), 0, bitmap, cliprect, screen.priority(), 0x02);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_spr_old->turbofrc_draw_sprites(m_spr1vram, m_spr1vram.bytes(), 0, machine(), bitmap, cliprect, screen.priority(), 0x00);
|
||||
m_spr_old2->turbofrc_draw_sprites(m_spr2vram, m_spr2vram.bytes(), 0, machine(), bitmap, cliprect, screen.priority(), 0x02);
|
||||
m_spr_old->turbofrc_draw_sprites(m_spr1vram, m_spr1vram.bytes(), 0, bitmap, cliprect, screen.priority(), 0x00);
|
||||
m_spr_old2->turbofrc_draw_sprites(m_spr2vram, m_spr2vram.bytes(), 0, bitmap, cliprect, screen.priority(), 0x02);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -306,7 +306,7 @@ UINT32 fromance_state::screen_update_pipedrm(screen_device &screen, bitmap_ind16
|
||||
m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0);
|
||||
m_fg_tilemap->draw(screen, bitmap, cliprect, 0, 0);
|
||||
|
||||
m_spr_old->turbofrc_draw_sprites((UINT16*)sram, m_spriteram.bytes(), 0, machine(), bitmap, cliprect, screen.priority(), 0);
|
||||
m_spr_old->turbofrc_draw_sprites((UINT16*)sram, m_spriteram.bytes(), 0, machine(), bitmap, cliprect, screen.priority(), 1);
|
||||
m_spr_old->turbofrc_draw_sprites((UINT16*)sram, m_spriteram.bytes(), 0, bitmap, cliprect, screen.priority(), 0);
|
||||
m_spr_old->turbofrc_draw_sprites((UINT16*)sram, m_spriteram.bytes(), 0, bitmap, cliprect, screen.priority(), 1);
|
||||
return 0;
|
||||
}
|
||||
|
@ -669,7 +669,7 @@ WRITE16_MEMBER( gp9001vdp_device::pipibibi_bootleg_spriteram16_w )
|
||||
Sprite Handlers
|
||||
***************************************************************************/
|
||||
|
||||
void gp9001vdp_device::draw_sprites( running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect, const UINT8* primap )
|
||||
void gp9001vdp_device::draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect, const UINT8* primap )
|
||||
{
|
||||
const UINT16 primask = (GP9001_PRIMASK << 8);
|
||||
|
||||
@ -859,10 +859,10 @@ void gp9001vdp_device::draw_sprites( running_machine &machine, bitmap_ind16 &bit
|
||||
Draw the game screen in the given bitmap_ind16.
|
||||
***************************************************************************/
|
||||
|
||||
void gp9001vdp_device::gp9001_draw_custom_tilemap(running_machine& machine, bitmap_ind16 &bitmap, tilemap_t* tilemap, const UINT8* priremap, const UINT8* pri_enable )
|
||||
void gp9001vdp_device::gp9001_draw_custom_tilemap( bitmap_ind16 &bitmap, tilemap_t* tilemap, const UINT8* priremap, const UINT8* pri_enable )
|
||||
{
|
||||
int width = machine.first_screen()->width();
|
||||
int height = machine.first_screen()->height();
|
||||
int width = m_screen->width();
|
||||
int height = m_screen->height();
|
||||
int y,x;
|
||||
bitmap_ind16 &tmb = tilemap->pixmap();
|
||||
UINT16* srcptr;
|
||||
@ -912,7 +912,7 @@ static const UINT8 gp9001_sprprimap1[16] = { 0x00, 0x04, 0x08, 0x0c, 0x10, 0x14
|
||||
|
||||
static const UINT8 batsugun_prienable0[16]={ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
|
||||
|
||||
void gp9001vdp_device::gp9001_render_vdp(running_machine& machine, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
void gp9001vdp_device::gp9001_render_vdp(bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
if (gp9001_gfxrom_is_banked && gp9001_gfxrom_bank_dirty)
|
||||
{
|
||||
@ -921,10 +921,10 @@ void gp9001vdp_device::gp9001_render_vdp(running_machine& machine, bitmap_ind16
|
||||
gp9001_gfxrom_bank_dirty = 0;
|
||||
}
|
||||
|
||||
gp9001_draw_custom_tilemap( machine, bitmap, bg.tmap, gp9001_primap1, batsugun_prienable0);
|
||||
gp9001_draw_custom_tilemap( machine, bitmap, fg.tmap, gp9001_primap1, batsugun_prienable0);
|
||||
gp9001_draw_custom_tilemap( machine, bitmap, top.tmap, gp9001_primap1, batsugun_prienable0);
|
||||
draw_sprites( machine,bitmap,cliprect, gp9001_sprprimap1);
|
||||
gp9001_draw_custom_tilemap(bitmap, bg.tmap, gp9001_primap1, batsugun_prienable0);
|
||||
gp9001_draw_custom_tilemap(bitmap, fg.tmap, gp9001_primap1, batsugun_prienable0);
|
||||
gp9001_draw_custom_tilemap(bitmap, top.tmap, gp9001_primap1, batsugun_prienable0);
|
||||
draw_sprites(bitmap,cliprect, gp9001_sprprimap1);
|
||||
}
|
||||
|
||||
|
||||
|
@ -53,9 +53,9 @@ public:
|
||||
UINT16 gp9001_gfxrom_bank[8]; /* Batrider object bank */
|
||||
|
||||
|
||||
void draw_sprites( running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect, const UINT8* primap );
|
||||
void gp9001_draw_custom_tilemap(running_machine& machine, bitmap_ind16 &bitmap, tilemap_t* tilemap, const UINT8* priremap, const UINT8* pri_enable );
|
||||
void gp9001_render_vdp(running_machine& machine, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect, const UINT8* primap );
|
||||
void gp9001_draw_custom_tilemap( bitmap_ind16 &bitmap, tilemap_t* tilemap, const UINT8* priremap, const UINT8* pri_enable );
|
||||
void gp9001_render_vdp( bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
void gp9001_screen_eof(void);
|
||||
void create_tilemaps(void);
|
||||
void init_scroll_regs(void);
|
||||
|
@ -1269,8 +1269,7 @@ int k056832_device::update_linemap( screen_device &screen, _BitmapClass &bitmap,
|
||||
*/
|
||||
{
|
||||
bitmap_ind16 *pixmap;
|
||||
running_machine &machine = device->machine();
|
||||
|
||||
|
||||
UINT8 code_transparent, code_opaque;
|
||||
const pen_t *pal_ptr;
|
||||
const UINT8 *src_ptr;
|
||||
@ -1292,7 +1291,7 @@ int k056832_device::update_linemap( screen_device &screen, _BitmapClass &bitmap,
|
||||
{ xpr_ptr[count+N] = 0; }
|
||||
|
||||
pixmap = m_pixmap[page];
|
||||
pal_ptr = machine.pens;
|
||||
pal_ptr = machine().pens;
|
||||
src_gfx = m_gfxdecode->gfx(m_gfx_num];
|
||||
src_pitch = src_gfx->rowbytes();
|
||||
src_modulo = src_gfx->char_modulo;
|
||||
@ -2229,7 +2228,7 @@ int k056832_device::altK056832_update_linemap(screen_device &screen, bitmap_rgb3
|
||||
{ xpr_ptr[count+N] = 0; }
|
||||
|
||||
pixmap = m_pixmap[page];
|
||||
pal_ptr = machine.pens;
|
||||
pal_ptr = machine().pens;
|
||||
src_gfx = m_gfxdecode->gfx(m_gfx_num];
|
||||
src_pitch = src_gfx->rowbytes();
|
||||
src_modulo = src_gfx->char_modulo;
|
||||
|
@ -285,9 +285,9 @@ int K055555GX_decode_osmixcolor(int layer, int *color) // (see p.63, p.49-50 and
|
||||
}
|
||||
#endif
|
||||
|
||||
static void gx_wipezbuf(running_machine &machine, int noshadow)
|
||||
void konamigx_state::wipezbuf(int noshadow)
|
||||
{
|
||||
const rectangle &visarea = machine.first_screen()->visible_area();
|
||||
const rectangle &visarea = m_screen->visible_area();
|
||||
|
||||
int w = visarea.width();
|
||||
int h = visarea.height();
|
||||
@ -427,7 +427,7 @@ void konamigx_state::konamigx_mixer(screen_device &screen, bitmap_rgb32 &bitmap,
|
||||
if (mixerflags & GXMIX_NOZBUF)
|
||||
mixerflags |= GXMIX_NOSHADOW;
|
||||
else
|
||||
gx_wipezbuf(machine(), mixerflags & GXMIX_NOSHADOW);
|
||||
wipezbuf(mixerflags & GXMIX_NOSHADOW);
|
||||
|
||||
// cache global parameters
|
||||
konamigx_precache_registers();
|
||||
|
@ -20,7 +20,8 @@ const device_type SKNS_SPRITE = &device_creator<sknsspr_device>;
|
||||
|
||||
|
||||
sknsspr_device::sknsspr_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||
: device_t(mconfig, SKNS_SPRITE, "SKNS Sprite", tag, owner, clock, "sknsspr", __FILE__)
|
||||
: device_t(mconfig, SKNS_SPRITE, "SKNS Sprite", tag, owner, clock, "sknsspr", __FILE__),
|
||||
device_video_interface(mconfig, *this)
|
||||
{
|
||||
}
|
||||
|
||||
@ -34,7 +35,7 @@ void sknsspr_device::device_reset()
|
||||
//printf("sknsspr_device::device_reset()\n");
|
||||
}
|
||||
|
||||
int sknsspr_device::skns_rle_decode ( running_machine &machine, int romoffset, int size, UINT8*gfx_source, size_t gfx_length )
|
||||
int sknsspr_device::skns_rle_decode ( int romoffset, int size, UINT8*gfx_source, size_t gfx_length )
|
||||
{
|
||||
UINT8 *src = gfx_source;
|
||||
size_t srcsize = gfx_length;
|
||||
@ -229,7 +230,7 @@ static void (*const blit_z[4])(bitmap_ind16 &bitmap, const rectangle &cliprect,
|
||||
blit_fxy_z,
|
||||
};
|
||||
|
||||
void sknsspr_device::skns_draw_sprites(running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect, UINT32* spriteram_source, size_t spriteram_size, UINT8* gfx_source, size_t gfx_length, UINT32* sprite_regs)
|
||||
void sknsspr_device::skns_draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, UINT32* spriteram_source, size_t spriteram_size, UINT8* gfx_source, size_t gfx_length, UINT32* sprite_regs)
|
||||
{
|
||||
/*- SPR RAM Format -**
|
||||
|
||||
@ -395,12 +396,12 @@ void sknsspr_device::skns_draw_sprites(running_machine &machine, bitmap_ind16 &b
|
||||
if (sprite_flip&2)
|
||||
{
|
||||
xflip ^= 1;
|
||||
sx = machine.first_screen()->visible_area().max_x+1 - sx;
|
||||
sx = m_screen->visible_area().max_x+1 - sx;
|
||||
}
|
||||
if (sprite_flip&1)
|
||||
{
|
||||
yflip ^= 1;
|
||||
sy = machine.first_screen()->visible_area().max_y+1 - sy;
|
||||
sy = m_screen->visible_area().max_y+1 - sy;
|
||||
}
|
||||
|
||||
/* Palette linking */
|
||||
@ -446,7 +447,7 @@ void sknsspr_device::skns_draw_sprites(running_machine &machine, bitmap_ind16 &b
|
||||
|
||||
romoffset &= gfxlen-1;
|
||||
|
||||
endromoffs = skns_rle_decode ( machine, romoffset, size, gfx_source, gfx_length );
|
||||
endromoffs = skns_rle_decode ( romoffset, size, gfx_source, gfx_length );
|
||||
|
||||
// in Cyvern
|
||||
|
||||
|
@ -1,9 +1,11 @@
|
||||
|
||||
class sknsspr_device : public device_t
|
||||
class sknsspr_device : public device_t,
|
||||
public device_video_interface
|
||||
{
|
||||
public:
|
||||
sknsspr_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
void skns_draw_sprites(running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect, UINT32* spriteram_source, size_t spriteram_size, UINT8* gfx_source, size_t gfx_length, UINT32* sprite_regs);
|
||||
|
||||
void skns_draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, UINT32* spriteram_source, size_t spriteram_size, UINT8* gfx_source, size_t gfx_length, UINT32* sprite_regs);
|
||||
void skns_sprite_kludge(int x, int y);
|
||||
|
||||
protected:
|
||||
@ -13,7 +15,7 @@ private:
|
||||
int sprite_kludge_x, sprite_kludge_y;
|
||||
#define SUPRNOVA_DECODE_BUFFER_SIZE 0x2000
|
||||
UINT8 decodebuffer[SUPRNOVA_DECODE_BUFFER_SIZE];
|
||||
int skns_rle_decode ( running_machine &machine, int romoffset, int size, UINT8*gfx_source, size_t gfx_length );
|
||||
int skns_rle_decode ( int romoffset, int size, UINT8*gfx_source, size_t gfx_length );
|
||||
};
|
||||
|
||||
extern const device_type SKNS_SPRITE;
|
||||
|
@ -658,15 +658,13 @@ WRITE8_MEMBER(snk_state::tdfever_spriteram_w)
|
||||
|
||||
/**************************************************************************************/
|
||||
|
||||
static void marvins_draw_sprites(running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect,
|
||||
const int scrollx, const int scrolly, const int from, const int to)
|
||||
void snk_state::marvins_draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, const int scrollx, const int scrolly, const int from, const int to)
|
||||
{
|
||||
snk_state *state = machine.driver_data<snk_state>();
|
||||
gfx_element *gfx = state->m_gfxdecode->gfx(3);
|
||||
gfx_element *gfx = m_gfxdecode->gfx(3);
|
||||
const UINT8 *source, *finish;
|
||||
|
||||
source = state->m_spriteram + from*4;
|
||||
finish = state->m_spriteram + to*4;
|
||||
source = m_spriteram + from*4;
|
||||
finish = m_spriteram + to*4;
|
||||
|
||||
while( source<finish )
|
||||
{
|
||||
@ -678,7 +676,7 @@ static void marvins_draw_sprites(running_machine &machine, bitmap_ind16 &bitmap,
|
||||
int flipy = (attributes&0x20);
|
||||
int flipx = 0;
|
||||
|
||||
if (state->flip_screen())
|
||||
if (flip_screen())
|
||||
{
|
||||
sx = 89 - 16 - sx;
|
||||
sy = 262 - 16 - sy;
|
||||
@ -696,7 +694,7 @@ static void marvins_draw_sprites(running_machine &machine, bitmap_ind16 &bitmap,
|
||||
color,
|
||||
flipx, flipy,
|
||||
sx, sy,
|
||||
state->m_drawmode_table);
|
||||
m_drawmode_table);
|
||||
|
||||
source+=4;
|
||||
}
|
||||
@ -767,11 +765,9 @@ void snk_state::tnk3_draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprec
|
||||
}
|
||||
|
||||
|
||||
static void ikari_draw_sprites(running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect,
|
||||
const int start, const int xscroll, const int yscroll, const UINT8 *source, const int gfxnum )
|
||||
void snk_state::ikari_draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, const int start, const int xscroll, const int yscroll, const UINT8 *source, const int gfxnum )
|
||||
{
|
||||
snk_state *state = machine.driver_data<snk_state>();
|
||||
gfx_element *gfx = state->m_gfxdecode->gfx(gfxnum);
|
||||
gfx_element *gfx = m_gfxdecode->gfx(gfxnum);
|
||||
const int size = gfx->width();
|
||||
int tile_number, attributes, color, sx, sy;
|
||||
int which, finish;
|
||||
@ -809,7 +805,7 @@ static void ikari_draw_sprites(running_machine &machine, bitmap_ind16 &bitmap, c
|
||||
color,
|
||||
0,0,
|
||||
sx,sy,
|
||||
state->m_drawmode_table);
|
||||
m_drawmode_table);
|
||||
}
|
||||
}
|
||||
|
||||
@ -839,11 +835,10 @@ byte3: attributes
|
||||
-xx-x--- (bank number)
|
||||
x------- (x offset bit8)
|
||||
*/
|
||||
static void tdfever_draw_sprites(running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect,
|
||||
const int xscroll, const int yscroll, const UINT8 *source, const int gfxnum, const int hw_xflip, const int from, const int to )
|
||||
void snk_state::tdfever_draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, const int xscroll, const int yscroll, const UINT8 *source, const int gfxnum,
|
||||
const int hw_xflip, const int from, const int to)
|
||||
{
|
||||
snk_state *state = machine.driver_data<snk_state>();
|
||||
gfx_element *gfx = state->m_gfxdecode->gfx(gfxnum);
|
||||
gfx_element *gfx = m_gfxdecode->gfx(gfxnum);
|
||||
const int size = gfx->width();
|
||||
int tile_number, attributes, sx, sy, color;
|
||||
int which;
|
||||
@ -879,7 +874,7 @@ static void tdfever_draw_sprites(running_machine &machine, bitmap_ind16 &bitmap,
|
||||
if (hw_xflip)
|
||||
sx = 495 - size - sx;
|
||||
|
||||
if (state->flip_screen())
|
||||
if (flip_screen())
|
||||
{
|
||||
sx = 495 - size - sx;
|
||||
sy = 258 - size - sy;
|
||||
@ -897,7 +892,7 @@ static void tdfever_draw_sprites(running_machine &machine, bitmap_ind16 &bitmap,
|
||||
color,
|
||||
flipx,flipy,
|
||||
sx,sy,
|
||||
state->m_drawmode_table);
|
||||
m_drawmode_table);
|
||||
}
|
||||
}
|
||||
|
||||
@ -911,9 +906,9 @@ UINT32 snk_state::screen_update_marvins(screen_device &screen, bitmap_ind16 &bit
|
||||
m_fg_tilemap->set_scrolly(0, m_fg_scrolly);
|
||||
|
||||
m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0);
|
||||
marvins_draw_sprites(machine(), bitmap, cliprect, m_sp16_scrollx, m_sp16_scrolly, 0, m_sprite_split_point>>2);
|
||||
marvins_draw_sprites(bitmap, cliprect, m_sp16_scrollx, m_sp16_scrolly, 0, m_sprite_split_point>>2);
|
||||
m_fg_tilemap->draw(screen, bitmap, cliprect, 0, 0);
|
||||
marvins_draw_sprites(machine(), bitmap, cliprect, m_sp16_scrollx, m_sp16_scrolly, m_sprite_split_point>>2, 25);
|
||||
marvins_draw_sprites(bitmap, cliprect, m_sp16_scrollx, m_sp16_scrolly, m_sprite_split_point>>2, 25);
|
||||
m_tx_tilemap->draw(screen, bitmap, cliprect, 0, 0);
|
||||
|
||||
return 0;
|
||||
@ -940,9 +935,9 @@ UINT32 snk_state::screen_update_ikari(screen_device &screen, bitmap_ind16 &bitma
|
||||
|
||||
m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0);
|
||||
|
||||
ikari_draw_sprites(machine(), bitmap, cliprect, 0, m_sp16_scrollx, m_sp16_scrolly, m_spriteram + 0x800, 2 );
|
||||
ikari_draw_sprites(machine(), bitmap, cliprect, 0, m_sp32_scrollx, m_sp32_scrolly, m_spriteram, 3 );
|
||||
ikari_draw_sprites(machine(), bitmap, cliprect, 25, m_sp16_scrollx, m_sp16_scrolly, m_spriteram + 0x800, 2 );
|
||||
ikari_draw_sprites(bitmap, cliprect, 0, m_sp16_scrollx, m_sp16_scrolly, m_spriteram + 0x800, 2 );
|
||||
ikari_draw_sprites(bitmap, cliprect, 0, m_sp32_scrollx, m_sp32_scrolly, m_spriteram, 3 );
|
||||
ikari_draw_sprites(bitmap, cliprect, 25, m_sp16_scrollx, m_sp16_scrolly, m_spriteram + 0x800, 2 );
|
||||
|
||||
m_tx_tilemap->draw(screen, bitmap, cliprect, 0, 0);
|
||||
return 0;
|
||||
@ -956,9 +951,9 @@ UINT32 snk_state::screen_update_gwar(screen_device &screen, bitmap_ind16 &bitmap
|
||||
|
||||
m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0);
|
||||
|
||||
tdfever_draw_sprites(machine(), bitmap, cliprect, m_sp16_scrollx, m_sp16_scrolly, m_spriteram + 0x800, 2, 0, 0, m_sprite_split_point );
|
||||
tdfever_draw_sprites(machine(), bitmap, cliprect, m_sp32_scrollx, m_sp32_scrolly, m_spriteram, 3, 0, 0, 32 );
|
||||
tdfever_draw_sprites(machine(), bitmap, cliprect, m_sp16_scrollx, m_sp16_scrolly, m_spriteram + 0x800, 2, 0, m_sprite_split_point, 64 );
|
||||
tdfever_draw_sprites(bitmap, cliprect, m_sp16_scrollx, m_sp16_scrolly, m_spriteram + 0x800, 2, 0, 0, m_sprite_split_point );
|
||||
tdfever_draw_sprites(bitmap, cliprect, m_sp32_scrollx, m_sp32_scrolly, m_spriteram, 3, 0, 0, 32 );
|
||||
tdfever_draw_sprites(bitmap, cliprect, m_sp16_scrollx, m_sp16_scrolly, m_spriteram + 0x800, 2, 0, m_sprite_split_point, 64 );
|
||||
|
||||
m_tx_tilemap->draw(screen, bitmap, cliprect, 0, 0);
|
||||
|
||||
@ -973,7 +968,7 @@ UINT32 snk_state::screen_update_tdfever(screen_device &screen, bitmap_ind16 &bit
|
||||
|
||||
m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0);
|
||||
|
||||
tdfever_draw_sprites(machine(), bitmap, cliprect, m_sp32_scrollx, m_sp32_scrolly, m_spriteram, 2, 1, 0, 32 );
|
||||
tdfever_draw_sprites(bitmap, cliprect, m_sp32_scrollx, m_sp32_scrolly, m_spriteram, 2, 1, 0, 32 );
|
||||
|
||||
m_tx_tilemap->draw(screen, bitmap, cliprect, 0, 0);
|
||||
|
||||
|
@ -975,7 +975,7 @@ UINT32 ssv_state::screen_update_gdfs(screen_device &screen, bitmap_ind16 &bitmap
|
||||
screen_update_ssv(screen, bitmap, cliprect);
|
||||
|
||||
// draw zooming sprites
|
||||
m_gdfs_st0020->st0020_draw_all(machine(), bitmap, cliprect);
|
||||
m_gdfs_st0020->st0020_draw_all(bitmap, cliprect);
|
||||
|
||||
m_gdfs_tmap->set_scrollx(0, m_gdfs_tmapscroll[0x0c/2]);
|
||||
m_gdfs_tmap->set_scrolly(0, m_gdfs_tmapscroll[0x10/2]);
|
||||
|
@ -276,7 +276,7 @@ WRITE16_MEMBER(st0020_device::st0020_blitram_w)
|
||||
E.h Unused
|
||||
|
||||
*/
|
||||
void st0020_device::st0020_draw_zooming_sprites(running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect, int priority)
|
||||
void st0020_device::st0020_draw_zooming_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, int priority)
|
||||
{
|
||||
/* Sprites list */
|
||||
UINT16 *spriteram16_2 = m_st0020_spriteram;
|
||||
@ -405,11 +405,11 @@ void st0020_device::st0020_draw_zooming_sprites(running_machine &machine, bitmap
|
||||
|
||||
|
||||
#if 0 /* doesn't compile in a device context (can't use ui_draw_text? */
|
||||
if (machine.input().code_pressed(KEYCODE_Z)) /* Display some info on each sprite */
|
||||
if (machine().input().code_pressed(KEYCODE_Z)) /* Display some info on each sprite */
|
||||
{
|
||||
char buf[10];
|
||||
sprintf(buf, "%X",size);
|
||||
ui_draw_text(&machine.render().ui_container(), buf, sx / 0x10000, sy / 0x10000);
|
||||
ui_draw_text(&machine().render().ui_container(), buf, sx / 0x10000, sy / 0x10000);
|
||||
}
|
||||
#endif
|
||||
} /* single-sprites */
|
||||
@ -421,8 +421,8 @@ void st0020_device::st0020_draw_zooming_sprites(running_machine &machine, bitmap
|
||||
|
||||
|
||||
|
||||
void st0020_device::st0020_draw_all(running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
void st0020_device::st0020_draw_all(bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
for (int pri = 0; pri <= 0xf; pri++)
|
||||
st0020_draw_zooming_sprites(machine, bitmap, cliprect, pri);
|
||||
st0020_draw_zooming_sprites(bitmap, cliprect, pri);
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ public:
|
||||
// per-game hack
|
||||
int m_is_jclub2;
|
||||
|
||||
void st0020_draw_all(running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
void st0020_draw_all(bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
|
||||
DECLARE_READ16_MEMBER(st0020_gfxram_r);
|
||||
DECLARE_WRITE16_MEMBER(st0020_gfxram_w);
|
||||
@ -40,7 +40,7 @@ private:
|
||||
UINT16* m_st0020_gfxram;
|
||||
UINT16* m_st0020_spriteram;
|
||||
UINT16* m_st0020_blitram;
|
||||
void st0020_draw_zooming_sprites(running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect, int priority);
|
||||
void st0020_draw_zooming_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, int priority);
|
||||
DECLARE_READ16_MEMBER(st0020_blit_r);
|
||||
DECLARE_WRITE16_MEMBER(st0020_blit_w);
|
||||
required_device<gfxdecode_device> m_gfxdecode;
|
||||
|
@ -608,7 +608,7 @@ UINT32 skns_state::screen_update_skns(screen_device &screen, bitmap_rgb32 &bitma
|
||||
m_sprite_bitmap.fill(0x0000, cliprect);
|
||||
|
||||
if (m_alt_enable_sprites)
|
||||
m_spritegen->skns_draw_sprites(machine(), m_sprite_bitmap, cliprect, m_spriteram, m_spriteram.bytes(), memregion("gfx1")->base(), memregion ("gfx1")->bytes(), m_spc_regs );
|
||||
m_spritegen->skns_draw_sprites(m_sprite_bitmap, cliprect, m_spriteram, m_spriteram.bytes(), memregion("gfx1")->base(), memregion ("gfx1")->bytes(), m_spc_regs );
|
||||
|
||||
|
||||
return 0;
|
||||
|
@ -230,13 +230,13 @@ UINT32 toaplan2_state::screen_update_dogyuun(screen_device &screen, bitmap_ind16
|
||||
{
|
||||
bitmap.fill(0, cliprect);
|
||||
m_custom_priority_bitmap.fill(0, cliprect);
|
||||
m_vdp1->gp9001_render_vdp(machine(), bitmap, cliprect);
|
||||
m_vdp1->gp9001_render_vdp(bitmap, cliprect);
|
||||
}
|
||||
if (m_vdp0)
|
||||
{
|
||||
// bitmap.fill(0, cliprect);
|
||||
m_custom_priority_bitmap.fill(0, cliprect);
|
||||
m_vdp0->gp9001_render_vdp(machine(), bitmap, cliprect);
|
||||
m_vdp0->gp9001_render_vdp(bitmap, cliprect);
|
||||
}
|
||||
|
||||
|
||||
@ -254,13 +254,13 @@ UINT32 toaplan2_state::screen_update_batsugun(screen_device &screen, bitmap_ind1
|
||||
{
|
||||
bitmap.fill(0, cliprect);
|
||||
m_custom_priority_bitmap.fill(0, cliprect);
|
||||
m_vdp0->gp9001_render_vdp(machine(), bitmap, cliprect);
|
||||
m_vdp0->gp9001_render_vdp(bitmap, cliprect);
|
||||
}
|
||||
if (m_vdp1)
|
||||
{
|
||||
m_secondary_render_bitmap.fill(0, cliprect);
|
||||
m_custom_priority_bitmap.fill(0, cliprect);
|
||||
m_vdp1->gp9001_render_vdp(machine(), m_secondary_render_bitmap, cliprect);
|
||||
m_vdp1->gp9001_render_vdp(m_secondary_render_bitmap, cliprect);
|
||||
}
|
||||
|
||||
|
||||
@ -348,7 +348,7 @@ UINT32 toaplan2_state::screen_update_toaplan2(screen_device &screen, bitmap_ind1
|
||||
{
|
||||
bitmap.fill(0, cliprect);
|
||||
m_custom_priority_bitmap.fill(0, cliprect);
|
||||
m_vdp0->gp9001_render_vdp(machine(), bitmap, cliprect);
|
||||
m_vdp0->gp9001_render_vdp(bitmap, cliprect);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -137,7 +137,7 @@ void vsystem_spr2_device::handle_xsize_map_inc(void)
|
||||
}
|
||||
|
||||
template<class _BitmapClass>
|
||||
void vsystem_spr2_device::turbofrc_draw_sprites_common( UINT16* spriteram3, int spriteram3_bytes, int spritepalettebank, running_machine &machine, _BitmapClass &bitmap, const rectangle &cliprect, bitmap_ind8 &priority_bitmap, int pri_param )
|
||||
void vsystem_spr2_device::turbofrc_draw_sprites_common( UINT16* spriteram3, int spriteram3_bytes, int spritepalettebank, _BitmapClass &bitmap, const rectangle &cliprect, bitmap_ind8 &priority_bitmap, int pri_param )
|
||||
{
|
||||
int attr_start, first;
|
||||
first = 4 * spriteram3[0x1fe];
|
||||
@ -244,8 +244,8 @@ void vsystem_spr2_device::turbofrc_draw_sprites_common( UINT16* spriteram3, int
|
||||
}
|
||||
}
|
||||
|
||||
void vsystem_spr2_device::turbofrc_draw_sprites( UINT16* spriteram3, int spriteram3_bytes, int spritepalettebank, running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect, bitmap_ind8 &priority_bitmap, int pri_param )
|
||||
{ turbofrc_draw_sprites_common( spriteram3, spriteram3_bytes, spritepalettebank, machine, bitmap, cliprect, priority_bitmap, pri_param ); }
|
||||
void vsystem_spr2_device::turbofrc_draw_sprites( UINT16* spriteram3, int spriteram3_bytes, int spritepalettebank, bitmap_ind16 &bitmap, const rectangle &cliprect, bitmap_ind8 &priority_bitmap, int pri_param )
|
||||
{ turbofrc_draw_sprites_common( spriteram3, spriteram3_bytes, spritepalettebank, bitmap, cliprect, priority_bitmap, pri_param ); }
|
||||
|
||||
void vsystem_spr2_device::turbofrc_draw_sprites( UINT16* spriteram3, int spriteram3_bytes, int spritepalettebank, running_machine &machine, bitmap_rgb32 &bitmap, const rectangle &cliprect, bitmap_ind8 &priority_bitmap, int pri_param )
|
||||
{ turbofrc_draw_sprites_common( spriteram3, spriteram3_bytes, spritepalettebank, machine, bitmap, cliprect, priority_bitmap, pri_param ); }
|
||||
void vsystem_spr2_device::turbofrc_draw_sprites( UINT16* spriteram3, int spriteram3_bytes, int spritepalettebank, bitmap_rgb32 &bitmap, const rectangle &cliprect, bitmap_ind8 &priority_bitmap, int pri_param )
|
||||
{ turbofrc_draw_sprites_common( spriteram3, spriteram3_bytes, spritepalettebank, bitmap, cliprect, priority_bitmap, pri_param ); }
|
||||
|
@ -52,10 +52,10 @@ public:
|
||||
int m_xoffs, m_yoffs;
|
||||
|
||||
template<class _BitmapClass>
|
||||
void turbofrc_draw_sprites_common( UINT16* spriteram3, int spriteram3_bytes, int spritepalettebank, running_machine &machine, _BitmapClass &bitmap, const rectangle &cliprect, bitmap_ind8 &priority_bitmap, int pri_param );
|
||||
void turbofrc_draw_sprites_common( UINT16* spriteram3, int spriteram3_bytes, int spritepalettebank, _BitmapClass &bitmap, const rectangle &cliprect, bitmap_ind8 &priority_bitmap, int pri_param );
|
||||
|
||||
void turbofrc_draw_sprites( UINT16* spriteram3, int spriteram3_bytes, int spritepalettebank, running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect, bitmap_ind8 &priority_bitmap, int pri_param );
|
||||
void turbofrc_draw_sprites( UINT16* spriteram3, int spriteram3_bytes, int spritepalettebank, running_machine &machine, bitmap_rgb32 &bitmap, const rectangle &cliprect, bitmap_ind8 &priority_bitmap, int pri_param );
|
||||
void turbofrc_draw_sprites( UINT16* spriteram3, int spriteram3_bytes, int spritepalettebank, bitmap_ind16 &bitmap, const rectangle &cliprect, bitmap_ind8 &priority_bitmap, int pri_param );
|
||||
void turbofrc_draw_sprites( UINT16* spriteram3, int spriteram3_bytes, int spritepalettebank, bitmap_rgb32 &bitmap, const rectangle &cliprect, bitmap_ind8 &priority_bitmap, int pri_param );
|
||||
|
||||
|
||||
|
||||
|
@ -98,6 +98,6 @@ UINT32 welltris_state::screen_update_welltris(screen_device &screen, bitmap_ind1
|
||||
|
||||
draw_background(bitmap, cliprect);
|
||||
m_char_tilemap->draw(screen, bitmap, cliprect, 0, 0);
|
||||
m_spr_old->turbofrc_draw_sprites(m_spriteram, m_spriteram.bytes(), m_spritepalettebank, machine(), bitmap, cliprect, screen.priority(), 0);
|
||||
m_spr_old->turbofrc_draw_sprites(m_spriteram, m_spriteram.bytes(), m_spritepalettebank, bitmap, cliprect, screen.priority(), 0);
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user