20 September 2017, 22:16 | #1 |
Registered User
Join Date: Sep 2015
Location: Germany
Posts: 259
|
External interrupts generated by TCP/IP stacks
Hi,
I've got a problem that perhaps the program MiamiDX causes using a TCP/IP stack and generating spurious interrpts, maybe the PORT-int. See also http://eab.abime.net/showthread.php?p=675900&styleid=4 My demo takes over the machine and uses INT6 & TNT2 generated by the CIA-timers for the tracker-replay-routine. If the CIAs are not the source of the inerrupts, then the INT2/6 is acknowledged and the routine returns by a NOP + a RTE. I guess the only way to handle this, is to close MiamiDX and starting my demo after that. Otherwise my demo freezes but the music keeps playing.It seems that the CPU doesn't reach a user mode any more to execute my effects. |
20 September 2017, 22:21 | #2 | |
Going nowhere
Join Date: Oct 2001
Location: United Kingdom
Age: 50
Posts: 8,988
|
Quote:
I would make a note at the start of your demo to request user temporarily halts the process so that your demo can run. |
|
21 September 2017, 18:56 | #3 |
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,496
|
The TCP/IP stack shouldn't get cpu cycles anymore, when the demo has taken over the system. I guess the problem is that the network card's device driver has enabled interrupts on the chip (for sending/receiving packets), which still happens. And as you never acknowledge these interrupts they will immediately occur again, after leaving the interrupt routine.
Difficult to fix, as you don't easily know which network interface chip is running. |
21 September 2017, 21:00 | #4 |
son of 68k
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,323
|
I would personnally solve this case by not taking over the machine
|
21 September 2017, 21:52 | #5 | |
Registered User
Join Date: Sep 2015
Location: Germany
Posts: 259
|
Quote:
|
|
21 September 2017, 21:56 | #6 |
Registered User
Join Date: Sep 2015
Location: Germany
Posts: 259
|
|
22 September 2017, 09:15 | #7 | |
son of 68k
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,323
|
Quote:
But doing it for performance is IMO not worth. If you're running a TCP stack and in the same time have enough system resources to run a demo then the machine is obviously not an unexpanded A500. There is little benefit in killing the OS with fast enough machines having lots of memory, as AmigaOS isn't exactly a cpu hog. So if you just leave multitasking on you should not see a difference. |
|
22 September 2017, 23:27 | #8 | |
Registered User
Join Date: Sep 2015
Location: Germany
Posts: 259
|
Quote:
Talking about an expanded amiga, you are right. There, the AmigaOS isn't exactly a bottleneck as on slower systems. |
|
23 September 2017, 10:11 | #9 | |
son of 68k
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,323
|
Quote:
|
|
23 September 2017, 12:04 | #10 |
Registered User
Join Date: Sep 2015
Location: Germany
Posts: 259
|
Thanks for the praise, but this is a misunderstanding. The TCP stack ran on a friend's expanded A1200/060 with fast memory where he tested my demo started from the workbench. I wanted to know if it also works fine on an expanded system.
|
23 September 2017, 15:06 | #11 | |
son of 68k
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,323
|
Quote:
You could check if some TCP stack is running, and if it's the case, don't take over the system. Or check memory size to see if the A1200 is expanded or not. Alternatively, if you detect a spurious interrupt, transfer control to the previous interrupt vector so that it can be handled. Of course if you completely destroy the system then you're locked ! Or, leave the OS running and set task priority to max, while eventually disabling all interrupts you're not using. Or else, detect the case and restore the system if it happens, so you can display some error message. But the simplest way is probably to show some popup asking the user to close the relevant apps. Or just say that in the readme. Because you can never know what kind of hardware has been plugged in and the interrupts it might cause... |
|
23 September 2017, 20:57 | #12 | |||||
Registered User
Join Date: Sep 2015
Location: Germany
Posts: 259
|
Hey, many thanks for your ideas, meynaf. I nearly had the same thoughts:
Quote:
Yes, a CPU/memory-check. IF CPU=68030 or greater AND fastmem=yes then don't turn off the system and initialize my own interrupts with a high priority in a system friendly way. Quote:
Quote:
Quote:
Quote:
Yes, this should be generally done for file-demos with or without a WB-icon. |
|||||
24 September 2017, 09:08 | #13 |
son of 68k
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,323
|
|
26 September 2017, 14:04 | #14 |
Registered User
Join Date: Oct 2007
Location: France, 87
Age: 44
Posts: 96
|
Hello,
I also had to same issue with a subway USB card in my A1200, with the Poseidon stack. Some more hints on how to deal with it with Poseidon in this topic. |
27 September 2017, 19:26 | #15 | |
Registered User
Join Date: Sep 2015
Location: Germany
Posts: 259
|
Quote:
|
|
27 September 2017, 20:29 | #16 | |
Registered User
Join Date: Sep 2015
Location: Germany
Posts: 259
|
Quote:
So I guess I only have to try to open this library: Code:
CNOP 0,4 check_tcp_stack move.l $4.w,a6 ;Exec-Base lea bsdsocket_name(pc),a1 ;Name of the bsdsocket.library moveq #0,d0 ;Any version jsr -552(a6) ;Open bsdsocket.library tst.l d0 beq.s no_active_tcp_stack ;If pointer to library = zero -> branch move.l d0,a1 ;Pointer to our library jsr -414(a6) ;Close bsdsocket.library moveq #0,d0 ;Returncode = OK rts CNOP 0,4 no_active_tcp_stack moveq #-1,d0 ;Returncode = FALSE rts bsdsocket_name DC.B "bsdsocket.library",0 I will check this, if I have more time. |
|
27 September 2017, 21:16 | #17 |
Amigan
Join Date: Feb 2012
Location: London
Posts: 1,311
|
Probably won't work with RoadShow. RoadShow (IIRC) is the only stack to have a physical bsdsocket.library. Running OpenLibrary() might actually start RoadShow!
|
27 September 2017, 22:39 | #18 |
Registered User
Join Date: Feb 2014
Location: Germany
Posts: 527
|
Try loading bsdsocket.library with loadmodule?
|
29 September 2017, 07:14 | #19 |
Registered User
Join Date: Sep 2015
Location: Germany
Posts: 259
|
|
29 September 2017, 09:31 | #20 |
move.l #$c0ff33,throat
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
|
FindResident() might be an option.
|
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 |
|
|