mirror of
https://github.com/deater/dos33fsprogs.git
synced 2025-01-31 03:32:59 +00:00
optimize mockingboard code
This commit is contained in:
parent
49e1ce4fd7
commit
79e7fca824
@ -66,6 +66,7 @@ reset_ay_both:
|
||||
; Reset Right AY-3-8910
|
||||
;======================
|
||||
;reset_ay_right:
|
||||
;could be merged with both
|
||||
lda #MOCK_AY_RESET
|
||||
sta MOCK_6522_ORB2
|
||||
lda #MOCK_AY_INACTIVE
|
||||
@ -164,6 +165,41 @@ mb_not_in_this_slot:
|
||||
ldx #00
|
||||
beq done_mb_detect
|
||||
|
||||
;alternative MB detection from Nox Archaist
|
||||
; lda #$04
|
||||
; sta MB_ADDRL
|
||||
; ldx #$c7
|
||||
;
|
||||
;find_mb:
|
||||
; stx MB_ADDRH
|
||||
;
|
||||
; ;detect sound I
|
||||
;
|
||||
; sec
|
||||
; ldy #$00
|
||||
; lda (MB_ADDRL), y
|
||||
; sbc (MB_ADDRL), y
|
||||
; cmp #$05
|
||||
; beq found_mb
|
||||
; dex
|
||||
; cpx #$c0
|
||||
; bne find_mb
|
||||
; ldx #$00 ;no mockingboard found
|
||||
; rts
|
||||
;
|
||||
;found_mb:
|
||||
; ldx #$01 ;mockingboard found
|
||||
; rts
|
||||
;
|
||||
; ;optionally detect sound II
|
||||
;
|
||||
; sec
|
||||
; ldy #$80
|
||||
; lda (MB_ADDRL), y
|
||||
; sbc (MB_ADDRL), y
|
||||
; cmp #$05
|
||||
; beq found_mb
|
||||
|
||||
|
||||
;=======================================
|
||||
; Detect a Mockingboard card in Slot4
|
||||
|
Loading…
x
Reference in New Issue
Block a user