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,