repeat NSF player

Discuss emulation of the Nintendo Entertainment System and Famicom.

Moderator: Moderators

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

repeat NSF player

Post by Rahsennor » Fri Oct 02, 2015 3:23 am

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 510 times
Last edited by Rahsennor on Tue Aug 01, 2017 1:14 am, edited 6 times in total.

Rahsennor
Posts: 475
Joined: Thu Aug 20, 2015 3:09 am

Re: Yet another NSF player

Post by Rahsennor » Mon Oct 05, 2015 6:33 pm

Updated to version 0.03. VRC6 and MMC5 audio are (mostly) implemented.

Rahsennor
Posts: 475
Joined: Thu Aug 20, 2015 3:09 am

Re: Yet another NSF player

Post by Rahsennor » Thu Oct 08, 2015 1:33 am

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: 475
Joined: Thu Aug 20, 2015 3:09 am

Re: Yet another NSF player

Post by Rahsennor » Thu Dec 03, 2015 7:59 pm

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: 8776
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: Yet another NSF player

Post by lidnariq » Thu Dec 03, 2015 8:18 pm

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: 475
Joined: Thu Aug 20, 2015 3:09 am

Re: repeat NSF player

Post by Rahsennor » Sat Feb 13, 2016 5:34 pm

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: 8776
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: repeat NSF player

Post by lidnariq » Sat Feb 13, 2016 6:03 pm

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: 475
Joined: Thu Aug 20, 2015 3:09 am

Re: repeat NSF player

Post by Rahsennor » Sun Jul 24, 2016 8:01 pm

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 » Mon Jul 25, 2016 5:20 pm

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 11634 times
*** O-Nes-Sama emulator team ***

Rahsennor
Posts: 475
Joined: Thu Aug 20, 2015 3:09 am

Re: repeat NSF player

Post by Rahsennor » Mon Jul 25, 2016 7:46 pm

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: 3190
Joined: Fri Nov 12, 2004 4:59 pm
Location: Brazil
Contact:

Re: repeat NSF player

Post by Zepper » Tue Jul 26, 2016 9:18 am

Uh... Do you use Allegro library?

lidnariq
Posts: 8776
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: repeat NSF player

Post by lidnariq » Tue Jul 26, 2016 10:16 am

Nope, it's just SDL2.

User avatar
Jarhmander
Formerly ~J-@D!~
Posts: 488
Joined: Sun Mar 12, 2006 12:36 am
Location: Rive nord de Montréal

Re: repeat NSF player

Post by Jarhmander » Tue Jul 26, 2016 8:58 pm

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: 475
Joined: Thu Aug 20, 2015 3:09 am

Re: repeat NSF player

Post by Rahsennor » Mon Nov 07, 2016 12:23 am

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: 475
Joined: Thu Aug 20, 2015 3:09 am

Re: repeat NSF player

Post by Rahsennor » Tue Aug 01, 2017 1:30 am

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