Register | Login
Views: 19364387
Main | Memberlist | Active users | ACS | Commons | Calendar | Online users
Ranks | FAQ | Color Chart | Photo album | IRC Chat
11-02-05 12:59 PM
1 user currently in Super Mario World hacking: labmaster | 3 guests
Acmlm's Board - I2 Archive - Super Mario World hacking - Scrolling problems from hell. | |
Add to favorites | "RSS" Feed | Next newer thread | Next older thread
User Post
HyperLamer
<||bass> and this was the soloution i thought of that was guarinteed to piss off the greatest amount of people

Sesshomaru
Tamaranian

Level: 118

Posts: 6527/8210
EXP: 18171887
For next: 211027

Since: 03-15-04
From: Canada, w00t!
LOL FAD

Since last post: 2 hours
Last activity: 2 hours
Posted on 08-24-05 06:39 AM Link | Quote
I've been trying to make a simple maze out of movement/boost blocks in a vertical level, but it's not working so well. I did have it working great, which took forever, then accidentally deleted it. The problem was that if the screen had scrolled up to a certain point when Mario touched the blocks, it wouldn't follow him up. (Why it doesn't, God Nintendo only knows. POS game engine. ) So I figured instead of spending all night repositioning the blocks AGAIN so that the screen would be forced to scroll up, I'd just edit them to scroll it manually, like so:

08 .. .. ..|PHP
C2 20 .. ..|REP #$20 ;Go 16-bit
C6 96 .. ..|DEC $96 ;MarioYPos -= 6
C6 96 .. ..|DEC $96 ;[repeat this 6 times]
C6 28 .. ..|DEC $28 ;L1YScrollGFX -= 6
C6 28 .. ..|DEC $28 ;[repeat this 6 times]
CE 64 14 ..|DEC $7E1464 ;L1YScrollPhys -= 6
CE 64 14 ..|DEC $7E1464 ;[repeat this 6 times]
28 .. .. ..|PLP
60 .. .. ..|RTS


This does get the screen to follow Mario, and at lower speeds (though they're too slow; this is meant to be really fast) it seems to work fine. Moving Mario 6 pixels per frame, though, screws up the level layout! Parts of lower screens get drawn on higher ones, though the collision data isn't affected, which seems to indicate that the graphical screen position ($28) isn't getting updated right. The question being, why the hex not?

Actual hex code:
08 C2 20 C6 96 C6 96 C6 96 C6 96 C6 96 C6 96 C6 28 C6 28 C6 28 C6 28 C6 28 C6 28 CE 64 14 CE 64 14 CE 64 14 CE 64 14 CE 64 14 CE 64 14 28 60

(And yes, I intend to replace those DECs with subtractions at some point. )
Sukasa

Boomboom
Error 349857348734534: The system experienced an error.
Level: 57

Posts: 1727/1981
EXP: 1446921
For next: 39007

Since: 02-06-05
From: *Shrug*

Since last post: 6 days
Last activity: 1 day
Posted on 08-24-05 06:46 AM Link | Quote
hmmm... try loading the scroll location, then SBC #$06 and store the result to both the RAM scroll reg and the corresponding PPU register byte($21xx), as well as the gameplay RAM byte. That's my only idea.
HyperLamer
<||bass> and this was the soloution i thought of that was guarinteed to piss off the greatest amount of people

Sesshomaru
Tamaranian

Level: 118

Posts: 6533/8210
EXP: 18171887
For next: 211027

Since: 03-15-04
From: Canada, w00t!
LOL FAD

Since last post: 2 hours
Last activity: 2 hours
Posted on 08-24-05 07:23 AM Link | Quote
Well I have no idea what PPU register you're referring to, but I tried writing the same thing to both scroll addresses:

08 .. .. ..|PHP
C2 20 .. ..|REP #$20 ;Go 16-bit
A5 96 .. ..|LDA $96
E9 06 .. ..|SBC #$06 ;MarioYPos -= 6
85 96 .. ..|STA $96
AD 64 14 ..|LDA $1464
E9 06 .. ..|SBC #$06 ;L1YScrollPhys -= 6
85 28 .. ..|STA $28 ;L1YScrollGFX = L1YScrollPhys
8D 64 14 ..|STA $1464
28 .. .. ..|PLP
60 .. .. ..|RTS


Ah, I just LOVE it when perfectly valid code crashes.
Sukasa

Boomboom
Error 349857348734534: The system experienced an error.
Level: 57

Posts: 1728/1981
EXP: 1446921
For next: 39007

Since: 02-06-05
From: *Shrug*

Since last post: 6 days
Last activity: 1 day
Posted on 08-24-05 07:46 AM Link | Quote
You'd want $210E for vertical scroll, layer 1. My only suggestion would be to find your code with a hex editor, convert it to SNES LoROM format, subtract the 0x200 byte header, and place it as an execute breakpoint, and see what goes wrong. BTW, so do I. as another idea, insert another block like those regular ones, but act's like tile 100. random upwards scrolling (hopefully). try using 24-bit addresses for your memory locations, perhaps the direct page is off $7E or something. (replace LDA $96 with LDA $7E0096, etc...)
HyperLamer
<||bass> and this was the soloution i thought of that was guarinteed to piss off the greatest amount of people

Sesshomaru
Tamaranian

Level: 118

Posts: 6534/8210
EXP: 18171887
For next: 211027

Since: 03-15-04
From: Canada, w00t!
LOL FAD

Since last post: 2 hours
Last activity: 2 hours
Posted on 08-24-05 08:39 AM Link | Quote
I based it on the original block which used direct page just fine. I'll try the breakpoint and tile-100 idea later. I don't think changing the PPU regs manually will do much good though. For one, the game probably overwrites that anyway, and also, the actual image scrolls fine, it's just that the game isn't updating the screen properly.

[edit] Fixed the crashing; 16-bit subtractions are three bytes, not two. Still doesn't work though. Here's the first area of the level which uses them, which is also the beginning. (I cut off some at the right so as not to give things away, and yes, many of these graphics are temporary.)

The gold arrows are fast movement blocks; so far I've only modified the upward ones. The gold double arrows seen at the beginning and end are boosters (Jump Blocks); rather than moving Mario manually, they set his vertical speed way up. The green and gray On/Off Switches are actually blocks that are solid when the switch is on/off (it's an air lock ), those are just filler graphics until I get proper ones in. When Mario shoots out the left tube, to where the note blocks are, the game displays screen 19 and the lowest row of screen 18; above that it shows the highest row of screen 1B and upward. Other areas get corrupted similarly. The level functions properly, but the graphics are displayed wrong (though once you get past this section and jump up a few screens, they do correct themselves ).


(edited by HyperHacker on 08-24-05 01:25 AM)
Add to favorites | "RSS" Feed | Next newer thread | Next older thread
Acmlm's Board - I2 Archive - Super Mario World hacking - Scrolling problems from hell. | |


ABII


AcmlmBoard vl.ol (11-01-05)
© 2000-2005 Acmlm, Emuz, et al



Page rendered in 0.019 seconds.