Skip to content
Draft
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 modified patches/ips/extended_msg_boxes.ips
Binary file not shown.
Binary file modified patches/ips/fast_reload.ips
Binary file not shown.
Binary file modified patches/ips/max_ammo_display_fast.ips
Binary file not shown.
Binary file modified patches/ips/missile_refill_all.ips
Binary file not shown.
Binary file modified patches/ips/spin_lock.ips
Binary file not shown.
9 changes: 4 additions & 5 deletions patches/rom_map/Bank 85.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
9643 - 96AF: [FREE]
96B0 - 97C1: ; extended_msg_boxes.asm
9800 - 9827: ; spin_lock.asm
9880 - 993A: ; fast_reload.asm
9643 - 98BB: ; extended_msg_boxes.asm
9980 - 9A23: ; stats.asm
9B00 - 9B1B: ; fix_hyper_slowlock.asm
9B20 - 9FEF: ; pause_menu_objectives.asm
9FF0 - A012: ; vanilla_fanfare_stop_sounds.asm
A050 - A0FF: [FREE]
A050 - A07A: ; spin_lock.asm
A07B - A0FF: [FREE]
A100 - A16A: ; fix_transition_bad_tiles.asm
A1D6 - A23C: ; special_door_reveal.asm
A280 - A283: ; map_area.asm
Expand All @@ -23,3 +21,4 @@ AEE0 - B599: ; crash_handle_base.asm
B600 - B93E: ; map_area.asm
C000 - C450: ; savestate.asm
C500 - C900: ; pause_menu_objectives.asm
C900 - C9EF: ; fast_reload.asm
2 changes: 0 additions & 2 deletions patches/rom_map/vanilla_hooks.txt
Original file line number Diff line number Diff line change
Expand Up @@ -553,10 +553,8 @@ EE41 - EE42: ; stats.asm
811E - 8121: ; fast_reload.asm
8122 - 8124: ; fast_saves.asm
8150 - 8168: ; map_area.asm
8243 - 8245: ; extended_msg_boxes.asm
82E5 - 82E7: ; crash_handle_base.asm
82EE - 82F0: ; crash_handle_base.asm
82F1 - 82F3: ; extended_msg_boxes.asm
840C - 840E: ; crash_handle_base.asm
8426 - 8435: ; map_area.asm
846D - 8471: ; item_dots_disappear.asm
Expand Down
Binary file modified patches/src/HUD_Expansion/Data/Opaque/messages.ttb
Binary file not shown.
250 changes: 187 additions & 63 deletions patches/src/extended_msg_boxes.asm

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions patches/src/fast_reload.asm
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ arch 65816
!bank_80_free_space_end = $80d330
!bank_82_free_space_start = $82FE70
!bank_82_free_space_end = $82FE80
!bank_85_free_space_start = $859880
!bank_85_free_space_end = $859980
!bank_85_free_space_start = $85c900
!bank_85_free_space_end = $85cC9DF

!savestate_button_combo = $82FE78 ; This should be inside free space, and also consistent with reference in customize.rs
!loadstate_button_combo = $82FE7A ; This should be inside free space, and also consistent with reference in customize.rs
Expand Down
21 changes: 1 addition & 20 deletions patches/src/max_ammo_display_fast.asm
Original file line number Diff line number Diff line change
Expand Up @@ -404,26 +404,7 @@ HUD_digits_tilemap_row1:
dw $0000, $0001, $0002, $0003, $0004, $0005, $0006, $0007, $0008, $0009


warnpc !bank_80_free_space_end

;;; 85/ MISSILE/SUPER/POWER BOMB message tilemaps
org $858851
dw $280F, $280F, $280F

org $858891
dw $3049, $304A, $304B

org $858951
dw $280F, $280F, $280F

org $858993
dw $3034, $3035

org $858A4F
dw $280F, $280F

org $858A8F
dw $3036, $7036
assert pc() <= !bank_80_free_space_end

;;; 9A/$B200: Standard BG3 tiles ;;;
org $9AB542
Expand Down
7 changes: 1 addition & 6 deletions patches/src/missile_refill_all.asm
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,4 @@ fill_ammo:
sta $09CE
rts

assert pc() <= !bank_84_free_space_end

; change MISSILE to AMMO
org $8592FF
dw $000E, $000E, $000E, $000E, $000E, $000E, $2C0F, $2C0F, $2C0F, $2C0F, $2CC0, $2CCC, $2CCC, $2CCE, $2C0F, $2CD1, $2CC4, $2CCB, $2CCE, $2CC0, $2CC3, $2C0F, $2C0F, $2C0F, $2C0F, $2C0E, $000E, $000E, $000E, $000E, $000E, $000E
assert pc() <= $8593BF
assert pc() <= !bank_84_free_space_end
6 changes: 3 additions & 3 deletions patches/src/spin_lock.asm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
!bank_85_free_space_start = $859800
!bank_85_free_space_end = $859880
!bank_85_free_space_start = $85A050
!bank_85_free_space_end = $85A07A

incsrc "constants.asm"

Expand Down Expand Up @@ -34,4 +34,4 @@ hook_spin_lock:
lda $0A1C
asl A
rtl
warnpc !bank_85_free_space_end
assert pc() <= !bank_85_free_space_end
31 changes: 28 additions & 3 deletions rust/maprando/src/patch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -621,9 +621,9 @@ impl Patcher<'_> {
}
}

if self.settings.other_settings.wall_jump == WallJump::Collectible
|| self.settings.other_settings.speed_booster == SpeedBooster::Split
{
let extended_msg_boxes = self.settings.other_settings.wall_jump == WallJump::Collectible
|| self.settings.other_settings.speed_booster == SpeedBooster::Split;
if extended_msg_boxes {
patches.push("extended_msg_boxes");
}

Expand Down Expand Up @@ -1364,6 +1364,30 @@ impl Patcher<'_> {
Ok(())
}

fn write_ammo_or_missile_refil(&mut self) -> Result<()> {
// this overwrites the missile refill tilemap, if adjusting the extended message boxes table this
// will also need to be adjusted.
let extended_msg_boxes = self.settings.other_settings.wall_jump == WallJump::Collectible
|| self.settings.other_settings.speed_booster == SpeedBooster::Split;
if self.settings.quality_of_life_settings.ammo_refill_all {
let base = if extended_msg_boxes {
0x85933B
} else {
0x8592FF
};
let ammo_row: [u16; 32] = [
0x000E, 0x000E, 0x000E, 0x000E, 0x000E, 0x000E, 0x2C0F, 0x2C0F, 0x2C0F, 0x2C0F,
0x2CC0, 0x2CCC, 0x2CCC, 0x2CCE, 0x2C0F, 0x2CD1, 0x2CC4, 0x2CCB, 0x2CCE, 0x2CC0,
0x2CC3, 0x2C0F, 0x2C0F, 0x2C0F, 0x2C0F, 0x2C0E, 0x000E, 0x000E, 0x000E, 0x000E,
0x000E, 0x000E,
];
for (i, &word) in ammo_row.iter().enumerate() {
self.rom.write_u16(snes2pc(base) + i * 2, word as isize)?;
}
}
Ok(())
}

fn make_map_revealed(&mut self) -> Result<()> {
// Zero out map revealed bits. These will be filled in later to identify area-transition markers,
// which are tiles that need to be only fully revealed (not partial) since otherwise they would
Expand Down Expand Up @@ -3895,6 +3919,7 @@ pub fn make_rom(
{
patcher.use_area_based_music()?;
}
patcher.write_ammo_or_missile_refil()?;
patcher.setup_door_specific_fx()?;
if randomizer_settings.quality_of_life_settings.camera_fixes {
//nn note - the cre wasn't applied in ultralow qol, is this also camera fixes or some other reason - check this too!
Expand Down
6 changes: 5 additions & 1 deletion scripts/build_ips.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,11 @@ def check_range(filename, other_filename, overlap_start, overlap_end):
['max_ammo_display_fast', 0x858851, 0x858A93],
['max_ammo_display_fast', 0x9AB542, 0x9AB6C0],
['missile_refill_all', 0x8592FF, 0x85933F],
['Area Palettes', 0x82E569, 0x82E56C]
['Area Palettes', 0x82E569, 0x82E56C],
['extended_msg_boxes', 0x85877F, 0x859643]
],
'extended_msg_boxes': [
['hud_expansion_opaque', 0x85877F, 0x859643]
],
'fast_saves': [
['itemsounds', 0x858089, 0x85808B],
Expand Down
Loading