Here's a TAS that abuses this game's wacky warps and skips most of the content.
When you activate the warp ability ($06:BCEA) the game will call the PRNG function ($07:F39E), AND the value returned with 0x3F, then compare it to a value associated with your current location ($135). If the ANDed value is less than $135, then it sends you there; if not, it tries up to 7 more times before just sending you to the beginning of the level.
I'm not sure what purpose a costly special ability that seemingly was only intended to send you backwards in a level was supposed to serve, but it's abusable for a couple of reasons: not all levels segments are numbered linearly and in some cases holding left can affect where the warp ultimately sends you. I didn't really debug why/how left can have this effect, but it looks like a chain of events stemming from Luke's X velocity being negative when the scene change occurs.
Notes on the linked input file:
WhiteHat worked out most of the potentially useful warp shortcuts, I just applied them to a not-very-good TAS.
Tatooine: Goal here was to get most of the energy needed for 3 warps since the second level is pretty sparsely populated before the point I intended to warp from. Various approaches were tried (see other branches of .fm3) before settling on two goes at the blocks in the second room of the sand crawler and warping to the end of the level. There's also a buggy warp possible on this level (warp target 0xF) but I couldn't find anything useful involving it.
Kessell: Here's the first use of holding left to mess with the warp and having it send Luke "out of bounds" to 0xFF. From there he can go anywhere he pleases, like directly to the end of the level. I considered warping to a screen or two before the end to some nicely clustered enemies for more energy, but the extra Lukes from the buggy warp caused too much lag for that to seem worthwhile. The 0xFF warp on this level and on the Death Star level can have a lot of weird effects, but I'm just not that into this game to spend the time working out how that might be manipulated.
Iscalon: Pretty straight-forward level with one bonus room numbered higher than the rest. Shooty-saber and/or Speed-up should probably have been used here.
Death Star: Here we find the only useful NPC for this route. Leia can double your force energy once a level (to a max of 99, and only when indoors, apparently). It's also convenient that right outside the room you find here in is the best known place to warp to 0xFF in this level. Got lucky here with the instant Vader-death warp that ends the level. Wasn't able to make that work after manipulating RNG before the level so I just settled on waiting a number of frames and getting on with things.
Death Star layout:
56 57
03 04 09 0D 0E 0F 13 20
d 08 14
->00 01 02 07 10 11 12 15 21
06 16
58 59 05 0A 0B 0C 17 22
37 18
38 39 3A 36 3B 3C 3D 19 27 28 29 2A 2B 2C
3F 40 35 41 42 43 1A d d d d d
44 45 34 46 47 48 1B 23 24 25 26 2F -|
49 4A 33 4B 4C 4D 1C 2D 2E<-------------|
4E 4F 32 50 51 52 1D
31 53 54 3E 1E 30
55 1F
->: Start
d: doors
26: Rescue Leia
2F: Compactor fight (call R2-D2 to escape to 2E)
38: Vader fight
58: Millenium Falcon scene(after beating Vader)
not depicted: death barriers between 36/37 and at ends of vertical shafts
*numbers are hexadecimal
Hoth: Pretty simple. Get to the base. Use Leia. Warp to exit for those sweet Chewie smooches.
Yavin: Could probably fit another usage of the Speed-boost ability in here, but it doesn't play well with collecting stuff. The OoB/0xFF warp here doesn't seem to have any weird effects, just another warp to the finish. The shooty-saber ability being active skips the Leia dialogue too! Didn't figure out why, and couldn't get any combination of active abilities to have the same effect for any other dialogue in the game.
Space shooter levels: Frames between TIE fighter spawns are randomized. Time shots and scroll stars off-screen/keep them on screen to manipulate RNG. Low byte of Luke's Y position at the end of a level can also indirectly affect how much the hyperdrive animations advance the random number sequence. Convenient opportunity for free manipulation after meeting the kill quota by destroying/creating more stars.
I think with better planning of energy gathering and special ability use, and proper manipulation of the 0oB/0xFF warp effects this could make a decent TAS.
Some RAM info:
$0014#seed_0#
$0015#seed_1#
$0016#seed_2#
$007D#Shield_count#
$0097#Death_count#
$0135#Segment#
$013E#Death#
$0143#Mans#
$0145#Energy_count#
$015E#TIE_kills#
$016E#Boss_state#
$0170#Trench_timer#
$017F#SaberShot_state#
$0180#Hourglass_state#
$0181#Levitate_state#
$0182#Speed_state#
$0183#Invulnerability_state#
$0184#Lightning_state#
$0186#SaberShot_timer#
$0188#Hourglass_timer#
$018A#Levitate_timer#
$018C#Speed_timer#
$018E#Invulnerability_timer#
$0190#BossHP#
$0199#Leia_available#b7
$019E#Leia_use#0 until next lvl after successfully calling Leia
$01A8#Game_timer#3 bytes, frames:seconds:minutes
$0400#ID#
$0401#BG_collision#
$0402#Facing#
$0403#Yf#
$0404#Ypos#
$0405#Yscreen#
$0406#Xf#
$0407#Xpos#
$0408#Xscreen#
$0409#Counter#
$040A#Yvel#
$040B#Xvel#
PRNG routine (The game also temporarily stores the initial value of $16 to the stack while it zeroes the rest of RAM then puts it back.):
07:F39E: A5 15 LDA $15
07:F3A0: 0A ASL
07:F3A1: 45 14 EOR $14
07:F3A3: 49 80 EOR #$80
07:F3A5: 0A ASL
07:F3A6: 26 14 ROL $14
07:F3A8: 26 15 ROL $15
07:F3AA: A5 16 LDA $16
07:F3AC: 0A ASL
07:F3AD: 0A ASL
07:F3AE: 38 SEC
07:F3AF: 65 16 ADC $16
07:F3B1: 85 16 STA $16
07:F3B3: 45 14 EOR $14
07:F3B5: 45 15 EOR $15
07:F3B7: 60 RTS
Addresses of all JSR $F39E instructions with descriptions of varying vagueness:
0xF0A8 Every frame
0xBCF4 Use warp ability
0xA30B Title/End screen stars
0xA31E Title/End screen stars
0xD09E Leia hologram fade-in
0xD0FA Leia hologram fade-out
0xD639 Tusken Raider spawn (hop counter)
0xD363 Stormtrooper spawn
0xD389 Stormtrooper shot
0xD1D9 Stars?
0xD1DD Stars?
0xD209 Hyperspace
0xD215 Hyperspace
0x8AAE new star a
0x8AB7 new star b
0x8AC3 new star c
0x822B TIE, frames until spawn
0x823D TIE spawn
0x82F8 TIE spawn
0x8268 TIE spawn something or other
0x8469 TIE movement change
0x8980 TIE shots
0xAFA9 Planet approach scenes(~300 per frame for 3 franes each level)
0xD867 Vader attack timer
0x9803 Yavin Vader
0x9DFB Green dudes (only found behind Death Star doors?)
0x9D07 ST spawns at end of compactor corridor
0x92B3 Trash monster, x2 on enter
0x92D9 Trash monster
0xEE57 Wampa!
0x9522 Trench start
0x99C6 Trench lasers
0x9983 Trench lasers
0x955D Trench spawns
0xB42B X-Wing/MF/DS victory scene
0xA899 Intro Star Destroyer scene
0xA8A9 Intro Star Destroyer scene
0xA8BC Intro Star Destroyer scene
0xA8CC Intro Star Destroyer scene
0xA871 Intro Star Destroyer scene