Here's a little function that would have helped find the ''useless'' interrupts earlier:
Language: lua
cnt=0
function JugFinder()
Interrupt = AND(memory.readbyte(0x4C),0x40)
if (Interrupt > 0) then cnt=cnt+1
else cnt = 0 end
if (cnt > 1)
and (memory.readbyte(0x1FC) == 0x87)
and (memory.readbyte(0x1F3) == 0xD8) then
emu.pause()
gui.text(1,226,cnt)
end
end
Maybe it will have some use in the future.
Without diving in deep and likely just repeating things you've already tried, I'll have to agree that the early levels should be well optimized at this point. Though I still might spend some time looking for ways to use the $75 thing.
Edit: Found the mess of a script I made a couple years ago to look for places where $75=4 might usefully affect stuff
Language: lua
NGtest = savestate.create()
local function check75(RAM)
if memory.readbyte(RAM) > 0x10 then --excludes normal enemy spawns from the check
eX=RAM+0x60;eXf=RAM+0x58 --offset for enemy X position
eY=RAM+0x80;eYf=RAM+0x78 --offset for enemy Y position
ram=RAM;blah=1
end
end
while true do
savestate.save(NGtest)
emu.frameadvance()
memory.register(0x400, 8, check75)
if blah == 1 then
eXa=memory.readbyte(eX)+(memory.readbyte(eXf)/256)
eYa=memory.readbyte(eY)+(memory.readbyte(eYf)/256)
savestate.load(NGtest)
memory.writebyte(0x75, 4) --simulates the glitch
emu.frameadvance()
eXb=memory.readbyte(eX)+(memory.readbyte(eXf)/256)
eYb=memory.readbyte(eY)+(memory.readbyte(eYf)/256)
if eXa ~= eXb or eYa ~= eYb then
frame=emu.framecount();xdif=eXa-eXb;ydif=eYa-eYb
print(string.format("%05d, %02X, %4.2f, %4.2f",frame,ram,xdif,ydif)) --when glitch has an effect, output frame count, column for enemy data, positional discrepancy
end
savestate.load(NGtest)
emu.frameadvance()
end
blah=0
end
Running this over the current pacifist WIP input doesn't seem to point to any obvious places where $75 looks useful, but since I never bothered to find out why it affects some projectiles and not others, I don't really know if some subtle change could change that.
MESHUGGAH: Can you think of any tossed/thrown/shot/spit objects where a 2 or 3 pixel change might matter?
Another edit: It pains me to bring this up, but has anybody considered that to be strictly pacifist, the demon's head should not be killed?