Previous 199869 Revisions Next

r32578 Tuesday 7th October, 2014 at 16:55:09 UTC by Osso
Misc cleanups of the day (nw)
[src/mame/drivers]galpani3.c jchan.c jclub2.c tatsumi.c
[src/mame/includes]asterix.h cps1.h konamigx.h snk.h tatsumi.h
[src/mame/machine]tatsumi.c
[src/mame/video]aerofgt.c asterix.c cps1.c f1gp.c fromance.c gp9001.c gp9001.h k054156_k054157_k056832.c konamigx.c sknsspr.c sknsspr.h snk.c ssv.c st0020.c st0020.h suprnova.c toaplan2.c vsystem_spr2.c vsystem_spr2.h welltris.c

trunk/src/mame/drivers/jclub2.c
r32577r32578
136136   DECLARE_WRITE32_MEMBER(darkhors_tmapram2_w);
137137   DECLARE_WRITE32_MEMBER(darkhors_input_sel_w);
138138   DECLARE_READ32_MEMBER(darkhors_input_sel_r);
139DECLARE_READ32_MEMBER(p_4e0000);
139   DECLARE_READ32_MEMBER(p_4e0000);
140140   DECLARE_READ32_MEMBER(p_580000);
141141   DECLARE_READ32_MEMBER(p_580004);
142142   DECLARE_READ32_MEMBER(p_580008);
r32577r32578
996996UINT32 darkhors_state::screen_update_jclub2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
997997{
998998   // this isn't an st0020..
999   m_gdfs_st0020->st0020_draw_all(machine(), bitmap, cliprect);
999   m_gdfs_st0020->st0020_draw_all(bitmap, cliprect);
10001000
10011001   return 0;
10021002}
r32577r32578
10661066
10671067UINT32 darkhors_state::screen_update_jclub2o(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
10681068{
1069   m_gdfs_st0020->st0020_draw_all(machine(), bitmap, cliprect);
1069   m_gdfs_st0020->st0020_draw_all(bitmap, cliprect);
10701070   return 0;
10711071}
10721072
trunk/src/mame/drivers/galpani3.c
r32577r32578
351351
352352   m_sprite_bitmap_1.fill(0x0000, cliprect);
353353
354   m_spritegen->skns_draw_sprites(machine(), m_sprite_bitmap_1, cliprect, &m_spriteram32[0], 0x4000, memregion("gfx1")->base(), memregion ("gfx1")->bytes(), m_spc_regs );
354   m_spritegen->skns_draw_sprites(m_sprite_bitmap_1, cliprect, &m_spriteram32[0], 0x4000, memregion("gfx1")->base(), memregion ("gfx1")->bytes(), m_spc_regs );
355355
356356   // ignoring priority bits for now..
357357   for (y=0;y<240;y++)
trunk/src/mame/drivers/jchan.c
r32577r32578
319319   m_sprite_bitmap_1->fill(0x0000, cliprect);
320320   m_sprite_bitmap_2->fill(0x0000, cliprect);
321321
322   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 );
323   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 );
322   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 );
323   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 );
324324
325325   // ignoring priority bits for now - might use alpha too, check 0x8000 of palette writes
326326   for (y=0;y<240;y++)
trunk/src/mame/drivers/tatsumi.c
r32577r32578
13601360   m_rom_clut0 = memregion("gfx2")->base()+ 0x100000 - 0x800;
13611361   m_rom_clut1 = memregion("gfx3")->base()+ 0x100000 - 0x800;
13621362
1363   tatsumi_reset(machine());
1363   tatsumi_reset();
13641364
13651365   // TODO: ym2151_set_port_write_handler for CT1/CT2 outputs
13661366}
r32577r32578
13871387   m_rom_clut0 = memregion("gfx2")->base()+ 0xc0000 - 0x800;
13881388   m_rom_clut1 = memregion("gfx3")->base()+ 0xc0000 - 0x800;
13891389
1390   tatsumi_reset(machine());
1390   tatsumi_reset();
13911391}
13921392
13931393DRIVER_INIT_MEMBER(tatsumi_state,cyclwarr)
r32577r32578
14221422   m_rom_clut0 = memregion("gfx2")->base() + len1 - 0x1000;
14231423   m_rom_clut1 = memregion("gfx3")->base() + len2 - 0x1000;
14241424
1425   tatsumi_reset(machine());
1425   tatsumi_reset();
14261426}
14271427
14281428/***************************************************************************/
trunk/src/mame/machine/tatsumi.c
r32577r32578
66
77/******************************************************************************/
88
9void tatsumi_reset(running_machine &machine)
9void tatsumi_state::tatsumi_reset()
1010{
11   tatsumi_state *state = machine.driver_data<tatsumi_state>();
12   state->m_last_control = 0;
13   state->m_control_word = 0;
14   state->m_apache3_adc = 0;
15   state->m_apache3_rot_idx = 0;
11   m_last_control = 0;
12   m_control_word = 0;
13   m_apache3_adc = 0;
14   m_apache3_rot_idx = 0;
1615
17   state->save_item(NAME(state->m_last_control));
18   state->save_item(NAME(state->m_control_word));
19   state->save_item(NAME(state->m_apache3_adc));
16   save_item(NAME(m_last_control));
17   save_item(NAME(m_control_word));
18   save_item(NAME(m_apache3_adc));
2019}
2120
2221/******************************************************************************/
trunk/src/mame/includes/konamigx.h
r32577r32578
155155
156156   void konamigx_esc_alert(UINT32 *srcbase, int srcoffs, int count, int mode);
157157   void konamigx_precache_registers(void);
158   
159   void wipezbuf(int noshadow);
158160
159161   void dmastart_callback(int data);
160162
trunk/src/mame/includes/snk.h
r32577r32578
99public:
1010   snk_state(const machine_config &mconfig, device_type type, const char *tag)
1111      : driver_device(mconfig, type, tag),
12      m_spriteram(*this, "spriteram"),
13      m_fg_videoram(*this, "fg_videoram"),
14      m_bg_videoram(*this, "bg_videoram"),
15      m_tx_videoram(*this, "tx_videoram"),
1612      m_maincpu(*this, "maincpu"),
1713      m_audiocpu(*this, "audiocpu"),
1814      m_subcpu(*this, "sub"),
1915      m_gfxdecode(*this, "gfxdecode"),
2016      m_screen(*this, "screen"),
21      m_palette(*this, "palette") { }
17      m_palette(*this, "palette"),
18      m_spriteram(*this, "spriteram"),
19      m_fg_videoram(*this, "fg_videoram"),
20      m_bg_videoram(*this, "bg_videoram"),
21      m_tx_videoram(*this, "tx_videoram") { }
2222
23   required_device<cpu_device> m_maincpu;
24   required_device<cpu_device> m_audiocpu;
25   required_device<cpu_device> m_subcpu;
26   required_device<gfxdecode_device> m_gfxdecode;
27   required_device<screen_device> m_screen;
28   required_device<palette_device> m_palette;
29   
30   required_shared_ptr<UINT8> m_spriteram;
31   optional_shared_ptr<UINT8> m_fg_videoram;
32   required_shared_ptr<UINT8> m_bg_videoram;
33   required_shared_ptr<UINT8> m_tx_videoram;
34
2335   int m_countryc_trackball;
2436   int m_last_value[2];
2537   int m_cp_count[2];
r32577r32578
2739   int m_marvins_sound_busy_flag;
2840   // FIXME this should be initialised on machine reset
2941   int m_sound_status;
30
31   required_shared_ptr<UINT8> m_spriteram;
32   optional_shared_ptr<UINT8> m_fg_videoram;
33   required_shared_ptr<UINT8> m_bg_videoram;
34   required_shared_ptr<UINT8> m_tx_videoram;
35
42   
3643   tilemap_t *m_tx_tilemap;
3744   tilemap_t *m_fg_tilemap;
3845   tilemap_t *m_bg_tilemap;
r32577r32578
174181   UINT32 screen_update_tnk3(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
175182   UINT32 screen_update_ikari(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
176183   UINT32 screen_update_gwar(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
177   UINT32 screen_update_tdfever(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
184   UINT32 screen_update_tdfever(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);   
178185   TIMER_CALLBACK_MEMBER(sgladiat_sndirq_update_callback);
179186   TIMER_CALLBACK_MEMBER(sndirq_update_callback);
180187   DECLARE_WRITE_LINE_MEMBER(ymirq_callback_2);
188   void marvins_draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, const int scrollx, const int scrolly, const int from, const int to);
181189   void tnk3_draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, const int xscroll, const int yscroll);
190   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 );
191   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);
182192   int hardflags_check(int num);
183193   int hardflags_check8(int num);
184194   int turbofront_check(int small, int num);
185195   int turbofront_check8(int small, int num);
186196   DECLARE_WRITE_LINE_MEMBER(ymirq_callback_1);
187   required_device<cpu_device> m_maincpu;
188   required_device<cpu_device> m_audiocpu;
189   required_device<cpu_device> m_subcpu;
190   required_device<gfxdecode_device> m_gfxdecode;
191   required_device<screen_device> m_screen;
192   required_device<palette_device> m_palette;
193197};
trunk/src/mame/includes/tatsumi.h
r32577r32578
66public:
77   tatsumi_state(const machine_config &mconfig, device_type type, const char *tag)
88      : driver_device(mconfig, type, tag),
9      m_maincpu(*this, "maincpu"),
10      m_audiocpu(*this, "audiocpu"),
11      m_subcpu(*this, "sub"),
12      m_subcpu2(*this, "sub2"),
13      m_oki(*this, "oki"),
14      m_gfxdecode(*this, "gfxdecode"),
15      m_palette(*this, "palette"),
916      m_videoram(*this, "videoram"),
1017      m_cyclwarr_cpua_ram(*this, "cw_cpua_ram"),
1118      m_cyclwarr_cpub_ram(*this, "cw_cpub_ram"),
r32577r32578
2330      m_roundup_r_ram(*this, "roundup_r_ram"),
2431      m_roundup_p_ram(*this, "roundup_p_ram"),
2532      m_roundup_l_ram(*this, "roundup_l_ram"),
26      m_spriteram(*this, "spriteram") ,
27      m_maincpu(*this, "maincpu"),
28      m_audiocpu(*this, "audiocpu"),
29      m_subcpu(*this, "sub"),
30      m_subcpu2(*this, "sub2"),
31      m_oki(*this, "oki"),
32      m_gfxdecode(*this, "gfxdecode"),
33      m_palette(*this, "palette") { }
33      m_spriteram(*this, "spriteram") { }
3434
35   required_device<cpu_device> m_maincpu;
36   required_device<cpu_device> m_audiocpu;
37   required_device<m68000_base_device> m_subcpu;
38   optional_device<cpu_device> m_subcpu2;
39   required_device<okim6295_device> m_oki;
40   required_device<gfxdecode_device> m_gfxdecode;
41   required_device<palette_device> m_palette;
42   
3543   optional_shared_ptr<UINT16> m_videoram;
3644   optional_shared_ptr<UINT16> m_cyclwarr_cpua_ram;
3745   optional_shared_ptr<UINT16> m_cyclwarr_cpub_ram;
38   UINT16 m_bigfight_a20000[8];
39   UINT16 m_bigfight_a60000[2];
4046   optional_shared_ptr<UINT16> m_apache3_g_ram;
41   UINT16 m_bigfight_a40000[2];
42   UINT8 *m_rom_sprite_lookup1;
43   UINT8 *m_rom_sprite_lookup2;
44   UINT8 *m_rom_clut0;
45   UINT8 *m_rom_clut1;
4647   optional_shared_ptr<UINT16> m_roundup5_d0000_ram;
4748   optional_shared_ptr<UINT16> m_roundup5_e0000_ram;
4849   optional_shared_ptr<UINT16> m_roundup5_unknown0;
r32577r32578
5051   optional_shared_ptr<UINT16> m_roundup5_unknown2;
5152   optional_shared_ptr<UINT16> m_68k_ram;
5253   optional_shared_ptr<UINT8> m_apache3_z80_ram;
53   UINT16 m_control_word;
54   UINT16 m_apache3_rotate_ctrl[12];
5554   required_shared_ptr<UINT16> m_sprite_control_ram;
5655   optional_shared_ptr<UINT16> m_cyclwarr_videoram0;
5756   optional_shared_ptr<UINT16> m_cyclwarr_videoram1;
5857   optional_shared_ptr<UINT16> m_roundup_r_ram;
5958   optional_shared_ptr<UINT16> m_roundup_p_ram;
6059   optional_shared_ptr<UINT16> m_roundup_l_ram;
60   required_shared_ptr<UINT16> m_spriteram;
61   
62   UINT16 m_bigfight_a20000[8];
63   UINT16 m_bigfight_a60000[2];
64   UINT16 m_bigfight_a40000[2];
65   UINT8 *m_rom_sprite_lookup1;
66   UINT8 *m_rom_sprite_lookup2;
67   UINT8 *m_rom_clut0;
68   UINT8 *m_rom_clut1;
69   UINT16 m_control_word;
70   UINT16 m_apache3_rotate_ctrl[12];
6171   UINT16 m_last_control;
6272   UINT8 m_apache3_adc;
6373   int m_apache3_rot_idx;
r32577r32578
7585   UINT8 m_roundupt_crt_selected_reg;
7686   UINT8 m_roundupt_crt_reg[64];
7787   UINT8* m_shadow_pen_array;
78   required_shared_ptr<UINT16> m_spriteram;
7988   DECLARE_READ16_MEMBER(cyclwarr_sprite_r);
8089   DECLARE_WRITE16_MEMBER(cyclwarr_sprite_w);
8190   DECLARE_WRITE16_MEMBER(bigfight_a20000_w);
r32577r32578
131140   DECLARE_READ8_MEMBER(tatsumi_hack_ym2151_r);
132141   DECLARE_READ8_MEMBER(tatsumi_hack_oki_r);
133142   DECLARE_WRITE_LINE_MEMBER(apache3_68000_reset);
134   required_device<cpu_device> m_maincpu;
135   required_device<cpu_device> m_audiocpu;
136   required_device<m68000_base_device> m_subcpu;
137   optional_device<cpu_device> m_subcpu2;
138   required_device<okim6295_device> m_oki;
139   required_device<gfxdecode_device> m_gfxdecode;
140   required_device<palette_device> m_palette;
143   void tatsumi_reset();
141144};
142
143/*----------- defined in machine/tatsumi.c -----------*/
144void tatsumi_reset(running_machine &machine);
trunk/src/mame/includes/cps1.h
r32577r32578
337337
338338
339339   /* cps video */
340   inline UINT16 *cps1_base( int offset, int boundary );
340341   void cps1_get_video_base();
341342   void unshuffle(UINT64 *buf, int len);
342343   void cps2_gfx_decode();
trunk/src/mame/includes/asterix.h
r32577r32578
5858   INTERRUPT_GEN_MEMBER(asterix_interrupt);
5959   K05324X_CB_MEMBER(sprite_callback);
6060   K056832_CB_MEMBER(tile_callback);
61   void reset_spritebank();
6162
6263protected:
6364   virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
trunk/src/mame/video/suprnova.c
r32577r32578
608608   m_sprite_bitmap.fill(0x0000, cliprect);
609609
610610   if (m_alt_enable_sprites)
611      m_spritegen->skns_draw_sprites(machine(), m_sprite_bitmap, cliprect, m_spriteram, m_spriteram.bytes(), memregion("gfx1")->base(), memregion ("gfx1")->bytes(), m_spc_regs );
611      m_spritegen->skns_draw_sprites(m_sprite_bitmap, cliprect, m_spriteram, m_spriteram.bytes(), memregion("gfx1")->base(), memregion ("gfx1")->bytes(), m_spc_regs );
612612
613613
614614   return 0;
trunk/src/mame/video/gp9001.c
r32577r32578
669669    Sprite Handlers
670670***************************************************************************/
671671
672void gp9001vdp_device::draw_sprites( running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect, const UINT8* primap )
672void gp9001vdp_device::draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect, const UINT8* primap )
673673{
674674   const UINT16 primask = (GP9001_PRIMASK << 8);
675675
r32577r32578
859859    Draw the game screen in the given bitmap_ind16.
860860***************************************************************************/
861861
862void gp9001vdp_device::gp9001_draw_custom_tilemap(running_machine& machine, bitmap_ind16 &bitmap, tilemap_t* tilemap, const UINT8* priremap, const UINT8* pri_enable )
862void gp9001vdp_device::gp9001_draw_custom_tilemap( bitmap_ind16 &bitmap, tilemap_t* tilemap, const UINT8* priremap, const UINT8* pri_enable )
863863{
864   int width = machine.first_screen()->width();
865   int height = machine.first_screen()->height();
864   int width = m_screen->width();
865   int height = m_screen->height();
866866   int y,x;
867867   bitmap_ind16 &tmb = tilemap->pixmap();
868868   UINT16* srcptr;
r32577r32578
912912
913913static const UINT8 batsugun_prienable0[16]={ 1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1 };
914914
915void gp9001vdp_device::gp9001_render_vdp(running_machine& machine, bitmap_ind16 &bitmap, const rectangle &cliprect)
915void gp9001vdp_device::gp9001_render_vdp(bitmap_ind16 &bitmap, const rectangle &cliprect)
916916{
917917   if (gp9001_gfxrom_is_banked && gp9001_gfxrom_bank_dirty)
918918   {
r32577r32578
921921      gp9001_gfxrom_bank_dirty = 0;
922922   }
923923
924   gp9001_draw_custom_tilemap( machine, bitmap, bg.tmap, gp9001_primap1, batsugun_prienable0);
925   gp9001_draw_custom_tilemap( machine, bitmap, fg.tmap, gp9001_primap1, batsugun_prienable0);
926   gp9001_draw_custom_tilemap( machine, bitmap, top.tmap, gp9001_primap1, batsugun_prienable0);
927   draw_sprites( machine,bitmap,cliprect, gp9001_sprprimap1);
924   gp9001_draw_custom_tilemap(bitmap, bg.tmap, gp9001_primap1, batsugun_prienable0);
925   gp9001_draw_custom_tilemap(bitmap, fg.tmap, gp9001_primap1, batsugun_prienable0);
926   gp9001_draw_custom_tilemap(bitmap, top.tmap, gp9001_primap1, batsugun_prienable0);
927   draw_sprites(bitmap,cliprect, gp9001_sprprimap1);
928928}
929929
930930
trunk/src/mame/video/gp9001.h
r32577r32578
5353   UINT16 gp9001_gfxrom_bank[8];       /* Batrider object bank */
5454
5555
56   void draw_sprites( running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect, const UINT8* primap );
57   void gp9001_draw_custom_tilemap(running_machine& machine, bitmap_ind16 &bitmap, tilemap_t* tilemap, const UINT8* priremap, const UINT8* pri_enable );
58   void gp9001_render_vdp(running_machine& machine, bitmap_ind16 &bitmap, const rectangle &cliprect);
56   void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect, const UINT8* primap );
57   void gp9001_draw_custom_tilemap( bitmap_ind16 &bitmap, tilemap_t* tilemap, const UINT8* priremap, const UINT8* pri_enable );
58   void gp9001_render_vdp( bitmap_ind16 &bitmap, const rectangle &cliprect);
5959   void gp9001_screen_eof(void);
6060   void create_tilemaps(void);
6161   void init_scroll_regs(void);
trunk/src/mame/video/snk.c
r32577r32578
658658
659659/**************************************************************************************/
660660
661static void marvins_draw_sprites(running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect,
662      const int scrollx, const int scrolly, const int from, const int to)
661void snk_state::marvins_draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, const int scrollx, const int scrolly, const int from, const int to)
663662{
664   snk_state *state = machine.driver_data<snk_state>();
665   gfx_element *gfx = state->m_gfxdecode->gfx(3);
663   gfx_element *gfx = m_gfxdecode->gfx(3);
666664   const UINT8 *source, *finish;
667665
668   source = state->m_spriteram + from*4;
669   finish = state->m_spriteram + to*4;
666   source = m_spriteram + from*4;
667   finish = m_spriteram + to*4;
670668
671669   while( source<finish )
672670   {
r32577r32578
678676      int flipy = (attributes&0x20);
679677      int flipx = 0;
680678
681      if (state->flip_screen())
679      if (flip_screen())
682680      {
683681         sx = 89 - 16 - sx;
684682         sy = 262 - 16 - sy;
r32577r32578
696694         color,
697695         flipx, flipy,
698696         sx, sy,
699         state->m_drawmode_table);
697         m_drawmode_table);
700698
701699      source+=4;
702700   }
r32577r32578
767765}
768766
769767
770static void ikari_draw_sprites(running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect,
771      const int start, const int xscroll, const int yscroll, const UINT8 *source, const int gfxnum )
768void 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 )
772769{
773   snk_state *state = machine.driver_data<snk_state>();
774   gfx_element *gfx = state->m_gfxdecode->gfx(gfxnum);
770   gfx_element *gfx = m_gfxdecode->gfx(gfxnum);
775771   const int size = gfx->width();
776772   int tile_number, attributes, color, sx, sy;
777773   int which, finish;
r32577r32578
809805            color,
810806            0,0,
811807            sx,sy,
812            state->m_drawmode_table);
808            m_drawmode_table);
813809   }
814810}
815811
r32577r32578
839835    -xx-x--- (bank number)
840836    x------- (x offset bit8)
841837*/
842static void tdfever_draw_sprites(running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect,
843      const int xscroll, const int yscroll, const UINT8 *source, const int gfxnum, const int hw_xflip, const int from, const int to )
838void snk_state::tdfever_draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect,   const int xscroll, const int yscroll, const UINT8 *source, const int gfxnum,
839                              const int hw_xflip, const int from, const int to)
844840{
845   snk_state *state = machine.driver_data<snk_state>();
846   gfx_element *gfx = state->m_gfxdecode->gfx(gfxnum);
841   gfx_element *gfx = m_gfxdecode->gfx(gfxnum);
847842   const int size = gfx->width();
848843   int tile_number, attributes, sx, sy, color;
849844   int which;
r32577r32578
879874      if (hw_xflip)
880875         sx = 495 - size - sx;
881876
882      if (state->flip_screen())
877      if (flip_screen())
883878      {
884879         sx = 495 - size - sx;
885880         sy = 258 - size - sy;
r32577r32578
897892            color,
898893            flipx,flipy,
899894            sx,sy,
900            state->m_drawmode_table);
895            m_drawmode_table);
901896   }
902897}
903898
r32577r32578
911906   m_fg_tilemap->set_scrolly(0, m_fg_scrolly);
912907
913908   m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0);
914   marvins_draw_sprites(machine(), bitmap, cliprect, m_sp16_scrollx, m_sp16_scrolly, 0, m_sprite_split_point>>2);
909   marvins_draw_sprites(bitmap, cliprect, m_sp16_scrollx, m_sp16_scrolly, 0, m_sprite_split_point>>2);
915910   m_fg_tilemap->draw(screen, bitmap, cliprect, 0, 0);
916   marvins_draw_sprites(machine(), bitmap, cliprect, m_sp16_scrollx, m_sp16_scrolly, m_sprite_split_point>>2, 25);
911   marvins_draw_sprites(bitmap, cliprect, m_sp16_scrollx, m_sp16_scrolly, m_sprite_split_point>>2, 25);
917912   m_tx_tilemap->draw(screen, bitmap, cliprect, 0, 0);
918913
919914   return 0;
r32577r32578
940935
941936   m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0);
942937
943   ikari_draw_sprites(machine(), bitmap, cliprect,  0, m_sp16_scrollx, m_sp16_scrolly, m_spriteram + 0x800, 2 );
944   ikari_draw_sprites(machine(), bitmap, cliprect,  0, m_sp32_scrollx, m_sp32_scrolly, m_spriteram,         3 );
945   ikari_draw_sprites(machine(), bitmap, cliprect, 25, m_sp16_scrollx, m_sp16_scrolly, m_spriteram + 0x800, 2 );
938   ikari_draw_sprites(bitmap, cliprect,  0, m_sp16_scrollx, m_sp16_scrolly, m_spriteram + 0x800, 2 );
939   ikari_draw_sprites(bitmap, cliprect,  0, m_sp32_scrollx, m_sp32_scrolly, m_spriteram,         3 );
940   ikari_draw_sprites(bitmap, cliprect, 25, m_sp16_scrollx, m_sp16_scrolly, m_spriteram + 0x800, 2 );
946941
947942   m_tx_tilemap->draw(screen, bitmap, cliprect, 0, 0);
948943   return 0;
r32577r32578
956951
957952   m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0);
958953
959   tdfever_draw_sprites(machine(), bitmap, cliprect, m_sp16_scrollx, m_sp16_scrolly, m_spriteram + 0x800, 2, 0, 0, m_sprite_split_point );
960   tdfever_draw_sprites(machine(), bitmap, cliprect, m_sp32_scrollx, m_sp32_scrolly, m_spriteram,         3, 0, 0, 32 );
961   tdfever_draw_sprites(machine(), bitmap, cliprect, m_sp16_scrollx, m_sp16_scrolly, m_spriteram + 0x800, 2, 0, m_sprite_split_point, 64 );
954   tdfever_draw_sprites(bitmap, cliprect, m_sp16_scrollx, m_sp16_scrolly, m_spriteram + 0x800, 2, 0, 0, m_sprite_split_point );
955   tdfever_draw_sprites(bitmap, cliprect, m_sp32_scrollx, m_sp32_scrolly, m_spriteram,         3, 0, 0, 32 );
956   tdfever_draw_sprites(bitmap, cliprect, m_sp16_scrollx, m_sp16_scrolly, m_spriteram + 0x800, 2, 0, m_sprite_split_point, 64 );
962957
963958   m_tx_tilemap->draw(screen, bitmap, cliprect, 0, 0);
964959
r32577r32578
973968
974969   m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0);
975970
976   tdfever_draw_sprites(machine(), bitmap, cliprect, m_sp32_scrollx, m_sp32_scrolly, m_spriteram, 2, 1, 0, 32 );
971   tdfever_draw_sprites(bitmap, cliprect, m_sp32_scrollx, m_sp32_scrolly, m_spriteram, 2, 1, 0, 32 );
977972
978973   m_tx_tilemap->draw(screen, bitmap, cliprect, 0, 0);
979974
trunk/src/mame/video/st0020.c
r32577r32578
276276        E.h                             Unused
277277
278278*/
279void st0020_device::st0020_draw_zooming_sprites(running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect, int priority)
279void st0020_device::st0020_draw_zooming_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, int priority)
280280{
281281   /* Sprites list */
282282   UINT16 *spriteram16_2 = m_st0020_spriteram;
r32577r32578
405405
406406
407407#if 0 /* doesn't compile in a device context (can't use ui_draw_text? */
408         if (machine.input().code_pressed(KEYCODE_Z))    /* Display some info on each sprite */
408         if (machine().input().code_pressed(KEYCODE_Z))    /* Display some info on each sprite */
409409         {
410410            char buf[10];
411411            sprintf(buf, "%X",size);
412            ui_draw_text(&machine.render().ui_container(), buf, sx / 0x10000, sy / 0x10000);
412            ui_draw_text(&machine().render().ui_container(), buf, sx / 0x10000, sy / 0x10000);
413413         }
414414#endif
415415      }   /* single-sprites */
r32577r32578
421421
422422
423423
424void st0020_device::st0020_draw_all(running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect)
424void st0020_device::st0020_draw_all(bitmap_ind16 &bitmap, const rectangle &cliprect)
425425{
426426   for (int pri = 0; pri <= 0xf; pri++)
427      st0020_draw_zooming_sprites(machine, bitmap, cliprect, pri);
427      st0020_draw_zooming_sprites(bitmap, cliprect, pri);
428428}
trunk/src/mame/video/st0020.h
r32577r32578
2121   // per-game hack
2222   int m_is_jclub2;
2323
24   void st0020_draw_all(running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect);
24   void st0020_draw_all(bitmap_ind16 &bitmap, const rectangle &cliprect);
2525
2626   DECLARE_READ16_MEMBER(st0020_gfxram_r);
2727   DECLARE_WRITE16_MEMBER(st0020_gfxram_w);
r32577r32578
4040   UINT16* m_st0020_gfxram;
4141   UINT16* m_st0020_spriteram;
4242   UINT16* m_st0020_blitram;
43   void st0020_draw_zooming_sprites(running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect, int priority);
43   void st0020_draw_zooming_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, int priority);
4444   DECLARE_READ16_MEMBER(st0020_blit_r);
4545   DECLARE_WRITE16_MEMBER(st0020_blit_w);
4646   required_device<gfxdecode_device> m_gfxdecode;
trunk/src/mame/video/vsystem_spr2.c
r32577r32578
137137}
138138
139139template<class _BitmapClass>
140void 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 )
140void 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 )
141141{
142142   int attr_start, first;
143143   first = 4 * spriteram3[0x1fe];
r32577r32578
244244   }
245245}
246246
247void 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 )
248{ turbofrc_draw_sprites_common( spriteram3, spriteram3_bytes, spritepalettebank, machine, bitmap, cliprect, priority_bitmap, pri_param ); }
247void 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 )
248{ turbofrc_draw_sprites_common( spriteram3, spriteram3_bytes, spritepalettebank, bitmap, cliprect, priority_bitmap, pri_param ); }
249249
250void 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 )
251{ turbofrc_draw_sprites_common( spriteram3, spriteram3_bytes, spritepalettebank, machine, bitmap, cliprect, priority_bitmap, pri_param ); }
250void 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 )
251{ turbofrc_draw_sprites_common( spriteram3, spriteram3_bytes, spritepalettebank, bitmap, cliprect, priority_bitmap, pri_param ); }
trunk/src/mame/video/vsystem_spr2.h
r32577r32578
5252   int m_xoffs, m_yoffs;
5353
5454   template<class _BitmapClass>
55   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 );
55   void turbofrc_draw_sprites_common( UINT16* spriteram3,  int spriteram3_bytes, int spritepalettebank, _BitmapClass &bitmap, const rectangle &cliprect, bitmap_ind8 &priority_bitmap, int pri_param );
5656
57   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 );
58   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 );
57   void turbofrc_draw_sprites( UINT16* spriteram3,  int spriteram3_bytes,  int spritepalettebank, bitmap_ind16 &bitmap, const rectangle &cliprect, bitmap_ind8 &priority_bitmap, int pri_param );
58   void turbofrc_draw_sprites( UINT16* spriteram3,  int spriteram3_bytes,  int spritepalettebank, bitmap_rgb32 &bitmap, const rectangle &cliprect, bitmap_ind8 &priority_bitmap, int pri_param );
5959
6060
6161
trunk/src/mame/video/toaplan2.c
r32577r32578
230230   {
231231      bitmap.fill(0, cliprect);
232232      m_custom_priority_bitmap.fill(0, cliprect);
233      m_vdp1->gp9001_render_vdp(machine(), bitmap, cliprect);
233      m_vdp1->gp9001_render_vdp(bitmap, cliprect);
234234   }
235235   if (m_vdp0)
236236   {
237237   //  bitmap.fill(0, cliprect);
238238      m_custom_priority_bitmap.fill(0, cliprect);
239      m_vdp0->gp9001_render_vdp(machine(), bitmap, cliprect);
239      m_vdp0->gp9001_render_vdp(bitmap, cliprect);
240240   }
241241
242242
r32577r32578
254254   {
255255      bitmap.fill(0, cliprect);
256256      m_custom_priority_bitmap.fill(0, cliprect);
257      m_vdp0->gp9001_render_vdp(machine(), bitmap, cliprect);
257      m_vdp0->gp9001_render_vdp(bitmap, cliprect);
258258   }
259259   if (m_vdp1)
260260   {
261261      m_secondary_render_bitmap.fill(0, cliprect);
262262      m_custom_priority_bitmap.fill(0, cliprect);
263      m_vdp1->gp9001_render_vdp(machine(), m_secondary_render_bitmap, cliprect);
263      m_vdp1->gp9001_render_vdp(m_secondary_render_bitmap, cliprect);
264264   }
265265
266266
r32577r32578
348348{
349349   bitmap.fill(0, cliprect);
350350   m_custom_priority_bitmap.fill(0, cliprect);
351   m_vdp0->gp9001_render_vdp(machine(), bitmap, cliprect);
351   m_vdp0->gp9001_render_vdp(bitmap, cliprect);
352352
353353   return 0;
354354}
trunk/src/mame/video/ssv.c
r32577r32578
975975   screen_update_ssv(screen, bitmap, cliprect);
976976
977977   // draw zooming sprites
978   m_gdfs_st0020->st0020_draw_all(machine(), bitmap, cliprect);
978   m_gdfs_st0020->st0020_draw_all(bitmap, cliprect);
979979
980980   m_gdfs_tmap->set_scrollx(0, m_gdfs_tmapscroll[0x0c/2]);
981981   m_gdfs_tmap->set_scrolly(0, m_gdfs_tmapscroll[0x10/2]);
trunk/src/mame/video/welltris.c
r32577r32578
9898
9999   draw_background(bitmap, cliprect);
100100   m_char_tilemap->draw(screen, bitmap, cliprect, 0, 0);
101   m_spr_old->turbofrc_draw_sprites(m_spriteram, m_spriteram.bytes(), m_spritepalettebank, machine(), bitmap, cliprect, screen.priority(), 0);
101   m_spr_old->turbofrc_draw_sprites(m_spriteram, m_spriteram.bytes(), m_spritepalettebank, bitmap, cliprect, screen.priority(), 0);
102102   return 0;
103103}
trunk/src/mame/video/asterix.c
r32577r32578
22#include "includes/asterix.h"
33
44
5static void reset_spritebank( running_machine &machine )
5void asterix_state::reset_spritebank()
66{
7   asterix_state *state = machine.driver_data<asterix_state>();
8   state->m_k053244->bankselect(state->m_spritebank & 7);
9   state->m_spritebanks[0] = (state->m_spritebank << 12) & 0x7000;
10   state->m_spritebanks[1] = (state->m_spritebank <<  9) & 0x7000;
11   state->m_spritebanks[2] = (state->m_spritebank <<  6) & 0x7000;
12   state->m_spritebanks[3] = (state->m_spritebank <<  3) & 0x7000;
7   m_k053244->bankselect(m_spritebank & 7);
8   m_spritebanks[0] = (m_spritebank << 12) & 0x7000;
9   m_spritebanks[1] = (m_spritebank <<  9) & 0x7000;
10   m_spritebanks[2] = (m_spritebank <<  6) & 0x7000;
11   m_spritebanks[3] = (m_spritebank <<  3) & 0x7000;
1312}
1413
1514WRITE16_MEMBER(asterix_state::asterix_spritebank_w)
1615{
1716   COMBINE_DATA(&m_spritebank);
18   reset_spritebank(machine());
17   reset_spritebank();
1918}
2019
2120K05324X_CB_MEMBER(asterix_state::sprite_callback)
trunk/src/mame/video/aerofgt.c
r32577r32578
296296   screen.priority().fill(0, cliprect);
297297
298298   m_bg1_tilemap->draw(screen, bitmap, cliprect, 0, 0);
299   m_spr_old->turbofrc_draw_sprites(m_spriteram3,m_spriteram3.bytes(),m_spritepalettebank, machine(), bitmap, cliprect, screen.priority(), 0);
300   m_spr_old->turbofrc_draw_sprites(m_spriteram3,m_spriteram3.bytes(),m_spritepalettebank, machine(), bitmap, cliprect, screen.priority(), 1);
299   m_spr_old->turbofrc_draw_sprites(m_spriteram3,m_spriteram3.bytes(),m_spritepalettebank, bitmap, cliprect, screen.priority(), 0);
300   m_spr_old->turbofrc_draw_sprites(m_spriteram3,m_spriteram3.bytes(),m_spritepalettebank, bitmap, cliprect, screen.priority(), 1);
301301   return 0;
302302}
303303
r32577r32578
315315   m_bg2_tilemap->draw(screen, bitmap, cliprect, 0, 0);
316316
317317   /* we use the priority buffer so sprites are drawn front to back */
318   m_spr_old2->turbofrc_draw_sprites(m_spriteram3+0x200,m_spriteram3.bytes()/2,m_spritepalettebank, machine(), bitmap, cliprect, screen.priority(), 0);
319   m_spr_old2->turbofrc_draw_sprites(m_spriteram3+0x200,m_spriteram3.bytes()/2,m_spritepalettebank, machine(), bitmap, cliprect, screen.priority(), 1);
318   m_spr_old2->turbofrc_draw_sprites(m_spriteram3+0x200,m_spriteram3.bytes()/2,m_spritepalettebank, bitmap, cliprect, screen.priority(), 0);
319   m_spr_old2->turbofrc_draw_sprites(m_spriteram3+0x200,m_spriteram3.bytes()/2,m_spritepalettebank, bitmap, cliprect, screen.priority(), 1);
320320
321   m_spr_old->turbofrc_draw_sprites(m_spriteram3+0x000,m_spriteram3.bytes()/2,m_spritepalettebank, machine(), bitmap, cliprect, screen.priority(), 0);
322   m_spr_old->turbofrc_draw_sprites(m_spriteram3+0x000,m_spriteram3.bytes()/2,m_spritepalettebank, machine(), bitmap, cliprect, screen.priority(), 1);
321   m_spr_old->turbofrc_draw_sprites(m_spriteram3+0x000,m_spriteram3.bytes()/2,m_spritepalettebank, bitmap, cliprect, screen.priority(), 0);
322   m_spr_old->turbofrc_draw_sprites(m_spriteram3+0x000,m_spriteram3.bytes()/2,m_spritepalettebank, bitmap, cliprect, screen.priority(), 1);
323323   return 0;
324324}
325325
r32577r32578
341341   m_bg2_tilemap->draw(screen, bitmap, cliprect, 0, 1);
342342
343343   /* we use the priority buffer so sprites are drawn front to back */
344   m_spr_old->turbofrc_draw_sprites(m_spriteram3+0x000,m_spriteram3.bytes()/2,m_spritepalettebank, machine(), bitmap, cliprect, screen.priority(), 1);
345   m_spr_old->turbofrc_draw_sprites(m_spriteram3+0x000,m_spriteram3.bytes()/2,m_spritepalettebank, machine(), bitmap, cliprect, screen.priority(), 0);
344   m_spr_old->turbofrc_draw_sprites(m_spriteram3+0x000,m_spriteram3.bytes()/2,m_spritepalettebank, bitmap, cliprect, screen.priority(), 1);
345   m_spr_old->turbofrc_draw_sprites(m_spriteram3+0x000,m_spriteram3.bytes()/2,m_spritepalettebank, bitmap, cliprect, screen.priority(), 0);
346346
347   m_spr_old2->turbofrc_draw_sprites(m_spriteram3+0x200,m_spriteram3.bytes()/2,m_spritepalettebank, machine(), bitmap, cliprect, screen.priority(), 1);
348   m_spr_old2->turbofrc_draw_sprites(m_spriteram3+0x200,m_spriteram3.bytes()/2,m_spritepalettebank, machine(), bitmap, cliprect, screen.priority(), 0);
347   m_spr_old2->turbofrc_draw_sprites(m_spriteram3+0x200,m_spriteram3.bytes()/2,m_spritepalettebank, bitmap, cliprect, screen.priority(), 1);
348   m_spr_old2->turbofrc_draw_sprites(m_spriteram3+0x200,m_spriteram3.bytes()/2,m_spritepalettebank, bitmap, cliprect, screen.priority(), 0);
349349   return 0;
350350}
351351
r32577r32578
368368   m_bg2_tilemap->draw(screen, bitmap, cliprect, 0, 1);
369369
370370   /* we use the priority buffer so sprites are drawn front to back */
371   m_spr_old2->turbofrc_draw_sprites(m_spriteram3+0x200,m_spriteram3.bytes()/2,m_spritepalettebank, machine(), bitmap, cliprect, screen.priority(), 0); //enemy
372   m_spr_old2->turbofrc_draw_sprites(m_spriteram3+0x200,m_spriteram3.bytes()/2,m_spritepalettebank, machine(), bitmap, cliprect, screen.priority(), 1); //enemy
371   m_spr_old2->turbofrc_draw_sprites(m_spriteram3+0x200,m_spriteram3.bytes()/2,m_spritepalettebank, bitmap, cliprect, screen.priority(), 0); //enemy
372   m_spr_old2->turbofrc_draw_sprites(m_spriteram3+0x200,m_spriteram3.bytes()/2,m_spritepalettebank, bitmap, cliprect, screen.priority(), 1); //enemy
373373
374   m_spr_old->turbofrc_draw_sprites(m_spriteram3+0x000,m_spriteram3.bytes()/2,m_spritepalettebank, machine(), bitmap, cliprect, screen.priority(), 0); //ship
375   m_spr_old->turbofrc_draw_sprites(m_spriteram3+0x000,m_spriteram3.bytes()/2,m_spritepalettebank, machine(), bitmap, cliprect, screen.priority(), 1); //intro
374   m_spr_old->turbofrc_draw_sprites(m_spriteram3+0x000,m_spriteram3.bytes()/2,m_spritepalettebank, bitmap, cliprect, screen.priority(), 0); //ship
375   m_spr_old->turbofrc_draw_sprites(m_spriteram3+0x000,m_spriteram3.bytes()/2,m_spritepalettebank, bitmap, cliprect, screen.priority(), 1); //intro
376376   return 0;
377377}
378378
r32577r32578
834834      m_bg1_tilemap->draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
835835   }
836836
837   m_spr_old->turbofrc_draw_sprites(m_spriteram3,m_spriteram3.bytes(),m_spritepalettebank, machine(), bitmap, cliprect, screen.priority(), 0);
838   m_spr_old->turbofrc_draw_sprites(m_spriteram3,m_spriteram3.bytes(),m_spritepalettebank, machine(), bitmap, cliprect, screen.priority(), 1);
837   m_spr_old->turbofrc_draw_sprites(m_spriteram3,m_spriteram3.bytes(),m_spritepalettebank, bitmap, cliprect, screen.priority(), 0);
838   m_spr_old->turbofrc_draw_sprites(m_spriteram3,m_spriteram3.bytes(),m_spritepalettebank, bitmap, cliprect, screen.priority(), 1);
839839   return 0;
840840}
trunk/src/mame/video/cps1.c
r32577r32578
16841684}
16851685
16861686
1687INLINE UINT16 *cps1_base( running_machine &machine, int offset, int boundary )
1687inline UINT16 *cps_state::cps1_base( int offset, int boundary )
16881688{
1689   cps_state *state = machine.driver_data<cps_state>();
1690   int base = state->m_cps_a_regs[offset] * 256;
1689   int base = m_cps_a_regs[offset] * 256;
16911690
16921691   /*
16931692   The scroll RAM must start on a 0x4000 boundary.
r32577r32578
16981697   Mask out the irrelevant bits.
16991698   */
17001699   base &= ~(boundary - 1);
1701   return &state->m_gfxram[(base & 0x3ffff) / 2];
1700   return &m_gfxram[(base & 0x3ffff) / 2];
17021701}
17031702
17041703
r32577r32578
17161715   fixes glitches in the ghouls intro, but it might happen at next vblank.
17171716   */
17181717   if (offset == CPS1_PALETTE_BASE)
1719      cps1_build_palette(cps1_base(machine(), CPS1_PALETTE_BASE, m_palette_align));
1718      cps1_build_palette(cps1_base(CPS1_PALETTE_BASE, m_palette_align));
17201719
17211720   // pzloop2 write to register 24 on startup. This is probably just a bug.
17221721   if (offset == 0x24 / 2 && m_cps_version == 2)
r32577r32578
19021901   int layercontrol=0, videocontrol=0, scroll1xoff=0, scroll2xoff=0, scroll3xoff=0;
19031902
19041903   /* Re-calculate the VIDEO RAM base */
1905   if (m_scroll1 != cps1_base(machine(), CPS1_SCROLL1_BASE, m_scroll_size))
1904   if (m_scroll1 != cps1_base(CPS1_SCROLL1_BASE, m_scroll_size))
19061905   {
1907      m_scroll1 = cps1_base(machine(), CPS1_SCROLL1_BASE, m_scroll_size);
1906      m_scroll1 = cps1_base(CPS1_SCROLL1_BASE, m_scroll_size);
19081907      m_bg_tilemap[0]->mark_all_dirty();
19091908   }
1910   if (m_scroll2 != cps1_base(machine(), CPS1_SCROLL2_BASE, m_scroll_size))
1909   if (m_scroll2 != cps1_base(CPS1_SCROLL2_BASE, m_scroll_size))
19111910   {
1912      m_scroll2 = cps1_base(machine(), CPS1_SCROLL2_BASE, m_scroll_size);
1911      m_scroll2 = cps1_base(CPS1_SCROLL2_BASE, m_scroll_size);
19131912      m_bg_tilemap[1]->mark_all_dirty();
19141913   }
1915   if (m_scroll3 != cps1_base(machine(), CPS1_SCROLL3_BASE, m_scroll_size))
1914   if (m_scroll3 != cps1_base(CPS1_SCROLL3_BASE, m_scroll_size))
19161915   {
1917      m_scroll3 = cps1_base(machine(), CPS1_SCROLL3_BASE, m_scroll_size);
1916      m_scroll3 = cps1_base(CPS1_SCROLL3_BASE, m_scroll_size);
19181917      m_bg_tilemap[2]->mark_all_dirty();
19191918   }
19201919
r32577r32578
19421941      scroll3xoff = -0x0c;
19431942   }
19441943
1945   m_obj = cps1_base(machine(), CPS1_OBJ_BASE, m_obj_size);
1946   m_other = cps1_base(machine(), CPS1_OTHER_BASE, m_other_size);
1944   m_obj = cps1_base(CPS1_OBJ_BASE, m_obj_size);
1945   m_other = cps1_base(CPS1_OTHER_BASE, m_other_size);
19471946
19481947   /* Get scroll values */
19491948   m_scroll1x = m_cps_a_regs[CPS1_SCROLL1_SCROLLX] + scroll1xoff;
trunk/src/mame/video/k054156_k054157_k056832.c
r32577r32578
12691269        */
12701270      {
12711271         bitmap_ind16 *pixmap;
1272         running_machine &machine = device->machine();
1273
1272         
12741273         UINT8 code_transparent, code_opaque;
12751274         const pen_t *pal_ptr;
12761275         const UINT8  *src_ptr;
r32577r32578
12921291            { xpr_ptr[count+N] = 0; }
12931292
12941293         pixmap  = m_pixmap[page];
1295         pal_ptr = machine.pens;
1294         pal_ptr = machine().pens;
12961295         src_gfx = m_gfxdecode->gfx(m_gfx_num];
12971296         src_pitch  = src_gfx->rowbytes();
12981297         src_modulo = src_gfx->char_modulo;
r32577r32578
22292228            { xpr_ptr[count+N] = 0; }
22302229
22312230         pixmap  = m_pixmap[page];
2232         pal_ptr    = machine.pens;
2231         pal_ptr    = machine().pens;
22332232         src_gfx    = m_gfxdecode->gfx(m_gfx_num];
22342233         src_pitch  = src_gfx->rowbytes();
22352234         src_modulo = src_gfx->char_modulo;
trunk/src/mame/video/sknsspr.c
r32577r32578
2020
2121
2222sknsspr_device::sknsspr_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
23   : device_t(mconfig, SKNS_SPRITE, "SKNS Sprite", tag, owner, clock, "sknsspr", __FILE__)
23   : device_t(mconfig, SKNS_SPRITE, "SKNS Sprite", tag, owner, clock, "sknsspr", __FILE__),
24      device_video_interface(mconfig, *this)
2425{
2526}
2627
r32577r32578
3435   //printf("sknsspr_device::device_reset()\n");
3536}
3637
37int sknsspr_device::skns_rle_decode ( running_machine &machine, int romoffset, int size, UINT8*gfx_source, size_t gfx_length )
38int sknsspr_device::skns_rle_decode ( int romoffset, int size, UINT8*gfx_source, size_t gfx_length )
3839{
3940   UINT8 *src = gfx_source;
4041   size_t srcsize = gfx_length;
r32577r32578
229230   blit_fxy_z,
230231};
231232
232void 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)
233void 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)
233234{
234235   /*- SPR RAM Format -**
235236
r32577r32578
395396         if (sprite_flip&2)
396397         {
397398            xflip ^= 1;
398            sx = machine.first_screen()->visible_area().max_x+1 - sx;
399            sx = m_screen->visible_area().max_x+1 - sx;
399400         }
400401         if (sprite_flip&1)
401402         {
402403            yflip ^= 1;
403            sy = machine.first_screen()->visible_area().max_y+1 - sy;
404            sy = m_screen->visible_area().max_y+1 - sy;
404405         }
405406
406407         /* Palette linking */
r32577r32578
446447
447448         romoffset &= gfxlen-1;
448449
449         endromoffs = skns_rle_decode ( machine, romoffset, size, gfx_source, gfx_length );
450         endromoffs = skns_rle_decode ( romoffset, size, gfx_source, gfx_length );
450451
451452         // in Cyvern
452453
trunk/src/mame/video/sknsspr.h
r32577r32578
11
2class sknsspr_device : public device_t
2class sknsspr_device : public device_t,
3                     public device_video_interface
34{
45public:
56   sknsspr_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
6   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);
7   
8   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);
79   void skns_sprite_kludge(int x, int y);
810
911protected:
r32577r32578
1315   int sprite_kludge_x, sprite_kludge_y;
1416   #define SUPRNOVA_DECODE_BUFFER_SIZE 0x2000
1517   UINT8 decodebuffer[SUPRNOVA_DECODE_BUFFER_SIZE];
16   int skns_rle_decode ( running_machine &machine, int romoffset, int size, UINT8*gfx_source, size_t gfx_length );
18   int skns_rle_decode ( int romoffset, int size, UINT8*gfx_source, size_t gfx_length );
1719};
1820
1921extern const device_type SKNS_SPRITE;
trunk/src/mame/video/fromance.c
r32577r32578
306306   m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0);
307307   m_fg_tilemap->draw(screen, bitmap, cliprect, 0, 0);
308308
309   m_spr_old->turbofrc_draw_sprites((UINT16*)sram, m_spriteram.bytes(), 0, machine(), bitmap, cliprect, screen.priority(), 0);
310   m_spr_old->turbofrc_draw_sprites((UINT16*)sram, m_spriteram.bytes(), 0, machine(), bitmap, cliprect, screen.priority(), 1);
309   m_spr_old->turbofrc_draw_sprites((UINT16*)sram, m_spriteram.bytes(), 0, bitmap, cliprect, screen.priority(), 0);
310   m_spr_old->turbofrc_draw_sprites((UINT16*)sram, m_spriteram.bytes(), 0, bitmap, cliprect, screen.priority(), 1);
311311   return 0;
312312}
trunk/src/mame/video/konamigx.c
r32577r32578
285285}
286286#endif
287287
288static void gx_wipezbuf(running_machine &machine, int noshadow)
288void konamigx_state::wipezbuf(int noshadow)
289289{
290   const rectangle &visarea = machine.first_screen()->visible_area();
290   const rectangle &visarea = m_screen->visible_area();
291291
292292   int w = visarea.width();
293293   int h = visarea.height();
r32577r32578
427427   if (mixerflags & GXMIX_NOZBUF)
428428      mixerflags |= GXMIX_NOSHADOW;
429429   else
430      gx_wipezbuf(machine(), mixerflags & GXMIX_NOSHADOW);
430      wipezbuf(mixerflags & GXMIX_NOSHADOW);
431431
432432   // cache global parameters
433433   konamigx_precache_registers();
trunk/src/mame/video/f1gp.c
r32577r32578
195195   /* quick kludge for "continue" screen priority */
196196   if (m_gfxctrl == 0x00)
197197   {
198      m_spr_old->turbofrc_draw_sprites(m_spr1vram, m_spr1vram.bytes(),  0, machine(), bitmap, cliprect, screen.priority(), 0x02);
199      m_spr_old2->turbofrc_draw_sprites(m_spr2vram, m_spr2vram.bytes(), 0, machine(), bitmap, cliprect, screen.priority(), 0x02);
198      m_spr_old->turbofrc_draw_sprites(m_spr1vram, m_spr1vram.bytes(),  0, bitmap, cliprect, screen.priority(), 0x02);
199      m_spr_old2->turbofrc_draw_sprites(m_spr2vram, m_spr2vram.bytes(), 0, bitmap, cliprect, screen.priority(), 0x02);
200200   }
201201   else
202202   {
203      m_spr_old->turbofrc_draw_sprites(m_spr1vram, m_spr1vram.bytes(), 0, machine(), bitmap, cliprect, screen.priority(), 0x00);
204      m_spr_old2->turbofrc_draw_sprites(m_spr2vram, m_spr2vram.bytes(), 0, machine(), bitmap, cliprect, screen.priority(), 0x02);
203      m_spr_old->turbofrc_draw_sprites(m_spr1vram, m_spr1vram.bytes(), 0, bitmap, cliprect, screen.priority(), 0x00);
204      m_spr_old2->turbofrc_draw_sprites(m_spr2vram, m_spr2vram.bytes(), 0, bitmap, cliprect, screen.priority(), 0x02);
205205   }
206206   return 0;
207207}

Previous 199869 Revisions Next


© 1997-2024 The MAME Team