Skip to content

Commit

Permalink
Handle Gxx delay commands in both row and frame...
Browse files Browse the repository at this point in the history
...transitions
Fixes #207.
  • Loading branch information
Gumball2415 committed Feb 27, 2024
1 parent d266d61 commit 797b782
Show file tree
Hide file tree
Showing 9 changed files with 3,567 additions and 3,540 deletions.
20 changes: 17 additions & 3 deletions Source/drivers/asm/player.s
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,31 @@ ft_do_row_update:
and #%11111100
sta var_PlayerFlags
:
lda var_Load_Frame
beq @SkipFrameLoad
ldx #$00

; handle delay part 1: skip over missed delay notes from the previous frame
; this allows the driver to read all the extra commands that come after Gxx
@Delay:
CH_LOOP_START @DelayEpilog
lda var_ch_Delay, x
beq @DelayEpilog
lda #$00
sta var_ch_Delay, x
jsr ft_read_pattern ; skip over missed delay note
@DelayEpilog:
CH_LOOP_END @Delay

; Switches to new frames are delayed to next row to resolve issues with delayed notes.
; It won't work if new pattern adresses are loaded before the delayed note is played
;;; ;; ; from 0.4.6
lda var_Load_Frame
beq @SkipFrameLoad
lda #$00
sta var_Load_Frame
lda var_Current_Frame
jsr ft_load_frame
@SkipFrameLoad:

; handle delay part 2: skip over missed delay notes from the previous row
; Read one row from all patterns
ldx #$00
ft_read_channels:
Expand Down
852 changes: 427 additions & 425 deletions Source/drivers/drv_2a03.h

Large diffs are not rendered by default.

740 changes: 371 additions & 369 deletions Source/drivers/drv_all.h

Large diffs are not rendered by default.

952 changes: 477 additions & 475 deletions Source/drivers/drv_fds.h

Large diffs are not rendered by default.

853 changes: 427 additions & 426 deletions Source/drivers/drv_mmc5.h

Large diffs are not rendered by default.

950 changes: 476 additions & 474 deletions Source/drivers/drv_n163.h

Large diffs are not rendered by default.

889 changes: 445 additions & 444 deletions Source/drivers/drv_s5b.h

Large diffs are not rendered by default.

891 changes: 446 additions & 445 deletions Source/drivers/drv_vrc6.h

Large diffs are not rendered by default.

960 changes: 481 additions & 479 deletions Source/drivers/drv_vrc7.h

Large diffs are not rendered by default.

0 comments on commit 797b782

Please sign in to comment.