Exemplo n.º 1
0
        static void DecodeStringBlock()
        {
            var filename = @"c:\working\dq3\~~string block read results.txt";
            var lines    = new List <string>();

            var maxAddress = 0xfede00 - Rom.AddressOffset;
            var stream     = Rom.GetStream(MonsterNames.Instance.StartAddress);

            while (stream.Address < maxAddress)
            {
                var startAddress = stream.Address;
                var data         = stream.ReadUntil(SmallFontTable.EndOfString);
                var endAddress   = stream.Address - 2;

                startAddress += (int)Rom.AddressOffset;
                endAddress   += (int)Rom.AddressOffset;
                var jap = SmallFontTable.Decode(data);
                var eng = MonsterNames.Instance.ToEnglish(jap);
                lines.Add($"{startAddress.ToString("x6", CultureInfo.InvariantCulture)} - {endAddress.ToString("x6", CultureInfo.InvariantCulture)} -- {data.Length.ToString("x2", CultureInfo.InvariantCulture)} -- {data.ToHexString()} -- {jap} -- {eng}");
            }

            File.WriteAllLines(filename, lines);
        }
Exemplo n.º 2
0
        // Overworld tilemap top-level grid layout
        public static byte[] GetLayout()
        {
            var source = Rom.GetStream(0xed8a00);

            return(Compression.BasicRing400.Decompress(source, 0x2000));
        }