Editor, Emulator Coder, Experienced Forum User, Published Author, Expert player
(2853)
Joined: 3/17/2013
Posts: 392
I managed to get ACE on ff6 japanese version.
Here is a proof of concept video:
Link to videoUser movie #21824914608942764
FF6 Japanese version features a glitch called equip-anything glitch, where you can equip any item at any equipment slot. To equip an item on a weapon slot, for example, you must:
* sell every weapon that a character can equip
* place the item in the last (256) slot
* select "Optimise"
During a fight, when you attack with a weapon, the game loads the weapon graphics properties from address $ECE400+8*id into $623B-$6242. Address $6240, which stores if the weapon has a short or long range animation, takes values between 0 and 4. According to this value, the game loads a different function, as shown below:
$C1/C217 AD 40 62 LDA $6240
$C1/C21A 29 7F AND #$7F
$C1/C21C 0A ASL A
$C1/C21D AA TAX
$C1/C21E 7C 21 C2 JMP ($C221,x)
Pointers:
$C1/C221 34 C2
$C1/C223 47 C2
$C1/C225 2B C2
$C1/C227 C0 C2
$C1/C229 21 C3
However, for items that are not weapons, address $6240 can store any value, so that the jump instruction above leads to many wrong addresses. Among all the wrong jumps, the one with address $6240 being 0x07 (weapons X-Ether, Gold Hairpin, Czarina Ring or Charm Bangle) is interesting because the game jumps to address C1/8D7A which holds:
$C1/8D7A 1B TCS Push accumulator to the stack pointer
...
$C1/8DE6 60 RTS
The accumulator happens to be 0x000E when instruction TCS is executed, so at the RTS instruction, the game pulls the value of address $000F-$0010 and jumps there. Address $000E-$000F is the battle ticks (i.e. the number of frames since the beginning of the fight) and address $0010 is often used to store a pointer to ROM, so it can takes several values. So we have many possibilities to jump here, but still inside the C1 bank. To jump outside the C1 bank and hopefully inside RAM or SRAM, we need to execute long jump instructions.
When searching for JML (5C) instructions inside the C1 bank, I found several jumps into SRAM:
Among all these options, the first one ($000F = 0xC7; $0010 = 0xCE) was found to be possible as sometimes $0010 holds 0xCE during the wrong jump. $AE606F corresponds to address $006F in SRAM, which is saved from address $166F in RAM. This address and following ones store:
$166F Shadow's Sprite set (03)
$1670 Shadow's Level adjustment factor (03)
$1671-$1676 Shadow's Name
The first instruction is then interpreted as ORA $03,S and we can manipulate the next 6 bytes by cleverly naming Shadow.
To trigger the ending, the way I found was to overwrite the event pointer, a 24-bit address that stores where in the list of events ($CA0000-$CCE5FF) we are. The event pointer is stored at $E5-$E7. However, during a fight, the game makes a backup to $12E5-$12E7. To trigger the ending, we need to store 0x1362 into $12E5. However, as we are using name characters to write instructions, we have a limited choice, namely bytes 20 - 5C, 60 - CC, CE - D1 and D3. Using the name of many characters, I could overcome the limitations and came up with this set of instructions:
AE/606F: 03 03 ORA $03,S Harmless
AE/6071: C2 20 REP #$20 16-bit accumulator
AE/6073: 80 8D BRA $6002 Jump to Terra's name
AE/6002: A9 C4 26 LDA #$25CA
AE/6005: 80 20 BRA $6027 Jump to Locke's name
AE/6027: 4A LSR A A is #$12E5
AE/6028: 85 A2 STA $A2 Stores to $A2
AE/602A: 80 20 BRA $604C Jump to Cyan's name
AE/604C: 48 PHA We push #$E5 to the stack for later
AE/604D: A9 C4 26 LDA #$26C4
AE/6050: 80 44 BRA $6096 Jump to Edgar's name
AE/6096: 4A LSR A A is #$1362
AE/6097: 92 A2 STA ($A2) Store to $12E5
AE/6099: 80 20 BRA $60BB Jump to Sabin's name
AE/60BB: A9 C2 2B LDA #$2BC2
AE/60BE: 80 20 BRA $60E0 Jump to Celes's name
AE/60E0: 4A LSR A A is #$15E1
AE/60E1: 28 PLP Pull Processor status register
This restores 8-bit accumulator
We couldn't use the standard SEP (E2) instruction
AE/60E2: 5C 7A 8D C1 JML $C18D7A This calls TCS then RTS to fix the stack pointer
and continue the normal flow.
We couldn't call directly TCS (1B)
Editor, Emulator Coder, Experienced Forum User, Published Author, Expert player
(2853)
Joined: 3/17/2013
Posts: 392
Thanks for all the positive feedback.
Yes, I would be very honered to see my TAS presented at the GQD.
Well, it appears only 1p runs are eligible for net rankings.
Editor, Emulator Coder, Experienced Forum User, Published Author, Expert player
(2853)
Joined: 3/17/2013
Posts: 392
There are two reasons: first it gives overall more points to give as much chain as possible to one player. Also, thanks to this, player 2 got a 7th extend, which means 500,000 extra points at the end.
Editor, Emulator Coder, Experienced Forum User, Published Author, Expert player
(2853)
Joined: 3/17/2013
Posts: 392
Je pense pareil que Grincevent.
C'est en effet assez déprimant de faire un meilleur TAS qui ne batte pas le précédent record, à cause d'une différence d'émulation. Cela dit, Bizhawk est probablement plus fidèle que Gens, donc c'est plus juste d'utiliser le premier. Dans le cadre d'une soumission, ton TAS sera accepté s'il est meilleur que l'ancien TAS, même s'il fait un temps légèrement plus long à cause de la différence d'émulateur.
Après, rien ne t’empêche de faire jouer le précédent TAS sur Gens pour pouvoir comparer les phases de jeu (même si les comparaisons sont plus pénibles que si le même émulateur était utilisé).
Editor, Emulator Coder, Experienced Forum User, Published Author, Expert player
(2853)
Joined: 3/17/2013
Posts: 392
Yes, the extend bonus is given to each player based on their own lives stock.
So for chapter 5, I'm giving all the points to player 2 so that he should reach 23m (7 lives) and player 1 18m (6 lives).
Editor, Emulator Coder, Experienced Forum User, Published Author, Expert player
(2853)
Joined: 3/17/2013
Posts: 392
Ok, section 4-2 is done. The rest should not take that much time.
Edit: Here it is.
Link to video
A few comments:
- The big bullets at section 4-1 gives 100 points per frame for a total of 500 points.
- Section 4-2 is really a mess, sorry.
- In that section, black turrets have a rotating pattern, so sometimes in the cycle, the orientation of these shots are very good so I can absorb almost every bullet from all turrets. That is why you will see me staying longer in black.
- Also, the hitbox of the central dome does not match the sprite, so you can get into the dome by the top, absorbing more black bullets
- For the first mini boss, I found by trial and errors a location where my 12 lasers don't break the chains. From there, I waited as long as possible before killing the rest of the turrets to have 30s left (optimal)
- For the second mini boss, I intentionally left one turret when releasing the lasers. In the classic route, you can kill the top left gun (6 lasers) and the two bottom black pods (3 lasers each) in one pass, with a precise location. By having a left turret, the top left gun is not killed (5 lasers), and I can leach his 7-way shot for a few frames and still get the maximum time.
- Not much to say about the boss, I killed him at the exact frame where the timer went from 93s to 92s, so I got 93s :)
Editor, Emulator Coder, Experienced Forum User, Published Author, Expert player
(2853)
Joined: 3/17/2013
Posts: 392
I don't think any stage 4 or stage 5 midboss is worth leeching. Maybe the first midboss of stage 5 is a good candidate, we will see.
At the end of stage 3, bonus enemies come by waves of 6 black and 6 white enemies. Each one separates in two when shot, and each resulting enemy separates also in two. It makes a total of 42 white and 42 black targets per wave. The triggering of the next wave does not depend on how fast you kill the previous wave. The number of waves you get depends on how fast you killed the previous miniboss. In this case, I got 3 full waves, and the boss triggered in the middle of the fourth one. So I can take my time on the first three ones, as soon as I'm ready to start the fourth one. As a note, when you kill an enemy that separates in two, you cannot target the two childs during the first half second.
Editor, Emulator Coder, Experienced Forum User, Published Author, Expert player
(2853)
Joined: 3/17/2013
Posts: 392
Well, lasers give 100 points per frame. With two players, and 60 frames per second, it gives 12000 points per second which is higher than the 10000 points per remaining second given at the end of the stage. I didn't check if the boss is firing lasers during the whole fight though.
Stage 4 boss can also fire multiple lasers, but he doesn't fire all the time, even after an opening was made, so I hope I won't have to also leech him.
Here is stage 3 boss with 92s:
(Video removed)
EDIT: Nevermind, I'm stupid, the boss bonus is given to *both* players, so every second is worth 20000 points. No grinding then...
EDIT 2: Stage 3 completed:
Link to video
Editor, Emulator Coder, Experienced Forum User, Published Author, Expert player
(2853)
Joined: 3/17/2013
Posts: 392
Ersatz wrote:
would it be possible to get an encode of that level in its current not so awesome form?
Well, I'm almost finished with stage 3, so you will have to wait until I'm done with the boss.
I will post the boss 3 fastest time in a separate video. Time remaining will be 92, but 93 might be possible. I'm not sure I will spend time on the 93s since it won't stick in the final TAS.
Editor, Emulator Coder, Experienced Forum User, Published Author, Expert player
(2853)
Joined: 3/17/2013
Posts: 392
I really enjoyed this tasblock as well as the one from last year, thanks dwangoAC and all the people involved in this.
I have however one small piece of criticism to say: I feel we should take time at the beginning to explain exactly what is a TAS and the basic concepts, so that we are sure that people who have never heard of it can understand what is going on.
Editor, Emulator Coder, Experienced Forum User, Published Author, Expert player
(2853)
Joined: 3/17/2013
Posts: 392
Stage 2 finished:
Link to video
I will upload a YT higher quality version soon. Edit: done.
- after the first part, I ended up with an incomplete chain on both ships, which was annoying
- I let one white box alive because killing it would require to keep the laser gauge very low, resulting in less absorbed bullets
- For the first two generators after the boxes, you will see me not absorbing many bullets. This is because I need to keep my laser gauge low, and I have emptied them as late as possible without destroying the generators
- The last portion with the 6 generators was a real difficult puzzle to solve. You have to kill the enemies going in rounds as quickly as possible, because killing all of them triggers the spawning of the two big enemies. Killing the two big enemies and the two next ones quickly gives you bonus enemy rows. There are basically two routes here: if you keep your laser gauge full for the big enemies, you can get 16 bonus rows, but you cannot kill the last enemies from the generators. With empty laser gauge, you can get 15 rows. I took the second route because it gives more chains in the end. You will notice that there are 2 black enemies remaining. I couldn't get a third one unfortunately.
- I'm not very happy with the boss fight :(
Editor, Emulator Coder, Experienced Forum User, Published Author, Expert player
(2853)
Joined: 3/17/2013
Posts: 392
Patashu wrote:
Could you make a detailed explanation of the 'chip enemies before homing missiling them' mechanic, and how to maximize point gain using it? A few people I talked to were confused about how exactly it works.
How many shots should you fire?
Should you use same colour or different colour?
If you only half overlap with an enemy you hit it with only one half of your shot, is this useful to get more points?
Well, I took a look at it again, and I couldn't get any difference in points between using the shot, the laser or both to kill enemies. So it must have been a mistake in the first place, you cannot get different points by how you kill enemies, sorry.
Basically, one shot gives 10 points when on the same color and 20 for opposite color. One laser gives 100 points for same color if it doesn't kill the enemy, 200 points for opposite color. If the enemy has low heath, the laser gives the amount of points depending on the remaining heath.
Editor, Emulator Coder, Experienced Forum User, Published Author, Expert player
(2853)
Joined: 3/17/2013
Posts: 392
You are right, it feels a bit sloppy. I was concerned that if going on top too soon, the suicide bullets from the two white boxes above could hit the red box and vanish. But yes, on the 5 black bullets lost, I may have saved some.
Edit: Damn, this stage is so hard.
Editor, Emulator Coder, Experienced Forum User, Published Author, Expert player
(2853)
Joined: 3/17/2013
Posts: 392
Well, having the game running very slowly is not very harmful for me. You should try to see if it syncs at least.
Keyboard input not working is a bad thing. There is a lot of games that seems to have this functionality lacking. I tried once to investigate Super Meat Boy which also lacks keyboard support, but I couldn't find how the game fetches the keyboard status. For now, hourglass supports input events (WM_KEYUP and WM_KEYDOWN), input API functions (GetKeyState, GetAsyncKeyState, GetKeyboardState) and Direct Input functions (lpKeyboard->GetDeviceState)
If the xbox360 controller works, you could use it to record your TAS. Controllers are supported in the hourglass-resurrection project, but there is no release of it yet afaik.
Editor, Emulator Coder, Experienced Forum User, Published Author, Expert player
(2853)
Joined: 3/17/2013
Posts: 392
I may know what is going on, I think the dump feature is skipping frames.
Here is the screenshot of VI 635, 636 and 637 in the ikaruga WIP (http://tasvideos.org/userfiles/info/18954596001392115)
And from the video dump, frames 1132 and 1133:
Editor, Emulator Coder, Experienced Forum User, Published Author, Expert player
(2853)
Joined: 3/17/2013
Posts: 392
Spoiler of the upcoming stage 1 WIP: 144 chains! (afaik nobody achieved more than 138 chains unassisted). I spent about 10 hours on the last bonus enemies :(