This page documents information about Joust
. Many of the tricks demonstrated here are near impossible in real time and documented for the purposes of creating Tool-assisted Speedruns.
-- NES Joust HUD
-- feos, 2014
function Joust()
local rng = memory.readbyte(0x2E)
local x = memory.readbyte(0x54)
local xSub = memory.readbyte(0x56) / 32
local y = memory.readbyte(0x58)
local ySub = memory.readbyte(0x5A) / 32
local xSpeedOffset = memory.readbytesigned(0x4E)
local xSpeed = memory.readbytesigned(0xCF69+xSpeedOffset) + memory.readbyte(0xCFAB+xSpeedOffset)/256
local ySpeed = memory.readbytesigned(0x52) + memory.readbyte(0x50)/256
local s1 = memory.readbyte(0x7C+0)
local s2 = memory.readbyte(0x7C+1)
local s3 = memory.readbyte(0x7C+2)
local s4 = memory.readbyte(0x7C+3)
local s5 = memory.readbyte(0x7C+4)
local s6 = memory.readbyte(0x7C+5)
gui.text( 1,224,string.format("\nSlots: %d %d %d %d %d %d",s1,s2,s3,s4,s5,s6))
gui.text(110,224,string.format("\nRNG: %X",rng))
gui.text(124,202,string.format("X: %.2f\nY: %.2f",xSpeed,ySpeed))
gui.text(180,202,string.format("X: %3d.%d\nY: %3d.%d",x,xSub,y,ySub))
RNGcount = 0
end
emu.registerafter(Joust)
$D440 LDY #$03
$D442 ASL rng1
$D444 ROL rng2
$D446 ROL
$D447 ROL
$D448 EOR rng1
$D44A ROL
$D44B EOR rng1
$D44D LSR
$D44E LSR
$D44F EOR #$FF
$D451 AND #$01
$D453 ORA rng1
$D455 STA rng1
$D457 DEY
$D458 BPL $D442
$D45A RTS
$EB2F JSR RNG Roll
$EB32 LDA rng1
$EB34 AND #$03
$EB36 BNE $EB3C
$EB38 LDY $0032
$EB3A BEQ $EB2F
$EB3C STA spawn slot,X