Skip to content

Commit

Permalink
a
Browse files Browse the repository at this point in the history
  • Loading branch information
spannerisms committed Sep 22, 2021
1 parent 068ad8d commit 02afe5e
Show file tree
Hide file tree
Showing 75 changed files with 8,899 additions and 4,538 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@
std*.txt
*.srm
target/
src/resources/movie/*.asm
src/resources/movie/*.asm
*.state
138 changes: 0 additions & 138 deletions TODO.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,9 @@ 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+

Other stuff
------------

- deadrock rng control?

- Show cycle counter for Agahnim 2

- 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.

- Active movement speed counter. Like the above kinda but shows real time how fast you're going. Would help for things like understanding swim speeds or hidden bastard/rail type deals.

======== MINIGAMES TODO ========

- Movies

- Ghost Link

- Counters (spec below)

- Mashing & Pumping mini-game
Expand Down Expand Up @@ -66,125 +50,3 @@ Other stuff
- frames where diagonal is held
- # of pixel boost chances per second on average
* for air and for wall, according to my hypothesis


======== MOVIES TODO ========

- Movies (menu)

[ Options ]
Record: [Disabled, Movies, Ghost Link, Both]
HUD: [No, Record, Play, Both]

[ Save current movie ]
- Should be put at the top, pushing everything down.

( List of movies )
- A to play movie
- Y to play ghost link
- X to delete
- Could use preset names
- Infinite scroll

- Stop movie before saving movie from menu

- Disable SD2SNES save/load state

- Disable movie record on Poverty states

- During playback:
* L = Pause playback when held
* L + tap R = Frame advance once.
* L + hold R = Slow motion (after 30f of holding)
* X = Stop movie (gives control back to player)
* A = Replay movie from start


======== GHOST LINK SPEC ========

- Record type
* 1 = movie only
* 2 = ghost only
* 3 = both
Needs to be stored in Movies meta.

- Depending on record type, we populate !ram_movie differently
* Ghost format:
ttffffff ffffffff yyyyyyyy yyyyyyyy xxxxxxxx xxxxxxxx ddaaaaaa
- t = 0
- f = frames
- y = y coord
- x = x coord
- d = direction
- a = animation data (dashing, picking up pot, holding wall, shooting bow, idk.. probably need more bytes if we want it to actually look good too)

* Movie format:
ttffffff ffffffff BYSTudlr AXLR0000
- t = 1
- f = frames of inputs held
- rest = which keys are held

* RNG format:
tt000000 nnnnnnnn
- t = 2
- n = rng value

- When replaying, we need to either select Movie or Ghost.
* Look for highest two bits to find out if it's a Ghost entry, Movie entry or RNG entry.
Jump over stuff we should jump over.
Track RNG index separately and call `LDA #!ENTRY_RNG : LDX !ram_rng_index : JSR find_next_entry`.


======== COUNTERS SPEC ========

DNGSCR ☑ hex1 0000A0 #
OWSCR ☑ hex1 00008A #
HSCRLL ▢ hex2 0000E2 #
VSCRLL ▢ hex2 0000E8 #
ROMDTA ☑ hex1 000403 #
LAYER ▢ dec1 0000EE #
GNOCNT ☑ dec2 000123 #
ALTITU ☑ dec2 0002A2 #
PODSCR ☑ dec2 00F0D4 #

ADD NEW

--------------------------

^ and v = Normal
< and > = Select what to edit
A = Edit
X = Remove line

☑ & ▢ = enabled/disabled
# = set position (use dpad to find position, A/Start to commit, B/X to cancel, L/R to change colors?)

--------------------------

enum Type {
dec1,
dec2,
dec4,
hex1,
hex2,
hex4
}

struct {
char name[6];
bool enabled;
Type type;
uint24 address;
uint16 position;
uint8 palette;
} counters[]

---------------------------

1. make linked list of counter-ouput
struct {
uint16 position;
uint8 palette;
char tiles[10];
} buffer[];
2. blit it to screen after vblank hud update
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.1.0"
set version="14.2.0"

cd target

Expand Down
3 changes: 2 additions & 1 deletion docs/hack.css
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,8 @@ ul.colorList > li.colorDefine > .colorBlock {
padding: 0 4px;
width: 90px;
text-align: center;
height: 20px;
height: 18px;
margin: 1px 3px 1px 0;
}

/**************************************
Expand Down
16 changes: 15 additions & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,8 @@ <h3 id="menuMain">Main menu</h3>
<dd>Fix specific RNG calls to specific values</dd>
<dt><a href="#menuHUD">HUD extras</a></dt>
<dd>Toggle features that appear on the HUD</dd>
<dt><a href="#menuLiteStates">Lite states</a></dt>
<dd>Custom presets</dd>
<dt><a href="#menuRoomMaster">Room master</a></dt>
<dd>Load rooms and view/edit room flags</dd>
<dt><a href="#menuShortcuts">Shortcuts</a></dt>
Expand Down Expand Up @@ -587,6 +589,8 @@ <h3 id="menuGameplay">Gameplay</h3>
<dd>Speeds up the moving wall cutscenes.</dd>
<dt>Visible probes<sup class="badge lag-badge">LAG</sup></dt>
<dd>Search probes used by guards, beamos, etc. will display a graphic.</dd>
<dt>Show STC pits</dt>
<dd>Automatically mark all pits after performing somaria door corruptions.</dd>
<dt>Disable BG1</dt>
<dd>Disables SNES background 1 via PPU registers. Has no effect on lag.</dd>
<dt>Disable BG2</dt>
Expand Down Expand Up @@ -766,7 +770,7 @@ <h3 id="menuHUD">HUD extras</h3>
<dt>Pits</dt>
<dd>Current pit destination/damage flag. Not displayed on overworld; address: $7EC000</dd>
<dt>Hookslot</dt>
<dd>Hookshot slot index, layer, and activeness; address: $7E039D</dd>
<dd>Hookshot slot index; address: $7E039D</dd>
<dt>Boss HP</dt>
<dd>Health of enemy in slot 0; address: $7E0E50</dd>
<dt>Hovering</dt>
Expand Down Expand Up @@ -831,6 +835,15 @@ <h3 id="menuHUD">HUD extras</h3>
<dd>Displays the cycle count of bosses.</dd>
</dl>

<h3 id="menuLiteStates">Lite states</h3>
<p>16 custom presets that can be saved, loaded, and erased.</p>
<ul>
<li>To load a lite state, press <span class="snesButton snesA">A</span>.</li>
<li>To write a lite state, hold <span class="snesButton snesY">Y</span> for 60 frames. This will create a preset at your current location with your current equipment.</li>
<li>To delete a lite state, hold <span class="snesButton snesX">X</span> for 60 frames.</li>
</ul>


<h3 id="menuRoomMaster">Room master</h3>
<dl>
<dt>Set room</dt>
Expand Down Expand Up @@ -962,6 +975,7 @@ <h3 id="menuConfiguration">Configuration</h3>
<li class="colorDefine"><div class="colorBlock" style="background:#F76D61">F76D61</div>Peach42</li>
<li class="colorDefine"><div class="colorBlock" style="background:#2AA8D9">2AA8D9</div>Siriusly?</li>
<li class="colorDefine"><div class="colorBlock" style="background:#BADA55">BADA55</div>Almost BADA55</li>
<li class="colorDefine"><div class="colorBlock" style="background:#FFBFFF">FFBFFF</div>Blunt pink</li>
</ul>
</dd>
</dl>
Expand Down
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.1.0",
"version": "14.2.0",
"base": {
"name": "A Link to the Past (J) 1.0",
"crc": "3322EFFC"
Expand Down
4 changes: 3 additions & 1 deletion docs/presetbuilding.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ <h3>Tips for recording</h3>

<h2>Defining presets</h2>
<ul>
<li>Create a <code>.txt</code> named <code>&lt;category&gt;.txt</code>.</li>
<li>Create a <code>.txt</code> file named <code>&lt;category&gt;.txt</code>.</li>
<li>At the top of the file, put an "at" symbol (@), followed by a space, followed by the name of the category as it should be displayed.</li>
<li>To define a new segment, enter a new line that starts with an equals sign (=), followed by a space, followed by the name of the segment as it should be displayed in the menu.</li>
<li>To define a preset in a segment, start the line with the frame of the movie to capture data from, followed by a space, followed by the name of the preset as it should be displayed in the menu.</li>
Expand All @@ -60,6 +60,8 @@ <h2>Submitting</h2>

<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>

<p>When completed, all savestates generated by the final run of the script will be archived in <a href="https://github.com/spannerisms/PracticeStates">a separate repository</a>.</p>

<h2>Styling</h2>
<ul>
<li>Category, segment, and preset names should be no longer than 25 characters and are limited to alphanumeric characters and the following symbols: <code>% $ . - , ? ! # ( ) '</code></li>
Expand Down
56 changes: 34 additions & 22 deletions docs/updates.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,39 @@

<h2>Latest update</h2>


<h3><a href="https://github.com/spannerisms/lttphack/releases/tag/14.2.0">v14.2.0</a> <span class="releaseDate">22 September 2021</span></h3>

<ul class="changes">
<li>Presets:
<ul>
<li>Added the rest of the Boss RTA Presets (courtesy of sirius).</li>
<li>Added "Double Reddies" preset for NMG categories.</li>
<li>Added bastard door behavior to several presets.</li>
<li>Fixed shutter doors on lower layers.</li>
<li>Randomized ice palace conveyor in presets.</li>
<li>Compressed preset data a little more (hopefully no problems).</li>
<li>Updated preset scraping script.</li>
</ul>
</li>
<li>Gameplay:
<ul>
<li>Added an option to always show somaria pits after corruptions.</li>
</ul>
</li>
<li>Other:
<ul>
<li>Introduced a beta for custom presets with the <a href="index#menuLiteStates">Lite states</a> menu. See that section for how to use them.</li>
<li>Fixed a savestate issue. Savestates from previous versions should not be loaded after updating.</li>
<li>Improved music load logic for Link's house.</li>
<li>Reversed the stack printing in the blue screen of death so that it's actually readable.</li>
<li>Added a color for BluntBunny since he asked nicely.</li>
</ul>
</li>
</ul>

<h2>Older updates</h2>

<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">
Expand Down Expand Up @@ -33,8 +66,7 @@ <h3><a href="https://github.com/spannerisms/lttphack/releases/tag/14.1.0">v14.1.
<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 the ancilla search index, spooky, UW tile, boss HP, hookslot, 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>
Expand All @@ -61,26 +93,6 @@ <h3><a href="https://github.com/spannerisms/lttphack/releases/tag/14.1.0">v14.1.
</ul>












<h2>Older updates</h2>









<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>
Expand Down
10 changes: 7 additions & 3 deletions src/bsod.asm
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,14 @@ OOPS:
TCS
LDY.w #$FFFF

-- INX
INX
STX.w $4350

LDX.w #$0200

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

LDY.w #$0000
Expand All @@ -148,7 +153,6 @@ OOPS:


.done_stack

SEP #$10

STZ.b $2116
Expand Down
4 changes: 3 additions & 1 deletion src/cm_config.asm
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ CONFIG_SUBMENU:
%submenu("Color config", COLOR_CONFIG_SUBMENU)

;===================================================================================================
!color_count = 20
!color_count = 21
!color_id = -1

COLORS_YAY:
Expand Down Expand Up @@ -165,6 +165,8 @@ color_list:
%fixed_color($2AA8D9, "Siriusly?")
%fixed_color($BADA55, "BADA55")

%fixed_color($FFBFFF, "Blunt pink")

;===================================================================================================
UnmutedInstruments:
dw .end-.start, $3D00
Expand Down
Loading

0 comments on commit 02afe5e

Please sign in to comment.