Previous 199869 Revisions Next

r21616 Wednesday 6th March, 2013 at 00:10:35 UTC by Angelo Salese
Some misc changes
[src/mess/drivers]casloopy.c

trunk/src/mess/drivers/casloopy.c
r21615r21616
184184};
185185
186186
187static const gfx_layout casloopy_tile_layout =
187static const gfx_layout casloopy_4bpp_layout =
188188{
189189   8,8,
190190   0x10000/32,
191191   4,
192   { 0, 1, 2, 3 },
192   { STEP4(0, 1) },
193193   { STEP8(0, 4) },
194194   { STEP8(0, 4*8) },
195195   4*8*8
196196};
197197
198static const gfx_layout casloopy_8bpp_layout =
199{
200   8,8,
201   0x10000/64,
202   8,
203   { STEP8(0, 1) },
204   { STEP8(0, 8) },
205   { STEP8(0, 8*8) },
206   8*8*8
207};
208
198209void casloopy_state::video_start()
199210{
200211   /* TODO: proper sizes */
r21615r21616
206217      if (machine().gfx[m_gfx_index] == 0)
207218         break;
208219
209   machine().gfx[m_gfx_index] = auto_alloc(machine(), gfx_element(machine(), casloopy_tile_layout, m_vram, 0x10, 0));
220   machine().gfx[m_gfx_index] = auto_alloc(machine(), gfx_element(machine(), casloopy_4bpp_layout, m_vram, 0x10, 0));
221   machine().gfx[m_gfx_index+1] = auto_alloc(machine(), gfx_element(machine(), casloopy_8bpp_layout, m_vram, 0x10, 0));
222
210223}
211224
212225UINT32 casloopy_state::screen_update_casloopy(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
r21615r21616
251264
252265         pix = m_bitmap_vram[count];
253266         if(pix)
254            bitmap.pix16(y, x) = pix;
267            bitmap.pix16(y, x) = pix + 0x100;
255268
256269         count++;
257270      }
r21615r21616
270283   if(offset == 2/2)
271284      return machine().rand();/*(machine().primary_screen->hblank() << 8) | (machine().primary_screen->hpos() & 0xff);*/ // hblank + hpos?
272285
286   if(offset == 0/2)
287      return machine().rand(); // pccllect
288
273289   printf("%08x\n",offset*2);
274290
275291   return 0xffff;
r21615r21616
308324   m_vram[offset] = data;
309325
310326   machine().gfx[m_gfx_index]->mark_dirty(offset/32);
327   machine().gfx[m_gfx_index+1]->mark_dirty(offset/64);
311328}
312329
313330/* TODO: all of this should be internal to the SH core, this is just to check what it enables. */
r21615r21616
329346      size = (sh7021_regs[0x4a/2]&0xffff);
330347      type = (sh7021_regs[0x4e/2]&0xffff);
331348
332      printf("%08x %08x %04x %04x\n",src & 0x7ffffff,dst & 0x7ffffff,size,type);
349      printf("0 %08x %08x %04x %04x\n",src & 0x7ffffff,dst & 0x7ffffff,size,type);
333350
334351      sh7021_regs[0x4e/2]&=0xfffe;
335352   }
336353
354   if(offset == 0x7e/2)
355   {
356      UINT32 src,dst,size,type;
357
358      src = (sh7021_regs[0x70/2]<<16)|(sh7021_regs[0x72/2]&0xffff);
359      dst = (sh7021_regs[0x74/2]<<16)|(sh7021_regs[0x76/2]&0xffff);
360      size = (sh7021_regs[0x7a/2]&0xffff);
361      type = (sh7021_regs[0x7e/2]&0xffff);
362
363      printf("%08x %08x %04x %04x\n",src & 0x7ffffff,dst & 0x7ffffff,size,type);
364
365      sh7021_regs[0x7e/2]&=0xfffe;
366   }
367
337368//   printf("%08x %04x\n",sh7021_regs[offset],0x05ffff00+offset*2);
338369}
339370

Previous 199869 Revisions Next


© 1997-2024 The MAME Team