Display resolution on Pi
Pages: 1 2
Chris Hall (132) 3554 posts |
A utility !ScrHelp is now available (for links see below) for the Raspberry Pi that shows RISC OS display resolution, GPU resolution (i.e. what the Raspberry Pi is actually sending to the monitor, as determined by the GPU from EDID data or as over-ruled by settings in config.txt) and Monitor capabilities (from its EDID data) as well as Pi board revision, firmware date and RISC OS version and date. Some information requires more recent firmware than RC14 and a RISC OS ROM after 25 Mar 2016 (i.e. with BCMSupport version 0.03 or later). Screenshot of it running on a Raspberry Pi model 3 using RC14 plus update 4 (image below is of version 0.10 13-Sep-2016): Download from !Store or from here |
Martin Avison (27) 1494 posts |
Running v0.06 on my Pi it shows screen with no GPU or Monitor informtion! [how do I persuade textile to embed the image?] |
Chris Hall (132) 3554 posts |
‘EDID data not requested’ means that the call SYS “XBCMSupport_SendTempPropertyBuffer” is returning an error meaning that it is either not a Raspberry Pi or it is a Raspberry Pi with firmware earlier than 25 Mar 2016. Suggest you apply update4 from here (described in Archive 24:1 page 23 and here). This updates firmware to the end of March 2016 and the ROM to 2 Apr 2016 – a low vector build with dynamic clocking that will run on Pi 1, 2, 3 and Zero. Note the Pi model 1 does not support dynamic clocking but the update will still run correctly. Also note that changing RISC OS versions needs care – power off after updating the ROM in case you have any ROM modules unplugged as their numbering can change between versions. how do I persuade textile to embed the image? Use !URL-for-image! |
Martin Avison (27) 1494 posts |
Thought it might be something like that. Perhaps that info could/should be included in the ReadMe or !Help? The displayed message ‘This is for the rapsberry Pi’ is little help! I will update when I get some time. |
Chris Hall (132) 3554 posts |
Perhaps that info could/should be included in the ReadMe or !Help? !Help file updated in version 0.07, many thanks. Another bug (interlaced modes) corrected in version 0.08. I may get confident enough to bump the revision to 1.00 if I can work out why BASIC occasionally crashes after repeatedly clicking to update the status window or if I omit the add sp,sp,servicesize and sub sp,sp,servicesize instructions (with servicesize set to 44 (when it actually should be zero))… |
Jon Abbott (1421) 2651 posts |
Interestingly this reports the Pitop screen as 59Hz, but I’m seeing 60Hz from GraphicsV. Whilst there I had a quick look at your issues:
The assembler is returning an error, if you want to suppress it, clear V in FT90 instead of setting it – or handle it in BASIC if you want to report it. Or…find which SWI is returning an error and fix the underlying issue. I’ve noticed the Firmware version also toggles between the date and nothing, so there’s possibly an issue in the firmware detection. I’m also seeing Page Zero accesses, although I’ve not looked to see if its BASIC or the assembler – it’s more that likely in the BASIC code.
Your Create services code is using the stack, either leave the stack inc/dec on entry/exit, or remove them and use a memory block instead of the stack. EDIT: It reports 59Hz regardless, so I presume that’s the native Hz of the screen from EDID. Not sure why the Pi Firmware decides to use 60Hz instead – unless it doesn’t support 59Hz and instead picks the closest. The Page Zero access is within BASIC when the assembler returns a Null reference error pointer. |
Chris Evans (457) 1614 posts |
Re 59Hz / 60 Hz We have frequently seen monitors that report receiving a different refresh rate to which the computer says it is outputting, normally only by 1MHz but occasionally more. I think we’ve seen it on almost all computers: PC’s, A5000, RiscPC, Iyonix, Pi … |
Rick Murray (539) 13840 posts |
I’m not sure you could tell for certain without using an oscilloscope or signal analyser. You see, there are several possibilities here. For the EDID block – just out of interest – how do you determine the native size of the display? Is it the highest resolution presented? Is this always reliable? I recall some FullHD panels (and 4K panels these days) were/are capable of displaying the signal presented, but had a smaller pixel matrix than the resolution size… |
Steve Pampling (1551) 8170 posts |
That’s just an expansion of point 3. Basically you’re talking about an OS designed to be used by the clueless masses along with a software set where they take the feedback from the IQ <= shoesize part of the user base. If anyone wants an example – take a tab separated table of data in text form and paste it into a version of Excel from the early 2000’s, now do the same with a version from the Win 7 era onward. 1 because a space is a delimeter (even vbscript knows that) 2 Some might suggest that the two are frequently synonymous. |
Rick Murray (539) 13840 posts |
Wait…waitwaitwait… you’re telling me that latter-day Excel cannot sensibly import TSV data? As for management, remember The Peter Principle. |
Chris Mahoney (1684) 2165 posts |
That’s… huh. If you copy from Excel (2010) then the results will be tab-separated! |
Clive Semmens (2335) 3276 posts |
Is that true? Is there no option to choose the separator for input? I don’t use Excel (or any part of Migrainesoft Office). LibreOffice allows a comprehensive choice. The only drawback to using LibreOffice (in my experience) is that while it can export files in Migrainesoft formats, there are often niggly little incompatibilities, and you don’t know about them until the recipient complains or you see their output. Page breaks can shift, and any headers and footers with the slightest complications may go awry. |
Steve Pampling (1551) 8170 posts |
At regular intervals these days the others in the office know I’m using Excel because I swear somewhat.
Erm, bugger all? But it’s what’s installed on the standard build
I did say feedback from presumed morons, but as Rick said, Peter principle.
Oh, if you’re importing from a file, yes. Copy paste, no (or hidden so well it takes major work to find it) |
Steve Fryatt (216) 2105 posts |
I don’t think that’s true. If you wish to transfer tabulated data into Excel via the clipboard, the format that you use is TSV text1. That’s Windows 7 and recent versions of Excel. 1 I know this because I’ve recently written software that needs to generate tabulated data and dump it on the clipboard for Excel to load, and I know what format I created it in. |
Steve Pampling (1551) 8170 posts |
Belief is neither here nor there. Simple observed behaviour change in two places.
Apart from the increased swearing and me using the work around my behaviour hasn’t changed. I haven’t got round to doing a script to grab the data and populate a table |
Steve Fryatt (216) 2105 posts |
I don’t think that’s true. “I know this because I’ve recently written software that needs to generate tabulated data and dump it on the clipboard for Excel to load, and I know what format I created it in.” |
Rick Murray (539) 13840 posts |
;-) Are you allowed to alter the configuration? It might be worth looking in “compatibility settings” buried sixteen dialogues deep to see if there is an option such as “TSV import – treat spaces as tabs”. |
Clive Semmens (2335) 3276 posts |
LibreOffice pops up a box inviting you to make choices when you paste from the clipboard. Means one whole extra click every time! Remembers your last choices. Maybe you can turn off the pop up box, I’ve never investigated. |
Chris Hall (132) 3554 posts |
The frame rate could actually be working out to be something like 59.999Hz, and the monitor is saying 59 instead of 60. I am working out the frame rate by taking the pixel clock and dividing it by (horiz active + horiz blanking)*(vert active + vert blanking) and then using INT(x). Hence 59.999 will show as 59. I can easily correct this to add 0,5 before INT(x). Edit: corrected in version 0.10 which now shows much more information. |
Chris Mahoney (1684) 2165 posts |
Is there a “ceiling” function in BASIC? I’m just thinking that it’ll make the code make more sense when you revisit it in a year’s time :) |
Clive Semmens (2335) 3276 posts |
Not unless it’s been added in recent years.
This is such a common exercise that it really doesn’t cause problems when reading old code. |
Chris Hall (132) 3554 posts |
The assembler is returning an error, if you want to suppress it, clear V in FT90 instead of setting it – or handle it in BASIC if you want to report it. Or…find which SWI is returning an error and fix the underlying issue. Many thanks. Yes, I have now set R0 to flag an error and used USR from BASIC rather than CALL. Version 0.09 uploaded. No more crashes but after a few uses, the VCHIQ returns zero for GPU output display width and height. Firmware date now returns correctly. EDIT: It reports 59Hz regardless, so I presume that’s the native Hz of the screen from EDID. Not sure why the Pi Firmware decides to use 60Hz instead – unless it doesn’t support 59Hz and instead picks the closest. I think 0.09 has sorted page zero access. Also some frame rates are returned directly and some are calculated (by me) from pixel clock and were rounded down to an integer. |
Colin Ferris (399) 1814 posts |
With ref to 0.9 – what do the three lines before .FT80 do – you have a What does it do. For setting to errror flag – maybe better to use:- |
Chris Hall (132) 3554 posts |
I meant CMP R0,#0 to clear the V flag (I find the cpsr stuff too obscure) before returning (from a BL call to HWP_Send which has the corresponding STMFD), but I may have meant CMP R0,R0. Now at version 1.00 (from my web site) and from !Store (which now seems to be back on line). |
Martin Avison (27) 1494 posts |
Small bug noticed with v1.00 when opening the window on my Pi… |
Pages: 1 2