What makes the OS for QL any better, different, unique ?

A place to discuss general QL issues.
User avatar
bwinkel67
QL Wafer Drive
Posts: 1187
Joined: Thu Oct 03, 2019 2:09 am

Re: What makes the OS for QL any better, different, unique ?

Post by bwinkel67 »

tcat wrote:Hi Ben,

Nice video, seeing `Think C' on Mac, remember also using MPW (E.T.O.), that had unix like shell environment, perhaps `Apple-Dot' comes from there, it sill lingers in mem.

Re QL, how do you make those blobs, that appear to have some shading perspective, as if the light came from an angle?

Resembles Urs's QL animator, seen that?

Tomas
Hi,

The Kugel demo wasn't something I created. I did modify it to work with JSU ROM since the picture gets printed a bit further to the left (ratios are off I think). Here is the original JS ROM version. It's just a simple BASIC program with a little machine code that shuffles part of the bottom of the screen to the top to generate the next frame. How the author was able to plot the balls to make that effect, I have no idea, but they plotted it using circle and math so it's pretty impressive.

Code: Select all

10 REMark -----------------------------------------------------
20 REMark QL-DEMO von Frank Andert, 8670 Hof Ostpreussenstr 14
30 REMark Clubmitglied Region S§D I
40 REMark -----------------------------------------------------
100 s=RESPR(18432) : DATA 8769,8316,2,46,32348,11324,0,255,28680
110 a=RESPR(34) : DATA 8920,20936,-4,53447,20942,-12,28672,20085
120 RESTORE : FOR r=0 TO 16 : READ b : POKE_W a+2*r,b
130 :
140 WINDOW 512,256,0,0 : MODE 4 : PAPER 0 : CLS
150 FOR f=0 TO 4,6,5
160   FOR j=0 TO 6
170     INK j DIV 2 *2 , (j+1)DIV 2 *2 , 3
180     FOR i=-1 TO 8
190       FILL 1 : v=(i+8*f) *PI/28
200       y=SIN(v) + SIN(i*PI/4) /3 : r=(5-y)/7
210       x=COS(v)/(1+(2+y)/4) *22 +73.7 : h=j*r/3
220       CIRCLE x+h , 6+12.5*i+9*y+h , r*(8-j)
230       NEXT i : NEXT j : NEXT f
240 CALL a,s : CALL a,s+9216 : POKE_W a+18,8409 : CLS
250 f=0 : REPeat l :PAUSE 1.5: f=(f+1) MOD 8 : CALL a,s+1152*f


tcat
Super Gold Card
Posts: 633
Joined: Fri Jan 18, 2013 5:27 pm
Location: Prague, Czech Republic

Re: What makes the OS for QL any better, different, unique ?

Post by tcat »

Hi bwinkel,
I threw out some initialization commands but the cooperative entry point is GetNextEvent
Just to complement your nice example of `Globe' spinning in cooperative environment [video posted earlier].

I coded simple app tracking most if not all `System7' events. Sharing code and binary here [packed w/ Stuff-it]. No Gestalt checks for `MultiFinder', will not run OS6.
https://github.com/tcat-qldom/MacOS-7

If no user interaction, app receives `nullEvent' [null events], that my be used e.g. for some animation or other tasks [if not driven by timer interrupt]. `kSleep' tells how much nullEvt's we get to the app.

Code: Select all

{See "{PInterfaces.p}"Events.p}
PROCEDURE EventLoop;
VAR event: EventRecord;
BEGIN
	REPEAT
		IF WaitNextEvent(everyEvent, event, kSleep, NIL) THEN
			DoEvent(event)
		ELSE EventStr('nullEvent')
		(*ELSE IF event.what = nullEvent THEN..*)
	UNTIL gDone
END; {EventLoop}
Sometimes it is needed to relinquish some cycles to the `System', in the App I have a simple sound alert, called when something goes wrong. Giving up cycles to get audible sound. Cannot find a better solution.

Code: Select all

PROCEDURE AlertUser;
VAR i: Integer;
BEGIN
	SysBeep(10); {system cycles to get sound}
	FOR i:=1 TO 20 DO SystemTask;
	ExitToShell
END; {AlertUser}
Note, git does not seem to recognise Mac files, need to show them raw.

Tom
Last edited by tcat on Thu Aug 20, 2020 8:01 am, edited 1 time in total.


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

Re: What makes the OS for QL any better, different, unique ?

Post by bwinkel67 »

Oh Pascal, that's cool, I haven't used that language since the late 80's (btw, the first part of the sentence was a reference to the textbook I learned Pascal on).

So I just did the part 3 video https://www.youtube.com/watch?v=Ho2M9KoDmYA comparing the QL to an Amiga of mid 80's (I try not to leave the 80's when doing such comparisons). Never played much with an Amiga but I have to say there were more things I liked than I disliked. Some of it has to do with not knowing the commands that well. For instance, the QL and Unix/Linux allow you to spawn a task in the background via exec and &, respectively. Well, the QL lets you spawn a task and get back the console and Unix/Linux literally will throw it in the background and it gets pause if there is input for it to wait. Haven't figured out how to do that within a CLI shell on an Amiga in Workbench 1.3 (again, not going modern here so it may be different in how the Amiga OS does it now).

This week, in part 4, is the fun part, as I'm going to try and break each one's kernel to see how well they hold up. Nothing fancy and not anything in assembly since you can likely break any micro kernel that way :-/


tcat
Super Gold Card
Posts: 633
Joined: Fri Jan 18, 2013 5:27 pm
Location: Prague, Czech Republic

Re: What makes the OS for QL any better, different, unique ?

Post by tcat »

Hi,

Yes, the language of the 80's. The whole Mac ROM is coded in Pascal [1MB roms, older 512K], some portions in Assembly.

Mac resources, are mapped to memory, can be moved around in memory, or purged out.
They contain executables or just data, all relative address code.

This resembles QL unique concepts of `Things' and `QPAC', deserves some attention, I have not grasped fully yet.

Looking forward your video sequel #4 :-)

Re process spawning, there is also process forking, I never really mastered. But has no equivalence to QL, probably.

Tomas


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

Re: What makes the OS for QL any better, different, unique ?

Post by bwinkel67 »

tcat wrote:Hi,
Looking forward your video sequel #4 :-)

Tomas
So the results are in. I tested the 1984/85 QL vs the 1985/88 Amiga on both an infinite loop test and a memory leak test and in both cases the QL won hands down. The Amiga crashed to Guru on the memory leak. I think Linus Torvalds was proved to be right:
  • Linux kernel developer Linus Torvalds once described the Amiga design as cooperative,[4] even though it uses a preemptive scheduling policy. The reason for that, he argued, was because the lack of [memory] protection between tasks, meant a task could hinder the system from operating preemptively. As tasks would need to choose not to stop the preemptive mechanism this would reduce to a kind of inverted cooperative system. This kind of conflation between protection and scheduler policy is nonstandard.
The Amiga OS indeed degrades to an inverted cooperative system with a misbehaving task (i.e. it's at the mercy of its' processes). I was really shocked how badly it handled a simple infinite loop app whereas the QL didn't even notice it. I used Aztec C which ran its code remarkably fast.

YouTube video of the battle will be up Saturday. It might hit the 40 minute mark depending on editing...could not get it down to my preferred 35 minutes :-/


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

Re: What makes the OS for QL any better, different, unique ?

Post by Derek_Stewart »

Hi,

I had an Amiga A500 board, keyboard and floppy drive. No case, as I was vert poor in those days...

I used use the Amiga CLI to run programmes using the RUN command, each process needed a ned CLI, I am sure there must be a way to run processes in the background, like Linux uses to return control to the CLI.

Any ways, got fed of the Aimga OS, SMSQ/E was developing nicely, Linux over took most all that Amiga OS could do.


Regards,

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

Re: What makes the OS for QL any better, different, unique ?

Post by bwinkel67 »

Derek_Stewart wrote:Hi,

I had an Amiga A500 board, keyboard and floppy drive. No case, as I was vert poor in those days...

I used use the Amiga CLI to run programmes using the RUN command, each process needed a ned CLI, I am sure there must be a way to run processes in the background, like Linux uses to return control to the CLI.

Any ways, got fed of the Aimga OS, SMSQ/E was developing nicely, Linux over took most all that Amiga OS could do.
Seems that the AmigaOS RUN command is like the QDOS EXEC and lets you detach a program from the shell. Still doesn't seem to be a way to kill a pram that's running in the background (you can Ctrl-C one that is taken control of the shell but it doesn't seem to always work).

Me personally, I'd love to get an Amiga 600...they have a nice form factor. But the kernel is not so great on the Amiga.


User avatar
tofro
Font of All Knowledge
Posts: 2685
Joined: Sun Feb 13, 2011 10:53 pm
Location: SW Germany

Re: What makes the OS for QL any better, different, unique ?

Post by tofro »

bwinkel67 wrote:
Derek_Stewart wrote: Me personally, I'd love to get an Amiga 600...they have a nice form factor. But the kernel is not so great on the Amiga.
Well, the hardware is a tad bit more elaborate :)


ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
User avatar
bwinkel67
QL Wafer Drive
Posts: 1187
Joined: Thu Oct 03, 2019 2:09 am

Re: What makes the OS for QL any better, different, unique ?

Post by bwinkel67 »

tofro wrote:
bwinkel67 wrote:
Derek_Stewart wrote: Me personally, I'd love to get an Amiga 600...they have a nice form factor. But the kernel is not so great on the Amiga.
Well, the hardware is a tad bit more elaborate :)

Sure but I'm not speaking about the entire OS, just the Exec kernel which has some flaws. The OS as a whole does a very nice job with its windowing system and is pretty neat for a mid-to-late 1980's machine. Still haven't figured out how to kill a job though and I've read it's not easy. I ran some experiments and crashed the Amiga kernel by taking up all available heap space (kind of expected as that's that Linus had claimed) and brought the machine to its knees with a simple infinite while loop (which was very surprising). Did the same (similar setup and same test programs) under JS ROM QDOS and it behaved itself so chalk one up for the QL :-)


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

Re: What makes the OS for QL any better, different, unique ?

Post by Derek_Stewart »

Hi,
bwinkel67 wrote:Me personally, I'd love to get an Amiga 600...they have a nice form factor
The problem with the Amiga A600 and the A1200, is that Commodore, put cheap SMD capacitor on the board, so now 15 years laters,they leak and damage the board. I have 2 A600s, that require new SMD Capacitor change, I do not seem to have enough spare time to do this, maybe later next year.

I had a A1200 that gave a black screen, on power up, but after a few weeks in a non-powered state, that board powered up to the Kick Start screen, clearly a capacitor issue, so that went on ebay and sold for a ridiculous amount, to someone in Australia.
bwinkel67 wrote: Did the same (similar setup and same test programs) under JS ROM QDOS and it behaved itself so chalk one up for the QL :-)

Not to bad and JS ROMs have some bugs in and are slow on the graphics, try the comparison with Minerva.


Regards,

Derek
Post Reply