Two-bit clones: test ROM for famiclone swapped duty

A place where you can keep others updated about your NES-related projects through screenshots, videos or information in general.
tepples
Posts: 23011
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)

Two-bit clones: test ROM for famiclone swapped duty

Post by tepples »

I made a test ROM that plays a recorded waveform through the pulse channels in a way that is audible on an authentic NES and nearly silent on a famiclone that swaps duty cycles or vice versa.

Bluesky user Creepy Kingdom posted an unboxing video of a RetroN famiclone bundled with one of my employer's NES games (a rerelease of Haunted: Halloween '86 with Spirit Halloween animatronics as bosses). The music accompanying the video had swapped duty cycles. So I sought to build a simple test to let a novice user, neither highly technical nor musically trained, tell whether a console's duty cycles are swapped.

The wave has 2 bits per sample, and the playback routine sets the pulse channels to a high frequency (12429 Hz) and translates sample values to volume and duty cycle values on the pulse channels every 144 cycles. It can be set to play a wave in such a way as to make changes to volume either reinforce or cancel out changes to duty cycle, depending on whether the chipset swaps duty cycles or not.

If anything, it gives an excuse to refer to particular products as "two-bit famiclones" because they play 2-bit waves wrong.
You do not have the required permissions to view the files attached to this post.
User avatar
Quietust
Posts: 2033
Joined: Sun Sep 19, 2004 10:59 pm

Re: Two-bit clones: test ROM for famiclone swapped duty

Post by Quietust »

And if you play it on an emulator whose sound emulation is subtly broken (such as mine), you'll hear "This console sounds like a swapped clone. Authentic". I'm guessing it's a result of outputting the wave as +N/-N instead of +N/0 (to avoid wasting half of the dynamic range without needing to apply a filter to remove the resulting DC bias).

I wonder if it would be possible to overlay the "swapped clone" and "authentic" messages on top of each other, or if there isn't enough bandwidth to manage that.
Quietust, QMT Productions
P.S. If you don't get this note, let me know and I'll write you another.