QL Tinkering

Helpful tips and guides, also new users can ask for help here.
User avatar
bwinkel67
QL Wafer Drive
Posts: 1187
Joined: Thu Oct 03, 2019 2:09 am

Re: QL Tinkering

Post by bwinkel67 »

Tinyfpga wrote: If the programs were compiled and positioned somewhere other than in the top left hand corner of
my screen, I would find them much easier to use.
Try this one, which is my compiled version of the QBits Sound program. It doesn't use the Pointer Environment and is compiled for BBQL so my guess is it would run in the shell windows in SMSQ/E

viewtopic.php?f=3&t=3902&p=44108#p44108


Derek_Stewart
Font of All Knowledge
Posts: 3929
Joined: Mon Dec 20, 2010 11:40 am
Location: Sunny Runcorn, Cheshire, UK

Re: QL Tinkering

Post by Derek_Stewart »

Hi,

I usually load the basic programme into QD and have to add an OPEN command to the console for any access to channels 0-2, for the programmes to run under SBAS/QD.

This is because there is access to channels #1,#2 by the programme, SBAS only opens a single channel, if the programme has not defined Channels #0/#1/#2

I usually like to open explicit channels with the Toolkit 2 FOP_xxx functions so that I do not have to worry about channel numbers clashing.

Then the programmes work perfectly under SMSQ/E and compile without any problems under Qliberator, or QBASIC from QD.


Regards,

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

Re: QL Tinkering

Post by RalfR »

In S_Edit, I define a slave con_ to cover the whole program, OUTL it, then check for CTRL-F4 in the main loop and use WMOV from easyPTR to move the window. That is simple and the program does not have to be a PE written one.


4E75 7000
Tinyfpga
Gold Card
Posts: 252
Joined: Thu Sep 27, 2018 1:59 am

Re: QL Tinkering

Post by Tinyfpga »

Thank you for your recent replies. I have decided to download all of QBITS' programs and documents to see
what I can learn from them. As everyone agrees the pdf documentation is first class.

What programs were used to create the documents?

I can understand Derek's post (just). Am I right in thinking that SBAS opens a console #0 by default.

Are there any SMSQE programs that list what channel numbers are in use by an application?
RalfR posted:-In S_Edit, I define a slave con_ to cover the whole program, then check for CTRL-F4 in the main loop and use WMOV from easyPTR to move the window.
What is S_Edit? What is a slave con_? Could you post a code example of your window moving concept?


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

Re: QL Tinkering

Post by RalfR »

Tinyfpga wrote:What is S_Edit? What is a slave con_? Could you post a code example of your window moving concept?
S_Edit is a SuperBASIC written editor with machine code. You can find it here: http://www.dilwyn.me.uk/editview/sedit63.zip

Remind that "WMOV" is a keyword from the easyPTR toolkit!

The move mechanism ist simple. Say, you have a main window of your program 200x200 and you have a main loop to detect all your keypresses:

Code: Select all

open_new#6, "con_"
outl#6, 200,200,50,50: rem the first occurence of your window at 50x50, no shadow
:
rep main
  cursen#6
  keypress=code (inkey$(#6,-1)): rem not sure about "-1"
  curdis#6
  rem "cf4" is pre-defined as the code of pressing "CTRL"+"F4" elsewhere (I do not know the code actually  :D )
  sel on keypress
    = cf4: wmov#6: rem now the Move sprite occures and you can move the window
    = reminder: do_what_you_want
   end sel
end rep main
All as far as I remember... :)


4E75 7000
Derek_Stewart
Font of All Knowledge
Posts: 3929
Joined: Mon Dec 20, 2010 11:40 am
Location: Sunny Runcorn, Cheshire, UK

Re: QL Tinkering

Post by Derek_Stewart »

Hi,

What I meant to say was that if a SBASIC programme is loaded into QD and executed with SBAS/QD, the interpreter will open a channel: 256x62a128x96 to use the default channel number in the SBASIC statements.

For exaample:

Code: Select all

PRINT "Hello World"
PAUSE
will produce a small channel opened to the screen where the text can be printed, the PAUSE statement is to stop the window closing. Try:

Code: Select all

ch=FOPEN("con_256x62a128x96")
PRINT #ch;"Hello World"
PAUSE #ch
Produces the same thing, but with a user defined window.

Changing the FOPEN parameters allows any window size to be used.

I mainly use QD now, but I like S_EDIT alot.


Regards,

Derek
Tinyfpga
Gold Card
Posts: 252
Joined: Thu Sep 27, 2018 1:59 am

Re: QL Tinkering

Post by Tinyfpga »

RalfR posted:-The move mechanism is simple
After a bit of fiddling about I compiled your demo to produce a window, moveable with CF4.

I downloaded esyptr from MK's website to obtain the WMOV instruction.
The unzipped file contained quite a few files that might have contained WMOV. I viewed
them all and then RESPRed one called "easyptr_cde which did the trick.

I don't use Easyptr so I am not familiar with it. Perhaps I should try harder to understand it.

I like sedit63 but the green outline and grey background is not my preferred view. It does not seem
possible to alter this. Might the author be prepared to make the display user configurable?


qbits
Trump Card
Posts: 171
Joined: Sun Dec 11, 2016 3:32 pm

Re: QL Tinkering

Post by qbits »

Hi All,
Thanks for posting all your helpful reply’s regarding editors.

Hi Tinyfpga,
First and probably an obvious question, is your setup using QPC2 latest version 5.02 and have you set the screen to that shown in the QBITSProgs04_IntroP1.

If you are using a 512x256 screen then load QBITSBoot file and on line 101 change gx=0:gy=0;
If ram2_ is unavailable then this will cause other problems again QBITSBoot File change all ram2_ references to DOS1_ or your default drive id.
Hope this helps.

Salut Steve,
A review of QBITS Progs the keys used most are cursor Left/Up/Down/Right the Spacebar and Enter, for Menu Selections the predominate is (N)ew (L)oad (S)ave (E)xit. (M)enu or (Q)uit. I can see how these might cause problems substituting in different languages.

I’m no linguist but a quick review of QBITS command which in English are all conveniently 4 letter words and their possible European Language equivalents, might there not be an abbreviation for computer usage?

Command French German Italian Spanish
(N)ew (N)ouveau (neuve) (N)eu (N)uova (N)uevo
(L)oad (C)harger (L)aden (C)arico (C)arga
(S)ave (S)auvegarder (S)ichern (S)alvare (G)uardar
(E)xit (S)ortir (B)eenden (U)scire (S)alir

(M)enu (M)enu
(Q)uit (Q)uitter / (A)rreter

Je m'excuse d'avance si vous êtes déjà informé sur ce sujet et supposez que vous utilisez un clavier standard et MS Windows.
Pour changer la langue de votre clavier, etc., suivez quelque chose de similaire à ceci en fonction de la version de Windows que vous utilisez.

(I apologise in advance if your already knowable on this subject and assume you are using a standard keyboard and MS Windows.
To Change your keyboard language etc by following something similar to this depending the version of Windows you are using.)

AZERTY to QWERTY layout, Q and A are swapped, Z and W are swapped and M is in the middle row instead of the bottom one.
Keyboards.jpg
How to change your keyboard language in Windows
In Windows 10 and Windows 8
1. Press the Windows logo key and type “Control” to search for the Control Panel app.
2. Click Control Panel.
3. Under “Clock, Language, and Region,” click “Change input methods.”
4. Click “Advanced settings.”
5. Under “Switching input methods,” select the “Use the desktop language bar when it’s available” check box, and then click Options.
6. In the Text Services and Input Languages dialog box, click the Language Bar tab, and make sure that either the “Floating” On Desktop or the “Docked in the taskbar” option is selected
7. After you have enabled the keyboard language that you want, open your document and place the cursor in the document where you want to start to type text in a different language.
8. Click the language icon on the Language bar, which should appear on your taskbar near where the clock is, and then click the language that you want to use.
QWERTY TO AZERTY keyboard shortcut: to switch between keyboard layouts, press Alt+Shift.
9. Repeat steps 7 and 8 to change your keyboard to English or switch between different languages.

How to change your keyboard language on Mac
1. Choose Apple menu > System Preferences, then click Language & Region.
2. Do one of the following:
o Add a language: click the Add button, select one or more languages in the list, then click Add.

QBITS


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

Re: QL Tinkering

Post by RalfR »

Tinyfpga wrote:I don't use Easyptr so I am not familiar with it. Perhaps I should try harder to understand it.

I like sedit63 but the green outline and grey background is not my preferred view. It does not seem
possible to alter this. Might the author be prepared to make the display user configurable?
You don't need to know much about PE to use WMOV ;)

Oh, in theory, I can extend the config block with additional things like colours. It is a self written machine code extension. But it's been a long time since I made any changes to the program.


4E75 7000
User avatar
RalfR
Aurora
Posts: 871
Joined: Fri Jun 15, 2018 8:58 pm

Re: QL Tinkering

Post by RalfR »

Tinyfpga wrote:I like sedit63 but the green outline ...
I do not have a green one, this may depend on your global theme. I use Marcel's one.
outl.JPG
outl.JPG (11.46 KiB) Viewed 2496 times


4E75 7000
Post Reply