Weird underscan request - Raspberry Pi 3

About BasiliskII, a 68k Mac emulator for Windows, MacOSX, and Linux that can run System 7.x through MacOS 8.1.

Moderators: Cat_7, Ronald P. Regensburg

Post Reply
panman_gr
Space Cadet
Posts: 5
Joined: Sat Apr 23, 2022 10:50 am

Weird underscan request - Raspberry Pi 3

Post by panman_gr »

Hello everybody,

I've been setting up an empty Classic shell with a TFT and SheepShaver/Basilisk on a Raspberry Pi 3b+. Problem is, an 8 inch TFT is too small and the 3D-printed frame would be visible, so I made a frame for a 10 inch TFT, and some pixels are hidden behind the frame. The TFT's native resolution is 1024x768, but only a central 960x704 window is visible, due to the Classic's bezel being in the way.

When I run SheepShaver from the Raspbian GUI, having fixed the overscan options in /boot/config.txt, the 960x704 resolution is being respected, and the rest is just black:
Image

But, when i run Basilisk from the command line (raspbian lite/SDL2 build) no matter what "screen" line i put in the prefs file, regardless of the overscan options in /boot/config.txt, Basilisk scales it to fill the screen all the way to the edges:
Image

The whole idea being I'd like to have the "ultimate pre-OSX machine", I've also silenced everything else so that it goes directly into Basilisk at startup without even showing it's a Raspberry Pi, so it would be great if I could also make it respect the Raspberry Pi's overscan setup, so it only displays on the visible parts. Any ideas on a fix?
Thank you :smile:
galgot
Granny Smith
Posts: 119
Joined: Thu Feb 13, 2014 3:59 pm

Re: Weird underscan request - Raspberry Pi 3

Post by galgot »

Have no idea how to fix this sorry. I mean if I understand correctly what you want to do, cropping the screen image so it fit in BasiliskII ?
I have the same kind of setup, but I used a 9", and I think it's 4:3 ratio, so it fit alright. Bought it long ago... can't find the exact model on the bay now.
More recent models are like these :
https://www.ebay.com/itm/255128337595?h ... SwoOdhOfYI
but they are 16:9 ratio...
atommat
Space Cadet
Posts: 2
Joined: Wed May 25, 2022 8:27 am

Re: Weird underscan request - Raspberry Pi 3

Post by atommat »

Hello, i was trying to do exactly the same thing. did you get anywhere with it?

I partially succeeded by running a second linux os in a VM and set the VM display to a lower resolution and disable scaling. Then use basilisk in the VM in full screen. bit of a hack but it worked. you then have a nice black border.

I also looked down the route of configuring XRANDR transform. this effectively manipulates the host display output. sadly this is mind bogglingly complex and uses a transformation matrix that is reserved for those with more neurons than me : ) I could get the top left corner to shift but not the bottom right. plus i think its just buggy.

I would be interested to hear if you got basilisk to run full screen without pixel scaling.

mat
atommat
Space Cadet
Posts: 2
Joined: Wed May 25, 2022 8:27 am

Re: Weird underscan request - Raspberry Pi 3

Post by atommat »

one more mention,

I used an lcd screen from an iPad 1st gen. its 4:3 and fits into the window perfectly. You can easily take them apart and remove the display component. Then, buy an inexpensive HDMI driver for the lcd screen from ebay and hook up to a pi. There are also 3d printable parts on Thingiverse to marry up the display to your mac and eliminate the gaps.

you do still get overscan due to the curvature of the mac crt window. so the black border would really be useful to pull the display in a bit, hence this thread.
panman_gr
Space Cadet
Posts: 5
Joined: Sat Apr 23, 2022 10:50 am

Re: Weird underscan request - Raspberry Pi 3

Post by panman_gr »

atommat wrote: Wed May 25, 2022 8:35 am Hello, i was trying to do exactly the same thing. did you get anywhere with it?
Nope, nowhere at all. It actually works perfectly from inside the GUI, but the whole point about the build (still) is not to give away what's inside.
I want it to bong, then boot to OS 7/8/9 straight from power up, without displaying anything else on the screen.

Second best solution was to get an 8" 4:3 HDMI display, then redesign the screen adapter to match the new screen.
Now everything should display perfectly, but I haven't yet tested that, because, true to Murphy's Law, the 8" panel was dead on arrival.
I'm currently waiting for it to be replaced.
galgot
Granny Smith
Posts: 119
Joined: Thu Feb 13, 2014 3:59 pm

Re: Weird underscan request - Raspberry Pi 3

Post by galgot »

panman_gr wrote: Thu May 26, 2022 12:23 pm
atommat wrote: Wed May 25, 2022 8:35 am Hello, i was trying to do exactly the same thing. did you get anywhere with it?
Nope, nowhere at all. It actually works perfectly from inside the GUI, but the whole point about the build (still) is not to give away what's inside.
I want it to bong, then boot to OS 7/8/9 straight from power up, without displaying anything else on the screen.

Second best solution was to get an 8" 4:3 HDMI display, then redesign the screen adapter to match the new screen.
Now everything should display perfectly, but I haven't yet tested that, because, true to Murphy's Law, the 8" panel was dead on arrival.
I'm currently waiting for it to be replaced.
Went again and checked what screen I used for mine if that can help. It's actually a 8" , 4:3 , VGA only so I had to buy a VGA-HDMI adapter. But they exist with HDMI included too.
I think 8" is the way to go cause it's close to the original visible area . the way I dealt with the black borders is , I used black tape all around to hide the metallic edge of the screen, and also the screen itself is behind a thin clear acrylic sheet with the same black tape on the inside to make the black areas around the screen and fit more of less the original visible area. The acrylic sheet has each corners cut to fit between the front case four original CRT screen holders, but it's a bit over sized, so that it's bent a bit when in place, that to give a bit of curved effect. Doesn't match the CRT curved shape, but it's fine enough for me.

Image

Image
Here running BasiliskII, System 7.5.3, set in grayscale cause it looks better ...

I've set the display to 640x480. My config.txt file in /boot is as such :

Code: Select all

# For more options and information see
# http://rpf.io/configtxtreadme
# Some settings may impact device functionality. See link above for details

# uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1

# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan
#disable_overscan=1

# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border
#overscan_left=16
#overscan_right=16
#overscan_top=16
#overscan_bottom=16

# uncomment to force a console size. By default it will be display's size minus
# overscan.
framebuffer_width=640
framebuffer_height=480

# uncomment if hdmi display is not detected and composite is being output
#hdmi_force_hotplug=1

# uncomment to force a specific HDMI mode (this will force VGA)
hdmi_group=2
hdmi_mode=16

# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes
#hdmi_drive=2

# uncomment to increase signal to HDMI, if you have interference, blanking, or
# no display
#config_hdmi_boost=4

# uncomment for composite PAL
#sdtv_mode=2

#uncomment to overclock the arm. 700 MHz is the default.
arm_freq=700

# Uncomment some or all of these to enable the optional hardware interfaces
#dtparam=i2c_arm=on
#dtparam=i2s=on
#dtparam=spi=on

# Uncomment this to enable the lirc-rpi module
#dtoverlay=lirc-rpi
dtoverlay+=hifiberry

# Additional overlays and parameters are documented /boot/overlays/README

core_freq=250
sdram_freq=400
over_voltage=0
gpu_mem=64

# Enable audio (added by raspberrypi-sys-mods)
dtparam=audio=on
and I use

Code: Select all

screen dga/640/480
in .basilisk_ii_pref file,
and

Code: Select all

screen dga/0/0
(maximum size in the gui) for SheepShaver pref.

Here a pict of a functioning Classic beside my "Rpi Classic", I had pictures of both running System 7 but can't find it any more...
As you can see the original screen visible area is in fact wider, but not sure that is 16:9.
And with larger black borders up and bottom :

Image

Mm... that's a long post, sorry. Hope it helps.
panman_gr
Space Cadet
Posts: 5
Joined: Sat Apr 23, 2022 10:50 am

Re: Weird underscan request - Raspberry Pi 3

Post by panman_gr »

My turn to help :cool:

This is my 3D-printable Mac-to-display adapter, custom made to my (now 8") TFT panel in Fusion 360.
As you can see, Mac bezel curvature is taken account of, and it uses the original CRT screws.
The panel is sandwiched between the two brackets which both hold it in place and hide its edges.
And, of course, it's printed in the blackest filament I can find, to maximize invisibility.
Image
If you have a 3D printer, I'd be happy to send you the Fusion file for you to customize to your own display.
galgot
Granny Smith
Posts: 119
Joined: Thu Feb 13, 2014 3:59 pm

Re: Weird underscan request - Raspberry Pi 3

Post by galgot »

panman_gr wrote: Thu May 26, 2022 1:35 pm My turn to help :cool:

This is my 3D-printable Mac-to-display adapter, custom made to my (now 8") TFT panel in Fusion 360.
As you can see, Mac bezel curvature is taken account of, and it uses the original CRT screws.
The panel is sandwiched between the two brackets which both hold it in place and hide its edges.
And, of course, it's printed in the blackest filament I can find, to maximize invisibility.
Image
If you have a 3D printer, I'd be happy to send you the Fusion file for you to customize to your own display.
Cool ! Much more "professional" than my makeshift job :)
Thanks for the offer, but I don't have a 3d printer. And anyway, it's done and running now...
I remember following a thread on 68kmla.org forum about the best way to reproduce a fake curved CRT to put in front of the LCD.
Some even went as far as trying to cut the front part of a dead CRT ... There was another more successful attempt, someone made a mold of the CRT face, then did a fake face out of clear resin, perfect shape, and transparent. looked very good on the pictures anyways.
panman_gr
Space Cadet
Posts: 5
Joined: Sat Apr 23, 2022 10:50 am

Re: Weird underscan request - Raspberry Pi 3

Post by panman_gr »

galgot wrote: Thu May 26, 2022 1:25 pm I think 8" is the way to go cause it's close to the original visible area . the way I dealt with the black borders is , I used black tape all around to hide the metallic edge of the screen, and also the screen itself is behind a thin clear acrylic sheet with the same black tape on the inside to make the black areas around the screen and fit more of less the original visible area. The acrylic sheet has each corners cut to fit between the front case four original CRT screen holders, but it's a bit over sized, so that it's bent a bit when in place, that to give a bit of curved effect. Doesn't match the CRT curved shape, but it's fine enough for me.
That's how the bracket looks installed.
I'll be back with more pictures when the functioning panel arrives...
ImageImage
galgot wrote: Thu May 26, 2022 3:47 pm I remember following a thread on 68kmla.org forum about the best way to reproduce a fake curved CRT to put in front of the LCD.
Some even went as far as trying to cut the front part of a dead CRT ... There was another more successful attempt, someone made a mold of the CRT face, then did a fake face out of clear resin, perfect shape, and transparent. looked very good on the pictures anyways.
I've seen the glass cut from the CRT and a vacuum formed acrylic sheet on the CRT. Both looked great but were insanely difficult to do.
That's why I tried with the oversize TFT and the custom bracket, with the 10" panel there is no coarse 3D printed part visible from the outside, and if there existed a solution to the overscan issue, I'd be able to get away with having only screen visible on the outside, even with some black borders.
Well, got half way there, I'm getting the Raspbian desktop and SheepShaver GUI version to do it, but I'd rather have the full-stealth "superfast Color Classic" effect.
MentorNeto
Space Cadet
Posts: 1
Joined: Tue Jun 21, 2022 4:12 am

Re: Weird underscan request - Raspberry Pi 3

Post by MentorNeto »

galgot wrote: Thu May 26, 2022 3:47 pm
panman_gr wrote: Thu May 26, 2022 1:35 pm My turn to help :cool:

This is my 3D-printable Mac-to-display adapter, custom made to my (now 8") TFT panel in Fusion 360.
As you can see, Mac bezel curvature is taken account of, and it uses the original CRT screws.
The panel is sandwiched between the two brackets which both hold it in place and hide its edges.
And, of course, it's printed in the blackest filament I can find, to maximize invisibility.
Image
If you have a 3D printer, I'd be happy to send you the Fusion file for you to customize to your own display.
Cool ! Much more "professional" than my makeshift job :)
Thanks for the offer, but I don't have a 3d printer. And anyway, it's done and running now...
I remember following a thread on 68kmla.org forum about the best way to reproduce a fake curved CRT to put in front of the LCD.
Some even went as far as trying to cut the front part of a dead CRT ... There was another more successful attempt, someone made a mold of the CRT face, then did a fake face out of clear resin, perfect shape, and transparent. looked very good on the pictures anyways.
Hi @panman_gr sorry to jump in the conversation, but do you mind sending me the 3D file of the Mac-to-display adapter?



Thank you!
Last edited by MentorNeto on Tue Jun 21, 2022 4:27 am, edited 1 time in total.
User avatar
rickyzhang
Apple Corer
Posts: 205
Joined: Mon Sep 15, 2014 7:59 pm

Re: Weird underscan request - Raspberry Pi 3

Post by rickyzhang »

panman_gr wrote: Sat Apr 23, 2022 11:26 am
The whole idea being I'd like to have the "ultimate pre-OSX machine", I've also silenced everything else so that it goes directly into Basilisk at startup without even showing it's a Raspberry Pi, so it would be great if I could also make it respect the Raspberry Pi's overscan setup, so it only displays on the visible parts. Any ideas on a fix?
Thank you :smile:
If you use cebix's BII, SDL2 runs an arbitrary resolution and can do zoom in/out.

First you set screen as win like below. Then make it fullscreen. It respects the windows ratio you set.

Code: Select all

screen win/900/500
I added this zoom in/out features that respect the windows resolution so that I can make my preferable size in hi-res screen.

Check out this screen recording demo I made when I patched System 6. It is a cool feature:

https://youtu.be/aXzM8t_u3zI

Hope it helps.
There is an App for that!
https://github.com/rickyzhang82
panman_gr
Space Cadet
Posts: 5
Joined: Sat Apr 23, 2022 10:50 am

Re: Weird underscan request - Raspberry Pi 3

Post by panman_gr »

MentorNeto wrote: Tue Jun 21, 2022 4:16 am Hi @panman_gr sorry to jump in the conversation, but do you mind sending me the 3D file of the Mac-to-display adapter?



Thank you!
It's on Thingiverse for everybody to get:
https://www.thingiverse.com/thing:5425787
Post Reply