Added todo

This commit is contained in:
Willem Cazander 2023-04-21 16:59:34 +02:00
parent 70e2ec1ef2
commit 9f92cda0e1
3 changed files with 108 additions and 22 deletions

View file

@ -30,7 +30,7 @@ ERR_INV_OPER .equ 15 ; Invalid operation
LD A,#0xF1 ; SOX Send data
MIDI_TX
LD A,#function_number
MIDI_TX; ; if a=0xF7 then send F7 + F0 + F2
MIDI_TX
.endm
.macro MIDI_TX_HL
LD A,H
@ -46,21 +46,41 @@ ERR_INV_OPER .equ 15 ; Invalid operation
LD A,#0xF7 ; End of SysEx
MIDI_TX
.endm
.macro MIDI_RX_START function_start
MIDI_RX
CP A
JR nz,#function_start
;CALL #function_start
.macro MIDI_RX_START
MIDI_RX; F0 = SysEx
MIDI_RX; F1 = SOX
.endm
.macro MIDI_RX_A_PUSH
MIDI_RX
PUSH AF
PUSH AF
.endm
.macro MIDI_RX_B
MIDI_RX
LD B,A
.endm
.macro MIDI_RX_END_POP
POP AF
.macro MIDI_RX_BC
MIDI_RX_B
MIDI_RX
LD C,A
.endm
.macro MIDI_RX_DE
MIDI_RX
LD D,A
MIDI_RX
LD E,A
.endm
.macro MIDI_RX_HL
MIDI_RX
LD H,A
MIDI_RX
LD L,A
.endm
.macro MIDI_RX_END
MIDI_RX
.endm
.macro MIDI_RX_END_ERR_RET
MIDI_RX_END
POP AF
RET
.endm

View file

@ -1,6 +1,10 @@
;
; Driver TCP/IP
;
; docs: https://github.com/Konamiman/MSX-UNAPI-specification/blob/master/docs/TCP-IP%20UNAPI%20specification.md
;
;
;
;4.1.2. TCPIP_GET_CAPAB: Get information about the TCP/IP capabilities and features
;Input: A = 1
@ -27,12 +31,12 @@ TCPIP_GET_CAPAB:
MIDI_TX_START 1
MIDI_TX_B
MIDI_TX_END
MIDI_RX_START #TCPIP_GET_CAPAB
MIDI_RX_START
MIDI_RX_A_PUSH
MIDI_RX_B
MIDI_RX_END_POP
RET
RET_NO_IMPL
MIDI_RX_BC
MIDI_RX_DE
MIDI_RX_HL
MIDI_RX_END_ERR_RET
;4.1.3. TCPIP_GET_IPINFO: Get IP address
;Input: A = 2
@ -46,7 +50,14 @@ TCPIP_GET_CAPAB:
;Output: A = Error code
; L.H.E.D = Requested address
TCPIP_GET_IPINFO:
ret_no_impl
MIDI_TX_START 2
MIDI_TX_B
MIDI_TX_END
MIDI_RX_START
MIDI_RX_A_PUSH
MIDI_RX_DE
MIDI_RX_HL
MIDI_RX_END_ERR_RET
;4.1.4. TCPIP_NET_STATE: Get network state
;Input: A = 3
@ -58,21 +69,66 @@ TCPIP_GET_IPINFO:
; 3: Closing
; 255: Unknown
TCPIP_NET_STATE:
ret_no_impl
MIDI_TX_START 3
MIDI_TX_END
MIDI_RX_START
MIDI_RX_A_PUSH
MIDI_RX_B
MIDI_RX_END_ERR_RET
;4.2.1. TCPIP_SEND_ECHO: Send ICMP echo message (PING)
;Input: A = 4
; HL = Address of echo parameters block
;Output: A = Error code
TCPIP_SEND_ECHO:
ret_no_impl
MIDI_TX_START 4
; 4 = ip addr
LD A,(HL)
MIDI_TX_A
INC HL
LD A,(HL)
MIDI_TX_A
INC HL
LD A,(HL)
MIDI_TX_A
INC HL
LD A,(HL)
MIDI_TX_A
INC HL
; 1 = TTL
LD A,(HL)
MIDI_TX_A
INC HL
; 2 = icmp ident
LD A,(HL)
MIDI_TX_A
INC HL
LD A,(HL)
MIDI_TX_A
INC HL
; 2 = icmp seq num
LD A,(HL)
MIDI_TX_A
INC HL
LD A,(HL)
MIDI_TX_A
;INC HL
MIDI_TX_END
MIDI_RX_START
MIDI_RX_A_PUSH
MIDI_RX_END_ERR_RET
;4.2.2. TCPIP_RCV_ECHO: Retrieve ICMP echo response message
;Input: A = 5
; HL = Address for the echo parameters block
;Output: A = Error code
TCPIP_RCV_ECHO:
ret_no_impl
MIDI_TX_START 5
MIDI_TX_END
MIDI_RX_START
MIDI_RX_A_PUSH
MIDI_RX_END_ERR_RET
;4.3.1. TCPIP_DNS_Q: Start a host name resolution query
;Input: A = 6
@ -91,7 +147,16 @@ TCPIP_RCV_ECHO:
; L.H.E.D = Resolved IP address
; (only if no error occurred and B=1 or 2 is returned)
TCPIP_DNS_Q:
ret_no_impl
MIDI_TX_START 6
MIDI_TX_HL
MIDI_TX_B
MIDI_TX_END
MIDI_RX_START
MIDI_RX_A_PUSH
MIDI_RX_B
MIDI_RX_DE
MIDI_RX_HL
MIDI_RX_END_ERR_RET
;4.3.2. TCPIP_DNS_S: Obtains the host name resolution process state and result
;Input: A = 7

View file

@ -5,6 +5,7 @@
; Intel i8251 + i8253 Internal MSX-MIDI
; #E8-#EF Internal MSX-MIDI interface (turboR GT)
;
; TODO: see src https://github.com/gdx-msx/MSX_Assembler_Library/tree/master/MSX-MIDI
.area _CODE