EXEP on QPC

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

EXEP on QPC

Postby olifink » Sun Dec 02, 2018 8:00 pm

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
Super Gold Card
Posts: 578
Joined: Tue Dec 14, 2010 9:04 am
Location: Leeds, West Yorkshire, UK
Contact:

Re: EXEP on QPC

Postby NormanDunbar » Sun Dec 02, 2018 9:54 pm



Why do they put lightning conductors on churches?
If at first you don't succeed, don't take up skydiving!
If you think your job is pointless, remember, there's someone in Germany who fits indicators to BMWs.
olifink
Chuggy Microdrive
Posts: 51
Joined: Tue Oct 30, 2018 7:35 pm

Re: EXEP on QPC

Postby olifink » Mon Dec 03, 2018 10:03 am

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


Ralf R.
ROM Dongle
Posts: 20
Joined: Fri Jun 15, 2018 8:58 pm

Re: EXEP on QPC

Postby Ralf R. » Mon Dec 03, 2018 10:52 am

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


olifink
Chuggy Microdrive
Posts: 51
Joined: Tue Oct 30, 2018 7:35 pm

Re: EXEP on QPC

Postby olifink » Mon Dec 03, 2018 9:16 pm

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


User avatar
NormanDunbar
Super Gold Card
Posts: 578
Joined: Tue Dec 14, 2010 9:04 am
Location: Leeds, West Yorkshire, UK
Contact:

Re: EXEP on QPC

Postby NormanDunbar » Mon Dec 03, 2018 10:13 pm

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?
If at first you don't succeed, don't take up skydiving!
If you think your job is pointless, remember, there's someone in Germany who fits indicators to BMWs.
User avatar
pjw
Gold Card
Posts: 431
Joined: Fri Jul 11, 2014 8:44 am
Location: Norway

Re: EXEP on QPC

Postby pjw » Mon Dec 03, 2018 11:04 pm

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
Be wary of large West-Coast corporations bearing gifts!
- Ancient Trojan proverb
Martin_Head
Gold Card
Posts: 356
Joined: Tue Dec 17, 2013 1:17 pm

Re: EXEP on QPC

Postby Martin_Head » Tue Dec 04, 2018 11:39 am

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
Gold Card
Posts: 431
Joined: Fri Jul 11, 2014 8:44 am
Location: Norway

Re: EXEP on QPC

Postby pjw » Tue Dec 04, 2018 11:48 am

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
Be wary of large West-Coast corporations bearing gifts!
- Ancient Trojan proverb
User avatar
dilwyn
Mr QL
Posts: 1395
Joined: Wed Dec 01, 2010 10:39 pm
Location: Wales
Contact:

Re: EXEP on QPC

Postby dilwyn » Tue Dec 04, 2018 5:39 pm

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


Dilwyn
All things QL: see www.dilwyn.me.uk

Return to “Help for New Users”

Who is online

Users browsing this forum: No registered users and 0 guests