Full track in *.nes rom

Discuss NSF files, FamiTracker, MML tools, or anything else related to NES music.

Moderator: Moderators

Online
Posts: 12
Joined: Tue Aug 20, 2019 12:33 pm

Full track in *.nes rom

Post by Online »

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:
Attachments
Music_nesdev_cartridge.jpg
Music_nesdev.jpg
User avatar
Memblers
Posts: 4123
Joined: Mon Sep 20, 2004 6:04 am
Location: Indianapolis
Contact:

Re: Full track in *.nes rom

Post by Memblers »

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.
User avatar
Bregalad
Posts: 8156
Joined: Fri Nov 12, 2004 2:49 pm
Location: Divonne-les-bains, France

Re: Full track in *.nes rom

Post by Bregalad »

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 :)
User avatar
rainwarrior
Posts: 8763
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Full track in *.nes rom

Post by rainwarrior »

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.p ... cts_id=143

Video: https://www.youtube.com/watch?v=3w8atFA2fk0
Online
Posts: 12
Joined: Tue Aug 20, 2019 12:33 pm

Re: Full track in *.nes rom

Post by Online »

Memblers wrote: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.
Bregalad wrote: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 :)
From mapper MMC3 - 512kb, COOLBOY - 32 Mb, COOLGIRL - 128 Mb.

They say that the creation of such a collection is possible, only the assembly of the rum itself and its recording in the cartridge will remain.
Something similar is being collected here.
https://coolgirl.clusterrr.com/#5E54498 ... Z4Z08VWXYZ

But even short tracks are made in good quality (for example, a screensaver from Ninja Turtles, an example attached).
I tried to make Duck Tales and Winnie the Pooh, but the quality even for short tracks turned out lower i(t run through NNnesterj with the settings, as in the screenshot).
rainwarrior wrote: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.p ... cts_id=143

Video: https://www.youtube.com/watch?v=3w8atFA2fk0
How did he make such quality music?) Incredible!

In theory, the assembly process from the general rum is already automated. All that remains is to add mp3, wav to nes-rom auto-conversion with good sound quality.

It would be great to create music cartridges (with the albums of Queen, Metallica, Beatles ... and other tracks)
Attachments
All (1).jpg
Pooh.NES
(256.02 KiB) Downloaded 388 times
Duck Tales.NES
(256.02 KiB) Downloaded 366 times
38ge7qntj.jpg
Turtles.NES
(1.01 MiB) Downloaded 351 times
Online
Posts: 12
Joined: Tue Aug 20, 2019 12:33 pm

Re: Full track in *.nes rom

Post by Online »

P\S Cover in real :D
Attachments
P1280280 — копия.JPG
lidnariq
Site Admin
Posts: 11716
Joined: Sun Apr 13, 2008 11:12 am

Re: Full track in *.nes rom

Post by lidnariq »

Online wrote:How did he make such quality music?) Incredible!
Metal (and other styles featuring distortion as a musical effect) are much more tolerant of lousy output stages than other genres of music. Try again with classical music and you'd hear it.

The NES has a 7-bit DAC, which is pretty lackluster. You're already talking about worse sound quality than PCs and Macs (both ≈22kHz and 8-bit) from the very beginning of the desktop era.

But that 64MB in 20 minutes is at the cost of the NES being unable to do anything else. It's not really a video game console at that point, but instead just a glorified tape player.
with good sound quality.
It will never be "good". At best it will be "passable". The NES's audio hardware just isn't capable of doing much better.
It would be great to create music cartridges (with the albums of Queen, Metallica, Beatles ... and other tracks)
How would you feel about someone hiding a CD player inside an NES? It'd be more authentic and also sound better.
Online
Posts: 12
Joined: Tue Aug 20, 2019 12:33 pm

Re: Full track in *.nes rom

Post by Online »

lidnariq wrote:
Online wrote:How did he make such quality music?) Incredible!
Metal (and other styles featuring distortion as a musical effect) are much more tolerant of lousy output stages than other genres of music. Try again with classical music and you'd hear it.

The NES has a 7-bit DAC, which is pretty lackluster. You're already talking about worse sound quality than PCs and Macs (both ≈22kHz and 8-bit) from the very beginning of the desktop era.

But that 64MB in 20 minutes is at the cost of the NES being unable to do anything else. It's not really a video game console at that point, but instead just a glorified tape player.
with good sound quality.
It will never be "good". At best it will be "passable". The NES's audio hardware just isn't capable of doing much better.
It would be great to create music cartridges (with the albums of Queen, Metallica, Beatles ... and other tracks)
How would you feel about someone hiding a CD player inside an NES? It'd be more authentic and also sound better.
Good But at least that music that plays reasonably well can somehow be made in full view? I tried, but the result is the same. How to make it at least to the level of Demo?
Can anyone convert this rum (full track, the size of the nes file does not matter)?
Attachments
RICK ASTLEY.NES
(1 MiB) Downloaded 461 times
Last edited by Online on Mon Nov 04, 2019 2:00 pm, edited 1 time in total.
Online
Posts: 12
Joined: Tue Aug 20, 2019 12:33 pm

Re: Full track in *.nes rom

Post by Online »

By the way, heavy music sounds decent (see WWF.nes)
Attachments
WWF.nes
(2 MiB) Downloaded 392 times
User avatar
Memblers
Posts: 4123
Joined: Mon Sep 20, 2004 6:04 am
Location: Indianapolis
Contact:

Re: Full track in *.nes rom

Post by Memblers »

Which emulator runs those mapper 17 ROMs? I tried Mesen (maybe outdated) and FCEUX, doesn't work there.

I remember that TMNT demo. It's using MMC5 PCM out + NES RAW PCM out at the same time. If summed together as 14 bits that's pretty good, and probably at a resolution below the noise floor already (I'm not sure what depth/rate it actually uses though).

I think I've made the type of board you want, Online. It's useless as an .NES ROM, but as a cartridge it plays CD quality WAV files and MP3 files from a microSD card. I didn't mention it last time I replied because I'd agreed to a short period of secrecy, which has ended.
https://forums.nesdev.com/viewtopic.php?f=4&t=19422
I have a tool chain set up now where I can mass-import all the MP3s I want, and creates a list that can be displayed on the NES. Though the list can probably contain "only" 3~4 thousand files, and audio data "only" 32GB. :)

I've definitely been thinking about making a Famicom version of it, haven't started on that though. But it exists for NES now.
lidnariq
Site Admin
Posts: 11716
Joined: Sun Apr 13, 2008 11:12 am

Re: Full track in *.nes rom

Post by lidnariq »

There was a converter from forever ago that converts DPCM into a mapper 17 (i.e. copier) ROM image. I remember finding a few resulting images in GoodNES in the "public domain" category (which is extra nonsense because the underlying recordings weren't even copyleft, let along something more permissive). However, the corresponding copier only has 512KB of RAM (again) so oversize images are invalid and should be rejected...
NewRisingSun
Posts: 1560
Joined: Thu May 19, 2005 11:30 am

Re: Full track in *.nes rom

Post by NewRisingSun »

If summed together as 14 bits that's pretty good
How does that work? Would not one 7-bit source have to be 128 times as loud as the other to yield an actual 14-bit resolution?

Agree that 1 MiB mapper 17 ROM files are invalid, as the Front Fareast Super Magic Card RAM disk only has 512 KiB PRG-RAM, 256 KiB CHR-RAM, and 32 KiB of WRAM.
lidnariq
Site Admin
Posts: 11716
Joined: Sun Apr 13, 2008 11:12 am

Re: Full track in *.nes rom

Post by lidnariq »

NewRisingSun wrote:How does that work? Would not one 7-bit source have to be 128 times as loud as the other to yield an actual 14-bit resolution?
One DAC's not linear, so ... maybe something like that time that someone used viterbi search to get 8.5-bit quality out of three 4-bit log scale DACs would be manageable to get perhaps 12-bit quality?

Of course, accurate conversion would want sitting down and calibrating it, and I don't trust that the 2A03's external audio ballast resistors are consistent enough from one 30-year-old Famicom to the next ... nevermind the mess that is mixing levels on modified NESes.
User avatar
rainwarrior
Posts: 8763
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Full track in *.nes rom

Post by rainwarrior »

...not to mention the resistors from one MMC5 cart to the next.

There's no way that combining MMC5 PCM with 2A03 could be precise enough to increase your effective bit-depth anywhere outside of an emulator.
tepples
Posts: 22915
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Full track in *.nes rom

Post by tepples »

Consider these mitigations:
  • Most Famicom consoles are not AV, and RF modulation and demodulation add noise. How large is this noise compared to step size noise of a 7- or 8-bit DAC?
  • Proper dithering can move step size noise into less audible frequency bands.
  • Psychoacoustic masking means the ear can't hear much more than 4 bits at any given volume level, especially if you're playing something other than pure sine waves. This is what makes ADPCM (SNES BRR, PlayStation VAG, Nintendo DS IMA, Action 53 QDP) so attractive, and it means dynamic range compression might help overcome step size noise the same way it overcomes RF noise in FM radio.
Post Reply