EXEP on QPC

Helpful tips and guides, also new users can ask for help here.
olifink
Chuggy Microdrive
Posts: 69
Joined: Tue Oct 30, 2018 7:35 pm

EXEP on QPC

Post by olifink »

Now I might be wrong, but last time I used EXEP it was particularly useful to limit the ram grab from PSION programs. However, it seems to matter what I try on QPC they still grab most memory available.

Shouldn't the following just reserve 40k for Quill?

Code: Select all

exep win2_psion_quill_quill,p,40
...I'm probably missing something totally obivous, right?


User avatar
NormanDunbar
Forum Moderator
Posts: 2251
Joined: Tue Dec 14, 2010 9:04 am
Location: Leeds, West Yorkshire, UK
Contact:

Re: EXEP on QPC

Post by NormanDunbar »



Why do they put lightning conductors on churches?
Author of Arduino Software Internals
Author of Arduino Interrupts

No longer on Twitter, find me on https://mastodon.scot/@NormanDunbar.
olifink
Chuggy Microdrive
Posts: 69
Joined: Tue Oct 30, 2018 7:35 pm

Re: EXEP on QPC

Post by olifink »

NormanDunbar wrote:Maybe this helps?
thanks Norm - right, this is the expected behaviour I'd like to see, what I see with QPC (4.05, SMSQ/E 3.28) however is this:
exep-quill.png


User avatar
RalfR
Aurora
Posts: 870
Joined: Fri Jun 15, 2018 8:58 pm

Re: EXEP on QPC

Post by RalfR »

BTW: This seems to be the better solution https://www.kilgus.net/smsqe/psion-xchange/, anyway.


4E75 7000
olifink
Chuggy Microdrive
Posts: 69
Joined: Tue Oct 30, 2018 7:35 pm

Re: EXEP on QPC

Post by olifink »

I know - still I'm curious why/if exep isn't working here...


User avatar
NormanDunbar
Forum Moderator
Posts: 2251
Joined: Tue Dec 14, 2010 9:04 am
Location: Leeds, West Yorkshire, UK
Contact:

Re: EXEP on QPC

Post by NormanDunbar »

Maybe there's a problem with how EXEP collects the RAM parameter off the stack, or works out how much free RAM there is?

Just thinking out loud.

Cheers,
Norm.


Why do they put lightning conductors on churches?
Author of Arduino Software Internals
Author of Arduino Interrupts

No longer on Twitter, find me on https://mastodon.scot/@NormanDunbar.
User avatar
pjw
QL Wafer Drive
Posts: 1286
Joined: Fri Jul 11, 2014 8:44 am
Location: Norway
Contact:

Re: EXEP on QPC

Post by pjw »

I think its a bug. EXEP fetches the p parameter correctly, and the size requirement, but then seems to scribble over it and forget all about it.
As others have mentioned, XChange is better. Or find a workaround until the problem is fixed.


Per
dont be happy. worry
- ?
Martin_Head
Aurora
Posts: 847
Joined: Tue Dec 17, 2013 1:17 pm

Re: EXEP on QPC

Post by Martin_Head »

Many Moons ago I did this http://www.dilwyn.me.uk/psions/Psion_Mod.zip

And to quote Dilwyn's web site - Psion Enhancements v1.03 Modifies the Psion suite, Versions 2.30 and 2.35/6 to give you the following improvements - You can now use the second screen (with Minerva), You can now multitask correctly without any task switching program, You can pass a parameter to define how much space will be used (Toolkit command like EX required), and The task is given a Job name. Needs Toolkit II.


User avatar
pjw
QL Wafer Drive
Posts: 1286
Joined: Fri Jul 11, 2014 8:44 am
Location: Norway
Contact:

Re: EXEP on QPC

Post by pjw »

I mentioned the problem to Wolfgang Lenerz last night, and this morning got the following reply:
WL wrote:I had a quick look at the EXEP problem.

It is probably here to stay, as it is due to the way the hotkey system calculates the free memory (in ee_hk_grab_asm) before reserving it to deprive the Psion prog of it.

The relevant code there is:

Code: Select all

        move.l  sys_sbab(a0),d1          ; bottom of basic
        sub.l   sys_fsbb(a0),d1          ; less bottom of free
        sub.l   #$400,d1                 ; less gap
Further on, the HK system reserves the resulting memory in D1 for job 0 (!) and releases it once the Psion prog is started and grabbed its memory.

These pointers are mostly set up in smsq_mem_init_asm where the memory map is initialized.

However, most modern SMSQE systems (notably Qx0, QPC, SMSQMulator,Q68) use a slightly different way to set up the memory, as they artificially limit the amount of free memory available to the slave blocks to 1MiB (in smsq_mem_1mb_init_asm). This makes sense to avoid long searches through the slave block in machines with lots of memory. The side-effect is that the HK system believes it has far less memory to play with than it actually does, so it only reserves (on a quick test with SMSQmulator with 32 MiB) about 820 KiB for Sbasic, thus allowing the Psion prog to hog all of the real memory.

There probably is a way around this by modifying the HK routine in ...grab_asm, but I personally am very hesitant to touch this part of the code.

Maybe you could draw the user's attention to Psion Xchange, which does not use up all of the memory.


Per
dont be happy. worry
- ?
User avatar
dilwyn
Mr QL
Posts: 2753
Joined: Wed Dec 01, 2010 10:39 pm

Re: EXEP on QPC

Post by dilwyn »

As others have said, the best solution is switching to Xchange to get a cleaner solution. The different hacks to Xchange e.g. for high colour systems are all on my website, Psions page http://www.dilwyn.me.uk/psions/index.html

There is also Keith Murphy's Quill-e reworking on the same page which is better behaved for memory grabbing.

Another way around the memory grabbing issue is to use Simon Goodwin's Taskforce program from DIY Toolkit Volume J, a superbasic program which temporarily eats memory before Quill can grab it,then release it again. DIY Toolkit is at http://www.dilwyn.me.uk/tk/index.html


Post Reply