robmcmullen-apple2/src/mos6522via.h
Shamus Hammons 92fbd44509 First stab at adding Mockingboard support.
Currently only supports one Mockingboard in slot 4, but it should be
fairly trivial to add another in slot 5.  Tested with Ultima 3, 4 & 5,
and Mockingboard disk #1.  Also, added some fixes to correct the timing
of the 6502 and sound; I believe I have a good understanding of it now,
even though there's still work to do to keep the main CPU thread from
starving the audio thread (which still happens, but less often now).
2018-09-09 22:47:51 -05:00

32 lines
624 B
C

// Mockingboard support
//
// by James Hammons
// (C) 2018 Underground Software
//
#ifndef __MOS6522VIA_H__
#define __MOS6522VIA_H__
#include <stdint.h>
struct MOS6522VIA
{
uint8_t orb, ora; // Output Register B, A
uint8_t ddrb, ddra; // Data Direction Register B, A
uint16_t timer1counter; // Timer 1 Counter
uint16_t timer1latch; // Timer 1 Latch
uint16_t timer2counter; // Timer 2 Counter
uint8_t acr; // Auxillary Control Register
uint8_t ifr; // Interrupt Flags Register
uint8_t ier; // Interrupt Enable Register
};
extern MOS6522VIA mbvia[];
void ResetMBVIAs(void);
#endif // __MOS6522VIA_H__