It is currently Mon Dec 17, 2018 5:50 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 7 posts ] 
Author Message
PostPosted: Sat Oct 06, 2018 2:38 am 
Offline

Joined: Sat May 26, 2018 6:14 am
Posts: 57
Location: Italy
Hello to everyone!
Another noob question about Nes Dev. I'm writing the frames for my animations on a .chr file so I need to know what's the max size of .chr to put my graphics into. So what's the size limit? What's the best way to put the entire graphics of the game into a chr ad read it?

Thanks! :)


Top
 Profile  
 
PostPosted: Sat Oct 06, 2018 2:45 am 
Offline
User avatar

Joined: Wed Apr 02, 2008 2:09 pm
Posts: 1254
The size limit depends on the mapper. If you're using NROM, you get exactly 512 8x8 tiles for the whole game. (8KB.)

On MMC3, you can use 256 KB of CHR. This is 16384 total tiles. There are other mappers with different limitations.

But regardless of how many tiles you have total, the NES can only see 512 at once. 256 of which are usually allocated for sprites. So if all your sprite animations take up more than 256 tiles, you need to write some way to manage them all.

_________________
https://kasumi.itch.io/indivisible


Top
 Profile  
 
PostPosted: Sat Oct 06, 2018 3:00 am 
Offline

Joined: Sat May 26, 2018 6:14 am
Posts: 57
Location: Italy
So I've to "unload" and "load" 512 tiles at time?


Top
 Profile  
 
PostPosted: Sat Oct 06, 2018 3:12 am 
Offline

Joined: Tue Oct 06, 2015 10:16 am
Posts: 856
Probably 256, as 512 might make for very complicated programming side.


Top
 Profile  
 
PostPosted: Sat Oct 06, 2018 3:13 am 
Offline

Joined: Sat May 26, 2018 6:14 am
Posts: 57
Location: Italy
I see, thanks! :) Maybe I will try to put everything on 40kb game :P .


Top
 Profile  
 
PostPosted: Sat Oct 06, 2018 5:13 am 
Offline
User avatar

Joined: Sat Feb 12, 2005 9:43 pm
Posts: 11013
Location: Rio de Janeiro - Brazil
kikutano wrote:
So I've to "unload" and "load" 512 tiles at time?

It really depends on the mapper. CNROM, one of the simplest mappers out there, allows you to have 4 8KB pages in total, and you can only swap all 512 tiles at once.

On the other extreme there are mappers like the MMC3, which divides the pattern tables into slots of 1 and 2KB, so you can swap smaller chunks at a time.

There's yet another option for managing graphics, which's CHR-RAM. Using RAM for your tiles means the cartridge doesn't have a separate chip where CHR data is stored, instead it has a RAM chip. The CHR data is then stored in the PRG chip, in whatever format the programmer wants, even compressed, and has to be manually copied to the CHR-RAM chip at run time. In this case, you have total freedom to replace tiles as you wish, but unlike with CHR-ROM, the switch isn't instantaneous, each byte has to be explicitly transferred by the CPU, consuming processing time.


Top
 Profile  
 
PostPosted: Mon Oct 08, 2018 6:53 am 
Offline
User avatar

Joined: Thu Sep 15, 2016 6:29 am
Posts: 834
Location: Denmark (PAL)
If you're planning on making graphics for a game, you should get your restrictions from whoever is programming it.
One thing is the innate limitations of the console as we can tell you about. But it really depends on the game design and how the engine is built. A lot of "business logic" stuff matters, like how palettes are distributed, which sprites are reserved for stuff like HUD/bullet/powerup/etc purposes, and how the game intends to dynamically load in new sprites/object types.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: Pokun and 3 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