Move more files into dirs; fix .h include guards

This commit is contained in:
InvisibleUp 2020-02-26 23:31:48 -05:00
parent b49a10c6e9
commit bee3102834
51 changed files with 166 additions and 186 deletions

4
.gitignore vendored
View File

@ -1,4 +1,6 @@
*.exe
*.obj
.vscode/*
bld
bld
*.dsk
*.ROM

View File

@ -8,14 +8,14 @@ mk_COptions = $(mk_COptionsCommon) -Os
TheDefaultOutput : minivmac.exe
bld/OSGLUWIN.o : src/UI/WIN32/OSGLUWIN.c src/LANG/STRCNENG.h cfg/STRCONST.h src/INTLCHAR.h src/COMOSGLU.h src/CONTROLM.h cfg/CNFGGLOB.h
bld/OSGLUWIN.o : src/UI/WIN32/OSGLUWIN.c src/LANG/STRCNENG.h cfg/STRCONST.h src/INTLCHAR.h src/UI/COMOSGLU.h src/CONTROLM.h cfg/CNFGGLOB.h
gcc "src/UI/WIN32/OSGLUWIN.c" -o "bld/OSGLUWIN.o" $(mk_COptions)
bld/GLOBGLUE.o : src/GLOBGLUE.c
gcc "src/GLOBGLUE.c" -o "bld/GLOBGLUE.o" $(mk_COptions)
bld/M68KITAB.o : src/M68K/M68KITAB.c cfg/CNFGGLOB.h
gcc "src/M68K/M68KITAB.c" -o "bld/M68KITAB.o" $(mk_COptions)
bld/MINEM68K.o : src/M68K/MINEM68K.c
gcc "src/M68K/MINEM68K.c" -o "bld/MINEM68K.o" $(mk_COptions)
bld/M68KITAB.o : src/HW/M68K/M68KITAB.c cfg/CNFGGLOB.h
gcc "src/HW/M68K/M68KITAB.c" -o "bld/M68KITAB.o" $(mk_COptions)
bld/MINEM68K.o : src/HW/M68K/MINEM68K.c
gcc "src/HW/M68K/MINEM68K.c" -o "bld/MINEM68K.o" $(mk_COptions)
bld/VIAEMDEV.o : src/VIAEMDEV.c
gcc "src/VIAEMDEV.c" -o "bld/VIAEMDEV.o" $(mk_COptions)
bld/IWMEMDEV.o : src/IWMEMDEV.c
@ -32,18 +32,22 @@ bld/SONYEMDV.o : src/SONYEMDV.c
gcc "src/SONYEMDV.c" -o "bld/SONYEMDV.o" $(mk_COptions)
bld/SCRNEMDV.o : src/SCRNEMDV.c
gcc "src/SCRNEMDV.c" -o "bld/SCRNEMDV.o" $(mk_COptions)
bld/MOUSEMDV.o : src/MOUSEMDV.c
gcc "src/MOUSEMDV.c" -o "bld/MOUSEMDV.o" $(mk_COptions)
bld/KBRDEMDV.o : src/KBRDEMDV.c
gcc "src/KBRDEMDV.c" -o "bld/KBRDEMDV.o" $(mk_COptions)
bld/MOUSEMDV.o : src/HW/MOUSE/MOUSEMDV.c
gcc "src/HW/MOUSE/MOUSEMDV.c" -o "bld/MOUSEMDV.o" $(mk_COptions)
bld/KBRDEMDV.o : src/HW/KBRD/KBRDEMDV.c
gcc "src/HW/KBRD/KBRDEMDV.c" -o "bld/KBRDEMDV.o" $(mk_COptions)
bld/SNDEMDEV.o : src/SNDEMDEV.c
gcc "src/SNDEMDEV.c" -o "bld/SNDEMDEV.o" $(mk_COptions)
bld/PROGMAIN.o : src/PROGMAIN.c
gcc "src/PROGMAIN.c" -o "bld/PROGMAIN.o" $(mk_COptions)
bld/ADBEMDEV.o : src/ADB/ADBEMDEV.c
gcc "src/ADB/ADBEMDEV.c" -o "bld/ADBEMDEV.o" $(mk_COptions)
bld/PMUEMDEV.o : src/POWERMAN/PMUEMDEV.c
gcc "src/POWERMAN/PMUEMDEV.c" -o "bld/PMUEMDEV.o" $(mk_COptions)
bld/DATE2SEC.o : src/UTIL/DATE2SEC.c
gcc "src/UTIL/DATE2SEC.c" -o "bld/DATE2SEC.o" $(mk_COptions)
# todo: add files things that aren't the mac plus
bld/ADBEMDEV.o : src/HW/ADB/ADBEMDEV.c
gcc "src/HW/ADB/ADBEMDEV.c" -o "bld/ADBEMDEV.o" $(mk_COptions)
bld/PMUEMDEV.o : src/HW/POWERMAN/PMUEMDEV.c
gcc "src/HW/POWERMAN/PMUEMDEV.c" -o "bld/PMUEMDEV.o" $(mk_COptions)
ObjFiles = \
bld/MINEM68K.o \
@ -62,6 +66,7 @@ ObjFiles = \
bld/KBRDEMDV.o \
bld/SNDEMDEV.o \
bld/PROGMAIN.o \
bld/DATE2SEC.o
# bld/ADBEMDEV.o \
# bld/PMUEMDEV.o \

View File

@ -2,17 +2,9 @@
Configuration options used by both platform specific
and platform independent code.
This file is automatically generated by the build system,
which tries to know what options are valid in what
combinations. Avoid changing this file manually unless
you know what you're doing.
Hopefully, one day, we can remove this file entirely.
*/
/* adapt to current compiler/host processor */
#ifdef __i386__
#error "source is configured for 64 bit compiler"
#endif
#include <stdint.h>
#define MayInline inline __attribute__((always_inline))

View File

@ -1,18 +1,9 @@
/*
Configuration options used by platform specific code.
This file is automatically generated by the build system,
which tries to know what options are valid in what
combinations. Avoid changing this file manually unless
you know what you're doing.
Hopefully, one day, we can remove this file entirely.
*/
#include <windows.h>
#include <time.h>
#include <shlobj.h>
#include <tchar.h>
#define RomFileName "vMac.ROM"
#define kCheckSumRom_Size 0x00020000
#define kRomCheckSum1 0x4D1EEEE1
@ -65,17 +56,15 @@
#define NeedDoMoreCommandsMsg 1
#define NeedDoAboutMsg 1
#define UseControlKeys 1
#define UseActvCode 0
#define EnableDemoMsg 0
/* version and other info to display to user */
#define NeedIntlChars 0
#define ItnlKyBdFix 1
#define kStrAppName "Mini vMac"
#define kAppVariationStr "minivmac-36.04-wx64"
#define kStrCopyrightYear "2018"
#define kMaintainerName "unknown"
#define kStrHomePage "(unknown)"
#define kStrAppName "Mini vMac (Viz)"
#define kAppVariationStr "minivmac-viz-36.04-wx64"
#define kStrCopyrightYear "2020"
#define kMaintainerName "InvisibleUp"
#define kStrHomePage "https://github.com/invisibleup/minivmac"
#define kBldOpts "-br 36 -t wx64"

View File

@ -1,7 +1,7 @@
#include "ALTKEYSM.h"
#include "SYSDEPNS.h"
#include "MYOSGLUE.h"
#include "COMOSGLU.h"
#include "UI/COMOSGLU.h"
#include "CONTROLM.h"
#include "INTLCHAR.h"

View File

@ -14,11 +14,10 @@
license for more details.
*/
#ifdef ASCEMDEV_H
#error "header already included"
#else
#ifndef ASCEMDEV_H
#define ASCEMDEV_H
#endif
EXPORTFUNC uint32_t ASC_Access(uint32_t Data, bool WriteMem, CPTR addr);
EXPORTPROC ASC_SubTick(int SubTick);
#endif

View File

@ -14,11 +14,8 @@
license for more details.
*/
#ifdef GLOBGLUE_H
#error "header already included"
#else
#ifndef GLOBGLUE_H
#define GLOBGLUE_H
#endif
#define kEmMd_Twig43 0
@ -274,3 +271,5 @@ typedef ATTer *ATTep;
EXPORTFUNC uint32_t MMDV_Access(ATTep p, uint32_t Data,
bool WriteMem, bool ByteSize, CPTR addr);
EXPORTFUNC bool MemAccessNtfy(ATTep pT);
#endif

View File

@ -25,7 +25,7 @@
#include "GLOBGLUE.h"
#endif
#include "ADB/ADBEMDEV.h"
#include "HW/ADB/ADBEMDEV.h"
#ifdef _VIA_Debug
#include <stdio.h>
@ -38,7 +38,7 @@
IMPORTPROC ADB_ShiftOutData(uint8_t v);
IMPORTFUNC uint8_t ADB_ShiftInData(void);
#include "ADB/ADBSHARE.h"
#include "HW/ADB/ADBSHARE.h"
LOCALVAR bool ADB_ListenDatBuf;
LOCALVAR uint8_t ADB_IndexDatBuf;

View File

@ -29,7 +29,7 @@
#include "GLOBGLUE.h"
#endif
#include "KBRDEMDV.h"
#include "HW/KBRD/KBRDEMDV.h"
#ifdef _VIA_Debug
#include <stdio.h>

View File

@ -1,5 +1,5 @@
/*
KBRDEMDV.h
HW/KBRD/KBRDEMDV.h
Copyright (C) 2003 Philip Cummins, Paul C. Pratt

View File

@ -26,10 +26,10 @@
#include "EMCONFIG.h"
#include "GLOBGLUE.h"
#include "M68K/M68KITAB.h"
#include "HW/M68K/M68KITAB.h"
#endif
#include "M68K/DISAM68K.h"
#include "HW/M68K/DISAM68K.h"
LOCALVAR uint32_t Disasm_pc;

View File

@ -18,12 +18,10 @@
DISAssemble Motorola 68K instructions.
*/
#ifdef DIS1M68K_H
#error "header already included"
#else
#ifndef DIS1M68K_H
#define DIS1M68K_H
#endif
EXPORTPROC DisasmOneOrSave(uint32_t pc);
EXPORTPROC m68k_WantDisasmContext(void);
#endif

View File

@ -26,7 +26,7 @@
#include "EMCONFIG.h"
#include "GLOBGLUE.h"
#include "M68K/M68KITAB.h"
#include "HW/M68K/M68KITAB.h"
struct WorkR {
/* expected size : 8 bytes */

View File

@ -14,13 +14,11 @@
license for more details.
*/
#ifdef M68KITAB_H
#error "header already included"
#else
#ifndef M68KITAB_H
#define M68KITAB_H
#endif
enum {
// 68000
kIKindTst,
kIKindCmpB,
kIKindCmpW,
@ -160,8 +158,7 @@ enum {
kIKindFdflt,
kIKindStop,
kIKindReset,
#if Use68020
// 68020
kIKindCallMorRtm,
kIKindBraL,
kIKindBccL,
@ -184,11 +181,9 @@ enum {
kIKindCAS,
kIKindMoveS,
kIKindBitField,
#endif
#if EmMMU
// MMU
kIKindMMU,
#endif
#if EmFPU
// FPU
kIKindFPUmd60,
kIKindFPUDBcc,
kIKindFPUTrapcc,
@ -198,7 +193,6 @@ enum {
kIKindFPUSave,
kIKindFPURestore,
kIKindFPUdflt,
#endif
kNumIKinds
};
@ -277,3 +271,5 @@ typedef struct DecOpR DecOpR;
#define SetDcoCycles(p, xx) ((p)->x.Cycles = (xx))
EXPORTPROC M68KITAB_setup(DecOpR *p);
#endif

View File

@ -38,14 +38,14 @@
#include "EMCONFIG.h"
#include "GLOBGLUE.h"
#include "M68K/M68KITAB.h"
#include "HW/M68K/M68KITAB.h"
#if WantDisasm
#include "M68K/DISAM68K.h"
#include "HW/M68K/DISAM68K.h"
#endif
#endif
#include "M68K/MINEM68K.h"
#include "HW/M68K/MINEM68K.h"
/*
ReportAbnormalID unused 0x0123 - 0x01FF

View File

@ -14,11 +14,8 @@
license for more details.
*/
#ifdef MINEM68K_H
#error "header already included"
#else
#ifndef MINEM68K_H
#define MINEM68K_H
#endif
EXPORTPROC MINEM68K_Init(
uint8_t *fIPL);
@ -51,3 +48,5 @@ EXPORTPROC put_vm_long(CPTR addr, uint32_t l);
EXPORTPROC SetHeadATTel(ATTep p);
EXPORTFUNC ATTep FindATTel(CPTR addr);
#endif

View File

@ -30,10 +30,10 @@
#include "EMCONFIG.h"
#include "GLOBGLUE.h"
#include "SCCEMDEV.h"
#include "M68K/MINEM68K.h"
#include "HW/M68K/MINEM68K.h"
#endif
#include "MOUSEMDV.h"
#include "HW/MOUSE/MOUSEMDV.h"
GLOBALPROC Mouse_Update(void)
{

View File

@ -1,5 +1,5 @@
/*
MOUSEMDV.h
HW/MOUSE/MOUSEMDV.h
Copyright (C) 2003 Philip Cummins, Paul C. Pratt

View File

@ -26,7 +26,7 @@
#include "VIAEMDEV.h"
#endif
#include "POWERMAN/PMUEMDEV.h"
#include "HW/POWERMAN/PMUEMDEV.h"
/*
ReportAbnormalID unused 0x0E0E - 0x0EFF

View File

@ -26,7 +26,7 @@
#include <string.h>
#include "SYSDEPNS.h"
#include "COMOSGLU.h"
#include "UI/COMOSGLU.h"
// Enum of alternate icons
typedef enum AHM_types {

View File

@ -24,8 +24,8 @@
#include "UI/MYOSGLUE.h"
#include "EMCONFIG.h"
#include "GLOBGLUE.h"
#include "M68K/M68KITAB.h"
#include "M68K/MINEM68K.h"
#include "HW/M68K/M68KITAB.h"
#include "HW/M68K/MINEM68K.h"
#include "VIAEMDEV.h"
#if EmVIA2
#include "VIA2EMDV.h"
@ -43,11 +43,11 @@
#include "VIDEMDEV.h"
#endif
#if EmClassicKbrd
#include "KBRDEMDV.h"
#include "HW/KBRD/KBRDEMDV.h"
#elif EmPMU
#include "POWERMAN/PMUEMDEV.h"
#include "HW/POWERMAN/PMUEMDEV.h"
#else
#include "ADB/ADBEMDEV.h"
#include "HW/ADB/ADBEMDEV.h"
#endif
#if EmASC
#include "ASCEMDEV.h"
@ -56,7 +56,7 @@
#include "SNDEMDEV.h"
#endif
#endif
#include "MOUSEMDV.h"
#include "HW/MOUSE/MOUSEMDV.h"
#endif

View File

@ -15,11 +15,10 @@
license for more details.
*/
#ifdef PROGMAIN_H
#error "header already included"
#else
#ifndef PROGMAIN_H
#define PROGMAIN_H
#endif
EXPORTPROC EmulationReserveAlloc(void);
EXPORTPROC ProgramMain(void);
#endif

View File

@ -14,10 +14,9 @@
license for more details.
*/
#ifdef ROMEMDEV_H
#error "header already included"
#else
#ifndef ROMEMDEV_H
#define ROMEMDEV_H
#endif
EXPORTFUNC bool ROM_Init(void);
#endif

View File

@ -14,11 +14,8 @@
license for more details.
*/
#ifdef RTCEMDEV_H
#error "header already included"
#else
#ifndef RTCEMDEV_H
#define RTCEMDEV_H
#endif
EXPORTFUNC bool RTC_Init(void);
EXPORTPROC RTC_Interrupt(void);
@ -26,3 +23,5 @@ EXPORTPROC RTC_Interrupt(void);
EXPORTPROC RTCunEnabled_ChangeNtfy(void);
EXPORTPROC RTCclock_ChangeNtfy(void);
EXPORTPROC RTCdataLine_ChangeNtfy(void);
#endif

View File

@ -14,11 +14,8 @@
license for more details.
*/
#ifdef SCCEMDEV_H
#error "header already included"
#else
#ifndef SCCEMDEV_H
#define SCCEMDEV_H
#endif
EXPORTPROC SCC_Reset(void);
@ -30,3 +27,5 @@ EXPORTFUNC bool SCC_InterruptsEnabled(void);
EXPORTPROC LocalTalkTick(void);
EXPORTFUNC int InitLocalTalk(void);
#endif
#endif

View File

@ -15,10 +15,9 @@
license for more details.
*/
#ifdef SCRNEMDV_H
#error "header already included"
#else
#ifndef SCRNEMDV_H
#define SCRNEMDV_H
#endif
EXPORTPROC Screen_EndTickNotify(void);
#endif

View File

@ -31,7 +31,7 @@
#include "UI/MYOSGLUE.h"
#include "EMCONFIG.h"
#include "GLOBGLUE.h"
#include "M68K/MINEM68K.h"
#include "HW/M68K/MINEM68K.h"
#endif
#include "SCSIEMDV.h"

View File

@ -14,12 +14,11 @@
license for more details.
*/
#ifdef SCSIEMDV_H
#error "header already included"
#else
#ifndef SCSIEMDV_H
#define SCSIEMDV_H
#endif
EXPORTPROC SCSI_Reset(void);
EXPORTFUNC uint32_t SCSI_Access(uint32_t Data, bool WriteMem, CPTR addr);
#endif

View File

@ -28,7 +28,7 @@
#include "UI/MYOSGLUE.h"
#include "EMCONFIG.h"
#include "GLOBGLUE.h"
#include "M68K/MINEM68K.h"
#include "HW/M68K/MINEM68K.h"
#endif
#include "SNDEMDEV.h"

View File

@ -34,7 +34,7 @@
#include "ENDIANAC.h"
#include "EMCONFIG.h"
#include "GLOBGLUE.h"
#include "M68K/MINEM68K.h"
#include "HW/M68K/MINEM68K.h"
#endif
#include "SONYEMDV.h"

View File

@ -18,11 +18,8 @@
SYStem DEPeNdencies.
*/
#ifdef SYSDEPNS_H
#error "header already included"
#else
#ifndef SYSDEPNS_H
#define SYSDEPNS_H
#endif
#include <stdint.h>
#include <stdbool.h>
@ -127,3 +124,5 @@ typedef int32_t simr;
#ifndef HaveSwapUi5r
#define HaveSwapUi5r 0
#endif
#endif

View File

@ -344,7 +344,7 @@ LOCALPROC dbglog_close0(void)
#define WantColorTransValid 1
#include "COMOSGLU.h"
#include "UI/COMOSGLU.h"
#define WantKeyboard_RemapMac 1

View File

@ -895,7 +895,7 @@ LOCALPROC dbglog_close0(void)
#define WantColorTransValid 1
#endif
#include "COMOSGLU.h"
#include "UI/COMOSGLU.h"
/* --- time, date --- */
@ -1947,7 +1947,7 @@ LOCALFUNC bool InitMousePosition(void)
/* --- time, date, location, part 2 --- */
#include "DATE2SEC.h"
#include "UTIL/DATE2SEC.h"
LOCALFUNC bool InitLocationDat(void)
{

View File

@ -25,13 +25,10 @@
port of vMac, by Philip Cummins.
*/
#ifdef MYOSGLUE_H
#ifndef AllFiles
#error "header already included"
#endif
#else
#ifndef MYOSGLUE_H
#define MYOSGLUE_H
#endif
#include "UTIL/DATE2SEC.h"
#if WantAbnormalReports
@ -439,3 +436,5 @@ EXPORTOSGLUPROC EvtQOutDone(void);
#define MKC_CM 0x80
#define MKC_None 0xFF
#endif

View File

@ -121,7 +121,7 @@ LOCALPROC WriteExtraErr(char *s)
#define WantColorTransValid 0
#include "COMOSGLU.h"
#include "UI/COMOSGLU.h"
#include "CONTROLM.h"
LOCALPROC NativeStrFromCStr(char *r, char *s)
@ -730,7 +730,7 @@ LOCALPROC DS_HandleKeyboard(void)
LOCALVAR uint32_t TrueEmulatedTime = 0;
#include "DATE2SEC.h"
#include "UTIL/DATE2SEC.h"
#define TicksPerSecond 1000000
/* #define TicksPerSecond 1000 */

View File

@ -742,7 +742,7 @@ LOCALPROC dbglog_close0(void)
#include "INTLCHAR.h"
#include "COMOSGLU.h"
#include "UI/COMOSGLU.h"
#define WantKeyboard_RemapMac 1

View File

@ -308,7 +308,7 @@ LOCALFUNC bool NetSupportedContains(Atom x)
#define WantColorTransValid 1
#include "COMOSGLU.h"
#include "UI/COMOSGLU.h"
#include "PBUFSTDC.h"
@ -2288,7 +2288,7 @@ LOCALPROC DisconnectKeyCodes3(void)
LOCALVAR uint32_t TrueEmulatedTime = 0;
#include "DATE2SEC.h"
#include "UTIL/DATE2SEC.h"
#define TicksPerSecond 1000000

View File

@ -28,6 +28,11 @@
The main entry point '_tWinMain' is at the end of this file.
*/
#include <windows.h>
#include <time.h>
#include <shlobj.h>
#include <tchar.h>
#include "CNFGRAPI.h"
#include "SYSDEPNS.h"
#include "ENDIANAC.h"
@ -240,7 +245,7 @@ LOCALPROC dbglog_close0(void)
#endif
#include "COMOSGLU.h"
#include "UI/COMOSGLU.h"
#ifndef InstallFileIcons
#define InstallFileIcons 0
@ -2253,7 +2258,7 @@ LOCALFUNC bool UpdateTrueEmulatedTime(void)
LOCALVAR uint32_t TimeSecBase;
LOCALVAR DWORD TimeMilliBase;
#include "DATE2SEC.h"
#include "UTIL/DATE2SEC.h"
LOCALFUNC bool CheckDateTime(void)
{

View File

@ -29,7 +29,7 @@
#include "STRCONST.h"
#include "COMOSGLU.h"
#include "UI/COMOSGLU.h"
/* --- some simple utilities --- */
@ -778,7 +778,7 @@ LOCALPROC DoKeyCode(guint keycode, bool down)
LOCALVAR uint32_t TrueEmulatedTime = 0;
#include "DATE2SEC.h"
#include "UTIL/DATE2SEC.h"
#define TicksPerSecond 1000000

View File

@ -168,7 +168,7 @@ LOCALPROC dbglog_close0(void)
#define WantColorTransValid 0
#include "COMOSGLU.h"
#include "UI/COMOSGLU.h"
#include "PBUFSTDC.h"

View File

@ -89,7 +89,7 @@ LOCALPROC dbglog_close0(void)
#define WantColorTransValid 0
#include "COMOSGLU.h"
#include "UI/COMOSGLU.h"
#include "PBUFSTDC.h"

View File

@ -1,5 +1,5 @@
/*
DATE2SEC.h
UTIL/DATE2SEC.h
Copyright (C) 2003 Bradford L. Barrett, Paul C. Pratt
You can redistribute this file and/or modify it under the terms
@ -25,11 +25,6 @@
by Bradford L. Barrett.
*/
#ifdef DATE2SEC_H
#error "header already included"
#else
#define DATE2SEC_H
#endif
/*
The function jdate was found at the end of the file
@ -49,32 +44,10 @@
copies of this or derived software.
*/
/* ************************************************************* */
/* */
/* JDATE - Julian date calculator */
/* */
/* Calculates the number of days since Jan 1, 0000. */
/* */
/* Originally written by Bradford L. Barrett (03/17/1988) */
/* Returns an unsigned long value representing the number of */
/* days since January 1, 0000. */
/* */
/* Note: Due to the changes made by Pope Gregory XIII in the */
/* 16th Centyry (Feb 24, 1582), dates before 1583 will */
/* not return a truely accurate number (will be at least */
/* 10 days off). Somehow, I don't think this will */
/* present much of a problem for most situations :) */
/* */
/* Usage: days = jdate(day, month, year) */
/* */
/* The number returned is adjusted by 5 to facilitate day of */
/* week calculations. The mod of the returned value gives the */
/* day of the week the date is. (ie: dow = days % 7) where */
/* dow will return 0=Sunday, 1=Monday, 2=Tuesday, etc... */
/* */
/* ************************************************************* */
#include "SYSDEPNS.h"
#include "DATE2SEC.h"
LOCALFUNC uint32_t jdate(int day, int month, int year)
uint32_t jdate(int day, int month, int year)
{
uint32_t days; /* value returned */
int mtable[] = {
@ -104,7 +77,7 @@ LOCALFUNC uint32_t jdate(int day, int month, int year)
return (days + 5);
}
LOCALFUNC uint32_t Date2MacSeconds(int second, int minute, int hour,
uint32_t Date2MacSeconds(int second, int minute, int hour,
int day, int month, int year)
{
uint32_t curjdate;

34
src/UTIL/DATE2SEC.h Normal file
View File

@ -0,0 +1,34 @@
#ifndef DATE2SEC_H
#define DATE2SEC_H
#include "SYSDEPNS.h"
/* ************************************************************* */
/* */
/* JDATE - Julian date calculator */
/* */
/* Calculates the number of days since Jan 1, 0000. */
/* */
/* Originally written by Bradford L. Barrett (03/17/1988) */
/* Returns an unsigned long value representing the number of */
/* days since January 1, 0000. */
/* */
/* Note: Due to the changes made by Pope Gregory XIII in the */
/* 16th Centyry (Feb 24, 1582), dates before 1583 will */
/* not return a truely accurate number (will be at least */
/* 10 days off). Somehow, I don't think this will */
/* present much of a problem for most situations :) */
/* */
/* The number returned is adjusted by 5 to facilitate day of */
/* week calculations. The mod of the returned value gives the */
/* day of the week the date is. (ie: dow = days % 7) where */
/* dow will return 0=Sunday, 1=Monday, 2=Tuesday, etc... */
/* */
/* ************************************************************* */
uint32_t jdate(int day, int month, int year);
uint32_t Date2MacSeconds(
int second, int minute, int hour, int day, int month, int year
);
#endif

View File

@ -14,11 +14,8 @@
license for more details.
*/
#ifdef VIA2EMDV_H
#error "header already included"
#else
#ifndef VIA2EMDV_H
#define VIA2EMDV_H
#endif
EXPORTPROC VIA2_Zap(void);
EXPORTPROC VIA2_Reset(void);
@ -46,3 +43,5 @@ EXPORTFUNC uint16_t VIA2_GetT1InvertTime(void);
EXPORTPROC VIA2_ShiftInData(uint8_t v);
EXPORTFUNC uint8_t VIA2_ShiftOutData(void);
#endif

View File

@ -14,11 +14,8 @@
license for more details.
*/
#ifdef VIAEMDEV_H
#error "header already included"
#else
#ifndef VIAEMDEV_H
#define VIAEMDEV_H
#endif
EXPORTPROC VIA1_Zap(void);
EXPORTPROC VIA1_Reset(void);
@ -46,3 +43,5 @@ EXPORTFUNC uint16_t VIA1_GetT1InvertTime(void);
EXPORTPROC VIA1_ShiftInData(uint8_t v);
EXPORTFUNC uint8_t VIA1_ShiftOutData(void);
#endif

View File

@ -33,7 +33,7 @@
#include "ENDIANAC.h"
#include "EMCONFIG.h"
#include "GLOBGLUE.h"
#include "M68K/MINEM68K.h"
#include "HW/M68K/MINEM68K.h"
#include "SONYEMDV.h"
#endif

View File

@ -14,14 +14,13 @@
license for more details.
*/
#ifdef VIDEMDEV_H
#error "header already included"
#else
#ifndef VIDEMDEV_H
#define VIDEMDEV_H
#endif
EXPORTFUNC bool Vid_Init(void);
EXPORTFUNC uint16_t Vid_Reset(void);
EXPORTPROC Vid_Update(void);
EXPORTPROC ExtnVideo_Access(CPTR p);
#endif