Removes Flashing instances in game (#168)

* Added reduced flashing, triforce hud and cutscene options

* Corrected parameters and replacement order

* Mixed up rom byte

* Removed triforce hud, smoothed cutscene speed and reset tables

* Removed triforcehud line and added bird cutscene speedup

* Added options to yaml

* Added check for race rom generation (is not internal asm)

* Added options to GUI (check sprite adjust crash)

* Fixed inconsistency in setting weight

* A "slow" setting for the cutscenespeed (#1)

* Slow wall setting

* Slow wall setting

* Slow wall setting

* Slow wall setting

* Slow wall setting

* Slow wall setting

* Update playerSettings.yaml

* Remove instances of cutscene speed modification

* Changed command to remove to mitigate frame advantage

* Antiepilepsy enabled for default/race roms, param change, RTL byte

* Found a frame independent antiflashing patch for real

* Further ASM patching style

* Reduce these changes to just two bytes

* Added patches for Dark Mountain and Ether Flashing palette reveal

Co-authored-by: StructuralMike <66819228+StructuralMike@users.noreply.github.com>
This commit is contained in:
pepperpow
2021-02-19 10:45:54 -06:00
committed by GitHub
parent 68c639d798
commit fca64f1177
9 changed files with 58 additions and 5 deletions

19
Rom.py
View File

@@ -1672,7 +1672,7 @@ def hud_format_text(text):
def apply_rom_settings(rom, beep, color, quickswap, fastmenu, disable_music, sprite: str, palettes_options,
world=None, player=1, allow_random_on_event=False):
world=None, player=1, allow_random_on_event=False, reduceflashing=False):
local_random = random if not world else world.rom_seeds[player]
# enable instant item menu
@@ -1697,6 +1697,23 @@ def apply_rom_settings(rom, beep, color, quickswap, fastmenu, disable_music, spr
else:
rom.write_byte(0x180048, 0x08)
# Reduce flashing by nopping out instructions
if reduceflashing:
rom.write_bytes(0x17E07, [0x06]) # reduce amount of colors changed, add this branch if we need to reduce more ""+ [0x80] + [(0x81-0x08)]""
rom.write_bytes(0x17EAB, [0xD0, 0x03, 0xA9, 0x40, 0x29, 0x60]) # nullifies aga lightning, cutscene, vitreous, bat, ether
# ONLY write to black values with this low pale blue to indicate flashing, that's IT. ""BNE + : LDA #$2940 : + : RTS""
rom.write_bytes(0x123FE, [0x72]) # set lightning flash in misery mire (and standard) to brightness 0x72
rom.write_bytes(0x3FA7B, [0x80, 0xac-0x7b]) # branch from palette writing lightning on death mountain
rom.write_byte(0x10817F, 0x01) # internal rom option
else:
rom.write_bytes(0x17E07, [0x00])
rom.write_bytes(0x17EAB, [0x85, 0x00, 0x29, 0x1F, 0x00, 0x18])
rom.write_bytes(0x123FE, [0x32]) # original weather flash value
rom.write_bytes(0x3FA7B, [0xc2, 0x20]) # rep #$20
rom.write_byte(0x10817F, 0x00) # internal rom option
rom.write_byte(0x18004B, 0x01 if quickswap else 0x00)
rom.write_byte(0x0CFE18, 0x00 if disable_music else rom.orig_buffer[0x0CFE18] if rom.orig_buffer else 0x70)