Sonic and Sega Retro Message Board: Sonic 2 Animated Pattern Mappings - Sonic and Sega Retro Message Board

Jump to content

Hey there, Guest!  (Log In · Register) Help
Page 1 of 1
    Locked
    Locked Forum

Sonic 2 Animated Pattern Mappings

#1 User is offline ExecByte 

Posted 27 June 2007 - 04:39 PM

  • Posts: 97
  • Joined: 10-May 06
  • Gender:Male
  • Location:Ohio
  • Project:Sonic: The Lost Worlds
  • Wiki edits:11
We know the format for animated patterns frames but I didn't see the format for the mappings anywhere but I think I figured it out.

XX XX YY YY AB BB AB BB AB BB AB BB .....

X: 16x16 block where these mappings start, multiplied by 8.
Y: Number of 8x8 tiles to read for these mappings. Starts from 0.
A: Palette line for 8x8 tile, multiplied by 2.
B: 8x8 tile to read. Multiply this value by 0x20 for the VRAM location to read from.

These 8x8 and 16x16 tiles are refered to as if they were part of the main level load block in memory. So, placing a 16x16 block that these mappings are applied to in a 128x128 block will put the animated pattern there.

#2 User is offline Rika Chou 

Posted 27 June 2007 - 04:55 PM

  • Adopt
  • Posts: 5186
  • Joined: 11-January 03
  • Gender:Not Telling
  • Location:CA US
  • Wiki edits:4
Mappings?

Just use the animated tiles in the level like any other art tiles. Special mappings aren't used or needed.

#3 User is offline ExecByte 

Posted 27 June 2007 - 07:19 PM

  • Posts: 97
  • Joined: 10-May 06
  • Gender:Male
  • Location:Ohio
  • Project:Sonic: The Lost Worlds
  • Wiki edits:11
I'm talking about the animated patterns that are loaded seperatly from the levels art. They use the uncompressed art. The glowing orbs in Hidden Palace, flipping blocks in Casino Night, pulsing balls in Emerald Hill, those types of things.

What I'm saying is I figured out how the format works for the "misc sprite mappings" at 0x40350. That's what they're called in Nemesis' guide anyway.

#4 User is offline Dr. Ivo 

Posted 30 June 2007 - 07:52 PM

  • Professional Reverse Engineer
  • Posts: 42
  • Joined: 04-February 04
  • Gender:Male
  • Location:Philadelphia, PA
Awesome find!

#5 User is offline ExecByte 

Posted 01 July 2007 - 05:58 PM

  • Posts: 97
  • Joined: 10-May 06
  • Gender:Male
  • Location:Ohio
  • Project:Sonic: The Lost Worlds
  • Wiki edits:11

View PostDr. Ivo, on Jun 30 2007, 04:52 PM, said:

Awesome find!


Thanks!

I've made some animated patterns for my hack, so I can confirm this is how it works.

Another thing you need to know if you're making animated patterns is that in order for them to work, you need to use dynamic pattern reloading. Yea, dynamic pattern reloading isn't an entirely separate thing. You should use the dynamic pattern reloading at 3FF2C so, you'd enter 024C in the offset index at 3FCE0 for which ever level you're using it.

In case, it wasn't clear, these mappings are 16x16 mappings. That's why each zone's 16x16 mappings have those blank blocks at the end. These are the mappings that go there in RAM.

Page 1 of 1
    Locked
    Locked Forum

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users