Previous 199869 Revisions Next

r21492 Thursday 28th February, 2013 at 23:41:56 UTC by David Haywood
start hookup of fake rom to gunpey (not enabled by default)
[src/mame/drivers]gunpey.c

trunk/src/mame/drivers/gunpey.c
r21491r21492
1
2//#define USE_FAKE_ROM
3
14/********************************************************************************************
25
36   Gunpey (c) 2000 Banpresto
r21491r21492
235238   {
236239      if(!(m_wram[count+0/2] & 1))
237240      {
238         x = (m_wram[count+6/2] >> 8) | ((m_wram[count+8/2] & 0xff) << 8);
239         y = m_wram[count+8/2] >> 8;
241         x = (m_wram[count+3] >> 8) | ((m_wram[count+4] & 0xff) << 8);
242         y = m_wram[count+4] >> 8;
240243
244         UINT32 col = 0xffffff;
245
246         UINT32 val = (m_wram[count+1] << 16) | ((m_wram[count+2]));
247         int letter = -1;
248
249         // these are going to be co-ordinates in the bitmap, probably not the ROM, but the one the 'blitter' (gfx unpack device?) creates
250         if (val == 0x8080a03a) { col = 0xffff00; letter ='I'; } // 18d0 - I
251         if (val == 0x4080a03b) { col = 0xff0000; letter ='O'; } //      - O
252
253#ifndef USE_FAKE_ROM
254         letter = -1;
255#endif
241256         x-=0x1100;
242257
243         for(int yi=0;yi<8;yi++)
258         if (letter != -1)
259            drawgfx_opaque(bitmap,cliprect,machine().gfx[1],letter,0,0,0,x,y);
260         else
244261         {
245            for(int xi=0;xi<8;xi++)
262            for(int yi=0;yi<8;yi++)
246263            {
247               if(cliprect.contains(x+xi, y+yi))
248                  bitmap.pix32(y+yi, x+xi) = 0xffffff;
264               for(int xi=0;xi<8;xi++)
265               {
266                  if(cliprect.contains(x+xi, y+yi))
267                     bitmap.pix32(y+yi, x+xi) = col;
268               }
249269            }
250270         }
251271      }
r21491r21492
405425   AM_RANGE(0x7f48, 0x7f49) AM_WRITE8(gunpey_output_w,0x00ff)
406426   AM_RANGE(0x7f80, 0x7f81) AM_DEVREADWRITE8_LEGACY("ymz", ymz280b_r, ymz280b_w, 0xffff)
407427
408   AM_RANGE(0x7f88, 0x7f89) AM_DEVREADWRITE8("oki", okim6295_device, read, write, 0xff00)
428   AM_RANGE(0x7f88, 0x7f89) AM_DEVREADWRITE8("oki", okim6295_device, read, write, 0x00ff)
409429
410430   AM_RANGE(0x7fc8, 0x7fc9) AM_READWRITE8(gunpey_status_r,  gunpey_status_w, 0xffff )
411431   AM_RANGE(0x7fd0, 0x7fdf) AM_WRITE8(gunpey_blitter_w, 0xffff )
r21491r21492
555575}
556576
557577
578static const gfx_layout fake_layout =
579{
580   8,8,
581   RGN_FRAC(1,4),
582   4,
583   { 0,1,2,3 },
584   { 0*4,1*4,2*4,3*4,4*4,5*4,6*4,7*4 },
585   { 0*32,1*32,2*32,3*32,4*32,5*32,6*32,7*32},
586   8*32
587};
588
589
590
558591// this isn't a real decode as such, but the graphic data is all stored in pages 2048 bytes wide at varying BPP levelsl, some (BG data) compressed with what is likely a lossy scheme
559592// palette data is in here too, the blocks at the bottom right of all this?
560593static GFXLAYOUT_RAW( gunpey, 2048, 1, 2048*8, 2048*8 )
561594static GFXDECODE_START( gunpey )
562595   GFXDECODE_ENTRY( "blit_data", 0, gunpey,     0x0000, 0x1 )
596   GFXDECODE_ENTRY( "fakerom", 0x18000, fake_layout,   0x0, 2  )
597
563598GFXDECODE_END
564599
565600
r21491r21492
613648
614649   ROM_REGION( 0x400000, "oki", 0 )
615650   ROM_LOAD( "gp_rom5.622",  0x000000, 0x400000,  CRC(f79903e0) SHA1(4fd50b4138e64a48ec1504eb8cd172a229e0e965)) // 1xxxxxxxxxxxxxxxxxxxxx = 0xFF
651
652   ROM_REGION( 0x20000, "fakerom", ROMREGION_ERASEFF )
653#ifdef USE_FAKE_ROM
654   ROM_LOAD( "video",  0x00000, 0x20000,  CRC(8857ec5a) SHA1(5bed14933af060cb4a1ce6a961c4ca1467a1cbc2) )
655#endif
616656ROM_END
617657
658
659
618660DRIVER_INIT_MEMBER(gunpey_state,gunpey)
619661{
620662//   UINT8 *rom = memregion("maincpu")->base();

Previous 199869 Revisions Next


© 1997-2024 The MAME Team