Previous 199869 Revisions Next

r21619 Wednesday 6th March, 2013 at 03:00:31 UTC by Angelo Salese
Check-point
[src/mess/drivers]casloopy.c

trunk/src/mess/drivers/casloopy.c
r21618r21619
158158public:
159159   casloopy_state(const machine_config &mconfig, device_type type, const char *tag)
160160      : driver_device(mconfig, type, tag) ,
161      m_bios_rom(*this, "bios_rom"){ }
161      m_bios_rom(*this, "bios_rom"),
162      m_vregs(*this, "vregs")
163      { }
162164
163165   required_shared_ptr<UINT32> m_bios_rom;
166   required_shared_ptr<UINT32> m_vregs;
164167   UINT16 *m_paletteram;
165168   UINT8 *m_vram;
166169   UINT8 *m_bitmap_vram;
r21618r21619
228231   int x,y;
229232   int count;
230233
231   count = 0;
234   static int test;
232235
236   if(machine().input().code_pressed(KEYCODE_Z))
237      test+=0x100;
238
239   if(machine().input().code_pressed(KEYCODE_X))
240      test-=0x100;
241
242   popmessage("%08x",test);
243
244   #if 0
245   int r,g,b;
246
247   r = pal5bit((m_vregs[0x4/4] >> 10) & 0x1f);
248   g = pal5bit((m_vregs[0x4/4] >> 5) & 0x1f);
249   b = pal5bit((m_vregs[0x4/4] >> 0) & 0x1f);
250   palette_set_color(machine(),0x100,MAKE_RGB(r^0xff,g^0xff,b^0xff));
251   bitmap.fill( 0x100 ,cliprect);
252   #endif
253
254   count = test;
233255   for (y=0;y<32;y++)
234256   {
235257      for (x=0;x<32;x++)
r21618r21619
238260
239261         tile &= 0x3ff; //???
240262
241         drawgfx_opaque(bitmap,cliprect,gfx,tile,7,0,0,x*8,y*8);
263         drawgfx_transpen(bitmap,cliprect,gfx,tile,7,0,0,x*8,y*8,-1);
242264
243265         count+=2;
244266      }
245267   }
246268
247   static int test;
248
249   if(machine().input().code_pressed(KEYCODE_Z))
250      test+=0x100;
251
252   if(machine().input().code_pressed(KEYCODE_X))
253      test-=0x100;
254
255   popmessage("%08x",test);
256
257269   count = test;
258270
259271   for (y=cliprect.min_y;y<cliprect.max_y;y++)
r21618r21619
360372      size = (sh7021_regs[0x7a/2]&0xffff);
361373      type = (sh7021_regs[0x7e/2]&0xffff);
362374
363      printf("%08x %08x %04x %04x\n",src & 0x7ffffff,dst & 0x7ffffff,size,type);
375      printf("3 %08x %08x %04x %04x\n",src & 0x7ffffff,dst & 0x7ffffff,size,type);
364376
365377      sh7021_regs[0x7e/2]&=0xfffe;
366378   }
r21618r21619
383395   AM_RANGE(0x01000000, 0x0107ffff) AM_RAM AM_SHARE("wram")// stack pointer points here
384396   AM_RANGE(0x04000000, 0x0401ffff) AM_READWRITE8(casloopy_bitmap_r,casloopy_bitmap_w,0xffffffff)
385397   AM_RANGE(0x04040000, 0x0404ffff) AM_READWRITE8(casloopy_vram_r,casloopy_vram_w,0xffffffff) // tilemap + PCG
386   AM_RANGE(0x04051000, 0x040510ff) AM_READWRITE16(casloopy_pal_r,casloopy_pal_w,0xffffffff)
398   AM_RANGE(0x04050000, 0x040503ff) AM_RAM // ???
399   AM_RANGE(0x04051000, 0x040511ff) AM_READWRITE16(casloopy_pal_r,casloopy_pal_w,0xffffffff)
387400   AM_RANGE(0x04058000, 0x04058007) AM_READWRITE16(casloopy_vregs_r,casloopy_vregs_w,0xffffffff)
388   AM_RANGE(0x0405b000, 0x0405b00f) AM_RAM // RGB brightness plus scrolling
401   AM_RANGE(0x0405b000, 0x0405b00f) AM_RAM AM_SHARE("vregs") // RGB555 brightness control plus scrolling
389402   AM_RANGE(0x05ffff00, 0x05ffffff) AM_READWRITE16(sh7021_r,sh7021_w,0xffffffff)
390403//   AM_RANGE(0x05ffff00, 0x05ffffff) - SH7021 internal i/o
391404   AM_RANGE(0x06000000, 0x061fffff) AM_ROM AM_REGION("rom_cart",0)
r21618r21619
428441
429442}
430443
444
445static const gfx_layout casloopy_4bpp_layoutROM =
446{
447   8,8,
448   RGN_FRAC(1,1),
449   4,
450   { STEP4(0, 1) },
451   { STEP8(0, 4) },
452   { STEP8(0, 4*8) },
453   4*8*8
454};
455
456static const gfx_layout casloopy_8bpp_layoutROM =
457{
458   8,8,
459   RGN_FRAC(1,1),
460   8,
461   { STEP8(0, 1) },
462   { STEP8(0, 8) },
463   { STEP8(0, 8*8) },
464   8*8*8
465};
466
467
468
469
431470static MACHINE_CONFIG_START( casloopy, casloopy_state )
432471
433472   /* basic machine hardware */

Previous 199869 Revisions Next


© 1997-2024 The MAME Team