What feos and Koh1fds have done to the xipo's run. Watch alternate encode and see yourself.
Improvement over xipo's run, thanks to the glitch used in the last level.

Game objectives

  • 1 player
  • Heavy glitch abuse
  • Uses death to save time

Comments

Our wise glitch stalker Koh1fds granted us yet another glitch leading to a serious submission.
All the input is xipo's, except for the end of the last level.

Glitch

Enemy with ID=$22 needs to spawn in slot 5, this results in writing of $80 to address taken from the value of RNG ($23, 2 bytes). If that value is $005C (or $085C/$105C/$185C, all of which are mirrors of $5C), level end routine will almost certainly be executed ($3E becomes 1 after $5C becomes $80).

RNG

$07:FB5C: INC RNG1
$07:FB5E: LDA RNG1
$07:FB60: ADC GlobalTimer
$07:FB62: STA RNG1
This routine is rolled infinitely during all the spare CPU time. Player actions affect RNG, but there's no way you could predict it.

feos's comments

Koh1fds found the glitch that corrupts memory and managed to end the level using it, avoiding the boss fight. I reimplemented it from scratch, after basic optimization of the route that's different from the previous 1p run.
Also, this is yet another game I played as a kid. I only TAS games that I played back then (for whatever reason), if you ignore Ninja Gaiden.

Helpers

  • TheAlmightyGuru
  • FCEUX debugger & tracer
  • This script (only works in that last level):
rb = memory.readbyte
function objects()
	camx = memory.readwordsigned(0xFD,0x92)
	camy = memory.readwordsigned(0xFC,0x82)
	px   = rb(0x54C) + camx
	py   = rb(0x532) + camy
	a11  = rb(0x11)
	if a11==8 or a11==0xF8 then
		color = "green"
		if a11==8
		then sp = "left"
		else sp = "right"
		end
	else sp = "-"; color = "white"
	end
	gui.text(0,40,string.format("pX: %d\npY: %d",px,py) )
	gui.text(0,60,string.format("%X: %s",a11,sp),color)
--	gui.text(0,60,string.format("cX: %d\ncY: %d",camx,camy) )
	for i=0,13 do
		id = rb(0x6D8+i)
		y  = rb(0x522+i)
		x  = rb(0x53C+i)
		hp = rb(0x676+i)
		st = rb(0x668+i)
		if st > 0 then
		--	gui.text(x,y,string.format("%d",i) )
		end
		gui.text(0,0,"slot:\nid:")
		if id ~= 0x7F and st > 0 and x~=0 then
			gui.text(i*17+20,0,string.format("%d\n%X",i,id) )
			gui.line(i*17+22,16,x,y,0xffffff80)
		end
	end
end
gui.register(objects)

Tompa: Judging time.
Tompa: Replaced the run with a 373 frames faster version.
Tompa: Nice, surprising and weird ending of the run! Good improvement. Accepting.
feos: Pub.