Background Scrolling Data Info
TODO: Info
- Verify info for BG start position nybble.nybble Would— also0x2 and 0x3 in particular.
- How specifically do "Disable vertical scrolling" and "Automatic horizontal scrolling" work? What all do bytes 13 and 16 do?
- Might be nice to knowlist which BG speeds and such are all used.
Foregrounds and backgrounds scroll differently in many levels — sometimes they have a fast speed ratio and sometimes they can be completely static. This can be adjusted by hex editing your level.
BackgroundToponlybackground --> Change block3 only.3.ForegroundBottomonlybackground --> Change block5 only.Both--> Change both blocks 3 and5.
- Byte 11: Control BG horizontal scrolling.
- Byte 13: Control BG vertical scrolling.
And for each byte:
- First Nybble:
ControlControls where the background startswhenrelative to theplayerviewentersandthehowviews.it loops. This seemingly does nothing for horizontal looping or start position. - Second Nybble:
ControlControls scroll speed relative to stage foreground speed.
(Image source: MarioSunshine)
Start position and loop data
- 0x0: Starts from bottom of view offset by 32px; loops entire background.
- 0x1: Starts from top of view offset by 32px; loops entire background.
- 0x2: Duplicate of 0x0?
- 0x3: Duplicate of 0x1?
- 0x4: Starts from bottom of view offset by 32px; loops top half of background.
- 0x5: Starts from top of view offset by 32px; loops bottom half of background.
Any value higher than 0x5 freezes the game.
Scroll speed data
- 0x0: Same as FG speed. Used in w2-3 (sewer level) for example.
- 0x1: 50% FG speed.
- 0x2: 25% FG speed. Common for top backgrounds.
- 0x3: 12.5% FG speed. Common for bottom backgrounds.
- 0x4: 120% FG speed. Unused.
- 0x5: 75% FG speed.
- 0x6: 6.25% FG speed.
- 0x7: 9.375% FG speed.
- 0x8: 20.3125% FG speed.
- 0x9: Same as FG speed.
- 0xA: Same as FG speed.
- 0xB: Same as FG speed.
- 0xC: Same as FG speed.
- 0xD: 200% FG speed. Unused.
- 0xE: 400% FG speed. Unused.
- 0xF: 800% FG speed. Unused.
(Source: RoadrunnerWMC)
Disabling vertical scrolling
BackgroundToponlybackground --> Change both bytes 13 and 16 of block3 only.3.ForegroundBottomonlybackground --> Change both bytes 13 and 16 of block5 only.Both--> Change both bytes 13 and 16 of both blocks 3 and5.
- Byte 13:
entersset40.to 0x40. - Byte 16:
entersset10.to 0x10.
(Source: MeroMero)
Automatic horizontal scrolling
Works for both foregrounds and backgrounds.
It only works for backgrounds that already haveaparallax horizontalscrolling. animation, thisThis can be achieved by putting a value of 100x10 for byte 16 and it will animatescroll the whole background instead of partiallyonly animatingsome of it.
(Note: if byte 13 value is somewhere between400x40 and 4F,0x4F, this effect will be overridden and instead the vertical scrolling will be disabled).
It only works for backgrounds that already have
(Note: if byte 13 value is somewhere between
(Source: MeroMero)