RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login

    I.K.E.M.E.N GO on Raspberry Pi 4 [Now with an Install Guide!]

    Scheduled Pinned Locked Moved Ideas and Development
    golangikemenikemen gomugentutorial
    153 Posts 20 Posters 54.3k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • SuperFromNDS
      SuperFromND
      last edited by SuperFromND

      Another thing to add to the "list of things that I've tried to get this to work to no avail": updating Golang to the newest version.

      The version that apt-get supplies is only v1.11, and the latest version is 1.15.3, so I figured it might be worth a shot to upgrade and see if anything improved for either fork of IKEMEN GO. No dice, both forks still crash and Lucas's fork still has palette corruption with zero change in behavior.

      I also found something strange: LucasFebaits's fork can sort of load a match if, and only if, you have a versus match with Palette Test characters I made specifically to test IKEMEN's palette corruption bug (they lack any actual character data such as animations or state definitions). Instead of crashing before displaying a stage, it crashes at the point the announcer would say "FIGHT!".

      I guess this means there's multiple points of failiure when it comes to character data: one for loading some type of data that my palette tests lack, and another for some type of data that's modified when a fight actually starts (character input being toggled perhaps?).

      ADDENDUM: Here's the current crash log of LucasFebaits's fork:

      unexpected fault address 0x0
      fatal error: fault
      [signal SIGBUS: bus error code=0x1 addr=0x0 pc=0x24ecb8]
      
      goroutine 1 [running, locked to thread]:
      runtime.throw(0x41487a, 0x5)
      	/usr/local/go/src/runtime/panic.go:1116 +0x5c fp=0xfd0c78 sp=0xfd0c64 pc=0x80148
      runtime.sigpanic()
      	/usr/local/go/src/runtime/signal_unix.go:717 +0x378 fp=0xfd0c90 sp=0xfd0c78 pc=0x961a8
      main.BytecodeExp.run(0x8bc14e, 0x5, 0x12, 0x1658000, 0x2, 0x0, 0x40438000)
      	/home/pi/Desktop/Stuff/Ikemen-GO-Plus/src/bytecode.go:888 +0x788 fp=0xfd0ea4 sp=0xfd0c94 pc=0x24ecb8
      main.BytecodeExp.evalF(...)
      	/home/pi/Desktop/Stuff/Ikemen-GO-Plus/src/bytecode.go:1577
      main.varRangeSet.Run.func1(0x3, 0xb3e580, 0x1, 0x1, 0xc0900001)
      	/home/pi/Desktop/Stuff/Ikemen-GO-Plus/src/bytecode.go:4537 +0x124 fp=0xfd0ed0 sp=0xfd0ea4 pc=0x2ff3a0
      main.StateControllerBase.run(0x8bc140, 0x13, 0x20, 0x1658000, 0xfd0f14)
      	/home/pi/Desktop/Stuff/Ikemen-GO-Plus/src/bytecode.go:1774 +0x108 fp=0xfd0ef4 sp=0xfd0ed0 pc=0x25d4f0
      main.varRangeSet.Run(0x8bc140, 0x13, 0x20, 0x1658000, 0x63aaa8, 0x0, 0x0, 0x3ff00000)
      	/home/pi/Desktop/Stuff/Ikemen-GO-Plus/src/bytecode.go:4523 +0x80 fp=0xfd0f24 sp=0xfd0ef4 pc=0x264718
      main.(*varRangeSet).Run(0x17fead0, 0x1658000, 0x63aaa8, 0x0, 0x0, 0xffffff00)
      	<autogenerated>:1 +0x64 fp=0xfd0f48 sp=0xfd0f24 pc=0x33c2b8
      main.StateBlock.Run(0x1, 0xffffffff, 0xfffffffe, 0x0, 0x17fdd28, 0x4, 0x8, 0x0, 0xc0b348, 0x1, ...)
      	/home/pi/Desktop/Stuff/Ikemen-GO-Plus/src/bytecode.go:1697 +0x184 fp=0xfd0fc4 sp=0xfd0f48 pc=0x25cdc8
      main.(*StateBlock).Run(0x17e6840, 0x1658000, 0x63aaa8, 0x0, 0x0, 0x0)
      	<autogenerated>:1 +0x60 fp=0xfd1034 sp=0xfd0fc4 pc=0x332f7c
      main.StateBlock.Run(0x1, 0xffffffff, 0xfffffffe, 0x0, 0x0, 0x0, 0x0, 0x0, 0x870d40, 0x5, ...)
      	/home/pi/Desktop/Stuff/Ikemen-GO-Plus/src/bytecode.go:1697 +0x184 fp=0xfd10b0 sp=0xfd1034 pc=0x25cdc8
      main.(*StateBytecode).run(0x16580a4, 0x1658000, 0xffffff00)
      	/home/pi/Desktop/Stuff/Ikemen-GO-Plus/src/bytecode.go:4901 +0xac fp=0xfd1144 sp=0xfd10b0 pc=0x265210
      main.(*Char).action(0x1658000)
      	/home/pi/Desktop/Stuff/Ikemen-GO-Plus/src/char.go:4185 +0x444 fp=0xfd12d4 sp=0xfd1144 pc=0x278e0c
      main.(*CharList).action(0x60f50c, 0x0, 0xfd1354, 0xfd1358, 0xfd1350, 0xfd1340, 0xfd7608, 0xfd760c)
      	/home/pi/Desktop/Stuff/Ikemen-GO-Plus/src/char.go:4638 +0x80 fp=0xfd12fc sp=0xfd12d4 pc=0x27c6cc
      main.(*System).action(0x608fd8, 0xfd764c, 0xfd7648, 0x3f800000, 0x0, 0x0, 0x0)
      	/home/pi/Desktop/Stuff/Ikemen-GO-Plus/src/system.go:788 +0x400 fp=0xfd75f4 sp=0xfd12fc pc=0x2eb5e4
      main.(*System).fight(0x608fd8, 0x81a400)
      	/home/pi/Desktop/Stuff/Ikemen-GO-Plus/src/system.go:1532 +0xae4 fp=0xfd7930 sp=0xfd75f4 pc=0x2eeb3c
      main.systemScriptInit.func61.2(0xc, 0x43357c, 0x608fd8)
      	/home/pi/Desktop/Stuff/Ikemen-GO-Plus/src/script.go:806 +0x1fc fp=0xfd7b40 sp=0xfd7930 pc=0x31f3a8
      main.systemScriptInit.func61(0x90c120, 0x0)
      	/home/pi/Desktop/Stuff/Ikemen-GO-Plus/src/script.go:850 +0x308 fp=0xfd7c38 sp=0xfd7b40 pc=0x323250
      github.com/yuin/gopher-lua.callGFunction(0x90c120, 0x0, 0x958460)
      	/home/pi/Desktop/Stuff/Ikemen-GO-Plus/go/src/github.com/yuin/gopher-lua/vm.go:202 +0x30 fp=0xfd7c68 sp=0xfd7c38 pc=0x22f6cc
      github.com/yuin/gopher-lua.init.3.func26(0x90c120, 0x7c000601, 0x932000, 0x0)
      	/home/pi/Desktop/Stuff/Ikemen-GO-Plus/go/src/github.com/yuin/gopher-lua/vm.go:817 +0x330 fp=0xfd7d14 sp=0xfd7c68 pc=0x234ce0
      github.com/yuin/gopher-lua.mainLoop(0x90c120, 0x932000)
      	/home/pi/Desktop/Stuff/Ikemen-GO-Plus/go/src/github.com/yuin/gopher-lua/vm.go:31 +0xe4 fp=0xfd7d28 sp=0xfd7d14 pc=0x22f24c
      github.com/yuin/gopher-lua.(*LState).callR(0x90c120, 0x0, 0xffffffff, 0x0)
      	/home/pi/Desktop/Stuff/Ikemen-GO-Plus/go/src/github.com/yuin/gopher-lua/state.go:1203 +0x1b8 fp=0xfd7d9c sp=0xfd7d28 pc=0x221cc0
      github.com/yuin/gopher-lua.(*LState).Call(...)
      	/home/pi/Desktop/Stuff/Ikemen-GO-Plus/go/src/github.com/yuin/gopher-lua/state.go:1959
      github.com/yuin/gopher-lua.(*LState).PCall(0x90c120, 0x0, 0xffffffff, 0x0, 0x0, 0x0)
      	/home/pi/Desktop/Stuff/Ikemen-GO-Plus/go/src/github.com/yuin/gopher-lua/state.go:2022 +0xec fp=0xfd7dd8 sp=0xfd7d9c pc=0x225758
      github.com/yuin/gopher-lua.(*LState).DoFile(0x90c120, 0x9c64e0, 0xf, 0x90c120, 0x9ca240)
      	/home/pi/Desktop/Stuff/Ikemen-GO-Plus/go/src/github.com/yuin/gopher-lua/auxlib.go:396 +0x90 fp=0xfd7df4 sp=0xfd7dd8 pc=0x1f940c
      main.main()
      	/home/pi/Desktop/Stuff/Ikemen-GO-Plus/src/main.go:232 +0x145c fp=0xfd7fb8 sp=0xfd7df4 pc=0x2d4ef8
      runtime.main()
      	/usr/local/go/src/runtime/proc.go:204 +0x208 fp=0xfd7fe4 sp=0xfd7fb8 pc=0x829f8
      runtime.goexit()
      	/usr/local/go/src/runtime/asm_arm.s:857 +0x4 fp=0xfd7fe4 sp=0xfd7fe4 pc=0xb1884
      
      goroutine 18 [sleep]:
      time.Sleep(0x989680, 0x0)
      	/usr/local/go/src/runtime/time.go:188 +0xec
      main.(*System).soundWrite(0x608fd8)
      	/home/pi/Desktop/Stuff/Ikemen-GO-Plus/src/system.go:371 +0x3dc
      created by main.(*System).audioOpen
      	/home/pi/Desktop/Stuff/Ikemen-GO-Plus/src/system.go:355 +0xc4
      
      goroutine 6 [syscall]:
      syscall.Syscall(0x3, 0x0, 0xa02000, 0x1000, 0x63bed0, 0x0, 0x1)
      	/usr/local/go/src/syscall/asm_linux_arm.s:14 +0x8
      syscall.read(0x0, 0xa02000, 0x1000, 0x1000, 0xb6750701, 0x800000, 0x1080d8)
      	/usr/local/go/src/syscall/zsyscall_linux_arm.go:686 +0x40
      syscall.Read(...)
      	/usr/local/go/src/syscall/syscall_unix.go:187
      internal/poll.(*FD).Read.func1(0x7ff, 0x2, 0x870008)
      	/usr/local/go/src/internal/poll/fd_unix.go:155 +0x3c
      internal/poll.ignoringEINTR(0x8286b4, 0x72, 0x58201, 0x0)
      	/usr/local/go/src/internal/poll/fd_unix.go:567 +0x1c
      internal/poll.(*FD).Read(0x870000, 0xa02000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
      	/usr/local/go/src/internal/poll/fd_unix.go:155 +0x128
      os.(*File).read(...)
      	/usr/local/go/src/os/file_posix.go:31
      os.(*File).Read(0x8100f0, 0xa02000, 0x1000, 0x1000, 0x0, 0xeb000, 0x810378)
      	/usr/local/go/src/os/file.go:116 +0x5c
      bufio.(*Scanner).Scan(0x8287a4, 0x9)
      	/usr/local/go/src/bufio/scan.go:214 +0x88
      main.(*System).init.func1(0x608fd8)
      	/home/pi/Desktop/Stuff/Ikemen-GO-Plus/src/system.go:259 +0x9c
      created by main.(*System).init
      	/home/pi/Desktop/Stuff/Ikemen-GO-Plus/src/system.go:257 +0x36c
      

      It seems that the entire crash starts at this function in system.go:

      	go func() {    // <- LINE 257
      		stdin := bufio.NewScanner(os.Stdin)
      		for stdin.Scan() {
      			if err := stdin.Err(); err != nil {
      				s.errLog.Println(err.Error())
      				return
      			}
      			s.commandLine <- stdin.Text()
      		}
      	}()
      

      ▲▼▲▼▲▼▲▼▲▼
      IKEMEN Go
      SRB2Kart
      ▼▲▼▲▼▲▼▲▼▲

      1 Reply Last reply Reply Quote 0
      • Z
        zerojay
        last edited by

        Is there any chance that maybe this is a case-sensitivity problem? A lot of MUGEN stuff is made on Windows where the file system is case-insensitive by default, so I wouldn't be shocked if there are those kinds of problems going on.

        SuperFromNDS 1 Reply Last reply Reply Quote 0
        • SuperFromNDS
          SuperFromND @zerojay
          last edited by SuperFromND

          @zerojay I think you're on to something, but I suspect that's only part of the story since it only crashes on 32-bit Raspian/RasPiOS (and since it can crash in two different spots, as i found out with my palette test characters). Unless 64-bit RasPiOS has a file system with case insensitivity, anyways.

          Nonetheless, good idea!

          ▲▼▲▼▲▼▲▼▲▼
          IKEMEN Go
          SRB2Kart
          ▼▲▼▲▼▲▼▲▼▲

          1 Reply Last reply Reply Quote 0
          • SuperFromNDS
            SuperFromND
            last edited by SuperFromND

            I was looking more at the log and noticed quite a lot of lines referred to parts of bytecode.go. The highest bytecode.go line reported in the file is line 888:

            		case OC_float:
            			sys.bcStack.PushF(*(*float32)(unsafe.Pointer(&be[i]))) // <-- line 888
            			i += 4
            

            This is part of a function that reads:

            func (be BytecodeExp) run(c *Char) BytecodeValue {
            

            There's also line 1577, which reads:

            func (be BytecodeExp) evalF(c *Char) float32 {
            	return be.run(c).ToF() // <-- line 1577
            }
            

            So my current best guess is that, since the bytecode.go calls occur above two char.go calls, and given the arguments in the function along with the behavior of the palette test chars I mentioned earlier, IKEMEN actually is loading everything correctly, and is just failing when it comes to running some character-related code that makes use of floating point numbers.

            This is further evidenced by the two char.go calls in question:

            // line 4185
            c.ss.sb.run(c) 
            // part of the function "func (c *Char) action() {"
            
            // line 4638
            cl.runOrder[i].action() 
            // part of the function "func (cl *CharList) action(x float32, cvmin, cvmax, highest, lowest, leftest, rightest *float32) {"
            

            This would definetly explain why it crashes on only 32-bit, and (at least somewhat) explains why it crashes at the point in a match where players gain control (my assumption being that part of the code that does that also runs character code that involves floating-point, and thus causes problems).

            I still haven't made any progress on figuring out the palette corruption thing, but now that we know it's likely floating point causing crashes, it's possible some other floating-point-related quirk is the root cause of that bug too.

            I should note that I joined an IKEMEN Discord server and brought up this "IKEMEN GO on Pi 4" thing, and caught the attention of Windblade. He said that, since he doesn't own a Pi 4, he'll try to find a way to emulate one via QEMU and see what exactly's causing problems. While this will probably be a rather low priority for him, it's at least nice to know someone else (let alone one of IKEMEN GO's main developers) is considering digging into this.

            I also recieved plenty of encouragement and good luck wishes from various community members in that server (and was informed that, while I'm not the first to come up with with this idea, I'm apparently one of the first to actually put in some effort into getting it to work), so I'd just like to quickly say a thank you to anyone who has had interest in this project. Even if I ultimately end up empty-handed, it's been really fun toying around with one of my all-time favorite freeware games again. :)

            ADDENDUM: So just to recap everything so far:

            🔷 Windblade-GR01 fork

            Issue: crashes immediately on start
            Affects: 32-bit and 64-bit Raspbian
            Cause: unknown

            🔷 LucasFebaits fork

            Issue: crashes upon execution of character code (or when "FIGHT!" is spoken, depending on your character)
            Affects: 32-bit Raspbian
            Cause: most likely, something involving floating-point numbers and character states

            Issue: indexed palettes are corrupted/colors get duplicated or truncated seemingly at random
            Affects: 32-bit and 64-bit Raspbian
            Cause: unknown

            ▲▼▲▼▲▼▲▼▲▼
            IKEMEN Go
            SRB2Kart
            ▼▲▼▲▼▲▼▲▼▲

            1 Reply Last reply Reply Quote 1
            • SuperFromNDS
              SuperFromND
              last edited by SuperFromND

              Hm, strange little issue I just encountered today:

              Windblade's fork just got updated to 0.96, and I tried to compile that on the Pi 4, just to see if it worked at all. Instead, I got a whole-new set of errors during compilation, all having to do with what appears to be a dependency repository, and nothing to do with IKEMEN GO itself:

              # github.com/Windblade-GR01/go-openal/openal
              /home/pi/go/pkg/mod/github.com/!windblade-!g!r01/go-openal@v0.0.0-20200929222908-702203e028e0/openal/alcCore.go:88:142: cannot use _cgo0 (type *_Ctype_struct_ALCdevice) as type *_Ctype_struct_ALCdevice_struct in argument to _Cfunc_alcGetError
              /home/pi/go/pkg/mod/github.com/!windblade-!g!r01/go-openal@v0.0.0-20200929222908-702203e028e0/openal/alcCore.go:127:100: cannot use _cgo0 (type *_Ctype_struct_ALCdevice) as type *_Ctype_struct_ALCdevice_struct in argument to _Cfunc_alcCloseDevice
              /home/pi/go/pkg/mod/github.com/!windblade-!g!r01/go-openal@v0.0.0-20200929222908-702203e028e0/openal/alcCore.go:133:107: cannot use _cgo0 (type *_Ctype_struct_ALCdevice) as type *_Ctype_struct_ALCdevice_struct in argument to _Cfunc_alcCreateContext
              /home/pi/go/pkg/mod/github.com/!windblade-!g!r01/go-openal@v0.0.0-20200929222908-702203e028e0/openal/alcCore.go:139:110: cannot use _cgo0 (type *_Ctype_struct_ALCdevice) as type *_Ctype_struct_ALCdevice_struct in argument to _Cfunc_walcGetIntegerv
              /home/pi/go/pkg/mod/github.com/!windblade-!g!r01/go-openal@v0.0.0-20200929222908-702203e028e0/openal/alcCore.go:144:156: cannot use _cgo0 (type *_Ctype_struct_ALCdevice) as type *_Ctype_struct_ALCdevice_struct in argument to _Cfunc_walcGetInteger
              /home/pi/go/pkg/mod/github.com/!windblade-!g!r01/go-openal@v0.0.0-20200929222908-702203e028e0/openal/alcCore.go:165:114: cannot use _cgo0 (type *_Ctype_struct_ALCdevice) as type *_Ctype_struct_ALCdevice_struct in argument to _Cfunc_alcCaptureCloseDevice
              /home/pi/go/pkg/mod/github.com/!windblade-!g!r01/go-openal@v0.0.0-20200929222908-702203e028e0/openal/alcCore.go:173:88: cannot use _cgo0 (type *_Ctype_struct_ALCdevice) as type *_Ctype_struct_ALCdevice_struct in argument to _Cfunc_alcCaptureStart
              /home/pi/go/pkg/mod/github.com/!windblade-!g!r01/go-openal@v0.0.0-20200929222908-702203e028e0/openal/alcCore.go:177:86: cannot use _cgo0 (type *_Ctype_struct_ALCdevice) as type *_Ctype_struct_ALCdevice_struct in argument to _Cfunc_alcCaptureStop
              /home/pi/go/pkg/mod/github.com/!windblade-!g!r01/go-openal@v0.0.0-20200929222908-702203e028e0/openal/alcCore.go:181:179: cannot use _cgo0 (type *_Ctype_struct_ALCdevice) as type *_Ctype_struct_ALCdevice_struct in argument to _Cfunc_alcCaptureSamples
              /home/pi/go/pkg/mod/github.com/!windblade-!g!r01/go-openal@v0.0.0-20200929222908-702203e028e0/openal/alcCore.go:185:179: cannot use _cgo0 (type *_Ctype_struct_ALCdevice) as type *_Ctype_struct_ALCdevice_struct in argument to _Cfunc_alcCaptureSamples
              /home/pi/go/pkg/mod/github.com/!windblade-!g!r01/go-openal@v0.0.0-20200929222908-702203e028e0/openal/alcCore.go:185:179: too many errors
              chmod: cannot access './bin/Ikemen_GO': No such file or directory
              cp: cannot create regular file './bin/Ikemen_GO.command': Permission denied
              cp: cannot stat './script/': No such file or directory
              cp: cannot create directory './bin/data/data': Permission denied
              

              Looking at the repository in question, it looks like just one commit was made... in late September, well before I started trying to compile IKEMEN GO, and before this error started to appear on compilation (I never encountered it the first time I tried to compile this fork, as detailed in the initial post of this thread). So honestly, no idea what's causing this.

              Sadly, I haven't been able to make any progress with the LucasFebaits fork either (hence why I haven't replied to this thread since late October). I've tried a few random things like messing with compilation flags (specifically the GOARCH and GOARM flags), installing different versions of golang, and even attempting to run the x86 versions of IKEMEN GO using Box86, all to no avail or even a difference in error messages.

              I'm sure that this shouldn't be all that hard to get running, but the main thing holding this back seems to be my own lack of experience in regards to Golang and IKEMEN GO's codebase (and possibly the nature of 32-bit ARM, since the "game can't run fights" bug seems to stem from floating-points going awry on 32-bit but NOT 64-bit RasPi OS, and the palette corruption bug which I still can't figure out the cause of). The fact that there doesn't seem to be any Go debugger that can run on the Pi doesn't help either.

              I'd really appreciate if someone more knowledgable with this sort of thing would chime in, because I've exhausted just about everything I can reasonably attempt.

              ▲▼▲▼▲▼▲▼▲▼
              IKEMEN Go
              SRB2Kart
              ▼▲▼▲▼▲▼▲▼▲

              1 Reply Last reply Reply Quote 0
              • SuperFromNDS
                SuperFromND
                last edited by

                Sadly, I've still made no progress on this project, and quite frankly I don't think I will for the forseeable future. My skillset and understanding of IKEMEN is simply not good enough to figure out the cause of, and fix, these bugs.

                Semi-related, however, I have released this early version of a tool that can generate IKEMEN's movelist.dat for characters, from existing .cmd files. Movelist.dat's are used to display in-game command inputs for special and super moves, for the sake of quality-of-life, so this is very nice to have.

                ▲▼▲▼▲▼▲▼▲▼
                IKEMEN Go
                SRB2Kart
                ▼▲▼▲▼▲▼▲▼▲

                1 Reply Last reply Reply Quote 0
                • SuperFromNDS
                  SuperFromND
                  last edited by

                  Good news: turns out the OpenAL error can be solved by just using a different build file, build_cmpt.sh instead of just build.sh.

                  Bad news: Still crashes on startup. Same errors as before. I suspect it has something to do with the oto repository for sound that's mentioned in the crash logs, or something OpenAL is doing that the Pi 4 doesn't support.

                  ▲▼▲▼▲▼▲▼▲▼
                  IKEMEN Go
                  SRB2Kart
                  ▼▲▼▲▼▲▼▲▼▲

                  1 Reply Last reply Reply Quote 0
                  • SuperFromNDS
                    SuperFromND
                    last edited by

                    Been a while since I've messed with this (and not a whole lot has happened since January), but here's a recap of the past five months of this project's progress:

                    • Sometime in February: One of IKEMEN GO's lead developers, Gacel (otherwise known as Windblade-GR01) acquired a Raspberry Pi 4 and stated that they would look into it at some point in the future; they stated this back in February and I haven't heard anything about it since then (presumably they've been focused on the engine itself before looking into supporting an admittedly niche platform like the Pi).

                    • Later in February: It appears that the build scripts for Linux builds of IKEMEN GO in general were a bit scuffed, as multiple users in the IKEMEN GO Discord server as well as at least one guy on GitHub reported issues trying to compile from source (specifically the cp -r /external/icons issue in the OP, as well as pointing out that you need screenpack files from an entirely different repo to get the engine to boot at all).

                    • Just this morning: I tried to compile IKEMEN from Windblade's fork again, from a completely fresh install of Raspbian, and this time I got a brand new error, seemingly independent from IKEMEN itself and more to do with the ARM Golang compiler tools itself:

                    pi@raspberrypi:~/Desktop/Stuff/Ikemen-GO/build $ sudo ./build_cmpt.sh 
                    # github.com/Windblade-GR01/Ikemen_GO/src/src
                    /usr/lib/go-1.11/pkg/tool/linux_arm/link: running gcc failed: exit status 1
                    /tmp/go-link-774418994/000000.o: file not recognized: file format not recognized
                    collect2: error: ld returned 1 exit status
                    

                    (Excerpt courtesy of XKCD #2259):
                    An image depicting stick figure having complications with technology.  Someone asks the figure "Are you sure you're okay?", to which the figure responds "I'm fine and I believe in ghosts now!"

                    Other than that, nothing much has happened sadly.

                    ▲▼▲▼▲▼▲▼▲▼
                    IKEMEN Go
                    SRB2Kart
                    ▼▲▼▲▼▲▼▲▼▲

                    1 Reply Last reply Reply Quote 1
                    • SuperFromNDS
                      SuperFromND
                      last edited by

                      Gacel responded, and he stated the main reason that his fork can't compile on Pi seems to be certain dependencies, written with platform-specific C++ code that can't be compiled on the Pi.

                      Ouch.

                      ▲▼▲▼▲▼▲▼▲▼
                      IKEMEN Go
                      SRB2Kart
                      ▼▲▼▲▼▲▼▲▼▲

                      SuperFromNDS 1 Reply Last reply Reply Quote 0
                      • SuperFromNDS
                        SuperFromND @SuperFromND
                        last edited by

                        That mysterious compilation error from last time seems to have been a fluke, as I just re-cloned the repository and was able to successfully compile an executable again. After cloning the default screenpack I gave it a test, but unfortunately it still crashes. At least we're back to this crash log (welcome back, devil-I-know):

                        pi@raspberrypi:~/Desktop/Stuff/Ikemen-GO/bin $ sudo ./Ikemen_GO_linux 
                        fatal error: unexpected signal during runtime execution
                        [signal SIGSEGV: segmentation violation code=0x1 addr=0x6d610071 pc=0xb5f9ce44]
                         
                        runtime stack:
                        runtime.throw(0x58b2ec, 0x2a)
                        	/usr/lib/go-1.11/src/runtime/panic.go:608 +0x5c
                        runtime.sigpanic()
                        	/usr/lib/go-1.11/src/runtime/signal_unix.go:374 +0x22c
                         
                        goroutine 1 [syscall, locked to thread]:
                        runtime.cgocall(0x49e040, 0x4e7fbac, 0x15e6160)
                        	/usr/lib/go-1.11/src/runtime/cgocall.go:128 +0x5c fp=0x4e7fb90 sp=0x4e7fb78 pc=0x51688
                        github.com/sqweek/dialog._Cfunc_msgdlg(0x0, 0x0, 0x3, 0x1, 0x8c152cf0, 0x0)
                        	_cgo_gotypes.go:397 +0x38 fp=0x4e7fba8 sp=0x4e7fb90 pc=0x21d4e8
                        github.com/sqweek/dialog.runMsgDlg(0x56daf1, 0x5, 0x0, 0x3, 0x1, 0x14b1d80, 0x0)
                        	/root/go/pkg/mod/github.com/sqweek/dialog@v0.0.0-20200911184034-8a3d98e8211d/dlgs_linux.go:34 +0x80 fp=0x4e7fbe0 sp=0x4e7fba8 pc=0x21d73c
                        github.com/sqweek/dialog.(*MsgBuilder).error(0x14b1d80)
                        	/root/go/pkg/mod/github.com/sqweek/dialog@v0.0.0-20200911184034-8a3d98e8211d/dlgs_linux.go:51 +0x44 fp=0x4e7fc00 sp=0x4e7fbe0 pc=0x21d8a0
                        github.com/sqweek/dialog.(*MsgBuilder).Error(0x14b1d80)
                        	/root/go/pkg/mod/github.com/sqweek/dialog@v0.0.0-20200911184034-8a3d98e8211d/dlgs.go:61 +0x1c fp=0x4e7fc08 sp=0x4e7fc00 pc=0x21d074
                        main.main()
                        	/home/pi/Desktop/Stuff/Ikemen-GO/src/main.go:94 +0x53c fp=0x4e7ffc4 sp=0x4e7fc08 pc=0x375654
                        runtime.main()
                        	/usr/lib/go-1.11/src/runtime/proc.go:201 +0x204 fp=0x4e7ffe4 sp=0x4e7ffc4 pc=0x7b56c
                        runtime.goexit()
                        	/usr/lib/go-1.11/src/runtime/asm_arm.s:867 +0x4 fp=0x4e7ffe4 sp=0x4e7ffe4 pc=0xa4970
                         
                        goroutine 34 [sleep]:
                        time.Sleep(0x989680, 0x0)
                        	/usr/lib/go-1.11/src/runtime/time.go:105 +0x14c
                        main.(*System).soundWrite(0x8bb2a0)
                        	/home/pi/Desktop/Stuff/Ikemen-GO/src/system.go:661 +0x330
                        created by main.(*System).audioOpen
                        	/home/pi/Desktop/Stuff/Ikemen-GO/src/system.go:649 +0xc4
                         
                        goroutine 36 [syscall]:
                        github.com/hajimehoshi/oto._Cfunc_snd_pcm_writei(0x9c5fb7a8, 0x4aa1a80, 0x5be, 0x0)
                        	_cgo_gotypes.go:173 +0x38
                        github.com/hajimehoshi/oto.(*driver).TryWrite.func1(0xc73260, 0x9c5fb7a8, 0x4aa1a80, 0x5be, 0x0)
                        	/root/go/pkg/mod/github.com/hajimehoshi/oto@v0.5.4/driver_linux.go:143 +0xcc
                        github.com/hajimehoshi/oto.(*driver).TryWrite(0xc73260, 0xde8010, 0xf0, 0x7ff0, 0x0, 0x0, 0x0)
                        	/root/go/pkg/mod/github.com/hajimehoshi/oto@v0.5.4/driver_linux.go:143 +0x1a0
                        github.com/hajimehoshi/oto.(*driverWriter).Write(0xcc46e0, 0xde8000, 0x100, 0x8000, 0x0, 0x0, 0x0)
                        	/root/go/pkg/mod/github.com/hajimehoshi/oto@v0.5.4/context.go:148 +0xd4
                        io.copyBuffer(0x629030, 0xcc46e0, 0x629048, 0xd54330, 0xde8000, 0x8000, 0x8000, 0x0, 0x0, 0x0, ...)
                        	/usr/lib/go-1.11/src/io/io.go:404 +0x1b0
                        io.Copy(0x629030, 0xcc46e0, 0x629048, 0xd54330, 0x0, 0x0, 0x0, 0x0)
                        	/usr/lib/go-1.11/src/io/io.go:364 +0x48
                        github.com/hajimehoshi/oto.NewContext.func1(0xcf2520)
                        	/root/go/pkg/mod/github.com/hajimehoshi/oto@v0.5.4/context.go:85 +0x38
                        created by github.com/hajimehoshi/oto.NewContext
                        	/root/go/pkg/mod/github.com/hajimehoshi/oto@v0.5.4/context.go:84 +0x18c
                         
                        goroutine 37 [select]:
                        io.(*pipe).Write(0xd54360, 0xdb20f0, 0x43f8, 0x43f8, 0xf0, 0x0, 0x0)
                        	/usr/lib/go-1.11/src/io/pipe.go:87 +0x14c
                        io.(*PipeWriter).Write(0xcc2bb0, 0xdb2000, 0x44e8, 0x44e8, 0x0, 0xdb0000, 0x4e10000)
                        	/usr/lib/go-1.11/src/io/pipe.go:153 +0x38
                        github.com/hajimehoshi/oto.(*Player).Write(0xcc4720, 0xdb2000, 0x44e8, 0x44e8, 0x113a, 0x1, 0x0)
                        	/root/go/pkg/mod/github.com/hajimehoshi/oto@v0.5.4/player.go:60 +0x40
                        github.com/faiface/beep/speaker.update()
                        	/root/go/pkg/mod/github.com/faiface/beep@v1.0.2/speaker/speaker.go:129 +0x184
                        github.com/faiface/beep/speaker.Init.func1()
                        	/root/go/pkg/mod/github.com/faiface/beep@v1.0.2/speaker/speaker.go:52 +0x18
                        created by github.com/faiface/beep/speaker.Init
                        	/root/go/pkg/mod/github.com/faiface/beep@v1.0.2/speaker/speaker.go:48 +0x1d8
                         
                        goroutine 20 [syscall]:
                        syscall.Syscall(0x3, 0x0, 0xed0000, 0x1000, 0x0, 0x59501, 0xfa940)
                        	/usr/lib/go-1.11/src/syscall/asm_linux_arm.s:14 +0x8
                        syscall.read(0x0, 0xed0000, 0x1000, 0x1000, 0xed2001, 0x0, 0x0)
                        	/usr/lib/go-1.11/src/syscall/zsyscall_linux_arm.go:732 +0x40
                        syscall.Read(0x0, 0xed0000, 0x1000, 0x1000, 0x0, 0x1, 0x1)
                        	/usr/lib/go-1.11/src/syscall/syscall_unix.go:172 +0x34
                        internal/poll.(*FD).Read(0xc84000, 0xed0000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
                        	/usr/lib/go-1.11/src/internal/poll/fd_unix.go:165 +0xf0
                        os.(*File).read(0xc70130, 0xed0000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
                        	/usr/lib/go-1.11/src/os/file_unix.go:249 +0x3c
                        os.(*File).Read(0xc70130, 0xed0000, 0x1000, 0x1000, 0x1000, 0x1000, 0x0)
                        	/usr/lib/go-1.11/src/os/file.go:108 +0x4c
                        bufio.(*Scanner).Scan(0xc20fa4, 0x0)
                        	/usr/lib/go-1.11/src/bufio/scan.go:213 +0x88
                        main.(*System).init.func1(0x8bb2a0)
                        	/home/pi/Desktop/Stuff/Ikemen-GO/src/system.go:546 +0xac
                        created by main.(*System).init
                        	/home/pi/Desktop/Stuff/Ikemen-GO/src/system.go:544 +0x684
                        pi@raspberrypi:~/Desktop/Stuff/Ikemen-GO/bin $ 
                        

                        Side note: one of the fellows in the IKEMEN Discord by the name of MangeX pointed out that the OpenAL issues may have been caused by a missing folder, include/AL from the main OpenAL repository, that wasn't in Windblade's OpenAL fork. This ultimately proved to be redundant information since the issue seemingly fixed itself if my most-recent compilation test is any indication, but if it crops up again at least I have some sort of scapegoat to blame cause to troubleshoot,

                        ▲▼▲▼▲▼▲▼▲▼
                        IKEMEN Go
                        SRB2Kart
                        ▼▲▼▲▼▲▼▲▼▲

                        SuperFromNDS 1 Reply Last reply Reply Quote 0
                        • SuperFromNDS
                          SuperFromND @SuperFromND
                          last edited by SuperFromND

                          So a few hours after I made my last post, Gacel pointed out that I was compiling using Go 1.11, since that's the version of Go that you get when using apt-get install. However, it turns out the latest version of Go is 1.16, so he suggested I install that instead. After a tiny bit of fiddling around with Linux (and a slight modification to the build_cmpt.sh script since, for some reason, shell scripts didn't acknowledge my manual Golang installation) I compiled the executable again and... it crashed. But it crashed slightly differently than before:

                          pi@raspberrypi:~/Desktop/Stuff/Ikemen-GO/bin $ sudo ./Ikemen_GO_linux 
                          fatal error: unexpected signal during runtime execution
                          [signal SIGSEGV: segmentation violation code=0x1 addr=0x6d610071 pc=0xb600be44]
                           
                          runtime stack:
                          runtime.throw(0x542794, 0x2a)
                          	/usr/local/go/src/runtime/panic.go:1117 +0x5c
                          runtime.sigpanic()
                          	/usr/local/go/src/runtime/signal_unix.go:718 +0x224
                           
                          goroutine 1 [syscall, locked to thread]:
                          runtime.cgocall(0x4a2c90, 0x2aedb90, 0x289bfb0)
                          	/usr/local/go/src/runtime/cgocall.go:154 +0x5c fp=0x2aedb78 sp=0x2aedb60 pc=0x52490
                          github.com/sqweek/dialog._Cfunc_msgdlg(0x0, 0x0, 0x3, 0x1, 0x8d2ad550, 0x0)
                          	_cgo_gotypes.go:404 +0x34 fp=0x2aedb8c sp=0x2aedb78 pc=0x228db8
                          github.com/sqweek/dialog.runMsgDlg(0x52426f, 0x5, 0x0, 0x3, 0x1, 0x2aeddcc, 0x0)
                          	/root/go/pkg/mod/github.com/sqweek/dialog@v0.0.0-20200911184034-8a3d98e8211d/dlgs_linux.go:34 +0x90 fp=0x2aedbd8 sp=0x2aedb8c pc=0x228fe8
                          github.com/sqweek/dialog.(*MsgBuilder).error(...)
                          	/root/go/pkg/mod/github.com/sqweek/dialog@v0.0.0-20200911184034-8a3d98e8211d/dlgs_linux.go:51
                          github.com/sqweek/dialog.(*MsgBuilder).Error(...)
                          	/root/go/pkg/mod/github.com/sqweek/dialog@v0.0.0-20200911184034-8a3d98e8211d/dlgs.go:61
                          main.main()
                          	/home/pi/Desktop/Stuff/Ikemen-GO/src/main.go:94 +0x58c fp=0x2aedfb8 sp=0x2aedbd8 pc=0x377750
                          runtime.main()
                          	/usr/local/go/src/runtime/proc.go:225 +0x26c fp=0x2aedfe4 sp=0x2aedfb8 pc=0x8766c
                          runtime.goexit()
                          	/usr/local/go/src/runtime/asm_arm.s:841 +0x4 fp=0x2aedfe4 sp=0x2aedfe4 pc=0xb7cbc
                           
                          goroutine 4 [sleep]:
                          time.Sleep(0x989680, 0x0)
                          	/usr/local/go/src/runtime/time.go:193 +0x100
                          main.(*System).soundWrite(0x7af798)
                          	/home/pi/Desktop/Stuff/Ikemen-GO/src/system.go:661 +0x354
                          created by main.(*System).audioOpen
                          	/home/pi/Desktop/Stuff/Ikemen-GO/src/system.go:649 +0xc4
                           
                          goroutine 20 [syscall]:
                          github.com/hajimehoshi/oto._Cfunc_snd_pcm_writei(0x9c8836a8, 0x35a8000, 0x5be, 0x0)
                          	_cgo_gotypes.go:173 +0x34
                          github.com/hajimehoshi/oto.(*driver).TryWrite.func1(0x208e300, 0x2208000)
                          	/root/go/pkg/mod/github.com/hajimehoshi/oto@v0.5.4/driver_linux.go:143 +0xb4
                          github.com/hajimehoshi/oto.(*driver).TryWrite(0x208e300, 0x22080a8, 0x58, 0x7f58, 0x0, 0x0, 0x0)
                          	/root/go/pkg/mod/github.com/hajimehoshi/oto@v0.5.4/driver_linux.go:143 +0x15c
                          github.com/hajimehoshi/oto.(*driverWriter).Write(0x20d2060, 0x2208000, 0x100, 0x8000, 0x0, 0x0, 0x0)
                          	/root/go/pkg/mod/github.com/hajimehoshi/oto@v0.5.4/context.go:148 +0xe0
                          io.copyBuffer(0x5cecd8, 0x20d2060, 0x5cecec, 0x2092300, 0x2208000, 0x8000, 0x8000, 0x0, 0x0, 0x0, ...)
                          	/usr/local/go/src/io/io.go:425 +0x1c0
                          io.Copy(...)
                          	/usr/local/go/src/io/io.go:382
                          github.com/hajimehoshi/oto.NewContext.func1(0x20d04e0)
                          	/root/go/pkg/mod/github.com/hajimehoshi/oto@v0.5.4/context.go:85 +0x58
                          created by github.com/hajimehoshi/oto.NewContext
                          	/root/go/pkg/mod/github.com/hajimehoshi/oto@v0.5.4/context.go:84 +0x1e8
                           
                          goroutine 21 [select]:
                          io.(*pipe).Write(0x2090240, 0x21dce48, 0x16a0, 0x16a0, 0x2e48, 0x0, 0x0)
                          	/usr/local/go/src/io/pipe.go:94 +0x148
                          io.(*PipeWriter).Write(0x21c62c8, 0x21da000, 0x44e8, 0x44e8, 0x113a, 0x1, 0x0)
                          	/usr/local/go/src/io/pipe.go:163 +0x38
                          github.com/hajimehoshi/oto.(*Player).Write(...)
                          	/root/go/pkg/mod/github.com/hajimehoshi/oto@v0.5.4/player.go:60
                          github.com/faiface/beep/speaker.update()
                          	/root/go/pkg/mod/github.com/faiface/beep@v1.0.2/speaker/speaker.go:129 +0x190
                          github.com/faiface/beep/speaker.Init.func1()
                          	/root/go/pkg/mod/github.com/faiface/beep@v1.0.2/speaker/speaker.go:52 +0x18
                          created by github.com/faiface/beep/speaker.Init
                          	/root/go/pkg/mod/github.com/faiface/beep@v1.0.2/speaker/speaker.go:48 +0x1d4
                           
                          goroutine 22 [syscall]:
                          syscall.Syscall(0x3, 0x0, 0x213a000, 0x1000, 0x1154ec, 0xff800000, 0x7ff)
                          	/usr/local/go/src/syscall/asm_linux_arm.s:14 +0x8
                          syscall.read(0x0, 0x213a000, 0x1000, 0x1000, 0x0, 0x1, 0x1)
                          	/usr/local/go/src/syscall/zsyscall_linux_arm.go:686 +0x40
                          syscall.Read(...)
                          	/usr/local/go/src/syscall/syscall_unix.go:187
                          internal/poll.ignoringEINTRIO(...)
                          	/usr/local/go/src/internal/poll/fd_unix.go:581
                          internal/poll.(*FD).Read(0x2070000, 0x213a000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
                          	/usr/local/go/src/internal/poll/fd_unix.go:162 +0x118
                          os.(*File).read(...)
                          	/usr/local/go/src/os/file_posix.go:31
                          os.(*File).Read(0x2010178, 0x213a000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
                          	/usr/local/go/src/os/file.go:117 +0x5c
                          bufio.(*Scanner).Scan(0x20287a4, 0x0)
                          	/usr/local/go/src/bufio/scan.go:214 +0x88
                          main.(*System).init.func1(0x7af798)
                          	/home/pi/Desktop/Stuff/Ikemen-GO/src/system.go:546 +0x9c
                          created by main.(*System).init
                          	/home/pi/Desktop/Stuff/Ikemen-GO/src/system.go:544 +0x5c4
                          

                          Just parsing the log, I noticed the difference (aside from some hex values and routine numbers) was from a section mentioning the intro, so I assumed the problem was related to IKEMEN's intro cutscene included in the default motif. Another fellow in the IKEMEN Discord named Amavect chimed in and told me to check Ikemen.log, thinking that it might be a problem with the LUA code that IKEMEN also uses. After opening the log, this is what I saw:

                          failed to compile #version 150 core
                          
                          //vertex position
                          in vec2 vert;
                          
                          //pass through to fragTexCoord
                          in vec2 vertTexCoord;
                          
                          //window res
                          uniform vec2 resolution;
                          
                          //pass to frag
                          out vec2 fragTexCoord;
                          
                          void main() {
                             // convert the rectangle from pixels to 0.0 to 1.0
                             vec2 zeroToOne = vert / resolution;
                          
                             // convert from 0->1 to 0->2
                             vec2 zeroToTwo = zeroToOne * 2.0;
                          
                             // convert from 0->2 to -1->+1 (clipspace)
                             vec2 clipSpace = zeroToTwo - 1.0;
                          
                             fragTexCoord = vertTexCoord;
                          
                             gl_Position = vec4(clipSpace * vec2(1, -1), 0, 1);
                          } : 0:1(10): error: GLSL 1.50 is not supported. Supported versions are: 1.10, 1.20, 1.00 ES, and 3.00 ES
                            
                          goroutine 1 [running, locked to thread]:
                          github.com/yuin/gopher-lua.(*LState).PCall.func1(0x54a358, 0x1e16000, 0x2cb5bd0, 0x0, 0x0, 0x0)
                          	/root/go/pkg/mod/github.com/yuin/gopher-lua@v0.0.0-20200816102855-ee81675732da/state.go:1980 +0x4fc
                          panic(0x4d81b8, 0x2280778)
                          	/usr/local/go/src/runtime/panic.go:965 +0x174
                          github.com/Windblade-GR01/glfont.LoadFont(0x2ca4c60, 0x23, 0x1b, 0x140, 0xf0, 0x0, 0x0, 0x0)
                          	/root/go/pkg/mod/github.com/!windblade-!g!r01/glfont@v0.0.0-20200825224555-fc4d8149c6a0/font.go:48 +0x2f4
                          main.loadFntTtf(0x2a38c30, 0x2261f98, 0x12, 0x2a504c2, 0x1e, 0x1b)
                          	/home/pi/Desktop/Stuff/Ikemen-GO/src/font.go:340 +0x120
                          main.loadDefInfo(0x2a38c30, 0x2261f98, 0x12, 0x2cb5728, 0xffffffff)
                          	/home/pi/Desktop/Stuff/Ikemen-GO/src/font.go:314 +0x370
                          main.loadFntV2(0x2261f98, 0x12, 0xffffffff, 0x0, 0x24b2480, 0xcaa4c)
                          	/home/pi/Desktop/Stuff/Ikemen-GO/src/font.go:275 +0x25c
                          main.loadFnt(0x24c9f90, 0xd, 0xffffffff, 0xd, 0x8, 0x4d3110)
                          	/home/pi/Desktop/Stuff/Ikemen-GO/src/font.go:49 +0x70
                          main.systemScriptInit.func53(0x1e16000, 0x2)
                          	/home/pi/Desktop/Stuff/Ikemen-GO/src/script.go:766 +0x6c
                          github.com/yuin/gopher-lua.callGFunction(0x1e16000, 0x0, 0x1e69460)
                          	/root/go/pkg/mod/github.com/yuin/gopher-lua@v0.0.0-20200816102855-ee81675732da/vm.go:202 +0x30
                          github.com/yuin/gopher-lua.init.3.func26(0x1e16000, 0x7c100403, 0x1e18050, 0x0)
                          	/root/go/pkg/mod/github.com/yuin/gopher-lua@v0.0.0-20200816102855-ee81675732da/vm.go:817 +0x330
                          github.com/yuin/gopher-lua.mainLoop(0x1e16000, 0x1e18050)
                          	/root/go/pkg/mod/github.com/yuin/gopher-lua@v0.0.0-20200816102855-ee81675732da/vm.go:31 +0xdc
                          github.com/yuin/gopher-lua.(*LState).callR(0x1e16000, 0x1, 0x1, 0x17)
                          	/root/go/pkg/mod/github.com/yuin/gopher-lua@v0.0.0-20200816102855-ee81675732da/state.go:1203 +0x1b8
                          github.com/yuin/gopher-lua.(*LState).Call(...)
                          	/root/go/pkg/mod/github.com/yuin/gopher-lua@v0.0.0-20200816102855-ee81675732da/state.go:1959
                          github.com/yuin/gopher-lua.loRequire(0x1e16000, 0x2a)
                          	/root/go/pkg/mod/github.com/yuin/gopher-lua@v0.0.0-20200816102855-ee81675732da/baselib.go:559 +0x46c
                          github.com/yuin/gopher-lua.callGFunction(0x1e16000, 0x0, 0x1e13d20)
                          	/root/go/pkg/mod/github.com/yuin/gopher-lua@v0.0.0-20200816102855-ee81675732da/vm.go:202 +0x30
                          github.com/yuin/gopher-lua.init.3.func26(0x1e16000, 0x7c500402, 0x1e18000, 0x0)
                          	/root/go/pkg/mod/github.com/yuin/gopher-lua@v0.0.0-20200816102855-ee81675732da/vm.go:817 +0x330
                          github.com/yuin/gopher-lua.mainLoop(0x1e16000, 0x1e18000)
                          	/root/go/pkg/mod/github.com/yuin/gopher-lua@v0.0.0-20200816102855-ee81675732da/vm.go:31 +0xdc
                          github.com/yuin/gopher-lua.(*LState).callR(0x1e16000, 0x0, 0xffffffff, 0x0)
                          	/root/go/pkg/mod/github.com/yuin/gopher-lua@v0.0.0-20200816102855-ee81675732da/state.go:1203 +0x1b8
                          github.com/yuin/gopher-lua.(*LState).Call(...)
                          	/root/go/pkg/mod/github.com/yuin/gopher-lua@v0.0.0-20200816102855-ee81675732da/state.go:1959
                          github.com/yuin/gopher-lua.(*LState).PCall(0x1e16000, 0x0, 0xffffffff, 0x0, 0x5ced50, 0x311e0a0)
                          	/root/go/pkg/mod/github.com/yuin/gopher-lua@v0.0.0-20200816102855-ee81675732da/state.go:2022 +0xec
                          github.com/yuin/gopher-lua.(*LState).DoFile(0x1e16000, 0x1cb65b8, 0x18, 0x1e16000, 0xf)
                          	/root/go/pkg/mod/github.com/yuin/gopher-lua@v0.0.0-20200816102855-ee81675732da/auxlib.go:396 +0x94
                          main.main()
                          	/home/pi/Desktop/Stuff/Ikemen-GO/src/main.go:87 +0x150
                          
                          stack traceback:
                          	[G]: in function 'fontNew'
                          	external/script/main.lua:400: in function <external/script/main.lua:375>
                          	(tailcall): ?
                          	./external/script/menu.lua:374: in function <./external/script/menu.lua:0>
                          	[G]: in function 'require'
                          	external/script/main.lua:2123: in main chunk
                          	[G]: ?
                          

                          While that last bit does mention LUA, the error at the very top of the log got me intrigued, so I searched for it on the IKEMEN-GO issues repository, which lead me to discover this issue, and a surprisingly detailed explanation and workaround posted by EVILEDLIBRE (great username by the way!), so I decided to give that workaround a try, and...

                          Windblade-GR01-IKEMEN GO on Pi 4.jpg

                          It got to the main menu, holy $#!&.

                          Interestingly, the issues that were present in LucasFebaits's fork are all here: the crashing on 32-bit Raspbian, the palette corruption, and even a brand new bug where inputs are seemingly triggering eachother (so for example, pressing down would also trigger a button press, making it impossible to navigate the menu).

                          But even in this largely nonfunctional, highly broken state, this is a GIGANTIC break from the constant no-hoper crash logs I kept running into, and definetly motivates me to keep pursuing this.

                          Addendum

                          Here's a quick summary of what does and does not work on Windblade's fork on a 32-bit-OS Pi 4, now that I've gotten it to compile:

                          • Screenpack audio appears to be working just fine, surprisingly
                          • On my wireless USB keyboard, inputs were registering eachother for some reason; on my Rock Candy X360 pad, this overlap did not occur but IKEMEN refused to read most of the buttons (the D-pad buttons were rotated 90 degrees and Left didn't work at all, but A and B seemed to work perfectly fine; it's worth noting that IKEMEN's input system experiences strange behavior even on Windows and a rewrite of that has been planned for a while)
                          • Trying to start a fight crashes with the following log:
                          unexpected fault address 0x0
                          fatal error: fault
                          [signal SIGBUS: bus error code=0x1 addr=0x0 pc=0x2ae630]
                          
                          goroutine 1 [running, locked to thread]:
                          runtime.throw(0x5243e6, 0x5)
                          	/usr/local/go/src/runtime/panic.go:1117 +0x5c fp=0x2adb430 sp=0x2adb41c pc=0x84d48
                          runtime.sigpanic()
                          	/usr/local/go/src/runtime/signal_unix.go:731 +0x210 fp=0x2adb448 sp=0x2adb430 pc=0x9bfc8
                          main.(*BytecodeStack).PushF(...)
                          	/home/pi/Desktop/Stuff/Ikemen-GO/src/bytecode.go:566
                          main.BytecodeExp.run(0x39ab3a8, 0x5, 0x38, 0x35e2000, 0x1c, 0xa, 0x35e2000)
                          	/home/pi/Desktop/Stuff/Ikemen-GO/src/bytecode.go:965 +0x7dc fp=0x2adb6b8 sp=0x2adb44c pc=0x2ae630
                          main.BytecodeExp.evalF(...)
                          	/home/pi/Desktop/Stuff/Ikemen-GO/src/bytecode.go:1858
                          main.mapSet.Run.func1(0x4d5201, 0x281e000, 0x1, 0x1, 0x3cc2201)
                          	/home/pi/Desktop/Stuff/Ikemen-GO/src/bytecode.go:6709 +0xd4 fp=0x2adb6e8 sp=0x2adb6b8 pc=0x3bf45c
                          main.StateControllerBase.run(0x39ab380, 0x35, 0x60, 0x35e2000, 0x2adb738)
                          	/home/pi/Desktop/Stuff/Ikemen-GO/src/bytecode.go:2064 +0x11c fp=0x2adb70c sp=0x2adb6e8 pc=0x2c6c80
                          main.mapSet.Run(0x39ab380, 0x35, 0x60, 0x35e2000, 0x0, 0x0, 0x0, 0x3ff00000)
                          	/home/pi/Desktop/Stuff/Ikemen-GO/src/bytecode.go:6704 +0x9c fp=0x2adb750 sp=0x2adb70c pc=0x2d0d88
                          main.(*mapSet).Run(0x295e6c0, 0x35e2000, 0x0, 0x0, 0x0, 0x7ec1e0)
                          	<autogenerated>:1 +0x64 fp=0x2adb774 sp=0x2adb750 pc=0x424608
                          main.StateBlock.Run(0x1, 0xffffffff, 0xfffffffe, 0x0, 0x3848c10, 0x4, 0x8, 0x3c608d0, 0x30fd300, 0x9, ...)
                          	/home/pi/Desktop/Stuff/Ikemen-GO/src/bytecode.go:1978 +0x188 fp=0x2adb7f0 sp=0x2adb774 pc=0x2c6468
                          main.StateBlock.Run(0x1, 0xffffffff, 0xffffffff, 0x0, 0x3848600, 0x6, 0x8, 0x3c608a0, 0x283d320, 0x1, ...)
                          	/home/pi/Desktop/Stuff/Ikemen-GO/src/bytecode.go:1966 +0x23c fp=0x2adb86c sp=0x2adb7f0 pc=0x2c651c
                          main.StateBlock.Run(0x1, 0xffffffff, 0xffffffff, 0x0, 0x3848560, 0xe, 0x10, 0x3c60780, 0x0, 0x0, ...)
                          	/home/pi/Desktop/Stuff/Ikemen-GO/src/bytecode.go:1966 +0x23c fp=0x2adb8e8 sp=0x2adb86c pc=0x2c651c
                          main.(*StateBlock).Run(0x3c611d0, 0x35e2000, 0x0, 0x0, 0x0, 0x8ae70500)
                          	<autogenerated>:1 +0x60 fp=0x2adb958 sp=0x2adb8e8 pc=0x41f1a4
                          main.StateBlock.Run(0x1, 0xffffffff, 0xffffffff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x37a7d00, 0x7, ...)
                          	/home/pi/Desktop/Stuff/Ikemen-GO/src/bytecode.go:1978 +0x188 fp=0x2adb9d4 sp=0x2adb958 pc=0x2c6468
                          main.(*StateBytecode).run(0x2fc6000, 0x35e2000, 0xfffffffc)
                          	/home/pi/Desktop/Stuff/Ikemen-GO/src/bytecode.go:7299 +0xac fp=0x2adba68 sp=0x2adb9d4 pc=0x2d1c64
                          main.(*Char).action(0x35e2000)
                          	/home/pi/Desktop/Stuff/Ikemen-GO/src/char.go:5157 +0xe44 fp=0x2adbbd8 sp=0x2adba68 pc=0x2f2890
                          main.(*CharList).action(0x7b70b8, 0x0, 0x2adbc58, 0x2adbc5c, 0x2adbc54, 0x2adbc40, 0x2adf90c, 0x2adf910)
                          	/home/pi/Desktop/Stuff/Ikemen-GO/src/char.go:5695 +0x80 fp=0x2adbc00 sp=0x2adbbd8 pc=0x2f6570
                          main.(*System).action(0x7af798, 0x2adf970, 0x2adf96c, 0x3f800000, 0x0, 0x0, 0x0)
                          	/home/pi/Desktop/Stuff/Ikemen-GO/src/system.go:1196 +0x410 fp=0x2adf8f8 sp=0x2adbc00 pc=0x398764
                          main.(*System).fight(0x7af798, 0x3374000)
                          	/home/pi/Desktop/Stuff/Ikemen-GO/src/system.go:2148 +0x10b8 fp=0x2ae1114 sp=0x2adf8f8 pc=0x39ce94
                          main.systemScriptInit.func54.2(0xc, 0x54a490, 0x7af798)
                          	/home/pi/Desktop/Stuff/Ikemen-GO/src/script.go:878 +0x46c fp=0x2ae1808 sp=0x2ae1114 pc=0x3f2470
                          main.systemScriptInit.func54(0x2112240, 0x0)
                          	/home/pi/Desktop/Stuff/Ikemen-GO/src/script.go:921 +0x328 fp=0x2ae1a1c sp=0x2ae1808 pc=0x3f2d84
                          github.com/yuin/gopher-lua.callGFunction(0x2112240, 0x0, 0x2288700)
                          	/root/go/pkg/mod/github.com/yuin/gopher-lua@v0.0.0-20200816102855-ee81675732da/vm.go:202 +0x30 fp=0x2ae1a4c sp=0x2ae1a1c pc=0x2772d8
                          github.com/yuin/gopher-lua.init.3.func26(0x2112240, 0x7c080601, 0x2252000, 0x0)
                          	/root/go/pkg/mod/github.com/yuin/gopher-lua@v0.0.0-20200816102855-ee81675732da/vm.go:817 +0x330 fp=0x2ae1af8 sp=0x2ae1a4c pc=0x27cc3c
                          github.com/yuin/gopher-lua.mainLoop(0x2112240, 0x2252000)
                          	/root/go/pkg/mod/github.com/yuin/gopher-lua@v0.0.0-20200816102855-ee81675732da/vm.go:31 +0xdc fp=0x2ae1b0c sp=0x2ae1af8 pc=0x276e58
                          github.com/yuin/gopher-lua.(*LState).callR(0x2112240, 0x0, 0xffffffff, 0x0)
                          	/root/go/pkg/mod/github.com/yuin/gopher-lua@v0.0.0-20200816102855-ee81675732da/state.go:1203 +0x1b8 fp=0x2ae1b80 sp=0x2ae1b0c pc=0x269164
                          github.com/yuin/gopher-lua.(*LState).Call(...)
                          	/root/go/pkg/mod/github.com/yuin/gopher-lua@v0.0.0-20200816102855-ee81675732da/state.go:1959
                          github.com/yuin/gopher-lua.(*LState).PCall(0x2112240, 0x0, 0xffffffff, 0x0, 0x0, 0x0)
                          	/root/go/pkg/mod/github.com/yuin/gopher-lua@v0.0.0-20200816102855-ee81675732da/state.go:2022 +0xec fp=0x2ae1bbc sp=0x2ae1b80 pc=0x26cbc4
                          github.com/yuin/gopher-lua.(*LState).DoFile(0x2112240, 0x2014720, 0x18, 0x2112240, 0xf)
                          	/root/go/pkg/mod/github.com/yuin/gopher-lua@v0.0.0-20200816102855-ee81675732da/auxlib.go:396 +0x94 fp=0x2ae1bd8 sp=0x2ae1bbc pc=0x23f834
                          main.main()
                          	/home/pi/Desktop/Stuff/Ikemen-GO/src/main.go:87 +0x150 fp=0x2ae1fb8 sp=0x2ae1bd8 pc=0x377314
                          runtime.main()
                          	/usr/local/go/src/runtime/proc.go:225 +0x26c fp=0x2ae1fe4 sp=0x2ae1fb8 pc=0x8766c
                          runtime.goexit()
                          	/usr/local/go/src/runtime/asm_arm.s:841 +0x4 fp=0x2ae1fe4 sp=0x2ae1fe4 pc=0xb7cbc
                          
                          goroutine 18 [sleep]:
                          time.Sleep(0x989680, 0x0)
                          	/usr/local/go/src/runtime/time.go:193 +0x100
                          main.(*System).soundWrite(0x7af798)
                          	/home/pi/Desktop/Stuff/Ikemen-GO/src/system.go:661 +0x354
                          created by main.(*System).audioOpen
                          	/home/pi/Desktop/Stuff/Ikemen-GO/src/system.go:649 +0xc4
                          
                          goroutine 6 [runnable]:
                          github.com/hajimehoshi/oto._Cfunc_snd_pcm_writei(0x9c6f9b98, 0x2a98000, 0x5be, 0x5be)
                          	_cgo_gotypes.go:173 +0x34
                          github.com/hajimehoshi/oto.(*driver).TryWrite.func1(0x200d200, 0x209e000)
                          	/root/go/pkg/mod/github.com/hajimehoshi/oto@v0.5.4/driver_linux.go:143 +0xb4
                          github.com/hajimehoshi/oto.(*driver).TryWrite(0x200d200, 0x209e028, 0xd8, 0x7fd8, 0x0, 0x0, 0x0)
                          	/root/go/pkg/mod/github.com/hajimehoshi/oto@v0.5.4/driver_linux.go:143 +0x15c
                          github.com/hajimehoshi/oto.(*driverWriter).Write(0x207c300, 0x209e000, 0x100, 0x8000, 0x0, 0x0, 0x0)
                          	/root/go/pkg/mod/github.com/hajimehoshi/oto@v0.5.4/context.go:148 +0xe0
                          io.copyBuffer(0x5cecd8, 0x207c300, 0x5cecec, 0x205e5a0, 0x209e000, 0x8000, 0x8000, 0x0, 0x0, 0x0, ...)
                          	/usr/local/go/src/io/io.go:425 +0x1c0
                          io.Copy(...)
                          	/usr/local/go/src/io/io.go:382
                          github.com/hajimehoshi/oto.NewContext.func1(0x200e8e0)
                          	/root/go/pkg/mod/github.com/hajimehoshi/oto@v0.5.4/context.go:85 +0x58
                          created by github.com/hajimehoshi/oto.NewContext
                          	/root/go/pkg/mod/github.com/hajimehoshi/oto@v0.5.4/context.go:84 +0x1e8
                          
                          goroutine 7 [select]:
                          io.(*pipe).Write(0x2054340, 0x22400d8, 0x4410, 0x4410, 0xd8, 0x0, 0x0)
                          	/usr/local/go/src/io/pipe.go:94 +0x148
                          io.(*PipeWriter).Write(0x2161338, 0x2240000, 0x44e8, 0x44e8, 0x113a, 0x1, 0x0)
                          	/usr/local/go/src/io/pipe.go:163 +0x38
                          ... (32 lines left)
                          
                          • The palette corruption described in the OP regarding LucasFebaits's fork is also in effect here
                          • Fullscreen works, but does not revert to normal resolution on exit and crashes outright on composite-output mode

                          And the two major ingredients (it seems) to getting Windblade's IKEMEN GO to compile on the Pi 4 are:

                          • Using Go 1.16.4 instead of apt-get install's 1.11. No idea how this would be accomplished using a RetroPie script module (as I've never seen a scenario where a dependency like go was obtained through anything other than apt-get install)
                          • Forcing the executable to be ran with MESA_GL_VERSION_OVERRIDE=4.3, as IKEMEN GO was designed with GL 2.1 features, and the default version of GLES ran seems to cause compatiability issues with it; this could be accomplished very easily in a shellscript:
                          #!/bin/sh
                          MESA_GL_VERSION_OVERRIDE=4.3 ./Ikemen_GO_linux
                          

                          ▲▼▲▼▲▼▲▼▲▼
                          IKEMEN Go
                          SRB2Kart
                          ▼▲▼▲▼▲▼▲▼▲

                          T 1 Reply Last reply Reply Quote 0
                          • M
                            MrRussellgro
                            last edited by

                            This looks like some sweet progress. Hope it works well! I'm stoked to see how I.K.E.M.E.N looks like on RetroPie.

                            1 Reply Last reply Reply Quote 0
                            • T
                              Troopaking @SuperFromND
                              last edited by

                              @superfromnd
                              Hello so I have been working on getting mugen to run on pi 4 . I have a had really good success using box86/wine and Lutris on TwisterOS .
                              Will be releasing a precompliled mugen image titled M.I.M.P (mimp is mugen pi) semi soon. Hopefully launching multiple mugens from emulationstation or pegasus frontend.
                              Glad to see others with similar ideas .
                              Good luck I have been trying since day one of owning a pi 4 . Just now made good progress.

                              M 1 Reply Last reply Reply Quote 2
                              • M
                                MrRussellgro @Troopaking
                                last edited by

                                @troopaking That's awesome! I am pleased to hear you got something going on as well.

                                1 Reply Last reply Reply Quote 0
                                • SuperFromNDS
                                  SuperFromND
                                  last edited by

                                  Haven't made any progress on this, but I'm posting because it turns out that a fellow on Reddit managed to get MUGEN running using Box86 and Wine, not unlike Troopaking's post above.

                                  This isn't really helping IKEMEN GO's case at all, but I thought it was worth mentioning at least. :D

                                  ▲▼▲▼▲▼▲▼▲▼
                                  IKEMEN Go
                                  SRB2Kart
                                  ▼▲▼▲▼▲▼▲▼▲

                                  T 1 Reply Last reply Reply Quote 0
                                  • T
                                    Troopaking @SuperFromND
                                    last edited by

                                    @superfromnd
                                    Check this
                                    https://retropie.org.uk/forum/topic/28528/box86-and-wine-on-rpi4/333

                                    We've been working hard and have a how to add to any build in it . All old windows games ikemen would work loaded over 30 mugens and tested already

                                    1 Reply Last reply Reply Quote 0
                                    • J
                                      joamjoamjoam
                                      last edited by

                                      @SuperFromND Hey I just found out about Mugen last week and I need more of it lol. I think Ikemen and Retropie are a perfect match and so I wanted to step in and help as much as I can. Ive been trying to port Ikemen to the pi over the past couple days and i ran across this gem of a thread and i wanted to add my progress and hopefully we can get this thing built into retropie at some point.

                                      Anyways Using the LucasFebatis branch of Ikemen-Go-Plus I was able to compile and run a match using the Retropie prebuilt 32-bit image.

                                      I was getting the infamous SIGBUS error which is because some of the OPCodes (mainly just OC_float) in bytecode.go:run() is trying to convert some bytes from the stack into an address but this address is not valid hence the SIGBUS. To get around this i replaced the line:

                                      sys.bcStack.PushF(*(*float32)(unsafe.Pointer(&be[i])))

                                      with

                                      sys.bcStack.PushF(0);

                                      This fixed the sigbus error on match load and got me into matches. Where to my surprise i found no pallette bug. I wasn't able to find the pallette character you were using but i did try to fight with the one and only Ronald Mcdonald to produce the below screenshot.
                                      No Pallette Error.png

                                      The only bug i ran into now is that because the OC_Float opcode is used to convert float numbers in the boolean expressions that move characters from state to state in their .def file, by hard coding the address of 0 the characters get stuck in states that they cannot get out of. This leads to issues like KFM looks like he's falling forever and cant be hit since that state ignores hits. So if we can see why these addresses are coming up wrong when read in the OC_float case in bytecode.go:run() we should be able to actually play matches.

                                      If you'd like me to send anything of what I have so far let me know ill keep monitoring this thread.

                                      1 Reply Last reply Reply Quote 1
                                      • J
                                        joamjoamjoam
                                        last edited by

                                        Oh and some stats about what I'm using night help recreate my results:

                                        GO version (default installed from apt-get)
                                        go 1.11.6 linux/arm

                                        Pi Model (from /proc/cpuinfo):
                                        Raspberry Pi 4 Model B Rev 1.1

                                        Retropie version 4.6:

                                        my Run.sh

                                        #!/bin/sh
                                        export GOPATH=$PWD/go
                                        export DISPLAY=192.168.0.106:2.0
                                        echo Using Display $DISPLAY
                                        go fmt ./src/.go
                                        MESA_GL_VERSION_OVERRIDE=4.3 go run ./src/
                                        .go

                                        1 Reply Last reply Reply Quote 0
                                        • J
                                          joamjoamjoam
                                          last edited by joamjoamjoam

                                          So a little more digging into the issue led me to the fact that there is a byte alignment issue with the bcStack.

                                          The address of be[i] when processing the OC_float op code is misaligned sometimes meaning its not a multiple of 4 like a pointer address needs to be. Not sure yet if this is related to a go unsafe pointer quirk or if we need to fix the alignment in the struct definitions.

                                          This would be the reason why the 64bit OS doesn't have this SigBus Issue. The good news is that if i ported the code i have over to raspbianx64 this should be fully functioning now. Ill have to verify this still but with these alignment quirks caused by the use of 64 bit types (especially float64) on a 32bit opearting system the sigbus should sort itself out.

                                          alignemntError.png

                                          1 Reply Last reply Reply Quote 1
                                          • SuperFromNDS
                                            SuperFromND
                                            last edited by

                                            Woahhh, stellar work joam! This was a very pleasant thing to wake up to this morning :D

                                            I can't really help out too much on this specifically since low-level instructions and byte-alignment stuff is far out of my realm of expertis, but if you do need me for anything else (testing stuff, etc.) then let me know!

                                            (oh, and the character I was using was the original Donald by Kishio, which can be found here; not that you'll really need it seeing as the palette issues apparently didn't occur for you at all.)

                                            ▲▼▲▼▲▼▲▼▲▼
                                            IKEMEN Go
                                            SRB2Kart
                                            ▼▲▼▲▼▲▼▲▼▲

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

                                            Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.