Dr. Jim's QL Dumping Ground
Re: Dr. Jim's QL Dumping Ground
Hi Stephen,
I couldnt help having a wee fiddle with your delightful program last night. I thought itd be fun to make it high colour and full screen!
I tried lots of different things; some I left in and others I REMed out. The resulting mess you can see for yourself, below.
SMSQ/E GD2 modes only!
This version expects to be EXecuted, eg EX mandala24.
Press ESC to quit.
Should run on any GD2-capable system.
I couldnt help having a wee fiddle with your delightful program last night. I thought itd be fun to make it high colour and full screen!
I tried lots of different things; some I left in and others I REMed out. The resulting mess you can see for yourself, below.
SMSQ/E GD2 modes only!
This version expects to be EXecuted, eg EX mandala24.
Press ESC to quit.
Should run on any GD2-capable system.
Per
dont be happy. worry
- ?
dont be happy. worry
- ?
-
- Super Gold Card
- Posts: 714
- Joined: Mon Nov 24, 2014 2:03 pm
Re: Dr. Jim's QL Dumping Ground
Hi Per,
Your program EXecutes or RUNs fine on QPC2, until the call to 'alpha_blend' on line 654, where it halts with 'unknown procedure'.
I see there is such a call on line 114 which gives no such error message. (There is also a call on line 692).
For some reason the #0 buffer also gets clobbered, although #0 remains accessible !
Whatever, Your idea of using fast BLOCKS is great. (I needed an 'aspect' set to 0.86 for normal circles).
How can we access alpha_blend to get completion ? ( By REMing out the calls, the program runs all the same...).
Steve.
Your program EXecutes or RUNs fine on QPC2, until the call to 'alpha_blend' on line 654, where it halts with 'unknown procedure'.
I see there is such a call on line 114 which gives no such error message. (There is also a call on line 692).
For some reason the #0 buffer also gets clobbered, although #0 remains accessible !
Whatever, Your idea of using fast BLOCKS is great. (I needed an 'aspect' set to 0.86 for normal circles).
How can we access alpha_blend to get completion ? ( By REMing out the calls, the program runs all the same...).
Steve.
Re: Dr. Jim's QL Dumping Ground
Duh! I made that stupid mistake of doing a "quick correction" just before dispatch without testing afterwards
The first few lines should say
Sorry.
The first few lines should say
Code: Select all
112 open#0; con: open#1; con
113 xs% = 3 * scr_xlim / 5: ys% = scr_ylim - 20: rem Fade block size
114 xo% = scr_xlim / 5: yo% = 10: rem Fade block position
115 rem block xs%, ys%, xo%, yo%, -1: pause: rem Block size test
116 main
120 :
Per
dont be happy. worry
- ?
dont be happy. worry
- ?
Re: Dr. Jim's QL Dumping Ground
Hi Stephen, Ive no idea what you mean. ALPHA_BLEND is integral to SMSQ/E, since V3.26. It may not be initialised in non-GD2 versions or if SMSQ/E is not booted into a high-colour mode - a prerequisite for mandala24.stevepoole wrote:Hi Per,
Your program EXecutes or RUNs fine on QPC2, until the call to 'alpha_blend' on line 654, where it halts with 'unknown procedure'.
Thats because it didnt get called. See my previous message.I see there is such a call on line 114 which gives no such error message. (There is also a call on line 692).
Remember: mandala24 is supposed to be EXecuted, not RUN! (As per instructions.) Either execute it from QD with the SBAS/QD Thing, or EXecute the SBASIC program like you would a _exe, _obj, or _task!For some reason the #0 buffer also gets clobbered, although #0 remains accessible !
Window#0 gets totally covered by window#1 in mandala24, because I wanted to read the count-down (and other information), and ALPHA_BLEND was active in window#1 making the output illegible.
This was a hacked program for hackers! I didnt think Id need to explain myself. Apologies.
I guess thats why you made 'aspect' a variable. I use a poke in my boot program so that an aspect ratio of 1 works across all my systems. I tried it on QPC2 (1920x1080, SMSQmulator (960x540) and Q68 (1024x512). All showed perfectly round circles with the program as delivered (prior to the last minute fixup! grrrr)Whatever, Your idea of using fast BLOCKS is great. (I needed an 'aspect' set to 0.86 for normal circles).
I have no idea why ALPHA_BLEND bombs out on your system.How can we access alpha_blend to get completion ? ( By REMing out the calls, the program runs all the same...).
Are you using the latest version of SMSQ/E, currently V3.37? (Or at least > V3.26?)
For mandal24, do you boot up in high colour mode (ie either 8 bit mode or 16 bit mode)?
Per
dont be happy. worry
- ?
dont be happy. worry
- ?
-
- Super Gold Card
- Posts: 714
- Joined: Mon Nov 24, 2014 2:03 pm
Re: Dr. Jim's QL Dumping Ground
Hi Per,
Thanks for all the technical details.
I just downloaded the latest QPC2 onto a windows10 computer, and your program version (modified as you requested), runs and executes spectacularly !
The 'high colours' certainly improve on the 256 of my previous PC, but the rightmost section of screen does not get faded.
(I am trying to pin down that problem, perhaps due to my system's initial settings ?).
Thanks for improving the 'mandala' code -- It's great to see when the QL community works collaboratively...
Best wishes,
Steve.
__________________
Thanks for all the technical details.
I just downloaded the latest QPC2 onto a windows10 computer, and your program version (modified as you requested), runs and executes spectacularly !
The 'high colours' certainly improve on the 256 of my previous PC, but the rightmost section of screen does not get faded.
(I am trying to pin down that problem, perhaps due to my system's initial settings ?).
Thanks for improving the 'mandala' code -- It's great to see when the QL community works collaboratively...
Best wishes,
Steve.
__________________
Re: Dr. Jim's QL Dumping Ground
Hi Steve,
The reason Fade doesnt work as expected is because CIRCLE (etc) and
BLOCK operate in different universes. A bit more effort on my part
might have overcome that difference, but as I said elsewhere, I just
did a simple hack; I wasnt trying to make a product.
My hack relies on the assumption that "aspect = 1" in mandela24. I
suspect your CIRCLEs arnt round either, so a system wide poke might be
whats needed. You could try
POKE_F! $C4! $14A, 1
in QPC2 and SMSQmulator.
Note: If you have the TURBO toolkit loaded it wont work! (Really,
TURBO_TK_SMS should be updated to remove POKE_F and PEEK_F as the
built-in SMSQ/E versions are different and more comprehensive!) You
either have to do the poke before Turbo TK is loaded or patch Turbo TK
to convert POKE_F to POKExF or something.
See this topic for more details: SCREEN1 = SYSVAR @ JSROM
Alternatively you could try downloading the G-Ratio_bin toolkit off
Dilwyn's site and use that to set a suitable system wide aspect ratio.
Whichever method you choose, make it part of you boot file!
Anyway, that should cure the problem. If not, let me know!
The reason Fade doesnt work as expected is because CIRCLE (etc) and
BLOCK operate in different universes. A bit more effort on my part
might have overcome that difference, but as I said elsewhere, I just
did a simple hack; I wasnt trying to make a product.
My hack relies on the assumption that "aspect = 1" in mandela24. I
suspect your CIRCLEs arnt round either, so a system wide poke might be
whats needed. You could try
POKE_F! $C4! $14A, 1
in QPC2 and SMSQmulator.
Note: If you have the TURBO toolkit loaded it wont work! (Really,
TURBO_TK_SMS should be updated to remove POKE_F and PEEK_F as the
built-in SMSQ/E versions are different and more comprehensive!) You
either have to do the poke before Turbo TK is loaded or patch Turbo TK
to convert POKE_F to POKExF or something.
See this topic for more details: SCREEN1 = SYSVAR @ JSROM
Alternatively you could try downloading the G-Ratio_bin toolkit off
Dilwyn's site and use that to set a suitable system wide aspect ratio.
Whichever method you choose, make it part of you boot file!
Anyway, that should cure the problem. If not, let me know!
Per
dont be happy. worry
- ?
dont be happy. worry
- ?
-
- Super Gold Card
- Posts: 714
- Joined: Mon Nov 24, 2014 2:03 pm
Re: Dr. Jim's QL Dumping Ground
Hi again Per,
The settings I needed to get the correct alpha-blend transitions : SCALE 400, -100, 0 (instead of 400, -150, 0 ).
With aspect=.86 for normal circles, (QPC2 initialised at 512*256, full screen).
Now the program operates as expected on my new setup. (W10, QPC2 5.0 with latest SMSQ/E version) : 'Tis a real beauty...
--- Thanks again to TMD for the spirograph ! ---
Steve.
_________________
The settings I needed to get the correct alpha-blend transitions : SCALE 400, -100, 0 (instead of 400, -150, 0 ).
With aspect=.86 for normal circles, (QPC2 initialised at 512*256, full screen).
Now the program operates as expected on my new setup. (W10, QPC2 5.0 with latest SMSQ/E version) : 'Tis a real beauty...
--- Thanks again to TMD for the spirograph ! ---
Steve.
_________________
Re: Dr. Jim's QL Dumping Ground
And that's one of the features of QL graphics that absolutely does my head in.pjw wrote:Hi Steve,
The reason Fade doesnt work as expected is because CIRCLE (etc) and
BLOCK operate in different universes.
A while back I was trying to draw the Dragon Data logo in Mode 4 - as you do - and was trying to fill in the dragon's body with BLOCK commands. When I couldn't get the BLOCK to appear in the right place whatever I did, I gave up and put a series of LINEs in a FOR... NEXT loop instead. Given that it needed to be filled, it had the right effect.
Spectribution: Dr. Jim's Sinclair computing pages.
Features my own programs, modified type-ins, RZXs, character sets & UDGs, and QL type-ins... so far!
Features my own programs, modified type-ins, RZXs, character sets & UDGs, and QL type-ins... so far!
Re: Dr. Jim's QL Dumping Ground
I dont know what you were trying to do, but there is a FILL command that may do what you want. FILL #chan; 1 to turn it on and FILL #chan; 0 to turn it off. (For the nitty-gritty, see SBASIC/SuperBASIC Reference Manual.TMD2003 wrote:<>A while back I was trying to draw the Dragon Data logo in Mode 4 - as you do - and was trying to fill in the dragon's body with BLOCK commands. When I couldn't get the BLOCK to appear in the right place whatever I did, I gave up and put a series of LINEs in a FOR... NEXT loop instead. Given that it needed to be filled, it had the right effect.
FILL works pretty well. There is one major problem with it in all current implementations: If your screen is over a certain size (I dont know the exact limit, but somewhere north of 1280x800) it will bring your system crashing down!
However, that shouldnt be a problem for Qdos users, I guess (perhaps uQLx?)
Per
dont be happy. worry
- ?
dont be happy. worry
- ?
- XorA
- Site Admin
- Posts: 1365
- Joined: Thu Jun 02, 2011 11:31 am
- Location: Shotts, North Lanarkshire, Scotland, UK
Re: Dr. Jim's QL Dumping Ground
Depends if the bug is fixed in Minerva, uQLx only supports the extended screenmodes when running Minerva!pjw wrote: However, that shouldnt be a problem for Qdos users, I guess (perhaps uQLx?)