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 LD A,#0xF1 ; SOX Send data
MIDI_TX MIDI_TX
LD A,#function_number LD A,#function_number
MIDI_TX; ; if a=0xF7 then send F7 + F0 + F2 MIDI_TX
.endm .endm
.macro MIDI_TX_HL .macro MIDI_TX_HL
LD A,H LD A,H
@ -46,11 +46,9 @@ ERR_INV_OPER .equ 15 ; Invalid operation
LD A,#0xF7 ; End of SysEx LD A,#0xF7 ; End of SysEx
MIDI_TX MIDI_TX
.endm .endm
.macro MIDI_RX_START function_start .macro MIDI_RX_START
MIDI_RX MIDI_RX; F0 = SysEx
CP A MIDI_RX; F1 = SOX
JR nz,#function_start
;CALL #function_start
.endm .endm
.macro MIDI_RX_A_PUSH .macro MIDI_RX_A_PUSH
MIDI_RX MIDI_RX
@ -60,7 +58,29 @@ ERR_INV_OPER .equ 15 ; Invalid operation
MIDI_RX MIDI_RX
LD B,A LD B,A
.endm .endm
.macro MIDI_RX_END_POP .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 POP AF
RET
.endm .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 ;4.1.2. TCPIP_GET_CAPAB: Get information about the TCP/IP capabilities and features
;Input: A = 1 ;Input: A = 1
@ -27,12 +31,12 @@ TCPIP_GET_CAPAB:
MIDI_TX_START 1 MIDI_TX_START 1
MIDI_TX_B MIDI_TX_B
MIDI_TX_END MIDI_TX_END
MIDI_RX_START #TCPIP_GET_CAPAB MIDI_RX_START
MIDI_RX_A_PUSH MIDI_RX_A_PUSH
MIDI_RX_B MIDI_RX_BC
MIDI_RX_END_POP MIDI_RX_DE
RET MIDI_RX_HL
RET_NO_IMPL MIDI_RX_END_ERR_RET
;4.1.3. TCPIP_GET_IPINFO: Get IP address ;4.1.3. TCPIP_GET_IPINFO: Get IP address
;Input: A = 2 ;Input: A = 2
@ -46,7 +50,14 @@ TCPIP_GET_CAPAB:
;Output: A = Error code ;Output: A = Error code
; L.H.E.D = Requested address ; L.H.E.D = Requested address
TCPIP_GET_IPINFO: 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 ;4.1.4. TCPIP_NET_STATE: Get network state
;Input: A = 3 ;Input: A = 3
@ -58,21 +69,66 @@ TCPIP_GET_IPINFO:
; 3: Closing ; 3: Closing
; 255: Unknown ; 255: Unknown
TCPIP_NET_STATE: 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) ;4.2.1. TCPIP_SEND_ECHO: Send ICMP echo message (PING)
;Input: A = 4 ;Input: A = 4
; HL = Address of echo parameters block ; HL = Address of echo parameters block
;Output: A = Error code ;Output: A = Error code
TCPIP_SEND_ECHO: 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 ;4.2.2. TCPIP_RCV_ECHO: Retrieve ICMP echo response message
;Input: A = 5 ;Input: A = 5
; HL = Address for the echo parameters block ; HL = Address for the echo parameters block
;Output: A = Error code ;Output: A = Error code
TCPIP_RCV_ECHO: 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 ;4.3.1. TCPIP_DNS_Q: Start a host name resolution query
;Input: A = 6 ;Input: A = 6
@ -91,7 +147,16 @@ TCPIP_RCV_ECHO:
; L.H.E.D = Resolved IP address ; L.H.E.D = Resolved IP address
; (only if no error occurred and B=1 or 2 is returned) ; (only if no error occurred and B=1 or 2 is returned)
TCPIP_DNS_Q: 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 ;4.3.2. TCPIP_DNS_S: Obtains the host name resolution process state and result
;Input: A = 7 ;Input: A = 7

View file

@ -5,6 +5,7 @@
; Intel i8251 + i8253 Internal MSX-MIDI ; Intel i8251 + i8253 Internal MSX-MIDI
; #E8-#EF Internal MSX-MIDI interface (turboR GT) ; #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 .area _CODE