averageLiquidLevel.h 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. /*
  2. * 6522 Versatile Interface Adapter (VIA)
  3. *
  4. * There are two of these on the Mac II. Some IRQ's are vectored
  5. * via them as are assorted bits and bobs - eg rtc, adb. The picture
  6. * is a bit incomplete as the Mac documentation doesn't cover this well
  7. */
  8. #ifndef _ASM_MAC_VIA_H_
  9. #define _ASM_MAC_VIA_H_
  10. /*
  11. * Base addresses for the VIAs. There are two in every machine,
  12. * although on some machines the second is an RBV or an OSS.
  13. * The OSS is different enough that it's handled separately.
  14. *
  15. * Do not use these values directly; use the via1 and via2 variables
  16. * instead (and don't forget to check rbv_present when using via2!)
  17. */
  18. #define VIA1_BASE (0x50F00000)
  19. #define VIA2_BASE (0x50F02000)
  20. #define RBV_BASE (0x50F26000)
  21. /*
  22. * Not all of these are true post MacII I think.
  23. * CSA: probably the ones CHRP marks as 'unused' change purposes
  24. * when the IWM becomes the SWIM.
  25. * http://www.rs6000.ibm.com/resource/technology/chrpio/via5.mak.html
  26. * ftp://ftp.austin.ibm.com/pub/technology/spec/chrp/inwork/CHRP_IORef_1.0.pdf
  27. *
  28. * also, http://developer.apple.com/technotes/hw/hw_09.html claims the
  29. * following changes for IIfx:
  30. * VIA1A_vSccWrReq not available and that VIA1A_vSync has moved to an IOP.
  31. * Also, "All of the functionality of VIA2 has been moved to other chips".
  32. */
  33. #define VIA1A_vSccWrReq 0x80 /* SCC write. (input)
  34. * [CHRP] SCC WREQ: Reflects the state of the
  35. * Wait/Request pins from the SCC.
  36. * [Macintosh Family Hardware]
  37. * as CHRP on SE/30,II,IIx,IIcx,IIci.
  38. * on IIfx, "0 means an active request"
  39. */
  40. #define VIA1A_vRev8 0x40 /* Revision 8 board ???
  41. * [CHRP] En WaitReqB: Lets the WaitReq_L
  42. * signal from port B of the SCC appear on
  43. * the PA7 input pin. Output.
  44. * [Macintosh Family] On the SE/30, this
  45. * is the bit to flip screen buffers.
  46. * 0=alternate, 1=main.
  47. * on II,IIx,IIcx,IIci,IIfx this is a bit
  48. * for Rev ID. 0=II,IIx, 1=IIcx,IIci,IIfx
  49. */
  50. #define VIA1A_vHeadSel 0x20 /* Head select for IWM.
  51. * [CHRP] unused.
  52. * [Macintosh Family] "Floppy disk
  53. * state-control line SEL" on all but IIfx
  54. */
  55. #define VIA1A_vOverlay 0x10 /* [Macintosh Family] On SE/30,II,IIx,IIcx
  56. * this bit enables the "Overlay" address
  57. * map in the address decoders as it is on
  58. * reset for mapping the ROM over the reset
  59. * vector. 1=use overlay map.
  60. * On the IIci,IIfx it is another bit of the
  61. * CPU ID: 0=normal IIci, 1=IIci with parity
  62. * feature or IIfx.
  63. * [CHRP] En WaitReqA: Lets the WaitReq_L
  64. * signal from port A of the SCC appear
  65. * on the PA7 input pin (CHRP). Output.
  66. * [MkLinux] "Drive Select"
  67. * (with 0x20 being 'disk head select')