Posts for Nitrodon


1 2
13 14
Experienced Forum User, Published Author, Active player (283)
Joined: 3/4/2006
Posts: 341
You can ignore the phrase "8-bit", since I only used that to distinguish it from 16-bit values. The only time I used the phrase "16-bit" was in reference to 7e0024, which means the number (7e0025)*256 + (7e0024). After adding the portion of the product to this number, you rotate the entire number right by one bit and store in the same place. That is, if the relevant bits of the product are zero, then 0100101111011001 (7e0025=75, 7e0024=217) becomes 1010010111101100 (7e0025=165, 7e0024=236) One slight caveat I didn't mention (and is not in the definition of rotating right) is that if the addition causes the carry flag to be set (i.e. goes over 65536), the highest bit of 7e0025 will be set anyway, regardless of the content of the lowest bit of 7e0024. This is likely intended to ensure that 7e0024 and 7e0025 are never both zero, which would zero all future random numbers if it occurred. I hope this helps you understand it better.
Experienced Forum User, Published Author, Active player (283)
Joined: 3/4/2006
Posts: 341
I generated a few hundred random numbers, and there were no blatant patterns like the one you described. This leads me to conclude that the patterns are a result of the game deciding how many times to call the PRNG function before . This could be confirmed by checking the values in 7e0024-7e0026 after each attempt For reference, the PRNG function is: Multiply 8-bit 7e0024 and 8-bit 7e0026 and store in a temporary variable. Add 109 (0x6D) to 7e0026 and store in 7e0026. Take bits 2-3 of the product as a number between 0 and 3, and add to 16-bit 7e0024. 16-bit rotate right and store in 7e0024. Return bits 4-11 of the product. (bits 0-1 and 12-15 are unused) Setting 7e0026 to 147 will cause the second random number generated in each frame to be 0. By your analysis, this random number affects critical hits and item drops. Similarly, setting it to 0 will fix the first random number each frame, which appears to determine whether you hit.
Experienced Forum User, Published Author, Active player (283)
Joined: 3/4/2006
Posts: 341
If you're just looking for a Trump (first two morph slots), the string of random numbers beginning at 0x3E should work with Magicite.
Post subject: Re: Spells
Experienced Forum User, Published Author, Active player (283)
Joined: 3/4/2006
Posts: 341
Due to the way the PRNG works, Magicite -> Ragnarok can give you the second morph slot for any monster Ragnarok can morph, the first or third for monsters with morph success rate 25% or higher, and the fourth only on monsters with the maximum morph success rate. This is bad news for anyone who wants an early Flame Shld, which is in the fourth slot of its group. On the other hand, Bar-Bar-Bar appears to choose its random esper when the command is selected, which would make it suitable for this task.
Highness wrote:
Catastrophe wrote:
Gogo only knows the spells of your other three current party members, right?
Wrong I beleive. Atleast not what I can remember. Gogo has to learn the spells on his own. Unless I missed some big point with grabbing him? =D
Gogo can't learn spells on his own.
Experienced Forum User, Published Author, Active player (283)
Joined: 3/4/2006
Posts: 341
The combined spell list only applies to your current group of four. The loop that populates this list is at C2/5589-55B0, followed by a loop at C2/55BA-55E1 which puts the spells in the order chosen. My trace was done at the very beginning of the game when only Terra knew magic, so I didn't notice the loop combined all four lists into one. If you actually decide to follow this disassembly, note that there is a slight error with SEP/REP following at C2/5598. The command there should be ADC #$1A6E, and there should not be an INC at C2/559A.
Experienced Forum User, Published Author, Active player (283)
Joined: 3/4/2006
Posts: 341
The glitched command is number 0x20 (F2 command script). It seems to load the value from $B8 (targets) into $11E0 (formation number) for some reason. It doesn't seem that you can get into formation 335, 514, or 463 this way, but you can reach a glitched weak formation 512 (tier 2). Alternatively, advancing to formation 8192 gives you just under 60k experience total. http://dehacked.2y.net/microstorage.php/info/1127/sketchGlitch512.smv http://dehacked.2y.net/microstorage.php/info/1128/sketchGlitch8192.smv
Experienced Forum User, Published Author, Active player (283)
Joined: 3/4/2006
Posts: 341
Tying a narrow strip of paper into a knot requires three folds: two to make a loop and one to put the paper through the loop. Thus the shape formed will be a pentagon, with one side where the paper enters, one side for each fold, and one side where the paper leaves. We will now show that the pentagon is regular. The "path" of the paper through the knot consists of four trapezoids whose vertices are four of the vertices of the pentagon. In addition, these trapezoids have the same height, namely the width of the paper. Consider one such trapezoid with vertices ABCE. Since all but one set of four vertices from ABCDE form a trapezoid, one of the following is true: 1) BCDA and EABD are trapezoids of equal height, and thus the distance from A to BC equals the distance from B to EA. 2) DEAC and CDEB are trapezoids of equal height, and thus the distance from E to AC equals the distance from C to EB. Either way, we can use congruent triangles to show that ABCE is an isosceles trapezoid. Hence ABCE is cyclic, and the edges EA and BC are congruent. Since a circle is defined uniquely by three points, considering all four trapezoids shows that ABCDE is cyclic and all five sides are congruent. Hence ABCDE is a regular pentagon. EDIT: Instead of saying ABCE is cyclic, it is easier to say that angles EAB and ABC are congruent, hence all five angels are congruent. The proof of regularity is then slightly more direct.
Experienced Forum User, Published Author, Active player (283)
Joined: 3/4/2006
Posts: 341
Erim: The desynch only happens in 1.0. With version 1.1, I am currently watching at the opera scene with no desynch. Catastrophe: I used Geiger's Snes9x debugger to find out which routine populated the spell list, then stepped through that routine while looking at a copy of the disassembly. If you want to look through it, the entire routine is at $C2/5551-568C, and the part that removes these blank spaces is at $C2/55ED-561C. If the first character does not exist, then the entire spell list will be initialized to FF.
Experienced Forum User, Published Author, Active player (283)
Joined: 3/4/2006
Posts: 341
Version 1.0 desynchs in Banon's scenario while trying to run away from a Leafer.
Experienced Forum User, Published Author, Active player (283)
Joined: 3/4/2006
Posts: 341
From looking at the ROM disassembly, it seems that the magic list works by deleting spaces 1,2,3 if unlearned, followed by 4,5,6 if unlearned and so forth. If this is indeed the case, the shortest path I can see to set up the sketch glitch takes 91 magic points. This number is reduced to 77 if you replace Kirin with Sraphim, but that may not be worth it. Kirin (learn all spells except Cure 2) Siren (learn all spells) Stray (learn Muddle, Imp) Shoat (learn Bio, Break) If I worked this out right, just change to a black-last order after learning these spells and Break will be in position 28 as desired.
Experienced Forum User, Published Author, Active player (283)
Joined: 3/4/2006
Posts: 341
Hoe wrote:
Nitrodon; Mind looking at the code I linked to above? My random drop item calculations seem to be off.
I can't see any code in that link, but there are two possibilities I can think of: 1) The enemy number starts at 0. 2) $4000+X. This number starts at 0x00 and increases by 1 each frame after the enemy is dead. The drop occurs at 0x10 (and disappears at 0xF0). 3) (edit) Something which has been bugging me about the trace: it starts by hitting and killing enemy 3 (and checking additional enemies up to 0x12), and ends with a drop from enemy 5 (and checking additional enemies up to 0x14). The item drop routine treats the enemy number as 5 in this case.
Experienced Forum User, Published Author, Active player (283)
Joined: 3/4/2006
Posts: 341
I've studied that trace (and learned 6502 in the process). The RNG is stored at $0008, and depends on the amount of work the CPU does in each frame. More precisely, each frame is handled by an interrupt sequence, and $0008 is changed between interrupts as follows: $FD56:E6 08 INC $0008 $FD58:E6 08 INC $0008 $FD5A:E6 17 INC $0017 $FD5C:E6 08 INC $0008 $FD5E:4C 56 FD JMP $FD56 and so forth until the next interrupt. When a drop occurs, the game adds the RNG value to the enemy number (00-14), drops all but the bottom 4 bits, and chooses an item from the following list: 01 00 05 00 05 00 00 03 03 00 01 00 00 01 00 01. (0 gives 01, 1 gives 00, 2 gives 05, etc.)
Experienced Forum User, Published Author, Active player (283)
Joined: 3/4/2006
Posts: 341
After this latest exercise in frustration, I am considering giving Erk a few levels so I don't have to go through Jerme's map in the real run. I could have done this in 5 turns if I had a better choice of equipment, or got Marcus an S in spears earlier, but there is no way that I am going through this chapter again right now. http://dehacked.2y.net/microstorage.php/info/896/FE7.vbm This will probably be my last update until the summer.
Experienced Forum User, Published Author, Active player (283)
Joined: 3/4/2006
Posts: 341
Chapter 24 completed. The mine trick is a very effective means of luck manipulation. If I gave Hawkeye a handaxe, I could have done it with one fewer enemy phase. Stats from Lyn's story do carry on to Eliwood's or Hector's story. http://dehacked.2y.net/microstorage.php/info/881/FE7.vbm
Experienced Forum User, Published Author, Active player (283)
Joined: 3/4/2006
Posts: 341
I have indeed seen Molotov's run currently up on SDA, and found it even more impressive than his previous run. I'm not sure what I could contribute in terms of new strategies though. Your chapter 4 strategy is probably faster than mine, but mine gets more levels which help later. I feel that the levels are worth more, considering I need Florina to fight in chapters 8 and 22, and probably 24 too. Manipulating critical hits does save time, even on the earlier chapters. If that manipulation comes at the cost of levelup stats, I will of course go for the stats at that point of the game. By the way, you were right about 3000000-3000005 being the RNG, and I thank you for that information. The numbers there are actually the last three 16-bit numbers generated so far. The next random number is a simple Z/2Z-linear function of these, as posted by "borkborkbork" in FESS3 while it existed, sometime between chapters 13 and 14 in my test run. No progress to report at this time. In chapter 24, I plan to take Vaida's spear with a mine, rout the enemy in 2 turns, then wait the rest of the time. If this doesn't stop the wyvern reinforcements, I will also block the spawn points. I'll lose Vaida in chapter 27, but I really don't need another unit in a TAS.
Experienced Forum User, Published Author, Active player (283)
Joined: 3/4/2006
Posts: 341
I decided to take this up, and am currently in the middle of a test run. http://dehacked.2y.net/microstorage.php/info/865/FE7.vbm Things I plan to change so far: Better movement and strategies in the earlier levels. More critical hits in the earlier levels. Don't get the mine in chapter 16. If I decide I want the Uber Spear, I'll consider stealing a mine in chapter 27. Take Guy's killing edge off of him earlier. Perhaps some other things I can't think of at the moment.
1 2
13 14