Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.sys.apple2.programmer > #2456 > unrolled thread

A fix for the Uthernet II manual and a tiny enhancement for the detection routine

Started byBenoit0123 <bgilon@free.fr>
First post2016-03-09 14:36 +0000
Last post2016-03-11 08:34 +0000
Articles 8 — 4 participants

Back to article view | Back to comp.sys.apple2.programmer


Contents

  A fix for the Uthernet II manual and a tiny enhancement for the detection routine Benoit0123 <bgilon@free.fr> - 2016-03-09 14:36 +0000
    Re: A fix for the Uthernet II manual and a tiny enhancement for the detectionroutine D Finnigan <dog_cow@macgui.com> - 2016-03-09 14:41 +0000
    Re: A fix for the Uthernet II manual and a tiny enhancement for the detection routine David Schmidt <schmidtd@my-deja.com> - 2016-03-09 13:39 -0500
      Re: A fix for the Uthernet II manual and a tiny enhancement for thedetection routine D Finnigan <dog_cow@macgui.com> - 2016-03-09 19:02 +0000
        Re: A fix for the Uthernet II manual and a tiny enhancement for thedetection routine David Schmidt <schmidtd@my-deja.com> - 2016-03-09 14:17 -0500
          Re: A fix for the Uthernet II manual and a tiny enhancement for thedetection routine Oliver Schmidt <ol.sc@web.de> - 2016-03-10 13:22 +0000
    Re: A fix for the Uthernet II manual and a tiny enhancement for the detectionroutine Benoit0123 <bgilon@free.fr> - 2016-03-10 09:13 +0000
    Re: A fix for the Uthernet II manual and a tiny enhancement for the detectionroutine Benoit0123 <bgilon@free.fr> - 2016-03-11 08:34 +0000

#2456 — A fix for the Uthernet II manual and a tiny enhancement for the detection routine

FromBenoit0123 <bgilon@free.fr>
Date2016-03-09 14:36 +0000
SubjectA fix for the Uthernet II manual and a tiny enhancement for the detection routine
Message-ID<benoit0123-1457534354@macgui.com>
I've got a look at the Uthernet 2 manual, and noted some discrepancy within
the published listing.
Despite the fact that the WDATA was equated to $C0C7 value within the
listing, the instruction STA WDATA to write to the data port was assembled
as 8D 07 C0 (for instance at lines 89 and 106 page 28).
Here is a subroutine that tries to detect the UII card within an Apple 2.
The changes from the one published is that it automatically skips all Disk 2
interface cards (detected by a checksum routine on the Cnxx ROM space). and
also skips any card with a firmware entry point as the UII card dos'nt have
any at this time. The checked bytes are at offsets:  06 (value 38) 07 (value
18) and 0B (value 01).

* Routine pour deviner ou se cache la carte Uthernet II
AUXPTR         EQU   $06
SLOT           EQU   $FE
SLOT16         EQU   $FF
YMODR          =     $85 Offset to Wizchip mode register
COUT1          EQU   $FDF0
               ORG $0300
               JSR   CHKSLTS
               BCS   :0
               LDA   #MESSOK
               LDY   #>MESSOK
               JSR   PRINT
               LDA   SLOT
               ORA   #$B0
               JSR   COUT1
               LDA   #$8D
               JMP   COUT1
:0             LDA   #MESSNOK
               LDY   #>MESSNOK
PRINT          STA   AUXPTR
               STY   AUXPTR+1
               LDY   #0
]LOOP          LDA   (AUXPTR),Y
               BEQ   :0
               JSR   COUT1
               INY
               BNE   ]LOOP      Always
:0 RTS
MESSOK         HEX   8D
               ASC   "FOUND A UII CARD IN SLOT #",00
MESSNOK        HEX   8D
               ASC   "NO UII CARD DETECTED",8D,00
CHKSLTS        LDA   #0
               STA   AUXPTR
               LDA   #$C7
               STA   AUXPTR+1
               AND   #7
               STA   SLOT
]LOOP1         LDX   #MVAL-MOFFST-1
]LOOP          LDY   MOFFST,X
               LDA   (AUXPTR),Y
               CMP   MVAL,X
               BNE   :1
               DEX
               BPL   ]LOOP
]NEXT          DEC   AUXPTR+1
               DEC   SLOT
               BPL   ]LOOP1
               SEC
               RTS
* No firmware card found in this slot: good!
* Is it a drive II controler card?
:1 LDA #0 TAX
               TAY
]LOOP          ADC   (AUXPTR),Y
               BCC   *+3
               INX
               INY
               BNE   ]LOOP
               CMP   #$C2 ;$7BC2 is the checksum for DII interface cards
               BNE   *+6
               CPX   #$7B
               BEQ   ]NEXT
               LDA   AUXPTR+1
               LUP   4
               ASL
               --^
               STA   SLOT16
               ORA   #YMODR
               TAY
               LDA   #$80
               STA   $BFFF,Y
               LDA   #3
               STA   $BFFF,Y
               CMP   $BFFF,Y
               BNE   ]NEXT
               CLC
               RTS
MOFFST         HEX   06070B
MVAL           HEX   381801

-- 
Growing old is mandatory..
growing up is optional..
But the other way round is as true.

[toc] | [next] | [standalone]


#2457 — Re: A fix for the Uthernet II manual and a tiny enhancement for the detectionroutine

FromD Finnigan <dog_cow@macgui.com>
Date2016-03-09 14:41 +0000
SubjectRe: A fix for the Uthernet II manual and a tiny enhancement for the detectionroutine
Message-ID<dog_cow-1457534660@macgui.com>
In reply to#2456
Benoit0123 wrote:
> I've got a look at the Uthernet 2 manual, and noted some discrepancy
> within
> the published listing.

Thank you. Several others have also suggested improvements to the manual,
and I will see that these changes are made soon.

[toc] | [prev] | [next] | [standalone]


#2463

FromDavid Schmidt <schmidtd@my-deja.com>
Date2016-03-09 13:39 -0500
Message-ID<nbpqe8$vm6$1@dont-email.me>
In reply to#2456
On 3/9/2016 9:36 AM, Benoit0123 wrote:
> * Routine pour deviner ou se cache la carte Uthernet II

I want to steal this for my own nefarious ends.  But in translating to 
ca65 format, some things elude me:

>                 LUP   4

Maybe LUP is a 6503 instruction?  ;-)

>                 --^

What does this little ditty do?

[toc] | [prev] | [next] | [standalone]


#2464 — Re: A fix for the Uthernet II manual and a tiny enhancement for thedetection routine

FromD Finnigan <dog_cow@macgui.com>
Date2016-03-09 19:02 +0000
SubjectRe: A fix for the Uthernet II manual and a tiny enhancement for thedetection routine
Message-ID<dog_cow-1457550321@macgui.com>
In reply to#2463
David Schmidt wrote:
> On 3/9/2016 9:36 AM, Benoit0123 wrote:
>> * Routine pour deviner ou se cache la carte Uthernet II
> 
> I want to steal this for my own nefarious ends.  But in translating to 
> ca65 format, some things elude me:
> 
>>                 LUP   4
> 
> Maybe LUP is a 6503 instruction?  ;-)
> 
>>                 --^
> 
> What does this little ditty do?
>

Look up your Merlin Pro manual. It's a Merlin pseudo-op. I used it in Marina
too.

-- 
]DF$
The Marina IP stack for Apple II--
http://marina.a2hq.com/

[toc] | [prev] | [next] | [standalone]


#2465 — Re: A fix for the Uthernet II manual and a tiny enhancement for thedetection routine

FromDavid Schmidt <schmidtd@my-deja.com>
Date2016-03-09 14:17 -0500
SubjectRe: A fix for the Uthernet II manual and a tiny enhancement for thedetection routine
Message-ID<nbpsm5$9ld$1@dont-email.me>
In reply to#2464
On 3/9/2016 2:02 PM, D Finnigan wrote:
> David Schmidt wrote:
>> On 3/9/2016 9:36 AM, Benoit0123 wrote:
>>> * Routine pour deviner ou se cache la carte Uthernet II
>>
>> I want to steal this for my own nefarious ends.  But in translating to
>> ca65 format, some things elude me:
>>
>>>                  LUP   4
>>
>> Maybe LUP is a 6503 instruction?  ;-)
>>
>>>                  --^
>>
>> What does this little ditty do?
>
> Look up your Merlin Pro manual. It's a Merlin pseudo-op. I used it in Marina
> too.

LUP 4
ASL
--^

Assembles as:
ASL
ASL
ASL
ASL

So... one line saved, two constructs specific to an assembler. 
Interesting tradeoff.

[toc] | [prev] | [next] | [standalone]


#2470 — Re: A fix for the Uthernet II manual and a tiny enhancement for thedetection routine

FromOliver Schmidt <ol.sc@web.de>
Date2016-03-10 13:22 +0000
SubjectRe: A fix for the Uthernet II manual and a tiny enhancement for thedetection routine
Message-ID<nbrsdp$mq$1@news.albasani.net>
In reply to#2465
> LUP 4
> ASL
> --^
> 
> Assembles as:
> ASL
> ASL
> ASL
> ASL
> 
> So... one line saved, two constructs specific to an assembler. 
> Interesting tradeoff.

;-))


[toc] | [prev] | [next] | [standalone]


#2469 — Re: A fix for the Uthernet II manual and a tiny enhancement for the detectionroutine

FromBenoit0123 <bgilon@free.fr>
Date2016-03-10 09:13 +0000
SubjectRe: A fix for the Uthernet II manual and a tiny enhancement for the detectionroutine
Message-ID<benoit0123-1457601412@macgui.com>
In reply to#2456
Benoit0123 wrote:
> I've got a look at the Uthernet 2 manual, and noted some discrepancy
> within
> the published listing.
> Despite the fact that the WDATA was equated to $C0C7 value within the
> listing, the instruction STA WDATA to write to the data port was assembled
> as 8D 07 C0 (for instance at lines 89 and 106 page 28).
> Here is a subroutine that tries to detect the UII card within an Apple 2.
> The changes from the one published is that it automatically skips all Disk
> 2
> interface cards (detected by a checksum routine on the Cnxx ROM space).
> and
> also skips any card with a firmware entry point as the UII card dos'nt
> have
> any at this time. The checked bytes are at offsets:  06 (value 38) 07
> (value
> 18) and 0B (value 01).
> (snip)
One thing is missing: there is a  soft switch in Apple //e (and presumedly
in Apple 2GS too) that selects either slot ROM or internal ROM for the
$C100-$C2FF and $C400-C7FF) CPU 64K space. SLOTCXROM is at address
$C006/07/15.
Under "normal" conditions, SlotCXROM is on which means that Slot ROM is
selected, but, to be complete, the detection routine should save the current
status, select slotCXROM before restoration upon exit. I do not know of any
cascade effect in the Apple 2+ or //c of accessing this soft switch.



-- 
Growing old is mandatory..
growing up is optional..
But the other way round is as true.

[toc] | [prev] | [next] | [standalone]


#2479 — Re: A fix for the Uthernet II manual and a tiny enhancement for the detectionroutine

FromBenoit0123 <bgilon@free.fr>
Date2016-03-11 08:34 +0000
SubjectRe: A fix for the Uthernet II manual and a tiny enhancement for the detectionroutine
Message-ID<benoit0123-1457685458@macgui.com>
In reply to#2456
Benoit0123 wrote:
> I've got a look at the Uthernet 2 manual, and noted some discrepancy
> within
> the published listing.
> Despite the fact that the WDATA was equated to $C0C7 value within the
> listing, the instruction STA WDATA to write to the data port was assembled
> as 8D 07 C0 (for instance at lines 89 and 106 page 28).
> Here is a subroutine that tries to detect the UII card within an Apple 2.
> The changes from the one published is that it automatically skips all Disk
> 2
> interface cards (detected by a checksum routine on the Cnxx ROM space).
> and
> also skips any card with a firmware entry point as the UII card dos'nt
> have
> any at this time. The checked bytes are at offsets:  06 (value 38) 07
> (value
> 18) and 0B (value 01).
> 
> * Routine pour deviner ou se cache la carte Uthernet II
(snip)
> MOFFST         HEX   06070B
should read
MOFFST HEX 05070B

Forgive me...



-- 
Growing old is mandatory..
growing up is optional..
But the other way round is as true.

[toc] | [prev] | [standalone]


Back to top | Article view | comp.sys.apple2.programmer


csiph-web