Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check $2141 for a zeroed value instead of using hardcoded NOPs #446

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
26 changes: 20 additions & 6 deletions asm/SNES/patch.asm
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,12 @@ endif

LDA !NoUploadSamples
BEQ +
NOP #3 ; Missing waiting cycles after UploadSPCData added
;$2141 is still outputting a $BB, courtesy of acknowledging that it
;is ready for a data transfer. This is zeroed out upon the
;completion of the transfer, so wait for that to happen first.
-:
LDA $2141
BNE -
JMP SPCNormal
+

Expand Down Expand Up @@ -602,8 +607,12 @@ NoMoreSamples:
STA $03 ; |
JSL UploadSPCDataDynamic ; /
SEP #$20
NOP #11 ; Needed to waste time. 10817b
; On ZSNES it works with only 4 NOPs because...ZSNES.
;$2141 is still outputting a $BB, courtesy of acknowledging that it
;is ready for a data transfer. This is zeroed out upon the
;completion of the transfer, so wait for that to happen first.
-:
LDA $2141
BNE -
JMP SkipSPCNormal

; Time to get the SPC out of its loop.
Expand All @@ -622,9 +631,14 @@ else ; |
endif ; |
STA $02 ; |
JSL UploadSPCData ; /

NOP #8 ; Needed to waste time.
; On ZSNES it works with only 4 NOPs because...ZSNES.

;$2141 is still outputting a $BB, courtesy of acknowledging that it
;is ready for a data transfer. This is zeroed out upon the
;completion of the transfer, so wait for that to happen first.
-:
LDA $2141
BNE -

SPCNormal:
SEP #$30

Expand Down
6 changes: 5 additions & 1 deletion readme_files/changelog.html
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,11 @@ <h2>Version 1.0.11 - 2024-07-01</h2>
</ul>
<h2>Version 1.0.12 Alpha - 2024-09-12</h2>
<ul>
<li>Oops! You're a little early. This version hasn't had any changes from 1.0.11 yet. - KungFuFurby</li>
<li>Gameplay
<ul>
<li>"Fixed a bug where a local song would sometimes initially fail to play after loading in some emulators." - KungFuFurby</li>
</ul>
</li>
</ul>
<br><br>

Expand Down