LisaList2

Advanced search  

News:

2022.06.03 added links to LisaList1 and LisaFAQ to the General Category

Pages: [1]   Go Down

Author Topic: How does the Lisa determine the delay until dimming the screen?  (Read 1416 times)

andrew

  • Sr. Member
  • ****
  • Karma: +20/-0
  • Offline Offline
  • Posts: 86
  • :)
    • LisaGUI
How does the Lisa determine the delay until dimming the screen?
« on: September 16, 2025, 11:24:37 am »

In the conveniences pane, each option is a range between a number of minutes and twice that number (1-2, 2-4, 5-10, etc). So how does LOS determine the exact delay times within those ranges? I've done a little digging but I can't seem to find an explanation as to how this works, just that there's an "approximate" time. Does anyone here know?
Logged
:)

AlexTheCat123

  • Sr. Member
  • ****
  • Karma: +108/-1
  • Offline Offline
  • Posts: 378
Re: How does the Lisa determine the delay until dimming the screen?
« Reply #1 on: September 16, 2025, 11:56:11 am »

It looks to me as if it's always the lowest time in the specified range, although I only did some preliminary digging, so maybe there are exceptions to this that I'm missing.

Basically, the Preferences Window writes a number to PRAM from 1-6 representing the fade delay, which then gets converted to the appropriate value in minutes by the FadeConvert function in LIBPM/PMM.TEXT. After calling FadeConvert, PMM.TEXT then multiplies the minute value by 60000 to get the appropriate fade delay in milliseconds, which then gets passed into SetFadeDelay in LIBHW/MACHINE.TEXT, which handles the actual checking for user activity and fading of the screen.

And we can see in FadeConvert that the fade delay is always set to the lowest value in each range; the 1-2 minute range gets 1 minute, the 2-4 minute range gets 2 minutes, the 5-10 minute range gets 5 minutes, and so on. Not sure why they specified a range to begin with, unless they were trying to make the logic for determining when to fade the screen look more sophisticated than it actually was or something.
Logged

andrew

  • Sr. Member
  • ****
  • Karma: +20/-0
  • Offline Offline
  • Posts: 86
  • :)
    • LisaGUI
Re: How does the Lisa determine the delay until dimming the screen?
« Reply #2 on: September 16, 2025, 12:19:52 pm »

Yeah, exactly; I was poking around those same parts of the source and couldn't find any logic that determined how the value was varied within the range. So at least it's not just me.

I was trying to figure out if there was something notable there worth replicating for LisaGUI, or if I should pick a random value within the ranges, or just add the non-functional doubled value on the checkbox label for the hell of it. I might do a random value just to keep things interesting.
Logged
:)

AlexTheCat123

  • Sr. Member
  • ****
  • Karma: +108/-1
  • Offline Offline
  • Posts: 378
Re: How does the Lisa determine the delay until dimming the screen?
« Reply #3 on: September 16, 2025, 01:07:07 pm »

Nope, definitely not just you! I'd say have LisaGUI pick a random value within the range; that certainly makes things more fun!
Logged

patrick

  • Sr. Member
  • ****
  • Karma: +92/-0
  • Offline Offline
  • Posts: 114
    • Patrick's Hardware Page
Re: How does the Lisa determine the delay until dimming the screen?
« Reply #4 on: September 16, 2025, 04:07:48 pm »

Is the timeout generated by a hardware timer or does it depend on the interrupt load? A software delay would be longer when the system is busy with background activity.
Logged

AlexTheCat123

  • Sr. Member
  • ****
  • Karma: +108/-1
  • Offline Offline
  • Posts: 378
Re: How does the Lisa determine the delay until dimming the screen?
« Reply #5 on: September 16, 2025, 05:58:53 pm »

It looks like it's generated by a hardware timer from the AlarmRelative routine, so it should be pretty independent of background activity.
Logged

stepleton

  • Hero Member
  • *****
  • Karma: +159/-1
  • Offline Offline
  • Posts: 520
Re: How does the Lisa determine the delay until dimming the screen?
« Reply #6 on: September 17, 2025, 03:45:52 am »

(wild guess) This may have been a user experience concession, a way to reassure the user that it was fine not to be precise here.

I'm not old enough to know for myself, but my impression is that at the time, lots of material that introduced computing would emphasise precision. You might have been advised to double-check your inputs for correctness, with aphorisms like "garbage in, garbage out" encouraging you to maintain a cautious attitude.

I can therefore easily imagine a computer neophyte being worried to get the screen-saver timeout exactly right. After all, the health of the picture tube inside of an extremely modern, very expensive computer is at stake!

The number range might be a way to imply "relax, it's OK just to choose for what you prefer."
« Last Edit: September 17, 2025, 03:49:03 am by stepleton »
Logged
Pages: [1]   Go Up