Banner
Views: 837,996,919
Time:
25 users online:  Anorakun, Blizzard Buffalo, Brutapode89, Centipede, Cr4zy,  Deeke, h.carrell, KiloMinimo, Knight of Time,  Koopster, LOLRyan2006 the Goombud, Lunming Gaming,  Maxodex, Mirann, Mogu94,  Ninja Boy, NopeContest, pixelninetales,  Samantha, Sancles, Slash Chen, Smibbix, Sokobansolver,  Tamaki, TheMorganah - Guests: 64 - Bots: 51 Users: 45,833 (3,405 active)
Latest: Zenomalous
Summer C3 2020 Content Spotlight
CosmicTiff's "Plombier de Fromage" Hack!
Not logged in.
Patching Separate Luigi Overworld graphics to SA1 rom
Forum Index - SMW Hacking - SMW Hacking Help - Patching Separate Luigi Overworld graphics to SA1 rom
Pages: « 1 2 »
replace .noanimp2 with this
Code
.noAnimP2
       TYA
       ASL
       TAY
       TXA
       CLC                  ;\
       ADC $7F13,y          ; | (+ 2) * 2
       ASL                  ;/
       TAX                  ;   get it in X
       LDA $6DBA,y
       BNE .Yoshi
.noYoshi
       LDA.l UploadTile,x   ;\
       STA !RAM_P1TileLo,y  ; | get data of what tile to upload
       LDA.l UploadTile+1,x ; |
       STA !RAM_P1TileHi,y  ;/
       JMP .onePlayer
.Yoshi
       LDA.l PlayerInYoshiTile,x
       STA !RAM_P1TileLo,y
       LDA.l PlayerInYoshiTile+1,x
       STA !RAM_P1TileHi,y
       LDA.l YoshiTile,x
       STA !RAM_Y1TileLo,y
       LDA.l YoshiTile+1,x
       STA !RAM_Y1TileHi,y


I'm sure theres a more efficient way of getting this to work, but I don't know how to code. Though, it works nonetheless. Now the only things that remain are to create a Star Warp routine and having it so you appear in water correctly during a Game Over.
Edit: Found out that Player 2's animations still don't work when he's inactive.
Edit 2: Figured out the ,y on the Yoshi check wasn't supposed to be there (Though I don't know why)
Edit 3: It defaults to giving player 2 the no Yoshi flag if player one doesn't have one.
Edit 4: I think I got it working for real this time. I added a second check to see what player is what and I use both Yoshi Flags.
Code
.noAnimP2
       TYA
       ASL
       TAY
       TXA
       CLC                  ;\
       ADC $7F13,y          ; | (+ 2) * 2
       ASL                  ;/
       TAX                  ;   get it in X
       LDA $6DB3
       CMP #$00
       BEQ +
       LDA $6DBA
       BNE .Yoshi
       JMP .noYoshi
+      LDA $6DBB
       BNE .Yoshi
.noYoshi
       LDA.l UploadTile,x   ;\
       STA !RAM_P1TileLo,y  ; | get data of what tile to upload
       LDA.l UploadTile+1,x ; |
       STA !RAM_P1TileHi,y  ;/
       BRA .onePlayer
.Yoshi
       LDA.l PlayerInYoshiTile,x
       STA !RAM_P1TileLo,y
       LDA.l PlayerInYoshiTile+1,x
       STA !RAM_P1TileHi,y
       LDA.l YoshiTile,x
       STA !RAM_Y1TileLo,y
       LDA.l YoshiTile+1,x
       STA !RAM_Y1TileHi,y
So I can't say I know much about coding. I've been stumbling through my hack learning basic ASM stuff along the way. But Thomas said the star road routine needed to be inserted somewhere and I feel like it might have something to do with this since it runs a check for the same RAM code. Any ideas?

Code
;   End
       SEP #$20                    ;   8-bit A
.end
       LDA $13D9                   ;\  restore
       CMP #$0A                    ;/
       JML $008227                 ;   return


--------------------
I used to put Mario figures in the pipes of my basement to send them on adventures. Plumber dug em out 27 years later. Mission complete I'd say.
It has to do with .return where it checks if you're entering a level, I added a warp star check before it.

Code
.return
       LDA $73D9	    ;\ 
       CMP #$0B		    ; | Warp Star Check
       BNE + 		    ; |
       JML $048998	    ;/
+      LDA $7F13                 
       CMP #$10             ;\ 
       BCC .normalRet       ; |check if the player is entering a new level
       CMP #$13             ; |
       BCS .normalRet       ;/
       INC $6100            ;\
       PLA                  ; | increase gamemode and change the return address if so
       PLA                  ; |
       PEA $840F            ;/


The problem is that this patch's own code overwrites the routine for the warp star and crashes when you try to use it. Surprisingly enough, I don't know where or how to rewrite it.
Edit: I Debugged it. It's a bunch of free space created by the patch, and it continues until it hits a break.
Code
15a198 jml $048998   [048998] A:2c0b X:0006 Y:0000 S:37eb D:0000 DB:04 nvMXdiZC V:251 H:112 F:58
048998 nop                    A:2c0b X:0006 Y:0000 S:37eb D:0000 DB:04 nvMXdiZC V:251 H:112 F:58
048999 nop                    A:2c0b X:0006 Y:0000 S:37eb D:0000 DB:04 nvMXdiZC V:251 H:112 F:58
04899a nop                    A:2c0b X:0006 Y:0000 S:37eb D:0000 DB:04 nvMXdiZC V:251 H:112 F:58
04899b nop                    A:2c0b X:0006 Y:0000 S:37eb D:0000 DB:04 nvMXdiZC V:251 H:112 F:58
04899c nop                    A:2c0b X:0006 Y:0000 S:37eb D:0000 DB:04 nvMXdiZC V:251 H:112 F:58
04899d nop                    A:2c0b X:0006 Y:0000 S:37eb D:0000 DB:04 nvMXdiZC V:251 H:112 F:58
04899e nop                    A:2c0b X:0006 Y:0000 S:37eb D:0000 DB:04 nvMXdiZC V:251 H:112 F:58
04899f nop                    A:2c0b X:0006 Y:0000 S:37eb D:0000 DB:04 nvMXdiZC V:251 H:112 F:58
0489a0 nop                    A:2c0b X:0006 Y:0000 S:37eb D:0000 DB:04 nvMXdiZC V:251 H:112 F:58
0489a1 nop                    A:2c0b X:0006 Y:0000 S:37eb D:0000 DB:04 nvMXdiZC V:251 H:112 F:58
0489a2 nop                    A:2c0b X:0006 Y:0000 S:37eb D:0000 DB:04 nvMXdiZC V:251 H:112 F:58
0489a3 nop                    A:2c0b X:0006 Y:0000 S:37eb D:0000 DB:04 nvMXdiZC V:251 H:112 F:58
0489a4 nop                    A:2c0b X:0006 Y:0000 S:37eb D:0000 DB:04 nvMXdiZC V:251 H:112 F:58
0489a5 nop                    A:2c0b X:0006 Y:0000 S:37eb D:0000 DB:04 nvMXdiZC V:251 H:112 F:58
0489a6 nop                    A:2c0b X:0006 Y:0000 S:37eb D:0000 DB:04 nvMXdiZC V:251 H:112 F:58
...
048d6a nop                    A:2c0b X:0006 Y:0000 S:37eb D:0000 DB:04 nvMXdiZC V:254 H: 29 F:58
048d6b nop                    A:2c0b X:0006 Y:0000 S:37eb D:0000 DB:04 nvMXdiZC V:254 H: 29 F:58
048d6c nop                    A:2c0b X:0006 Y:0000 S:37eb D:0000 DB:04 nvMXdiZC V:254 H: 29 F:58
048d6d nop                    A:2c0b X:0006 Y:0000 S:37eb D:0000 DB:04 nvMXdiZC V:254 H: 29 F:58
048d6e nop                    A:2c0b X:0006 Y:0000 S:37eb D:0000 DB:04 nvMXdiZC V:254 H: 29 F:58
048d6f nop                    A:2c0b X:0006 Y:0000 S:37eb D:0000 DB:04 nvMXdiZC V:254 H: 29 F:58
048d70 nop                    A:2c0b X:0006 Y:0000 S:37eb D:0000 DB:04 nvMXdiZC V:254 H: 29 F:58
048d71 nop                    A:2c0b X:0006 Y:0000 S:37eb D:0000 DB:04 nvMXdiZC V:254 H: 29 F:58
048d72 nop                    A:2c0b X:0006 Y:0000 S:37eb D:0000 DB:04 nvMXdiZC V:254 H: 29 F:58
048d73 nop                    A:2c0b X:0006 Y:0000 S:37eb D:0000 DB:04 nvMXdiZC V:254 H: 29 F:58
048d74 phd                    A:2c0b X:0006 Y:0000 S:37eb D:0000 DB:04 nvMXdiZC V:254 H: 29 F:58
048d75 brk #$13               A:2c0b X:0006 Y:0000 S:37e9 D:0000 DB:04 nvMXdiZC V:254 H: 81 F:58


Code
CODE_048998:        A5 13         LDA RAM_FrameCounter      
CODE_04899A:        29 0C 00      AND.W #$000C              
CODE_04899D:        4A            LSR                       
CODE_04899E:        4A            LSR                       
CODE_04899F:        A8            TAY                       
CODE_0489A0:        B9 4B 89      LDA.W DATA_04894B,Y       
CODE_0489A3:        29 FF 00      AND.W #$00FF              
CODE_0489A6:        A8            TAY               


This probably has to be rewritten in the graphics routine somewhere.


I went ahead and just updated the actual patch. This has all the SA-1 compatability plus all the fixes (including the star warp and Yoshi issue). Let me know if there are still any issues.

Professional frame-by-frame time wizard. YouTube - Twitter - SMW Glitch List - SMW Randomizer
This works great man thanks. This just made my day.

--------------------
I used to put Mario figures in the pipes of my basement to send them on adventures. Plumber dug em out 27 years later. Mission complete I'd say.
Works like a charm!
However, there's only one issue left, and that's if the active player gets a Game Over, it doesn't check for water tiles.

Pages: « 1 2 »
Forum Index - SMW Hacking - SMW Hacking Help - Patching Separate Luigi Overworld graphics to SA1 rom

The purpose of this site is not to distribute copyrighted material, but to honor one of our favourite games.

Copyright © 2005 - 2020 - SMW Central
Legal Information - Privacy Policy - Link To Us


Menu

Follow Us On

  • YouTube
  • Twitch
  • Twitter

Affiliates

  • Super Mario Bros. X Community
  • ROMhacking.net
  • Mario Fan Games Galaxy