Previous 199869 Revisions Next

r32404 Friday 26th September, 2014 at 15:25:03 UTC by Osso
small cleanups here and there (nw)
[src/mame/includes]taito_f3.h vertigo.h
[src/mame/video]taito_f3.c vertigo.c wecleman.c

trunk/src/mame/includes/vertigo.h
r32403r32404
2929class vector_generator
3030{
3131public:
32   running_machine &machine() const { assert(m_machine != NULL); return *m_machine; }
33   void set_machine(running_machine &machine) { m_machine = &machine; }
34
3532   UINT32 sreg;      /* shift register */
3633   UINT32 l1;        /* latch 1 adder operand only */
3734   UINT32 l2;        /* latch 2 adder operand only */
r32403r32404
5249   UINT32 ven;       /* vector intensity enable */
5350
5451private:
55   running_machine *m_machine;
5652};
5753
5854struct microcode
trunk/src/mame/includes/taito_f3.h
r32403r32404
5252
5353   taito_f3_state(const machine_config &mconfig, device_type type, const char *tag)
5454      : driver_device(mconfig, type, tag),
55      m_f3_ram(*this,"f3_ram") ,
5655      m_maincpu(*this, "maincpu"),
5756      m_audiocpu(*this, "audiocpu"),
5857      m_oki(*this, "oki"),
5958      m_gfxdecode(*this, "gfxdecode"),
6059      m_screen(*this, "screen"),
6160      m_palette(*this, "palette"),
61      m_f3_ram(*this,"f3_ram"),
6262      m_paletteram32(*this, "paletteram") { }
6363
64   required_device<cpu_device> m_maincpu;
65   optional_device<cpu_device> m_audiocpu;
66   optional_device<okim6295_device> m_oki;
67   required_device<gfxdecode_device> m_gfxdecode;
68   required_device<screen_device> m_screen;
69   required_device<palette_device> m_palette;
70   
71   optional_shared_ptr<UINT32> m_f3_ram;
72   optional_shared_ptr<UINT32> m_paletteram32;
73   
6474   UINT16 *m_videoram;
6575   UINT16 *m_spriteram;
66   optional_shared_ptr<UINT32> m_f3_ram;
6776   UINT16 *m_f3_vram;
6877   UINT16 *m_f3_line_ram;
6978   UINT16 *m_f3_pf_data;
r32403r32404
288297   UINT32 screen_update_f3(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
289298   void screen_eof_f3(screen_device &screen, bool state);
290299   INTERRUPT_GEN_MEMBER(f3_interrupt2);
291   required_device<cpu_device> m_maincpu;
292   optional_device<cpu_device> m_audiocpu;
293   optional_device<okim6295_device> m_oki;
294   required_device<gfxdecode_device> m_gfxdecode;
295   required_device<screen_device> m_screen;
296   required_device<palette_device> m_palette;
297   optional_shared_ptr<UINT32> m_paletteram32;
298300
299301protected:
300302   virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
r32403r32404
304306   inline void f3_drawgfx(bitmap_rgb32 &dest_bmp,const rectangle &clip,gfx_element *gfx,int code,int color,int flipx,int flipy,int sx,int sy,UINT8 pri_dst);
305307   inline void f3_drawgfxzoom(bitmap_rgb32 &dest_bmp,const rectangle &clip,gfx_element *gfx,int code,int color,int flipx,int flipy,int sx,int sy,int scalex,int scaley,UINT8 pri_dst);
306308   void draw_sprites(bitmap_rgb32 &bitmap, const rectangle &cliprect);
309   void get_sprite_info(const UINT16 *spriteram16_ptr);
307310};
trunk/src/mame/video/taito_f3.c
r32403r32404
271271   int pri;
272272};
273273
274static void get_sprite_info(running_machine &machine, const UINT16 *spriteram16_ptr);
275
276274struct f3_playfield_line_inf
277275{
278276   int alpha_mode[256];
r32403r32404
511509      {
512510         if (machine().video().skip_this_frame() == 0)
513511         {
514            get_sprite_info(machine(), m_spriteram16_buffered);
512            get_sprite_info(m_spriteram16_buffered);
515513         }
516514         memcpy(m_spriteram16_buffered,m_spriteram,0x10000);
517515      }
r32403r32404
519517      {
520518         if (machine().video().skip_this_frame() == 0)
521519         {
522            get_sprite_info(machine(), m_spriteram);
520            get_sprite_info(m_spriteram);
523521         }
524522      }
525523   }
r32403r32404
28322830   /*zoom##p = p##_addition << 12;*/                           \
28332831}
28342832
2835static void get_sprite_info(running_machine &machine, const UINT16 *spriteram16_ptr)
2833void taito_f3_state::get_sprite_info(const UINT16 *spriteram16_ptr)
28362834{
2837   taito_f3_state *state = machine.driver_data<taito_f3_state>();
2838   const rectangle &visarea = machine.first_screen()->visible_area();
2835   const rectangle &visarea = m_screen->visible_area();
28392836   const int min_x=visarea.min_x,max_x=visarea.max_x;
28402837   const int min_y=visarea.min_y,max_y=visarea.max_y;
28412838   int offs,spritecont,flipx,flipy,/*old_x,*/color,x,y;
r32403r32404
28492846
28502847   int x_addition_left = 8, y_addition_left = 8;
28512848
2852   struct tempsprite *sprite_ptr = state->m_spritelist;
2849   struct tempsprite *sprite_ptr = m_spritelist;
28532850
28542851   int total_sprites=0;
28552852
r32403r32404
28762873      /* Check if special command bit is set */
28772874      if (spriteram16_ptr[current_offs+2+1] & 0x8000) {
28782875         UINT32 cntrl=(spriteram16_ptr[current_offs+4+1])&0xffff;
2879         state->m_flipscreen=cntrl&0x2000;
2876         m_flipscreen=cntrl&0x2000;
28802877
28812878         /*  cntrl&0x1000 = disabled?  (From F2 driver, doesn't seem used anywhere)
28822879             cntrl&0x0010 = ???
28832880             cntrl&0x0020 = ???
28842881         */
28852882
2886         state->m_sprite_extra_planes = (cntrl & 0x0300) >> 8;   // 0 = 4bpp, 1 = 5bpp, 2 = unused?, 3 = 6bpp
2887         state->m_sprite_pen_mask = (state->m_sprite_extra_planes << 4) | 0x0f;
2883         m_sprite_extra_planes = (cntrl & 0x0300) >> 8;   // 0 = 4bpp, 1 = 5bpp, 2 = unused?, 3 = 6bpp
2884         m_sprite_pen_mask = (m_sprite_extra_planes << 4) | 0x0f;
28882885
28892886         /* Sprite bank select */
28902887         if (cntrl&1) {
r32403r32404
29252922/* These games either don't set the XY control bits properly (68020 bug?), or
29262923    have some different mode from the others */
29272924#ifdef DARIUSG_KLUDGE
2928      if (state->m_f3_game==DARIUSG || state->m_f3_game==GEKIRIDO || state->m_f3_game==CLEOPATR || state->m_f3_game==RECALH)
2925      if (m_f3_game==DARIUSG || m_f3_game==GEKIRIDO || m_f3_game==CLEOPATR || m_f3_game==RECALH)
29292926         multi=spritecont&0xf0;
29302927#endif
29312928
r32403r32404
29362933         else color=(spriteram16_ptr[current_offs+4+0])&0xff;
29372934
29382935#ifdef DARIUSG_KLUDGE
2939         if (state->m_f3_game==DARIUSG || state->m_f3_game==GEKIRIDO || state->m_f3_game==CLEOPATR || state->m_f3_game==RECALH) {
2936         if (m_f3_game==DARIUSG || m_f3_game==GEKIRIDO || m_f3_game==CLEOPATR || m_f3_game==RECALH) {
29402937            /* Adjust X Position */
29412938            if ((spritecont & 0x40) == 0) {
29422939               if (spritecont & 0x4) {
r32403r32404
30643061      if (!sprite) continue;
30653062      if (!x_addition || !y_addition) continue;
30663063
3067      if (state->m_flipscreen)
3064      if (m_flipscreen)
30683065      {
30693066         int tx,ty;
30703067
r32403r32404
30953092      sprite_ptr++;
30963093      total_sprites++;
30973094   }
3098   state->m_sprite_end = sprite_ptr;
3095   m_sprite_end = sprite_ptr;
30993096}
31003097#undef CALC_ZOOM
31013098
r32403r32404
31833180
31843181   /* sprites */
31853182   if (m_sprite_lag==0)
3186      get_sprite_info(machine(), m_spriteram);
3183      get_sprite_info(m_spriteram);
31873184
31883185   /* Update sprite buffer */
31893186   draw_sprites(bitmap,cliprect);
trunk/src/mame/video/vertigo.c
r32403r32404
183183   memset(&m_vs, 0, sizeof(m_vs));
184184   memset(&m_bsp, 0, sizeof(m_bsp));
185185   memset(&m_vgen, 0, sizeof(m_vgen));
186   m_vgen.set_machine(machine());
187186}
188187
189188
trunk/src/mame/video/wecleman.c
r32403r32404
789789#define YSIZE 512
790790
791791   int sx, sy;
792   const rectangle &visarea = machine().first_screen()->visible_area();
792   const rectangle &visarea = m_screen->visible_area();
793793
794794   /* Let's draw from the top to the bottom of the visible screen */
795795   for (sy = visarea.min_y;sy <= visarea.max_y;sy++)

Previous 199869 Revisions Next


© 1997-2024 The MAME Team