Lord_Klump_Of_Kongo_Bongo
Active member
Hey! It’s been a hot minute since I was able to post on this forum. But due to CutterCross’s new sound driver for NES games, I was able to incorporate that into my own NESMaker project.
Now there are Pros and Cons to both GGSound (NESMaker’s default sound driver) and Sabre But because I’m a Quantity guy (in this case for the amount of music) I Highly recommend Implementing
Sabre. But again there are drawbacks to Sabre That GGsound doesn’t have For example, the most obvious one is putting the music tracks into your game manually, And by that I mean the NESMaker Editor for rooms won’t change the song with room settings. You’ll have to program it into that room through code. There is probably more than that but for more Info, I would recommend looking at the Sabre GitHub pages & the ReadMe on there
(trust me my stubborn behind learned that the hard way lol)
Now that that’s outta the way let’s begin!
First things first go into the GameEngineData folder for the Sabre Driver ZIP you just downloaded
Take the sabre.asm and put it into where ggsound.asm lies:
NESMaker\GameEngineData\Routines\BASE_4_5\System
Now open Bank1B.asm (the music bank) under:
NESMAKER\GameEngineData\Routines\BASE_4_5\System\BankData
Replace Line 49: .include "ROOT\System\ggsound.asm"
With: .include "ROOT\System\sabre.asm"
as well as changing these chunks of code:
Now there are Pros and Cons to both GGSound (NESMaker’s default sound driver) and Sabre But because I’m a Quantity guy (in this case for the amount of music) I Highly recommend Implementing
Sabre. But again there are drawbacks to Sabre That GGsound doesn’t have For example, the most obvious one is putting the music tracks into your game manually, And by that I mean the NESMaker Editor for rooms won’t change the song with room settings. You’ll have to program it into that room through code. There is probably more than that but for more Info, I would recommend looking at the Sabre GitHub pages & the ReadMe on there
(trust me my stubborn behind learned that the hard way lol)
GitHub - CutterCross/Sabre: Lightweight NES sound driver
Lightweight NES sound driver. Contribute to CutterCross/Sabre development by creating an account on GitHub.
github.com
Now that that’s outta the way let’s begin!
First things first go into the GameEngineData folder for the Sabre Driver ZIP you just downloaded
Take the sabre.asm and put it into where ggsound.asm lies:
NESMaker\GameEngineData\Routines\BASE_4_5\System
Now open Bank1B.asm (the music bank) under:
NESMAKER\GameEngineData\Routines\BASE_4_5\System\BankData
Replace Line 49: .include "ROOT\System\ggsound.asm"
With: .include "ROOT\System\sabre.asm"
as well as changing these chunks of code:
;;; play sound
LDA sfxToPlay
STA sound_param_byte_0
;LDA sfxPriority
LDA #soundeffect_one
STA sound_param_byte_1
jsr play_sfx
to these:;; play song
LDA songToPlay
sta sound_param_byte_0
jsr play_song
;;; play sound
LDA sfxToPlay
STA currentSFX
JSR sabre_playSFX
;; play song
LDA songToPlay
STA currentTrack
JSR sabre_playTrack
Now put the sabre_includes.asm into the Sound Folder for NESMaker (again in the GameEngineData Folder for the Sabre download):
NESMAKER\GameEngineData\Sound
Next open Base.asm through NESMaker:
And replace the line that has
.include "Sound\ggsound.inc”
with:
.include "Sound\sabre_includes.asm”
Next for simplicity’s sake include the file I left for download
And replace Initialization.asm with it.
Next, put sabre_misc_ram.asm & sabre_zp_ram.asm from the sabre unzipped folder and put them in the NESMAKER\GameEngineData\GameData folder
Now open and edit the MemoryMap.asm:
Now put these two lines:
.include GameData/sabre_ZP_RAM.asm
.include GameData/sabre_Misc_RAM.asm
In between these two:
.include GameData/ZP_RAM.asm
.include GameData/Variables/UserVariables.asm
So it should look like this to clarify:
Aight now we should be almost finished!
Now take your (presumably famitracker) songs and export them to a .txt file
Drag that onto sabre’s sabre_ft_txt_asm6.py (assuming you have python installed if not go install the common program )
and if that doesn’t make a .asm file at all…
Just type CMD into your folder bar and put this code in it:
python sabre_ft_txt_asm6.py {filename}.txt {title}
obviously, the filename is the name of your soundtrack file but so should the {title} just without a .txt or .asm obviously
now it should spit out your soundtrack
next put the main file it spat out into your sound folder
Sound\OST.asm
Then replace .include "Sound\AllSongs_WithSFX.asm" in Bank1B.asm with
.include "Sound\OST.asm"
Finally, create two new scripts for the Game part of NESMaker’s Script Settings under the Game Folder
Music Static & Music DPCM
and Define them
I call them SCR_MUSIC_DPCM & SCR_MUSIC_STATIC in the define part of the settings
Add them in Base.asm like this…
And you're done! Now to change your song
The way you play music is like this:
PlaySong #$00 ;; the #$00 is the first song in your list keep counting up to have the next track ex: #$01 is after then #$02 then #$03 etc...NESMAKER\GameEngineData\Sound
Next open Base.asm through NESMaker:
And replace the line that has
.include "Sound\ggsound.inc”
with:
.include "Sound\sabre_includes.asm”
Next for simplicity’s sake include the file I left for download
And replace Initialization.asm with it.
Next, put sabre_misc_ram.asm & sabre_zp_ram.asm from the sabre unzipped folder and put them in the NESMAKER\GameEngineData\GameData folder
Now open and edit the MemoryMap.asm:
Now put these two lines:
.include GameData/sabre_ZP_RAM.asm
.include GameData/sabre_Misc_RAM.asm
In between these two:
.include GameData/ZP_RAM.asm
.include GameData/Variables/UserVariables.asm
So it should look like this to clarify:
Aight now we should be almost finished!
Now take your (presumably famitracker) songs and export them to a .txt file
Drag that onto sabre’s sabre_ft_txt_asm6.py (assuming you have python installed if not go install the common program )
and if that doesn’t make a .asm file at all…
Just type CMD into your folder bar and put this code in it:
python sabre_ft_txt_asm6.py {filename}.txt {title}
obviously, the filename is the name of your soundtrack file but so should the {title} just without a .txt or .asm obviously
now it should spit out your soundtrack
next put the main file it spat out into your sound folder
Sound\OST.asm
Then replace .include "Sound\AllSongs_WithSFX.asm" in Bank1B.asm with
.include "Sound\OST.asm"
Finally, create two new scripts for the Game part of NESMaker’s Script Settings under the Game Folder
Music Static & Music DPCM
and Define them
I call them SCR_MUSIC_DPCM & SCR_MUSIC_STATIC in the define part of the settings
Add them in Base.asm like this…
And you're done! Now to change your song
The way you play music is like this:
And SFX like this:
PlaySound #$00 ;; same logic as PlaySong
Anyway that should be it… If I forgot any installation Steps and you get an error just please send me the error and I’ll determine what the issue is! Happy game designing!
PlaySound #$00 ;; same logic as PlaySong
Anyway that should be it… If I forgot any installation Steps and you get an error just please send me the error and I’ll determine what the issue is! Happy game designing!