peon2 / fbneo-training-mode

a simple training mode for multiple games on the fbneo platform
58 stars 35 forks source link

Daraku Tenshi not working #48

Closed cheemsburgers closed 2 years ago

cheemsburgers commented 2 years ago

I get the following error when trying to run the script on Daraku Tenshi; rolling back to a previous version still gives me the same error. Tried CPS1, CPS2 and Neo Geo games, they work just fine.

image

arrayofchar commented 2 years ago

The problem has to do with function from line 1085 to 1100 (the error shows table index at line 1097 is null): local readGuiInputs = function() local player, input guiinputs.P1.previousinputs = nil guiinputs.P2.previousinputs = nil guiinputs.P1.previousinputs = copytable(guiinputs.P1) guiinputs.P2.previousinputs = copytable(guiinputs.P2) for i,v in pairs(joypad.get()) do -- check every button player = i:sub(1,2) input = i:sub(4) if player == "P1" then guiinputs.P1[modulevars.constants.translationtable[modulevars.constants.translationtable[input]]] = v elseif player == "P2" then guiinputs.P2[modulevars.constants.translationtable[modulevars.constants.translationtable[input]]] = v end end end

Apparently the training mode menu doesn't work Daraku Tenshi. That's what above function does. It allows you to navigate the menu with joystick inputs.

If you disable the training menu by deleting the above function or just the for loop inside the function, then the error goes away. You still get infinite timer and health and everything. Probably has to do with Psikyo machine memory register value not mapped correctly.

peon2 commented 2 years ago

This happened because fbneo changed how they handle daraku's inputs, should be fixed now with d918581