Skip to content

Instantly share code, notes, and snippets.

View charlezgitguy's full-sized avatar

charlezgitguy

  • Joined May 9, 2026
View GitHub Profile
; --- RAM ALLOCATION (Unused by original game) ---
ADMIN_STATE = $07FB ; Bits: 0=Flight, 1=Invis, 2=PowerLock
COMBO_COOLDOWN = $07FC ; Prevents rapid toggling
; --- MAIN HOOK: Place this at $805B (Main Game Loop) ---
AdminMain:
JSR HandleAdminCombos
JSR ExecuteAdminPowers
JSR PauseOverlayLogic
RTS
def make_chaos_map_hack():
patch = bytearray(b'PATCH')
# 1. THE CHAOS LOOP (Address 0x1F00 - Custom Assembly)
# This code runs every second. It reads the current frame count ($0009),
# and if it hits a multiple of 60, it fills the Screen Layout RAM
# ($0500-$069F) with random tiles based on the ROM data.
chaos_logic = [
0xAD, 0x09, 0x00, # LDA $0009 (Frame Counter)
0x29, 0x3F, # AND #$3F (Check for ~1 second mark)
import os
# This script turns a normal SMB ROM into the "Lost Miyamoto Prototype"
def build_horror_rom(input_rom, output_rom):
if not os.path.exists(input_rom):
print(f"Error: Put your '{input_rom}' file in this folder first!")
return
with open(input_rom, 'rb') as f:
rom_data = bytearray(f.read())
import os
# CONFIGURATION
BASE_ROM = "Super Mario Bros (World).nes" # Make sure this matches your file name!
OUTPUT_ROM = "mario_test.nes"
def build_test_mod():
if not os.path.exists(BASE_ROM):
print(f"Error: {BASE_ROM} not found!")
return
import os
# --- SETTINGS ---
# Make sure your original game is named exactly 'clean.nes' in the folder!
INPUT_FILE = "clean.nes"
OUTPUT_FILE = "Mario85_Beta.nes"
def build_game():
# 1. Check if the game is there
if not os.path.exists(INPUT_FILE):