예제 #1
0
        public unsafe byte[] tempSPR()
        {
            byte[] buff  = new byte[0x10000];
            byte[] pxmap = new byte[0x10000];
            uint   size;

            byte[] title = new byte[22];
            string tit   = "5355504552204D4152494F574F524C44202020202020";
            byte   cntry;
            byte   ver;

            uint gfxaddr = ROMHandler.SnesToPc(0x088000) == -1 ? 0 : (uint)ROMHandler.SnesToPc(0x088000);

            Array.Copy(ROMHandler.ROM, 0x7FC0, title, 0, 22);

            //if (Utils.Hex.CompareBytesAndString(title, tit))
            //{
            cntry = ROMHandler.ROM[0x7FD9];
            ver   = ROMHandler.ROM[0x7FDB];
            //if (ver==0 && cntry==1)
            //{
            LC.OpenRAMFile(ROMHandler.ROM, LC.FILE_READONLY, (uint)ROMHandler.ROM.Count());
            size = LC.Decompress(buff, gfxaddr, 0x10000, 1, 0, null);
            LC.CloseFile();
            if (size != 0)
            {
                if (size > 0x10000)
                {
                    size = 0x10000;
                }
                LC.CreatePixelMap(buff, pxmap, size / 32, 4);
            }
            //}
            //}
            return(pxmap);
        }