diff options
| author | Miquel Sabaté Solà <mssola@mssola.com> | 2025-12-10 14:41:35 +0100 |
|---|---|---|
| committer | Miquel Sabaté Solà <mssola@mssola.com> | 2025-12-15 15:31:06 +0100 |
| commit | 74b1003ab8abad2f8220de4f2f18a3b118f23f01 (patch) | |
| tree | b7f2d491d708fa900d4dd9649eb5bd7fab3e8686 /src/driver.s | |
| parent | e6d9bd9f7acfd0e40025b2d579a7faff0d04ef0a (diff) | |
| download | jetpac.nes-74b1003ab8abad2f8220de4f2f18a3b118f23f01.tar.gz jetpac.nes-74b1003ab8abad2f8220de4f2f18a3b118f23f01.zip | |
Adapt the code to play well with nasm's asan
The address sanitizer from nasm provides quite a few goodies, so let's
adapt the code more to it to benefit from those.
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
Diffstat (limited to 'src/driver.s')
| -rw-r--r-- | src/driver.s | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/driver.s b/src/driver.s index 3ed0536..149eaa7 100644 --- a/src/driver.s +++ b/src/driver.s @@ -6,7 +6,7 @@ ;; ;; NOTE: this memory address is shared with `zp_title_timer`, as they can ;; never conflict with each other. - zp_player_timer = $30 + zp_player_timer = $30 ; asan:ignore PLAYER_TIMER_VALUE = HZ * 2 .ifdef PAL @@ -165,7 +165,7 @@ ;; It is a valid bullet! Set it now. lda Bullets::zp_bullets_pool_base + 1, x - sta $200, y + sta OAM::m_sprites, y iny ;; The tile selection depends on how many moves the bullet has done. @@ -183,14 +183,14 @@ @last_bullet_tile: lda #$1E @set_bullet_tile: - sta $200, y + sta OAM::m_sprites, y iny lda #0 - sta $200, y + sta OAM::m_sprites, y iny lda Bullets::zp_bullets_pool_base + 2, x - sta $200, y + sta OAM::m_sprites, y iny @after_first_bullet: @@ -238,7 +238,7 @@ beq @next_bullet lda Bullets::zp_bullets_pool_base + 1, x - sta $200, y + sta OAM::m_sprites, y iny ;; The tile selection depends on how many moves the bullet has done. @@ -256,14 +256,14 @@ @other_last_bullet_tile: lda #$1E @other_set_bullet_tile: - sta $200, y + sta OAM::m_sprites, y iny lda #0 - sta $200, y + sta OAM::m_sprites, y iny lda Bullets::zp_bullets_pool_base + 2, x - sta $200, y + sta OAM::m_sprites, y iny @next_bullet: @@ -287,7 +287,7 @@ ;; need for the 'y' register to wrap around in order to quit. lda #$EF @reset_sprite: - sta $200, y + sta OAM::m_sprites, y iny iny iny |
