It is currently Sat Nov 18, 2017 3:34 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 83 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6
Author Message
PostPosted: Sat Jan 30, 2016 8:11 pm 
Offline
User avatar

Joined: Mon Jan 03, 2005 10:36 am
Posts: 2981
Location: Tampere, Finland
sdm wrote:
FT_BASE_ADR = $0300 ;page in RAM, should be $xx00

In my code, I noticed that it is about 128 bytes.

The documentation (readme.txt) lists the non-zp memory usage as 186 bytes for FamiTone2 (v1.15).

_________________
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: kkfos.aspekt.fi


Top
 Profile  
 
PostPosted: Sun Jul 02, 2017 8:20 am 
Offline

Joined: Tue Apr 11, 2006 4:08 am
Posts: 248
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?


Top
 Profile  
 
PostPosted: Sun Jul 02, 2017 9:10 am 
Offline
User avatar

Joined: Fri May 08, 2015 7:17 pm
Posts: 1823
Location: DIGDUG
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.

_________________
nesdoug.com -- blog/tutorial on programming for the NES


Top
 Profile  
 
PostPosted: Wed Jul 05, 2017 6:29 am 
Offline

Joined: Tue Apr 11, 2006 4:08 am
Posts: 248
I have a problem running Famitone, which has music/sfx data in the switch bank:

Code:
   .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



Top
 Profile  
 
PostPosted: Wed Jul 05, 2017 7:40 am 
Offline
User avatar

Joined: Fri May 08, 2015 7:17 pm
Posts: 1823
Location: DIGDUG
Quote:
JSR FamiToneUpdate


You should be switching music data banks IN before you call FamiToneUpdate. Are you?

_________________
nesdoug.com -- blog/tutorial on programming for the NES


Top
 Profile  
 
PostPosted: Thu Jul 06, 2017 8:44 am 
Offline

Joined: Tue Apr 11, 2006 4:08 am
Posts: 248
I do not know what's wrong: / Can you check the code?


Attachments:
famitone_unrom.zip [48.06 KiB]
Downloaded 26 times
Top
 Profile  
 
PostPosted: Mon Jul 10, 2017 12:14 pm 
Offline
User avatar

Joined: Fri May 08, 2015 7:17 pm
Posts: 1823
Location: DIGDUG
What was your problem again?

Did you resolve it?

_________________
nesdoug.com -- blog/tutorial on programming for the NES


Top
 Profile  
 
PostPosted: Thu Jul 13, 2017 7:02 am 
Offline
User avatar

Joined: Fri May 08, 2015 7:17 pm
Posts: 1823
Location: DIGDUG
I looked at your code, and (as I suggested), you need to switch banks before calling FamiToneUpdate. Using your code...



Code:
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


because, it currently gets stuck in an infinite loop the first time it jumps to FamiToneUpdate, because the music data isn't in place.

_________________
nesdoug.com -- blog/tutorial on programming for the NES


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 83 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group