It is currently Fri Aug 18, 2017 5:01 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: Newb CHR RAM issue
PostPosted: Sun Jun 11, 2017 9:01 am 
Offline

Joined: Sun Jun 11, 2017 8:39 am
Posts: 4
Hello folks. I have been working with a TNROM test cart and am trying to put a simple program on it that uses CHR RAM. Everything seems to be set up correctly and it works perfectly fine in FCEUX. However, when I write it to the test cart, the tile graphics are all jumbled and wrong, but everything else works as expected (bank switching, nametables, I/O, etc). Also, I have tested the cart by writing a TNROM game to it and the board works fine.

I'm forced to assume I am doing something wrong but have failed to discover what that could be. Possibly something special for TNROM?

Before going into more detail, I was hoping that some of you out there might have run into a similar issue. It appears like the tiles are being written to (or read from) the wrong addresses. It's driving me nuts.

Anyway, I have been digging through posts and testing different things for days and everything I have done seems to be correct. It's probably something obvious. I'm a newb at this, after all.

Any advice out there?


Top
 Profile  
 
 Post subject: Re: Newb CHR RAM issue
PostPosted: Sun Jun 11, 2017 10:17 am 
Offline
User avatar

Joined: Tue Jun 24, 2008 8:38 pm
Posts: 1510
Location: Fukuoka, Japan
MMC3 chr-ram boards needs the chr-ram bank to be set since the value at power-on is unknown.

I had the same issue in hardware with my first mmc3 char-ram cart. The emulators sets the bank to 0 by default but this is not the case on the real thing.


Top
 Profile  
 
 Post subject: Re: Newb CHR RAM issue
PostPosted: Sun Jun 11, 2017 10:19 am 
Offline

Joined: Sun Jun 11, 2017 8:39 am
Posts: 4
Banshaku wrote:
MMC3 chr-ram boards needs the chr-ram bank to be set since the value at power-on is unknown.

I had the same issue in hardware with my first mmc3 char-ram cart. The emulators sets the bank to 0 by default but this is not the case on the real thing.


You rock! I'll give it a try.

Thanks!


Top
 Profile  
 
 Post subject: Re: Newb CHR RAM issue
PostPosted: Sun Jun 11, 2017 10:56 am 
Offline

Joined: Sun Jun 11, 2017 8:39 am
Posts: 4
Banshaku wrote:
MMC3 chr-ram boards needs the chr-ram bank to be set since the value at power-on is unknown.

I had the same issue in hardware with my first mmc3 char-ram cart. The emulators sets the bank to 0 by default but this is not the case on the real thing.


Well, I thought that this would be enough for me to look up how to do this myself, but it remains unclear.

How exactly do I set the chr ram bank to 0? It's not clear to me what register would have control over that.


Top
 Profile  
 
 Post subject: Re: Newb CHR RAM issue
PostPosted: Sun Jun 11, 2017 11:06 am 
Offline

Joined: Mon Nov 10, 2008 3:09 pm
Posts: 413
robroymcc wrote:
Banshaku wrote:
MMC3 chr-ram boards needs the chr-ram bank to be set since the value at power-on is unknown.

I had the same issue in hardware with my first mmc3 char-ram cart. The emulators sets the bank to 0 by default but this is not the case on the real thing.


Well, I thought that this would be enough for me to look up how to do this myself, but it remains unclear.

How exactly do I set the chr ram bank to 0? It's not clear to me what register would have control over that.


The same registers as if you were using MMC3 with CHR ROM. Either set the two 2KB CHR banks to 0 and 2 and the four 1K banks to 4, 5, 6, 7, or set the 1K banks to 0, 1, 2 and 3 and the 2K banks to 4 and 6. Basically, you need to set up the banks so that none of them are mirrors or overlapping and you're actually using the entire 8KB of CHR RAM.


Top
 Profile  
 
 Post subject: Re: Newb CHR RAM issue
PostPosted: Sun Jun 11, 2017 1:36 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 18798
Location: NE Indiana, USA (NTSC)
I posted MMC3 CHR RAM window init code in another topic.


Top
 Profile  
 
 Post subject: Re: Newb CHR RAM issue
PostPosted: Sun Jun 11, 2017 2:08 pm 
Offline

Joined: Sun Jun 11, 2017 8:39 am
Posts: 4
AWJ wrote:
robroymcc wrote:
Banshaku wrote:
MMC3 chr-ram boards needs the chr-ram bank to be set since the value at power-on is unknown.

I had the same issue in hardware with my first mmc3 char-ram cart. The emulators sets the bank to 0 by default but this is not the case on the real thing.


Well, I thought that this would be enough for me to look up how to do this myself, but it remains unclear.

How exactly do I set the chr ram bank to 0? It's not clear to me what register would have control over that.


The same registers as if you were using MMC3 with CHR ROM. Either set the two 2KB CHR banks to 0 and 2 and the four 1K banks to 4, 5, 6, 7, or set the 1K banks to 0, 1, 2 and 3 and the 2K banks to 4 and 6. Basically, you need to set up the banks so that none of them are mirrors or overlapping and you're actually using the entire 8KB of CHR RAM.


You folks kick butt. That did the trick. Thanks a lot.


Top
 Profile  
 
 Post subject: Re: Newb CHR RAM issue
PostPosted: Mon Jun 12, 2017 9:22 am 
Offline
User avatar

Joined: Tue Jun 24, 2008 8:38 pm
Posts: 1510
Location: Fukuoka, Japan
Good to hear that you made it work!


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

All times are UTC - 7 hours


Who is online

Users browsing this forum: Bing [Bot], lazigamer and 8 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