aniou / morfe

custom 65c816/m68k computer emulator in Go
MIT License
12 stars 3 forks source link

make target morfe-m68k doesn't work (vanilla ubuntu) #4

Closed renekint closed 1 week ago

renekint commented 2 years ago

The morfe-m68k target doesn't build - on my vanilla ubuntu 20.04 install. It says it can;t find some object files, but when I look in those directories I see the files....

`rene@rene-NUC8i5BEK:~/morfe$ make morfe-m68k cp -vf lib/musashi-c-wrapper/m68kconf.h external/Musashi/ 'lib/musashi-c-wrapper/m68kconf.h' -> 'external/Musashi/m68kconf.h' make -C external/Musashi clean make[1]: Entering directory '/home/rene/morfe/external/Musashi' rm -f m68kops.c m68kops.h m68kcpu.o m68kdasm.o softfloat/softfloat.o m68kops.o m68kmake make[1]: Leaving directory '/home/rene/morfe/external/Musashi' make -C external/Musashi make[1]: Entering directory '/home/rene/morfe/external/Musashi' gcc -o m68kmake m68kmake.c ./m68kmake

Musashi v4.60 68000, 68008, 68010, 68EC020, 68020, 68EC030, 68030, 68EC040, 68040 emulator
    Copyright Karl Stenerud (kstenerud@gmail.com)

Generated 1967 opcode handlers from 518 primitives gcc -Wall -Wextra -pedantic -c -o m68kcpu.o m68kcpu.c gcc -Wall -Wextra -pedantic -c -o m68kdasm.o m68kdasm.c gcc -Wall -Wextra -pedantic -c -o softfloat/softfloat.o softfloat/softfloat.c gcc -Wall -Wextra -pedantic -c -o m68kops.o m68kops.c make[1]: Leaving directory '/home/rene/morfe/external/Musashi' CGO_LDFLAGS_ALLOW=".+/(Musashi|musashi-c-wrapper)/.+.o" \ go build --tags m68k -o morfe-m68k cmd/morfe/*.go

github.com/aniou/morfe/emulator/cpu_68xxx

gcc: error: lib/musashi-c-wrapper/shim.o: No such file or directory gcc: error: external/Musashi/m68kcpu.o: No such file or directory gcc: error: external/Musashi/m68kdasm.o: No such file or directory gcc: error: external/Musashi/m68kops.o: No such file or directory gcc: error: external/Musashi/softfloat/softfloat.o: No such file or directory make: *** [Makefile:28: morfe-m68k] Error 2 rene@rene-NUC8i5BEK:~/morfe$ cd external rene@rene-NUC8i5BEK:~/morfe/external$ cd Musashi/ rene@rene-NUC8i5BEK:~/morfe/external/Musashi$ ls example m68kcpu.h m68kfpu.c m68kmake.c m68kops.o history.txt m68kcpu.o m68k.h m68kmmu.h Makefile m68kconf.h m68kdasm.c m68k_in.c m68kops.c readme.txt m68kcpu.c m68kdasm.o m68kmake m68kops.h softfloat `

renekint commented 2 years ago

Commenting on my own submit :-)

It seems that vanilla Ubuntu with vanilla packages is not up to the task of correctly compiling the current top-of-tree.

To compile the current version directly, I needed to do the following:

Even then, it compiles correctly (for the morfe and morfe-m68k targets), but the morfe-m68k conf/a2560k.ini does not run. The a2560k.ini file refers to a 'retro68.hex' file that doesn't exist. Removing that starts the morfe-m68k program, but then it crashes with a SIGSEV exception.

This could be related to the Musashi core that is intalled and compiled during the process, as that looks like a moving target itself.

I hope the author can help here ;-)

mgcaret commented 2 years ago

If you prefer not to manually manage your Go installation, you can get a more recent version of go on Ubuntu by using snap install --classic go instead of using the apt package, which is quite old at this point.

aniou commented 1 week ago

Hi, sorry for a long delay - I fixed that bug some times ago and now I fixed another bug, that has negative impact on compilation on current Go - but it is worth to mention, that current version of morfe has very inaccurate and outdated memory map, in comparison to real product.

Currently, my main effort is concentrated on https://github.com/aniou/morfeo - a new version of emulator, that offers a2560x with extra devices and valid memory map.