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

Upgrade the maximum number of SFX instruments permitted #406

Open
wants to merge 4 commits 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
23 changes: 14 additions & 9 deletions asm/main.asm
Original file line number Diff line number Diff line change
Expand Up @@ -1219,20 +1219,25 @@ FetchPtrFromSFXDataAndRET:

SetSFXInstrument:
mov y, #$09 ; \
mul ya ; | Set up the instrument table for SFX
mov x, a ; |
mul ya ; | Set up the instrument table for SFX
mov $14, #SFXInstrumentTable ; |
mov $15, #SFXInstrumentTable>>8 ; |
addw ya, $14 ; |
movw $14, ya ; |
mov y, #$00 ; |
mov a, $46 ; | \
xcn a ; | | Get the correct DSP register "base" into y.
lsr a ; | |
mov y, a ; | /
mov $12, #$08 ; / 9 bytes of instrument data.
mov x, a ; / /
- ; \
mov a, SFXInstrumentTable+x ; |
call DSPWrite ; | Loop that sets various DSP registers.
mov a, ($14)+y ; |
mov $f2, x ; | Loop that sets various DSP registers.
mov $f3, a ; |
inc x ; |
inc y ; |
dbnz $12, - ; /
mov a, SFXInstrumentTable+x ; \
inc y ; |
cmp y, #$08 ; | 9 bytes of instrument data.
bcc - ; /
mov a, ($14)+y ; \
mov x, $46 ; | Set pitch base multiplier.
mov $0210+x, a ; /
mov a, #$00 ; \ Disable sub-tuning
Expand Down
8 changes: 8 additions & 0 deletions readme_files/changelog.html
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,14 @@ <h2>Version 1.0.9 - 2023-08-28</h2>
</ul>
</li>
</ul>
<h2>Version 1.0.10 Alpha - 2023-10-12</h2>
<ul>
<li>SFX
<ul>
<li>"Upgraded the maximum number of SFX instruments available from 28 (due to an 8-bit index offset limitation) to 128." - KungFuFurby</li>
</ul>
</li>
</ul>

<br><br>

Expand Down