Remove more Pascal-style type specifiers

This commit is contained in:
InvisibleUp 2023-10-22 13:36:34 -07:00
parent 5384b4347c
commit 288f4d6962
60 changed files with 1788 additions and 1827 deletions

View File

@ -10,7 +10,6 @@
#include <stdint.h>
#define MayInline inline
#define SmallGlobals 0
#define cIncludeUnused 0
#define UnusedParam(p) (void) p

View File

@ -55,56 +55,56 @@ uint8_t RequestIthDisk = 0;
bool ControlKeyPressed = false;
IMPORTPROC m68k_reset(void);
IMPORTPROC IWM_Reset(void);
IMPORTPROC SCC_Reset(void);
IMPORTPROC SCSI_Reset(void);
IMPORTPROC VIA1_Reset(void);
extern void m68k_reset(void);
extern void IWM_Reset(void);
extern void SCC_Reset(void);
extern void SCSI_Reset(void);
extern void VIA1_Reset(void);
#if EmVIA2
IMPORTPROC VIA2_Reset(void);
extern void VIA2_Reset(void);
#endif
IMPORTPROC Sony_Reset(void);
extern void Sony_Reset(void);
IMPORTPROC ExtnDisk_Access(CPTR p);
IMPORTPROC ExtnSony_Access(CPTR p);
extern void ExtnDisk_Access(CPTR p);
extern void ExtnSony_Access(CPTR p);
#if EmVidCard
IMPORTPROC ExtnVideo_Access(CPTR p);
extern void ExtnVideo_Access(CPTR p);
#endif
IMPORTPROC Sony_SetQuitOnEject(void);
extern void Sony_SetQuitOnEject(void);
IMPORTPROC m68k_IPLchangeNtfy(void);
IMPORTPROC MINEM68K_Init(
extern void m68k_IPLchangeNtfy(void);
extern void MINEM68K_Init(
uint8_t *fIPL);
IMPORTFUNC uint32_t GetCyclesRemaining(void);
IMPORTPROC SetCyclesRemaining(uint32_t n);
extern uint32_t GetCyclesRemaining(void);
extern void SetCyclesRemaining(uint32_t n);
IMPORTPROC SetHeadATTel(ATTep p);
IMPORTFUNC ATTep FindATTel(CPTR addr);
extern void SetHeadATTel(ATTep p);
extern ATTep FindATTel(CPTR addr);
IMPORTFUNC uint32_t SCSI_Access(uint32_t Data, bool WriteMem, CPTR addr);
IMPORTFUNC uint32_t SCC_Access(uint32_t Data, bool WriteMem, CPTR addr);
IMPORTFUNC uint32_t IWM_Access(uint32_t Data, bool WriteMem, CPTR addr);
IMPORTFUNC uint32_t VIA1_Access(uint32_t Data, bool WriteMem, CPTR addr);
extern uint32_t SCSI_Access(uint32_t Data, bool WriteMem, CPTR addr);
extern uint32_t SCC_Access(uint32_t Data, bool WriteMem, CPTR addr);
extern uint32_t IWM_Access(uint32_t Data, bool WriteMem, CPTR addr);
extern uint32_t VIA1_Access(uint32_t Data, bool WriteMem, CPTR addr);
#if EmVIA2
IMPORTFUNC uint32_t VIA2_Access(uint32_t Data, bool WriteMem, CPTR addr);
extern uint32_t VIA2_Access(uint32_t Data, bool WriteMem, CPTR addr);
#endif
#if EmASC
IMPORTFUNC uint32_t ASC_Access(uint32_t Data, bool WriteMem, CPTR addr);
extern uint32_t ASC_Access(uint32_t Data, bool WriteMem, CPTR addr);
#endif
IMPORTFUNC uint8_t get_vm_byte(CPTR addr);
IMPORTFUNC uint16_t get_vm_word(CPTR addr);
IMPORTFUNC uint32_t get_vm_long(CPTR addr);
extern uint8_t get_vm_byte(CPTR addr);
extern uint16_t get_vm_word(CPTR addr);
extern uint32_t get_vm_long(CPTR addr);
IMPORTPROC put_vm_byte(CPTR addr, uint8_t b);
IMPORTPROC put_vm_word(CPTR addr, uint16_t w);
IMPORTPROC put_vm_long(CPTR addr, uint32_t l);
extern void put_vm_byte(CPTR addr, uint8_t b);
extern void put_vm_word(CPTR addr, uint16_t w);
extern void put_vm_long(CPTR addr, uint32_t l);
GLOBALVAR uint32_t disk_icon_addr;
uint32_t disk_icon_addr;
GLOBALPROC customreset(void)
void customreset(void)
{
IWM_Reset();
SCC_Reset();
@ -128,25 +128,25 @@ GLOBALPROC customreset(void)
#endif
}
GLOBALVAR uint8_t * RAM = nullpr;
uint8_t * RAM = nullpr;
#if EmVidCard
GLOBALVAR uint8_t * VidROM = nullpr;
uint8_t * VidROM = nullpr;
#endif
#if IncludeVidMem
GLOBALVAR uint8_t * VidMem = nullpr;
uint8_t * VidMem = nullpr;
#endif
GLOBALVAR uint8_t Wires[kNumWires];
uint8_t Wires[kNumWires];
#if WantDisasm
IMPORTPROC m68k_WantDisasmContext(void);
extern void m68k_WantDisasmContext(void);
#endif
#if WantDisasm
GLOBALPROC dbglog_StartLine(void)
void dbglog_StartLine(void)
{
m68k_WantDisasmContext();
dbglog_writeCStr(" ");
@ -154,7 +154,7 @@ GLOBALPROC dbglog_StartLine(void)
#endif
#if dbglog_HAVE
GLOBALPROC dbglog_WriteMemArrow(bool WriteMem)
void dbglog_WriteMemArrow(bool WriteMem)
{
if (WriteMem) {
dbglog_writeCStr(" <- ");
@ -165,7 +165,7 @@ GLOBALPROC dbglog_WriteMemArrow(bool WriteMem)
#endif
#if dbglog_HAVE
GLOBALPROC dbglog_AddrAccess(char *s, uint32_t Data,
void dbglog_AddrAccess(char *s, uint32_t Data,
bool WriteMem, uint32_t addr)
{
dbglog_StartLine();
@ -180,7 +180,7 @@ GLOBALPROC dbglog_AddrAccess(char *s, uint32_t Data,
#endif
#if dbglog_HAVE
GLOBALPROC dbglog_Access(char *s, uint32_t Data, bool WriteMem)
void dbglog_Access(char *s, uint32_t Data, bool WriteMem)
{
dbglog_StartLine();
dbglog_writeCStr(s);
@ -191,7 +191,7 @@ GLOBALPROC dbglog_Access(char *s, uint32_t Data, bool WriteMem)
#endif
#if dbglog_HAVE
GLOBALPROC dbglog_WriteNote(char *s)
void dbglog_WriteNote(char *s)
{
dbglog_StartLine();
dbglog_writeCStr(s);
@ -200,7 +200,7 @@ GLOBALPROC dbglog_WriteNote(char *s)
#endif
#if dbglog_HAVE
GLOBALPROC dbglog_WriteSetBool(char *s, bool v)
void dbglog_WriteSetBool(char *s, bool v)
{
dbglog_StartLine();
dbglog_writeCStr(s);
@ -215,7 +215,7 @@ GLOBALPROC dbglog_WriteSetBool(char *s, bool v)
#endif
#if WantAbnormalReports
LOCALVAR bool GotOneAbnormal = false;
static bool GotOneAbnormal = false;
#endif
#ifndef ReportAbnormalInterrupt
@ -223,7 +223,7 @@ LOCALVAR bool GotOneAbnormal = false;
#endif
#if WantAbnormalReports
GLOBALPROC DoReportAbnormalID(uint16_t id
void DoReportAbnormalID(uint16_t id
#if dbglog_HAVE
, char *s
#endif
@ -249,7 +249,7 @@ GLOBALPROC DoReportAbnormalID(uint16_t id
#if IncludeExtnPbufs
LOCALFUNC MacErr_t PbufTransferVM(CPTR Buffera,
static MacErr_t PbufTransferVM(CPTR Buffera,
tPbuf i, uint32_t offset, uint32_t count, bool IsWrite)
{
MacErr_t result;
@ -287,7 +287,7 @@ label_1:
#endif
#if IncludeExtnPbufs
LOCALPROC ExtnParamBuffers_Access(CPTR p)
static void ExtnParamBuffers_Access(CPTR p)
{
MacErr_t result = mnvm_controlErr;
@ -368,7 +368,7 @@ LOCALPROC ExtnParamBuffers_Access(CPTR p)
#endif
#if IncludeExtnHostTextClipExchange
LOCALPROC ExtnHostTextClipExchange_Access(CPTR p)
static void ExtnHostTextClipExchange_Access(CPTR p)
{
MacErr_t result = mnvm_controlErr;
@ -420,7 +420,7 @@ LOCALPROC ExtnHostTextClipExchange_Access(CPTR p)
#define kParamFindExtnTheExtn 8
#define kParamFindExtnTheId 12
LOCALPROC ExtnFind_Access(CPTR p)
static void ExtnFind_Access(CPTR p)
{
MacErr_t result = mnvm_controlErr;
@ -507,9 +507,9 @@ LOCALPROC ExtnFind_Access(CPTR p)
#define kDSK_Params_Lo 1
#define kDSK_QuitOnEject 3 /* obsolete */
LOCALVAR uint16_t ParamAddrHi;
static uint16_t ParamAddrHi;
LOCALPROC Extn_Access(uint32_t Data, CPTR addr)
static void Extn_Access(uint32_t Data, CPTR addr)
{
switch (addr) {
case kDSK_Params_Hi:
@ -564,7 +564,7 @@ LOCALPROC Extn_Access(uint32_t Data, CPTR addr)
}
}
GLOBALPROC Extn_Reset(void)
void Extn_Reset(void)
{
ParamAddrHi = (uint16_t) - 1;
}
@ -594,11 +594,11 @@ enum {
};
LOCALVAR ATTer ATTListA[MaxATTListN];
LOCALVAR uint16_t LastATTel;
static ATTer ATTListA[MaxATTListN];
static uint16_t LastATTel;
LOCALPROC AddToATTList(ATTep p)
static void AddToATTList(ATTep p)
{
uint16_t NewLast = LastATTel + 1;
if (NewLast >= MaxATTListN) {
@ -609,12 +609,12 @@ LOCALPROC AddToATTList(ATTep p)
}
}
LOCALPROC InitATTList(void)
static void InitATTList(void)
{
LastATTel = 0;
}
LOCALPROC FinishATTList(void)
static void FinishATTList(void)
{
{
/* add guard */
@ -665,7 +665,7 @@ LOCALPROC FinishATTList(void)
}
#if (CurEmMd == kEmMd_II) || (CurEmMd == kEmMd_IIx)
LOCALPROC SetUp_RAM24(void)
static void SetUp_RAM24(void)
{
ATTer r;
uint32_t bankbit = 0x00100000 << (((VIA2_iA7 << 1) | VIA2_iA6) << 1);
@ -710,7 +710,7 @@ LOCALPROC SetUp_RAM24(void)
#endif
#if (CurEmMd == kEmMd_II) || (CurEmMd == kEmMd_IIx)
LOCALPROC SetUp_io(void)
static void SetUp_io(void)
{
ATTer r;
@ -818,7 +818,7 @@ LOCALPROC SetUp_io(void)
#endif
#if (CurEmMd == kEmMd_II) || (CurEmMd == kEmMd_IIx)
LOCALPROC SetUp_address24(void)
static void SetUp_address24(void)
{
ATTer r;
@ -881,7 +881,7 @@ LOCALPROC SetUp_address24(void)
#endif
#if (CurEmMd == kEmMd_II) || (CurEmMd == kEmMd_IIx)
LOCALPROC SetUp_address32(void)
static void SetUp_address32(void)
{
ATTer r;
@ -1000,7 +1000,7 @@ LOCALPROC SetUp_address32(void)
#endif
#if (CurEmMd == kEmMd_II) || (CurEmMd == kEmMd_IIx)
LOCALPROC SetUp_address(void)
static void SetUp_address(void)
{
if (Addr32) {
SetUp_address32();
@ -1021,7 +1021,7 @@ LOCALPROC SetUp_address(void)
#ifndef ln2mtb
#define AddToATTListWithMTB AddToATTList
#else
LOCALPROC AddToATTListWithMTB(ATTep p)
static void AddToATTListWithMTB(ATTep p)
{
/*
Test of memory mapping system.
@ -1043,7 +1043,7 @@ LOCALPROC AddToATTListWithMTB(ATTep p)
#endif
#if (CurEmMd != kEmMd_II) && (CurEmMd != kEmMd_IIx)
LOCALPROC SetUp_RAM24(void)
static void SetUp_RAM24(void)
{
ATTer r;
@ -1078,7 +1078,7 @@ LOCALPROC SetUp_RAM24(void)
#endif
#if (CurEmMd != kEmMd_II) && (CurEmMd != kEmMd_IIx)
LOCALPROC SetUp_address(void)
static void SetUp_address(void)
{
ATTer r;
@ -1183,7 +1183,7 @@ LOCALPROC SetUp_address(void)
}
#endif
LOCALPROC SetUpMemBanks(void)
static void SetUpMemBanks(void)
{
InitATTList();
@ -1193,7 +1193,7 @@ LOCALPROC SetUpMemBanks(void)
}
#if 0
LOCALPROC get_fail_realblock(ATTep p)
static void get_fail_realblock(ATTep p)
{
p->cmpmask = 0;
p->cmpvalu = 0xFFFFFFFF;
@ -1203,7 +1203,7 @@ LOCALPROC get_fail_realblock(ATTep p)
}
#endif
GLOBALFUNC uint32_t MMDV_Access(ATTep p, uint32_t Data,
uint32_t MMDV_Access(ATTep p, uint32_t Data,
bool WriteMem, bool ByteSize, CPTR addr)
{
switch (p->MMDV) {
@ -1433,7 +1433,7 @@ GLOBALFUNC uint32_t MMDV_Access(ATTep p, uint32_t Data,
return Data;
}
GLOBALFUNC bool MemAccessNtfy(ATTep pT)
bool MemAccessNtfy(ATTep pT)
{
bool v = false;
@ -1454,7 +1454,7 @@ GLOBALFUNC bool MemAccessNtfy(ATTep pT)
return v;
}
GLOBALPROC MemOverlay_ChangeNtfy(void)
void MemOverlay_ChangeNtfy(void)
{
#if CurEmMd <= kEmMd_Plus
SetUpMemBanks();
@ -1464,13 +1464,13 @@ GLOBALPROC MemOverlay_ChangeNtfy(void)
}
#if (CurEmMd == kEmMd_II) || (CurEmMd == kEmMd_IIx)
GLOBALPROC Addr32_ChangeNtfy(void)
void Addr32_ChangeNtfy(void)
{
SetUpMemBanks();
}
#endif
LOCALFUNC ATTep get_address_realblock1(bool WriteMem, CPTR addr)
static ATTep get_address_realblock1(bool WriteMem, CPTR addr)
{
ATTep p;
@ -1492,7 +1492,7 @@ Label_Retry:
return p;
}
GLOBALFUNC uint8_t * get_real_address0(uint32_t L, bool WritableMem, CPTR addr,
uint8_t * get_real_address0(uint32_t L, bool WritableMem, CPTR addr,
uint32_t *actL)
{
uint32_t bankleft;
@ -1519,9 +1519,9 @@ GLOBALFUNC uint8_t * get_real_address0(uint32_t L, bool WritableMem, CPTR addr,
return p;
}
GLOBALVAR bool InterruptButton = false;
bool InterruptButton = false;
GLOBALPROC SetInterruptButton(bool v)
void SetInterruptButton(bool v)
{
if (InterruptButton != v) {
InterruptButton = v;
@ -1529,9 +1529,9 @@ GLOBALPROC SetInterruptButton(bool v)
}
}
LOCALVAR uint8_t CurIPL = 0;
static uint8_t CurIPL = 0;
GLOBALPROC VIAorSCCinterruptChngNtfy(void)
void VIAorSCCinterruptChngNtfy(void)
{
#if (CurEmMd == kEmMd_II) || (CurEmMd == kEmMd_IIx)
uint8_t NewIPL;
@ -1560,7 +1560,7 @@ GLOBALPROC VIAorSCCinterruptChngNtfy(void)
}
}
GLOBALFUNC bool AddrSpac_Init(void)
bool AddrSpac_Init(void)
{
int i;
@ -1573,15 +1573,15 @@ GLOBALFUNC bool AddrSpac_Init(void)
return true;
}
GLOBALPROC Memory_Reset(void)
void Memory_Reset(void)
{
MemOverlay = 1;
SetUpMemBanks();
}
#if (CurEmMd == kEmMd_II) || (CurEmMd == kEmMd_IIx)
EXPORTPROC PowerOff_ChangeNtfy(void);
GLOBALPROC PowerOff_ChangeNtfy(void)
extern void PowerOff_ChangeNtfy(void);
void PowerOff_ChangeNtfy(void)
{
if (! VIA2_iB2) {
ForceMacOff = true;
@ -1592,7 +1592,7 @@ GLOBALPROC PowerOff_ChangeNtfy(void)
/* user event queue utilities */
#if HaveMasterEvtQLock
GLOBALVAR uint16_t MasterEvtQLock = 0;
uint16_t MasterEvtQLock = 0;
/*
Takes a few ticks to process button event because
of debounce code of Mac. So have this mechanism
@ -1600,7 +1600,7 @@ GLOBALVAR uint16_t MasterEvtQLock = 0;
*/
#endif
GLOBALFUNC bool FindKeyEvent(int *VirtualKey, bool *KeyDown)
bool FindKeyEvent(int *VirtualKey, bool *KeyDown)
{
EvtQEl *p;
@ -1627,28 +1627,28 @@ GLOBALFUNC bool FindKeyEvent(int *VirtualKey, bool *KeyDown)
#include <stdio.h>
#endif
GLOBALVAR uimr ICTactive;
GLOBALVAR iCountt ICTwhen[kNumICTs];
uimr ICTactive;
iCountt ICTwhen[kNumICTs];
GLOBALPROC ICT_Zap(void)
void ICT_Zap(void)
{
ICTactive = 0;
}
LOCALPROC InsertICT(int taskid, iCountt when)
static void InsertICT(int taskid, iCountt when)
{
ICTwhen[taskid] = when;
ICTactive |= (1 << taskid);
}
GLOBALVAR iCountt NextiCount = 0;
iCountt NextiCount = 0;
GLOBALFUNC iCountt GetCuriCount(void)
iCountt GetCuriCount(void)
{
return NextiCount - GetCyclesRemaining();
}
GLOBALPROC ICT_add(int taskid, uint32_t n)
void ICT_add(int taskid, uint32_t n)
{
/* n must be > 0 */
int32_t x = GetCyclesRemaining();

View File

@ -45,7 +45,7 @@ extern bool ControlKeyPressed;
#define RAMSafetyMarginFudge 4
#define kRAM_Size (kRAMa_Size + kRAMb_Size)
EXPORTVAR(uint8_t *, RAM)
extern uint8_t * RAM;
/*
allocated by MYOSGLUE to be at least
kRAM_Size + RAMSafetyMarginFudge
@ -54,17 +54,17 @@ EXPORTVAR(uint8_t *, RAM)
*/
#if EmVidCard
EXPORTVAR(uint8_t *, VidROM)
extern uint8_t * VidROM;
#endif
#if IncludeVidMem
EXPORTVAR(uint8_t *, VidMem)
extern uint8_t * VidMem;
#endif
EXPORTPROC MemOverlay_ChangeNtfy(void);
extern void MemOverlay_ChangeNtfy(void);
#if (CurEmMd == kEmMd_II) || (CurEmMd == kEmMd_IIx)
EXPORTPROC Addr32_ChangeNtfy(void);
extern void Addr32_ChangeNtfy(void);
#endif
/*
@ -76,7 +76,7 @@ typedef uint32_t CPTR;
mapping of address space to real memory
*/
EXPORTFUNC uint8_t * get_real_address0(uint32_t L, bool WritableMem, CPTR addr,
extern uint8_t * get_real_address0(uint32_t L, bool WritableMem, CPTR addr,
uint32_t *actL);
/*
@ -114,7 +114,7 @@ EXPORTFUNC uint8_t * get_real_address0(uint32_t L, bool WritableMem, CPTR addr,
real memory, i.e. memory mapped devices
*/
EXPORTFUNC bool AddrSpac_Init(void);
extern bool AddrSpac_Init(void);
#define uint32_t_FromSByte(x) ((uint32_t)(int32_t)(int8_t)(uint8_t)(x))
@ -127,19 +127,19 @@ EXPORTFUNC bool AddrSpac_Init(void);
#if WantDisasm
EXPORTPROC dbglog_StartLine(void);
extern void dbglog_StartLine(void);
#else
#define dbglog_StartLine()
#endif
#if dbglog_HAVE
EXPORTPROC dbglog_WriteMemArrow(bool WriteMem);
extern void dbglog_WriteMemArrow(bool WriteMem);
EXPORTPROC dbglog_WriteNote(char *s);
EXPORTPROC dbglog_WriteSetBool(char *s, bool v);
EXPORTPROC dbglog_AddrAccess(char *s,
extern void dbglog_WriteNote(char *s);
extern void dbglog_WriteSetBool(char *s, bool v);
extern void dbglog_AddrAccess(char *s,
uint32_t Data, bool WriteMem, uint32_t addr);
EXPORTPROC dbglog_Access(char *s, uint32_t Data, bool WriteMem);
extern void dbglog_Access(char *s, uint32_t Data, bool WriteMem);
#endif
#if ! WantAbnormalReports
@ -150,17 +150,17 @@ EXPORTPROC dbglog_Access(char *s, uint32_t Data, bool WriteMem);
#else
#define ReportAbnormalID(id, s) DoReportAbnormalID(id)
#endif
EXPORTPROC DoReportAbnormalID(uint16_t id
extern void DoReportAbnormalID(uint16_t id
#if dbglog_HAVE
, char *s
#endif
);
#endif /* WantAbnormalReports */
EXPORTPROC VIAorSCCinterruptChngNtfy(void);
extern void VIAorSCCinterruptChngNtfy(void);
EXPORTVAR(bool, InterruptButton)
EXPORTPROC SetInterruptButton(bool v);
extern bool InterruptButton;
extern void SetInterruptButton(bool v);
enum {
kICT_SubTick,
@ -184,17 +184,17 @@ enum {
kNumICTs
};
EXPORTPROC ICT_add(int taskid, uint32_t n);
extern void ICT_add(int taskid, uint32_t n);
#define iCountt uint32_t
EXPORTFUNC iCountt GetCuriCount(void);
EXPORTPROC ICT_Zap(void);
extern iCountt GetCuriCount(void);
extern void ICT_Zap(void);
EXPORTVAR(uimr, ICTactive)
EXPORTVAR(iCountt, ICTwhen[kNumICTs])
EXPORTVAR(iCountt, NextiCount)
extern uimr ICTactive;
extern iCountt ICTwhen[kNumICTs];
extern iCountt NextiCount;
EXPORTVAR(uint8_t, Wires[kNumWires])
extern uint8_t Wires[kNumWires];
#define kLn2CycleScale 6
#define kCycleScale (1 << kLn2CycleScale)
@ -209,9 +209,9 @@ EXPORTVAR(uint8_t, Wires[kNumWires])
#define HaveMasterEvtQLock EmClassicKbrd
#if HaveMasterEvtQLock
EXPORTVAR(uint16_t, MasterEvtQLock)
extern uint16_t MasterEvtQLock;
#endif
EXPORTFUNC bool FindKeyEvent(int *VirtualKey, bool *KeyDown);
extern bool FindKeyEvent(int *VirtualKey, bool *KeyDown);
/* minivmac extensions */
@ -245,13 +245,13 @@ enum {
#define kcom_callcheck 0x5B17
EXPORTVAR(uint32_t, disk_icon_addr)
extern uint32_t disk_icon_addr;
EXPORTPROC Memory_Reset(void);
extern void Memory_Reset(void);
EXPORTPROC Extn_Reset(void);
extern void Extn_Reset(void);
EXPORTPROC customreset(void);
extern void customreset(void);
struct ATTer {
struct ATTer *Next;
@ -280,8 +280,8 @@ typedef ATTer *ATTep;
#define kATTA_mmdvmask (1 << kATTA_mmdvbit)
#define kATTA_ntfymask (1 << kATTA_ntfybit)
EXPORTFUNC uint32_t MMDV_Access(ATTep p, uint32_t Data,
extern uint32_t MMDV_Access(ATTep p, uint32_t Data,
bool WriteMem, bool ByteSize, CPTR addr);
EXPORTFUNC bool MemAccessNtfy(ATTep pT);
extern bool MemAccessNtfy(ATTep pT);
#endif

View File

@ -35,15 +35,15 @@
ReportAbnormalID unused 0x0C06 - 0x0CFF
*/
IMPORTPROC ADB_ShiftOutData(uint8_t v);
IMPORTFUNC uint8_t ADB_ShiftInData(void);
extern void ADB_ShiftOutData(uint8_t v);
extern uint8_t ADB_ShiftInData(void);
#include "HW/ADB/ADBSHARE.h"
LOCALVAR bool ADB_ListenDatBuf;
LOCALVAR uint8_t ADB_IndexDatBuf;
static bool ADB_ListenDatBuf;
static uint8_t ADB_IndexDatBuf;
GLOBALPROC ADB_DoNewState(void)
void ADB_DoNewState(void)
{
uint8_t state = ADB_st1 * 2 + ADB_st0;
#ifdef _VIA_Debug
@ -157,7 +157,7 @@ GLOBALPROC ADB_DoNewState(void)
}
}
GLOBALPROC ADBstate_ChangeNtfy(void)
void ADBstate_ChangeNtfy(void)
{
#ifdef _VIA_Debug
fprintf(stderr, "ADBstate_ChangeNtfy: %d, %d, %d\n",
@ -179,14 +179,14 @@ GLOBALPROC ADBstate_ChangeNtfy(void)
*/
}
GLOBALPROC ADB_DataLineChngNtfy(void)
void ADB_DataLineChngNtfy(void)
{
#ifdef _VIA_Debug
fprintf(stderr, "ADB_DataLineChngNtfy: %d\n", ADB_Data);
#endif
}
GLOBALPROC ADB_Update(void)
void ADB_Update(void)
{
uint8_t state = ADB_st1 * 2 + ADB_st0;

View File

@ -21,7 +21,7 @@
#endif
EXPORTPROC ADBstate_ChangeNtfy(void);
EXPORTPROC ADB_DoNewState(void);
EXPORTPROC ADB_DataLineChngNtfy(void);
EXPORTPROC ADB_Update(void);
extern void ADBstate_ChangeNtfy(void);
extern void ADB_DoNewState(void);
extern void ADB_DataLineChngNtfy(void);
extern void ADB_Update(void);

View File

@ -32,18 +32,18 @@
#define ADB_MaxSzDatBuf 8
LOCALVAR uint8_t ADB_SzDatBuf;
LOCALVAR bool ADB_TalkDatBuf = false;
LOCALVAR uint8_t ADB_DatBuf[ADB_MaxSzDatBuf];
LOCALVAR uint8_t ADB_CurCmd = 0;
LOCALVAR uint8_t NotSoRandAddr = 1;
static uint8_t ADB_SzDatBuf;
static bool ADB_TalkDatBuf = false;
static uint8_t ADB_DatBuf[ADB_MaxSzDatBuf];
static uint8_t ADB_CurCmd = 0;
static uint8_t NotSoRandAddr = 1;
LOCALVAR uint8_t MouseADBAddress;
LOCALVAR bool SavedCurMouseButton = false;
LOCALVAR uint16_t MouseADBDeltaH = 0;
LOCALVAR uint16_t MouseADBDeltaV = 0;
static uint8_t MouseADBAddress;
static bool SavedCurMouseButton = false;
static uint16_t MouseADBDeltaH = 0;
static uint16_t MouseADBDeltaV = 0;
LOCALPROC ADB_DoMouseTalk(void)
static void ADB_DoMouseTalk(void)
{
switch (ADB_CurCmd & 3) {
case 0:
@ -118,7 +118,7 @@ LOCALPROC ADB_DoMouseTalk(void)
}
}
LOCALPROC ADB_DoMouseListen(void)
static void ADB_DoMouseListen(void)
{
switch (ADB_CurCmd & 3) {
case 3:
@ -137,9 +137,9 @@ LOCALPROC ADB_DoMouseListen(void)
}
}
LOCALVAR uint8_t KeyboardADBAddress;
static uint8_t KeyboardADBAddress;
LOCALFUNC bool CheckForADBkeyEvt(uint8_t *NextADBkeyevt)
static bool CheckForADBkeyEvt(uint8_t *NextADBkeyevt)
{
int i;
bool KeyDown;
@ -177,7 +177,7 @@ LOCALFUNC bool CheckForADBkeyEvt(uint8_t *NextADBkeyevt)
}
}
LOCALPROC ADB_DoKeyboardTalk(void)
static void ADB_DoKeyboardTalk(void)
{
switch (ADB_CurCmd & 3) {
case 0:
@ -210,7 +210,7 @@ LOCALPROC ADB_DoKeyboardTalk(void)
}
}
LOCALPROC ADB_DoKeyboardListen(void)
static void ADB_DoKeyboardListen(void)
{
switch (ADB_CurCmd & 3) {
case 3:
@ -229,7 +229,7 @@ LOCALPROC ADB_DoKeyboardListen(void)
}
}
LOCALFUNC bool CheckForADBanyEvt(void)
static bool CheckForADBanyEvt(void)
{
EvtQEl *p = EvtQOutP();
if (nullpr != p) {
@ -247,7 +247,7 @@ LOCALFUNC bool CheckForADBanyEvt(void)
return (0 != MouseADBDeltaH) && (0 != MouseADBDeltaV);
}
LOCALPROC ADB_DoTalk(void)
static void ADB_DoTalk(void)
{
uint8_t Address = ADB_CurCmd >> 4;
if (Address == MouseADBAddress) {
@ -257,7 +257,7 @@ LOCALPROC ADB_DoTalk(void)
}
}
LOCALPROC ADB_EndListen(void)
static void ADB_EndListen(void)
{
uint8_t Address = ADB_CurCmd >> 4;
if (Address == MouseADBAddress) {
@ -267,13 +267,13 @@ LOCALPROC ADB_EndListen(void)
}
}
LOCALPROC ADB_DoReset(void)
static void ADB_DoReset(void)
{
MouseADBAddress = 3;
KeyboardADBAddress = 2;
}
LOCALPROC ADB_Flush(void)
static void ADB_Flush(void)
{
uint8_t Address = ADB_CurCmd >> 4;

View File

@ -81,7 +81,7 @@ typedef struct
IWM_Ty IWM;
GLOBALPROC IWM_Reset(void)
void IWM_Reset(void)
{
IWM.DataIn = IWM.Handshake = IWM.Status = IWM.Mode =
IWM.DataOut = IWM.Lines = 0;
@ -89,7 +89,7 @@ GLOBALPROC IWM_Reset(void)
typedef enum {On, Off} Mode_Ty;
LOCALPROC IWM_Set_Lines(uint8_t line, Mode_Ty the_mode)
static void IWM_Set_Lines(uint8_t line, Mode_Ty the_mode)
{
if (the_mode == Off) {
IWM.Lines &= (0xFF - line);
@ -98,7 +98,7 @@ LOCALPROC IWM_Set_Lines(uint8_t line, Mode_Ty the_mode)
}
}
LOCALFUNC uint8_t IWM_Read_Reg(void)
static uint8_t IWM_Read_Reg(void)
{
switch ((IWM.Lines & (kq6 + kq7)) >> 6) {
case 0 :
@ -136,7 +136,7 @@ LOCALFUNC uint8_t IWM_Read_Reg(void)
}
}
LOCALPROC IWM_Write_Reg(uint8_t in)
static void IWM_Write_Reg(uint8_t in)
{
if (((IWM.Lines & kmtr) >> 4) == 0) {
#ifdef _IWM_Debug
@ -147,7 +147,7 @@ LOCALPROC IWM_Write_Reg(uint8_t in)
}
}
GLOBALFUNC uint32_t IWM_Access(uint32_t Data, bool WriteMem, CPTR addr)
uint32_t IWM_Access(uint32_t Data, bool WriteMem, CPTR addr)
{
switch (addr) {
case kph0L :

View File

@ -17,8 +17,8 @@
#ifndef IWMEVDEV_H
#define IWMEVDEV_H
EXPORTPROC IWM_Reset(void);
extern void IWM_Reset(void);
EXPORTFUNC uint32_t IWM_Access(uint32_t Data, bool WriteMem, CPTR addr);
extern uint32_t IWM_Access(uint32_t Data, bool WriteMem, CPTR addr);
#endif

View File

@ -44,14 +44,14 @@
*/
LOCALVAR uint32_t vSonyMountedMask = 0;
static uint32_t vSonyMountedMask = 0;
#define vSonyIsLocked(Drive_No) \
((vSonyWritableMask & ((uint32_t)1 << (Drive_No))) == 0)
#define vSonyIsMounted(Drive_No) \
((vSonyMountedMask & ((uint32_t)1 << (Drive_No))) != 0)
LOCALFUNC bool vSonyNextPendingInsert0(tDrive *Drive_No)
static bool vSonyNextPendingInsert0(tDrive *Drive_No)
{
/* find next drive to Mount */
uint32_t MountPending = vSonyInsertedMask & (~ vSonyMountedMask);
@ -68,7 +68,7 @@ LOCALFUNC bool vSonyNextPendingInsert0(tDrive *Drive_No)
return false;
}
LOCALFUNC MacErr_t CheckReadableDrive(tDrive Drive_No)
static MacErr_t CheckReadableDrive(tDrive Drive_No)
{
MacErr_t result;
@ -83,7 +83,7 @@ LOCALFUNC MacErr_t CheckReadableDrive(tDrive Drive_No)
return result;
}
LOCALFUNC MacErr_t vSonyTransferVM(bool IsWrite,
static MacErr_t vSonyTransferVM(bool IsWrite,
CPTR Buffera, tDrive Drive_No,
uint32_t Sony_Start, uint32_t Sony_Count, uint32_t *Sony_ActCount)
{
@ -124,7 +124,7 @@ label_1:
return result;
}
LOCALPROC MoveBytesVM(CPTR srcPtr, CPTR dstPtr, int32_t byteCount)
static void MoveBytesVM(CPTR srcPtr, CPTR dstPtr, int32_t byteCount)
{
uint8_t * src;
uint8_t * dst;
@ -151,13 +151,13 @@ label_1:
}
}
LOCALVAR uint32_t ImageDataOffset[NumDrives];
static uint32_t ImageDataOffset[NumDrives];
/* size of any header in disk image file */
LOCALVAR uint32_t ImageDataSize[NumDrives];
static uint32_t ImageDataSize[NumDrives];
/* size of disk image file contents */
#if Sony_SupportTags
LOCALVAR uint32_t ImageTagOffset[NumDrives];
static uint32_t ImageTagOffset[NumDrives];
/* offset to disk image file tags */
#endif
@ -176,7 +176,7 @@ LOCALVAR uint32_t ImageTagOffset[NumDrives];
#define ChecksumBlockSize 1024
#if Sony_SupportDC42 && Sony_WantChecksumsUpdated
LOCALFUNC MacErr_t DC42BlockChecksum(tDrive Drive_No,
static MacErr_t DC42BlockChecksum(tDrive Drive_No,
uint32_t Sony_Start, uint32_t Sony_Count, uint32_t *r)
{
MacErr_t result;
@ -230,7 +230,7 @@ LOCALFUNC MacErr_t DC42BlockChecksum(tDrive Drive_No,
#endif
#if Sony_WantChecksumsUpdated
LOCALPROC Drive_UpdateChecksums(tDrive Drive_No)
static void Drive_UpdateChecksums(tDrive Drive_No)
{
if (! vSonyIsLocked(Drive_No)) {
uint32_t DataOffset = ImageDataOffset[Drive_No];
@ -291,7 +291,7 @@ LOCALPROC Drive_UpdateChecksums(tDrive Drive_No)
#define Sony_SupportOtherFormats Sony_SupportDC42
LOCALFUNC MacErr_t vSonyNextPendingInsert(tDrive *Drive_No)
static MacErr_t vSonyNextPendingInsert(tDrive *Drive_No)
{
tDrive i;
MacErr_t result;
@ -432,12 +432,12 @@ LOCALFUNC MacErr_t vSonyNextPendingInsert(tDrive *Drive_No)
if call PostEvent too frequently, insert events seem to get lost
*/
LOCALVAR uint16_t DelayUntilNextInsert;
static uint16_t DelayUntilNextInsert;
LOCALVAR CPTR MountCallBack = 0;
static CPTR MountCallBack = 0;
/* This checks to see if a disk (image) has been inserted */
GLOBALPROC Sony_Update (void)
void Sony_Update (void)
{
if (DelayUntilNextInsert != 0) {
--DelayUntilNextInsert;
@ -469,7 +469,7 @@ GLOBALPROC Sony_Update (void)
}
}
LOCALFUNC MacErr_t Drive_Transfer(bool IsWrite, CPTR Buffera,
static MacErr_t Drive_Transfer(bool IsWrite, CPTR Buffera,
tDrive Drive_No, uint32_t Sony_Start, uint32_t Sony_Count,
uint32_t *Sony_ActCount)
{
@ -510,14 +510,14 @@ LOCALFUNC MacErr_t Drive_Transfer(bool IsWrite, CPTR Buffera,
return result;
}
LOCALVAR bool QuitOnEject = false;
static bool QuitOnEject = false;
GLOBALPROC Sony_SetQuitOnEject(void)
void Sony_SetQuitOnEject(void)
{
QuitOnEject = true;
}
LOCALFUNC MacErr_t Drive_Eject(tDrive Drive_No)
static MacErr_t Drive_Eject(tDrive Drive_No)
{
MacErr_t result;
@ -539,7 +539,7 @@ LOCALFUNC MacErr_t Drive_Eject(tDrive Drive_No)
}
#if IncludeSonyNew
LOCALFUNC MacErr_t Drive_EjectDelete(tDrive Drive_No)
static MacErr_t Drive_EjectDelete(tDrive Drive_No)
{
MacErr_t result;
@ -557,7 +557,7 @@ LOCALFUNC MacErr_t Drive_EjectDelete(tDrive Drive_No)
}
#endif
GLOBALPROC Sony_EjectAllDisks(void)
void Sony_EjectAllDisks(void)
{
tDrive i;
@ -572,7 +572,7 @@ GLOBALPROC Sony_EjectAllDisks(void)
}
}
GLOBALPROC Sony_Reset(void)
void Sony_Reset(void)
{
DelayUntilNextInsert = 0;
QuitOnEject = false;
@ -617,7 +617,7 @@ GLOBALPROC Sony_Reset(void)
#define kParamDiskBuffer 16
#define kParamDiskDrive_No 20
GLOBALPROC ExtnDisk_Access(CPTR p)
void ExtnDisk_Access(CPTR p)
{
MacErr_t result = mnvm_controlErr;
@ -929,10 +929,10 @@ typedef struct DriverDat_R DriverDat_R;
#define Sony_dolog (dbglog_HAVE && 0)
#if Sony_SupportTags
LOCALVAR CPTR TheTagBuffer;
static CPTR TheTagBuffer;
#endif
LOCALFUNC uint32_t DriveVarsLocation(tDrive Drive_No)
static uint32_t DriveVarsLocation(tDrive Drive_No)
{
CPTR SonyVars = get_vm_long(SonyVarsPtr);
@ -944,7 +944,7 @@ LOCALFUNC uint32_t DriveVarsLocation(tDrive Drive_No)
}
}
LOCALFUNC MacErr_t Sony_Mount(CPTR p)
static MacErr_t Sony_Mount(CPTR p)
{
uint32_t data = get_vm_long(p + ExtnDat_params + 0);
MacErr_t result = mnvm_miscErr;
@ -1035,7 +1035,7 @@ LOCALFUNC MacErr_t Sony_Mount(CPTR p)
}
#if Sony_SupportTags
LOCALFUNC MacErr_t Sony_PrimeTags(tDrive Drive_No,
static MacErr_t Sony_PrimeTags(tDrive Drive_No,
uint32_t Sony_Start, uint32_t Sony_Count, bool IsWrite)
{
MacErr_t result = mnvm_noErr;
@ -1084,7 +1084,7 @@ label_fail:
#endif
/* Handles I/O to disks */
LOCALFUNC MacErr_t Sony_Prime(CPTR p)
static MacErr_t Sony_Prime(CPTR p)
{
MacErr_t result;
uint32_t Sony_Count;
@ -1240,7 +1240,7 @@ label_fail:
}
/* Implements control csCodes for the Sony driver */
LOCALFUNC MacErr_t Sony_Control(CPTR p)
static MacErr_t Sony_Control(CPTR p)
{
MacErr_t result;
CPTR ParamBlk = get_vm_long(p + ExtnDat_params + 0);
@ -1429,7 +1429,7 @@ LOCALFUNC MacErr_t Sony_Control(CPTR p)
}
/* Handles the DriveStatus call */
LOCALFUNC MacErr_t Sony_Status(CPTR p)
static MacErr_t Sony_Status(CPTR p)
{
MacErr_t result;
CPTR ParamBlk = get_vm_long(p + ExtnDat_params + 0);
@ -1473,7 +1473,7 @@ LOCALFUNC MacErr_t Sony_Status(CPTR p)
return result;
}
LOCALFUNC MacErr_t Sony_Close(CPTR p)
static MacErr_t Sony_Close(CPTR p)
{
#if 0
CPTR ParamBlk = get_vm_long(p + ExtnDat_params + 0);
@ -1483,7 +1483,7 @@ LOCALFUNC MacErr_t Sony_Close(CPTR p)
return mnvm_closErr; /* Can't Close Driver */
}
LOCALFUNC MacErr_t Sony_OpenA(CPTR p)
static MacErr_t Sony_OpenA(CPTR p)
{
#if Sony_dolog
dbglog_WriteNote("Sony : OpenA");
@ -1504,7 +1504,7 @@ LOCALFUNC MacErr_t Sony_OpenA(CPTR p)
}
}
LOCALFUNC MacErr_t Sony_OpenB(CPTR p)
static MacErr_t Sony_OpenB(CPTR p)
{
int16_t i;
CPTR dvl;
@ -1579,7 +1579,7 @@ LOCALFUNC MacErr_t Sony_OpenB(CPTR p)
return mnvm_noErr;
}
LOCALFUNC MacErr_t Sony_OpenC(CPTR p)
static MacErr_t Sony_OpenC(CPTR p)
{
#if Sony_dolog
dbglog_WriteNote("Sony : OpenC");
@ -1602,7 +1602,7 @@ LOCALFUNC MacErr_t Sony_OpenC(CPTR p)
#define kCmndSonyOpenC 7
#define kCmndSonyMount 8
GLOBALPROC ExtnSony_Access(CPTR p)
void ExtnSony_Access(CPTR p)
{
MacErr_t result;

View File

@ -20,12 +20,12 @@
#define SONYEMDV_H
#endif
EXPORTPROC ExtnDisk_Access(CPTR p);
EXPORTPROC ExtnSony_Access(CPTR p);
extern void ExtnDisk_Access(CPTR p);
extern void ExtnSony_Access(CPTR p);
EXPORTPROC Sony_SetQuitOnEject(void);
extern void Sony_SetQuitOnEject(void);
EXPORTPROC Sony_EjectAllDisks(void);
EXPORTPROC Sony_Reset(void);
extern void Sony_EjectAllDisks(void);
extern void Sony_Reset(void);
EXPORTPROC Sony_Update(void);
extern void Sony_Update(void);

View File

@ -39,8 +39,8 @@
ReportAbnormalID unused 0x0B03 - 0x0BFF
*/
IMPORTPROC KYBD_ShiftOutData(uint8_t v);
IMPORTFUNC uint8_t KYBD_ShiftInData(void);
extern void KYBD_ShiftOutData(uint8_t v);
extern uint8_t KYBD_ShiftInData(void);
enum {
kKybdStateIdle,
@ -51,12 +51,12 @@ enum {
kKybdStates
};
LOCALVAR int KybdState = kKybdStateIdle;
static int KybdState = kKybdStateIdle;
LOCALVAR bool HaveKeyBoardResult = false;
LOCALVAR uint8_t KeyBoardResult;
static bool HaveKeyBoardResult = false;
static uint8_t KeyBoardResult;
LOCALPROC GotKeyBoardData(uint8_t v)
static void GotKeyBoardData(uint8_t v)
{
if (KybdState != kKybdStateIdle) {
HaveKeyBoardResult = true;
@ -67,9 +67,9 @@ LOCALPROC GotKeyBoardData(uint8_t v)
}
}
LOCALVAR uint8_t InstantCommandData = 0x7B;
static uint8_t InstantCommandData = 0x7B;
LOCALFUNC bool AttemptToFinishInquiry(void)
static bool AttemptToFinishInquiry(void)
{
int i;
bool KeyDown;
@ -103,9 +103,9 @@ LOCALFUNC bool AttemptToFinishInquiry(void)
to keep connection.
*/
LOCALVAR int InquiryCommandTimer = 0;
static int InquiryCommandTimer = 0;
GLOBALPROC DoKybd_ReceiveCommand(void)
void DoKybd_ReceiveCommand(void)
{
if (KybdState != kKybdStateRecievingCommand) {
ReportAbnormalID(0x0B01,
@ -147,7 +147,7 @@ GLOBALPROC DoKybd_ReceiveCommand(void)
}
}
GLOBALPROC DoKybd_ReceiveEndCommand(void)
void DoKybd_ReceiveEndCommand(void)
{
if (KybdState != kKybdStateRecievingEndCommand) {
ReportAbnormalID(0x0B02,
@ -168,7 +168,7 @@ GLOBALPROC DoKybd_ReceiveEndCommand(void)
}
}
GLOBALPROC Kybd_DataLineChngNtfy(void)
void Kybd_DataLineChngNtfy(void)
{
switch (KybdState) {
case kKybdStateIdle:
@ -199,7 +199,7 @@ GLOBALPROC Kybd_DataLineChngNtfy(void)
}
}
GLOBALPROC KeyBoard_Update(void)
void KeyBoard_Update(void)
{
if (InquiryCommandTimer != 0) {
if (AttemptToFinishInquiry()) {

View File

@ -21,7 +21,7 @@
#endif
EXPORTPROC Kybd_DataLineChngNtfy(void);
EXPORTPROC DoKybd_ReceiveEndCommand(void);
EXPORTPROC DoKybd_ReceiveCommand(void);
EXPORTPROC KeyBoard_Update(void);
extern void Kybd_DataLineChngNtfy(void);
extern void DoKybd_ReceiveEndCommand(void);
extern void DoKybd_ReceiveCommand(void);
extern void KeyBoard_Update(void);

File diff suppressed because it is too large Load Diff

View File

@ -21,7 +21,7 @@
#ifndef DIS1M68K_H
#define DIS1M68K_H
EXPORTPROC DisasmOneOrSave(uint32_t pc);
EXPORTPROC m68k_WantDisasmContext(void);
extern void DisasmOneOrSave(uint32_t pc);
extern void m68k_WantDisasmContext(void);
#endif

View File

@ -28,23 +28,23 @@
*/
LOCALVAR struct fpustruct
static struct fpustruct
{
myfpr fp[8];
CPTR FPIAR; /* Floating point instruction address register */
} fpu_dat;
LOCALPROC myfp_SetFPIAR(uint32_t v)
static void myfp_SetFPIAR(uint32_t v)
{
fpu_dat.FPIAR = v;
}
LOCALFUNC uint32_t myfp_GetFPIAR(void)
static uint32_t myfp_GetFPIAR(void)
{
return fpu_dat.FPIAR;
}
LOCALFUNC bool DecodeAddrModeRegister(uint32_t sz)
static bool DecodeAddrModeRegister(uint32_t sz)
{
uint16_t Dat = V_regs.CurDecOpY.v[0].ArgDat;
uint16_t themode = (Dat >> 3) & 7;
@ -78,7 +78,7 @@ LOCALFUNC bool DecodeAddrModeRegister(uint32_t sz)
}
}
LOCALPROC read_long_double(uint32_t addr, myfpr *r)
static void read_long_double(uint32_t addr, myfpr *r)
{
uint16_t v2;
uint32_t v1;
@ -92,7 +92,7 @@ LOCALPROC read_long_double(uint32_t addr, myfpr *r)
myfp_FromExtendedFormat(r, v2, v1, v0);
}
LOCALPROC write_long_double(uint32_t addr, myfpr *xx)
static void write_long_double(uint32_t addr, myfpr *xx)
{
uint16_t v2;
uint32_t v1;
@ -106,7 +106,7 @@ LOCALPROC write_long_double(uint32_t addr, myfpr *xx)
put_long(addr + 8, v0);
}
LOCALPROC read_double(uint32_t addr, myfpr *r)
static void read_double(uint32_t addr, myfpr *r)
{
uint32_t v1;
uint32_t v0;
@ -117,7 +117,7 @@ LOCALPROC read_double(uint32_t addr, myfpr *r)
myfp_FromDoubleFormat(r, v1, v0);
}
LOCALPROC write_double(uint32_t addr, myfpr *dd)
static void write_double(uint32_t addr, myfpr *dd)
{
uint32_t v1;
uint32_t v0;
@ -129,19 +129,19 @@ LOCALPROC write_double(uint32_t addr, myfpr *dd)
}
#if 0
LOCALPROC read_single(uint32_t addr, myfpr *r)
static void read_single(uint32_t addr, myfpr *r)
{
myfp_FromSingleFormat(r, get_long(addr));
}
LOCALPROC write_single(uint32_t addr, myfpr *ff)
static void write_single(uint32_t addr, myfpr *ff)
{
put_long(addr, myfp_ToSingleFormat(ff));
}
#endif
LOCALFUNC int CheckFPCondition(uint16_t predicate)
static int CheckFPCondition(uint16_t predicate)
{
int condition_true = 0;
@ -417,13 +417,13 @@ LOCALIPROC DoCodeFPU_Scc(void)
}
}
LOCALPROC DoCodeF_InvalidPlusWord(void)
static void DoCodeF_InvalidPlusWord(void)
{
BackupPC();
DoCodeFPU_dflt();
}
LOCALFUNC int CountCSIAlist(uint16_t word2)
static int CountCSIAlist(uint16_t word2)
{
uint16_t regselect = (word2 >> 10) & 0x7;
int num = 0;
@ -441,7 +441,7 @@ LOCALFUNC int CountCSIAlist(uint16_t word2)
return num;
}
LOCALPROC DoCodeFPU_Move_EA_CSIA(uint16_t word2)
static void DoCodeFPU_Move_EA_CSIA(uint16_t word2)
{
int n;
uint32_t ea_value[3];
@ -485,7 +485,7 @@ LOCALPROC DoCodeFPU_Move_EA_CSIA(uint16_t word2)
}
}
LOCALPROC DoCodeFPU_MoveM_CSIA_EA(uint16_t word2)
static void DoCodeFPU_MoveM_CSIA_EA(uint16_t word2)
{
int n;
uint32_t ea_value[3];
@ -529,7 +529,7 @@ LOCALPROC DoCodeFPU_MoveM_CSIA_EA(uint16_t word2)
}
}
LOCALPROC DoCodeFPU_MoveM_EA_list(uint16_t word2)
static void DoCodeFPU_MoveM_EA_list(uint16_t word2)
{
int i;
uint32_t myaddr;
@ -582,7 +582,7 @@ LOCALPROC DoCodeFPU_MoveM_EA_list(uint16_t word2)
}
}
LOCALPROC DoCodeFPU_MoveM_list_EA(uint16_t word2)
static void DoCodeFPU_MoveM_list_EA(uint16_t word2)
{
/* FMOVEM.X <list>, <ea> */
@ -643,7 +643,7 @@ LOCALPROC DoCodeFPU_MoveM_list_EA(uint16_t word2)
}
}
LOCALPROC DoCodeFPU_MoveCR(uint16_t word2)
static void DoCodeFPU_MoveCR(uint16_t word2)
{
/* FMOVECR */
uint16_t opcode = ((uint16_t)(V_regs.CurDecOpY.v[0].AMd) << 8)
@ -667,13 +667,13 @@ LOCALPROC DoCodeFPU_MoveCR(uint16_t word2)
}
}
LOCALPROC SaveResultAndFPSR(myfpr *DestReg, myfpr *result)
static void SaveResultAndFPSR(myfpr *DestReg, myfpr *result)
{
*DestReg = *result;
myfp_SetConditionCodeByteFromResult(result);
}
LOCALPROC DoCodeFPU_GenOp(uint16_t word2, myfpr *source)
static void DoCodeFPU_GenOp(uint16_t word2, myfpr *source)
{
myfpr result;
myfpr t0;
@ -988,14 +988,14 @@ LOCALPROC DoCodeFPU_GenOp(uint16_t word2, myfpr *source)
}
}
LOCALPROC DoCodeFPU_GenOpReg(uint16_t word2)
static void DoCodeFPU_GenOpReg(uint16_t word2)
{
uint16_t regselect = (word2 >> 10) & 0x7;
DoCodeFPU_GenOp(word2, &fpu_dat.fp[regselect]);
}
LOCALPROC DoCodeFPU_GenOpEA(uint16_t word2)
static void DoCodeFPU_GenOpEA(uint16_t word2)
{
myfpr source;
@ -1096,7 +1096,7 @@ LOCALPROC DoCodeFPU_GenOpEA(uint16_t word2)
}
}
LOCALPROC DoCodeFPU_Move_FP_EA(uint16_t word2)
static void DoCodeFPU_Move_FP_EA(uint16_t word2)
{
/* FMOVE FP?, <EA> */

File diff suppressed because it is too large Load Diff

View File

@ -71,7 +71,7 @@ enum {
#define kAvgCycPerInstr (10 * kCycleScale + (40 * kCycleScale / 64))
LOCALFUNC uint8_t GetAMdRegSz(WorkR *p)
static uint8_t GetAMdRegSz(WorkR *p)
{
uint8_t CurAMd;
@ -91,7 +91,7 @@ LOCALFUNC uint8_t GetAMdRegSz(WorkR *p)
return CurAMd;
}
LOCALFUNC uint8_t GetAMdIndirectSz(WorkR *p)
static uint8_t GetAMdIndirectSz(WorkR *p)
{
uint8_t CurAMd;
@ -112,7 +112,7 @@ LOCALFUNC uint8_t GetAMdIndirectSz(WorkR *p)
}
#if WantCycByPriOp
LOCALFUNC uint16_t OpEACalcCyc(WorkR *p, uint8_t m, uint8_t r)
static uint16_t OpEACalcCyc(WorkR *p, uint8_t m, uint8_t r)
{
uint16_t v;
@ -188,7 +188,7 @@ LOCALFUNC uint16_t OpEACalcCyc(WorkR *p, uint8_t m, uint8_t r)
#endif
#if WantCycByPriOp
LOCALFUNC uint16_t OpEADestCalcCyc(WorkR *p, uint8_t m, uint8_t r)
static uint16_t OpEADestCalcCyc(WorkR *p, uint8_t m, uint8_t r)
{
uint16_t v;
@ -252,7 +252,7 @@ LOCALFUNC uint16_t OpEADestCalcCyc(WorkR *p, uint8_t m, uint8_t r)
}
#endif
LOCALPROC SetDcoArgFields(WorkR *p, bool src,
static void SetDcoArgFields(WorkR *p, bool src,
uint8_t CurAMd, uint8_t CurArgDat)
{
if (src) {
@ -264,7 +264,7 @@ LOCALPROC SetDcoArgFields(WorkR *p, bool src,
}
}
LOCALFUNC bool CheckValidAddrMode(WorkR *p,
static bool CheckValidAddrMode(WorkR *p,
uint8_t m, uint8_t r, uint8_t v, bool src)
{
uint8_t CurAMd = 0; /* init to keep compiler happy */
@ -493,7 +493,7 @@ LOCALFUNC bool CheckValidAddrMode(WorkR *p,
}
#if WantCycByPriOp
LOCALFUNC bool LeaPeaEACalcCyc(WorkR *p, uint8_t m, uint8_t r)
static bool LeaPeaEACalcCyc(WorkR *p, uint8_t m, uint8_t r)
{
uint16_t v;
@ -536,43 +536,43 @@ LOCALFUNC bool LeaPeaEACalcCyc(WorkR *p, uint8_t m, uint8_t r)
}
#endif
LOCALFUNC bool IsValidAddrMode(WorkR *p)
static bool IsValidAddrMode(WorkR *p)
{
return CheckValidAddrMode(p,
mode(p), reg(p), kAddrValidAny, false);
}
LOCALFUNC bool CheckDataAltAddrMode(WorkR *p)
static bool CheckDataAltAddrMode(WorkR *p)
{
return CheckValidAddrMode(p,
mode(p), reg(p), kAddrValidDataAlt, false);
}
LOCALFUNC bool CheckDataAddrMode(WorkR *p)
static bool CheckDataAddrMode(WorkR *p)
{
return CheckValidAddrMode(p,
mode(p), reg(p), kAddrValidData, false);
}
LOCALFUNC bool CheckControlAddrMode(WorkR *p)
static bool CheckControlAddrMode(WorkR *p)
{
return CheckValidAddrMode(p,
mode(p), reg(p), kAddrValidControl, false);
}
LOCALFUNC bool CheckControlAltAddrMode(WorkR *p)
static bool CheckControlAltAddrMode(WorkR *p)
{
return CheckValidAddrMode(p,
mode(p), reg(p), kAddrValidControlAlt, false);
}
LOCALFUNC bool CheckAltMemAddrMode(WorkR *p)
static bool CheckAltMemAddrMode(WorkR *p)
{
return CheckValidAddrMode(p,
mode(p), reg(p), kAddrValidAltMem, false);
}
LOCALPROC FindOpSizeFromb76(WorkR *p)
static void FindOpSizeFromb76(WorkR *p)
{
p->opsize = 1 << b76(p);
#if 0
@ -590,7 +590,7 @@ LOCALPROC FindOpSizeFromb76(WorkR *p)
#endif
}
LOCALFUNC uint8_t OpSizeOffset(WorkR *p)
static uint8_t OpSizeOffset(WorkR *p)
{
uint8_t v;
@ -611,7 +611,7 @@ LOCALFUNC uint8_t OpSizeOffset(WorkR *p)
}
LOCALFUNC uint32_t octdat(uint32_t x)
static uint32_t octdat(uint32_t x)
{
if (x == 0) {
return 8;
@ -620,7 +620,7 @@ LOCALFUNC uint32_t octdat(uint32_t x)
}
}
LOCALPROCUSEDONCE DeCode0(WorkR *p)
static void DeCode0(WorkR *p)
{
if (b8(p) == 1) {
if (mode(p) == 1) {
@ -1059,7 +1059,7 @@ LOCALPROCUSEDONCE DeCode0(WorkR *p)
}
}
LOCALPROCUSEDONCE DeCode1(WorkR *p)
static void DeCode1(WorkR *p)
{
p->opsize = 1;
if (md6(p) == 1) { /* MOVEA */
@ -1083,7 +1083,7 @@ LOCALPROCUSEDONCE DeCode1(WorkR *p)
}
}
LOCALPROCUSEDONCE DeCode2(WorkR *p)
static void DeCode2(WorkR *p)
{
p->opsize = 4;
if (md6(p) == 1) { /* MOVEA */
@ -1115,7 +1115,7 @@ LOCALPROCUSEDONCE DeCode2(WorkR *p)
}
}
LOCALPROCUSEDONCE DeCode3(WorkR *p)
static void DeCode3(WorkR *p)
{
p->opsize = 2;
if (md6(p) == 1) { /* MOVEA */
@ -1155,7 +1155,7 @@ LOCALPROCUSEDONCE DeCode3(WorkR *p)
#define MoveAvgN 3
#endif
LOCALFUNC uint16_t MoveMEACalcCyc(WorkR *p, uint8_t m, uint8_t r)
static uint16_t MoveMEACalcCyc(WorkR *p, uint8_t m, uint8_t r)
{
uint16_t v;
@ -1195,7 +1195,7 @@ LOCALFUNC uint16_t MoveMEACalcCyc(WorkR *p, uint8_t m, uint8_t r)
#endif
LOCALPROCUSEDONCE DeCode4(WorkR *p)
static void DeCode4(WorkR *p)
{
if (b8(p) != 0) {
switch (b76(p)) {
@ -1919,7 +1919,7 @@ LOCALPROCUSEDONCE DeCode4(WorkR *p)
}
}
LOCALPROCUSEDONCE DeCode5(WorkR *p)
static void DeCode5(WorkR *p)
{
if (b76(p) == 3) {
p->DecOp.y.v[0].ArgDat = (p->opcode >> 8) & 15;
@ -2037,7 +2037,7 @@ LOCALPROCUSEDONCE DeCode5(WorkR *p)
}
}
LOCALPROCUSEDONCE DeCode6(WorkR *p)
static void DeCode6(WorkR *p)
{
uint32_t cond = (p->opcode >> 8) & 15;
@ -2111,7 +2111,7 @@ LOCALPROCUSEDONCE DeCode6(WorkR *p)
}
}
LOCALPROCUSEDONCE DeCode7(WorkR *p)
static void DeCode7(WorkR *p)
{
if (b8(p) == 0) {
p->opsize = 4;
@ -2126,7 +2126,7 @@ LOCALPROCUSEDONCE DeCode7(WorkR *p)
}
}
LOCALPROCUSEDONCE DeCode8(WorkR *p)
static void DeCode8(WorkR *p)
{
if (b76(p) == 3) {
p->opsize = 2;
@ -2318,7 +2318,7 @@ LOCALPROCUSEDONCE DeCode8(WorkR *p)
}
}
LOCALPROCUSEDONCE DeCode9(WorkR *p)
static void DeCode9(WorkR *p)
{
if (b76(p) == 3) {
/* SUBA 1001dddm11mmmrrr */
@ -2441,7 +2441,7 @@ LOCALPROCUSEDONCE DeCode9(WorkR *p)
}
}
LOCALPROCUSEDONCE DeCodeA(WorkR *p)
static void DeCodeA(WorkR *p)
{
#if WantCycByPriOp
p->Cycles = (34 * kCycleScale
@ -2450,7 +2450,7 @@ LOCALPROCUSEDONCE DeCodeA(WorkR *p)
p->MainClass = kIKindA;
}
LOCALPROCUSEDONCE DeCodeB(WorkR *p)
static void DeCodeB(WorkR *p)
{
if (b76(p) == 3) {
/* CMPA 1011ddds11mmmrrr */
@ -2544,7 +2544,7 @@ LOCALPROCUSEDONCE DeCodeB(WorkR *p)
}
}
LOCALPROCUSEDONCE DeCodeC(WorkR *p)
static void DeCodeC(WorkR *p)
{
if (b76(p) == 3) {
p->opsize = 2;
@ -2705,7 +2705,7 @@ LOCALPROCUSEDONCE DeCodeC(WorkR *p)
}
}
LOCALPROCUSEDONCE DeCodeD(WorkR *p)
static void DeCodeD(WorkR *p)
{
if (b76(p) == 3) {
/* ADDA 1101dddm11mmmrrr */
@ -2812,7 +2812,7 @@ LOCALPROCUSEDONCE DeCodeD(WorkR *p)
}
}
LOCALFUNC uint32_t rolops(WorkR *p, uint32_t x)
static uint32_t rolops(WorkR *p, uint32_t x)
{
uint32_t binop;
@ -2824,7 +2824,7 @@ LOCALFUNC uint32_t rolops(WorkR *p, uint32_t x)
return kIKindAslB + 3 * binop + OpSizeOffset(p);
}
LOCALPROCUSEDONCE DeCodeE(WorkR *p)
static void DeCodeE(WorkR *p)
{
if (b76(p) == 3) {
if ((p->opcode & 0x0800) != 0) {
@ -2918,7 +2918,7 @@ LOCALPROCUSEDONCE DeCodeE(WorkR *p)
}
}
LOCALPROCUSEDONCE DeCodeF(WorkR *p)
static void DeCodeF(WorkR *p)
{
#if WantCycByPriOp
p->Cycles =
@ -2975,7 +2975,7 @@ LOCALPROCUSEDONCE DeCodeF(WorkR *p)
#endif
}
LOCALPROC DeCodeOneOp(WorkR *p)
static void DeCodeOneOp(WorkR *p)
{
switch (p->opcode >> 12) {
case 0x0:
@ -3048,7 +3048,7 @@ LOCALPROC DeCodeOneOp(WorkR *p)
#endif
}
GLOBALPROC M68KITAB_setup(DecOpR *p)
void M68KITAB_setup(DecOpR *p)
{
uint32_t i;
WorkR r;

View File

@ -270,6 +270,6 @@ typedef struct DecOpR DecOpR;
#define SetDcoMainClas(p, xx) ((p)->x.MainClas = (xx))
#define SetDcoCycles(p, xx) ((p)->x.Cycles = (xx))
EXPORTPROC M68KITAB_setup(DecOpR *p);
extern void M68KITAB_setup(DecOpR *p);
#endif

File diff suppressed because it is too large Load Diff

View File

@ -17,20 +17,20 @@
#ifndef MINEM68K_H
#define MINEM68K_H
EXPORTPROC MINEM68K_Init(
extern void MINEM68K_Init(
uint8_t *fIPL);
#if SmallGlobals
EXPORTPROC MINEM68K_ReserveAlloc(void);
extern void MINEM68K_ReserveAlloc(void);
#endif
EXPORTPROC m68k_IPLchangeNtfy(void);
EXPORTPROC DiskInsertedPsuedoException(CPTR newpc, uint32_t data);
EXPORTPROC m68k_reset(void);
extern void m68k_IPLchangeNtfy(void);
extern void DiskInsertedPsuedoException(CPTR newpc, uint32_t data);
extern void m68k_reset(void);
EXPORTFUNC int32_t GetCyclesRemaining(void);
EXPORTPROC SetCyclesRemaining(int32_t n);
extern int32_t GetCyclesRemaining(void);
extern void SetCyclesRemaining(int32_t n);
EXPORTPROC m68k_go_nCycles(uint32_t n);
extern void m68k_go_nCycles(uint32_t n);
/*
general purpose access of address space
@ -38,15 +38,15 @@ EXPORTPROC m68k_go_nCycles(uint32_t n);
memory mapped hardware.)
*/
EXPORTFUNC uint8_t get_vm_byte(CPTR addr);
EXPORTFUNC uint16_t get_vm_word(CPTR addr);
EXPORTFUNC uint32_t get_vm_long(CPTR addr);
extern uint8_t get_vm_byte(CPTR addr);
extern uint16_t get_vm_word(CPTR addr);
extern uint32_t get_vm_long(CPTR addr);
EXPORTPROC put_vm_byte(CPTR addr, uint8_t b);
EXPORTPROC put_vm_word(CPTR addr, uint16_t w);
EXPORTPROC put_vm_long(CPTR addr, uint32_t l);
extern void put_vm_byte(CPTR addr, uint8_t b);
extern void put_vm_word(CPTR addr, uint16_t w);
extern void put_vm_long(CPTR addr, uint32_t l);
EXPORTPROC SetHeadATTel(ATTep p);
EXPORTFUNC ATTep FindATTel(CPTR addr);
extern void SetHeadATTel(ATTep p);
extern ATTep FindATTel(CPTR addr);
#endif

View File

@ -35,7 +35,7 @@
#include "HW/MOUSE/MOUSEMDV.h"
GLOBALPROC Mouse_Update(void)
void Mouse_Update(void)
{
#if HaveMasterEvtQLock
if (0 != MasterEvtQLock) {
@ -119,7 +119,7 @@ GLOBALPROC Mouse_Update(void)
#endif
}
GLOBALPROC Mouse_EndTickNotify(void)
void Mouse_EndTickNotify(void)
{
if (Mouse_Enabled()) {
/* tell platform specific code where the mouse went */

View File

@ -20,5 +20,5 @@
#define MOUSEMDV_H
#endif
EXPORTPROC Mouse_Update(void);
EXPORTPROC Mouse_EndTickNotify(void);
extern void Mouse_Update(void);
extern void Mouse_EndTickNotify(void);

View File

@ -44,27 +44,27 @@ enum {
};
#define PMU_BuffSz 8
LOCALVAR uint8_t PMU_BuffA[PMU_BuffSz];
LOCALVAR uint8_t * PMU_p;
LOCALVAR uint8_t PMU_rem;
LOCALVAR uint8_t PMU_i;
static uint8_t PMU_BuffA[PMU_BuffSz];
static uint8_t * PMU_p;
static uint8_t PMU_rem;
static uint8_t PMU_i;
LOCALVAR int PMUState = kPMUStateReadyForCommand;
static int PMUState = kPMUStateReadyForCommand;
LOCALVAR uint8_t PMU_CurCommand;
LOCALVAR uint8_t PMU_SendNext;
LOCALVAR uint8_t PMU_BuffL;
static uint8_t PMU_CurCommand;
static uint8_t PMU_SendNext;
static uint8_t PMU_BuffL;
LOCALPROC PmuStartSendResult(uint8_t ResultCode, uint8_t L)
static void PmuStartSendResult(uint8_t ResultCode, uint8_t L)
{
PMU_SendNext = ResultCode;
PMU_BuffL = L;
PMUState = kPMUStateSendLength;
}
LOCALVAR uint8_t PARAMRAM[128];
static uint8_t PARAMRAM[128];
LOCALPROC PmuCheckCommandOp(void)
static void PmuCheckCommandOp(void)
{
switch (PMU_CurCommand) {
case 0x10: /* kPMUpowerCntl - power plane/clock control */
@ -262,7 +262,7 @@ LOCALPROC PmuCheckCommandOp(void)
}
}
LOCALPROC LocBuffSetUpNextChunk(void)
static void LocBuffSetUpNextChunk(void)
{
PMU_p = PMU_BuffA;
PMU_rem = PMU_BuffL - PMU_i;
@ -271,7 +271,7 @@ LOCALPROC LocBuffSetUpNextChunk(void)
}
}
LOCALFUNC uint8_t GetPMUbus(void)
static uint8_t GetPMUbus(void)
{
uint8_t v;
@ -294,7 +294,7 @@ LOCALFUNC uint8_t GetPMUbus(void)
return v;
}
LOCALPROC SetPMUbus(uint8_t v)
static void SetPMUbus(uint8_t v)
{
VIA1_iA0 = v & 0x01;
v >>= 1;
@ -313,9 +313,9 @@ LOCALPROC SetPMUbus(uint8_t v)
VIA1_iA7 = v & 0x01;
}
LOCALVAR bool PMU_Sending = false;
static bool PMU_Sending = false;
LOCALPROC PmuCheckCommandCompletion(void)
static void PmuCheckCommandCompletion(void)
{
if (PMU_i == PMU_BuffL) {
PMUState = kPMUStateRecievedCommand;
@ -336,7 +336,7 @@ LOCALPROC PmuCheckCommandCompletion(void)
}
}
GLOBALPROC PmuToReady_ChangeNtfy(void)
void PmuToReady_ChangeNtfy(void)
{
if (PMU_Sending) {
PMU_Sending = false;
@ -432,7 +432,7 @@ GLOBALPROC PmuToReady_ChangeNtfy(void)
}
}
GLOBALPROC PMU_DoTask(void)
void PMU_DoTask(void)
{
if (PMU_Sending) {
PMU_Sending = false;

View File

@ -20,5 +20,5 @@
#define PMUEMDEV_H
#endif
EXPORTPROC PmuToReady_ChangeNtfy(void);
EXPORTPROC PMU_DoTask(void);
extern void PmuToReady_ChangeNtfy(void);
extern void PMU_DoTask(void);

View File

@ -76,11 +76,11 @@ typedef struct
uint8_t PARAMRAM[PARAMRAMSize];
} RTC_Ty;
LOCALVAR RTC_Ty RTC;
static RTC_Ty RTC;
/* RTC Functions */
LOCALVAR uint32_t LastRealDate;
static uint32_t LastRealDate;
#ifndef RTCinitPRAM
#define RTCinitPRAM 1
@ -127,9 +127,9 @@ LOCALVAR uint32_t LastRealDate;
+ (DiskCacheOn << 5) + (MouseScalingOn << 6))
#if dbglog_HAVE && 0
EXPORTPROC DumpRTC(void);
extern void DumpRTC(void);
GLOBALPROC DumpRTC(void)
void DumpRTC(void)
{
int Counter;
@ -143,7 +143,7 @@ GLOBALPROC DumpRTC(void)
}
#endif
GLOBALFUNC bool RTC_Init(void)
bool RTC_Init(void)
{
int Counter;
uint32_t secs;
@ -300,10 +300,10 @@ if ((0 == vMacScreenDepth) || (vMacScreenDepth >= 4)) {
}
#ifdef RTC_OneSecond_PulseNtfy
IMPORTPROC RTC_OneSecond_PulseNtfy(void);
extern void RTC_OneSecond_PulseNtfy(void);
#endif
GLOBALPROC RTC_Interrupt(void)
void RTC_Interrupt(void)
{
uint32_t Seconds = 0;
uint32_t NewRealDate = CurMacDateInSeconds;
@ -326,7 +326,7 @@ GLOBALPROC RTC_Interrupt(void)
}
}
LOCALFUNC uint8_t RTC_Access_PRAM_Reg(uint8_t Data, bool WriteReg, uint8_t t)
static uint8_t RTC_Access_PRAM_Reg(uint8_t Data, bool WriteReg, uint8_t t)
{
if (WriteReg) {
if (! RTC.WrProtect) {
@ -341,7 +341,7 @@ LOCALFUNC uint8_t RTC_Access_PRAM_Reg(uint8_t Data, bool WriteReg, uint8_t t)
return Data;
}
LOCALFUNC uint8_t RTC_Access_Reg(uint8_t Data, bool WriteReg, uint8_t TheCmd)
static uint8_t RTC_Access_Reg(uint8_t Data, bool WriteReg, uint8_t TheCmd)
{
uint8_t t = (TheCmd & 0x7C) >> 2;
if (t < 8) {
@ -377,7 +377,7 @@ LOCALFUNC uint8_t RTC_Access_Reg(uint8_t Data, bool WriteReg, uint8_t TheCmd)
return Data;
}
LOCALPROC RTC_DoCmd(void)
static void RTC_DoCmd(void)
{
switch (RTC.Mode) {
case 0: /* This Byte is a RTC Command */
@ -437,7 +437,7 @@ LOCALPROC RTC_DoCmd(void)
}
}
GLOBALPROC RTCunEnabled_ChangeNtfy(void)
void RTCunEnabled_ChangeNtfy(void)
{
if (RTCunEnabled) {
/* abort anything going on */
@ -455,7 +455,7 @@ GLOBALPROC RTCunEnabled_ChangeNtfy(void)
}
}
GLOBALPROC RTCclock_ChangeNtfy(void)
void RTCclock_ChangeNtfy(void)
{
if (! RTCunEnabled) {
if (RTCclock) {
@ -480,7 +480,7 @@ GLOBALPROC RTCclock_ChangeNtfy(void)
}
}
GLOBALPROC RTCdataLine_ChangeNtfy(void)
void RTCdataLine_ChangeNtfy(void)
{
#if dbglog_HAVE
if (RTC.DataOut) {

View File

@ -17,11 +17,11 @@
#ifndef RTCEMDEV_H
#define RTCEMDEV_H
EXPORTFUNC bool RTC_Init(void);
EXPORTPROC RTC_Interrupt(void);
extern bool RTC_Init(void);
extern void RTC_Interrupt(void);
EXPORTPROC RTCunEnabled_ChangeNtfy(void);
EXPORTPROC RTCclock_ChangeNtfy(void);
EXPORTPROC RTCdataLine_ChangeNtfy(void);
extern void RTCunEnabled_ChangeNtfy(void);
extern void RTCclock_ChangeNtfy(void);
extern void RTCdataLine_ChangeNtfy(void);
#endif

View File

@ -242,11 +242,11 @@ typedef struct {
#endif
} SCC_Ty;
LOCALVAR SCC_Ty SCC;
static SCC_Ty SCC;
#if 0
LOCALVAR int ReadPrint;
LOCALVAR int ReadModem;
static int ReadPrint;
static int ReadModem;
#endif
#if EmLocalTalk
@ -254,7 +254,7 @@ static int rx_data_offset = 0;
/* when data pending, this is used */
#endif
EXPORTFUNC bool SCC_InterruptsEnabled(void)
extern bool SCC_InterruptsEnabled(void)
{
return SCC.MIE;
}
@ -262,7 +262,7 @@ EXPORTFUNC bool SCC_InterruptsEnabled(void)
/* ---- */
/* Function used to update the interrupt state of the SCC */
LOCALPROC CheckSCCInterruptFlag(void)
static void CheckSCCInterruptFlag(void)
{
#if 0 /* ReceiveAInterrupt always false */
bool ReceiveAInterrupt = false
@ -398,7 +398,7 @@ LOCALPROC CheckSCCInterruptFlag(void)
}
}
LOCALPROC SCC_InitChannel(int chan)
static void SCC_InitChannel(int chan)
{
/* anything not done by ResetChannel */
@ -433,7 +433,7 @@ LOCALPROC SCC_InitChannel(int chan)
#endif
}
LOCALPROC SCC_ResetChannel(int chan)
static void SCC_ResetChannel(int chan)
{
/* RR 0 */
#if EmLocalTalk
@ -568,7 +568,7 @@ LOCALPROC SCC_ResetChannel(int chan)
#endif
}
GLOBALPROC SCC_Reset(void)
void SCC_Reset(void)
{
SCCwaitrq = 1;
@ -592,9 +592,9 @@ GLOBALPROC SCC_Reset(void)
#if EmLocalTalk
LOCALVAR bool CTSpacketPending = false;
LOCALVAR uint8_t CTSpacketRxDA;
LOCALVAR uint8_t CTSpacketRxSA;
static bool CTSpacketPending = false;
static uint8_t CTSpacketRxDA;
static uint8_t CTSpacketRxSA;
/*
Function used when all the tx data is sent to the SCC as indicated
@ -605,7 +605,7 @@ LOCALVAR uint8_t CTSpacketRxSA;
handle collision detection and retransmission. Besides this is
what a standard AppleTalk (LocalTalk to EtherTalk) bridge does.
*/
LOCALPROC process_transmit(void)
static void process_transmit(void)
{
/* Check for LLAP packets, which we won't send */
if (LT_TxBuffSz == 3) {
@ -631,7 +631,7 @@ LOCALPROC process_transmit(void)
}
}
LOCALPROC SCC_TxBuffPut(uint8_t Data)
static void SCC_TxBuffPut(uint8_t Data)
{
/* Buffer the data in the transmit buffer */
if (LT_TxBuffSz < LT_TxBfMxSz) {
@ -640,9 +640,9 @@ LOCALPROC SCC_TxBuffPut(uint8_t Data)
}
}
LOCALVAR uint8_t CTSBuffer[4];
static uint8_t CTSBuffer[4];
LOCALPROC GetCTSpacket(void)
static void GetCTSpacket(void)
{
/* Get a single buffer worth of packets at a time */
uint8_t * device_buffer = CTSBuffer;
@ -666,7 +666,7 @@ LOCALPROC GetCTSpacket(void)
This function is called once all the normal packet bytes have been
received.
*/
LOCALPROC rx_complete(void)
static void rx_complete(void)
{
if (SCC.a[1].EndOfFrame) {
ReportAbnormalID(0x0702, "EndOfFrame true in rx_complete");
@ -687,7 +687,7 @@ LOCALPROC rx_complete(void)
SCC.a[1].EndOfFrame = true;
}
LOCALPROC SCC_RxBuffAdvance(void)
static void SCC_RxBuffAdvance(void)
{
uint8_t value;
@ -721,9 +721,9 @@ LOCALPROC SCC_RxBuffAdvance(void)
}
/* LLAP/SDLC address */
LOCALVAR uint8_t node_address = 0;
static uint8_t node_address = 0;
LOCALPROC GetNextPacketForMe(void)
static void GetNextPacketForMe(void)
{
unsigned char dst;
unsigned char src;
@ -764,7 +764,7 @@ label_retry:
External function, called periodically, to poll for any new LTOE
packets. Any new packets are queued into the packet receipt queue.
*/
GLOBALPROC LocalTalkTick(void)
void LocalTalkTick(void)
{
if (SCC.a[1].RxEnable
&& (! SCC.a[1].RxChrAvail))
@ -798,7 +798,7 @@ GLOBALPROC LocalTalkTick(void)
#if 0
LOCALPROC SCC_Interrupt(int Type)
static void SCC_Interrupt(int Type)
{
if (SCC.MIE) { /* Master Interrupt Enable */
@ -812,7 +812,7 @@ LOCALPROC SCC_Interrupt(int Type)
#endif
#if 0
LOCALPROC SCC_Int(void)
static void SCC_Int(void)
{
/* This should be called at regular intervals */
@ -920,7 +920,7 @@ LOCALPROC SCC_Int(void)
#endif
#if SCC_dolog
LOCALPROC SCC_DbgLogChanStartLine(int chan)
static void SCC_DbgLogChanStartLine(int chan)
{
dbglog_StartLine();
dbglog_writeCStr("SCC chan(");
@ -934,7 +934,7 @@ LOCALPROC SCC_DbgLogChanStartLine(int chan)
}
#endif
LOCALFUNC uint8_t SCC_GetRR0(int chan)
static uint8_t SCC_GetRR0(int chan)
{
/* happens on boot always */
@ -966,7 +966,7 @@ LOCALFUNC uint8_t SCC_GetRR0(int chan)
;
}
LOCALFUNC uint8_t SCC_GetRR1(int chan)
static uint8_t SCC_GetRR1(int chan)
{
/* happens in MacCheck */
@ -999,7 +999,7 @@ LOCALFUNC uint8_t SCC_GetRR1(int chan)
return value;
}
LOCALFUNC uint8_t SCC_GetRR2(int chan)
static uint8_t SCC_GetRR2(int chan)
{
/* happens in MacCheck */
/* happens in Print to ImageWriter */
@ -1103,7 +1103,7 @@ LOCALFUNC uint8_t SCC_GetRR2(int chan)
return value;
}
LOCALFUNC uint8_t SCC_GetRR3(int chan)
static uint8_t SCC_GetRR3(int chan)
{
uint8_t value = 0;
@ -1124,7 +1124,7 @@ LOCALFUNC uint8_t SCC_GetRR3(int chan)
return value;
}
LOCALFUNC uint8_t SCC_GetRR8(int chan)
static uint8_t SCC_GetRR8(int chan)
{
uint8_t value = 0;
@ -1160,7 +1160,7 @@ LOCALFUNC uint8_t SCC_GetRR8(int chan)
return value;
}
LOCALFUNC uint8_t SCC_GetRR10(int chan)
static uint8_t SCC_GetRR10(int chan)
{
/* happens on boot with appletalk on */
@ -1174,7 +1174,7 @@ LOCALFUNC uint8_t SCC_GetRR10(int chan)
return value;
}
LOCALFUNC uint8_t SCC_GetRR12(int chan)
static uint8_t SCC_GetRR12(int chan)
{
uint8_t value = 0;
@ -1190,7 +1190,7 @@ LOCALFUNC uint8_t SCC_GetRR12(int chan)
return value;
}
LOCALFUNC uint8_t SCC_GetRR13(int chan)
static uint8_t SCC_GetRR13(int chan)
{
uint8_t value = 0;
@ -1206,7 +1206,7 @@ LOCALFUNC uint8_t SCC_GetRR13(int chan)
return value;
}
LOCALFUNC uint8_t SCC_GetRR15(int chan)
static uint8_t SCC_GetRR15(int chan)
{
uint8_t value = 0;
@ -1236,7 +1236,7 @@ LOCALFUNC uint8_t SCC_GetRR15(int chan)
}
#if SCC_dolog
LOCALPROC SCC_DbgLogChanCmnd(int chan, char *s)
static void SCC_DbgLogChanCmnd(int chan, char *s)
{
SCC_DbgLogChanStartLine(chan);
dbglog_writeCStr(" ");
@ -1246,7 +1246,7 @@ LOCALPROC SCC_DbgLogChanCmnd(int chan, char *s)
#endif
#if SCC_dolog
LOCALPROC SCC_DbgLogChanChngBit(int chan, char *s, bool v)
static void SCC_DbgLogChanChngBit(int chan, char *s, bool v)
{
SCC_DbgLogChanStartLine(chan);
dbglog_writeCStr(" ");
@ -1261,7 +1261,7 @@ LOCALPROC SCC_DbgLogChanChngBit(int chan, char *s, bool v)
}
#endif
LOCALPROC SCC_PutWR0(uint8_t Data, int chan)
static void SCC_PutWR0(uint8_t Data, int chan)
/*
"CRC initialize, initialization commands for the various modes,
Register Pointers"
@ -1396,7 +1396,7 @@ LOCALPROC SCC_PutWR0(uint8_t Data, int chan)
}
}
LOCALPROC SCC_PutWR1(uint8_t Data, int chan)
static void SCC_PutWR1(uint8_t Data, int chan)
/*
"Transmit/Receive interrupt and data transfer mode definition"
*/
@ -1533,7 +1533,7 @@ LOCALPROC SCC_PutWR1(uint8_t Data, int chan)
#endif
}
LOCALPROC SCC_PutWR2(uint8_t Data, int chan)
static void SCC_PutWR2(uint8_t Data, int chan)
/* "Interrupt Vector (accessed through either channel)" */
{
/*
@ -1583,7 +1583,7 @@ LOCALPROC SCC_PutWR2(uint8_t Data, int chan)
}
}
LOCALPROC SCC_PutWR3(uint8_t Data, int chan)
static void SCC_PutWR3(uint8_t Data, int chan)
/* "Receive parameters and control" */
{
#if SCC_TrackMore
@ -1725,7 +1725,7 @@ LOCALPROC SCC_PutWR3(uint8_t Data, int chan)
}
}
LOCALPROC SCC_PutWR4(uint8_t Data, int chan)
static void SCC_PutWR4(uint8_t Data, int chan)
/* "Transmit/Receive miscellaneous parameters and modes" */
{
#if ! (EmLocalTalk || SCC_TrackMore)
@ -1859,7 +1859,7 @@ LOCALPROC SCC_PutWR4(uint8_t Data, int chan)
#endif
}
LOCALPROC SCC_PutWR5(uint8_t Data, int chan)
static void SCC_PutWR5(uint8_t Data, int chan)
/* "Transmit parameters and controls" */
{
/* happens on boot with appletalk on */
@ -1986,7 +1986,7 @@ LOCALPROC SCC_PutWR5(uint8_t Data, int chan)
#endif
}
LOCALPROC SCC_PutWR6(uint8_t Data, int chan)
static void SCC_PutWR6(uint8_t Data, int chan)
/* "Sync characters or SDLC address field" */
{
/* happens on boot with appletalk on */
@ -2012,7 +2012,7 @@ LOCALPROC SCC_PutWR6(uint8_t Data, int chan)
#endif
}
LOCALPROC SCC_PutWR7(uint8_t Data, int chan)
static void SCC_PutWR7(uint8_t Data, int chan)
/* "Sync character or SDLC flag" */
{
/* happens on boot with appletalk on */
@ -2034,7 +2034,7 @@ LOCALPROC SCC_PutWR7(uint8_t Data, int chan)
#endif
}
LOCALPROC SCC_PutWR8(uint8_t Data, int chan)
static void SCC_PutWR8(uint8_t Data, int chan)
/* "Transmit Buffer" */
{
/* happens on boot with appletalk on */
@ -2081,7 +2081,7 @@ LOCALPROC SCC_PutWR8(uint8_t Data, int chan)
}
}
LOCALPROC SCC_PutWR9(uint8_t Data, int chan)
static void SCC_PutWR9(uint8_t Data, int chan)
/*
"Master interrupt control and reset
(accessed through either channel)"
@ -2172,7 +2172,7 @@ LOCALPROC SCC_PutWR9(uint8_t Data, int chan)
}
}
LOCALPROC SCC_PutWR10(uint8_t Data, int chan)
static void SCC_PutWR10(uint8_t Data, int chan)
/* "Miscellaneous transmitter/receiver control bits" */
{
/* happens on boot with appletalk on */
@ -2247,7 +2247,7 @@ LOCALPROC SCC_PutWR10(uint8_t Data, int chan)
#endif
}
LOCALPROC SCC_PutWR11(uint8_t Data, int chan)
static void SCC_PutWR11(uint8_t Data, int chan)
/* "Clock mode control" */
{
/* happens on boot with appletalk on */
@ -2374,7 +2374,7 @@ LOCALPROC SCC_PutWR11(uint8_t Data, int chan)
}
}
LOCALPROC SCC_PutWR12(uint8_t Data, int chan)
static void SCC_PutWR12(uint8_t Data, int chan)
/* "Lower byte of baud rate generator time constant" */
{
/* happens on boot with appletalk on */
@ -2412,7 +2412,7 @@ LOCALPROC SCC_PutWR12(uint8_t Data, int chan)
#endif
}
LOCALPROC SCC_PutWR13(uint8_t Data, int chan)
static void SCC_PutWR13(uint8_t Data, int chan)
/* "Upper byte of baud rate generator time constant" */
{
/* happens on boot with appletalk on */
@ -2442,7 +2442,7 @@ LOCALPROC SCC_PutWR13(uint8_t Data, int chan)
#endif
}
LOCALPROC SCC_PutWR14(uint8_t Data, int chan)
static void SCC_PutWR14(uint8_t Data, int chan)
/* "Miscellaneous control bits" */
{
/* happens on boot with appletalk on */
@ -2526,7 +2526,7 @@ LOCALPROC SCC_PutWR14(uint8_t Data, int chan)
}
}
LOCALPROC SCC_PutWR15(uint8_t Data, int chan)
static void SCC_PutWR15(uint8_t Data, int chan)
/* "External/Status interrupt control" */
{
/* happens on boot always */
@ -2601,7 +2601,7 @@ LOCALPROC SCC_PutWR15(uint8_t Data, int chan)
#endif
}
LOCALFUNC uint8_t SCC_GetReg(int chan, uint8_t SCC_Reg)
static uint8_t SCC_GetReg(int chan, uint8_t SCC_Reg)
{
uint8_t value;
@ -2688,7 +2688,7 @@ LOCALFUNC uint8_t SCC_GetReg(int chan, uint8_t SCC_Reg)
return value;
}
LOCALPROC SCC_PutReg(uint8_t Data, int chan, uint8_t SCC_Reg)
static void SCC_PutReg(uint8_t Data, int chan, uint8_t SCC_Reg)
{
#if SCC_dolog && 0
SCC_DbgLogChanStartLine(chan);
@ -2763,7 +2763,7 @@ LOCALPROC SCC_PutReg(uint8_t Data, int chan, uint8_t SCC_Reg)
#endif
}
GLOBALFUNC uint32_t SCC_Access(uint32_t Data, bool WriteMem, CPTR addr)
uint32_t SCC_Access(uint32_t Data, bool WriteMem, CPTR addr)
{
#if EmLocalTalk
/*

View File

@ -17,15 +17,15 @@
#ifndef SCCEMDEV_H
#define SCCEMDEV_H
EXPORTPROC SCC_Reset(void);
extern void SCC_Reset(void);
EXPORTFUNC uint32_t SCC_Access(uint32_t Data, bool WriteMem, CPTR addr);
extern uint32_t SCC_Access(uint32_t Data, bool WriteMem, CPTR addr);
EXPORTFUNC bool SCC_InterruptsEnabled(void);
extern bool SCC_InterruptsEnabled(void);
#if EmLocalTalk
EXPORTPROC LocalTalkTick(void);
EXPORTFUNC int InitLocalTalk(void);
extern void LocalTalkTick(void);
extern int InitLocalTalk(void);
#endif
#endif

View File

@ -58,7 +58,7 @@
/* now define the procedure */
LOCALPROC ScrnTrns_DoTrans(int16_t top, int16_t left,
static void ScrnTrns_DoTrans(int16_t top, int16_t left,
int16_t bottom, int16_t right)
{
int i;

View File

@ -55,9 +55,9 @@
#define kSCSI_Size 0x00010
LOCALVAR uint8_t SCSI[kSCSI_Size];
static uint8_t SCSI[kSCSI_Size];
GLOBALPROC SCSI_Reset(void)
void SCSI_Reset(void)
{
int i;
@ -66,7 +66,7 @@ GLOBALPROC SCSI_Reset(void)
}
}
LOCALPROC SCSI_BusReset(void)
static void SCSI_BusReset(void)
{
SCSI[scsiRd + sCDR] = 0;
SCSI[scsiWr + sODR] = 0;
@ -93,7 +93,7 @@ LOCALPROC SCSI_BusReset(void)
put_ram_word(0xb22, get_ram_word(0xb22) | 0x8000);
}
LOCALPROC SCSI_Check(void)
static void SCSI_Check(void)
{
/*
The arbitration select/reselect scenario
@ -141,7 +141,7 @@ LOCALPROC SCSI_Check(void)
}
}
GLOBALFUNC uint32_t SCSI_Access(uint32_t Data, bool WriteMem, CPTR addr)
uint32_t SCSI_Access(uint32_t Data, bool WriteMem, CPTR addr)
{
if (addr < (kSCSI_Size / 2)) {
addr *= 2;

View File

@ -17,8 +17,8 @@
#ifndef SCSIEMDV_H
#define SCSIEMDV_H
EXPORTPROC SCSI_Reset(void);
extern void SCSI_Reset(void);
EXPORTFUNC uint32_t SCSI_Access(uint32_t Data, bool WriteMem, CPTR addr);
extern uint32_t SCSI_Access(uint32_t Data, bool WriteMem, CPTR addr);
#endif

View File

@ -33,15 +33,15 @@
ReportAbnormalID unused 0x0F0E, 0x0F1E - 0x0FFF
*/
LOCALVAR uint8_t SoundReg801 = 0;
LOCALVAR uint8_t SoundReg802 = 0;
LOCALVAR uint8_t SoundReg803 = 0;
LOCALVAR uint8_t SoundReg804 = 0;
LOCALVAR uint8_t SoundReg805 = 0;
LOCALVAR uint8_t SoundReg_Volume = 0; /* 0x806 */
/* LOCALVAR uint8_t SoundReg807 = 0; */
static uint8_t SoundReg801 = 0;
static uint8_t SoundReg802 = 0;
static uint8_t SoundReg803 = 0;
static uint8_t SoundReg804 = 0;
static uint8_t SoundReg805 = 0;
static uint8_t SoundReg_Volume = 0; /* 0x806 */
/* static uint8_t SoundReg807 = 0; */
LOCALVAR uint8_t ASC_SampBuff[0x800];
static uint8_t ASC_SampBuff[0x800];
struct ASC_ChanR {
uint8_t freq[4];
@ -49,20 +49,20 @@ struct ASC_ChanR {
};
typedef struct ASC_ChanR ASC_ChanR;
LOCALVAR ASC_ChanR ASC_ChanA[4];
static ASC_ChanR ASC_ChanA[4];
LOCALVAR uint16_t ASC_FIFO_Out = 0;
LOCALVAR uint16_t ASC_FIFO_InA = 0;
LOCALVAR uint16_t ASC_FIFO_InB = 0;
LOCALVAR bool ASC_Playing = false;
static uint16_t ASC_FIFO_Out = 0;
static uint16_t ASC_FIFO_InA = 0;
static uint16_t ASC_FIFO_InB = 0;
static bool ASC_Playing = false;
#define ASC_dolog (dbglog_HAVE && 0)
#ifdef ASC_interrupt_PulseNtfy
IMPORTPROC ASC_interrupt_PulseNtfy(void);
extern void ASC_interrupt_PulseNtfy(void);
#endif
LOCALPROC ASC_RecalcStatus(void)
static void ASC_RecalcStatus(void)
{
if ((1 == SoundReg801) && ASC_Playing) {
if (((uint16_t)(ASC_FIFO_InA - ASC_FIFO_Out)) >= 0x200) {
@ -90,7 +90,7 @@ LOCALPROC ASC_RecalcStatus(void)
}
}
LOCALPROC ASC_ClearFIFO(void)
static void ASC_ClearFIFO(void)
{
ASC_FIFO_Out = 0;
ASC_FIFO_InA = 0;
@ -99,7 +99,7 @@ LOCALPROC ASC_ClearFIFO(void)
ASC_RecalcStatus();
}
GLOBALFUNC uint32_t ASC_Access(uint32_t Data, bool WriteMem, CPTR addr)
uint32_t ASC_Access(uint32_t Data, bool WriteMem, CPTR addr)
{
if (addr < 0x800) {
if (WriteMem) {
@ -517,11 +517,11 @@ GLOBALFUNC uint32_t ASC_Access(uint32_t Data, bool WriteMem, CPTR addr)
= {approx} (x - kCenterSound) / (8 - SoundVolume) + kCenterSound;
*/
LOCALVAR const uint16_t vol_mult[] = {
static const uint16_t vol_mult[] = {
8192, 9362, 10922, 13107, 16384, 21845, 32768
};
LOCALVAR const trSoundSamp vol_offset[] = {
static const trSoundSamp vol_offset[] = {
#if 3 == kLn2SoundSampSz
112, 110, 107, 103, 96, 86, 64, 0
#elif 4 == kLn2SoundSampSz
@ -531,12 +531,12 @@ LOCALVAR const trSoundSamp vol_offset[] = {
#endif
};
LOCALVAR const uint8_t SubTick_n[kNumSubTicks] = {
static const uint8_t SubTick_n[kNumSubTicks] = {
23, 23, 23, 23, 23, 23, 23, 24,
23, 23, 23, 23, 23, 23, 23, 24
};
GLOBALPROC ASC_SubTick(int SubTick)
void ASC_SubTick(int SubTick)
{
uint16_t actL;
#if SoundEnabled

View File

@ -17,7 +17,7 @@
#ifndef ASCEMDEV_H
#define ASCEMDEV_H
EXPORTFUNC uint32_t ASC_Access(uint32_t Data, bool WriteMem, CPTR addr);
EXPORTPROC ASC_SubTick(int SubTick);
extern uint32_t ASC_Access(uint32_t Data, bool WriteMem, CPTR addr);
extern void ASC_SubTick(int SubTick);
#endif

View File

@ -50,11 +50,11 @@
= {approx} (x - kCenterSound) / (8 - SoundVolume) + kCenterSound;
*/
LOCALVAR const uint16_t vol_mult[] = {
static const uint16_t vol_mult[] = {
8192, 9362, 10922, 13107, 16384, 21845, 32768
};
LOCALVAR const trSoundSamp vol_offset[] = {
static const trSoundSamp vol_offset[] = {
#if 3 == kLn2SoundSampSz
112, 110, 107, 103, 96, 86, 64, 0
#elif 4 == kLn2SoundSampSz
@ -64,12 +64,12 @@ LOCALVAR const trSoundSamp vol_offset[] = {
#endif
};
LOCALVAR const uint16_t SubTick_offset[kNumSubTicks] = {
static const uint16_t SubTick_offset[kNumSubTicks] = {
0, 25, 50, 90, 102, 115, 138, 161,
185, 208, 231, 254, 277, 300, 323, 346
};
LOCALVAR const uint8_t SubTick_n[kNumSubTicks] = {
static const uint8_t SubTick_n[kNumSubTicks] = {
25, 25, 40, 12, 13, 23, 23, 24,
23, 23, 23, 23, 23, 23, 23, 24
};
@ -99,12 +99,12 @@ LOCALVAR const uint8_t SubTick_n[kNumSubTicks] = {
writing offset 0 before it is read.
*/
LOCALVAR uint32_t SoundInvertPhase = 0;
LOCALVAR uint16_t SoundInvertState = 0;
static uint32_t SoundInvertPhase = 0;
static uint16_t SoundInvertState = 0;
IMPORTFUNC uint16_t GetSoundInvertTime(void);
extern uint16_t GetSoundInvertTime(void);
GLOBALPROC MacSound_SubTick(int SubTick)
void MacSound_SubTick(int SubTick)
{
uint16_t actL;
tpSoundSamp p;

View File

@ -21,5 +21,5 @@
#endif
#if SoundEnabled
EXPORTPROC MacSound_SubTick(int SubTick);
extern void MacSound_SubTick(int SubTick);
#endif

View File

@ -37,71 +37,71 @@
*/
#ifdef VIA2_iA0_ChangeNtfy
IMPORTPROC VIA2_iA0_ChangeNtfy(void);
extern void VIA2_iA0_ChangeNtfy(void);
#endif
#ifdef VIA2_iA1_ChangeNtfy
IMPORTPROC VIA2_iA1_ChangeNtfy(void);
extern void VIA2_iA1_ChangeNtfy(void);
#endif
#ifdef VIA2_iA2_ChangeNtfy
IMPORTPROC VIA2_iA2_ChangeNtfy(void);
extern void VIA2_iA2_ChangeNtfy(void);
#endif
#ifdef VIA2_iA3_ChangeNtfy
IMPORTPROC VIA2_iA3_ChangeNtfy(void);
extern void VIA2_iA3_ChangeNtfy(void);
#endif
#ifdef VIA2_iA4_ChangeNtfy
IMPORTPROC VIA2_iA4_ChangeNtfy(void);
extern void VIA2_iA4_ChangeNtfy(void);
#endif
#ifdef VIA2_iA5_ChangeNtfy
IMPORTPROC VIA2_iA5_ChangeNtfy(void);
extern void VIA2_iA5_ChangeNtfy(void);
#endif
#ifdef VIA2_iA6_ChangeNtfy
IMPORTPROC VIA2_iA6_ChangeNtfy(void);
extern void VIA2_iA6_ChangeNtfy(void);
#endif
#ifdef VIA2_iA7_ChangeNtfy
IMPORTPROC VIA2_iA7_ChangeNtfy(void);
extern void VIA2_iA7_ChangeNtfy(void);
#endif
#ifdef VIA2_iB0_ChangeNtfy
IMPORTPROC VIA2_iB0_ChangeNtfy(void);
extern void VIA2_iB0_ChangeNtfy(void);
#endif
#ifdef VIA2_iB1_ChangeNtfy
IMPORTPROC VIA2_iB1_ChangeNtfy(void);
extern void VIA2_iB1_ChangeNtfy(void);
#endif
#ifdef VIA2_iB2_ChangeNtfy
IMPORTPROC VIA2_iB2_ChangeNtfy(void);
extern void VIA2_iB2_ChangeNtfy(void);
#endif
#ifdef VIA2_iB3_ChangeNtfy
IMPORTPROC VIA2_iB3_ChangeNtfy(void);
extern void VIA2_iB3_ChangeNtfy(void);
#endif
#ifdef VIA2_iB4_ChangeNtfy
IMPORTPROC VIA2_iB4_ChangeNtfy(void);
extern void VIA2_iB4_ChangeNtfy(void);
#endif
#ifdef VIA2_iB5_ChangeNtfy
IMPORTPROC VIA2_iB5_ChangeNtfy(void);
extern void VIA2_iB5_ChangeNtfy(void);
#endif
#ifdef VIA2_iB6_ChangeNtfy
IMPORTPROC VIA2_iB6_ChangeNtfy(void);
extern void VIA2_iB6_ChangeNtfy(void);
#endif
#ifdef VIA2_iB7_ChangeNtfy
IMPORTPROC VIA2_iB7_ChangeNtfy(void);
extern void VIA2_iB7_ChangeNtfy(void);
#endif
#ifdef VIA2_iCB2_ChangeNtfy
IMPORTPROC VIA2_iCB2_ChangeNtfy(void);
extern void VIA2_iCB2_ChangeNtfy(void);
#endif
#define Ui3rPowOf2(p) (1 << (p))
@ -225,7 +225,7 @@ typedef struct {
uint8_t ORA; /* Buffer A */
} VIA2_Ty;
LOCALVAR VIA2_Ty VIA2_D;
static VIA2_Ty VIA2_D;
#define kIntCA2 0 /* One_Second */
#define kIntCA1 1 /* Vertical_Blanking */
@ -243,7 +243,7 @@ LOCALVAR VIA2_Ty VIA2_D;
about their status
*/
LOCALFUNC uint8_t VIA2_Get_ORA(uint8_t Selection)
static uint8_t VIA2_Get_ORA(uint8_t Selection)
{
uint8_t Value = (~ VIA2_ORA_CanIn) & Selection & VIA2_ORA_FloatVal;
@ -304,7 +304,7 @@ LOCALFUNC uint8_t VIA2_Get_ORA(uint8_t Selection)
about their status
*/
LOCALFUNC uint8_t VIA2_Get_ORB(uint8_t Selection)
static uint8_t VIA2_Get_ORB(uint8_t Selection)
{
uint8_t Value = (~ VIA2_ORB_CanIn) & Selection & VIA2_ORB_FloatVal;
@ -363,7 +363,7 @@ LOCALFUNC uint8_t VIA2_Get_ORB(uint8_t Selection)
(Ui3rTestBit(Selection, p) && \
((v = (Data >> p) & 1) != x))
LOCALPROC VIA2_Put_ORA(uint8_t Selection, uint8_t Data)
static void VIA2_Put_ORA(uint8_t Selection, uint8_t Data)
{
#if 0 != VIA2_ORA_CanOut
uint8_t v;
@ -442,7 +442,7 @@ LOCALPROC VIA2_Put_ORA(uint8_t Selection, uint8_t Data)
#endif
}
LOCALPROC VIA2_Put_ORB(uint8_t Selection, uint8_t Data)
static void VIA2_Put_ORB(uint8_t Selection, uint8_t Data)
{
#if 0 != VIA2_ORB_CanOut
uint8_t v;
@ -521,7 +521,7 @@ LOCALPROC VIA2_Put_ORB(uint8_t Selection, uint8_t Data)
#endif
}
LOCALPROC VIA2_SetDDR_A(uint8_t Data)
static void VIA2_SetDDR_A(uint8_t Data)
{
uint8_t floatbits = VIA2_D.DDR_A & ~ Data;
uint8_t unfloatbits = Data & ~ VIA2_D.DDR_A;
@ -539,7 +539,7 @@ LOCALPROC VIA2_SetDDR_A(uint8_t Data)
}
}
LOCALPROC VIA2_SetDDR_B(uint8_t Data)
static void VIA2_SetDDR_B(uint8_t Data)
{
uint8_t floatbits = VIA2_D.DDR_B & ~ Data;
uint8_t unfloatbits = Data & ~ VIA2_D.DDR_B;
@ -558,7 +558,7 @@ LOCALPROC VIA2_SetDDR_B(uint8_t Data)
}
LOCALPROC VIA2_CheckInterruptFlag(void)
static void VIA2_CheckInterruptFlag(void)
{
uint8_t NewInterruptRequest =
((VIA2_D.IFR & VIA2_D.IER) != 0) ? 1 : 0;
@ -572,12 +572,12 @@ LOCALPROC VIA2_CheckInterruptFlag(void)
}
LOCALVAR uint8_t VIA2_T1_Active = 0;
LOCALVAR uint8_t VIA2_T2_Active = 0;
static uint8_t VIA2_T1_Active = 0;
static uint8_t VIA2_T2_Active = 0;
LOCALVAR bool VIA2_T1IntReady = false;
static bool VIA2_T1IntReady = false;
LOCALPROC VIA2_Clear(void)
static void VIA2_Clear(void)
{
VIA2_D.ORA = 0; VIA2_D.DDR_A = 0;
VIA2_D.ORB = 0; VIA2_D.DDR_B = 0;
@ -591,13 +591,13 @@ LOCALPROC VIA2_Clear(void)
VIA2_T1IntReady = false;
}
GLOBALPROC VIA2_Zap(void)
void VIA2_Zap(void)
{
VIA2_Clear();
VIA2_InterruptRequest = 0;
}
GLOBALPROC VIA2_Reset(void)
void VIA2_Reset(void)
{
VIA2_SetDDR_A(0);
VIA2_SetDDR_B(0);
@ -607,13 +607,13 @@ GLOBALPROC VIA2_Reset(void)
VIA2_CheckInterruptFlag();
}
LOCALPROC VIA2_SetInterruptFlag(uint8_t VIA_Int)
static void VIA2_SetInterruptFlag(uint8_t VIA_Int)
{
VIA2_D.IFR |= ((uint8_t)1 << VIA_Int);
VIA2_CheckInterruptFlag();
}
LOCALPROC VIA2_ClrInterruptFlag(uint8_t VIA_Int)
static void VIA2_ClrInterruptFlag(uint8_t VIA_Int)
{
VIA2_D.IFR &= ~ ((uint8_t)1 << VIA_Int);
VIA2_CheckInterruptFlag();
@ -623,7 +623,7 @@ LOCALPROC VIA2_ClrInterruptFlag(uint8_t VIA_Int)
#include <stdio.h>
#endif
GLOBALPROC VIA2_ShiftInData(uint8_t v)
void VIA2_ShiftInData(uint8_t v)
{
/*
external hardware generates 8 pulses on CB1,
@ -650,7 +650,7 @@ GLOBALPROC VIA2_ShiftInData(uint8_t v)
}
}
GLOBALFUNC uint8_t VIA2_ShiftOutData(void)
uint8_t VIA2_ShiftOutData(void)
{
/*
external hardware generates 8 pulses on CB1,
@ -670,10 +670,10 @@ GLOBALFUNC uint8_t VIA2_ShiftOutData(void)
#define CyclesPerViaTime (10 * ClockMult)
#define CyclesScaledPerViaTime (kCycleScale * CyclesPerViaTime)
LOCALVAR bool VIA2_T1Running = true;
LOCALVAR iCountt VIA2_T1LastTime = 0;
static bool VIA2_T1Running = true;
static iCountt VIA2_T1LastTime = 0;
GLOBALPROC VIA2_DoTimer1Check(void)
void VIA2_DoTimer1Check(void)
{
if (VIA2_T1Running) {
iCountt NewTime = GetCuriCount();
@ -745,7 +745,7 @@ GLOBALPROC VIA2_DoTimer1Check(void)
}
}
LOCALPROC CheckT1IntReady(void)
static void CheckT1IntReady(void)
{
if (VIA2_T1Running) {
bool NewT1IntReady = false;
@ -765,7 +765,7 @@ LOCALPROC CheckT1IntReady(void)
}
}
GLOBALFUNC uint16_t VIA2_GetT1InvertTime(void)
uint16_t VIA2_GetT1InvertTime(void)
{
uint16_t v;
@ -777,11 +777,11 @@ GLOBALFUNC uint16_t VIA2_GetT1InvertTime(void)
return v;
}
LOCALVAR bool VIA2_T2Running = true;
LOCALVAR bool VIA2_T2C_ShortTime = false;
LOCALVAR iCountt VIA2_T2LastTime = 0;
static bool VIA2_T2Running = true;
static bool VIA2_T2C_ShortTime = false;
static iCountt VIA2_T2LastTime = 0;
GLOBALPROC VIA2_DoTimer2Check(void)
void VIA2_DoTimer2Check(void)
{
if (VIA2_T2Running) {
iCountt NewTime = GetCuriCount();
@ -837,7 +837,7 @@ GLOBALPROC VIA2_DoTimer2Check(void)
#define kIER 0x0E
#define kORA 0x0F
GLOBALFUNC uint32_t VIA2_Access(uint32_t Data, bool WriteMem, CPTR addr)
uint32_t VIA2_Access(uint32_t Data, bool WriteMem, CPTR addr)
{
switch (addr) {
case kORB :
@ -1167,7 +1167,7 @@ GLOBALFUNC uint32_t VIA2_Access(uint32_t Data, bool WriteMem, CPTR addr)
return Data;
}
GLOBALPROC VIA2_ExtraTimeBegin(void)
void VIA2_ExtraTimeBegin(void)
{
if (VIA2_T1Running) {
VIA2_DoTimer1Check(); /* run up to this moment */
@ -1179,7 +1179,7 @@ GLOBALPROC VIA2_ExtraTimeBegin(void)
}
}
GLOBALPROC VIA2_ExtraTimeEnd(void)
void VIA2_ExtraTimeEnd(void)
{
if (! VIA2_T1Running) {
VIA2_T1Running = true;
@ -1196,28 +1196,28 @@ GLOBALPROC VIA2_ExtraTimeEnd(void)
/* VIA Interrupt Interface */
#ifdef VIA2_iCA1_PulseNtfy
GLOBALPROC VIA2_iCA1_PulseNtfy(void)
void VIA2_iCA1_PulseNtfy(void)
{
VIA2_SetInterruptFlag(kIntCA1);
}
#endif
#ifdef VIA2_iCA2_PulseNtfy
GLOBALPROC VIA2_iCA2_PulseNtfy(void)
void VIA2_iCA2_PulseNtfy(void)
{
VIA2_SetInterruptFlag(kIntCA2);
}
#endif
#ifdef VIA2_iCB1_PulseNtfy
GLOBALPROC VIA2_iCB1_PulseNtfy(void)
void VIA2_iCB1_PulseNtfy(void)
{
VIA2_SetInterruptFlag(kIntCB1);
}
#endif
#ifdef VIA2_iCB2_PulseNtfy
GLOBALPROC VIA2_iCB2_PulseNtfy(void)
void VIA2_iCB2_PulseNtfy(void)
{
VIA2_SetInterruptFlag(kIntCB2);
}

View File

@ -17,31 +17,31 @@
#ifndef VIA2EMDV_H
#define VIA2EMDV_H
EXPORTPROC VIA2_Zap(void);
EXPORTPROC VIA2_Reset(void);
extern void VIA2_Zap(void);
extern void VIA2_Reset(void);
EXPORTFUNC uint32_t VIA2_Access(uint32_t Data, bool WriteMem, CPTR addr);
extern uint32_t VIA2_Access(uint32_t Data, bool WriteMem, CPTR addr);
EXPORTPROC VIA2_ExtraTimeBegin(void);
EXPORTPROC VIA2_ExtraTimeEnd(void);
extern void VIA2_ExtraTimeBegin(void);
extern void VIA2_ExtraTimeEnd(void);
#ifdef VIA2_iCA1_PulseNtfy
EXPORTPROC VIA2_iCA1_PulseNtfy(void);
extern void VIA2_iCA1_PulseNtfy(void);
#endif
#ifdef VIA2_iCA2_PulseNtfy
EXPORTPROC VIA2_iCA2_PulseNtfy(void);
extern void VIA2_iCA2_PulseNtfy(void);
#endif
#ifdef VIA2_iCB1_PulseNtfy
EXPORTPROC VIA2_iCB1_PulseNtfy(void);
extern void VIA2_iCB1_PulseNtfy(void);
#endif
#ifdef VIA2_iCB2_PulseNtfy
EXPORTPROC VIA2_iCB2_PulseNtfy(void);
extern void VIA2_iCB2_PulseNtfy(void);
#endif
EXPORTPROC VIA2_DoTimer1Check(void);
EXPORTPROC VIA2_DoTimer2Check(void);
extern void VIA2_DoTimer1Check(void);
extern void VIA2_DoTimer2Check(void);
EXPORTFUNC uint16_t VIA2_GetT1InvertTime(void);
extern uint16_t VIA2_GetT1InvertTime(void);
EXPORTPROC VIA2_ShiftInData(uint8_t v);
EXPORTFUNC uint8_t VIA2_ShiftOutData(void);
extern void VIA2_ShiftInData(uint8_t v);
extern uint8_t VIA2_ShiftOutData(void);
#endif

View File

@ -37,71 +37,71 @@
*/
#ifdef VIA1_iA0_ChangeNtfy
IMPORTPROC VIA1_iA0_ChangeNtfy(void);
extern void VIA1_iA0_ChangeNtfy(void);
#endif
#ifdef VIA1_iA1_ChangeNtfy
IMPORTPROC VIA1_iA1_ChangeNtfy(void);
extern void VIA1_iA1_ChangeNtfy(void);
#endif
#ifdef VIA1_iA2_ChangeNtfy
IMPORTPROC VIA1_iA2_ChangeNtfy(void);
extern void VIA1_iA2_ChangeNtfy(void);
#endif
#ifdef VIA1_iA3_ChangeNtfy
IMPORTPROC VIA1_iA3_ChangeNtfy(void);
extern void VIA1_iA3_ChangeNtfy(void);
#endif
#ifdef VIA1_iA4_ChangeNtfy
IMPORTPROC VIA1_iA4_ChangeNtfy(void);
extern void VIA1_iA4_ChangeNtfy(void);
#endif
#ifdef VIA1_iA5_ChangeNtfy
IMPORTPROC VIA1_iA5_ChangeNtfy(void);
extern void VIA1_iA5_ChangeNtfy(void);
#endif
#ifdef VIA1_iA6_ChangeNtfy
IMPORTPROC VIA1_iA6_ChangeNtfy(void);
extern void VIA1_iA6_ChangeNtfy(void);
#endif
#ifdef VIA1_iA7_ChangeNtfy
IMPORTPROC VIA1_iA7_ChangeNtfy(void);
extern void VIA1_iA7_ChangeNtfy(void);
#endif
#ifdef VIA1_iB0_ChangeNtfy
IMPORTPROC VIA1_iB0_ChangeNtfy(void);
extern void VIA1_iB0_ChangeNtfy(void);
#endif
#ifdef VIA1_iB1_ChangeNtfy
IMPORTPROC VIA1_iB1_ChangeNtfy(void);
extern void VIA1_iB1_ChangeNtfy(void);
#endif
#ifdef VIA1_iB2_ChangeNtfy
IMPORTPROC VIA1_iB2_ChangeNtfy(void);
extern void VIA1_iB2_ChangeNtfy(void);
#endif
#ifdef VIA1_iB3_ChangeNtfy
IMPORTPROC VIA1_iB3_ChangeNtfy(void);
extern void VIA1_iB3_ChangeNtfy(void);
#endif
#ifdef VIA1_iB4_ChangeNtfy
IMPORTPROC VIA1_iB4_ChangeNtfy(void);
extern void VIA1_iB4_ChangeNtfy(void);
#endif
#ifdef VIA1_iB5_ChangeNtfy
IMPORTPROC VIA1_iB5_ChangeNtfy(void);
extern void VIA1_iB5_ChangeNtfy(void);
#endif
#ifdef VIA1_iB6_ChangeNtfy
IMPORTPROC VIA1_iB6_ChangeNtfy(void);
extern void VIA1_iB6_ChangeNtfy(void);
#endif
#ifdef VIA1_iB7_ChangeNtfy
IMPORTPROC VIA1_iB7_ChangeNtfy(void);
extern void VIA1_iB7_ChangeNtfy(void);
#endif
#ifdef VIA1_iCB2_ChangeNtfy
IMPORTPROC VIA1_iCB2_ChangeNtfy(void);
extern void VIA1_iCB2_ChangeNtfy(void);
#endif
#define Ui3rPowOf2(p) (1 << (p))
@ -225,7 +225,7 @@ typedef struct {
uint8_t ORA; /* Buffer A */
} VIA1_Ty;
LOCALVAR VIA1_Ty VIA1_D;
static VIA1_Ty VIA1_D;
#define kIntCA2 0 /* One_Second */
#define kIntCA1 1 /* Vertical_Blanking */
@ -243,7 +243,7 @@ LOCALVAR VIA1_Ty VIA1_D;
about their status
*/
LOCALFUNC uint8_t VIA1_Get_ORA(uint8_t Selection)
static uint8_t VIA1_Get_ORA(uint8_t Selection)
{
uint8_t Value = (~ VIA1_ORA_CanIn) & Selection & VIA1_ORA_FloatVal;
@ -304,7 +304,7 @@ LOCALFUNC uint8_t VIA1_Get_ORA(uint8_t Selection)
about their status
*/
LOCALFUNC uint8_t VIA1_Get_ORB(uint8_t Selection)
static uint8_t VIA1_Get_ORB(uint8_t Selection)
{
uint8_t Value = (~ VIA1_ORB_CanIn) & Selection & VIA1_ORB_FloatVal;
@ -363,7 +363,7 @@ LOCALFUNC uint8_t VIA1_Get_ORB(uint8_t Selection)
(Ui3rTestBit(Selection, p) && \
((v = (Data >> p) & 1) != x))
LOCALPROC VIA1_Put_ORA(uint8_t Selection, uint8_t Data)
static void VIA1_Put_ORA(uint8_t Selection, uint8_t Data)
{
#if 0 != VIA1_ORA_CanOut
uint8_t v;
@ -442,7 +442,7 @@ LOCALPROC VIA1_Put_ORA(uint8_t Selection, uint8_t Data)
#endif
}
LOCALPROC VIA1_Put_ORB(uint8_t Selection, uint8_t Data)
static void VIA1_Put_ORB(uint8_t Selection, uint8_t Data)
{
#if 0 != VIA1_ORB_CanOut
uint8_t v;
@ -521,7 +521,7 @@ LOCALPROC VIA1_Put_ORB(uint8_t Selection, uint8_t Data)
#endif
}
LOCALPROC VIA1_SetDDR_A(uint8_t Data)
static void VIA1_SetDDR_A(uint8_t Data)
{
uint8_t floatbits = VIA1_D.DDR_A & ~ Data;
uint8_t unfloatbits = Data & ~ VIA1_D.DDR_A;
@ -539,7 +539,7 @@ LOCALPROC VIA1_SetDDR_A(uint8_t Data)
}
}
LOCALPROC VIA1_SetDDR_B(uint8_t Data)
static void VIA1_SetDDR_B(uint8_t Data)
{
uint8_t floatbits = VIA1_D.DDR_B & ~ Data;
uint8_t unfloatbits = Data & ~ VIA1_D.DDR_B;
@ -558,7 +558,7 @@ LOCALPROC VIA1_SetDDR_B(uint8_t Data)
}
LOCALPROC VIA1_CheckInterruptFlag(void)
static void VIA1_CheckInterruptFlag(void)
{
uint8_t NewInterruptRequest =
((VIA1_D.IFR & VIA1_D.IER) != 0) ? 1 : 0;
@ -572,12 +572,12 @@ LOCALPROC VIA1_CheckInterruptFlag(void)
}
LOCALVAR uint8_t VIA1_T1_Active = 0;
LOCALVAR uint8_t VIA1_T2_Active = 0;
static uint8_t VIA1_T1_Active = 0;
static uint8_t VIA1_T2_Active = 0;
LOCALVAR bool VIA1_T1IntReady = false;
static bool VIA1_T1IntReady = false;
LOCALPROC VIA1_Clear(void)
static void VIA1_Clear(void)
{
VIA1_D.ORA = 0; VIA1_D.DDR_A = 0;
VIA1_D.ORB = 0; VIA1_D.DDR_B = 0;
@ -598,7 +598,7 @@ bool VIA1_Zap(void)
return true;
}
GLOBALPROC VIA1_Reset(void)
void VIA1_Reset(void)
{
VIA1_SetDDR_A(0);
VIA1_SetDDR_B(0);
@ -608,13 +608,13 @@ GLOBALPROC VIA1_Reset(void)
VIA1_CheckInterruptFlag();
}
LOCALPROC VIA1_SetInterruptFlag(uint8_t VIA_Int)
static void VIA1_SetInterruptFlag(uint8_t VIA_Int)
{
VIA1_D.IFR |= ((uint8_t)1 << VIA_Int);
VIA1_CheckInterruptFlag();
}
LOCALPROC VIA1_ClrInterruptFlag(uint8_t VIA_Int)
static void VIA1_ClrInterruptFlag(uint8_t VIA_Int)
{
VIA1_D.IFR &= ~ ((uint8_t)1 << VIA_Int);
VIA1_CheckInterruptFlag();
@ -624,7 +624,7 @@ LOCALPROC VIA1_ClrInterruptFlag(uint8_t VIA_Int)
#include <stdio.h>
#endif
GLOBALPROC VIA1_ShiftInData(uint8_t v)
void VIA1_ShiftInData(uint8_t v)
{
/*
external hardware generates 8 pulses on CB1,
@ -651,7 +651,7 @@ GLOBALPROC VIA1_ShiftInData(uint8_t v)
}
}
GLOBALFUNC uint8_t VIA1_ShiftOutData(void)
uint8_t VIA1_ShiftOutData(void)
{
/*
external hardware generates 8 pulses on CB1,
@ -671,10 +671,10 @@ GLOBALFUNC uint8_t VIA1_ShiftOutData(void)
#define CyclesPerViaTime (10 * ClockMult)
#define CyclesScaledPerViaTime (kCycleScale * CyclesPerViaTime)
LOCALVAR bool VIA1_T1Running = true;
LOCALVAR iCountt VIA1_T1LastTime = 0;
static bool VIA1_T1Running = true;
static iCountt VIA1_T1LastTime = 0;
GLOBALPROC VIA1_DoTimer1Check(void)
void VIA1_DoTimer1Check(void)
{
if (VIA1_T1Running) {
iCountt NewTime = GetCuriCount();
@ -746,7 +746,7 @@ GLOBALPROC VIA1_DoTimer1Check(void)
}
}
LOCALPROC CheckT1IntReady(void)
static void CheckT1IntReady(void)
{
if (VIA1_T1Running) {
bool NewT1IntReady = false;
@ -766,7 +766,7 @@ LOCALPROC CheckT1IntReady(void)
}
}
GLOBALFUNC uint16_t VIA1_GetT1InvertTime(void)
uint16_t VIA1_GetT1InvertTime(void)
{
uint16_t v;
@ -778,11 +778,11 @@ GLOBALFUNC uint16_t VIA1_GetT1InvertTime(void)
return v;
}
LOCALVAR bool VIA1_T2Running = true;
LOCALVAR bool VIA1_T2C_ShortTime = false;
LOCALVAR iCountt VIA1_T2LastTime = 0;
static bool VIA1_T2Running = true;
static bool VIA1_T2C_ShortTime = false;
static iCountt VIA1_T2LastTime = 0;
GLOBALPROC VIA1_DoTimer2Check(void)
void VIA1_DoTimer2Check(void)
{
if (VIA1_T2Running) {
iCountt NewTime = GetCuriCount();
@ -838,7 +838,7 @@ GLOBALPROC VIA1_DoTimer2Check(void)
#define kIER 0x0E
#define kORA 0x0F
GLOBALFUNC uint32_t VIA1_Access(uint32_t Data, bool WriteMem, CPTR addr)
uint32_t VIA1_Access(uint32_t Data, bool WriteMem, CPTR addr)
{
switch (addr) {
case kORB :
@ -1168,7 +1168,7 @@ GLOBALFUNC uint32_t VIA1_Access(uint32_t Data, bool WriteMem, CPTR addr)
return Data;
}
GLOBALPROC VIA1_ExtraTimeBegin(void)
void VIA1_ExtraTimeBegin(void)
{
if (VIA1_T1Running) {
VIA1_DoTimer1Check(); /* run up to this moment */
@ -1180,7 +1180,7 @@ GLOBALPROC VIA1_ExtraTimeBegin(void)
}
}
GLOBALPROC VIA1_ExtraTimeEnd(void)
void VIA1_ExtraTimeEnd(void)
{
if (! VIA1_T1Running) {
VIA1_T1Running = true;
@ -1197,28 +1197,28 @@ GLOBALPROC VIA1_ExtraTimeEnd(void)
/* VIA Interrupt Interface */
#ifdef VIA1_iCA1_PulseNtfy
GLOBALPROC VIA1_iCA1_PulseNtfy(void)
void VIA1_iCA1_PulseNtfy(void)
{
VIA1_SetInterruptFlag(kIntCA1);
}
#endif
#ifdef VIA1_iCA2_PulseNtfy
GLOBALPROC VIA1_iCA2_PulseNtfy(void)
void VIA1_iCA2_PulseNtfy(void)
{
VIA1_SetInterruptFlag(kIntCA2);
}
#endif
#ifdef VIA1_iCB1_PulseNtfy
GLOBALPROC VIA1_iCB1_PulseNtfy(void)
void VIA1_iCB1_PulseNtfy(void)
{
VIA1_SetInterruptFlag(kIntCB1);
}
#endif
#ifdef VIA1_iCB2_PulseNtfy
GLOBALPROC VIA1_iCB2_PulseNtfy(void)
void VIA1_iCB2_PulseNtfy(void)
{
VIA1_SetInterruptFlag(kIntCB2);
}

View File

@ -42,7 +42,7 @@
#define VID_dolog (dbglog_HAVE && 0)
LOCALVAR const uint8_t VidDrvr_contents[] = {
static const uint8_t VidDrvr_contents[] = {
0x4C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x2A, 0x00, 0x00, 0x00, 0xE2, 0x00, 0xEC,
0x00, 0xB6, 0x15, 0x2E, 0x44, 0x69, 0x73, 0x70,
@ -80,7 +80,7 @@ LOCALVAR const uint8_t VidDrvr_contents[] = {
0x08, 0xFC, 0x4E, 0xD0
};
LOCALPROC ChecksumSlotROM(void)
static void ChecksumSlotROM(void)
{
/* Calculate CRC */
/* assuming check sum field initialized to zero */
@ -94,45 +94,45 @@ LOCALPROC ChecksumSlotROM(void)
do_put_mem_long(p - 12, crc);
}
LOCALVAR uint8_t * pPatch;
static uint8_t * pPatch;
LOCALPROC PatchAByte(uint8_t v)
static void PatchAByte(uint8_t v)
{
*pPatch++ = v;
}
LOCALPROC PatchAWord(uint16_t v)
static void PatchAWord(uint16_t v)
{
PatchAByte(v >> 8);
PatchAByte(v & 0x00FF);
}
LOCALPROC PatchALong(uint32_t v)
static void PatchALong(uint32_t v)
{
PatchAWord(v >> 16);
PatchAWord(v & 0x0000FFFF);
}
#if 0
LOCALPROC PatchAOSLstEntry0(uint8_t Id, uint32_t Offset)
static void PatchAOSLstEntry0(uint8_t Id, uint32_t Offset)
{
PatchALong((Id << 24) | (Offset & 0x00FFFFFF));
}
#endif
LOCALPROC PatchAOSLstEntry(uint8_t Id, uint8_t * Offset)
static void PatchAOSLstEntry(uint8_t Id, uint8_t * Offset)
{
PatchALong((Id << 24) | ((Offset - pPatch) & 0x00FFFFFF));
}
LOCALFUNC uint8_t * ReservePatchOSLstEntry(void)
static uint8_t * ReservePatchOSLstEntry(void)
{
uint8_t * v = pPatch;
pPatch += 4;
return v;
}
LOCALPROC PatchAReservedOSLstEntry(uint8_t * p, uint8_t Id)
static void PatchAReservedOSLstEntry(uint8_t * p, uint8_t Id)
{
uint8_t * pPatchSave = pPatch;
pPatch = p;
@ -140,17 +140,17 @@ LOCALPROC PatchAReservedOSLstEntry(uint8_t * p, uint8_t Id)
pPatch = pPatchSave;
}
LOCALPROC PatchADatLstEntry(uint8_t Id, uint32_t Data)
static void PatchADatLstEntry(uint8_t Id, uint32_t Data)
{
PatchALong((Id << 24) | (Data & 0x00FFFFFF));
}
LOCALPROC PatchAnEndOfLst(void)
static void PatchAnEndOfLst(void)
{
PatchADatLstEntry(0xFF /* endOfList */, 0x00000000);
}
GLOBALFUNC bool Vid_Init(void)
bool Vid_Init(void)
{
int i;
uint32_t UsedSoFar;
@ -413,9 +413,9 @@ GLOBALFUNC bool Vid_Init(void)
return true;
}
IMPORTPROC Vid_VBLinterrupt_PulseNotify(void);
extern void Vid_VBLinterrupt_PulseNotify(void);
GLOBALPROC Vid_Update(void)
void Vid_Update(void)
{
if (! Vid_VBLintunenbl) {
Vid_VBLinterrupt = 0;
@ -423,12 +423,12 @@ GLOBALPROC Vid_Update(void)
}
}
LOCALFUNC uint16_t Vid_GetMode(void)
static uint16_t Vid_GetMode(void)
{
return (UseColorMode && (vMacScreenDepth != 0)) ? 129 : 128;
}
LOCALFUNC MacErr_t Vid_SetMode(uint16_t v)
static MacErr_t Vid_SetMode(uint16_t v)
{
if (
(vMacScreenDepth == 0)
@ -441,7 +441,7 @@ LOCALFUNC MacErr_t Vid_SetMode(uint16_t v)
return mnvm_noErr;
}
GLOBALFUNC uint16_t Vid_Reset(void)
uint16_t Vid_Reset(void)
{
if (0 != vMacScreenDepth) {
UseColorMode = false;
@ -473,9 +473,9 @@ GLOBALFUNC uint16_t Vid_Reset(void)
#define VidBaseAddr 0xF9900000
/* appears to be completely ignored */
LOCALVAR bool UseGrayTones = false;
static bool UseGrayTones = false;
LOCALPROC FillScreenWithGrayPattern(void)
static void FillScreenWithGrayPattern(void)
{
int i;
int j;
@ -516,7 +516,7 @@ LOCALPROC FillScreenWithGrayPattern(void)
}
}
GLOBALPROC ExtnVideo_Access(CPTR p)
void ExtnVideo_Access(CPTR p)
{
MacErr_t result = mnvm_controlErr;

View File

@ -17,10 +17,10 @@
#ifndef VIDEMDEV_H
#define VIDEMDEV_H
EXPORTFUNC bool Vid_Init(void);
EXPORTFUNC uint16_t Vid_Reset(void);
EXPORTPROC Vid_Update(void);
extern bool Vid_Init(void);
extern uint16_t Vid_Reset(void);
extern void Vid_Update(void);
EXPORTPROC ExtnVideo_Access(CPTR p);
extern void ExtnVideo_Access(CPTR p);
#endif

View File

@ -86,7 +86,7 @@ unsigned char * HMAC_BITS[] = {
#define HappyMacBase 0x1948 - 0x18
#endif
LOCALPROC PatchHappyMac(AHM_t ahm)
static void PatchHappyMac(AHM_t ahm)
{
uint8_t *dst = ROM + HappyMacBase + 0x18;
uint8_t *src = HMAC_BITS[ahm];

View File

@ -38,7 +38,7 @@
#endif
#ifdef ln2mtb
LOCALPROC ROMscrambleForMTB(void)
static void ROMscrambleForMTB(void)
{
int32_t j;
uint8_t * p = ROM;
@ -60,7 +60,7 @@ LOCALPROC ROMscrambleForMTB(void)
}
#endif
GLOBALFUNC bool ROM_Init(void)
bool ROM_Init(void)
{
#if DisableRomCheck

View File

@ -28,7 +28,7 @@
#define kVidMem_Base 0x00540000
EXPORTFUNC bool ROM_Init(void);
extern bool ROM_Init(void);
#endif

View File

@ -262,7 +262,7 @@ const DevMethods_t DEVICES[] = {
},
};
LOCALPROC EmulatedHardwareZap(void)
static void EmulatedHardwareZap(void)
{
int i;
for ( i = 0; i < ARRAY_SIZE(DEVICES); i++ ) {
@ -270,13 +270,13 @@ LOCALPROC EmulatedHardwareZap(void)
}
}
LOCALPROC DoMacReset(void)
static void DoMacReset(void)
{
Sony_EjectAllDisks();
EmulatedHardwareZap();
}
LOCALPROC InterruptReset_Update(void)
static void InterruptReset_Update(void)
{
SetInterruptButton(false); // don't keep held over 1/60 sec
@ -290,7 +290,7 @@ LOCALPROC InterruptReset_Update(void)
}
}
LOCALPROC SubTickNotify(int SubTick)
static void SubTickNotify(int SubTick)
{
int i;
for ( i = 0; i < ARRAY_SIZE(DEVICES); i++ ) {
@ -301,9 +301,9 @@ LOCALPROC SubTickNotify(int SubTick)
#define CyclesScaledPerTick (130240UL * ClockMult * kCycleScale)
#define CyclesScaledPerSubTick (CyclesScaledPerTick / kNumSubTicks)
LOCALVAR uint16_t SubTickCounter;
static uint16_t SubTickCounter;
LOCALPROC SubTickTaskDo(void)
static void SubTickTaskDo(void)
{
SubTickNotify(SubTickCounter);
++SubTickCounter;
@ -318,18 +318,18 @@ LOCALPROC SubTickTaskDo(void)
}
}
LOCALPROC SubTickTaskStart(void)
static void SubTickTaskStart(void)
{
SubTickCounter = 0;
ICT_add(kICT_SubTick, CyclesScaledPerSubTick);
}
LOCALPROC SubTickTaskEnd(void)
static void SubTickTaskEnd(void)
{
SubTickNotify(kNumSubTicks - 1);
}
LOCALPROC SixtiethSecondNotify(void)
static void SixtiethSecondNotify(void)
{
/*int i;
// Begin new frame
@ -357,7 +357,7 @@ LOCALPROC SixtiethSecondNotify(void)
SubTickTaskStart();
}
LOCALPROC SixtiethEndNotify(void)
static void SixtiethEndNotify(void)
{
int i;
SubTickTaskEnd();
@ -367,7 +367,7 @@ LOCALPROC SixtiethEndNotify(void)
// End frame
}
LOCALPROC ExtraTimeBeginNotify(void)
static void ExtraTimeBeginNotify(void)
{
int i;
for ( i = 0; i < ARRAY_SIZE(DEVICES); i++ ) {
@ -375,7 +375,7 @@ LOCALPROC ExtraTimeBeginNotify(void)
}
}
LOCALPROC ExtraTimeEndNotify(void)
static void ExtraTimeEndNotify(void)
{
int i;
for ( i = 0; i < ARRAY_SIZE(DEVICES); i++ ) {
@ -383,7 +383,7 @@ LOCALPROC ExtraTimeEndNotify(void)
}
}
GLOBALPROC EmulationReserveAlloc(void)
void EmulationReserveAlloc(void)
{
ReserveAllocOneBlock(&RAM, kRAM_Size + RAMSafetyMarginFudge, 5, false);
#if EmVidCard
@ -397,7 +397,7 @@ GLOBALPROC EmulationReserveAlloc(void)
#endif
}
LOCALFUNC bool InitEmulation(void)
static bool InitEmulation(void)
{
int i;
for ( i = 0; i < ARRAY_SIZE(DEVICES); i++ ) {
@ -410,7 +410,7 @@ LOCALFUNC bool InitEmulation(void)
return true;
}
LOCALPROC ICT_DoTask(int taskid)
static void ICT_DoTask(int taskid)
{
switch (taskid) {
case kICT_SubTick:
@ -454,7 +454,7 @@ LOCALPROC ICT_DoTask(int taskid)
}
}
LOCALPROC ICT_DoCurrentTasks(void)
static void ICT_DoCurrentTasks(void)
{
int i;
uimr m;
@ -475,7 +475,7 @@ LOCALPROC ICT_DoCurrentTasks(void)
}
}
LOCALFUNC uint32_t ICT_DoGetNext(uint32_t maxn)
static uint32_t ICT_DoGetNext(uint32_t maxn)
{
int i;
uimr m;
@ -490,7 +490,7 @@ LOCALFUNC uint32_t ICT_DoGetNext(uint32_t maxn)
return v;
}
LOCALPROC m68k_go_nCycles_1(uint32_t n)
static void m68k_go_nCycles_1(uint32_t n)
{
uint32_t n2;
uint32_t StopiCount = NextiCount + n;
@ -503,9 +503,9 @@ LOCALPROC m68k_go_nCycles_1(uint32_t n)
} while (n != 0);
}
LOCALVAR uint32_t ExtraSubTicksToDo = 0;
static uint32_t ExtraSubTicksToDo = 0;
LOCALPROC DoEmulateOneTick(void)
static void DoEmulateOneTick(void)
{
// AutoSlow
uint32_t NewQuietTime = QuietTime + 1;
@ -537,7 +537,7 @@ LOCALPROC DoEmulateOneTick(void)
}
}
LOCALFUNC bool MoreSubTicksToDo(void)
static bool MoreSubTicksToDo(void)
{
bool v = false;
@ -557,7 +557,7 @@ LOCALFUNC bool MoreSubTicksToDo(void)
periodically calls ExtraTimeNotOver and stops when this returns false
(or it is finished with emulating the extra time).
*/
LOCALPROC DoEmulateExtraTime(void)
static void DoEmulateExtraTime(void)
{
if (MoreSubTicksToDo()) {
ExtraTimeBeginNotify();
@ -579,7 +579,7 @@ LOCALPROC DoEmulateExtraTime(void)
The number of ticks that have been emulated so far.
That is, the number of times "DoEmulateOneTick" has been called.
*/
LOCALVAR uint32_t CurEmulatedTime = 0;
static uint32_t CurEmulatedTime = 0;
/*
The general idea is to call DoEmulateOneTick once per tick.
@ -593,7 +593,7 @@ LOCALVAR uint32_t CurEmulatedTime = 0;
determined at the beginning, rather than just calling DoEmulateOneTick
until CurEmulatedTime >= TrueEmulatedTime.
*/
LOCALPROC RunEmulatedTicksToTrueTime(void)
static void RunEmulatedTicksToTrueTime(void)
{
int8_t lag = OnTrueTime - CurEmulatedTime;
@ -623,7 +623,7 @@ LOCALPROC RunEmulatedTicksToTrueTime(void)
}
}
LOCALPROC MainEventLoop(void)
static void MainEventLoop(void)
{
while (true) {
WaitForNextTick();
@ -633,7 +633,7 @@ LOCALPROC MainEventLoop(void)
}
}
GLOBALPROC ProgramMain(void)
void ProgramMain(void)
{
if (InitEmulation() == false) {return;}
MainEventLoop();

View File

@ -18,7 +18,7 @@
#ifndef PROGMAIN_H
#define PROGMAIN_H
EXPORTPROC EmulationReserveAlloc(void);
EXPORTPROC ProgramMain(void);
extern void EmulationReserveAlloc(void);
extern void ProgramMain(void);
#endif

View File

@ -41,10 +41,6 @@ typedef int32_t simr;
/* pascal string, single byte characters */
#define ps3p uint8_t *
#ifndef MayInline
#define MayInline
#endif
#ifndef reg_call
#define reg_call
#endif
@ -53,44 +49,10 @@ typedef int32_t simr;
#define osglu_call
#endif
#define LOCALVAR static
#ifdef AllFiles
#define GLOBALVAR LOCALVAR
#define EXPORTVAR(t, v)
#else
#define GLOBALVAR
#define EXPORTVAR(t, v) extern t v;
#endif
#define LOCALFUNC static
#define FORWARDFUNC LOCALFUNC
#ifdef AllFiles
#define GLOBALFUNC LOCALFUNC
#define EXPORTFUNC LOCALFUNC
#else
#define GLOBALFUNC
#define EXPORTFUNC extern
#endif
#define IMPORTFUNC EXPORTFUNC
#define TYPEDEFFUNC typedef
#define LOCALPROC LOCALFUNC void
#define GLOBALPROC GLOBALFUNC void
#define EXPORTPROC EXPORTFUNC void
#define IMPORTPROC IMPORTFUNC void
#define FORWARDPROC FORWARDFUNC void
#define TYPEDEFPROC TYPEDEFFUNC void
#define LOCALINLINEFUNC static MayInline
#define LOCALINLINEPROC LOCALINLINEFUNC void
#define LOCALFUNCUSEDONCE LOCALINLINEFUNC
#define LOCALPROCUSEDONCE LOCALINLINEPROC
#define GLOBALOSGLUFUNC GLOBALFUNC osglu_call
#define EXPORTOSGLUFUNC EXPORTFUNC osglu_call
#define GLOBALOSGLUPROC GLOBALFUNC osglu_call void
#define EXPORTOSGLUPROC EXPORTFUNC osglu_call void
#define GLOBALOSGLUFUNC osglu_call
#define EXPORTOSGLUFUNC extern osglu_call
#define GLOBALOSGLUPROC osglu_call void
#define EXPORTOSGLUPROC extern osglu_call void
/*
For functions in operating system glue that
are called by rest of program.

View File

@ -26,54 +26,54 @@
#include "COMOSGLU.h"
#include "HW/SCREEN/SCRNEMDV.h"
GLOBALVAR uint32_t vSonyWritableMask = 0;
GLOBALVAR uint32_t vSonyInsertedMask = 0;
uint32_t vSonyWritableMask = 0;
uint32_t vSonyInsertedMask = 0;
#if IncludeSonyRawMode
GLOBALVAR bool vSonyRawMode = false;
bool vSonyRawMode = false;
#endif
#if IncludeSonyNew
GLOBALVAR bool vSonyNewDiskWanted = false;
GLOBALVAR uint32_t vSonyNewDiskSize;
bool vSonyNewDiskWanted = false;
uint32_t vSonyNewDiskSize;
#endif
#if IncludeSonyNameNew
GLOBALVAR tPbuf vSonyNewDiskName = NotAPbuf;
tPbuf vSonyNewDiskName = NotAPbuf;
#endif
GLOBALVAR uint32_t CurMacDateInSeconds = 0;
uint32_t CurMacDateInSeconds = 0;
#if AutoLocation
GLOBALVAR uint32_t CurMacLatitude = 0;
GLOBALVAR uint32_t CurMacLongitude = 0;
uint32_t CurMacLatitude = 0;
uint32_t CurMacLongitude = 0;
#endif
#if AutoTimeZone
GLOBALVAR uint32_t CurMacDelta = 0;
uint32_t CurMacDelta = 0;
#endif
GLOBALVAR bool UseColorMode = false;
GLOBALVAR bool ColorModeWorks = false;
bool UseColorMode = false;
bool ColorModeWorks = false;
GLOBALVAR bool ColorMappingChanged = false;
bool ColorMappingChanged = false;
GLOBALVAR uint16_t CLUT_reds[CLUT_size];
GLOBALVAR uint16_t CLUT_greens[CLUT_size];
GLOBALVAR uint16_t CLUT_blues[CLUT_size];
uint16_t CLUT_reds[CLUT_size];
uint16_t CLUT_greens[CLUT_size];
uint16_t CLUT_blues[CLUT_size];
GLOBALVAR bool RequestMacOff = false;
GLOBALVAR bool ForceMacOff = false;
GLOBALVAR bool WantMacInterrupt = false;
GLOBALVAR bool WantMacReset = false;
bool RequestMacOff = false;
bool ForceMacOff = false;
bool WantMacInterrupt = false;
bool WantMacReset = false;
GLOBALVAR uint8_t SpeedValue = WantInitSpeedValue;
GLOBALVAR uint16_t CurMouseV = 0;
GLOBALVAR uint16_t CurMouseH = 0;
uint8_t SpeedValue = WantInitSpeedValue;
uint16_t CurMouseV = 0;
uint16_t CurMouseH = 0;
GLOBALVAR uint32_t QuietTime = 0;
GLOBALVAR uint32_t QuietSubTicks = 0;
uint32_t QuietTime = 0;
uint32_t QuietSubTicks = 0;
#if IncludePbufs
GLOBALFUNC bool FirstFreePbuf(tPbuf *r)
bool FirstFreePbuf(tPbuf *r)
{
tPbuf i;
@ -86,13 +86,13 @@ GLOBALFUNC bool FirstFreePbuf(tPbuf *r)
return false;
}
GLOBALPROC PbufNewNotify(tPbuf Pbuf_No, uint32_t count)
void PbufNewNotify(tPbuf Pbuf_No, uint32_t count)
{
PbufSize[Pbuf_No] = count;
PbufAllocatedMask |= ((uint32_t)1 << Pbuf_No);
}
GLOBALPROC PbufDisposeNotify(tPbuf Pbuf_No)
void PbufDisposeNotify(tPbuf Pbuf_No)
{
PbufAllocatedMask &= ~ ((uint32_t)1 << Pbuf_No);
}
@ -124,7 +124,7 @@ GLOBALOSGLUFUNC MacErr_t PbufGetSize(tPbuf Pbuf_No, uint32_t *Count)
}
#endif
GLOBALFUNC bool FirstFreeDisk(tDrive *Drive_No)
bool FirstFreeDisk(tDrive *Drive_No)
{
tDrive i;
@ -149,7 +149,7 @@ GLOBALOSGLUPROC DiskRevokeWritable(tDrive Drive_No)
vSonyWritableMask &= ~ ((uint32_t)1 << Drive_No);
}
GLOBALPROC DiskInsertNotify(tDrive Drive_No, bool locked)
void DiskInsertNotify(tDrive Drive_No, bool locked)
{
vSonyInsertedMask |= ((uint32_t)1 << Drive_No);
if (! locked) {
@ -159,23 +159,23 @@ GLOBALPROC DiskInsertNotify(tDrive Drive_No, bool locked)
QuietEnds();
}
GLOBALPROC DiskEjectedNotify(tDrive Drive_No)
void DiskEjectedNotify(tDrive Drive_No)
{
vSonyWritableMask &= ~ ((uint32_t)1 << Drive_No);
vSonyInsertedMask &= ~ ((uint32_t)1 << Drive_No);
}
GLOBALVAR uint8_t * screencomparebuff = nullpr;
uint8_t * screencomparebuff = nullpr;
#if WantColorTransValid
LOCALVAR bool ColorTransValid = false;
static bool ColorTransValid = false;
#endif
GLOBALVAR bool EmVideoDisable = false;
GLOBALVAR int8_t EmLagTime = 0;
GLOBALVAR uint32_t OnTrueTime = 0;
bool EmVideoDisable = false;
int8_t EmLagTime = 0;
uint32_t OnTrueTime = 0;
GLOBALPROC ScreenClearChanges(void)
void ScreenClearChanges(void)
{
ScreenChangedTop = vMacScreenHeight;
ScreenChangedBottom = 0;
@ -183,7 +183,7 @@ GLOBALPROC ScreenClearChanges(void)
ScreenChangedRight = 0;
}
GLOBALPROC ScreenChangedAll(void)
void ScreenChangedAll(void)
{
ScreenChangedTop = 0;
ScreenChangedBottom = vMacScreenHeight;
@ -192,13 +192,13 @@ GLOBALPROC ScreenChangedAll(void)
}
#if MayFullScreen
GLOBALVAR uint16_t ViewHSize;
GLOBALVAR uint16_t ViewVSize;
GLOBALVAR uint16_t ViewHStart = 0;
GLOBALVAR uint16_t ViewVStart = 0;
uint16_t ViewHSize;
uint16_t ViewVSize;
uint16_t ViewHStart = 0;
uint16_t ViewVStart = 0;
#endif
LOCALPROC SetLongs(uint32_t *p, long n)
static void SetLongs(uint32_t *p, long n)
{
long i;
@ -207,8 +207,8 @@ LOCALPROC SetLongs(uint32_t *p, long n)
}
}
GLOBALVAR uimr ReserveAllocOffset;
GLOBALVAR uint8_t * ReserveAllocBigBlock = nullpr;
uimr ReserveAllocOffset;
uint8_t * ReserveAllocBigBlock = nullpr;
GLOBALOSGLUPROC ReserveAllocOneBlock(uint8_t * *p, uimr n,
uint8_t align, bool FillOnes)
@ -229,16 +229,16 @@ GLOBALOSGLUPROC ReserveAllocOneBlock(uint8_t * *p, uimr n,
#if dbglog_HAVE
LOCALVAR uimr dbglog_bufpos = 0;
LOCALVAR char *dbglog_bufp = nullpr;
static uimr dbglog_bufpos = 0;
static char *dbglog_bufp = nullpr;
LOCALPROC dbglog_ReserveAlloc(void)
static void dbglog_ReserveAlloc(void)
{
ReserveAllocOneBlock((uint8_t * *)&dbglog_bufp, dbglog_bufsz,
5, false);
}
LOCALPROC dbglog_close(void)
static void dbglog_close(void)
{
uimr n = ModPow2(dbglog_bufpos, dbglog_buflnsz);
if (n != 0) {
@ -248,7 +248,7 @@ LOCALPROC dbglog_close(void)
dbglog_close0();
}
LOCALPROC dbglog_write(char *p, uimr L)
static void dbglog_write(char *p, uimr L)
{
uimr r;
uimr bufposmod;
@ -272,7 +272,7 @@ label_retry:
dbglog_bufpos = newbufpos;
}
LOCALFUNC uimr CStrLength(char *s)
static uimr CStrLength(char *s)
{
char *p = s;
@ -346,7 +346,7 @@ GLOBALOSGLUPROC dbglog_writeMacChar(uint8_t x)
dbglog_write(&s, 1);
}
LOCALPROC dbglog_writeSpace(void)
static void dbglog_writeSpace(void)
{
dbglog_writeCStr(" ");
}
@ -369,9 +369,9 @@ GLOBALOSGLUPROC dbglog_writelnNum(char *s, simr v)
/* my event queue */
LOCALVAR EvtQEl EvtQA[EvtQSz];
LOCALVAR uint16_t EvtQIn = 0;
LOCALVAR uint16_t EvtQOut = 0;
static EvtQEl EvtQA[EvtQSz];
static uint16_t EvtQIn = 0;
static uint16_t EvtQOut = 0;
GLOBALOSGLUFUNC EvtQEl * EvtQOutP(void)
{
@ -387,10 +387,10 @@ GLOBALOSGLUPROC EvtQOutDone(void)
++EvtQOut;
}
GLOBALVAR bool EvtQNeedRecover = false;
bool EvtQNeedRecover = false;
/* events lost because of full queue */
LOCALFUNC EvtQEl * EvtQElPreviousIn(void)
static EvtQEl * EvtQElPreviousIn(void)
{
EvtQEl *p = NULL;
if (EvtQIn - EvtQOut != 0) {
@ -400,7 +400,7 @@ LOCALFUNC EvtQEl * EvtQElPreviousIn(void)
return p;
}
LOCALFUNC EvtQEl * EvtQElAlloc(void)
static EvtQEl * EvtQElAlloc(void)
{
EvtQEl *p = NULL;
if (EvtQIn - EvtQOut >= EvtQSz) {
@ -414,9 +414,9 @@ LOCALFUNC EvtQEl * EvtQElAlloc(void)
return p;
}
LOCALVAR uint32_t theKeys[4];
static uint32_t theKeys[4];
GLOBALPROC Keyboard_UpdateKeyMap(uint8_t key, bool down)
void Keyboard_UpdateKeyMap(uint8_t key, bool down)
{
uint8_t k = key & 127; /* just for safety */
uint8_t bit = 1 << (k & 7);
@ -441,9 +441,9 @@ GLOBALPROC Keyboard_UpdateKeyMap(uint8_t key, bool down)
}
}
LOCALVAR bool MouseButtonState = false;
static bool MouseButtonState = false;
GLOBALPROC MouseButtonSet(bool down)
void MouseButtonSet(bool down)
{
if (MouseButtonState != down) {
EvtQEl *p = EvtQElAlloc();
@ -458,10 +458,10 @@ GLOBALPROC MouseButtonSet(bool down)
}
}
LOCALVAR uint16_t MousePosCurV = 0;
LOCALVAR uint16_t MousePosCurH = 0;
static uint16_t MousePosCurV = 0;
static uint16_t MousePosCurH = 0;
GLOBALPROC MousePositionSet(uint16_t h, uint16_t v)
void MousePositionSet(uint16_t h, uint16_t v)
{
if ((h != MousePosCurH) || (v != MousePosCurV)) {
EvtQEl *p = EvtQElPreviousIn();
@ -481,7 +481,7 @@ GLOBALPROC MousePositionSet(uint16_t h, uint16_t v)
}
}
GLOBALPROC InitKeyCodes(void)
void InitKeyCodes(void)
{
theKeys[0] = 0;
theKeys[1] = 0;
@ -489,7 +489,7 @@ GLOBALPROC InitKeyCodes(void)
theKeys[3] = 0;
}
GLOBALPROC DisconnectKeyCodes(uint32_t KeepMask)
void DisconnectKeyCodes(uint32_t KeepMask)
{
/*
Called when may miss key ups,
@ -528,7 +528,7 @@ GLOBALPROC DisconnectKeyCodes(uint32_t KeepMask)
}
}
GLOBALPROC EvtQTryRecoverFromFull(void)
void EvtQTryRecoverFromFull(void)
{
MouseButtonSet(false);
DisconnectKeyCodes(0);
@ -536,14 +536,14 @@ GLOBALPROC EvtQTryRecoverFromFull(void)
/* MacMsg */
GLOBALVAR char *SavedBriefMsg = nullpr;
GLOBALVAR char *SavedLongMsg = nullpr;
char *SavedBriefMsg = nullpr;
char *SavedLongMsg = nullpr;
#if WantAbnormalReports
GLOBALVAR uint16_t SavedIDMsg = 0;
uint16_t SavedIDMsg = 0;
#endif
GLOBALVAR bool SavedFatalMsg = false;
bool SavedFatalMsg = false;
GLOBALPROC MacMsg(char *briefMsg, char *longMsg, bool fatal)
void MacMsg(char *briefMsg, char *longMsg, bool fatal)
{
if (nullpr != SavedBriefMsg) {
/*

View File

@ -27,49 +27,49 @@
#include "MYOSGLUE.h"
#define EnableRecreateW 1
extern GLOBALVAR uint32_t vSonyWritableMask;
extern GLOBALVAR uint32_t vSonyInsertedMask;
extern uint32_t vSonyWritableMask;
extern uint32_t vSonyInsertedMask;
#if IncludeSonyRawMode
extern GLOBALVAR bool vSonyRawMode;
extern bool vSonyRawMode;
#endif
#if IncludeSonyNew
extern GLOBALVAR bool vSonyNewDiskWanted;
extern GLOBALVAR uint32_t vSonyNewDiskSize;
extern bool vSonyNewDiskWanted;
extern uint32_t vSonyNewDiskSize;
#endif
#if IncludeSonyNameNew
extern GLOBALVAR tPbuf vSonyNewDiskName;
extern tPbuf vSonyNewDiskName;
#endif
extern GLOBALVAR uint32_t CurMacDateInSeconds;
extern uint32_t CurMacDateInSeconds;
#if AutoLocation
extern GLOBALVAR uint32_t CurMacLatitude;
extern GLOBALVAR uint32_t CurMacLongitude;
extern uint32_t CurMacLatitude;
extern uint32_t CurMacLongitude;
#endif
#if AutoTimeZone
extern GLOBALVAR uint32_t CurMacDelta;
extern uint32_t CurMacDelta;
#endif
extern GLOBALVAR bool UseColorMode;
extern GLOBALVAR bool ColorModeWorks;
extern GLOBALVAR bool ColorMappingChanged;
extern bool UseColorMode;
extern bool ColorModeWorks;
extern bool ColorMappingChanged;
extern GLOBALVAR uint16_t CLUT_reds[CLUT_size];
extern GLOBALVAR uint16_t CLUT_greens[CLUT_size];
extern GLOBALVAR uint16_t CLUT_blues[CLUT_size];
extern uint16_t CLUT_reds[CLUT_size];
extern uint16_t CLUT_greens[CLUT_size];
extern uint16_t CLUT_blues[CLUT_size];
extern GLOBALVAR bool RequestMacOff;
extern GLOBALVAR bool ForceMacOff;
extern GLOBALVAR bool WantMacInterrupt;
extern GLOBALVAR bool WantMacReset;
extern GLOBALVAR uint8_t SpeedValue;
extern GLOBALVAR uint16_t CurMouseV;
extern GLOBALVAR uint16_t CurMouseH;
extern bool RequestMacOff;
extern bool ForceMacOff;
extern bool WantMacInterrupt;
extern bool WantMacReset;
extern uint8_t SpeedValue;
extern uint16_t CurMouseV;
extern uint16_t CurMouseH;
extern GLOBALVAR uint32_t QuietTime;
extern GLOBALVAR uint32_t QuietSubTicks;
extern uint32_t QuietTime;
extern uint32_t QuietSubTicks;
#ifndef GrabKeysFullScreen
#define GrabKeysFullScreen 1
@ -80,24 +80,24 @@ extern GLOBALVAR uint32_t QuietSubTicks;
#endif
#if IncludePbufs
GLOBALVAR uint32_t PbufAllocatedMask;
GLOBALVAR uint32_t PbufSize[NumPbufs];
uint32_t PbufAllocatedMask;
uint32_t PbufSize[NumPbufs];
#define PbufIsAllocated(i) ((PbufAllocatedMask & ((uint32_t)1 << (i))) != 0)
GLOBALFUNC bool FirstFreePbuf(tPbuf *r);
GLOBALPROC PbufNewNotify(tPbuf Pbuf_No, uint32_t count);
GLOBALPROC PbufDisposeNotify(tPbuf Pbuf_No);
bool FirstFreePbuf(tPbuf *r);
void PbufNewNotify(tPbuf Pbuf_No, uint32_t count);
void PbufDisposeNotify(tPbuf Pbuf_No);
GLOBALOSGLUFUNC MacErr_t CheckPbuf(tPbuf Pbuf_No);
GLOBALOSGLUFUNC MacErr_t PbufGetSize(tPbuf Pbuf_No, uint32_t *Count);
#endif
GLOBALFUNC bool FirstFreeDisk(tDrive *Drive_No);
bool FirstFreeDisk(tDrive *Drive_No);
GLOBALOSGLUFUNC bool AnyDiskInserted(void);
GLOBALOSGLUPROC DiskRevokeWritable(tDrive Drive_No);
GLOBALPROC DiskInsertNotify(tDrive Drive_No, bool locked);
GLOBALPROC DiskEjectedNotify(tDrive Drive_No);
void DiskInsertNotify(tDrive Drive_No, bool locked);
void DiskEjectedNotify(tDrive Drive_No);
extern GLOBALVAR uint8_t * screencomparebuff;
extern uint8_t * screencomparebuff;
/*
block type - for operating on multiple uint8_t elements
@ -134,27 +134,27 @@ extern GLOBALVAR uint8_t * screencomparebuff;
#define WantColorTransValid 0
#endif
extern GLOBALVAR bool EmVideoDisable;
extern GLOBALVAR int8_t EmLagTime;
extern bool EmVideoDisable;
extern int8_t EmLagTime;
// The time slice we are currently dealing with,
// in the same units as TrueEmulatedTime.
extern GLOBALVAR uint32_t OnTrueTime;
extern uint32_t OnTrueTime;
GLOBALPROC ScreenClearChanges(void);
GLOBALPROC ScreenChangedAll(void);
void ScreenClearChanges(void);
void ScreenChangedAll(void);
GLOBALVAR int16_t ScreenChangedTop;
GLOBALVAR int16_t ScreenChangedLeft;
GLOBALVAR int16_t ScreenChangedBottom;
GLOBALVAR int16_t ScreenChangedRight;
int16_t ScreenChangedTop;
int16_t ScreenChangedLeft;
int16_t ScreenChangedBottom;
int16_t ScreenChangedRight;
GLOBALOSGLUPROC Screen_OutputFrame(uint8_t * screencurrentbuff);
#if MayFullScreen
extern GLOBALVAR uint16_t ViewHSize;
extern GLOBALVAR uint16_t ViewVSize;
extern GLOBALVAR uint16_t ViewHStart;
extern GLOBALVAR uint16_t ViewVStart;
extern uint16_t ViewHSize;
extern uint16_t ViewVSize;
extern uint16_t ViewHStart;
extern uint16_t ViewVStart;
#endif
#ifndef WantAutoScrollBorder
@ -169,8 +169,8 @@ extern GLOBALVAR uint16_t ViewVStart;
#define CeilPow2Mult(i, p) FloorPow2Mult((i) + Pow2Mask(p), (p))
/* warning - CeilPow2Mult evaluates p twice */
extern GLOBALVAR uimr ReserveAllocOffset;
extern GLOBALVAR uint8_t * ReserveAllocBigBlock;
extern uimr ReserveAllocOffset;
extern uint8_t * ReserveAllocBigBlock;
GLOBALOSGLUPROC ReserveAllocOneBlock(uint8_t * *p, uimr n,
uint8_t align, bool FillOnes);
@ -197,7 +197,7 @@ GLOBALOSGLUPROC dbglog_writelnNum(char *s, simr v);
GLOBALOSGLUFUNC EvtQEl * EvtQOutP(void);
GLOBALOSGLUPROC EvtQOutDone(void);
extern GLOBALVAR bool EvtQNeedRecover;
extern bool EvtQNeedRecover;
#define kKeepMaskControl (1 << 0)
#define kKeepMaskCapsLock (1 << 1)
@ -206,24 +206,24 @@ extern GLOBALVAR bool EvtQNeedRecover;
#define kKeepMaskShift (1 << 4)
GLOBALPROC Keyboard_UpdateKeyMap(uint8_t key, bool down);
GLOBALPROC MouseButtonSet(bool down);
GLOBALPROC MousePositionSet(uint16_t h, uint16_t v);
GLOBALPROC MousePositionNotify(int h, int v);
GLOBALPROC InitKeyCodes(void);
GLOBALPROC DisconnectKeyCodes(uint32_t KeepMask);
GLOBALPROC EvtQTryRecoverFromFull(void);
void Keyboard_UpdateKeyMap(uint8_t key, bool down);
void MouseButtonSet(bool down);
void MousePositionSet(uint16_t h, uint16_t v);
void MousePositionNotify(int h, int v);
void InitKeyCodes(void);
void DisconnectKeyCodes(uint32_t KeepMask);
void EvtQTryRecoverFromFull(void);
/* MacMsg */
extern GLOBALVAR char *SavedBriefMsg;
extern GLOBALVAR char *SavedLongMsg;
extern char *SavedBriefMsg;
extern char *SavedLongMsg;
#if WantAbnormalReports
extern GLOBALVAR uint16_t SavedIDMsg;
extern uint16_t SavedIDMsg;
#endif
extern GLOBALVAR bool SavedFatalMsg;
extern bool SavedFatalMsg;
GLOBALPROC MacMsg(char *briefMsg, char *longMsg, bool fatal);
void MacMsg(char *briefMsg, char *longMsg, bool fatal);
#if WantAbnormalReports
GLOBALOSGLUPROC WarnMsgAbnormalID(uint16_t id);

View File

@ -56,12 +56,12 @@ void MacMsgOverride(char *title, char *msg)
SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, title, msg, main_wind);
}
LOCALPROC WarnMsgCorruptedROM(void)
static void WarnMsgCorruptedROM(void)
{
MacMsgOverride(kStrCorruptedROMTitle, kStrCorruptedROMMessage);
}
LOCALPROC WarnMsgUnsupportedROM(void)
static void WarnMsgUnsupportedROM(void)
{
MacMsgOverride(kStrUnsupportedROMTitle,
kStrUnsupportedROMMessage);

View File

@ -51,7 +51,7 @@ EXPORTOSGLUPROC ReserveAllocOneBlock(
);
EXPORTOSGLUPROC MoveBytes(anyp srcPtr, anyp destPtr, int32_t byteCount);
EXPORTVAR(uint8_t *, ROM)
extern uint8_t * ROM;
#if IncludePbufs
@ -71,8 +71,8 @@ EXPORTOSGLUPROC PbufTransfer(uint8_t * Buffer,
#define tDrive uint16_t
EXPORTVAR(uint32_t, vSonyWritableMask)
EXPORTVAR(uint32_t, vSonyInsertedMask)
extern uint32_t vSonyWritableMask;
extern uint32_t vSonyInsertedMask;
#define vSonyIsInserted(Drive_No) \
((vSonyInsertedMask & ((uint32_t)1 << (Drive_No))) != 0)
@ -87,17 +87,17 @@ EXPORTOSGLUFUNC bool AnyDiskInserted(void);
EXPORTOSGLUPROC DiskRevokeWritable(tDrive Drive_No);
#if IncludeSonyRawMode
EXPORTVAR(bool, vSonyRawMode)
extern bool vSonyRawMode;
#endif
#if IncludeSonyNew
EXPORTVAR(bool, vSonyNewDiskWanted)
EXPORTVAR(uint32_t, vSonyNewDiskSize)
extern bool vSonyNewDiskWanted;
extern uint32_t vSonyNewDiskSize;
EXPORTOSGLUFUNC MacErr_t vSonyEjectDelete(tDrive Drive_No);
#endif
#if IncludeSonyNameNew
EXPORTVAR(tPbuf, vSonyNewDiskName)
extern tPbuf vSonyNewDiskName;
#endif
#if IncludeSonyGetName
@ -109,53 +109,53 @@ EXPORTOSGLUFUNC MacErr_t HTCEexport(tPbuf i);
EXPORTOSGLUFUNC MacErr_t HTCEimport(tPbuf *r);
#endif
EXPORTVAR(uint32_t, OnTrueTime)
extern uint32_t OnTrueTime;
EXPORTVAR(uint32_t, CurMacDateInSeconds)
extern uint32_t CurMacDateInSeconds;
#if AutoLocation
EXPORTVAR(uint32_t, CurMacLatitude)
EXPORTVAR(uint32_t, CurMacLongitude)
extern uint32_t CurMacLatitude;
extern uint32_t CurMacLongitude;
#endif
#if AutoTimeZone
EXPORTVAR(uint32_t, CurMacDelta)
extern uint32_t CurMacDelta;
/* (dlsDelta << 24) | (gmtDelta & 0x00FFFFFF) */
#endif
EXPORTVAR(bool, UseColorMode)
EXPORTVAR(bool, ColorModeWorks)
extern bool UseColorMode;
extern bool ColorModeWorks;
EXPORTVAR(bool, ColorMappingChanged)
extern bool ColorMappingChanged;
//#define CLUT_size (1 << (1 << vMacScreenDepth))
#define CLUT_size 256 // total guesstimate
EXPORTVAR(uint16_t, CLUT_reds[CLUT_size])
EXPORTVAR(uint16_t, CLUT_greens[CLUT_size])
EXPORTVAR(uint16_t, CLUT_blues[CLUT_size])
extern uint16_t CLUT_reds[CLUT_size];
extern uint16_t CLUT_greens[CLUT_size];
extern uint16_t CLUT_blues[CLUT_size];
EXPORTVAR(bool, EmVideoDisable)
EXPORTVAR(int8_t, EmLagTime)
extern bool EmVideoDisable;
extern int8_t EmLagTime;
EXPORTOSGLUPROC Screen_OutputFrame(uint8_t * screencurrentbuff);
EXPORTOSGLUPROC DoneWithDrawingForTick(void);
EXPORTVAR(bool, ForceMacOff)
extern bool ForceMacOff;
EXPORTVAR(bool, WantMacInterrupt)
extern bool WantMacInterrupt;
EXPORTVAR(bool, WantMacReset)
extern bool WantMacReset;
EXPORTOSGLUFUNC bool ExtraTimeNotOver(void);
EXPORTVAR(uint8_t, SpeedValue)
extern uint8_t SpeedValue;
/* where emulated machine thinks mouse is */
EXPORTVAR(uint16_t, CurMouseV)
EXPORTVAR(uint16_t, CurMouseH)
extern uint16_t CurMouseV;
extern uint16_t CurMouseH;
EXPORTVAR(uint32_t, QuietTime)
EXPORTVAR(uint32_t, QuietSubTicks)
extern uint32_t QuietTime;
extern uint32_t QuietSubTicks;
#define QuietEnds() \
{ \
@ -188,13 +188,13 @@ EXPORTOSGLUPROC Sound_EndWrite(uint16_t actL);
#if EmLocalTalk
#define LT_TxBfMxSz 1024
EXPORTVAR(uint8_t *, LT_TxBuffer)
EXPORTVAR(uint16_t, LT_TxBuffSz)
extern uint8_t * LT_TxBuffer;
extern uint16_t LT_TxBuffSz;
EXPORTOSGLUPROC LT_TransmitPacket(void);
EXPORTVAR(uint8_t *, LT_RxBuffer)
EXPORTVAR(uint32_t, LT_RxBuffSz)
extern uint8_t * LT_RxBuffer;
extern uint32_t LT_RxBuffSz;
EXPORTOSGLUPROC LT_ReceivePacket(void);

View File

@ -12,7 +12,7 @@
/* --- clipboard --- */
#if IncludeHostTextClipExchange
LOCALFUNC uimr MacRoman2UniCodeSize(uint8_t *s, uimr L)
static uimr MacRoman2UniCodeSize(uint8_t *s, uimr L)
{
uimr i;
uint8_t x;
@ -293,7 +293,7 @@ LOCALFUNC uimr MacRoman2UniCodeSize(uint8_t *s, uimr L)
#endif
#if IncludeHostTextClipExchange
LOCALPROC MacRoman2UniCodeData(uint8_t *s, uimr L, char *t)
static void MacRoman2UniCodeData(uint8_t *s, uimr L, char *t)
{
uimr i;
uint8_t x;
@ -596,7 +596,7 @@ GLOBALOSGLUFUNC MacErr_t HTCEexport(tPbuf i)
#endif
#if IncludeHostTextClipExchange
LOCALFUNC MacErr_t UniCodeStrLength(char *s, uimr *r)
static MacErr_t UniCodeStrLength(char *s, uimr *r)
{
MacErr_t err;
uint8_t t;
@ -665,7 +665,7 @@ label_retry:
#endif
#if IncludeHostTextClipExchange
LOCALFUNC uint8_t UniCodePoint2MacRoman(uint32_t x)
static uint8_t UniCodePoint2MacRoman(uint32_t x)
{
/*
adapted from
@ -943,7 +943,7 @@ LOCALFUNC uint8_t UniCodePoint2MacRoman(uint32_t x)
#endif
#if IncludeHostTextClipExchange
LOCALPROC UniCodeStr2MacRoman(char *s, char *r)
static void UniCodeStr2MacRoman(char *s, char *r)
{
MacErr_t err;
uint8_t t;

View File

@ -16,10 +16,10 @@
#endif
#if ! dbglog_ToStdErr
LOCALVAR FILE *dbglog_File = NULL;
static FILE *dbglog_File = NULL;
#endif
LOCALFUNC bool dbglog_open0(void)
static bool dbglog_open0(void)
{
#if dbglog_ToStdErr || dbglog_ToSDL_Log
return true;
@ -39,7 +39,7 @@ LOCALFUNC bool dbglog_open0(void)
#endif
}
LOCALPROC dbglog_write0(char *s, uimr L)
static void dbglog_write0(char *s, uimr L)
{
#if dbglog_ToStdErr
(void) fwrite(s, 1, L, stderr);
@ -60,7 +60,7 @@ LOCALPROC dbglog_write0(char *s, uimr L)
#endif
}
LOCALPROC dbglog_close0(void)
static void dbglog_close0(void)
{
#if ! dbglog_ToStdErr
if (dbglog_File != NULL) {

View File

@ -16,12 +16,12 @@
#define CanGetAppPath 1
#endif
LOCALVAR char *d_arg = NULL;
LOCALVAR char *n_arg = NULL;
static char *d_arg = NULL;
static char *n_arg = NULL;
#if CanGetAppPath
LOCALVAR char *app_parent = NULL;
LOCALVAR char *pref_dir = NULL;
static char *app_parent = NULL;
static char *pref_dir = NULL;
#endif
#ifdef _WIN32

View File

@ -53,7 +53,7 @@ GLOBALOSGLUPROC MoveBytes(anyp srcPtr, anyp destPtr, int32_t byteCount)
/* --- basic dialogs --- */
LOCALPROC CheckSavedMacMsg(void)
static void CheckSavedMacMsg(void)
{
/* called only on quit, if error saved but not yet reported */
@ -84,10 +84,10 @@ LOCALPROC CheckSavedMacMsg(void)
#define UseMotionEvents 1
#if UseMotionEvents
LOCALVAR bool CaughtMouse = false;
static bool CaughtMouse = false;
#endif
LOCALPROC HandleTheEvent(SDL_Event *event)
static void HandleTheEvent(SDL_Event *event)
{
switch (event->type) {
case SDL_QUIT:
@ -206,10 +206,10 @@ LOCALPROC HandleTheEvent(SDL_Event *event)
/* --- main window creation and disposal --- */
LOCALVAR int argc;
LOCALVAR char **argv;
static int argc;
static char **argv;
LOCALFUNC bool SDL_InitDisplay(void)
static bool SDL_InitDisplay(void)
{
bool v = false;
@ -226,11 +226,11 @@ LOCALFUNC bool SDL_InitDisplay(void)
}
#if MayFullScreen
LOCALVAR bool GrabMachine = false;
static bool GrabMachine = false;
#endif
#if MayFullScreen
LOCALPROC GrabTheMachine(void)
static void GrabTheMachine(void)
{
#if GrabKeysFullScreen
SDL_SetWindowGrab(main_wind, SDL_TRUE);
@ -261,7 +261,7 @@ LOCALPROC GrabTheMachine(void)
#endif
#if MayFullScreen
LOCALPROC UngrabMachine(void)
static void UngrabMachine(void)
{
#if EnableFSMouseMotion
@ -284,7 +284,7 @@ LOCALPROC UngrabMachine(void)
#endif
#if EnableFSMouseMotion && HaveWorkingWarp
LOCALPROC MouseConstrain(void)
static void MouseConstrain(void)
{
int16_t shiftdh;
int16_t shiftdv;
@ -324,13 +324,13 @@ enum {
#define kMagStateAuto kNumMagStates
#if MayNotFullScreen
LOCALVAR int CurWinIndx;
LOCALVAR bool HavePositionWins[kNumMagStates];
LOCALVAR int WinPositionsX[kNumMagStates];
LOCALVAR int WinPositionsY[kNumMagStates];
static int CurWinIndx;
static bool HavePositionWins[kNumMagStates];
static int WinPositionsX[kNumMagStates];
static int WinPositionsY[kNumMagStates];
#endif
LOCALFUNC bool CreateMainWindow(void)
static bool CreateMainWindow(void)
{
int NewWindowX;
int NewWindowY;
@ -486,7 +486,7 @@ LOCALFUNC bool CreateMainWindow(void)
return v;
}
LOCALPROC CloseMainWindow(void)
static void CloseMainWindow(void)
{
if (NULL != format) {
SDL_FreeFormat(format);
@ -510,7 +510,7 @@ LOCALPROC CloseMainWindow(void)
}
#if EnableRecreateW
LOCALPROC ZapWState(void)
static void ZapWState(void)
{
main_wind = NULL;
renderer = NULL;
@ -547,7 +547,7 @@ typedef struct WState WState;
#endif
#if EnableRecreateW
LOCALPROC GetWState(WState *r)
static void GetWState(WState *r)
{
#if MayFullScreen
r->f_ViewHSize = ViewHSize;
@ -574,7 +574,7 @@ LOCALPROC GetWState(WState *r)
#endif
#if EnableRecreateW
LOCALPROC SetWState(WState *r)
static void SetWState(WState *r)
{
#if MayFullScreen
ViewHSize = r->f_ViewHSize;
@ -611,11 +611,11 @@ enum {
#endif
#if 1 && 1
LOCALVAR int WinMagStates[kNumWinStates];
static int WinMagStates[kNumWinStates];
#endif
#if EnableRecreateW
LOCALFUNC bool ReCreateMainWindow(void)
static bool ReCreateMainWindow(void)
{
WState old_state;
WState new_state;
@ -693,7 +693,7 @@ LOCALFUNC bool ReCreateMainWindow(void)
}
#endif
LOCALPROC ZapWinStateVars(void)
static void ZapWinStateVars(void)
{
#if MayNotFullScreen
{
@ -755,13 +755,13 @@ void ToggleWantFullScreen(void)
/* --- SavedTasks --- */
LOCALPROC LeaveBackground(void)
static void LeaveBackground(void)
{
ReconnectKeyCodes3();
DisableKeyRepeat();
}
LOCALPROC EnterBackground(void)
static void EnterBackground(void)
{
RestoreKeyRepeat();
DisconnectKeyCodes3();
@ -785,7 +785,7 @@ void EnterSpeedStopped(void)
#endif
}
LOCALPROC CheckForSavedTasks(void)
static void CheckForSavedTasks(void)
{
if (EvtQNeedRecover) {
EvtQNeedRecover = false;
@ -884,7 +884,7 @@ LOCALPROC CheckForSavedTasks(void)
/* --- command line parsing --- */
// TODO: reimplement with an actual argument parsing library
LOCALFUNC bool ScanCommandLine(void)
static bool ScanCommandLine(void)
{
return true;
}
@ -897,7 +897,7 @@ GLOBALOSGLUFUNC bool ExtraTimeNotOver(void)
return TrueEmulatedTime == OnTrueTime;
}
LOCALPROC WaitForTheNextEvent(void)
static void WaitForTheNextEvent(void)
{
SDL_Event event;
@ -906,7 +906,7 @@ LOCALPROC WaitForTheNextEvent(void)
}
}
LOCALPROC CheckForSystemEvents(void)
static void CheckForSystemEvents(void)
{
SDL_Event event;
int i = 10;
@ -963,13 +963,13 @@ label_retry:
#include "PROGMAIN.h"
LOCALPROC ZapOSGLUVars(void)
static void ZapOSGLUVars(void)
{
InitDrives();
ZapWinStateVars();
}
LOCALPROC ReserveAllocAll(void)
static void ReserveAllocAll(void)
{
#if dbglog_HAVE
dbglog_ReserveAlloc();
@ -992,7 +992,7 @@ LOCALPROC ReserveAllocAll(void)
EmulationReserveAlloc();
}
LOCALFUNC bool AllocMemory(void)
static bool AllocMemory(void)
{
uimr n;
bool IsOk = false;
@ -1017,7 +1017,7 @@ LOCALFUNC bool AllocMemory(void)
return IsOk;
}
LOCALPROC UnallocMemory(void)
static void UnallocMemory(void)
{
if (nullpr != ReserveAllocBigBlock) {
free((char *)ReserveAllocBigBlock);
@ -1025,7 +1025,7 @@ LOCALPROC UnallocMemory(void)
}
#if CanGetAppPath
LOCALFUNC bool InitWhereAmI(void)
static bool InitWhereAmI(void)
{
app_parent = SDL_GetBasePath();
@ -1036,7 +1036,7 @@ LOCALFUNC bool InitWhereAmI(void)
#endif
#if CanGetAppPath
LOCALPROC UninitWhereAmI(void)
static void UninitWhereAmI(void)
{
SDL_free(pref_dir);
@ -1044,7 +1044,7 @@ LOCALPROC UninitWhereAmI(void)
}
#endif
LOCALFUNC bool InitOSGLU(void)
static bool InitOSGLU(void)
{
if (Config_TryInit())
if (AllocMemory())
@ -1070,7 +1070,7 @@ LOCALFUNC bool InitOSGLU(void)
return false;
}
LOCALPROC UnInitOSGLU(void)
static void UnInitOSGLU(void)
{
RestoreKeyRepeat();
#if MayFullScreen

View File

@ -12,10 +12,10 @@
/* --- ROM --- */
LOCALVAR char *rom_path = NULL;
static char *rom_path = NULL;
#if CanGetAppPath
LOCALFUNC MacErr_t LoadMacRomFromPrefDir(void)
static MacErr_t LoadMacRomFromPrefDir(void)
{
MacErr_t err;
char *t = NULL;
@ -46,7 +46,7 @@ LOCALFUNC MacErr_t LoadMacRomFromPrefDir(void)
#endif
#if CanGetAppPath
LOCALFUNC MacErr_t LoadMacRomFromAppPar(void)
static MacErr_t LoadMacRomFromAppPar(void)
{
MacErr_t err;
char *d = (NULL == d_arg) ? app_parent : d_arg;

View File

@ -20,9 +20,9 @@ volatile static uint16_t ThePlayOffset;
volatile static uint16_t TheFillOffset;
volatile static uint16_t MinFilledSoundBuffs;
#if dbglog_SoundBuffStats
LOCALVAR uint16_t MaxFilledSoundBuffs;
static uint16_t MaxFilledSoundBuffs;
#endif
LOCALVAR uint16_t TheWriteOffset;
static uint16_t TheWriteOffset;
void Sound_Init0(void)
{
@ -321,9 +321,9 @@ label_retry:
datp->lastv = v1;
}
LOCALVAR SoundR cur_audio;
static SoundR cur_audio;
LOCALVAR bool HaveSoundOut = false;
static bool HaveSoundOut = false;
void Sound_Stop(void)
{

View File

@ -38,7 +38,7 @@ void InitNextTime(void)
IncrNextTime();
}
LOCALVAR uint32_t NewMacDateInSeconds;
static uint32_t NewMacDateInSeconds;
bool UpdateTrueEmulatedTime(void)
{

View File

@ -35,10 +35,10 @@ static struct bpf_insn insns[] =
BPF_STMT(BPF_RET + BPF_K, 0),
};
GLOBALVAR uint8_t * LT_TxBuffer = NULL;
uint8_t * LT_TxBuffer = NULL;
/* Transmit state */
GLOBALVAR uint16_t LT_TxBuffSz = 0;
uint16_t LT_TxBuffSz = 0;
/*
Transmit buffer that is reused from tx packet to tx packet.
@ -59,9 +59,9 @@ static unsigned char tx_buffer[20 + LT_TxBfMxSz] =
"\xFF\xFF\xFF\xFF\xFF\xFFssssss\x80\x9BppppSS";
/* Receive state */
GLOBALVAR uint8_t * LT_RxBuffer = NULL;
uint8_t * LT_RxBuffer = NULL;
/* When data pending, this is used */
GLOBALVAR uint32_t LT_RxBuffSz = 0;
uint32_t LT_RxBuffSz = 0;
/* When data pending, this is used */
/* Macro used by only the get_sockaddrs function for readability. */
@ -72,7 +72,7 @@ GLOBALVAR uint32_t LT_RxBuffSz = 0;
Utility function needed for walking the addresses of the
kernel route lookup
*/
LOCALPROC get_sockaddrs(int addrs, struct sockaddr* sa,
static void get_sockaddrs(int addrs, struct sockaddr* sa,
struct sockaddr** rti_info)
{
int loop;
@ -103,7 +103,7 @@ LOCALPROC get_sockaddrs(int addrs, struct sockaddr* sa,
packets.
*/
LOCALFUNC int get_ethernet(void)
static int get_ethernet(void)
{
int result;
int size;
@ -260,13 +260,13 @@ LOCALFUNC int get_ethernet(void)
return true;
}
LOCALVAR unsigned char *RxBuffer = NULL;
static unsigned char *RxBuffer = NULL;
/*
External function needed at startup to initialize the LocalTalk
functionality.
*/
LOCALFUNC int InitLocalTalk(void)
static int InitLocalTalk(void)
{
/* Perform a lot of stuff to get access to the Ethernet */
get_ethernet();
@ -307,10 +307,10 @@ GLOBALOSGLUPROC LT_TransmitPacket(void)
(void)count; /* unused */
}
LOCALVAR unsigned char* NextPacket = NULL;
LOCALVAR unsigned char* EndPackets = NULL;
static unsigned char* NextPacket = NULL;
static unsigned char* EndPackets = NULL;
LOCALPROC LocalTalkTick0(void)
static void LocalTalkTick0(void)
{
/* Get a single buffer worth of packets from BPF */
unsigned char* device_buffer = RxBuffer;

View File

@ -37,7 +37,7 @@
#if BigEndianUnaligned
#define do_get_mem_word(a) ((uint16_t)*((uint16_t *)(a)))
#else
LOCALINLINEFUNC uint16_t do_get_mem_word(uint8_t * a)
static uint16_t do_get_mem_word(uint8_t * a)
{
#if LittleEndianUnaligned
uint16_t b = (*((uint16_t *)(a)));
@ -54,7 +54,7 @@ LOCALINLINEFUNC uint16_t do_get_mem_word(uint8_t * a)
#elif HaveSwapUi5r && LittleEndianUnaligned
#define do_get_mem_long(a) (SwapUi5r((uint32_t)*((uint32_t *)(a))))
#else
LOCALINLINEFUNC uint32_t do_get_mem_long(uint8_t * a)
static uint32_t do_get_mem_long(uint8_t * a)
{
#if LittleEndianUnaligned
#if 0
@ -98,7 +98,7 @@ LOCALINLINEFUNC uint32_t do_get_mem_long(uint8_t * a)
#if BigEndianUnaligned
#define do_put_mem_word(a, v) ((*((uint16_t *)(a))) = (v))
#else
LOCALINLINEFUNC void do_put_mem_word(uint8_t * a, uint16_t v)
static void do_put_mem_word(uint8_t * a, uint16_t v)
{
#if LittleEndianUnaligned
uint16_t b = ((v & 0x00FF) << 8) | ((v >> 8) & 0x00FF);
@ -116,7 +116,7 @@ LOCALINLINEFUNC void do_put_mem_word(uint8_t * a, uint16_t v)
#elif HaveSwapUi5r && LittleEndianUnaligned
#define do_put_mem_long(a, v) ((*((uint32_t *)(a))) = SwapUi5r(v))
#else
LOCALINLINEFUNC void do_put_mem_long(uint8_t * a, uint32_t v)
static void do_put_mem_long(uint8_t * a, uint32_t v)
{
#if LittleEndianUnaligned
uint16_t b1 = v;

View File

@ -20,11 +20,11 @@
#if IncludePbufs
LOCALVAR void *PbufDat[NumPbufs];
static void *PbufDat[NumPbufs];
#endif
#if IncludePbufs
LOCALFUNC MacErr_t PbufNewFromPtr(void *p, uint32_t count, tPbuf *r)
static MacErr_t PbufNewFromPtr(void *p, uint32_t count, tPbuf *r)
{
tPbuf i;
MacErr_t err;
@ -44,7 +44,7 @@ LOCALFUNC MacErr_t PbufNewFromPtr(void *p, uint32_t count, tPbuf *r)
#endif
#if IncludePbufs
LOCALPROC PbufKillToPtr(void **p, uint32_t *count, tPbuf r)
static void PbufKillToPtr(void **p, uint32_t *count, tPbuf r)
{
*p = PbufDat[r];
*count = PbufSize[r];
@ -80,7 +80,7 @@ GLOBALOSGLUPROC PbufDispose(tPbuf i)
#endif
#if IncludePbufs
LOCALPROC UnInitPbufs(void)
static void UnInitPbufs(void)
{
tPbuf i;
@ -97,7 +97,7 @@ LOCALPROC UnInitPbufs(void)
#endif
#if IncludePbufs
LOCALFUNC uint8_t * PbufLock(tPbuf i)
static uint8_t * PbufLock(tPbuf i)
{
return (uint8_t *)PbufDat[i];
}