Banner
Views: 291,046,411
Time: 2014-04-25 01:21:09 AM
3 users online: Blittle McNilsen, GrandChaos9000, XerX - Guests: 17 - Bots: 67Users: 24,816 (1,109 active)
Latest: megamario x
Tip: Don't put a coin over a question block. It will create an invisible solid block above the ? block if the block is hit first.
More than one looks of a yoshi coin glitch fixed.
Forum Index - SMW Hacking - General SMW Hacking Help - SMW Data Repository - More than one looks of a yoshi coin glitch fixed.
Pages: « 1 »
As my times in hacking, i seen that people tried to have more than one yoshi coin. If you originally set object 41(yoshi coin) and have two other custom objects act like it, object 41 works but the other two keep glitching with a MAP16 tile. I discovered today that the MAP16 tile is none other than tile 625. If you set it to act or look like tile 25(or anything else), it will show up and react to it. To those who wish to fix the "custom" yoshi coin glitch, replace MAP16 tile 625.

EDIT: I will know if there is already info...
Last edited on 2010-10-27 03:04:49 PM by Ruberjig.
Originally posted by Ooroo
I discovered today that the MAP16 tile is none other than tile 625.

More like "tile 25 of whatever Map16 page you placed the Dragon Coin tiles on".
This is actually quite nice.
One could have one set of dragon coin tiles that become air, and one set that becomes water and etc.

However, since we have the dragon coin sprite, I am questioning the usability of this =P
Yes but this is the block version. Also for some strange reason, I have five different tiles that act like yoshi coins, but they are still tile 625. There is no other custom MAP16 tile involved, just that one.
Ooroo, are all 5 on Map16 page 6?

Yeah, the Yoshi coin code uses value $18 in $9C, which covers both tiles at once, instead of value $01 like the coin does. But the code for value $18, beginning at $00C1AC, isn't designed in a way that makes the coins compatible with Map16 pages beyond 0 (or subscreen boundaries, for that matter). That gives me an idea for a patch...

If anyone wants to make a custom Yoshi coin object, by the way, here's the code, disassembled and adapted from $0DB2CA:

Code
LDA $13BF		; level number
LSR #3			; divided by 8
TAY			; provides the *byte* index into the table
LDA $13BF		; level number
AND #$07		; AND #$07
TAX			; provides the *bit* index into the table
LDA $1F2F,y		; check the "collected all 5 Yoshi coins" flags
AND $0DA8A6,x		; $0DA8A6 is just a simple bit table
BNE NotAppear		; if the flag for the current level is set, then the coin will not appear
LDX $13BE		; item memory settings
LDA #$F8			; the start of the item memory tables is at $19F8; the low byte is F8
CLC			;
ADC $0DA8AE,x		; this table holds three bytes, one for each item memory setting
STA $08			; set the low byte of the item memory pointer
LDA #$19			; the start of the item memory tables is at $19F8; the high byte is 19
ADC $0DA8B1,x		; this table also holds three bytes, one for each item memory setting
STA $09			; set the high byte of the item memory pointer
LDA $1BA1		; I think $1BA1 is the current screen being processed in the loading routine...
ASL #2			; multiply this by 4
STA $0E			; $0E will be our index to the item memory table
LDA $0A			; $0A held the first byte of object data, the "NBBYYYYY" byte
AND #$10		; if the highest "Y" bit was set...
BEQ OnTopSubscreen	; then this object is on the bottom subscreen (or right subscreen in a vertical level),
LDA $0E			;
ORA #$02			; so we set bit 1 of the item memory index
STA $0E			;
OnTopSubscreen:		;
LDY $57			; $57 is the object's position within the subscreen
TYA			;
AND #$08		; if bit 3 of this is set...
BEQ OnLeftHalf		; then this object is on the left half of the screen,
LDA $0E			;
ORA #$01			; so we set bit 0 of the item memory index
STA $0E			;
OnLeftHalf:		;
TYA			;
AND #$07		; get the object's position within a specific 8x1 block of tiles
TAX			; -> X
LDY $0E			; load our item memory index
LDA ($08),y		; check the item memory settings
AND $0DA8A6,x		; if the item memory bit for this particular position is set...
BNE NotAppear		; then the object will not appear
LDY $57			; if the object *is* supposed to show up...
LDA.b #!TopTile>>8	; then set the tile number of the top tile
STA [$6E],y		; [$6E],y holds the high byte
LDA.b #!TopTile		; (note that SMW used a subroutine to set the high byte, since it was always 00 or 01)
STA [$6B],y		; [$6B],y holds the low byte
JSR ShiftObjDown		; shift the base position index down one tile
LDA.b #!BottomTile>>8	; set the tile number of the bottom tile
STA [$6E],y		; high byte
LDA.b #!BottomTile		;
STA [$6B],y		; low byte
NotAppear:		;
RTS

ShiftObjDown:		;

LDA $57			;
CLC			;
ADC #$10		; shift the subscreen position down one line
STA $57			;
TAY			;
BCC NoChangeScreen	; if there was no overflow, don't shift the subscreen number
LDA $6C			;
ADC #$00		; the carry flag is already set, so add 1 to the subscreen number
STA $6C			;
STA $6F			;
STA $05			;
RTS			;
Thank you for the code. It'll be helpful.

Also, three are on MAPpage 5, one is on MAPpage 8, and one is on MAPpage B. No matter what i did, the tile imitated tile 625. I tried many ways to change it, but was the same exact tile. Unlike the coin tile and block glitch where you hit the block with a coin on top, the generated tile where the coin was is tile 152. Tile 152 also affects the all note blocks and hit blocks.
Last edited on 2010-10-28 06:02:41 PM by Ruberjig.
Pages: « 1 »
Forum Index - SMW Hacking - General SMW Hacking Help - SMW Data Repository - More than one looks of a yoshi coin glitch fixed.

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

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


Total queries: 29

Menu

Affiliates

  • Talkhaus
  • SMBX Community