Page 1 of 2

EXEP on QPC

Posted: Sun Dec 02, 2018 8:00 pm
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?

Re: EXEP on QPC

Posted: Sun Dec 02, 2018 9:54 pm
by NormanDunbar

Re: EXEP on QPC

Posted: Mon Dec 03, 2018 10:03 am
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

Re: EXEP on QPC

Posted: Mon Dec 03, 2018 10:52 am
by RalfR
BTW: This seems to be the better solution https://www.kilgus.net/smsqe/psion-xchange/, anyway.

Re: EXEP on QPC

Posted: Mon Dec 03, 2018 9:16 pm
by olifink
I know - still I'm curious why/if exep isn't working here...

Re: EXEP on QPC

Posted: Mon Dec 03, 2018 10:13 pm
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.

Re: EXEP on QPC

Posted: Mon Dec 03, 2018 11:04 pm
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.

Re: EXEP on QPC

Posted: Tue Dec 04, 2018 11:39 am
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.

Re: EXEP on QPC

Posted: Tue Dec 04, 2018 11:48 am
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.

Re: EXEP on QPC

Posted: Tue Dec 04, 2018 5:39 pm
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