Colour Cast
Pages: 1 2
Rob Ward (9450) 42 posts |
Hi Folks, Edit: New Readers, please just skip to the end, and check out the latest. Much has turned out to be repetitive, I don’t want exhaust your curiosity or enthusiasm to contribute by having to grind you way all though it. Come back and browse for more clues if you need to. Cheers and many thanks, Rob I have a problem with a colour cast (bluish) on a RISCPC RISCOS4.02 (I have 2Mb of VRAM, 128MbRAM and a StrongARM), when I set a Screen using Configure and also when I return from F12. Any suggestions how to solve/debug this would be welcome. |
Jean-Michel BRUCK (3009) 362 posts |
Hi Good luck |
Rob Ward (9450) 42 posts |
Ok I will look into that, Thanks Jean-Michelle. Rob |
Rick Murray (539) 13850 posts |
More likely setting the palette upon a MODE change, which will correspond with startup and returning from the command line. I can’t bake a cake right now (risk of thunderstorms and cake baking is slow), so… let’s have some fun picking this apart. What happens when you press F12 (nerdy stuff, if you’re not particularly interested, feel free to skip to the next section) Pressing F12 for the command line is handled by Switcher (task manager). This, very simply, looks for an F12 keypress, and if found, will call the ShellCLI command using Wimp_StartTask. Wimp_StartTask (in Wimp07) is quite complicated. It will shuffle the parent task out of the way, and allocate memory and a task handle for the child task, assuming it’s a single tasking task (they all are, until Wimp_Init is called). It will then call Wimp_CommandWindow to pop up a text window on the screen if there’s any text output. ShellCLI, interestingly, does a Wimp_Initialise. This may be in order to be able to take over the screen without the Wimp interfering. It then switches to VDU4 (text cursor) mode, resets all the text cursor stuff, sets the text colours, moves to the bottom of the screen, turns off the pointer, and then prints the familiar message. It also sets up an exit handler to return to it (rather than the Wimp) for when something run calls OS_Exit. Exiting back to the Wimp will notice the CommandWindow state, and force a mode change to the current Wimp mode. Then the logical colours will be set up unless the mode is 2/4/16 colours in which case the actual palette will be set up to match. What Display Manager does The Display Manager works out what to do to describe the current mode (most likely a mode specifier like “X1024 Y600 C16M F60”, and then calls So… hmm… what’s the difference here? An idea Just a little bit of cargo cult madness to rule out glitching… if you have a bad set of colours, does turning the monitor off and back on again make any difference? Likewise, does anything change if you do that when you have a good set of colours? What about, if you come back from F12 with bad colours, if you go into F12 and come back out again? Another idea
Yes. That is necessary in order to set up the proper screen resolution. Without that, you’ll get whatever the system configuration specified, but the system configuration only understands the old style numbered modes. That’s why the WimpMode command at start up, to drag us kicking and screaming into the 21st century. Though, it’s worth noting, that *WimpMode is exactly the same command as is used by Display Manager. Hmm… might be worth looking at that file and at what Display Manager would set (iconbar menu → Mode) to see what the “F” value is. Perhaps, initially, the wrong timing is set which the Wimp remembers, and Display Manager fixes it by choosing a more applicable timing? |
Andrew Conroy (370) 740 posts |
Take a glance at the original thread , the colour change etc. is reportedly still there after a shift-boot, suggesting it’s not something inside !Boot causing the issue. |
Rick Murray (539) 13850 posts |
In that case it will have chosen some sort of default mode. I’m really a bit stuck on the simple issue of return-from-F12 messing things up but Display Manager fixing them, given its pretty much the same thing that’s being done in each case. The only difference is that in the F12 case, the Wimp is setting a cached mode (what it remembers as the current Desktop mode) whereas Display Manager is setting a specific mode. As I said at the end, I wonder if it’s a subtle difference in timing or something? Like 60Hz vs 75Hz? But, then, pressing F12 again ought to remember the newly set mode, so….? |
Stuart Swales (8827) 1357 posts |
But surely if not booting, all the Window Manager has to go on is the Configured WimpMode – just a number – whereas the OP gets rid of the colour cast by using the Display Manager and setting a different, non-numbered, mode (probably not even available as a numbered mode?) |
Jean-Michel BRUCK (3009) 362 posts |
Hi all To test, try typing 31 in the MODE text field and if no change put the mode “auto” in the configuration. |
Rob Ward (9450) 42 posts |
Hi Folks, @Rick Murray: Once the colour shift has been caused only Display/Mode can fix it. Not even Configure/Screen, which also breaks it and causes the colour shift. I went through all the VRAM and NoVRAM files to put in the Chimei definitions manually (in RO4 etc). I am sure the Configure/Windows also caused the colour cast too, but now it doesn’t. (Edit: Double checked and Con/Win does cause the colour cast if an alteration to the settings is confirmed.) The CMOS is holding settings and clock is losing a little time, but otherwise the battery seems ok. When I boot from a power off state I still have that really awful black boot up screen, but again Display/Mode comes to the rescue. When I Delete/Boot the CDROM disappears, and the Clock mode definition is lost, so it is not totally the same as power boot up where the CMOS settings are retained. Thank you for your interest in this frustrating problem. |
Mike Freestone (2564) 131 posts |
If you leave the computer alone but instead unplug/replug the monitor cable does that change the picture? or turn the power off/on for the monitor? might help! |
Rick Murray (539) 13850 posts |
We’ll need to see if Charles notices this, of he has any input regarding screen handling on RISC OS 4… …however, while the mode changing behaviour is a bit convoluted, the basic method of dealing with mode changes, either by a return from a single tasking app or using Display Manager, looks to be largely the same. Indeed, Display Manager calls the WimpMode command to get the Wimp itself to do the change. |
Rob Ward (9450) 42 posts |
Hi Folks @ Rick: I can’t help but feel I have introduced some extra file or maybe “damaged” a file in the boot structure somewhere in initial experiments to get any image on the monitor at all. I have tried to be scrupulous to return all experiments to original, but the experiments may have rewritten other files that I am unaware of. Plus the Chimei monitor maybe super sensitive and reacting in some way other monitors don’t. My wife and I are off for a break and will be back in a few weeks. I will be still reading this thread for any comments but will be away from my machine to try any suggestions. I will be happy to try a complete RISCOS 4.02 install when I return. I also have RiscOS 5.02 ROMs waiting in the wings as well. Now I have a workable Chimei MDF of a sorts working (99% confident it is usable), I maybe able to get a working monitor up quickly without causing other problems. I truly appreciate everyone’s effort to help solve this. I had no idea I had such a puzzle on my hands. |
Andrew Conroy (370) 740 posts |
A couple of weeks ago it was suggested that you install a completely clean !Boot to avoid problems with incorrect files at boot. Did you do this? |
Rob Ward (9450) 42 posts |
Hi Andrew, I would be happy to leave it if I can, and not solve it myself right now. I too have other unknowns I want to work on. I was hoping this problem was not just a good example of the fragility of the RO4 BOOT structure in general and still hope it can be debugged and not just reformatted away. Thank you though, I can’t keep expecting others to to debug my own machine from afar. I am in great debt to all who have helped with progress thus far. Cheers, Rob |
David J. Ruck (33) 1636 posts |
128MB of SDRAM and a StrongARM card could be causing a timing issue on the Risc PC if the C32 capacitor has not been removed. I would not have expected the colour cast to be a symptom of this, things crashing or hanging would be more likely. However it is something to consider. |
Andrew Conroy (370) 740 posts |
I’ve never seen this as a symptom of timing problems before, have you?
Ahh, the fabled C32 removal, claimed to be the cure of all evils! |
David J. Ruck (33) 1636 posts |
I only mention it as where I worked a long time ago had lots of Risc PC’s and parts were always being swapped in and from those in the field. One had somehow gained some out of spec PC RAM, and seemed to work correctly except for weirdness on the screen. So VIDC can get unhappy about memory timing, and large (for its day) multi chip memory modules can also upset an unmodified Risc PC – 2+2 may well be 5 in this case, but if Rob has some 32MB or smaller DIMMs he could try, that would eliminate it as an possibility. |
Rob Ward (9450) 42 posts |
That will be really worth a try. I have kept my original ARM CPU, RISCPC RAM, and my 1MB Video. So I can return it pretty much to original condition. The hard drive is about 22Gb. So plenty of room for trying out new !Boots as well. The two new SIMs I bought recently are a pair of matched 64Mb boards (ie same manufacture, from the one seller, so should be the same batch?). I previously had a single 128Mb SIM I bought C:2010, but the evil battery juices messed up the tinned connector. I had no complaints about it until I bought RO5 ROMs recently and anticipated a quiet nostalgic trip down Acorn Lane for a few quiet ones at the local Penrith ARMs Hotel. No such luck, though still optimistic.✔️ But I will be away in Northern NSW for the next two weeks so unable to test your very welcome suggestions to try out. I will be reporting back ASAP. Many thanks again for suggesting this new avenue of exploration. Other hints/comments still accepted too. I would love to know why Display/Mode corrects it 🤔 |
Rob Ward (9450) 42 posts |
Thank you for your patience to all those who might be interested in this problem I have with the RISCPC. To recap: I have tried the suggestion of using original hardware to eliminate the possibility of Strong Arm, plus 128Mb RAM may have been the cause of the colour cast. The original problem was the bluish tinge colour cast being triggered after an F12 session, or configuring the Screen monitor. In each case the colour cast can be removed by using the Display/Mode app at the right on the Icon Bar. I have found it useful to use Paint to create a 1024×768 sprite in 256 colours the palette of colours is on the screen. The colour cast is shown by the greys in the window bars becoming tinged with blue and the whole screen lightens generally. The photo is pretty accurate. Following hardware suggestions above I tried the following: I replaced the StrongARM with the original ARM CPU and the problem still occurred ( with 128MbRAM). I replaced the 128Mb of RAM (2×64Mb) with one stick of original Acorn 8Mb RAM and the same result. Pressing F12, and returning, caused the colour cast, Display/Mode fixed it. I also noticed that with the 256 colour sprite opened and its palette on display that when I pressed F12, and returned, the colour cast with lighter colours and a bluish tinge occured, but otherwise superficially the palette looked properly distributed (though obviously incorrect). If I pressed F12 a second time, and returned, then colour 248 in the sprites palette had gone a bright yellow. Here is an image of the situation. http://www.laketyersbeach.net.au/RISCPC/T3_1.jpg If I used Display/Mode I can correct/reset the cast out, and it would then take two consecutive F12 sessions to turn colour 248 into yellow again. So there is something cumulative happening. I had also taken the precaution to re-install RISCOS 2.04 over again to get as clean a starting point as possible. The installation went smoothly and booted OK though power on booting results with the screen looking like this: http://www.laketyersbeach.net.au/RISCPC/RISCPC_01.jpg Using Display/Mode fixes it. this is not good. Using the Reset button to reboot, or gui Restart, the almost normal screen eventuates, but with the colour cast. The clock and CMOS settings are running OK. Cheers, Rob |
Rob Ward (9450) 42 posts |
Hi Folks, |
Stuart Painting (5389) 714 posts |
It’s relatively easy to write one for yourself. Just call OS_Byte 161 for each of the first 240 bytes of CMOS RAM. If that sounds like too much work, save the current CMOS settings via FWIW, I have been tinkering with a (single-tasking) program that reads the contents of a saved CMOS file and attempts to decode the contents: output is to a plain text file, not the screen. I’ve also been wasting my time constructing a StrongHelp manual with as much detail as I can find on the usage of individual CMOS RAM bytes – the aim was to augment the wiki page rather than replace it. Distinctly unofficial and E&OE of course, but I could email either (or both) if you are interested. |
David J. Ruck (33) 1636 posts |
I don’t think you are going to get any further until you can work out which piece of equipment is at fault. Does the Risc PC exhibit this issue with a different monitor, and does monitor does exhibit this issue with a different computer – such as a Raspberry Pi running RISC OS with the same monitor definition file. |
Rob Ward (9450) 42 posts |
Thank you Stuart, I will explore the *SaveCMOS option first. I guess I can run it at different time in the boot to monitor changes. If I find changes I can’t explain I will contact you. |
David J. Ruck (33) 1636 posts |
If you have to use a different MDF with the 4:3 monitor, it the problem many not show up anyway. It really needs to be a like for like swap, and with an MDF which works on both. |
Rob Ward (9450) 42 posts |
Hi David, Many thanks David for your interest in this ongoing problem. If the display after Display/Mode refresh did not look perfect I would have given up ages ago. The hardware appears to be able to do it, just not when booting (really bad) or after F12 (colour casting) etc Cheers, Rob |
Pages: 1 2