It is currently Thu Oct 19, 2017 10:21 pm

All times are UTC - 7 hours



Forum rules


Related:



Post new topic Reply to topic  [ 45 posts ]  Go to page Previous  1, 2, 3  Next
Author Message
PostPosted: Wed May 20, 2015 12:25 am 
Offline

Joined: Mon Sep 27, 2004 2:57 pm
Posts: 1248
Zoop sounds glitched, like the melody is dropping notes. I know the sound engine in Zoop is a really crazy MIDI-style round-robin allocator, so that means the channels are allocated and initialized as notes are needed, meaning each channel is frequently switching samples and envelopes and properties, versus other engines that have channels organized by instrument or sequence.


Top
 Profile  
 
PostPosted: Wed May 20, 2015 12:44 am 
Offline
User avatar

Joined: Sat Jun 27, 2009 11:05 pm
Posts: 712
Location: New Mexico, USA
Okay, so I _definitely_ did not get an email notification for Drag's post. Wtf? I unsubscribed and re-subscribed to this thread. Maybe that will help...

Drag wrote:
Zoop sounds glitched
If it actually is then it's most likely due to one of the features I'm missing. Either way, Blargg's SPC emulator output wave file for the same SPC sounds identical to mine (I've modified his emulator to have the same missing features as mine). In either case if it is glitchy it'll all be fixed in the near future.

Drag wrote:
I know the sound engine in Zoop is a really crazy MIDI-style round-robin allocator
This is almost certainly irrelevant as far as the hardware is concerned. The hardware doesn't become more/less complicated just because some developer made the SPC-700 software driver "really crazy". The hardware is always the same regardless of the sound engine driving it. The sound engine could be trying to determine if P=NP for all I care. ;)


Top
 Profile  
 
PostPosted: Wed May 20, 2015 1:39 am 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 6285
Location: Seattle
jwdonal wrote:
Okay, so I _definitely_ did not get an email notification for Drag's post. Wtf? I unsubscribed and re-subscribed to this thread. Maybe that will help...
(off topic) I stopped getting email notifications of PM arrivals about 30 hours ago (last one that arrived was at 19h29 EDT). And I know I'm not running any kind of filtering at all.


Top
 Profile  
 
PostPosted: Wed May 20, 2015 6:54 am 
Offline

Joined: Wed Jul 09, 2008 8:46 pm
Posts: 234
Try these SPC sets on for size (I consider these a real challenge):
- Clay Fighter 2 - Judgement Clay
- Mickey's Playtown Adventure - A Day of Discovery!
- We're Back! A Dinosaur's Story
- Shin Togenkyo


Top
 Profile  
 
PostPosted: Wed May 20, 2015 10:05 am 
Offline
User avatar

Joined: Sat Jun 27, 2009 11:05 pm
Posts: 712
Location: New Mexico, USA
Sure. I'd be happy to make some recordings. But I don't have time to record all the tracks from all of those sets. (At least not until I get some automation set up.) If you want to suggest 1 particular track from each set I can do that.

And I definitely appreciate suggestions for "challenging" SPCs! Any other suggestions are welcome.


Top
 Profile  
 
PostPosted: Wed May 20, 2015 10:21 am 
Offline

Joined: Wed Jul 09, 2008 8:46 pm
Posts: 234
Here's my selection for each one...

Clay Fighter 2 ~ Main Menu

Mickeys Playtown Adventure ~ Title Screen

Shin Togenkyo ~ Main Menu

We're Back! A Dinosaur's Story ~ Title Screen


Top
 Profile  
 
PostPosted: Wed May 20, 2015 12:45 pm 
Offline

Joined: Mon Sep 27, 2004 2:57 pm
Posts: 1248
If Zoop dropping notes is caused by a missing feature, let me know which feature it is since I have no idea what would cause it. Claymates has a similar round-robin allocator for its music engine, so if that's dropping notes too then it's the same glitch.

I only mention it because round-robin allocators are quite different from what most SNES soundtracks use. For instance, if you solo a channel in SMW, you get a single instrument playing a single sequence. If you solo a channel from Zoop or Claymates, you get a bunch of random notes from all instruments.


Top
 Profile  
 
PostPosted: Wed May 20, 2015 3:26 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19104
Location: NE Indiana, USA (NTSC)
Drag wrote:
Zoop sounds glitched, like the melody is dropping notes. I know the sound engine in Zoop is a really crazy MIDI-style round-robin allocator

Aladdin is glitched as well, but it's always the bass because Aladdin doesn't use round-robin allocation. Your mixer might be missing a channel. Try finding which channel Aladdin plays the bass on, then mute that channel in Zoop and see if it produces the same pattern of missing notes.

The comparison to Claymates is apt because one of the unused samples buried in Zoop sings "Clay Fighter". (This sample isn't even used in the hidden track in Zoop that sounds vaguely like "Blister in the Sun".) This leads me to believe it uses an engine similar to Interplay's ARDI (Advanced Realtime Dynamic Interplay) engine, and a Nintendo Power story heavily implied that ARDI is MIDI-based. (The article might have used the name ARDISS for ARDI Sound System.) So did an article in SNES Force.


Top
 Profile  
 
PostPosted: Wed May 20, 2015 10:55 pm 
Offline
User avatar

Joined: Sat Jun 27, 2009 11:05 pm
Posts: 712
Location: New Mexico, USA
Welp, attempting to play KungFuFurby's track selections was...umm...far less than what one would call "successful". LOL. Each of the tracks (except for Togenkyo) played for a few seconds each and then died a very horrible death. Togenkyo didn't even play a single note. :) Haha.

Ironically, I am incredibly excited about this! It's fantastic to have these difficult tracks available to test with. I will keep working on my player and adding the rest of the features and squashing more bugs and will keep trying these (and Aladdin and Zoop) until they work flawlessly.

I love this community. Thanks all!


Top
 Profile  
 
PostPosted: Thu May 21, 2015 7:34 am 
Offline

Joined: Wed Jul 09, 2008 8:46 pm
Posts: 234
You've run into the same killer that SNESAmp ran into. Shin Togenkyo is especially noteworthy for me, because it also failed in some of my more current SPC players (an older version of Audio Overload was successful in playing this song), although it usually fails after a few seconds rather than right off the bat (or after a single note). I didn't expect Shin Togenkyo to fail so horribly, though.

My instincts are as following...

- ENDX may be used for individual samples. Failure to emulate this might be what is causing channel allocation to fail on the Visual Concept games. Plus, these might not even keyed off, meaning allocation is really dependent on those samples stopping.

- For Shin Togenkyo, make sure you're emulating both memory wraparound and register wraparound correctly. Memory should be 16 bits, not 32+ bits (and thus should wrap around to zero rather than overflow), and registers should be 8 bits (and thus should also wrap around). There may also be an opcode that you failed to implement (almost all opcodes don't outright crash the SPC700... unless it's SLEEP or HALT).


Top
 Profile  
 
PostPosted: Thu May 21, 2015 12:45 pm 
Offline
User avatar

Joined: Sat Jun 27, 2009 11:05 pm
Posts: 712
Location: New Mexico, USA
Ok, so I spent all of 5 seconds looking at the CPU execution debug output of the Togenkyo track (before I had to run to work) and found something very strange... (Again, I haven't delved into this yet, this is just my cursory 5 second assessment of this one track.)

The thing I noticed is that the SPC file's restore state value for the SPC-700's stack pointer register is 0x00. And almost immediately after starting execution the code executes the CALL instruction which pushes the high and low program counters to the stack. So the reason that it didn't play a single note on my emulator was because the program is pushing to a full stack which causes my emulator to report and error message and lock up permanently (by design).

Any thoughts on this?

Also, thank you for your thoughts on what you think the issues were with these tracks I'm sure they will be very helpful in my debugging efforts.


Top
 Profile  
 
PostPosted: Thu May 21, 2015 12:51 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19104
Location: NE Indiana, USA (NTSC)
SPC700 is largely a 65C02 clone. Does it work if you let the stack pointer wrap around from $00 to $FF, as it does on the 65C02?


Top
 Profile  
 
PostPosted: Thu May 21, 2015 12:58 pm 
Offline
User avatar

Joined: Sat Jun 27, 2009 11:05 pm
Posts: 712
Location: New Mexico, USA
I will definitely test that out once I get home.

But...am I wrong or isn't the more important question why the program is pushing to a full stack in the first place? That would seem like either a coding error or possibly a dumping error (i.e. incorrect restore state)? I'm just throwing out ideas.


Top
 Profile  
 
PostPosted: Thu May 21, 2015 1:26 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19104
Location: NE Indiana, USA (NTSC)
The stack on a 6502 processor is empty descending, meaning a push decrements the stack pointer ("descending") and the stack pointer points to the first address past the valid data ("empty"). Apparently the stack pointer on the SPC700 behaves the same way as that of the 6502. If the SPC700 stack were full descending instead of empty descending, $00 would mean an empty stack.

Perhaps it was just sloppy programming by someone who came from a platform with a full descending stack, in which the stack pointer is decremented before the pushed value is written. Both major 8080 descendant families, including Z80 and x86, use a full descending stack. The vaguely x86-like Sony syntax used by "standard" SPC700 assembly language might have helped with this confusion, which I guess is part of why I prefer 65C02 syntax. ARM also uses a full descending stack, where PUSH is a synonym for STMDB (STore Multiple, Decrease Before) or STMFD (STore Multiple to Full Descending stack), and POP is a synonym for LDMIA (LoaD Multiple, Increase After) or LDMFD (LoaD Multiple from Full Descending stack). This is merely by convention in ARM, but Thumb is hardwired to full descending.


Top
 Profile  
 
PostPosted: Thu May 21, 2015 2:51 pm 
Offline

Joined: Wed Jul 09, 2008 8:46 pm
Posts: 234
Native SPC700 syntax is Z80-like to my eyes, actually.

The IPL boot routine by default initializes the stack pointer to $EF. I also think the stack pointer should have wraparound implemented.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 45 posts ]  Go to page Previous  1, 2, 3  Next

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 10 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