repeat NSF player

Discuss emulation of the Nintendo Entertainment System and Famicom.

Moderator: Moderators

Post Reply
Rahsennor
Posts: 479
Joined: Thu Aug 20, 2015 3:09 am

repeat NSF player

Post by Rahsennor »

Repeat is a lightweight NSF player for Linux and Windows. Requires SDL2.

Controls
  • Left/Right: change track
  • Enter: restart track
  • Space: pause
  • Tab: cycle display modes
  • Esc: quit
It also supports rendering to WAV files via the command line; type repeat -help for more information.
Attachments
repeat-0.11.zip
(51.76 KiB) Downloaded 783 times
Last edited by Rahsennor on Tue Aug 01, 2017 1:14 am, edited 6 times in total.
Rahsennor
Posts: 479
Joined: Thu Aug 20, 2015 3:09 am

Re: Yet another NSF player

Post by Rahsennor »

Updated to version 0.03. VRC6 and MMC5 audio are (mostly) implemented.
Rahsennor
Posts: 479
Joined: Thu Aug 20, 2015 3:09 am

Re: Yet another NSF player

Post by Rahsennor »

Updated to version 0.04. Added Namco 163 and Famicom Disk System audio. Neither of them are 100% accurate; the N163 is overclocked, as seems to be the norm for the other emulators/players I tested, and the FDS lacks a low-pass filter.

I also implemented the MMC5 hardware multiplier, so MMC5 rips actually work now. :roll:
Rahsennor
Posts: 479
Joined: Thu Aug 20, 2015 3:09 am

Re: Yet another NSF player

Post by Rahsennor »

Updated to 0.07. More or less everything is implemented now, bugs notwithstanding; it plays every NSF I have.

It also has command-line options for rendering to files, briefly documented in the OP.
lidnariq
Posts: 11429
Joined: Sun Apr 13, 2008 11:12 am

Re: Yet another NSF player

Post by lidnariq »

Since you've already got SDL in the mix ...

Just as a random thought (not even as strong as a "request"): I've been kinda wanting an NSF player that mimics vspcplay's memory usage display.
Rahsennor
Posts: 479
Joined: Thu Aug 20, 2015 3:09 am

Re: repeat NSF player

Post by Rahsennor »

Updated to 0.08.

All hardware-inaccurate hacks have been moved to "fancy" mode, detailed in the OP. N163 now uses time-division multiplexing by default.
N163 channel count is now displayed.
N163, 5B and FDS have been rebalanced. N163 volume is scaled by the number of channels.
STP opcode no longer closes the emulator for debugging purposes. It was making some tracks of e.g. Solstice inaccessible.
5B noise frequency should now be accurate.
Several bugs in the FDS emulation have been exterminated. It sounds much better now.
A realtime piano/register display mode has been added.
lidnariq wrote:Just as a random thought (not even as strong as a "request"): I've been kinda wanting an NSF player that mimics vspcplay's memory usage display.
I'm taking suggestions for useful stuff to display, but I'm afraid I don't know what that is.
lidnariq
Posts: 11429
Joined: Sun Apr 13, 2008 11:12 am

Re: repeat NSF player

Post by lidnariq »

VSPCplay.

It's a SNES SPC player, and not terribly accurate, but the pertinent detail: the visualization is of what portions of memory have been read as data (CPU)/written (CPU)/executed/echo buffer/read as samples how recently.

Obviously with NSFs, there's the complication of how to best represent bankswitching.
Rahsennor
Posts: 479
Joined: Thu Aug 20, 2015 3:09 am

Re: repeat NSF player

Post by Rahsennor »

Updated to 0.09. Changelog:
  • Major APU code refactoring, fixing numerous bugs (and probably adding some new ones).
  • DMC cycle stealing added (highly experimental).
  • VRC6 emulation fine-tuned, $9003 implemented (untested).
  • VRC7 segfault and phase reset bugs fixed.
  • MMC5 no longer shares the APU frame counter, and is displayed correctly in piano view.
  • Sunsoft 5B envelope implemented, volume ramp fixed.
  • Silenced spurious notes when switching tracks.
  • Fixed VRC7 and Sunsoft 5B not being synchronized before writes to their respective ports.
  • Added a first-order lowpass filter at 14 kHz to everything but the VRC7 and FDS.
  • Fancy mode now only affects the Namco 163; all other effects have been removed.
I've now implemented everything I can find sufficient documentation for; the only feature missing is the unused MMC5 PCM channel. It plays every track I can find correctly, except for some homebrew NSFs that don't work on real hardware anyway. If you find anything that doesn't sound right, please report it.

On that note, has anyone even got it to run? I can't test the Windows version, so if it's crashing or something, let me know.
User avatar
aLaix
Posts: 20
Joined: Thu May 29, 2014 2:48 pm
Location: Mexico
Contact:

Re: repeat NSF player

Post by aLaix »

Hello Rahsennor. This looks very good! Idk about windows but it works on wine..
I have a question for you, Is this open source?
Attachments
screenshot.png
screenshot.png (7 KiB) Viewed 17926 times
*** O-Nes-Sama emulator team ***
Rahsennor
Posts: 479
Joined: Thu Aug 20, 2015 3:09 am

Re: repeat NSF player

Post by Rahsennor »

aLaix wrote:Is this open source?
It's meant to be eventually, once I get rid of all the dangerous programming practices. The emulation and DSP code is okay, if you really want it, but the UI could poke someone's eye out.
User avatar
Zepper
Formerly Fx3
Posts: 3262
Joined: Fri Nov 12, 2004 4:59 pm
Location: Brazil
Contact:

Re: repeat NSF player

Post by Zepper »

Uh... Do you use Allegro library?
lidnariq
Posts: 11429
Joined: Sun Apr 13, 2008 11:12 am

Re: repeat NSF player

Post by lidnariq »

Nope, it's just SDL2.
User avatar
Jarhmander
Formerly ~J-@D!~
Posts: 568
Joined: Sun Mar 12, 2006 12:36 am
Location: Rive nord de Montréal

Re: repeat NSF player

Post by Jarhmander »

Cool, an NSF player for Linux! Will try when I get a chance.

(Also, by replying, I can find this thread faster)
((λ (x) (x x)) (λ (x) (x x)))
Rahsennor
Posts: 479
Joined: Thu Aug 20, 2015 3:09 am

Re: repeat NSF player

Post by Rahsennor »

Updated to 0.10. Changelog:
  • Started on the massive task of cleaning up the GUI code.
  • Fixed several glitches related to pausing.
  • Removed the 14 kHz lowpass, replacing it with a lower resampler cutoff and tap count - faster.
  • Sample rate is now adjustable with the -rate option, and defaults to 48 kHz instead of 44.1 kHz.
  • Removed fancy mode. Stop making 8-channel N163 songs, they sound awful.
  • FDS write protect status now displayed.
  • Non-bankswitched NSFs now converted to bankswitched instead of being special-cased.
  • VRC7 emulation rewritten from scratch.
The new VRC7 implementation is based on the much-better-documented OPLL, with six channels and rainwarrior's patch set. Lagrange Point sounds much better, but a few homebrew NSFs sound wonky or downright broken. I'm working on it.

Bug reports welcome, as usual.
Rahsennor
Posts: 479
Joined: Thu Aug 20, 2015 3:09 am

Re: repeat NSF player

Post by Rahsennor »

Updated to 0.11. Changelog:
  • Added -raw option for unfiltered and unresampled output.
  • File loading rewritten, NSFe support added (no metadata yet).
  • Fixed writes to $4003 and $4007 resetting the period counter.
  • Fixed writes to certain APU registers not taking effect immediately.
  • Misc APU optimizations and cleanups.
  • APU fixes also applied to MMC5.
  • Audio output rewritten; Linux version uses ALSA, Windows uses SDL 2.0.5 queues.
All that stands between this version and a source release is the GUI and emulator threads clobbering each other's stack space without synchronization or atomics. I'd rather not put that anywhere other people can copy it, because it's a really dumb thing to do, even if it does work perfectly.
Post Reply