Previous 199869 Revisions Next

r21693 Friday 8th March, 2013 at 01:17:35 UTC by David Haywood
just some debug code to blank out data we've read from in a spare copy of the graphic rom region, although it already confirms what I thought, every byte of graphic data is transferred at some point if you test all characters, so no hidden tables lurking there.
[src/mame/drivers]gunpey.c

trunk/src/mame/drivers/gunpey.c
r21692r21693
227227   UINT16 m_vreg_addr;
228228
229229   UINT8* m_blit_rom;
230   UINT8* m_blit_rom2;
231
230232   UINT8* m_vram;
231233
232234   // work variables for the decompression
r21692r21693
243245   int m_dstxbase;
244246   int m_dstxcount;
245247   int m_dstycount;
248   bool m_out_of_data;
246249
247250   int m_latched_bits_left;
248251   UINT8 m_latched_byte;
r21692r21693
641644{
642645   // check if we need to move on to the next row of the source bitmap
643646   // to get the data requested
647
644648   if (m_scrxcount==m_sourcewide)
645649   {
646650      m_scrxcount = 0;
r21692r21693
649653   }
650654
651655   m_latched_byte = m_blit_rom[(((m_srcy)&0x7ff)*0x800)+((m_srcx)&0x7ff)];
656   if (!m_out_of_data) m_blit_rom2[(((m_srcy)&0x7ff)*0x800)+((m_srcx)&0x7ff)] = 0x77; // debug
657
652658   m_latched_bits_left = 8;
653659
654660   // increase counters
r21692r21693
10541060            m_latched_bits_left = 0;
10551061            m_zero_bit_count = 0;
10561062
1057            bool out_of_data = false;
1063            m_out_of_data = false;
10581064
10591065            for (;;)
10601066            {
r21692r21693
10841090               // hack, really I imagine there is exactly enough compressed data to fill the dest bitmap area when decompressed, but to stop us
10851091               // overrunning into reading other data we terminate on a 0000, which doesn't seem likely to be compressed data.
10861092               if (m_zero_bit_count>=16)
1087                  out_of_data = true;
1093                  m_out_of_data = true;
10881094
10891095
10901096
10911097               UINT8 usedata = 0xff;
1092               if (!out_of_data)
1098               if (!m_out_of_data)
10931099               {
10941100                  #ifdef SHOW_COMPRESSED_DATA_DEBUG
10951101                  //if (count<512)
r21692r21693
11581164         for (;;)
11591165         {
11601166            UINT8 usedata = m_blit_rom[(((m_srcy)&0x7ff)*0x800)+((m_srcx)&0x7ff)];
1161
1167            m_blit_rom2[(((m_srcy)&0x7ff)*0x800)+((m_srcx)&0x7ff)] = 0x44; // debug
11621168            m_srcx++; m_scrxcount++;
11631169            if (m_scrxcount==m_xsize)
11641170            {
r21692r21693
13771383
13781384static GFXDECODE_START( gunpey )
13791385   GFXDECODE_ENTRY( "blit_data", 0, gunpey,     0x0000, 0x1 )
1386   GFXDECODE_ENTRY( "blit_data2", 0, gunpey,     0x0000, 0x1 )
13801387   GFXDECODE_ENTRY( "vram", 0, gunpey,     0x0000, 0x1 )
13811388GFXDECODE_END
13821389
r21692r21693
14211428
14221429   ROM_REGION( 0x400000, "blit_data", 0 )
14231430   ROM_LOAD( "gp_rom3.025",  0x00000, 0x400000,  CRC(f2d1f9f0) SHA1(0d20301fd33892074508b9d127456eae80cc3a1c) )
1431   ROM_REGION( 0x400000, "blit_data2", 0 ) // debug test
1432   ROM_COPY( "blit_data", 0x00000, 0x00000, 0x400000 )
14241433
1434
14251435   ROM_REGION( 0x400000, "vram", ROMREGION_ERASEFF )
14261436
14271437   ROM_REGION( 0x400000, "ymz", 0 )
r21692r21693
14371447{
14381448
14391449   m_blit_rom = memregion("blit_data")->base();
1450   m_blit_rom2 = memregion("blit_data2")->base();
1451
14401452   m_vram = memregion("vram")->base();
14411453   // ...
14421454}

Previous 199869 Revisions Next


© 1997-2024 The MAME Team