www.gryphel.com/c/minivmac/develop - feedback

Mini vMac

Options for Developers


This page lists compile time options useful to people who wish to develop or maintain Mini vMac. The main Options page has options of interest to everyone else.

First see the Build page to learn how to compile Mini vMac.

... Options Index ...

Maintainer Name

Home Page

Variation Name

Abbreviated Name

International Characters

Target

Model

Development Environment

Development Environment Version

CPU

API

Sound API

Use Command Line

Debugging Level

Vertical synchronization

All Source

Separate Configuration

No Export

End Of Line Format

Archive Format

:

Maintainer Name

If you are going to distribute the version of Mini vMac that you compile to other people, you should specify the maintainer name with a line like this:

-maintainer "Your name here"

If you don't specify this option, the maintainer name defaults to “unknown”.

Home Page

If you are going to distribute the version of Mini vMac that you compile to other people, and you have a webpage for it, you should specify the webpage with:

-homepage "Your webpage here"

This string is displayed by the About command of Mini vMac. If you don't specify this option, the homepage defaults to “http://minivmac.sourceforge.net/” or, “http://www.gryphel.com/c/minivmac/”.

Variation Name

If you compile a custom version of Mini vMac, you can label it with a line such as:

-n "minivmac-3.0.0-custom"

This string is displayed by the About command of Mini vMac, and is also used as the name of the archive exported by the build system.

Abbreviated Name

Instead of specifying the whole variation name, you can just specify the abbreviated name, with a line such as:

-an mnvm0001

The version number and platform parts of the variation name are automatically generated. The abbreviated name must be 8 characters or less, and should only include lowercase letters, numbers, and underscores.

International Characters

-intl

This option forces Mini vMac to support international characters in the user interface, even when using the default English. This is useful if the maintainer name needs the extra characters. (It would be nicer for the build system to figure out for itself what character set is needed. But this will do for now.)

Target

Some additional options for target that are not officially supported:

-t xgen { Generic X11 }
-t mx11 { X11 for Macintosh OS X - PowerPC }
-t mi11 { X11 for Macintosh OS X - Intel }
-t mx64 { X11 for Macintosh OS X - x86-64 }
-t cygw { Cygwin/X for Microsoft Windows }
-t fbpc { FreeBSD on PowerPC }
-t slrs { Solaris - SPARC }
-t sl86 { Solaris - Intel }
-t wc86 { Pocket PC - Intel (Emulator) }
-t irix { IRIX - MIPS }

Model

Some additional options for model that are not officially supported:

-m Twiggy { Macintosh prototype }
-m Twig43 { Macintosh prototype }
-m PB100 { Macintosh PowerBook 100 }

The Twiggy emulation (by Matěj Hybler) allows use of the ROM from a Macintosh prototype that has a Twiggy floppy drive (used in the original Lisa computer), instead of the Sony drive that the Macintosh 128K ended up shipping with. Except for the disk driver, the ROMs are nearly identical, except most everything is shifted to somewhat different addresses. Probably because the trap patching technique used in Macintosh System Software tends to depend on exact locations of routines in ROM, no System Software that shipped will run with the Twiggy ROM. There are two known disk images that will work with it, one with an early version of MacWrite and one with an early version of MacPaint. However these image don't currently work as is in the Twiggy Mac emulation. Matěj Hybler figured out a small patch to their boot block code to make them work, that disables some sort of check for the disk being bootable. This might be needed because the emulation is still using a replacement disk driver that is trying to imitate the data structures in memory used by the Sony disk driver, while the Twiggy disk driver has significantly different data structures. (With this patch, these two disk images will also work fine in the Macintosh 128K emulation.)

The Twig43 emulation (also by Matěj Hybler) allows use of an even earlier ROM (which near the end of the ROM contains the string “ROM4.3T 07/04/83”). This ROM is more significantly different. Oddy though, it can use the early MacPaint and MacWrite images without modification.

There is some code for PowerBook 100 emulation, but it does not yet get very far in booting.

Development Environment

-e xcd { Apple Xcode and Project Builder }
-e msv { Microsoft Visual C++ }
-e mpw { Macintosh Programmers Workshop }
-e mw8 { Metrowerks CodeWarrior }
-e bgc { Gnu tools }
-e lcc { lcc-win32 - Jacob Navia }
-e dvc { Bloodshed Dev-C++ }
-e mgw { MinGW }
-e cyg { Cygwin }
-e snc { Sun c compiler }
-e dmc { Digital Mars Compiler }
-e plc { Pelles C Compiler }
-e mvc { Mini vMac C }

Mini vMac C is just the set of compilers that is used to build official binaries. Currently it is a set of GCC cross compilers and supporting files built with gcc-4.7.4, gmp-4.3.2, mpfr-2.4.2, mpc-0.8.1, and mingw-w64-v4.0.6.

Development Environment Version

-ev 1000 { Apple Xcode 1.0 }
-ev 1500 { Apple Xcode 1.5 }
-ev 2100 { Apple Xcode 2.1 }
-ev 2200 { Apple Xcode 2.2 }
-ev 2210 { Apple Xcode 2.2.1 }
-ev 2300 { Apple Xcode 2.3 }
-ev 2400 { Apple Xcode 2.4 }
-ev 2410 { Apple Xcode 2.4.1 }
-ev 3100 { Apple Xcode 3.1 }
-ev 4000 { Apple Xcode 4.0 }
-ev 4630 { Apple Xcode 4.6.3 }
-ev 6200 { Apple Xcode 6.2 }
-ev 6320 { Apple Xcode 6.3.2 }
-ev 6400 { Apple Xcode 6.4 Beta }
-ev 6000 { Microsoft Visual C++ 6.0 }
-ev 7000 { Microsoft Visual Studio .NET 2002 }
-ev 7100 { Microsoft Visual Studio .NET 2003 }
-ev 8000 { Microsoft Visual Studio 2005 }
-ev 9000 { Microsoft Visual Studio 2008 }
-ev 10000 { Microsoft Visual Studio 2010 }
-ev 11000 { Microsoft Visual Studio 2012 }
-ev 12000 { Microsoft Visual Studio 2013 }
-ev 14000 { Microsoft Visual Studio 2015 RC }

CPU

The build system normally determines the CPU and operating system from the target (-t) you have specified. If a target doesn't yet exist for the combination of CPU and operating system you desire, you can select a target for that operating system and a different CPU, and then override the CPU with a line such as:

-cpu 68k { 680x0 }
-cpu ppc { PowerPC }
-cpu x86 { Intel 32 bit }
-cpu x64 { Intel 64 bit }
-cpu spr { sparc }
-cpu arm { ARM }
-cpu mip { MIPS }
-cpu gen { generic }

It might or might not compile correctly, but it at least provides a starting point.

API

The build system normally determines the appropriate API (Application Programming Interface) from the target (-t) you have specified. You can override this choice with lines such as:

-api mac { Macintosh OS }
-api osx { Carbon for Macintosh OS X }
-api cco { Cocoa for Macintosh OS X }
-api win { Microsoft Windows 32 }
-api xwn { X Window System }
-api gtk { GTK+ (GIMP Toolkit) }
-api sdl { Simple DirectMedia Layer 1.2 }
-api sd2 { Simple DirectMedia Layer 2.0 }

One useful use of this option is to specify '-api gtk' for a linux target (overriding the default '-api xwn'). This gets a menu bar and file dialogs, but loses other features since this port is incomplete.

Sound API

The build system normally determines the appropriate Sound API from the target (-t) you have specified. You can override this choice with lines such as:

-snd-api alsa { Advanced Linux Sound Architecture }
-snd-api ddsp { Open Sound System and compatible }

Currently the only useful use of this option is to specify '-snd-api ddsp' for a linux target (overriding the default '-snd-api alsa').

Use Command Line

-cl { use command line tools }

For Apple Xcode, Microsoft Visual C++, and lcc-win32, this option generates a makefile for use with the command line tools, instead of project file for the IDE.

Debugging Level

-d d { debug }
-d t { test }
-d s { ship }
-log 1 { enable logging infrastructure }

Logging won't do much without further enabling or creating code to log various events that you are currently interested in. This is for developers only.

-dis 1 { enable disassembler }

Besides disassembling a number of instructions executed after an event of interest, it can disassemble instructions prior to the event, as the emulator can save the addresses of instruction executed to a circular buffer. Requires the "-log" option. Nothing much will happen without further enabling or creating code to log various events that you are currently interested in.

Vertical synchronization

bug : This isn't working correctly in Full Screen Mode, at least in OS X 10.6.8, and so is not supported for this version, at least.

-vsync 1 (mnvm0159)

Currently for OS X only, this option turns on OpenGL double buffering and sets AGL_SWAP_INTERVAL to 1. This eliminates the "tearing" issues noted by Manuel Alfayate. Unfortunately it isn't yet a real solution, it is more to help illustrate the issue before coming up with a better implementation. (See testsync.) Besides using much more memory, it also reduces the maximum speed of emulation unpredictably and erratically, because it makes aglSwapBuffers block until the vertical retrace, when Mini vMac is expecting to give the emulation extra time, for above "1x" speed.

All Source

-all-src 1 { include all source files }

The build system normally selects the source files needed to compile the requested variation. This option causes it to include all source files.

Separate Configuration

-cfg 1

Puts generated configuration files into a separate directory from the source files. Only supported for "-e mvc"

No Export

-nex { Do not export archive }

End Of Line Format

-eol mac { Macintosh }
-eol win { Windows }
-eol unx { Unix }

Archive Format

-arc sit { stuff it }
-arc zip { zip }
-arc tar { tar }

:

If you find Mini vMac useful, please consider helping the Gryphel Project.

gryphel logo, 1K

Next - Ports by other people


www.gryphel.com/c/minivmac/develop - feedback
copyright (c) 2017 Paul C. Pratt - last update 4/2/2017