SMC_TT Network MiNT Driver ...

Hardware, coding, music, graphic and various applications

Moderators: Mug UK, [ProToS], lp, moondog/.tSCc., Moderator Team

Post Reply
User avatar
frank.lukas
Hardware Guru
Hardware Guru
Posts: 1917
Joined: Tue Jan 29, 2008 5:33 pm
Location: Germany

SMC_TT Network MiNT Driver ...

Post by frank.lukas »

I have a working SMC_TT Network VME Bus Card for the Atari Mega STE and Atari TT Computer. What missing is a MiNT Ethernet Network Driver. The old TUW_TCP Package from the Uni Wien is not usefull these Days. From the TUW Driver are the Sources there. I was thinking it is possible to create a SMC_TT MiNT Driver from the exist MiNT LAN Sources ...

Are here on the Forum someone to manage to write a MiNT Driver ?


Image
fancy Atari Musik anDA Dance "Agare Hinu Harukana" 1998 ATARI http://www.youtube.com/watch?v=JX10fxb5eYE
mikro
Hardware Guru
Hardware Guru
Posts: 2207
Joined: Sat Sep 10, 2005 11:11 am
Location: Kosice, Slovakia
Contact:

Re: SMC_TT Network MiNT Driver ...

Post by mikro »

Don't hesitate to join the FreeMiNT mailing list: http://mail.atariforge.org/mailman/list ... emint-list, Alan is certainly the guy to speak to although Markus is certainly experienced in this area as well.
User avatar
frank.lukas
Hardware Guru
Hardware Guru
Posts: 1917
Joined: Tue Jan 29, 2008 5:33 pm
Location: Germany

Re: SMC_TT Network MiNT Driver ...

Post by frank.lukas »

I send Alan my SMC_TT card and he had it for over a year to write a driver but unfortunately nothing happens.

Izumi Tsutsui already build a SMC_TT VME Bus card too and write a Driver for NetBSD, so there it is also in the Atari port of the NetBSD Sources ...
fancy Atari Musik anDA Dance "Agare Hinu Harukana" 1998 ATARI http://www.youtube.com/watch?v=JX10fxb5eYE
User avatar
frank.lukas
Hardware Guru
Hardware Guru
Posts: 1917
Joined: Tue Jan 29, 2008 5:33 pm
Location: Germany

Re: SMC_TT Network MiNT Driver ...

Post by frank.lukas »

Izumi Tsutsui from the NetBSD Team give me a hand but I not a programmer and I can not do that ...


NetBSD sources are split to common (called machine independent) sources
and port (including atari specific, called machine dependent) sources
so it's a bit hard to check one specific device.

For SMC_TT, following files are used:
src/sys/arch/atari/vme/if_we_vme.c (SMC_TT specific part)
src/sys/dev/ic/we.c (SMC Elite Ultra chip specific)
src/sys/dev/ic/dp8390.c (common DP8390 specific)

bus_space_read_1() and bus_space_write_1() functions are
something like inb() and outb() on x86.

You can see which address should be used to access
ISA SMC Elite Ultra chip registers in if_we_vme.c comments:
https://nxr.netbsd.org/xref/src/sys/arc ... c?r=1.4#90

ISA I/O / SMC_TT address (8bit access)
0x280 / 0xFE200280
0x281 / 0xFE300280
0x282 / 0xFE200282
0x283 / 0xFE300282
0x284 / 0xFE200284
0x285 / 0xFE300284
:

ISA MEM / SMC_TT address (16bit access)
0xD0000 / 0xFE0D0000
0xD0002 / 0xFE0D0002

The orignal SMC_TT documents also help:
http://cd.textfiles.com/atarilibrary/at ... /LANCE.TXT
It looks OCR'ed so several words are incomplete (and annoying for
machine translations), but I guess no problem for German people :-)

---

To port drivers to other OS, it might be easier to check
Linux and other OS drivers:
https://git.kernel.org/pub/scm/linux/ke ... .c?h=v4.14

---------------------------------------------------------------------

-> https://github.com/freemint/freemint/tr ... ockets/xif

Hmm. It looks freemint drivers are similar to Linux one.

In general NIC drivers have the following funcionts:
- initialization (probe, reset, setup, getting MAC address etc.)
- TX packets
- RX packets
- interrupt handling

On the other hand, freemit xif seem to require the following interfaces:
- xxx_open() - reset and setup device
- xxx_close() - reset chip to stop all packets
- xxx_output() - transmit packets passed from network layer
- xxx_config() - OS specific for network layer, maybe not necessary at debug phase

RX packets seem handled in the interrupt routine.

The following ones looks device specific
- xxx_probe() - checking if the device exists; not necessary at debug phase (you can assume it's always there)
- xxx_reset() - chip specific; sequence of write registers, setup shared memory etc.
- xxx_install_ints() - interrupt setup; maybe chip and OS specific so it's better to ask freemint guys
- xxx_int - interrupt handler; receiving packets and TX packet completion are notified via interrupt

To check TX/RX packet functions, the following NetBSD bootloader sources might help to check differences LANCE (am7990) and WD80x3 with DP8390:
https://nxr.netbsd.org/xref/src/sys/arc ... lib/netif/
fancy Atari Musik anDA Dance "Agare Hinu Harukana" 1998 ATARI http://www.youtube.com/watch?v=JX10fxb5eYE
mikro
Hardware Guru
Hardware Guru
Posts: 2207
Joined: Sat Sep 10, 2005 11:11 am
Location: Kosice, Slovakia
Contact:

Re: SMC_TT Network MiNT Driver ...

Post by mikro »

The trouble here is not that it is hard but super annoying work. :) A lot of retries, compilation errors, comparing, ... and *then* the real debugging starts (it's very rare you get it working on the first try).
User avatar
frank.lukas
Hardware Guru
Hardware Guru
Posts: 1917
Joined: Tue Jan 29, 2008 5:33 pm
Location: Germany

Re: SMC_TT Network MiNT Driver ...

Post by frank.lukas »

... it would be a shame!

The Card is there for so long and no MiNT Driver. I have such a card and can do beta tests for it. Or may be I can build up an other one for a programmer.
fancy Atari Musik anDA Dance "Agare Hinu Harukana" 1998 ATARI http://www.youtube.com/watch?v=JX10fxb5eYE
mikro
Hardware Guru
Hardware Guru
Posts: 2207
Joined: Sat Sep 10, 2005 11:11 am
Location: Kosice, Slovakia
Contact:

Re: SMC_TT Network MiNT Driver ...

Post by mikro »

But frankly -- how popular is/was this card? I mean, what user base are we talking about? For instance, when I had bought my Daynaport 'card', I had to make my own FreeMiNT driver, clean it up, publish on the mailing list and get it committed. Because nobody else would do that, not even Roger, the author of the original code.

So in our poor little Atari world it's like "you want something, you do it". :) But I realise not everybody can, it's just... too few of us. :-(
User avatar
paulwratt
Atari freak
Atari freak
Posts: 66
Joined: Sat Dec 27, 2008 10:16 am

Re: SMC_TT Network MiNT Driver ...

Post by paulwratt »

if you have sources (NetBSD & TUW) then you are halfway there 50%. And you already know that the ur card is working on NetBSD, so that is another 25%.

even experienced programmers at some point have to hit a learning curve for Network Drivers. Lots of notes are needed, until you are able to understand how things work together.

If you want to do any comparisons with kernal.org (like I did for Ext3/Ext4/Reiser support) then you need to limit ur reference searches to linux v2.6.28 (if my memory servers), as the filesystem structure and driver contents are still compatible with Mint at that version. IE you can do a diff between "freemint/sys/xfs/ext2fs" and "kernel/fs/ext2/ to know what Axel Kaiser and Frank Naumann did to get a working EXT2 driver for MiNT.

also try comparing a known driver like the generic NE2000 with the NetBSD one, that will at least show what sort of changes are required.

You could try looking at the driver mikro wrote for the dynalink, although if it was not based on any other sources, it may take you a while to figure out what it is doing.

Please keep pushing ahead to complete you driver, any new drivers are sorely needed in MiNT, to help develop for new hardware (another VME network card in ur case)

Cheers

Paul
artik-wroc
Captain Atari
Captain Atari
Posts: 154
Joined: Fri Jan 06, 2006 1:30 pm
Location: Wroclaw - POLAND
Contact:

Re: SMC_TT Network MiNT Driver ...

Post by artik-wroc »

The SMC card can also be used on ST with Panther / 2 adapter.
A few more corrections and it should work fine.
I do not know the C language, much less assembler, but step by step and I succeeded :lol:

Image

XBRA
Image

Image

Thread in Polish forum:
http://www.atari.org.pl/forum/viewtopic.php?id=16771
neanderthal
Captain Atari
Captain Atari
Posts: 159
Joined: Sun Jul 10, 2016 10:58 pm

Re: SMC_TT Network MiNT Driver ...

Post by neanderthal »

Well this was an interesting thread since did the thing mikro mentioned,built my own ISA adapter for the falcon just to have net-access.It was mainly a project for looking if could be done since had several 3c509 cards.
The adapter in itself was rather a fast go since already done a IDE one for a STE of mine,that is with proper timings according to ATA-spec that got hold of back then.
The fast read I did in the NetBSD (I really gotta install that some day) sources looks like the SMC_TT adapter uses same sort of weird adressing to deal with the ISA byte mode read/write that I did.Thats sort of fun.
Then again ,not that many ways of doing it if dont want to have loads of extra chips doing it.

Ended up with using mintnet:s dummyeth.c as a template and the functions from 3c509.c in linux 2.1 I think? altho they had to be heavily rewritten since made for x86 based machines.I think still have some odd x86 style interrupt rentry stuff left in there.

The fun thing or drawback, depending how one sees it.Is that you have to learn quite a lot if not done anything of the sort before.
The benefit tho,I think it took me like 2-3 days to fix it up for Uip-tool :)

Pity I missed this one.Well until now.hehe
User avatar
frank.lukas
Hardware Guru
Hardware Guru
Posts: 1917
Joined: Tue Jan 29, 2008 5:33 pm
Location: Germany

Re: SMC_TT Network MiNT Driver ...

Post by frank.lukas »

artik-wroc wrote: Sat Jul 04, 2020 8:58 pm The SMC card can also be used on ST with Panther / 2 adapter.
A few more corrections and it should work fine.
What kind of corrections ?

It make sense when there is a mintnet xif driver for it ...
fancy Atari Musik anDA Dance "Agare Hinu Harukana" 1998 ATARI http://www.youtube.com/watch?v=JX10fxb5eYE
Post Reply

Return to “Professionals”