It is currently Fri Jan 18, 2019 8:49 pm

All times are UTC - 7 hours



Forum rules





Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: PPU dual VRAM addressing
PostPosted: Wed Jan 02, 2019 9:14 am 
Offline

Joined: Tue Jan 01, 2019 6:54 am
Posts: 2
In the last few days I've been reading up on the SNES hardware (long way to go) and wondered if someone could clear up a question about the PPU VRAM. The schematic shows two 32k 8bit modules each with their own address bus. Does the PPU use them as a combined 32k 16bit or does it make use of the unique address bus to access each with different addresses?

I'm assuming the latter and after a bit of a search I noticed srg320's fpga implementation of the SNES. Line 280+ shows the VRAM treated as a single 32k 16bit ram IF the address for each ram module is the same (low byte in one module and high byte in the other). However, it has a special case for when the VRAM A & B addresses differ and appears to use the previously read value for VRAMB. Which suggests there are times the PPU treats the VRAM as 32k 16bit, but then this other case where it does not.

Anyone familiar with the PPU able to clear up in what cases the two ram modules would be accessed with differing addresses and why in such a case srg320's code returns a previously read temporary value for the B ram data? Or ideally, point me to any resource that covers this part of the PPU?


Top
 Profile  
 
PostPosted: Wed Jan 02, 2019 9:47 am 
Offline
User avatar

Joined: Fri May 08, 2015 7:17 pm
Posts: 2390
Location: DIGDUG
It works as 16 bits per address, 32k of addresses.

Though, if you look at it in a emulator/debugger, it looks like 64k of single bytes.

_________________
nesdoug.com -- blog/tutorial on programming for the NES


Top
 Profile  
 
PostPosted: Wed Jan 02, 2019 10:56 am 
Offline

Joined: Fri Feb 24, 2012 12:09 pm
Posts: 767
Normally, it's just 16bit data with same address for both 8bit chips.
The special case is Mode 7, where it's reading a 8bit BgMap entry and 8bit PixelColor, each from different addresses.
In fullsnes, the info is hiding in this chapter: https://problemkaputt.de/fullsnes.htm#s ... memoryvram


Top
 Profile  
 
PostPosted: Wed Jan 02, 2019 11:13 am 
Offline

Joined: Tue Jan 01, 2019 6:54 am
Posts: 2
Thanks for the response and link. I'll get this going without mode 7 support initially and treat it as 32k 16bit VRAM.

Will have to revisit this once I've dug into the PPU and have a better understanding of what mode7 is doing addressing wise to see if I can manage to fit it into the currently limited memory bandwidth.


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

All times are UTC - 7 hours


Who is online

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