29 November 2017, 21:52 | #21 |
Defendit numerus
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,476
|
|
30 November 2017, 20:03 | #22 | |
Registered User
Join Date: Mar 2016
Location: Thun / Switzerland
Posts: 57
|
Quote:
|
|
01 December 2017, 13:09 | #23 | |
Registered User
Join Date: Nov 2006
Location: Stockholm, Sweden
Posts: 237
|
Quote:
The homemade threading solution was reasonably efficient for all types of threading transitions except for when an interrupt wakes up another thread (timings at the bottom of the page). It was difficult to write and mistakes when using it results in hard-to-debug deadlocks... so all in all I cannot really recommend using it. Was good to get an understanding of what sort of performance can be expected from a thread switcher. It is possible to speed up the context switches triggered within interrupts further, but that involves rather intricate engineering. |
|
01 December 2017, 13:35 | #24 | ||
Defendit numerus
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,476
|
Quote:
When I have time I will inspect your code to see if I can use it for my purposes (logically I will publish any valuable variation). EDIT: Quote:
IRQ levels forced by a master (VBL?) that steer other sub-levels. Thanks! Last edited by ross; 01 December 2017 at 13:46. |
||
01 December 2017, 14:01 | #25 |
Defendit numerus
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,476
|
Draft:
Code:
EXTER Level 6 External interrupt (free from control, music routine, timed fast execution) DSKSYN Level 5 Disk Sync value found (catched, support to disk routine for read error) AUDx Level 4 Audio Interrupt (free, unused) VERTB Level 3 Vertical Blank Interrupt (master, some scattered MFM decoding) PORTS Level 2 CIA Interrupt (double: forced, user code, high priority, semaphored; CIA timed routine) SOFT Level 1 Software Interrupt (forced, user code, normal priority, depack routine) USER Level 0 User Mode (user code, low priority, pre-calc, synthetic audio sample generation) Last edited by ross; 01 December 2017 at 14:52. |
01 December 2017, 20:12 | #26 | |
Registered User
Join Date: Sep 2015
Location: Germany
Posts: 260
|
Quote:
Right? |
|
01 December 2017, 20:16 | #27 | |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,526
|
Quote:
Interestingly enough first HRM revision had more complete table and included this special case. Later editions removed it. |
|
01 December 2017, 20:28 | #28 |
Registered User
Join Date: Sep 2015
Location: Germany
Posts: 260
|
It was a pleasure to me. And thanks for the praise. Yes, I remember that in a different thread you already mentioned you know my copper demo. I'm getting old.
|
01 December 2017, 20:34 | #29 |
Registered User
Join Date: Sep 2015
Location: Germany
Posts: 260
|
Just like the OS where the VBI steers the system multitasking. Sounds good.
|
01 December 2017, 20:52 | #30 | |
Registered User
Join Date: Sep 2015
Location: Germany
Posts: 260
|
Quote:
|
|
01 December 2017, 20:57 | #31 | |
Registered User
Join Date: Sep 2015
Location: Germany
Posts: 260
|
Quote:
|
|
01 December 2017, 21:26 | #32 | |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,526
|
Quote:
|
|
03 December 2017, 11:34 | #33 | |
Registered User
Join Date: Sep 2015
Location: Germany
Posts: 260
|
Quote:
Anyway a very interesting site with lots of good amiga books for downloading. Many thanks, Toni. |
|
30 September 2021, 03:48 | #34 |
Registered User
Join Date: Jun 2020
Location: Druidia
Posts: 389
|
Hi
I'm resurrecting this thread because I'm looking to do something alone similar lines. I have a background thread that's busy doing work as fast as possible. I also have a frame update thread called from the vertb handler. The copper is pretty busy so I don't want to use that for blits. What I'd like is for the frame update to start a queue of blits, which will be continued by a handler each time the blitter finishes, leaving the frame update to do it's thing. Anyway the suggested method seems to be to put the frame update inside a soft interrupt handler so this frees up the level-3 handler for repondsing to the blitter interrupts. My main question is if this seems like the most reasonable approach, and if that has been successful for others? I'll certainly give it a try but wanted to hear if anyone run into trouble? Thanks |
01 October 2021, 12:40 | #35 | |
OCS forever!
Join Date: Mar 2019
Location: Birmingham, UK
Posts: 418
|
Quote:
My current framework is mostly lev1 soft int and the copper triggering the lev 1 so that if I ever want to add some blit queue stuff I don't have to redesign. |
|
01 October 2021, 15:08 | #36 |
Registered User
Join Date: Jun 2020
Location: Druidia
Posts: 389
|
Thanks, I mostly wanted to hear if anyone ran into problems or had better suggestions.
I successfully got my own version working. I moved the frame update loop into a level 1 handler which I trigger from the level 3 handler when there's a vertb interrupt. My level 3 handler then also responds to blit interrupts. This means my frame update loop can queue up blits and keep going. Meanwhile in the background I can do whatever processing I need that isn't part of the frame update and the copper can also do whatever I want without the complexity of interleaving blits. For my particular case this is exactly what I need. The level 1 set up seems to be the most straight forward and stable solution for getting there. I've seen some other suggestions, such as handling nested interrupts but that didn't sound nearly as simple. I'm not really sure if I'm missing some downside with this level 1 approach, other than it's tricky to get it working at first! I spent quite a while confused by deadlocks and/or run away blits. |
01 October 2021, 19:09 | #37 |
Registered User
Join Date: Jun 2020
Location: Brno
Posts: 90
|
Out of curiosity. Is there any need to have the main loop in the supervisor mode (lev1 interrupt)? Isn't it unnecessary to spend 20+ CPU cycles just to go inside supervisor and (another cycles) to go back? I get the concept of Blitter job queue and hence the lev3 interrupt handler (I guess it's mainly usable for large blits only), but the main loop? Although I guess some interrupt handler (vblank or soft-int triggered by Copper) is always handy if one needs to count frames.
Last edited by defor; 01 October 2021 at 22:30. |
01 October 2021, 19:25 | #38 |
Registered User
Join Date: Jun 2020
Location: Druidia
Posts: 389
|
My render update is in the interrupt handler because the main user mode code needs to churn through other work that isn't easily divided up each frame.
Currently I'm triggering a soft interrupt from the vertb interrupt handler, which is double the cost. I hadn't considered triggering the soft interrupt using the copper, will have to check if that's possible? |
01 October 2021, 19:54 | #39 |
Registered User
Join Date: Jun 2020
Location: Brno
Posts: 90
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Q: Copper Interrupt | Herpes | Coders. Asm / Hardware | 3 | 25 April 2016 13:31 |
Trigger level 7 interrupt | geir | support.FS-UAE | 2 | 15 August 2015 22:45 |
Interrupt 7 | BigT | support.WinUAE | 2 | 07 September 2013 22:25 |
level 7 interrupt on A600 | xc8 | Hardware mods | 1 | 26 October 2008 14:53 |
Level 7 interrupt | Kintaro | support.WinUAE | 1 | 21 January 2004 17:31 |
|
|