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


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

Sample 6502 code for programming the Uthernet

Started byD Finnigan <dog_cow@macgui.com>
First post2013-02-20 23:45 +0000
Last post2013-02-21 15:19 -0700
Articles 14 — 5 participants

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


Contents

  Sample 6502 code for programming the Uthernet D Finnigan <dog_cow@macgui.com> - 2013-02-20 23:45 +0000
    Re: Sample 6502 code for programming the Uthernet Egan Ford <datajerk@gmail.com> - 2013-02-20 16:53 -0700
      Re: Sample 6502 code for programming the Uthernet D Finnigan <dog_cow@macgui.com> - 2013-02-21 00:01 +0000
        Re: Sample 6502 code for programming the Uthernet Egan Ford <datajerk@gmail.com> - 2013-02-20 17:44 -0700
          Re: Sample 6502 code for programming the Uthernet D Finnigan <dog_cow@macgui.com> - 2013-02-21 00:56 +0000
            Re: Sample 6502 code for programming the Uthernet Egan Ford <datajerk@gmail.com> - 2013-02-20 18:13 -0700
              Re: Sample 6502 code for programming the Uthernet D Finnigan <dog_cow@macgui.com> - 2013-02-21 02:51 +0000
                Re: Sample 6502 code for programming the Uthernet Steven Hirsch <snhirsch@gmail.com> - 2013-02-21 09:29 -0500
                  Re: Sample 6502 code for programming the Uthernet David Schmidt <schmidtd@my-deja.com> - 2013-02-21 10:39 -0500
                    Re: Sample 6502 code for programming the Uthernet Sean Fahey <a2fan@hotmail.com> - 2013-02-21 09:44 -0800
                      Re: Sample 6502 code for programming the Uthernet D Finnigan <dog_cow@macgui.com> - 2013-02-21 21:30 +0000
                      Re: Sample 6502 code for programming the Uthernet Steven Hirsch <snhirsch@gmail.com> - 2013-02-21 18:22 -0500
                  Re: Sample 6502 code for programming the Uthernet D Finnigan <dog_cow@macgui.com> - 2013-02-21 21:25 +0000
                  Re: Sample 6502 code for programming the Uthernet Egan Ford <datajerk@gmail.com> - 2013-02-21 15:19 -0700

#653 — Sample 6502 code for programming the Uthernet

FromD Finnigan <dog_cow@macgui.com>
Date2013-02-20 23:45 +0000
SubjectSample 6502 code for programming the Uthernet
Message-ID<dog_cow-1361403918@macgui.com>
Some visitors to Mac GUI recently probably saw the picture of UDP
communication with the Apple IIe where I was sending UDP packets to the
Apple IIe over the Uthernet card and printing them on the screen in ASCII.

All this code I have written for the Uthernet hopefully will appear in a
future Juiced.GS article, also with full explanation of how to program the
Uthernet with its CS8900A Ethernet chip and PacketPage memory addresses.

In the mean time, starting now, all my Apple II code that I will write will
be PUBLIC DOMAIN. That includes this Uthernet code.

I have Ethernet packet send and receive code, as well as Uthernet
configuration code that will set the MAC address and configure the Uthernet
for send and receive. I also have code that sends a gratuitous ARP.

All of it is in 6502 machine code, but I have added comments to it all.

If you can't wait for the Juiced.GS article, I will be glad to send the code
to anyone who asks. You will get ASCII source files.

In the future I want to write some code for an IP stack. We'll see where
this goes. :-)

-- 
]DF$
Apple II Book: http://macgui.com/newa2guide/
Usenet: http://macgui.com/usenet/  <-- get posts by email!
Apple II Web & Blog hosting: http://a2hq.com/

[toc] | [next] | [standalone]


#654

FromEgan Ford <datajerk@gmail.com>
Date2013-02-20 16:53 -0700
Message-ID<kg3nll$f90$1@news.xmission.com>
In reply to#653
On 2/20/13 4:45 PM, D Finnigan wrote:
> In the future I want to write some code for an IP stack. We'll see where
> this goes. :-)

Isn't there already some 6502 IP code floating around?  I think I have 
it somewhere on my HD.

I'm still waiting for the Uthernet to go back on sale.

Is there PPP or SLIP 6502 (Apple II preferred) code floating around?

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


#655

FromD Finnigan <dog_cow@macgui.com>
Date2013-02-21 00:01 +0000
Message-ID<dog_cow-1361404909@macgui.com>
In reply to#654
Egan Ford wrote:
> On 2/20/13 4:45 PM, D Finnigan wrote:
>> In the future I want to write some code for an IP stack. We'll see where
>> this goes. :-)
> 
> Isn't there already some 6502 IP code floating around?  I think I have 
> it somewhere on my HD.

Yes, that's IP65. Which is open-source, but not public domain.

My code was written based only on the CS8900A technical reference and the
relevant RFCs for TCP/IP and Ethernet networking.

> 
> Is there PPP or SLIP 6502 (Apple II preferred) code floating around?

I don't think so. SLIP is super-simple to implement. We could have had
TCP/IP over SLIP 25 or more years ago with our Super Serial Cards, but there
was no motivation to implement it. No one had TCP/IP networks in their homes
back in the 80s.

My design plans for a new IP stack include two network interfaces: one for
the Uthernet, and another for the Super Serial Card using SLIP.

All of this is on paper right now. I only have working code for the Uthernet
device driver, as well as the demonstration code that prints the data
payload of UDP packets (it dumbly assumes that all incoming packets are of
type UDP).

-- 
]DF$
Apple II Book: http://macgui.com/newa2guide/
Usenet: http://macgui.com/usenet/  <-- get posts by email!
Apple II Web & Blog hosting: http://a2hq.com/

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


#656

FromEgan Ford <datajerk@gmail.com>
Date2013-02-20 17:44 -0700
Message-ID<kg3qlh$iju$1@news.xmission.com>
In reply to#655
On 2/20/13 5:01 PM, D Finnigan wrote:
> My design plans for a new IP stack include two network interfaces: one for
> the Uthernet, and another for the Super Serial Card using SLIP.

If you need a beta tester let me know.

Now I need a SLIP/Ethernet or SLIP/Wifi bridge.  Thinking RPi.  It would 
be nice to build something smaller that would just stick to the SSC DB25.

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


#657

FromD Finnigan <dog_cow@macgui.com>
Date2013-02-21 00:56 +0000
Message-ID<dog_cow-1361408183@macgui.com>
In reply to#656
Egan Ford wrote:
> On 2/20/13 5:01 PM, D Finnigan wrote:
>> My design plans for a new IP stack include two network interfaces: one
>> for
>> the Uthernet, and another for the Super Serial Card using SLIP.
> 
> If you need a beta tester let me know.

Will do.

I want to make the API look like BSD sockets. :-)
I think I can manage.

Distant future plans involve wrapping the TCP/IP stack into a larger
multi-tasking operating system. I have a 1 MB RamWorks Apple IIe with all
the hardware to support a multitasking OS. Just need to write the code. It's
a legend.

> 
> Now I need a SLIP/Ethernet or SLIP/Wifi bridge.  Thinking RPi.  It would 
> be nice to build something smaller that would just stick to the SSC DB25.

Wi-Fi on the Apple II would be really neat. If Glenn Jones gets this out to
us, I'd be happy to write a device driver for it.
http://www.a2retrosystems.com/blog/?p=166


-- 
]DF$
Apple II Book: http://macgui.com/newa2guide/
Usenet: http://macgui.com/usenet/  <-- get posts by email!
Apple II Web & Blog hosting: http://a2hq.com/

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


#658

FromEgan Ford <datajerk@gmail.com>
Date2013-02-20 18:13 -0700
Message-ID<kg3sc6$kku$1@news.xmission.com>
In reply to#657
On 2/20/13 5:56 PM, D Finnigan wrote:
> Distant future plans involve wrapping the TCP/IP stack into a larger
> multi-tasking operating system. I have a 1 MB RamWorks Apple IIe with all
> the hardware to support a multitasking OS. Just need to write the code. It's
> a legend.

I'm thinking simple things like a VT100 telnet client.  SSH if the 6502 
can handle it.  Twitter perhaps.  It would make development and testing 
easier if Virtual ][ emulated Uthernet.  IIRC, AppleWin supports it.

> Wi-Fi on the Apple II would be really neat. If Glenn Jones gets this out to
> us, I'd be happy to write a device driver for it.
> http://www.a2retrosystems.com/blog/?p=166

That was posted over a year ago.  I wonder if he is still around. :-)

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


#659

FromD Finnigan <dog_cow@macgui.com>
Date2013-02-21 02:51 +0000
Message-ID<dog_cow-1361415080@macgui.com>
In reply to#658
Egan Ford wrote:
> On 2/20/13 5:56 PM, D Finnigan wrote:
>> Distant future plans involve wrapping the TCP/IP stack into a larger
>> multi-tasking operating system. I have a 1 MB RamWorks Apple IIe with all
>> the hardware to support a multitasking OS. Just need to write the code.
>> It's
>> a legend.
> 
> I'm thinking simple things like a VT100 telnet client.  SSH if the 6502 
> can handle it.  Twitter perhaps.  It would make development and testing 
> easier if Virtual ][ emulated Uthernet.  IIRC, AppleWin supports it.

Probably the top-priority for me after a telnet client would be an AppleTalk
over Ethernet client so I can do AppleShare.

The only problem: I need AppleTalk documentation, which I lack right now.
:-(

Once you got over the public-key cryptography algorithms, SSH shouldn't be
too bad.

> 
>> Wi-Fi on the Apple II would be really neat. If Glenn Jones gets this out
>> to
>> us, I'd be happy to write a device driver for it.
>> http://www.a2retrosystems.com/blog/?p=166
> 
> That was posted over a year ago.  I wonder if he is still around. :-)
>

I believe he's still among the living.

-- 
]DF$
Apple II Book: http://macgui.com/newa2guide/
Usenet: http://macgui.com/usenet/  <-- get posts by email!
Apple II Web & Blog hosting: http://a2hq.com/

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


#660

FromSteven Hirsch <snhirsch@gmail.com>
Date2013-02-21 09:29 -0500
Message-ID<PpedneDbcu72srvMnZ2dnUVZ_tudnZ2d@giganews.com>
In reply to#659
On 02/20/2013 09:51 PM, D Finnigan wrote:

>> I'm thinking simple things like a VT100 telnet client.  SSH if the 6502
>> can handle it.  Twitter perhaps.  It would make development and testing
>> easier if Virtual ][ emulated Uthernet.  IIRC, AppleWin supports it.
>
> Probably the top-priority for me after a telnet client would be an AppleTalk
> over Ethernet client so I can do AppleShare.
>
> The only problem: I need AppleTalk documentation, which I lack right now.

Last I looked, "Inside AppleTalk" was a freebie.  If you cannot find it, give 
me a yell privately.  I think AFP-over-TCP may be a stretch, though.  You 
probably should stick with AFP-over-DDP.

Those few of us with Apple-prototype ethernet cards (well, one of us - Tony 
Diaz) are able to run Appletalk over an ethernet link right now.  I'm not sure 
how much of the smarts for that were on the card.  Geoff Body probably knows 
more about this than anyone else here.



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


#661

FromDavid Schmidt <schmidtd@my-deja.com>
Date2013-02-21 10:39 -0500
Message-ID<kg5f26$1ps$1@dont-email.me>
In reply to#660
On 2/21/2013 9:29 AM, Steven Hirsch wrote:
> Those few of us with Apple-prototype ethernet cards (well, one of us -
> Tony Diaz) are able to run Appletalk over an ethernet link right now.
> I'm not sure how much of the smarts for that were on the card.

Hint: just about all of it.  It had/has its own CPU.

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


#662

FromSean Fahey <a2fan@hotmail.com>
Date2013-02-21 09:44 -0800
Message-ID<a9eeff39-95db-41a8-a72c-bdaaa7297cf9@googlegroups.com>
In reply to#661
On Thursday, February 21, 2013 9:39:45 AM UTC-6, schmidtd wrote:

> > Those few of us with Apple-prototype ethernet cards (well, one of us -
> > Tony Diaz) are able to run Appletalk over an ethernet link right now.
> > I'm not sure how much of the smarts for that were on the card.
> 
> Hint: just about all of it.  It had/has its own CPU.

<facepalm>
Argh - I forgot to send you my Apple Ethernet card and the other serials)!
</facepalm>

We need to clone the Apple card and just call it the official board.

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


#664

FromD Finnigan <dog_cow@macgui.com>
Date2013-02-21 21:30 +0000
Message-ID<dog_cow-1361482233@macgui.com>
In reply to#662
Sean Fahey wrote:
> 
> We need to clone the Apple card and just call it the official board.

Now that we have the firmware and device driver, cloning the hardware is the
last step needed.

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


#666

FromSteven Hirsch <snhirsch@gmail.com>
Date2013-02-21 18:22 -0500
Message-ID<I7-dnS4d5oPRMbvMnZ2dnUVZ_q6dnZ2d@giganews.com>
In reply to#662
On 02/21/2013 12:44 PM, Sean Fahey wrote:
> On Thursday, February 21, 2013 9:39:45 AM UTC-6, schmidtd wrote:
>
>>> Those few of us with Apple-prototype ethernet cards (well, one of us -
>>> Tony Diaz) are able to run Appletalk over an ethernet link right now.
>>> I'm not sure how much of the smarts for that were on the card.
>>
>> Hint: just about all of it.  It had/has its own CPU.
>
> <facepalm>
> Argh - I forgot to send you my Apple Ethernet card and the other serials)!
> </facepalm>
>
> We need to clone the Apple card and just call it the official board.
>

Does anyone have one of these to donate for depopulation and 
reverse-engineering?  Does it have programmable logic?  And if yes to the 
last, are the security fuses blown?

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


#663

FromD Finnigan <dog_cow@macgui.com>
Date2013-02-21 21:25 +0000
Message-ID<dog_cow-1361481906@macgui.com>
In reply to#660
Steven Hirsch wrote:
> On 02/20/2013 09:51 PM, D Finnigan wrote:
> 
>>> I'm thinking simple things like a VT100 telnet client.  SSH if the 6502
>>> can handle it.  Twitter perhaps.  It would make development and testing
>>> easier if Virtual ][ emulated Uthernet.  IIRC, AppleWin supports it.
>>
>> Probably the top-priority for me after a telnet client would be an
>> AppleTalk
>> over Ethernet client so I can do AppleShare.
>>
>> The only problem: I need AppleTalk documentation, which I lack right now.
> 
> Last I looked, "Inside AppleTalk" was a freebie.  If you cannot find it,
> give me a yell privately.  I think AFP-over-TCP may be a stretch, though. 
>
> You  probably should stick with AFP-over-DDP.
 
Thanks. I see that the 2nd edition is used on Amazon for reasonable prices,
so I'll probably buy it there. I prefer having the hard copy book.


-- 
]DF$
Apple II Book: http://macgui.com/newa2guide/
Usenet: http://macgui.com/usenet/  <-- get posts by email!
Apple II Web & Blog hosting: http://a2hq.com/

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


#665

FromEgan Ford <datajerk@gmail.com>
Date2013-02-21 15:19 -0700
Message-ID<kg66gt$9sl$1@news.xmission.com>
In reply to#660
On 2/21/13 7:29 AM, Steven Hirsch wrote:
> Last I looked, "Inside AppleTalk" was a freebie.

Can you look again?

I lent out my copy 20 years ago and never got it back.

I found a PDF floating around, but the diagrams are missing in the 
Introduction section.

[toc] | [prev] | [standalone]


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


csiph-web