/*
VIA2EMDV.c
Copyright (C) 2008 Philip Cummins, Paul C. Pratt
You can redistribute this file and/or modify it under the terms
of version 2 of the GNU General Public License as published by
the Free Software Foundation. You should have received a copy
of the license along with this file; see the file COPYING.
This file is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
license for more details.
*//*
Versatile Interface Adapter EMulated DEVice
Emulates the VIA found in the Mac Plus.
This code adapted from vMac by Philip Cummins.
*/#ifndef AllFiles#include"SYSDEPNS.h"#include"MYOSGLUE.h"#include"EMCONFIG.h"#include"GLOBGLUE.h"#endif#include"VIA2EMDV.h"/*
ReportAbnormalID unused 0x0510 - 0x05FF
*/#ifdef VIA2_iA0_ChangeNtfyIMPORTPROCVIA2_iA0_ChangeNtfy(void);#endif#ifdef VIA2_iA1_ChangeNtfyIMPORTPROCVIA2_iA1_ChangeNtfy(void);#endif#ifdef VIA2_iA2_ChangeNtfyIMPORTPROCVIA2_iA2_ChangeNtfy(void);#endif#ifdef VIA2_iA3_ChangeNtfyIMPORTPROCVIA2_iA3_ChangeNtfy(void);#endif#ifdef VIA2_iA4_ChangeNtfyIMPORTPROCVIA2_iA4_ChangeNtfy(void);#endif#ifdef VIA2_iA5_ChangeNtfyIMPORTPROCVIA2_iA5_ChangeNtfy(void);#endif#ifdef VIA2_iA6_ChangeNtfyIMPORTPROCVIA2_iA6_ChangeNtfy(void);#endif#ifdef VIA2_iA7_ChangeNtfyIMPORTPROCVIA2_iA7_ChangeNtfy(void);#endif#ifdef VIA2_iB0_ChangeNtfyIMPORTPROCVIA2_iB0_ChangeNtfy(void);#endif#ifdef VIA2_iB1_ChangeNtfyIMPORTPROCVIA2_iB1_ChangeNtfy(void);#endif#ifdef VIA2_iB2_ChangeNtfyIMPORTPROCVIA2_iB2_ChangeNtfy(void);#endif#ifdef VIA2_iB3_ChangeNtfyIMPORTPROCVIA2_iB3_ChangeNtfy(void);#endif#ifdef VIA2_iB4_ChangeNtfyIMPORTPROCVIA2_iB4_ChangeNtfy(void);#endif#ifdef VIA2_iB5_ChangeNtfyIMPORTPROCVIA2_iB5_ChangeNtfy(void);#endif#ifdef VIA2_iB6_ChangeNtfyIMPORTPROCVIA2_iB6_ChangeNtfy(void);#endif#ifdef VIA2_iB7_ChangeNtfyIMPORTPROCVIA2_iB7_ChangeNtfy(void);#endif#ifdef VIA2_iCB2_ChangeNtfyIMPORTPROCVIA2_iCB2_ChangeNtfy(void);#endif#define Ui3rPowOf2(p) (1 << (p))#define Ui3rTestBit(i, p) (((i) & Ui3rPowOf2(p)) != 0)#define VIA2_ORA_CanInOrOut (VIA2_ORA_CanIn | VIA2_ORA_CanOut)#if ! Ui3rTestBit(VIA2_ORA_CanInOrOut, 7)#ifdef VIA2_iA7#error "VIA2_iA7 defined but not used"#endif#endif#if ! Ui3rTestBit(VIA2_ORA_CanInOrOut, 6)#ifdef VIA2_iA6#error "VIA2_iA6 defined but not used"#endif#endif#if ! Ui3rTestBit(VIA2_ORA_CanInOrOut, 5)#ifdef VIA2_iA5#error "VIA2_iA5 defined but not used"#endif#endif#if ! Ui3rTestBit(VIA2_ORA_CanInOrOut, 4)#ifdef VIA2_iA4#error "VIA2_iA4 defined but not used"#endif#endif#if ! Ui3rTestBit(VIA2_ORA_CanInOrOut, 3)#ifdef VIA2_iA3#error "VIA2_iA3 defined but not used"#endif#endif#if ! Ui3rTestBit(VIA2_ORA_CanInOrOut, 2)#ifdef VIA2_iA2#error "VIA2_iA2 defined but not used"#endif#endif#if ! Ui3rTestBit(VIA2_ORA_CanInOrOut, 1)#ifdef VIA2_iA1#error "VIA2_iA1 defined but not used"#endif#endif#if ! Ui3rTestBit(VIA2_ORA_CanInOrOut, 0)#ifdef VIA2_iA0#error "VIA2_iA0 defined but not used"#endif#endif#define VIA2_ORB_CanInOrOut (VIA2_ORB_CanIn | VIA2_ORB_CanOut)#if ! Ui3rTestBit(VIA2_ORB_CanInOrOut, 7)#ifdef VIA2_iB7#error "VIA2_iB7 defined but not used"#endif#endif#if ! Ui3rTestBit(VIA2_ORB_CanInOrOut, 6)#ifdef VIA2_iB6#error "VIA2_iB6 defined but not used"#endif#endif#if ! Ui3rTestBit(VIA2_ORB_CanInOrOut, 5)#ifdef VIA2_iB5#error "VIA2_iB5 defined but not used"#endif#endif#if ! Ui3rTestBit(VIA2_ORB_CanInOrOut, 4)#ifdef VIA2_iB4#error "VIA2_iB4 defined but not used"#endif#endif#if ! Ui3rTestBit(VIA2_ORB_CanInOrOut, 3)#ifdef VIA2_iB3#error "VIA2_iB3 defined but not used"#endif#endif#if ! Ui3rTestBit(VIA2_ORB_CanInOrOut, 2)#ifdef VIA2_iB2#error "VIA2_iB2 defined but not used"#endif#endif#if ! Ui3rTestBit(VIA2_ORB_CanInOrOut, 1)#ifdef VIA2_iB1#error "VIA2_iB1 defined but not used"#endif#endif#if ! Ui3rTestBit(VIA2_ORB_CanInOrOut, 0)#ifdef VIA2_iB0#error "VIA2_iB0 defined but