29 September 2017, 20:10 | #21 |
Registered User
Join Date: Sep 2015
Location: Germany
Posts: 256
|
|
04 October 2017, 19:43 | #22 |
Registered User
Join Date: Sep 2015
Location: Germany
Posts: 256
|
|
04 October 2017, 19:50 | #23 |
Registered User
Join Date: Sep 2015
Location: Germany
Posts: 256
|
But using OpenLibrary() worked. The bsdsocket.library was found.
|
04 October 2017, 20:13 | #24 |
Registered User
Join Date: Aug 2004
Location:
Posts: 3,335
|
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 20:37. |
06 October 2017, 08:06 | #25 | |
Registered User
Join Date: Sep 2015
Location: Germany
Posts: 256
|
Quote:
|
|
13 October 2017, 23:20 | #26 |
Registered User
Join Date: Sep 2015
Location: Germany
Posts: 256
|
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. |
14 October 2017, 12:48 | #27 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,505
|
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. |
14 October 2017, 17:02 | #28 |
Registered User
Join Date: Oct 2009
Location: Germany
Posts: 3,303
|
Tested on A1200 040 with/without MiamiDx running and it works.
|
14 October 2017, 19:37 | #29 |
Registered User
Join Date: Sep 2015
Location: Germany
Posts: 256
|
|
14 October 2017, 20:18 | #30 | |
Registered User
Join Date: Sep 2015
Location: Germany
Posts: 256
|
Quote:
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 |
|
22 October 2017, 22:17 | #31 |
Registered User
Join Date: Oct 2008
Location: Assemini/Italy
Age: 51
Posts: 23
|
|
28 October 2017, 20:40 | #32 |
Registered User
Join Date: Sep 2015
Location: Germany
Posts: 256
|
|
31 October 2018, 22:21 | #33 | ||
Registered User
Join Date: Sep 2015
Location: Germany
Posts: 256
|
Quote:
Quote:
The problem remains, if you turn off the OS, use your own keyboard handler and enable the PORTS interrupt for using the CIA-A interrupts SP and TA. Alternatively you could wait for the CIA-A interrupts in a loop directly and query them this way to avoid enabling the PORTS interrupt. |
||
30 December 2018, 15:54 | #34 | |
Registered User
Join Date: Jan 2005
Location: Umeå
Age: 43
Posts: 922
|
Quote:
Code:
No AGA-PAL-machine ! Press any key. |
|
31 December 2018, 00:06 | #35 | ||
Registered User
Join Date: Sep 2015
Location: Germany
Posts: 256
|
Quote:
Quote:
|
||
06 January 2019, 22:20 | #36 |
Registered User
Join Date: Jan 2005
Location: Umeå
Age: 43
Posts: 922
|
Wouldn't you get more feedback on this TCP/IP-stack detection method without the chipset limitation? Does the chipset affect the detection in any way?
|
07 January 2019, 00:48 | #37 |
Registered User
Join Date: Jan 2005
Location: Umeå
Age: 43
Posts: 922
|
If you find that bsdsocket.library is active, would it be possible to whitelist some UAE bsdsocket.library implementations by querying the name with the SocketBaseTagList() tag SBTC_RELEASESTRPTR?
Did a test program for it (yes, poor name): http://megaburken.net/~patrik/StackName.lha Code:
#include <exec/exec.h> #include <dos/dos.h> #include <dos/dosextens.h> #include <proto/exec.h> #include <proto/dos.h> #include <proto/socket.h> struct ExecBase *SysBase; struct DosLibrary *DOSBase = NULL; struct Library *SocketBase = NULL; const char *GetReleaseStr(void); int main(void) { SysBase = *(struct ExecBase **) 4; DOSBase = (struct DosLibrary *) OpenLibrary("dos.library", 36); if(NULL == DOSBase) { return RETURN_FAIL; } int retval = RETURN_ERROR; SocketBase = OpenLibrary("bsdsocket.library", 3); if(NULL != SocketBase) { const char *releaseStr = GetReleaseStr(); if(NULL != releaseStr) { retval = RETURN_OK; Printf("%s\n", releaseStr); } else { PutStr("Failed getting bsdsocket.library release string!\n"); } } else { PutStr("Failed opening bsdsocket.library v3!\n"); } CloseLibrary(SocketBase); CloseLibrary((struct Library *) DOSBase); return retval; } const char *GetReleaseStr() { struct TagItem tags[] = { { .ti_Tag = SBTM_GETVAL(SBTC_RELEASESTRPTR), .ti_Data = 0 }, { .ti_Tag = TAG_END }}; if(0 == SocketBaseTagList(tags)) { const char *releaseStr = (const char *) tags[0].ti_Data; return releaseStr; } return NULL; } Roadshow: Code:
> StackName Roadshow 4.332 (29.4.2017) Code:
> StackName AmiTCP/IP Pro 68020 4.3 (26.03.96) Code:
> StackName Failed getting bsdsocket.library release string! Code:
> StackName Miami 3.2b (09.11.98) |
09 January 2019, 10:27 | #38 | |
Registered User
Join Date: Sep 2015
Location: Germany
Posts: 256
|
Quote:
The AGA chipset does not affect the detection in any way and is not necessary for it (see my sourcecode in post 14 October 2017, 20:18) |
|
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 15:24 |
CIA Interrupts and Timers and Ports | nocash | Coders. Asm / Hardware | 7 | 13 April 2016 12:09 |
Interrupts and Multitasking: Examples? | tygre | Coders. General | 13 | 22 December 2015 04:56 |
Advice on interrupts and jumps | alexh | Coders. General | 11 | 20 May 2008 09:42 |
ERROR: Run out of stacks. This shouldn't happen | _ThEcRoW | support.WinUAE | 4 | 27 August 2006 22:04 |
|
|