| |||
Views: 88,481,088 |
Main | FAQ | Uploader | IRC chat | Radio | Memberlist | Active users | Latest posts | Calendar | Stats | Online users | Search | 04-25-24 09:34 AM |
|
Guest: Register | Login |
0 users currently in ROM Hacking | 3 guests |
Main - ROM Hacking - Need help with a practice hack - SMB Rain | New thread | New reply |
RetroRain |
| ||
Fuzz Ball Level: 66 Posts: 43/994 EXP: 2437976 Next: 23875 Since: 09-30-07 Last post: 1934 days Last view: 956 days |
Dude, you are the best! Really man, thanks a lot!
____________________ My YouTube Channel |
frantik |
| ||
Red Koopa Level: 28 Posts: 54/139 EXP: 127394 Next: 3944 Since: 10-09-07 Last post: 4488 days Last view: 4481 days |
w00t |
RetroRain |
| ||
Fuzz Ball Level: 66 Posts: 44/994 EXP: 2437976 Next: 23875 Since: 09-30-07 Last post: 1934 days Last view: 956 days |
If I wanted to do 8-tile animation, or 16-tile animation, would I have to make just a few minor adjustments to the code? ____________________ My YouTube Channel |
frantik |
| ||
Red Koopa Level: 28 Posts: 55/139 EXP: 127394 Next: 3944 Since: 10-09-07 Last post: 4488 days Last view: 4481 days |
i'm pretty sure to get 8 frames you'd just need to change
AND #$03 ; mask out low 2 bits (produces 0,1,2,3,0,1,2,3,0,1,2,3,... repeating pattern) to AND #$07 For 16 you might not need to AND anything. i'm not 100% sure. also if you used the method with the array of data you will need to add the extra values in |
smkdan |
| ||
Ninji Level: 36 Posts: 108/238 EXP: 288624 Next: 19486 Since: 05-26-07 Last post: 4061 days Last view: 4010 days |
That method works easily for any power of two.
AND #$01: 0-1 AND #$03: 0-3 AND #$07: 0-7 AND #$0F: 0-15 AND #$1F: 0-31 AND #$3F: 0-63 AND #$7F: 0-127 |
RetroRain |
| ||
Fuzz Ball Level: 66 Posts: 46/994 EXP: 2437976 Next: 23875 Since: 09-30-07 Last post: 1934 days Last view: 956 days |
I added 16-frame tile animated rain to SMB3. There's just one thing. Is there anything I can do to make the rain come down faster?
DahrkDaiz's SMB3 Notes: $8E35:AC 1A 07 LDY $071A ; This loads the current bank from lower left corner of the pattern table $8E38:C0 6A CPY #$6A ; 6A is the bank for the Airship, which doesn't have animated bg tiles $8E3A:F0 21 BEQ $8E5D ; thus skip the animating routine $8E3C:A5 15 LDA $15 ; This loads the constant timer $8E3E:29 03 AND #$03 ; used for battleship animated tiles $8E40: D0 1B BNE $8E5D ; but skips it on xxxx xx00 since there's only 3 frames of animation $8E42:C8 INY $8E43:C8 INY $8E44:C0 76 CPY #$76 ; 74 is the last bank for the battle ship animated tile sequence (70, 72, 74) $8E46: D0 02 BNE $8E4A ; a table isn't used here, thus, Y (from 71A) is increased twice $8E48:A0 70 LDY #$70 ; if it reaches 76, loop back to the first animation sequence (70) $8E4A:8C 1A 07 STY $071A ; and store it into the gfx bank $8E4D: D0 0E BNE $8E5D $8E4F:A5 15 LDA $15 ; this loads the constant timer and indexes it for the global $8E51:29 18 AND #$18 ; animated tiles (coins, ? blocks, munchers, etc) $8E53:4A LSR $8E54:4A LSR $8E55:4A LSR $8E56:AA TAX $8E57: BD FC 83 LDA $83FC,X ; Loads a bank from the animation sequence (60, 62, 64, 66) $8E5A:8D 1A 07 STA $071A ; and finally stores it into the ram for the lower left gfx bank With what I highlighted in bold, I changed the location it gets the tiles from. I put 16 bytes (16 tiles) in some free space, and changed other parts of the code above. ____________________ My YouTube Channel |
boingboingsplat |
| ||||
Giant Koopa [PREFSTRING:wonderful bounciness] Level: 74 Posts: 279/1292 EXP: 3633405 Next: 20139 Since: 07-23-07 From: Michicola Last post: 4841 days Last view: 4803 days |
|
RetroRain |
| ||
Fuzz Ball Level: 66 Posts: 47/994 EXP: 2437976 Next: 23875 Since: 09-30-07 Last post: 1934 days Last view: 956 days |
I noticed that when I mess with the LSRs, by NOPing them out, it puts frames in there that don't belong, obviously, but the rain comes down a lot quicker when its their turn to show up.
EDIT - Nevermind. I figured it out. It CAN be done by tweaking the value at AND, and NOPing out 2 LSRs. The ? blocks and coins are spinning super-fast, because I didn't make animations for them. Its the same original 4-frames being done over a few times. ____________________ My YouTube Channel |
frantik |
| ||
Red Koopa Level: 28 Posts: 56/139 EXP: 127394 Next: 3944 Since: 10-09-07 Last post: 4488 days Last view: 4481 days |
yeah but now the rest of your animations are way too fast :eek: |
RetroRain |
| ||
Fuzz Ball Level: 66 Posts: 49/994 EXP: 2437976 Next: 23875 Since: 09-30-07 Last post: 1934 days Last view: 956 days |
Yeah but that can easily be fixed. Since I plan on re-drawing the rain anyway (it looks like shit really), all I have to do is copy each of the original 4 frames, 4 times. Then, if I don't want 16 frames for certain things, I don't need to. ____________________ My YouTube Channel |
Main - ROM Hacking - Need help with a practice hack - SMB Rain | New thread | New reply |
© 2005-2023 Acmlm, blackhole89, Xkeeper et al. |
MySQL - queries: 82, rows: 111/112, time: 0.017 seconds. |