shithub: zelda3

Download patch

ref: e7c5962457342884736ab7efa4f154fbe199b61e
parent: 2b7e9f69fbd3802da36575de0bd7c8cb5a3716a8
author: Snesrev <[email protected]>
date: Sat Oct 1 18:54:28 EDT 2022

Get rid of some more PPU crap

--- a/load_gfx.c
+++ b/load_gfx.c
@@ -10,8 +10,6 @@
 // Allow this to be overwritten
 uint16 kGlovesColor[2] = {0x52f6, 0x376};
 
-static const uint8 kGraphics_IncrementalVramUpload_Dst[16] = {0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f};
-static const uint8 kGraphics_IncrementalVramUpload_Src[16] = {0x0, 0x2, 0x4, 0x6, 0x8, 0xa, 0xc, 0xe, 0x10, 0x12, 0x14, 0x16, 0x18, 0x1a, 0x1c, 0x1e};
 static const uint16 kPaletteFilteringBits[64] = {
   0xffff, 0xffff, 0xfffe, 0xffff, 0x7fff, 0x7fff, 0x7fdf, 0xfbff, 0x7f7f, 0x7f7f, 0x7df7, 0xefbf, 0x7bdf, 0x7bdf, 0x77bb, 0xddef,
   0x7777, 0x7777, 0x6edd, 0xbb77, 0x6db7, 0x6db7, 0x5b6d, 0xb6db, 0x5b5b, 0x5b5b, 0x56b6, 0xad6b, 0x5555, 0xad6b, 0x5555, 0xaaab,
@@ -449,9 +447,7 @@
 }
 
 void EnableForceBlank() {  // 80893d
-  zelda_ppu_write(INIDISP, 0x80);
   INIDISP_copy = 0x80;
-  zelda_snes_dummy_write(HDMAEN, 0);
   HDMAEN_copy = 0;
 }
 
@@ -762,6 +758,9 @@
   if (incremental_counter_for_vram == 16)
     return;
 
+  static const uint8 kGraphics_IncrementalVramUpload_Dst[16] = { 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f };
+  static const uint8 kGraphics_IncrementalVramUpload_Src[16] = { 0x0, 0x2, 0x4, 0x6, 0x8, 0xa, 0xc, 0xe, 0x10, 0x12, 0x14, 0x16, 0x18, 0x1a, 0x1c, 0x1e };
+
   nmi_update_tilemap_dst = kGraphics_IncrementalVramUpload_Dst[incremental_counter_for_vram];
   nmi_update_tilemap_src = kGraphics_IncrementalVramUpload_Src[incremental_counter_for_vram] << 8;
   incremental_counter_for_vram++;
@@ -1481,7 +1480,6 @@
 
   if (!spotlight_var2) {
     INIDISP_copy = 0x80;
-    zelda_ppu_write(INIDISP, 0x80);
   } else {
     IrisSpotlight_ResetTable();
   }