Announcement

Collapse
No announcement yet.

nolberto82 codes

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Originally posted by nolberto82 View Post
    This game has to have the craziest jump routine I have ever seen. I got the next best thing:

    Code:
    [COLOR="Blue"]Kaiketsu Yanchamaru 3 - Taiketsu! Zouringen (J) - NES[/COLOR]
    
    Moon Jump
    SXKIISVS
    SZVSTTAZ
    AGVSYTAK
    XTNIAVKK
    APNIPTEY
    OANIGVXX
    SINIIVOI
    That really is the next best thing! It's similar to a "Jump in Midair", but for this game much more powerful as you can scale the screen very quickly when needed. What exactly did you hook into to make it go up continually at a button press?

    I'm glad I wasn't the only one that thought the jump routine looked crazy. Thank you for looking into it.
    Not taking any requests at this time.

    Bored? Watch some of my hacks here.

    Comment


    • Code:
      [COLOR="Blue"]Start of jump[/COLOR]
      07:D559:A9 00     LDA #$00
      ...
      
      This value is a timer of how long you continue to rise.
      07:D591:A9 07     LDA #$07
      07:D593:9D D5 05  STA $05D5,X @ $05D5 = #$18
      ...
      
      Checks to see if you are holding the A button.
      07:D59E:B5 48     LDA $48,X @ $0048 = #$80
      07:D5A0:10 28     BPL $D5CA
      ...
      
      This the first part of the moon jump.
      Change D5C5 to AD so it jumps back and continue to rise.
      07:D5C5:DE D5 05  DEC $05D5,X @ $05D5 = #$07
      07:D5C8:10 CC     BPL $D596
      
      The problem with only this code is when you are descending
      you wont be able to jump back so we have to the following.
      
      [COLOR="Blue"]Descending[/COLOR]
      
      07:D66E:20 40 CC  JSR $CC40
      07:D671:F0 03     BEQ $D676
      07:D673:4C AA D9  JMP $D9AA
      
      changed to:
      
      07:D66E:A5 48     LDA $0048 = #$00
      07:D670:EA        NOP
      07:D671:10 03     BPL $D676
      07:D673:4C 89 D5  JMP $D589
      
      If the A button is held jump back to D589 to rise again.
      I skipped a lot parts as they are not necessary. The jumping in the game is done with jumps and loops.

      Comment


      • Originally posted by nolberto82 View Post
        I skipped a lot parts as they are not necessary. The jumping in the game is done with jumps and loops.
        This looks like the routine I found when testing the Y position and the most I could get out of it with minimal coding was a longer float before decending (your timer address). Is this how you found the routine or did you test the controller input? Speaking of controller input is there an easy way to find the actual controller input address?

        I have seen while in the hex editor addresses that change based on what button(s) I'm holding. When I put a BPR on these I find it doing a BIT operation followed by some other actions or ANDs. Is that usually the controller routine?
        Last edited by Abystus; 08-16-2011, 08:52:10 PM.
        Not taking any requests at this time.

        Bored? Watch some of my hacks here.

        Comment


        • Originally posted by Abystus
          This looks like the routine I found when testing the Y position and the most I could get out of it with minimal coding was a longer float before decending (your timer address). Is this how you found the routine or did you test the controller input? Speaking of controller input is there an easy way to find the actual controller input address?

          I have seen while in the hex editor addresses that change based on what button(s) I'm holding. When I put a BPR on these I find it doing a BIT operation followed by some other actions or ANDs. Is that usually the controller routine?
          A BPR on 4016 which is where all games read the controller status from. This will take you to the routine that stores the button values to a RAM address. Then put a BPR on whatever the memory address is. That's how I found the jump routine for this game.

          Comment


          • Originally posted by nolberto82 View Post
            A BPR on 4016 which is where all games read the controller status from. This will take you to the routine that stores the button values to a RAM address. Then put a BPR on whatever the memory address is. That's how I found the jump routine for this game.
            Where you saw the test for the button:

            Code:
            Checks to see if you are holding the A button.
            07:D59E:B5 48     LDA $48,X @ $0048 = #$80
            07:D5A0:10 28     BPL $D5CA
            Break on address 4016:

            Code:
            07:FDD0:85 35     STA $0035 = #$00
            07:FDD2:BD 16 40  LDA $4016,X @ $4016 = #$FF [COLOR="Red"]<- Breaks Here[/COLOR]
            07:FDD5:85 36     STA $0036 = #$40
            07:FDD7:4A        LSR
            07:FDD8:05 36     ORA $0036 = #$40
            07:FDDA:4A        LSR
            07:FDDB:A5 35     LDA $0035 = #$00
            07:FDDD:2A        ROL
            07:FDDE:88        DEY
            07:FDDF:D0 EF     BNE $FDD0
            07:FDE1:86 36     STX $0036 = #$40
            07:FDE3:06 36     ASL $0036 = #$40
            07:FDE5:A6 36     LDX $0036 = #$40
            07:FDE7:B4 37     LDY $37,X @ $0037 = #$00
            07:FDE9:84 36     STY $0036 = #$40
            07:FDEB:95 37     STA $37,X @ $0037 = #$00
            07:FDED:95 38     STA $38,X @ $0038 = #$00
            07:FDEF:29 FF     AND #$FF
            07:FDF1:10 08     BPL $FDFB
            07:FDF3:24 36     BIT $0036 = #$40
            07:FDF5:10 04     BPL $FDFB
            07:FDF7:29 7F     AND #$7F
            07:FDF9:95 38     STA $38,X @ $0038 = #$00
            07:FDFB:60        RTS
            How did 0048 determine the button press if it's not listed in the break? Unless somewhere along the line it gets stored as copied memory in 0048 after the initial addresses are stored? The addresses listed there I've seen (In the Hex Editor changing values), which is what I was describing in my original post. Sorry for all the questions, just trying to get things straight for future hacks .
            Not taking any requests at this time.

            Bored? Watch some of my hacks here.

            Comment


            • I skipped this. This what you get when you put a BPR on 48 when you are standing:
              Code:
              07:CB16:B5 48     LDA $48,X @ $0048 = #$00
              07:CB18:10 1A     BPL $CB34
              07:CB1A:BD 8B 06  LDA $068B,X @ $068B = #$00
              07:CB1D:D0 1A     BNE $CB39
              07:CB1F:A9 FF     LDA #$FF
              07:CB21:9D 8B 06  STA $068B,X @ $068B = #$00
              07:CB24:AC EA 06  LDY $06EA = #$00
              07:CB27:F0 08     BEQ $CB31
              07:CB29:B9 80 04  LDA $0480,Y @ $0492 = #$00
              07:CB2C:29 FD     AND #$FD
              07:CB2E:99 80 04  STA $0480,Y @ $0492 = #$00
              [COLOR="Green"]07:CB31:4C 59 D5  JMP $D559[/COLOR]
              Code:
              Checks to see if you are holding the A button while jumping.
              07:D59E:B5 48     LDA $48,X @ $0048 = #$80
              07:D5A0:10 28     BPL $D5CA
              A BPR on 4016 is to find which RAM address holds the button values not the jump routine.

              Comment


              • Originally posted by nolberto82 View Post
                I skipped this. This what you get when you put a BPR on 48 when you are standing:
                Code:
                07:CB16:B5 48     LDA $48,X @ $0048 = #$00
                07:CB18:10 1A     BPL $CB34
                07:CB1A:BD 8B 06  LDA $068B,X @ $068B = #$00
                07:CB1D:D0 1A     BNE $CB39
                07:CB1F:A9 FF     LDA #$FF
                07:CB21:9D 8B 06  STA $068B,X @ $068B = #$00
                07:CB24:AC EA 06  LDY $06EA = #$00
                07:CB27:F0 08     BEQ $CB31
                07:CB29:B9 80 04  LDA $0480,Y @ $0492 = #$00
                07:CB2C:29 FD     AND #$FD
                07:CB2E:99 80 04  STA $0480,Y @ $0492 = #$00
                [COLOR="Green"]07:CB31:4C 59 D5  JMP $D559[/COLOR]
                Code:
                Checks to see if you are holding the A button while jumping.
                07:D59E:B5 48     LDA $48,X @ $0048 = #$80
                07:D5A0:10 28     BPL $D5CA
                A BPR on 4016 is to find which RAM address holds the button values not the jump routine.
                Yeah, I was just wondering why the ram address $0048 holding the value of the button press did not appear in the below when setting the break on 4016:

                Code:
                07:FDD0:85 35     STA $0035 = #$00
                07:FDD2:BD 16 40  LDA $4016,X @ $4016 = #$FF <- Breaks Here
                07:FDD5:85 36     STA $0036 = #$40
                07:FDD7:4A        LSR
                07:FDD8:05 36     ORA $0036 = #$40
                07:FDDA:4A        LSR
                07:FDDB:A5 35     LDA $0035 = #$00
                07:FDDD:2A        ROL
                07:FDDE:88        DEY
                07:FDDF:D0 EF     BNE $FDD0
                07:FDE1:86 36     STX $0036 = #$40
                07:FDE3:06 36     ASL $0036 = #$40
                07:FDE5:A6 36     LDX $0036 = #$40
                07:FDE7:B4 37     LDY $37,X @ $0037 = #$00
                07:FDE9:84 36     STY $0036 = #$40
                07:FDEB:95 37     STA $37,X @ $0037 = #$00
                07:FDED:95 38     STA $38,X @ $0038 = #$00
                07:FDEF:29 FF     AND #$FF
                07:FDF1:10 08     BPL $FDFB
                07:FDF3:24 36     BIT $0036 = #$40
                07:FDF5:10 04     BPL $FDFB
                07:FDF7:29 7F     AND #$7F
                07:FDF9:95 38     STA $38,X @ $0038 = #$00
                07:FDFB:60        RTS
                I am assuming that the value of the button is being copied into $0048 at some point after to be used for comparison. I guess my question is how did you know $0048 held the button value if it isn't stored to in the above 4016 BPR. I see STA's for addresses $0035, $0036, $0037,$0038. I don't see $0048 listed there.

                Worst comes to worst, I can just assume that once I've found the jump routine that the comparison with the lowest address is my button comparison (and it will most likely be situated at the top of the jump routine). Thanks for taking the time to explain.
                Not taking any requests at this time.

                Bored? Watch some of my hacks here.

                Comment


                • Originally posted by Abystus
                  I am assuming that the value of the button is being copied into $0048 at some point after to be used for comparison. I guess my question is how did you know $0048 held the button value if it isn't stored to in the above 4016 BPR. I see STA's for addresses $0035, $0036, $0037,$0038. I don't see $0048 listed there.

                  Worst comes to worst, I can just assume that once I've found the jump routine that the comparison with the lowest address is my button comparison (and it will most likely be situated at the top of the jump routine). Thanks for taking the time to explain.
                  I looked at those addresses and put a BPR on 37 and didn't find anything useful except that 37 was storing its value to 48. I put a BPR on 48 to find the jump routine. You have to check the addresses that you find with 4016 to see which one is doing the comparisons.

                  Comment


                  • Originally posted by nolberto82 View Post
                    I looked at those addresses and put a BPR on 37 and didn't find anything useful except that 37 was storing its value to 48. I put a BPR on 48 to find the jump routine. You have to check the addresses that you find with 4016 to see which one is doing the comparisons.
                    Ha just as you posted I figured it out. I put a BPW on $0048 and found:

                    Code:
                    04:848F:A5 37     LDA $0037 = #$00
                    04:8491:85 48     STA $0048 = #$00
                    Question is why would they copy the memory to $0048 and not just reference $0037 directly? Thanks for breaking it down like that. I would think in most games they would just reference the Ram addresses initialized in the BPR $4016 instead of copied memory. Guess this game was a bad example to go by :P.

                    Thank you again for all the information regarding how to find the reference the controller input.
                    Not taking any requests at this time.

                    Bored? Watch some of my hacks here.

                    Comment


                    • Originally posted by Abystus
                      Question is why would they copy the memory to $0048 and not just reference $0037 directly? Thanks for breaking it down like that. I would think in most games they would just reference the Ram addresses initialized in the BPR $4016 instead of copied memory. Guess this game was a bad example to go by :P.

                      Thank you again for all the information regarding how to find the reference the controller input.
                      4016 doesn't return values like 1,2,4,8,etc like other systems do. 4016 returns a 1 for press and 0 for not press. The joypad routine uses a ROL to return 1,2,4, etc number then store it to a memory address. That still doesn't explain why they use 2 addresses for comparisons.
                      Last edited by nolberto82; 08-16-2011, 10:46:09 PM.

                      Comment


                      • One more question and I promise I'll leave you alone. In your example:

                        Code:
                        Checks to see if you are holding the A button while jumping.
                        07:D59E:B5 48     LDA $48,X @ $0048 = #$80
                        07:D5A0:10 28     BPL $D5CA
                        You listed the value as 80 (Jump button). When my break fires in FCEUX the value is always 00 even if I'm still holding the jump button when the break occurs. Did you modify that to say 80 for the example or did you input a conditional for the value of 80 on break? If not how do I make my breaks show the value of input (example address $0048) when they occur in FCEUX?
                        Last edited by Abystus; 08-16-2011, 11:16:14 PM.
                        Not taking any requests at this time.

                        Bored? Watch some of my hacks here.

                        Comment


                        • Originally posted by Abystus
                          You listed the value as 80 (Jump button). When my break fires in FCEUX the value is always 00 even if I'm still holding the jump button when the break occurs. Did you modify that to say 80 for the example? If not how do I make my breaks show the value of input (example address $0048) when they occur in FCEUX?
                          Go to Config - Enable - Background Input. Then you should be able to see the values.

                          Comment


                          • Originally posted by nolberto82 View Post
                            Go to Config - Enable - Background Input. Then you should be able to see the values.
                            Thanks for the info. Unfortunately my controller just died as I was reading this. I heard the disconnect from windows and even after a restart it appears to be dead (even swapped ports with my Ext HDD and it worked just fine). I'll be sure to test this as soon as I can get another working controller (I refuse to use the keyboard.) Appreciate all the help!
                            Not taking any requests at this time.

                            Bored? Watch some of my hacks here.

                            Comment


                            • Code:
                              [COLOR="Blue"]Choujikuu Yousai Macross - Scrambled Valkyrie (J) - SNES[/COLOR]
                              
                              Hit Anywhere
                              DD66-34D7
                              DD6B-3FD7
                              DD65-3467

                              Comment


                              • Originally posted by nolberto82 View Post
                                This game has to have the craziest jump routine I have ever seen. I got the next best thing:

                                Code:
                                [COLOR="Blue"]Kaiketsu Yanchamaru 3 - Taiketsu! Zouringen (J) - NES[/COLOR]
                                
                                Moon Jump
                                SXKIISVS
                                SZVSTTAZ
                                AGVSYTAK
                                XTNIAVKK
                                APNIPTEY
                                OANIGVXX
                                SINIIVOI
                                (...)
                                This was a my request for this game which I posted in @Abystus thread. Your code works great. I thank you for it!
                                Last edited by Unicode; 08-17-2011, 01:55:51 AM.

                                Comment

                                Working...
                                X