It is currently Wed Nov 22, 2017 8:53 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 10 posts ] 
Author Message
PostPosted: Sun Jul 30, 2017 1:49 pm 
Offline
User avatar

Joined: Wed Jun 21, 2017 1:51 pm
Posts: 19
So, I've got my Mapper #0 ROM showing up with 2 x 16k banks of PRG-ROM and 1 x 8kb bank of CHR-ROM inside Shiru's NES Space Checker, with the intention that I put all my level code into the second bank, whilst retaining the game code in bank #0, but I have no clue as to how bankswitching works on the NES.

I've used multiple 16kb banks on the gameboy with GBDK which kept the process fairly simple but can't figure out, or find, resources on how the NES would handle it all.

Do I need to write to a register somewhere to flip banks? Is the second bank just already present or is there something else at play?


Top
 Profile  
 
PostPosted: Sun Jul 30, 2017 1:53 pm 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 6448
Location: UK (temporarily)
Mapper 0 ('NROM') is "no" bankswitching.

The first 16 KiB of the provided PRG is mapped from $8000-$BFFF. The last 16KiB of the provided PRG is mapped from $C000-$FFFF. These locations cannot be changed at runtime.

This is basically identical to a 32KiB gameboy game.


Top
 Profile  
 
PostPosted: Sun Jul 30, 2017 2:02 pm 
Offline
User avatar

Joined: Wed Jun 21, 2017 1:51 pm
Posts: 19
Ah, so I don't need to set it out as 2 16kb banks then? just one solid 32kb bank.


Top
 Profile  
 
PostPosted: Sun Jul 30, 2017 2:06 pm 
Offline
User avatar

Joined: Mon Jan 03, 2005 10:36 am
Posts: 2981
Location: Tampere, Finland
rychan wrote:
Ah, so I don't need to set it out as 2 16kb banks then? just one solid 32kb bank.

Right. The reason NES Space Checker displays everything as 16 KB banks is that the iNES ROM file format header stores the ROM size as a multiple of 16 KB.

_________________
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: kkfos.aspekt.fi


Top
 Profile  
 
PostPosted: Sun Jul 30, 2017 3:10 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19251
Location: NE Indiana, USA (NTSC)
That and DMC playback addresses start at $C000.


Top
 Profile  
 
PostPosted: Mon Jul 31, 2017 6:12 am 
Offline
User avatar

Joined: Wed Jun 21, 2017 1:51 pm
Posts: 19
Ahh, that's cool tepples, so I can just overflow the data without the unnecessary extra bank making. I'll expereiment with this tonight!


Top
 Profile  
 
PostPosted: Mon Jul 31, 2017 7:02 am 
Offline
User avatar

Joined: Mon Jan 03, 2005 10:36 am
Posts: 2981
Location: Tampere, Finland
Actually, in NESASM specifically you're forced to split everything into 8 KB banks, even though really it's a continuous 32 KB bank with no bankswitching needed. It's a limitation of the assembler.

_________________
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: kkfos.aspekt.fi


Top
 Profile  
 
PostPosted: Mon Jul 31, 2017 4:24 pm 
Offline
User avatar

Joined: Wed Jun 21, 2017 1:51 pm
Posts: 19
Is there anyway to get around this limitation? I've made a bunch of attempts tonight to no avail, aside from grey screens of course.

Should I try another assembler perhaps?


Top
 Profile  
 
PostPosted: Mon Jul 31, 2017 5:16 pm 
Offline
User avatar

Joined: Mon Feb 07, 2011 12:46 pm
Posts: 932
rychan wrote:
Is there anyway to get around this limitation? I've made a bunch of attempts tonight to no avail, aside from grey screens of course.
Not in plain NESASM, although in Unofficial-MagicKit you can predefine the consecutive 8K banks with the same name, and then when you go from one bank to the next one will automatically do. Bank numbers in the assembler will still be 8K though.

Other assemblers will also avoid this limitation.

_________________
.


Top
 Profile  
 
PostPosted: Fri Aug 04, 2017 1:05 am 
Offline
User avatar

Joined: Wed Jun 21, 2017 1:51 pm
Posts: 19
Cool, I think I've found a way around it last night / this morning, whatever 1am really classes itself as anyway :) Thanks again for all your kind help, it's a fun struggle this ASM coding :)


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

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 4 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