NintendoAge http://nintendoage.com/forum/ -Sqooner New Geminim demo http://nintendoage.com/forum/messageview.cfm?catid=22&threadid=4667 2008-01-02T23:33:46 -05.00 Sivak 20 Originally posted by: Little Samson

Originally posted by: Sivak

Anyway, the game now plays the intro ditty I wrote during "Get ready"


Cool! Has the file in the original post been updated?

Not yet.  I'm trying to find out how I can make the music play and not make the sound effects sound bad.  Right now, both can play, but the sound effects don't sound like they should.

Update:  There is a new file now, although only the intro jingles are heard.  No in-game theme. ]]>
New Geminim demo http://nintendoage.com/forum/messageview.cfm?catid=22&threadid=4667 2008-01-02T22:13:28 -05.00 Sivak 20 Originally posted by: Sivak

Anyway, the game now plays the intro ditty I wrote during "Get ready"

Cool! Has the file in the original post been updated? ]]> New Geminim demo http://nintendoage.com/forum/messageview.cfm?catid=22&threadid=4667 2008-01-02T21:19:21 -05.00 Sivak 20
I had to do some tweaks in changing all those $02XX to $04XX's...  Grr...  Though I did it with labels that make it so I need only change a label now instead of these random numbers.

Anyway, the game now plays the intro ditty I wrote during "Get ready" ]]>
New Geminim demo http://nintendoage.com/forum/messageview.cfm?catid=22&threadid=4667 2008-01-02T18:24:20 -05.00 Sivak 20 If I make the sprites be 0400 instead 0200 the problems go away,  but sound doesnt work.   If I write FE to both 0200 and 0400, the glitch comes back.

This implies to me that the values in 0200 are related to the sound registers, and if the values are too big, they outlast the duration of the NMI.

This is just a guess.

If you want to see if tis true, add the call to invoke the sound code within your reset handler where you have your infinite loop. 

Basically,  you have to set a flag in your NMI code.  And you check that flag in your reset.  If its set, you clear it and run your sound routine.  It will be reset by the next NMI call anyways.

Hope this helps.  I'm out of ideas.
Al ]]>
New Geminim demo http://nintendoage.com/forum/messageview.cfm?catid=22&threadid=4667 2008-01-02T18:04:46 -05.00 Sivak 20 ]]> New Geminim demo http://nintendoage.com/forum/messageview.cfm?catid=22&threadid=4667 2008-01-02T17:17:19 -05.00 Sivak 20 You should be able to declare something like this:

irq:
  rti

and have your IRQ  vector point to that.

The other thing is that I think you need to reset the stack pointer AFTER  you clear your memory in the reset routine.   I know that the wiki example code for a reset does the stack reset first,  but that might be wrong.  Otherwise the stack pointer gets set to zero.

Neither of these are related to the problem you are having.

I see that when the sound starts to ramp upward, the stack gets hosed.  I dont know why this is.  The notes increase several times and then pow, the stack gets wrecked.

I do see that the sound routine is altering the memory at 0200.  If you change your sprites to be somewhere else, you'll be fine,  but the other problems will still be there.  For example, on Nintendulator it constantly resets, while FCEU does not.

I'll keep digging.
Al ]]>
New Geminim demo http://nintendoage.com/forum/messageview.cfm?catid=22&threadid=4667 2008-01-02T16:00:09 -05.00 Sivak 20 New Geminim demo http://nintendoage.com/forum/messageview.cfm?catid=22&threadid=4667 2008-01-02T15:35:18 -05.00 Sivak 20  
I'll run it in an emulator and take a look at the memory to see if I can spot anything.

Al ]]>
New Geminim demo http://nintendoage.com/forum/messageview.cfm?catid=22&threadid=4667 2008-01-02T14:34:00 -05.00 Sivak 20 New Geminim demo http://nintendoage.com/forum/messageview.cfm?catid=22&threadid=4667 2008-01-02T12:11:25 -05.00 Sivak 20
Try swapping the lines in your reset "STA $0200,X"  and "STA $0300,X"
 
Edit:I would have to see the NSF playback code to know what memory it is using.  It is likely using page 3  (0300-03FF) but I really am just guessing.

Al ]]>