Coder Social home page Coder Social logo

uvmac's Introduction

µvMac 0.37.0

Forked from Mini vMac v36.4 by Paul C. Pratt (http://www.gryphel.com/c/minivmac), which was forked from vMac by Philip "PC" Cummins (http://www.vmac.org/main.html)

µvMac (micro vMac) is a small, simple emulator for early Motorola 68000 based emulators. Currently we support systems from the original Macintosh 128K all the way up to the Macintosh II.

This fork was created to clean up and modernize the code base, make the project easier to compile and hack on, and allow for much easier user configuration. The intent of Mini vMac was to create a "emulator collection" of many very optimized "variations" of the same codebase. I consider this much more trouble than it's worth, and intend to focus more on maintainability and accuracy.

µvMac is undergoing substansial and sporadic development and is unlikely to be in an usable state at this time.

Supported Platforms

µvMac absolutely requires SDL2. There are no plans to support platforms that SDL2 does not target. For 99% of users, this should not be a concern. Dropping support for esoteric platforms and exclusively using SDL2 vastly simplifies the complexity of the code.

So far µvMac has only been tested on Windows and Linux. No other operating systems are supported at this time.

Legal info

You can redistribute µvMac and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation. See the included file COPYING.txt

µvMac is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license for more details.

uvmac's People

Contributors

invisibleup avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

uvmac's Issues

Move build system to CMake + vcpkg

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:

  • Restore old CMake build file from git history
  • Update build file to match changes to repository since Meson adoption
  • Figure out how to get CMake to produce a configuration file like Meson does

Add unit testing

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:

  1. Select a unit test framework
  2. Install the unit test framework, somehow
  3. Write some basic tests
  4. Set up GitHub CI to run the tests automatically

Possible test frameworks:

Latest commit does not appear to build a usable emulator

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.

meson build fails: ERROR: File lib/M68K/m68kops.c does not exist.

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$

Require -z muldefs to build

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.

Cannot build due to nonexistent Musashi commit and missing files

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.

RTC timer precision very inaccurate

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.

Note how ":28" gets skipped here

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.