News:

Don't forget to visit the main site! There's lots of helpful docs, patches, and more!

Main Menu

[SM] So I edited the landing site

Started by Su, October 29, 2014, 10:05:23 AM

Previous topic - Next topic

Su

And did this

...I want the bottom-left door to act like the top one does (i.e, make a red scroll block act like a blue) but I have remembered 98% of the way through mapping that changing the doors borks it all up somewhat.

How screwed am I?

Jordan5

1) NEVER start by hacking the landing site, it's quite a complex room.

Does the bottom door lead directly into a red scroll, or is there a blue in between like the door halfway up the landing site?

This can be solved two ways:
a) use door scroll ASM so that it changed the red scroll to blue as you come through that door.
b) be clever with your horizontal/vertical BTS to use one scroll PLM to change it from red to blue whether you come through the door or the other side.

I'll give you the door scroll ASM, and link you to some info on how to use it.


lorom

org $8FEB00   ;free space in bank $8F, offset 7EB00
PHP           
SEP #$20       

LDA #$01      ;load blue scroll to...
STA $7ECD44   ;screen $24

PLP
RTS           ;end of door scroll ASM


Compiling the ASM will require something like xkas.

I hope this helps :^_^:

Su

Good advice. I'll remember that...

Yeah. The bottom door would behave exactly like the top does in vanilla.
I'll take a look at that asm and see how it goes. Thanks~

Jordan5

well if it were to act like the one above it, change the STA from $7ECD44 to $7ECD45, then it should work.

Su

#4
What is STA?
And where is bank?

I am such a n00b
Edit: didn't actually read the asm. fabulous

personitis

Just for note, should I remember this correctly, you don't need door asm to change a scroll in such a scenario at all (unless I'm misunderstanding something). The location where you're putting that in the door editor (door scroll) was already designed to change scrolls itself. All you need to do is put a valid scroll pointer there.

Scyzer

Quote from: person701 on October 29, 2014, 02:52:56 PM
Just for note, should I remember this correctly, you don't need door asm to change a scroll in such a scenario at all (unless I'm misunderstanding something). The location where you're putting that in the door editor (door scroll) was already designed to change scrolls itself. All you need to do is put a valid scroll pointer there.

The last 2 bytes of a door header runs ASM, and is not hardcoded to handle scroll pointers, or any tables of the sort. Nothing related to doors can read scroll data. The door "scroll" pointer (as it's said in SMILE), actually just calls the pointer as a JMP. The ASM at those pointers in the original game is used to set up / clear Mode 7; change scrolls (by changing the RAM directly); locking controls, etc. Basically it can do almost anything.

Su

Okay, so based on what I think is the right thing to do...
[spoiler][/spoiler]
[spoiler][/spoiler]
[spoiler][/spoiler]

Am I on the right track?

Quietus

That looks about right.  Have you made a backup, and tested it?

Su

#9
I have indeed made backups! Two, in fact. They seem fine.
I have also gone ahead and done the thing. It doesn't seem to have worked...
...What did I do wrong?

[Edit] Remind me, how does one count screens? left-to-right and then starting again at the line underneath, right?
[Edit2] ok, is the room number in hex?
[Edit3] I am lost. Nothing I do seems to work. I've tried everything I can think of and nothing seems to have happened.

Jordan5

Okay, so this is how i apply ASM. Firstly, save that file as an ASM file (with the same name as the rom), not a batch file. (so you'd have 'Hack.smc' and 'Hack.asm') Make sure the ASM file and rom are in the same folder. Set ASM files to use xkas assembler by default, then double click on the ASM file. This should apply it to your rom. Now, you place the pointer 'EB00' in the door scroll pointer for the door that leads to the landing site.

Counting scrolls goes from top left, all along that row and then once at the end of that you, start on the next one down. You count in hexadecimal starting from $00 up to $2C for that room.

Scyzer

In bank $8F, put these bytes:  [08 E2 20 A9 01 8F 44 CD 7E 28 60]
In the door ASM pointer box, for the door whcih leads INTO the landing site, put the location where you put those bytes.

Su

#12
I'm never ever editing the landing site again ever ever

@Jordan5: Ok, I've done that and edited the pointer! Now ZSNES crashes when entering through that door. So at least it seems to have done something...

@Scyzer: Do I put those bytes in after patching, or instead of patching?
Also, assuming bank $8F's free space starts at 00087640 in HxD, how do I point there?

Jordan5

ZSNES is crashing because you did something wrong, probably pointing to the wrong code or to free space.
Bank $8F starts at 78000 and ends at 7FFFF in a hex editor.

Su

Everything I've been told says this should be working...
[spoiler][/spoiler]
This was done using asm, so the patching is definitely taking place now.

The scroll section of the relevant door editor is set to EB00
but it doesn't actually change the scroll when I come through the door?
There's no crashing this time - it just does nothing.

Smiley

Make sure you use the correct address in the RAM:
You're using 7E:CD45, which is scroll 25. Since counting scrolls starts at 0, you probably want to use 7E:CD44 instead.

Su

I'm pretty sure scroll 25 is the one I need though, isn't it?
[spoiler][/spoiler]

Smiley

That would indeed seem so. Make sure you actually saved the door, including clicking "Remember" after putting the pointer in. That's the only thing I can think could've gone wrong.

Su

Quote from: SMILEuser96 on October 31, 2014, 10:19:17 AM
That would indeed seem so. Make sure you actually saved the door, including clicking "Remember" after putting the pointer in. That's the only thing I can think could've gone wrong.

I've been editing the last pointer in the top row, clicking "Remember", closing the dialog, and then saving the room. Is there another step?

Jordan5

That is all correct. You are entering the pointer in the door that is in scroll block 1C, right?

Su

There is no door in scroll 1C. That red line is just to remind me there's a hidden path through that wall.
I'm editing the door that leads to the landing site - room 792FD, door $01.

Smiley

Well, I tried using that particular piece of ASM (08 E2 20 A9 01 8F 45 CD 7E 28 60) and it does what it should. It could possibly be a Quickmet issue, a roomstate issue or you've applied the ASM to a different ROM.

Vismund Cygnus