Previous 199869 Revisions Next

r32774 Thursday 16th October, 2014 at 12:14:59 UTC by Osso
Misc cleanups (nw)
[src/mame/drivers]atarigt.c cybertnk.c djmain.c hng64.c magicard.c model2.c nightgal.c sfbonus.c
[src/mame/includes]exidy440.h hng64.h midyunit.h
[src/mame/machine]midyunit.c
[src/mame/video]cps1.c exidy440.c konamigx.c nycaptor.c segas32.c

trunk/src/mame/drivers/djmain.c
r32773r32774
195195      mem_mask >>= 16;
196196      COMBINE_DATA(&m_v_ctrl);
197197
198      if (m_pending_vb_int && !(!(m_v_ctrl & 0x8000))) // #define DISABLE_VB_INT  (!(state->m_v_ctrl & 0x8000))
198      if (m_pending_vb_int && !(!(m_v_ctrl & 0x8000))) // #define DISABLE_VB_INT  (!(m_v_ctrl & 0x8000))
199199      {
200200         m_pending_vb_int = 0;
201201         m_maincpu->set_input_line(M68K_IRQ_4, HOLD_LINE);
trunk/src/mame/drivers/sfbonus.c
r32773r32774
283283public:
284284   sfbonus_state(const machine_config &mconfig, device_type type, const char *tag)
285285      : driver_device(mconfig, type, tag),
286      m_maincpu(*this, "maincpu"),
287      m_gfxdecode(*this, "gfxdecode"),
288      m_palette(*this, "palette"),
286289      m_nvram(*this, "nvram"),
287290      m_1800_regs(*this, "1800_regs"),
288291      m_vregs(*this, "vregs"),
289292      m_2801_regs(*this, "2801_regs"),
290293      m_2c01_regs(*this, "2c01_regs"),
291294      m_3000_regs(*this, "3000_regs"),
292      m_3800_regs(*this, "3800_regs"),
293      m_maincpu(*this, "maincpu"),
294      m_gfxdecode(*this, "gfxdecode"),
295      m_palette(*this, "palette")  { }
295      m_3800_regs(*this, "3800_regs")  { }
296296
297   required_device<cpu_device> m_maincpu;
298   required_device<gfxdecode_device> m_gfxdecode;
299   required_device<palette_device> m_palette;
300   
301   required_shared_ptr<UINT8> m_nvram;
302   required_shared_ptr<UINT8> m_1800_regs;
303   required_shared_ptr<UINT8> m_vregs;
304   required_shared_ptr<UINT8> m_2801_regs;
305   required_shared_ptr<UINT8> m_2c01_regs;
306   required_shared_ptr<UINT8> m_3000_regs;
307   required_shared_ptr<UINT8> m_3800_regs;
308   
297309   bitmap_ind16 *m_temp_reel_bitmap;
298310   tilemap_t *m_tilemap;
299311   tilemap_t *m_reel_tilemap;
r32773r32774
306318   UINT8 *m_reel3_ram;
307319   UINT8 *m_reel4_ram;
308320   UINT8* m_videoram;
309   required_shared_ptr<UINT8> m_nvram;
310   required_shared_ptr<UINT8> m_1800_regs;
311   required_shared_ptr<UINT8> m_vregs;
312   required_shared_ptr<UINT8> m_2801_regs;
313   required_shared_ptr<UINT8> m_2c01_regs;
314   required_shared_ptr<UINT8> m_3000_regs;
315   required_shared_ptr<UINT8> m_3800_regs;
321   
316322   DECLARE_WRITE8_MEMBER(sfbonus_videoram_w);
317323   DECLARE_WRITE8_MEMBER(sfbonus_bank_w);
318324   DECLARE_READ8_MEMBER(sfbonus_2800_r);
r32773r32774
456462   TILE_GET_INFO_MEMBER(get_sfbonus_reel4_tile_info);
457463   virtual void machine_reset();
458464   virtual void video_start();
465   void draw_reel_layer(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int catagory);
459466   UINT32 screen_update_sfbonus(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
460   required_device<cpu_device> m_maincpu;
461   required_device<gfxdecode_device> m_gfxdecode;
462   required_device<palette_device> m_palette;
463467};
464468
465469
r32773r32774
925929
926930}
927931
928static void sfbonus_draw_reel_layer(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int catagory)
932void sfbonus_state::draw_reel_layer(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int catagory)
929933{
930   sfbonus_state *state = screen.machine().driver_data<sfbonus_state>();
931934   int zz;
932935   int i;
933936   int startclipmin;
934937   const rectangle &visarea = screen.visible_area();
935   UINT8* selectbase = &state->m_videoram[0x600];
936   UINT8* bg_scroll = &state->m_videoram[0x000];
937   UINT8* reels_rowscroll = &state->m_videoram[0x400];
938   int globalyscrollreels = (state->m_vregs[6] | state->m_vregs[7]<<8);
939   int globalxscrollreels = (state->m_vregs[4] | state->m_vregs[5]<<8);
938   UINT8* selectbase = &m_videoram[0x600];
939   UINT8* bg_scroll = &m_videoram[0x000];
940   UINT8* reels_rowscroll = &m_videoram[0x400];
941   int globalyscrollreels = (m_vregs[6] | m_vregs[7]<<8);
942   int globalxscrollreels = (m_vregs[4] | m_vregs[5]<<8);
940943   globalyscrollreels += 8;
941944   globalxscrollreels += 8;
942945
r32773r32774
946949   {
947950      int scroll;
948951      scroll = bg_scroll[(i*2)+0x000] | (bg_scroll[(i*2)+0x001]<<8);
949      state->m_reel_tilemap->set_scrolly(i, scroll + globalyscrollreels );
952      m_reel_tilemap->set_scrolly(i, scroll + globalyscrollreels );
950953
951954      scroll = bg_scroll[(i*2)+0x080] | (bg_scroll[(i*2)+0x081]<<8);
952      state->m_reel2_tilemap->set_scrolly(i, scroll + globalyscrollreels);
955      m_reel2_tilemap->set_scrolly(i, scroll + globalyscrollreels);
953956
954957      scroll = bg_scroll[(i*2)+0x100] | (bg_scroll[(i*2)+0x101]<<8);
955      state->m_reel3_tilemap->set_scrolly(i, scroll + globalyscrollreels);
958      m_reel3_tilemap->set_scrolly(i, scroll + globalyscrollreels);
956959
957960      scroll = bg_scroll[(i*2)+0x180] | (bg_scroll[(i*2)+0x181]<<8);
958      state->m_reel4_tilemap->set_scrolly(i, scroll + globalyscrollreels);
961      m_reel4_tilemap->set_scrolly(i, scroll + globalyscrollreels);
959962   }
960963
961964//  printf("------------\n");
r32773r32774
983986      {
984987         rowscroll = reels_rowscroll[((line/8)*2)+0x000] | (reels_rowscroll[((line/8)*2)+0x001]<<8);
985988         xxxscroll = globalxscrollreels + rowscroll;
986         state->m_reel_tilemap->set_scrollx(0, xxxscroll  );
987         state->m_reel2_tilemap->set_scrollx(0, xxxscroll );
988         state->m_reel3_tilemap->set_scrollx(0, xxxscroll );
989         state->m_reel4_tilemap->set_scrollx(0, xxxscroll );
989         m_reel_tilemap->set_scrollx(0, xxxscroll  );
990         m_reel2_tilemap->set_scrollx(0, xxxscroll );
991         m_reel3_tilemap->set_scrollx(0, xxxscroll );
992         m_reel4_tilemap->set_scrollx(0, xxxscroll );
990993      }
991994      else if (rowenable==0x1)
992995      {
993996         rowscroll = reels_rowscroll[((line/8)*2)+0x080] | (reels_rowscroll[((line/8)*2)+0x081]<<8);
994997         xxxscroll = globalxscrollreels + rowscroll;
995         state->m_reel_tilemap->set_scrollx(0, xxxscroll  );
996         state->m_reel2_tilemap->set_scrollx(0, xxxscroll );
997         state->m_reel3_tilemap->set_scrollx(0, xxxscroll );
998         state->m_reel4_tilemap->set_scrollx(0, xxxscroll );
998         m_reel_tilemap->set_scrollx(0, xxxscroll  );
999         m_reel2_tilemap->set_scrollx(0, xxxscroll );
1000         m_reel3_tilemap->set_scrollx(0, xxxscroll );
1001         m_reel4_tilemap->set_scrollx(0, xxxscroll );
9991002      }
10001003      else if (rowenable==0x2)
10011004      {
10021005         rowscroll = reels_rowscroll[((line/8)*2)+0x100] | (reels_rowscroll[((line/8)*2)+0x101]<<8);
10031006         xxxscroll = globalxscrollreels + rowscroll;
1004         state->m_reel_tilemap->set_scrollx(0, xxxscroll  );
1005         state->m_reel2_tilemap->set_scrollx(0, xxxscroll );
1006         state->m_reel3_tilemap->set_scrollx(0, xxxscroll );
1007         state->m_reel4_tilemap->set_scrollx(0, xxxscroll );
1007         m_reel_tilemap->set_scrollx(0, xxxscroll  );
1008         m_reel2_tilemap->set_scrollx(0, xxxscroll );
1009         m_reel3_tilemap->set_scrollx(0, xxxscroll );
1010         m_reel4_tilemap->set_scrollx(0, xxxscroll );
10081011      }
10091012      else if (rowenable==0x3)
10101013      {
10111014         rowscroll = reels_rowscroll[((line/8)*2)+0x180] | (reels_rowscroll[((line/8)*2)+0x181]<<8);
10121015         xxxscroll = globalxscrollreels + rowscroll;
1013         state->m_reel_tilemap->set_scrollx(0, xxxscroll  );
1014         state->m_reel2_tilemap->set_scrollx(0, xxxscroll );
1015         state->m_reel3_tilemap->set_scrollx(0, xxxscroll );
1016         state->m_reel4_tilemap->set_scrollx(0, xxxscroll );
1016         m_reel_tilemap->set_scrollx(0, xxxscroll  );
1017         m_reel2_tilemap->set_scrollx(0, xxxscroll );
1018         m_reel3_tilemap->set_scrollx(0, xxxscroll );
1019         m_reel4_tilemap->set_scrollx(0, xxxscroll );
10171020      }
10181021
10191022      if (rowenable2==0)
10201023      {
1021         state->m_reel_tilemap->draw(screen, *state->m_temp_reel_bitmap, clip, TILEMAP_DRAW_CATEGORY(catagory),3);
1024         m_reel_tilemap->draw(screen, *m_temp_reel_bitmap, clip, TILEMAP_DRAW_CATEGORY(catagory),3);
10221025      }
10231026      if (rowenable==0)
10241027      {
1025         state->m_reel_tilemap->draw(screen, *state->m_temp_reel_bitmap, clip, TILEMAP_DRAW_CATEGORY(catagory),3);
1028         m_reel_tilemap->draw(screen, *m_temp_reel_bitmap, clip, TILEMAP_DRAW_CATEGORY(catagory),3);
10261029      }
10271030
10281031      if (rowenable2==0x1)
10291032      {
1030         state->m_reel2_tilemap->draw(screen, *state->m_temp_reel_bitmap, clip, TILEMAP_DRAW_CATEGORY(catagory),2);
1033         m_reel2_tilemap->draw(screen, *m_temp_reel_bitmap, clip, TILEMAP_DRAW_CATEGORY(catagory),2);
10311034      }
10321035      if (rowenable==0x1)
10331036      {
1034         state->m_reel2_tilemap->draw(screen, *state->m_temp_reel_bitmap, clip, TILEMAP_DRAW_CATEGORY(catagory),2);
1037         m_reel2_tilemap->draw(screen, *m_temp_reel_bitmap, clip, TILEMAP_DRAW_CATEGORY(catagory),2);
10351038      }
10361039
10371040      if (rowenable2==0x2)
10381041      {
1039         state->m_reel3_tilemap->draw(screen, *state->m_temp_reel_bitmap, clip, TILEMAP_DRAW_CATEGORY(catagory),1);
1042         m_reel3_tilemap->draw(screen, *m_temp_reel_bitmap, clip, TILEMAP_DRAW_CATEGORY(catagory),1);
10401043      }
10411044      if (rowenable==0x2)
10421045      {
1043         state->m_reel3_tilemap->draw(screen, *state->m_temp_reel_bitmap, clip, TILEMAP_DRAW_CATEGORY(catagory),1);
1046         m_reel3_tilemap->draw(screen, *m_temp_reel_bitmap, clip, TILEMAP_DRAW_CATEGORY(catagory),1);
10441047      }
10451048
10461049      if (rowenable2==0x3)
10471050      {
1048         state->m_reel4_tilemap->draw(screen, *state->m_temp_reel_bitmap, clip, TILEMAP_DRAW_CATEGORY(catagory),4);
1051         m_reel4_tilemap->draw(screen, *m_temp_reel_bitmap, clip, TILEMAP_DRAW_CATEGORY(catagory),4);
10491052      }
10501053      if (rowenable==0x3)
10511054      {
1052         state->m_reel4_tilemap->draw(screen, *state->m_temp_reel_bitmap, clip, TILEMAP_DRAW_CATEGORY(catagory),4);
1055         m_reel4_tilemap->draw(screen, *m_temp_reel_bitmap, clip, TILEMAP_DRAW_CATEGORY(catagory),4);
10531056      }
10541057
10551058
r32773r32774
10771080   m_temp_reel_bitmap->fill(m_palette->pen(0), cliprect);
10781081
10791082   /* render reels to bitmap */
1080   sfbonus_draw_reel_layer(screen,*m_temp_reel_bitmap,cliprect,0);
1083   draw_reel_layer(screen,*m_temp_reel_bitmap,cliprect,0);
10811084
10821085   {
10831086      int y,x;
trunk/src/mame/drivers/magicard.c
r32773r32774
263263*/
264264
265265/*63 at post test,6d all the time.*/
266#define SCC_CSR_VREG    (state->m_pcab_vregs[0x00/2] & 0xffff)
266#define SCC_CSR_VREG    (m_pcab_vregs[0x00/2] & 0xffff)
267267#define SCC_CG_VREG     ((SCC_CSR_VREG & 0x10)>>4)
268268
269269/*
trunk/src/mame/drivers/cybertnk.c
r32773r32774
181181public:
182182   cybertnk_state(const machine_config &mconfig, device_type type, const char *tag)
183183      : driver_device(mconfig, type, tag),
184      m_maincpu(*this, "maincpu"),
185      m_audiocpu(*this, "audiocpu"),
186      m_gfxdecode(*this, "gfxdecode"),
187      m_palette(*this, "palette"),
184188      m_spr_ram(*this, "spr_ram"),
185189      m_tilemap0_vram(*this, "tilemap0_vram"),
186190      m_tilemap1_vram(*this, "tilemap1_vram"),
r32773r32774
188192      m_tilemap0scroll(*this, "tilemap1_scroll"),
189193      m_tilemap1scroll(*this, "tilemap1_scroll"),
190194      m_tilemap2scroll(*this, "tilemap2_scroll"),
191      m_roadram(*this, "roadram"),
192      m_maincpu(*this, "maincpu"),
193      m_audiocpu(*this, "audiocpu"),
194      m_gfxdecode(*this, "gfxdecode"),
195      m_palette(*this, "palette")  { }
195      m_roadram(*this, "roadram")  { }
196196
197   tilemap_t *m_tilemap0_tilemap;
198   tilemap_t *m_tilemap1_tilemap;
199   tilemap_t *m_tilemap2_tilemap;
197   required_device<cpu_device> m_maincpu;
198   required_device<cpu_device> m_audiocpu;
199   required_device<gfxdecode_device> m_gfxdecode;
200   required_device<palette_device> m_palette;
200201
201   DECLARE_WRITE16_MEMBER(tilemap0_vram_w);
202   DECLARE_WRITE16_MEMBER(tilemap1_vram_w);
203   DECLARE_WRITE16_MEMBER(tilemap2_vram_w);
204
205
206202   required_shared_ptr<UINT16> m_spr_ram;
207203   required_shared_ptr<UINT16> m_tilemap0_vram;
208204   required_shared_ptr<UINT16> m_tilemap1_vram;
r32773r32774
211207   required_shared_ptr<UINT16> m_tilemap1scroll;
212208   required_shared_ptr<UINT16> m_tilemap2scroll;
213209   required_shared_ptr<UINT16> m_roadram;
210   
211   tilemap_t *m_tilemap0_tilemap;
212   tilemap_t *m_tilemap1_tilemap;
213   tilemap_t *m_tilemap2_tilemap;
214214
215   DECLARE_WRITE16_MEMBER(tilemap0_vram_w);
216   DECLARE_WRITE16_MEMBER(tilemap1_vram_w);
217   DECLARE_WRITE16_MEMBER(tilemap2_vram_w);
218
215219   UINT8 m_mux_data;
216220   DECLARE_WRITE8_MEMBER(cybertnk_sound_cmd_w);
217221   DECLARE_WRITE8_MEMBER(cybertnk_mux_w);
r32773r32774
224228   TILE_GET_INFO_MEMBER(get_tilemap1_tile_info);
225229   TILE_GET_INFO_MEMBER(get_tilemap2_tile_info);
226230   virtual void video_start();
231   void draw_road(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int screen_shift, int pri);
232   void draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int screen_shift);
233   UINT32 update_screen(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int screen_shift);
227234   UINT32 screen_update_cybertnk_left(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
228235   UINT32 screen_update_cybertnk_right(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
229   required_device<cpu_device> m_maincpu;
230   required_device<cpu_device> m_audiocpu;
231   required_device<gfxdecode_device> m_gfxdecode;
232   required_device<palette_device> m_palette;
233236};
234237
235238/* tile format
r32773r32774
293296
294297
295298
296static void draw_road(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int screen_shift, int pri)
299void cybertnk_state::draw_road(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int screen_shift, int pri)
297300{
298   cybertnk_state *state = screen.machine().driver_data<cybertnk_state>();
299   int i;
300   gfx_element *gfx = state->m_gfxdecode->gfx(3);
301   gfx_element *gfx = m_gfxdecode->gfx(3);
301302
302303
303   for (i=0;i<0x1000/4;i+=4)
304   for (int i = 0; i < 0x1000/4; i+=4)
304305   {
305      UINT16 param1 = state->m_roadram[i+2];
306      UINT16 param2 = state->m_roadram[i+1];
307      UINT16 param3 = state->m_roadram[i+0];
306      UINT16 param1 = m_roadram[i+2];
307      UINT16 param2 = m_roadram[i+1];
308      UINT16 param3 = m_roadram[i+0];
308309
309310      int col = (param2 & 0x3f);
310311
r32773r32774
319320}
320321
321322// check if these are similar / the same as weclemans
322static void draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int screen_shift)
323void cybertnk_state::draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int screen_shift)
323324{
324   cybertnk_state *state = screen.machine().driver_data<cybertnk_state>();
325   const UINT32 *sprrom = (UINT32*)screen.memregion(":spr_gfx")->base();
326   const pen_t *paldata = state->m_palette->pens();
325   const UINT32 *sprrom = (UINT32*)memregion("spr_gfx")->base();
326   const pen_t *paldata = m_palette->pens();
327327
328328   int miny = cliprect.min_y;
329329   int maxy = cliprect.max_y;
r32773r32774
355355
356356   for(int offs=0;offs<0x1000/2;offs+=8)
357357   {
358      if ((state->m_spr_ram[offs+0x0] & 8) == 0)
358      if ((m_spr_ram[offs+0x0] & 8) == 0)
359359         continue;
360360
361      int x = (state->m_spr_ram[offs+0x5] & 0x3ff);
361      int x = (m_spr_ram[offs+0x5] & 0x3ff);
362362      if (x&0x200) x-=0x400;
363363
364      int y = (state->m_spr_ram[offs+0x2] & 0x1ff);
364      int y = (m_spr_ram[offs+0x2] & 0x1ff);
365365      if (y&0x100) y-=0x200;
366366
367367
368      UINT32 spr_offs = (((state->m_spr_ram[offs+0x0] & 7) << 16) | (state->m_spr_ram[offs+0x1]));
369      int xsize = ((state->m_spr_ram[offs+0x6] & 0x000f)+1) << 3;
370      int ysize = (state->m_spr_ram[offs+0x4] & 0x00ff)+1;
371      int fx = (state->m_spr_ram[offs+0x5] & 0x8000) >> 15;
372      int zoom = (state->m_spr_ram[offs+0x6] & 0xff00) >> 8;
368      UINT32 spr_offs = (((m_spr_ram[offs+0x0] & 7) << 16) | (m_spr_ram[offs+0x1]));
369      int xsize = ((m_spr_ram[offs+0x6] & 0x000f)+1) << 3;
370      int ysize = (m_spr_ram[offs+0x4] & 0x00ff)+1;
371      int fx = (m_spr_ram[offs+0x5] & 0x8000) >> 15;
372      int zoom = (m_spr_ram[offs+0x6] & 0xff00) >> 8;
373373
374374
375      int col_bank = (state->m_spr_ram[offs+0x0] & 0xff00) >> 8;
375      int col_bank = (m_spr_ram[offs+0x0] & 0xff00) >> 8;
376376
377377      int xf = 0;
378378      int yf = 0;
r32773r32774
472472}
473473
474474
475static UINT32 update_screen(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int screen_shift)
475UINT32 cybertnk_state::update_screen(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int screen_shift)
476476{
477   cybertnk_state *state = screen.machine().driver_data<cybertnk_state>();
477   m_tilemap0_tilemap->set_scrolldx(screen_shift, screen_shift);
478   m_tilemap1_tilemap->set_scrolldx(screen_shift, screen_shift);
479   m_tilemap2_tilemap->set_scrolldx(screen_shift, screen_shift);
478480
479   state->m_tilemap0_tilemap->set_scrolldx(screen_shift, screen_shift);
480   state->m_tilemap1_tilemap->set_scrolldx(screen_shift, screen_shift);
481   state->m_tilemap2_tilemap->set_scrolldx(screen_shift, screen_shift);
481   m_tilemap1_tilemap->set_scrolly(m_tilemap1scroll[2]);
482   m_tilemap2_tilemap->set_scrolly(m_tilemap2scroll[2]);
482483
483   state->m_tilemap1_tilemap->set_scrolly(state->m_tilemap1scroll[2]);
484   state->m_tilemap2_tilemap->set_scrolly(state->m_tilemap2scroll[2]);
484   m_tilemap1_tilemap->set_scrollx(m_tilemap1scroll[0]);
485   m_tilemap2_tilemap->set_scrollx(m_tilemap2scroll[0]);
485486
486   state->m_tilemap1_tilemap->set_scrollx(state->m_tilemap1scroll[0]);
487   state->m_tilemap2_tilemap->set_scrollx(state->m_tilemap2scroll[0]);
488487
489488
489   bitmap.fill(m_palette->black_pen(), cliprect);
490490
491   bitmap.fill(state->m_palette->black_pen(), cliprect);
492491
493
494492   draw_road(screen,bitmap,cliprect,screen_shift, 0x00);
495493
496   state->m_tilemap2_tilemap->draw(screen, bitmap, cliprect, 0,0);
497   state->m_tilemap1_tilemap->draw(screen, bitmap, cliprect, 0,0);
494   m_tilemap2_tilemap->draw(screen, bitmap, cliprect, 0,0);
495   m_tilemap1_tilemap->draw(screen, bitmap, cliprect, 0,0);
498496
499497   draw_road(screen,bitmap,cliprect,screen_shift, 0x80);
500498
501499   draw_sprites(screen,bitmap,cliprect,screen_shift);
502500
503   state->m_tilemap0_tilemap->draw(screen, bitmap, cliprect, 0,0);
501   m_tilemap0_tilemap->draw(screen, bitmap, cliprect, 0,0);
504502
505503
506504   return 0;
trunk/src/mame/drivers/nightgal.c
r32773r32774
367367-executes a wai (i.e. halt) opcode then expects to receive another irq...
368368*/
369369
370#define MAIN_Z80_RUN   if(offset == 2) state->m_z80_latch = 0x00
371#define MAIN_Z80_HALT  if(offset == 2) state->m_z80_latch = 0x80
372//#define SUB_NCS_RUN state->m_ncs_latch = 0x00
373//#define SUB_NCS_HALT state->m_ncs_latch = 0x80
370#define MAIN_Z80_RUN   if(offset == 2) m_z80_latch = 0x00
371#define MAIN_Z80_HALT  if(offset == 2) m_z80_latch = 0x80
372//#define SUB_NCS_RUN m_ncs_latch = 0x00
373//#define SUB_NCS_HALT m_ncs_latch = 0x80
374374#ifdef UNUSED_CODE
375375WRITE8_MEMBER(nightgal_state::nsc_latch_w)
376376{
trunk/src/mame/drivers/atarigt.c
r32773r32774
312312      /* status register; the code spins on this waiting for the high bit to be set */
313313      case 0xdb8700:
314314      case 0xdb87c0:
315//          if (state->m_protmode != 0)
315//          if (m_protmode != 0)
316316         {
317317            *data = -1;//0x8000;
318318         }
trunk/src/mame/drivers/model2.c
r32773r32774
247247
248248   m_copro_fifoout_num--;
249249
250//  logerror("COPRO FIFOOUT POP %08X, %f, %d\n", r, *(float*)&r,state->m_copro_fifoout_num);
250//  logerror("COPRO FIFOOUT POP %08X, %f, %d\n", r, *(float*)&r,m_copro_fifoout_num);
251251
252252   // set SHARC flag 1: 0 if space available, 1 if FIFO full
253253   if (m_dsp_type == DSP_TYPE_SHARC)
r32773r32774
272272      fatalerror("Copro FIFOOUT overflow (at %08X)\n", device->safe_pc());
273273   }
274274
275//  logerror("COPRO FIFOOUT PUSH %08X, %f, %d\n", data, *(float*)&data,state->m_copro_fifoout_num);
275//  logerror("COPRO FIFOOUT PUSH %08X, %f, %d\n", data, *(float*)&data,m_copro_fifoout_num);
276276
277277   m_copro_fifoout_data[m_copro_fifoout_wpos++] = data;
278278   if (m_copro_fifoout_wpos == COPRO_FIFOOUT_SIZE)
trunk/src/mame/drivers/hng64.c
r32773r32774
568568}
569569
570570/* preliminary dma code, dma is used to copy program code -> ram */
571static void hng64_do_dma(address_space &space)
571void hng64_state::do_dma(address_space &space)
572572{
573   hng64_state *state = space.machine().driver_data<hng64_state>();
573   //printf("Performing DMA Start %08x Len %08x Dst %08x\n", m_dma_start, m_dma_len, m_dma_dst);
574574
575   //printf("Performing DMA Start %08x Len %08x Dst %08x\n", state->m_dma_start, state->m_dma_len, state->m_dma_dst);
576
577   while (state->m_dma_len >= 0)
575   while (m_dma_len >= 0)
578576   {
579577      UINT32 dat;
580578
581      dat = space.read_dword(state->m_dma_start);
582      space.write_dword(state->m_dma_dst, dat);
583      state->m_dma_start += 4;
584      state->m_dma_dst += 4;
585      state->m_dma_len--;
579      dat = space.read_dword(m_dma_start);
580      space.write_dword(m_dma_dst, dat);
581      m_dma_start += 4;
582      m_dma_dst += 4;
583      m_dma_len--;
586584   }
587585}
588586
r32773r32774
626624      case 0x1214: m_dma_dst = m_sysregs[offset]; break;
627625      case 0x1224:
628626         m_dma_len = m_sysregs[offset];
629         hng64_do_dma(space);
627         do_dma(space);
630628         break;
631629      //default:
632630      //  printf("HNG64 writing to SYSTEM Registers 0x%08x == 0x%08x. (PC=%08x)\n", offset*4, m_sysregs[offset], space.device().safe_pc());
trunk/src/mame/machine/midyunit.c
r32773r32774
241241}
242242
243243
244static void init_generic(running_machine &machine, int bpp, int sound, int prot_start, int prot_end)
244void midyunit_state::init_generic(int bpp, int sound, int prot_start, int prot_end)
245245{
246   midyunit_state *state = machine.driver_data<midyunit_state>();
247   offs_t gfx_chunk = state->m_gfx_rom.bytes() / 4;
246   offs_t gfx_chunk = m_gfx_rom.bytes() / 4;
248247   UINT8 d1, d2, d3, d4, d5, d6;
249248   UINT8 *base;
250249   int i;
251250
252251   /* load graphics ROMs */
253   base = state->memregion("gfx1")->base();
252   base = memregion("gfx1")->base();
254253   switch (bpp)
255254   {
256255      case 4:
257         for (i = 0; i < state->m_gfx_rom.bytes(); i += 2)
256         for (i = 0; i < m_gfx_rom.bytes(); i += 2)
258257         {
259258            d1 = ((base[0 * gfx_chunk + (i + 0) / 4]) >> (2 * ((i + 0) % 4))) & 3;
260259            d2 = ((base[1 * gfx_chunk + (i + 0) / 4]) >> (2 * ((i + 0) % 4))) & 3;
261260            d3 = ((base[0 * gfx_chunk + (i + 1) / 4]) >> (2 * ((i + 1) % 4))) & 3;
262261            d4 = ((base[1 * gfx_chunk + (i + 1) / 4]) >> (2 * ((i + 1) % 4))) & 3;
263262
264            state->m_gfx_rom[i + 0] = d1 | (d2 << 2);
265            state->m_gfx_rom[i + 1] = d3 | (d4 << 2);
263            m_gfx_rom[i + 0] = d1 | (d2 << 2);
264            m_gfx_rom[i + 1] = d3 | (d4 << 2);
266265         }
267266         break;
268267
269268      case 6:
270         for (i = 0; i < state->m_gfx_rom.bytes(); i += 2)
269         for (i = 0; i < m_gfx_rom.bytes(); i += 2)
271270         {
272271            d1 = ((base[0 * gfx_chunk + (i + 0) / 4]) >> (2 * ((i + 0) % 4))) & 3;
273272            d2 = ((base[1 * gfx_chunk + (i + 0) / 4]) >> (2 * ((i + 0) % 4))) & 3;
r32773r32774
276275            d5 = ((base[1 * gfx_chunk + (i + 1) / 4]) >> (2 * ((i + 1) % 4))) & 3;
277276            d6 = ((base[2 * gfx_chunk + (i + 1) / 4]) >> (2 * ((i + 1) % 4))) & 3;
278277
279            state->m_gfx_rom[i + 0] = d1 | (d2 << 2) | (d3 << 4);
280            state->m_gfx_rom[i + 1] = d4 | (d5 << 2) | (d6 << 4);
278            m_gfx_rom[i + 0] = d1 | (d2 << 2) | (d3 << 4);
279            m_gfx_rom[i + 1] = d4 | (d5 << 2) | (d6 << 4);
281280         }
282281         break;
283282
284283      case 8:
285         for (i = 0; i < state->m_gfx_rom.bytes(); i += 4)
284         for (i = 0; i < m_gfx_rom.bytes(); i += 4)
286285         {
287            state->m_gfx_rom[i + 0] = base[0 * gfx_chunk + i / 4];
288            state->m_gfx_rom[i + 1] = base[1 * gfx_chunk + i / 4];
289            state->m_gfx_rom[i + 2] = base[2 * gfx_chunk + i / 4];
290            state->m_gfx_rom[i + 3] = base[3 * gfx_chunk + i / 4];
286            m_gfx_rom[i + 0] = base[0 * gfx_chunk + i / 4];
287            m_gfx_rom[i + 1] = base[1 * gfx_chunk + i / 4];
288            m_gfx_rom[i + 2] = base[2 * gfx_chunk + i / 4];
289            m_gfx_rom[i + 3] = base[3 * gfx_chunk + i / 4];
291290         }
292291         break;
293292   }
294293
295294   /* load sound ROMs and set up sound handlers */
296   state->m_chip_type = sound;
295   m_chip_type = sound;
297296   switch (sound)
298297   {
299298      case SOUND_CVSD_SMALL:
300         machine.device("cvsd:cpu")->memory().space(AS_PROGRAM).install_write_handler(prot_start, prot_end, write8_delegate(FUNC(midyunit_state::cvsd_protection_w),state));
301         state->m_cvsd_protection_base = machine.root_device().memregion("cvsd:cpu")->base() + 0x10000 + (prot_start - 0x8000);
299         machine().device("cvsd:cpu")->memory().space(AS_PROGRAM).install_write_handler(prot_start, prot_end, write8_delegate(FUNC(midyunit_state::cvsd_protection_w), this));
300         m_cvsd_protection_base = memregion("cvsd:cpu")->base() + 0x10000 + (prot_start - 0x8000);
302301         break;
303302
304303      case SOUND_CVSD:
305         machine.device("cvsd:cpu")->memory().space(AS_PROGRAM).install_ram(prot_start, prot_end);
304         machine().device("cvsd:cpu")->memory().space(AS_PROGRAM).install_ram(prot_start, prot_end);
306305         break;
307306
308307      case SOUND_ADPCM:
309         machine.device("adpcm:cpu")->memory().space(AS_PROGRAM).install_ram(prot_start, prot_end);
308         machine().device("adpcm:cpu")->memory().space(AS_PROGRAM).install_ram(prot_start, prot_end);
310309         break;
311310
312311      case SOUND_NARC:
313         machine.device("narcsnd:cpu0")->memory().space(AS_PROGRAM).install_ram(prot_start, prot_end);
312         machine().device("narcsnd:cpu0")->memory().space(AS_PROGRAM).install_ram(prot_start, prot_end);
314313         break;
315314
316315      case SOUND_YAWDIM:
r32773r32774
332331DRIVER_INIT_MEMBER(midyunit_state,narc)
333332{
334333   /* common init */
335   init_generic(machine(), 8, SOUND_NARC, 0xcdff, 0xce29);
334   init_generic(8, SOUND_NARC, 0xcdff, 0xce29);
336335}
337336
338337
r32773r32774
362361   m_prot_data = &trog_protection_data;
363362
364363   /* common init */
365   init_generic(machine(), 4, SOUND_CVSD_SMALL, 0x9eaf, 0x9ed9);
364   init_generic(4, SOUND_CVSD_SMALL, 0x9eaf, 0x9ed9);
366365}
367366
368367
r32773r32774
371370DRIVER_INIT_MEMBER(midyunit_state,smashtv)
372371{
373372   /* common init */
374   init_generic(machine(), 6, SOUND_CVSD_SMALL, 0x9cf6, 0x9d21);
373   init_generic(6, SOUND_CVSD_SMALL, 0x9cf6, 0x9d21);
375374}
376375
377376
r32773r32774
389388   m_prot_data = &hiimpact_protection_data;
390389
391390   /* common init */
392   init_generic(machine(), 6, SOUND_CVSD, 0x9b79, 0x9ba3);
391   init_generic(6, SOUND_CVSD, 0x9b79, 0x9ba3);
393392}
394393
395394
r32773r32774
407406   m_prot_data = &shimpact_protection_data;
408407
409408   /* common init */
410   init_generic(machine(), 6, SOUND_CVSD, 0x9c06, 0x9c15);
409   init_generic(6, SOUND_CVSD, 0x9c06, 0x9c15);
411410}
412411
413412
r32773r32774
423422   m_prot_data = &strkforc_protection_data;
424423
425424   /* common init */
426   init_generic(machine(), 4, SOUND_CVSD_SMALL, 0x9f7d, 0x9fa7);
425   init_generic(4, SOUND_CVSD_SMALL, 0x9f7d, 0x9fa7);
427426}
428427
429428
r32773r32774
452451   m_prot_data = &mk_protection_data;
453452
454453   /* common init */
455   init_generic(machine(), 6, SOUND_ADPCM, 0xfb9c, 0xfbc6);
454   init_generic(6, SOUND_ADPCM, 0xfb9c, 0xfbc6);
456455}
457456
458457DRIVER_INIT_MEMBER(midyunit_state,mkyawdim)
459458{
460459   /* common init */
461   init_generic(machine(), 6, SOUND_YAWDIM, 0, 0);
460   init_generic(6, SOUND_YAWDIM, 0, 0);
462461}
463462
464463
r32773r32774
485484
486485/********************** Terminator 2 **********************/
487486
488static void term2_init_common(running_machine &machine, write16_delegate hack_w)
487void midyunit_state::term2_init_common(write16_delegate hack_w)
489488{
490   midyunit_state *state = machine.driver_data<midyunit_state>();
491489   /* protection */
492490   static const struct protection_data term2_protection_data =
493491   {
494492      { 0x0f00, 0x0f00, 0x0f00 },
495493      { 0x4000, 0xf000, 0xa000 }
496494   };
497   state->m_prot_data = &term2_protection_data;
495   m_prot_data = &term2_protection_data;
498496
499497   /* common init */
500   init_generic(machine, 6, SOUND_ADPCM, 0xfa8d, 0xfa9c);
498   init_generic(6, SOUND_ADPCM, 0xfa8d, 0xfa9c);
501499
502500   /* special inputs */
503   state->m_maincpu->space(AS_PROGRAM).install_read_handler(0x01c00000, 0x01c0005f, read16_delegate(FUNC(midyunit_state::term2_input_r),state));
504   state->m_maincpu->space(AS_PROGRAM).install_write_handler(0x01e00000, 0x01e0001f, write16_delegate(FUNC(midyunit_state::term2_sound_w),state));
501   m_maincpu->space(AS_PROGRAM).install_read_handler(0x01c00000, 0x01c0005f, read16_delegate(FUNC(midyunit_state::term2_input_r), this));
502   m_maincpu->space(AS_PROGRAM).install_write_handler(0x01e00000, 0x01e0001f, write16_delegate(FUNC(midyunit_state::term2_sound_w), this));
505503
506504   /* HACK: this prevents the freeze on the movies */
507505   /* until we figure whats causing it, this is better than nothing */
508   state->m_t2_hack_mem = state->m_maincpu->space(AS_PROGRAM).install_write_handler(0x010aa0e0, 0x010aa0ff, hack_w);
506   m_t2_hack_mem = m_maincpu->space(AS_PROGRAM).install_write_handler(0x010aa0e0, 0x010aa0ff, hack_w);
509507}
510508
511DRIVER_INIT_MEMBER(midyunit_state,term2)    { term2_init_common(machine(), write16_delegate(FUNC(midyunit_state::term2_hack_w),this)); }
512DRIVER_INIT_MEMBER(midyunit_state,term2la3) { term2_init_common(machine(), write16_delegate(FUNC(midyunit_state::term2la3_hack_w),this)); }
513DRIVER_INIT_MEMBER(midyunit_state,term2la2) { term2_init_common(machine(), write16_delegate(FUNC(midyunit_state::term2la2_hack_w),this)); }
514DRIVER_INIT_MEMBER(midyunit_state,term2la1) { term2_init_common(machine(), write16_delegate(FUNC(midyunit_state::term2la1_hack_w),this)); }
509DRIVER_INIT_MEMBER(midyunit_state,term2)    { term2_init_common(write16_delegate(FUNC(midyunit_state::term2_hack_w),this)); }
510DRIVER_INIT_MEMBER(midyunit_state,term2la3) { term2_init_common(write16_delegate(FUNC(midyunit_state::term2la3_hack_w),this)); }
511DRIVER_INIT_MEMBER(midyunit_state,term2la2) { term2_init_common(write16_delegate(FUNC(midyunit_state::term2la2_hack_w),this)); }
512DRIVER_INIT_MEMBER(midyunit_state,term2la1) { term2_init_common(write16_delegate(FUNC(midyunit_state::term2la1_hack_w),this)); }
515513
516514
517515
r32773r32774
529527   m_prot_data = &totcarn_protection_data;
530528
531529   /* common init */
532   init_generic(machine(), 6, SOUND_ADPCM, 0xfc04, 0xfc2e);
530   init_generic(6, SOUND_ADPCM, 0xfc04, 0xfc2e);
533531}
534532
535533
trunk/src/mame/includes/midyunit.h
r32773r32774
134134protected:
135135   virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
136136   void dma_draw(UINT16 command);
137   void init_generic(int bpp, int sound, int prot_start, int prot_end);
138   void term2_init_common(write16_delegate hack_w);
137139};
trunk/src/mame/includes/hng64.h
r32773r32774
217217   UINT32 screen_update_hng64(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
218218   void screen_eof_hng64(screen_device &screen, bool state);
219219   TIMER_DEVICE_CALLBACK_MEMBER(hng64_irq);
220   void do_dma(address_space &space);
220221
221222
222223   DECLARE_CUSTOM_INPUT_MEMBER(left_handle_r);
trunk/src/mame/includes/exidy440.h
r32773r32774
7979   virtual void machine_reset();
8080   DECLARE_VIDEO_START(exidy440);
8181   DECLARE_VIDEO_START(topsecex);
82   void draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int scroll_offset, int check_collision);
83   void update_screen(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect,   int scroll_offset, int check_collision);
8284   UINT32 screen_update_exidy440(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
8385   UINT32 screen_update_topsecex(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
8486   INTERRUPT_GEN_MEMBER(exidy440_vblank_interrupt);
trunk/src/mame/video/exidy440.c
r32773r32774
284284 *
285285 *************************************/
286286
287static void draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect,
288                     int scroll_offset, int check_collision)
287void exidy440_state::draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int scroll_offset, int check_collision)
289288{
290   exidy440_state *state = screen.machine().driver_data<exidy440_state>();
291   int i;
292
293289   /* get a pointer to the palette to look for collision flags */
294   UINT8 *palette = &state->m_local_paletteram[state->m_palettebank_vis * 512];
290   UINT8 *palette = &m_local_paletteram[m_palettebank_vis * 512];
295291   int count = 0;
296292
297293   /* draw the sprite images, checking for collisions along the way */
298   UINT8 *sprite = state->m_spriteram + (SPRITE_COUNT - 1) * 4;
294   UINT8 *sprite = m_spriteram + (SPRITE_COUNT - 1) * 4;
299295
300   for (i = 0; i < SPRITE_COUNT; i++, sprite -= 4)
296   for (int i = 0; i < SPRITE_COUNT; i++, sprite -= 4)
301297   {
302298      int image = (~sprite[3] & 0x3f);
303299      int xoffs = (~((sprite[1] << 8) | sprite[2]) & 0x1ff);
r32773r32774
310306         continue;
311307
312308      /* get a pointer to the source image */
313      src = &state->m_imageram[image * 128];
309      src = &m_imageram[image * 128];
314310
315311      /* account for large positive offsets meaning small negative values */
316312      if (xoffs >= 0x1ff - 16)
r32773r32774
333329         /* only draw scanlines that are in this cliprect */
334330         if (yoffs <= cliprect.max_y)
335331         {
336            UINT8 *old = &state->m_local_videoram[sy * 512 + xoffs];
332            UINT8 *old = &m_local_videoram[sy * 512 + xoffs];
337333            int currx = xoffs;
338334
339335            /* loop over x */
r32773r32774
353349
354350                  /* check the collisions bit */
355351                  if (check_collision && (palette[2 * pen] & 0x80) && (count++ < 128))
356                     screen.machine().scheduler().timer_set(screen.time_until_pos(yoffs, currx), timer_expired_delegate(FUNC(exidy440_state::collide_firq_callback),state), currx);
352                     screen.machine().scheduler().timer_set(screen.time_until_pos(yoffs, currx), timer_expired_delegate(FUNC(exidy440_state::collide_firq_callback), this), currx);
357353               }
358354               currx++;
359355
r32773r32774
366362
367363                  /* check the collisions bit */
368364                  if (check_collision && (palette[2 * pen] & 0x80) && (count++ < 128))
369                     screen.machine().scheduler().timer_set(screen.time_until_pos(yoffs, currx), timer_expired_delegate(FUNC(exidy440_state::collide_firq_callback),state), currx);
365                     screen.machine().scheduler().timer_set(screen.time_until_pos(yoffs, currx), timer_expired_delegate(FUNC(exidy440_state::collide_firq_callback), this), currx);
370366               }
371367               currx++;
372368            }
r32773r32774
385381 *
386382 *************************************/
387383
388static void update_screen(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect,
389                     int scroll_offset, int check_collision)
384void exidy440_state::update_screen(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect,   int scroll_offset, int check_collision)
390385{
391   exidy440_state *state = screen.machine().driver_data<exidy440_state>();
392   int y, sy;
393
394386   /* draw any dirty scanlines from the VRAM directly */
395   sy = scroll_offset + cliprect.min_y;
396   for (y = cliprect.min_y; y <= cliprect.max_y; y++, sy++)
387   int sy = scroll_offset + cliprect.min_y;
388   for (int y = cliprect.min_y; y <= cliprect.max_y; y++, sy++)
397389   {
398390      /* wrap at the bottom of the screen */
399391      if (sy >= VBSTART)
400392         sy -= (VBSTART - VBEND);
401393
402394      /* draw line */
403      draw_scanline8(bitmap, 0, y, (HBSTART - HBEND), &state->m_local_videoram[sy * 512], NULL);
395      draw_scanline8(bitmap, 0, y, (HBSTART - HBEND), &m_local_videoram[sy * 512], NULL);
404396   }
405397
406398   /* draw the sprites */
trunk/src/mame/video/konamigx.c
r32773r32774
16491649{
16501650   int r,g,b;
16511651
1652   COMBINE_DATA(&state->m_subpaletteram32[offset]);
1652   COMBINE_DATA(&m_subpaletteram32[offset]);
16531653
1654   r = (state->m_subpaletteram32[offset] >>16) & 0xff;
1655   g = (state->m_subpaletteram32[offset] >> 8) & 0xff;
1656   b = (state->m_subpaletteram32[offset] >> 0) & 0xff;
1654   r = (m_subpaletteram32[offset] >>16) & 0xff;
1655   g = (m_subpaletteram32[offset] >> 8) & 0xff;
1656   b = (m_subpaletteram32[offset] >> 0) & 0xff;
16571657
16581658   offset += (0x8000/4);
16591659
r32773r32774
16831683WRITE32_MEMBER(konamigx_state::konamigx_555_palette2_w)
16841684{
16851685   UINT32 coldat;
1686   COMBINE_DATA(&state->m_subpaletteram32[offset]);
1687   coldat = state->m_subpaletteram32[offset];
1686   COMBINE_DATA(&m_subpaletteram32[offset]);
1687   coldat = m_subpaletteram32[offset];
16881688
16891689   offset += (0x4000/4);
16901690
trunk/src/mame/video/cps1.c
r32773r32774
25962596   if (m_objram_bank & 1)
25972597      baseptr ^= 0x0080;
25982598
2599//popmessage("%04x %d", cps2_port(machine, CPS2_OBJ_BASE), state->m_objram_bank & 1);
2599//popmessage("%04x %d", cps2_port(machine, CPS2_OBJ_BASE), m_objram_bank & 1);
26002600
26012601   if (baseptr == 0x7000)
26022602      return m_objram1;
trunk/src/mame/video/nycaptor.c
r32773r32774
181181   x - no bg/sprite pri.
182182*/
183183
184#define mKEY_MASK(x,y) if (machine.input().code_pressed_once(x)) { state->m_mask |= y; state->m_bg_tilemap->mark_all_dirty(); }
184#define mKEY_MASK(x,y) if (machine().input().code_pressed_once(x)) { m_mask |= y; m_bg_tilemap->mark_all_dirty(); }
185185
186186void nycaptor_state::nycaptor_setmask(  )
187187{
r32773r32774
207207UINT32 nycaptor_state::screen_update_nycaptor(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
208208{
209209#if NYCAPTOR_DEBUG
210   nycaptor_setmask(machine());
210   nycaptor_setmask();
211211   if (m_mask & 0x1000)
212212   {
213213      m_bg_tilemap->draw(screen, bitmap, cliprect, TILEMAP_DRAW_LAYER1 | 3, 0);
r32773r32774
218218      m_bg_tilemap->draw(screen, bitmap, cliprect, TILEMAP_DRAW_LAYER0 | 1, 0);
219219      m_bg_tilemap->draw(screen, bitmap, cliprect, TILEMAP_DRAW_LAYER1 | 0, 0);
220220      m_bg_tilemap->draw(screen, bitmap, cliprect, TILEMAP_DRAW_LAYER0 | 0, 0);
221      draw_sprites(machine(), bitmap, cliprect, 0);
222      draw_sprites(machine(), bitmap, cliprect, 1);
223      draw_sprites(machine(), bitmap, cliprect, 2);
224      draw_sprites(machine(), bitmap, cliprect, 3);
225      draw_sprites(machine(), bitmap, cliprect, 4);
226      draw_sprites(machine(), bitmap, cliprect, 5);
227      draw_sprites(machine(), bitmap, cliprect, 6);
228      draw_sprites(machine(), bitmap, cliprect, 7);
221      draw_sprites(bitmap, cliprect, 0);
222      draw_sprites(bitmap, cliprect, 1);
223      draw_sprites(bitmap, cliprect, 2);
224      draw_sprites(bitmap, cliprect, 3);
225      draw_sprites(bitmap, cliprect, 4);
226      draw_sprites(bitmap, cliprect, 5);
227      draw_sprites(bitmap, cliprect, 6);
228      draw_sprites(bitmap, cliprect, 7);
229229   }
230230   else
231231#endif
trunk/src/mame/video/segas32.c
r32773r32774
878878
879879   /* configure the layer */
880880   opaque = 0;
881//opaque = (state->m_system32_videoram[0x1ff8e/2] >> (8 + bgnum)) & 1;
881//opaque = (m_system32_videoram[0x1ff8e/2] >> (8 + bgnum)) & 1;
882882//if (screen.machine().input().code_pressed(KEYCODE_Z) && bgnum == 0) opaque = 1;
883883//if (screen.machine().input().code_pressed(KEYCODE_X) && bgnum == 1) opaque = 1;
884884

Previous 199869 Revisions Next


© 1997-2024 The MAME Team