Posts for Dwedit

Post subject: Re: #1476: dave_dfwm's NES Dragon Warrior 3 in 2:14:07.67
Dwedit
He/Him
Experienced Forum User
Joined: 3/24/2006
Posts: 692
Location: Chicago
sliverjazz wrote:
this was way boring
I would highly doubt anyone would watch this completely through without hitting the fast forward key.
Dwedit
He/Him
Experienced Forum User
Joined: 3/24/2006
Posts: 692
Location: Chicago
Now some possible ideas for planning out a route: Stealing should be OK since there will be very little of it Possible to use luck manipulation to get rid of enemies? That would kick ass. Should party be killed off? That's kinda slow to do. But then you can just invisible the avatar to avoid all fights. * Win initial battle * learn how to use moon orb spells: * get spell book (take it or buy one) * learn unlock magic from horance * learn dispel field from xiao rune of valor/invisiblity ring: * get cheese * get Sherry * warp to valor town * let sherry into mousehole * get rune, possibly get invisiblity ring if it's necessary sutek's castle: * Need unlock and dispel field * Hydra on right side * follow dungeon to right side * get balloon plans * there's also a backdoor enterance exclusive to the SNES Version, but it's probably slower. build balloon: * big basket from basket-maker in Minoc * buy spider silk (cheapest from horance) * spin silk in paws * charlotte in New Maginca weaves it * someone in paws makes it into a bag * Cauldron? Buy it or steal it? (where?) * assemble baloon * fastest way to travel after using red gates? rune of compassion: * at certain time of day, Ariana and Mother are in bar together, easy to get rune then runes of justice, honor, spirituality: * just take it rune of honesty: * in the dungeon * dungeon has two enterances, can enter either from tavern or Xiao's room * if xiao's room faster, do this while getting dispel field * Need unlock magic, or powder keg, I forget rune of humility: * wild goose chase, talk to people in sequence rune of sacrifice: * get log, probably while getting rune of justice * cut log * have julia make panpipes * learn 'stones' from gwenno * get rune moonstones: * probably get beh lem first * use runes at each shrine to get the moonstone * Faster travel from shrine to some destinations? vortex cube: * Just get it, balloon helps * Use powder keg, skip that fish for key crap lenses: * get broken lens from hall of knowledge * fix lens at gargish repair guy * make concave lens 3 dunegons: * Each ends with demon battle, hopefully that can be skipped
Post subject: Ultima 6 is begging for it...
Dwedit
He/Him
Experienced Forum User
Joined: 3/24/2006
Posts: 692
Location: Chicago
Ultima 6 - The False Prophet is really begging for a TAS. This is one of the few huge, epic RPGs where 95% of all the content is skippable. spoilers? So far, my understanding of the game is that you have the following goals: * Learn Unlock Magic, and Dispel Field * Get balloon plans from sutek's castle * Make balloon * Get amulet of submission * Fix gargish lens * Get britanian lens * Get vortex cube * Get runes * Get moonstones * Clear shrines of diligence, control, passion. * Beat game I'm not sure yet how tool assistance would be much faster than playing manually, since there is a slow walking speed. Perhaps enemies can be manipulated to never appear? Otherwise you'd need invisibility effects.
Dwedit
He/Him
Experienced Forum User
Joined: 3/24/2006
Posts: 692
Location: Chicago
Really glad to see that people are having fun with my Rom Corruptor program.
Dwedit
He/Him
Experienced Forum User
Joined: 3/24/2006
Posts: 692
Location: Chicago
If you give a damn about speed, don't run it in Super Gameboy Mode. SGB Data transfers take extra time, like 6 frames a transfer. And there's at least one transfer every time the area changes. Running it in SGB mode costs about 2.3 seconds of Bootup time, for all the initial VRAM transfers to set up the palettes and attribute images. Of course, you also get much nicer colors in SGB mode than otherwise :)
Dwedit
He/Him
Experienced Forum User
Joined: 3/24/2006
Posts: 692
Location: Chicago
(cannot vote since I'm a "lurker") Great job there! Awesome trick with the bomb crags, that works well even in non-tool assisted play. I'd love to see the Glitch Run, if anyone decides to make that, because I'm not going to make that video :). Too much crazy route planning.
Dwedit
He/Him
Experienced Forum User
Joined: 3/24/2006
Posts: 692
Location: Chicago
Now that I've actually looked deeper, mem[93...96] is the tile number the character is standing on, and mem[68...6B] is the party's order after taking out the dead people. There's also a table at 6DE0 (32 bytes large) that says what each tile counts as. 05 is swamp, 06 is barrier. Normally the code runs 4 times in the loop, then it's over, but here we have the boundary condition bug causing it to execute 255 times. Reads out of bounds for both tile number under players, and character numbers. So the code looks at table 93 to check what tile the character is standing on. It ands it with 1F because there is a 32 tile limit, higher bits indicate which roof number the tile is under. Then it uses that as an index into table 6DE0 to see what tile type the player has stepped on. It checks if it's Swamp (tile 05) or Barrier (tile 06). If so, it damages the player. To pick which player it assigns damage to, it looks at table 68, usually containing 00 01 02 03. If the second party member was dead, it would contain 00 02 03 XX. In the fortune telling room, tile number 1 is a swamp tile, and there are no barrier tiles. That's where the comparison with 1 came from in my above post. But if you were in a room with barrier tiles, then your items/stats would go down by 15 each step. So now the algorithm kinds looks more like this C psuedocode:
Y=0
do
{
	tile = tileUnder[Y] % 32
	tileAction = tileActions[tile]
	if (tileAction==5) //swamp
	{
		character=LivingParty[Y]
		damage_character(character,2)
	}
	if (tileAction==6)
	{
		character=LivingParty[Y]
		damage_character(character,15)
	}
	Y++
} while (Y != numLivingPartyMembers)
And it fails very badly if numLivingPartyMembers == 0.
Dwedit
He/Him
Experienced Forum User
Joined: 3/24/2006
Posts: 692
Location: Chicago
Note that the bug is also decreasing party member #2 and #4's max hp in that example. Also note that you will almost never see consistent behavior from the bug, it all varies depending on the current contents of zero page ram. Random trivia: game genie code EPOUIZEI fixes the bug :)
Dwedit
He/Him
Experienced Forum User
Joined: 3/24/2006
Posts: 692
Location: Chicago
First look at the item chart: http://www.datacrystal.org/wiki/Dragon_Warrior_III:RAM_map Each step decreases the item number by 2. You can only take an odd number of steps, minimum 5. For example, if you want a Final Key, you can get it from an Acorns of Life in 5 steps, or a Wing of the Wyvern in 7 steps. Guess which source item is easier to get. Or you can get black pepper with 11 steps from Medical Herb. You can get orbs in 5 steps from these weapons: 01 Club 02 Copper sword 03 Magic Knife 04 Iron Spear 05 Battle Axe 06 Broad Sword Problem basically is that each item transformation takes about 1:30 of real time.
Dwedit
He/Him
Experienced Forum User
Joined: 3/24/2006
Posts: 692
Location: Chicago
I just sent a demonstration of turning a wing of the wyvern into a final key to youtube... Yeah, I ran the TAS until it reached assaram, then stopped it and played from there. I hex-edited the inventory to add the dream ruby and wing of the wyvern. Youtube says the video isn't up yet. http://www.youtube.com/watch?v=38bEtt6Bxv8
Dwedit
He/Him
Experienced Forum User
Joined: 3/24/2006
Posts: 692
Location: Chicago
I've disassembled the game to find out HOW the bug works, so I'll be editing this post shortly... How the bug works: It's stuck in a loop somewhere. It's incrementing a variable (let's call it Y), then checking if it is equal to the max value. Unfortunately, the max value is ZERO, and it's comparing after incrementing. So it's stuck chugging away in the loop way beyond the loop's max value. In normal circumstances, Y will never be greater than 3, but this is a crazy wacko out of bounds loop. RAM involved: address 93+ (Contained 55 49 49 49 when I looked, probably 4 bytes large) address 68+ (Party member numbers, 01 02 03 03 when I looked)
The bug algorithm:
Y=Y+1
If mem[93+Y]&1F == 1  //this is the swamp tile check, fortune telling room has swamp as tile #1
	X=mem[68+Y]  //normally, X is between 0 and 3, but in this case it's way off!
	Deal Swamp Damage to party member #X
Repeat until Y overflows 255 back to zero

Swamp Damage:
	hp=mem[71C+X*2]  //16 bit value
	hp=hp-2
	If hp went below zero, set it to zero
	mem[71C+X*2]=hp
What happens is that this gets called with some invalid X that came from nowhere, so it messes up your stats. The exact effects are only predictable if you look at the entire Zero Page memory contents. For example, I took a memory dump, and ran a program to calculate X*2 for each Y where it would deal swamp damage:
.. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. 
.. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. 
.. .. 0E F4 .. .. .. .. .. .. .. .. .. 92 .. .. 
.. .. .. AC .. 06 .. .. .. .. .. .. .. .. .. .. 
.. .. .. .. .. .. .. .. .. .. 00 .. .. .. .. .. 
.. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. 
.. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. 
.. .. .. .. .. .. 16 .. .. .. .. .. .. 30 .. .. 
.. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. 
.. .. .. .. .. .. .. .. .. .. .. .. 12 .. .. .. 
.. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. 
.. .. 00 .. .. .. 0C .. .. .. .. .. .. .. .. .. 
.. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. 
.. .. 00 .. .. 68 .. .. .. .. 4E .. .. .. 00 .. 
00 .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. 
.. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. 
Depending on the value of X*2, it will decrease one of these by 2:
Current HP	0
Current MP	8
Maximum HP	10
Maximum MP	18
Status		20
Experience	29
Name		40
Items		60
Wizard's Battle Magic	80
Wizard's Field Magic	83
Pilgrim's Battle Magic	84
Pilgrim's Field Magic	87
The 68 on the table is key, that modifies the second party member's first item. That value isn't always going to appear on the table, I was just really lucky to get it.
Dwedit
He/Him
Experienced Forum User
Joined: 3/24/2006
Posts: 692
Location: Chicago
Yeah, this is VERY abusable, and would warrant both a bugs exploited run, and a pure run. On my test, I was lucky enough to get these effects with each step: Decrease Spells #3 Decrease item slot in second party inventory The "Decrease Spells" effect subtracts 2 from the spells known byte, teaching spells like healall, defeat, infermost, sacrifice, vivify, revive on a pilgrim.
Dwedit
He/Him
Experienced Forum User
Joined: 3/24/2006
Posts: 692
Location: Chicago
Right now I'm looking to see the exact mechanics of how the bug works... So far I see it works by triggering the code which handles poison swamp, but with an invalid [random?] value for register X. Normally register X specify's which character to decrease the HP for, but it's not valid here, so it's modifying the value at address First Player's HP + some random X. So the game thinks its decreasing your HP, and checks to see if the value goes below zero. It's a 16-bit check, if the 16-bit value covers two clubs, it's okay, but two unequipped cypress sticks is not. From the hex values for items, a cypress stick/nothing will have to decrease 3 times (00=cypress stick, FE = black raven, FC=green orb), and a club will have to decrease 4 times (01 = club, FF = nothing, FD=slime stick, FB=blue orb) I haven't tested the game's orb acceptor, but it might accept 6 green orbs. Game modifys 71C + X, player's inventories are 77C-79B. X must be between 60 and 7F. edit: I just tried it out, and manged to get the item number to decrease by two every step taken. On my trials, it modified the first slot of the second party member. There is a minimum of 5 steps to walk total. You can take 5+any multiple of two steps. Possibly useful: Cypress Stick (00) changes to Rainbow Drop (76) in 5 steps Club (01) changes to Silver Orb (77) in 5 steps Wing of Wyvern (68) changes to Final Key (5A) in 7 steps
Dwedit
He/Him
Experienced Forum User
Joined: 3/24/2006
Posts: 692
Location: Chicago
I just did a really bad job of explaining the 'dream ruby' bug, that thing is a big memory corruption bug targeted at the area around your stats. To do it correctly: Kill off your hero Use the dream ruby to paralyze all three other party members. While getting your fortune told, your name/stats will be replaced by the dead party member. Each step you take upstairs displays a "Heroname has died" message 7 times, and decrements a random byte of your stats each message. Now your job as the TAS guy is to manipulate the memory corruption bug. I just tested it out, it corrupted the first letter of the character's name, the list of learned spells, the first weapon, etc, screwed up the name of the 4th party member, etc. I'd say keep a memory viewer open, and see if it's corrupting a useful byte (like the MSB of your experience!), or possibly the byte which indicates your class and gender. Only major problem is that it takes about a minute of real time to get out of the room, since there's 7 "you have died" messages triggering every step your take. I'm pretty sure if you load up your inventory with low numbered items (cypress stick, club) and do the glitch, you will end up with equipped orbs. I don't think the game cares about placing duplicate orbs. Also, Pilgrim + Zombie Slasher penetrates metal enemies.
Dwedit
He/Him
Experienced Forum User
Joined: 3/24/2006
Posts: 692
Location: Chicago
Remember that Zelda 2 lets you warp to the first palace from the 2nd or 5th, and the third palace from the 4th or 6th.
Dwedit
He/Him
Experienced Forum User
Joined: 3/24/2006
Posts: 692
Location: Chicago
FDS games, after being loaded, are stored in RAM, so rom-based cheat codes (Game Genie Codes) make no sense. Use an emulator's cheat finder for simple variable based codes, like freezing the number of lives, etc. That should be enough for most purposes, read no further. For cheats which modify the game's logic (ie, don't lose lives, don't die, etc), you need to find the ram value which controls the state, then use a NES debugger to see when it writes to that address, then change the ASM code. Maybe nop it out, or have it change a different address.
Dwedit
He/Him
Experienced Forum User
Joined: 3/24/2006
Posts: 692
Location: Chicago
Ryan8bit wrote:
While playing on the actual cartridge, I encountered a glitch once while levelling up on metal slimes, but I'm not sure if I can recreate it. I had a pilgrim who did 20+ damage to a slime that was not a critical hit. He was equipped with a zombie slasher, so I was wondering if perhaps it had something to do with the weapon's bonus. But it could've been something different altogether.
I've had the 20+ damage on metal slimes happen to me recently too, and it happens consistently. Always with a pligram attacking, and with a Zombie Slasher equipped. Seems to happen more often with metal slimes appearing after the third one, but I can't tell for sure. I encountered this in the tower north of dhama. On another note, in DW2, when a Mace Master revives a metal babble, it comes back with tons of HP, and almost no defense.