Move ADB, PMU files into new dir

This commit is contained in:
InvisibleUp 2020-02-26 22:44:56 -05:00
parent b98c8a8646
commit b49a10c6e9
9 changed files with 257 additions and 241 deletions

View File

@ -10,36 +10,40 @@ 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
gcc "src/UI/WIN32/OSGLUWIN.c" -o "bld/OSGLUWIN.o" $(mk_COptions)
bld/GLOBGLUE.o : src/GLOBGLUE.c cfg/CNFGGLOB.h
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 cfg/CNFGGLOB.h
bld/MINEM68K.o : src/M68K/MINEM68K.c
gcc "src/M68K/MINEM68K.c" -o "bld/MINEM68K.o" $(mk_COptions)
bld/VIAEMDEV.o : src/VIAEMDEV.c cfg/CNFGGLOB.h
bld/VIAEMDEV.o : src/VIAEMDEV.c
gcc "src/VIAEMDEV.c" -o "bld/VIAEMDEV.o" $(mk_COptions)
bld/IWMEMDEV.o : src/IWMEMDEV.c cfg/CNFGGLOB.h
bld/IWMEMDEV.o : src/IWMEMDEV.c
gcc "src/IWMEMDEV.c" -o "bld/IWMEMDEV.o" $(mk_COptions)
bld/SCCEMDEV.o : src/SCCEMDEV.c cfg/CNFGGLOB.h
bld/SCCEMDEV.o : src/SCCEMDEV.c
gcc "src/SCCEMDEV.c" -o "bld/SCCEMDEV.o" $(mk_COptions)
bld/RTCEMDEV.o : src/RTCEMDEV.c cfg/CNFGGLOB.h
bld/RTCEMDEV.o : src/RTCEMDEV.c
gcc "src/RTCEMDEV.c" -o "bld/RTCEMDEV.o" $(mk_COptions)
bld/ROMEMDEV.o : src/ROMEMDEV.c cfg/CNFGGLOB.h
bld/ROMEMDEV.o : src/ROMEMDEV.c
gcc "src/ROMEMDEV.c" -o "bld/ROMEMDEV.o" $(mk_COptions)
bld/SCSIEMDV.o : src/SCSIEMDV.c cfg/CNFGGLOB.h
bld/SCSIEMDV.o : src/SCSIEMDV.c
gcc "src/SCSIEMDV.c" -o "bld/SCSIEMDV.o" $(mk_COptions)
bld/SONYEMDV.o : src/SONYEMDV.c cfg/CNFGGLOB.h
bld/SONYEMDV.o : src/SONYEMDV.c
gcc "src/SONYEMDV.c" -o "bld/SONYEMDV.o" $(mk_COptions)
bld/SCRNEMDV.o : src/SCRNEMDV.c cfg/CNFGGLOB.h
bld/SCRNEMDV.o : src/SCRNEMDV.c
gcc "src/SCRNEMDV.c" -o "bld/SCRNEMDV.o" $(mk_COptions)
bld/MOUSEMDV.o : src/MOUSEMDV.c cfg/CNFGGLOB.h
bld/MOUSEMDV.o : src/MOUSEMDV.c
gcc "src/MOUSEMDV.c" -o "bld/MOUSEMDV.o" $(mk_COptions)
bld/KBRDEMDV.o : src/KBRDEMDV.c cfg/CNFGGLOB.h
bld/KBRDEMDV.o : src/KBRDEMDV.c
gcc "src/KBRDEMDV.c" -o "bld/KBRDEMDV.o" $(mk_COptions)
bld/SNDEMDEV.o : src/SNDEMDEV.c cfg/CNFGGLOB.h
bld/SNDEMDEV.o : src/SNDEMDEV.c
gcc "src/SNDEMDEV.c" -o "bld/SNDEMDEV.o" $(mk_COptions)
bld/PROGMAIN.o : src/PROGMAIN.c cfg/CNFGGLOB.h
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)
ObjFiles = \
bld/MINEM68K.o \
@ -58,6 +62,8 @@ ObjFiles = \
bld/KBRDEMDV.o \
bld/SNDEMDEV.o \
bld/PROGMAIN.o \
# bld/ADBEMDEV.o \
# bld/PMUEMDEV.o \
bld/main.res: src/UI/WIN32/main.rc

View File

@ -25,7 +25,7 @@
#include "GLOBGLUE.h"
#endif
#include "ADBEMDEV.h"
#include "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 "ADBSHARE.h"
#include "ADB/ADBSHARE.h"
LOCALVAR bool ADB_ListenDatBuf;
LOCALVAR uint8_t ADB_IndexDatBuf;

190
src/ALTKEYSM.c Normal file
View File

@ -0,0 +1,190 @@
#include "ALTKEYSM.h"
#include "SYSDEPNS.h"
#include "MYOSGLUE.h"
#include "COMOSGLU.h"
#include "CONTROLM.h"
#include "INTLCHAR.h"
LOCALVAR bool AltKeysLockText = false;
LOCALVAR bool AltKeysTrueCmnd = false;
LOCALVAR bool AltKeysTrueOption = false;
LOCALVAR bool AltKeysTrueShift = false;
LOCALVAR bool AltKeysModOn = false;
LOCALVAR bool AltKeysTextOn = false;
LOCALPROC CheckAltKeyUseMode(void)
{
bool NewAltKeysTextOn;
AltKeysModOn = AltKeysTrueCmnd
|| AltKeysTrueOption || AltKeysTrueShift;
NewAltKeysTextOn = AltKeysLockText || AltKeysModOn;
if (NewAltKeysTextOn != AltKeysTextOn) {
DisconnectKeyCodes(kKeepMaskControl | kKeepMaskCapsLock
| (AltKeysTrueCmnd ? kKeepMaskCommand : 0)
| (AltKeysTrueOption ? kKeepMaskOption : 0)
| (AltKeysTrueShift ? kKeepMaskShift : 0));
AltKeysTextOn = NewAltKeysTextOn;
}
}
LOCALPROC Keyboard_UpdateKeyMap1(uint8_t key, bool down)
{
if (MKC_Command == key) {
AltKeysTrueCmnd = down;
CheckAltKeyUseMode();
Keyboard_UpdateKeyMap(key, down);
} else if (MKC_Option == key) {
AltKeysTrueOption = down;
CheckAltKeyUseMode();
Keyboard_UpdateKeyMap(key, down);
} else if (MKC_Shift == key) {
AltKeysTrueShift = down;
CheckAltKeyUseMode();
Keyboard_UpdateKeyMap(key, down);
} else if (MKC_SemiColon == key) {
if (down && ! AltKeysModOn) {
if (AltKeysLockText) {
AltKeysLockText = false;
NeedWholeScreenDraw = true;
SpecialModeClr(SpclModeAltKeyText);
CheckAltKeyUseMode();
}
} else {
Keyboard_UpdateKeyMap(key, down);
}
} else if (AltKeysTextOn) {
Keyboard_UpdateKeyMap(key, down);
} else if (MKC_M == key) {
if (down) {
if (! AltKeysLockText) {
AltKeysLockText = true;
SpecialModeSet(SpclModeAltKeyText);
NeedWholeScreenDraw = true;
CheckAltKeyUseMode();
}
}
} else {
switch (key) {
case MKC_A:
key = MKC_SemiColon;
break;
case MKC_B:
key = MKC_BackSlash;
break;
case MKC_C:
key = MKC_F3;
break;
case MKC_D:
key = MKC_Option;
break;
case MKC_E:
key = MKC_BackSpace;
break;
case MKC_F:
key = MKC_Command;
break;
case MKC_G:
key = MKC_Enter;
break;
case MKC_H:
key = MKC_Equal;
break;
case MKC_I:
key = MKC_Up;
break;
case MKC_J:
key = MKC_Left;
break;
case MKC_K:
key = MKC_Down;
break;
case MKC_L:
key = MKC_Right;
break;
case MKC_M:
/* handled above */
break;
case MKC_N:
key = MKC_Minus;
break;
case MKC_O:
key = MKC_RightBracket;
break;
case MKC_P:
return; /* none */
break;
case MKC_Q:
key = MKC_Grave;
break;
case MKC_R:
key = MKC_Return;
break;
case MKC_S:
key = MKC_Shift;
break;
case MKC_T:
key = MKC_Tab;
break;
case MKC_U:
key = MKC_LeftBracket;
break;
case MKC_V:
key = MKC_F4;
break;
case MKC_W:
return; /* none */
break;
case MKC_X:
key = MKC_F2;
break;
case MKC_Y:
key = MKC_Escape;
break;
case MKC_Z:
key = MKC_F1;
break;
default:
break;
}
Keyboard_UpdateKeyMap(key, down);
}
}
LOCALPROC DisconnectKeyCodes1(uint32_t KeepMask)
{
DisconnectKeyCodes(KeepMask);
if (! (0 != (KeepMask & kKeepMaskCommand))) {
AltKeysTrueCmnd = false;
}
if (! (0 != (KeepMask & kKeepMaskOption))) {
AltKeysTrueOption = false;
}
if (! (0 != (KeepMask & kKeepMaskShift))) {
AltKeysTrueShift = false;
}
AltKeysModOn = AltKeysTrueCmnd
|| AltKeysTrueOption || AltKeysTrueShift;
AltKeysTextOn = AltKeysLockText || AltKeysModOn;
}
LOCALPROC DrawAltKeyMode(void)
{
int i;
CurCellv0 = ControlBoxv0;
CurCellh0 = ControlBoxh0;
DrawCellAdvance(kInsertText00);
for (i = (ControlBoxw - 4) / 2; --i >= 0; ) {
DrawCellAdvance(kInsertText04);
}
DrawCellAdvance(kInsertText01);
DrawCellAdvance(kInsertText02);
for (i = (ControlBoxw - 4) / 2; --i >= 0; ) {
DrawCellAdvance(kInsertText04);
}
DrawCellAdvance(kInsertText03);
}

View File

@ -18,192 +18,12 @@
ALTernate KEYs Mode
*/
#ifdef ALTKEYSM_H
#error "header already included"
#else
#include "SYSDEPNS.h"
#ifndef ALTKEYSM_H
#define ALTKEYSM_H
LOCALPROC CheckAltKeyUseMode(void);
LOCALPROC Keyboard_UpdateKeyMap1(uint8_t key, bool down);
LOCALPROC DisconnectKeyCodes1(uint32_t KeepMask);
LOCALPROC DrawAltKeyMode(void);
#endif
LOCALVAR bool AltKeysLockText = false;
LOCALVAR bool AltKeysTrueCmnd = false;
LOCALVAR bool AltKeysTrueOption = false;
LOCALVAR bool AltKeysTrueShift = false;
LOCALVAR bool AltKeysModOn = false;
LOCALVAR bool AltKeysTextOn = false;
LOCALPROC CheckAltKeyUseMode(void)
{
bool NewAltKeysTextOn;
AltKeysModOn = AltKeysTrueCmnd
|| AltKeysTrueOption || AltKeysTrueShift;
NewAltKeysTextOn = AltKeysLockText || AltKeysModOn;
if (NewAltKeysTextOn != AltKeysTextOn) {
DisconnectKeyCodes(kKeepMaskControl | kKeepMaskCapsLock
| (AltKeysTrueCmnd ? kKeepMaskCommand : 0)
| (AltKeysTrueOption ? kKeepMaskOption : 0)
| (AltKeysTrueShift ? kKeepMaskShift : 0));
AltKeysTextOn = NewAltKeysTextOn;
}
}
LOCALPROC Keyboard_UpdateKeyMap1(uint8_t key, bool down)
{
if (MKC_Command == key) {
AltKeysTrueCmnd = down;
CheckAltKeyUseMode();
Keyboard_UpdateKeyMap(key, down);
} else if (MKC_Option == key) {
AltKeysTrueOption = down;
CheckAltKeyUseMode();
Keyboard_UpdateKeyMap(key, down);
} else if (MKC_Shift == key) {
AltKeysTrueShift = down;
CheckAltKeyUseMode();
Keyboard_UpdateKeyMap(key, down);
} else if (MKC_SemiColon == key) {
if (down && ! AltKeysModOn) {
if (AltKeysLockText) {
AltKeysLockText = false;
NeedWholeScreenDraw = true;
SpecialModeClr(SpclModeAltKeyText);
CheckAltKeyUseMode();
}
} else {
Keyboard_UpdateKeyMap(key, down);
}
} else if (AltKeysTextOn) {
Keyboard_UpdateKeyMap(key, down);
} else if (MKC_M == key) {
if (down) {
if (! AltKeysLockText) {
AltKeysLockText = true;
SpecialModeSet(SpclModeAltKeyText);
NeedWholeScreenDraw = true;
CheckAltKeyUseMode();
}
}
} else {
switch (key) {
case MKC_A:
key = MKC_SemiColon;
break;
case MKC_B:
key = MKC_BackSlash;
break;
case MKC_C:
key = MKC_F3;
break;
case MKC_D:
key = MKC_Option;
break;
case MKC_E:
key = MKC_BackSpace;
break;
case MKC_F:
key = MKC_Command;
break;
case MKC_G:
key = MKC_Enter;
break;
case MKC_H:
key = MKC_Equal;
break;
case MKC_I:
key = MKC_Up;
break;
case MKC_J:
key = MKC_Left;
break;
case MKC_K:
key = MKC_Down;
break;
case MKC_L:
key = MKC_Right;
break;
case MKC_M:
/* handled above */
break;
case MKC_N:
key = MKC_Minus;
break;
case MKC_O:
key = MKC_RightBracket;
break;
case MKC_P:
return; /* none */
break;
case MKC_Q:
key = MKC_Grave;
break;
case MKC_R:
key = MKC_Return;
break;
case MKC_S:
key = MKC_Shift;
break;
case MKC_T:
key = MKC_Tab;
break;
case MKC_U:
key = MKC_LeftBracket;
break;
case MKC_V:
key = MKC_F4;
break;
case MKC_W:
return; /* none */
break;
case MKC_X:
key = MKC_F2;
break;
case MKC_Y:
key = MKC_Escape;
break;
case MKC_Z:
key = MKC_F1;
break;
default:
break;
}
Keyboard_UpdateKeyMap(key, down);
}
}
LOCALPROC DisconnectKeyCodes1(uint32_t KeepMask)
{
DisconnectKeyCodes(KeepMask);
if (! (0 != (KeepMask & kKeepMaskCommand))) {
AltKeysTrueCmnd = false;
}
if (! (0 != (KeepMask & kKeepMaskOption))) {
AltKeysTrueOption = false;
}
if (! (0 != (KeepMask & kKeepMaskShift))) {
AltKeysTrueShift = false;
}
AltKeysModOn = AltKeysTrueCmnd
|| AltKeysTrueOption || AltKeysTrueShift;
AltKeysTextOn = AltKeysLockText || AltKeysModOn;
}
LOCALPROC DrawAltKeyMode(void)
{
int i;
CurCellv0 = ControlBoxv0;
CurCellh0 = ControlBoxh0;
DrawCellAdvance(kInsertText00);
for (i = (ControlBoxw - 4) / 2; --i >= 0; ) {
DrawCellAdvance(kInsertText04);
}
DrawCellAdvance(kInsertText01);
DrawCellAdvance(kInsertText02);
for (i = (ControlBoxw - 4) / 2; --i >= 0; ) {
DrawCellAdvance(kInsertText04);
}
DrawCellAdvance(kInsertText03);
}

View File

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

View File

@ -19,44 +19,44 @@
*/
#ifndef AllFiles
#include "SYSDEPNS.h"
#include "SYSDEPNS.h"
#include "UI/MYOSGLUE.h"
#include "EMCONFIG.h"
#include "GLOBGLUE.h"
#include "M68K/M68KITAB.h"
#include "M68K/MINEM68K.h"
#include "VIAEMDEV.h"
#if EmVIA2
#include "VIA2EMDV.h"
#endif
#include "IWMEMDEV.h"
#include "SCCEMDEV.h"
#if EmRTC
#include "RTCEMDEV.h"
#endif
#include "ROMEMDEV.h"
#include "SCSIEMDV.h"
#include "SONYEMDV.h"
#include "SCRNEMDV.h"
#if EmVidCard
#include "VIDEMDEV.h"
#endif
#if EmClassicKbrd
#include "KBRDEMDV.h"
#elif EmPMU
#include "PMUEMDEV.h"
#else
#include "ADBEMDEV.h"
#endif
#if EmASC
#include "ASCEMDEV.h"
#else
#if SoundEnabled && (CurEmMd != kEmMd_PB100)
#include "SNDEMDEV.h"
#endif
#endif
#include "MOUSEMDV.h"
#include "UI/MYOSGLUE.h"
#include "EMCONFIG.h"
#include "GLOBGLUE.h"
#include "M68K/M68KITAB.h"
#include "M68K/MINEM68K.h"
#include "VIAEMDEV.h"
#if EmVIA2
#include "VIA2EMDV.h"
#endif
#include "IWMEMDEV.h"
#include "SCCEMDEV.h"
#if EmRTC
#include "RTCEMDEV.h"
#endif
#include "ROMEMDEV.h"
#include "SCSIEMDV.h"
#include "SONYEMDV.h"
#include "SCRNEMDV.h"
#if EmVidCard
#include "VIDEMDEV.h"
#endif
#if EmClassicKbrd
#include "KBRDEMDV.h"
#elif EmPMU
#include "POWERMAN/PMUEMDEV.h"
#else
#include "ADB/ADBEMDEV.h"
#endif
#if EmASC
#include "ASCEMDEV.h"
#else
#if SoundEnabled && (CurEmMd != kEmMd_PB100)
#include "SNDEMDEV.h"
#endif
#endif
#include "MOUSEMDV.h"
#endif