UnityIIe2023. 4. 7. 14:48

 

 

----------------------------------------------------------
* 6522 x 2ea
----------------------------------------------------------

* Registers

n = slot#
6522-#1.offset = $Cn00
6522-#2.offset = $Cn80

$00 : ORB
$01 : ORA
$02 : DDRB, 1=output bit / 0=input bit
$03 : DDRA, 1=output bit / 0=input bit
$04 : T1CL, Timer1 Counter LowByte
$05 : T1CH, TImer1 Counter HighByte
$06 : T1LL, Timer1 Latch LowByte (not implemented)
$07 : T1LH, Timer1 Latch HighByte (not implemented)
$08 : T2CL, TImer2 Counter LowByte (not implemented)
$09 : T2CH, TImer2 Counter HighByte (not implemented)
$0A : SR, Shift Register (not implemented)
$0B : ACR, Auxllary Control Register
[7:6] Timer1 Control
00 : OneShot (not implemented)
01 : Continuous 
[5:0] not implemented ( = %000000 )

$0C : PCR, Peripheral Control Register (not implemented)
$0D : IFR, Interrupt Flag Register
[7] IRQ: 0=clear interrupt / 1=enable interrupt
[6] Time out of Timer1: 0=cleared by read or write T1C.LH / 1= set by time out

$0E : IER, Interrupt Enable Register
$0F : IOA, ORA/IRA no handshake (not implemented)


* Interrupt routine

IFR[6] = 1
IER[6] = 1

OnClock 
-> dec. timer1 
-> if timer1<=0, 
=> set IFR[7] = 1
=> reload timer1
-> if IFR[7]==1
=> send IRQ





----------------------------------------------------------
* AY-3-8910
----------------------------------------------------------

REGISTER
ADDRESS     SOUND PARAMETERS
0        Tone Period Fine Tune        for channel A
1        Tone Period Coarse Tune      for channel A
2        Tone Period Fine Tune        for channel B
3        Tone Period Coarse Tune      for channel B
4        Tone Period Fine Tune        for channel C
5        Tone Period Coarse Tune      for channel C
6        Noise Period (not implemented)
7        Enable
8        Amplitude                    for channel A
9        Amplitude                    for channel B
10       Amplitude                    for channel C
11       Envelope Period Fine Tune (not implemented)
12       Envelope Period Coarse Tune (not implemented)
13       Envelope Shape (not implemented)
14       Unused
15       Unused

 

 

- 노이즈, 엔벨로프 기능 아직 미구현

잡음이 있지만, 디버깅용이니까 자기만족.

 

Posted by GNUPart