Skip to content

Commit

Permalink
Arpeggio fixed. Several optimizations.
Browse files Browse the repository at this point in the history
Arpeggio fixed. Several optimizations.
  • Loading branch information
AntonioND committed May 24, 2014
1 parent 0c47ace commit f8bf18a
Show file tree
Hide file tree
Showing 9 changed files with 156 additions and 192 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,17 @@ instr_test.gb is a sample of the default sounds.

range_test.gb is just a test of what notes the GB can reach (C3 - B8).

arpeggio_test.gb tests arpeggio effects.
effects_test.gb tests arpeggio and "cut note" effects.

The mod file isn't 100% accurate. Sounds are a bit different from the real ones, so you should make roms and test them in emulators or real GB often.

Changelog
---------

- Version 2.1.0 (2014/5/24)
- Fixed arpeggio effect. Now it keeps looping until tick = 0 (previously it only looped once).
- Fixed arpeggio effect. Now it keeps looping until tick = 0 (previously it only looped once). Loops 3 steps, not 4.
- Added "Cut Note" effect.
- Effects optimizations.

- Version 2.0.1 (2014/5/23)
- Fixed effects in channels 1, 2 and 3 in GBDK version.
Expand Down
20 changes: 20 additions & 0 deletions gbdk_example/gbt_player.s
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ gbt_arpeggio_freq_index::
.ds 3*3 ; { base index, base index + x, base index + y } * 3
gbt_arpeggio_enabled::
.ds 3*1 ; if 0, disabled
gbt_arpeggio_tick::
.ds 3*1

; Cut note
gbt_cut_note_tick::
Expand Down Expand Up @@ -341,6 +343,24 @@ gbt_update:
.dontexit:
ld (hl),#0x00 ; reset tick counter

; Clear tick-based effects
; ------------------------

xor a,a
ld hl,#gbt_arpeggio_enabled ; Disable arpeggio
ld (hl+),a
ld (hl+),a
ld (hl),a
dec a ; a = 0xFF
ld hl,#gbt_cut_note_tick ; Disable cut note
ld (hl+),a
ld (hl+),a
ld (hl+),a
ld (hl),a

; Update effects
; --------------

ld a,#0x01
ld (#0x2000),a ; MBC1, MBC3, MBC5 - Set bank 1
call gbt_update_effects_bank1 ; Call update function in bank 1 (in gbt_player_bank1.s)
Expand Down
Loading

0 comments on commit f8bf18a

Please sign in to comment.