It is currently Fri Oct 20, 2017 11:49 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 12 posts ] 
Author Message
PostPosted: Sun Aug 21, 2016 9:14 am 
Offline
Formerly Fx3
User avatar

Joined: Fri Nov 12, 2004 4:59 pm
Posts: 3064
Location: Brazil
A few years ago, a demo ROM was released, probably by tepples. It says "Hello" through the sound channels PCM, RAW, squares and noise.

Funny about the uninterruped sequence of spoken "Hello"s.


Top
 Profile  
 
PostPosted: Sun Aug 21, 2016 9:51 am 
Offline
User avatar

Joined: Sun Sep 19, 2004 10:59 pm
Posts: 1389
I'm not sure who wrote it, but I have one which GoodNES calls "Sampled Sound Test (PD)" which is exactly what you described - playing "Hello" 7 different ways (DMC, raw PCM, amplitude modulation on all 4 pulse duty cycles, and pulse width modulation).


Attachments:
Sampled Sound Test (PD).nes [24.02 KiB]
Downloaded 90 times

_________________
Quietust, QMT Productions
P.S. If you don't get this note, let me know and I'll write you another.
Top
 Profile  
 
PostPosted: Sun Aug 21, 2016 1:01 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19113
Location: NE Indiana, USA (NTSC)
That was mine. Thanks for rehosting it.

I will warn that the PWM is completely bugged, as I had no way to test it at the time. Mostly it was to convince emulator authors to improve resolution of volume writes ($4000) from frame-accurate to at least scanline- if not cycle-accurate the way $4011 was.

I was considering making a ROM that's nearly silent on an authentic NES or accurate emulator but produces "your clone is crap" on something with the swapped duty cycles of some famiclones.


Top
 Profile  
 
PostPosted: Sun Aug 21, 2016 4:20 pm 
Offline
User avatar

Joined: Fri Nov 19, 2004 7:35 pm
Posts: 3943
Could the square versions be done without changing the volume of a carrier wave? Resetting the phase every sample or something so it sounds just like a 4-bit sample without any tones?

_________________
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!


Top
 Profile  
 
PostPosted: Sun Aug 21, 2016 5:18 pm 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 5728
Location: Canada
Dwedit wrote:
Could the square versions be done without changing the volume of a carrier wave? Resetting the phase every sample or something so it sounds just like a 4-bit sample without any tones?

Isn't the PWM example at the end supposed to be the "without changing the volume" version?

Duty 3 starts high, so you can set a low freq and frequently reset phase to only use the volume as a 4-bit DAC. The other 3 duties start low, so you can't with them. With this method the high frequency tone in the other examples could be avoided.

Dunno why you'd want to use a square channel to do the DMC's job though. ;P (Aside from curiosity.)


Top
 Profile  
 
PostPosted: Sun Aug 21, 2016 5:54 pm 
Offline
User avatar

Joined: Fri Nov 19, 2004 7:35 pm
Posts: 3943
I meant using Duty Cycle #3 (seems to be the only one that starts high) at a low frequency, and resetting the wave phase every write, so the volume always stays in the high position, never going to the low position.
This would be a 4-bit version of raw PCM basically.

_________________
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!


Top
 Profile  
 
PostPosted: Sun Aug 21, 2016 6:42 pm 
Offline
User avatar

Joined: Sat Jul 12, 2014 3:04 pm
Posts: 936
tepples wrote:
I was considering making a ROM that's nearly silent on an authentic NES or accurate emulator but produces "your clone is crap" on something with the swapped duty cycles of some famiclones.

I'd suggest making it more humorous/compatible and play the wrong duties, then go "Wait, you're on a clone with swapped duties; HERE is the way it should sound." have some silly animation swap the duty-cycle graphics.


Top
 Profile  
 
PostPosted: Sun Aug 21, 2016 6:51 pm 
Offline
User avatar

Joined: Fri Nov 19, 2004 7:35 pm
Posts: 3943
You can't detect incorrect duty cycles in software, you can only use audio cancellation artifacts.
The only audio-related stuff you can detect is stuff like improper timing for the frame counter, or IRQs not working the way they should.

_________________
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!


Top
 Profile  
 
PostPosted: Sun Aug 21, 2016 7:49 pm 
Offline
User avatar

Joined: Fri Nov 19, 2004 7:35 pm
Posts: 3943
As for why you'd want to use 4-bit PCM force fed through the square channel... Maybe you just want it to be easier to add two channels together?

_________________
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!


Top
 Profile  
 
PostPosted: Sun Aug 21, 2016 11:38 pm 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 5728
Location: Canada
Dwedit wrote:
You can't detect incorrect duty cycles in software.

You can detect Dendy video timing, and presume it's swapped if you find that, but it doesn't apply to all clones with Dendy timing, unfortunately.

B00daw made a test of 4-bit square PCM a while back (sometime ine 2012 I think) but I can't seem to find it.

Edit: thefox made one a while back, it seems, but the link is dead: post mentioning it / archived link


Top
 Profile  
 
PostPosted: Mon Aug 22, 2016 12:47 am 
Offline
User avatar

Joined: Mon Jan 03, 2005 10:36 am
Posts: 2962
Location: Tampere, Finland
rainwarrior wrote:
Edit: thefox made one a while back, it seems, but the link is dead: post mentioning it / archived link

That one had a bug in it (didn't properly initialize sweep registers, IIRC), so I wouldn't advice to trying to find it. I don't think I ever got around to fixing it.

Anyway, the overhead of having to operate two pulse channels could easily be worse than the one ADC instruction you'd need to do it in software. Probably not worth it.

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


Top
 Profile  
 
PostPosted: Mon Aug 22, 2016 7:16 am 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19113
Location: NE Indiana, USA (NTSC)
Dwedit wrote:
As for why you'd want to use 4-bit PCM force fed through the square channel... Maybe you just want it to be easier to add two channels together?

That or play DPCM samples and PCM samples at once. Otherwise they step on each other's fingers in $4011.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 

All times are UTC - 7 hours


Who is online

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