Moire (aka bouncing lines)

Anything QL Software or Programming Related.
Post Reply
User avatar
bwinkel67
QL Wafer Drive
Posts: 1196
Joined: Thu Oct 03, 2019 2:09 am

Moire (aka bouncing lines)

Post by bwinkel67 »

I used to have a bouncing line program but I can't find it. It was similar to the Mac's Moire with a bouncing line whose tail could be adjusted. I think it came both in SuperBASIC and as a compiled version. Anyone know what I speak of? I don't recall the name so it's hard to search for it on Dilwyn's site.


User avatar
Artificer
Over Heated PSU
Posts: 126
Joined: Fri Nov 24, 2017 8:43 am

Re: Moire (aka bouncing lines)

Post by Artificer »

Hi,

You might be thinking of the listing and article of Simon Goodwin's in QLWorld_1991 December 1991 on page 29. A pdf of the magazine can be downloaded from Dilwyn Jones site http://www.dilwyn.me.uk/mags/index.html

I think there was also a coverdisk with QL today the included screen savers that might have had the programs you are thinking of but I don't remember which issue.


Cheers


User avatar
bwinkel67
QL Wafer Drive
Posts: 1196
Joined: Thu Oct 03, 2019 2:09 am

Re: Moire (aka bouncing lines)

Post by bwinkel67 »

I found it -- Baton_bas. Looks like it was published in QLWorld in May 1990 by two folks from NESQLUG here in New England.

Code: Select all

100 REMark =============================
105 REMark ********* BATON_bas *********
110 REMark =============================
115 :
120 REMark Graphic Simulation of a Baton
125 REMark    QLWorld Issue May 1990
130 REMark   Contributed by Peter Hale
135 REMark  Modification by Ed Kingsley
140 REMark BATON_ex is a compiled version
145 REMark   Read BATON_doc for Info
150 :
200 WINDOW 512,250,0,0
210 PAPER 0:INK 5:CLS:PRINT\\\"BATON TWIRLER":INK 2:PRINT\\\ "SELECT NUMBER OF TRAILING IMAGES"\"INPUT A NUMBER BETWEEN 1 & 45  ";:INK 7:INPUT R
220 PAPER 0: CLS
230 DIM ypos1(50): DIM xpos1(50)
240 DIM ypos2(50): DIM xpos2(50)
250 x1inc = 1.9 : x2inc = 2.7
260 y1inc = 2.7 : y2inc = 3.1
270 x1pos = 50 : x2pos = 55
280 y1pos = 55 : y2pos = 60
290 xmax = 120
300 ymax = 100
310 index = 0
320 REPeat loop
330  index1=(index) MOD 50
340  index = (index+1) MOD 100
350  INK (2+(index MOD 6))
360  LINE (x1pos),(y1pos) TO (x2pos),(y2pos)
370  xpos1(index1)=x1pos : xpos2(index1)=x2pos
380  ypos1(index1)=y1pos : ypos2(index1)=y2pos
390  x1pos = x1pos+x1inc
400  y1pos = y1pos+y1inc
410  x2pos = x2pos+x2inc
420  y2pos = y2pos+y2inc
430  IF x1pos < 0 THEN 
440    x1inc = -x1inc : x1pos = 0
450  END IF 
460  IF y1pos < 0 THEN 
470    y1inc = -y1inc : y1pos = 0
480  END IF 
490  IF x1pos > xmax THEN 
500    x1pos=xmax : x1inc = -x1inc
510  END IF 
520  IF y1pos > ymax THEN 
530    y1pos=ymax : y1inc = -y1inc
540  END IF 
550  IF x2pos < 0 THEN 
560    x2inc = -x2inc : x2pos = 0
570  END IF 
580  IF x2pos > xmax THEN 
590    x2pos=xmax : x2inc = -x2inc
600  END IF 
610  IF y2pos < 0 THEN 
620    y2inc = -y2inc : y2pos = 0
630  END IF 
640  IF y2pos > ymax THEN 
650    y2pos=ymax : y2inc = -y2inc
660  END IF 
670  index2 =(index-R) MOD 50
680 INK 0
690  LINE (xpos1(index2)),(ypos1(index2)) TO (xpos2(index2)),(ypos2(index2))
700 END REPeat loop
Attached is the zip file.
baton.zip
(6.02 KiB) Downloaded 133 times

It also has an executable (baton_exe) but I can't get it to work (tried resizing its dataspace with qlayt.exe). It was SuperCharged and I tried recompiling it with the Turbo Compiler but no luck as I can't get the Trubo Compiler to work for me. I even tried creating a simple one line SuperBASIC "Hello World" program and when I run the executable it just crashes the emulator (same with compiling Baton_bas).

Here are the steps I took:
  • LRESPR win8_turbo_tk_code
  • EXEC_W win8_parser_task;"win8_hello_bas"
    • Here it sticks the source name under Object and asks you if you want to delete it, which I find odd.
    • So you then change the object file to something else (I called it win8_hello_exe)
    • Hit space and it compiles with no errors
  • EXEC_W win8_codegen_task
    • This one dodesn't seem to take parameters
    • Generates the win8_hello_exe file successfully but the file crashes emulator
Anyone can tell me what is going on? I read the QL Turbo Manual (well part of it) but nothing it says seems to align with how it works (i.e. it says to type CHARGE but that doesn't work). The only thing it helped with was loading the Turbo Toolkit.


BTW, looking for this I found pictures form the early 90's Boston QL meeting with NESQLUG folks as well as Tony Firshman, Stuart Honeyball, Jochen Merz, to name a few...


swensont
Forum Moderator
Posts: 252
Joined: Tue Dec 06, 2011 3:30 am
Location: SF Bay Area
Contact:

Re: Moire (aka bouncing lines)

Post by swensont »

I was able to compile it and it ran fine. The problem might be Qlay. I don't think it was ever a fully stable emulator.

I'm attaching the compiled version that I did (with Turbo 5.07).
baton.zip
(5.24 KiB) Downloaded 146 times
Tim


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

Re: Moire (aka bouncing lines)

Post by NormanDunbar »

Hi bwinkel67,

Turbo Toolkit should give you the Charge command. Turbo compiles the currently loaded program - it does not compile from disc. When you pass the file name over, if I remember correctly, that's the output filename - hence the prompt to delete it.

HTH


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
ql_freak
Gold Card
Posts: 354
Joined: Sun Jan 18, 2015 1:29 am

Re: Moire (aka bouncing lines)

Post by ql_freak »

swensont wrote:I was able to compile it and it ran fine. The problem might be Qlay. I don't think it was ever a fully stable emulator.
From all what I have heard (e.g. Hans-Peter Recktenwald) QLAY is one of the most compatible emulators for the QL. But unfortunately only for the BBQL. E.g. afaik all directory device drivers (except RAM-Disk) only support a kind of Microdrive emulation (e.g. a maximum of 256 (512?) files per drive. AND (at least for me) the most disadvantage is, that it's very uncomfortable to copy files to it (you must use a special program, delivered with QLAY).


http://peter-sulzer.bplaced.net
GERMAN! QL-Download page also available in English: GETLINE$() function, UNIX-like "ls" command, improved DIY-Toolkit function EDLINE$ - All with source. AND a good Python 3 Tutorial (German) for Win/UNIX :-)
User avatar
bwinkel67
QL Wafer Drive
Posts: 1196
Joined: Thu Oct 03, 2019 2:09 am

Re: Moire (aka bouncing lines)

Post by bwinkel67 »

Ok, some progress (thanks to NormanDunbar). I was able to compile Baton_bas with three BASIC compilers, with only one (Turbo) not quite working. Each gives a different final executable size with the older ones taking less space...all under QLAY2. The problem with Turbo might be that I'm running it from Win8 whereas all the other ones I ran from Flp1 (via WIN_USE FLP) so I'll have to try that. Sometimes the NFA.ROM causes issues.

  • SuperCharge - works with a file size of 7,268
    • Note that the original Baton_exe that I had, but for some reason, refuses to run (even adding appropriate dataspace) was compiled by 1987 version of Turbo/SuperCharge with size 7,778.
    • I don't really understand why I cannot get it to run again as the file doesn't seem to be corrupt but when executed it just prints into window #0 the same graphics character indefinitely.
    • The header difference between the two were:
      • Original: `b5.09Jû T  1987 The Turbo Team.
      • Compiled with SuperCharge of of Dilwyn's site: `&2.00Jû Baton Digital Precision
  • Turbo - compiles with file size 8,588 but won't run.
    • Note that this is the same size as what swensont posted but mine won't run and his will
    • Looking at the two files, mine differs slightly in that it starts replacing 'ƒ" with a space towards the end of the file...it does use it in the first portion.
  • QLiberator - works with file size of 10,242
Here is the zip with source, the doc file, and the SuperCharged version. Anyways, just wanted to recover the executable but interesting how some of these BASIC compilers work. I like the C compilation process better, where you just have exec'utables, like in Unix/Linux, and give it input files on the command line (I think QLiberator does that but you still need to load an extension).
baton.zip
(5.98 KiB) Downloaded 118 times
BTW, Peter Hale (listed on the BASIC) was the first person I connected with here in Boston for QL stuff and he got me involved in NESQLUG. Miss those days when Boston had enough QL'ers where we could have a users group. I still have a magnet form the 1996 NESQLUG Boston QL meeting where I guess I was Program Director (I think we each got a task to do :D) It was fun seeing folks from Europe come over and show all the cool stuff being done. Like I said, I have a bunch of b&w pictures of attendees...PM me if you came and want a grainy picture of yourself from May 18, 1996.


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

Re: Moire (aka bouncing lines)

Post by Derek_Stewart »

Hi,

The CHARGE command uses DEFAULT_DEVICE command to point to the location of the Turbo compiler directory.

So if Turbo Compiler is located on WIN8_turbo_

Use the command: DEFAULT_DEVICE "win8_turbo_"

With reference to the Turbo Toolkit Manual, Section 7, outlines all this
. Also DEFAULT_DEVICE also changes the Toolkit 2 PROG_USE definition.

Another way is to set DATA_USE, PROG_USE point to the Turbo directory.

Just read the manual all the information is there. Any QL system, including emulators, will work with the Turbo system as long as the path to the compiler directory is set correctly.

I have read that Turbo is an upgrade to Supercharge... I am not going to contradict the author of both systems.


Regards,

Derek
User avatar
ql_freak
Gold Card
Posts: 354
Joined: Sun Jan 18, 2015 1:29 am

Re: Moire (aka bouncing lines)

Post by ql_freak »

Derek_Stewart wrote:I have read that Turbo is an upgrade to Supercharge... I am not going to contradict the author of both systems.
Of course it's an upgrade. First was SuperCharge (the first BASIC compiler). Following was not possible with SuperCharge, but with Turbo (you have to add extra commands):

1000 DEFine Procedure set_a$
1040 a$='Hello world'
1080 END Define
11020:
1160: INPUT 'Enter Greeting', userin$
1180: PRINT userin$

With Turbo this is possible, but you must define the name of the parameter a$ (or was it userin$?) as reference or so (cannot remember how to do it exactly). BUT this only works for SuperBASIC procedures/functions(!). With machine code SuperBASIC extensions you CANNOT use reference variables (like the TK2 extra command GET). (I'm not sure, but I think I have read, that someone has extended Turbo, so that this is now possible [in a version long after 2000]).

AND(!) SuperCharge was copy protected! There was a lens, and every tenth times (or so) you have started it, you have to put the lens before the screen, read the code and enter the code, so that the compiler would run(!).


http://peter-sulzer.bplaced.net
GERMAN! QL-Download page also available in English: GETLINE$() function, UNIX-like "ls" command, improved DIY-Toolkit function EDLINE$ - All with source. AND a good Python 3 Tutorial (German) for Win/UNIX :-)
User avatar
bwinkel67
QL Wafer Drive
Posts: 1196
Joined: Thu Oct 03, 2019 2:09 am

Re: Moire (aka bouncing lines)

Post by bwinkel67 »

I think I read in Turbo there is an optimize flag, correct? If so I will need to try it. I appreciate upgraded software but I prefer upgrades to be leaner and faster and so for compilers to create leaner and faster code.

The SuperCharge I used had the copy protection deactivated, however there didn't seem to be a CHARGE command so instead you had to LOAD FLP1_SUPERCHARGE to get it to work (even after loading the EXTENSION_CODE). Also, the basic routine that came with it to change the task name was expecting version 1 and this was version 2 (I changed it and it changed the name accordingly with no issues). Unfortunately that older version doesn't have any manual with it, I looked.

I find QLAY2 to be a pretty good emulator and things usually work as expected for me. I also find it is a great interface emulator for a BBQL, esp using vDrive since I can quickly populate MDV files and get them on an SD card to transfer over. It's the default directories that I usually struggle with and that is usually just a lack of understanding how to use them, but sometimes the NFA.ROM also causes issues. Also, qlayt.exe is an important utility to use with that emulator.

Thanks for all the help...happy to have the Baton_exe back and, bonus, have it be a slightly smaller footprint now. I wanted to use it to demo something on the BBQL. I have Moire for an old Mac so Baton is the QL equivalent.


Post Reply