It is currently Fri Oct 20, 2017 7:33 am

All times are UTC - 7 hours



Forum rules


1. NO BLATANT PIRACY. This includes reproducing homebrew less than 10 years old, with the exception of free software.
2. No advertising your reproductions, with the exception of free software.
3. Be nice. See RFC 1855 if you aren't sure what this means.



Post new topic Reply to topic  [ 25 posts ]  Go to page Previous  1, 2
Author Message
PostPosted: Wed Oct 05, 2016 11:16 am 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 5724
Location: Canada
Great Hierophant wrote:
Yes, I was referring specifically to FDS Audio and its modulation unit. No one has documented how it works in hardware and games like Bio Miracle Bokutte Upa require an exacting simulation or they will not sound correct. That game sounds wrong in all three devices I mentioned.

Bio Miracle was a challenge to get working, but it's not "undocumented" at this point. Specifically, I documented it on the Wiki 3 years ago: Wiki: FDS audio

The PowerPak has the "excuse" of not having an official update in 6 years. Don't ask me why Krikzz or Kevtris didn't get it right, they may have been using older information for reference, or maybe just didn't test Bio Miracle.


Top
 Profile  
 
PostPosted: Wed Oct 05, 2016 12:24 pm 
Offline
User avatar

Joined: Sun Sep 19, 2004 10:52 pm
Posts: 361
Location: UT
No reason it can't be fixed. There are emulators that do it right. I didn't have a good reference back when I wrote it. I've dusted off my powerpak, look for an update in a day or two.


Top
 Profile  
 
PostPosted: Wed Oct 05, 2016 1:14 pm 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 5724
Location: Canada
The usual problem with Bio Miracle is to do with $4085.

A lot of emulators that seem to get it right are treating $4085 as a modulator phase reset, which does not happen, but it works around a different problem. Bio Miracle is the only game I know of that will try writing $4085 when the modulator is not halted (via $4087). It writes it very soon after $4087 resumes the modulator, so in accurate emulation the modulator will not have time to tick and get out of tune before $4085 is supposed to reset it.

The code for NSFPlay's FDS emulation should be an accurate reference for this, but sadly its CPU synchronization is not accurate enough for it, so it has an option for the $4085 phase reset hack on by default. ;P I plan to improve CPU synch in a future version. (Currently it ticks the audio units for 1 sample, then ticks the CPU for an equivalent number of cycles, and unless high oversampling is used it's not good enough to meet Bio Miracle's tight timing constraints). So... the FDS part of the code is fine, I think?

I don't know in which ways the existing FPGA emulations are failing, but it might be that they're correctly implementing $4085 as not resetting the phase, but don't synchronize the timing? Not sure. Might also be that $4087 halt needs to reset the time until next modulator tick, which is important for giving Bio Miracle enough time to slip in the $4085 write before the tick.


Also worth noting that the wrapping behaviour of the modulator is different than used to be believed, mostly that it goes from -64 to 192, rather than -128 to 128. The details of this are on the wiki page.


Top
 Profile  
 
PostPosted: Wed Oct 05, 2016 3:10 pm 
Offline
User avatar

Joined: Sun Sep 19, 2004 10:52 pm
Posts: 361
Location: UT
rainwarrior wrote:
The usual problem with Bio Miracle is to do with $4085.
...

Anything specific I should be listening for? (NSF track / SFX to use as a test case?)


Top
 Profile  
 
PostPosted: Wed Oct 05, 2016 6:02 pm 
Offline

Joined: Thu Aug 20, 2015 3:09 am
Posts: 284
I don't have any references to check it against, but my NSF player appears to handle Bio Miracle correctly. I use (slow) single-cycle emulation, so the timing should be accurate at least.

Source attatched, in case it helps. Note that reads from $4090 and $4092 are handled elsewhere, and are very important for correct emulation. They return fds_audio.vol_gain and fds_audio.mod_gain in the low 6 bits, respectively.


Attachments:
fds_audio.gz [1.15 KiB]
Downloaded 36 times
Top
 Profile  
 
PostPosted: Wed Oct 05, 2016 7:26 pm 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 5724
Location: Canada
loopy wrote:
rainwarrior wrote:
The usual problem with Bio Miracle is to do with $4085.
...

Anything specific I should be listening for? (NSF track / SFX to use as a test case?)

Track 2 in the NSF, about 12 seconds in you'll hear pitches constantly sliding up if it's doing the "wrong" thing.


Top
 Profile  
 
PostPosted: Wed Oct 05, 2016 8:35 pm 
Offline
User avatar

Joined: Sun Sep 19, 2004 9:28 pm
Posts: 3192
Location: Mountain View, CA, USA
For loopy's benefit (and anyone else that comes across this thread).


Attachments:
bio_miracle_good.mp3 [95.29 KiB]
Downloaded 63 times
bio_miracle_bad.mp3 [95.08 KiB]
Downloaded 61 times
Top
 Profile  
 
PostPosted: Mon Oct 17, 2016 2:19 pm 
Offline
User avatar

Joined: Thu Mar 26, 2015 6:34 pm
Posts: 32
Funny enough, I've been working on something like this for a few weeks now. I've got an adapter board done that you should be able to use to replace the right-angle connector and then use a low-profile FC/NES adapter to connect it to the NES, manually wiring the cable connections o the exp pins. Since I was just using it for testing I only gave it a Famicom connector, but now that I know there's a schematic about I could just go ahead and make a nicely-sized NES board for it. My main question is whether or not I keep the 2C33 route for the audio mixer intact to get the FDS lowpass or just leave it as raw 2C33 output to pin 54.

Image
Here, everything above the blue line can be removed.
Image


Top
 Profile  
 
PostPosted: Mon Jan 30, 2017 9:35 pm 
Offline

Joined: Mon Jan 30, 2017 9:20 pm
Posts: 1
Hi,
Sorry to bump the topic. But I've been searching all over for something like this and just want to say I'm really happy that some of you are actually working on an NES FDS repro cart!

I was actually looking online to see if anyone can help me mod my FDS Ram Adapter to put an fdsstick/fdsemu inside it to eliminate the wired dongle. And at the same time wondering if someone can work that into a Famicom or NES cart.

If any of you have this for sale, or a service for the modding, please let me know! I'll be happy to pay for a product or service of this!

Thanks everyone! :)

8.bit.fan


Top
 Profile  
 
PostPosted: Sat Feb 25, 2017 7:28 pm 
Offline

Joined: Sat Feb 25, 2017 6:34 pm
Posts: 9
The best solution is to re-create a PCB on NES cartridges, integrate FDS Stick or similar


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

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