Why do DPCM samples have a ROM size limit?
Moderator: Moderators
-
- Posts: 214
- Joined: Sun Apr 01, 2007 2:10 pm
Why do DPCM samples have a ROM size limit?
Why do DPCMs have a storage size limit when full PCMs don't?
What is the exact limit size of DPCM data you can store?
I've notice Famitracker has an "expanded" size limit, but when I export to NSF, the songs freak out when it calls up a DPCM past the "limit".
What is the exact limit size of DPCM data you can store?
I've notice Famitracker has an "expanded" size limit, but when I export to NSF, the songs freak out when it calls up a DPCM past the "limit".
Here to at least get an idea of how the NES works. I mean I know alot of the basic things, but this place'll help me grasp more how NES functions.
Major respect to NES developers.
Re: Why do DPCM samples have a ROM size limit?
DPCM is played by the hardware, so the size is limited by the hardware design. It is 16384 bytes (could be a bit more, not practically usable). If you want more, you'd have to bankswitch the top 16K, selecting needed bank for a sample, and solve all related problems (keeping vectors and other stuff in place). You can't automatically switch the bank during play, though.
PCM does not have limitations, as it is played purely by software.
PCM does not have limitations, as it is played purely by software.
-
- Posts: 214
- Joined: Sun Apr 01, 2007 2:10 pm
Re: Why do DPCM samples have a ROM size limit?
Does it include the entire ROM or just the DPCM data? I only used 9k bytes and it still freaked out. I narrowed it down to 1 song and it stopped freaking out.Shiru wrote:DPCM is played by the hardware, so the size is limited by the hardware design. It is 16384 bytes (could be a bit more, not practically usable). If you want more, you'd have to bankswitch the top 16K, selecting needed bank for a sample, and solve all related problems (keeping vectors and other stuff in place). You can't automatically switch the bank during play, though.
PCM does not have limitations, as it is played purely by software.
Here to at least get an idea of how the NES works. I mean I know alot of the basic things, but this place'll help me grasp more how NES functions.
Major respect to NES developers.
Re: Why do DPCM samples have a ROM size limit?
You must mean 4081 bytes, the limitation set by the APU DMC register $4013. Of course DMC samples can also be chained by starting the next part of the sample when the DMC IRQ hits. The IRQ handling can also employ bank switching, effectively removing all size limitations.Shiru wrote:DPCM is played by the hardware, so the size is limited by the hardware design. It is 16384 bytes (could be a bit more, not practically usable). If you want more, you'd have to bankswitch the top 16K, selecting needed bank for a sample, and solve all related problems (keeping vectors and other stuff in place). You can't automatically switch the bank during play, though.
If FamiTracker has support for some kind of expanded size limit and it doesn't work, there's probably a bug in its NSF player code (or "not implemented", or whatever).
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: fo.aspekt.fi
Re: Why do DPCM samples have a ROM size limit?
I meant total amount of DPCM data that could be used in a program without extra effort, like IRQ and bankswitching. One sample is smaller, yes, up to 4081 bytes.
-
- Posts: 214
- Joined: Sun Apr 01, 2007 2:10 pm
Re: Why do DPCM samples have a ROM size limit?
This. I'm talking about all the data, not just a single sample.Shiru wrote:I meant total amount of DPCM data that could be used in a program without extra effort, like IRQ and bankswitching. One sample is smaller, yes, up to 4081 bytes.
Famitracker used to have an obvious limit, but I checked out a recent version and it's expanded to allow 256k of DPCM data. It works on Famitracker obviously, but when I exported it started to freak out during playback of the DPCM samples that are past the limit allowed.
Here to at least get an idea of how the NES works. I mean I know alot of the basic things, but this place'll help me grasp more how NES functions.
Major respect to NES developers.
Re: Why do DPCM samples have a ROM size limit?
Well, in that case it depends on the mapper that is used. With simple mappers the limitation is 16KB or less like Shiru said, with more complex mappers the limitation is the maximum size of data that said mapper can handle. For the "complex" mappers (ones that can map into $C000-$FFFF region of memory) the PCM size limitation is not any bigger than the DPCM limitation!CKY-2K/Clay Man wrote:This. I'm talking about all the data, not just a single sample.Shiru wrote:I meant total amount of DPCM data that could be used in a program without extra effort, like IRQ and bankswitching. One sample is smaller, yes, up to 4081 bytes.
For the NSF mapper, the upper limit for any data (including DPCM and PCM samples), is 1 megabyte.
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: fo.aspekt.fi
- rainwarrior
- Posts: 8734
- Joined: Sun Jan 22, 2012 12:03 pm
- Location: Canada
- Contact:
Re: Why do DPCM samples have a ROM size limit?
If a Famitracker export fails, please report the bug on its forum.
Some games, like Gimmick! use an 8k region at C000-DFFF dedicated to samples. It has two 8k banks, I believe, and whenever a sample is played the correct bank for that sample gets swapped in.
Some games, like Gimmick! use an 8k region at C000-DFFF dedicated to samples. It has two 8k banks, I believe, and whenever a sample is played the correct bank for that sample gets swapped in.
Re: Why do DPCM samples have a ROM size limit?
NSF itself is theoretically limited to 1 MiB, but the NSF player on the PowerPak can use only 256 KiB. The limit of total sample size in an NES ROM using MMC3, FME-7, etc. is limited by the number of PRG ROM address output pins on the mapper.
-
- Posts: 214
- Joined: Sun Apr 01, 2007 2:10 pm
Re: Why do DPCM samples have a ROM size limit?
I believe it's related to this bugrainwarrior wrote:If a Famitracker export fails, please report the bug on its forum.
http://famitracker.com/forum/posts.php?id=4396
Here to at least get an idea of how the NES works. I mean I know alot of the basic things, but this place'll help me grasp more how NES functions.
Major respect to NES developers.
Re: Why do DPCM samples have a ROM size limit?
MMC3 can bankswitch the second-last 8k, so you can have unlimited samples (limited only by total ROM size).
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
-
- Posts: 214
- Joined: Sun Apr 01, 2007 2:10 pm
Re: Why do DPCM samples have a ROM size limit?
Is that why some of the samples are missing on PocketNES on SMB3 (ex: samples in world 2 theme)? I thought it was because it might have been using raw PCM but it was a Delta PCM.Dwedit wrote:MMC3 can bankswitch the second-last 8k, so you can have unlimited samples (limited only by total ROM size).
Here to at least get an idea of how the NES works. I mean I know alot of the basic things, but this place'll help me grasp more how NES functions.
Major respect to NES developers.
Re: Why do DPCM samples have a ROM size limit?
That would be a bug in Pocketnes, thanks for the report.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
-
- Posts: 214
- Joined: Sun Apr 01, 2007 2:10 pm
Re: Why do DPCM samples have a ROM size limit?
lolDwedit wrote:That would be a bug in Pocketnes, thanks for the report.
It's been there for the longest time, really. It does it with the last samples of world 1 too, but I think it's the same samples used in the desert theme anyways.
Here to at least get an idea of how the NES works. I mean I know alot of the basic things, but this place'll help me grasp more how NES functions.
Major respect to NES developers.
Re: Why do DPCM samples have a ROM size limit?
11 lines of code changed and the bug is fixed now. It was calculating the sample's address too early, now it doesn't look up the address until it actually starts fetching samples.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!