It is currently Sun May 26, 2019 5:55 am

All times are UTC - 7 hours

Post new topic Reply to topic  [ 18 posts ]  Go to page Previous  1, 2
Author Message
PostPosted: Mon Apr 09, 2018 9:50 am 
User avatar

Joined: Sat Feb 12, 2005 9:43 pm
Posts: 11357
Location: Rio de Janeiro - Brazil
I don't know of any specific commercial games that do what I said, I was just listing possible uses of 8KB CHR-RAM bankswitching.

In my old Sonic engine I needed to have monitors and rings show up as both sprites and background, and they're animated, but 8x16 sprites fetching from the background side would've broken the scanline counter, so this was a good solution.

PostPosted: Mon Apr 09, 2018 10:16 am 
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 7467
Location: Canada
Bregalad wrote:
rainwarrior wrote:
Seems like a case of a feature they already had in the mapper (which was designed for 256k CHR-ROM) that they just decided to use because it was slightly convenient.

In which part of the game does sprites use tiles from the background or vice-versa ?

I thought it did this on the title screen and intro, but looking again the sprites used aren't common with any of the background tiles used at the same time.

However, the banking is constantly being used, and very often has banks in common between the two pages. I think that's why I had made that assumption.

Anyhow, I found a much better use for it while looking at it: when walking around and talking to people, it changes banking at a scanline split, so the field can use different background CHR than the text overlay.

With Mesen's debugger you can put the PPU space $0000-1FFF and CHR space $0000-1FFF in two different windows side by side, which is a good way to see at a glance how the banks are used.

I dunno what the logic is behind the specific banking patterns (a flat 8k mapping is never used, it's always some weird combination), but probably it was managed automatically be a tool anyway. I think there's probably a bunch of little things you could do this way. It's not like they had much incentive to stick to flat CHR-RAM banking.

PostPosted: Mon Apr 09, 2018 10:39 am 

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 21402
Location: NE Indiana, USA (NTSC)
The following layout for MMC3 TG/TNROM should make good use of 8 KiB CHR RAM and allow sharing tiles between background and sprites without interfering with its PA12-rise-triggered interval timer.

Set the C bit, which swaps $0000-$0FFF with $1000-$1FFF, and set the CHR windows to 0, 2, 4, 5, 6, 3.

Window 0 ($1000-$17FF): Banks 0 and 1 (sprite-only things)
Window 1 ($1800-$1FFF): Banks 2 (sprite-only things) and 3 (shared things)
Windows 2-4 ($0000-$0BFF): Banks 4-6 (background-only things)
Window 5 ($0C00-$0FFF): Bank 3 (shared things)
For text overlay, use a raster split to switch window 5 to a font or VWF canvas in bank 7.

Because $1C00-$1FFF and $0C00-$0FFF point to the same memory, spinning rings are practical.

Pin Eight | Twitter | GitHub | Patreon

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

All times are UTC - 7 hours

Who is online

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