Can I please ask for more help? As you can see when the credits roll it gets all crazy



I know that trying to fix this is outta hand, so would there be way to hex it up so before the credits roll, like, at the end when it says "Fight Mega Man for ever lasting peace" the game restarts itself? I had no idea how many bugs this hack has as I was going through it, thanks for any tips.

    Might be hard to fix this without using a debugger to find what edits did trigger it. At RAM address $31 you have the current level. When the value is B it tells the game that it is at the ending sequance. You can trigger the ending by puting the value there and press start in the level select.

    As you will see this will mess with the credits even in the vanilla. So there are other vactors I do not know about that affect this screen..

    May be you put the endboss on a other level? I do not even know if you talk about a existing hack or if this is your creation. Bisquite posted a lot of resources that help with debugging. If this is not your can of beer you will need to find out what step you did to trigger a bugged ending.

    All I can add is that it looks like a corrupted graphics pointer.
    But like bogaa said, there more to how the ending screen works.
    The problem could be compounded by certain flags not being set.

    GoogieToons

    Looking at the rom map on data crystal, apparently a lot of the data for the ending (like tile data and scrolling data) is also shared with Gutsman's data.

    Did you change anything major about Gutsman's stage data or the boss fight with him? Maybe the game's not properly setting a flag that you've beaten him.

    Hey fellas, my bad for the late reply been busy all weekend.

    When Dragonsbrethren gave me the hack way back in 2007 I had no idea about the bugs I've been bumping into working on this on & off over the years. You fellas can snag the hack in case you fellas wanna beta test it. 🙂

    https://www.mediafire.com/file/irboip488gx1ixe/Mega+Man+In+St.+Canard+-+Recent++(MM+hack)++.7z/file

    There's a savestate you can add in FCEUX 2.3.0 so you don't have to play through the whole hack.

    I don't mean to sound like a noob but I went to Chat GPT about the issue, this is what it told me last night...

    To make the game restart itself after displaying the text "Fight Mega Man for everlasting peace," you'll want to locate the part of the code that handles this text and modify it so that instead of proceeding to the credits, the game resets.

    Here's a general approach to how you might do that:

    Locate the Ending Text:
    Search the disassembly file for the text "Fight Mega Man for everlasting peace." This will help you find the section of the code where the text is displayed.
    
    Find the Code that Follows:
    After the text is displayed, there will likely be code that progresses to the next part of the game (probably the credits). You'll need to identify this part of the code.
    
    Insert a Reset Instruction:
    Replace the code that would normally proceed to the credits with an instruction that resets the game. In 6502 assembly, the reset instruction is JMP $FFFC.
    
    $FFFC is the memory address where the NES expects to find the reset vector, which is the code that runs when the console is first powered on or reset.

    Example Code Modification:

    If the original code after displaying the text looks something like this:

    assembly

    ; Example pseudocode after displaying text
    LDA #$01
    STA $2000 ; Start the credits (this is an example, actual code may differ)

    You would replace it with:

    assembly

    JMP $FFFC ; Jump to the reset vector to restart the game

    Steps to Implement:

    Open the disassembly file and search for the text "Fight Mega Man for everlasting peace."
    Identify the code that comes immediately after the text display routine.
    Replace the code that transitions to the credits with JMP $FFFC.

    Testing:

    After making these changes, you should test the game to ensure it restarts properly after the ending text is displayed, and that it does not proceed to the buggy credits.

    Is Chat GPT correct on this, or nah?

      ...That's not how 6502 vectors work. You would need a JMP indirect.

      I would not recommend to use a language model to learn 6502 assembly. There are awesome resources that will teach you the basics if you like to learn it. If you do not want to learn it just stand by it! A lot of romhacker can't code.. There are a view ways to approach the problem. Asking a machine about a topic you have no clue what answer to expect is a garbage in garbage out situation.

      (GPT assumed you have a disassembly.. you do not.
      It assumed the imaginary assembly has text strings.. where it suggested to put something to reset. What it almost got right surprisingly.. Beside the idea to implement at the PPU instructions what is a bad idea for some reasons..)

      I did fix up the credits.. just put the vanilla code there for now since in your credit edits is no terminator what did overflow the buffer.. what wrote over stuff in RAM what did case the crashes. There been a view bad edits I reversed. Probably still buggy overall.

      The new patch is in the IPS folder (Patch for original file). My edits can be found in the code/fix.asm
      There is a read-me if you like to read into how asm patching works.

      https://www.dropbox.com/scl/fi/cfh7bbv6pyghpttxl1ekf/MegaManInSt_Canard.7z?rlkey=vn2obz13hkpmwz6dc2yv4ipgp&dl=0