Skip to content

Commit

Permalink
14
Browse files Browse the repository at this point in the history
  • Loading branch information
spannerisms committed Sep 12, 2021
1 parent 8b4ca35 commit ff9d0bc
Show file tree
Hide file tree
Showing 98 changed files with 9,962 additions and 65,936 deletions.
24 changes: 6 additions & 18 deletions TODO.txt
Original file line number Diff line number Diff line change
@@ -1,20 +1,12 @@
Big stuff
----------

timer trigger on ganon sword up

Room tab:
room ID selector
"Set to current room"
show flags
"Load room"
new menu chars for improved flag viewing?
options for:
Peg state: current, red, blue
Kill sprites
Open shutter doors
Keep world state
Plaid world?
fix mushroom gfx for lost woods

Get good entrance caching for every EG 2 room in a table
replace eg caching in presets with a routine call/preset command
update preset script
use bit 7 to indicate left/right half for double entrance rooms

aga 2 rng
lui: agah2 submenu -> set positions for each of the agahs for cycles 1, 2, 3 and 4+
Expand All @@ -24,12 +16,8 @@ Other stuff

- deadrock rng control?

- Preset for double reddies

- Show cycle counter for Agahnim 2

- Better frame advance mode. Perhaps only pause while holding L in, and if you press R while holding L it advances the game one frame. Would be good for clip learning. Maybe stop timer during this.

- Frame counter for actions, like swinging your sword, throwing boomerang, enemy movement startup times. Startup/active/recovery.

- Room frame counts that show frame-pixel movement tallies. Would basically be to contrast how many nudge/slowdown/movement frames were lost that is pulled away from room overall time count and lag frames.
Expand Down
2 changes: 1 addition & 1 deletion build.bat
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
set version="14.0.0"
set version="14.1.0"

cd target

Expand Down
Binary file removed docs/ancillawatch.xcf
Binary file not shown.
Binary file removed docs/doorwatch.xcf
Binary file not shown.
Binary file removed docs/doorwatchicons.png
Binary file not shown.
5 changes: 4 additions & 1 deletion docs/hack.css
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ span.dgIcon {
display: inline-block;
margin-right: .3em;
margin-left: .5px;
image-rendering: crisp-edges;
image-rendering: pixelated;
}

Expand Down Expand Up @@ -216,6 +217,7 @@ span.menuIcon {
height: 16px;
display: inline-block;
margin: .3em 0 .1em;
image-rendering: crisp-edges;
image-rendering: pixelated;
}

Expand Down Expand Up @@ -257,9 +259,10 @@ ul.fontList > li > span.fontPreview {
background-image: url("fontpreviews.png");
background-color: #489848;
outline: 2px solid #489848;
width: 256;
width: 256px;
height: 16px;
vertical-align: sub;
image-rendering: crisp-edges;
image-rendering: pixelated;
}

Expand Down
Binary file removed docs/hudfeatures.xcf
Binary file not shown.
113 changes: 72 additions & 41 deletions docs/index.html

Large diffs are not rendered by default.

Binary file modified docs/menuicons.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/patcher/files/sa1.bps
Binary file not shown.
Binary file modified docs/patcher/files/sa1rando.bps
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/patcher/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "LTTPHack",
"version": "14.0.0",
"version": "14.1.0",
"base": {
"name": "A Link to the Past (J) 1.0",
"crc": "3322EFFC"
Expand Down
6 changes: 5 additions & 1 deletion docs/presetbuilding.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
---
<section id="presets">

<h2>Expectations</h2>
<p>For examples of preset definitions in the desired format, look at <a href="https://github.com/spannerisms/lttphack/tree/master/src/resources/movie">the repository's existing files</a>. The <code>preset_scraper.lua</code> script used to create preset data files can also be found here. To run this script, navigate to the Lua console under the Tools menu, then open the script from there. The script should not be run until a movie is playing. All files should be in the same directory, and within that directory should be a folder named <code>states</code>.</p>

<h2>Recording</h2>
<p>Create an emulator playback file in BizHawk 2.3+ using the vanilla JP1.0 ROM. You don't need to play perfectly, but play well enough that any preset built from the movie is useful for practice. Sloppy movement is fine, as long as Link's position for defined presets is useful. However, movies should still be reasonably good execution. Avoid taking unintended damage unless a trick is hard enough that every runner expects to take damage more often than not.</p>

Expand Down Expand Up @@ -49,12 +52,13 @@ <h2>Defining presets</h2>
<li>Choose frames that precede the next scene of action. For example, if the preset is for a kill room, define the frame as one where Link is in the door in the room before it. Don't pick frames that are in the middle of combat, performing a transition, or using an interface. The gamer should have control of Link once the preset is loaded, so the preset should be defined as a frame with control.</li>
<li>If you have specific concerns for what data gets scraped or presets you are unsure will be created properly, put a comment by adding a pound sign (#) followed by the comment at the end of the line. Everything that follows the pound sign will be ignored.</li>
<li>After the last segment, create a segment named "End"; i.e. put a new line containing <code>=&nbsp;End</code>.</li>
<li>After you have defined the end, put one more new line. This is required due to a bug I don't feel like fixing.</li>
</ul>

<h2>Submitting</h2>
<p>Ideally, you will run the scraping script yourself. If you do that, be sure to include a folder in the same directory as the script named <code>states</code>. The script will automatically create a save state 60 frames before every preset. The script will also create a file named <code>cm_presets_&gt;category&lt;.asm</code>. Ideally, you package this file along with the preset definitions and every save state in a single <code>.zip</code> folder.</p>

<p>After submission and some initial clean up, I will send you a <code>.bps</code> file for you to patch yourself and test the presets.
<p>After submission and some initial clean up, I will send you a <code>.bps</code> file for you to patch yourself and test the presets.</p>

<h2>Styling</h2>
<ul>
Expand Down
57 changes: 56 additions & 1 deletion docs/updates.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,62 @@

<h2>Latest update</h2>

<h3 id="v14"><a href="https://github.com/spannerisms/lttphack/releases/tag/14.0.0">v14.0.0</a> <span class="releaseDate"></span></h3>
<h3><a href="https://github.com/spannerisms/lttphack/releases/tag/14.1.0">v14.1.0</a> <span class="releaseDate">12 September 2021</span></h3>

<ul class="changes">
<li>Fixed an issue that made presets remove too much lag.</li>
<li>Added a new "Room master" submenu that includes the ability to view and set flags for underworld rooms, and load arbitrary rooms.</li>
<li>Presets:
<ul>
<li>Proper 100% NMG presets (thanks to Sirius)</li>
<li>Changed various preset names.</li>
<li>Added "Bumper Skip" for NMG presets.</li>
<li>Fixed some data issues with Swamp lobby.</li>
<li>Fixed 10,000,000,000 errors with the preset scraping script.</li>
</ul>
</li>
<li>Game state:
<ul>
<li>Added a submenu for controlling drops and such.</li>
<li>Fixed boss deaths menu.</li>
</ul>
</li>
<li>RNG Control:
<ul>
<li>Fixed pokeys</li>
</ul>
</li>
<li>HUD Extras:
<ul>
<li>Rebranded counters as "sentries".</li>
<li>Improved the Hookslot sentry to include an icon indicating what it is, an icon indicating if hookdrag is active, and the layer bit.</li>
<li>Added an icon for the ancilla search index, spooky, UW tile, boss HP, and WEST SOMARIA sentries.</li>
<li>Added an icon for every ancilla property as well as an icon for which set of slots is being watched.</li>
<li>Renamed "Heart lag" to "HUD lag" and moved the indicator to the left of the magic bar.</li>
<li>Added a state icons feature that displays along the left side of the HUD.</li>
<li>Removed door state from the subpixels sentry in favor of the state icon.</li>
<li>Added cycle counter for Agahnim 2.</li>
</ul>
</li>
<li>Other:
<ul>
<li>Implemented a blue screen of death for catching BRK and COP software interrupts. This will hopefully protect configuration settings more often.</li>
<li>Improved behavior for finding the currently equipped item after modifying items.</li>
<li>Changed the numfield icon to something more cool and abstract and less ugly.</li>
<li>Filling equipment will update the rest of the menu.</li>
<li>Fixed a bug with saving HDMA channels during savestates.</li>
<li>Fixed a bug with overworld sprite deaths during savestates.</li>
<li>Link no longer slides around if a preset is loaded during death.</li>
<li>Loading last preset should no longer bring up the select menu (unless you hold select for too long).</li>
<li>Rerandomization works properly again.</li>
<li>Rerebranded the default font again.</li>
<li>Segment timer now resets on preset load.</li>
<li>Removed file 3 BAGE functionality, since no one uses it and there are existing functions for max equipment.</li>
</ul>
</li>
</ul>

<h3 id="v14"><a href="https://github.com/spannerisms/lttphack/releases/tag/14.0.0">v14.0.0</a> <span class="releaseDate">1 September 2021</span></h3>

<h4>Changes</h4>
<ul class="changes">
Expand Down
202 changes: 202 additions & 0 deletions src/bsod.asm
Original file line number Diff line number Diff line change
@@ -0,0 +1,202 @@
check bankcross off

Pekola:
incbin resources/pekola.8bpp
fillbyte $00 : fill $40
.end

check bankcross on

table resources/menu.tbl

OOPS:
PHK
PLB

SEP #$30

LDX.b #$80 : STX.w $2100

STZ.w $4200

REP #$20

LDA.w #$2100
TCD

STX.b $2115

LDY.b #$FD : STY.b $210E
LDY.b #$FF : STY.b $210E

TAY

LDA.w #$05F0 : STA.b $2140
LDA.w #$2B0C : STA.b $2142

STY.b $210D : STY.b $210D
STZ.b $210F
STZ.b $210F

STZ.w $212E
STZ.w $2130

STY.b $2106
STY.b $2121

LDA.w #$0303 : STA.b $212C
LDY.b #$04 : STY.b $2105

LDA.w #$7870 : STA.b $2107

LDY.b #$60 : STY.b $210B

LDA.w #$7000 : STA.b $2116

REP #$10

LDA.w #$02C0
LDX.w #6*32
-- STA.b $2118
DEX
BNE --

LDX.w #22*32
LDA.w #$0000
-- STA.b $2118
INC
DEX
BNE --

LDX.w #3*32

-- STZ.b $2118
DEX
BNE --

LDX.w #1*32
-- STA.b $2118
DEX
BNE --

LDA.w #$7800 : STA.b $2116

LDA.w #$202F
LDX.w #36*32
-- STA.b $2118
DEX
BNE --

LDY.w #$F042>>1 : STY.b $2116

LDX.w #.text_a-1

; LDA.w !config_init_sig : CMP.w #!INIT_SIGNATURE : BEQ .config_fine

; LDX.w #.text_b-1

.config_fine
-- INX
LDA.w $0000,X
AND.w #$00FF

CMP.w #$00FF
BEQ ++

CMP.w #'$' : BNE +
TYA
CLC
ADC.w #$0020
STA.b $2116
TAY
BRA --

+ ORA.w #$2000
STA.b $2118
BRA --

++ LDA.w #$F0FA>>1 : STA.b $2116

TSC : XBA : AND.w #$00FF : CLC : ADC.w #$2070 : STA.b $2118
TSC : AND.w #$00FF : CLC : ADC.w #$2070 : STA.b $2118

LDA.w #$F102>>1 : STA.b $2116

TSX
BMI .done_stack

TCS
LDY.w #$FFFF

-- INX
INY
CPX.w #$0200 : BCS .done_stack
CPY.w #$001E : BCC ++

LDY.w #$0000
TSC
ADC.w #$001F
STA.b $2116
TCS

++ LDA.l $000000,X
AND.w #$00FF
CLC
ADC.w #$2070
STA.b $2118
BRA --


.done_stack

SEP #$10

STZ.b $2116

LDA.w #$4300 : TCD

LDA.w #$1801 : STA.b $4300
TAY

LDX.b #Pekola>>16 : STX.b $4304
LDA.w #$8000 : STA.b $4302
STA.b $4305
STY.w $420B

INX : STX.b $4304
STA.b $4302
LDA.w #Pekola_end&$7FFF : STA.b $4305
STY.w $420B

LDA.w #$C000>>1 : STA.w $2116
LDA.w #cm_gfx>>0 : STA.b $4302
LDX.b #cm_gfx>>16 : STX.b $4304
LDA.w #16*16*7 : STA.b $4305
STY.w $420B

LDA.w #.hex>>0 : STA.b $4302
LDX.b #.hex>>16 : STX.b $4304
LDA.w #256*16 : STA.b $4305
STY.w $420B

LDA.w #$2200 : STA.b $4300
LDA.w #.palette : STA.b $4302
LDA.w #512 : STA.b $4305
STY.w $420B

LDX.b #$0F : STX.w $2100

-- BRA --

.text_a
; "012345678901234567890123456789012"
db "A fatal error has occured.$"
db "The system halted to attempt$"
db "to prevent config damage."
db $FF

.palette
dw hexto555($000050), hexto555($282828), hexto555($FFFFFF), hexto555($282828), hexto555($303028), hexto555($303028), hexto555($303030), hexto555($303030), hexto555($303030), hexto555($383030), hexto555($383030), hexto555($303838), hexto555($303830), hexto555($383830), hexto555($383840), hexto555($383838), hexto555($383840), hexto555($403838), hexto555($404040), hexto555($404040), hexto555($404040), hexto555($484040), hexto555($404048), hexto555($404840), hexto555($484848), hexto555($484840), hexto555($484838), hexto555($484848), hexto555($484848), hexto555($484850), hexto555($484850), hexto555($504848), hexto555($504848), hexto555($485058), hexto555($505048), hexto555($505048), hexto555($505058), hexto555($505050), hexto555($505050), hexto555($585050), hexto555($585058), hexto555($505058), hexto555($505060), hexto555($505858), hexto555($505850), hexto555($585850), hexto555($585850), hexto555($605858), hexto555($605860), hexto555($585868), hexto555($585858), hexto555($585860), hexto555($605848), hexto555($605858), hexto555($605850), hexto555($585870), hexto555($585860), hexto555($606060), hexto555($606060), hexto555($586070), hexto555($686060), hexto555($686060), hexto555($606068), hexto555($686058), hexto555($606070), hexto555($686060), hexto555($606068), hexto555($606068), hexto555($606078), hexto555($686060), hexto555($606870), hexto555($706060), hexto555($686860), hexto555($686870), hexto555($706060), hexto555($686860), hexto555($606860), hexto555($606880), hexto555($686878), hexto555($706868), hexto555($706860), hexto555($706868), hexto555($786860), hexto555($606880), hexto555($706860), hexto555($687070), hexto555($687078), hexto555($786868), hexto555($707068), hexto555($707070), hexto555($707068), hexto555($786870), hexto555($707070), hexto555($787068), hexto555($707080), hexto555($687088), hexto555($787068), hexto555($787070), hexto555($787068), hexto555($707088), hexto555($787068), hexto555($787068), hexto555($807068), hexto555($707080), hexto555($787870), hexto555($707878), hexto555($787878), hexto555($707890), hexto555($887070), hexto555($787878), hexto555($707888), hexto555($807878), hexto555($787888), hexto555($807870), hexto555($807870), hexto555($787870), hexto555($807870), hexto555($787898), hexto555($887878), hexto555($787890), hexto555($807880), hexto555($807880), hexto555($887878), hexto555($788080), hexto555($888080), hexto555($788098), hexto555($908078), hexto555($788098), hexto555($888078), hexto555($888078), hexto555($888070), hexto555($888080), hexto555($888088), hexto555($808088), hexto555($908080), hexto555($808090), hexto555($808878), hexto555($808098), hexto555($988080), hexto555($888870), hexto555($888868), hexto555($808898), hexto555($908888), hexto555($8088A0), hexto555($908878), hexto555($888888), hexto555($888880), hexto555($888898), hexto555($988880), hexto555($8888A0), hexto555($988888), hexto555($909070), hexto555($A08888), hexto555($8890A0), hexto555($989080), hexto555($909088), hexto555($8890A8), hexto555($989088), hexto555($A08888), hexto555($909070), hexto555($909090), hexto555($9090A8), hexto555($989090), hexto555($A09088), hexto555($989088), hexto555($989088), hexto555($989090), hexto555($989890), hexto555($9098A8), hexto555($909898), hexto555($A89090), hexto555($9098A0), hexto555($9098B0), hexto555($989898), hexto555($9098B0), hexto555($9898A8), hexto555($9898A0), hexto555($9898B0), hexto555($A89890), hexto555($989890), hexto555($A0A090), hexto555($A0A078), hexto555($98A0A0), hexto555($B09898), hexto555($A8A0A0), hexto555($A0A098), hexto555($A0A0B8), hexto555($A0A0A8), hexto555($B0A098), hexto555($A8A898), hexto555($B0A0A0), hexto555($A0A8A8), hexto555($A8A880), hexto555($A8A8C0), hexto555($B0A8A8), hexto555($B0B080), hexto555($B0B0A0), hexto555($C0A8A8), hexto555($A8B0B0), hexto555($B8B0A8), hexto555($B0B8B8), hexto555($C0B0B0), hexto555($B0B8C8), hexto555($B8B8A8), hexto555($C0B8B8), hexto555($B8B8C0), hexto555($C8B8B8), hexto555($B8C0D0), hexto555($C0C0B0), hexto555($C0C0C8), hexto555($C8C0C0), hexto555($C8C0C0), hexto555($C0C8C8), hexto555($D0C8C8), hexto555($C8D0D8), hexto555($D0D0D8), hexto555($D8D0D0), hexto555($D8D8E0), hexto555($D8E0E8), hexto555($E0D8D8), hexto555($E0E0E0), hexto555($E0E0E0), hexto555($000088), hexto555($000088), hexto555($000088), hexto555($000000), hexto555($000000), hexto555($000000), hexto555($000000), hexto555($000000), hexto555($000000), hexto555($000000), hexto555($000000), hexto555($000000), hexto555($000000), hexto555($000000), hexto555($000000), hexto555($000000), hexto555($000000), hexto555($000000), hexto555($000000), hexto555($000000), hexto555($000000), hexto555($000000), hexto555($000000), hexto555($000000), hexto555($000000), hexto555($000000), hexto555($000000), hexto555($000000), hexto555($000000), hexto555($000000), hexto555($000000), hexto555($000000), hexto555($000000), hexto555($000000)

.hex
incbin "resources/bsodhex.2bpp"
Loading

0 comments on commit ff9d0bc

Please sign in to comment.