It is currently Sat Dec 16, 2017 11:25 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 16 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Sat Aug 14, 2010 5:21 am 
Offline

Joined: Thu Oct 05, 2006 6:29 am
Posts: 911
I've released the NSF player I've been working on for a while (available here). The source code is currently not included, but it might be at some point in the future.

And here's a video showing it in action on a real TurboGrafx. There's some "snow" on the screen, because I'm probably writing to the VDC/VCE outside of the vblank period somewhere, but I figured I could live with that.

DMC isn't supported, so Sunsoft soundtracks will sound a bit thin.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Aug 14, 2010 5:57 pm 
Offline

Joined: Sun Mar 19, 2006 9:44 pm
Posts: 924
Location: Japan
Cool stuff. I got NSFs running on the PCE several years ago, but the logarithmic volume envelopes on the PCE vs linear on the NES caused some NSFs to be too quiet. Did you make sure to adjust the NES' linear volume to account for the PCE's logarithmic volume? (Just curious.)


Top
 Profile  
 
 Post subject:
PostPosted: Sun Aug 15, 2010 1:41 am 
Offline

Joined: Thu Oct 05, 2006 6:29 am
Posts: 911
No, I use 16 + NES_volume. None of the docs I used as reference made any mention of that little detail AFAICR.

I just tried replacing the volume calculation with a LUT that takes the logarithmic property of the PCE PSG into account. It doesn't help much with the quietness of e.g. Castlevania and Silver Surfer, but I do think the overall mixing on some tracks turns out better (like the intro to Shadow of The Ninja). Maybe I'll release a "final" version someday with the updated volume control, if I manage to get rid of the snow on the screen.

Btw, I used your screen resolution test program to get the VDC register values. I'm setting register $0A to $0303 and register $0B to $062B hoping to get a 352-pixel wide display, but it's more like 280 pixels or something weird like that. Any idea what the deal is?


Top
 Profile  
 
 Post subject:
PostPosted: Sun Aug 15, 2010 1:49 am 
Offline

Joined: Sun Mar 19, 2006 9:44 pm
Posts: 924
Location: Japan
To eliminate snow, make your screen updates only during VSync or HSync. To change the screen resolution, of course you have to adjust the dot clock via the VCE ($0400). The lowest two bits of $0400 control it.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 20, 2010 12:12 pm 
Offline

Joined: Thu Oct 05, 2006 6:29 am
Posts: 911
I've done a lot of bugfixes and improvements on the player since the original version; the snow on the screen is gone, i've modified the volume control according to Chris' suggestion, I've fixed some problems with the length counters, allowed songs to use SRAM at $6000, etc etc.

The latest version can be downloaded here.

Here you can see (and hear) it running on my PAL TurboGrafx.

I have an idea for how to get some more problematic NSFs to play (like Darkman, Rush'n Attack, Rygar, Ninja Gaiden 3,...). It would require some manual labor to find the correct addresses to patch though, so I'm not sure if I'll do that.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Sep 12, 2010 10:05 am 
Offline

Joined: Thu Aug 28, 2008 1:17 am
Posts: 591
hey mic_,

If you're ever interested in sharing your source (even privately), I could use a little help with the NES to PCE rom emulations projects. I got most of the sound/emulation working for NES (DPCM excluded) except for sweeps. I think I still have some bugs though (Megaman plays fine, but SMB has audio glitches, etc).

Also, not sure if this helps but: http://www.pcedev.net/blog/files/XM_volume_tables.txt . If nes linear volume drop equates to every 4 values in that Amiga table, then you could use that. I think I just did the table by ear on my old nes2pce projects. Either way, your video example sounds great.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Sep 12, 2010 12:12 pm 
Offline

Joined: Thu Oct 05, 2006 6:29 am
Posts: 911
The source is already publicly available, but I guess I never posted it here. Here's a link


Top
 Profile  
 
PostPosted: Sat Oct 27, 2012 1:51 pm 
Offline

Joined: Thu Oct 05, 2006 6:29 am
Posts: 911
After I mentioned that some of the songs sounded weird in tomaitheous' PC-Engine port of Megaman 2 I decided to check my own player, and noticed that it actually had the same problem :P
So I set about fixing that (I found some problems with how I handled writes to the triangle channel registers). While I was at it I also added support for 5-step sequencing ($4017.7), and implemented a way of loading new waveforms where the channel needs to be halted for a much shorter amount of time.

Here's the latest ROM (includes a ROMBuilder tool for Windows so you can replace the NSFs in the ROM).

And here's a youtube video of it running on my PAL TG16.


Top
 Profile  
 
PostPosted: Sat Oct 27, 2012 5:55 pm 
Offline
User avatar

Joined: Thu Jan 19, 2006 5:08 pm
Posts: 748
Location: Shelton, Washington.
How about updates to your old pages, to refresh to the version you recently released?

Including all source releases.

_________________
AKA SmilyMZX/AtariHacker.


Top
 Profile  
 
PostPosted: Sat Oct 27, 2012 7:38 pm 
Offline
User avatar

Joined: Mon Jan 03, 2005 10:36 am
Posts: 2983
Location: Tampere, Finland
Pretty sure I can hear the linear vs logarithmic volume problem on the Shadowgate track.

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


Top
 Profile  
 
PostPosted: Sun Oct 28, 2012 12:01 am 
Offline

Joined: Thu Oct 05, 2006 6:29 am
Posts: 911
The problem is that trying to map a logarithmic curve against a linear curve at a low resolution (5 bits) gives you some values at the higher end that will be identical.
Currently I'm only using the per-channel volume on the HuC6280, but there's also a per-channel balance where one can control the left/right output balance in 16 steps. Perhaps a combination of the two could be used to get a higher volume resolution.. I'd have to make some measurements to see how the two settings are weighed in the final output of a channel.


Top
 Profile  
 
PostPosted: Sun Oct 28, 2012 8:28 am 
Offline

Joined: Sun Mar 19, 2006 9:44 pm
Posts: 924
Location: Japan
I recorded a volume slide ($1F -> $00) on my PCE a while back to map it to 16 linear steps, and yes, there is no way to avoid some identical values:
Image

_________________
http://www.chrismcovell.com


Top
 Profile  
 
PostPosted: Sun Oct 28, 2012 9:37 am 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19353
Location: NE Indiana, USA (NTSC)
As I understand it, games that don't use hardware envelopes are more likely to use lower volumes (1-8) for musical notes on channels 1 and 2 so as not to overpower channel 3. So exact volumes for sound effects might not be quite as important. But in any case, if you alternate volumes $1E and $1F each frame, can that be used for the intermediate volumes?


Top
 Profile  
 
PostPosted: Sun Oct 28, 2012 1:48 pm 
Offline

Joined: Thu Aug 28, 2008 1:17 am
Posts: 591
This should be somewhat accurate: http://pastebin.com/raw.php?i=7i5u9ARA <-table. The table was originally for Amiga/MOD/XM, but it works for NES too.

Edit: fixed link. Every "#" is a NES volume entry.


Top
 Profile  
 
PostPosted: Sun Oct 28, 2012 2:08 pm 
Offline

Joined: Thu Oct 05, 2006 6:29 am
Posts: 911
I replaced my volume conversion table (which was more or less round(16*(log(100*i/16)/log(10)))) with chris' one, which should be slightly louder.

Here's a new ROM

And a video


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

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