mirror of
https://github.com/zydeco/minivmac4ios.git
synced 2025-04-18 07:37:03 +00:00
Initial Home page
commit
a65686fca9
28
Home.md
Normal file
28
Home.md
Normal file
@ -0,0 +1,28 @@
|
||||
Welcome to the minivmac4ios wiki!
|
||||
|
||||
I'll try to document things a bit here.
|
||||
|
||||
## Mini vMac variants as loadable bundles
|
||||
Unlike other ports of Mini vMac, this one supports having several variants compiled, and choosing between them.
|
||||

|
||||
|
||||
This is achieved by compiling all the emulation code into a bundle, which is [loaded at runtime](https://github.com/zydeco/minivmac4ios/blob/master/Mini%20vMac/AppDelegate.m#L80). These bundles implement the [`Emulator` protocol](https://github.com/zydeco/minivmac4ios/blob/master/Mini%20vMac/EmulatorProtocol.h) on their main class, which is used to interface it with the UI.
|
||||
|
||||
For each variant, there is a framework target that compiles all the necessary C files from the core (not all of them are used for all machines: e.g. `ADBEMDEV.c` isn't used for the Mac 128K or Plus), and a [`CNFGGLOB.h`](https://github.com/zydeco/minivmac4ios/blob/master/Mini%20vMac/MacPlus4M/CNFGGLOB.h) and [`EMCONFIG.h`](https://github.com/zydeco/minivmac4ios/blob/master/Mini%20vMac/MacPlus4M/EMCONFIG.h) with the appropriate values for emulating that machine.
|
||||
|
||||

|
||||

|
||||
|
||||
These can be generated with the Mini vMac build system, `EMCONFIG.h` is taken as it is, and parts of `CNFGGLOB.h` and `CNFGRAPI.h` are selected and put into the bundle's [`CNFGGLOB.h`](https://github.com/zydeco/minivmac4ios/blob/master/Mini%20vMac/MacPlus4M/CNFGGLOB.h), which also includes a shared [`CNFGGLOB.h`](https://github.com/zydeco/minivmac4ios/blob/master/Mini%20vMac/CNFGGLOB.h) with values common to all variants.
|
||||
|
||||
Each framework also has an [`Info.plist`](https://github.com/zydeco/minivmac4ios/blob/master/Mini%20vMac/MacPlus4M/Info.plist) and an [icon](https://github.com/zydeco/minivmac4ios/blob/master/Mini%20vMac/MacPlus4M/Icon.png) that is shown in settings. The frameworks are copied to the `PlugIns` directory and renamed to `<name>.mnvm` when building the app. The app looks for plugins with a `.mnvm` extension, and shows them in the settings screen.
|
||||
|
||||
To add a new variant, [follow these easy steps](http://imgur.com/a/YW5g3):
|
||||
* Duplicate one of the framework targets and rename it
|
||||
* Also rename the duplicated scheme that is created automatically
|
||||
* In Finder, duplicate the source folder, and also rename it
|
||||
* Add it to the Xcode project as a group under `Mini vMac/Emulator Bundles`. Unmark `Copy items if needed` and all targets
|
||||
* In the `Copy Bundle Resources` phase of the new target, remove the resources (only icon PNGs for now) from the old target, and add the new ones
|
||||
* In build settings, change the `Info.plist file` setting to `$(SRCROOT)/Mini vMac/$(PRODUCT_NAME)/Info.plist`
|
||||
* In the Mini vMac target's `Build Phases`, add the new framework to the `Embed Frameworks` phase
|
||||
Then you can change the icon, `EMCONFIG.h` and `CNFGGLOB.h` for the new bundle, and the files from mnvm_core it should compile. The files generated by the Mini vMac build system are helpful for figuring this out.
|
Loading…
x
Reference in New Issue
Block a user