Jump to content

Photo

A fourth, "Red Sword" found in Zelda 1


  • Please log in to reply
1 reply to this topic

#1 Anthus

Anthus

    Lord of Liquids

  • Members
  • Location:Ohio

Posted 03 April 2017 - 09:43 PM

I have been binge watching this video series called "Devs Play", and the guy that made Hack n Slash is playing a hard modded copy of Z1. It's really neat, and if you have the time, you should check it out, but, at 11:15 he is inputting different hex values assigned to which sword you have, and after the Magic Sword, there seems to be a "Red Sword". What is interesting though, is that this sword seems to be at least as powerful as the Magic Sword cause it one shots basically everything I've seen. It also seems to take its colors from whatever palette is loaded as it changes in dungeons. People might already know about this, but it not, here ya go.

 

 

Again, skip to 11:15 to see him get the red sword.



#2 Saffith

Saffith

    IPv7 user

  • ZC Developers

Posted 03 April 2017 - 10:58 PM

Hard to be sure, but I doubt that's something specifically coded into the game. Each sword's palette is the same as its level-1, and its power is 8<<level. The only difference between them that requires different handling in the code is the icon tiles. It does show a non-magical sword icon, but there's no telling whether that means anything.

It's using the palette that corresponds to CSet 9 in ZC. They probably wouldn't have used it deliberately for the same reason you wouldn't do that in ZC.


Later update: I tried playing with it myself. He was wrong about something: setting it to 5 does not wrap back around to the wooden sword. It uses the same palette (which makes sense, because it definitely only uses two bits for those), but the behavior is different. It does no damage. That fits with what I suggested above; 8<<5 overflows and becomes 0. It does still cause enemies to flash and be knocked back. Oddly, the beams still do damage, but only as much as the wooden sword's.

Setting the sword to level 7, the one that would wrap back around to the magical sword, produces a sword that uses the magical sword's palette with the other swords' sprite. That suggests the code that draws the sword is specifically checking if level==3.

It seems to be that the sword's level (minus 1) is given directly to the PPU as the sprites' attribute bytes, which means higher values are more interesting, because the upper nibble sets the sprite flags. Sword 21 is drawn behind the background. Sword 81 is drawn upside-down.

Damage gets a bit more complicated for the higher level swords. Level 5 does no damage, level 6 does twice the magic sword's damage, level 7 does 1/16 the wooden sword's damage. Sword FF takes three hits to kill a red octorock, which isn't possible with powers of two. I would guess it has something to do with the carry bit being set, which isn't normally possible, but I'm not certain a simple ROL and counter would explain it.

 

Other leveled items exhibit similar behavior.

 

LoZ-FFFFFFFF.png

 

That's a potion with 255 uses. Arrows fired from that bow are drawn behind the background.

 

The candle doesn't do anything interesting; it's just the plain old red candle. I suspect that's because the fire sprite is separate from the candle sprite, so it doesn't have the flags applied.

 

The boomerang's especially interesting. The regular and magic boomerangs are separate items. The regular one is always the same, no matter its value. The magic boomerang's icon never changes, but its thrown sprite does change palettes and flags. So apparently the magic boomerang is considered a leveled item and the regular one isn't.


Edited by Saffith, 05 April 2017 - 12:02 PM.

  • ShadowTiger, Rambly, Anthus and 3 others like this


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users