private void SetupBridgeCredits() { // Wallpaper over the JSR to the NASIR CRC to circumvent their neolithic DRM. Put(0x7CF34, Blob.FromHex("EAEAEA")); // Actual Credits. Each string[] is a page. Each "" skips a line, duh. // The lines have zero padding on all sides, and 16 usable characters in length. // Don't worry about the inefficiency of spaces as they are all trimmed and the // leading spaces are used to increment the PPU ptr precisely to save ROM space. List <string[]> texts = new List <string[]> { new [] { "", "Lead Development", "", " Entroper", " MeridianBC", " nitz", " Septimus", " tartopan", " wildham", }, new [] { "", " Contributors", "", " artea", " drcatdoctor", " leggystarscream", " nic0lette", " splitpunched", " onefineday", " Darkmoon", }, new [] { "", "", " Programmed ", " By ", "", "E N T R O P E R " }, }; // Accumulate all our Credits pages before we set up the string pointer array. List <Blob> pages = new List <Blob>(); texts.ForEach(text => pages.Add(FF1Text.TextToCredits(text))); // Clobber the number of pages to render before we insert in the pointers. Data[0x37873] = (byte)pages.Count; Blob credits = PackageTextBlob(pages, 0xBB00); System.Diagnostics.Debug.Assert(credits.Length <= 0x0200, "Credits too large: " + credits.Length); Put(0x37B00, credits); }
private void SetupBridgeCredits() { // Wallpaper over the JSR to the NASIR CRC to circumvent their neolithic DRM. Put(0x7CF34, Blob.FromHex("EAEAEA")); // Actual Credits. Each string[] is a page. Each "" skips a line, duh. // The lines have zero padding on all sides, and 16 usable characters in length. // Don't worry about the inefficiency of spaces as they are all trimmed and the // leading spaces are used to increment the PPU ptr precisely to save ROM space. List <string[]> texts = new List <string[]> { new [] { "", " Playtesting ", "", " Xarnax42", " TristalMTG", " PanzerDave", " Ategenos", " Buffalax", " crimsonavix", }, new [] { " Special Thanks ", "", "fcoughlin, Disch", "Paulygon, anomie", "Derangedsquirrel", "AstralEsper, and", "", " The Entire FFR ", " Community ", }, new [] { "", "", " Programmed ", " By ", "", "E N T R O P E R " }, }; // Accumulate all our Credits pages before we set up the string pointer array. List <Blob> pages = new List <Blob>(); texts.ForEach(text => pages.Add(FF1Text.TextToCredits(text))); // Clobber the number of pages to render before we insert in the pointers. Data[0x37873] = (byte)pages.Count; Blob credits = PackageTextBlob(pages, 0xBB00); System.Diagnostics.Debug.Assert(credits.Length <= 0x0100, "Credits too large: " + credits.Length); Put(0x37B00, credits); }
public void RollCredits() { // Wallpaper over the JSR to the NASIR CRC to circumvent their neolithic DRM. Put(0x3CF34, Blob.FromHex("EAEAEA")); // Actual Credits. Each string[] is a page. Each "" skips a line, duh. // The lines have zero padding on all sides, and 16 usable characters in length. // Don't worry about the inefficiency of spaces as they are all trimmed and the // leading spaces are used to increment the PPU ptr precisely to save ROM space. List <string[]> texts = new List <string[]>(); texts.Add(new string[] { "", "", " Final Fantasy ", "", "", " Randomizer ", }); texts.Add(new string[] { "", "", " Programmed ", " By ", "", "E N T R O P E R " }); texts.Add(new string[] { "", " Development ", "", "", " Entroper", " MeridianBC", " tartopan", " nitz", }); texts.Add(new string[] { " Special Thanks ", "", "fcoughlin, Disch", "Paulygon, anomie", "Derangedsquirrel", "AstralEsper, and", "", " The Entire FFR ", " Community ", }); // Accumulate all our Credits pages before we set up the string pointer array. List <Blob> pages = new List <Blob>(); foreach (string[] text in texts) { pages.Add(FF1Text.TextToCredits(text)); } // Clobber the number of pages to render before we insert in the pointers. Data[0x37873] = (byte)pages.Count(); // The first pointer is immediately after the pointer table. List <ushort> ptrs = new List <ushort>(); ptrs.Add((ushort)(0xBB00 + pages.Count() * 2)); for (int i = 1; i < pages.Count(); ++i) { ptrs.Add((ushort)(ptrs.Last() + pages[i - 1].Length)); } // Collect it into one blob and blit it. pages.Insert(0, Blob.FromUShorts(ptrs.ToArray())); Blob credits = Blob.Concat(pages); System.Diagnostics.Debug.Assert(credits.Length <= 0x0100, "Credits too large!"); Put(0x37B00, credits); }