Mode 2 Questions

Discussion of hardware and software development for Super NES and Super Famicom.

Moderator: Moderators

Forum rules
  • For making cartridges of your Super NES games, see Reproduction.
Post Reply
User avatar
Drew Sebastino
Formerly Espozo
Posts: 3496
Joined: Mon Sep 15, 2014 4:35 pm
Location: Richmond, Virginia

Mode 2 Questions

Post by Drew Sebastino »

I know that mode 2 has 2 background layers, both being 4 bits per pixel, but I do not completely understand what offset-per-tile means. From what I gather, it means that each 8x8 pixel background tile has it's own x and y value, being stored at the area specified by Register $2109. How is the data stored? Does the first byte contain BG1 tile 1 x values, the second byte contain BG1 tile 1 y values, the third byte contain BG2 tile 1 x values, and the forth byte contain BG2 tile 1 y values and so on? Also, if I am correct, both x values and y values can be changed at the same time. Couldn't the BGs be used almost exactly like sprites? This seems too good to be true...
tepples
Posts: 22345
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Mode 2 Questions

Post by tepples »

Essentially what it does is that one layer allows each 8x8 pixel segment to be offset by a displacement in slivers. (A "sliver" is 8 pixels across and 1 pixel down.) Because OPT can't change the fine scroll (low 3 bits of BGxHOFS), horizontal OPT isn't very useful as far as I can tell, but vertical OPT is used for the platforms in the "Touch Fuzzy Get Dizzy" level of Yoshi's Island, for shearing to produce faux rotation in the background of Star Fox, and for the playfields in Tetris Attack.
Sik
Posts: 1589
Joined: Thu Aug 12, 2010 3:43 am

Re: Mode 2 Questions

Post by Sik »

tepples wrote:Because OPT can't change the fine scroll (low 3 bits of BGxHOFS), horizontal OPT isn't very useful as far as I can tell
That seems very useful for repeating columns, on the other hand.
psycopathicteen
Posts: 3001
Joined: Wed May 19, 2010 6:12 pm

Re: Mode 2 Questions

Post by psycopathicteen »

There's not much documentation about it, but through trial and error I found out the offset data has to be in the second row of tiles on BG3, and each value has to be added to $2000.
Augustus Blackheart
Posts: 56
Joined: Sat Jul 26, 2014 9:50 am

Re: Mode 2 Questions

Post by Augustus Blackheart »

Here's the Anthrox mode 2 demo.
Attachments
happy.asm
ATX src
(26.43 KiB) Downloaded 105 times
happy.smc
ATX rom
(128 KiB) Downloaded 103 times
Post Reply