Hello,
These are the points that need some kind of explanation in the functions (Blocks) where I have already added comments.
1)
; ------------------------------------------------------------------------------------------------------
; BLK 300 - called from BLK 297 ZZZZZ - REVISED PSR20231112
; ------------------------------------------------------------------------------------------------------
Código: Seleccionar todo
Z7FA9 LDB MFD18 ; get FDC command status
LSRB ; pass bit 0 to carry
BCC Z7FB4 ; if clear (not BUSY), skip 2
LDB #$D0 ; put $D0 (force interrupt)
STB MFD18 ; into FDC command register
Z7FB4 LDA MFD1B ; get a byte from FDC
COMA ; complement value (255-value)
; *** WHY COMPLEMENT IT?
STA MFD1B ; send to FDC data register
BSR Z7F99 ; call BLK 293 - 23.5 uSec delay
CMPA MFD1B ; still same value?
BNE Z7F98 ; no, go to Entry of BLK 292
2)
Z8AEE (BLK 61)
; *** NEEDS EXPLANATION. NOT SURE ABOUT THE EFFECT OF THE VALUES SENT TO REGISTERS
; ------------------------------------------------------------------------------------------------------
3)
Z8B7F (Entry in BLK 60)
; *** WHY SEND THREE TIMES A ZERO at the beginning?
; *** WHAT DOES THIS SEQUENCE DO ($40,$4E,$37)?
; these are not MIDI codes, maybe Fujitsu MIDI access implementation?
; ------------------------------------------------------------------------------------------------------
4)
a bit above ZB48F
Código: Seleccionar todo
LDD #Z0000 ; colour code 0
STD MFD30 ; send to palette register
LDD #M0303 ; get values 3 and 3
STD MFD32 ; $FD32=3, $FD33=3
STA MFD33 ; *** SHOULDN'T IT BE $FD34?
5)
; ----------------------------------------------------------------------------------------------------
; BLK for command 6 (offset 12) in table $C627 called from ZD32E SSSSS - REVISED PSR-20231122
; parameter comes pointed by regU
; *** DOES THIS SET SCAN CODE INSTEAD OF ASCII CODE FOR THE KEYBOARD?
; ----------------------------------------------------------------------------------------------------
Código: Seleccionar todo
MD677
RC137 CLRA ; $C137 ; value 0 (chord system switching)
BSR ZD6B2 ; $C138 ; send to encoder $D431
LDA ,U ; $C13A ; get parameter (2=scan code)
BRA ZD6B2 ; $C13C ; send to encoder $D431
6)
In MD6BA (code in SUB memory)
; *** WHAT MEANING HAVE THESE BITA?
Código: Seleccionar todo
ZD6DE BITA $2000,X ; $C19E ; check bits from next plane
BITA ,X+ ; $C1A2 ; check bits from current plane
7)
; ----------------------------------------------------------------------------------------------------
; BLK 462 - called from BLK for command 7 XXXXX - REVISED
; ----------------------------------------------------------------------------------------------------
Código: Seleccionar todo
ZD71C LDA ,U ; $C1DC ;
; *** DOES THIS LDB SEQUENCE MAKE ANY SENSE?
ZD71E LDB $2078,X ; $C1DE ;
LDB $78,X ; $C1E2 ;
LDB $2050,X ; $C1E5 ;
LDB $50,X ; $C1E9 ;
LDB $2028,X ; $C1EC ;
LDB $28,X ; $C1F0 ;
LDB $2000,X ; $C1F3 ;
LDB ,X+ ; $C1F7 ;
DECA ; $C1F9 ;
BNE ZD71E ; $C1FA ;
LDX $02,U ; $C1FC ;
RTS ; $C1FE ;
8)
; ----------------------------------------------------------------------------------------------------
; BLK 463 - called from BLK for command 7 XXXXX - REVISED
; ----------------------------------------------------------------------------------------------------
Código: Seleccionar todo
ZD73F LDB $01,U ; $C1FF ;
; *** DOES THIS LDA SEQUENCE MAKE ANY SENSE?
ZD741 LDA $2000,X ; $C201 ;
LDA ,X ; $C205 ;
LEAX $28,X ; $C207 ;
DECB ; $C20A ;
BNE ZD741 ; $C20B ;
LDX $02,U ; $C20D ;
RTS ; $C20F ;
cheers!
pere