Commit 9d8c2867 authored by Not6's avatar Not6
Browse files

update

parent fbcfdfc6
......@@ -70,24 +70,24 @@ else
endif
SOURCES_C := \
$(CORE_DIR)/minivmac/minivmac/src/MINEM68K.c \
$(CORE_DIR)/minivmac/minivmac/src/GLOBGLUE.c \
$(CORE_DIR)/minivmac/minivmac/src/M68KITAB.c \
$(CORE_DIR)/minivmac/minivmac/src/VIAEMDEV.c \
$(CORE_DIR)/minivmac/minivmac/src/VIA2EMDV.c \
$(CORE_DIR)/minivmac/minivmac/src/IWMEMDEV.c \
$(CORE_DIR)/minivmac/minivmac/src/SCCEMDEV.c \
$(CORE_DIR)/minivmac/minivmac/src/RTCEMDEV.c \
$(CORE_DIR)/minivmac/minivmac/src/ROMEMDEV.c \
$(CORE_DIR)/minivmac/minivmac/src/SCSIEMDV.c \
$(CORE_DIR)/minivmac/minivmac/src/SONYEMDV.c \
$(CORE_DIR)/minivmac/minivmac/src/SCRNEMDV.c \
$(CORE_DIR)/minivmac/minivmac/src/VIDEMDEV.c \
$(CORE_DIR)/minivmac/minivmac/src/ADBEMDEV.c \
$(CORE_DIR)/minivmac/minivmac/src/ASCEMDEV.c \
$(CORE_DIR)/minivmac/minivmac/src/MOUSEMDV.c \
$(CORE_DIR)/minivmac/minivmac/src/PROGMAIN.c \
$(CORE_DIR)/minivmac/MYOSGLUE.c \
$(CORE_DIR)/minivmac/src/MINEM68K.c \
$(CORE_DIR)/minivmac/src/GLOBGLUE.c \
$(CORE_DIR)/minivmac/src/M68KITAB.c \
$(CORE_DIR)/minivmac/src/VIAEMDEV.c \
$(CORE_DIR)/minivmac/src/VIA2EMDV.c \
$(CORE_DIR)/minivmac/src/IWMEMDEV.c \
$(CORE_DIR)/minivmac/src/SCCEMDEV.c \
$(CORE_DIR)/minivmac/src/RTCEMDEV.c \
$(CORE_DIR)/minivmac/src/ROMEMDEV.c \
$(CORE_DIR)/minivmac/src/SCSIEMDV.c \
$(CORE_DIR)/minivmac/src/SONYEMDV.c \
$(CORE_DIR)/minivmac/src/SCRNEMDV.c \
$(CORE_DIR)/minivmac/src/VIDEMDEV.c \
$(CORE_DIR)/minivmac/src/ADBEMDEV.c \
$(CORE_DIR)/minivmac/src/ASCEMDEV.c \
$(CORE_DIR)/minivmac/src/MOUSEMDV.c \
$(CORE_DIR)/minivmac/src/PROGMAIN.c \
$(CORE_DIR)/minivmac/src/OSGLUERETRO.c \
$(CORE_DIR)/libretro/libretro-vmac.c \
$(CORE_DIR)/libretro/vmac-mapper.c \
$(CORE_DIR)/libretro/vkbd.c \
......@@ -95,8 +95,8 @@ SOURCES_C := \
$(CORE_DIR)/libretro/diskutils.c \
$(CORE_DIR)/libretro/fontmsx.c
HINCLUDES := -I$(CORE_DIR)/minivmac/minivmac/src \
-I$(CORE_DIR)/minivmac \
HINCLUDES := -I$(CORE_DIR)/minivmac/src \
-I$(CORE_DIR)/minivmac/cfg \
-I$(CORE_DIR)/libretro
OBJECTS := $(SOURCES_C:.c=.o)
......@@ -122,7 +122,7 @@ $(TARGET): $(OBJECTS)
$(CC) $(fpic) $(SHARED) $(INCLUDES) -o $@ $(OBJECTS) $(LDFLAGS)
%.o: %.c
$(CC) $(CFLAGS) $(HINCLUDES) -c -o $@ $<
$(CC) $(fpic) $(CFLAGS) $(HINCLUDES) -c -o $@ $<
clean:
rm -f $(OBJECTS) $(TARGET)
......
Mini Vmac 3.3.2 LIBRETRO DEBUG VERSION
minivmac (MnvM_b36) Libretro port
What?: First attempt to build Mini Vmac with libretro
Why ?: Why not ?
Who ?: Rtype
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/".
All credits to Paul C. Pratt : "http://minivmac.sourceforge.net/" .
And of course for the RetroArch/Libretro team : "http://www.libretro.org/"
-----------------------------------------------------------
It's a quick hack.
At this time , works the basis but buggy on linux /android.
Remember ,Everything not working well, It's a debug release , so expect to more bug.
Default Control :
L2 Show/Hide statut
......
......@@ -18,8 +18,8 @@ ifeq ($(TARGET_ARCH),mips)
LOCAL_CFLAGS += -DANDROID_MIPS -D__mips__ -D__MIPSEL__
endif
EMU = ../minivmac/minivmac/src
GLUE = ../minivmac
EMU = ../minivmac/src
CFG = ../minivmac/cfg
CORE_SRCS = \
$(EMU)/MINEM68K.c \
......@@ -39,11 +39,11 @@ CORE_SRCS = \
$(EMU)/ASCEMDEV.c \
$(EMU)/MOUSEMDV.c \
$(EMU)/PROGMAIN.c \
$(GLUE)/MYOSGLUE.c
$(EMU)/OSGLUERETRO.c
BUILD_APP = $(CORE_SRCS)
LOCAL_C_INCLUDES := $(LOCAL_PATH)/$(EMU) $(LOCAL_PATH)/$(GLUE) $(LOCAL_PATH)../libretro
LOCAL_C_INCLUDES := $(LOCAL_PATH)/$(EMU) $(LOCAL_PATH)/$(CFG) $(LOCAL_PATH)../libretro
OBJECTS := ../libretro/libretro-vmac.c ../libretro/vmac-mapper.c ../libretro/vkbd.c \
../libretro/graph.c ../libretro/diskutils.c ../libretro/fontmsx.c \
......
/*
Configuration options used by both platform specific
and platform independent code.
This file is automatically generated by the build system,
which tries to know what options are valid in what
combinations. Avoid changing this file manually unless
you know what you're doing.
*/
/* adapt to current compiler/host processor */
#ifdef __i386__
#error "source is configured for 64 bit compiler"
#endif
#define MayInline inline __attribute__((always_inline))
#define MayNotInline __attribute__((noinline))
#define SmallGlobals 0
#define cIncludeUnused 0
#define UnusedParam(p) (void) p
/* --- integer types ---- */
typedef unsigned char ui3b;
#define HaveRealui3b 1
typedef signed char si3b;
#define HaveRealsi3b 1
typedef unsigned short ui4b;
#define HaveRealui4b 1
typedef short si4b;
#define HaveRealsi4b 1
typedef unsigned int ui5b;
#define HaveRealui5b 1
typedef int si5b;
#define HaveRealsi5b 1
#define HaveRealui6b 0
#define HaveRealsi6b 0
/* --- integer representation types ---- */
typedef ui3b ui3r;
#define ui3beqr 1
typedef si3b si3r;
#define si3beqr 1
typedef ui4b ui4r;
#define ui4beqr 1
typedef si4b si4r;
#define si4beqr 1
typedef ui5b ui5r;
#define ui5beqr 1
typedef si5b si5r;
#define si5beqr 1
typedef signed long long si6r;
typedef signed long long si6b;
typedef unsigned long long ui6r;
typedef unsigned long long ui6b;
#define LIT64(a) a##ULL
/* capabilities provided by platform specific code */
#define MySoundEnabled 1
#define MySoundRecenterSilence 0
#define kLn2SoundSampSz 3
#define dbglog_HAVE 0
#define WantAbnormalReports 0
#define NumDrives 6
#define IncludeSonyRawMode 1
#define IncludeSonyGetName 1
#define IncludeSonyNew 1
#define IncludeSonyNameNew 1
#define vMacScreenHeight 480
#define vMacScreenWidth 640
#define vMacScreenDepth 3
#define kROM_Size 0x00040000
#define IncludePbufs 1
#define NumPbufs 4
#define EnableMouseMotion 1
#define IncludeHostTextClipExchange 1
#define EnableAutoSlow 1
#define EmLocalTalk 0
#define AutoLocation 1
#define AutoTimeZone 1
/*
Configuration options used by platform specific code.
This file is automatically generated by the build system,
which tries to know what options are valid in what
combinations. Avoid changing this file manually unless
you know what you're doing.
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <sys/time.h>
#include <sys/times.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/keysym.h>
#include <X11/keysymdef.h>
#include <X11/Xatom.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <errno.h>
#include <unistd.h>
#include <dlfcn.h>
#define CanGetAppPath 1
#define HaveAppPathLink 1
#define TheAppPathLink "/proc/self/exe"
#define HaveSysctlPath 0
#define RomFileName "MacII.ROM"
#define kCheckSumRom_Size 0x00040000
#define kRomCheckSum1 0x9779D2C4
#define kRomCheckSum2 0x97221136
#define RomStartCheckSum 1
#define EnableDragDrop 1
#define SaveDialogEnable 1
#define EnableAltKeysMode 0
#define MKC_formac_Control MKC_CM
#define MKC_formac_Command MKC_Command
#define MKC_formac_Option MKC_Option
#define MKC_formac_Shift MKC_Shift
#define MKC_formac_CapsLock MKC_CapsLock
#define MKC_formac_Escape MKC_Escape
#define MKC_formac_BackSlash MKC_BackSlash
#define MKC_formac_Slash MKC_Slash
#define MKC_formac_Grave MKC_Grave
#define MKC_formac_Enter MKC_Enter
#define MKC_formac_PageUp MKC_PageUp
#define MKC_formac_PageDown MKC_PageDown
#define MKC_formac_Home MKC_Home
#define MKC_formac_End MKC_End
#define MKC_formac_Help MKC_Help
#define MKC_formac_ForwardDel MKC_ForwardDel
#define MKC_formac_F1 MKC_Option
#define MKC_formac_F2 MKC_Command
#define MKC_formac_F3 MKC_F3
#define MKC_formac_F4 MKC_F4
#define MKC_formac_F5 MKC_F5
#define MKC_formac_RControl MKC_CM
#define MKC_formac_RCommand MKC_Command
#define MKC_formac_ROption MKC_Option
#define MKC_formac_RShift MKC_Shift
#define MKC_UnMappedKey MKC_Control
#define VarFullScreen 1
#define WantInitFullScreen 0
#define MayFullScreen 1
#define MayNotFullScreen 1
#define WantInitMagnify 0
#define EnableMagnify 1
#define MyWindowScale 2
#define UseColorImage 1
#define WantInitRunInBackground 0
#define WantInitNotAutoSlow 1
#define WantInitSpeedValue 2
#define WantEnblCtrlInt 1
#define WantEnblCtrlRst 1
#define WantEnblCtrlKtg 1
#define NeedRequestInsertDisk 0
#define NeedDoMoreCommandsMsg 0
#define NeedDoAboutMsg 0
#define UseControlKeys 1
#define UseActvCode 0
#define EnableDemoMsg 0
/* version and other info to display to user */
#define NeedIntlChars 0
#define kStrAppName "Mini vMac"
#define kAppVariationStr "minivmac-36.04-lx64"
#define kStrCopyrightYear "2018"
#define kMaintainerName "unknown"
#define kStrHomePage "(unknown)"
#define kBldOpts "-br 36 -t lx64 -m II -hres 960 -vres 540 -depth 5 -sss 4"
/*
Configuration options used by platform independent code.
This file is automatically generated by the build system,
which tries to know what options are valid in what
combinations. Avoid changing this file manually unless
you know what you're doing.
*/
#define EmClassicKbrd 0
#define EmADB 1
#define EmRTC 1
#define EmPMU 0
#define EmVIA2 1
#define Use68020 1
#define EmFPU 1
#define EmMMU 0
#define EmASC 1
#define CurEmMd kEmMd_II
#define kMyClockMult 2
#define WantCycByPriOp 1
#define WantCloserCyc 0
#define kRAMa_Size 0x00400000
#define kRAMb_Size 0x00400000
#define IncludeVidMem 1
#define kVidMemRAM_Size 0x00200000
#define EmVidCard 1
#define kVidROM_Size 0x000800
#define MaxATTListN 20
#define IncludeExtnPbufs 1
#define IncludeExtnHostTextClipExchange 1
#define Sony_SupportDC42 1
#define Sony_SupportTags 0
#define Sony_WantChecksumsUpdated 0
#define Sony_VerifyChecksums 0
#define CaretBlinkTime 0x08
#define SpeakerVol 0x07
#define DoubleClickTime 0x08
#define MenuBlink 0x03
#define AutoKeyThresh 0x06
#define AutoKeyRate 0x03
#define pr_HilColRed 0x0000
#define pr_HilColGreen 0x0000
#define pr_HilColBlue 0x0000
/* the Wire variables are 1/0, not true/false */
enum {
Wire_unknown_SoundDisable,
#define SoundDisable (Wires[Wire_unknown_SoundDisable])
Wire_unknown_SoundVolb0,
#define SoundVolb0 (Wires[Wire_unknown_SoundVolb0])
Wire_unknown_SoundVolb1,
#define SoundVolb1 (Wires[Wire_unknown_SoundVolb1])
Wire_unknown_SoundVolb2,
#define SoundVolb2 (Wires[Wire_unknown_SoundVolb2])
Wire_VIA1_iA0_unknown,
#define VIA1_iA0 (Wires[Wire_VIA1_iA0_unknown])
Wire_VIA1_iA1_unknown,
#define VIA1_iA1 (Wires[Wire_VIA1_iA1_unknown])
Wire_VIA1_iA2_unknown,
#define VIA1_iA2 (Wires[Wire_VIA1_iA2_unknown])
Wire_VIA1_iB7_unknown, /* for compatibility with SoundDisable */
#define VIA1_iB7 (Wires[Wire_VIA1_iB7_unknown])
Wire_VIA2_InterruptRequest,
#define VIA2_InterruptRequest (Wires[Wire_VIA2_InterruptRequest])
#define VIA2_interruptChngNtfy VIAorSCCinterruptChngNtfy
Wire_VIA2_iA7_unknown,
#define VIA2_iA7 (Wires[Wire_VIA2_iA7_unknown])
#define VIA2_iA7_ChangeNtfy Addr32_ChangeNtfy
Wire_VIA2_iA6_unknown,
#define VIA2_iA6 (Wires[Wire_VIA2_iA6_unknown])
#define VIA2_iA6_ChangeNtfy Addr32_ChangeNtfy
Wire_VIA2_iB7_unknown,
#define VIA2_iB7 (Wires[Wire_VIA2_iB7_unknown])
Wire_VIA2_iCB2_unknown,
#define VIA2_iCB2 (Wires[Wire_VIA2_iCB2_unknown])
Wire_VIA2_iB2_PowerOff,
#define VIA2_iB2 (Wires[Wire_VIA2_iB2_PowerOff])
#define VIA2_iB2_ChangeNtfy PowerOff_ChangeNtfy
Wire_VIA2_iB3_Addr32,
#define VIA2_iB3 (Wires[Wire_VIA2_iB3_Addr32])
#define Addr32 (Wires[Wire_VIA2_iB3_Addr32])
#define VIA2_iB3_ChangeNtfy Addr32_ChangeNtfy
Wire_VIA1_iA4_MemOverlay,
#define MemOverlay (Wires[Wire_VIA1_iA4_MemOverlay])
#define VIA1_iA4 (Wires[Wire_VIA1_iA4_MemOverlay])
#define VIA1_iA4_ChangeNtfy MemOverlay_ChangeNtfy
Wire_VIA1_iA5_IWMvSel,
#define IWMvSel (Wires[Wire_VIA1_iA5_IWMvSel])
#define VIA1_iA5 (Wires[Wire_VIA1_iA5_IWMvSel])
Wire_VIA1_iA7_SCCwaitrq,
#define SCCwaitrq (Wires[Wire_VIA1_iA7_SCCwaitrq])
#define VIA1_iA7 (Wires[Wire_VIA1_iA7_SCCwaitrq])
Wire_VIA1_iB0_RTCdataLine,
#define RTCdataLine (Wires[Wire_VIA1_iB0_RTCdataLine])
#define VIA1_iB0 (Wires[Wire_VIA1_iB0_RTCdataLine])
#define VIA1_iB0_ChangeNtfy RTCdataLine_ChangeNtfy
Wire_VIA1_iB1_RTCclock,
#define RTCclock (Wires[Wire_VIA1_iB1_RTCclock])
#define VIA1_iB1 (Wires[Wire_VIA1_iB1_RTCclock])
#define VIA1_iB1_ChangeNtfy RTCclock_ChangeNtfy
Wire_VIA1_iB2_RTCunEnabled,
#define RTCunEnabled (Wires[Wire_VIA1_iB2_RTCunEnabled])
#define VIA1_iB2 (Wires[Wire_VIA1_iB2_RTCunEnabled])
#define VIA1_iB2_ChangeNtfy RTCunEnabled_ChangeNtfy
Wire_VIA1_iA3_SCCvSync,
#define VIA1_iA3 (Wires[Wire_VIA1_iA3_SCCvSync])
Wire_VIA1_iB3_ADB_Int,
#define ADB_Int (Wires[Wire_VIA1_iB3_ADB_Int])
#define VIA1_iB3 (Wires[Wire_VIA1_iB3_ADB_Int])
Wire_VIA1_iB4_ADB_st0,
#define ADB_st0 (Wires[Wire_VIA1_iB4_ADB_st0])
#define VIA1_iB4 (Wires[Wire_VIA1_iB4_ADB_st0])
#define VIA1_iB4_ChangeNtfy ADBstate_ChangeNtfy
Wire_VIA1_iB5_ADB_st1,
#define ADB_st1 (Wires[Wire_VIA1_iB5_ADB_st1])
#define VIA1_iB5 (Wires[Wire_VIA1_iB5_ADB_st1])
#define VIA1_iB5_ChangeNtfy ADBstate_ChangeNtfy
Wire_VIA1_iCB2_ADB_Data,
#define ADB_Data (Wires[Wire_VIA1_iCB2_ADB_Data])
#define VIA1_iCB2 (Wires[Wire_VIA1_iCB2_ADB_Data])
#define VIA1_iCB2_ChangeNtfy ADB_DataLineChngNtfy
Wire_VIA1_InterruptRequest,
#define VIA1_InterruptRequest (Wires[Wire_VIA1_InterruptRequest])
#define VIA1_interruptChngNtfy VIAorSCCinterruptChngNtfy
Wire_SCCInterruptRequest,
#define SCCInterruptRequest (Wires[Wire_SCCInterruptRequest])
#define SCCinterruptChngNtfy VIAorSCCinterruptChngNtfy
Wire_ADBMouseDisabled,
#define ADBMouseDisabled (Wires[Wire_ADBMouseDisabled])
Wire_VBLinterrupt,
#define Vid_VBLinterrupt (Wires[Wire_VBLinterrupt])
#define VIA2_iA0 (Wires[Wire_VBLinterrupt])
Wire_VBLintunenbl,
#define Vid_VBLintunenbl (Wires[Wire_VBLintunenbl])
kNumWires
};
/* VIA configuration */
#define VIA1_ORA_FloatVal 0xBF
/* bit 6 used to check version of hardware */
#define VIA1_ORB_FloatVal 0xFF
#define VIA1_ORA_CanIn 0x80
#define VIA1_ORA_CanOut 0x3F
#define VIA1_ORB_CanIn 0x09
#define VIA1_ORB_CanOut 0xB7
#define VIA1_IER_Never0 0x00
#define VIA1_IER_Never1 0x58
#define VIA1_CB2modesAllowed 0x01
#define VIA1_CA2modesAllowed 0x01
/* VIA 2 configuration */
#define VIA2_ORA_FloatVal 0xFF
#define VIA2_ORB_FloatVal 0xFF
#define VIA2_ORA_CanIn 0x01
#define VIA2_ORA_CanOut 0xC0
#define VIA2_ORB_CanIn 0x00
#define VIA2_ORB_CanOut 0x8C
#define VIA2_IER_Never0 0x00
#define VIA2_IER_Never1 0xED
#define VIA2_CB2modesAllowed 0x01
#define VIA2_CA2modesAllowed 0x01
#define Mouse_Enabled() (! ADBMouseDisabled)
#define VIA1_iCA1_PulseNtfy VIA1_iCA1_Sixtieth_PulseNtfy
#define Sixtieth_PulseNtfy VIA1_iCA1_Sixtieth_PulseNtfy
#define VIA1_iCA2_PulseNtfy VIA1_iCA2_RTC_OneSecond_PulseNtfy
#define RTC_OneSecond_PulseNtfy VIA1_iCA2_RTC_OneSecond_PulseNtfy
#define VIA2_iCA1_PulseNtfy VIA2_iCA1_Vid_VBLinterrupt_PulseNtfy
#define Vid_VBLinterrupt_PulseNotify VIA2_iCA1_Vid_VBLinterrupt_PulseNtfy
#define VIA2_iCB1_PulseNtfy VIA2_iCB1_ASC_interrupt_PulseNtfy
#define ASC_interrupt_PulseNtfy VIA2_iCB1_ASC_interrupt_PulseNtfy
#define GetSoundInvertTime VIA1_GetT1InvertTime
#define ADB_ShiftInData VIA1_ShiftOutData
#define ADB_ShiftOutData VIA1_ShiftInData
#define kExtn_Block_Base 0x50F0C000
#define kExtn_ln2Spc 5
#define kROM_Base 0x00800000
#define kROM_ln2Spc 20
#define WantDisasm 0
#define ExtraAbnormalReports 0
#include "SGLUALSA.h"
#include "STRCNENG.h"
This diff is collapsed.
......@@ -234,8 +234,11 @@ GLOBALPROC EmulationReserveAlloc(void)
MINEM68K_ReserveAlloc();
#endif
}
#ifndef __LIBRETRO__
LOCALFUNC blnr InitEmulation(void)
#else
GLOBALFUNC blnr InitEmulation(void)
#endif
{
#if EmRTC
if (RTC_Init())
......@@ -382,8 +385,11 @@ LOCALPROC m68k_go_nCycles_1(ui5b n)
}
LOCALVAR ui5b ExtraSubTicksToDo = 0;
#ifndef __LIBRETRO__
LOCALPROC DoEmulateOneTick(void)
#else
GLOBALPROC DoEmulateOneTick(void)
#endif
{
#if EnableAutoSlow
{
......@@ -445,8 +451,11 @@ LOCALFUNC blnr MoreSubTicksToDo(void)
return v;
}
#ifndef __LIBRETRO__
LOCALPROC DoEmulateExtraTime(void)
#else
GLOBALPROC DoEmulateExtraTime(void)
#endif
{
/*
DoEmulateExtraTime is used for
......@@ -486,8 +495,11 @@ LOCALVAR ui5b CurEmulatedTime = 0;
That is, the number of times
"DoEmulateOneTick" has been called.
*/
#ifndef __LIBRETRO__
LOCALPROC RunEmulatedTicksToTrueTime(void)
#else
GLOBALPROC RunEmulatedTicksToTrueTime(void)
#endif
{
/*
The general idea is to call DoEmulateOneTick
......@@ -538,7 +550,7 @@ LOCALPROC RunEmulatedTicksToTrueTime(void)
EmLagTime = n;
}
}
#ifndef __LIBRETRO__
LOCALPROC MainEventLoop(void)
{
for (; ; ) {
......@@ -560,3 +572,4 @@ GLOBALPROC ProgramMain(void)
MainEventLoop();
}
}
#endif
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment