Scan slots for existence of Uther?

Open forum is for the discussion of the Uther ethernet board for the Apple II series of computers.

Moderator: support

Scan slots for existence of Uther?

Postby David Schmidt » Wed May 30, 2007 10:33 am

What would be the signature I should watch for if I wanted to scan slots for the existence of an Uther card? And how would I find it if it were "hiding" under an IIe's 80 column card in slot 3?
David Schmidt
 
Posts: 41
Joined: Tue Aug 29, 2006 6:55 pm
Location: USA

How to find the Uthernet Card

Postby support » Thu May 31, 2007 6:10 pm

Most cards rely on a (E)PROM addressed a Cx00 or C800.

Since there is no ROM on the card to id there is another onther option but .... while it is technically possible it is also potentially risky ... as you have to set up an address in order to read the data.

The problem is that in order to read data from the i/o registers one has to write the register number to the packet page pointer register first @ offset 000ah - so that would be $C0[9-F]A

Check the register map in the IP65 source code or here - http://www.cirrus.com/en/pubs/appNote/an181.pdf

On page 44 of the main data sheet - http://www.cirrus.com/en/pubs/proDatash ... 00A_F3.pdf There is a product identification code that can be read.

You need to look for the following values
0E 63 00 0xxxx - so you could probably get away with 0E 63 00

So the thing you have to be carefull about is would writing a 00 to i/o address A on any card cause a problem?

Glenn
support
Site Admin
 
Posts: 169
Joined: Tue Mar 08, 2005 10:49 pm
Location: Ajax, On, Canada

Postby David Schmidt » Thu May 31, 2007 9:00 pm

Ok, here's the code I came up with to scan for an Uther card. In my case, PSSC holds a variable that is one less than the slot number (an index into a selection list). ip65_init is a slightly modified version of a routine that comes with MagerValp's ip65 code:
Code: Select all
;---------------------------------------------------------
; FindSlot - Find an uther card
;---------------------------------------------------------
FindSlot:
   lda PSSC
   sta TempSlot
   ldx #$00   ; Slot number - start at index 0 and work up
FindSlotLoop:
   stx PSSC   ; ip65_init looks for PSSC to be the index
   clc
   jsr ip65_init
   bcc FoundSlot
   ldx PSSC
   inx
   stx PSSC
   cpx #$07
   bne FindSlotLoop
   jmp FindSlotDone
FoundSlot:
   lda PSSC
   sta TempSlot
FindSlotDone:
; All done now, so clean up
   ldx TempSlot
   stx PSSC
   stx DEFAULT
   rts
TempSlot:   .byte


And the gist of the ip65_init code:
Code: Select all
; initialize stack
ip65_init:
   jsr eth_init      ; initialize ethernet driver
   bcs @fail
   jsr timer_init      ; initialize timer
   jsr arp_init      ; initialize arp
   jsr ip_init      ; initialize ip, icmp, udp, and tcp
   clc
@fail:
   rts

; initialize, return clc on success
eth_init:
   lda #0         ; check magic signature
   jsr cs_read_page
   cpx #$0e
   bne @notfound
   cpy #$63
   bne @notfound

; read X/Y from page A * 2
cs_read_page:
   asl
   sta cs_packet_page
   lda #0
   rol
   sta cs_packet_page + 1
   ldx cs_packet_data
   ldy cs_packet_data + 1
   rts

   cs_packet_page   = $c0ba    ; Slot-dependent: self-modify this
   cs_packet_data   = $c0bc    ; Slot-dependent: self-modify this

David Schmidt
 
Posts: 41
Joined: Tue Aug 29, 2006 6:55 pm
Location: USA


Return to Uther - General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron