/* Macintosh Family Hardware sez: bits 0-2 of VIA1A are volume control *onMacswhichhadthePWMsoundhardware.Reservedonnewermodels. *OnIIci,IIfx,bits1-2aretherestoftheCPUID: *bit2:1=IIci,0=IIfx *bit1:1onbothIIciandIIfx. *MkLinuxsezbit0is'burninflag'inthiscase. *CHRPsez:VIA1Abits0-2and5are'unused':ifprogrammedas *inputs,thesebitswillread0.
*/ #define VIA1A_vVolume 0x07 /* Audio volume mask for PWM */ #define VIA1A_CPUID0 0x02 /* CPU id bit 0 on RBV, others */ #define VIA1A_CPUID1 0x04 /* CPU id bit 0 on RBV, others */ #define VIA1A_CPUID2 0x10 /* CPU id bit 0 on RBV, others */ #define VIA1A_CPUID3 0x40 /* CPU id bit 0 on RBV, others */
/* Info on VIA1B is from Macintosh Family Hardware & MkLinux.
* CHRP offers no info. */ #define VIA1B_vSound 0x80 /* Sound enable (for compatibility with *PWMhardware)0=enabled. *Also,onIIciw/parity,showsparityerror
* 0=error, 1=OK. */ #define VIA1B_vMystery 0x40 /* On IIci, parity enable. 0=enabled,1=disabled *OnSE/30,verticalsyncinterruptenable. *0=enabled.ThisvSyncinterruptshowsup
* as a slot $E interrupt. */ #define VIA1B_vADBS2 0x20 /* ADB state input bit 1 (unused on IIfx) */ #define VIA1B_vADBS1 0x10 /* ADB state input bit 0 (unused on IIfx) */ #define VIA1B_vADBInt 0x08 /* ADB interrupt 0=interrupt (unused on IIfx)*/ #define VIA1B_vRTCEnb 0x04 /* Enable Real time clock. 0=enabled. */ #define VIA1B_vRTCClk 0x02 /* Real time clock serial-clock line. */ #define VIA1B_vRTCData 0x01 /* Real time clock serial-data line. */
/* MkLinux defines the following "VIA1 Register B contents where they *differfromstandardVIA1".Fromthenamingscheme,weassumethey
* correspond to a VIA work-alike named 'EVR'. */ #define EVRB_XCVR 0x08 /* XCVR_SESSION* */ #define EVRB_FULL 0x10 /* VIA_FULL */ #define EVRB_SYSES 0x20 /* SYS_SESSION */ #define EVRB_AUXIE 0x00 /* Enable A/UX Interrupt Scheme */ #define EVRB_AUXID 0x40 /* Disable A/UX Interrupt Scheme */ #define EVRB_SFTWRIE 0x00 /* Software Interrupt ReQuest */ #define EVRB_SFTWRID 0x80 /* Software Interrupt ReQuest */
/* partial address decode. 0xYYXX : XX part for RBV, YY part for VIA */ /* Note: 15 VIA regs, 8 RBV regs */
#define vBufB 0x0000 /* [VIA/RBV] Register B */ #define vBufAH 0x0200 /* [VIA only] Buffer A, with handshake. DON'T USE! */ #define vDirB 0x0400 /* [VIA only] Data Direction Register B. */ #define vDirA 0x0600 /* [VIA only] Data Direction Register A. */ #define vT1CL 0x0800 /* [VIA only] Timer one counter low. */ #define vT1CH 0x0a00 /* [VIA only] Timer one counter high. */ #define vT1LL 0x0c00 /* [VIA only] Timer one latches low. */ #define vT1LH 0x0e00 /* [VIA only] Timer one latches high. */ #define vT2CL 0x1000 /* [VIA only] Timer two counter low. */ #define vT2CH 0x1200 /* [VIA only] Timer two counter high. */ #define vSR 0x1400 /* [VIA only] Shift register. */ #define vACR 0x1600 /* [VIA only] Auxiliary control register. */ #define vPCR 0x1800 /* [VIA only] Peripheral control register. */ /* CHRP sez never ever to *write* this. *Macfamilysaysneverto*change*this.
* In fact we need to initialize it once at start. */ #define vIFR 0x1a00 /* [VIA/RBV] Interrupt flag register. */ #define vIER 0x1c00 /* [VIA/RBV] Interrupt enable register. */ #define vBufA 0x1e00 /* [VIA/RBV] register A (no handshake) */
/* The RBV only decodes the bottom eight address lines; the VIA doesn't
* decode the bottom eight -- so vBufB | rBufB will always get you BufB */ /* CSA: in fact, only bits 0,1, and 4 seem to be decoded. *BUTnotethevaluesforrIERandrIFR,wherethetop8bits*do*seem *tomatter.Infact*all*ofthetop8bitsseemtomatter; *settingrIER=0x1813andrIFR=0x1803doesn'twork,either. *Perhapssomesortof'compatibilitymode'isbuilt-in?[21-May-1999]
*/
#define rBufB 0x0000 /* [VIA/RBV] Register B */ #define rExp 0x0001 /* [RBV only] RBV future expansion (always 0) */ #define rSIFR 0x0002 /* [RBV only] RBV slot interrupts register. */ #define rIFR 0x1a03 /* [VIA/RBV] RBV interrupt flag register. */ #define rMonP 0x0010 /* [RBV only] RBV video monitor type. */ #define rChpT 0x0011 /* [RBV only] RBV test mode register (reads as 0). */ #define rSIER 0x0012 /* [RBV only] RBV slot interrupt enables. */ #define rIER 0x1c13 /* [VIA/RBV] RBV interrupt flag enable register. */ #define rBufA rSIFR /* the 'slot interrupts register' is BufA on a VIA */
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.