33 SECTION "config", HOME[$0]
34 myMAC: db $12, $34, $56, $78, $9A, $00
35 myIP: db $0A, $00, $00, $02
36 myMask: db $FF, $00, $00, $00
37 myGW: db $0A, $00, $00, $01
39 SECTION "boot", HOME[$100]
44 db $CE,$ED,$66,$66,$CC,$0D,$00,$0B,$03,$73,$00,$83 ;<<< no $00,$c3,$50,$01
45 db $00,$0C,$00,$0D,$00,$08,$11,$1F,$88,$89,$00,$0E,$DC,$CC,$6E,$E6
46 db $DD,$DD,$D9,$99,$BB,$BB,$67,$63,$6E,$0E,$EC,$CC,$DD,$DC,$99,$9F
47 db $BB,$B9,$33,$3E ; Standard Nintendo DO NOT CHANGE...
49 db "GB Ethernet " ; Cart name 16bytes
50 db $00,$00,$00 ; Not used
51 db $00 ; Cart type ROM Only
54 db $cf,$08 ; Maker ID Matthew Johnson
56 db $87 ; Complement check (Important)
57 db $ff,$ff ; Cheksum, fix this if you are going to
62 PUTSIL "Ethernet test ROM"
63 .lp: xor a ; Reset state machines
65 ld a, [ETH_STATUS] ; Load current status
73 ld bc, bssend - bssstart
98 PUTSI "getpacket: Got "
101 PUTSIL " byte packet from hardware."
108 PUTSI "ether_input: Packet to "
138 ; Verify the destination MAC.
149 ; Done? Then it was to us!
151 .notus: ; Was it to broadcast?
161 .us: PUTSIL "ether_input: It's to us!"
162 ; Which protocol does it belong to?
166 add hl, bc ; Skip source and dest MAC.
178 PUTSIL "ether_input: Not addressed to us and not broadcast."
182 PUTSIL "ether_input: Unknown protocol; dropping"
186 PUTSIL "ether_input: ARP packet"
190 PUTSIL "ether_input: IP packet"
200 SECTION "ethdata", BSS
206 ; SERIAL ROUTINES ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
207 SECTION "serial", HOME
255 puthex: ; Put two hex nibbles to the serial console.
277 hex: db "0123456789ABCDEF"