Screen bank selection kills the machine?
Charles Ferguson (8243) 427 posts |
Hiya, Interesting bug found using a RISC OS 5 image – works fine on non-RISC OS 5, as far as I can tell, but leaves a RISC OS 5 machine broken. SYS "OS_Byte",&70, 3-255:REM Select invalid bank for VDU PRINT "Bank INVALID (should leave us in bank 1)" SYS "OS_Byte",&70, 1:REM Select bank 1 for VDU (default bank) PRINT "Bank 1 again" The ‘3-255’ was found due to a bug in my own code; I was using the wrong value when I called OS_Byte 251 (I should have been using OS_Byte 250). The correct behaviour is to select the bank if possible, and if not to ignore the request. This also highlights a bug with OS_Byte 250/251. The Display bank is being returned as 0; it should be returned as 1. The banks in use, returned from OS_Byte are the actual bank numbers 1, 2, etc. The value 0 is an input value to OS_Byte 112/113 which means ‘use the standard shadow value for the mode you’re in’, because as we know, we’re running on a BBC Master and default Shadow Banks are a thing :-) This can be observed with: SYS "OS_Byte",&FA TO a,b,c PRINT a,b,c 250 0 0 The values should be 250, 1, 1 by default, or 250, 2, 2 if a shadow mode were selected. |
André Timmermans (100) 655 posts |
You should use SYS “OS_Byte”, 250, 0, 255 as documented in the PRM. |
Charles Ferguson (8243) 427 posts |
Oops; that was an incorrect example then – one of the problems of having to retype the commands: SYS "OS_Byte",&FA,0,255 TO a,b,c PRINT a,b,c 250 0 0 ie exactly the same as I stated, but I had omitted the X and Y parameters. |
Steve Pampling (1551) 8170 posts |
Is that introduced to RO5 at some point or a lingering bug from RO3.7 trickling through? BTW. When reporting RO5 bugs it is best to give the specific version number as the odd numbers are Dev and the bug might have been added/removed in a different version so even date strings are relevant. |
Charles Ferguson (8243) 427 posts |
Pass; I’m just reporting what I see. The equivalent does not happen on the Select image I use. I was using the RISC OS image supplied as part of the RISC OS bundle; the one you refer to, which is 5.27. Given the ease with which it could be checked whether there is a problem or not, I didn’t bother posting the version numbers; apologies. How I reproduce this case: 1. Obtain a linux or macOS machine with docker installed. To reproduce on RISC OS 3.7: 1. Obtain a linux or macOS machine with docker installed. Or use whatever version of RISC OS you have to hand. |
Steve Pampling (1551) 8170 posts |
You’re probably using a late release of Select.
I don’t recall offhand what date version that comes with but I do know that it works quite happily with the ROM from the 5.28 stable RO soft load – dig in the zip for the “riscos” file to drop into the RPCEmu “roms” directory. Or you could use the current 5.29 stream “nightly” release labelled as Beta IOMD softload which is “bleeding edge” and once in a blue moon won’t work Anyway, to the point: Case 1 = RO5
Case 2 = RO3.7
It’s an introduced bug somewhere in the transition from 3.7 via 3.8 via PACE and into RO5, or even more recent. It would need testing in versions like 5.22 and 5.24 to establish how far back (narrows the source revision search) further refinement would be from a “binary search” technique testing with mid-point jumps of a block of releases to home in on a period where specific affecting changes occurred. Preaching to the converted? You’ve been through the sequence before, more times than me probably. |
Rick Murray (539) 13840 posts |
When was the GraphicsV stuff done? |
Rick Murray (539) 13840 posts |
BTW, Charles, there are numerous versions of the odd numbered releases, so when reporting stuff like this it can be useful to give a build date as well, if nothing else it can line up with something in the revision history. |
Rick Murray (539) 13840 posts |
Okay, a lot of stuff was done November 2018: https://gitlab.riscosopen.org/RiscOS/Sources/Kernel/-/commit/d87c22a426bf271fcc9fd2fcb3fc6dd1c8c900f0 Then more back in December 2013: https://gitlab.riscosopen.org/RiscOS/Sources/Kernel/-/commit/694750de01877246840ef6c9cd2a3abb1415f6d9 So those might be useful checkpoints to try? |
Steve Pampling (1551) 8170 posts |
November 2013 kaput frozen display… Same with 2012-03-18 ROM Whatever the cause it’s been there a fair while. Edit – that takes us back to RO5.19 BTW. |