I made a real time full total control method (i.e. you can execute arbitrary code of arbitrary length), though it can be adapted and improved for TAS. Then the goal would be to find the minimum instructions needed to beat the game. Also, I didn't realize sadly that you can add characters after ZELDA and still get second quest, so this method can be improved easily.
So first, if you trigger the glitch with AB, then you branch based on the note of the music. If you get a large branch, you actually jump just before the names of your files. That is, you just execute your names as code. The major limitation is the name characters only go up to $64.
My (now obsolete) strat is first set the first two names with the bytes:
File 1:
$0e 45 06 ASL $0645
$46 12 LSR $12 // Reload first are
$46 16 LSR $16 // Change active file to file 1
$60 RTS
File 2:
$33 02 RLA(0x02), Y
$4C 38 06 end: JMP start ($0638)
$36 2F 64 input: JMP ($642f) // Turns into $6C 2F 64
This changes the second name and saves it. Then you rename the first file for the final code package:
File 1:
$20 45 06 start: JSR input ($0645)
$0A ASL A
$0A ASL A
$0A ASL A
$10 02 BPL end (#$2)
File 2:
$33 02 RLA(0x02), Y
$4C 38 06 end: JMP start ($0638)
$6C 2F 64 input: JMP ($642f)
In the first pass, it changes the second file name to bypass the character limit. Then the second pass does a loop calling the "retrieve input" subroutine. Reg. A is the buttons just pressed, and reg. Y is the complete set of buttons held. It writes on a start press, shifting in whether or not select was pressed at that time into a register determined by Y. In short, the location you write is determined by A, B, and the directions. You shift in a 1 if you hit select and start at the same time, and you shift in a 0 if you hit select before start. Using this you can write more code, and you escape the tight loop by first breaking an ASL instruction, and then breaking the JMP.
Now that I know you have 3 more bytes from the ZELDA file name, the above method could be done in a single pass. Also, TAS can use other things such as ghost position for addition instructions. One question is, what exactly is the minimum to call credits?