SMC_TT Network MiNT Driver ...

Hardware, coding, music, graphic and various applications

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

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

SMC_TT Network MiNT Driver ...

Postby frank.lukas » Thu Mar 23, 2017 2:18 pm

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
Atari God
Atari God
Posts: 1477
Joined: Sat Sep 10, 2005 11:11 am
Location: Kosice, Slovakia
Contact:

Re: SMC_TT Network MiNT Driver ...

Postby mikro » Fri Mar 24, 2017 1:46 am

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: 1520
Joined: Tue Jan 29, 2008 5:33 pm
Location: Germany

Re: SMC_TT Network MiNT Driver ...

Postby frank.lukas » Fri Mar 31, 2017 3:52 pm

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: 1520
Joined: Tue Jan 29, 2008 5:33 pm
Location: Germany

Re: SMC_TT Network MiNT Driver ...

Postby frank.lukas » Thu Nov 23, 2017 1:33 pm

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
Atari God
Atari God
Posts: 1477
Joined: Sat Sep 10, 2005 11:11 am
Location: Kosice, Slovakia
Contact:

Re: SMC_TT Network MiNT Driver ...

Postby mikro » Fri Nov 24, 2017 5:57 am

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: 1520
Joined: Tue Jan 29, 2008 5:33 pm
Location: Germany

Re: SMC_TT Network MiNT Driver ...

Postby frank.lukas » Sat Nov 25, 2017 9:19 am

... 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
Atari God
Atari God
Posts: 1477
Joined: Sat Sep 10, 2005 11:11 am
Location: Kosice, Slovakia
Contact:

Re: SMC_TT Network MiNT Driver ...

Postby mikro » Sat Nov 25, 2017 11:49 am

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 nerd
Atari nerd
Posts: 44
Joined: Sat Dec 27, 2008 10:16 am

Re: SMC_TT Network MiNT Driver ...

Postby paulwratt » Sun Jan 28, 2018 3:15 am

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


Social Media

     

Return to “Professionals”

Who is online

Users browsing this forum: No registered users and 2 guests