dragonscave.space is one of the many independent Mastodon servers you can use to participate in the fediverse.
A fun, happy little Mastodon/Glitch instance.

Server stats:

237
active users

Public

@x0 Wow, this is really well done. I don't think I'd have noticed if you hadn't said.

Public

@simon What, that it's only one pulse channel? Yeah it's completely nuts. I imagine even C64 composers, who had to deal with some of the most limitations and invented the most convoluted voice-interchange schemes, would envy this.

Public

@simon You could play this on a Tesla coil or perhaps a PC speaker, though the volume bits would be a huge pain and probably not work on even older PC speakers. Might work on a coil though.

Public

@x0 Do we have the source for it somewhere?

Public

@simon If you mean the NSF, yes it was submitted to Famicompo. If it was made in a tracker though I don't have the module for that.

Public

@x0 Yeah I guess it would be NSF, sorry for the ambiguity. I haven't played with this stuff in years and never knew how to actually make them.

Public

@simon You effectively need a compiler. Programs that take music in their own format and stick it in an NSF ROM, along with a replay routine. Assuming the NSF doesn't do crazy things like modifying the base framerate or adding too many chips at once, you can load the ROM onto a cart and play it on real hardware.

Public

@simon Presumably the compiler compresses the absolute hell out of the music first, and maybe expands macros or does some kind of space optimization involving subroutines, but the ultimate result is a bunch of static ROM including music data for the driver and the driver code itself, compiled into 6502 instructions.

Public

@simon Thus, NSF players have to act almost like complete NES emulators, including the main CPU and its audioo part, timing circuits including VBlank interrupt, and the like. They can be sparse about the PPU though. When people rip NSFs from games, they primarily rip the game's own reply routine and data, stripping extra junk, and possibly tweak it to conform to some constraints of emulation.

Public

@simon This is the same for formats like GBS for the game boy, GSF/PSF/SSF, SID for the C64, among others. This contrasts with formats like VGM, GYM, AY and YM, which are made by running the replay routine in an emulator and logging every write it makes to the audio chip with timing information. TO play it back you need only emulate the audio chip, and simply send all the register writes that the program did.

Public

@x0 I had no idea. I just assumed there was some kind of external music format. Makes me even more impressed that people have taken the time to rip this stuff apart and keep it alive.

Public

@simon And the trackers and other compilers to make purely custom music for the NES at some point had to have internal routines coded in 6502 assembly. E.G. FamiTracker, PPMCK. This is no different from the way it was before, all games with music had a playback routine. It's just these routines were written in the 2000s and 2010s.

Public

@x0 that tracker file must be long. But it’s impressive

Public

@ronald I don't actually know what tracker they used to make this, as it really seems to me like someone would write this in a technically polyphonic program with gaps on each line which automatically fits them all together. But I'm not aware of a program that does that, or how its replay routine would work. If they made that in FamiTracker I'd be impressed. If they made it in MML I'd be gobsmacked.

Public

@ronald Or hell, they could have written their own driver. I've seen that done before, somebody made a modified replay routine that did software mixing of a single piano sample stored in ROM like a Game Boy Advance routine would do, such that it would play the complete Super Mario World athletic theme by streaming 7-bit samples to the DAC. Like this. sndup.net/bf5n/a

Public

@ronald My dumb ass didn't realize you could add audio directly to posts, so here's that but done properly.

00:00/05:05
Public

@x0 wow, this was made using a NES chip?

Public

@ronald Only technically. Normally the sampling capability of the NES is given some addresses and numbers and streams DPCM to the DAC. The sound of its DPCM is very distinctive. But you can also write to a certain register which immediately writes that value to the DAC and holds it there, you have 7 bits of resolution for that. This driver very quickly writes to that register. Games have done that before as well, though they can't do anythihng else because so many CPU cycles are tied up in those writes. But they'll be streaming a single sample from memory. Software mixing to do the same thing is virtually unheard of for the NES. The Game Boy Advance games had to do that all the time though, because Nintendo just gave them a stereo 8-bit DAC that only took direct writes. Their SDK had a driver that would take sequence data, MIDI-like, and sample banks, and do the mixing to play it.

Public

@ronald One of the few games I know to use DAC streaming, though it's just samples from memory, is the game Skate Or Die 2, the Search for Double Trouble, which did this on its title screen. youtube.com/watch?v=77BpfYUqKc4

Public

@ronald It does a form of software mixing it seems, the sample playback routine can run at different rates and they do this for a few of the vocals and most of the musical things. But again it's only monophonic.

Public

@x0 Dude! I love 8bit Chiptunes. I follow the pandora station

Public

@x0 ...all on a *single* audio channel? ...WOW.