It is currently Sat Oct 21, 2017 7:12 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 18 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Sun Jun 02, 2013 10:08 am 
Offline
User avatar

Joined: Sun Apr 01, 2007 2:10 pm
Posts: 215
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".

_________________
Image
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.


Top
 Profile  
 
PostPosted: Sun Jun 02, 2013 10:14 am 
Offline

Joined: Sat Jan 23, 2010 11:41 pm
Posts: 1161
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.


Top
 Profile  
 
PostPosted: Sun Jun 02, 2013 10:47 am 
Offline
User avatar

Joined: Sun Apr 01, 2007 2:10 pm
Posts: 215
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.


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.

_________________
Image
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.


Top
 Profile  
 
PostPosted: Sun Jun 02, 2013 10:49 am 
Offline
User avatar

Joined: Mon Jan 03, 2005 10:36 am
Posts: 2963
Location: Tampere, Finland
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.

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.

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: kkfos.aspekt.fi


Top
 Profile  
 
PostPosted: Sun Jun 02, 2013 11:04 am 
Offline

Joined: Sat Jan 23, 2010 11:41 pm
Posts: 1161
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.


Top
 Profile  
 
PostPosted: Sun Jun 02, 2013 11:08 am 
Offline
User avatar

Joined: Sun Apr 01, 2007 2:10 pm
Posts: 215
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.


This. I'm talking about all the data, not just a single sample.

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.

_________________
Image
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.


Top
 Profile  
 
PostPosted: Sun Jun 02, 2013 11:14 am 
Offline
User avatar

Joined: Mon Jan 03, 2005 10:36 am
Posts: 2963
Location: Tampere, Finland
CKY-2K/Clay Man wrote:
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.


This. I'm talking about all the data, not just a single sample.

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!

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: kkfos.aspekt.fi


Top
 Profile  
 
PostPosted: Sun Jun 02, 2013 11:49 am 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 5728
Location: Canada
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.


Top
 Profile  
 
PostPosted: Sun Jun 02, 2013 12:59 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19113
Location: NE Indiana, USA (NTSC)
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.


Top
 Profile  
 
PostPosted: Sun Jun 02, 2013 1:35 pm 
Offline
User avatar

Joined: Sun Apr 01, 2007 2:10 pm
Posts: 215
rainwarrior wrote:
If a Famitracker export fails, please report the bug on its forum.


I believe it's related to this bug
http://famitracker.com/forum/posts.php?id=4396

_________________
Image
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.


Top
 Profile  
 
PostPosted: Tue Jun 04, 2013 1:33 pm 
Offline
User avatar

Joined: Fri Nov 19, 2004 7:35 pm
Posts: 3943
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!


Top
 Profile  
 
PostPosted: Fri Jun 07, 2013 2:07 pm 
Offline
User avatar

Joined: Sun Apr 01, 2007 2:10 pm
Posts: 215
Dwedit wrote:
MMC3 can bankswitch the second-last 8k, so you can have unlimited samples (limited only by total ROM size).

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.

_________________
Image
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.


Top
 Profile  
 
PostPosted: Sat Jun 08, 2013 1:19 pm 
Offline
User avatar

Joined: Fri Nov 19, 2004 7:35 pm
Posts: 3943
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!


Top
 Profile  
 
PostPosted: Sat Jun 08, 2013 5:40 pm 
Offline
User avatar

Joined: Sun Apr 01, 2007 2:10 pm
Posts: 215
Dwedit wrote:
That would be a bug in Pocketnes, thanks for the report.

lol
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.

_________________
Image
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.


Top
 Profile  
 
PostPosted: Sun Jun 09, 2013 8:13 am 
Offline
User avatar

Joined: Fri Nov 19, 2004 7:35 pm
Posts: 3943
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!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 18 posts ]  Go to page 1, 2  Next

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group