Re: [Ql-Users] PAUSE
Dilwyn Jones wrote: Dilwyn Jones wrote: I'll use Ralf's example to write my own extension I can use in QLiberator compiled jobs. And...;-))...please make it an official release 8-) Cheers...Ralf Done...it's available to download on http://www.dilwyn.me.uk/tk/index.html (scroll about three quarters the way down the page, the toolkits are in A-Z order anyway). Thanks, Ralf. Dilwyn Jones Thanks, Dilwyn. Very clever...8-{) Cheers...Ralf ___ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm
[Ql-Users] PAUSE
Does anyone know of an extension to BASIC similar to PAUSE n which does not return if a key is pressed. That is, a fixed pause. Or anyone know how or ideas on how best to go about writing one? I guess a suitable keyword name might be WAIT (just to get this started - it wasn't listed in Rich Mellor's BASIC reference manual anyway!) I considered using job suspensions, but wasn't sure if this would work the same on all systems - I want to introduce short timings which are consistent on all systems and aren't affected by keypresses, so the game can run at a vaguely consistent speed on all systems. Dilwyn Jones ___ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm
Re: [Ql-Users] PAUSE
On 14/12/2010 16:14, Dilwyn Jones wrote: Does anyone know of an extension to BASIC similar to PAUSE n which does not return if a key is pressed. That is, a fixed pause. Or anyone know how or ideas on how best to go about writing one? I guess a suitable keyword name might be WAIT (just to get this started - it wasn't listed in Rich Mellor's BASIC reference manual anyway!) I considered using job suspensions, but wasn't sure if this would work the same on all systems - I want to introduce short timings which are consistent on all systems and aren't affected by keypresses, so the game can run at a vaguely consistent speed on all systems. Dilwyn Jones ___ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm SUSPEND_TASK (turbo toolkit), SJOB -1,x (Tiny Toolkit) or SUSJOB -1,x (Btool) will all suspend a task for a given number of frames - although beware that these commands, as with PAUSE and INKEY$ vary between 50Hz european machines and 60Hz US machines! -- Rich Mellor I had considered using something like that, but the best solution for what I am trying to achieve would be an equivalent of INKEY$(n) where a keyboard read and time delay could be combined such that the game doesn't suddenly run faster when you press keys. Any further ideas in that department, perhaps? Simon Goodwin's DIY Toolkit has a TIMER set of commands, which can work in units of 1/50 or 1/60 second. I guess an equivalent to what I want could be written as a loop based on the timer, with a keyboard read somewhere in the loop. But of course what happens if multiple keypresses are made within the loop? Maybe that's why PAUSE and INKEY$ work as they do. Dilwyn Jones ___ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm
Re: [Ql-Users] PAUSE
Dilwyn Jones wrote: Does anyone know of an extension to BASIC similar to PAUSE n which does not return if a key is pressed. That is, a fixed pause. Or anyone know how or ideas on how best to go about writing one? I guess a suitable keyword name might be WAIT (just to get this started - it wasn't listed in Rich Mellor's BASIC reference manual anyway!) I considered using job suspensions, but wasn't sure if this would work the same on all systems - I want to introduce short timings which are consistent on all systems and aren't affected by keypresses, so the game can run at a vaguely consistent speed on all systems. Dilwyn Jones S_Edit contains a command EXT7 (PAUSI in clear) in keyrow_asm, which does what you want. Cheers...Ralf ___ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm
Re: [Ql-Users] PAUSE
Op 14/12/2010 17:14, Dilwyn Jones schreef: Does anyone know of an extension to BASIC similar to PAUSE n which does not return if a key is pressed. That is, a fixed pause. Or anyone know how or ideas on how best to go about writing one? I guess a suitable keyword name might be WAIT (just to get this started - it wasn't listed in Rich Mellor's BASIC reference manual anyway!) I considered using job suspensions, but wasn't sure if this would work the same on all systems - I want to introduce short timings which are consistent on all systems and aren't affected by keypresses, so the game can run at a vaguely consistent speed on all systems. Dilwyn Jones ___ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm Wait X already exists in W. Lenerz's exitension OUTPTR_bin François Van Emelen ___ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm
Re: [Ql-Users] PAUSE
Ralf Reköndt wrote: Dilwyn Jones wrote: Does anyone know of an extension to BASIC similar to PAUSE n which does not return if a key is pressed. That is, a fixed pause. Or anyone know how or ideas on how best to go about writing one? I guess a suitable keyword name might be WAIT (just to get this started - it wasn't listed in Rich Mellor's BASIC reference manual anyway!) I considered using job suspensions, but wasn't sure if this would work the same on all systems - I want to introduce short timings which are consistent on all systems and aren't affected by keypresses, so the game can run at a vaguely consistent speed on all systems. Dilwyn Jones S_Edit contains a command EXT7 (PAUSI in clear) in keyrow_asm, which does what you want. Cheers...Ralf Ok, to short to examine... PAUSI ticks_to suspend_job pausi vector ca.gtint,a2 subq.w #1,d3 bne quit move.w 0(a6,a1.l),d3 addq.l #2,bv_rip(a6) moveq #-1,d1 suba.l a1,a1 qdosmt mt.susjb rts Cheers...Ralf NB: Sorry for old MAC_INC ;-)) ___ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm
Re: [Ql-Users] PAUSE
Ralf Reköndt wrote: Dilwyn Jones wrote: Does anyone know of an extension to BASIC similar to PAUSE n which does not return if a key is pressed. That is, a fixed pause. Or anyone know how or ideas on how best to go about writing one? I guess a suitable keyword name might be WAIT (just to get this started - it wasn't listed in Rich Mellor's BASIC reference manual anyway!) I considered using job suspensions, but wasn't sure if this would work the same on all systems - I want to introduce short timings which are consistent on all systems and aren't affected by keypresses, so the game can run at a vaguely consistent speed on all systems. Dilwyn Jones S_Edit contains a command EXT7 (PAUSI in clear) in keyrow_asm, which does what you want. Cheers...Ralf Ok, to short to examine... PAUSI ticks_to suspend_job pausi vector ca.gtint,a2 subq.w #1,d3 bne quit move.w 0(a6,a1.l),d3 addq.l #2,bv_rip(a6) moveq #-1,d1 suba.l a1,a1 qdosmt mt.susjb rts Cheers...Ralf NB: Sorry for old MAC_INC ;-)) ___ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm
Re: [Ql-Users] PAUSE
Ralf Reköndt wrote: Ralf Reköndt wrote: Dilwyn Jones wrote: Does anyone know of an extension to BASIC similar to PAUSE n which does not return if a key is pressed. That is, a fixed pause. Or anyone know how or ideas on how best to go about writing one? I guess a suitable keyword name might be WAIT (just to get this started - it wasn't listed in Rich Mellor's BASIC reference manual anyway!) I considered using job suspensions, but wasn't sure if this would work the same on all systems - I want to introduce short timings which are consistent on all systems and aren't affected by keypresses, so the game can run at a vaguely consistent speed on all systems. Dilwyn Jones S_Edit contains a command EXT7 (PAUSI in clear) in keyrow_asm, which does what you want. Cheers...Ralf Ok, to short to examine... PAUSI ticks_to suspend_job pausi vector ca.gtint,a2 subq.w #1,d3 bne quit move.w 0(a6,a1.l),d3 addq.l #2,bv_rip(a6) moveq #-1,d1 suba.l a1,a1 qdosmt mt.susjb rts Cheers...Ralf NB: Sorry for old MAC_INC ;-)) Sorry for double post, the server seems to e too slow ;-)) OK, quit simply means an rts. Cheers...Ralf ___ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm
Re: [Ql-Users] PAUSE
Dilwyn Jones wrote: I had considered using something like that, but the best solution for what I am trying to achieve would be an equivalent of INKEY$(n) where a keyboard read and time delay could be combined such that the game doesn't suddenly run faster when you press keys. SUSPEND_TASK 50:key$=INKEY$ There, combination achieved ;-) Marcel ___ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm
Re: [Ql-Users] PAUSE
Ralf Reköndt wrote: Dilwyn Jones wrote: Does anyone know of an extension to BASIC similar to PAUSE n which does not return if a key is pressed. That is, a fixed pause. Or anyone know how or ideas on how best to go about writing one? I guess a suitable keyword name might be WAIT (just to get this started - it wasn't listed in Rich Mellor's BASIC reference manual anyway!) I considered using job suspensions, but wasn't sure if this would work the same on all systems - I want to introduce short timings which are consistent on all systems and aren't affected by keypresses, so the game can run at a vaguely consistent speed on all systems. Dilwyn Jones S_Edit contains a command EXT7 (PAUSI in clear) in keyrow_asm, which does what you want. Cheers...Ralf Ok, to short to examine... PAUSI ticks_to suspend_job pausi vector ca.gtint,a2 subq.w #1,d3 bne quit move.w 0(a6,a1.l),d3 addq.l #2,bv_rip(a6) moveq #-1,d1 suba.l a1,a1 qdosmt mt.susjb rts Cheers...Ralf NB: Sorry for old MAC_INC ;-)) Thank you Ralf. I'll have a go at this later tonight. Simpler than I thought! Dilwyn Jones ___ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm
Re: [Ql-Users] PAUSE
Dilwyn Jones wrote: I had considered using something like that, but the best solution for what I am trying to achieve would be an equivalent of INKEY$(n) where a keyboard read and time delay could be combined such that the game doesn't suddenly run faster when you press keys. SUSPEND_TASK 50:key$=INKEY$ There, combination achieved ;-) Marcel Thanks. I'm not using Turbo, so would rather not rely on SUSPEND_TASK. But I see what you mean. I'll use Ralf's example to write my own extension I can use in QLiberator compiled jobs. For some reason I had thought that pressing a key released a suspended task, but I was mixing that up with using CTRL SPACE (break) to release a suspended BASIC interpreter job 0. Reading the Turbo Toolkit manual reminded me I was wrong. Isn't it nice to realise the answer to what you thought was a difficult question turns out to be so simple. Doooh! :o) Dilwyn Jones ___ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm
Re: [Ql-Users] PAUSE
Dilwyn Jones wrote: I'll use Ralf's example to write my own extension I can use in QLiberator compiled jobs. And...;-))...please make it an official release 8-) Cheers...Ralf ___ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm
Re: [Ql-Users] PAUSE
Dilwyn Jones wrote: I'll use Ralf's example to write my own extension I can use in QLiberator compiled jobs. And...;-))...please make it an official release 8-) Cheers...Ralf Thanks Ralf. If I get it working it'll be ont he Toolkits page on my website later tonight! Dilwyn Jones ___ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm