Banner
Views: 236,718,447
Time: 2013-05-25 12:30:35 PM
24 users online: aj6666, Chrondo_84, Dark Mario Bros, Demonstro, o Doopy Buckride, everest700, GreenHammerBro, o HuFlungDu, HyperMario, jellybean, Kenny, Koopster, KY2010, Lightvayne, Ludus, MarioFan22, o Mippish, o mockingod, phenolatukas, Pokimao, o Richard Nixon, Rockythetigre, o ShadowPhoenix, Sokobansolver - Guests: 38 - Bots: 11Users: 22,888 (1,284 active)
Latest: smartguy484
Tip: There's a fine line between difficult and unfair. Avoid the latter.
Play as Super Mario and other Yoshi forms
Forum Index - Non-SMW Hacking - Yoshi's Island - Play as Super Mario and other Yoshi forms
Pages: « 1 2 3 4 »
Originally posted by a website
Address Description
7E1062 Baby Bowser's current damage. End battle if = 3
7E1076 Big Bowser's current damage. End battle if = 7
7E1078 Salvo's current health. End battle if less than 4C00
7E107C Hookbill's current damage (increments by 2). End battle if = 6
7E1084 Salvo's defense mode. If = #01 defense is down
701900 Burt's pants
701902 Burt's current health. End battle when health = 0
70195C Raphael's current health. End battle when hit if = 1
701964 Big Boo's current face width
7019BA Total damage to Big Boo (2 bytes). End battle when >= 01C1
701A33 Raphael's current mode (00=normal 01=angry 02=furious)
701A7A Big Boo's current body size
701A94 Total damage to Prince Froggy (2 bytes). End battle if => FFFF.


I found these RAM addresses online.

So I reversed the order of the bytes in some of the above addresses, and found a few results in the rom for those values.

Therefore, I'll get back to this thread with some disassemblies and rom addresses for default values, if I can. I can't promise anything, because it's a strong possibility that finding the values in the rom was a coincidence, and that the addresses aren't referenced by out-right address.
@Yoshis Fan

Originally posted by Yoahis Fan

1. Change the palette of the Green Red Coins to Normal Red Coins and correct their SFX. For the SFX object X16 could be useful.


When the green coins appear they are tiles not sprites, Changing all these tiles to sprites would eliminate all palette/sound issues. The ones that you have that look and sound right are sprites.

In eggvine change objects 82 to S65.

If you want to keep all the red coins as tiles(Obj 82) you should change the palette index by -2, It works for 1-2, 1-7, right now they use the same palette as the pipes and egg spawning boxes.

I have copied the 16 bytes of memory from 0x070040-0x07004F to 0x070060-0x07006F and the green-red coins do look correct as yellow/red coins.
Last edited on 2010-11-02 05:35:23 PM by tehaxor69.
Yes, thanks, but at the other hand, sorry, because that has already been solved by changing the palette of the Tilemaps. I've forgot to update the GBA todo-list... #w{x(}Of course I don't want to make them to sprites, because it is way handier to have them as objects, because there is no limitaion for them, then. Furthermore they cannot be differed so easily from the normal coins, so that's a good thing, too. There are two things, which must be done:
Correct 82's, 83's, 84's and X17's SFX, so they play the correct sound effect, when you take them. Another thing is, that they must turn into red coins, when the Magnifying Glass is used. For that, probably the ASM of the Magnifying Glass must be changed, so if you activate it, it changes the object palette of the coins (if there is no red as an object palette, it must be turned into sprite S65 by activating the Magnifying Glass).
Last edited on 2010-11-02 02:36:32 PM by Yoshis Fan.
The reason why the green coins sound wrong sound is that the code called when you get a green coin is run with wrong length of the index register, meaning that it leads to running some unexpected code. (This is easily fixable, though.)
Maybe Nintendo thought up the magnifying glass card later, and decided not to use, and to leave the green coin.

Although the standard palette has a red colours and it's theoretically possible to switch the tile palette to the red one by hijacking the routine which updates the BG1 VRAM when the display scrolls into the new area, I don't think it that realistic, because this might, or might not, cost some performance, as the new routine should be run almost every time you move. As for generating a sprite instead, I suppose this method is more unrealistic.

Why don't you use the sprite version from the beginning when you would compromise on using a sprite?
The thing is that the "green" coins are used for the GBA version. Since I want to make the hack Secret Of Yoshi's Island as similar to the GBA levels as possible I need the "green" red coins, because they are used in the GBA version wherever it's possible. But they are not bad in general, easily because of the thing, that they cannot be differed by normal coins this way and that's the intention of the palette. Do you think it's unrealistic to turn them into sprites, when the Magnifying Glass is in use? To my knowledge they are automatically turned into sprites, when Yoshi touches them. Well, another more "radical" way to solve the problem is to make, that the player is unable to obtain the Magnifying Glass. I think that would be a quite good idea, if everything else does not work. We could make the graphics look like the Egg-Filler and the item work exactly like it.
How do you correct the sound effect, by the way?

*Edit:*
Just in case someone tried to solve the following of my questions:
Originally posted by my profile
Control Reverse Ghost
I want to use the control reverse ghost (Sprite 037) in my hack, but whenever I use him in a level, where you don't play the normal green Yoshi, Yoshi's palette ends up green or red, when you get rid of the ghost. Is there a way to fix that palette-changing? If not, the best thing would be to not change Yoshi's palette at all while the control reverse ghost sits on Yoshi's back.
I have solved it. If anyone is interested: Changing the byte [BF] at 0x27D58 to [EA] will make, that Yoshi's palette remains unchanged while the control reverse ghost sits on his back. Other values like [00], [80] and [D0] do the same, but [EA] is the hexadecimal prompt to do no operation, so I guess changing the byte to [EA] is the safest solution.
Last edited on 2010-11-04 04:37:31 PM by Yoshis Fan.
@Yoshis Fan:

I found the sub routine that updates the BG1 VRAM from the main memory.

Code
Disassembly: $10/9147 BF 00 80 7F LDA $7F8000,x[$7F:ABC8] A:2BC8 X:2BC8 Y:03A8 P:envMXdizc Load tile from memory. we just care about value 0xA4 right now, which is the red-green coin tile $10/914B 99 9E 40 STA $409E,y[$70:4446] A:2BC8 X:2BC8 Y:03A8 P:envMXdizc $10/914E 98 TYA A:2BC8 X:2BC8 Y:03A8 P:envMXdizc $10/914F 18 CLC A:2BC8 X:2BC8 Y:03A8 P:envMXdizc $10/9150 69 40 ADC #$40 A:2BC8 X:2BC8 Y:03A8 P:envMXdizc $10/9152 00 A8 BRK #$A8 A:2BC8 X:2BC8 Y:03A8 P:envMXdizc $10/9154 8A TXA A:2BC8 X:2BC8 Y:03A8 P:envMXdizc $10/9155 18 CLC A:2BC8 X:2BC8 Y:03A8 P:envMXdizc $10/9156 69 20 ADC #$20 A:2BC8 X:2BC8 Y:03A8 P:envMXdizc $10/9158 00 AA BRK #$AA A:2BC8 X:2BC8 Y:03A8 P:envMXdizc $10/915A C6 06 DEC $06 [$00:0006] A:2BC8 X:2BC8 Y:03A8 P:envMXdizc $10/915C D0 E9 BNE $E9 [$9147] A:2BC8 X:2BC8 Y:03A8 P:envMXdizc $10/915E 60 RTS A:2BC8 X:2BC8 Y:03A8 P:envMXdizc $10/915F E0 00 CPX #$00 A:2BC8 X:2BC8 Y:03A8 P:envMXdizc $10/9161 00 00 BRK #$00 A:2BC8 X:2BC8 Y:03A8 P:envMXdizc $10/9163 E6 79 INC $79 [$00:0079] A:2BC8 X:2BC8 Y:03A8 P:envMXdizc $10/9165 8D A6 60 STA $60A6 [$70:60A6] A:2BC8 X:2BC8 Y:03A8 P:envMXdizc

(Not the whole routine)

Romi was on to something about hijacking the subroutine.

some where along the line this goes to a code and stores a value of 0x0E40, 0x0E41, ~ 0x0E42, 0x0E43 to the video ram.



If a custom code could read in the show red coin flag and set the data according to the following info

Current - dont want any more
0x0E40 = tile 576, palette = 3

Target value - when show red coin flag is unset
0xA40 = tile 576, palette = 2

Target when - show red coin flag is set
0x640 = tile 576, palette = 1

red coin flag is memory address 0x701E06
Wait... I thought BRK freezes the game? (Does it do something different when SuperFX is involved?)

(By the way, I can think of one major advantage of editing the green coins to look and act like red coins-- to add red coins without having to worry about the sprite limit.)
Last edited on 2010-11-04 10:14:21 PM by Zeldara109.
Originally posted by Zeldara109
Wait... I thought BRK freezes the game? (Does it do something different when SuperFX is involved?)

Incorrect disassembly.
Code
$10/9147 BF 00 80 7F LDA $7F8000,x[$7F:ABC8] A:2BC8 X:2BC8 Y:03A8 P:envMXdizc Load tile from memory. we just care about value 0xA4 right now, which is the red-green coin tile $10/914B 99 9E 40 STA $409E,y[$70:4446] A:2BC8 X:2BC8 Y:03A8 P:envMXdizc $10/914E 98 TYA A:2BC8 X:2BC8 Y:03A8 P:envMXdizc $10/914F 18 CLC A:2BC8 X:2BC8 Y:03A8 P:envMXdizc $10/9150 69 40 00 ADC #$0040 A:2BC8 X:2BC8 Y:03A8 P:envMXdizc $10/9153 A8 TAY A:2BC8 X:2BC8 Y:03A8 P:envMXdizc $10/9154 8A TXA A:2BC8 X:2BC8 Y:03A8 P:envMXdizc $10/9155 18 CLC A:2BC8 X:2BC8 Y:03A8 P:envMXdizc $10/9156 69 20 00 ADC #$0020 A:2BC8 X:2BC8 Y:03A8 P:envMXdizc $10/9159 AA TAX A:2BC8 X:2BC8 Y:03A8 P:envMXdizc $10/915A C6 06 DEC $06 [$00:0006] A:2BC8 X:2BC8 Y:03A8 P:envMXdizc $10/915C D0 E9 BNE $E9 [$9147] A:2BC8 X:2BC8 Y:03A8 P:envMXdizc $10/915E 60 RTS A:2BC8 X:2BC8 Y:03A8 P:envMXdizc

The part at the end looked like a table, so I removed it. The other two was the disassembler assuming 8bit A (correct would be 16bit).
Nice finds! Now only the sound effect needs to be fixed and the coins must be affected by the red coin flag.
For YI ROM 1.0 and 1.1 patch using the following

Edit:For roms with headers add 0x200

//For all greed-red coins yellow #w{=D}
0x000CD2A3 = 0x0A
0x000CD2A5 = 0x0A
0x000CD2A7 = 0x0A
0x000CD2A9 = 0x0A

//For all greed-red coins red
0x000CD2A3 = 0x06
0x000CD2A5 = 0x06
0x000CD2A7 = 0x06
0x000CD2A9 = 0x06

//To revert to green
0x000CD2A3 = 0x0E
0x000CD2A5 = 0x0E
0x000CD2A7 = 0x0E
0x000CD2A9 = 0x0E

Now I just need to change the pointer during the show red coin flag, and the sound effects.


Cool effect - show yellow coins every where a blank tile is #w{xD}
0x000C33F2 = 0x40
0x000C33F3 = 0x0A
0x000C33F4 = 0x41
0x000C33F5 = 0x0A
0x000C33F6 = 0x42
0x000C33F7 = 0x0A
0x000C33F8 = 0x43
0x000C33F9 = 0x0A

to revert to blank tiles
0x000C33F2 = 0xFF
0x000C33F3 = 0x18
0x000C33F4 = 0xFF
0x000C33F5 = 0x18
0x000C33F6 = 0xFF
0x000C33F7 = 0x18
0x000C33F8 = 0xFF
0x000C33F9 = 0x18


Rom data from 0x0C0000 - 0x0CFFFF
This is the tile attributes data
each tile is 2 bytes 8 bytes for whole 16x16 block
bit 0-9 control the tile number
bit 10-12 controls the palette
bit 13 unused?
bit 14 H-flip
bit 15 V-flip


Didn't realize this was already mapped.
Last edited on 2010-11-05 05:01:11 PM by tehaxor69.
Originally posted by tehaxor69
Rom data from 0x0C0000 - 0x0CFFFF
This is the tile attributes data
each tile is 2 bytes 8 bytes for whole 16x16 block
bit 0-9 control the tile number
bit 10-12 controls the palette
bit 13 unused?
bit 14 H-flip
bit 15 V-flip

This information from the previous post isn't new and part of it is inaccurate. The address range of the "tile attributes" data in an unheadered ROM is from C33F2 to CD619.

Also, we typically use PC addresses for a headered ROM here, as that's what EggVine takes. This is why the range C35F2-CD819 appears in the post I linked to.

Bit 13 controls tile priority, which makes a tile appear in front of sprites if set.
Last edited on 2010-11-05 12:18:45 PM by Mattrizzle.
Originally posted by Mattrizzle
Bit 13 controls tile priority, which makes a tile appear in front of sprites if set.


Interesting! So most of the Map16 tiles, which are used by the Snow-Tileset have the 13th bit set, I suppose? Also, the muddy ground tiles of the jungle tileset got those set.
But then, another question: How many "free" Map16 tiles exist? You used tile 0x18E for object F7 and also told me that tile 0x53A was supposed to be used for the upside-down ceiling corner tile. So, since the space they use goes from 0xC35F2 to 0xCD819, and each of them is 8 bytes, there are 0x1445 (5189 in decimal) Map16 tiles.
By the way: Am I right, when I say that 0x80 8x8-tiles are loaded by default and 0x180 special 8x8-tiles are loaded per tileset?

*Edit:*
Originally posted by me
I have solved it. If anyone is interested: Changing the byte [BF] at 0x27D58 to [EA] will make, that Yoshi's palette remains unchanged while the control reverse ghost sits on his back. Other values like [00], [80] and [D0] do the same, but [EA] is the hexadecimal prompt to do no operation, so I guess changing the byte to [EA] is the safest solution.

Sigh... Forget that... Doing this will make, that Yoshi won't pass Mario to another Yoshi, but will make that he passes him to the same Yoshi again, means both Yoshis have the same color at goal...
Last edited on 2010-11-08 07:56:58 AM by Yoshis Fan.
@Yoshis Fan:

This will hijack the routine that updates the BG1 horizontally.
red-green coins will show as yellow or red if you have the magnifying glass
still needs the up-down routine hijacked and possibly an all screen tile update.
This still needs to be optimized, will be done once all update routines are found, and I will create a IPS for this hack.

Code
.ORG $005BD2 JUMP $BFFCF0 //4 0x5C, 0xF0, 0xFC, 0xBF NOP //1 0XEA .ORG $1FFEF0 LDY $0077 //3 AC 77 00 BEQ _JUMP //2 F0 02 BRA CODE //2 80 04 JUMP $7EDBD5 //4 5C D5 DB 7E CODE PHA //1 0x48 PHX //1 0xDA PHY //1 0x5A LDX $40 //2 0xA2, 0X44 LDY $00 //2 0xA0, 0X00 READ_LOOP LDA $66AA,Y //3 0xB9, 0xAA, 0x6D PHA //1 0x48 LSR A //1 0x4A LSR A //1 0x4A CMP $0390 //3 0xC9, 0x90, 0x03 BEQ PALETTE_CHANGE //2 0xF0, 0x03 PLA //1 0x68 BNE SKIP //2 0xD0, 0x16 PALETTE_CHANGE LDA $70/1E06 //4 0xAF, 0x06, 0x1E, 0x70 BNE RED //2 0xD0, 0x09 YELLOW PLA //1 0x68 EOR $0400 //3 0x49, 0x00, 0x04 STA $66AA,Y //3 0x99, 0xAA, 0x6D BRA SKIP //2 0x80, 0x07 RED PLA //1 0x68 EOR $0800 //3 0x49, 0x00, 0x08 STA $66AA,Y //3 0x99, 0xAA, 0x6D SKIP INY //1 0xC8 INY //1 0xC8 DEX //1 0xCA BNE READ_LOOP //2 0xD0, 0xD7 NOP NOP NOP NOP NOP PALETTE_COPY LDX $00 //2 0xA2, 0X00 LDY $10 //2 0xA0, 0X10 PALETTE_COPY_LP LDA PALETTE_DATA,X //4 0xBF, 0x47, 0xFD, 0xBF STA $702020,X //4 0x9F, 0x20, 0x20, 0x70 INX //1 0xE8 DEY //1 0x88 BNE PALETTE_COPY_LP //2 0xD0, 0xF4 PLY //1 0x7A PLX //1 0xFA PLA //1 0x68 JMP GAME_CODE //4 0x5C, 0xB7, 0xDB, 0x7E PALETTE_DATA .DB 0x00,0x00,0xFF,0x7F,0x00,0x00,0x07,0x00,0x0C,0x00,0x12,0x00,0x19,0x00,0x1F,0x00


This is the codes that checks the status of the magnifying glass
Code
Check magnifying glass flag code for the ?coulds $03/C08C AD 06 7E LDA $7E06 [$03:7E06] A:BF03 X:005C Y:0003 P:envmXdizc $03/C08F D0 3B BNE $3B [$C0CC] A:0000 X:005C Y:0003 P:envmXdiZc Check magnifying glass flag code for the red coins $0C/EA42 AD 06 7E LDA $7E06 [$0C:7E06] A:E60C X:005C Y:0000 P:envmXdiZc $0C/EA45 F0 02 BEQ $02 [$EA49] A:0001 X:005C Y:0000 P:envmXdizc


Disables the magnifying glass effects
Code
never show ?clouds $03/C08C AD 06 7E LDA $7E06 [$03:7E06] A:BF03 X:005C Y:0003 P:envmXdizc $03/C08F 80 02 BRA $02 [$EA49] A:0001 X:005C Y:0000 P:envmXdizc never show red coins $0C/EA42 AD 06 7E LDA $7E06 [$0C:7E06] A:E60C X:005C Y:0000 P:envmXdiZc $0C/EA45 80 02 BRA $02 [$EA49] A:0001 X:005C Y:0000 P:envmXdizc



Originally posted by Yoshis Fan

Sigh... Forget that... Doing this will make, that Yoshi won't pass Mario to another Yoshi, but will make that he passes him to the same Yoshi again, means both Yoshis have the same color at goal...

I'll try to create an asm hack that will invert the yoshi palettes the correct way
Thank you very much, tehaxor69!
If you can't get the palette inversion to work, you could make, that Yoshi's colors don't change at all. At the same time it should not affect the Yoshi at goal. Also, how is the sound effect changed? Romi said it would be a very easy thing to do that, because it's probably only a sound pointer, which must be changed. So hijacking Layer 1 is not the only problem, but it is the bigger problem. When it works once, it will be so great to be able to use the objects! #w{=3}
Last edited on 2010-11-09 10:54:19 AM by Yoshis Fan.
@Yoshis Fan:

Here are some of the sub routines that control the grim leecher(ghost that reverses your controls).

Code
//Sub Routine - Calls as soon as you touch the grim lecher $04/9F9B BB TYX A:0002 X:005C Y:005C P:envmXdizc Changing to NOP causes Mario not to float in bubble. $04/9F9C BD 96 7A LDA $7A96,x[$04:7AF2] A:0002 X:005C Y:005C P:envmXdizc Loads from counter $04/9F9F F0 19 BEQ $19 [$9FBA] A:0002 X:005C Y:005C P:envmXdizc Branches to the code that reverses your controls. $04/9FA1 BD 98 7A LDA $7A98,x[$04:7AF4] A:0002 X:005C Y:005C P:envmXdizc Loads from counter $04/9FA4 D0 13 BNE $13 [$9FB9] A:0002 X:005C Y:005C P:envmXdizc Bails routine if $04:7AF4 is not zero. $04/9FA6 A9 08 00 LDA #$0008 A:0002 X:005C Y:005C P:envmXdizc $04/9FA9 9D 98 7A STA $7A98,x[$04:7AF4] A:0002 X:005C Y:005C P:envmXdizc Sets a flag $04/9FAC AD 16 61 LDA $6116 [$04:6116] A:0002 X:005C Y:005C P:envmXdizc Loads palette index $04/9FAF 49 02 00 EOR #$0002 A:0002 X:005C Y:005C P:envmXdizc xor value with 0x0002 $04/9FB2 8D 16 61 STA $6116 [$04:6116] A:0002 X:005C Y:005C P:envmXdizc Stores palette index $04/9FB5 22 41 FB 04 JSL $04FB41[$04:FB41] A:0002 X:005C Y:005C P:envmXdizc Calls sub routine that loads palette. $04/9FB9 60 RTS A:0002 X:005C Y:005C P:envmXdizc were all done. //Sub Routine - Calls about 30 frames after you touch the grim lecher $04/9FBA BC 00 6F LDY $6F00,x[$04:6F5C] A:0002 X:005C Y:005C P:envmXdizc $04/9FBD C0 10 CPY #$10 A:0002 X:005C Y:005C P:envmXdizc $04/9FBF F0 06 BEQ $06 [$9FC7] A:0002 X:005C Y:005C P:envmXdizc $04/9FC1 A9 FF FF LDA #$FFFF A:0002 X:005C Y:005C P:envmXdizc $04/9FC4 8D EC 61 STA $61EC [$04:61EC] A:0002 X:005C Y:005C P:envmXdizc Sets the initial value of the time your controls are reversed $04/9FC7 F6 76 INC $76,x [$00:7A32] A:0002 X:005C Y:005C P:envmXdizc $04/9FC9 60 RTS A:0002 X:005C Y:005C P:envmXdizc //Sub Routine that updates palette $04/FB41 08 PHP A:00FF X:0008 Y:0000 P:eNvMXdizC Push P $04/FB42 C2 30 REP #$30 A:00FF X:0008 Y:0000 P:eNvMXdizC Kill flag MX $04/FB44 48 PHA A:00FF X:0008 Y:0000 P:eNvmxdizC Push A $04/FB45 DA PHX A:00FF X:0008 Y:0000 P:eNvmxdizC Push X $04/FB46 5A PHY A:00FF X:0008 Y:0000 P:eNvmxdizC Push Y $04/FB47 8B PHB A:00FF X:0008 Y:0000 P:eNvmxdizC Push B $04/FB48 AE 16 61 LDX $6116 [$00:6116] A:00FF X:0008 Y:0000 P:eNvmxdizC $04/FB4B F4 20 70 PEA $7020 [$00:7020] A:00FF X:0008 Y:0000 P:eNvmxdizC $04/FB4E AB PLB A:00FF X:0008 Y:0000 P:eNvmxdizC $04/FB4F AB PLB A:00FF X:0008 Y:0000 P:eNvmxdizC $04/FB50 BF 23 FB 04 LDA $04FB23,x[$04:FB2B] A:00FF X:0008 Y:0000 P:eNvmxdizC $04/FB54 AA TAX A:00FF X:0008 Y:0000 P:eNvmxdizC $04/FB55 A0 1C 00 LDY #$001C A:00FF X:0008 Y:0000 P:eNvmxdizC $04/FB58 BF 00 A0 5F LDA $5FA000,x[$5F:A008] A:00FF X:0008 Y:0000 P:eNvmxdizC $04/FB5C 99 A2 21 STA $21A2,y[$00:21A2] A:00FF X:0008 Y:0000 P:eNvmxdizC $04/FB5F 99 0E 2F STA $2F0E,y[$00:2F0E] A:00FF X:0008 Y:0000 P:eNvmxdizC $04/FB62 CA DEX A:00FF X:0008 Y:0000 P:eNvmxdizC $04/FB63 CA DEX A:00FF X:0008 Y:0000 P:eNvmxdizC $04/FB64 88 DEY A:00FF X:0008 Y:0000 P:eNvmxdizC $04/FB65 88 DEY A:00FF X:0008 Y:0000 P:eNvmxdizC $04/FB66 10 F0 BPL $F0 [$FB58] A:00FF X:0008 Y:0000 P:eNvmxdizC $04/FB68 AB PLB A:00FF X:0008 Y:0000 P:eNvmxdizC POP B $04/FB69 7A PLY A:00FF X:0008 Y:0000 P:eNvmxdizC POP Y $04/FB6A FA PLX A:00FF X:0008 Y:0000 P:eNvmxdizC POP X $04/FB6B 68 PLA A:00FF X:0008 Y:0000 P:eNvmxdizC POP A $04/FB6C 28 PLP A:00FF X:0008 Y:0000 P:eNvmxdizC POP P $04/FB6D 6B RTL A:00FF X:0008 Y:0000 P:eNvmxdizC were done //EXECUTED WHEN DONE … $04/A112 9D 96 7A STA $7A96,x[$04:7AF2] A:003E X:005C Y:0000 P:envmXdizc $04/A115 8D D0 0C STA $0CD0 [$04:0CD0] A:003E X:005C Y:0000 P:envmXdizc $04/A118 8D EC 61 STA $61EC [$04:61EC] A:003E X:005C Y:0002 P:envmXdizc $04/A11B A9 08 00 LDA #$0008 A:003E X:005C Y:0002 P:envmXdizc $04/A11E 9D 98 7A STA $7A98,x[$04:7AF4] A:0008 X:005C Y:0002 P:envmXdizc $04/A121 A9 03 00 LDA #$0003 A:0008 X:005C Y:0002 P:envmXdizc $04/A124 95 76 STA $76,x [$00:7A32] A:0003 X:005C Y:0002 P:envmXdizc $04/A126 80 54 BRA $54 [$A17C] A:0003 X:005C Y:0002 P:envmXdizc $04/A17C 74 16 STZ $16,x [$00:79D2] A:0003 X:005C Y:0002 P:envmXdizc $04/A17E A9 10 00 LDA #$0010 A:0003 X:005C Y:0002 P:envmXdizc $04/A181 9D 00 6F STA $6F00,x[$04:6F5C] A:0010 X:005C Y:0002 P:envmXdizc $04/A184 A9 FF FF LDA #$FFFF A:0010 X:005C Y:0002 P:envmXdizc $04/A187 8D 48 7E STA $7E48 [$04:7E48] A:FFFF X:005C Y:0002 P:eNvmXdizc $04/A18A A9 81 08 LDA #$0881 A:FFFF X:005C Y:0002 P:eNvmXdizc $04/A18D 9D A2 6F STA $6FA2,x[$04:6FFE] A:0881 X:005C Y:0002 P:envmXdizc $04/A190 A9 54 09 LDA #$0954 A:0881 X:005C Y:0002 P:envmXdizc $04/A193 9D 40 70 STA $7040,x[$04:709C] A:0954 X:005C Y:0002 P:envmXdizc $04/A196 60 RTS A:0954 X:005C Y:0002 P:envmXdizc



Grim leecher patterns

touched calls 1st routine
Green 4
Purple 4
Green 4
Purple 4
Green 4
Purple 4
Green 4
Purple 4
calls 2nd routine

xor table for Yoshi colors
00 Green - Green
02 Green - Fuchsia
04 Green - Orange
06 Green - Cyan
08 Green - Light Purple
0A Green - Brown
0C Green - Red
0E Green - Dark Purple


Code
This is the first routine to hijack $04/A118 8D EC 61 STA $61EC [$04:61EC] A:003E X:005C Y:0002 P:envmXdizc $04/A11B A9 08 00 LDA #$0008 A:003E X:005C Y:0002 P:envmXdizc This is the second routine to hijack $04/9FAC AD 16 61 LDA $6116 [$04:6116] A:0002 X:005C Y:005C P:envmXdizc Loads palette index $04/9FAF 49 02 00 EOR #$0002 A:0002 X:005C Y:005C P:envmXdizc xor value with 0x0002 - changes between 0x00 and 0x03 $04/9FB2 8D 16 61 STA $6116 [$04:6116] A:0002 X:005C Y:005C P:envmXdizc Stores palette index




This hack will allow any Yoshi to touch the grim leecher with out palette side effects

if Green then Green - Pink
if Pink then Pink - Green
if Orange then Orange - Cyan
if Cyan then Cyan - Orange
if LightPurple then LightPurple - Brown
if Brown then Brown - LightPurple
if Red then Red - DarkPurple
if DarkPurple then DarkPurple - Red


Code
Hijack_1 .ORG 0x22318 JUMP $BFFD60 //4 0X5C, 0X60, 0XFD, 0XBF NOP //1 0XEA NOP //1 0XEA Hijack_2 .ORG 0x221AC JUMP $BFFD7A //4 0X5C, 0X7A, 0XFD, 0XBF NOP //1 0XEA NOP //1 0XEA NOP //1 0XEA NOP //1 0XEA NOP //1 0XEA .ORG 0x1FFE60 RESET_FLAG STA $0461EC //4 0X8F, 0XEC, 0X61, 0X04 LDA $0000 //3 0XA9, 0X00, 0X00 STA $007AFE //4 0X8F, 0XFE, 0X7A, 0X00 LDA $0008 //4 0XA9, 0X08, 0X00 JUMP $04A11E //4 0X5C, 0X1E, 0XA1, 0X04 NOP //1 0XEA .ORG 0x1FFE7A FIX_YOSHIS_COLORS PHA //1 0X48 PHX //1 0XDA PHY //1 0X5A LDA 0x0461EC //4 0XAF, 0XEC, 0X61, 0X04 CMP 0x0000 //3 0XC9, 0X00, 0X00 BNE SKIP //2 0XD0, 0X1A LDA 0x007AFE //4 0XAF, 0XFE, 0X7A, 0X00 CMP 0x0000 //3 0XC9, 0X00, 0X00 BNE SKIP //2 0XD0, 0X10 LDA 0x7E0383 //4 0XAF, 0X83, 0X03, 0X7E ASL A //1 0X0A STA 0x046116 //4 0X8F, 0X16, 0X61, 0X04 LDA 0x0001 //3 0XA9, 0X01, 0X00 STA 0x007AFE //4 0X8F, 0XFE, 0X7A, 0X00 NOP //1 0xEA SKIP LDA 0x7E0383 //4 0XAF, 0X83, 0X03, 0X7E CMP 0x0000 //3 0XC9, 0X00, 0X00 BEQ GREEN_FUCHSIA_INVERT //2 0XF0, 0X25 CMP 0x0001 //3 0XC9, 0X01, 0X00 BEQ GREEN_FUCHSIA_INVERT //2 0XF0, 0X20 CMP 0x0002 //3 0XC9, 0X02, 0X00 BEQ ORANGE_CYAN_INVERT //2 0XF0, 0X2B CMP 0x0003 //3 0XC9, 0X03, 0X00 BEQ ORANGE_CYAN_INVERT //2 0XF0, 0X26 CMP 0x0004 //3 0XC9, 0X04, 0X00 BEQ LIGHTPURPLE_INVERT_BROWN_INVERT //2 0XF0, 0X31 CMP 0x0005 //3 0XC9, 0X05, 0X00 BEQ LIGHTPURPLE_INVERT_BROWN_INVERT //2 0XF0, 0X2C CMP 0x0006 //3 0XC9, 0X06, 0X00 BEQ RED_INVERT_DARKPURPLE_INVERT //2 0XF0, 0X37 CMP 0x0007 //3 0XC9, 0X07, 0X00 BEQ RED_INVERT_DARKPURPLE_INVERT //2 0XF0, 0X32 BRA DONE //2 0X80, 0X68 GREEN_FUCHSIA_INVERT LDA 0x046116 //4 0XAF, 0X16, 0X61, 0X04 CMP $0000 //3 0XC9, 0X00, 0X00 BEQ SET_FUCHSIA //2 0XF0, 0X3C CMP $0002 //3 0XC9, 0X02, 0X00 BEQ SET_GREEN //2 0XF0, 0X32 BRA DONE //2 0X80, 0X58 ORANGE_CYAN_INVERT LDA 0x046116 //4 0XAF, 0X16, 0X61, 0X04 CMP $0004 //3 0XC9, 0X04, 0X00 BEQ SET_CYAN //2 0XF0, 0X36 CMP $0006 //3 0XC9, 0X06, 0X00 BEQ SET_ORANGE //2 0XF0, 0X2C BRA DONE //2 0X80, 0X48 LIGHTPURPLE_INVERT_BROWN_INVERT LDA 0x046116 //4 0XAF, 0X16, 0X61, 0X04 CMP $0008 //3 0XC9, 0X08, 0X00 BEQ SET_BROWN //2 0XF0, 0X30 CMP $000A //3 0XC9, 0X0A, 0X00 BEQ SET_LIGHTPURPLE //2 0XF0, 0X26 BRA DONE //2 0X80, 0X38 RED_INVERT_DARKPURPLE_INVERT LDA 0x046116 //4 0XAF, 0X16, 0X61, 0X04 CMP $000C //3 0XC9, 0X0C, 0X00 BEQ SET_DARKPURPLE //2 0XF0, 0X2A CMP $000E //3 0XC9, 0X0E, 0X00 BEQ SET_RED //2 0XF0, 0X20 BRA DONE //2 0X80, 0X28 SET_GREEN LD A,0X0000 //3 0XA9, 0X00, 0X00 BRA DONE //2 0X80, 0X23 SET_FUCHSIA LD A,0X0002 //3 0XA9, 0X02, 0X00 BRA DONE //2 0X80, 0X1E SET_ORANGE LD A,0X0004 //3 0XA9, 0X04, 0X00 BRA DONE //2 0X80, 0X19 SET_CYAN LD A,0X0006 //3 0XA9, 0X06, 0X00 BRA DONE //2 0X80, 0X14 SET_LIGHTPURPLE LD A,0X0008 //3 0XA9, 0X08, 0X00 BRA DONE //2 0X80, 0X0F SET_BROWN LD A,0X000A //3 0XA9, 0X0A, 0X00 BRA DONE //2 0X80, 0X0A SET_RED LD A,0X000C //3 0XA9, 0X0C, 0X00 BRA DONE //2 0X80, 0X05 SET_DARKPURPLE LD A,0X000E //3 0XA9, 0X0E, 0X00 BRA DONE //2 0X80, 0X00 DONE STA $6116 [$04:6116] //4 0X8F, 0X16, 0X61, 0X04 PLY //1 0X7A PLX //1 0XFA PHA //1 0X68 JUMP GAME_CODE //4 0x5C, 0xB2, 0x9F, 0x04


*Edit*
If you just want to disable the palette changes just set change the byte at 0x221B0 from 0x02 to 0x00.

Both codes will not effect the 2nd Yoshi at the goals.
Last edited on 2010-11-11 06:54:38 AM by tehaxor69.
Whoa, thank you a LOT!!
One question: Is there a fast way to apply the patch? The patches I get from Mattrizzle and Romi are Xkas patches. Yours are similar, but somehow they got more than just the opcodes and addresses and stuff. For the long code with the inversion: Are the .ORG 0x..... the PC addresses? Since I don't know how to apply the patch I hex-edit the ROM.

*Edit:*
Sorry, it's even harder to solve the problem: I use 16 different Yoshi-colors in my hack. The indexes 0 to 7, which normally use the palettes stored from 0x1FA240 to 0x1FA32F, then use the palettes of the Yoshis in the intro-scene, which go from 0x1FEFEC to 0x1FF03B. Doing this, indexes 8 to F use the palettes from the former indexes 0 to 7, then. 8 to F are freely editable then, because the palettes are the same, except the palettes of the intro scene got 16 colors each and the ingame palettes got 15 colors each. It might be useful to know how to do that tweak in order to make a patch:
This must be pasted from 0x79A7
| EC 4D 6C 4D | 8C 4D AC 4D | CC 4D 4C 4D | 0C 4E 2C 4E |
| 40 00 5E 00 | 7C 00 9A 00 | B8 00 D6 00 | F4 00 12 01 |
| 08 4E 88 4D | A8 4D C8 4D | E8 4D 68 4D | 28 4E 48 4E |
| 5C 00 7A 00 | 98 00 B6 00 | D4 00 F2 00 | 10 01 2E 01 |
At 0x003C73; 0x003D86; 0x026566 and 0x081D36
you must replace the [14 BA] with [A7 F7]
At 0x012E58 and 0x027D51
you must replace the [23 FB 04] with [C7 F7 00]


Oh, and another problem: Replacing the byte [02] at 0x221B0 with [00] will make, that Yoshi's palette becomes green, as soon as the ghost sits on his back.
Last edited on 2010-11-10 05:07:47 PM by Yoshis Fan.
I'll create IPS patches to make it faster. I'll create a Xkas patch if thats what you prefer.

The .ORG are the same as the offsets in eggvine.
The extra data is the oppcode size and hex code.

Change values at 0x221B5 [0x22 0x41 0xFB 0x04] to [0xEA 0xEA 0xEA 0xEA]
Would prevent the game from updating Yoshi palettes when touched.
The value at 0x221B0 changes the XOR value but the initial value is Green so that won't work, 0x221B5 would work fine.
Originally posted by tehaxor69
Change values at 0x221B5 [0x22 0x41 0xFB 0x04] to [0xEA 0xEA 0xEA 0xEA]
Would prevent the game from updating Yoshi palettes when touched.
The value at 0x221B0 changes the XOR value but the initial value is Green so that won't work, 0x221B5 would work fine.


Thank you very much for that! This one works! In case you still want to get the palette-change to work: Please make it so, that I can use it, because my hack got 16 Yoshi-colors. If you don't want that or you don't go for it anymore, then you don't need to make this patch, the main thing for me is, that the grim leecher works bug-free for any Yoshi. But I also don't want to spoil creating the patch for you and I appreciate it, when it finally works.
@Yoshis Fan:

Simple code is always better, and now you can use up to 128 Yoshi palettes that won't glitch.
*Edit* I might have under estimated that number, if all the indexes are 16 bit - 32768 would be possible(the palettes alone would be 1MB), 128 is enough to have a Yoshi palette for each level.

Code
.ORG 0x1FFE7A FIX_YOSHIS_COLORS PHA //1 0X48 PHX //1 0XDA PHY //1 0X5A LDA 0x0461EC //4 0XAF, 0XEC, 0X61, 0X04 CMP 0x0000 //3 0XC9, 0X00, 0X00 BNE SKIP //2 0XD0, 0X19 LDA 0x007AFE //4 0XAF, 0XFE, 0X7A, 0X00 CMP 0x0000 //3 0XC9, 0X00, 0X00 BNE SKIP //2 0XD0, 0X10 LDA 0x7E0383 //4 0XAF, 0X83, 0X03, 0X7E ASL A //1 0X0A STA 0x046116 //4 0X8F, 0X16, 0X61, 0X04 LDA 0x0001 //3 0XA9, 0X01, 0X00 STA 0x007AFE //4 0X8F, 0XFE, 0X7A, 0X00 SKIP LDA 0x046116 //4 0XAF, 0X16, 0X61, 0X04 LSR A //1 0X4A AND 0x0001 //3 0X29, 0X01, 0X00 BEQ SET_HIGHER //2 0XF0, 0X02 BNE SET_LOWER //2 0XD0, 0X08 SET_HIGHER LDA 0x046116 //4 0XAF, 0X16, 0X61, 0X04 INC A //1 0x1A INC A //1 0x1A BRA DONE //2 0X80, 0X08 SET_LOWER LDA 0x046116 //4 0XAF, 0X16, 0X61, 0X04 DEC A //1 0x3A DEC A //1 0x3A BRA DONE //2 0X80, 0X00 DONE STA 0x046116 //4 0X8F, 0X16, 0X61, 0X04 PLY //1 0X7A PLX //1 0XFA PHA //1 0X68 JUMP GAME_CODE //4 0x5C, 0xB2, 0x9F, 0x04
Last edited on 2010-11-11 10:14:40 AM by tehaxor69.
@tehaxor69:
Even 64 colors would be sufficient to have a single Yoshi-color for each level. However, thank you for it! But how do I apply it? I pasted the hex-code you noted at the end of each opcode from 0x1FFE7A into a clean ROM, but doing this, changes nothing. Do I also have to apply the former ASM tweaks you posted? And is there a way to apply it the fast way, other than hex-editing?
Pages: « 1 2 3 4 »
Forum Index - Non-SMW Hacking - Yoshi's Island - Play as Super Mario and other Yoshi forms

The purpose of this site is not to distribute copyrighted material, but to honor one of our favourite games.

Copyright © 2005 - 2013 - SMW Central
Legal Information - Link To Us


Total queries: 29

Menu