Page 1 of 1
Exploring screen saver functionality
Posted: Thu Oct 10, 2024 3:04 am
by dominicgarcia
I started thinking about screensavers, and then wondered if Vera could toggle the monitor on/off by setting a register perhaps? It would also be very cool if a screen saver routing could be loaded from a memory bank if there were no input signals detected from the kernal after so many minutes...
Re: Exploring screen saver functionality
Posted: Thu Oct 10, 2024 3:39 am
by ahenry3068
dominicgarcia wrote: ↑Thu Oct 10, 2024 3:04 am
I started thinking about screensavers, and then wondered if Vera could toggle the monitor on/off by setting a register perhaps? It would also be very cool if a screen saver routing could be loaded from a memory bank if there were no input signals detected from the kernal after so many minutes...
Vera can turn it's layer's on & off. It's actually pretty simple. You could create a memory resident program that hooked the interrupt Vector. You could peek Keyboard Input but detecting Mouse Activity without clearing the activity would be a little harder but is probably doable. The only problem with such a program would be it would rob processor cycles more noticeably than on a faster platform.
Re: Exploring screen saver functionality
Posted: Thu Oct 10, 2024 4:27 am
by DragWx
If you set VERA Output Mode ($9F29) to 0 (video disabled), I'd wager that a VGA monitor will enter power-saving mode. If I'm reading the VERA's verilog correctly (in top.v), "video disabled" mode still uses the VGA mode vblank pulses for IRQs, even though there's nothing output on the connector, so vblank IRQs should still work.
You probably don't want to do that in composite or RGB mode, so just blanking the screen yourself (disable the layers and set the background color to black) would be what you do there.
If you want to show a screen saver animation, you could probably just turn off the layers, then show some sprites on the screen moving around.
The catch-all thing many SNES games do is that they just dim the screen by darkening the palette, usually when you pause. I know at least one game, Blackthorne, that actually has a screensaver animation when you leave the game alone for long enough.
Re: Exploring screen saver functionality
Posted: Sat Oct 26, 2024 3:49 am
by mortarm
Unless your using a CRT, screensavers are unnecessary. If you just want to blank the screen, it'd be easier to do so from the monitor itself.
Re: Exploring screen saver functionality
Posted: Sat Oct 26, 2024 4:03 am
by ahenry3068
mortarm wrote: ↑Sat Oct 26, 2024 3:49 am
Unless your using a CRT, screensavers are unnecessary. If you just want to blank the screen, it'd be easier to do so from the monitor itself.
You may still want to do it on an unattended basis. I recently added that capability to Volume Control (My Audio Book Manager). My logic for doing it there was that I actually use Audio books as a go to sleep tool once in awhile. Why leave the monitor lit when your just listening. Now I did just disable the layers to blank the screen, I was actually concerned that Disable Video Output would mess with the VBlank IRQ. After reading this thread I may change that to actually doing a Video disable rather than just blanking the layers.
Re: Exploring screen saver functionality
Posted: Sat Oct 26, 2024 7:19 am
by TomXP411
Just to make things interesting.... LCDs work in reverse of CRT monitors.
That is, when an LCD cell is energized, it is black. So a a proper screen saver on an LCD panel would be an all-white screen.
However, as others have suggested, the correct way to put the monitor into power save mode is to turn off the VGA signal. The monitor should detect this and (eventually) enter power save mode. Some monitors will turn blue first, but every VGA LCD I've used will eventually enter power save mode after the VGA signal is lost.
Re: Exploring screen saver functionality
Posted: Sat Oct 26, 2024 6:27 pm
by DragWx
I just played around for a bit, and here's what I found.
I'm currently using my TV with my X16, and my TV will enter power saving mode (with a message first) anytime there's no signal on the VGA port, regardless of whether a cable is physically connected.
Since I also use my TV for audio (3.5mm audio jack), I lose audio when this happens, so just FYI to keep video power saving configurable and not hardcoded if you're writing an audio-only program. Users who plug in separate speakers won't have this issue.
While video output is disabled, I can still type and execute BASIC commands, including FMPLAY, so vblank IRQs must still be working. Remember, the VERA has two slightly different vblank timings depending on whether you're on VGA or composite/RGB mode, and "video off" mode uses the VGA timings even though nothing is output on the VGA port.
And now for a point of interest: VGA monitors have the
VESA Display Power Management Signaling (or DPMS) specification. It interestingly specifies 3 levels of sleep, with "off" being when both hsync and vsync are missing, which is what happens when you turn the VERA's video output off.
The article also mentions a competing standard, where a monitor detects when the video signal is valid but just a black screen for too long.
Re: Exploring screen saver functionality
Posted: Thu Oct 31, 2024 2:03 am
by ahenry3068
DragWx wrote: ↑Sat Oct 26, 2024 6:27 pm
I just played around for a bit, and here's what I found.
I'm currently using my TV with my X16, and my TV will enter power saving mode (with a message first) anytime there's no signal on the VGA port, regardless of whether a cable is physically connected.
Since I also use my TV for audio (3.5mm audio jack), I lose audio when this happens, so just FYI to keep video power saving configurable and not hardcoded if you're writing an audio-only program. Users who plug in separate speakers won't have this issue.
While video output is disabled, I can still type and execute BASIC commands, including FMPLAY, so vblank IRQs must still be working. Remember, the VERA has two slightly different vblank timings depending on whether you're on VGA or composite/RGB mode, and "video off" mode uses the VGA timings even though nothing is output on the VGA port.
And now for a point of interest: VGA monitors have the
VESA Display Power Management Signaling (or DPMS) specification. It interestingly specifies 3 levels of sleep, with "off" being when both hsync and vsync are missing, which is what happens when you turn the VERA's video output off.
The article also mentions a competing standard, where a monitor detects when the video signal is valid but just a black screen for too long.
Pretty much what I found. One interesting side effect on the Emulator if the 'VGA Signal' is turned off on the Emulator the screen will be blue, regardless of color settings or whatever was on the screen previously. Obviously on actual Hardware this is not the case.