Previous 199869 Revisions Next

r20823 Friday 8th February, 2013 at 08:01:38 UTC by Miodrag Milanović
Modernization of drivers part 5 (no whatsnew)
[src/mame/drivers]fgoal.c firetrk.c fromanc2.c
[src/mame/includes]f1gp.h fantland.h fastfred.h fastlane.h fgoal.h firetrap.h firetrk.h fitfight.h flower.h flstory.h freekick.h fromanc2.h fromance.h funkybee.h funybubl.h fuukifg2.h fuukifg3.h
[src/mame/video]f1gp.c fantland.c fastfred.c fastlane.c firetrap.c firetrk.c fitfight.c flower.c flstory.c freekick.c fromanc2.c fromance.c funkybee.c funybubl.c fuukifg2.c fuukifg3.c

trunk/src/mame/drivers/fromanc2.c
r20822r20823
9494{
9595   if (ACCESSING_BITS_0_7)
9696   {
97      fromancr_gfxbank_w(machine(), data & 0xfff8);
97      fromancr_gfxbank_w(data & 0xfff8);
9898      ioport("EEPROMOUT")->write(data, 0xff);
9999   }
100100}
trunk/src/mame/drivers/firetrk.c
r20822r20823
1616
1717
1818
19static void set_service_mode(running_machine &machine, int enable)
19void firetrk_state::set_service_mode(int enable)
2020{
21   firetrk_state *state = machine.driver_data<firetrk_state>();
22   state->m_in_service_mode = enable;
21//OBRISI.ME
22   m_in_service_mode = enable;
2323
2424   /* watchdog is disabled during service mode */
25   machine.watchdog_enable(!enable);
25   machine().watchdog_enable(!enable);
2626
2727   /* change CPU clock speed according to service switch change */
28   machine.device("maincpu")->set_unscaled_clock(enable ? (MASTER_CLOCK/12) : (MASTER_CLOCK/16));
28   machine().device("maincpu")->set_unscaled_clock(enable ? (MASTER_CLOCK/12) : (MASTER_CLOCK/16));
2929}
3030
3131
3232INPUT_CHANGED_MEMBER(firetrk_state::service_mode_switch_changed)
3333{
34   set_service_mode(machine(), newval);
34   set_service_mode(newval);
3535}
3636
3737
r20822r20823
164164
165165void firetrk_state::machine_reset()
166166{
167   set_service_mode(machine(), 0);
167   set_service_mode(0);
168168
169169   machine().scheduler().synchronize(timer_expired_delegate(FUNC(firetrk_state::periodic_callback),this));
170170}
trunk/src/mame/drivers/fgoal.c
r20822r20823
2222#include "includes/fgoal.h"
2323
2424
25static int intensity(int bits)
25int fgoal_state::intensity(int bits)
2626{
2727   int v = 0;
2828
r20822r20823
9090}
9191
9292
93static unsigned video_ram_address( running_machine &machine )
93unsigned fgoal_state::video_ram_address(  )
9494{
95   fgoal_state *state = machine.driver_data<fgoal_state>();
96   return 0x4000 | (state->m_row << 5) | (state->m_col >> 3);
95//OBRISI.ME
96   return 0x4000 | (m_row << 5) | (m_col >> 3);
9797}
9898
9999
r20822r20823
146146
147147READ8_MEMBER(fgoal_state::fgoal_address_hi_r)
148148{
149   return video_ram_address(machine()) >> 8;
149   return video_ram_address() >> 8;
150150}
151151
152152READ8_MEMBER(fgoal_state::fgoal_address_lo_r)
153153{
154   return video_ram_address(machine()) & 0xff;
154   return video_ram_address() & 0xff;
155155}
156156
157157READ8_MEMBER(fgoal_state::fgoal_shifter_r)
trunk/src/mame/video/fitfight.c
r20822r20823
44#include "includes/fitfight.h"
55
66
7static void draw_sprites( running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect, int layer )
7void fitfight_state::draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect, int layer )
88{
9   fitfight_state *state = machine.driver_data<fitfight_state>();
10   gfx_element *gfx = machine.gfx[3];
11   UINT16 *source = state->m_spriteram;
9//OBRISI.ME
10   gfx_element *gfx = machine().gfx[3];
11   UINT16 *source = m_spriteram;
1212   UINT16 *finish = source + 0x800 / 2;
1313
1414   while (source < finish)
r20822r20823
2323      prio = (source[1] & 0x0400) >> 10;
2424      colr = (source[1] & 0x00fc) >> 2;
2525
26      if (state->m_bbprot_kludge == 1)
26      if (m_bbprot_kludge == 1)
2727         colr = (source[1] & 0x00f8) >> 3;
2828
2929      end = source[0] & 0x8000;
r20822r20823
130130      m_fof_bak_tilemap->set_scrolly(0, m_fof_a00000[0] & 0xff);
131131      m_fof_bak_tilemap->draw(bitmap, cliprect, 0, 0);
132132
133      draw_sprites(machine(), bitmap, cliprect, 0);
133      draw_sprites(bitmap, cliprect, 0);
134134
135135//      if (machine().input().code_pressed(KEYCODE_A))
136136//          scrollmid = ((m_fof_900000[0] & 0xff00) >> 5) - ((m_fof_700000[0] & 0x01c0) >> 6);
r20822r20823
147147//      if (!machine().input().code_pressed(KEYCODE_F))
148148      m_fof_mid_tilemap->draw(bitmap, cliprect, 0, 0);
149149
150      draw_sprites(machine(), bitmap, cliprect, 1);
150      draw_sprites(bitmap, cliprect, 1);
151151
152152      m_fof_txt_tilemap->draw(bitmap, cliprect, 0, 0);
153153   }
trunk/src/mame/video/fastfred.c
r20822r20823
230230 *
231231 *************************************/
232232
233static void draw_sprites(running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect)
233void fastfred_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect)
234234{
235235   const rectangle spritevisiblearea(2*8, 32*8-1, 2*8, 30*8-1);
236236   const rectangle spritevisibleareaflipx(0*8, 30*8-1, 2*8, 30*8-1);
237   fastfred_state *state = machine.driver_data<fastfred_state>();
237//OBRISI.ME
238238   int offs;
239239
240   for (offs = state->m_spriteram.bytes() - 4; offs >= 0; offs -= 4)
240   for (offs = m_spriteram.bytes() - 4; offs >= 0; offs -= 4)
241241   {
242242      UINT8 code,sx,sy;
243243      int flipx,flipy;
244244
245      sx = state->m_spriteram[offs + 3];
246      sy = 240 - state->m_spriteram[offs];
245      sx = m_spriteram[offs + 3];
246      sy = 240 - m_spriteram[offs];
247247
248      if (state->m_hardware_type == 3)
248      if (m_hardware_type == 3)
249249      {
250250         // Imago
251         code  = (state->m_spriteram[offs + 1]) & 0x3f;
251         code  = (m_spriteram[offs + 1]) & 0x3f;
252252         flipx = 0;
253253         flipy = 0;
254254      }
255      else if (state->m_hardware_type == 2)
255      else if (m_hardware_type == 2)
256256      {
257257         // Boggy 84
258         code  =  state->m_spriteram[offs + 1] & 0x7f;
258         code  =  m_spriteram[offs + 1] & 0x7f;
259259         flipx =  0;
260         flipy =  state->m_spriteram[offs + 1] & 0x80;
260         flipy =  m_spriteram[offs + 1] & 0x80;
261261      }
262      else if (state->m_hardware_type == 1)
262      else if (m_hardware_type == 1)
263263      {
264264         // Fly-Boy/Fast Freddie/Red Robin
265         code  =  state->m_spriteram[offs + 1] & 0x7f;
265         code  =  m_spriteram[offs + 1] & 0x7f;
266266         flipx =  0;
267         flipy = ~state->m_spriteram[offs + 1] & 0x80;
267         flipy = ~m_spriteram[offs + 1] & 0x80;
268268      }
269269      else
270270      {
271271         // Jump Coaster
272         code  = (state->m_spriteram[offs + 1] & 0x3f) | 0x40;
273         flipx = ~state->m_spriteram[offs + 1] & 0x40;
274         flipy =  state->m_spriteram[offs + 1] & 0x80;
272         code  = (m_spriteram[offs + 1] & 0x3f) | 0x40;
273         flipx = ~m_spriteram[offs + 1] & 0x40;
274         flipy =  m_spriteram[offs + 1] & 0x80;
275275      }
276276
277277
278      if (state->flip_screen_x())
278      if (flip_screen_x())
279279      {
280280         sx = 240 - sx;
281281         flipx = !flipx;
282282      }
283      if (state->flip_screen_y())
283      if (flip_screen_y())
284284      {
285285         sy = 240 - sy;
286286         flipy = !flipy;
287287      }
288288
289      drawgfx_transpen(bitmap,state->flip_screen_x() ? spritevisibleareaflipx : spritevisiblearea,machine.gfx[1],
289      drawgfx_transpen(bitmap,flip_screen_x() ? spritevisibleareaflipx : spritevisiblearea,machine().gfx[1],
290290            code,
291            state->m_colorbank | (state->m_spriteram[offs + 2] & 0x07),
291            m_colorbank | (m_spriteram[offs + 2] & 0x07),
292292            flipx,flipy,
293293            sx,sy,0);
294294   }
r20822r20823
299299{
300300   bitmap.fill(*m_background_color, cliprect);
301301   m_bg_tilemap->draw(bitmap, cliprect, 0,0);
302   draw_sprites(machine(), bitmap, cliprect);
302   draw_sprites(bitmap, cliprect);
303303
304304   return 0;
305305}
r20822r20823
366366   m_web_tilemap->draw(bitmap, cliprect, 0,0);
367367   galaxold_draw_stars(machine(), bitmap, cliprect);
368368   m_bg_tilemap->draw(bitmap, cliprect, 0,0);
369   draw_sprites(machine(), bitmap, cliprect);
369   draw_sprites(bitmap, cliprect);
370370   m_fg_tilemap->draw(bitmap, cliprect, 0,0);
371371
372372   return 0;
trunk/src/mame/video/f1gp.c
r20822r20823
246246***************************************************************************/
247247
248248// BOOTLEG
249static void f1gpb_draw_sprites( running_machine &machine, bitmap_ind16 &bitmap,const rectangle &cliprect )
249void f1gp_state::f1gpb_draw_sprites( bitmap_ind16 &bitmap,const rectangle &cliprect )
250250{
251   f1gp_state *state = machine.driver_data<f1gp_state>();
252   UINT16 *spriteram = state->m_spriteram;
253   int attr_start, start_offset = state->m_spriteram.bytes() / 2 - 4;
251//OBRISI.ME
252   UINT16 *spriteram = m_spriteram;
253   int attr_start, start_offset = m_spriteram.bytes() / 2 - 4;
254254
255255   // find the "end of list" to draw the sprites in reverse order
256   for (attr_start = 4; attr_start < state->m_spriteram.bytes() / 2; attr_start += 4)
256   for (attr_start = 4; attr_start < m_spriteram.bytes() / 2; attr_start += 4)
257257   {
258258      if (spriteram[attr_start + 3 - 4] == 0xffff) /* end of list marker */
259259      {
r20822r20823
278278      if((spriteram[attr_start + 1] & 0x00f0) && (spriteram[attr_start + 1] & 0x00f0) != 0xc0)
279279      {
280280         printf("attr %X\n",spriteram[attr_start + 1] & 0x00f0);
281         code = machine.rand();
281         code = machine().rand();
282282      }
283283
284284/*
r20822r20823
295295         gfx = 0;
296296      }
297297
298      pdrawgfx_transpen(bitmap,cliprect,machine.gfx[1 + gfx],
298      pdrawgfx_transpen(bitmap,cliprect,machine().gfx[1 + gfx],
299299         code,
300300         color,
301301         flipx,flipy,
302302         x,y,
303         machine.priority_bitmap,
303         machine().priority_bitmap,
304304         pri ? 0 : 0x2,15);
305305
306306      // wrap around x
307      pdrawgfx_transpen(bitmap,cliprect,machine.gfx[1 + gfx],
307      pdrawgfx_transpen(bitmap,cliprect,machine().gfx[1 + gfx],
308308         code,
309309         color,
310310         flipx,flipy,
311311         x - 512,y,
312         machine.priority_bitmap,
312         machine().priority_bitmap,
313313         pri ? 0 : 0x2,15);
314314   }
315315}
r20822r20823
337337
338338   m_fg_tilemap->draw(bitmap, cliprect, 0, 1);
339339
340   f1gpb_draw_sprites(machine(), bitmap, cliprect);
340   f1gpb_draw_sprites(bitmap, cliprect);
341341
342342   return 0;
343343}
trunk/src/mame/video/funkybee.c
r20822r20823
9090   m_bg_tilemap = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(funkybee_state::get_bg_tile_info),this), tilemap_mapper_delegate(FUNC(funkybee_state::funkybee_tilemap_scan),this), 8, 8, 32, 32);
9191}
9292
93static void draw_sprites( running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect )
93void funkybee_state::draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect )
9494{
95   funkybee_state *state = machine.driver_data<funkybee_state>();
95//OBRISI.ME
9696   int offs;
9797
9898   for (offs = 0x0f; offs >= 0; offs--)
9999   {
100100      int offs2 = offs + 0x1e00;
101      int attr = state->m_videoram[offs2];
101      int attr = m_videoram[offs2];
102102      int code = (attr >> 2) | ((attr & 2) << 5);
103      int color = state->m_colorram[offs2 + 0x10];
103      int color = m_colorram[offs2 + 0x10];
104104      int flipx = 0;
105105      int flipy = attr & 0x01;
106      int sx = state->m_videoram[offs2 + 0x10];
107      int sy = 224 - state->m_colorram[offs2];
106      int sx = m_videoram[offs2 + 0x10];
107      int sy = 224 - m_colorram[offs2];
108108
109      if (state->flip_screen())
109      if (flip_screen())
110110      {
111111         sy += 32;
112112         flipx = !flipx;
113113      }
114114
115      drawgfx_transpen(bitmap,cliprect, machine.gfx[2 + state->m_gfx_bank],
115      drawgfx_transpen(bitmap,cliprect, machine().gfx[2 + m_gfx_bank],
116116         code, color,
117117         flipx, flipy,
118118         sx, sy, 0);
119119   }
120120}
121121
122static void draw_columns( running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect )
122void funkybee_state::draw_columns( bitmap_ind16 &bitmap, const rectangle &cliprect )
123123{
124   funkybee_state *state = machine.driver_data<funkybee_state>();
124//OBRISI.ME
125125   int offs;
126126
127127   for (offs = 0x1f; offs >= 0; offs--)
128128   {
129      int const flip = state->flip_screen();
130      int code = state->m_videoram[0x1c00 + offs];
131      int color = state->m_colorram[0x1f10] & 0x03;
132      int sx = flip ? state->m_videoram[0x1f1f] : state->m_videoram[0x1f10];
129      int const flip = flip_screen();
130      int code = m_videoram[0x1c00 + offs];
131      int color = m_colorram[0x1f10] & 0x03;
132      int sx = flip ? m_videoram[0x1f1f] : m_videoram[0x1f10];
133133      int sy = offs * 8;
134134
135135      if (flip)
136136         sy = 248 - sy;
137137
138      drawgfx_transpen(bitmap,cliprect,machine.gfx[state->m_gfx_bank],
138      drawgfx_transpen(bitmap,cliprect,machine().gfx[m_gfx_bank],
139139            code, color,
140140            flip, flip,
141141            sx, sy,0);
142142
143      code = state->m_videoram[0x1d00 + offs];
144      color = state->m_colorram[0x1f11] & 0x03;
145      sx = flip ? state->m_videoram[0x1f1e] : state->m_videoram[0x1f11];
143      code = m_videoram[0x1d00 + offs];
144      color = m_colorram[0x1f11] & 0x03;
145      sx = flip ? m_videoram[0x1f1e] : m_videoram[0x1f11];
146146      sy = offs * 8;
147147
148148      if (flip)
149149         sy = 248 - sy;
150150
151      drawgfx_transpen(bitmap,cliprect,machine.gfx[state->m_gfx_bank],
151      drawgfx_transpen(bitmap,cliprect,machine().gfx[m_gfx_bank],
152152            code, color,
153153            flip, flip,
154154            sx, sy,0);
r20822r20823
158158UINT32 funkybee_state::screen_update_funkybee(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
159159{
160160   m_bg_tilemap->draw(bitmap, cliprect, 0, 0);
161   draw_sprites(machine(), bitmap, cliprect);
162   draw_columns(machine(), bitmap, cliprect);
161   draw_sprites(bitmap, cliprect);
162   draw_columns(bitmap, cliprect);
163163   return 0;
164164}
trunk/src/mame/video/freekick.c
r20822r20823
2626   m_freek_tilemap->mark_tile_dirty(offset & 0x3ff);
2727}
2828
29static void gigas_draw_sprites( running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect )
29void freekick_state::gigas_draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect )
3030{
31   freekick_state *state = machine.driver_data<freekick_state>();
31//OBRISI.ME
3232   int offs;
3333
34   for (offs = 0; offs < state->m_spriteram.bytes(); offs += 4)
34   for (offs = 0; offs < m_spriteram.bytes(); offs += 4)
3535   {
36      int xpos = state->m_spriteram[offs + 3];
37      int ypos = state->m_spriteram[offs + 2];
38      int code = state->m_spriteram[offs + 0] | ((state->m_spriteram[offs + 1] & 0x20) << 3);
36      int xpos = m_spriteram[offs + 3];
37      int ypos = m_spriteram[offs + 2];
38      int code = m_spriteram[offs + 0] | ((m_spriteram[offs + 1] & 0x20) << 3);
3939
4040      int flipx = 0;
4141      int flipy = 0;
42      int color = state->m_spriteram[offs + 1] & 0x1f;
42      int color = m_spriteram[offs + 1] & 0x1f;
4343
44      if (state->flip_screen_x())
44      if (flip_screen_x())
4545      {
4646         xpos = 240 - xpos;
4747         flipx = !flipx;
4848      }
49      if (state->flip_screen_y())
49      if (flip_screen_y())
5050      {
5151         ypos = 256 - ypos;
5252         flipy = !flipy;
5353      }
5454
55      drawgfx_transpen(bitmap,cliprect,machine.gfx[1],
55      drawgfx_transpen(bitmap,cliprect,machine().gfx[1],
5656            code,
5757            color,
5858            flipx,flipy,
r20822r20823
6161}
6262
6363
64static void pbillrd_draw_sprites( running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect )
64void freekick_state::pbillrd_draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect )
6565{
66   freekick_state *state = machine.driver_data<freekick_state>();
66//OBRISI.ME
6767   int offs;
6868
69   for (offs = 0; offs < state->m_spriteram.bytes(); offs += 4)
69   for (offs = 0; offs < m_spriteram.bytes(); offs += 4)
7070   {
71      int xpos = state->m_spriteram[offs + 3];
72      int ypos = state->m_spriteram[offs + 2];
73      int code = state->m_spriteram[offs + 0];
71      int xpos = m_spriteram[offs + 3];
72      int ypos = m_spriteram[offs + 2];
73      int code = m_spriteram[offs + 0];
7474
75      int flipx = 0;//state->m_spriteram[offs + 0] & 0x80; //?? unused ?
76      int flipy = 0;//state->m_spriteram[offs + 0] & 0x40;
77      int color = state->m_spriteram[offs + 1] & 0x0f;
75      int flipx = 0;//m_spriteram[offs + 0] & 0x80; //?? unused ?
76      int flipy = 0;//m_spriteram[offs + 0] & 0x40;
77      int color = m_spriteram[offs + 1] & 0x0f;
7878
79      if (state->flip_screen_x())
79      if (flip_screen_x())
8080      {
8181         xpos = 240 - xpos;
8282         flipx = !flipx;
8383      }
84      if (state->flip_screen_y())
84      if (flip_screen_y())
8585      {
8686         ypos = 256 - ypos;
8787         flipy = !flipy;
8888      }
8989
90      drawgfx_transpen(bitmap,cliprect,machine.gfx[1],
90      drawgfx_transpen(bitmap,cliprect,machine().gfx[1],
9191            code,
9292            color,
9393            flipx,flipy,
r20822r20823
9797
9898
9999
100static void freekick_draw_sprites( running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect )
100void freekick_state::freekick_draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect )
101101{
102   freekick_state *state = machine.driver_data<freekick_state>();
102//OBRISI.ME
103103   int offs;
104104
105   for (offs = 0; offs < state->m_spriteram.bytes(); offs += 4)
105   for (offs = 0; offs < m_spriteram.bytes(); offs += 4)
106106   {
107      int xpos = state->m_spriteram[offs + 3];
108      int ypos = state->m_spriteram[offs + 0];
109      int code = state->m_spriteram[offs + 1] + ((state->m_spriteram[offs + 2] & 0x20) << 3);
107      int xpos = m_spriteram[offs + 3];
108      int ypos = m_spriteram[offs + 0];
109      int code = m_spriteram[offs + 1] + ((m_spriteram[offs + 2] & 0x20) << 3);
110110
111      int flipx = state->m_spriteram[offs + 2] & 0x80;    //?? unused ?
112      int flipy = state->m_spriteram[offs + 2] & 0x40;
113      int color = state->m_spriteram[offs + 2] & 0x1f;
111      int flipx = m_spriteram[offs + 2] & 0x80;    //?? unused ?
112      int flipy = m_spriteram[offs + 2] & 0x40;
113      int color = m_spriteram[offs + 2] & 0x1f;
114114
115      if (state->flip_screen_x())
115      if (flip_screen_x())
116116      {
117117         xpos = 240 - xpos;
118118         flipx = !flipx;
119119      }
120      if (state->flip_screen_y())
120      if (flip_screen_y())
121121      {
122122         ypos = 256 - ypos;
123123         flipy = !flipy;
124124      }
125125
126      drawgfx_transpen(bitmap,cliprect,machine.gfx[1],
126      drawgfx_transpen(bitmap,cliprect,machine().gfx[1],
127127            code,
128128            color,
129129            flipx,flipy,
r20822r20823
134134UINT32 freekick_state::screen_update_gigas(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
135135{
136136   m_freek_tilemap->draw(bitmap, cliprect, 0, 0);
137   gigas_draw_sprites(machine(), bitmap, cliprect);
137   gigas_draw_sprites(bitmap, cliprect);
138138   return 0;
139139}
140140
141141UINT32 freekick_state::screen_update_pbillrd(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
142142{
143143   m_freek_tilemap->draw(bitmap, cliprect, 0, 0);
144   pbillrd_draw_sprites(machine(), bitmap, cliprect);
144   pbillrd_draw_sprites(bitmap, cliprect);
145145   return 0;
146146}
147147
148148UINT32 freekick_state::screen_update_freekick(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
149149{
150150   m_freek_tilemap->draw(bitmap, cliprect, 0, 0);
151   freekick_draw_sprites(machine(), bitmap, cliprect);
151   freekick_draw_sprites(bitmap, cliprect);
152152   return 0;
153153}
trunk/src/mame/video/firetrk.c
r20822r20823
5656}
5757
5858
59static void prom_to_palette(running_machine &machine, int number, UINT8 val)
59void firetrk_state::prom_to_palette(int number, UINT8 val)
6060{
61   palette_set_color(machine, number, MAKE_RGB(pal1bit(val >> 2), pal1bit(val >> 1), pal1bit(val >> 0)));
61   palette_set_color(machine(), number, MAKE_RGB(pal1bit(val >> 2), pal1bit(val >> 1), pal1bit(val >> 0)));
6262}
6363
6464
r20822r20823
111111      else if (color == 2)
112112         m_color2_mask |= 1 << i;
113113
114      prom_to_palette(machine(), i, color_prom[0x100 + colortable_source[i]]);
114      prom_to_palette(i, color_prom[0x100 + colortable_source[i]]);
115115   }
116116
117117   palette_set_color(machine(), ARRAY_LENGTH(colortable_source) + 0, RGB_BLACK);
r20822r20823
245245}
246246
247247
248static void firetrk_draw_car(running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect, gfx_element **gfx, int which, int flash)
248void firetrk_state::firetrk_draw_car(bitmap_ind16 &bitmap, const rectangle &cliprect, gfx_element **gfx, int which, int flash)
249249{
250   firetrk_state *state = machine.driver_data<firetrk_state>();
250//OBRISI.ME
251251   int gfx_bank, code, color, flip_x, flip_y, x, y;
252252
253253   if (which)
254254   {
255255      gfx_bank = 5;
256      code = *state->m_drone_rot & 0x07;
256      code = *m_drone_rot & 0x07;
257257      color = flash ? 1 : 0;
258      flip_x = *state->m_drone_rot & 0x08;
259      flip_y = *state->m_drone_rot & 0x10;
260      x = (flip_x ? *state->m_drone_x - 63 : 192 - *state->m_drone_x) + 36;
261      y =  flip_y ? *state->m_drone_y - 63 : 192 - *state->m_drone_y;
258      flip_x = *m_drone_rot & 0x08;
259      flip_y = *m_drone_rot & 0x10;
260      x = (flip_x ? *m_drone_x - 63 : 192 - *m_drone_x) + 36;
261      y =  flip_y ? *m_drone_y - 63 : 192 - *m_drone_y;
262262   }
263263   else
264264   {
265      gfx_bank = (*state->m_car_rot & 0x10) ? 4 : 3;
266      code = *state->m_car_rot & 0x03;
265      gfx_bank = (*m_car_rot & 0x10) ? 4 : 3;
266      code = *m_car_rot & 0x03;
267267      color = flash ? 1 : 0;
268      flip_x = *state->m_car_rot & 0x04;
269      flip_y = *state->m_car_rot & 0x08;
268      flip_x = *m_car_rot & 0x04;
269      flip_y = *m_car_rot & 0x08;
270270      x = 144;
271271      y = 104;
272272   }
r20822r20823
275275}
276276
277277
278static void superbug_draw_car(running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect, gfx_element **gfx, int flash)
278void firetrk_state::superbug_draw_car(bitmap_ind16 &bitmap, const rectangle &cliprect, gfx_element **gfx, int flash)
279279{
280   firetrk_state *state = machine.driver_data<firetrk_state>();
281   int gfx_bank = (*state->m_car_rot & 0x10) ? 4 : 3;
282   int code = ~*state->m_car_rot & 0x03;
280//OBRISI.ME
281   int gfx_bank = (*m_car_rot & 0x10) ? 4 : 3;
282   int code = ~*m_car_rot & 0x03;
283283   int color = flash ? 1 : 0;
284   int flip_x = *state->m_car_rot & 0x04;
285   int flip_y = *state->m_car_rot & 0x08;
284   int flip_x = *m_car_rot & 0x04;
285   int flip_y = *m_car_rot & 0x08;
286286
287287   drawgfx_transpen(bitmap, cliprect, gfx[gfx_bank], code, color, flip_x, flip_y, 144, 104, 0);
288288}
289289
290290
291static void montecar_draw_car(running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect, gfx_element **gfx, int which, int is_collision_detection)
291void firetrk_state::montecar_draw_car(bitmap_ind16 &bitmap, const rectangle &cliprect, gfx_element **gfx, int which, int is_collision_detection)
292292{
293   firetrk_state *state = machine.driver_data<firetrk_state>();
293//OBRISI.ME
294294   int gfx_bank, code, color, flip_x, flip_y, x, y;
295295
296296   if (which)
297297   {
298298      gfx_bank = 4;
299      code = *state->m_drone_rot & 0x07;
300      color = is_collision_detection ? 0 : (((*state->m_car_rot & 0x80) >> 6) | ((*state->m_drone_rot & 0x80) >> 7));
301      flip_x = *state->m_drone_rot & 0x10;
302      flip_y = *state->m_drone_rot & 0x08;
303      x = (flip_x ? *state->m_drone_x - 31 : 224 - *state->m_drone_x) + 34;
304      y =  flip_y ? *state->m_drone_y - 31 : 224 - *state->m_drone_y;
299      code = *m_drone_rot & 0x07;
300      color = is_collision_detection ? 0 : (((*m_car_rot & 0x80) >> 6) | ((*m_drone_rot & 0x80) >> 7));
301      flip_x = *m_drone_rot & 0x10;
302      flip_y = *m_drone_rot & 0x08;
303      x = (flip_x ? *m_drone_x - 31 : 224 - *m_drone_x) + 34;
304      y =  flip_y ? *m_drone_y - 31 : 224 - *m_drone_y;
305305   }
306306   else
307307   {
308308      gfx_bank = 3;
309      code = *state->m_car_rot & 0x07;
309      code = *m_car_rot & 0x07;
310310      color = 0;
311      flip_x = *state->m_car_rot & 0x10;
312      flip_y = *state->m_car_rot & 0x08;
311      flip_x = *m_car_rot & 0x10;
312      flip_y = *m_car_rot & 0x08;
313313      x = 144;
314314      y = 104;
315315   }
r20822r20823
328328}
329329
330330
331static void check_collision(firetrk_state *state, int which)
331void firetrk_state::check_collision(firetrk_state *state, int which)
332332{
333333   int y, x;
334334
335335   for (y = playfield_window.min_y; y <= playfield_window.max_y; y++)
336336      for (x = playfield_window.min_x; x <= playfield_window.max_x; x++)
337337      {
338         pen_t a = state->m_helper1.pix16(y, x);
339         pen_t b = state->m_helper2.pix16(y, x);
338         pen_t a = m_helper1.pix16(y, x);
339         pen_t b = m_helper2.pix16(y, x);
340340
341         if (b != 0xff && (state->m_color1_mask >> a) & 1)
342            state->m_crash[which] = 1;
341         if (b != 0xff && (m_color1_mask >> a) & 1)
342            m_crash[which] = 1;
343343
344         if (b != 0xff && (state->m_color2_mask >> a) & 1)
345            state->m_skid[which] = 1;
344         if (b != 0xff && (m_color2_mask >> a) & 1)
345            m_skid[which] = 1;
346346      }
347347}
348348
r20822r20823
357357
358358   bitmap.fill(0, cliprect);
359359   m_tilemap1->draw(bitmap, playfield_window, 0, 0);
360   firetrk_draw_car(machine(), bitmap, playfield_window, machine().gfx, 0, m_flash);
361   firetrk_draw_car(machine(), bitmap, playfield_window, machine().gfx, 1, m_flash);
360   firetrk_draw_car(bitmap, playfield_window, machine().gfx, 0, m_flash);
361   firetrk_draw_car(bitmap, playfield_window, machine().gfx, 1, m_flash);
362362   draw_text(bitmap, cliprect, machine().gfx, m_alpha_num_ram + 0x00, 296, 0x10, 0x10);
363363   draw_text(bitmap, cliprect, machine().gfx, m_alpha_num_ram + 0x10,   8, 0x10, 0x10);
364364
r20822r20823
367367      m_tilemap2->draw(m_helper1, playfield_window, 0, 0);
368368
369369      m_helper2.fill(0xff, playfield_window);
370      firetrk_draw_car(machine(), m_helper2, playfield_window, machine().gfx, 0, FALSE);
370      firetrk_draw_car(m_helper2, playfield_window, machine().gfx, 0, FALSE);
371371      check_collision(this, 0);
372372
373373      m_helper2.fill(0xff, playfield_window);
374      firetrk_draw_car(machine(), m_helper2, playfield_window, machine().gfx, 1, FALSE);
374      firetrk_draw_car(m_helper2, playfield_window, machine().gfx, 1, FALSE);
375375      check_collision(this, 1);
376376
377377      *m_blink = FALSE;
r20822r20823
391391
392392   bitmap.fill(0, cliprect);
393393   m_tilemap1->draw(bitmap, playfield_window, 0, 0);
394   superbug_draw_car(machine(), bitmap, playfield_window, machine().gfx, m_flash);
394   superbug_draw_car(bitmap, playfield_window, machine().gfx, m_flash);
395395   draw_text(bitmap, cliprect, machine().gfx, m_alpha_num_ram + 0x00, 296, 0x10, 0x10);
396396   draw_text(bitmap, cliprect, machine().gfx, m_alpha_num_ram + 0x10,   8, 0x10, 0x10);
397397
r20822r20823
400400      m_tilemap2->draw(m_helper1, playfield_window, 0, 0);
401401
402402      m_helper2.fill(0xff, playfield_window);
403      superbug_draw_car(machine(), m_helper2, playfield_window, machine().gfx, FALSE);
403      superbug_draw_car(m_helper2, playfield_window, machine().gfx, FALSE);
404404      check_collision(this, 0);
405405
406406      *m_blink = FALSE;
r20822r20823
420420
421421   bitmap.fill(0x2c, cliprect);
422422   m_tilemap1->draw(bitmap, playfield_window, 0, 0);
423   montecar_draw_car(machine(), bitmap, playfield_window, machine().gfx, 0, FALSE);
424   montecar_draw_car(machine(), bitmap, playfield_window, machine().gfx, 1, FALSE);
423   montecar_draw_car(bitmap, playfield_window, machine().gfx, 0, FALSE);
424   montecar_draw_car(bitmap, playfield_window, machine().gfx, 1, FALSE);
425425   draw_text(bitmap, cliprect, machine().gfx, m_alpha_num_ram + 0x00, 24, 0x20, 0x08);
426426   draw_text(bitmap, cliprect, machine().gfx, m_alpha_num_ram + 0x20, 16, 0x20, 0x08);
427427
r20822r20823
430430      m_tilemap2->draw(m_helper1, playfield_window, 0, 0);
431431
432432      m_helper2.fill(0xff, playfield_window);
433      montecar_draw_car(machine(), m_helper2, playfield_window, machine().gfx, 0, TRUE);
433      montecar_draw_car(m_helper2, playfield_window, machine().gfx, 0, TRUE);
434434      check_collision(this, 0);
435435
436436      m_helper2.fill(0xff, playfield_window);
437      montecar_draw_car(machine(), m_helper2, playfield_window, machine().gfx, 1, TRUE);
437      montecar_draw_car(m_helper2, playfield_window, machine().gfx, 1, TRUE);
438438      check_collision(this, 1);
439439   }
440440
trunk/src/mame/video/fromanc2.c
r20822r20823
1515
1616******************************************************************************/
1717
18INLINE void fromanc2_get_tile_info( running_machine &machine, tile_data &tileinfo, int tile_index, int vram, int layer )
18inline void fromanc2_state::fromanc2_get_tile_info( tile_data &tileinfo, int tile_index, int vram, int layer )
1919{
20   fromanc2_state *state = machine.driver_data<fromanc2_state>();
20//OBRISI.ME
2121   int tile, color;
2222
23   tile  = (state->m_videoram[vram][layer][tile_index] & 0x3fff) | (state->m_gfxbank[vram][layer] << 14);
24   color = ((state->m_videoram[vram][layer][tile_index] & 0xc000) >> 14) | (0x10 * vram);
23   tile  = (m_videoram[vram][layer][tile_index] & 0x3fff) | (m_gfxbank[vram][layer] << 14);
24   color = ((m_videoram[vram][layer][tile_index] & 0xc000) >> 14) | (0x10 * vram);
2525
26   SET_TILE_INFO(layer, tile, color, 0);
26   SET_TILE_INFO_MEMBER(layer, tile, color, 0);
2727}
2828
29TILE_GET_INFO_MEMBER(fromanc2_state::fromanc2_get_v0_l0_tile_info){ fromanc2_get_tile_info(machine(), tileinfo, tile_index, 0, 0); }
30TILE_GET_INFO_MEMBER(fromanc2_state::fromanc2_get_v0_l1_tile_info){ fromanc2_get_tile_info(machine(), tileinfo, tile_index, 0, 1); }
31TILE_GET_INFO_MEMBER(fromanc2_state::fromanc2_get_v0_l2_tile_info){ fromanc2_get_tile_info(machine(), tileinfo, tile_index, 0, 2); }
32TILE_GET_INFO_MEMBER(fromanc2_state::fromanc2_get_v0_l3_tile_info){ fromanc2_get_tile_info(machine(), tileinfo, tile_index, 0, 3); }
33TILE_GET_INFO_MEMBER(fromanc2_state::fromanc2_get_v1_l0_tile_info){ fromanc2_get_tile_info(machine(), tileinfo, tile_index, 1, 0); }
34TILE_GET_INFO_MEMBER(fromanc2_state::fromanc2_get_v1_l1_tile_info){ fromanc2_get_tile_info(machine(), tileinfo, tile_index, 1, 1); }
35TILE_GET_INFO_MEMBER(fromanc2_state::fromanc2_get_v1_l2_tile_info){ fromanc2_get_tile_info(machine(), tileinfo, tile_index, 1, 2); }
36TILE_GET_INFO_MEMBER(fromanc2_state::fromanc2_get_v1_l3_tile_info){ fromanc2_get_tile_info(machine(), tileinfo, tile_index, 1, 3); }
29TILE_GET_INFO_MEMBER(fromanc2_state::fromanc2_get_v0_l0_tile_info){ fromanc2_get_tile_info(tileinfo, tile_index, 0, 0); }
30TILE_GET_INFO_MEMBER(fromanc2_state::fromanc2_get_v0_l1_tile_info){ fromanc2_get_tile_info(tileinfo, tile_index, 0, 1); }
31TILE_GET_INFO_MEMBER(fromanc2_state::fromanc2_get_v0_l2_tile_info){ fromanc2_get_tile_info(tileinfo, tile_index, 0, 2); }
32TILE_GET_INFO_MEMBER(fromanc2_state::fromanc2_get_v0_l3_tile_info){ fromanc2_get_tile_info(tileinfo, tile_index, 0, 3); }
33TILE_GET_INFO_MEMBER(fromanc2_state::fromanc2_get_v1_l0_tile_info){ fromanc2_get_tile_info(tileinfo, tile_index, 1, 0); }
34TILE_GET_INFO_MEMBER(fromanc2_state::fromanc2_get_v1_l1_tile_info){ fromanc2_get_tile_info(tileinfo, tile_index, 1, 1); }
35TILE_GET_INFO_MEMBER(fromanc2_state::fromanc2_get_v1_l2_tile_info){ fromanc2_get_tile_info(tileinfo, tile_index, 1, 2); }
36TILE_GET_INFO_MEMBER(fromanc2_state::fromanc2_get_v1_l3_tile_info){ fromanc2_get_tile_info(tileinfo, tile_index, 1, 3); }
3737
3838
39INLINE void fromancr_get_tile_info( running_machine &machine, tile_data &tileinfo, int tile_index, int vram, int layer )
39inline void fromanc2_state::fromancr_get_tile_info( tile_data &tileinfo, int tile_index, int vram, int layer )
4040{
41   fromanc2_state *state = machine.driver_data<fromanc2_state>();
41//OBRISI.ME
4242   int tile, color;
4343
44   tile  = state->m_videoram[vram][layer][tile_index] | (state->m_gfxbank[vram][layer] << 16);
44   tile  = m_videoram[vram][layer][tile_index] | (m_gfxbank[vram][layer] << 16);
4545   color = vram;
4646
47   SET_TILE_INFO(layer, tile, color, 0);
47   SET_TILE_INFO_MEMBER(layer, tile, color, 0);
4848}
4949
50TILE_GET_INFO_MEMBER(fromanc2_state::fromancr_get_v0_l0_tile_info){ fromancr_get_tile_info(machine(), tileinfo, tile_index, 0, 0); }
51TILE_GET_INFO_MEMBER(fromanc2_state::fromancr_get_v0_l1_tile_info){ fromancr_get_tile_info(machine(), tileinfo, tile_index, 0, 1); }
52TILE_GET_INFO_MEMBER(fromanc2_state::fromancr_get_v0_l2_tile_info){ fromancr_get_tile_info(machine(), tileinfo, tile_index, 0, 2); }
53TILE_GET_INFO_MEMBER(fromanc2_state::fromancr_get_v1_l0_tile_info){ fromancr_get_tile_info(machine(), tileinfo, tile_index, 1, 0); }
54TILE_GET_INFO_MEMBER(fromanc2_state::fromancr_get_v1_l1_tile_info){ fromancr_get_tile_info(machine(), tileinfo, tile_index, 1, 1); }
55TILE_GET_INFO_MEMBER(fromanc2_state::fromancr_get_v1_l2_tile_info){ fromancr_get_tile_info(machine(), tileinfo, tile_index, 1, 2); }
50TILE_GET_INFO_MEMBER(fromanc2_state::fromancr_get_v0_l0_tile_info){ fromancr_get_tile_info(tileinfo, tile_index, 0, 0); }
51TILE_GET_INFO_MEMBER(fromanc2_state::fromancr_get_v0_l1_tile_info){ fromancr_get_tile_info(tileinfo, tile_index, 0, 1); }
52TILE_GET_INFO_MEMBER(fromanc2_state::fromancr_get_v0_l2_tile_info){ fromancr_get_tile_info(tileinfo, tile_index, 0, 2); }
53TILE_GET_INFO_MEMBER(fromanc2_state::fromancr_get_v1_l0_tile_info){ fromancr_get_tile_info(tileinfo, tile_index, 1, 0); }
54TILE_GET_INFO_MEMBER(fromanc2_state::fromancr_get_v1_l1_tile_info){ fromancr_get_tile_info(tileinfo, tile_index, 1, 1); }
55TILE_GET_INFO_MEMBER(fromanc2_state::fromancr_get_v1_l2_tile_info){ fromancr_get_tile_info(tileinfo, tile_index, 1, 2); }
5656
5757
5858/******************************************************************************
r20822r20823
160160}
161161
162162
163INLINE void fromanc2_dispvram_w( running_machine &machine, offs_t offset, UINT16 data, UINT16 mem_mask, int vram, int layer )
163inline void fromanc2_state::fromanc2_dispvram_w( offs_t offset, UINT16 data, UINT16 mem_mask, int vram, int layer )
164164{
165   fromanc2_state *state = machine.driver_data<fromanc2_state>();
165//OBRISI.ME
166166   layer += (offset < 0x1000) ? 0 : 1;
167167
168   COMBINE_DATA(&state->m_videoram[vram][layer][offset & 0x0fff]);
169   state->m_tilemap[vram][layer]->mark_tile_dirty(offset & 0x0fff);
168   COMBINE_DATA(&m_videoram[vram][layer][offset & 0x0fff]);
169   m_tilemap[vram][layer]->mark_tile_dirty(offset & 0x0fff);
170170}
171171
172WRITE16_MEMBER(fromanc2_state::fromanc2_videoram_0_w){ fromanc2_dispvram_w(machine(), offset, data, mem_mask, 0, 0); }
173WRITE16_MEMBER(fromanc2_state::fromanc2_videoram_1_w){ fromanc2_dispvram_w(machine(), offset, data, mem_mask, 0, 2); }
174WRITE16_MEMBER(fromanc2_state::fromanc2_videoram_2_w){ fromanc2_dispvram_w(machine(), offset, data, mem_mask, 1, 0); }
175WRITE16_MEMBER(fromanc2_state::fromanc2_videoram_3_w){ fromanc2_dispvram_w(machine(), offset, data, mem_mask, 1, 2); }
172WRITE16_MEMBER(fromanc2_state::fromanc2_videoram_0_w){ fromanc2_dispvram_w(offset, data, mem_mask, 0, 0); }
173WRITE16_MEMBER(fromanc2_state::fromanc2_videoram_1_w){ fromanc2_dispvram_w(offset, data, mem_mask, 0, 2); }
174WRITE16_MEMBER(fromanc2_state::fromanc2_videoram_2_w){ fromanc2_dispvram_w(offset, data, mem_mask, 1, 0); }
175WRITE16_MEMBER(fromanc2_state::fromanc2_videoram_3_w){ fromanc2_dispvram_w(offset, data, mem_mask, 1, 2); }
176176
177177WRITE16_MEMBER(fromanc2_state::fromanc2_gfxreg_0_w)
178178{
r20822r20823
251251}
252252
253253
254INLINE void fromancr_vram_w(running_machine &machine, offs_t offset, UINT16 data, UINT16 mem_mask, int layer )
254inline void fromanc2_state::fromancr_vram_w(offs_t offset, UINT16 data, UINT16 mem_mask, int layer )
255255{
256   fromanc2_state *state = machine.driver_data<fromanc2_state>();
256//OBRISI.ME
257257   int vram = (offset < 0x1000) ? 0 : 1;
258258
259   COMBINE_DATA(&state->m_videoram[vram][layer][offset & 0x0fff]);
260   state->m_tilemap[vram][layer]->mark_tile_dirty(offset & 0x0fff);
259   COMBINE_DATA(&m_videoram[vram][layer][offset & 0x0fff]);
260   m_tilemap[vram][layer]->mark_tile_dirty(offset & 0x0fff);
261261}
262262
263WRITE16_MEMBER(fromanc2_state::fromancr_videoram_0_w){ fromancr_vram_w(machine(), offset, data, mem_mask, 1); }
264WRITE16_MEMBER(fromanc2_state::fromancr_videoram_1_w){ fromancr_vram_w(machine(), offset, data, mem_mask, 0); }
265WRITE16_MEMBER(fromanc2_state::fromancr_videoram_2_w){ fromancr_vram_w(machine(), offset, data, mem_mask, 2); }
263WRITE16_MEMBER(fromanc2_state::fromancr_videoram_0_w){ fromancr_vram_w(offset, data, mem_mask, 1); }
264WRITE16_MEMBER(fromanc2_state::fromancr_videoram_1_w){ fromancr_vram_w(offset, data, mem_mask, 0); }
265WRITE16_MEMBER(fromanc2_state::fromancr_videoram_2_w){ fromancr_vram_w(offset, data, mem_mask, 2); }
266266
267267WRITE16_MEMBER(fromanc2_state::fromancr_gfxreg_0_w)
268268{
r20822r20823
290290   }
291291}
292292
293void fromancr_gfxbank_w( running_machine &machine, int data )
293void fromanc2_state::fromancr_gfxbank_w( int data )
294294{
295   fromanc2_state *state = machine.driver_data<fromanc2_state>();
295//OBRISI.ME
296296
297   state->m_gfxbank[0][0] = (data & 0x0010) >>  4; // BG (1P)
298   state->m_gfxbank[0][1] = (data & 0xf000) >> 12; // FG (1P)
299   state->m_gfxbank[1][0] = (data & 0x0008) >>  3; // BG (2P)
300   state->m_gfxbank[1][1] = (data & 0x0f00) >>  8; // FG (2P)
301   state->m_tilemap[0][0]->mark_all_dirty();
302   state->m_tilemap[0][1]->mark_all_dirty();
303   state->m_tilemap[1][0]->mark_all_dirty();
304   state->m_tilemap[1][1]->mark_all_dirty();
297   m_gfxbank[0][0] = (data & 0x0010) >>  4; // BG (1P)
298   m_gfxbank[0][1] = (data & 0xf000) >> 12; // FG (1P)
299   m_gfxbank[1][0] = (data & 0x0008) >>  3; // BG (2P)
300   m_gfxbank[1][1] = (data & 0x0f00) >>  8; // FG (2P)
301   m_tilemap[0][0]->mark_all_dirty();
302   m_tilemap[0][1]->mark_all_dirty();
303   m_tilemap[1][0]->mark_all_dirty();
304   m_tilemap[1][1]->mark_all_dirty();
305305}
306306
307307
308INLINE void fromanc4_vram_w( running_machine &machine, offs_t offset, UINT16 data, UINT16 mem_mask, int layer )
308inline void fromanc2_state::fromanc4_vram_w( offs_t offset, UINT16 data, UINT16 mem_mask, int layer )
309309{
310   fromanc2_state *state = machine.driver_data<fromanc2_state>();
310//OBRISI.ME
311311   int vram = (offset < 0x4000) ? 0 : 1;
312312
313   COMBINE_DATA(&state->m_videoram[vram][layer][offset & 0x3fff]);
314   state->m_tilemap[vram][layer]->mark_tile_dirty(offset & 0x3fff);
313   COMBINE_DATA(&m_videoram[vram][layer][offset & 0x3fff]);
314   m_tilemap[vram][layer]->mark_tile_dirty(offset & 0x3fff);
315315}
316316
317WRITE16_MEMBER(fromanc2_state::fromanc4_videoram_0_w){ fromanc4_vram_w(machine(), offset, data, mem_mask, 2); }
318WRITE16_MEMBER(fromanc2_state::fromanc4_videoram_1_w){ fromanc4_vram_w(machine(), offset, data, mem_mask, 1); }
319WRITE16_MEMBER(fromanc2_state::fromanc4_videoram_2_w){ fromanc4_vram_w(machine(), offset, data, mem_mask, 0); }
317WRITE16_MEMBER(fromanc2_state::fromanc4_videoram_0_w){ fromanc4_vram_w(offset, data, mem_mask, 2); }
318WRITE16_MEMBER(fromanc2_state::fromanc4_videoram_1_w){ fromanc4_vram_w(offset, data, mem_mask, 1); }
319WRITE16_MEMBER(fromanc2_state::fromanc4_videoram_2_w){ fromanc4_vram_w(offset, data, mem_mask, 0); }
320320
321321WRITE16_MEMBER(fromanc2_state::fromanc4_gfxreg_0_w)
322322{
trunk/src/mame/video/firetrap.c
r20822r20823
9595         0);
9696}
9797
98INLINE void get_bg_tile_info(running_machine &machine, tile_data &tileinfo, int tile_index, UINT8 *bgvideoram, int gfx_region)
98inline void firetrap_state::get_bg_tile_info(tile_data &tileinfo, int tile_index, UINT8 *bgvideoram, int gfx_region)
9999{
100100   int code = bgvideoram[tile_index];
101101   int color = bgvideoram[tile_index + 0x100];
102   SET_TILE_INFO(
102   SET_TILE_INFO_MEMBER(
103103         gfx_region,
104104         code + ((color & 0x03) << 8),
105105         (color & 0x30) >> 4,
r20822r20823
108108
109109TILE_GET_INFO_MEMBER(firetrap_state::get_bg1_tile_info)
110110{
111   get_bg_tile_info(machine(), tileinfo, tile_index, m_bg1videoram, 1);
111   get_bg_tile_info(tileinfo, tile_index, m_bg1videoram, 1);
112112}
113113
114114TILE_GET_INFO_MEMBER(firetrap_state::get_bg2_tile_info)
115115{
116   get_bg_tile_info(machine(), tileinfo, tile_index, m_bg2videoram, 2);
116   get_bg_tile_info(tileinfo, tile_index, m_bg2videoram, 2);
117117}
118118
119119
r20822r20823
190190
191191***************************************************************************/
192192
193static void draw_sprites( running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect )
193void firetrap_state::draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect )
194194{
195   firetrap_state *state = machine.driver_data<firetrap_state>();
195//OBRISI.ME
196196   int offs;
197197
198   for (offs = 0; offs < state->m_spriteram.bytes(); offs += 4)
198   for (offs = 0; offs < m_spriteram.bytes(); offs += 4)
199199   {
200200      int sx, sy, flipx, flipy, code, color;
201201
202202
203203      /* the meaning of bit 3 of [offs] is unknown */
204204
205      sy = state->m_spriteram[offs];
206      sx = state->m_spriteram[offs + 2];
207      code = state->m_spriteram[offs + 3] + 4 * (state->m_spriteram[offs + 1] & 0xc0);
208      color = ((state->m_spriteram[offs + 1] & 0x08) >> 2) | (state->m_spriteram[offs + 1] & 0x01);
209      flipx = state->m_spriteram[offs + 1] & 0x04;
210      flipy = state->m_spriteram[offs + 1] & 0x02;
211      if (state->flip_screen())
205      sy = m_spriteram[offs];
206      sx = m_spriteram[offs + 2];
207      code = m_spriteram[offs + 3] + 4 * (m_spriteram[offs + 1] & 0xc0);
208      color = ((m_spriteram[offs + 1] & 0x08) >> 2) | (m_spriteram[offs + 1] & 0x01);
209      flipx = m_spriteram[offs + 1] & 0x04;
210      flipy = m_spriteram[offs + 1] & 0x02;
211      if (flip_screen())
212212      {
213213         sx = 240 - sx;
214214         sy = 240 - sy;
r20822r20823
216216         flipy = !flipy;
217217      }
218218
219      if (state->m_spriteram[offs + 1] & 0x10)    /* double width */
219      if (m_spriteram[offs + 1] & 0x10)    /* double width */
220220      {
221         if (state->flip_screen()) sy -= 16;
221         if (flip_screen()) sy -= 16;
222222
223         drawgfx_transpen(bitmap,cliprect,machine.gfx[3],
223         drawgfx_transpen(bitmap,cliprect,machine().gfx[3],
224224               code & ~1,
225225               color,
226226               flipx,flipy,
227227               sx,flipy ? sy : sy + 16,0);
228         drawgfx_transpen(bitmap,cliprect,machine.gfx[3],
228         drawgfx_transpen(bitmap,cliprect,machine().gfx[3],
229229               code | 1,
230230               color,
231231               flipx,flipy,
232232               sx,flipy ? sy + 16 : sy,0);
233233
234234         /* redraw with wraparound */
235         drawgfx_transpen(bitmap,cliprect,machine.gfx[3],
235         drawgfx_transpen(bitmap,cliprect,machine().gfx[3],
236236               code & ~1,
237237               color,
238238               flipx,flipy,
239239               sx - 256,flipy ? sy : sy + 16,0);
240         drawgfx_transpen(bitmap,cliprect,machine.gfx[3],
240         drawgfx_transpen(bitmap,cliprect,machine().gfx[3],
241241               code | 1,
242242               color,
243243               flipx,flipy,
r20822r20823
245245      }
246246      else
247247      {
248         drawgfx_transpen(bitmap,cliprect,machine.gfx[3],
248         drawgfx_transpen(bitmap,cliprect,machine().gfx[3],
249249               code,
250250               color,
251251               flipx,flipy,
252252               sx,sy,0);
253253
254254         /* redraw with wraparound */
255         drawgfx_transpen(bitmap,cliprect,machine.gfx[3],
255         drawgfx_transpen(bitmap,cliprect,machine().gfx[3],
256256               code,
257257               color,
258258               flipx,flipy,
r20822r20823
265265{
266266   m_bg2_tilemap->draw(bitmap, cliprect, 0, 0);
267267   m_bg1_tilemap->draw(bitmap, cliprect, 0, 0);
268   draw_sprites(machine(), bitmap, cliprect);
268   draw_sprites(bitmap, cliprect);
269269   m_fg_tilemap->draw(bitmap, cliprect, 0, 0);
270270   return 0;
271271}
trunk/src/mame/video/fantland.c
r20822r20823
6161#include "emu.h"
6262#include "includes/fantland.h"
6363
64static void draw_sprites(running_machine &machine, bitmap_ind16 &bitmap,const rectangle &cliprect)
64void fantland_state::draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect)
6565{
66   fantland_state *state = machine.driver_data<fantland_state>();
67   UINT8 *spriteram_2 = state->m_spriteram2;
68   UINT8   *indx_ram   =   state->m_spriteram + 0x2000,    // this ram contains indexes into offs_ram
69         *offs_ram   =   state->m_spriteram + 0x2400,    // this ram contains x,y offsets or indexes into spriteram_2
70         *ram        =   state->m_spriteram,         // current sprite pointer in spriteram
66//OBRISI.ME
67   UINT8 *spriteram_2 = m_spriteram2;
68   UINT8   *indx_ram   =   m_spriteram + 0x2000,    // this ram contains indexes into offs_ram
69         *offs_ram   =   m_spriteram + 0x2400,    // this ram contains x,y offsets or indexes into spriteram_2
70         *ram        =   m_spriteram,         // current sprite pointer in spriteram
7171         *ram2       =   indx_ram;           // current sprite pointer in indx_ram
7272
7373   // wheelrun is the only game with a smaller visible area
74   const rectangle &visarea = machine.primary_screen->visible_area();
74   const rectangle &visarea = machine().primary_screen->visible_area();
7575   int special = (visarea.max_y - visarea.min_y + 1) < 0x100;
7676
7777   for ( ; ram < indx_ram; ram += 8,ram2++)
r20822r20823
135135
136136      if (x >= 0x180)     x -= 0x200;
137137
138      drawgfx_transpen(bitmap,cliprect,machine.gfx[0], code,color, flipx,flipy, x,y,0);
138      drawgfx_transpen(bitmap,cliprect,machine().gfx[0], code,color, flipx,flipy, x,y,0);
139139   }
140140}
141141
142142UINT32 fantland_state::screen_update_fantland(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
143143{
144144   bitmap.fill(0, cliprect);
145   draw_sprites(machine(),bitmap,cliprect);
145   draw_sprites(bitmap,cliprect);
146146
147147   return 0;
148148}
trunk/src/mame/video/fromance.c
r20822r20823
1919 *
2020 *************************************/
2121
22INLINE void get_fromance_tile_info( running_machine &machine, tile_data &tileinfo, int tile_index, int layer )
22inline void fromance_state::get_fromance_tile_info( tile_data &tileinfo, int tile_index, int layer )
2323{
24   fromance_state *state = machine.driver_data<fromance_state>();
25   int tile = ((state->m_local_videoram[layer][0x0000 + tile_index] & 0x80) << 9) |
26            (state->m_local_videoram[layer][0x1000 + tile_index] << 8) |
27            state->m_local_videoram[layer][0x2000 + tile_index];
28   int color = state->m_local_videoram[layer][tile_index] & 0x7f;
24//OBRISI.ME
25   int tile = ((m_local_videoram[layer][0x0000 + tile_index] & 0x80) << 9) |
26            (m_local_videoram[layer][0x1000 + tile_index] << 8) |
27            m_local_videoram[layer][0x2000 + tile_index];
28   int color = m_local_videoram[layer][tile_index] & 0x7f;
2929
30   SET_TILE_INFO(layer, tile, color, 0);
30   SET_TILE_INFO_MEMBER(layer, tile, color, 0);
3131}
3232
33TILE_GET_INFO_MEMBER(fromance_state::get_fromance_bg_tile_info){ get_fromance_tile_info(machine(), tileinfo, tile_index, 0); }
34TILE_GET_INFO_MEMBER(fromance_state::get_fromance_fg_tile_info){ get_fromance_tile_info(machine(), tileinfo, tile_index, 1); }
33TILE_GET_INFO_MEMBER(fromance_state::get_fromance_bg_tile_info){ get_fromance_tile_info(tileinfo, tile_index, 0); }
34TILE_GET_INFO_MEMBER(fromance_state::get_fromance_fg_tile_info){ get_fromance_tile_info(tileinfo, tile_index, 1); }
3535
3636
37INLINE void get_nekkyoku_tile_info( running_machine &machine, tile_data &tileinfo, int tile_index, int layer )
37inline void fromance_state::get_nekkyoku_tile_info( tile_data &tileinfo, int tile_index, int layer )
3838{
39   fromance_state *state = machine.driver_data<fromance_state>();
40   int tile = (state->m_local_videoram[layer][0x0000 + tile_index] << 8) |
41            state->m_local_videoram[layer][0x1000 + tile_index];
42   int color = state->m_local_videoram[layer][tile_index + 0x2000] & 0x3f;
39//OBRISI.ME
40   int tile = (m_local_videoram[layer][0x0000 + tile_index] << 8) |
41            m_local_videoram[layer][0x1000 + tile_index];
42   int color = m_local_videoram[layer][tile_index + 0x2000] & 0x3f;
4343
44   SET_TILE_INFO(layer, tile, color, 0);
44   SET_TILE_INFO_MEMBER(layer, tile, color, 0);
4545}
4646
47TILE_GET_INFO_MEMBER(fromance_state::get_nekkyoku_bg_tile_info){ get_nekkyoku_tile_info(machine(), tileinfo, tile_index, 0); }
48TILE_GET_INFO_MEMBER(fromance_state::get_nekkyoku_fg_tile_info){ get_nekkyoku_tile_info(machine(), tileinfo, tile_index, 1); }
47TILE_GET_INFO_MEMBER(fromance_state::get_nekkyoku_bg_tile_info){ get_nekkyoku_tile_info(tileinfo, tile_index, 0); }
48TILE_GET_INFO_MEMBER(fromance_state::get_nekkyoku_fg_tile_info){ get_nekkyoku_tile_info(tileinfo, tile_index, 1); }
4949
5050
5151
r20822r20823
5555 *
5656 *************************************/
5757
58static void init_common( running_machine &machine )
58void fromance_state::init_common(  )
5959{
60   fromance_state *state = machine.driver_data<fromance_state>();
60//OBRISI.ME
6161
6262   /* allocate local videoram */
63   state->m_local_videoram[0] = auto_alloc_array(machine, UINT8, 0x1000 * 3);
64   state->m_local_videoram[1] = auto_alloc_array(machine, UINT8, 0x1000 * 3);
63   m_local_videoram[0] = auto_alloc_array(machine(), UINT8, 0x1000 * 3);
64   m_local_videoram[1] = auto_alloc_array(machine(), UINT8, 0x1000 * 3);
6565
6666   /* allocate local palette RAM */
67   state->m_local_paletteram = auto_alloc_array(machine, UINT8, 0x800 * 2);
67   m_local_paletteram = auto_alloc_array(machine(), UINT8, 0x800 * 2);
6868
6969   /* configure tilemaps */
70   state->m_fg_tilemap->set_transparent_pen(15);
70   m_fg_tilemap->set_transparent_pen(15);
7171
7272   /* reset the timer */
73   state->m_crtc_timer = machine.scheduler().timer_alloc(timer_expired_delegate(FUNC(fromance_state::crtc_interrupt_gen),state));
73   m_crtc_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(fromance_state::crtc_interrupt_gen),this));
7474
7575   /* state save */
76   state->save_item(NAME(state->m_selected_videoram));
77   state->save_pointer(NAME(state->m_local_videoram[0]), 0x1000 * 3);
78   state->save_pointer(NAME(state->m_local_videoram[1]), 0x1000 * 3);
79   state->save_item(NAME(state->m_selected_paletteram));
80   state->save_item(NAME(state->m_scrollx));
81   state->save_item(NAME(state->m_scrolly));
82   state->save_item(NAME(state->m_gfxreg));
83   state->save_item(NAME(state->m_flipscreen));
84   state->save_item(NAME(state->m_flipscreen_old));
85   state->save_item(NAME(state->m_scrollx_ofs));
86   state->save_item(NAME(state->m_scrolly_ofs));
87   state->save_item(NAME(state->m_crtc_register));
88   state->save_item(NAME(state->m_crtc_data));
89   state->save_pointer(NAME(state->m_local_paletteram), 0x800 * 2);
76   save_item(NAME(m_selected_videoram));
77   save_pointer(NAME(m_local_videoram[0]), 0x1000 * 3);
78   save_pointer(NAME(m_local_videoram[1]), 0x1000 * 3);
79   save_item(NAME(m_selected_paletteram));
80   save_item(NAME(m_scrollx));
81   save_item(NAME(m_scrolly));
82   save_item(NAME(m_gfxreg));
83   save_item(NAME(m_flipscreen));
84   save_item(NAME(m_flipscreen_old));
85   save_item(NAME(m_scrollx_ofs));
86   save_item(NAME(m_scrolly_ofs));
87   save_item(NAME(m_crtc_register));
88   save_item(NAME(m_crtc_data));
89   save_pointer(NAME(m_local_paletteram), 0x800 * 2);
9090}
9191
9292VIDEO_START_MEMBER(fromance_state,fromance)
r20822r20823
9595   m_bg_tilemap = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(fromance_state::get_fromance_bg_tile_info),this), TILEMAP_SCAN_ROWS, 8, 4, 64, 64);
9696   m_fg_tilemap = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(fromance_state::get_fromance_fg_tile_info),this), TILEMAP_SCAN_ROWS, 8, 4, 64, 64);
9797
98   init_common(machine());
98   init_common();
9999}
100100
101101VIDEO_START_MEMBER(fromance_state,nekkyoku)
r20822r20823
104104   m_bg_tilemap = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(fromance_state::get_nekkyoku_bg_tile_info),this), TILEMAP_SCAN_ROWS, 8, 4, 64, 64);
105105   m_fg_tilemap = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(fromance_state::get_nekkyoku_fg_tile_info),this), TILEMAP_SCAN_ROWS, 8, 4, 64, 64);
106106
107   init_common(machine());
107   init_common();
108108}
109109
110110VIDEO_START_MEMBER(fromance_state,pipedrm)
trunk/src/mame/video/fastlane.c
r20822r20823
2424}
2525
2626
27static void set_pens( running_machine &machine )
27void fastlane_state::set_pens(  )
2828{
29   fastlane_state *state = machine.driver_data<fastlane_state>();
29//OBRISI.ME
3030   int i;
3131
3232   for (i = 0x00; i < 0x800; i += 2)
3333   {
34      UINT16 data = state->m_paletteram[i | 1] | (state->m_paletteram[i] << 8);
34      UINT16 data = m_paletteram[i | 1] | (m_paletteram[i] << 8);
3535
3636      rgb_t color = MAKE_RGB(pal5bit(data >> 0), pal5bit(data >> 5), pal5bit(data >> 10));
3737
38      colortable_palette_set_color(machine.colortable, i >> 1, color);
38      colortable_palette_set_color(machine().colortable, i >> 1, color);
3939   }
4040}
4141
r20822r20823
158158   finalclip0 &= cliprect;
159159   finalclip1 &= cliprect;
160160
161   set_pens(machine());
161   set_pens();
162162
163163   /* set scroll registers */
164164   address_space &space = machine().driver_data()->generic_space();
trunk/src/mame/video/fuukifg2.c
r20822r20823
4444
4545***************************************************************************/
4646
47INLINE void get_tile_info(running_machine &machine, tile_data &tileinfo, tilemap_memory_index tile_index, int _N_)
47inline void fuuki16_state::get_tile_info(tile_data &tileinfo, tilemap_memory_index tile_index, int _N_)
4848{
49   fuuki16_state *state = machine.driver_data<fuuki16_state>();
50   UINT16 code = state->m_vram[_N_][2 * tile_index + 0];
51   UINT16 attr = state->m_vram[_N_][2 * tile_index + 1];
52   SET_TILE_INFO(1 + _N_, code, attr & 0x3f, TILE_FLIPYX((attr >> 6) & 3));
49//OBRISI.ME
50   UINT16 code = m_vram[_N_][2 * tile_index + 0];
51   UINT16 attr = m_vram[_N_][2 * tile_index + 1];
52   SET_TILE_INFO_MEMBER(1 + _N_, code, attr & 0x3f, TILE_FLIPYX((attr >> 6) & 3));
5353}
5454
55TILE_GET_INFO_MEMBER(fuuki16_state::get_tile_info_0){ get_tile_info(machine(), tileinfo, tile_index, 0); }
56TILE_GET_INFO_MEMBER(fuuki16_state::get_tile_info_1){ get_tile_info(machine(), tileinfo, tile_index, 1); }
57TILE_GET_INFO_MEMBER(fuuki16_state::get_tile_info_2){ get_tile_info(machine(), tileinfo, tile_index, 2); }
58TILE_GET_INFO_MEMBER(fuuki16_state::get_tile_info_3){ get_tile_info(machine(), tileinfo, tile_index, 3); }
55TILE_GET_INFO_MEMBER(fuuki16_state::get_tile_info_0){ get_tile_info(tileinfo, tile_index, 0); }
56TILE_GET_INFO_MEMBER(fuuki16_state::get_tile_info_1){ get_tile_info(tileinfo, tile_index, 1); }
57TILE_GET_INFO_MEMBER(fuuki16_state::get_tile_info_2){ get_tile_info(tileinfo, tile_index, 2); }
58TILE_GET_INFO_MEMBER(fuuki16_state::get_tile_info_3){ get_tile_info(tileinfo, tile_index, 3); }
5959
60INLINE void fuuki16_vram_w(address_space &space, offs_t offset, UINT16 data, UINT16 mem_mask, int _N_)
60inline void fuuki16_state::fuuki16_vram_w(offs_t offset, UINT16 data, UINT16 mem_mask, int _N_)
6161{
62   fuuki16_state *state = space.machine().driver_data<fuuki16_state>();
63   COMBINE_DATA(&state->m_vram[_N_][offset]);
64   state->m_tilemap[_N_]->mark_tile_dirty(offset / 2);
62   COMBINE_DATA(&m_vram[_N_][offset]);
63   m_tilemap[_N_]->mark_tile_dirty(offset / 2);
6564}
6665
67WRITE16_MEMBER(fuuki16_state::fuuki16_vram_0_w){ fuuki16_vram_w(space, offset, data, mem_mask, 0); }
68WRITE16_MEMBER(fuuki16_state::fuuki16_vram_1_w){ fuuki16_vram_w(space, offset, data, mem_mask, 1); }
69WRITE16_MEMBER(fuuki16_state::fuuki16_vram_2_w){ fuuki16_vram_w(space, offset, data, mem_mask, 2); }
70WRITE16_MEMBER(fuuki16_state::fuuki16_vram_3_w){ fuuki16_vram_w(space, offset, data, mem_mask, 3); }
66WRITE16_MEMBER(fuuki16_state::fuuki16_vram_0_w){ fuuki16_vram_w(offset, data, mem_mask, 0); }
67WRITE16_MEMBER(fuuki16_state::fuuki16_vram_1_w){ fuuki16_vram_w(offset, data, mem_mask, 1); }
68WRITE16_MEMBER(fuuki16_state::fuuki16_vram_2_w){ fuuki16_vram_w(offset, data, mem_mask, 2); }
69WRITE16_MEMBER(fuuki16_state::fuuki16_vram_3_w){ fuuki16_vram_w(offset, data, mem_mask, 3); }
7170
7271
7372/***************************************************************************
r20822r20823
135134
136135***************************************************************************/
137136
138static void draw_sprites( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect )
137void fuuki16_state::draw_sprites( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect )
139138{
140   fuuki16_state *state = screen.machine().driver_data<fuuki16_state>();
141139   int offs;
142140   gfx_element *gfx = screen.machine().gfx[0];
143141   bitmap_ind8 &priority_bitmap = screen.machine().priority_bitmap;
144142   const rectangle &visarea = screen.visible_area();
145   UINT16 *spriteram16 = state->m_spriteram;
143   UINT16 *spriteram16 = m_spriteram;
146144   int max_x = visarea.max_x + 1;
147145   int max_y = visarea.max_y + 1;
148146
149147   /* Draw them backwards, for pdrawgfx */
150   for ( offs = (state->m_spriteram.bytes() - 8) / 2; offs >=0; offs -= 8 / 2 )
148   for ( offs = (m_spriteram.bytes() - 8) / 2; offs >=0; offs -= 8 / 2 )
151149   {
152150      int x, y, xstart, ystart, xend, yend, xinc, yinc;
153151      int xnum, ynum, xzoom, yzoom, flipx, flipy;
r20822r20823
182180      sx = (sx & 0x1ff) - (sx & 0x200);
183181      sy = (sy & 0x1ff) - (sy & 0x200);
184182
185      if (state->flip_screen())
183      if (flip_screen())
186184      {
187185         flipx = !flipx;     sx = max_x - sx - xnum * 16;
188186         flipy = !flipy;     sy = max_y - sy - ynum * 16;
r20822r20823
265263***************************************************************************/
266264
267265/* Wrapper to handle bg and bg2 ttogether */
268static void fuuki16_draw_layer( running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect, int i, int flag, int pri )
266void fuuki16_state::fuuki16_draw_layer( bitmap_ind16 &bitmap, const rectangle &cliprect, int i, int flag, int pri )
269267{
270   fuuki16_state *state = machine.driver_data<fuuki16_state>();
271   int buffer = (state->m_vregs[0x1e / 2] & 0x40);
268//OBRISI.ME
269   int buffer = (m_vregs[0x1e / 2] & 0x40);
272270
273271   switch( i )
274272   {
275      case 2: if (buffer) state->m_tilemap[3]->draw(bitmap, cliprect, flag, pri);
276            else        state->m_tilemap[2]->draw(bitmap, cliprect, flag, pri);
273      case 2: if (buffer) m_tilemap[3]->draw(bitmap, cliprect, flag, pri);
274            else        m_tilemap[2]->draw(bitmap, cliprect, flag, pri);
277275            return;
278      case 1: state->m_tilemap[1]->draw(bitmap, cliprect, flag, pri);
276      case 1: m_tilemap[1]->draw(bitmap, cliprect, flag, pri);
279277            return;
280      case 0: state->m_tilemap[0]->draw(bitmap, cliprect, flag, pri);
278      case 0: m_tilemap[0]->draw(bitmap, cliprect, flag, pri);
281279            return;
282280   }
283281}
r20822r20823
339337   bitmap.fill((0x800 * 4) - 1, cliprect);
340338   machine().priority_bitmap.fill(0, cliprect);
341339
342   fuuki16_draw_layer(machine(), bitmap, cliprect, tm_back,   0, 1);
343   fuuki16_draw_layer(machine(), bitmap, cliprect, tm_middle, 0, 2);
344   fuuki16_draw_layer(machine(), bitmap, cliprect, tm_front,  0, 4);
340   fuuki16_draw_layer(bitmap, cliprect, tm_back,   0, 1);
341   fuuki16_draw_layer(bitmap, cliprect, tm_middle, 0, 2);
342   fuuki16_draw_layer(bitmap, cliprect, tm_front,  0, 4);
345343
346344   draw_sprites(screen, bitmap, cliprect);
347345
trunk/src/mame/video/flower.c
r20822r20823
2626      colortable_entry_set_value(machine().colortable, i, i);
2727}
2828
29static void draw_sprites(running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect )
29void flower_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect )
3030{
31   flower_state *state = machine.driver_data<flower_state>();
32   gfx_element *gfx = machine.gfx[1];
33   UINT8 *source = state->m_spriteram + 0x200;
31//OBRISI.ME
32   gfx_element *gfx = machine().gfx[1];
33   UINT8 *source = m_spriteram + 0x200;
3434   UINT8 *finish = source - 0x200;
3535
3636   source -= 8;
r20822r20823
7979      code |= ((source[2] & 0x01) << 6);
8080      code |= ((source[2] & 0x08) << 4);
8181
82      if(state->flip_screen())
82      if(flip_screen())
8383      {
8484         flipx = !flipx;
8585         flipy = !flipy;
r20822r20823
170170   m_bg0_tilemap->draw(bitmap, cliprect, 0,0);
171171   m_bg1_tilemap->draw(bitmap, cliprect, 0,0);
172172
173   draw_sprites(machine(),bitmap,cliprect);
173   draw_sprites(bitmap,cliprect);
174174
175175   if(flip_screen())
176176   {
trunk/src/mame/video/flstory.c
r20822r20823
159159}
160160
161161
162static void flstory_draw_sprites( running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect, int pri )
162void flstory_state::flstory_draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect, int pri )
163163{
164   flstory_state *state = machine.driver_data<flstory_state>();
164//OBRISI.ME
165165   int i;
166166
167167   for (i = 0; i < 0x20; i++)
168168   {
169      int pr = state->m_spriteram[state->m_spriteram.bytes() - 1 - i];
169      int pr = m_spriteram[m_spriteram.bytes() - 1 - i];
170170      int offs = (pr & 0x1f) * 4;
171171
172172      if ((pr & 0x80) == pri)
173173      {
174174         int code, sx, sy, flipx, flipy;
175175
176         code = state->m_spriteram[offs + 2] + ((state->m_spriteram[offs + 1] & 0x30) << 4);
177         sx = state->m_spriteram[offs + 3];
178         sy = state->m_spriteram[offs + 0];
176         code = m_spriteram[offs + 2] + ((m_spriteram[offs + 1] & 0x30) << 4);
177         sx = m_spriteram[offs + 3];
178         sy = m_spriteram[offs + 0];
179179
180         if (state->m_flipscreen)
180         if (m_flipscreen)
181181         {
182182            sx = (240 - sx) & 0xff ;
183183            sy = sy - 1 ;
r20822r20823
185185         else
186186            sy = 240 - sy - 1 ;
187187
188         flipx = ((state->m_spriteram[offs + 1] & 0x40) >> 6) ^ state->m_flipscreen;
189         flipy = ((state->m_spriteram[offs + 1] & 0x80) >> 7) ^ state->m_flipscreen;
188         flipx = ((m_spriteram[offs + 1] & 0x40) >> 6) ^ m_flipscreen;
189         flipy = ((m_spriteram[offs + 1] & 0x80) >> 7) ^ m_flipscreen;
190190
191         drawgfx_transpen(bitmap,cliprect,machine.gfx[1],
191         drawgfx_transpen(bitmap,cliprect,machine().gfx[1],
192192               code,
193               state->m_spriteram[offs + 1] & 0x0f,
193               m_spriteram[offs + 1] & 0x0f,
194194               flipx,flipy,
195195               sx,sy,15);
196196         /* wrap around */
197197         if (sx > 240)
198            drawgfx_transpen(bitmap,cliprect,machine.gfx[1],
198            drawgfx_transpen(bitmap,cliprect,machine().gfx[1],
199199                  code,
200                  state->m_spriteram[offs + 1] & 0x0f,
200                  m_spriteram[offs + 1] & 0x0f,
201201                  flipx,flipy,
202202                  sx-256,sy,15);
203203      }
r20822r20823
208208{
209209   m_bg_tilemap->draw(bitmap, cliprect, 0 | TILEMAP_DRAW_LAYER1, 0);
210210   m_bg_tilemap->draw(bitmap, cliprect, 1 | TILEMAP_DRAW_LAYER1, 0);
211   flstory_draw_sprites(machine(), bitmap, cliprect, 0x00);
211   flstory_draw_sprites(bitmap, cliprect, 0x00);
212212   m_bg_tilemap->draw(bitmap, cliprect, 0 | TILEMAP_DRAW_LAYER0, 0);
213   flstory_draw_sprites(machine(), bitmap, cliprect, 0x80);
213   flstory_draw_sprites(bitmap, cliprect, 0x80);
214214   m_bg_tilemap->draw(bitmap, cliprect, 1 | TILEMAP_DRAW_LAYER0, 0);
215215   return 0;
216216}
217217
218static void victnine_draw_sprites( running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect )
218void flstory_state::victnine_draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect )
219219{
220   flstory_state *state = machine.driver_data<flstory_state>();
220//OBRISI.ME
221221   int i;
222222
223223   for (i = 0; i < 0x20; i++)
224224   {
225      int pr = state->m_spriteram[state->m_spriteram.bytes() - 1 - i];
225      int pr = m_spriteram[m_spriteram.bytes() - 1 - i];
226226      int offs = (pr & 0x1f) * 4;
227227
228228      //if ((pr & 0x80) == pri)
229229      {
230230         int code, sx, sy, flipx, flipy;
231231
232         code = state->m_spriteram[offs + 2] + ((state->m_spriteram[offs + 1] & 0x20) << 3);
233         sx = state->m_spriteram[offs + 3];
234         sy = state->m_spriteram[offs + 0];
232         code = m_spriteram[offs + 2] + ((m_spriteram[offs + 1] & 0x20) << 3);
233         sx = m_spriteram[offs + 3];
234         sy = m_spriteram[offs + 0];
235235
236         if (state->m_flipscreen)
236         if (m_flipscreen)
237237         {
238238            sx = (240 - sx + 1) & 0xff ;
239239            sy = sy + 1 ;
r20822r20823
241241         else
242242            sy = 240 - sy + 1 ;
243243
244         flipx = ((state->m_spriteram[offs + 1] & 0x40) >> 6) ^ state->m_flipscreen;
245         flipy = ((state->m_spriteram[offs + 1] & 0x80) >> 7) ^ state->m_flipscreen;
244         flipx = ((m_spriteram[offs + 1] & 0x40) >> 6) ^ m_flipscreen;
245         flipy = ((m_spriteram[offs + 1] & 0x80) >> 7) ^ m_flipscreen;
246246
247         drawgfx_transpen(bitmap,cliprect,machine.gfx[1],
247         drawgfx_transpen(bitmap,cliprect,machine().gfx[1],
248248               code,
249               state->m_spriteram[offs + 1] & 0x0f,
249               m_spriteram[offs + 1] & 0x0f,
250250               flipx,flipy,
251251               sx,sy,15);
252252         /* wrap around */
253253         if (sx > 240)
254            drawgfx_transpen(bitmap,cliprect,machine.gfx[1],
254            drawgfx_transpen(bitmap,cliprect,machine().gfx[1],
255255                  code,
256                  state->m_spriteram[offs + 1] & 0x0f,
256                  m_spriteram[offs + 1] & 0x0f,
257257                  flipx,flipy,
258258                  sx-256,sy,15);
259259      }
r20822r20823
263263UINT32 flstory_state::screen_update_victnine(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
264264{
265265   m_bg_tilemap->draw(bitmap, cliprect, 0, 0);
266   victnine_draw_sprites(machine(), bitmap, cliprect);
266   victnine_draw_sprites(bitmap, cliprect);
267267   return 0;
268268}
269269
r20822r20823
271271{
272272   m_bg_tilemap->draw(bitmap, cliprect, 0 | TILEMAP_DRAW_LAYER1, 0);
273273   m_bg_tilemap->draw(bitmap, cliprect, 1 | TILEMAP_DRAW_LAYER1, 0);
274   victnine_draw_sprites(machine(), bitmap, cliprect);
274   victnine_draw_sprites(bitmap, cliprect);
275275   m_bg_tilemap->draw(bitmap, cliprect, 0 | TILEMAP_DRAW_LAYER0, 0);
276   victnine_draw_sprites(machine(), bitmap, cliprect);
276   victnine_draw_sprites(bitmap, cliprect);
277277   m_bg_tilemap->draw(bitmap, cliprect, 1 | TILEMAP_DRAW_LAYER0, 0);
278278   return 0;
279279}
trunk/src/mame/video/fuukifg3.c
r20822r20823
4848
4949***************************************************************************/
5050
51INLINE void get_tile_info8bpp(running_machine &machine, tile_data &tileinfo, tilemap_memory_index tile_index, int _N_)
51inline void fuuki32_state::get_tile_info8bpp(tile_data &tileinfo, tilemap_memory_index tile_index, int _N_)
5252{
53   fuuki32_state *state = machine.driver_data<fuuki32_state>();
54   UINT16 code = (state->m_vram[_N_][tile_index] & 0xffff0000) >> 16;
55   UINT16 attr = (state->m_vram[_N_][tile_index] & 0x0000ffff);
56   SET_TILE_INFO(1 + _N_, code, (attr & 0x3f) >> 4, TILE_FLIPYX((attr >> 6) & 3));
53//OBRISI.ME
54   UINT16 code = (m_vram[_N_][tile_index] & 0xffff0000) >> 16;
55   UINT16 attr = (m_vram[_N_][tile_index] & 0x0000ffff);
56   SET_TILE_INFO_MEMBER(1 + _N_, code, (attr & 0x3f) >> 4, TILE_FLIPYX((attr >> 6) & 3));
5757}
5858
59TILE_GET_INFO_MEMBER(fuuki32_state::get_tile_info_0){ get_tile_info8bpp(machine(), tileinfo, tile_index, 0); }
60TILE_GET_INFO_MEMBER(fuuki32_state::get_tile_info_1){ get_tile_info8bpp(machine(), tileinfo, tile_index, 1); }
59TILE_GET_INFO_MEMBER(fuuki32_state::get_tile_info_0){ get_tile_info8bpp(tileinfo, tile_index, 0); }
60TILE_GET_INFO_MEMBER(fuuki32_state::get_tile_info_1){ get_tile_info8bpp(tileinfo, tile_index, 1); }
6161
62INLINE void get_tile_info4bpp(running_machine &machine, tile_data &tileinfo, tilemap_memory_index tile_index, int _N_)
62inline void fuuki32_state::get_tile_info4bpp(tile_data &tileinfo, tilemap_memory_index tile_index, int _N_)
6363{
64   fuuki32_state *state = machine.driver_data<fuuki32_state>();
65   UINT16 code = (state->m_vram[_N_][tile_index] & 0xffff0000) >> 16;
66   UINT16 attr = (state->m_vram[_N_][tile_index] & 0x0000ffff);
67   SET_TILE_INFO(1 + _N_, code, attr & 0x3f, TILE_FLIPYX((attr >> 6) & 3));
64//OBRISI.ME
65   UINT16 code = (m_vram[_N_][tile_index] & 0xffff0000) >> 16;
66   UINT16 attr = (m_vram[_N_][tile_index] & 0x0000ffff);
67   SET_TILE_INFO_MEMBER(1 + _N_, code, attr & 0x3f, TILE_FLIPYX((attr >> 6) & 3));
6868}
6969
70TILE_GET_INFO_MEMBER(fuuki32_state::get_tile_info_2){ get_tile_info4bpp(machine(), tileinfo, tile_index, 2); }
71TILE_GET_INFO_MEMBER(fuuki32_state::get_tile_info_3){ get_tile_info4bpp(machine(), tileinfo, tile_index, 3); }
70TILE_GET_INFO_MEMBER(fuuki32_state::get_tile_info_2){ get_tile_info4bpp(tileinfo, tile_index, 2); }
71TILE_GET_INFO_MEMBER(fuuki32_state::get_tile_info_3){ get_tile_info4bpp(tileinfo, tile_index, 3); }
7272
73INLINE void fuuki32_vram_w(address_space &space, offs_t offset, UINT32 data, UINT32 mem_mask, int _N_)
73inline void fuuki32_state::fuuki32_vram_w(offs_t offset, UINT32 data, UINT32 mem_mask, int _N_)
7474{
75   fuuki32_state *state = space.machine().driver_data<fuuki32_state>();
76   COMBINE_DATA(&state->m_vram[_N_][offset]);
77   state->m_tilemap[_N_]->mark_tile_dirty(offset);
75   COMBINE_DATA(&m_vram[_N_][offset]);
76   m_tilemap[_N_]->mark_tile_dirty(offset);
7877}
7978
80WRITE32_MEMBER(fuuki32_state::fuuki32_vram_0_w){ fuuki32_vram_w(space, offset, data, mem_mask, 0); }
81WRITE32_MEMBER(fuuki32_state::fuuki32_vram_1_w){ fuuki32_vram_w(space, offset, data, mem_mask, 1); }
82WRITE32_MEMBER(fuuki32_state::fuuki32_vram_2_w){ fuuki32_vram_w(space, offset, data, mem_mask, 2); }
83WRITE32_MEMBER(fuuki32_state::fuuki32_vram_3_w){ fuuki32_vram_w(space, offset, data, mem_mask, 3); }
79WRITE32_MEMBER(fuuki32_state::fuuki32_vram_0_w){ fuuki32_vram_w(offset, data, mem_mask, 0); }
80WRITE32_MEMBER(fuuki32_state::fuuki32_vram_1_w){ fuuki32_vram_w(offset, data, mem_mask, 1); }
81WRITE32_MEMBER(fuuki32_state::fuuki32_vram_2_w){ fuuki32_vram_w(offset, data, mem_mask, 2); }
82WRITE32_MEMBER(fuuki32_state::fuuki32_vram_3_w){ fuuki32_vram_w(offset, data, mem_mask, 3); }
8483
8584
8685/***************************************************************************
r20822r20823
142141
143142***************************************************************************/
144143
145static void draw_sprites( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect )
144void fuuki32_state::draw_sprites( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect )
146145{
147   fuuki32_state *state = screen.machine().driver_data<fuuki32_state>();
148146   int offs;
149147   gfx_element *gfx = screen.machine().gfx[0];
150148   bitmap_ind8 &priority_bitmap = screen.machine().priority_bitmap;
r20822r20823
152150   int max_x = visarea.max_x + 1;
153151   int max_y = visarea.max_y + 1;
154152
155   UINT32 *src = state->m_buf_spriteram2; /* Use spriteram buffered by 2 frames, need palette buffered by one frame? */
153   UINT32 *src = m_buf_spriteram2; /* Use spriteram buffered by 2 frames, need palette buffered by one frame? */
156154
157155   /* Draw them backwards, for pdrawgfx */
158   for (offs = (state->m_spriteram.bytes() - 8) / 4; offs >= 0; offs -= 8/4)
156   for (offs = (m_spriteram.bytes() - 8) / 4; offs >= 0; offs -= 8/4)
159157   {
160158      int x, y, xstart, ystart, xend, yend, xinc, yinc;
161159      int xnum, ynum, xzoom, yzoom, flipx, flipy;
r20822r20823
169167      int bank = (code & 0xc000) >> 14;
170168      int bank_lookedup;
171169
172      bank_lookedup = ((state->m_spr_buffered_tilebank[1] & 0xffff0000) >> (16 + bank * 4)) & 0xf;
170      bank_lookedup = ((m_spr_buffered_tilebank[1] & 0xffff0000) >> (16 + bank * 4)) & 0xf;
173171      code &= 0x3fff;
174172      code += bank_lookedup * 0x4000;
175173
r20822r20823
197195      sx = (sx & 0x1ff) - (sx & 0x200);
198196      sy = (sy & 0x1ff) - (sy & 0x200);
199197
200      if (state->flip_screen())
198      if (flip_screen())
201199      {
202200         flipx = !flipx;     sx = max_x - sx - xnum * 16;
203201         flipy = !flipy;     sy = max_y - sy - ynum * 16;
r20822r20823
288286***************************************************************************/
289287
290288/* Wrapper to handle bg and bg2 ttogether */
291static void fuuki32_draw_layer( running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect, int i, int flag, int pri )
289void fuuki32_state::fuuki32_draw_layer( bitmap_ind16 &bitmap, const rectangle &cliprect, int i, int flag, int pri )
292290{
293   fuuki32_state *state = machine.driver_data<fuuki32_state>();
294   int buffer = ((state->m_vregs[0x1e / 4] & 0x0000ffff) & 0x40);
291//OBRISI.ME
292   int buffer = ((m_vregs[0x1e / 4] & 0x0000ffff) & 0x40);
295293
296294   switch( i )
297295   {
298      case 2: if (buffer) state->m_tilemap[3]->draw(bitmap, cliprect, flag, pri);
299            else        state->m_tilemap[2]->draw(bitmap, cliprect, flag, pri);
296      case 2: if (buffer) m_tilemap[3]->draw(bitmap, cliprect, flag, pri);
297            else        m_tilemap[2]->draw(bitmap, cliprect, flag, pri);
300298            return;
301      case 1: state->m_tilemap[1]->draw(bitmap, cliprect, flag, pri);
299      case 1: m_tilemap[1]->draw(bitmap, cliprect, flag, pri);
302300            return;
303      case 0: state->m_tilemap[0]->draw(bitmap, cliprect, flag, pri);
301      case 0: m_tilemap[0]->draw(bitmap, cliprect, flag, pri);
304302            return;
305303   }
306304}
r20822r20823
357355   bitmap.fill((0x800 * 4) - 1, cliprect);
358356   machine().priority_bitmap.fill(0, cliprect);
359357
360   fuuki32_draw_layer(machine(), bitmap, cliprect, tm_back,   0, 1);
361   fuuki32_draw_layer(machine(), bitmap, cliprect, tm_middle, 0, 2);
362   fuuki32_draw_layer(machine(), bitmap, cliprect, tm_front,  0, 4);
358   fuuki32_draw_layer(bitmap, cliprect, tm_back,   0, 1);
359   fuuki32_draw_layer(bitmap, cliprect, tm_middle, 0, 2);
360   fuuki32_draw_layer(bitmap, cliprect, tm_front,  0, 4);
363361
364362   draw_sprites(screen, bitmap, cliprect);
365363   return 0;
trunk/src/mame/video/funybubl.c
r20822r20823
2727{
2828}
2929
30static void draw_sprites( running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect )
30void funybubl_state::draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect )
3131{
32   funybubl_state *state = machine.driver_data<funybubl_state>();
33   UINT8 *source = &state->m_banked_vram[0x2000 - 0x20];
32//OBRISI.ME
33   UINT8 *source = &m_banked_vram[0x2000 - 0x20];
3434   UINT8 *finish = source - 0x1000;
3535
3636   while (source > finish)
r20822r20823
6666
6767      // bits 0x40 and 0x10 not used?...
6868
69      drawgfx_transpen(bitmap, cliprect, machine.gfx[1], tile, 0, 0, 0, xpos, ypos, 255);
69      drawgfx_transpen(bitmap, cliprect, machine().gfx[1], tile, 0, 0, 0, xpos, ypos, 255);
7070      source -= 0x20;
7171   }
7272}
r20822r20823
9292      }
9393   }
9494
95   draw_sprites(machine(), bitmap, cliprect);
95   draw_sprites(bitmap, cliprect);
9696
9797#if 0
9898   if ( machine().input().code_pressed_once(KEYCODE_W) )
trunk/src/mame/includes/fantland.h
r20822r20823
5151   UINT32 screen_update_fantland(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
5252   INTERRUPT_GEN_MEMBER(fantland_irq);
5353   INTERRUPT_GEN_MEMBER(fantland_sound_irq);
54   void draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect);
5455};
trunk/src/mame/includes/f1gp.h
r20822r20823
9292   UINT32 screen_update_f1gp(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
9393   UINT32 screen_update_f1gpb(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
9494   UINT32 screen_update_f1gp2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
95   void f1gpb_draw_sprites( bitmap_ind16 &bitmap,const rectangle &cliprect );
9596};
trunk/src/mame/includes/fromance.h
r20822r20823
9494   UINT32 screen_update_pipedrm(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
9595   TIMER_CALLBACK_MEMBER(deferred_commanddata_w);
9696   TIMER_CALLBACK_MEMBER(crtc_interrupt_gen);
97   inline void get_fromance_tile_info( tile_data &tileinfo, int tile_index, int layer );
98   inline void get_nekkyoku_tile_info( tile_data &tileinfo, int tile_index, int layer );
99   void init_common(  );
97100};
trunk/src/mame/includes/fastlane.h
r20822r20823
5050   virtual void palette_init();
5151   UINT32 screen_update_fastlane(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
5252   TIMER_DEVICE_CALLBACK_MEMBER(fastlane_scanline);
53   void set_pens(  );
5354};
trunk/src/mame/includes/fuukifg2.h
r20822r20823
4747   TIMER_CALLBACK_MEMBER(level_1_interrupt_callback);
4848   TIMER_CALLBACK_MEMBER(vblank_interrupt_callback);
4949   TIMER_CALLBACK_MEMBER(raster_interrupt_callback);
50   inline void get_tile_info(tile_data &tileinfo, tilemap_memory_index tile_index, int _N_);
51   inline void fuuki16_vram_w(offs_t offset, UINT16 data, UINT16 mem_mask, int _N_);
52   void draw_sprites( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect );
53   void fuuki16_draw_layer( bitmap_ind16 &bitmap, const rectangle &cliprect, int i, int flag, int pri );
5054};
trunk/src/mame/includes/fuukifg3.h
r20822r20823
6666   TIMER_CALLBACK_MEMBER(level_1_interrupt_callback);
6767   TIMER_CALLBACK_MEMBER(vblank_interrupt_callback);
6868   TIMER_CALLBACK_MEMBER(raster_interrupt_callback);
69   inline void get_tile_info8bpp(tile_data &tileinfo, tilemap_memory_index tile_index, int _N_);
70   inline void get_tile_info4bpp(tile_data &tileinfo, tilemap_memory_index tile_index, int _N_);
71   inline void fuuki32_vram_w(offs_t offset, UINT32 data, UINT32 mem_mask, int _N_);
72   void draw_sprites( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect );
73   void fuuki32_draw_layer( bitmap_ind16 &bitmap, const rectangle &cliprect, int i, int flag, int pri );
6974};
trunk/src/mame/includes/funybubl.h
r20822r20823
2323   virtual void machine_start();
2424   virtual void video_start();
2525   UINT32 screen_update_funybubl(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
26   void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect );
2627};
trunk/src/mame/includes/flstory.h
r20822r20823
118118   UINT32 screen_update_victnine(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
119119   UINT32 screen_update_rumba(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
120120   TIMER_CALLBACK_MEMBER(nmi_callback);
121   void flstory_draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect, int pri );
122   void victnine_draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect );
121123};
trunk/src/mame/includes/fitfight.h
r20822r20823
6363   virtual void video_start();
6464   UINT32 screen_update_fitfight(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
6565   INTERRUPT_GEN_MEMBER(snd_irq);
66   void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect, int layer );
6667};
trunk/src/mame/includes/fastfred.h
r20822r20823
6565   UINT32 screen_update_imago(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
6666   INTERRUPT_GEN_MEMBER(vblank_irq);
6767   INTERRUPT_GEN_MEMBER(sound_timer_irq);
68   void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);
6869};
6970
7071/*----------- defined in video/fastfred.c -----------*/
trunk/src/mame/includes/flower.h
r20822r20823
4141   virtual void video_start();
4242   virtual void palette_init();
4343   UINT32 screen_update_flower(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
44   void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect );
4445};
4546
4647
trunk/src/mame/includes/fgoal.h
r20822r20823
4848   virtual void palette_init();
4949   UINT32 screen_update_fgoal(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
5050   TIMER_CALLBACK_MEMBER(interrupt_callback);
51   int intensity(int bits);
52   unsigned video_ram_address(  );
5153};
trunk/src/mame/includes/funkybee.h
r20822r20823
2929   virtual void video_start();
3030   virtual void palette_init();
3131   UINT32 screen_update_funkybee(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
32   void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect );
33   void draw_columns( bitmap_ind16 &bitmap, const rectangle &cliprect );
3234};
trunk/src/mame/includes/freekick.h
r20822r20823
5252   UINT32 screen_update_freekick(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
5353   UINT32 screen_update_gigas(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
5454   INTERRUPT_GEN_MEMBER(freekick_irqgen);
55   void gigas_draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect );
56   void pbillrd_draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect );
57   void freekick_draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect );
5558};
trunk/src/mame/includes/fromanc2.h
r20822r20823
107107   UINT32 screen_update_fromanc2_left(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
108108   UINT32 screen_update_fromanc2_right(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
109109   INTERRUPT_GEN_MEMBER(fromanc2_interrupt);
110   inline void fromanc2_get_tile_info( tile_data &tileinfo, int tile_index, int vram, int layer );
111   inline void fromancr_get_tile_info( tile_data &tileinfo, int tile_index, int vram, int layer );
112   inline void fromanc2_dispvram_w( offs_t offset, UINT16 data, UINT16 mem_mask, int vram, int layer );
113   inline void fromancr_vram_w(offs_t offset, UINT16 data, UINT16 mem_mask, int layer );
114   void fromancr_gfxbank_w( int data );
115   inline void fromanc4_vram_w( offs_t offset, UINT16 data, UINT16 mem_mask, int layer );
110116};
111
112/*----------- defined in video/fromanc2.c -----------*/
113void fromancr_gfxbank_w(running_machine &machine, int data);
trunk/src/mame/includes/firetrk.h
r20822r20823
115115   DECLARE_WRITE8_MEMBER(firetrk_motor_snd_w);
116116   DECLARE_WRITE8_MEMBER(superbug_motor_snd_w);
117117   DECLARE_WRITE8_MEMBER(firetrk_xtndply_w);
118   void prom_to_palette(int number, UINT8 val);
119   void firetrk_draw_car(bitmap_ind16 &bitmap, const rectangle &cliprect, gfx_element **gfx, int which, int flash);
120   void superbug_draw_car(bitmap_ind16 &bitmap, const rectangle &cliprect, gfx_element **gfx, int flash);
121   void montecar_draw_car(bitmap_ind16 &bitmap, const rectangle &cliprect, gfx_element **gfx, int which, int is_collision_detection);
122   void check_collision(firetrk_state *state, int which);
123   void set_service_mode(int enable);
118124};
119125
120126
trunk/src/mame/includes/firetrap.h
r20822r20823
7272   virtual void palette_init();
7373   UINT32 screen_update_firetrap(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
7474   INTERRUPT_GEN_MEMBER(firetrap_irq);
75   inline void get_bg_tile_info(tile_data &tileinfo, int tile_index, UINT8 *bgvideoram, int gfx_region);
76   void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect );
7577};

Previous 199869 Revisions Next


© 1997-2024 The MAME Team