mirror of
https://github.com/zydeco/minivmac4ios.git
synced 2025-02-19 07:31:01 +00:00
update to Mini vMac 36.04
This commit is contained in:
parent
da174dde3d
commit
857ef56be5
@ -8,6 +8,8 @@
|
||||
#define SmallGlobals 0
|
||||
#define cIncludeUnused 0
|
||||
#define UnusedParam(p) (void) p
|
||||
#define AutoTimeZone 1
|
||||
#define AutoLocation 1
|
||||
|
||||
/* --- integer types ---- */
|
||||
|
||||
|
@ -76,7 +76,7 @@
|
||||
<key>LSSupportsOpeningDocumentsInPlace</key>
|
||||
<true/>
|
||||
<key>MNVMVersion</key>
|
||||
<string>3.5.8</string>
|
||||
<string>36.04</string>
|
||||
<key>UIBackgroundModes</key>
|
||||
<array>
|
||||
<string>audio</string>
|
||||
|
@ -108,6 +108,7 @@ LOCALPROC dbglog_close0(void) {
|
||||
#define WantColorTransValid 1
|
||||
|
||||
#include "COMOSGLU.h"
|
||||
#include "PBUFSTDC.h"
|
||||
|
||||
#pragma mark - Cocoa Stuff
|
||||
|
||||
@ -167,78 +168,6 @@ LOCALPROC Screen_UnInit(void) {
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - Parameter Buffers
|
||||
|
||||
#if IncludePbufs
|
||||
LOCALVAR void *PbufDat[NumPbufs];
|
||||
#endif
|
||||
|
||||
#if IncludePbufs
|
||||
LOCALFUNC tMacErr PbufNewFromPtr(void *p, ui5b count, tPbuf *r) {
|
||||
tPbuf i;
|
||||
tMacErr err;
|
||||
|
||||
if (!FirstFreePbuf(&i)) {
|
||||
free(p);
|
||||
err = mnvm_miscErr;
|
||||
} else {
|
||||
*r = i;
|
||||
PbufDat[i] = p;
|
||||
PbufNewNotify(i, count);
|
||||
err = mnvm_noErr;
|
||||
}
|
||||
|
||||
return err;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if IncludePbufs
|
||||
GLOBALFUNC tMacErr PbufNew(ui5b count, tPbuf *r) {
|
||||
tMacErr err = mnvm_miscErr;
|
||||
|
||||
void *p = calloc(1, count);
|
||||
if (NULL != p) {
|
||||
err = PbufNewFromPtr(p, count, r);
|
||||
}
|
||||
|
||||
return err;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if IncludePbufs
|
||||
GLOBALPROC PbufDispose(tPbuf i) {
|
||||
free(PbufDat[i]);
|
||||
PbufDisposeNotify(i);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if IncludePbufs
|
||||
LOCALPROC UnInitPbufs(void) {
|
||||
tPbuf i;
|
||||
|
||||
for (i = 0; i < NumPbufs; ++i) {
|
||||
if (PbufIsAllocated(i)) {
|
||||
PbufDispose(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#if IncludePbufs
|
||||
GLOBALPROC PbufTransfer(ui3p Buffer,
|
||||
tPbuf i,
|
||||
ui5r offset,
|
||||
ui5r count,
|
||||
blnr IsWrite) {
|
||||
void *p = ((ui3p)PbufDat[i]) + offset;
|
||||
if (IsWrite) {
|
||||
(void)memcpy(p, Buffer, count);
|
||||
} else {
|
||||
(void)memcpy(Buffer, p, count);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#pragma mark - Text Translation
|
||||
|
||||
LOCALPROC UniCharStrFromSubstCStr(int *L, unichar *x, char *s, blnr AddEllipsis) {
|
||||
|
@ -39,11 +39,11 @@
|
||||
</array>
|
||||
<key>footer.html</key>
|
||||
<string>Mini vMac for iOS<br/>
|
||||
©2008-2018 Jesús A. Álvarez<br/>
|
||||
©2008-2019 Jesús A. Álvarez<br/>
|
||||
<a href="https://namedfork.net/minivmac">namedfork.net/minivmac</a><br/>
|
||||
<hr/>
|
||||
based on Mini vMac $mnvmversion<br/>
|
||||
©2001-2017 Paul C. Pratt<br/>
|
||||
©2001-2019 Paul C. Pratt<br/>
|
||||
<a href="http://gryphel.com/c/minivmac">gryphel.com/c/minivmac</a></string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
4
Mini vMac/mnvm_core/ACTVCODE.h
Executable file → Normal file
4
Mini vMac/mnvm_core/ACTVCODE.h
Executable file → Normal file
@ -93,7 +93,7 @@ LOCALFUNC blnr CheckActvCode(ui3p p, blnr *Trial)
|
||||
|
||||
/* user interface */
|
||||
|
||||
LOCALFUNC blnr Key2Digit(int key, ui3r *r)
|
||||
LOCALFUNC blnr Key2Digit(ui3r key, ui3r *r)
|
||||
{
|
||||
ui3r v;
|
||||
|
||||
@ -160,7 +160,7 @@ FORWARDFUNC tMacErr ActvCodeFileLoad(ui3p p);
|
||||
|
||||
LOCALVAR ui3b CurActvCode[ActvCodeFileLen];
|
||||
|
||||
LOCALPROC DoActvCodeModeKey(int key)
|
||||
LOCALPROC DoActvCodeModeKey(ui3r key)
|
||||
{
|
||||
ui3r digit;
|
||||
ui3r L;
|
||||
|
0
Mini vMac/mnvm_core/ADBEMDEV.c
Executable file → Normal file
0
Mini vMac/mnvm_core/ADBEMDEV.c
Executable file → Normal file
0
Mini vMac/mnvm_core/ADBEMDEV.h
Executable file → Normal file
0
Mini vMac/mnvm_core/ADBEMDEV.h
Executable file → Normal file
10
Mini vMac/mnvm_core/ADBSHARE.h
Executable file → Normal file
10
Mini vMac/mnvm_core/ADBSHARE.h
Executable file → Normal file
@ -48,12 +48,13 @@ LOCALPROC ADB_DoMouseTalk(void)
|
||||
switch (ADB_CurCmd & 3) {
|
||||
case 0:
|
||||
{
|
||||
blnr overflow = falseblnr;
|
||||
MyEvtQEl *p;
|
||||
ui4b partH;
|
||||
ui4b partV;
|
||||
blnr overflow = falseblnr;
|
||||
blnr MouseButtonChange = falseblnr;
|
||||
MyEvtQEl *p = MyEvtQOutP();
|
||||
if (nullpr != p) {
|
||||
|
||||
if (nullpr != (p = MyEvtQOutP())) {
|
||||
if (MyEvtQElKindMouseDelta == p->kind) {
|
||||
MouseADBDeltaH += p->u.pos.h;
|
||||
MouseADBDeltaV += p->u.pos.v;
|
||||
@ -86,8 +87,7 @@ LOCALPROC ADB_DoMouseTalk(void)
|
||||
MouseADBDeltaH -= partH;
|
||||
MouseADBDeltaV -= partV;
|
||||
if (! overflow) {
|
||||
MyEvtQEl *p = MyEvtQOutP();
|
||||
if (nullpr != p) {
|
||||
if (nullpr != (p = MyEvtQOutP())) {
|
||||
if (MyEvtQElKindMouseButton == p->kind) {
|
||||
SavedCurMouseButton = p->u.press.down;
|
||||
MouseButtonChange = trueblnr;
|
||||
|
2
Mini vMac/mnvm_core/ALTKEYSM.h
Executable file → Normal file
2
Mini vMac/mnvm_core/ALTKEYSM.h
Executable file → Normal file
@ -47,7 +47,7 @@ LOCALPROC CheckAltKeyUseMode(void)
|
||||
}
|
||||
}
|
||||
|
||||
LOCALPROC Keyboard_UpdateKeyMap1(int key, blnr down)
|
||||
LOCALPROC Keyboard_UpdateKeyMap1(ui3r key, blnr down)
|
||||
{
|
||||
if (MKC_Command == key) {
|
||||
AltKeysTrueCmnd = down;
|
||||
|
0
Mini vMac/mnvm_core/ASCEMDEV.c
Executable file → Normal file
0
Mini vMac/mnvm_core/ASCEMDEV.c
Executable file → Normal file
0
Mini vMac/mnvm_core/ASCEMDEV.h
Executable file → Normal file
0
Mini vMac/mnvm_core/ASCEMDEV.h
Executable file → Normal file
0
Mini vMac/mnvm_core/BPFILTER.h
Executable file → Normal file
0
Mini vMac/mnvm_core/BPFILTER.h
Executable file → Normal file
30
Mini vMac/mnvm_core/COMOSGLU.h
Executable file → Normal file
30
Mini vMac/mnvm_core/COMOSGLU.h
Executable file → Normal file
@ -37,6 +37,7 @@
|
||||
#endif
|
||||
|
||||
GLOBALVAR ui3p ROM = nullpr;
|
||||
LOCALVAR blnr ROM_loaded = falseblnr;
|
||||
|
||||
GLOBALVAR ui5b vSonyWritableMask = 0;
|
||||
GLOBALVAR ui5b vSonyInsertedMask = 0;
|
||||
@ -55,9 +56,13 @@ GLOBALVAR tPbuf vSonyNewDiskName = NotAPbuf;
|
||||
#endif
|
||||
|
||||
GLOBALVAR ui5b CurMacDateInSeconds = 0;
|
||||
#if AutoLocation
|
||||
GLOBALVAR ui5b CurMacLatitude = 0;
|
||||
GLOBALVAR ui5b CurMacLongitude = 0;
|
||||
#endif
|
||||
#if AutoTimeZone
|
||||
GLOBALVAR ui5b CurMacDelta = 0;
|
||||
#endif
|
||||
|
||||
#if 0 != vMacScreenDepth
|
||||
GLOBALVAR blnr UseColorMode = falseblnr;
|
||||
@ -183,7 +188,9 @@ LOCALFUNC blnr FirstFreeDisk(tDrive *Drive_No)
|
||||
|
||||
for (i = 0; i < NumDrives; ++i) {
|
||||
if (! vSonyIsInserted(i)) {
|
||||
*Drive_No = i;
|
||||
if (nullpr != Drive_No) {
|
||||
*Drive_No = i;
|
||||
}
|
||||
return trueblnr;
|
||||
}
|
||||
}
|
||||
@ -1020,10 +1027,10 @@ LOCALFUNC MyEvtQEl * MyEvtQElAlloc(void)
|
||||
|
||||
LOCALVAR ui5b theKeys[4];
|
||||
|
||||
LOCALPROC Keyboard_UpdateKeyMap(int key, blnr down)
|
||||
LOCALPROC Keyboard_UpdateKeyMap(ui3r key, blnr down)
|
||||
{
|
||||
int k = key & 127; /* just for safety */
|
||||
int bit = 1 << (k & 7);
|
||||
ui3r k = key & 127; /* just for safety */
|
||||
ui3r bit = 1 << (k & 7);
|
||||
ui3b *kp = (ui3b *)theKeys;
|
||||
ui3b *kpi = &kp[k / 8];
|
||||
blnr CurDown = ((*kpi & bit) != 0);
|
||||
@ -1175,7 +1182,9 @@ LOCALPROC MyEvtQTryRecoverFromFull(void)
|
||||
|
||||
LOCALVAR char *SavedBriefMsg = nullpr;
|
||||
LOCALVAR char *SavedLongMsg;
|
||||
#if WantAbnormalReports
|
||||
LOCALVAR ui4r SavedIDMsg = 0;
|
||||
#endif
|
||||
LOCALVAR blnr SavedFatalMsg;
|
||||
|
||||
LOCALPROC MacMsg(char *briefMsg, char *longMsg, blnr fatal)
|
||||
@ -1192,17 +1201,7 @@ LOCALPROC MacMsg(char *briefMsg, char *longMsg, blnr fatal)
|
||||
}
|
||||
}
|
||||
|
||||
GLOBALOSGLUPROC WarnMsgCorruptedROM(void)
|
||||
{
|
||||
MacMsg(kStrCorruptedROMTitle, kStrCorruptedROMMessage, falseblnr);
|
||||
}
|
||||
|
||||
GLOBALOSGLUPROC WarnMsgUnsupportedROM(void)
|
||||
{
|
||||
MacMsg(kStrUnsupportedROMTitle,
|
||||
kStrUnsupportedROMMessage, falseblnr);
|
||||
}
|
||||
|
||||
#if WantAbnormalReports
|
||||
GLOBALOSGLUPROC WarnMsgAbnormalID(ui4r id)
|
||||
{
|
||||
MacMsg(kStrReportAbnormalTitle,
|
||||
@ -1217,3 +1216,4 @@ GLOBALOSGLUPROC WarnMsgAbnormalID(ui4r id)
|
||||
SavedIDMsg = id;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
452
Mini vMac/mnvm_core/CONTROLM.h
Executable file → Normal file
452
Mini vMac/mnvm_core/CONTROLM.h
Executable file → Normal file
@ -34,6 +34,7 @@ enum {
|
||||
#if UseActvCode
|
||||
SpclModeActvCode,
|
||||
#endif
|
||||
SpclModeNoRom,
|
||||
SpclModeMessage,
|
||||
#if UseControlKeys
|
||||
SpclModeControl,
|
||||
@ -264,9 +265,9 @@ LOCALPROC DrawCellsOneLineStr(char *s)
|
||||
LOCALPROC DrawCellsKeyCommand(char *k, char *s)
|
||||
{
|
||||
DrawCellsBeginLine();
|
||||
DrawCellsFromStr("'");
|
||||
DrawCellsFromStr(" ");
|
||||
DrawCellsFromStr(k);
|
||||
DrawCellsFromStr("' - ");
|
||||
DrawCellsFromStr(" - ");
|
||||
DrawCellsFromStr(s);
|
||||
DrawCellsEndLine();
|
||||
}
|
||||
@ -324,6 +325,7 @@ LOCALPROC DrawSpclMode0(char *Title, SpclModeBody Body)
|
||||
#define DisconnectKeyCodes1 DisconnectKeyCodes
|
||||
#endif
|
||||
|
||||
#if WantAbnormalReports || UseActvFile
|
||||
LOCALPROC ClStrAppendHexNib(int *L0, ui3b *r, ui3r v)
|
||||
{
|
||||
if (v < 10) {
|
||||
@ -332,19 +334,25 @@ LOCALPROC ClStrAppendHexNib(int *L0, ui3b *r, ui3r v)
|
||||
ClStrAppendChar(L0, r, kCellUpA + (v - 10));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#if WantAbnormalReports || UseActvFile
|
||||
LOCALPROC ClStrAppendHexByte(int *L0, ui3b *r, ui3r v)
|
||||
{
|
||||
ClStrAppendHexNib(L0, r, (v >> 4) & 0x0F);
|
||||
ClStrAppendHexNib(L0, r, v & 0x0F);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if WantAbnormalReports || UseActvFile
|
||||
LOCALPROC ClStrAppendHexWord(int *L0, ui3b *r, ui4r v)
|
||||
{
|
||||
ClStrAppendHexByte(L0, r, (v >> 8) & 0xFF);
|
||||
ClStrAppendHexByte(L0, r, v & 0xFF);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if WantAbnormalReports
|
||||
LOCALPROC DrawCellsOneLineHexWord(ui4r v)
|
||||
{
|
||||
ui3b ps[ClStrMaxLength];
|
||||
@ -359,16 +367,19 @@ LOCALPROC DrawCellsOneLineHexWord(ui4r v)
|
||||
}
|
||||
DrawCellsEndLine();
|
||||
}
|
||||
#endif
|
||||
|
||||
LOCALPROC DrawCellsMessageModeBody(void)
|
||||
{
|
||||
DrawCellsOneLineStr(SavedBriefMsg);
|
||||
DrawCellsBlankLine();
|
||||
DrawCellsOneLineStr(SavedLongMsg);
|
||||
#if WantAbnormalReports
|
||||
if (0 != SavedIDMsg) {
|
||||
DrawCellsBlankLine();
|
||||
DrawCellsOneLineHexWord(SavedIDMsg);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
LOCALPROC DrawMessageMode(void)
|
||||
@ -380,7 +391,9 @@ LOCALPROC MacMsgDisplayOff(void)
|
||||
{
|
||||
SpecialModeClr(SpclModeMessage);
|
||||
SavedBriefMsg = nullpr;
|
||||
#if WantAbnormalReports
|
||||
SavedIDMsg = 0;
|
||||
#endif
|
||||
NeedWholeScreenDraw = trueblnr;
|
||||
}
|
||||
|
||||
@ -392,7 +405,7 @@ LOCALPROC MacMsgDisplayOn(void)
|
||||
SpecialModeSet(SpclModeMessage);
|
||||
}
|
||||
|
||||
LOCALPROC DoMessageModeKey(int key)
|
||||
LOCALPROC DoMessageModeKey(ui3r key)
|
||||
{
|
||||
if (MKC_C == key) {
|
||||
MacMsgDisplayOff();
|
||||
@ -423,6 +436,28 @@ LOCALPROC DoAboutMsg(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
LOCALPROC NoRomMsgDisplayOff(void)
|
||||
{
|
||||
SpecialModeClr(SpclModeNoRom);
|
||||
NeedWholeScreenDraw = trueblnr;
|
||||
}
|
||||
|
||||
LOCALPROC NoRomMsgDisplayOn(void)
|
||||
{
|
||||
NeedWholeScreenDraw = trueblnr;
|
||||
SpecialModeSet(SpclModeNoRom);
|
||||
}
|
||||
|
||||
LOCALPROC DrawCellsNoRomModeBody(void)
|
||||
{
|
||||
DrawCellsOneLineStr(kStrNoROMMessage);
|
||||
}
|
||||
|
||||
LOCALPROC DrawNoRomMode(void)
|
||||
{
|
||||
DrawSpclMode0(kStrNoROMTitle, DrawCellsNoRomModeBody);
|
||||
}
|
||||
|
||||
#if UseControlKeys
|
||||
|
||||
LOCALVAR blnr LastControlKey = falseblnr;
|
||||
@ -432,8 +467,12 @@ LOCALVAR int ControlMessage = 0;
|
||||
enum {
|
||||
kCntrlModeOff,
|
||||
kCntrlModeBase,
|
||||
#if WantEnblCtrlRst
|
||||
kCntrlModeConfirmReset,
|
||||
#endif
|
||||
#if WantEnblCtrlInt
|
||||
kCntrlModeConfirmInterrupt,
|
||||
#endif
|
||||
kCntrlModeConfirmQuit,
|
||||
kCntrlModeSpeedControl,
|
||||
|
||||
@ -448,15 +487,21 @@ enum {
|
||||
#if VarFullScreen
|
||||
kCntrlMsgFullScreen,
|
||||
#endif
|
||||
#if WantEnblCtrlRst
|
||||
kCntrlMsgConfirmResetStart,
|
||||
kCntrlMsgHaveReset,
|
||||
kCntrlMsgResetCancelled,
|
||||
#endif
|
||||
#if WantEnblCtrlInt
|
||||
kCntrlMsgConfirmInterruptStart,
|
||||
kCntrlMsgHaveInterrupted,
|
||||
kCntrlMsgInterruptCancelled,
|
||||
#endif
|
||||
kCntrlMsgConfirmQuitStart,
|
||||
kCntrlMsgQuitCancelled,
|
||||
#if WantEnblCtrlKtg
|
||||
kCntrlMsgEmCntrl,
|
||||
#endif
|
||||
kCntrlMsgSpeedControlStart,
|
||||
kCntrlMsgNewSpeed,
|
||||
kCntrlMsgNewStopped,
|
||||
@ -466,7 +511,10 @@ enum {
|
||||
#endif
|
||||
kCntrlMsgAbout,
|
||||
kCntrlMsgHelp,
|
||||
#if UseActvCode || EnableDemoMsg
|
||||
#if IncludePbufs
|
||||
kCntrlMsgOptionsStrCopied,
|
||||
#endif
|
||||
#if 0 && (UseActvCode || EnableDemoMsg)
|
||||
kCntrlMsgRegStrCopied,
|
||||
#endif
|
||||
|
||||
@ -511,17 +559,44 @@ LOCALPROC SetSpeedValue(ui3b i)
|
||||
#if VarFullScreen
|
||||
FORWARDPROC ToggleWantFullScreen(void);
|
||||
#endif
|
||||
#if UseActvCode
|
||||
FORWARDPROC CopyRegistrationStr(void);
|
||||
#elif EnableDemoMsg
|
||||
LOCALPROC CopyRegistrationStr(void)
|
||||
|
||||
#if IncludeHostTextClipExchange
|
||||
LOCALPROC HTCEexportSubstCStr(char *s)
|
||||
{
|
||||
ui3b ps[ClStrMaxLength];
|
||||
int i;
|
||||
int L;
|
||||
tPbuf j;
|
||||
#ifdef PbufHaveLock
|
||||
int n = ClStrSizeSubstCStr(s);
|
||||
|
||||
ClStrFromSubstCStr(&L, ps, "^v");
|
||||
if (mnvm_noErr == PbufNew(n, &j)) {
|
||||
blnr IsOk = falseblnr;
|
||||
ui3p p = PbufLock(j);
|
||||
|
||||
if (nullpr != p) {
|
||||
L = 0;
|
||||
ClStrAppendSubstCStr(&L, p, s);
|
||||
|
||||
if (L == n) {
|
||||
for (i = 0; i < n; ++i) {
|
||||
p[i] = Cell2MacAsciiMap[p[i]];
|
||||
}
|
||||
IsOk = trueblnr;
|
||||
}
|
||||
|
||||
PbufUnlock(j);
|
||||
}
|
||||
|
||||
if (IsOk) {
|
||||
HTCEexport(j);
|
||||
} else {
|
||||
PbufDispose(j);
|
||||
}
|
||||
}
|
||||
#else
|
||||
ui3b ps[ClStrMaxLength];
|
||||
|
||||
ClStrFromSubstCStr(&L, ps, s);
|
||||
|
||||
for (i = 0; i < L; ++i) {
|
||||
ps[i] = Cell2MacAsciiMap[ps[i]];
|
||||
@ -531,28 +606,53 @@ LOCALPROC CopyRegistrationStr(void)
|
||||
PbufTransfer(ps, j, 0, L, trueblnr);
|
||||
HTCEexport(j);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
LOCALPROC DoControlModeKey(int key)
|
||||
#if IncludeHostTextClipExchange
|
||||
LOCALPROC CopyOptionsStr(void)
|
||||
{
|
||||
HTCEexportSubstCStr(kBldOpts);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
#if UseActvCode
|
||||
FORWARDPROC CopyRegistrationStr(void);
|
||||
#elif EnableDemoMsg
|
||||
LOCALPROC CopyRegistrationStr(void)
|
||||
{
|
||||
HTCEexportSubstCStr("^v");
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
LOCALPROC DoControlModeKey(ui3r key)
|
||||
{
|
||||
switch (CurControlMode) {
|
||||
case kCntrlModeBase:
|
||||
switch (key) {
|
||||
#if WantEnblCtrlKtg
|
||||
case MKC_K:
|
||||
ControlKeyPressed = ! ControlKeyPressed;
|
||||
ControlMessage = kCntrlMsgEmCntrl;
|
||||
Keyboard_UpdateKeyMap1(MKC_Control,
|
||||
Keyboard_UpdateKeyMap1(MKC_UnMappedKey,
|
||||
ControlKeyPressed);
|
||||
break;
|
||||
#endif
|
||||
case MKC_S:
|
||||
CurControlMode = kCntrlModeSpeedControl;
|
||||
ControlMessage = kCntrlMsgSpeedControlStart;
|
||||
break;
|
||||
#if WantEnblCtrlInt
|
||||
case MKC_I:
|
||||
CurControlMode = kCntrlModeConfirmInterrupt;
|
||||
ControlMessage = kCntrlMsgConfirmInterruptStart;
|
||||
break;
|
||||
#endif
|
||||
#if WantEnblCtrlRst
|
||||
case MKC_R:
|
||||
if (! AnyDiskInserted()) {
|
||||
WantMacReset = trueblnr;
|
||||
@ -562,6 +662,7 @@ LOCALPROC DoControlModeKey(int key)
|
||||
ControlMessage = kCntrlMsgConfirmResetStart;
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
case MKC_Q:
|
||||
if (! AnyDiskInserted()) {
|
||||
ForceMacOff = trueblnr;
|
||||
@ -593,14 +694,50 @@ LOCALPROC DoControlModeKey(int key)
|
||||
ControlMessage = kCntrlMsgFullScreen;
|
||||
break;
|
||||
#endif
|
||||
#if UseActvCode || EnableDemoMsg
|
||||
#if IncludeHostTextClipExchange
|
||||
case MKC_P:
|
||||
CopyOptionsStr();
|
||||
ControlMessage = kCntrlMsgOptionsStrCopied;
|
||||
break;
|
||||
#endif
|
||||
#if 0 && (UseActvCode || EnableDemoMsg)
|
||||
case MKC_P:
|
||||
CopyRegistrationStr();
|
||||
ControlMessage = kCntrlMsgRegStrCopied;
|
||||
break;
|
||||
#endif
|
||||
#if NeedRequestIthDisk
|
||||
case MKC_1:
|
||||
RequestIthDisk = 1;
|
||||
break;
|
||||
case MKC_2:
|
||||
RequestIthDisk = 2;
|
||||
break;
|
||||
case MKC_3:
|
||||
RequestIthDisk = 3;
|
||||
break;
|
||||
case MKC_4:
|
||||
RequestIthDisk = 4;
|
||||
break;
|
||||
case MKC_5:
|
||||
RequestIthDisk = 5;
|
||||
break;
|
||||
case MKC_6:
|
||||
RequestIthDisk = 6;
|
||||
break;
|
||||
case MKC_7:
|
||||
RequestIthDisk = 7;
|
||||
break;
|
||||
case MKC_8:
|
||||
RequestIthDisk = 8;
|
||||
break;
|
||||
case MKC_9:
|
||||
RequestIthDisk = 9;
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
#if WantEnblCtrlRst
|
||||
case kCntrlModeConfirmReset:
|
||||
switch (key) {
|
||||
case MKC_Y:
|
||||
@ -618,6 +755,8 @@ LOCALPROC DoControlModeKey(int key)
|
||||
break;
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
#if WantEnblCtrlInt
|
||||
case kCntrlModeConfirmInterrupt:
|
||||
switch (key) {
|
||||
case MKC_Y:
|
||||
@ -635,6 +774,7 @@ LOCALPROC DoControlModeKey(int key)
|
||||
break;
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
case kCntrlModeConfirmQuit:
|
||||
switch (key) {
|
||||
case MKC_Y:
|
||||
@ -665,9 +805,11 @@ LOCALPROC DoControlModeKey(int key)
|
||||
ControlMessage = kCntrlMsgNewRunInBack;
|
||||
break;
|
||||
case MKC_D:
|
||||
SpeedStopped = ! SpeedStopped;
|
||||
CurControlMode = kCntrlModeBase;
|
||||
ControlMessage = kCntrlMsgNewStopped;
|
||||
if (ROM_loaded) {
|
||||
SpeedStopped = ! SpeedStopped;
|
||||
CurControlMode = kCntrlModeBase;
|
||||
ControlMessage = kCntrlMsgNewStopped;
|
||||
}
|
||||
break;
|
||||
#if EnableAutoSlow
|
||||
case MKC_W:
|
||||
@ -708,12 +850,16 @@ LOCALFUNC char * ControlMode2TitleStr(void)
|
||||
char *s;
|
||||
|
||||
switch (CurControlMode) {
|
||||
#if WantEnblCtrlRst
|
||||
case kCntrlModeConfirmReset:
|
||||
s = kStrModeConfirmReset;
|
||||
break;
|
||||
#endif
|
||||
#if WantEnblCtrlInt
|
||||
case kCntrlModeConfirmInterrupt:
|
||||
s = kStrModeConfirmInterrupt;
|
||||
break;
|
||||
#endif
|
||||
case kCntrlModeConfirmQuit:
|
||||
s = kStrModeConfirmQuit;
|
||||
break;
|
||||
@ -737,12 +883,7 @@ LOCALPROC DrawCellsControlModeBody(void)
|
||||
{
|
||||
switch (ControlMessage) {
|
||||
case kCntrlMsgAbout:
|
||||
#ifndef kStrSponsorName
|
||||
DrawCellsOneLineStr(kStrProgramInfo);
|
||||
#else
|
||||
DrawCellsOneLineStr(kStrSponsorIs);
|
||||
DrawCellsOneLineStr(kStrSponsorName);
|
||||
#endif
|
||||
|
||||
DrawCellsBlankLine();
|
||||
|
||||
@ -776,9 +917,16 @@ LOCALPROC DrawCellsControlModeBody(void)
|
||||
#if VarFullScreen
|
||||
DrawCellsKeyCommand("F", kStrCmdFullScrnToggle);
|
||||
#endif
|
||||
#if WantEnblCtrlKtg
|
||||
DrawCellsKeyCommand("K", kStrCmdCtrlKeyToggle);
|
||||
#endif
|
||||
#if WantEnblCtrlRst
|
||||
DrawCellsKeyCommand("R", kStrCmdReset);
|
||||
#endif
|
||||
#if WantEnblCtrlInt
|
||||
DrawCellsKeyCommand("I", kStrCmdInterrupt);
|
||||
#endif
|
||||
DrawCellsKeyCommand("P", kStrCmdCopyOptions);
|
||||
DrawCellsKeyCommand("H", kStrCmdHelp);
|
||||
break;
|
||||
case kCntrlMsgSpeedControlStart:
|
||||
@ -823,6 +971,12 @@ LOCALPROC DrawCellsControlModeBody(void)
|
||||
DrawCellsOneLineStr(kStrNewFullScreen);
|
||||
break;
|
||||
#endif
|
||||
#if IncludeHostTextClipExchange
|
||||
case kCntrlMsgOptionsStrCopied:
|
||||
DrawCellsOneLineStr(kStrHaveCopiedOptions);
|
||||
break;
|
||||
#endif
|
||||
#if 0
|
||||
#if UseActvCode
|
||||
case kCntrlMsgRegStrCopied:
|
||||
DrawCellsOneLineStr("Registration String copied.");
|
||||
@ -832,6 +986,8 @@ LOCALPROC DrawCellsControlModeBody(void)
|
||||
DrawCellsOneLineStr("Variation name copied.");
|
||||
break;
|
||||
#endif
|
||||
#endif
|
||||
#if WantEnblCtrlRst
|
||||
case kCntrlMsgConfirmResetStart:
|
||||
DrawCellsOneLineStr(kStrConfirmReset);
|
||||
DrawCellsBlankLine();
|
||||
@ -844,6 +1000,8 @@ LOCALPROC DrawCellsControlModeBody(void)
|
||||
case kCntrlMsgResetCancelled:
|
||||
DrawCellsOneLineStr(kStrCancelledReset);
|
||||
break;
|
||||
#endif
|
||||
#if WantEnblCtrlInt
|
||||
case kCntrlMsgConfirmInterruptStart:
|
||||
DrawCellsOneLineStr(kStrConfirmInterrupt);
|
||||
DrawCellsBlankLine();
|
||||
@ -856,6 +1014,7 @@ LOCALPROC DrawCellsControlModeBody(void)
|
||||
case kCntrlMsgInterruptCancelled:
|
||||
DrawCellsOneLineStr(kStrCancelledInterrupt);
|
||||
break;
|
||||
#endif
|
||||
case kCntrlMsgConfirmQuitStart:
|
||||
DrawCellsOneLineStr(kStrConfirmQuit);
|
||||
DrawCellsBlankLine();
|
||||
@ -865,9 +1024,11 @@ LOCALPROC DrawCellsControlModeBody(void)
|
||||
case kCntrlMsgQuitCancelled:
|
||||
DrawCellsOneLineStr(kStrCancelledQuit);
|
||||
break;
|
||||
#if WantEnblCtrlKtg
|
||||
case kCntrlMsgEmCntrl:
|
||||
DrawCellsOneLineStr(kStrNewCntrlKey);
|
||||
break;
|
||||
#endif
|
||||
case kCntrlMsgBaseStart:
|
||||
default:
|
||||
DrawCellsOneLineStr(kStrHowToLeaveControl);
|
||||
@ -925,6 +1086,9 @@ LOCALPROC DrawSpclMode(void)
|
||||
if (SpecialModeTst(SpclModeMessage)) {
|
||||
DrawMessageMode();
|
||||
} else
|
||||
if (SpecialModeTst(SpclModeNoRom)) {
|
||||
DrawNoRomMode();
|
||||
} else
|
||||
#if UseActvCode
|
||||
if (SpecialModeTst(SpclModeActvCode)) {
|
||||
DrawActvCodeMode();
|
||||
@ -964,67 +1128,127 @@ LOCALFUNC ui3p GetCurDrawBuff(void)
|
||||
return p;
|
||||
}
|
||||
|
||||
LOCALPROC Keyboard_UpdateKeyMap2(int key, blnr down)
|
||||
#ifdef WantKeyboard_RemapMac
|
||||
LOCALFUNC ui3r Keyboard_RemapMac(ui3r key)
|
||||
{
|
||||
#ifndef MKC_formac_Control
|
||||
#if SwapCommandControl
|
||||
#define MKC_formac_Control MKC_Command
|
||||
#else
|
||||
#define MKC_formac_Control MKC_Control
|
||||
#endif
|
||||
#endif
|
||||
switch (key) {
|
||||
#if MKC_formac_Control != MKC_Control
|
||||
if (MKC_Control == key) {
|
||||
key = MKC_formac_Control;
|
||||
} else
|
||||
#endif
|
||||
|
||||
#ifndef MKC_formac_Command
|
||||
#if SwapCommandControl
|
||||
#define MKC_formac_Command MKC_Control
|
||||
#else
|
||||
#define MKC_formac_Command MKC_Command
|
||||
#endif
|
||||
case MKC_Control:
|
||||
key = MKC_formac_Control;
|
||||
break;
|
||||
#endif
|
||||
#if MKC_formac_Command != MKC_Command
|
||||
if (MKC_Command == key) {
|
||||
key = MKC_formac_Command;
|
||||
} else
|
||||
#endif
|
||||
|
||||
#ifndef MKC_formac_Option
|
||||
#define MKC_formac_Option MKC_Option
|
||||
case MKC_Command:
|
||||
key = MKC_formac_Command;
|
||||
break;
|
||||
#endif
|
||||
#if MKC_formac_Option != MKC_Option
|
||||
if (MKC_Option == key) {
|
||||
key = MKC_formac_Option;
|
||||
} else
|
||||
case MKC_Option:
|
||||
key = MKC_formac_Option;
|
||||
break;
|
||||
#endif
|
||||
|
||||
#ifndef MKC_formac_F1
|
||||
#define MKC_formac_F1 MKC_Option
|
||||
#if MKC_formac_Shift != MKC_Shift
|
||||
case MKC_Shift:
|
||||
key = MKC_formac_Shift;
|
||||
break;
|
||||
#endif
|
||||
#if MKC_formac_CapsLock != MKC_CapsLock
|
||||
case MKC_CapsLock:
|
||||
key = MKC_formac_CapsLock;
|
||||
break;
|
||||
#endif
|
||||
#if MKC_formac_F1 != MKC_F1
|
||||
if (MKC_F1 == key) {
|
||||
key = MKC_formac_F1;
|
||||
} else
|
||||
#endif
|
||||
|
||||
#ifndef MKC_formac_F2
|
||||
#define MKC_formac_F2 MKC_Command
|
||||
case MKC_F1:
|
||||
key = MKC_formac_F1;
|
||||
break;
|
||||
#endif
|
||||
#if MKC_formac_F2 != MKC_F2
|
||||
if (MKC_F2 == key) {
|
||||
key = MKC_formac_F2;
|
||||
} else
|
||||
case MKC_F2:
|
||||
key = MKC_formac_F2;
|
||||
break;
|
||||
#endif
|
||||
|
||||
{
|
||||
#if MKC_formac_F3 != MKC_F3
|
||||
case MKC_F3:
|
||||
key = MKC_formac_F3;
|
||||
break;
|
||||
#endif
|
||||
#if MKC_formac_F4 != MKC_F4
|
||||
case MKC_F4:
|
||||
key = MKC_formac_F4;
|
||||
break;
|
||||
#endif
|
||||
#if MKC_formac_F5 != MKC_F5
|
||||
case MKC_F5:
|
||||
key = MKC_formac_F5;
|
||||
break;
|
||||
#endif
|
||||
#if MKC_formac_Escape != MKC_Escape
|
||||
case MKC_Escape:
|
||||
key = MKC_formac_Escape;
|
||||
break;
|
||||
#endif
|
||||
#if MKC_formac_BackSlash != MKC_BackSlash
|
||||
case MKC_BackSlash:
|
||||
key = MKC_formac_BackSlash;
|
||||
break;
|
||||
#endif
|
||||
#if MKC_formac_Slash != MKC_Slash
|
||||
case MKC_Slash:
|
||||
key = MKC_formac_Slash;
|
||||
break;
|
||||
#endif
|
||||
#if MKC_formac_Grave != MKC_Grave
|
||||
case MKC_Grave:
|
||||
key = MKC_formac_Grave;
|
||||
break;
|
||||
#endif
|
||||
#if MKC_formac_Enter != MKC_Enter
|
||||
case MKC_Enter:
|
||||
key = MKC_formac_Enter;
|
||||
break;
|
||||
#endif
|
||||
#if MKC_formac_PageUp != MKC_PageUp
|
||||
case MKC_PageUp:
|
||||
key = MKC_formac_PageUp;
|
||||
break;
|
||||
#endif
|
||||
#if MKC_formac_PageDown != MKC_PageDown
|
||||
case MKC_PageDown:
|
||||
key = MKC_formac_PageDown;
|
||||
break;
|
||||
#endif
|
||||
#if MKC_formac_Home != MKC_Home
|
||||
case MKC_Home:
|
||||
key = MKC_formac_Home;
|
||||
break;
|
||||
#endif
|
||||
#if MKC_formac_End != MKC_End
|
||||
case MKC_End:
|
||||
key = MKC_formac_End;
|
||||
break;
|
||||
#endif
|
||||
#if MKC_formac_Help != MKC_Help
|
||||
case MKC_Help:
|
||||
key = MKC_formac_Help;
|
||||
break;
|
||||
#endif
|
||||
#if MKC_formac_ForwardDel != MKC_ForwardDel
|
||||
case MKC_ForwardDel:
|
||||
key = MKC_formac_ForwardDel;
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return key;
|
||||
}
|
||||
#endif /* WantKeyboard_RemapMac */
|
||||
|
||||
LOCALPROC Keyboard_UpdateKeyMap2(ui3r key, blnr down)
|
||||
{
|
||||
#if UseControlKeys
|
||||
if (MKC_Control == key) {
|
||||
if (MKC_CM == key) {
|
||||
Keyboard_UpdateControlKey(down);
|
||||
} else
|
||||
#endif
|
||||
@ -1073,3 +1297,99 @@ LOCALPROC DisconnectKeyCodes2(void)
|
||||
Keyboard_UpdateControlKey(falseblnr);
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifndef CheckRomCheckSum
|
||||
#define CheckRomCheckSum 1
|
||||
#endif
|
||||
|
||||
#if CheckRomCheckSum
|
||||
LOCALFUNC ui5r Calc_Checksum(void)
|
||||
{
|
||||
long int i;
|
||||
ui5b CheckSum = 0;
|
||||
ui3p p = 4 + ROM;
|
||||
|
||||
for (i = (kCheckSumRom_Size - 4) >> 1; --i >= 0; ) {
|
||||
CheckSum += do_get_mem_word(p);
|
||||
p += 2;
|
||||
}
|
||||
|
||||
return CheckSum;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if CheckRomCheckSum && RomStartCheckSum
|
||||
LOCALPROC WarnMsgCorruptedROM(void)
|
||||
{
|
||||
MacMsgOverride(kStrCorruptedROMTitle, kStrCorruptedROMMessage);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if CheckRomCheckSum
|
||||
LOCALPROC WarnMsgUnsupportedROM(void)
|
||||
{
|
||||
MacMsgOverride(kStrUnsupportedROMTitle,
|
||||
kStrUnsupportedROMMessage);
|
||||
}
|
||||
#endif
|
||||
|
||||
LOCALFUNC tMacErr ROM_IsValid(void)
|
||||
{
|
||||
#if CheckRomCheckSum
|
||||
ui5r CheckSum = Calc_Checksum();
|
||||
|
||||
#if RomStartCheckSum
|
||||
if (CheckSum != do_get_mem_long(ROM)) {
|
||||
WarnMsgCorruptedROM();
|
||||
return mnvm_miscErr;
|
||||
} else
|
||||
#endif
|
||||
#ifdef kRomCheckSum1
|
||||
if (CheckSum == kRomCheckSum1) {
|
||||
} else
|
||||
#endif
|
||||
#ifdef kRomCheckSum2
|
||||
if (CheckSum == kRomCheckSum2) {
|
||||
} else
|
||||
#endif
|
||||
#ifdef kRomCheckSum3
|
||||
if (CheckSum == kRomCheckSum3) {
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
WarnMsgUnsupportedROM();
|
||||
return mnvm_miscErr;
|
||||
}
|
||||
/*
|
||||
Even if ROM is corrupt or unsupported, go ahead and
|
||||
try to run anyway. It shouldn't do any harm.
|
||||
[update: no, don't]
|
||||
*/
|
||||
|
||||
#endif /* CheckRomCheckSum */
|
||||
|
||||
ROM_loaded = trueblnr;
|
||||
SpeedStopped = falseblnr;
|
||||
|
||||
return mnvm_noErr;
|
||||
}
|
||||
|
||||
LOCALFUNC blnr WaitForRom(void)
|
||||
{
|
||||
if (! ROM_loaded) {
|
||||
NoRomMsgDisplayOn();
|
||||
|
||||
SpeedStopped = trueblnr;
|
||||
do {
|
||||
WaitForNextTick();
|
||||
|
||||
if (ForceMacOff) {
|
||||
return falseblnr;
|
||||
}
|
||||
} while (SpeedStopped);
|
||||
|
||||
NoRomMsgDisplayOff();
|
||||
}
|
||||
|
||||
return trueblnr;
|
||||
}
|
||||
|
0
Mini vMac/mnvm_core/DATE2SEC.h
Executable file → Normal file
0
Mini vMac/mnvm_core/DATE2SEC.h
Executable file → Normal file
0
Mini vMac/mnvm_core/DISAM68K.c
Executable file → Normal file
0
Mini vMac/mnvm_core/DISAM68K.c
Executable file → Normal file
0
Mini vMac/mnvm_core/DISAM68K.h
Executable file → Normal file
0
Mini vMac/mnvm_core/DISAM68K.h
Executable file → Normal file
0
Mini vMac/mnvm_core/ENDIANAC.h
Executable file → Normal file
0
Mini vMac/mnvm_core/ENDIANAC.h
Executable file → Normal file
0
Mini vMac/mnvm_core/FPCPEMDV.h
Executable file → Normal file
0
Mini vMac/mnvm_core/FPCPEMDV.h
Executable file → Normal file
0
Mini vMac/mnvm_core/FPMATHEM.h
Executable file → Normal file
0
Mini vMac/mnvm_core/FPMATHEM.h
Executable file → Normal file
4
Mini vMac/mnvm_core/GLOBGLUE.c
Executable file → Normal file
4
Mini vMac/mnvm_core/GLOBGLUE.c
Executable file → Normal file
@ -201,12 +201,15 @@ GLOBALPROC dbglog_WriteSetBool(char *s, blnr v)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if WantAbnormalReports
|
||||
LOCALVAR blnr GotOneAbnormal = falseblnr;
|
||||
#endif
|
||||
|
||||
#ifndef ReportAbnormalInterrupt
|
||||
#define ReportAbnormalInterrupt 0
|
||||
#endif
|
||||
|
||||
#if WantAbnormalReports
|
||||
GLOBALPROC DoReportAbnormalID(ui4r id
|
||||
#if dbglog_HAVE
|
||||
, char *s
|
||||
@ -228,6 +231,7 @@ GLOBALPROC DoReportAbnormalID(ui4r id
|
||||
GotOneAbnormal = trueblnr;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/* map of address space */
|
||||
|
||||
|
4
Mini vMac/mnvm_core/GLOBGLUE.h
Executable file → Normal file
4
Mini vMac/mnvm_core/GLOBGLUE.h
Executable file → Normal file
@ -133,6 +133,9 @@ EXPORTPROC dbglog_AddrAccess(char *s,
|
||||
EXPORTPROC dbglog_Access(char *s, ui5r Data, blnr WriteMem);
|
||||
#endif
|
||||
|
||||
#if ! WantAbnormalReports
|
||||
#define ReportAbnormalID(id, s)
|
||||
#else
|
||||
#if dbglog_HAVE
|
||||
#define ReportAbnormalID DoReportAbnormalID
|
||||
#else
|
||||
@ -143,6 +146,7 @@ EXPORTPROC DoReportAbnormalID(ui4r id
|
||||
, char *s
|
||||
#endif
|
||||
);
|
||||
#endif /* WantAbnormalReports */
|
||||
|
||||
EXPORTPROC VIAorSCCinterruptChngNtfy(void);
|
||||
|
||||
|
0
Mini vMac/mnvm_core/HPMCHACK.h
Executable file → Normal file
0
Mini vMac/mnvm_core/HPMCHACK.h
Executable file → Normal file
394
Mini vMac/mnvm_core/INTLCHAR.h
Executable file → Normal file
394
Mini vMac/mnvm_core/INTLCHAR.h
Executable file → Normal file
@ -22,7 +22,7 @@
|
||||
/*
|
||||
Data in commments:
|
||||
Mini vMac Cell name
|
||||
Mac Roman
|
||||
Mac Roman (Octal)
|
||||
windows-1252 code page
|
||||
Unicode
|
||||
plain ascii
|
||||
@ -222,7 +222,7 @@ LOCALVAR const ui3b CellData[] = {
|
||||
/* kCellAmpersand 046 0x26 0x0026 '&' '&' amp */
|
||||
0x00, 0x00, 0x00, 0x30, 0x48, 0x48, 0x50, 0x20,
|
||||
0x50, 0x4A, 0x44, 0x3A, 0x00, 0x00, 0x00, 0x00,
|
||||
/* kCellApostrophe 047 0x27 0x0027 '\047' ';la' apos */
|
||||
/* kCellApostrophe 047 0x27 0x0027 '\047' ';la' #39 (apos) */
|
||||
0x00, 0x00, 0x00, 0x08, 0x08, 0x08, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
/* kCellLeftParen 050 0x28 0x0028 '(' '(' ( */
|
||||
@ -246,13 +246,13 @@ LOCALVAR const ui3b CellData[] = {
|
||||
/* kCellColon 072 0x3A 0x003A ':' ':' : */
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08,
|
||||
0x00, 0x00, 0x08, 0x08, 0x00, 0x00, 0x00, 0x00,
|
||||
/* kCellSemicolon 073 0x3B 0x003B ';' ';ls' #59 */
|
||||
/* kCellSemicolon 073 0x3B 0x003B ';' ';ls' #59 (semi) */
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08,
|
||||
0x00, 0x00, 0x08, 0x08, 0x08, 0x10, 0x00, 0x00,
|
||||
/* kCellQuestion 077 0x3F 0x003F '?' '?' ? */
|
||||
0x00, 0x00, 0x00, 0x38, 0x44, 0x04, 0x08, 0x10,
|
||||
0x10, 0x00, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00,
|
||||
/* kCellEllipsis 311 0x85 0x2026 '_' ';ll' #8230 */
|
||||
/* kCellEllipsis 311 0x85 0x2026 '_' ';ll' #8230 (mldr) */
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, 0x00,
|
||||
/* kCellUnderscore 137 0x5F 0x005F '_' '_' _ */
|
||||
@ -468,54 +468,96 @@ LOCALVAR const ui3b CellData[] = {
|
||||
0x00, 0x00, 0x00, 0x1C, 0x22, 0x42, 0x44, 0x44,
|
||||
0x42, 0x42, 0x42, 0x5C, 0x40, 0x00, 0x00, 0x00,
|
||||
|
||||
/* kCellUpACedille 260 ? 0x0104 'A' ';dA' #260 */
|
||||
/* kCellUpACedille 260 ? 0x0104 'A' ';dA' #260 (Aogon) */
|
||||
0x00, 0x00, 0x00, 0x3C, 0x42, 0x42, 0x42, 0x7E,
|
||||
0x42, 0x42, 0x42, 0x42, 0x04, 0x04, 0x02, 0x00,
|
||||
/* kCellLoACedille 261 ? 0x0105 'a' ';da' #261 */
|
||||
/* kCellLoACedille 261 ? 0x0105 'a' ';da' #261 (aogon) */
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x42,
|
||||
0x42, 0x42, 0x46, 0x3A, 0x04, 0x04, 0x02, 0x00,
|
||||
/* kCellUpCAcute 262 ? 0x0106 'C' ';eC' #262 */
|
||||
/* kCellUpCAcute 262 ? 0x0106 'C' ';eC' #262 (Cacute) */
|
||||
0x08, 0x10, 0x00, 0x3C, 0x42, 0x42, 0x40, 0x40,
|
||||
0x40, 0x40, 0x42, 0x3C, 0x00, 0x00, 0x00, 0x00,
|
||||
/* kCellLoCAcute 263 ? 0x0107 'c' ';ec' #263 */
|
||||
/* kCellLoCAcute 263 ? 0x0107 'c' ';ec' #263 (cacute) */
|
||||
0x00, 0x00, 0x00, 0x08, 0x10, 0x00, 0x3C, 0x42,
|
||||
0x40, 0x40, 0x42, 0x3C, 0x00, 0x00, 0x00, 0x00,
|
||||
/* kCellUpECedille 264 ? 0x0118 'E' ';dE' #280 */
|
||||
/* kCellUpECedille 264 ? 0x0118 'E' ';dE' #280 (Eogon) */
|
||||
0x00, 0x00, 0x00, 0x7E, 0x40, 0x40, 0x40, 0x7C,
|
||||
0x40, 0x40, 0x40, 0x7E, 0x04, 0x04, 0x02, 0x00,
|
||||
/* kCellLoECedille 265 ? 0x0119 'e' ';de' #281 */
|
||||
/* kCellLoECedille 265 ? 0x0119 'e' ';de' #281 (eogon) */
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x42,
|
||||
0x7E, 0x40, 0x42, 0x3C, 0x08, 0x08, 0x04, 0x00,
|
||||
/* kCellUpLBar 266 ? 0x0141 'L' ';dL' #321 */
|
||||
/* kCellUpLBar 266 ? 0x0141 'L' ';dL' #321 (Lstrok) */
|
||||
0x00, 0x00, 0x00, 0x40, 0x40, 0x40, 0x60, 0x40,
|
||||
0xC0, 0x40, 0x40, 0x7E, 0x00, 0x00, 0x00, 0x00,
|
||||
/* kCellLoLBar 267 ? 0x0142 'l' ';dl' #322 */
|
||||
/* kCellLoLBar 267 ? 0x0142 'l' ';dl' #322 (lstrok) */
|
||||
0x00, 0x00, 0x00, 0x08, 0x08, 0x08, 0x0C, 0x08,
|
||||
0x18, 0x08, 0x08, 0x08, 0x00, 0x00, 0x00, 0x00,
|
||||
/* kCellUpNAcute 270 ? 0x0143 'N' ';eN' #323 */
|
||||
/* kCellUpNAcute 270 ? 0x0143 'N' ';eN' #323 (Nacute) */
|
||||
0x08, 0x10, 0x00, 0x42, 0x42, 0x62, 0x52, 0x4A,
|
||||
0x46, 0x42, 0x42, 0x42, 0x00, 0x00, 0x00, 0x00,
|
||||
/* kCellLoNAcute 271 ? 0x0144 'n' ';en' #324 */
|
||||
/* kCellLoNAcute 271 ? 0x0144 'n' ';en' #324 (nacute) */
|
||||
0x00, 0x00, 0x00, 0x08, 0x10, 0x00, 0x7C, 0x42,
|
||||
0x42, 0x42, 0x42, 0x42, 0x00, 0x00, 0x00, 0x00,
|
||||
/* kCellUpSAcute 272 ? 0x015A 'S' ';eS' #346 */
|
||||
/* kCellUpSAcute 272 ? 0x015A 'S' ';eS' #346 (Sacute) */
|
||||
0x08, 0x10, 0x00, 0x3C, 0x42, 0x40, 0x40, 0x3C,
|
||||
0x02, 0x02, 0x42, 0x3C, 0x00, 0x00, 0x00, 0x00,
|
||||
/* kCellLoSAcute 273 ? 0x015B 's' ';es' #347 */
|
||||
/* kCellLoSAcute 273 ? 0x015B 's' ';es' #347 (sacute) */
|
||||
0x00, 0x00, 0x00, 0x08, 0x10, 0x00, 0x3C, 0x42,
|
||||
0x3C, 0x02, 0x42, 0x3C, 0x00, 0x00, 0x00, 0x00,
|
||||
/* kCellUpZAcute 274 ? 0x0179 'Z' ';eZ' #377 */
|
||||
/* kCellUpZAcute 274 ? 0x0179 'Z' ';eZ' #377 (Zacute) */
|
||||
0x08, 0x10, 0x00, 0x7E, 0x02, 0x04, 0x08, 0x10,
|
||||
0x20, 0x40, 0x40, 0x7E, 0x00, 0x00, 0x00, 0x00,
|
||||
/* kCellLoZAcute 275 ? 0x017A 'z' ';ez' #378 */
|
||||
/* kCellLoZAcute 275 ? 0x017A 'z' ';ez' #378 (zacute) */
|
||||
0x00, 0x00, 0x00, 0x08, 0x10, 0x00, 0x7E, 0x04,
|
||||
0x08, 0x10, 0x20, 0x7E, 0x00, 0x00, 0x00, 0x00,
|
||||
/* kCellUpZDot 276 ? 0x017B 'Z' ';dZ' #379 */
|
||||
/* kCellUpZDot 276 ? 0x017B 'Z' ';dZ' #379 (Zdot) */
|
||||
0x10, 0x00, 0x00, 0x7E, 0x02, 0x04, 0x08, 0x10,
|
||||
0x20, 0x40, 0x40, 0x7E, 0x00, 0x00, 0x00, 0x00,
|
||||
/* kCellLoZDot 277 ? 0x017C 'z' ';dz' #380 */
|
||||
/* kCellLoZDot 277 ? 0x017C 'z' ';dz' #380 (zdot) */
|
||||
0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x7E, 0x04,
|
||||
0x08, 0x10, 0x20, 0x7E, 0x00, 0x00, 0x00, 0x00,
|
||||
/* kCellMidDot 341 0xB7 0x00B7 '.' ';l.' middot */
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08,
|
||||
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
/* kCellUpCCaron 077 ? 0x010C 'C' ';vC' #268 (Ccaron) */
|
||||
0x14, 0x08, 0x00, 0x3C, 0x42, 0x42, 0x40, 0x40,
|
||||
0x40, 0x40, 0x42, 0x3C, 0x00, 0x00, 0x00, 0x00,
|
||||
/* kCellLoCCaron 077 ? 0x010D 'c' ';vc' #269 (ccaron) */
|
||||
0x00, 0x00, 0x00, 0x14, 0x08, 0x00, 0x3C, 0x42,
|
||||
0x40, 0x40, 0x42, 0x3C, 0x00, 0x00, 0x00, 0x00,
|
||||
/* kCellLoECaron 077 ? 0x011B 'e' ';ve' #283 (ecaron) */
|
||||
0x00, 0x00, 0x00, 0x14, 0x08, 0x00, 0x3C, 0x42,
|
||||
0x7E, 0x40, 0x42, 0x3C, 0x00, 0x00, 0x00, 0x00,
|
||||
/* kCellLoRCaron 077 ? 0x0159 'r' ';vr' #345 (rcaron) */
|
||||
0x00, 0x00, 0x00, 0x14, 0x08, 0x00, 0x5C, 0x62,
|
||||
0x42, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00,
|
||||
/* kCellLoSCaron 077 0x9A 0x0161 's' ';vs' #353 (scaron) */
|
||||
0x00, 0x00, 0x00, 0x14, 0x08, 0x00, 0x3C, 0x42,
|
||||
0x3C, 0x02, 0x42, 0x3C, 0x00, 0x00, 0x00, 0x00,
|
||||
/* kCellLoTCaron 077 ? 0x0165 't' ';vt' #357 (tcaron) */
|
||||
0x00, 0x14, 0x08, 0x00, 0x20, 0x20, 0x78, 0x20,
|
||||
0x20, 0x20, 0x20, 0x1C, 0x00, 0x00, 0x00, 0x00,
|
||||
/* kCellLoZCaron 077 0x9E 0x017E 'z' ';vz' #382 (zcaron) */
|
||||
0x00, 0x00, 0x00, 0x14, 0x08, 0x00, 0x7E, 0x04,
|
||||
0x08, 0x10, 0x20, 0x7E, 0x00, 0x00, 0x00, 0x00,
|
||||
/* kCellUpYAcute 077 0xDD 0x00DD 'Y' ';eY' Yacute */
|
||||
0x08, 0x10, 0x00, 0x22, 0x22, 0x22, 0x22, 0x14,
|
||||
0x08, 0x08, 0x08, 0x08, 0x00, 0x00, 0x00, 0x00,
|
||||
/* kCellLoYAcute 077 0xFD 0x00FD 'y' ';ey' yacute */
|
||||
0x00, 0x00, 0x00, 0x08, 0x10, 0x00, 0x42, 0x42,
|
||||
0x42, 0x42, 0x42, 0x3E, 0x02, 0x42, 0x3C, 0x00,
|
||||
/* kCellLoUDblac 077 ? 0x0171 'u' ';Eu' #369 (udblac) */
|
||||
0x00, 0x00, 0x00, 0x12, 0x24, 0x00, 0x42, 0x42,
|
||||
0x42, 0x42, 0x46, 0x3A, 0x00, 0x00, 0x00, 0x00,
|
||||
/* kCellLoURing 077 ? 0x016F 'u' ';ru' #367 (uring) */
|
||||
0x00, 0x00, 0x18, 0x24, 0x24, 0x18, 0x42, 0x42,
|
||||
0x42, 0x42, 0x46, 0x3A, 0x00, 0x00, 0x00, 0x00,
|
||||
/* kCellUpDStroke 077 ? 0x0110 'D' ';dD' #272 (Dstrok) */
|
||||
0x00, 0x00, 0x00, 0x7C, 0x42, 0x42, 0x42, 0xF2,
|
||||
0x42, 0x42, 0x42, 0x7C, 0x00, 0x00, 0x00, 0x00,
|
||||
/* kCellLoDStroke 077 ? 0x0111 'd' ';dd' #273 (dstrok) */
|
||||
0x00, 0x00, 0x00, 0x02, 0x0F, 0x02, 0x3E, 0x42,
|
||||
0x42, 0x42, 0x42, 0x3E, 0x00, 0x00, 0x00, 0x00,
|
||||
#endif
|
||||
|
||||
/* kCellUpperLeft */
|
||||
@ -797,6 +839,20 @@ enum {
|
||||
kCellLoZAcute,
|
||||
kCellUpZDot,
|
||||
kCellLoZDot,
|
||||
kCellMidDot,
|
||||
kCellUpCCaron,
|
||||
kCellLoCCaron,
|
||||
kCellLoECaron,
|
||||
kCellLoRCaron,
|
||||
kCellLoSCaron,
|
||||
kCellLoTCaron,
|
||||
kCellLoZCaron,
|
||||
kCellUpYAcute,
|
||||
kCellLoYAcute,
|
||||
kCellLoUDblac,
|
||||
kCellLoURing,
|
||||
kCellUpDStroke,
|
||||
kCellLoDStroke,
|
||||
#endif
|
||||
|
||||
kCellUpperLeft,
|
||||
@ -848,7 +904,7 @@ enum {
|
||||
#endif
|
||||
|
||||
#ifndef NeedCell2MacAsciiMap
|
||||
#if UseActvCode || EnableDemoMsg
|
||||
#if 1 /* UseActvCode || EnableDemoMsg */
|
||||
#define NeedCell2MacAsciiMap 1
|
||||
#else
|
||||
#define NeedCell2MacAsciiMap 0
|
||||
@ -1026,6 +1082,20 @@ LOCALVAR const char Cell2MacAsciiMap[] = {
|
||||
'\275', /* kCellLoZAcute */
|
||||
'\276', /* kCellUpZDot */
|
||||
'\277', /* kCellLoZDot */
|
||||
'\341', /* kCellMidDot */
|
||||
'\103', /* kCellUpCCaron */
|
||||
'\143', /* kCellLoCCaron */
|
||||
'\145', /* kCellLoECaron */
|
||||
'\162', /* kCellLoRCaron */
|
||||
'\163', /* kCellLoSCaron */
|
||||
'\164', /* kCellLoTCaron */
|
||||
'\172', /* kCellLoZCaron */
|
||||
'\131', /* kCellUpYAcute */
|
||||
'\171', /* kCellLoYAcute */
|
||||
'\165', /* kCellLoUDblac */
|
||||
'\165', /* kCellLoURing */
|
||||
'\104', /* kCellUpDStroke */
|
||||
'\144', /* kCellLoDStroke */
|
||||
#endif
|
||||
|
||||
'\0' /* just so last above line can end in ',' */
|
||||
@ -1207,6 +1277,20 @@ LOCALVAR const ui3b Cell2WinAsciiMap[] = {
|
||||
0x7A, /* kCellLoZAcute */
|
||||
0x5A, /* kCellUpZDot */
|
||||
0x7A, /* kCellLoZDot */
|
||||
0xB7, /* kCellMidDot */
|
||||
0x43, /* kCellUpCCaron */
|
||||
0x63, /* kCellLoCCaron */
|
||||
0x65, /* kCellLoECaron */
|
||||
0x61, /* kCellLoRCaron */
|
||||
0x9A, /* kCellLoSCaron */
|
||||
0x74, /* kCellLoTCaron */
|
||||
0x9E, /* kCellLoZCaron */
|
||||
0xDD, /* kCellUpYAcute */
|
||||
0xFD, /* kCellLoYAcute */
|
||||
0x75, /* kCellLoUDblac */
|
||||
0x75, /* kCellLoURing */
|
||||
0x44, /* kCellUpDStroke */
|
||||
0x64, /* kCellLoDStroke */
|
||||
#endif
|
||||
|
||||
'\0' /* just so last above line can end in ',' */
|
||||
@ -1388,6 +1472,20 @@ LOCALVAR const char Cell2PlainAsciiMap[] = {
|
||||
'z', /* kCellLoZAcute */
|
||||
'Z', /* kCellUpZDot */
|
||||
'z', /* kCellLoZDot */
|
||||
'.', /* kCellMidDot */
|
||||
'C', /* kCellUpCCaron */
|
||||
'c', /* kCellLoCCaron */
|
||||
'e', /* kCellLoECaron */
|
||||
'r', /* kCellLoRCaron */
|
||||
's', /* kCellLoSCaron */
|
||||
't', /* kCellLoTCaron */
|
||||
'z', /* kCellLoZCaron */
|
||||
'Y', /* kCellUpYAcute */
|
||||
'y', /* kCellLoYAcute */
|
||||
'u', /* kCellLoUDblac */
|
||||
'u', /* kCellLoURing */
|
||||
'D', /* kCellUpDStroke */
|
||||
'd', /* kCellLoDStroke */
|
||||
#endif
|
||||
|
||||
'\0' /* just so last above line can end in ',' */
|
||||
@ -1569,6 +1667,20 @@ LOCALVAR const ui4b Cell2UnicodeMap[] = {
|
||||
0x017A, /* kCellLoZAcute */
|
||||
0x017B, /* kCellUpZDot */
|
||||
0x017C, /* kCellLoZDot */
|
||||
0x00B7, /* kCellMidDot */
|
||||
0x010C, /* kCellUpCCaron */
|
||||
0x010D, /* kCellLoCCaron */
|
||||
0x011B, /* kCellLoECaron */
|
||||
0x0159, /* kCellLoRCaron */
|
||||
0x0161, /* kCellLoSCaron */
|
||||
0x0165, /* kCellLoTCaron */
|
||||
0x017E, /* kCellLoZCaron */
|
||||
0x00DD, /* kCellUpYAcute */
|
||||
0x00FD, /* kCellLoYAcute */
|
||||
0x0171, /* kCellLoUDblac */
|
||||
0x016F, /* kCellLoURing */
|
||||
0x0110, /* kCellUpDStroke */
|
||||
0x0111, /* kCellLoDStroke */
|
||||
#endif
|
||||
|
||||
'\0' /* just so last above line can end in ',' */
|
||||
@ -1591,10 +1703,30 @@ LOCALVAR blnr WantMagnify = (WantInitMagnify != 0);
|
||||
LOCALVAR blnr RequestInsertDisk = falseblnr;
|
||||
#endif
|
||||
|
||||
#ifndef NeedRequestIthDisk
|
||||
#define NeedRequestIthDisk 0
|
||||
#endif
|
||||
|
||||
#if NeedRequestIthDisk
|
||||
LOCALVAR ui3r RequestIthDisk = 0;
|
||||
#endif
|
||||
|
||||
#if UseControlKeys
|
||||
LOCALVAR blnr ControlKeyPressed = falseblnr;
|
||||
#endif
|
||||
|
||||
#ifndef kStrCntrlKyName
|
||||
#define kStrCntrlKyName "control"
|
||||
#endif
|
||||
|
||||
#ifndef kControlModeKey
|
||||
#define kControlModeKey kStrCntrlKyName
|
||||
#endif
|
||||
|
||||
#ifndef kUnMappedKey
|
||||
#define kUnMappedKey kStrCntrlKyName
|
||||
#endif
|
||||
|
||||
LOCALFUNC char * GetSubstitutionStr(char x)
|
||||
{
|
||||
char *s;
|
||||
@ -1615,6 +1747,12 @@ LOCALFUNC char * GetSubstitutionStr(char x)
|
||||
case 'r':
|
||||
s = RomFileName;
|
||||
break;
|
||||
case 'c':
|
||||
s = kControlModeKey;
|
||||
break;
|
||||
case 'm':
|
||||
s = kUnMappedKey;
|
||||
break;
|
||||
#if UseControlKeys
|
||||
case 'k':
|
||||
if (ControlKeyPressed) {
|
||||
@ -1697,47 +1835,108 @@ LOCALFUNC char * GetSubstitutionStr(char x)
|
||||
return s;
|
||||
}
|
||||
|
||||
#define ClStrMaxLength 512
|
||||
LOCALFUNC int ClStrSizeSubstCStr(char *s)
|
||||
{
|
||||
/* must match ClStrAppendSubstCStr ! */
|
||||
|
||||
char *p = s;
|
||||
char c;
|
||||
int L = 0;
|
||||
|
||||
while (0 != (c = *p++)) {
|
||||
if ('^' == c) {
|
||||
if (0 == (c = *p++)) {
|
||||
goto l_exit; /* oops, unexpected end of string, abort */
|
||||
} else if ('^' == c) {
|
||||
++L;
|
||||
} else {
|
||||
L += ClStrSizeSubstCStr(GetSubstitutionStr(c));
|
||||
}
|
||||
} else if (';' == c) {
|
||||
if (0 == (c = *p++)) {
|
||||
goto l_exit; /* oops, unexpected end of string, abort */
|
||||
}
|
||||
|
||||
switch (c) {
|
||||
case 'l':
|
||||
#if NeedIntlChars
|
||||
case '`':
|
||||
case 'd':
|
||||
case 'e':
|
||||
case 'i':
|
||||
case 'n':
|
||||
case 'u':
|
||||
case 'v':
|
||||
case 'E':
|
||||
case 'r':
|
||||
#endif
|
||||
if (0 == (c = *p++)) {
|
||||
/* oops, unexpected end of string, abort */
|
||||
goto l_exit;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
++L;
|
||||
} else {
|
||||
++L;
|
||||
}
|
||||
}
|
||||
|
||||
l_exit:
|
||||
return L;
|
||||
}
|
||||
|
||||
LOCALPROC ClStrAppendChar(int *L0, ui3b *r, ui3b c)
|
||||
{
|
||||
unsigned short L = *L0;
|
||||
int L = *L0;
|
||||
|
||||
if (ClStrMaxLength != L) {
|
||||
r[L] = c;
|
||||
L++;
|
||||
*L0 = L;
|
||||
}
|
||||
r[L] = c;
|
||||
L++;
|
||||
*L0 = L;
|
||||
}
|
||||
|
||||
LOCALPROC ClStrAppendSubstCStr(int *L, ui3b *r, char *s)
|
||||
{
|
||||
/* must match ClStrSizeSubstCStr ! */
|
||||
|
||||
char *p = s;
|
||||
char c;
|
||||
ui3b x;
|
||||
|
||||
while ((c = *p++) != 0) {
|
||||
if (c == '^') {
|
||||
if ((c = *p++) == 0) {
|
||||
while (0 != (c = *p++)) {
|
||||
if ('^' == c) {
|
||||
if (0 == (c = *p++)) {
|
||||
return; /* oops, unexpected end of string, abort */
|
||||
} else if (c == '^') {
|
||||
} else if ('^' == c) {
|
||||
ClStrAppendChar(L, r, c);
|
||||
} else {
|
||||
ClStrAppendSubstCStr(L, r, GetSubstitutionStr(c));
|
||||
}
|
||||
} else if (c == ';') {
|
||||
switch (*p++) {
|
||||
} else if (';' == c) {
|
||||
if (0 == (c = *p++)) {
|
||||
return; /* oops, unexpected end of string, abort */
|
||||
}
|
||||
|
||||
switch (c) {
|
||||
case 'g': x = kCellCopyright; break;
|
||||
case 'l':
|
||||
switch (*p++) {
|
||||
if (0 == (c = *p++)) {
|
||||
/* oops, unexpected end of string, abort */
|
||||
return;
|
||||
}
|
||||
|
||||
switch (c) {
|
||||
case 'a': x = kCellApostrophe; break;
|
||||
case 'l': x = kCellEllipsis; break;
|
||||
case 's': x = kCellSemicolon; break;
|
||||
#if NeedIntlChars
|
||||
case 'E': x = kCellUpAE; break;
|
||||
case 'e': x = kCellLoAE; break;
|
||||
case '.': x = kCellMidDot; break;
|
||||
#endif
|
||||
default: return; break;
|
||||
default: x = kCellQuestion; break;
|
||||
}
|
||||
break;
|
||||
case '[': x = kCellLeftDQuote; break;
|
||||
@ -1751,7 +1950,12 @@ LOCALPROC ClStrAppendSubstCStr(int *L, ui3b *r, char *s)
|
||||
case 'O': x = kCellUpOStroke; break;
|
||||
case 'Q': x = kCellUpLigatureOE; break;
|
||||
case '`':
|
||||
switch (*p++) {
|
||||
if (0 == (c = *p++)) {
|
||||
/* oops, unexpected end of string, abort */
|
||||
return;
|
||||
}
|
||||
|
||||
switch (c) {
|
||||
case 'A': x = kCellUpAGrave; break;
|
||||
case 'E': x = kCellUpEGrave; break;
|
||||
case 'I': x = kCellUpIGrave; break;
|
||||
@ -1762,26 +1966,38 @@ LOCALPROC ClStrAppendSubstCStr(int *L, ui3b *r, char *s)
|
||||
case 'i': x = kCellLoIGrave; break;
|
||||
case 'o': x = kCellLoOGrave; break;
|
||||
case 'u': x = kCellLoUGrave; break;
|
||||
default: return; break;
|
||||
default: x = kCellQuestion; break;
|
||||
}
|
||||
break;
|
||||
case 'a': x = kCellLoARing; break;
|
||||
case 'c': x = kCellLoCCedilla; break;
|
||||
case 'd':
|
||||
switch (*p++) {
|
||||
if (0 == (c = *p++)) {
|
||||
/* oops, unexpected end of string, abort */
|
||||
return;
|
||||
}
|
||||
|
||||
switch (c) {
|
||||
case 'A': x = kCellUpACedille; break;
|
||||
case 'a': x = kCellLoACedille; break;
|
||||
case 'D': x = kCellUpDStroke; break;
|
||||
case 'd': x = kCellLoDStroke; break;
|
||||
case 'E': x = kCellUpECedille; break;
|
||||
case 'e': x = kCellLoECedille; break;
|
||||
case 'L': x = kCellUpLBar; break;
|
||||
case 'l': x = kCellLoLBar; break;
|
||||
case 'Z': x = kCellUpZDot; break;
|
||||
case 'z': x = kCellLoZDot; break;
|
||||
default: return; break;
|
||||
default: x = kCellQuestion; break;
|
||||
}
|
||||
break;
|
||||
case 'e':
|
||||
switch (*p++) {
|
||||
if (0 == (c = *p++)) {
|
||||
/* oops, unexpected end of string, abort */
|
||||
return;
|
||||
}
|
||||
|
||||
switch (c) {
|
||||
case 'A': x = kCellUpAAcute; break;
|
||||
case 'E': x = kCellUpEAcute; break;
|
||||
case 'I': x = kCellUpIAcute; break;
|
||||
@ -1801,12 +2017,19 @@ LOCALPROC ClStrAppendSubstCStr(int *L, ui3b *r, char *s)
|
||||
case 's': x = kCellLoSAcute; break;
|
||||
case 'Z': x = kCellUpZAcute; break;
|
||||
case 'z': x = kCellLoZAcute; break;
|
||||
case 'Y': x = kCellUpYAcute; break;
|
||||
case 'y': x = kCellLoYAcute; break;
|
||||
|
||||
default: return; break;
|
||||
default: x = kCellQuestion; break;
|
||||
}
|
||||
break;
|
||||
case 'i':
|
||||
switch (*p++) {
|
||||
if (0 == (c = *p++)) {
|
||||
/* oops, unexpected end of string, abort */
|
||||
return;
|
||||
}
|
||||
|
||||
switch (c) {
|
||||
case 'A': x = kCellUpACircumflex; break;
|
||||
case 'E': x = kCellUpECircumflex; break;
|
||||
case 'I': x = kCellUpICircumflex; break;
|
||||
@ -1817,25 +2040,35 @@ LOCALPROC ClStrAppendSubstCStr(int *L, ui3b *r, char *s)
|
||||
case 'i': x = kCellLoICircumflex; break;
|
||||
case 'o': x = kCellLoOCircumflex; break;
|
||||
case 'u': x = kCellLoUCircumflex; break;
|
||||
default: return; break;
|
||||
default: x = kCellQuestion; break;
|
||||
}
|
||||
break;
|
||||
case 'n':
|
||||
switch (*p++) {
|
||||
if (0 == (c = *p++)) {
|
||||
/* oops, unexpected end of string, abort */
|
||||
return;
|
||||
}
|
||||
|
||||
switch (c) {
|
||||
case 'A': x = kCellUpATilde; break;
|
||||
case 'N': x = kCellUpNTilde; break;
|
||||
case 'O': x = kCellUpOTilde; break;
|
||||
case 'a': x = kCellLoATilde; break;
|
||||
case 'n': x = kCellLoNTilde; break;
|
||||
case 'o': x = kCellLoOTilde; break;
|
||||
default: return; break;
|
||||
default: x = kCellQuestion; break;
|
||||
}
|
||||
break;
|
||||
case 'o': x = kCellLoOStroke; break;
|
||||
case 'q': x = kCellLoLigatureOE; break;
|
||||
case 's': x = kCellSharpS; break;
|
||||
case 'u':
|
||||
switch (*p++) {
|
||||
if (0 == (c = *p++)) {
|
||||
/* oops, unexpected end of string, abort */
|
||||
return;
|
||||
}
|
||||
|
||||
switch (c) {
|
||||
case 'A': x = kCellUpADiaeresis; break;
|
||||
case 'E': x = kCellUpEDiaeresis; break;
|
||||
case 'I': x = kCellUpIDiaeresis; break;
|
||||
@ -1848,17 +2081,50 @@ LOCALPROC ClStrAppendSubstCStr(int *L, ui3b *r, char *s)
|
||||
case 'o': x = kCellLoODiaeresis; break;
|
||||
case 'u': x = kCellLoUDiaeresis; break;
|
||||
case 'y': x = kCellLoYDiaeresis; break;
|
||||
default: return; break;
|
||||
default: x = kCellQuestion; break;
|
||||
}
|
||||
break;
|
||||
case 'v':
|
||||
if (0 == (c = *p++)) {
|
||||
/* oops, unexpected end of string, abort */
|
||||
return;
|
||||
}
|
||||
|
||||
switch (c) {
|
||||
case 'C': x = kCellUpCCaron; break;
|
||||
case 'c': x = kCellLoCCaron; break;
|
||||
case 'e': x = kCellLoECaron; break;
|
||||
case 'r': x = kCellLoRCaron; break;
|
||||
case 's': x = kCellLoSCaron; break;
|
||||
case 't': x = kCellLoTCaron; break;
|
||||
case 'z': x = kCellLoZCaron; break;
|
||||
default: x = kCellQuestion; break;
|
||||
}
|
||||
break;
|
||||
case 'E':
|
||||
if (0 == (c = *p++)) {
|
||||
/* oops, unexpected end of string, abort */
|
||||
return;
|
||||
}
|
||||
|
||||
switch (c) {
|
||||
case 'u': x = kCellLoUDblac; break;
|
||||
default: x = kCellQuestion; break;
|
||||
}
|
||||
break;
|
||||
case 'r':
|
||||
if (0 == (c = *p++)) {
|
||||
/* oops, unexpected end of string, abort */
|
||||
return;
|
||||
}
|
||||
|
||||
switch (c) {
|
||||
case 'u': x = kCellLoURing; break;
|
||||
default: x = kCellQuestion; break;
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
return;
|
||||
/*
|
||||
oops, unexpected char,
|
||||
maybe end of string, abort
|
||||
*/
|
||||
break;
|
||||
default: x = kCellQuestion; break;
|
||||
}
|
||||
ClStrAppendChar(L, r, x);
|
||||
} else {
|
||||
@ -1937,15 +2203,29 @@ LOCALPROC ClStrAppendSubstCStr(int *L, ui3b *r, char *s)
|
||||
case ';': x = kCellSemicolon; break;
|
||||
case '?': x = kCellQuestion; break;
|
||||
case '_': x = kCellUnderscore; break;
|
||||
default: x = kCellSpace; break;
|
||||
case ' ': x = kCellSpace; break;
|
||||
case '\047': x = kCellApostrophe; break;
|
||||
|
||||
default: x = kCellQuestion; break;
|
||||
}
|
||||
ClStrAppendChar(L, r, x);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#define ClStrMaxLength 512
|
||||
|
||||
LOCALPROC ClStrFromSubstCStr(int *L, ui3b *r, char *s)
|
||||
{
|
||||
int n = ClStrSizeSubstCStr(s);
|
||||
|
||||
*L = 0;
|
||||
ClStrAppendSubstCStr(L, r, s);
|
||||
if (n <= ClStrMaxLength) {
|
||||
ClStrAppendSubstCStr(L, r, s);
|
||||
|
||||
if (n != *L) {
|
||||
/* try to ensure mismatch is noticed */
|
||||
*L = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
0
Mini vMac/mnvm_core/IWMEMDEV.c
Executable file → Normal file
0
Mini vMac/mnvm_core/IWMEMDEV.c
Executable file → Normal file
0
Mini vMac/mnvm_core/IWMEMDEV.h
Executable file → Normal file
0
Mini vMac/mnvm_core/IWMEMDEV.h
Executable file → Normal file
0
Mini vMac/mnvm_core/KBRDEMDV.c
Executable file → Normal file
0
Mini vMac/mnvm_core/KBRDEMDV.c
Executable file → Normal file
0
Mini vMac/mnvm_core/KBRDEMDV.h
Executable file → Normal file
0
Mini vMac/mnvm_core/KBRDEMDV.h
Executable file → Normal file
2
Mini vMac/mnvm_core/M68KITAB.c
Executable file → Normal file
2
Mini vMac/mnvm_core/M68KITAB.c
Executable file → Normal file
@ -1947,7 +1947,7 @@ LOCALPROCUSEDONCE DeCode5(WorkR *p)
|
||||
#if Use68020
|
||||
if ((mode(p) == 7) && (reg(p) >= 2)) {
|
||||
/* TRAPcc 0101cccc11111sss */
|
||||
p->DecOp.y.v[0].ArgDat = reg(p);
|
||||
p->DecOp.y.v[1].ArgDat = reg(p);
|
||||
p->MainClass = kIKindTRAPcc;
|
||||
} else
|
||||
#endif
|
||||
|
0
Mini vMac/mnvm_core/M68KITAB.h
Executable file → Normal file
0
Mini vMac/mnvm_core/M68KITAB.h
Executable file → Normal file
115
Mini vMac/mnvm_core/MINEM68K.c
Executable file → Normal file
115
Mini vMac/mnvm_core/MINEM68K.c
Executable file → Normal file
@ -747,11 +747,68 @@ LOCALVAR const func_pointer_t OpDispatch[kNumIKinds + 1] = {
|
||||
0
|
||||
};
|
||||
|
||||
LOCALPROC m68k_go_MaxCycles(void)
|
||||
#ifndef WantBreakPoint
|
||||
#define WantBreakPoint 0
|
||||
#endif
|
||||
|
||||
#if WantBreakPoint
|
||||
|
||||
#define BreakPointAddress 0xD198
|
||||
|
||||
LOCALPROC BreakPointAction(void)
|
||||
{
|
||||
dbglog_StartLine();
|
||||
dbglog_writeCStr("breakpoint A0=");
|
||||
dbglog_writeHex(m68k_areg(0));
|
||||
dbglog_writeCStr(" A1=");
|
||||
dbglog_writeHex(m68k_areg(1));
|
||||
dbglog_writeReturn();
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
LOCALINLINEPROC DecodeNextInstruction(func_pointer_t *d, ui4rr *Cycles,
|
||||
DecOpYR *y)
|
||||
{
|
||||
ui5r opcode;
|
||||
DecOpR *p;
|
||||
ui4rr MainClas;
|
||||
|
||||
opcode = nextiword();
|
||||
|
||||
p = &V_regs.disp_table[opcode];
|
||||
|
||||
#if WantCloserCyc
|
||||
V_regs.CurDecOp = p;
|
||||
#endif
|
||||
MainClas = p->x.MainClas;
|
||||
*Cycles = p->x.Cycles;
|
||||
*y = p->y;
|
||||
#if WantDumpTable
|
||||
DumpTable[MainClas] ++;
|
||||
#endif
|
||||
*d = OpDispatch[MainClas];
|
||||
}
|
||||
|
||||
LOCALINLINEPROC UnDecodeNextInstruction(ui4rr Cycles)
|
||||
{
|
||||
V_MaxCyclesToGo += Cycles;
|
||||
|
||||
BackupPC();
|
||||
|
||||
#if WantDumpTable
|
||||
{
|
||||
ui5r opcode = do_get_mem_word(V_pc_p);
|
||||
DecOpR *p = &V_regs.disp_table[opcode];
|
||||
ui4rr MainClas = p->x.MainClas;
|
||||
|
||||
DumpTable[MainClas] --;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
LOCALPROC m68k_go_MaxCycles(void)
|
||||
{
|
||||
ui4rr Cycles;
|
||||
DecOpYR y;
|
||||
func_pointer_t d;
|
||||
@ -764,37 +821,36 @@ LOCALPROC m68k_go_MaxCycles(void)
|
||||
Needed for trace flag to work.
|
||||
*/
|
||||
|
||||
goto label_enter;
|
||||
DecodeNextInstruction(&d, &Cycles, &y);
|
||||
|
||||
V_MaxCyclesToGo -= Cycles;
|
||||
|
||||
do {
|
||||
V_regs.CurDecOpY = y;
|
||||
|
||||
#if WantDisasm || WantBreakPoint
|
||||
{
|
||||
CPTR pc = m68k_getpc() - 2;
|
||||
#if WantDisasm
|
||||
DisasmOneOrSave(pc);
|
||||
#endif
|
||||
#if WantBreakPoint
|
||||
if (BreakPointAddress == pc) {
|
||||
BreakPointAction();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
d();
|
||||
|
||||
label_enter:
|
||||
|
||||
#if WantDisasm
|
||||
DisasmOneOrSave(m68k_getpc());
|
||||
#endif
|
||||
|
||||
opcode = nextiword();
|
||||
|
||||
p = &V_regs.disp_table[opcode];
|
||||
|
||||
#if WantCloserCyc
|
||||
V_regs.CurDecOp = p;
|
||||
#endif
|
||||
MainClas = p->x.MainClas;
|
||||
Cycles = p->x.Cycles;
|
||||
y = p->y;
|
||||
#if WantDumpTable
|
||||
DumpTable[MainClas] ++;
|
||||
#endif
|
||||
d = OpDispatch[MainClas];
|
||||
DecodeNextInstruction(&d, &Cycles, &y);
|
||||
|
||||
} while (((si5rr)(V_MaxCyclesToGo -= Cycles)) > 0);
|
||||
|
||||
V_regs.CurDecOpY = y;
|
||||
d();
|
||||
/* abort instruction that have started to decode */
|
||||
|
||||
UnDecodeNextInstruction(Cycles);
|
||||
}
|
||||
|
||||
FORWARDFUNC ui5r my_reg_call get_byte_ext(CPTR addr);
|
||||
@ -7670,7 +7726,7 @@ LOCALIPROC DoCodeTRAPcc(void)
|
||||
{
|
||||
/* TRAPcc 0101cccc11111sss */
|
||||
/* ReportAbnormal("TRAPcc"); */
|
||||
switch (V_regs.CurDecOpY.v[0].ArgDat) {
|
||||
switch (V_regs.CurDecOpY.v[1].ArgDat) {
|
||||
case 2:
|
||||
ReportAbnormalID(0x011C, "TRAPcc word data");
|
||||
SkipiWord();
|
||||
@ -7726,12 +7782,12 @@ LOCALIPROC DoBitField(void)
|
||||
{
|
||||
ui5b tmp;
|
||||
ui5b newtmp;
|
||||
si5b dsta;
|
||||
CPTR dsta;
|
||||
ui5b bf0;
|
||||
ui3b bf1;
|
||||
ui5b dstreg = V_regs.CurDecOpY.v[1].ArgDat;
|
||||
ui4b extra = nextiword();
|
||||
si5b offset = ((extra & 0x0800) != 0)
|
||||
ui5b offset = ((extra & 0x0800) != 0)
|
||||
? m68k_dreg((extra >> 6) & 7)
|
||||
: ((extra >> 6) & 0x1f);
|
||||
ui5b width = ((extra & 0x0020) != 0)
|
||||
@ -7756,8 +7812,7 @@ LOCALIPROC DoBitField(void)
|
||||
otherwise illegal and don't get here
|
||||
*/
|
||||
dsta = DecodeDst();
|
||||
dsta +=
|
||||
(offset >> 3) | (offset & 0x80000000 ? ~ 0x1fffffff : 0);
|
||||
dsta += Ui5rASR(offset, 3);
|
||||
offset &= 7;
|
||||
offwid = offset + ((width == 0) ? 32 : width);
|
||||
|
||||
@ -7827,7 +7882,7 @@ LOCALIPROC DoBitField(void)
|
||||
case 5: /* BFFFO */
|
||||
{
|
||||
ui5b mask = 1 << ((width == 0) ? 31 : (width - 1));
|
||||
si5b i = offset;
|
||||
ui5r i = offset;
|
||||
|
||||
while ((0 != mask) && (0 == (tmp & mask))) {
|
||||
mask >>= 1;
|
||||
|
0
Mini vMac/mnvm_core/MINEM68K.h
Executable file → Normal file
0
Mini vMac/mnvm_core/MINEM68K.h
Executable file → Normal file
0
Mini vMac/mnvm_core/MOUSEMDV.c
Executable file → Normal file
0
Mini vMac/mnvm_core/MOUSEMDV.c
Executable file → Normal file
0
Mini vMac/mnvm_core/MOUSEMDV.h
Executable file → Normal file
0
Mini vMac/mnvm_core/MOUSEMDV.h
Executable file → Normal file
36
Mini vMac/mnvm_core/MYOSGLUE.h
Executable file → Normal file
36
Mini vMac/mnvm_core/MYOSGLUE.h
Executable file → Normal file
@ -34,9 +34,9 @@
|
||||
#endif
|
||||
|
||||
|
||||
EXPORTOSGLUPROC WarnMsgCorruptedROM(void);
|
||||
EXPORTOSGLUPROC WarnMsgUnsupportedROM(void);
|
||||
#if WantAbnormalReports
|
||||
EXPORTOSGLUPROC WarnMsgAbnormalID(ui4r id);
|
||||
#endif
|
||||
|
||||
#if dbglog_HAVE
|
||||
EXPORTOSGLUPROC dbglog_writeCStr(char *s);
|
||||
@ -161,10 +161,14 @@ EXPORTOSGLUFUNC tMacErr HTCEimport(tPbuf *r);
|
||||
EXPORTVAR(ui5b, OnTrueTime)
|
||||
|
||||
EXPORTVAR(ui5b, CurMacDateInSeconds)
|
||||
#if AutoLocation
|
||||
EXPORTVAR(ui5b, CurMacLatitude)
|
||||
EXPORTVAR(ui5b, CurMacLongitude)
|
||||
#endif
|
||||
#if AutoTimeZone
|
||||
EXPORTVAR(ui5b, CurMacDelta)
|
||||
/* (dlsDelta << 24) | (gmtDelta & 0x00FFFFFF) */
|
||||
#endif
|
||||
|
||||
|
||||
#define vMacScreenNumPixels \
|
||||
@ -407,3 +411,31 @@ EXPORTOSGLUPROC MyEvtQOutDone(void);
|
||||
#define MKC_Pause 0x71
|
||||
|
||||
#define MKC_AngleBracket 0x0A /* found on german keyboard */
|
||||
|
||||
/*
|
||||
Additional codes found in Apple headers
|
||||
|
||||
#define MKC_RightShift 0x3C
|
||||
#define MKC_RightOption 0x3D
|
||||
#define MKC_RightControl 0x3E
|
||||
#define MKC_Function 0x3F
|
||||
|
||||
#define MKC_VolumeUp 0x48
|
||||
#define MKC_VolumeDown 0x49
|
||||
#define MKC_Mute 0x4A
|
||||
|
||||
#define MKC_F16 0x6A
|
||||
#define MKC_F17 0x40
|
||||
#define MKC_F18 0x4F
|
||||
#define MKC_F19 0x50
|
||||
#define MKC_F20 0x5A
|
||||
|
||||
#define MKC_F13 MKC_Print
|
||||
#define MKC_F14 MKC_ScrollLock
|
||||
#define MKC_F15 MKC_Pause
|
||||
*/
|
||||
|
||||
/* not Apple key codes, only for Mini vMac */
|
||||
|
||||
#define MKC_CM 0x80
|
||||
#define MKC_None 0xFF
|
||||
|
121
Mini vMac/mnvm_core/PBUFSTDC.h
Normal file
121
Mini vMac/mnvm_core/PBUFSTDC.h
Normal file
@ -0,0 +1,121 @@
|
||||
/*
|
||||
PBUFSTDC.h
|
||||
|
||||
Copyright (C) 2018 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
Parameter BUFfers implemented with STanDard C library
|
||||
*/
|
||||
|
||||
|
||||
#if IncludePbufs
|
||||
LOCALVAR void *PbufDat[NumPbufs];
|
||||
#endif
|
||||
|
||||
#if IncludePbufs
|
||||
LOCALFUNC tMacErr PbufNewFromPtr(void *p, ui5b count, tPbuf *r)
|
||||
{
|
||||
tPbuf i;
|
||||
tMacErr err;
|
||||
|
||||
if (! FirstFreePbuf(&i)) {
|
||||
free(p);
|
||||
err = mnvm_miscErr;
|
||||
} else {
|
||||
*r = i;
|
||||
PbufDat[i] = p;
|
||||
PbufNewNotify(i, count);
|
||||
err = mnvm_noErr;
|
||||
}
|
||||
|
||||
return err;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if IncludePbufs
|
||||
LOCALPROC PbufKillToPtr(void **p, ui5r *count, tPbuf r)
|
||||
{
|
||||
*p = PbufDat[r];
|
||||
*count = PbufSize[r];
|
||||
|
||||
PbufDisposeNotify(r);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if IncludePbufs
|
||||
GLOBALOSGLUFUNC tMacErr PbufNew(ui5b count, tPbuf *r)
|
||||
{
|
||||
tMacErr err = mnvm_miscErr;
|
||||
|
||||
void *p = calloc(1, count);
|
||||
if (NULL != p) {
|
||||
err = PbufNewFromPtr(p, count, r);
|
||||
}
|
||||
|
||||
return err;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if IncludePbufs
|
||||
GLOBALOSGLUPROC PbufDispose(tPbuf i)
|
||||
{
|
||||
void *p;
|
||||
ui5r count;
|
||||
|
||||
PbufKillToPtr(&p, &count, i);
|
||||
|
||||
free(p);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if IncludePbufs
|
||||
LOCALPROC UnInitPbufs(void)
|
||||
{
|
||||
tPbuf i;
|
||||
|
||||
for (i = 0; i < NumPbufs; ++i) {
|
||||
if (PbufIsAllocated(i)) {
|
||||
PbufDispose(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#if IncludePbufs
|
||||
#define PbufHaveLock 1
|
||||
#endif
|
||||
|
||||
#if IncludePbufs
|
||||
LOCALFUNC ui3p PbufLock(tPbuf i)
|
||||
{
|
||||
return (ui3p)PbufDat[i];
|
||||
}
|
||||
#endif
|
||||
|
||||
#if IncludePbufs
|
||||
#define PbufUnlock(i)
|
||||
#endif
|
||||
|
||||
#if IncludePbufs
|
||||
GLOBALOSGLUPROC PbufTransfer(ui3p Buffer,
|
||||
tPbuf i, ui5r offset, ui5r count, blnr IsWrite)
|
||||
{
|
||||
void *p = ((ui3p)PbufDat[i]) + offset;
|
||||
if (IsWrite) {
|
||||
(void) memcpy(p, Buffer, count);
|
||||
} else {
|
||||
(void) memcpy(Buffer, p, count);
|
||||
}
|
||||
}
|
||||
#endif
|
0
Mini vMac/mnvm_core/PMUEMDEV.c
Executable file → Normal file
0
Mini vMac/mnvm_core/PMUEMDEV.c
Executable file → Normal file
0
Mini vMac/mnvm_core/PMUEMDEV.h
Executable file → Normal file
0
Mini vMac/mnvm_core/PMUEMDEV.h
Executable file → Normal file
0
Mini vMac/mnvm_core/PROGMAIN.c
Executable file → Normal file
0
Mini vMac/mnvm_core/PROGMAIN.c
Executable file → Normal file
0
Mini vMac/mnvm_core/PROGMAIN.h
Executable file → Normal file
0
Mini vMac/mnvm_core/PROGMAIN.h
Executable file → Normal file
82
Mini vMac/mnvm_core/ROMEMDEV.c
Executable file → Normal file
82
Mini vMac/mnvm_core/ROMEMDEV.c
Executable file → Normal file
@ -239,10 +239,6 @@ LOCALPROC Sony_Install(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef CheckRomCheckSum
|
||||
#define CheckRomCheckSum 1
|
||||
#endif
|
||||
|
||||
#ifndef DisableRomCheck
|
||||
#define DisableRomCheck 1
|
||||
#endif
|
||||
@ -251,22 +247,6 @@ LOCALPROC Sony_Install(void)
|
||||
#define DisableRamTest 1
|
||||
#endif
|
||||
|
||||
#if CheckRomCheckSum
|
||||
LOCALFUNC ui5r Calc_Checksum(void)
|
||||
{
|
||||
long int i;
|
||||
ui5b CheckSum = 0;
|
||||
ui3p p = 4 + ROM;
|
||||
|
||||
for (i = (kCheckSumRom_Size - 4) >> 1; --i >= 0; ) {
|
||||
CheckSum += do_get_mem_word(p);
|
||||
p += 2;
|
||||
}
|
||||
|
||||
return CheckSum;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CurAltHappyMac
|
||||
#include "HPMCHACK.h"
|
||||
#endif
|
||||
@ -296,68 +276,6 @@ LOCALPROC ROMscrambleForMTB(void)
|
||||
|
||||
GLOBALFUNC blnr ROM_Init(void)
|
||||
{
|
||||
#if CheckRomCheckSum
|
||||
ui5r CheckSum = Calc_Checksum();
|
||||
|
||||
#if CurEmMd >= kEmMd_Twiggy
|
||||
if (CheckSum != do_get_mem_long(ROM)) {
|
||||
WarnMsgCorruptedROM();
|
||||
} else
|
||||
#endif
|
||||
#if CurEmMd <= kEmMd_Twig43
|
||||
if (CheckSum == 0x27F4E04B) {
|
||||
} else
|
||||
#elif CurEmMd <= kEmMd_Twiggy
|
||||
if (CheckSum == 0x2884371D) {
|
||||
} else
|
||||
#elif CurEmMd <= kEmMd_128K
|
||||
if (CheckSum == 0x28BA61CE) {
|
||||
} else
|
||||
if (CheckSum == 0x28BA4E50) {
|
||||
} else
|
||||
#elif CurEmMd <= kEmMd_Plus
|
||||
if (CheckSum == 0x4D1EEEE1) {
|
||||
/* Mac Plus ROM v 1, 'Lonely Hearts' */
|
||||
} else
|
||||
if (CheckSum == 0x4D1EEAE1) {
|
||||
/* Mac Plus ROM v 2, 'Lonely Heifers' */
|
||||
} else
|
||||
if (CheckSum == 0x4D1F8172) {
|
||||
/* Mac Plus ROM v 3, 'Loud Harmonicas' */
|
||||
} else
|
||||
#elif CurEmMd <= kEmMd_SE
|
||||
if (CheckSum == 0xB2E362A8) {
|
||||
} else
|
||||
#elif CurEmMd <= kEmMd_SEFDHD
|
||||
if (CheckSum == 0xB306E171) {
|
||||
} else
|
||||
#elif CurEmMd <= kEmMd_Classic
|
||||
if (CheckSum == 0xA49F9914) {
|
||||
} else
|
||||
#elif CurEmMd <= kEmMd_PB100
|
||||
if (CheckSum == 0x96645F9C) {
|
||||
} else
|
||||
#elif CurEmMd <= kEmMd_II
|
||||
if (CheckSum == 0x9779D2C4) {
|
||||
} else
|
||||
if (CheckSum == 0x97221136) {
|
||||
/* accept IIx ROM */
|
||||
} else
|
||||
#elif CurEmMd <= kEmMd_IIx
|
||||
if (CheckSum == 0x97221136) {
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
WarnMsgUnsupportedROM();
|
||||
}
|
||||
/*
|
||||
Even if ROM is corrupt or unsupported, go ahead and
|
||||
try to run anyway. It shouldn't do any harm.
|
||||
*/
|
||||
|
||||
#endif /* CheckRomCheckSum */
|
||||
|
||||
|
||||
#if DisableRomCheck
|
||||
|
||||
/* skip the rom checksum */
|
||||
|
0
Mini vMac/mnvm_core/ROMEMDEV.h
Executable file → Normal file
0
Mini vMac/mnvm_core/ROMEMDEV.h
Executable file → Normal file
31
Mini vMac/mnvm_core/RTCEMDEV.c
Executable file → Normal file
31
Mini vMac/mnvm_core/RTCEMDEV.c
Executable file → Normal file
@ -262,6 +262,37 @@ GLOBALFUNC blnr RTC_Init(void)
|
||||
RTC.PARAMRAM[0x81] = 0x80;
|
||||
#endif
|
||||
|
||||
#if (CurEmMd == kEmMd_II) || (CurEmMd == kEmMd_IIx)
|
||||
|
||||
#define pr_HilColRedHi (pr_HilColRed >> 8)
|
||||
#if 0 != pr_HilColRedHi
|
||||
RTC.PARAMRAM[0x82] = pr_HilColRedHi;
|
||||
#endif
|
||||
#define pr_HilColRedLo (pr_HilColRed & 0xFF)
|
||||
#if 0 != pr_HilColRedLo
|
||||
RTC.PARAMRAM[0x83] = pr_HilColRedLo;
|
||||
#endif
|
||||
|
||||
#define pr_HilColGreenHi (pr_HilColGreen >> 8)
|
||||
#if 0 != pr_HilColGreenHi
|
||||
RTC.PARAMRAM[0x84] = pr_HilColGreenHi;
|
||||
#endif
|
||||
#define pr_HilColGreenLo (pr_HilColGreen & 0xFF)
|
||||
#if 0 != pr_HilColGreenLo
|
||||
RTC.PARAMRAM[0x85] = pr_HilColGreenLo;
|
||||
#endif
|
||||
|
||||
#define pr_HilColBlueHi (pr_HilColBlue >> 8)
|
||||
#if 0 != pr_HilColBlueHi
|
||||
RTC.PARAMRAM[0x86] = pr_HilColBlueHi;
|
||||
#endif
|
||||
#define pr_HilColBlueLo (pr_HilColBlue & 0xFF)
|
||||
#if 0 != pr_HilColBlueLo
|
||||
RTC.PARAMRAM[0x87] = pr_HilColBlueLo;
|
||||
#endif
|
||||
|
||||
#endif /* (CurEmMd == kEmMd_II) || (CurEmMd == kEmMd_IIx) */
|
||||
|
||||
#if HaveXPRAM /* extended parameter ram initialized */
|
||||
do_put_mem_long(&RTC.PARAMRAM[0xE4], CurMacLatitude);
|
||||
do_put_mem_long(&RTC.PARAMRAM[0xE8], CurMacLongitude);
|
||||
|
0
Mini vMac/mnvm_core/RTCEMDEV.h
Executable file → Normal file
0
Mini vMac/mnvm_core/RTCEMDEV.h
Executable file → Normal file
0
Mini vMac/mnvm_core/SCCEMDEV.c
Executable file → Normal file
0
Mini vMac/mnvm_core/SCCEMDEV.c
Executable file → Normal file
0
Mini vMac/mnvm_core/SCCEMDEV.h
Executable file → Normal file
0
Mini vMac/mnvm_core/SCCEMDEV.h
Executable file → Normal file
0
Mini vMac/mnvm_core/SCRNEMDV.c
Executable file → Normal file
0
Mini vMac/mnvm_core/SCRNEMDV.c
Executable file → Normal file
0
Mini vMac/mnvm_core/SCRNEMDV.h
Executable file → Normal file
0
Mini vMac/mnvm_core/SCRNEMDV.h
Executable file → Normal file
0
Mini vMac/mnvm_core/SCRNHACK.h
Executable file → Normal file
0
Mini vMac/mnvm_core/SCRNHACK.h
Executable file → Normal file
0
Mini vMac/mnvm_core/SCRNMAPR.h
Executable file → Normal file
0
Mini vMac/mnvm_core/SCRNMAPR.h
Executable file → Normal file
0
Mini vMac/mnvm_core/SCRNTRNS.h
Executable file → Normal file
0
Mini vMac/mnvm_core/SCRNTRNS.h
Executable file → Normal file
0
Mini vMac/mnvm_core/SCSIEMDV.c
Executable file → Normal file
0
Mini vMac/mnvm_core/SCSIEMDV.c
Executable file → Normal file
0
Mini vMac/mnvm_core/SCSIEMDV.h
Executable file → Normal file
0
Mini vMac/mnvm_core/SCSIEMDV.h
Executable file → Normal file
0
Mini vMac/mnvm_core/SGLUALSA.h
Executable file → Normal file
0
Mini vMac/mnvm_core/SGLUALSA.h
Executable file → Normal file
0
Mini vMac/mnvm_core/SGLUDDSP.h
Executable file → Normal file
0
Mini vMac/mnvm_core/SGLUDDSP.h
Executable file → Normal file
0
Mini vMac/mnvm_core/SNDEMDEV.c
Executable file → Normal file
0
Mini vMac/mnvm_core/SNDEMDEV.c
Executable file → Normal file
0
Mini vMac/mnvm_core/SNDEMDEV.h
Executable file → Normal file
0
Mini vMac/mnvm_core/SNDEMDEV.h
Executable file → Normal file
0
Mini vMac/mnvm_core/SONYEMDV.c
Executable file → Normal file
0
Mini vMac/mnvm_core/SONYEMDV.c
Executable file → Normal file
0
Mini vMac/mnvm_core/SONYEMDV.h
Executable file → Normal file
0
Mini vMac/mnvm_core/SONYEMDV.h
Executable file → Normal file
11
Mini vMac/mnvm_core/STRCNENG.h
Executable file → Normal file
11
Mini vMac/mnvm_core/STRCNENG.h
Executable file → Normal file
@ -24,7 +24,7 @@
|
||||
#define kStrAboutMessage "To display information about this program, use the ;]A;} command of the ^p Control Mode. To learn about the Control Mode, see the ;[More Commands;ll;{ item in the ;[Special;{ menu."
|
||||
|
||||
#define kStrMoreCommandsTitle "More commands are available in the ^p Control Mode."
|
||||
#define kStrMoreCommandsMessage "To enter the Control Mode, press and hold down the ;]control;} key. You will remain in the Control Mode until you release the ;]control;} key. Type ;]H;} in the Control Mode to list available commands."
|
||||
#define kStrMoreCommandsMessage "To enter the Control Mode, press and hold down the ;]^c;} key. You will remain in the Control Mode until you release the ;]^c;} key. Type ;]H;} in the Control Mode to list available commands."
|
||||
|
||||
#define kStrTooManyImagesTitle "Too many Disk Images"
|
||||
#define kStrTooManyImagesMessage "I can not mount that many Disk Images. Try ejecting one."
|
||||
@ -83,7 +83,7 @@
|
||||
#define kStrDisclaimer " ^p is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;ls without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
||||
|
||||
/* Help Screen */
|
||||
#define kStrHowToLeaveControl "To leave the Control Mode, release the ;]control;} key."
|
||||
#define kStrHowToLeaveControl "To leave the Control Mode, release the ;]^c;} key."
|
||||
#define kStrHowToPickACommand "Otherwise, type a letter. Available commands are:"
|
||||
#define kStrCmdAbout "About (version information)"
|
||||
#define kStrCmdOpenDiskImage "Open disk image;ll"
|
||||
@ -91,7 +91,7 @@
|
||||
#define kStrCmdSpeedControl "Speed control;ll (^s)"
|
||||
#define kStrCmdMagnifyToggle "Magnify toggle (^g)"
|
||||
#define kStrCmdFullScrnToggle "Full screen toggle (^f)"
|
||||
#define kStrCmdCtrlKeyToggle "emulated ;]control;} Key toggle (^k)"
|
||||
#define kStrCmdCtrlKeyToggle "emulated ;]^m;} Key toggle (^k)"
|
||||
#define kStrCmdReset "Reset"
|
||||
#define kStrCmdInterrupt "Interrupt"
|
||||
#define kStrCmdHelp "Help (show this page)"
|
||||
@ -115,7 +115,7 @@
|
||||
|
||||
#define kStrNewFullScreen "Full Screen is ^f."
|
||||
|
||||
#define kStrNewCntrlKey "Emulated ;]control;} key ^k."
|
||||
#define kStrNewCntrlKey "Emulated ;]^m;} key ^k."
|
||||
|
||||
#define kStrCmdCancel "cancel"
|
||||
|
||||
@ -162,3 +162,6 @@
|
||||
#define kStrAppMenuItemHideOthers "Hide Others"
|
||||
#define kStrAppMenuItemShowAll "Show All"
|
||||
#define kStrAppMenuItemQuit "Quit ^p"
|
||||
|
||||
#define kStrCmdCopyOptions "copy variation options"
|
||||
#define kStrHaveCopiedOptions "Variation options copied"
|
||||
|
0
Mini vMac/mnvm_core/SYSDEPNS.h
Executable file → Normal file
0
Mini vMac/mnvm_core/SYSDEPNS.h
Executable file → Normal file
0
Mini vMac/mnvm_core/VIA2EMDV.c
Executable file → Normal file
0
Mini vMac/mnvm_core/VIA2EMDV.c
Executable file → Normal file
0
Mini vMac/mnvm_core/VIA2EMDV.h
Executable file → Normal file
0
Mini vMac/mnvm_core/VIA2EMDV.h
Executable file → Normal file
0
Mini vMac/mnvm_core/VIAEMDEV.c
Executable file → Normal file
0
Mini vMac/mnvm_core/VIAEMDEV.c
Executable file → Normal file
0
Mini vMac/mnvm_core/VIAEMDEV.h
Executable file → Normal file
0
Mini vMac/mnvm_core/VIAEMDEV.h
Executable file → Normal file
0
Mini vMac/mnvm_core/VIDEMDEV.c
Executable file → Normal file
0
Mini vMac/mnvm_core/VIDEMDEV.c
Executable file → Normal file
0
Mini vMac/mnvm_core/VIDEMDEV.h
Executable file → Normal file
0
Mini vMac/mnvm_core/VIDEMDEV.h
Executable file → Normal file
Loading…
x
Reference in New Issue
Block a user