jtothebell / fake-08

A Pico-8 player/emulator for console homebrew
Other
563 stars 49 forks source link

3DS: issue loading a game #146

Closed RandomMan25XX closed 2 years ago

RandomMan25XX commented 2 years ago

I recently bought Nog Arcade (https://ryancavendell.itch.io/nog-arcade) as part of a recent bundle and decided to try it with fake-08 only to get this error after trying to load it (see attached screenshot, screenshot isnt the best as direct capture of apps that use 800px mode get stretched to one side of the screen) 20220708_020214

nckstwrt commented 2 years ago

This is an error I will try and help and fix - but is with the lua lexer. The line it's failing on is: for j=0,3do if(btn(j,p[4]))p[2]=j+1end (in your .p8 file it will be line 544)

If you just put a space before the "end" so it reads: for j=0,3do if(btn(j,p[4]))p[2]=j+1 end

It will work.

nckstwrt commented 2 years ago

PICO-8 does not seem to support numbers with an exponent (so 4.5e+6 or similar). Lua does however, so in the function read_numeral in llex.c you have:

  const char *expo = "Ee";
  ...
   expo = "Pp";
  ...
    if (check_next(ls, expo))  /* exponent part? */
      check_next(ls, "+-");  /* optional exponent sign */
etc

I think those 4 lines can be removed and then carts where they are bunching up the "end" keyword next to numbers (to save space) will work without modification.

jtothebell commented 2 years ago

Fix as described has been pushed to master. I should be pushing a new release soon, but you can also grab the latest build from the Actions section if you would like to.

RandomMan25XX commented 2 years ago

Fix as described has been pushed to master. I should be pushing a new release soon, but you can also grab the latest build from the Actions section if you would like to.

Compiled the latest commit and now the game works fine (except for the minigame that requires a keyboard, making that two games I know uses the keyboard in some capacity)