(Link to AcmlmWiki) Offline: thank ||bass
Register | Login
Views: 13,040,846
Main | Memberlist | Active users | Calendar | Chat | Online users
Ranks | FAQ | ACS | Stats | Color Chart | Search | Photo album
05-03-24 03:09 AM
0 users currently in ROM Hacking.
Acmlm's Board - I3 Archive - ROM Hacking - How are layers drawn on SNES? New poll | |
Add to favorites | Next newer thread | Next older thread
User Post
HyperHacker

Star Mario
Finally being paid to code in VB! If only I still enjoyed that. <_<
Wii #7182 6487 4198 1828


 





Since: 11-18-05
From: Canada, w00t!
My computer's specs, if anyone gives a damn.
STOP TRUNCATING THIS >8^(

Last post: 6283 days
Last view: 6283 days
Posted on 03-26-06 03:44 PM Link | Quote
Say you have 3 background layers on a SNES game; layer 1 is lowest priority and 3 is highest for simplicity's sake. When they're drawn, does it draw all of layer 1, then all of 2, then 3, or does it just like draw them all at once? And if they're separate, is there any way to tell which is currently being drawn?
creaothceann

Red Goomba








Since: 11-22-05

Last post: 6478 days
Last view: 6478 days
Posted on 03-27-06 07:18 AM Link | Quote
They are all drawn "at once", so to speak. The actual outcome is the same either way.

The SNES has certain registers that tell it how to draw the current scanline and where to find the required data. An important register is register $2105, the lowest 3 bits determine the BG mode, and hence the drawing order.

To quote anomie's register doc:


In Mode 1, you have 2 BGs of 16 colors and 1 BG of 4 colors. [...]
The background priority varies depending on the setting of bit 3 of $2105.

The priority is (from 'front' to 'back'):
- BG3 tiles with priority 1 if bit 3 of $2105 is set
- Sprites with priority 3
- BG1 tiles with priority 1
- BG2 tiles with priority 1
- Sprites with priority 2
- BG1 tiles with priority 0
- BG2 tiles with priority 0
- Sprites with priority 1
- BG3 tiles with priority 1 if bit 3 of $2105 is clear
- Sprites with priority 0
- BG3 tiles with priority 0

You can't access most PPU registers while the PPUs draw the screen (ie. while the electron beam of the TV is active and draws a line).


(edited by creaothceann on 03-27-06 05:23 AM)
Add to favorites | Next newer thread | Next older thread
Acmlm's Board - I3 Archive - ROM Hacking - How are layers drawn on SNES? |


ABII

Acmlmboard 1.92.999, 9/17/2006
©2000-2006 Acmlm, Emuz, Blades, Xkeeper

Page rendered in 0.013 seconds; used 355.05 kB (max 416.52 kB)