b-em full screen aspect ratio

want to talk about MESS/model b/beebem/b-em/electrem/elkulator? do it here!
Post Reply
mygrandmawheels
Posts: 9
Joined: Tue Oct 06, 2015 7:15 am
Contact:

b-em full screen aspect ratio

Post by mygrandmawheels » Sun Dec 31, 2017 9:22 am

Hello everyone, since I'm a happy linux user, I play and make my experiments of programming with the b-em, that works pretty well.
The only big drawback I have found is that, in full screen mode, it does not keep the right 4:3 aspect ratio, but try to "adapt" itself to the ratio of the video card (16:9).
I tried to recompile it adjusting the source code to my needs,but I did not obtained any of useful.

Does anyone has a suggestion / solution?

Many thanks!

Coeus
Posts: 898
Joined: Mon Jul 25, 2016 11:05 am
Contact:

Re: b-em full screen aspect ratio

Post by Coeus » Sun Dec 31, 2017 3:43 pm

I will have a look when I am back in front of the PC.

You have reminded me that it gets my goat when TV's/media players assume 4:3 video should be stretched horizontally to fit a wide screen as I prefer pillarboxing with the original aspect ratio retained. I am sure many of the actors/presenters made to look fat by the stretching would also prefer pillarboxing. Fortunately it is usually an option somewhere and probably should be for B-Em too.

Coeus
Posts: 898
Joined: Mon Jul 25, 2016 11:05 am
Contact:

Re: b-em full screen aspect ratio

Post by Coeus » Sun Dec 31, 2017 8:27 pm

Which version of B-Em are you using? I can't reproduce the problem. The issue I see with fullscreen is not stretching the BBC micro screen enough. The last released version of B-Em is quite old now, there is a GitHyb repository with more recent changes at: https://github.com/stardot/b-em. Is that the version you are using? If not, what happens when you try that version?

Coeus
Posts: 898
Joined: Mon Jul 25, 2016 11:05 am
Contact:

Re: b-em full screen aspect ratio

Post by Coeus » Sun Dec 31, 2017 9:27 pm

How does this picture look compared to what you are seeing?
20171231_211953_3263_02.jpg
This is from the version at: https://github.com/stardot/b-em/tree/sf/linux-video

mygrandmawheels
Posts: 9
Joined: Tue Oct 06, 2015 7:15 am
Contact:

Re: b-em full screen aspect ratio

Post by mygrandmawheels » Mon Jan 01, 2018 10:06 am

I'm using the 2.2 version, taken from the b-em site
http://b-em.bbcmicro.com/
anyway, now I try the github one, that seems really recent...

mygrandmawheels
Posts: 9
Joined: Tue Oct 06, 2015 7:15 am
Contact:

Re: b-em full screen aspect ratio

Post by mygrandmawheels » Mon Jan 01, 2018 10:33 am

sure I'm not a smart-one with the compilers; after installing jack libraries and libasoud2 as dependencies, I'm now stopped here:
Configured version: 2.2

Making all in src
make[1]: Entering directory '/home/paolo/b-em-master/src'
CXXLD b-em
b_em-midi-linux.o: In function `midi_send_msg':
/home/paolo/b-em-master/src/midi-linux.c:507: undefined reference to `midi_jack_send_msg'
/home/paolo/b-em-master/src/midi-linux.c:508: undefined reference to `midi_alsa_seq_send_msg'
/home/paolo/b-em-master/src/midi-linux.c:509: undefined reference to `midi_alsa_raw_send_msg'
collect2: error: ld returned 1 exit status
Makefile:554: recipe for target 'b-em' failed
make[1]: *** [b-em] Error 1
make[1]: Leaving directory '/home/paolo/b-em-master/src'
Makefile:353: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1


can you help me?

Coeus
Posts: 898
Joined: Mon Jul 25, 2016 11:05 am
Contact:

Re: b-em full screen aspect ratio

Post by Coeus » Mon Jan 01, 2018 1:08 pm

Paulo, before I go on to address the compilation issue I had another look at that screen dump and I wasn't convinced this was the 4x3 aspect ratio either so I temporarily switched out the code that blits the generated BBC screen onto the real screen with code to draw a filled rectangle and, sure enough, it filled the whole screen which is not what is supposed to happen.

It turns out that when in full screen mode the code requested 800x600, which is 4:3 aspect ratio, but something else outside of B-Em, maybe X, was stretching this out to the native resolution of the monitor, which in my case is 1920x1080. B-Em doesn't ask it to do that.

So the solution I have implemented in the latest commit to the branch https://github.com/stardot/b-em/tree/sf/linux-video is to instead call set_gfx_mode to ask for the full desktop resolution in full-screen mode and handle the scaling from within B-Em.

Here is the same screen as produced by the new version:
20180101_130140_3265.jpg

Coeus
Posts: 898
Joined: Mon Jul 25, 2016 11:05 am
Contact:

Re: b-em full screen aspect ratio

Post by Coeus » Mon Jan 01, 2018 1:16 pm

mygrandmawheels wrote:...
b_em-midi-linux.o: In function `midi_send_msg':
/home/paolo/b-em-master/src/midi-linux.c:507: undefined reference to `midi_jack_send_msg'
/home/paolo/b-em-master/src/midi-linux.c:508: undefined reference to `midi_alsa_seq_send_msg'
/home/paolo/b-em-master/src/midi-linux.c:509: undefined reference to `midi_alsa_raw_send_msg'
...
I think this maybe a bug in that the new MIDI code used for the Music 2000 and Music 4000 emulation is supposed to be conditionally compiled, i.e. if you don't have the libraries installed at compilation time it is supposed to just omit the code that depends on them and it looks like this is not working properly.

But, given you have installed the libraries you probably need to re-run ./configure which has a test in for those libraries.

Also, not that the master branch does not contain the fix I referred to in my post above - for that you need the sf/linux-video branch.

mygrandmawheels
Posts: 9
Joined: Tue Oct 06, 2015 7:15 am
Contact:

Re: b-em full screen aspect ratio

Post by mygrandmawheels » Mon Jan 01, 2018 4:29 pm

Very good, Coeus! It works like a charm!
Many thanks indeed for the fast solution!

:D

Post Reply