feat(arnitech): network entries NET_INIT, NET_MAC, NET_SEND, NET_RECV at $FF0C-$FF15
Version 2 of the Arnitech jump table, with 6 entries: whole Ethernet frames through the CS8900A at the RR-Net socket (arnitech's ADR 0027), found by its Product ID and polled, from the CS8900A datasheet's PacketPage registers and its 8-bit mode. NET_INIT resets the chip and turns on receiving its own and broadcast frames and sending; NET_MAC copies the Individual Address; NET_SEND bids and writes a frame; NET_RECV copies the oldest frame received, or drops one longer than the buffer with Skip_1. Carry is the result, with an error code in A, and the pointer and count go in SAL and EAL.
This commit is contained in:
1 parent
aa39286d9d
commit
1aaed55bc7
3 files changed
+347
-4
No files matched your search
@@ -9,11 +9,12 @@
|
||||
; stay clear, for the stock IRQ entry, CINT, and the KERNAL revision byte.
|
||||
;
|
||||
; $FF00-$FF03 "ARNI"
|
||||
; $FF04 version of the table, $01
|
||||
; $FF04 version of the table, $02
|
||||
; $FF05 number of entries
|
||||
;
|
||||
; $FF06 ARNI_FINDCARD - finds the first Card slot holding a Card of a given type
|
||||
; In: A = the Card's type ($01 Redstone Card, $02 Internet Card; $00 finds an empty slot)
|
||||
; In: A = the Card's type ($01 Redstone Card, $02 Internet Card, $03 Network Card;
|
||||
; $00 finds an empty slot)
|
||||
; Out: carry clear if found: A = the slot (0-5), X = the low byte of its Card window
|
||||
; ($DEA0 + 16 * slot, so LDA $DE00,X reads the window's first byte);
|
||||
; carry set if no slot holds one, or no controller answers (a Cartridge switched it off)
|
||||
@@ -26,15 +27,50 @@
|
||||
; untouched but on 50 Hz all the same
|
||||
; A and X are not kept, Y is
|
||||
;
|
||||
; Version 2 adds the network: whole Ethernet frames, from the Destination Address to the end of
|
||||
; the data without the CRC, through the CS8900A at the RR-Net socket (arnitech's ADR 0027),
|
||||
; found by its Product ID. Software polls; ARP and IP are its own.
|
||||
;
|
||||
; $FF0C NET_INIT - resets the chip and sets it to receive frames for its own address and
|
||||
; broadcasts, and to send
|
||||
; In: nothing
|
||||
; Out: carry clear if done; carry set if there is no Network Card
|
||||
; A and X are not kept, Y is
|
||||
;
|
||||
; $FF0F NET_MAC - copies the MAC address: the chip's Individual Address, which a reset sets to
|
||||
; the Network Card's
|
||||
; In: X/Y = the address of 6 bytes for it, low byte in X
|
||||
; Out: carry clear if copied; carry set if there is no Network Card
|
||||
; A, X, and Y are not kept
|
||||
;
|
||||
; $FF12 NET_SEND - sends a frame
|
||||
; In: A = a zero page address holding a pointer to the frame,
|
||||
; X/Y = its length, 14-1514, low byte in X; the chip pads one under 60 bytes
|
||||
; Out: carry clear if sent; carry set if not, with A = 1 no Network Card, 2 no room in
|
||||
; the chip while it holds frames received, 3 the chip refuses the length
|
||||
; A, X, and Y are not kept
|
||||
;
|
||||
; $FF15 NET_RECV - takes the oldest frame received
|
||||
; In: A = a zero page address holding a pointer to a buffer,
|
||||
; X/Y = its length, low byte in X
|
||||
; Out: carry clear if a frame was copied into the buffer, with X/Y = its length, low byte
|
||||
; in X; carry set if not, with A = 0 none waiting, 1 no Network Card, 4 the frame is
|
||||
; longer than the buffer, and is dropped
|
||||
; A is not kept when a frame is copied
|
||||
;
|
||||
|
||||
!ifdef CONFIG_ARNITECH_CONTROLLER {
|
||||
|
||||
arnitech_jumptable:
|
||||
|
||||
!byte $41, $52, $4E, $49 ; "ARNI"
|
||||
!byte $01 ; version
|
||||
!byte $02 ; entries
|
||||
!byte $02 ; version
|
||||
!byte $06 ; entries
|
||||
|
||||
jmp arnitech_find_card ; $FF06
|
||||
jmp arnitech_set_tod ; $FF09
|
||||
jmp arnitech_net_init ; $FF0C
|
||||
jmp arnitech_net_mac ; $FF0F
|
||||
jmp arnitech_net_send ; $FF12
|
||||
jmp arnitech_net_recv ; $FF15
|
||||
}
|
||||
Reference in new issue
Block a user