mirror of
https://github.com/robmcmullen/apple2.git
synced 2024-06-26 04:29:34 +00:00
92fbd44509
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).
32 lines
624 B
C
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__
|
|
|