The documentation (readme.txt) lists the non-zp memory usage as 186 bytes for FamiTone2 (v1.15).sdm wrote:FT_BASE_ADR = $0300 ;page in RAM, should be $xx00
In my code, I noticed that it is about 128 bytes.
FamiTone - audio library (release)
Moderator: Moderators
Re: FamiTone - audio library (release)
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: fo.aspekt.fi
Re: FamiTone - audio library (release)
Is it possible to have all the famitone code with music and sfx in the UNROM bank? (one of those switchable). Currently I have in $ E000 (bank not switchable). Do not know if it's possible at all in the famitone?
Re: FamiTone - audio library (release)
Personally, I would prefer the famitone code in the fixed bank, and the data in switchable banks. But I suppose you could also put the code in the switchable bank.
The only thing you CAN'T put in the switchable bank (UNROM style) is DPCM samples.
The only thing you CAN'T put in the switchable bank (UNROM style) is DPCM samples.
nesdoug.com -- blog/tutorial on programming for the NES
Re: FamiTone - audio library (release)
I have a problem running Famitone, which has music/sfx data in the switch bank:
Code: Select all
.bank 12 ;UNROM bank switchable
.org $8000
MUSIC:
.include "music.asm"
SFX:
.include "sfx.asm"
;------------------------------------------------
.bank 14 ;UNROM bank fixed (last, non-switchable)
.org $C000
.include "famitone2.asm"
;------------------------------------------------
NMI: ;NMI code in the last bank
JSR FamiToneUpdate
:------------------------------------------------
;This code is also in the last bank:
LDA #$6
STA Bank_TBL+6 ;Change to bank contains MUSIC & SFX
lda #01 ;FAMITONE INIT.
ldx #low(Muzyka)
ldy #high(Muzyka)
jsr FamiToneInit
ldx #LOW(SFX)
ldy #HIGH(SFX)
jsr FamiToneSfxInit
lda #0 ;FAMITONE (song nr.)
JSR FamiToneMusicPlay
LDA #$0
STA Bank_TBL ;back to code bank
Re: FamiTone - audio library (release)
You should be switching music data banks IN before you call FamiToneUpdate. Are you?JSR FamiToneUpdate
nesdoug.com -- blog/tutorial on programming for the NES
Re: FamiTone - audio library (release)
I do not know what's wrong: / Can you check the code?
- Attachments
-
- famitone_unrom.zip
- (48.06 KiB) Downloaded 248 times
Re: FamiTone - audio library (release)
What was your problem again?
Did you resolve it?
Did you resolve it?
nesdoug.com -- blog/tutorial on programming for the NES
Re: FamiTone - audio library (release)
I looked at your code, and (as I suggested), you need to switch banks before calling FamiToneUpdate. Using your code...
because, it currently gets stuck in an infinite loop the first time it jumps to FamiToneUpdate, because the music data isn't in place.
Code: Select all
Forever:
JSR VBWait
JSR ReadPad
JSR SeeCTRL
LDA #$6 ;has the music data
STA Bank_TBL+6
JSR FamiToneUpdate
LDA #$0
STA Bank_TBL
JMP Forever
nesdoug.com -- blog/tutorial on programming for the NES