Skip to content

Commit

Permalink
bruhh need muh PORTAMENTO
Browse files Browse the repository at this point in the history
  • Loading branch information
CyanSMP64 committed May 20, 2021
1 parent 766e8f3 commit 39f3121
Show file tree
Hide file tree
Showing 12 changed files with 285 additions and 7 deletions.
1 change: 1 addition & 0 deletions charmap.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1360,6 +1360,7 @@ BW_SEQ_BGM_STARTING2 = 83 03
BW_SEQ_BGM_E_OPENING = 84 03
BW_SEQ_BGM_T_01 = 85 03
BW_SEQ_BGM_VS_RIVAL = 86 03
BW_SEQ_BGM_E_TSURETEKE1 = 87 03

A_BUTTON = F8 00
B_BUTTON = F8 01
Expand Down
1 change: 1 addition & 0 deletions include/constants/songs.h
Original file line number Diff line number Diff line change
Expand Up @@ -873,6 +873,7 @@
#define BW_SEQ_BGM_E_OPENING 900 // A Day of Beginnings
#define BW_SEQ_BGM_T_01 901 // Nuvema Town
#define BW_SEQ_BGM_VS_RIVAL 902 // Battle! (Cheren/Bianca) (TODO: PORTAMENTO!!)
#define BW_SEQ_BGM_E_TSURETEKE1 903 // Hurry Along 1

// Black 2 & White 2 Music

Expand Down
1 change: 1 addition & 0 deletions ld_script.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1598,6 +1598,7 @@ SECTIONS {
sound/songs/midi/bw_seq_bgm_e_opening.o(.rodata);
sound/songs/midi/bw_seq_bgm_t_01.o(.rodata);
sound/songs/midi/bw_seq_bgm_vs_rival.o(.rodata);
sound/songs/midi/bw_seq_bgm_e_tsureteke1.o(.rodata);
} =0

lib_rodata :
Expand Down
3 changes: 3 additions & 0 deletions songs.mk
Original file line number Diff line number Diff line change
Expand Up @@ -2378,3 +2378,6 @@ $(MID_SUBDIR)/bw_seq_bgm_t_01.s: %.s: %.mid

$(MID_SUBDIR)/bw_seq_bgm_vs_rival.s: %.s: %.mid
$(MID) $< $@ -E -R$(STD_REVERB) -G202 -V079

$(MID_SUBDIR)/bw_seq_bgm_e_tsureteke1.s: %.s: %.mid
$(MID) $< $@ -E -R$(STD_REVERB) -G199 -V066
2 changes: 2 additions & 0 deletions sound/MPlayDef.s
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@
.equ LFODL, 0xc3 @ LFO delay
.equ MOD, 0xc4 @ modulation depth
.equ MODT, 0xc5 @ modulation type
@ .equ PORT, 0xc6 @ portamento toggle
@ .equ PORTT, 0xc7 @ portamento time
.equ TUNE, 0xc8 @ micro tuning (c_v+??)

.equ XCMD, 0xcd @ extend command ***lib
Expand Down
260 changes: 260 additions & 0 deletions sound/keysplit_tables.inc
Original file line number Diff line number Diff line change
Expand Up @@ -18461,3 +18461,263 @@
.byte 115 @ 125
.byte 115 @ 126
.byte 115 @ 127

.set KeySplitTable145, . - 0 @ BW Marimba (splits shifted -2)
.byte 14 @ 0
.byte 14 @ 1
.byte 14 @ 2
.byte 14 @ 3
.byte 14 @ 4
.byte 14 @ 5
.byte 14 @ 6
.byte 14 @ 7
.byte 14 @ 8
.byte 14 @ 9
.byte 14 @ 10
.byte 14 @ 11
.byte 14 @ 12
.byte 14 @ 13
.byte 14 @ 14
.byte 14 @ 15
.byte 14 @ 16
.byte 14 @ 17
.byte 14 @ 18
.byte 14 @ 19
.byte 14 @ 20
.byte 14 @ 21
.byte 14 @ 22
.byte 14 @ 23
.byte 14 @ 24
.byte 14 @ 25
.byte 14 @ 26
.byte 14 @ 27
.byte 14 @ 28
.byte 14 @ 29
.byte 14 @ 30
.byte 14 @ 31
.byte 14 @ 32
.byte 14 @ 33
.byte 14 @ 34
.byte 14 @ 35
.byte 14 @ 36
.byte 14 @ 37
.byte 14 @ 38
.byte 14 @ 39
.byte 14 @ 40
.byte 14 @ 41
.byte 14 @ 42
.byte 14 @ 43
.byte 14 @ 44
.byte 14 @ 45
.byte 14 @ 46
.byte 14 @ 47
.byte 14 @ 48
.byte 14 @ 49
.byte 14 @ 50
.byte 14 @ 51
.byte 14 @ 52
.byte 14 @ 53
.byte 14 @ 54
.byte 14 @ 55
.byte 15 @ 56
.byte 15 @ 57
.byte 15 @ 58
.byte 15 @ 59
.byte 15 @ 60
.byte 15 @ 61
.byte 15 @ 62
.byte 15 @ 63
.byte 15 @ 64
.byte 15 @ 65
.byte 15 @ 66
.byte 15 @ 67
.byte 16 @ 68
.byte 16 @ 69
.byte 16 @ 70
.byte 16 @ 71
.byte 16 @ 72
.byte 16 @ 73
.byte 16 @ 74
.byte 16 @ 75
.byte 16 @ 76
.byte 16 @ 77
.byte 16 @ 78
.byte 16 @ 79
.byte 16 @ 80
.byte 16 @ 81
.byte 16 @ 82
.byte 16 @ 83
.byte 16 @ 84
.byte 16 @ 85
.byte 16 @ 86
.byte 16 @ 87
.byte 16 @ 88
.byte 16 @ 89
.byte 16 @ 90
.byte 16 @ 91
.byte 16 @ 92
.byte 16 @ 93
.byte 16 @ 94
.byte 16 @ 95
.byte 16 @ 96
.byte 16 @ 97
.byte 16 @ 98
.byte 16 @ 99
.byte 16 @ 100
.byte 16 @ 101
.byte 16 @ 102
.byte 16 @ 103
.byte 16 @ 104
.byte 16 @ 105
.byte 16 @ 106
.byte 16 @ 107
.byte 16 @ 108
.byte 16 @ 109
.byte 16 @ 110
.byte 16 @ 111
.byte 16 @ 112
.byte 16 @ 113
.byte 16 @ 114
.byte 16 @ 115
.byte 16 @ 116
.byte 16 @ 117
.byte 16 @ 118
.byte 16 @ 119
.byte 16 @ 120
.byte 16 @ 121
.byte 16 @ 122
.byte 16 @ 123
.byte 16 @ 124
.byte 16 @ 125
.byte 16 @ 126
.byte 16 @ 127

.set KeySplitTable146, . - 0 @ BW Pizzicato (missing top 2 splits)
.byte 76 @ 0
.byte 76 @ 1
.byte 76 @ 2
.byte 76 @ 3
.byte 76 @ 4
.byte 76 @ 5
.byte 76 @ 6
.byte 76 @ 7
.byte 76 @ 8
.byte 76 @ 9
.byte 76 @ 10
.byte 76 @ 11
.byte 76 @ 12
.byte 76 @ 13
.byte 76 @ 14
.byte 76 @ 15
.byte 76 @ 16
.byte 76 @ 17
.byte 76 @ 18
.byte 76 @ 19
.byte 76 @ 20
.byte 76 @ 21
.byte 76 @ 22
.byte 76 @ 23
.byte 76 @ 24
.byte 76 @ 25
.byte 76 @ 26
.byte 76 @ 27
.byte 76 @ 28
.byte 76 @ 29
.byte 76 @ 30
.byte 76 @ 31
.byte 76 @ 32
.byte 76 @ 33
.byte 76 @ 34
.byte 76 @ 35
.byte 76 @ 36
.byte 76 @ 37
.byte 76 @ 38
.byte 76 @ 39
.byte 76 @ 40
.byte 76 @ 41
.byte 76 @ 42
.byte 76 @ 43
.byte 76 @ 44
.byte 76 @ 45
.byte 76 @ 46
.byte 76 @ 47
.byte 76 @ 48
.byte 77 @ 49
.byte 77 @ 50
.byte 77 @ 51
.byte 77 @ 52
.byte 77 @ 53
.byte 77 @ 54
.byte 77 @ 55
.byte 77 @ 56
.byte 77 @ 57
.byte 78 @ 58
.byte 78 @ 59
.byte 78 @ 60
.byte 78 @ 61
.byte 78 @ 62
.byte 78 @ 63
.byte 78 @ 64
.byte 78 @ 65
.byte 78 @ 66
.byte 78 @ 67
.byte 78 @ 68
.byte 78 @ 69
.byte 78 @ 70
.byte 78 @ 71
.byte 78 @ 72
.byte 78 @ 73
.byte 78 @ 74
.byte 78 @ 75
.byte 78 @ 76
.byte 78 @ 77
.byte 78 @ 78
.byte 78 @ 79
.byte 78 @ 80
.byte 78 @ 81
.byte 78 @ 82
.byte 78 @ 83
.byte 78 @ 84
.byte 78 @ 85
.byte 78 @ 86
.byte 78 @ 87
.byte 78 @ 88
.byte 78 @ 89
.byte 78 @ 90
.byte 78 @ 91
.byte 78 @ 92
.byte 78 @ 93
.byte 78 @ 94
.byte 78 @ 95
.byte 78 @ 96
.byte 78 @ 97
.byte 78 @ 98
.byte 78 @ 99
.byte 78 @ 100
.byte 78 @ 101
.byte 78 @ 102
.byte 78 @ 103
.byte 78 @ 104
.byte 78 @ 105
.byte 78 @ 106
.byte 78 @ 107
.byte 78 @ 108
.byte 78 @ 109
.byte 78 @ 110
.byte 78 @ 111
.byte 78 @ 112
.byte 78 @ 113
.byte 78 @ 114
.byte 78 @ 115
.byte 78 @ 116
.byte 78 @ 117
.byte 78 @ 118
.byte 78 @ 119
.byte 78 @ 120
.byte 78 @ 121
.byte 78 @ 122
.byte 78 @ 123
.byte 78 @ 124
.byte 78 @ 125
.byte 78 @ 126
.byte 78 @ 127
1 change: 1 addition & 0 deletions sound/song_table.inc
Original file line number Diff line number Diff line change
Expand Up @@ -904,6 +904,7 @@ gSongTable:: @ 86B49F0
song bw_seq_bgm_e_opening, 0, 0
song bw_seq_bgm_t_01, 0, 0
song bw_seq_bgm_vs_rival, 0, 0
song bw_seq_bgm_e_tsureteke1, 0, 0

.align 2
dummy_song_header: @ 86B5D00
Expand Down
Binary file added sound/songs/midi/bw_seq_bgm_e_tsureteke1.mid
Binary file not shown.
10 changes: 5 additions & 5 deletions sound/voicegroups/voicegroup199.inc
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ voicegroup199:: @ BW Kageyama
voice_keysplit voicegroup006, KeySplitTable82 @ piano (c4 split missing)
voice_square_1 60, 0, 0, 2, 0, 0, 15, 0
voice_square_1 60, 0, 0, 2, 0, 0, 15, 0
voice_keysplit voicegroup007, KeySplitTable86 @ rhodes 1
voice_square_1 60, 0, 0, 2, 0, 0, 15, 0
voice_square_1 60, 0, 0, 2, 0, 0, 15, 0
voice_square_1 60, 0, 0, 2, 0, 0, 15, 0
voice_square_1 60, 0, 0, 2, 0, 0, 15, 0
voice_square_1 60, 0, 0, 2, 0, 0, 15, 0
voice_square_1 60, 0, 0, 2, 0, 0, 15, 0
voice_keysplit voicegroup007, KeySplitTable145 @ marimba (splits shifted -2)
voice_square_1 60, 0, 0, 2, 0, 0, 15, 0
voice_square_1 60, 0, 0, 2, 0, 0, 15, 0
voice_square_1 60, 0, 0, 2, 0, 0, 15, 0
Expand All @@ -25,7 +25,7 @@ voicegroup199:: @ BW Kageyama
voice_square_1 60, 0, 0, 2, 0, 0, 15, 0
voice_square_1 60, 0, 0, 2, 0, 0, 15, 0
voice_square_1 60, 0, 0, 2, 0, 0, 15, 0
voice_square_1 60, 0, 0, 2, 0, 0, 15, 0
voice_keysplit voicegroup007, KeySplitTable102 @ upright bass
voice_square_1 60, 0, 0, 2, 0, 0, 15, 0
voice_square_1 60, 0, 0, 2, 0, 0, 15, 0
voice_square_1 60, 0, 0, 2, 0, 0, 15, 0
Expand Down Expand Up @@ -71,15 +71,15 @@ voicegroup199:: @ BW Kageyama
voice_square_1 60, 0, 0, 2, 0, 0, 15, 0
voice_square_1 60, 0, 0, 2, 0, 0, 15, 0
voice_directsound 60, 0, DirectSoundWaveData_b2_gongp, 255, 252, 0, 236
voice_keysplit voicegroup007, KeySplitTable146 @ pizzicato (missing top 2 splits)
voice_square_1 60, 0, 0, 2, 0, 0, 15, 0
voice_square_1 60, 0, 0, 2, 0, 0, 15, 0
voice_square_1 60, 0, 0, 2, 0, 0, 15, 0
voice_square_1 60, 0, 0, 2, 0, 0, 15, 0
voice_square_1 60, 0, 0, 2, 0, 0, 15, 0
voice_square_1 60, 0, 0, 2, 0, 0, 15, 0
voice_square_1 60, 0, 0, 2, 0, 0, 15, 0
voice_square_1 60, 0, 0, 2, 0, 0, 15, 0
voice_square_1 60, 0, 0, 2, 0, 0, 15, 0
voice_keysplit_all voicegroup008 @ HGSS drum kit
voice_keysplit_all voicegroup195 @ drum kit (standard)
voice_square_1 60, 0, 0, 2, 0, 0, 15, 0
voice_square_1 60, 0, 0, 2, 0, 0, 15, 0
Expand Down
2 changes: 2 additions & 0 deletions src/m4a_tables.c
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,8 @@ const u8 gClockTable[] =
#define LFODL 0xc3
#define MOD 0xc4
#define MODT 0xc5
//#define PORT 0xc6
//#define PORTT 0xc7
#define TUNE 0xc8

#define XCMD 0xcd
Expand Down
5 changes: 3 additions & 2 deletions src/sound_check_menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ static bool8 Task_ProcessSoundCheckMenuInput(u8 taskId) // sub_080E8688
if (gTasks[taskId].tBgmIndex > 0)
gTasks[taskId].tBgmIndex--;
else
gTasks[taskId].tBgmIndex = (BW_SEQ_BGM_VS_RIVAL - (DP_SEQ_TITLE00 - 1));
gTasks[taskId].tBgmIndex = (BW_SEQ_BGM_E_TSURETEKE1 - (DP_SEQ_TITLE00 - 1));
}
return TRUE;
}
Expand All @@ -404,7 +404,7 @@ static bool8 Task_ProcessSoundCheckMenuInput(u8 taskId) // sub_080E8688
}
else
{
if (gTasks[taskId].tBgmIndex < (BW_SEQ_BGM_VS_RIVAL - (DP_SEQ_TITLE00 - 1)))
if (gTasks[taskId].tBgmIndex < (BW_SEQ_BGM_E_TSURETEKE1 - (DP_SEQ_TITLE00 - 1)))
gTasks[taskId].tBgmIndex++;
else
gTasks[taskId].tBgmIndex = 0;
Expand Down Expand Up @@ -1651,6 +1651,7 @@ static void DestroyWindow(u8 windowId) // sub_080E9750
X(BW_SEQ_BGM_E_OPENING , "BW-SEQ-BGM-E-OPENING") \
X(BW_SEQ_BGM_T_01 , "BW-SEQ-BGM-T-01") \
X(BW_SEQ_BGM_VS_RIVAL , "BW-SEQ-BGM-VS-RIVAL") \
X(BW_SEQ_BGM_E_TSURETEKE1 , "BW-SEQ-BGM-E-TSURETEKE1") \

#define SOUND_LIST_SE \
X(SE_STOP, "STOP") \
Expand Down
Loading

0 comments on commit 39f3121

Please sign in to comment.