Parallel Worlds Pikit Shield Palette Glitch

View previous topic View next topic Go down

Parallel Worlds Pikit Shield Palette Glitch

Post by qwertymodo on Fri 29 Apr 2016 - 0:13

Apparently, when a Pikit steals your shield, it glitches out the palette. Unlike the similar vanilla aLttP glitch, it doesn't require you to use Ether in order to trigger it, the palette changes as it grabs the shield, and remains when it's dropped, regardless of the weapon used to kill it. Picking up the shield restores the proper palette. I'm not very familiar with the palette code, so this one might take me awhile. If anybody has any idea where to start tackling this, I'd appreciate the tips.

I've confirmed it in PWv1.1, so it's not a side effect of my patch.

avatar
qwertymodo



Since : 2014-10-21

Back to top Go down

Re: Parallel Worlds Pikit Shield Palette Glitch

Post by Conn on Fri 29 Apr 2016 - 4:33

It's a sprite so I would probably start looking here:
https://www.zeldix.net/t444-change-global-palette-of-a-sprite

0xE6 = Shield Pickup (Fighter or Red Shield after being dropped by a Pikit)
pc 06/B359+e6=06/B43f:DF (I'd try dd, db, d9,d7 here)
This will change the color of the shield after having defeatet like-like

The one when he is stealing took me a while, it is
pc 06/D857: 2f


So basically both you need to change is
06/B43f: DF -> ??(when collecting the shield)
06/D857: 2f -> ?? (when stealing the shield)

This will change the global palette

You also unfortunately need to repixel the shield after changing the global palette via zcompress and yy-char. Maybe Puzz can assist you here?
avatar
Conn



Since : 2013-06-30

Back to top Go down

Re: Parallel Worlds Pikit Shield Palette Glitch

Post by qwertymodo on Fri 29 Apr 2016 - 15:10

Looks like the shield in the pause menu also has issues, but it's using a different palette. I kinda wonder if the shield might be hard-coded to using a 4-color palette, since that's what the original used (and HM only displays 4 colors in the palette editor), and I'm curious how they managed to get 6 colors when Link is holding it...

avatar
qwertymodo



Since : 2014-10-21

Back to top Go down

Re: Parallel Worlds Pikit Shield Palette Glitch

Post by qwertymodo on Fri 29 Apr 2016 - 15:30

Well, here's the result of various palette values I tried:

avatar
qwertymodo



Since : 2014-10-21

Back to top Go down

Re: Parallel Worlds Pikit Shield Palette Glitch

Post by Conn on Fri 29 Apr 2016 - 15:35

No that's the right palette. You have 2bpp tiles in the menu and 4 bpp tiles in the game.
That means, each menu tile can only have 4 colors, while the first is transparent. Then you need black, resulting in only 2 different colors to draw your stuff, where one is usually white... thus you only have one effective color. You can trick because every item is 4 tiles, but that is mainly all you can do to make the items more attractive.

Since blue is the main color of L2 shield, this is the best one can come up with.
avatar
Conn



Since : 2013-06-30

Back to top Go down

Re: Parallel Worlds Pikit Shield Palette Glitch

Post by qwertymodo on Fri 29 Apr 2016 - 16:07

Ok, so the menu one is what it is, that makes sense.  I think I found the palette they're using in HM, but I don't know how that corresponds to an actual palette address.  From the docs I've read, the sword and shield use the upper and lower halves of a single palette.  When you combine them, you get this



So, I guess the million dollar question is... where is that palette?
avatar
qwertymodo



Since : 2014-10-21

Back to top Go down

Re: Parallel Worlds Pikit Shield Palette Glitch

Post by Conn on Fri 29 Apr 2016 - 16:21

No, it is this here:



Take a time to understand this image. Top left is the complete 256 color palette, only the lower part however is used for sprites (upper part are bg layers and the most uper part is menu). From the lower sprite palette, the left part is used for monsters on screen, and also the shields. I rotated counter- clockwise to make it more clear to you which palette each shield value uses.

The right part is for Link and out of chest items.

Unfortunately, repixeling to the right (Link) palette is for reasons I do not know not possible. I already tried hard. So I cannot come up with a solution here... Puzz, is there a way to repixel monsters to the right side of the palette?
If it fails, I think it's best you use palette 5 for this problem. Even if it doesn't match, this blue is still better than palette F
avatar
Conn



Since : 2013-06-30

Back to top Go down

Re: Parallel Worlds Pikit Shield Palette Glitch

Post by qwertymodo on Fri 29 Apr 2016 - 17:24

Well, if nothing else, I managed a halfway decent repixel of palette D9



avatar
qwertymodo



Since : 2014-10-21

Back to top Go down

Re: Parallel Worlds Pikit Shield Palette Glitch

Post by Conn on Fri 29 Apr 2016 - 18:32

Awesome job Razz
avatar
Conn



Since : 2013-06-30

Back to top Go down

Re: Parallel Worlds Pikit Shield Palette Glitch

Post by qwertymodo on Mon 13 Jun 2016 - 17:48

Ok, so there's one more place the palette needs to be changed: in the store.  I'm trying to find the data table for that one, but so far no luck.  Here's the NO$SNS OAM view, if that's in any way helpful.  The palette should be OBP4 in order to match the Pikit steal/drop sprites.

avatar
qwertymodo



Since : 2014-10-21

Back to top Go down

Re: Parallel Worlds Pikit Shield Palette Glitch

Post by qwertymodo on Tue 14 Jun 2016 - 15:50

Huzzah

Code:
0x0F7423: $04->$0A

avatar
qwertymodo



Since : 2014-10-21

Back to top Go down

Re: Parallel Worlds Pikit Shield Palette Glitch

Post by Puzzledude on Wed 15 Jun 2016 - 7:35

Great, since that shield on the floor, when being sold, is always a pain to get to correct pals in all Alttp hacks.
avatar
Puzzledude



Since : 2012-06-20

Back to top Go down

Re: Parallel Worlds Pikit Shield Palette Glitch

Post by qwertymodo on Fri 17 Jun 2016 - 17:13

Oh joy, more sprite palette issues...



Even better, this one's a code bug. It loads the right palette for exactly 1 frame, then the next frame, when it gets to that same subroutine, the X register is incorrect, so it loads the palette from an adjacent sprite instead... this should be all kinds of fun to debug Sad
avatar
qwertymodo



Since : 2014-10-21

Back to top Go down

Re: Parallel Worlds Pikit Shield Palette Glitch

Post by Conn on Fri 17 Jun 2016 - 21:32

more bugs than in a rotten corpse, eh?

Luckily those palette bugs are easy to fix out of my experience, check:
https://www.zeldix.net/t444-change-global-palette-of-a-sprite

palette is stored to
$0E60[0x10] (lower 4 bit)

But guess you know it already. Strange though that you speak about the x register, usually the Y register is involved to load the palette data from the table:
Code:


$8D/B863 B9 59 B3    LDA $B359,y[$8D:B37B]
$8D/B866 9D 60 0E    STA $0E60,x[$8D:0E6D]
  
avatar
Conn



Since : 2013-06-30

Back to top Go down

Re: Parallel Worlds Pikit Shield Palette Glitch

Post by qwertymodo on Sat 2 Jul 2016 - 0:18

Ugh... the shield on the floor in the shop uses your currently equipped shield palette (or at least that's the only one that was the right color when I was testing), so it's right if you currently have the Hylian Shield, but if you go into the shop carrying a different shield, it's wrong.  I give up on that one :/
avatar
qwertymodo



Since : 2014-10-21

Back to top Go down

Re: Parallel Worlds Pikit Shield Palette Glitch

Post by qwertymodo on Thu 11 Aug 2016 - 20:06

Ok, so the pendant palettes are having a similar issue to the shield-on-the-overworld sprites, they can only use the first half of the palette.  I'll need to repixel them as well as picking a different palette for them.  It just so happens that the emerald has all of the relevant colors in the first half of its palette, so it displays correctly.

Edit:  I'm having a hell of a time trying to track down those two sprite palettes.  Conn, any ideas?

Edit 2: Here's the result of the repixel, if I can find those palettes...

avatar
qwertymodo



Since : 2014-10-21

Back to top Go down

Re: Parallel Worlds Pikit Shield Palette Glitch

Post by qwertymodo on Fri 12 Aug 2016 - 14:25

Aha!  Those palettes were located in the code, not in a table. Load immediate really is the bane of reverse engineering >_<

Code:
858932 lda #$09
858934 jsr $8cd3
858937 lda #$0b
858939 jsr $8cd3
85893c lda #$0f
85893e jsr $8cd3

Another one bites the dust Very Happy



Edit: For some odd reason, it swapped the Goron's Ruby and Zora's Sapphire, but I'm not going to complain...
avatar
qwertymodo



Since : 2014-10-21

Back to top Go down

Re: Parallel Worlds Pikit Shield Palette Glitch

Post by Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum