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. The Variations Service does not permit these developer options.

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

... Options Index ...

{Beta} Maintainer Name

{Beta} Home Page

{Beta} Development Environment

{Beta} Development Environment Version

{Beta} Use Command Line

{Beta} Scripting Language

{Beta} Use All Files

{Beta} Print File List

{Beta} Print Variation Name

{Beta} Print Variation Options

Variation Name

Abbreviated Name

International Characters

Target

Model

CPU

API

Sound API

Debugging Level

Vertical synchronization

End of Developer Options

:

{Beta} 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”.

{Beta} 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 “(none)”.

{Beta} Development Environment

-e xcd { Apple Xcode }
-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 tools }
-e dmc { Digital Mars Compiler }
-e plc { Pelles C Compiler }
-e dkp { devkitpro }
-e ccc { Generic command line c compiler }
-e mvc { Mini vMac C (a specific version of gcc) }

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.

{Beta} 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 }
-ev 7310 { Apple Xcode 7.3.1 }
-ev 8210 { Apple Xcode 8.2.1 }
-ev 9410 { Apple Xcode 9.4.1 }
-ev 12100 { Apple Xcode 12.1 }
-ev 12300 { Apple Xcode 12.3 }
-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 }
-ev 15000 { Microsoft Visual Studio 2017 }
{Beta} -ev 16000 { Microsoft Visual Studio 2019 }

{Beta} 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.

{Beta} Scripting Language

The configuration tool outputs a single script file. Executing this script generates all the configuration files. You can choose what scripting language is used with lines such as:

-scr mpw { Macintosh Programmers Workshop }
-scr aps { AppleScript }
-scr bsh { bash (default) }
-scr vbs { VBScript }
-scr xps { XP }

{Beta} Use All Files

The configuration tool normally arranges that only source files needed for the current user options are compiled. This option causes all files to be compiled, which works because the source files themselves contain preprocessor conditionals to skip the unwanted code. This option also causes inclusion of all API header files and link libraries that could be needed for any set of user options, rather than only what is needed for the current user options.

This option can be useful when creating an external port based off a supported configuration. The files of an external port need to work for any set of user options.

-af { enable Use All Files }

{Beta} Print File List

The configuration tool can generate a list of source files needed for the chosen options, when enabled by this line:

-l { Enable Print File List }

{Beta} Print Variation Name

The configuration tool can generate a file containing the name of the Variation, when enabled by this line:

-pvn 1 { Enable Print Variation Name }

If you set the Variation Name with the -n option, that is what gets printed.

{Beta} Print Variation Options

The configuration tool can generate a file containing the chosen options, when enabled by this line:

-pvo 1 { Enable Print Variation Options }

The printed options are in canonical form, unaffected by the order of the input options, and options set to the default value are omitted. Developer options are also omitted.

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 mppc { Macintosh OS 9 and earlier - PowerPC }
-t m68k { Macintosh - 680x0 }
-t mfpu { Macintosh - 68020+ with FPU }
-t carb { Macintosh CarbonLib OSX/OS 8.6+ }
-t ob64 { OpenBSD on x86-64 }
-t obsd { OpenBSD on x86-32 }
-t db64 { Dragonfly BSD on x86-64 }
-t dbsd { Dragonfly BSD on x86-32 }
-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 }
-t ndsa { Nintendo DS - ARM }
-t minx { Minix 3.2 }
{Beta} -t port { Port : don't generate platform/compiler files }

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.

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 }
{Beta} -cpu a64 { ARM 64 bit }
-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').

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.

-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.

End of Developer Options

@ { no more developer options }

If this option is present, then no developer options are permitted to the right of this option. The Variations Service uses this to forbid developer options.

:

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

gryphel logo, 1K

Next - Setup Tool Configuration


www.gryphel.com/c/minivmac/develop - feedback
copyright (c) 2020 Paul C. Pratt - last update 12/9/2020