autch / piemu

Aquaplus P/ECE ("piece") emulator on SDL
Other
22 stars 6 forks source link

CRITICAL: C:\Users\autch\src\piemu\piemu.c:10:SetEmuParameters: DIE: Cannot open piece.pfi #4

Closed Dunard closed 8 months ago

Dunard commented 9 months ago

C:\Users\KingH>D:\piemu\piemu.exe INFO: Created renderer: direct3d CRITICAL: C:\Users\autch\src\piemu\piemu.c:10:SetEmuParameters: DIE: Cannot open piece.pfi

What is this file?

Download the build from here. https://github.com/autch/piemu/issues/3

I don't know what tools that you use to build this. I have Windows 11 and Nobara 39 OS Linux.

autch commented 9 months ago

The instructions on what a piece.pfi file is and how to obtain it are written in comment #1 The instructions for writing an app to a pfi file are in #2

Dunard commented 9 months ago

ok I got the usr files and the piemu_old source. What all tools I need to compile all?

I didn't find the mkpfi anywhere.

autch commented 9 months ago

To generate piece.pfi from official BIOS update image, use mkpfi tool. To add/remove apps into/from PFI image, use pffs or pfar tool.

piemu_old branch uses Visual C++ toolchain and NMAKE, use Visual Studio Developer Command Prompt / PowerShell to build them. Other branches (eg. modernize) are using CMake, any toolchain can be used.

Dunard commented 9 months ago

Thank you. I posted a screenshot here. https://www.mameworld.info/ubbthreads/showthreaded.php?Cat=&Number=397661&page=0&view=expanded&sb=5&o=&fpart=1&vc=1 There is no sounds on this game. So I don't have a hardware to test this game out on. I got the game here at. https://web.archive.org/web/20040220122225/http://nepiaworld.com/menu/works/wr/index.html

Dunard commented 9 months ago

On the Windows 11. I get this error.

[MINGW64] D:\piemu_old>make OVERRIDE_CC=clang OVERRIDE_CXX=clang++ cl /c /Iinclude /W3 /WX /DWINDOWS /MD /Ox /G6 /GL /nologo bcu.c process_begin: CreateProcess(NULL, cl /c /Iinclude /W3 /WX /DWINDOWS /MD /Ox /G6 /GL /nologo bcu.c, ...) failed. make (e=2): The system cannot find the file specified. makefile.rule:10: recipe for target 'bcu.obj' failed make: *** [bcu.obj] Error 2

Installing the Visual Studio 2022. I going to see I can compile with it instead of the msys64-2022-01-12.exe from here https://www.mamedev.org/tools/ (I don't like the Visual Studio 2022 at all. Meh.)

autch commented 9 months ago

If you are building with MSYS2/MinGW64, it is recommended to use the modernize or revert-to-single-thread branches rather than piemu_old:

$ pacman -S mingw64/mingw-w64-x86_64-SDL2 msys/cmake mingw64/mingw-w64-x86_64-gcc git
$ git clone -b modernize https://github.com/autch/piemu.git
$ cd piemu
$ mkdir BUILD
$ cd BUILD
$ CC=x86_64-w64-mingw32-gcc cmake ../
$ make -j4
Dunard commented 9 months ago

ninja instead of make. I got it to work now. But one error.

[30/30] Linking C executable piemu.exe FAILED: piemu.exe cmd.exe /C "cd . && D:\msys64\mingw64\bin\x86_64-w64-mingw32-gcc.exe CMakeFiles/piemu.dir/bcu.c.obj CMakeFiles/piemu.dir/emu.c.obj CMakeFiles/piemu.dir/fram.c.obj CMakeFiles/piemu.dir/lcdc.c.obj CMakeFiles/piemu.dir/piemu.c.obj CMakeFiles/piemu.dir/usbc.c.obj CMakeFiles/piemu.dir/core.c.obj CMakeFiles/piemu.dir/flash.c.obj CMakeFiles/piemu.dir/iomem.c.obj CMakeFiles/piemu.dir/main.c.obj CMakeFiles/piemu.dir/sram.c.obj -o piemu.exe -Wl,--out-implib,libpiemu.dll.a -Wl,--major-image-version,0,--minor-image-version,0 -Wl,-Bstatic -lSDL2main -Wl,-Bdynamic -lSDL2 libc33core.a -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 && cd ." D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/lib/../lib/libmingw32.a(lib64_libmingw32_a-crt0_c.o): in function main': C:/M/mingw-w64-crt-git/src/mingw-w64/mingw-w64-crt/crt/crt0_c.c:18: undefined reference toWinMain' collect2.exe: error: ld returned 1 exit status ninja: build stopped: subcommand failed.

The tools is made though.

I will try out the one from the revert-to-single-thread to see that will make it.

Update: Same error.

autch commented 9 months ago

try to uncomment SDLmain line in piemu/CMakeLists.txt, or change its order among them

https://github.com/autch/piemu/blob/19d95d51721028b5cf8776cd0d71257b4e5436dd/CMakeLists.txt#L88-L92

Dunard commented 9 months ago

[26/30] Building C object tools/CMakeFiles/mkpfi.dir/pfi.c.obj C:/msys64/home/KingH/piemu/tools/pfi.c: In function 'PFIOpen': C:/msys64/home/KingH/piemu/tools/pfi.c:37:49: warning: multi-character character constant [-Wmultichar] 37 | if((pfi->header.signature & 0xffffff00) == ('PFI0' & 0xffffff00)) | ^~ [30/30] Linking C executable piemu.exe

I finally got it now. Screenshot 2024-01-11 053501

SDLmain isn't needed.

I'm using this now to build it. https://docs.mamedev.org/initialsetup/compilingmame.html#using-a-standard-msys2-installation

Much better than the msys64-2022-01-12.exe. Not using this anymore.

Dunard commented 8 months ago

I got the SDLmain to work now. I didn't know which of the sdl is missing parts. I got both. https://packages.msys2.org/base/mingw-w64-SDL installed first and then installed this after. https://packages.msys2.org/base/mingw-w64-SDL2 (Note: I skipped the aarch64 on both. Not needed.)