Full track in *.nes rom

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
Full track in *.nes rom
by on (#241944)
Hello to all! :wink: Tell me, please, can you make a *.nes rom like that, only with the full song (so that this rom can be run on a real console)?

Rick Astley - Never Gonna Give You Up
https://www.youtube.com/watch?v=Co1gnibPeJQ
And also 2 in 1 - with songs:
Rick Astley - Never Gonna Give You Up
and
The Lion King - Circle of Life
with this animated screensaver
https://www.youtube.com/watch?v=5TGZO9_ ... e=youtu.be
with button "Reset" between tracks :)
If you can’t make a rom with 2 in 1, then with at least one complete song. I made a cover for the cartridge (in attached file) :wink:

If it’s possible to make 2 in 1, then I’ll do the cover.
Sorry for my bad English :wink:
Re: Full track in *.nes rom
by on (#241953)
It would be difficult to make a ROM sound good with the full song because of memory constraints. It might fit in 512kB if it's DPCM encoded and sample-rate reduced, but it will definitely sound awful. That demo uses raw PCM, and probably uncompressed. I'll take a guess and say the CD-quality version of the song is 60 megabytes. Reduced to 8-bit mono, maybe 15MB. Cutting the bit-rate down to 22khz, 7MB. That's still about 16 times larger than it would need to be, to fit in a "normal" cartridge. That's the scale of the problem, and that's just for one song.

Larger ROMs are possible, but the developer would need to have the hardware to test it. 512kB is just the traditional maximum ROM size for an NES program.
Re: Full track in *.nes rom
by on (#241970)
As much as we love this song, it's probably impossible to make it fit in a NES cartridge. Compression can be easily acheived in acceptable quality using 4-bit DPCM, using 4 bit per sample. Sound quality can be reduced to aproximately 15 kilosamples per second while sounding muffled but still somewhat decent. Anything below that and it sounds like you have pillows on your ears.

Usual NES carts have a great maximum of 512 kilobytes of data, that means 1024 kilosamples, that is aproximately 69 seconds worth of music of bad, but acceptable quality.

The tricks that could be used is to re-use verses so that they're encoded only once. Then the next step is to encode the music as MIDI but play back vocal samples for the singing (such as the Tales of Phantasia opening sound). Unfortunately the FC/NES does not have a CPU fast enough to replay back an encoded MIDI (unless dedicated cartridge hardware is put inside...)

So even by tricking and re-using verses (to avoid encoding them twice) it's still impossible to fit the entiere Never Gonna Give you UP song on a normal NES cartridge. Of course with some dedicated mapper that could be possible. On the SuperNintendo that'd be definitely possible, and a decent quality could be acheived. But what's the point anyway ? You could do the same with a casette tape, which is dedicated for this usage :)
Re: Full track in *.nes rom
by on (#241971)
It can and has been done. There was this 64MB NES cart with 20 minutes of recorded music.

Store: https://www.retrousb.com/product_info.php?cPath=36&products_id=143

Video: https://www.youtube.com/watch?v=3w8atFA2fk0