diff options
| author | Miquel Sabaté Solà <mssola@mssola.com> | 2026-04-08 16:10:41 +0200 |
|---|---|---|
| committer | Miquel Sabaté Solà <mssola@mssola.com> | 2026-04-08 16:10:41 +0200 |
| commit | c3c6f3b4469bf9eadff5763fa16dbbbf15637e57 (patch) | |
| tree | 49ba5117a426554e3aeb85de5abf78d5f8478160 | |
| parent | 3cc900bf0482bb2c19df9b1bb753ecfb505bbbe3 (diff) | |
| download | jetpac.nes-c3c6f3b4469bf9eadff5763fa16dbbbf15637e57.tar.gz jetpac.nes-c3c6f3b4469bf9eadff5763fa16dbbbf15637e57.zip | |
Use the new asan:stack statement
This allows us to account for the stack on the memory report. Using half
of the $100 page for stack management is most surely overblown, but I
have not really computed how much we are using the stack on this game,
even if I suspect that its usage is actually pretty minimal. Anyways, we
have room to spare in RAM space, so let's reserve half a page for the
stack.
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
| -rw-r--r-- | .nasm/memory.txt | 3 | ||||
| -rw-r--r-- | src/jetpac.s | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/.nasm/memory.txt b/.nasm/memory.txt index 35133c5..e2ab039 100644 --- a/.nasm/memory.txt +++ b/.nasm/memory.txt @@ -69,6 +69,7 @@ $E2: zp_current_bullet_y $E3: zp_current_bullet_x $E7-$EF: zp_current_tiles $F0-$FF: zp_current_tiles +$0180-$01FF: <stack> $0200-$02FF: m_sprites $0300-$030B: m_players $030C-$0311: m_hi @@ -85,4 +86,4 @@ $4016: m_joypad $4017: m_frame_counter --- Summary (in bytes) --- -- Internal RAM: 439/2048 (21.44%) +- Internal RAM: 567/2048 (27.69%) diff --git a/src/jetpac.s b/src/jetpac.s index 767e2ae..f2e28b2 100644 --- a/src/jetpac.s +++ b/src/jetpac.s @@ -65,7 +65,7 @@ ;; Setup the stack. ldx #$FF - txs + txs ; asan:stack $80-$FF ;; Disable NMIs and the APU's DMC. inx |
