Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added patches/ips/remove_bluesuits.ips
Binary file not shown.
Binary file added patches/ips/remove_spikesuits.ips
Binary file not shown.
Binary file modified patches/ips/vanilla_bugfixes.ips
Binary file not shown.
2 changes: 1 addition & 1 deletion patches/rom_map/Bank 80.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ DA00 - DD00: msu1.asm
DD00 - E100: Palette pointer table for Mosaic
E100 - E180: area_palette.asm
E180 - E1B0: fix_horiz_doors.asm
E1B0 - E2A0: [FREE]
E1B0 - E2A0: remove_spikesuits.asm
E2A0 - E3C0: decompression.asm
E3C0 - E440: disable_etanks.asm
E440 - E540: load_plms_early.asm
Expand Down
2 changes: 1 addition & 1 deletion patches/rom_map/Bank 85.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ $AB00 - $ACA0: map_area.asm
$ACA0 - $AD00: load_flash_suit
$AD00 - $AFD0: map_area.asm
$AFD0 - $B000: [FREE]
$B000 - $B4B0: vanilla_bugfixes.asm
$B000 - $D4B0: vanilla_bugfixes.asm
9 changes: 9 additions & 0 deletions patches/src/remove_bluesuits.asm
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
; Removes a spikesuit state from samus

arch snes.cpu
lorom


org $91DE5C ; replace the instruction that allows Samus to gain a bluesuit (speedbooster is only cancelled if running flag is 0)
nop
nop
30 changes: 30 additions & 0 deletions patches/src/remove_spikesuits.asm
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
; Removes a spikesuit state from samus

arch snes.cpu
lorom

!any_bank_free_space_start = $80E1B0
!any_bank_free_space_end = $80E2A0

org $90D4BC ; hook end of shinespark crash
jsl check_ss
nop
nop

org !any_bank_free_space_start
check_ss:
LDA $0ACC ; Samus palette type normal? [regular shinecharge]
BNE .skip
LDA $0A68 ; special timer non zero? [can spark]
BEQ .skip
LDA #$0000
STA $0A68 ; goodbye spikesuit
LDA #$0045 ; msg ID
JSL $85B000
.skip:
LDA #$0002
STA $0A32
STZ $0DEC
RTL

assert pc() <= !any_bank_free_space_end
12 changes: 12 additions & 0 deletions patches/src/tables/remove_bluesuits.asm
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
; Removes a spikesuit state from samus

arch snes.cpu
lorom


org $91DE59 ; replace the instruction that allows Samus to gain a bluesuit (speedbooster is only cancelled if running flag is 0)
STZ $0B3E
LDA $0B3C
BEQ $2F
STZ $0B3C

31 changes: 20 additions & 11 deletions patches/src/vanilla_bugfixes.asm
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ check_empty:
.end:
rts

warnpc $a0f830
assert pc() <= $a0f830

;;; Fixes for the extra save stations in area rando/random start :

Expand Down Expand Up @@ -123,7 +123,7 @@ save_station_check:
jmp search_loop_found

;;; end of unused space
warnpc $8485b2
assert pc() <= $8485b2


; Use door direction ($0791) to check in Big Boy room if we are coming in from the left vs. right.
Expand Down Expand Up @@ -181,7 +181,7 @@ fix_camera_alignment:
LDA $B1 : SEC
RTS

warnpc !bank_80_free_space_end
assert pc() <= !bank_80_free_space_end


; skip loading special x-ray blocks (only used in BT room during escape, and we repurpose the space for other things)
Expand Down Expand Up @@ -209,7 +209,7 @@ check_item_plm:
clc
rts

warnpc $848398
assert pc() <= $848398
org $848398
special_xray_end:

Expand Down Expand Up @@ -239,7 +239,7 @@ pause_func:
stz $9d6 ; clear reserve health
rts

warnpc !bank_82_free_space_end
assert pc() <= !bank_82_free_space_end

; Fix for powamp projectile bug
;
Expand Down Expand Up @@ -268,7 +268,7 @@ powamp_fix:
sta $1a4b,y ; replaced code
rts

warnpc !bank_86_free_space_end
assert pc() <= !bank_86_free_space_end

; Fix improper clearing of BG2
; Noted by PJBoy: https://patrickjohnston.org/bank/80#fA23F
Expand Down Expand Up @@ -299,7 +299,7 @@ yapping_maw_crash:
.skip
jmp ($d37d,x) ; valid entry

warnPC !bank_90_free_space_end
assert pc() <= !bank_90_free_space_end

;;; Spring ball menu crash fix by strotlog.
;;; Fix obscure vanilla bug where: turning off spring ball while bouncing, can crash in $91:EA07,
Expand All @@ -314,7 +314,7 @@ org $91f1fc
jsl spring_ball_crash

!bank_85_free_space_start = $85b000 ; do not change, first jmp used externally
!bank_85_free_space_end = $85b4b0
!bank_85_free_space_end = $85d4b0

org !bank_85_free_space_start
jmp bug_dialog ; for external calls, do not move
Expand Down Expand Up @@ -352,14 +352,16 @@ bug_dialog: ; A = msg ID

pla ; dlg box parameter
jsl $858080 ; dlg box

cmp #$0045 ; spikesuit disabled msg
beq .nokillmsg ; we don't want to kill samus for spikesuiting so skip the death sequence
lda #$8000 ; init death sequence (copied from $82db80)
sta $a78
lda #$0011
jsl $90f084

lda #$0013 ; set gamestate
sta $998
.nokillmsg
rtl

hook_message_box:
Expand Down Expand Up @@ -416,6 +418,7 @@ new_message_boxes:
dw $83c5, $825a, springball_msg ; 0x42
dw $83c5, $825a, yapping_maw_msg ; 0x43
dw $83c5, $825a, oob_msg ; 0x44
dw $83c5, $825a, ss_msg ; 0x45
dw $0000, $0000, msg_end

table "tables/dialog_chars.tbl",RTL
Expand Down Expand Up @@ -443,10 +446,16 @@ oob_msg:
dw $000e,$000e,$000e, " SAMUS OUT-OF-BOUNDS! ", $000e,$000e,$000e
dw $000e,$000e,$000e, " ", $000e,$000e,$000e
dw $000e,$000e,$000e, " ", $000e,$000e,$000e

ss_msg:
dw $000e,$000e,$000e, " ", $000e,$000e,$000e
dw $000e,$000e,$000e, " SPIKE SUIT DISABLED! ", $000e,$000e,$000e
dw $000e,$000e,$000e, " ", $000e,$000e,$000e
dw $000e,$000e,$000e, " ", $000e,$000e,$000e

msg_end:

warnPC !bank_85_free_space_end
assert pc() <= !bank_85_free_space_end

org $858093
jsr hook_message_box
Expand Down Expand Up @@ -483,7 +492,7 @@ check_unpause:
lda #$0008 ; replaced code
jmp $93be

warnPC !bank_82_free_space2_end
assert pc() <= !bank_82_free_space2_end

; Map scrolling bug
; Leftmost edge function @ $829f4a has an off-by-one bug when scanning
Expand Down
2 changes: 2 additions & 0 deletions rust/data/presets/full-settings/Community Race Season 4.json
Original file line number Diff line number Diff line change
Expand Up @@ -4513,6 +4513,8 @@
"door_locks_size": "Large",
"map_station_reveal": "Full",
"energy_free_shinesparks": false,
"remove_spikesuits": "Disabled",
"remove_bluesuits": "Disabled",
"ultra_low_qol": false,
"race_mode": true,
"random_seed": null
Expand Down
2 changes: 2 additions & 0 deletions rust/data/presets/full-settings/Default.json
Original file line number Diff line number Diff line change
Expand Up @@ -4514,6 +4514,8 @@
"door_locks_size": "Large",
"map_station_reveal": "Full",
"energy_free_shinesparks": false,
"remove_spikesuits": "Disabled",
"remove_bluesuits": "Disabled",
"ultra_low_qol": false,
"race_mode": false,
"random_seed": null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4586,6 +4586,8 @@
"maps_revealed": null,
"map_station_reveal": "Full",
"energy_free_shinesparks": false,
"remove_spikesuits": "Disabled",
"remove_bluesuits": "Disabled",
"ultra_low_qol": false,
"race_mode": true,
"random_seed": null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4586,6 +4586,8 @@
"maps_revealed": null,
"map_station_reveal": "Full",
"energy_free_shinesparks": false,
"remove_spikesuits": "Disabled",
"remove_bluesuits": "Disabled",
"ultra_low_qol": false,
"race_mode": true,
"random_seed": null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4586,6 +4586,8 @@
"maps_revealed": null,
"map_station_reveal": "Full",
"energy_free_shinesparks": false,
"remove_spikesuits": "Disabled",
"remove_bluesuits": "Disabled",
"ultra_low_qol": false,
"race_mode": true,
"random_seed": null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4586,6 +4586,8 @@
"maps_revealed": null,
"map_station_reveal": "Full",
"energy_free_shinesparks": false,
"remove_spikesuits": "Disabled",
"remove_bluesuits": "Disabled",
"ultra_low_qol": false,
"race_mode": true,
"random_seed": null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4586,6 +4586,8 @@
"maps_revealed": null,
"map_station_reveal": "Full",
"energy_free_shinesparks": false,
"remove_spikesuits": "Disabled",
"remove_bluesuits": "Disabled",
"ultra_low_qol": false,
"race_mode": true,
"random_seed": null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4586,6 +4586,8 @@
"maps_revealed": null,
"map_station_reveal": "Full",
"energy_free_shinesparks": false,
"remove_spikesuits": "Disabled",
"remove_bluesuits": "Disabled",
"ultra_low_qol": false,
"race_mode": true,
"random_seed": null
Expand Down
8 changes: 8 additions & 0 deletions rust/maprando-game/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,14 @@ pub const TECH_ID_CAN_ELEVATOR_CRYSTAL_FLASH: TechId = 178;
pub const TECH_ID_CAN_CARRY_FLASH_SUIT: TechId = 207;
pub const TECH_ID_CAN_TRICKY_CARRY_FLASH_SUIT: TechId = 142;
pub const TECH_ID_CAN_HYPER_GATE_SHOT: TechId = 10001;
pub const TECH_ID_CAN_SLOPE_SPARK: TechId = 210;
pub const TECH_ID_CAN_RMODE_KNOCKBACK_SPARK: TechId = 213;
pub const TECH_ID_CAN_CRYSTAL_SPARK: TechId = 217;
pub const TECH_ID_CAN_RMODE_SPARK_INTERRUPT: TechId = 216;
pub const TECH_ID_CAN_RMODE_PAUSE_SPARK_INTERRUPT: TechId = 222;
pub const TECH_ID_CAN_XMODE_BLUE_SUIT: TechId = 223;
pub const TECH_ID_CAN_SLOPE_XMODE: TechId = 225;


#[allow(clippy::type_complexity)]
#[derive(Deserialize, Serialize, Clone, Debug)]
Expand Down
26 changes: 26 additions & 0 deletions rust/maprando-web/templates/generate/game_variations.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,32 @@
<label class="btn btn-outline-primary" for="energyFreeShinesparksYes">Yes</label>
</div>
</div>
<div class="form-group row">
<div class="col-lg-4 col-md-6 my-2">
{% include "help/variations/remove_spikesuits.html" %}
<label for="remove_spikesuits">Remove Spikesuits</label>
</div>
<div id="removespikesuits" class="col-2 btn-group my-2" role="group">
<input type="radio" class="btn-check" name="remove_spikesuits" id="removespikesuitsNo" value="Disabled"
checked>
<label class="btn btn-outline-primary" for="removespikesuitsNo">No</label>
<input type="radio" class="btn-check" name="remove_spikesuits" id="removespikesuitsYes" value="Enabled">
<label class="btn btn-outline-primary" for="removespikesuitsYes">Yes</label>
</div>
</div>
<div class="form-group row">
<div class="col-lg-4 col-md-6 my-2">
{% include "help/variations/remove_bluesuits.html" %}
<label for="remove_bluesuits">Remove Bluesuits</label>
</div>
<div id="removespikesuits" class="col-2 btn-group my-2" role="group">
<input type="radio" class="btn-check" name="remove_bluesuits" id="removebluesuitsNo" value="Disabled"
checked>
<label class="btn btn-outline-primary" for="removespikesuitsNo">No</label>
<input type="radio" class="btn-check" name="remove_bluesuits" id="removebluesuitsYes" value="Enabled">
<label class="btn btn-outline-primary" for="removebluesuitsYes">Yes</label>
</div>
</div>
<div class="form-group row">
<div class="col-lg-4 col-md-6 my-2">
{% include "help/variations/ultra_low_qol.html" %}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!-- Button trigger modal -->
<button type="button" class="btn mr-1 px-2 py-1" data-bs-toggle="modal" data-bs-target="#removeBluesuitsModal">
<i class="bi bi-question-circle"></i>
</button>
<!-- Modal -->
<div class="modal" id="removeBluesuitsModal" tabindex="-1">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h1 class="modal-title fs-5">Remove bluesuit ability</h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<p>If enabled, the game will be modified so Samus cannot gain a bluesuit.</p>
<p>This setting will also disable any logic that would require a bluesuit.</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<!-- Button trigger modal -->
<button type="button" class="btn mr-1 px-2 py-1" data-bs-toggle="modal" data-bs-target="#removeSpikesuitsModal">
<i class="bi bi-question-circle"></i>
</button>
<!-- Modal -->
<div class="modal" id="removeSpikesuitsModal" tabindex="-1">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h1 class="modal-title fs-5">Remove spikesuit ability</h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<p>If enabled, the game will be modified so Samus cannot gain a flashsuit from a glitched shinespark.</p>
<p>This setting will also disable any logic that would require a spikesuit. (Spikesuit / Slopespark / R-Mode knockback Spark).
A flash suit may still be gained via Elevator CF or R-Mode CF Interrupt, even if not required in logic.</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
2 changes: 2 additions & 0 deletions rust/maprando-web/templates/generate/scripts.html
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,8 @@
"maps_revealed": formData.get("maps_revealed"),
"map_station_reveal": formData.get("map_station_reveal"),
"energy_free_shinesparks": formData.get("energy_free_shinesparks") == "true",
"remove_spikesuits": formData.get("remove_spikesuits"),
"remove_bluesuits": formData.get("remove_bluesuits"),
"ultra_low_qol": formData.get("ultra_low_qol") == "true",
"race_mode": formData.get("race_mode") == "true",
"random_seed": tryParseInt(formData.get("random_seed")),
Expand Down
Loading