News:

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

Main Menu

Old SMILE Help Thread

Started by GF_Kennon, May 17, 2009, 02:24:28 PM

Previous topic - Next topic

Smiley

#550
Quote from: gunnargumpert on February 27, 2010, 11:03:32 AM
it works! thanks

but the free space at bank $8f is limited, is it possible, to use another bank?
Technically, yes, but you'll need some really nifty ASM to do that.

Quote from: gunnargumpert on February 27, 2010, 11:03:32 AM
2nd EDIT: it´s not realy working, because the doors are working with the addres [_ _ _ _] ,not [7_ _ _ _]
(the 7 is addet automaticaly) ---  but 2EEC0 starts with 2 _ _ _ _


is it possible to set a pointer?
Umm... what?
2EEC0? What the heck are you doing in bank $85? (Assuming 2EEC0 is an address)
Doors are located in $83, which is 18000-1FFFF.
I'm not gonna write anymore of that, so i just give a guide on adding doors so you can have new doors for your new room.
[spoiler=Yay, MoonEdit :^_^:]Open up your Super Metroid ROM in SMILE. Go to Edit -> Pointers. Notice the "Door Out" information there? there's four characters that can be edited there, and two before them in grey that can't be. These six values are actually three sets of two. Let's take the landing site of Crateria: the pointer for this room's doors is 8F 92 7B. Now, plug those numbers into the two boxes at the bottom of the Pointer window. It should look like this: $8F 927B. Notice that, as you type these numbers in, a set of somewhat-corresponding numbers appears at the very top of the window. Strange, though: 927B is the same, but 8F turned into 07!
  The reason why this happens is a bit complicated, and not really important for what we're doing here in adding doors. You just need to open up your Super Metroid ROM in your hex editor and use its goto function. Type in the new address in the top of the window (07927B) and you'll be taken to a bunch of numbers and letters.
  Hmm, this stuff doesn't make any sense. What in the world does "16 89 22 89 2E 89" mean? Well, that stuff's actually more pointers! It's a lot of fun, isn't it? So if we want to add new doors, we need to go to where this information is being stored. Well, that place happens to be bank 83 (don't worry about why it's bank 83, it just is). So let's jump up there. But wait, where the heck is bank 83? That's easy enough to figure out... type it in on the pointer window! putting in 83 in there gives us a new address to go to: 18000. So let's jump there.
  Well, there's a bunch of stuff here. We want to add new doors without screwing up anything that's already here. Now, we have to use bank 83, because... well, we have to, okay? You don't need to worry about why. Fortunately there's a nice big chunk of free space (all those FF's) at the bottom of this bank (bank 83 spans from 18000 to 1FFFF). So, starting around 1AD80, we can go ahead and make new door data. Using one line for each door you want to have in the room, type in this filler data:

  F8 91 00 05 8E 16 08 01 00 80 00 00 FF FF FF FF

  The particular values aren't particularly important anyway, it's just good to have something there. You'll be able to edit where this door goes in SMILE after we change the pointers. One line of this equals one door, so for a room that has (or will have) three doors, paste that door in three times. This is what it should look like at the end, starting from 1AD80:

  F8 91 00 05 8E 16 08 01 00 80 00 00 FF FF FF FF
  F8 91 00 05 8E 16 08 01 00 80 00 00 FF FF FF FF
  F8 91 00 05 8E 16 08 01 00 80 00 00 FF FF FF FF

  Note the address at the first byte of each door. In this example, it's 1AD80. The second door is at 1AD90, and the third door is at 1ADA0.

  Now, we have the door data here we need, so what we need to do next is go back to bank 8F and set up some pointers there to lead to these doors. To do this, we'll want to go to the end of bank 8F where there's also some free space. Let's jump to 78000 and look through that bank (78000-7FFFF)...

  Darn, not as much space here, is there? It's okay, though, we only need one line for each room. 7E9B0 looks clean. That's what we'll use. Remember the address for the doors? 1AD80, 1AD90, 1ADA0? Well, the game already knows the bank or the "1" in that address, so we don't need that. What we DO need is a pointer for where in that bank the doors are.
  Pointers here are REVERSED, though! We can't just type in AD80! Switch those bytes around, baby. You should end up with 80 AD 90 AD A0 AD FF FF... Oooh, but there's one more thing to do. Change the two FF's after the last door's pointer to 01 01, so that SMILE doesn't weird out trying to read it. This is what we should end up with at 7E9B0:

  80 AD 90 AD A0 AD 01 01 FF FF FF FF FF FF FF FF

  That's it! you've made new doors and a new door pointer. Now the only thing left to do is to go to the room you want to use these three brand new doors in and change its Door Out pointer to the new address (in this case, 7E9B0). Remember, the game knows the bank or the "7" so you just need to type in "E9B0" in the Door Out box and save your pointers.
  If you're using SMILE 1.32 you should be fine; if you're using SMILE 1.23 or older the program will crash at this point. Don't worry, go back into the room and see if your new door shows up in the door editor. If it does, problem solved, and you've got a new door. Once you've done this one time, you'll never forget, just like riding a bike, only without the wind in your hair.[/spoiler]

gunnargumpert

i know how to add doors^^

you didn´t get what i mean!

no, I ment, can i use another bank?  (pointer at the bank $8f, that points to the addres 2EEC0)

thelicker

Well, today I have 2 questions:

1- How do I add more doors in a room with Smile 2.50?
2- How do I remove my scroll fader? It is, when I enter in a door, I don't want the "black screen".

personitis

For adding doors, see the spoiler in SMILEuser96's above post. As for preventing the door fade effect, I think you may need some ASM for that as to my knowledge there hasn't been a hex change found yet.

Zhs2

Quote from: gunnargumpertno, I ment, can i use another bank?  (pointer at the bank $8f, that points to the addres 2EEC0)
It's probably a bad idea to move things out of the bank that they were meant to be in.

Quote from: thelicker1- How do I add more doors in a room with Smile 2.50?
Short answer - You don't.
Better answer - Sounds like a job for a hex editor. person's post explains it better.

Quote from: thelicker2- How do I remove my scroll fader? It is, when I enter in a door, I don't want the "black screen".
It's part of the whole room transition sequence. Nobody has attempted to change this because it would involve a huge rewrite of the transition engine in order to not look glitchy as fuck. You're out of luck on this one, son.

gunnargumpert

i made the enemy D53F (aka- SHUTTER2)

but now there is a problem: if i close the door (shooting it) it closes, but if it´s closed it immediately opens!
how to make the door only opening, if i shot it?
the values i used are: special - A800; speed 4004; and orientation 0107, speed 2 is 0000 (empty - it is only used, if id should open itself)

Smiley

As far as i know, that's how they work, it doesn't matter what values you use, they always open/close automatically once they are turned on. Your only option is to make a new AI for them.
Another option is to use the PLM gates. (The gates which open/close when they're shot with a beam or a super missile.)

gunnargumpert

Quote from: SMILEuser96 on February 28, 2010, 07:54:38 AM
As far as i know, that's how they work, it doesn't matter what values you use, they always open/close automatically once they are turned on. Your only option is to make a new AI for them.
Another option is to use the PLM gates. (The gates which open/close when they're shot with a beam or a super missile.)

wrong, the x ray scop room has 2 of this enemys, they are only reacting after a shot!

thelicker

Quote from: thelicker1- How do I add more doors in a room with Smile 2.50?
Quote from: Zhs2Short answer - You don't.
Better answer - Sounds like a job for a hex editor. person's post explains it better.

I know I need do it in a Hex Editor, and I already read the Moonedit and I do all the tutorial say. But when I go in SMILE, I subtracted a door from my room lol
I thinks it's because I'm using the version 2.50, and the tutorial use the version 2.30.

Quote from: thelicker2- How do I remove my scroll fader? It is, when I enter in a door, I don't want the "black screen".
Quote from: Zhs2It's part of the whole room transition sequence. Nobody has attempted to change this because it would involve a huge rewrite of the transition engine in order to not look glitchy as frak. You're out of luck on this one, son.

I've seeyed the removed scroll fader in a video of Aegis, a walkthrough of Glacia.

Zhs2

Quote from: thelickerI thinks it's because I'm using the version 2.50, and the tutorial use the version 2.30.
It shouldn't be a problem. You're doing something wrong.

Quote from: thelickerI've seeyed the removed scroll fader in a video of Aegis, a walkthrough of Glacia.
Well, then, Acheron's to be admired for rewriting the scroll engine. Go ask him how he did it. :grin:

Scyzer

Quote from: Zhs2 on February 28, 2010, 03:45:35 PM
Quote from: thelickerI thinks it's because I'm using the version 2.50, and the tutorial use the version 2.30.
It shouldn't be a problem. You're doing something wrong.

Quote from: thelickerI've seeyed the removed scroll fader in a video of Aegis, a walkthrough of Glacia.
Well, then, Acheron's to be admired for rewriting the scroll engine. Go ask him how he did it. :grin:

Adding doors is the same with SMILE 2.5 as it is with 2.3, and 1.32 (which is what I use). You just have to make sure you have ALL the pointers for the doors together in the hex editor, with *<$8000* after it (as in a number below $8000)

As for scrolling, it's easy to remove the fade (i've done it before) but it does cause VERY bad glitches, mostly when transtitioning between different graphic sets or elevators. Though with all I've learnt since then, it might be easy to get around that. I won't get to that now though, got too many projects to work on ATM. If you wanna try yourself, here's how I'd do it:


org [hijack points that run fading sequence]
JSL [code location]

org [code location]
PHX
LDX [current room ID]
LDA $8F80**,X
STA [temp unused bytes]
LDX [next room ID]
LDA $8F80**,X
CMP [temp unused bytes]
BEQ $01
PLX
RTL
PLX
PLA
RTL/RTS *depending on previous routine*


** is the number of bytes from the start of a header for the graphic set
[] means a location in the RAM for what ever is inside the brackets

basically that will check for the room's graphic set, and if it's the same, won't fade the room =). Don't assume it will work though, that was done in my head, 3 minutes ago.

thelicker

But I need to do it with asm, right?