Previous 199869 Revisions Next

r32567 Monday 6th October, 2014 at 16:30:06 UTC by Osso
Removed running_machine parameter from various methods were it wasn't needed anymore (nw)
Moved some more functions into driver classes. (nw)
[src/emu/video]tms34061.c
[src/mame/drivers]expro02.c taitojc.c
[src/mame/includes]carpolo.h harddriv.h midyunit.h mystwarr.h namcos86.h taitojc.h thepit.h
[src/mame/video]actfancr.c carpolo.c dec0.c dec8.c deckarn.c deckarn.h decmxc06.c decmxc06.h galpani2.c harddriv.c k054156_k054157_k056832.c k054156_k054157_k056832.h kaneko16.c kaneko_grap2.c kaneko_grap2.h kaneko_spr.c kaneko_spr.h karnov.c madmotor.c midyunit.c mystwarr.c namcos86.c stadhero.c taitojc.c thepit.c vaportra.c vsystem_spr.c vsystem_spr.h

trunk/src/mame/includes/mystwarr.h
r32566r32567
100100   K055673_CB_MEMBER(metamrph_sprite_callback);
101101   K055673_CB_MEMBER(gaiapols_sprite_callback);
102102   K055673_CB_MEMBER(martchmp_sprite_callback);
103   void decode_tiles();
103104};
trunk/src/mame/includes/taitojc.h
r32566r32567
2626   void render_shade_scan(INT32 scanline, const extent_t &extent, const taitojc_polydata &extradata, int threadid);
2727   void render_texture_scan(INT32 scanline, const extent_t &extent, const taitojc_polydata &extradata, int threadid);
2828
29   void render_polygons(running_machine &machine, UINT16 *polygon_fifo, int length);
29   void render_polygons(UINT16 *polygon_fifo, int length);
3030
3131private:
3232   bitmap_ind16 *m_framebuffer;
trunk/src/mame/includes/midyunit.h
r32566r32567
4040
4141   midyunit_state(const machine_config &mconfig, device_type type, const char *tag)
4242      : driver_device(mconfig, type, tag),
43         m_maincpu(*this, "maincpu"),
44         m_audiocpu(*this, "audiocpu"),
45         m_oki(*this, "oki"),
46         m_palette(*this, "palette"),
4347         m_narc_sound(*this, "narcsnd"),
4448         m_cvsd_sound(*this, "cvsd"),
4549         m_adpcm_sound(*this, "adpcm"),
46         m_gfx_rom(*this, "gfx_rom", 16) ,
47      m_maincpu(*this, "maincpu"),
48      m_audiocpu(*this, "audiocpu"),
49      m_oki(*this, "oki"),
50      m_palette(*this, "palette"),
51      m_generic_paletteram_16(*this, "paletteram") { }
50         m_generic_paletteram_16(*this, "paletteram"),
51         m_gfx_rom(*this, "gfx_rom", 16) { }
5252
53   required_device<cpu_device> m_maincpu;
54   optional_device<cpu_device> m_audiocpu;
55   optional_device<okim6295_device> m_oki;
56   required_device<palette_device> m_palette;
5357   optional_device<williams_narc_sound_device> m_narc_sound;
5458   optional_device<williams_cvsd_sound_device> m_cvsd_sound;
5559   optional_device<williams_adpcm_sound_device> m_adpcm_sound;
60   
61   required_shared_ptr<UINT16> m_generic_paletteram_16;
62   optional_shared_ptr<UINT8> m_gfx_rom;
5663
5764   UINT16 *m_cmos_ram;
5865   UINT32 m_cmos_page;
59   optional_shared_ptr<UINT8> m_gfx_rom;
6066   UINT16 m_prot_result;
6167   UINT16 m_prot_sequence[3];
6268   UINT8 m_prot_index;
r32566r32567
124130   DECLARE_VIDEO_START(common);
125131   TIMER_CALLBACK_MEMBER(dma_callback);
126132   TIMER_CALLBACK_MEMBER(autoerase_line);
127   required_device<cpu_device> m_maincpu;
128   optional_device<cpu_device> m_audiocpu;
129   optional_device<okim6295_device> m_oki;
130   required_device<palette_device> m_palette;
131   required_shared_ptr<UINT16> m_generic_paletteram_16;
133   
132134protected:
133135   virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
136   void dma_draw(UINT16 command);
134137};
trunk/src/mame/includes/thepit.h
r32566r32567
33public:
44   thepit_state(const machine_config &mconfig, device_type type, const char *tag)
55      : driver_device(mconfig, type, tag),
6      m_maincpu(*this, "maincpu"),
7      m_gfxdecode(*this, "gfxdecode"),
8      m_palette(*this, "palette"),
69      m_videoram(*this, "videoram"),
710      m_colorram(*this, "colorram"),
811      m_attributesram(*this, "attributesram"),
9      m_spriteram(*this, "spriteram"),
10      m_maincpu(*this, "maincpu"),
11      m_gfxdecode(*this, "gfxdecode"),
12      m_palette(*this, "palette") { }
12      m_spriteram(*this, "spriteram") { }
1313
14   int m_question_address;
15   int m_question_rom;
16   int m_remap_address[16];
14   required_device<cpu_device> m_maincpu;
15   required_device<gfxdecode_device> m_gfxdecode;
16   required_device<palette_device> m_palette;
17   
1718   required_shared_ptr<UINT8> m_videoram;
1819   required_shared_ptr<UINT8> m_colorram;
1920   required_shared_ptr<UINT8> m_attributesram;
2021   required_shared_ptr<UINT8> m_spriteram;
22   
23   int m_question_address;
24   int m_question_rom;
25   int m_remap_address[16];
2126   UINT8 m_graphics_bank;
2227   UINT8 m_flip_screen_x;
2328   UINT8 m_flip_screen_y;
r32566r32567
4449   UINT32 screen_update_thepit(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
4550   UINT32 screen_update_desertdan(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
4651   INTERRUPT_GEN_MEMBER(vblank_irq);
47   required_device<cpu_device> m_maincpu;
48   required_device<gfxdecode_device> m_gfxdecode;
49   required_device<palette_device> m_palette;
52   void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, int priority_to_draw);
5053};
trunk/src/mame/includes/namcos86.h
r32566r32567
6969
7070private:
7171   inline void get_tile_info(tile_data &tileinfo,int tile_index,int layer,UINT8 *vram);
72   void set_scroll(int layer);
7273};
trunk/src/mame/includes/carpolo.h
r32566r32567
119119   void carpolo_generate_car_goal_interrupt(int car, int right_goal);
120120   void carpolo_generate_car_ball_interrupt(int car, int car_x, int car_y);
121121   void carpolo_generate_car_border_interrupt(int car, int horizontal_border);
122   void draw_sprite(bitmap_ind16 &bitmap, const rectangle &cliprect,
123                  UINT8 x, UINT8 y, int bank, int code, int col);
122   void draw_alpha_line(bitmap_ind16 &bitmap, const rectangle &cliprect, int alpha_line, int video_line);
123   void draw_sprite(bitmap_ind16 &bitmap, const rectangle &cliprect, UINT8 x, UINT8 y, int bank, int code, int col);
124124   int check_sprite_sprite_collision(int x1, int y1, int code1, int flipy1,
125125                              int x2, int y2, int code2, int flipy2,
126126                              int *col_x, int *col_y);
trunk/src/mame/includes/harddriv.h
r32566r32567
453453   DECLARE_WRITE16_MEMBER( hdgsp_vram_1bpp_w );
454454   DECLARE_WRITE16_MEMBER( hdgsp_vram_2bpp_w );
455455
456   inline void gsp_palette_change(int offset);
457   
456458   DECLARE_READ16_MEMBER( hdgsp_paletteram_lo_r );
457459   DECLARE_WRITE16_MEMBER( hdgsp_paletteram_lo_w );
458460   DECLARE_READ16_MEMBER( hdgsp_paletteram_hi_r );
trunk/src/mame/video/stadhero.c
r32566r32567
2626
2727   m_tilegen1->set_bppmultmask(0x8, 0x7);
2828   m_tilegen1->deco_bac06_pf_draw(bitmap,cliprect,TILEMAP_DRAW_OPAQUE, 0x00, 0x00, 0x00, 0x00);
29   m_spritegen->draw_sprites(machine(), bitmap, cliprect, m_spriteram, 0x00, 0x00, 0x0f);
29   m_spritegen->draw_sprites(bitmap, cliprect, m_spriteram, 0x00, 0x00, 0x0f);
3030   m_pf1_tilemap->draw(screen, bitmap, cliprect, 0,0);
3131   return 0;
3232}
trunk/src/mame/video/actfancr.c
r32566r32567
2727   flip_screen_set(m_tilegen2->get_flip_state());
2828
2929   m_tilegen1->deco_bac06_pf_draw(bitmap,cliprect,TILEMAP_DRAW_OPAQUE, 0x00, 0x00, 0x00, 0x00);
30   m_spritegen->draw_sprites(machine(), bitmap, cliprect, m_spriteram16, 0x00, 0x00, 0x0f);
30   m_spritegen->draw_sprites(bitmap, cliprect, m_spriteram16, 0x00, 0x00, 0x0f);
3131   m_tilegen2->deco_bac06_pf_draw(bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00);
3232
3333   return 0;
trunk/src/mame/video/vaportra.c
r32566r32567
6464   {
6565      m_deco_tilegen2->tilemap_2_draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
6666      m_deco_tilegen2->tilemap_1_draw(screen, bitmap, cliprect, 0, 0);
67      m_spritegen->draw_sprites(machine(), bitmap, cliprect, m_spriteram->buffer(), 0, m_priority[1], 0x0f);
67      m_spritegen->draw_sprites(bitmap, cliprect, m_spriteram->buffer(), 0, m_priority[1], 0x0f);
6868      m_deco_tilegen1->tilemap_2_draw(screen, bitmap, cliprect, 0, 0);
6969   }
7070   else if (pri == 1)
7171   {
7272      m_deco_tilegen2->tilemap_1_draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
7373      m_deco_tilegen2->tilemap_2_draw(screen, bitmap, cliprect, 0, 0);
74      m_spritegen->draw_sprites(machine(), bitmap, cliprect, m_spriteram->buffer(), 0, m_priority[1], 0x0f);
74      m_spritegen->draw_sprites(bitmap, cliprect, m_spriteram->buffer(), 0, m_priority[1], 0x0f);
7575      m_deco_tilegen1->tilemap_2_draw(screen, bitmap, cliprect, 0, 0);
7676   }
7777   else if (pri == 2)
7878   {
7979      m_deco_tilegen2->tilemap_2_draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
8080      m_deco_tilegen1->tilemap_2_draw(screen, bitmap, cliprect, 0, 0);
81      m_spritegen->draw_sprites(machine(), bitmap, cliprect, m_spriteram->buffer(), 0, m_priority[1], 0x0f);
81      m_spritegen->draw_sprites(bitmap, cliprect, m_spriteram->buffer(), 0, m_priority[1], 0x0f);
8282      m_deco_tilegen2->tilemap_1_draw(screen, bitmap, cliprect, 0, 0);
8383   }
8484   else
8585   {
8686      m_deco_tilegen2->tilemap_1_draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
8787      m_deco_tilegen1->tilemap_2_draw(screen, bitmap, cliprect, 0, 0);
88      m_spritegen->draw_sprites(machine(), bitmap, cliprect, m_spriteram->buffer(), 0, m_priority[1], 0x0f);
88      m_spritegen->draw_sprites(bitmap, cliprect, m_spriteram->buffer(), 0, m_priority[1], 0x0f);
8989      m_deco_tilegen2->tilemap_2_draw(screen, bitmap, cliprect, 0, 0);
9090   }
9191
92   m_spritegen->draw_sprites(machine(), bitmap, cliprect, m_spriteram->buffer(), 1, m_priority[1], 0x0f);
92   m_spritegen->draw_sprites(bitmap, cliprect, m_spriteram->buffer(), 1, m_priority[1], 0x0f);
9393   m_deco_tilegen1->tilemap_1_draw(screen, bitmap, cliprect, 0, 0);
9494   return 0;
9595}
trunk/src/mame/video/namcos86.c
r32566r32567
333333}
334334
335335
336static void set_scroll(running_machine &machine, int layer)
336void namcos86_state::set_scroll(int layer)
337337{
338   namcos86_state *state = machine.driver_data<namcos86_state>();
339338   int scrollx,scrolly;
340339
341   scrollx = state->m_xscroll[layer];
342   scrolly = state->m_yscroll[layer];
343   if (state->flip_screen())
340   scrollx = m_xscroll[layer];
341   scrolly = m_yscroll[layer];
342   if (flip_screen())
344343   {
345344      scrollx = -scrollx;
346345      scrolly = -scrolly;
347346   }
348   state->m_bg_tilemap[layer]->set_scrollx(0, scrollx);
349   state->m_bg_tilemap[layer]->set_scrolly(0, scrolly);
347   m_bg_tilemap[layer]->set_scrollx(0, scrollx);
348   m_bg_tilemap[layer]->set_scrolly(0, scrolly);
350349}
351350
352351
r32566r32567
356355
357356   /* flip screen is embedded in the sprite control registers */
358357   flip_screen_set(m_spriteram[0x07f6] & 1);
359   set_scroll(machine(), 0);
360   set_scroll(machine(), 1);
361   set_scroll(machine(), 2);
362   set_scroll(machine(), 3);
358   set_scroll(0);
359   set_scroll(1);
360   set_scroll(2);
361   set_scroll(3);
363362
364363   screen.priority().fill(0, cliprect);
365364
trunk/src/mame/video/k054156_k054157_k056832.c
r32566r32567
245245   downcast<k056832_device &>(device).m_palette.set_tag(tag);
246246}
247247
248void k056832_device::create_tilemaps(running_machine &machine)
248void k056832_device::create_tilemaps()
249249{
250250   tilemap_t *tmap;
251251   int i;
r32566r32567
280280
281281
282282
283   m_videoram = auto_alloc_array_clear(machine, UINT16, 0x2000 * (K056832_PAGE_COUNT + 1) / 2);
283   m_videoram = auto_alloc_array_clear(machine(), UINT16, 0x2000 * (K056832_PAGE_COUNT + 1) / 2);
284284
285   m_tilemap[0x0] = &machine.tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_info0),this), TILEMAP_SCAN_ROWS,  8, 8, 64, 32);
286   m_tilemap[0x1] = &machine.tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_info1),this), TILEMAP_SCAN_ROWS,  8, 8, 64, 32);
287   m_tilemap[0x2] = &machine.tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_info2),this), TILEMAP_SCAN_ROWS,  8, 8, 64, 32);
288   m_tilemap[0x3] = &machine.tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_info3),this), TILEMAP_SCAN_ROWS,  8, 8, 64, 32);
289   m_tilemap[0x4] = &machine.tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_info4),this), TILEMAP_SCAN_ROWS,  8, 8, 64, 32);
290   m_tilemap[0x5] = &machine.tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_info5),this), TILEMAP_SCAN_ROWS,  8, 8, 64, 32);
291   m_tilemap[0x6] = &machine.tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_info6),this), TILEMAP_SCAN_ROWS,  8, 8, 64, 32);
292   m_tilemap[0x7] = &machine.tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_info7),this), TILEMAP_SCAN_ROWS,  8, 8, 64, 32);
293   m_tilemap[0x8] = &machine.tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_info8),this), TILEMAP_SCAN_ROWS,  8, 8, 64, 32);
294   m_tilemap[0x9] = &machine.tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_info9),this), TILEMAP_SCAN_ROWS,  8, 8, 64, 32);
295   m_tilemap[0xa] = &machine.tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_infoa),this), TILEMAP_SCAN_ROWS,  8, 8, 64, 32);
296   m_tilemap[0xb] = &machine.tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_infob),this), TILEMAP_SCAN_ROWS,  8, 8, 64, 32);
297   m_tilemap[0xc] = &machine.tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_infoc),this), TILEMAP_SCAN_ROWS,  8, 8, 64, 32);
298   m_tilemap[0xd] = &machine.tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_infod),this), TILEMAP_SCAN_ROWS,  8, 8, 64, 32);
299   m_tilemap[0xe] = &machine.tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_infoe),this), TILEMAP_SCAN_ROWS,  8, 8, 64, 32);
300   m_tilemap[0xf] = &machine.tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_infof),this), TILEMAP_SCAN_ROWS,  8, 8, 64, 32);
285   m_tilemap[0x0] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_info0),this), TILEMAP_SCAN_ROWS,  8, 8, 64, 32);
286   m_tilemap[0x1] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_info1),this), TILEMAP_SCAN_ROWS,  8, 8, 64, 32);
287   m_tilemap[0x2] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_info2),this), TILEMAP_SCAN_ROWS,  8, 8, 64, 32);
288   m_tilemap[0x3] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_info3),this), TILEMAP_SCAN_ROWS,  8, 8, 64, 32);
289   m_tilemap[0x4] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_info4),this), TILEMAP_SCAN_ROWS,  8, 8, 64, 32);
290   m_tilemap[0x5] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_info5),this), TILEMAP_SCAN_ROWS,  8, 8, 64, 32);
291   m_tilemap[0x6] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_info6),this), TILEMAP_SCAN_ROWS,  8, 8, 64, 32);
292   m_tilemap[0x7] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_info7),this), TILEMAP_SCAN_ROWS,  8, 8, 64, 32);
293   m_tilemap[0x8] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_info8),this), TILEMAP_SCAN_ROWS,  8, 8, 64, 32);
294   m_tilemap[0x9] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_info9),this), TILEMAP_SCAN_ROWS,  8, 8, 64, 32);
295   m_tilemap[0xa] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_infoa),this), TILEMAP_SCAN_ROWS,  8, 8, 64, 32);
296   m_tilemap[0xb] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_infob),this), TILEMAP_SCAN_ROWS,  8, 8, 64, 32);
297   m_tilemap[0xc] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_infoc),this), TILEMAP_SCAN_ROWS,  8, 8, 64, 32);
298   m_tilemap[0xd] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_infod),this), TILEMAP_SCAN_ROWS,  8, 8, 64, 32);
299   m_tilemap[0xe] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_infoe),this), TILEMAP_SCAN_ROWS,  8, 8, 64, 32);
300   m_tilemap[0xf] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_infof),this), TILEMAP_SCAN_ROWS,  8, 8, 64, 32);
301301
302302   for (i = 0; i < K056832_PAGE_COUNT; i++)
303303   {
r32566r32567
310310}
311311
312312
313void k056832_device::finalize_init(running_machine &machine)
313void k056832_device::finalize_init()
314314{
315315   int i;
316316
r32566r32567
354354      save_item(NAME(m_last_colorbase[i]), i);
355355   }
356356
357   machine.save().register_postload(save_prepost_delegate(FUNC(k056832_device::postload), this));
357   machine().save().register_postload(save_prepost_delegate(FUNC(k056832_device::postload), this));
358358}
359359
360360
r32566r32567
372372/* TODO: understand which elements MUST be init here (to keep correct layer
373373   associations) and which ones can can be init at RESET, if any */
374374
375   create_gfx(machine(), m_gfx_memory_region, m_bpp, m_big);
375   create_gfx(m_gfx_memory_region, m_bpp, m_big);
376376
377   create_tilemaps(machine());
377   create_tilemaps();
378378
379   finalize_init(machine());
379   finalize_init();
380380
381381   // bind callbacks
382382   m_k056832_cb.bind_relative_to(*owner());
r32566r32567
20192019/***************************************************************************/
20202020
20212021
2022void k056832_device::create_gfx(running_machine &machine, const char *gfx_memory_region, int bpp, int big)
2022void k056832_device::create_gfx(const char *gfx_memory_region, int bpp, int big)
20232023{
20242024   int gfx_index;
20252025   int i;
r32566r32567
21122112   switch (bpp)
21132113   {
21142114      case K056832_BPP_4:
2115         total = machine.root_device().memregion(gfx_memory_region)->bytes() / (i*4);
2116         konami_decode_gfx(machine, m_gfxdecode, m_palette, gfx_index, machine.root_device().memregion(gfx_memory_region)->base(), total, &charlayout4, 4);
2115         total = machine().root_device().memregion(gfx_memory_region)->bytes() / (i*4);
2116         konami_decode_gfx(machine(), m_gfxdecode, m_palette, gfx_index, machine().root_device().memregion(gfx_memory_region)->base(), total, &charlayout4, 4);
21172117         break;
21182118
21192119      case K056832_BPP_5:
2120         total = machine.root_device().memregion(gfx_memory_region)->bytes() / (i*5);
2121         konami_decode_gfx(machine, m_gfxdecode, m_palette, gfx_index, machine.root_device().memregion(gfx_memory_region)->base(), total, &charlayout5, 5);
2120         total = machine().root_device().memregion(gfx_memory_region)->bytes() / (i*5);
2121         konami_decode_gfx(machine(), m_gfxdecode, m_palette, gfx_index, machine().root_device().memregion(gfx_memory_region)->base(), total, &charlayout5, 5);
21222122         break;
21232123
21242124      case K056832_BPP_6:
2125         total = machine.root_device().memregion(gfx_memory_region)->bytes() / (i*6);
2126         konami_decode_gfx(machine, m_gfxdecode, m_palette, gfx_index, machine.root_device().memregion(gfx_memory_region)->base(), total, &charlayout6, 6);
2125         total = machine().root_device().memregion(gfx_memory_region)->bytes() / (i*6);
2126         konami_decode_gfx(machine(), m_gfxdecode, m_palette, gfx_index, machine().root_device().memregion(gfx_memory_region)->base(), total, &charlayout6, 6);
21272127         break;
21282128
21292129      case K056832_BPP_8:
2130         total = machine.root_device().memregion(gfx_memory_region)->bytes() / (i*8);
2131         konami_decode_gfx(machine, m_gfxdecode, m_palette, gfx_index, machine.root_device().memregion(gfx_memory_region)->base(), total, &charlayout8, 8);
2130         total = machine().root_device().memregion(gfx_memory_region)->bytes() / (i*8);
2131         konami_decode_gfx(machine(), m_gfxdecode, m_palette, gfx_index, machine().root_device().memregion(gfx_memory_region)->base(), total, &charlayout8, 8);
21322132         break;
21332133
21342134      case K056832_BPP_8LE:
2135         total = machine.root_device().memregion(gfx_memory_region)->bytes() / (i*8);
2136         konami_decode_gfx(machine, m_gfxdecode, m_palette, gfx_index, machine.root_device().memregion(gfx_memory_region)->base(), total, &charlayout8le, 8);
2135         total = machine().root_device().memregion(gfx_memory_region)->bytes() / (i*8);
2136         konami_decode_gfx(machine(), m_gfxdecode, m_palette, gfx_index, machine().root_device().memregion(gfx_memory_region)->base(), total, &charlayout8le, 8);
21372137         break;
21382138
21392139      case K056832_BPP_8TASMAN:
2140         total = machine.root_device().memregion(gfx_memory_region)->bytes() / (i*8);
2141         konami_decode_gfx(machine, m_gfxdecode, m_palette, gfx_index, machine.root_device().memregion(gfx_memory_region)->base(), total, &charlayout8_tasman, 8);
2140         total = machine().root_device().memregion(gfx_memory_region)->bytes() / (i*8);
2141         konami_decode_gfx(machine(), m_gfxdecode, m_palette, gfx_index, machine().root_device().memregion(gfx_memory_region)->base(), total, &charlayout8_tasman, 8);
21422142         break;
21432143
21442144      case K056832_BPP_4dj:
2145         total = machine.root_device().memregion(gfx_memory_region)->bytes() / (i*4);
2146         konami_decode_gfx(machine, m_gfxdecode, m_palette, gfx_index, machine.root_device().memregion(gfx_memory_region)->base(), total, &charlayout4dj, 4);
2145         total = machine().root_device().memregion(gfx_memory_region)->bytes() / (i*4);
2146         konami_decode_gfx(machine(), m_gfxdecode, m_palette, gfx_index, machine().root_device().memregion(gfx_memory_region)->base(), total, &charlayout4dj, 4);
21472147         break;
21482148
21492149      default:
r32566r32567
21552155   m_gfx_memory_region = gfx_memory_region;
21562156   m_gfx_num = gfx_index;
21572157
2158   m_rombase = machine.root_device().memregion(gfx_memory_region)->base();
2159   m_num_gfx_banks = machine.root_device().memregion(gfx_memory_region)->bytes() / 0x2000;
2158   m_rombase = machine().root_device().memregion(gfx_memory_region)->base();
2159   m_num_gfx_banks = machine().root_device().memregion(gfx_memory_region)->bytes() / 0x2000;
21602160   m_cur_gfx_banks = 0;
21612161   m_use_ext_linescroll = 0;
21622162   m_uses_tile_banks = 0;
trunk/src/mame/video/k054156_k054157_k056832.h
r32566r32567
211211   template<class _BitmapClass>
212212   void tilemap_draw_common(screen_device &screen, _BitmapClass &bitmap, const rectangle &cliprect, int layer, UINT32 flags, UINT32 priority);
213213
214   void create_gfx(running_machine &machine, const char *gfx_memory_region, int bpp, int big);
215   void create_tilemaps(running_machine &machine);
216   void finalize_init(running_machine &machine);
214   void create_gfx(const char *gfx_memory_region, int bpp, int big);
215   void create_tilemaps();
216   void finalize_init();
217217
218218   required_device<gfxdecode_device> m_gfxdecode;
219219   required_device<palette_device> m_palette;
trunk/src/mame/video/thepit.c
r32566r32567
226226 *
227227 *************************************/
228228
229static void draw_sprites(running_machine &machine,
230                     bitmap_ind16 &bitmap,
231                     const rectangle &cliprect,
232                     int priority_to_draw)
229void thepit_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, int priority_to_draw)
233230{
234   thepit_state *state = machine.driver_data<thepit_state>();
235   int offs;
236
237   for (offs = state->m_spriteram.bytes() - 4; offs >= 0; offs -= 4)
231   for (int offs = m_spriteram.bytes() - 4; offs >= 0; offs -= 4)
238232   {
239      if (((state->m_spriteram[offs + 2] & 0x08) >> 3) == priority_to_draw)
233      if (((m_spriteram[offs + 2] & 0x08) >> 3) == priority_to_draw)
240234      {
241235         UINT8 y, x, flipx, flipy;
242236
243         if ((state->m_spriteram[offs + 0] == 0) || (state->m_spriteram[offs + 3] == 0))
237         if ((m_spriteram[offs + 0] == 0) || (m_spriteram[offs + 3] == 0))
244238         {
245239            continue;
246240         }
247241
248         y = 240 - state->m_spriteram[offs];
249         x = state->m_spriteram[offs + 3] + 1;
242         y = 240 - m_spriteram[offs];
243         x = m_spriteram[offs + 3] + 1;
250244
251         flipx = state->m_spriteram[offs + 1] & 0x40;
252         flipy = state->m_spriteram[offs + 1] & 0x80;
245         flipx = m_spriteram[offs + 1] & 0x40;
246         flipy = m_spriteram[offs + 1] & 0x80;
253247
254         if (state->m_flip_screen_y)
248         if (m_flip_screen_y)
255249         {
256250            y = 240 - y;
257251            flipy = !flipy;
258252         }
259253
260         if (state->m_flip_screen_x)
254         if (m_flip_screen_x)
261255         {
262256            x = 242 - x;
263257            flipx = !flipx;
r32566r32567
267261         if (offs < 16) y++;
268262
269263
270               state->m_gfxdecode->gfx(2 * state->m_graphics_bank + 1)->transpen(bitmap,cliprect,
271               state->m_spriteram[offs + 1] & 0x3f,
272               state->m_spriteram[offs + 2],
264               m_gfxdecode->gfx(2 * m_graphics_bank + 1)->transpen(bitmap,cliprect,
265               m_spriteram[offs + 1] & 0x3f,
266               m_spriteram[offs + 2],
273267               flipx, flipy, x, y, 0);
274268
275269
276               state->m_gfxdecode->gfx(2 * state->m_graphics_bank + 1)->transpen(bitmap,cliprect,
277               state->m_spriteram[offs + 1] & 0x3f,
278               state->m_spriteram[offs + 2],
270               m_gfxdecode->gfx(2 * m_graphics_bank + 1)->transpen(bitmap,cliprect,
271               m_spriteram[offs + 1] & 0x3f,
272               m_spriteram[offs + 2],
279273               flipx, flipy, x-256, y, 0);
280274
281275      }
r32566r32567
307301   m_tilemap->draw(screen, bitmap, cliprect, 0, 0);
308302
309303   /* low priority sprites */
310   draw_sprites(machine(), bitmap, m_flip_screen_x ? spritevisibleareaflipx : spritevisiblearea, 0);
304   draw_sprites(bitmap, m_flip_screen_x ? spritevisibleareaflipx : spritevisiblearea, 0);
311305
312306   /* high priority tiles */
313307   m_solid_tilemap->draw(screen, bitmap, cliprect, 1, 1);
314308
315309   /* high priority sprites */
316   draw_sprites(machine(), bitmap, m_flip_screen_x ? spritevisibleareaflipx : spritevisiblearea, 1);
310   draw_sprites(bitmap, m_flip_screen_x ? spritevisibleareaflipx : spritevisiblearea, 1);
317311
318312   return 0;
319313}
r32566r32567
343337
344338   /* low priority sprites */
345339   m_graphics_bank = 1;
346   draw_sprites(machine(), bitmap, m_flip_screen_y ? spritevisibleareaflipx : spritevisiblearea, 0);
340   draw_sprites(bitmap, m_flip_screen_y ? spritevisibleareaflipx : spritevisiblearea, 0);
347341
348342   /* high priority tiles */ // not sure about this, draws a white block over the title logo sprite, looks like it should be behind?
349343   m_graphics_bank = 0;
r32566r32567
351345
352346   /* high priority sprites */
353347   m_graphics_bank = 1;
354   draw_sprites(machine(), bitmap, m_flip_screen_y ? spritevisibleareaflipx : spritevisiblearea, 1);
348   draw_sprites(bitmap, m_flip_screen_y ? spritevisibleareaflipx : spritevisiblearea, 1);
355349
356350   return 0;
357351}
trunk/src/mame/video/karnov.c
r32566r32567
125125UINT32 karnov_state::screen_update_karnov(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
126126{
127127   draw_background(bitmap, cliprect);
128   m_spritegen->draw_sprites(machine(), bitmap, cliprect, m_spriteram->buffer(), 0x800, 0);
128   m_spritegen->draw_sprites(bitmap, cliprect, m_spriteram->buffer(), 0x800, 0);
129129   m_fix_tilemap->draw(screen, bitmap, cliprect, 0, 0);
130130   return 0;
131131}
trunk/src/mame/video/kaneko_spr.c
r32566r32567
185185}
186186
187187
188int kaneko16_sprite_device::kaneko16_parse_sprite_type012(running_machine &machine, int i, struct tempsprite *s, UINT16* spriteram16, int spriteram16_bytes)
188int kaneko16_sprite_device::kaneko16_parse_sprite_type012(int i, struct tempsprite *s, UINT16* spriteram16, int spriteram16_bytes)
189189{
190190   int attr, xoffs, offs;
191191
r32566r32567
336336
337337/* Build a list of sprites to display & draw them */
338338template<class _BitmapClass>
339void kaneko16_sprite_device::kaneko16_draw_sprites(running_machine &machine, _BitmapClass &bitmap, const rectangle &cliprect, bitmap_ind8 &priority_bitmap, UINT16* spriteram16, int spriteram16_bytes)
339void kaneko16_sprite_device::kaneko16_draw_sprites(_BitmapClass &bitmap, const rectangle &cliprect, bitmap_ind8 &priority_bitmap, UINT16* spriteram16, int spriteram16_bytes)
340340{
341341   /* Sprites *must* be parsed from the first in RAM to the last,
342342      because of the multisprite feature. But they *must* be drawn
r32566r32567
367367   {
368368      int flags;
369369
370      flags = kaneko16_parse_sprite_type012(machine, i,s, spriteram16, spriteram16_bytes);
370      flags = kaneko16_parse_sprite_type012(i,s, spriteram16, spriteram16_bytes);
371371
372372      if (flags == -1)    // End of Sprites
373373         break;
r32566r32567
587587
588588
589589
590void kaneko16_sprite_device::kaneko16_render_sprites(running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect, bitmap_ind8 &priority_bitmap, UINT16* spriteram16, int spriteram16_bytes) { kaneko16_render_sprites_common(machine, bitmap, cliprect, priority_bitmap, spriteram16, spriteram16_bytes); }
591void kaneko16_sprite_device::kaneko16_render_sprites(running_machine &machine, bitmap_rgb32 &bitmap, const rectangle &cliprect, bitmap_ind8 &priority_bitmap, UINT16* spriteram16, int spriteram16_bytes) { kaneko16_render_sprites_common(machine, bitmap, cliprect, priority_bitmap, spriteram16, spriteram16_bytes); }
590void kaneko16_sprite_device::kaneko16_render_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, bitmap_ind8 &priority_bitmap, UINT16* spriteram16, int spriteram16_bytes) { kaneko16_render_sprites_common(bitmap, cliprect, priority_bitmap, spriteram16, spriteram16_bytes); }
591void kaneko16_sprite_device::kaneko16_render_sprites(bitmap_rgb32 &bitmap, const rectangle &cliprect, bitmap_ind8 &priority_bitmap, UINT16* spriteram16, int spriteram16_bytes) { kaneko16_render_sprites_common(bitmap, cliprect, priority_bitmap, spriteram16, spriteram16_bytes); }
592592
593593template<class _BitmapClass>
594void kaneko16_sprite_device::kaneko16_render_sprites_common(running_machine &machine, _BitmapClass &bitmap, const rectangle &cliprect, bitmap_ind8 &priority_bitmap, UINT16* spriteram16, int spriteram16_bytes)
594void kaneko16_sprite_device::kaneko16_render_sprites_common(_BitmapClass &bitmap, const rectangle &cliprect, bitmap_ind8 &priority_bitmap, UINT16* spriteram16, int spriteram16_bytes)
595595{
596596   /* Sprites last (rendered with pdrawgfx, so they can slip
597597      in between the layers) */
r32566r32567
599599   if(m_keep_sprites)
600600   {
601601      /* keep sprites on screen - used by mgcrystl when you get the first gem and it shows instructions */
602      kaneko16_draw_sprites(machine,m_sprites_bitmap, cliprect, priority_bitmap, spriteram16, spriteram16_bytes);
602      kaneko16_draw_sprites(m_sprites_bitmap, cliprect, priority_bitmap, spriteram16, spriteram16_bytes);
603603      kaneko16_copybitmap(bitmap,cliprect);
604604   }
605605   else
606606   {
607607      m_sprites_bitmap.fill(0, cliprect);
608      kaneko16_draw_sprites(machine,bitmap,cliprect, priority_bitmap, spriteram16, spriteram16_bytes);
608      kaneko16_draw_sprites(bitmap,cliprect, priority_bitmap, spriteram16, spriteram16_bytes);
609609   }
610610}
611611
trunk/src/mame/video/kaneko_spr.h
r32566r32567
4040   // (legacy) used in the bitmap clear functions
4141   virtual int get_sprite_type(void) =0;
4242
43   void kaneko16_render_sprites(running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect, bitmap_ind8 &priority_bitmap, UINT16* spriteram16, int spriteram16_bytes);
44   void kaneko16_render_sprites(running_machine &machine, bitmap_rgb32 &bitmap, const rectangle &cliprect, bitmap_ind8 &priority_bitmap, UINT16* spriteram16, int spriteram16_bytes);
43   void kaneko16_render_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, bitmap_ind8 &priority_bitmap, UINT16* spriteram16, int spriteram16_bytes);
44   void kaneko16_render_sprites(bitmap_rgb32 &bitmap, const rectangle &cliprect, bitmap_ind8 &priority_bitmap, UINT16* spriteram16, int spriteram16_bytes);
4545
4646
4747   template<class _BitmapClass>
48   void kaneko16_render_sprites_common(running_machine &machine, _BitmapClass &bitmap, const rectangle &cliprect, bitmap_ind8 &priority_bitmap, UINT16* spriteram16, int spriteram16_bytes);
48   void kaneko16_render_sprites_common(_BitmapClass &bitmap, const rectangle &cliprect, bitmap_ind8 &priority_bitmap, UINT16* spriteram16, int spriteram16_bytes);
4949
5050
5151   DECLARE_READ16_MEMBER(kaneko16_sprites_regs_r);
r32566r32567
8383
8484
8585   template<class _BitmapClass>
86   void kaneko16_draw_sprites(running_machine &machine, _BitmapClass &bitmap, const rectangle &cliprect, bitmap_ind8 &priority_bitmap, UINT16* spriteram16, int spriteram16_bytes);
86   void kaneko16_draw_sprites(_BitmapClass &bitmap, const rectangle &cliprect, bitmap_ind8 &priority_bitmap, UINT16* spriteram16, int spriteram16_bytes);
8787
8888
8989   template<class _BitmapClass>
r32566r32567
9191         UINT32 code,UINT32 color,int flipx,int flipy,int sx,int sy,
9292         bitmap_ind8 &priority_bitmap, int priority);
9393
94   int kaneko16_parse_sprite_type012(running_machine &machine, int i, struct tempsprite *s, UINT16* spriteram16, int spriteram16_bytes);
94   int kaneko16_parse_sprite_type012(int i, struct tempsprite *s, UINT16* spriteram16, int spriteram16_bytes);
9595
9696   void kaneko16_copybitmap(bitmap_ind16 &bitmap, const rectangle &cliprect);
9797   void kaneko16_copybitmap(bitmap_rgb32 &bitmap, const rectangle &cliprect);
trunk/src/mame/video/harddriv.c
r32566r32567
319319 *
320320 *************************************/
321321
322INLINE void gsp_palette_change(running_machine &machine, int offset)
322inline void harddriv_state::gsp_palette_change(int offset)
323323{
324   harddriv_state *state = machine.driver_data<harddriv_state>();
325   int red = (state->m_gsp_paletteram_lo[offset] >> 8) & 0xff;
326   int green = state->m_gsp_paletteram_lo[offset] & 0xff;
327   int blue = state->m_gsp_paletteram_hi[offset] & 0xff;
328   state->m_palette->set_pen_color(offset, rgb_t(red, green, blue));
324   int red = (m_gsp_paletteram_lo[offset] >> 8) & 0xff;
325   int green = m_gsp_paletteram_lo[offset] & 0xff;
326   int blue = m_gsp_paletteram_hi[offset] & 0xff;
327   m_palette->set_pen_color(offset, rgb_t(red, green, blue));
329328}
330329
331330
r32566r32567
346345   offset = m_gfx_palettebank * 0x100 + (offset & 0xff);
347346
348347   COMBINE_DATA(&m_gsp_paletteram_lo[offset]);
349   gsp_palette_change(space.machine(), offset);
348   gsp_palette_change(offset);
350349}
351350
352351
r32566r32567
374373   offset = m_gfx_palettebank * 0x100 + (offset & 0xff);
375374
376375   COMBINE_DATA(&m_gsp_paletteram_hi[offset]);
377   gsp_palette_change(space.machine(), offset);
376   gsp_palette_change(offset);
378377}
379378
380379
trunk/src/mame/video/dec8.c
r32566r32567
261261   flip_screen_set(m_tilegen1->get_flip_state());
262262
263263   m_tilegen1->deco_bac06_pf_draw(bitmap,cliprect,TILEMAP_DRAW_OPAQUE, 0x00, 0x00, 0x00, 0x00);
264   m_spritegen_mxc->draw_sprites(machine(), bitmap, cliprect, m_buffered_spriteram16, 0x04, 0x00, 0x03);
264   m_spritegen_mxc->draw_sprites(bitmap, cliprect, m_buffered_spriteram16, 0x04, 0x00, 0x03);
265265   m_tilegen2->deco_bac06_pf_draw(bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00);
266   m_spritegen_mxc->draw_sprites(machine(), bitmap, cliprect, m_buffered_spriteram16, 0x04, 0x04, 0x03);
266   m_spritegen_mxc->draw_sprites(bitmap, cliprect, m_buffered_spriteram16, 0x04, 0x04, 0x03);
267267   m_fix_tilemap->draw(screen, bitmap, cliprect, 0, 0);
268268   return 0;
269269}
r32566r32567
299299UINT32 dec8_state::screen_update_ghostb(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
300300{
301301   m_tilegen1->deco_bac06_pf_draw(bitmap,cliprect,TILEMAP_DRAW_OPAQUE, 0x00, 0x00, 0x00, 0x00);
302   m_spritegen_krn->draw_sprites(machine(), bitmap, cliprect, m_buffered_spriteram16, 0x400, 0);
302   m_spritegen_krn->draw_sprites(bitmap, cliprect, m_buffered_spriteram16, 0x400, 0);
303303   m_fix_tilemap->draw(screen, bitmap, cliprect, 0, 0);
304304   return 0;
305305}
r32566r32567
333333
334334   // we mimic the priority scheme in dec0.c, this was originally a bit different, so this could be wrong
335335   m_tilegen1->deco_bac06_pf_draw(bitmap,cliprect,TILEMAP_DRAW_OPAQUE, 0x00, 0x00, 0x00, 0x00);
336   m_spritegen_mxc->draw_sprites(machine(), bitmap, cliprect, m_buffered_spriteram16, 0x00, 0x00, 0x0f);
336   m_spritegen_mxc->draw_sprites(bitmap, cliprect, m_buffered_spriteram16, 0x00, 0x00, 0x0f);
337337   m_tilegen1->deco_bac06_pf_draw(bitmap,cliprect,0, 0x08,0x08,0x08,0x08);
338338   m_fix_tilemap->draw(screen, bitmap, cliprect, 0, 0);
339339   return 0;
r32566r32567
369369   m_bg_tilemap->set_scrolly(0, ((m_scroll2[2] << 8)+ m_scroll2[3]));
370370
371371   m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0);
372   m_spritegen_krn->draw_sprites(machine(), bitmap, cliprect, m_buffered_spriteram16, 0x400, 0);
372   m_spritegen_krn->draw_sprites(bitmap, cliprect, m_buffered_spriteram16, 0x400, 0);
373373   m_fix_tilemap->draw(screen, bitmap, cliprect, 0, 0);
374374   return 0;
375375}
r32566r32567
382382   m_bg_tilemap->draw(screen, bitmap, cliprect, TILEMAP_DRAW_LAYER1 | 0, 0);
383383   m_bg_tilemap->draw(screen, bitmap, cliprect, TILEMAP_DRAW_LAYER1 | 1, 0);
384384   m_bg_tilemap->draw(screen, bitmap, cliprect, TILEMAP_DRAW_LAYER0 | 0, 0);
385   m_spritegen_krn->draw_sprites(machine(), bitmap, cliprect, m_buffered_spriteram16, 0x400, 0);
385   m_spritegen_krn->draw_sprites(bitmap, cliprect, m_buffered_spriteram16, 0x400, 0);
386386   m_bg_tilemap->draw(screen, bitmap, cliprect, TILEMAP_DRAW_LAYER0 | 1, 0);
387387   m_fix_tilemap->draw(screen, bitmap, cliprect, 0, 0);
388388   return 0;
r32566r32567
505505   m_bg_tilemap->set_scrolly(0, ((m_scroll2[2] << 8) + m_scroll2[3]));
506506
507507   m_bg_tilemap->draw(screen, bitmap, cliprect, TILEMAP_DRAW_LAYER1, 0);
508   m_spritegen_krn->draw_sprites(machine(), bitmap, cliprect, m_buffered_spriteram16, 0x400, 2);
508   m_spritegen_krn->draw_sprites(bitmap, cliprect, m_buffered_spriteram16, 0x400, 2);
509509   m_bg_tilemap->draw(screen, bitmap, cliprect, TILEMAP_DRAW_LAYER0, 0);
510   m_spritegen_krn->draw_sprites(machine(), bitmap, cliprect, m_buffered_spriteram16, 0x400, 1);
510   m_spritegen_krn->draw_sprites(bitmap, cliprect, m_buffered_spriteram16, 0x400, 1);
511511   m_fix_tilemap->draw(screen, bitmap, cliprect, 0, 0);
512512   return 0;
513513}
r32566r32567
518518   m_bg_tilemap->set_scrolly(0, ((m_scroll2[2] << 8) + m_scroll2[3]));
519519
520520   m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0);
521   m_spritegen_krn->draw_sprites(machine(), bitmap, cliprect, m_buffered_spriteram16, 0x400, 0);
521   m_spritegen_krn->draw_sprites(bitmap, cliprect, m_buffered_spriteram16, 0x400, 0);
522522   m_bg_tilemap->draw(screen, bitmap, cliprect, 1, 0);
523523   m_fix_tilemap->draw(screen, bitmap, cliprect, 0, 0);
524524   return 0;
trunk/src/mame/video/kaneko_grap2.c
r32566r32567
162162}
163163
164164
165void kaneko_grap2_device::set_color_555_gp3(running_machine &machine, pen_t color, int rshift, int gshift, int bshift, UINT16 data)
165void kaneko_grap2_device::set_color_555_gp3(pen_t color, int rshift, int gshift, int bshift, UINT16 data)
166166{
167167   m_palette->set_pen_color(color, pal5bit(data >> rshift), pal5bit(data >> gshift), pal5bit(data >> bshift));
168168}
r32566r32567
170170WRITE16_MEMBER(kaneko_grap2_device::galpani3_framebuffer1_palette_w)
171171{
172172   COMBINE_DATA(&m_framebuffer_palette[offset]);
173   set_color_555_gp3(machine(), offset+0x4000 + (m_chipnum * 0x100), 5, 10, 0, m_framebuffer_palette[offset]);
173   set_color_555_gp3(offset+0x4000 + (m_chipnum * 0x100), 5, 10, 0, m_framebuffer_palette[offset]);
174174}
175175
176176/* definitely looks like a cycling bg colour used for the girls */
177177WRITE16_MEMBER(kaneko_grap2_device::galpani3_framebuffer1_bgcol_w)
178178{
179179   COMBINE_DATA(&m_framebuffer_bgcol);
180   set_color_555_gp3(machine(), offset+0x4300 + (m_chipnum), 5, 10, 0, m_framebuffer_bgcol);
180   set_color_555_gp3(offset+0x4300 + (m_chipnum), 5, 10, 0, m_framebuffer_bgcol);
181181}
trunk/src/mame/video/kaneko_grap2.h
r32566r32567
3333
3434
3535   void gp3_do_rle(UINT32 address, UINT16*framebuffer, UINT8* rledata);
36   void set_color_555_gp3(running_machine &machine, pen_t color, int rshift, int gshift, int bshift, UINT16 data);
36   void set_color_555_gp3(pen_t color, int rshift, int gshift, int bshift, UINT16 data);
3737
3838   UINT16 m_framebuffer_bgcol;
3939   UINT16 m_framebuffer_scrolly;
trunk/src/mame/video/decmxc06.c
r32566r32567
4949
5050deco_mxc06_device::deco_mxc06_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
5151   : device_t(mconfig, DECO_MXC06, "DECO MXC06 Sprite", tag, owner, clock, "deco_mxc06", __FILE__),
52      device_video_interface(mconfig, *this),
5253      m_gfxregion(0),
5354      m_gfxdecode(*this),
5455      m_palette(*this)
r32566r32567
6768
6869
6970/* this implementation was originally from Mad Motor */
70void deco_mxc06_device::draw_sprites( running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect, UINT16* spriteram, int pri_mask, int pri_val, int col_mask )
71void deco_mxc06_device::draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect, UINT16* spriteram, int pri_mask, int pri_val, int col_mask )
7172{
7273   int offs;
7374
r32566r32567
9798      sx = 240 - sx;
9899      sy = 240 - sy;
99100
100      if (machine.driver_data()->flip_screen())
101      if (machine().driver_data()->flip_screen())
101102      {
102103         sy = 240 - sy;
103104         sx = 240 - sx;
r32566r32567
128129            if (spriteram[offs] & 0x8000)
129130            {
130131               int draw = 0;
131               if (!flash || (machine.first_screen()->frame_number() & 1))
132               if (!flash || (m_screen->frame_number() & 1))
132133               {
133134                  if (m_priority_type==0) // most cases
134135                  {
r32566r32567
169170
170171/* this is used by the automat bootleg, it seems to have greatly simplified sprites compared to the real chip */
171172/* spriteram is twice the size tho! */
172void deco_mxc06_device::draw_sprites_bootleg( running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect, UINT16* spriteram, int pri_mask, int pri_val, int col_mask )
173void deco_mxc06_device::draw_sprites_bootleg( bitmap_ind16 &bitmap, const rectangle &cliprect, UINT16* spriteram, int pri_mask, int pri_val, int col_mask )
173174{
174175   int offs;
175176
trunk/src/mame/video/decmxc06.h
r32566r32567
11/* MXC06 */
22
33
4class deco_mxc06_device : public device_t
4class deco_mxc06_device : public device_t,
5                        public device_video_interface
56{
67public:
78   deco_mxc06_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
r32566r32567
1213   static void set_gfx_region(device_t &device, int region);
1314
1415   void set_gfxregion(int region) { m_gfxregion = region; };
15   void draw_sprites( running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect, UINT16* spriteram16, int pri_mask, int pri_val, int col_mask );
16   void draw_sprites_bootleg( running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect, UINT16* spriteram, int pri_mask, int pri_val, int col_mask );
16   void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect, UINT16* spriteram16, int pri_mask, int pri_val, int col_mask );
17   void draw_sprites_bootleg( bitmap_ind16 &bitmap, const rectangle &cliprect, UINT16* spriteram, int pri_mask, int pri_val, int col_mask );
1718   void set_pri_type( int type ) { m_priority_type = type; }
19   
1820protected:
1921   virtual void device_start();
2022   virtual void device_reset();
trunk/src/mame/video/carpolo.c
r32566r32567
165165 *
166166 *************************************/
167167
168static void draw_alpha_line(running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect,
168void carpolo_state::draw_alpha_line(bitmap_ind16 &bitmap, const rectangle &cliprect,
169169                     int alpha_line, int video_line)
170170{
171   carpolo_state *state = machine.driver_data<carpolo_state>();
172   int x;
173
174   for (x = 0; x < 32; x++)
171   for (int x = 0; x < 32; x++)
175172   {
176173      UINT8 code, col;
177174
178      code = state->m_alpharam[alpha_line * 32 + x] >> 2;
179      col  = state->m_alpharam[alpha_line * 32 + x] & 0x03;
175      code = m_alpharam[alpha_line * 32 + x] >> 2;
176      col  = m_alpharam[alpha_line * 32 + x] & 0x03;
180177
181      state->m_gfxdecode->gfx(2)->transpen(bitmap,cliprect,
178      m_gfxdecode->gfx(2)->transpen(bitmap,cliprect,
182179            code,col,
183180            0,0,
184181            x*8,video_line*8,0);
r32566r32567
292289      and bit 3 of the vertical timing PROM controls in
293290      which quadrant the line will actually appear */
294291
295   draw_alpha_line(machine(), bitmap, cliprect, 0, (0*4+0)*2  );
296   draw_alpha_line(machine(), bitmap, cliprect, 1, (0*4+0)*2+1);
297   draw_alpha_line(machine(), bitmap, cliprect, 2, (3*4+1)*2  );
298   draw_alpha_line(machine(), bitmap, cliprect, 3, (3*4+1)*2+1);
299   draw_alpha_line(machine(), bitmap, cliprect, 4, (1*4+2)*2  );
300   draw_alpha_line(machine(), bitmap, cliprect, 5, (1*4+2)*2+1);
301   draw_alpha_line(machine(), bitmap, cliprect, 6, (0*4+3)*2  );
302   draw_alpha_line(machine(), bitmap, cliprect, 7, (0*4+3)*2+1);
292   draw_alpha_line(bitmap, cliprect, 0, (0*4+0)*2  );
293   draw_alpha_line(bitmap, cliprect, 1, (0*4+0)*2+1);
294   draw_alpha_line(bitmap, cliprect, 2, (3*4+1)*2  );
295   draw_alpha_line(bitmap, cliprect, 3, (3*4+1)*2+1);
296   draw_alpha_line(bitmap, cliprect, 4, (1*4+2)*2  );
297   draw_alpha_line(bitmap, cliprect, 5, (1*4+2)*2+1);
298   draw_alpha_line(bitmap, cliprect, 6, (0*4+3)*2  );
299   draw_alpha_line(bitmap, cliprect, 7, (0*4+3)*2+1);
303300
304301   return 0;
305302}
trunk/src/mame/video/mystwarr.c
r32566r32567
1212
1313// create a decoding buffer to hold decodable tiles so that the ROM test will pass by
1414// reading the original raw data
15static void mystwarr_decode_tiles(running_machine &machine)
15void mystwarr_state::decode_tiles()
1616{
17   mystwarr_state *state = machine.driver_data<mystwarr_state>();
18   UINT8 *s = machine.root_device().memregion("gfx1")->base();
19   int len = machine.root_device().memregion("gfx1")->bytes();
17   UINT8 *s = memregion("gfx1")->base();
18   int len = memregion("gfx1")->bytes();
2019   UINT8 *pFinish = s+len-3;
2120   UINT8 *d, *decoded;
2221
23   int gfxnum = state->m_k056832->get_gfx_num();
22   int gfxnum = m_k056832->get_gfx_num();
2423
25   decoded = auto_alloc_array(machine, UINT8, len);
24   decoded = auto_alloc_array(machine(), UINT8, len);
2625   d = decoded;
2726
2827   // now convert the data into a drawable format so we can decode it
r32566r32567
5150      d += 5;
5251   }
5352
54   state->m_gfxdecode->gfx(gfxnum)->set_source(decoded);
53   m_gfxdecode->gfx(gfxnum)->set_source(decoded);
5554}
5655
5756
r32566r32567
151150{
152151   m_gametype = 0;
153152
154   mystwarr_decode_tiles(machine());
153   decode_tiles();
155154
156155   konamigx_mixer_init(*m_screen, 0);
157156
r32566r32567
184183{
185184   m_gametype = 1;
186185
187   mystwarr_decode_tiles(machine());
186   decode_tiles();
188187
189188   konamigx_mixer_init(*m_screen, 0);
190189
r32566r32567
206205{
207206   m_gametype = 0;
208207
209   mystwarr_decode_tiles(machine());
208   decode_tiles();
210209
211210   konamigx_mixer_init(*m_screen, 0);
212211
r32566r32567
222221{
223222   m_gametype = 0;
224223
225   mystwarr_decode_tiles(machine());
224   decode_tiles();
226225
227226   konamigx_mixer_init(*m_screen, 0);
228227
r32566r32567
237236{
238237   m_gametype = 0;
239238
240   mystwarr_decode_tiles(machine());
239   decode_tiles();
241240
242241   konamigx_mixer_init(*m_screen, 0);
243242
r32566r32567
251250{
252251   m_gametype = 0;
253252
254   mystwarr_decode_tiles(machine());
253   decode_tiles();
255254
256255   konamigx_mixer_init(*m_screen, 0);
257256
trunk/src/mame/video/madmotor.c
r32566r32567
2828
2929   m_tilegen3->deco_bac06_pf_draw(bitmap,cliprect,TILEMAP_DRAW_OPAQUE, 0x00, 0x00, 0x00, 0x00);
3030   m_tilegen2->deco_bac06_pf_draw(bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00);
31   m_spritegen->draw_sprites(machine(), bitmap, cliprect, m_spriteram, 0x00, 0x00, 0x0f);
31   m_spritegen->draw_sprites(bitmap, cliprect, m_spriteram, 0x00, 0x00, 0x0f);
3232   m_tilegen1->deco_bac06_pf_draw(bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00);
3333   return 0;
3434}
trunk/src/mame/video/taitojc.c
r32566r32567
480480   }
481481}
482482
483void taitojc_renderer::render_polygons(running_machine &machine, UINT16 *polygon_fifo, int length)
483void taitojc_renderer::render_polygons(UINT16 *polygon_fifo, int length)
484484{
485//  taitojc_state *state = machine.driver_data<taitojc_state>();
486   const rectangle visarea = machine.first_screen()->visible_area();
485   const rectangle visarea = machine().first_screen()->visible_area();
487486   vertex_t vert[4];
488487   int i;
489488   int ptr;
trunk/src/mame/video/vsystem_spr.c
r32566r32567
221221}
222222
223223
224void vsystem_spr_device::common_sprite_drawgfx( running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect, bitmap_ind8 &priority_bitmap)
224void vsystem_spr_device::common_sprite_drawgfx(bitmap_ind16 &bitmap, const rectangle &cliprect, bitmap_ind8 &priority_bitmap)
225225{
226226   gfx_element *gfx = m_gfxdecode->gfx(m_gfx_region);
227227   int priority_mask = 0x00;
r32566r32567
329329         if (prihack_mask != -1)
330330         {
331331            if ((curr_sprite.pri & prihack_mask) == prihack_val)
332               common_sprite_drawgfx(screen.machine(), bitmap, cliprect, screen.priority());
332               common_sprite_drawgfx(bitmap, cliprect, screen.priority());
333333         }
334334         else
335335         {
336            common_sprite_drawgfx(screen.machine(), bitmap, cliprect, screen.priority());
336            common_sprite_drawgfx(bitmap, cliprect, screen.priority());
337337         }
338338      }
339339
trunk/src/mame/video/midyunit.c
r32566r32567
244244 *
245245 *************************************/
246246
247static void dma_draw(running_machine &machine, UINT16 command)
247void midyunit_state::dma_draw(UINT16 command)
248248{
249   midyunit_state *state = machine.driver_data<midyunit_state>();
250   struct dma_state_t &dma_state = state->m_dma_state;
249   struct dma_state_t &dma_state = m_dma_state;
251250   int dx = (command & 0x10) ? -1 : 1;
252251   int height = dma_state.height;
253252   int width = dma_state.width;
254   UINT8 *base = state->m_gfx_rom;
253   UINT8 *base = m_gfx_rom;
255254   UINT32 offset = dma_state.offset >> 3;
256255   UINT16 pal = dma_state.palette;
257256   UINT16 color = pal | dma_state.color;
r32566r32567
273272      offset += dma_state.rowbytes;
274273
275274      /* determine destination pointer */
276      dest = &state->m_local_videoram[ty * 512];
275      dest = &m_local_videoram[ty * 512];
277276
278277      /* check for overruns if they are relevant */
279278      if (o >= 0x06000000 && command < 0x0c)
r32566r32567
524523      gfxoffset += 0x02000000;
525524   {
526525      dma_state.offset = gfxoffset - 0x02000000;
527      dma_draw(machine(), command);
526      dma_draw(command);
528527   }
529528
530529   /* signal we're done */
trunk/src/mame/video/vsystem_spr.h
r32566r32567
6464   } curr_sprite;
6565
6666   void get_sprite_attributes(UINT16* ram);
67   void common_sprite_drawgfx(running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect, bitmap_ind8 &priority_bitmap);
67   void common_sprite_drawgfx(bitmap_ind16 &bitmap, const rectangle &cliprect, bitmap_ind8 &priority_bitmap);
6868
6969   void draw_sprites(  UINT16* spriteram, int spriteram_bytes, screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int prihack_mask = -1, int prihack_val = -1 );
7070   void set_pal_base(int pal_base);
trunk/src/mame/video/deckarn.c
r32566r32567
3838{
3939}
4040
41void deco_karnovsprites_device::draw_sprites( running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect, UINT16* spriteram, int size, int priority )
41void deco_karnovsprites_device::draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect, UINT16* spriteram, int size, int priority )
4242{
4343   int offs;
4444
r32566r32567
8181      y = (y + 16) % 0x200;
8282      x = 256 - x;
8383      y = 256 - y;
84      if (machine.driver_data()->flip_screen())
84      if (machine().driver_data()->flip_screen())
8585      {
8686         y = 240 - y;
8787         x = 240 - x;
trunk/src/mame/video/deckarn.h
r32566r32567
55public:
66   deco_karnovsprites_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
77   void set_gfxregion(int region) { m_gfxregion = region; };
8   void draw_sprites( running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect, UINT16* spriteram, int size, int priority );
8   void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect, UINT16* spriteram, int size, int priority );
99
1010   // static configuration
1111   static void static_set_gfxdecode_tag(device_t &device, const char *tag);
trunk/src/mame/video/galpani2.c
r32566r32567
184184                        cliprect,0x4000 + 0);
185185   }
186186
187   if (layers_ctrl & 0x8) m_kaneko_spr->kaneko16_render_sprites(machine(), bitmap, cliprect, screen.priority(), m_spriteram, m_spriteram.bytes());
187   if (layers_ctrl & 0x8) m_kaneko_spr->kaneko16_render_sprites(bitmap, cliprect, screen.priority(), m_spriteram, m_spriteram.bytes());
188188   return 0;
189189}
trunk/src/mame/video/dec0.c
r32566r32567
2424   flip_screen_set(m_tilegen1->get_flip_state());
2525
2626   m_tilegen3->deco_bac06_pf_draw(bitmap,cliprect,TILEMAP_DRAW_OPAQUE, 0x00, 0x00, 0x00, 0x00);
27   m_spritegen->draw_sprites(machine(), bitmap, cliprect, m_buffered_spriteram, 0x08, 0x08, 0x0f);
27   m_spritegen->draw_sprites(bitmap, cliprect, m_buffered_spriteram, 0x08, 0x08, 0x0f);
2828   m_tilegen2->deco_bac06_pf_draw(bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00);
2929
3030   /* HB always keeps pf2 on top of pf3, no need explicitly support priority register */
3131
32   m_spritegen->draw_sprites(machine(), bitmap, cliprect, m_buffered_spriteram, 0x08, 0x00, 0x0f);
32   m_spritegen->draw_sprites(bitmap, cliprect, m_buffered_spriteram, 0x08, 0x00, 0x0f);
3333   m_tilegen1->deco_bac06_pf_draw(bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00);
3434   return 0;
3535}
r32566r32567
4949      if (m_pri & 2)
5050         m_tilegen2->deco_bac06_pf_draw(bitmap,cliprect,0,0x08,0x08,0x08,0x08); // upper 8 pens of upper 8 priority marked tiles /* Foreground pens only */
5151
52      m_spritegen->draw_sprites(machine(), bitmap, cliprect, m_buffered_spriteram, 0x00, 0x00, 0x0f);
52      m_spritegen->draw_sprites(bitmap, cliprect, m_buffered_spriteram, 0x00, 0x00, 0x0f);
5353
5454      if (m_pri & 4)
5555         m_tilegen3->deco_bac06_pf_draw(bitmap,cliprect,0,0x08,0x08,0x08,0x08); // upper 8 pens of upper 8 priority marked tiles /* Foreground pens only */
r32566r32567
6262      if (m_pri & 2)
6363         m_tilegen3->deco_bac06_pf_draw(bitmap,cliprect,0,0x08,0x08,0x08,0x08); // upper 8 pens of upper 8 priority marked tiles /* Foreground pens only */
6464
65      m_spritegen->draw_sprites(machine(), bitmap, cliprect, m_buffered_spriteram, 0x00, 0x00, 0x0f);
65      m_spritegen->draw_sprites(bitmap, cliprect, m_buffered_spriteram, 0x00, 0x00, 0x0f);
6666
6767      if (m_pri & 4)
6868         m_tilegen2->deco_bac06_pf_draw(bitmap,cliprect,0,0x08,0x08,0x08,0x08); // upper 8 pens of upper 8 priority marked tiles /* Foreground pens only */
r32566r32567
9494      m_tilegen2->deco_bac06_pf_draw(bitmap,cliprect,TILEMAP_DRAW_OPAQUE, 0x00, 0x00, 0x00, 0x00);
9595
9696      if (m_pri & 0x02)
97         m_spritegen->draw_sprites(machine(), bitmap, cliprect, m_buffered_spriteram, 0x08, trans, 0x0f);
97         m_spritegen->draw_sprites(bitmap, cliprect, m_buffered_spriteram, 0x08, trans, 0x0f);
9898
9999      m_tilegen3->deco_bac06_pf_draw(bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00);
100100   }
r32566r32567
103103      m_tilegen3->deco_bac06_pf_draw(bitmap,cliprect,TILEMAP_DRAW_OPAQUE, 0x00, 0x00, 0x00, 0x00);
104104
105105      if (m_pri & 0x02)
106         m_spritegen->draw_sprites(machine(), bitmap, cliprect, m_buffered_spriteram, 0x08, trans, 0x0f);
106         m_spritegen->draw_sprites(bitmap, cliprect, m_buffered_spriteram, 0x08, trans, 0x0f);
107107
108108      m_tilegen2->deco_bac06_pf_draw(bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00);
109109   }
110110
111111   if (m_pri & 0x02)
112      m_spritegen->draw_sprites(machine(), bitmap, cliprect, m_buffered_spriteram, 0x08, trans^0x08, 0x0f);
112      m_spritegen->draw_sprites(bitmap, cliprect, m_buffered_spriteram, 0x08, trans^0x08, 0x0f);
113113   else
114      m_spritegen->draw_sprites(machine(), bitmap, cliprect, m_buffered_spriteram, 0x00, 0x00, 0x0f);
114      m_spritegen->draw_sprites(bitmap, cliprect, m_buffered_spriteram, 0x00, 0x00, 0x0f);
115115
116116   m_tilegen1->deco_bac06_pf_draw(bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00);
117117   return 0;
r32566r32567
164164      m_tilegen2->deco_bac06_pf_draw(bitmap,cliprect,TILEMAP_DRAW_OPAQUE, 0x00, 0x00, 0x00, 0x00);
165165
166166      if (m_pri & 0x02)
167         m_spritegen->draw_sprites(machine(), bitmap, cliprect, m_buffered_spriteram, 0x08, trans, 0x0f);
167         m_spritegen->draw_sprites(bitmap, cliprect, m_buffered_spriteram, 0x08, trans, 0x0f);
168168
169169      m_tilegen3->deco_bac06_pf_draw(bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00);
170170   }
r32566r32567
173173      m_tilegen3->deco_bac06_pf_draw(bitmap,cliprect,TILEMAP_DRAW_OPAQUE, 0x00, 0x00, 0x00, 0x00);
174174
175175      if (m_pri & 0x02)
176         m_spritegen->draw_sprites(machine(), bitmap, cliprect, m_buffered_spriteram, 0x08, trans, 0x0f);
176         m_spritegen->draw_sprites(bitmap, cliprect, m_buffered_spriteram, 0x08, trans, 0x0f);
177177
178178      m_tilegen2->deco_bac06_pf_draw(bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00);
179179   }
180180
181181   if (m_pri & 0x02)
182      m_spritegen->draw_sprites_bootleg(machine(), bitmap, cliprect, m_buffered_spriteram, 0x08, trans^0x08, 0x0f);
182      m_spritegen->draw_sprites_bootleg(bitmap, cliprect, m_buffered_spriteram, 0x08, trans^0x08, 0x0f);
183183   else
184      m_spritegen->draw_sprites_bootleg(machine(), bitmap, cliprect, m_buffered_spriteram, 0x00, 0x00, 0x0f);
184      m_spritegen->draw_sprites_bootleg(bitmap, cliprect, m_buffered_spriteram, 0x00, 0x00, 0x0f);
185185
186186   m_tilegen1->deco_bac06_pf_draw(bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00);
187187   return 0;
r32566r32567
223223   m_tilegen3->deco_bac06_pf_draw(bitmap,cliprect,TILEMAP_DRAW_OPAQUE, 0x00, 0x00, 0x00, 0x00);
224224   m_tilegen2->deco_bac06_pf_draw(bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00);
225225
226   m_spritegen->draw_sprites_bootleg(machine(), bitmap, cliprect, m_buffered_spriteram, 0x00, 0x00, 0x0f);
226   m_spritegen->draw_sprites_bootleg(bitmap, cliprect, m_buffered_spriteram, 0x00, 0x00, 0x0f);
227227
228228   /* Redraw top 8 pens of top 8 palettes over sprites */
229229   if (m_pri&0x80)
r32566r32567
244244   the palette does show through. */
245245   bitmap.fill(m_palette->pen(768), cliprect);
246246   m_tilegen2->deco_bac06_pf_draw(bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00);
247   m_spritegen->draw_sprites(machine(), bitmap, cliprect, m_buffered_spriteram, 0x00, 0x00, 0x0f);
247   m_spritegen->draw_sprites(bitmap, cliprect, m_buffered_spriteram, 0x00, 0x00, 0x0f);
248248   m_tilegen1->deco_bac06_pf_draw(bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00);
249249   return 0;
250250}
r32566r32567
266266      m_tilegen2->deco_bac06_pf_draw(bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00);
267267   }
268268
269   m_spritegen->draw_sprites(machine(), bitmap, cliprect, m_buffered_spriteram, 0x00, 0x00, 0x0f);
269   m_spritegen->draw_sprites(bitmap, cliprect, m_buffered_spriteram, 0x00, 0x00, 0x0f);
270270   m_tilegen1->deco_bac06_pf_draw(bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00);
271271   return 0;
272272}
r32566r32567
280280   m_tilegen3->deco_bac06_pf_draw(bitmap,cliprect,TILEMAP_DRAW_OPAQUE, 0x00, 0x00, 0x00, 0x00);
281281   m_tilegen2->deco_bac06_pf_draw(bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00);
282282
283   m_spritegen->draw_sprites(machine(), bitmap, cliprect, m_buffered_spriteram, 0x00, 0x00, 0x0f);
283   m_spritegen->draw_sprites(bitmap, cliprect, m_buffered_spriteram, 0x00, 0x00, 0x0f);
284284
285285   /* Redraw top 8 pens of top 8 palettes over sprites */
286286   if (m_pri&0x80)
r32566r32567
307307      m_tilegen2->deco_bac06_pf_draw(bitmap,cliprect,TILEMAP_DRAW_OPAQUE, 0x00, 0x00, 0x00, 0x00);
308308
309309      if (m_pri & 0x02)
310         m_spritegen->draw_sprites(machine(), bitmap, cliprect, m_buffered_spriteram, 0x08, trans, 0x0f);
310         m_spritegen->draw_sprites(bitmap, cliprect, m_buffered_spriteram, 0x08, trans, 0x0f);
311311
312312      m_tilegen3->deco_bac06_pf_draw(bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00);
313313   }
r32566r32567
316316      m_tilegen3->deco_bac06_pf_draw(bitmap,cliprect,TILEMAP_DRAW_OPAQUE, 0x00, 0x00, 0x00, 0x00);
317317
318318      if (m_pri & 0x02)
319         m_spritegen->draw_sprites(machine(), bitmap, cliprect, m_buffered_spriteram, 0x08, trans, 0x0f);
319         m_spritegen->draw_sprites(bitmap, cliprect, m_buffered_spriteram, 0x08, trans, 0x0f);
320320
321321      m_tilegen2->deco_bac06_pf_draw(bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00);
322322   }
323323
324324   if (m_pri & 0x02)
325      m_spritegen->draw_sprites(machine(), bitmap, cliprect, m_buffered_spriteram, 0x08, trans ^ 0x08, 0x0f);
325      m_spritegen->draw_sprites(bitmap, cliprect, m_buffered_spriteram, 0x08, trans ^ 0x08, 0x0f);
326326   else
327      m_spritegen->draw_sprites(machine(), bitmap, cliprect, m_buffered_spriteram, 0x00, 0x00, 0x0f);
327      m_spritegen->draw_sprites(bitmap, cliprect, m_buffered_spriteram, 0x00, 0x00, 0x0f);
328328
329329   m_tilegen1->deco_bac06_pf_draw(bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00);
330330   return 0;
trunk/src/mame/video/kaneko16.c
r32566r32567
8787   if (!m_disp_enable) return 0;
8888
8989   screen_update_common(screen, bitmap, cliprect);
90   m_kaneko_spr->kaneko16_render_sprites(machine(),bitmap,cliprect, screen.priority(), m_spriteram, m_spriteram.bytes());
90   m_kaneko_spr->kaneko16_render_sprites(bitmap,cliprect, screen.priority(), m_spriteram, m_spriteram.bytes());
9191   return 0;
9292}
9393
r32566r32567
248248   if (!m_disp_enable) return 0;
249249
250250   screen_update_common(screen, bitmap, cliprect);
251   m_kaneko_spr->kaneko16_render_sprites(machine(),bitmap,cliprect, screen.priority(), m_spriteram, m_spriteram.bytes()/2);
251   m_kaneko_spr->kaneko16_render_sprites(bitmap,cliprect, screen.priority(), m_spriteram, m_spriteram.bytes()/2);
252252   return 0;
253253}
trunk/src/mame/drivers/taitojc.c
r32566r32567
897897   if (offset == 0)
898898   {
899899      taitojc_clear_frame();
900      m_renderer->render_polygons(machine(), m_polygon_fifo, m_polygon_fifo_ptr);
900      m_renderer->render_polygons(m_polygon_fifo, m_polygon_fifo_ptr);
901901
902902      m_polygon_fifo_ptr = 0;
903903   }
trunk/src/mame/drivers/expro02.c
r32566r32567
253253      m_view2_0->render_tilemap_chip(screen,bitmap,cliprect,i);
254254   }
255255
256   m_kaneko_spr->kaneko16_render_sprites(machine(),bitmap,cliprect, screen.priority(), m_spriteram, m_spriteram.bytes());
256   m_kaneko_spr->kaneko16_render_sprites(bitmap,cliprect, screen.priority(), m_spriteram, m_spriteram.bytes());
257257   return 0;
258258}
259259
trunk/src/emu/video/tms34061.c
r32566r32567
6161   /* allocate memory for VRAM */
6262   m_vram = auto_alloc_array_clear(machine(), UINT8, m_vramsize + 256 * 2);
6363   /* not really a save state, just there for debugging purposes */
64   machine().save().save_pointer(NAME(m_vram), m_vramsize);
64   save_pointer(NAME(m_vram), m_vramsize);
6565
6666   /* allocate memory for latch RAM */
6767   m_latchram = auto_alloc_array_clear(machine(), UINT8, m_vramsize + 256 * 2);

Previous 199869 Revisions Next


© 1997-2024 The MAME Team