English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Asm / Hardware

 
 
Thread Tools
Old 29 September 2017, 21:10   #21
dissident
Registered User

 
Join Date: Sep 2015
Location: Germany
Posts: 83
Quote:
Originally Posted by StingRay View Post
FindResident() might be an option.
Thanks for the hint. I know FindResident() from the standart bootblock-routine. I will check this way to detect the bsdsocket.library this way.
dissident is offline  
AdSense AdSense  
Old 04 October 2017, 20:43   #22
dissident
Registered User

 
Join Date: Sep 2015
Location: Germany
Posts: 83
Quote:
Originally Posted by StingRay View Post
FindResident() might be an option.
It doesn't work. I've tested it with Miami running in the background and the bsdsocket.library was not found. But SysInfo said it is there. So this library seems not to be resident.
dissident is offline  
Old 04 October 2017, 20:50   #23
dissident
Registered User

 
Join Date: Sep 2015
Location: Germany
Posts: 83
But using OpenLibrary() worked. The bsdsocket.library was found.
dissident is offline  
Old 04 October 2017, 21:13   #24
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 2,703
Quote:
Originally Posted by dissident View Post
So I guess I only have to try to open this library:
...
That may not be the best method. Is it possible (depending on the TCP/IP software I guess) that opening bsdsocket.library could enable network card interrupts?

Better would be to do something like this (in pseudo-code):
Code:
	Forbid()
	FindName(ExecBase->LibList, "bsdsocket.library")
	beq.b	no_bsdsocket

	movea.l	D0,A0
	tst.w	(LIB_OPENCNT,A0)
	beq.b	bsdsocket_idle

	moveq	#yy,D0	;Indicate bsdsocket.library exists and is opened (in use?)
	bra.b	done

bsdsocket_idle
	moveq	#zz,D0	;Indicate bsdsocket.library exists but opencount is 0
	bra.b	done

no_bsdsocket
	moveq	#xx,D0

done	Permit()
	rts

Last edited by mark_k; 04 October 2017 at 21:37.
mark_k is offline  
Old 06 October 2017, 09:06   #25
dissident
Registered User

 
Join Date: Sep 2015
Location: Germany
Posts: 83
Quote:
Originally Posted by mark_k View Post
That may not be the best method. Is it possible (depending on the TCP/IP software I guess) that opening bsdsocket.library could enable network card interrupts?

Better would be to do something like this (in pseudo-code):
Code:
    Forbid()
    FindName(ExecBase->LibList, "bsdsocket.library")
    beq.b    no_bsdsocket

    movea.l    D0,A0
    tst.w    (LIB_OPENCNT,A0)
    beq.b    bsdsocket_idle

    moveq    #yy,D0    ;Indicate bsdsocket.library exists and is opened (in use?)
    bra.b    done

bsdsocket_idle
    moveq    #zz,D0    ;Indicate bsdsocket.library exists but opencount is 0
    bra.b    done

no_bsdsocket
    moveq    #xx,D0

done    Permit()
    rts
Many thanks for that hint, mark_k. I will check this.
dissident is offline  
Old 14 October 2017, 00:20   #26
dissident
Registered User

 
Join Date: Sep 2015
Location: Germany
Posts: 83
I included mark_k's test-routine in a little AGA-intro. Now I need some testers who can test it in conjunction with different common TCP/IP apps namely:

-AmiTCP
-MiamiDX
-Genesis
-IIRC
-Roadshow

on an AGA machine.

What should you do?

Please start your TCP/IP app before you start my enclosed intro from your WB by its WB-icon.

What should happen?

The intro should detect the existing used bsdsocket.library and open a requester to inform you that a TCP/IP app is running. Now you have the choice. Exit the intro by selecting the gadget "Forget it!" or pressing the gadget "Resume".
If your TCP/IP app is still open, then the requester should appear again. Close your app and try the gadget "Resume" again. Now the intro should start and show a morphing glenz vector with some music playing. The module controls the morphing of the object.
The replay routine uses INT2&6, the main routine runs in user mode and waits for the VBI in a loop. The morphing is triggered by the Module (with a special $800 command) generating a SOFTINT-interrupt which is checked and replied in the main routine.

My test on real hardware (A1200/030 + Miami) was successful.

Thanks for testing and your feedback.
Attached Files
File Type: lha CheckTCPStack.lha (35.8 KB, 20 views)
dissident is offline  
Old 14 October 2017, 13:48   #27
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,958
IMHO it is good idea to have "ignore" option too because for example UAE bsdsocket won't generate any interrupts if there is no open connections. Real hardware bsdsocket (NIC device driver) probably won't benerate any interrupts either if network cable is not connected. At least some drivers.

Preferably via command line.
Toni Wilen is offline  
Old 14 October 2017, 18:02   #28
daxb
Registered User
 
Join Date: Oct 2009
Location: Germany
Posts: 1,751
Tested on A1200 040 with/without MiamiDx running and it works.
daxb is offline  
Old 14 October 2017, 20:37   #29
dissident
Registered User

 
Join Date: Sep 2015
Location: Germany
Posts: 83
Quote:
Originally Posted by daxb View Post
Tested on A1200 040 with/without MiamiDx running and it works.
Hi daxb. Many thanks for your support.
dissident is offline  
Old 14 October 2017, 21:18   #30
dissident
Registered User

 
Join Date: Sep 2015
Location: Germany
Posts: 83
Quote:
Originally Posted by Toni Wilen View Post
IMHO it is good idea to have "ignore" option too because for example UAE bsdsocket won't generate any interrupts if there is no open connections. Real hardware bsdsocket (NIC device driver) probably won't benerate any interrupts either if network cable is not connected. At least some drivers.

Preferably via command line.
Okay, that means that my assumtion with this code doesn't guarantee that a bsdsocket.library found in exec's library list and which is opened does not always generate interrupts at last?

Code:
  CALLEXEC Forbid            ;Multitasking off
  lea     LibList(a6),a0     ;Pointer to Library-List
  lea     bsdsocket_name(pc),a1 ;Name of Bsdsocket-Library
  CALLEXEC FindName
  tst.l   d0
  beq.s   no_tcp_stack_found ;If Null -> branch
  move.l  d0,a0
  tst.w   LIB_OPENCNT(a0)
  beq.s   no_tcp_stack_found ;If bsdsocket.library not open -> branch
tcp_stack_found
  CALLEXEC Permit            ;Multitasking on
A third button "Ignore" in the requester would be no problem to include. A good idea.
dissident is offline  
Old 22 October 2017, 23:17   #31
DrCinicus
Registered User

 
Join Date: Oct 2008
Location: Assemini/Italy
Age: 45
Posts: 15
Quote:
Originally Posted by dissident View Post
Please start your TCP/IP app before you start my enclosed intro from your WB by its WB-icon.
On A 1200 with 3.9 and Genesis works correctly.

Bye
Fabio
DrCinicus is offline  
Old 28 October 2017, 21:40   #32
dissident
Registered User

 
Join Date: Sep 2015
Location: Germany
Posts: 83
Quote:
Originally Posted by DrCinicus View Post
On A 1200 with 3.9 and Genesis works correctly.

Bye
Fabio
Thanks for testing and your feedback, DrCinicus.
dissident is offline  
AdSense AdSense  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
usb stacks or SIRION stack Gilloo Coders. System 3 15 June 2016 16:24
CIA Interrupts and Timers and Ports nocash Coders. Asm / Hardware 7 13 April 2016 13:09
Interrupts and Multitasking: Examples? tygre Coders. General 13 22 December 2015 05:56
Advice on interrupts and jumps alexh Coders. General 11 20 May 2008 10:42
ERROR: Run out of stacks. This shouldn't happen _ThEcRoW support.WinUAE 4 27 August 2006 23:04

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 09:22.


Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Page generated in 0.27692 seconds with 13 queries