invisibleup / uvmac Goto Github PK
View Code? Open in Web Editor NEWµvMac - cleaned up fork of the Macintosh emulator Mini vMac
License: GNU General Public License v2.0
µvMac - cleaned up fork of the Macintosh emulator Mini vMac
License: GNU General Public License v2.0
It seems there is a mismatch with lib/M68K.
~/src$ git clone --recursive https://github.com/InvisibleUp/uvmac
Cloning into 'uvmac'...
remote: Enumerating objects: 1512, done.
remote: Counting objects: 100% (1512/1512), done.
remote: Compressing objects: 100% (608/608), done.
remote: Total 1512 (delta 886), reused 1440 (delta 815), pack-reused 0
Receiving objects: 100% (1512/1512), 1.31 MiB | 795.00 KiB/s, done.
Resolving deltas: 100% (886/886), done.
Submodule 'src/incbin' (https://github.com/graphitemaster/incbin) registered for path 'src/incbin'
Submodule 'src/tomlc99' (https://github.com/cktan/tomlc99) registered for path 'src/tomlc99'
Cloning into '/home/boomlinde/src/uvmac/src/incbin'...
remote: Enumerating objects: 231, done.
remote: Counting objects: 100% (4/4), done.
remote: Compressing objects: 100% (4/4), done.
remote: Total 231 (delta 0), reused 1 (delta 0), pack-reused 227
Receiving objects: 100% (231/231), 63.91 KiB | 1.03 MiB/s, done.
Resolving deltas: 100% (115/115), done.
Cloning into '/home/boomlinde/src/uvmac/src/tomlc99'...
remote: Enumerating objects: 668, done.
remote: Counting objects: 100% (295/295), done.
remote: Compressing objects: 100% (204/204), done.
remote: Total 668 (delta 111), reused 233 (delta 54), pack-reused 373
Receiving objects: 100% (668/668), 194.68 KiB | 1.97 MiB/s, done.
Resolving deltas: 100% (332/332), done.
Submodule path 'src/incbin': checked out 'c9f3f0091948af39e187559100d0c6c5f2f68ebc'
Submodule path 'src/tomlc99': checked out 'b539e3f20ec443d7046153ed4623da277da89170'
~/src$ cd uvmac/
~/s/uvmac$ meson build
The Meson build system
Version: 0.58.2
Source dir: /home/boomlinde/src/uvmac
Build dir: /home/boomlinde/src/uvmac/build
Build type: native build
Project name: microvmac
Project version: undefined
C compiler for the host machine: cc (gcc 10.2.1 "cc (GCC) 10.2.1 20201203")
C linker for the host machine: cc ld.bfd 2.35.1
Host machine cpu family: x86_64
Host machine cpu: x86_64
Configuring CNFGRAPI.h using configuration
Found pkg-config: /bin/pkg-config (0.29.2)
Run-time dependency sdl2 found: YES 2.0.16
meson.build:175:0: ERROR: File lib/M68K/m68kops.c does not exist.
A full log can be found at /home/boomlinde/src/uvmac/build/meson-logs/meson-log.txt
~/s/uvmac$
On the Win32 build at 1x speed, the emulated clock (Apple > Alarm Clock) tends to hang on some seconds for too long, and flat-out skips others. See the below .GIF.
This issue only occurs at 1x speed. This issue appears in a standard Mini vMac build.
Note that in Mini vMac, the RTC is updated by the emulator. Presumably, it isn't being updated often enough (possibly once every 60 frames?). We really really don't need that optimization, so let's just check it every frame instead.
I had to add "-z muldefs" in the build.ninja file, linker arguments:
rule c_LINKER
command = cc $ARGS -o $out $in $LINK_ARGS -z muldefs
description = Linking target $out
Otherwise it creates many errors:
/usr/bin/ld: microvmac.p/src_HW_SCREEN_SCRNEMDV.c.o:/home/reden/Downloads/uvmac/build/../src/HW/SCREEN/SCRNEMDV.h:35: multiple definition of UseLargeScreenHack'; microvmac.p/src_PATCHES_SONYDRV.c.o:/home/reden/Downloads/uvmac/build/../src/HW/SCREEN/SCRNEMDV.h:35: first defined here /usr/bin/ld: microvmac.p/src_HW_SCREEN_SCRNEMDV.c.o:/home/reden/Downloads/uvmac/build/../src/HW/SCREEN/SCRNEMDV.h:36: multiple definition of
ScreenColorBlack'; microvmac.p/src_PATCHES_SONYDRV.c.o:/home/reden/Downloads/uvmac/build/../src/HW/SCREEN/SCRNEMDV.h:36: first defined here
/usr/bin/ld: microvmac.p/src_HW_SCREEN_SCRNEMDV.c.o:/home/reden/Downloads/uvmac/build/../src/HW/SCREEN/SCRNEMDV.h:37: multiple definition of ScreenColorWhite'; microvmac.p/src_PATCHES_SONYDRV.c.o:/home/reden/Downloads/uvmac/build/../src/HW/SCREEN/SCRNEMDV.h:37: first defined here /usr/bin/ld: microvmac.p/src_PATCHES_SCRNHACK.c.o:/home/reden/Downloads/uvmac/build/../src/HW/SCREEN/SCRNEMDV.h:35: multiple definition of
UseLargeScreenHack'; microvmac.p/src_PATCHES_SONYDRV.c.o:/home/reden/Downloads/uvmac/build/../src/HW/SCREEN/SCRNEMDV.h:35: first defined here
/usr/bin/ld: microvmac.p/src_PATCHES_SCRNHACK.c.o:/home/reden/Downloads/uvmac/build/../src/HW/SCREEN/SCRNEMDV.h:36: multiple definition of ScreenColorBlack'; microvmac.p/src_PATCHES_SONYDRV.c.o:/home/reden/Downloads/uvmac/build/../src/HW/SCREEN/SCRNEMDV.h:36: first defined here /usr/bin/ld: microvmac.p/src_PATCHES_SCRNHACK.c.o:/home/reden/Downloads/uvmac/build/../src/HW/SCREEN/SCRNEMDV.h:37: multiple definition of
ScreenColorWhite'; microvmac.p/src_PATCHES_SONYDRV.c.o:/home/reden/Downloads/uvmac/build/../src/HW/SCREEN/SCRNEMDV.h:37: first defined here
/usr/bin/ld: microvmac.p/src_UI_COMOSGLU.c.o:/home/reden/Downloads/uvmac/build/../src/HW/SCREEN/SCRNEMDV.h:35: multiple definition of UseLargeScreenHack'; microvmac.p/src_PATCHES_SONYDRV.c.o:/home/reden/Downloads/uvmac/build/../src/HW/SCREEN/SCRNEMDV.h:35: first defined here /usr/bin/ld: microvmac.p/src_UI_COMOSGLU.c.o:/home/reden/Downloads/uvmac/build/../src/HW/SCREEN/SCRNEMDV.h:36: multiple definition of
ScreenColorBlack'; microvmac.p/src_PATCHES_SONYDRV.c.o:/home/reden/Downloads/uvmac/build/../src/HW/SCREEN/SCRNEMDV.h:36: first defined here
/usr/bin/ld: microvmac.p/src_UI_COMOSGLU.c.o:/home/reden/Downloads/uvmac/build/../src/HW/SCREEN/SCRNEMDV.h:37: multiple definition of ScreenColorWhite'; microvmac.p/src_PATCHES_SONYDRV.c.o:/home/reden/Downloads/uvmac/build/../src/HW/SCREEN/SCRNEMDV.h:37: first defined here /usr/bin/ld: microvmac.p/src_UI_CONTROLM.c.o:/home/reden/Downloads/uvmac/build/../src/UI/COMOSGLU.h:83: multiple definition of
PbufAllocatedMask'; microvmac.p/src_UI_COMOSGLU.c.o:/home/reden/Downloads/uvmac/build/../src/UI/COMOSGLU.h:83: first defined here
/usr/bin/ld: microvmac.p/src_UI_CONTROLM.c.o:/home/reden/Downloads/uvmac/build/../src/UI/COMOSGLU.h:84: multiple definition of `PbufSize'; microvmac.p/src_UI_COMOSGLU.c.o:/home/reden/Downloads/uvmac/build/../src/UI/COMOSGLU.h:84: first defined here
And so forth. This seems to affect all OSes including OpenBSD 7.4 and Arch Linux.
I opted to use Meson because it was much, much simpler than CMake. It uses a very python-like syntax that I find quite enjoyable to work with. Early versions of µvMac actually did use CMake, but I was struggling to understand it. Thankfully it seems the tooling around CMake has become a bit nicer in the past year or two, and CMake provides several advantages over Meson.
In particular, Meson only supports a few very well-known third-party packages, and the process for importing new packages is painful, to say the least. Meanwhile with CMake, we can use vcpkg to manage packages, which seems much nicer. Additionally, CMake has better IDE support in Visual Studio, CLion, KDevelop, etc.
Steps:
On Linux (debian-based distro), how the heck are you supposed to compile this code?
EDIT: The initial reason for filing this bug report is solved, but there are further issues below that may warrant their own tickets. Title updated, see subsequent comments below.
Ubuntu 18.04, meson 0.56, gcc 7.5.0, latest stable libsdl2-dev:
~/umac$ meson builddir
The Meson build system
Version: 0.56.0
Source dir: /home/wpreston/umac
Build dir: /home/wpreston/umac/builddir
Build type: native build
Project name: microvmac
Project version: undefined
C compiler for the host machine: cc (gcc 7.5.0 "cc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0")
C linker for the host machine: cc ld.bfd 2.30
Host machine cpu family: x86_64
Host machine cpu: x86_64
Configuring CNFGRAPI.h using configuration
Found pkg-config: /usr/bin/pkg-config (0.29.1)
Run-time dependency sdl2 found: YES 2.0.8
meson.build:175:0: ERROR: File lib/M68K/m68kops.c does not exist.
A full log can be found at /home/wpreston/umac/builddir/meson-logs/meson-log.txt
It appears that references to this file was added in the last few commits, but they aren't in the repo.
It would be beneficial to set up a unit testing framework here. The codebase is very brittle, and having tests would dramatically help with that.
Steps to take:
Possible test frameworks:
<assert.h>
Currently, attempting to clone the repository fails with the following error:
fatal: remote error: upload-pack: not our ref 67346dba6d245d48ab362dfa1d2c18075f9fbcf1
fatal: the remote end hung up unexpectedly
Fetched in submodule path 'src/HW/M68K', but it did not contain 67346dba6d245d48ab362dfa1d2c18075f9fbcf1. Direct fetching of that commit failed.
This can be overcome by manually cloning Musashi into that directory, but doing so causes Meson to fail to initialize the directory for building on account of m68khooks.c
and m68kops.c
being absent.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.