-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit f4d6ad8
Showing
134 changed files
with
107,327 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Mini vMac custom builds | ||
## Overview | ||
This is all of mybuilds of Mini vMac. Currently, the builds are for Linux x86-64, and Windows x86-64. I do plan on making Mac builds soon. | ||
|
||
## Compile settings | ||
|
||
I built the Linux builds within Termux. I built Windows builds using `mingw-w64` inside Ubuntu 20.04.4 (LTS) inside WSL1 on Windows 10 Pro 1809 (Because Void isn't on WSL yet,too bored on setting up a VM.) | ||
|
||
|
||
I used the stable branch (which is, ahem, 4 years old at this point), version 36.04. | ||
|
||
|
||
The builds are made using `gcc` or `mingw-w64`. More platforms are in the future. | ||
|
||
## Custom builds | ||
|
||
Custom builds of the emulator includes 128k, Plus and Mac II. Features of these builds include higher definitions (960x540, half 1920x1080) and higher color depth for Mac II builds. | ||
|
||
## How to compile | ||
|
||
You can compile Mini vMac by following the [guide here](https://www.gryphel.com/c/minivmac/build.html) and type `make` to compile it. | ||
|
||
## Contributions & Legal | ||
|
||
Mini vMac is licensed under the terms of GNU GPLv2. | ||
|
||
All ROM files needed for Mini vMac is under Apple's copyright, and you must either dump it yourself or search online for it. | ||
|
||
If you want to contribute, you can create a pull request, or point something wrong by creating an issue. I do'nt accept emulation problems, as I don't have knoweldge about the C language. I could do is help you with compiling. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MnvM_b36: README | ||
Paul C. Pratt | ||
www.gryphel.com | ||
July 27, 2005 | ||
|
||
|
||
MnvM_b36 is the build system for Mini vMac, | ||
a miniature Macintosh emulator. | ||
|
||
Further information may be found at | ||
"https://www.gryphel.com/c/minivmac/". | ||
|
||
|
||
You can redistribute MnvM_b36 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. | ||
|
||
MnvM_b36 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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
Mini vMac: mydriver/README | ||
Paul C. Pratt | ||
www.gryphel.com | ||
February 23, 2002 | ||
|
||
The mydriver folder contains source code | ||
for a replacement disk driver that is patched | ||
into the emulated rom. | ||
|
||
The compiled driver is already in ROMEMDEV.c | ||
(the initialization of sony_driver variable), | ||
so this source code is not needed for building | ||
Mini vMac. It is only needed if you want | ||
to change this driver. | ||
|
||
To compile the driver, use MPW commands | ||
such as: | ||
|
||
set srcdir hd4:Topaz:MinivMac:mydriver: | ||
asm -case on {srcdir}mydriver.a -o {srcdir}mydriver.a.o | ||
c {srcdir}mydriver.c -r -b -mbg off -opt full -o {srcdir}mydriver.c.o | ||
link {srcdir}mydriver.a.o {srcdir}mydriver.c.o -rt DRVR=128 -o {srcdir}mydriver | ||
|
||
Then you can use ResEdit to copy the hex data out | ||
of the DRVR 128 resource, format it a bit, and | ||
replace the initialization data of the variable | ||
sony_driver in the file ROMEMDEV.c | ||
|
||
(note: this is using the old c compiler, to use | ||
the current c compiler, use: | ||
SC {srcdir}mydriver.c -w 17 -proto strict -b -mbg off -opt all -o {srcdir}mydriver.c.o | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,302 @@ | ||
; mydriver.a | ||
; | ||
; Copyright (C) 2004 Paul C. Pratt | ||
; | ||
; You can redistribute this file and/or modify it under the terms | ||
; of version 2 of the GNU General Public License as published by | ||
; the Free Software Foundation. You should have received a copy | ||
; of the license along with this file; see the file COPYING. | ||
; | ||
; This file 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. | ||
|
||
; most of this is adapted from sample source code from Apple. | ||
|
||
FakeSonyDriver MAIN EXPORT | ||
BLANKS ON | ||
STRING ASIS | ||
|
||
kqLink EQU 0 | ||
kqType EQU 4 | ||
kioTrap EQU 6 | ||
kioCmdAddr EQU 8 | ||
kioCompletion EQU 12 | ||
kioResult EQU 16 | ||
kioNamePtr EQU 18 | ||
kioVRefNum EQU 22 | ||
kioRefNum EQU 24 | ||
kcsCode EQU 26 | ||
kcsParam EQU 28 | ||
kioBuffer EQU 32 ; Buffer to store data into | ||
kioReqCount EQU 36 ; Requested Number of Bytes | ||
kioActCount EQU 40 ; Actual Number of Bytes obtained | ||
kioPosMode EQU 44 ; Positioning Mode | ||
kioPosOffset EQU 46 ; Position Offset | ||
|
||
killCode EQU 1 ; KillIO requested | ||
noQueueBit EQU 9 ; trap word modifier | ||
JIODone EQU $08FC | ||
|
||
kCmndSonyPrime EQU $0001 | ||
kCmndSonyControl EQU $0002 | ||
kCmndSonyStatus EQU $0003 | ||
kCmndSonyClose EQU $0004 | ||
kCmndSonyOpenA EQU $0005 | ||
kCmndSonyOpenB EQU $0006 | ||
kCmndSonyOpenC EQU $0007 | ||
kCmndSonyMount EQU $0008 | ||
|
||
DHeader | ||
DFlags DC.W $4F00 ; need lock, responds to all requests | ||
DDelay DC.W 0 ; none | ||
DEMask DC.W 0 ; DA event mask | ||
DMenu DC.W 0 ; no menu | ||
DC.W DOpen - DHeader ; offset to Open | ||
DC.W DPrime - DHeader ; offset to Prime | ||
DC.W DControl - DHeader ; offset to Control | ||
DC.W DStatus - DHeader ; offset to Status | ||
DC.W DClose - DHeader ; offset to Close | ||
Name DC.B 5 ; length of name | ||
DC.B '.Sony' | ||
ALIGN 2 ; word alignment | ||
|
||
DPrime | ||
MOVEM.L A0-A1, -(SP) ; push ParmBlkPtr, DCtlPtr for C | ||
SUBQ #2, A7 ; result code | ||
MOVE.W #kCmndSonyPrime, -(A7) | ||
BRA.B DPrimeStatusCommon | ||
|
||
DControl | ||
MOVEM.L A0-A1, -(SP) ; push ParmBlkPtr, DCtlPtr for C | ||
SUBQ #2, A7 ; result code | ||
MOVE.W #kCmndSonyControl, -(A7) | ||
|
||
LEA TailData, A0 | ||
MOVE.L (A0)+, -(A7) | ||
MOVEA.L (A0), A0 | ||
MOVE.L A7, (A0) | ||
|
||
ADDA.W #6, A7 | ||
MOVE.W (A7)+, D0 ; save result code | ||
MOVEM.L (SP)+, A0-A1 ; restore ParmBlkPtr, DCtlPtr | ||
CMPI.W #killCode,kcsCode(A0) ; test for KillIO call (special case) | ||
BNE.B IOReturn | ||
RTS ; KillIO must always return via RTS | ||
|
||
DStatus | ||
MOVEM.L A0-A1, -(SP) ; push ParmBlkPtr, DCtlPtr for C | ||
SUBQ #2, A7 ; result code | ||
MOVE.W #kCmndSonyStatus, -(A7) | ||
DPrimeStatusCommon | ||
|
||
LEA TailData, A0 | ||
MOVE.L (A0)+, -(A7) | ||
MOVEA.L (A0), A0 | ||
MOVE.L A7, (A0) | ||
|
||
ADDA.W #6, A7 | ||
MOVE.W (A7)+, D0 ; save result code | ||
MOVEM.L (SP)+, A0-A1 ; restore ParmBlkPtr, DCtlPtr | ||
|
||
IOReturn | ||
MOVE.W kioTrap(A0),D1 | ||
BTST #noQueueBit,D1 ; immediate calls are not queued, and must RTS | ||
BEQ.B @Queued ; branch if queued | ||
|
||
@NotQueued | ||
TST.W D0 ; test asynchronous return result | ||
BLE.B @ImmedRTS ; result must be <= 0 | ||
CLR.W D0 ; "in progress" result (> 0) not passed back | ||
|
||
@ImmedRTS | ||
MOVE.W D0,kioResult(A0) ; for immediate calls you must explicitly | ||
; place the result in the ioResult field | ||
RTS | ||
|
||
@Queued | ||
TST.W D0 ; test asynchronous return result | ||
BLE.B @MyIODone ; I/O is complete if result <= 0 | ||
CLR.W D0 ; "in progress" result (> 0) not passed back | ||
RTS | ||
|
||
@MyIODone | ||
MOVE.L JIODone,-(SP) ; push IODone jump vector onto stack | ||
RTS | ||
|
||
DClose | ||
MOVEM.L A0-A1, -(SP) ; push ParmBlkPtr, DCtlPtr for C | ||
SUBQ #2, A7 ; result code | ||
MOVE.W #kCmndSonyClose, -(A7) | ||
|
||
LEA TailData, A0 | ||
MOVE.L (A0)+, -(A7) | ||
MOVEA.L (A0), A0 | ||
MOVE.L A7, (A0) | ||
|
||
ADDA.W #6, A7 | ||
MOVE.W (A7)+, D0 ; save result code | ||
MOVEM.L (SP)+, A0-A1 ; restore ParmBlkPtr, DCtlPtr | ||
RTS | ||
|
||
DUpdate | ||
MOVEM.L D0-D2/A0-A1,-(SP) | ||
MOVE.L 20(A7),D0 ; data = what was on top of stack before 5 registers pushed | ||
|
||
SUBQ #4, A7 ; room for eventMsg | ||
MOVE.L D0,-(A7) ; data | ||
SUBQ #2, A7 ; room for result code | ||
MOVE.W #kCmndSonyMount, -(A7) | ||
|
||
LEA TailData, A0 | ||
MOVE.L (A0)+, -(A7) | ||
MOVEA.L (A0), A0 | ||
MOVE.L A7, (A0) | ||
|
||
ADDA.W #6, A7 | ||
MOVE.W (A7)+, D1 ; result code | ||
ADDQ #4, A7 ; skip over data | ||
MOVE.L (A7)+, D0 ; eventMsg | ||
TST.W D1 ; result code | ||
BNE.S @1 | ||
MOVEA.W #$0007,A0 | ||
DC.W $A02F ; _PostEvent | ||
@1 | ||
|
||
MOVEM.L (SP)+,D0-D2/A0-A1 | ||
ADDA.W #4,A7 ; remove arguments from stack | ||
RTE | ||
|
||
MyAddDrive64k | ||
|
||
; This is only needed for the 64k ROM. | ||
|
||
DrvQHdr EQU 776 | ||
RomBase EQU $00400000 | ||
|
||
Move.L D0,6(A0) | ||
Lea.L (DrvQHdr),A1 | ||
Jmp (RomBase + 2848) | ||
|
||
|
||
NullTaskProc | ||
RTS | ||
|
||
DOpen | ||
MOVEM.L D3-D7/A3,-(A7) | ||
MOVEM.L A0-A1, -(SP) ; push ParmBlkPtr, DCtlPtr for C | ||
|
||
SUBQ #6, A7 ; room for result code, L | ||
MOVE.W #kCmndSonyOpenA, -(A7) | ||
|
||
LEA TailData, A0 | ||
MOVE.L (A0)+, -(A7) | ||
MOVEA.L (A0), A0 | ||
MOVE.L A7, (A0) | ||
|
||
ADDA.W #6, A7 | ||
MOVE.W (A7)+, D0 ; result code | ||
MOVE.L (A7)+, D7 ; L | ||
|
||
CMPI.W #$FFCF,D0 | ||
BNE.S @1 | ||
; driver already open, change to no error and leave | ||
CLR.W D0 | ||
BRA @2 | ||
@1 | ||
TST.W D0 | ||
BNE @2 | ||
MOVE.L D7,D0 | ||
DC.W $A71E ; _NewPtr ,Sys,Clear | ||
MOVEA.L A0,A3 | ||
MOVE.L A3,D0 | ||
BEQ @6 | ||
|
||
SUBA #16, A7 ; room for various results | ||
MOVE.L A3, -(A7) | ||
MOVE.L D7, -(A7) | ||
SUBQ #2, A7 ; room for result code | ||
MOVE.W #kCmndSonyOpenB, -(A7) | ||
|
||
LEA TailData, A0 | ||
MOVE.L (A0)+, -(A7) | ||
MOVEA.L (A0), A0 | ||
MOVE.L A7, (A0) | ||
|
||
ADDA.W #6, A7 | ||
MOVE.W (A7)+, D0 ; result code | ||
ADDA.W #8, A7 | ||
MOVE.L (A7)+, D7 ; dvl | ||
MOVEQ #$00, D3 | ||
MOVE.W (A7)+, D3 ; step | ||
MOVE.W (A7)+, D4 ; n | ||
MOVE.W (A7)+, D6 ; i | ||
MOVE.W (A7)+, D5 ; driver | ||
MOVEA.L (A7)+, A3 ; NullTask | ||
|
||
TST.W D0 | ||
BNE.S @2 | ||
|
||
MOVE.L A3,D0 | ||
BEQ.S @3 | ||
|
||
; There is apparently a bug in the time manager | ||
; in System 6.0.8, which will cause a crash | ||
; if there are no installed time | ||
; tasks. So create a time task, since | ||
; real disk driver does. | ||
|
||
LEA NullTaskProc,A0 ; id: 102 | ||
MOVE.L A0,$0006(A3) | ||
MOVEA.L A3,A0 | ||
DC.W $A058 ; _InsTime | ||
BRA.S @4 | ||
@3 | ||
LEA MyAddDrive64k,A0 ; id: 106 | ||
MOVE.W #$A04E,D0 | ||
DC.W $A047 ; _SetTrapAddress | ||
BRA.S @4 | ||
@5 | ||
MOVEA.L D7,A0 | ||
|
||
MOVE.W D6,D0 ; drive number in high word | ||
SWAP D0 | ||
MOVE.W D5,D0 ; driver in low word | ||
|
||
DC.W $A04E ; _AddDrive | ||
ADD.L D3,D7 | ||
ADDQ.W #$1,D6 | ||
@4 | ||
DBF D4, @5 | ||
|
||
PEA DUpdate | ||
SUBQ #2, A7 ; room for result code | ||
MOVE.W #kCmndSonyOpenC, -(A7) | ||
|
||
LEA TailData, A0 | ||
MOVE.L (A0)+, -(A7) | ||
MOVEA.L (A0), A0 | ||
MOVE.L A7, (A0) | ||
|
||
ADDA.W #6, A7 | ||
MOVE.W (A7)+, D0 ; result code | ||
ADDA.W #4, A7 | ||
|
||
@2 | ||
; result code should be in D0 when reach here | ||
|
||
MOVEM.L (A7)+, A0-A1 ; restore ParmBlkPtr, DCtlPtr | ||
MOVEM.L (A7)+, D3-D7/A3 | ||
|
||
RTS ; open is always immediate, must return via RTS | ||
@6 | ||
; _NewPtr failed | ||
MOVE.W #-1, D0 | ||
BRA.S @2 | ||
|
||
TailData | ||
|
||
ENDMAIN | ||
|
||
END |
Oops, something went wrong.