Previous 199869 Revisions Next

r21484 Thursday 28th February, 2013 at 19:20:56 UTC by David Haywood
just because we can
[src/mame/drivers]gunpey.c

trunk/src/mame/drivers/gunpey.c
r21483r21484
296296   UINT8 *blit_rom = memregion("blit_data")->base();
297297   int x,y;
298298
299   //printf("gunpey_blitter_w offset %01x data %02x\n", offset,data);
300
299301   blit_ram[offset] = data;
300302
301303   if(offset == 0 && data == 2) // blitter trigger
r21483r21484
332334         }
333335      }
334336
337/*
338      printf("%02x %02x %02x %02x|%02x %02x %02x %02x|%02x %02x %02x %02x|%02x %02x %02x %02x\n"
339      ,blit_ram[0],blit_ram[1],blit_ram[2],blit_ram[3]
340      ,blit_ram[4],blit_ram[5],blit_ram[6],blit_ram[7]
341      ,blit_ram[8],blit_ram[9],blit_ram[0xa],blit_ram[0xb]
342      ,blit_ram[0xc],blit_ram[0xd],blit_ram[0xe],blit_ram[0xf]);
343*/
344   }
335345
336//      printf("%02x %02x %02x %02x|%02x %02x %02x %02x|%02x %02x %02x %02x|%02x %02x %02x %02x\n"
337//      ,blit_ram[0],blit_ram[1],blit_ram[2],blit_ram[3]
338//      ,blit_ram[4],blit_ram[5],blit_ram[6],blit_ram[7]
339//      ,blit_ram[8],blit_ram[9],blit_ram[0xa],blit_ram[0xb]
340//      ,blit_ram[0xc],blit_ram[0xd],blit_ram[0xe],blit_ram[0xf]);
341   }
342346}
343347
344348/***************************************************************************************/
r21483r21484
353357static ADDRESS_MAP_START( io_map, AS_IO, 16, gunpey_state )
354358   AM_RANGE(0x7f40, 0x7f45) AM_READ8(gunpey_inputs_r,0xffff)
355359
356//  AM_RANGE(0x7f48, 0x7f48) AM_WRITE_LEGACY(output_w)
360   //AM_RANGE(0x7f48, 0x7f49) AM_RAM
357361   AM_RANGE(0x7f80, 0x7f81) AM_DEVREADWRITE8_LEGACY("ymz", ymz280b_r, ymz280b_w, 0xffff)
358362
359363   AM_RANGE(0x7f88, 0x7f89) AM_DEVREADWRITE8("oki", okim6295_device, read, write, 0xff00)
360364
361365   AM_RANGE(0x7fc8, 0x7fc9) AM_READWRITE8(gunpey_status_r,  gunpey_status_w, 0xffff )
362366   AM_RANGE(0x7fd0, 0x7fdf) AM_WRITE8(gunpey_blitter_w, 0xffff )
367   //AM_RANGE(0x7FF0, 0x7FF1) AM_RAM
368
363369ADDRESS_MAP_END
364370
365371
r21483r21484
452458   PORT_START("SYSTEM")    // IN4 - 7f44
453459   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 )
454460   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN )
455   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 ) PORT_IMPULSE(1)    // TEST!!
461   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )   // TEST!!
456462   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_COIN2 )
457463   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_START2 )
458464   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SERVICE1 )
r21483r21484
501507      gunpey_irq_check(0x54);
502508}
503509
510
511// 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
512// palette data is in here too, the blocks at the bottom right of all this?
513static GFXLAYOUT_RAW( gunpey, 2048, 1, 2048*8, 2048*8 )
514static GFXDECODE_START( gunpey )
515   GFXDECODE_ENTRY( "blit_data", 0, gunpey,     0x0000, 0x1 )
516GFXDECODE_END
517
518
519
504520/***************************************************************************************/
505521static MACHINE_CONFIG_START( gunpey, gunpey_state )
506522
r21483r21484
520536   MCFG_SCREEN_UPDATE_DRIVER(gunpey_state, screen_update_gunpey)
521537
522538   MCFG_PALETTE_LENGTH(0x800)
539   MCFG_GFXDECODE(gunpey)
523540
524541   MCFG_SPEAKER_STANDARD_STEREO("lspeaker","rspeaker")
525542

Previous 199869 Revisions Next


© 1997-2024 The MAME Team