New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fullscreen mode does not work on Linux #193
Comments
That's (almost) exactly the way it looks on my device. But isn't fullscreen supposed to scale the graphical output to fit the entire screen? For the "almost" part above: Will provide a screenshot soon. Essentially everything outside of the BBC's screen is visual noise in my case (looks a little bit like random binary data in the video surface buffer) |
That's interesting. I wonder if I am remembering correctly, but I think at one time the full screen mode used to maintain something close to the 4:3 aspect ratio of a real BBC micro on an old 4:3 CRT. That means if the PC monitor is wide screen, the bitmap produced by the emulation of the BBC Micro graphics would be scaled to fit the central area of the output "window" and the rest would be filled by drawing black rectangles in the empty space. There was a performance optimisation a little while ago, for B-Em running on Windows, to declare the Allegro window to which this is done write-only rather than read write which, I think, means there is no guarantee what is in it prior to being drawn, i.e. the whole window is expected to be drawn for each frame. Possibly, on my system the window is being set to all black in hardware and on yours it is left random. There was also a pull request a little while back connected to full-screen so I will see if I can find what exactly that did. Looking at my own screen shot again, this is not what I would have expected. Even if it is pillar boxing rather than stretching, I would expect the BBC Micro screen to be centred horizontally. |
I have created a branch for this issue and pushed a commit which I believe fixes this: https://github.com/stardot/b-em/tree/sf/issue193 |
Now updated further to make it work again on Windows. |
That certainly looks strange and I can see why most people wouldn't want that, but that is not what I get. Starting with a normal window:
The most interesting bits are the presence of absence of the re-size event along with the values it provides, though the reported version of Allegro may be interesting too. I have also added the ability to visualise different parts of the screen, like the blue border I think I posted earlier (which I had done by a temporary change to the C code). These are implemented as extensions to the VideoNuLA emulation so the code can be there without normally being activated. VideoNuLA itself sits in the I/O space used by the standard Video ULA but decode the addresses more completely so &FE22 and &FE23 are distinct from &FE20 and &FE21 respectively. &FE22 is a control register used for various purposes in which the upper four bits are a command code and the lower four bits are the value. I have grabed two unused command codes 14 (E) and 15 (F). 14 sets the colour of the border between the emulated BBC micro screen and the edge of the PC screen, i.e. when pillarboxing or letterboxing in full screen mode. 15 sets the colour used for the part of the BBC micro screen is subject to video blanking. The values, in each case, are a position in the VideoNuLA pallette. So, some examples:
For me gives this in normal window mode: |
Yes for sure, will let you know on Tuesday next week, be on vacation over easter holidays 😎 |
Behavior
When entering fullscreen mode with Settings->Video->Fullscreen the screen gets distorted
Expected behavior
Screen gets scaled to size of full screen window in the same way as it does in the Windows version
How to reproduce
Run b-em in Linux. It does not make any difference if running on X11 or Wayland; Tested it on RHEL 9 (GNOME DE)
The text was updated successfully, but these errors were encountered: