Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Music 2000 MIDI send does not work. #236

Open
SteveFosdick opened this issue Oct 6, 2024 · 2 comments
Open

Music 2000 MIDI send does not work. #236

SteveFosdick opened this issue Oct 6, 2024 · 2 comments
Assignees

Comments

@SteveFosdick
Copy link
Collaborator

As per the Music 2000 user guide, setting a tune playing and then running:

1 SHARE MIDIV

Cause the voice concerned to no longer sound on the Music 5000 but does not cause any MIDI activity.

@SteveFosdick
Copy link
Collaborator Author

Problem is possibly related to interrupts. The ISR for the M2 module is:

    195C: 08          PHP         
    195D: 8A          TXA         
    195E: 48          PHA         
    195F: A2 00       LDX #00     ; Point to first ACIA
    1961: AD 08 FC    LDA FC08    ; Did this raise the interrupt?
    1964: 30 0E       BMI 1974    ; Yes, handle it.
    1966: E8          INX         ; Point to second ACIA
    1967: E8          INX         
    1968: AD 0A FC    LDA FC0A    ; Did this raise the interrupt?
    196B: 30 07       BMI 1974    ; Yes, handle it.
    196D: E8          INX         ; Point to third ACIA
    196E: E8          INX         
    196F: AD 0C FC    LDA FC0C    ; Did this raise the interrupt?
    1972: 10 38       BPL 19AC    ; No, end of this part of ISR.

    ; All three ACIAs end up here is one of them has caused
    ; the interrupt.  X points to which one.

    1974: BD 08 FC    LDA FC08,X  ; Get the status register.
    1977: 29 02       AND #02     ; Check for Tx Data Reg Empty.
    1979: F0 31       BEQ 19AC    ; Branch if not empty.
    197B: 98          TYA         
    197C: 48          PHA         
    197D: BD 3A 19    LDA 193A,X  ; Anything to send?
    1980: DD 39 19    CMP 1939,X  
    1983: F0 15       BEQ 199A    ; Branch if nothing to send
    1985: 18          CLC         
    1986: 69 01       ADC #01     ; Advance the buffer pointer?
    1988: 29 1F       AND #1F     
    198A: 1D 45 19    ORA 1945,X  
    198D: 9D 3A 19    STA 193A,X  
    1990: A8          TAY         
    1991: B9 D9 18    LDA 18D9,Y  ; Get the byte to transmit.
    1994: 9D 09 FC    STA FC09,X  ; Write to TX data register.
    1997: 4C A4 19    JMP 19A4    
    199A: A9 15       LDA #15     ; Turn off the TXDR empty IRQ.
    199C: 9D 08 FC    STA FC08,X  ; Write to control register.
    199F: A9 00       LDA #00     
    19A1: 9D 3F 19    STA 193F,X  
    19A4: 68          PLA         
    19A5: A8          TAY         
    19A6: 68          PLA         
    19A7: AA          TAX         
    19A8: A5 FC       LDA FC      ; End of ISR having done something.
    19AA: 28          PLP         
    19AB: 40          RTI         
    19AC: 68          PLA         ; End of ISR when daisy chaining.
    19AD: AA          TAX         
    19AE: A5 FC       LDA FC      
    19B0: 28          PLP         
    19B1: 6C 0C 18    JMP (180C)  

@SteveFosdick
Copy link
Collaborator Author

@SteveFosdick SteveFosdick self-assigned this Oct 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant