News:

11 March 2016 - Forum Rules

Main Menu

Mega Man 6 Scrolling

Started by TheSkipper1995, April 19, 2022, 07:50:52 AM

Previous topic - Next topic

TheSkipper1995

Hello!

I've been messing around with Mega Man 6 level editing via MegaFLE X and have hit a bit of a roadblock when it comes to the scrolling mechanics. I understand the basics, such as how the scrolling is controlled by the y-coordinate of sprite ID "80."

I have a list of what the various y-coordinates do and have been able to change a few things. A few examples would be:

  • y-coordinate 0 scrolls right.

  • y-coordinate 1 scrolls left and then increments the screen count by 1 if the player climbs down a ladder.

  • y-coordinate 2 increments the screen count if you climb down and decrements it if you climb up.

  • In addition to controlling how the screen scrolls, some coordinates are even specified to execute code, change palettes, etc.


What I don't understand, however, is how to change what things happen at existing y-coordinates. I have rock5Easily's notes on this, but they're obviously in Japanese and Google Translate doesn't really help: https://www.himaq5.xyz/rock5easily/6/scroll.html

So basically what I'm asking is if there's anyone here who does understand how to change what happens at existing y-coordinates and/or understands rock5Easily's notes.

Cyneprepou4uk


・ Example 5 (92 36 01 00 00 00)
95 36-> byte0-1 Code address 1 $ 9536 (Clear the fall flag of Mr.X stage 2 fall block)
01-> byte2 You can proceed to the right in the area
00 00-> byte3-4 No code to execute
00-> byte5 Data circuit-terminating without scroll direction


Quote95 36-> byte0-1 Code address 1 $ 9536 (Clear the fall flag of Mr.X stage 2 fall block)

I think this is where you specify a routine address, inside which you can program needed stuff
Quotewhat things happen at existing y-coordinates

TheSkipper1995

Ok so let me see if I'm getting this correct, because I don't think I am. This is the y-coordinate I'm looking at:

As you can see, it's $41. According to Rock5's notes, the low and high scroll addresses start at 722FB and 7237B respectively. There's $80 different y-coordinates that have various parameters. So in order to find the routine address for y-coordinate $41, we need to add $41 to 722FB and 7237B respectively.

-First, we add $41 to 722FB, and the resulting address is 7233C. The value at address 7233C is $68.
-Next, we add $41 to 7237B, and get 723BC. The value at 723BC $88.

So, the location of the routine address for y-coordinate $41 should be address 6888. However, when going to address 6888 and messing with the values, nothing changes. What am I missing here?

Cyneprepou4uk

Quotelow and high scroll addresses start at 722FB and 7237B respectively.

Should be 8868, not 6888.

TheSkipper1995

Quote from: Cyneprepou4uk on April 20, 2022, 07:29:11 AM
Should be 8868, not 6888.

This doesn't seem to be the case either, unfortunately.

Cyneprepou4uk

I'm pretty sure it is.

QuoteHowever, when going to address 6888 and messing with the values, nothing changes.

Based on this info, you probably went to 6888 address the same way you would go to 722FB for example. Do you realize that pointers point to a CPU address, not to a file address? These are two different things.

TheSkipper1995

Quote from: Cyneprepou4uk on April 20, 2022, 05:57:44 PM
I'm pretty sure it is.

Based on this info, you probably went to 6888 address the same way you would go to 722FB for example. Do you realize that pointers point to a CPU address, not to a file address? These are two different things.

I did not realize this. I know practically nothing about ASM. At best, I'm able to somewhat recognize patterns of bytes, change values, and see what happens.

I'm realizing now that 722FB-7237A and 7237B-723FA don't actually have anything to do with what I'm trying to accomplish. Rather, my focus is on the "◇ Scroll processing data" part, which I now understand starts at 723FB. I understand what's going on for all of them except byte 8:
QuoteConsidered omitted by byte8-> bit7 = 0, bit6-0 = room number to scroll from
           Used when scrolling to a room far from the room number.
           If omitted, the current room number is the room number of the scroll source.

The Japanese-to-English is so mangled here that this information is very difficult to parse.

Cyneprepou4uk

If pointers and data are within the same bank in your case, then 70010 = 8000, which means 70878 = 8868. Use Code/Data Logger in FCEUX to highlight used data when loading a room and search for blue bytes.