From 2a66a0672a555fc3eb628d1e2d27e9be086eee2d Mon Sep 17 00:00:00 2001 From: zeromus Date: Thu, 14 Aug 2014 15:52:25 +0000 Subject: [PATCH] load 512-entry palettes, but dont do anything with them yet --- .../Consoles/Nintendo/NES/Palettes.cs | 10 +++++++--- output/NES/Palettes/QuickNes.pal | Bin 192 -> 1536 bytes 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Palettes.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Palettes.cs index 5fd123a999..3c4be1e729 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Palettes.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Palettes.cs @@ -22,12 +22,16 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES } /// - /// Loads a simple 192 byte (64 entry RGB888) palette which is FCEUX format (and probably other emulators as well) + /// Loads a simple 192 byte (64 entry RGB888) or 1536 byte (64*8 = 512 entry) palette which is FCEUX format (and probably other emulators as well) + /// The 512-entry format is new and backwards compatible. (actually, the 512-entry format extra data isnt used yet, I just edited this to support the larger quicknes file i committed) /// - /// 192 bytes, the contents of the palette file + /// 192 or 1536 bytes, the contents of the palette file public static int[,] Load_FCEUX_Palette(byte[] fileContents) { - if (fileContents.Length != 192) return null; + //'validate' file, solely by length + if (fileContents.Length == 1536) { } + else if (fileContents.Length != 192) return null; + int[,] ret = new int[64, 3]; int i = 0; for (int c = 0; c < 64; c++) diff --git a/output/NES/Palettes/QuickNes.pal b/output/NES/Palettes/QuickNes.pal index f511564cb5098deb369a48cc63d3a8fc22ee5962..33d3b5b6be4591c42c15c7f9973e92ff0fa7e797 100644 GIT binary patch literal 1536 zcmYL}dsNJ69LAqqwvcs~*gB!owsh5oI;qy^vN36*`y$G0o7uEUrP?EO+3iZVsh#dk zF+{{nrD>TOU35`OIWChev^X3sIXGYYvy=Au<2~;mpXd8N@8$aj1_r_~apC+*E0p;n zmIvEl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