SDL2 scale up and scale down enhancement
Moderators: Cat_7, Ronald P. Regensburg
- rickyzhang
- Apple Corer
- Posts: 205
- Joined: Mon Sep 15, 2014 7:59 pm
SDL2 scale up and scale down enhancement
Thanks to SDL2 features from David.
I enhanced the scale up features in window mode. The user can change the scale factor at will by resizing the window.
When user restore the window from minimize or maximize, it restores the scale ratio to 1.
I can tell the SDL2 employs the hardware acceleration in both OpenGL in Linux and Metal in Mac OS X. My son's game is playing much more smoother than SDL1.
See my screen case here https://youtu.be/RzwpeUe787E
I enhanced the scale up features in window mode. The user can change the scale factor at will by resizing the window.
When user restore the window from minimize or maximize, it restores the scale ratio to 1.
I can tell the SDL2 employs the hardware acceleration in both OpenGL in Linux and Metal in Mac OS X. My son's game is playing much more smoother than SDL1.
See my screen case here https://youtu.be/RzwpeUe787E
There is an App for that!
https://github.com/rickyzhang82
https://github.com/rickyzhang82
-
- Space Cadet
- Posts: 5
- Joined: Mon Jul 27, 2020 5:44 am
Re: SDL2 scale up and scale down enhancement
Ricky,
Were you able to do a macOS build for your modified branch? I cloned current git and gave it a shot, but the macOS Xcode project file complains about missing source (quite a few files). I dug around for hints on building it but the file referenced regarding how to build it is gone too. Is there something I've totally overlooked for building this? I'd definitely like to try out all your changes to current.
Were you able to do a macOS build for your modified branch? I cloned current git and gave it a shot, but the macOS Xcode project file complains about missing source (quite a few files). I dug around for hints on building it but the file referenced regarding how to build it is gone too. Is there something I've totally overlooked for building this? I'd definitely like to try out all your changes to current.
- rickyzhang
- Apple Corer
- Posts: 205
- Joined: Mon Sep 15, 2014 7:59 pm
Re: SDL2 scale up and scale down enhancement
Sure. But please build with autoconf in Mac OS X. XCode changed too often. I don't have energy to patch it by clicking by mouse.
See https://github.com/cebix/macemu/wiki/Ba ... l-mac-os-x
or check the Travis CI YAML file for build instruction.
See https://github.com/cebix/macemu/wiki/Ba ... l-mac-os-x
or check the Travis CI YAML file for build instruction.
There is an App for that!
https://github.com/rickyzhang82
https://github.com/rickyzhang82
-
- Space Cadet
- Posts: 5
- Joined: Mon Jul 27, 2020 5:44 am
Re: SDL2 scale up and scale down enhancement
Ricky,
Thanks for the pointer to the wiki page. I missed that completely. I probably should have just read the Unix/configure too. And yes, cli! I loathe using Xcode; with every release it gets harder to use. Just navigating it is incredibly frustrating. I force a standard Makefile for building Mini vMac too.
With enough messing around Basilisk 2 builds on Catalina. The window scaling works just fine and SDL reports metal rendering.
I saw some of your discussions about window scaling re: Mini vMac. Are you going to attempt to implement that kind of scaling for Basilisk? Bilinear filtering is my arch enemy..
As for a 64-bit JIT, could it be borrowed from FS-UAE?
Thanks for the pointer to the wiki page. I missed that completely. I probably should have just read the Unix/configure too. And yes, cli! I loathe using Xcode; with every release it gets harder to use. Just navigating it is incredibly frustrating. I force a standard Makefile for building Mini vMac too.
With enough messing around Basilisk 2 builds on Catalina. The window scaling works just fine and SDL reports metal rendering.
I saw some of your discussions about window scaling re: Mini vMac. Are you going to attempt to implement that kind of scaling for Basilisk? Bilinear filtering is my arch enemy..
As for a 64-bit JIT, could it be borrowed from FS-UAE?
-
- Space Cadet
- Posts: 5
- Joined: Mon Jul 27, 2020 5:44 am
Re: SDL2 scale up and scale down enhancement
.. actually, I managed to sort out the filtering. I found:
and
but setting things like:
or:
didn't seem to make a difference. I ended up just setting:
and that did what I wanted. The only other thing I tried was a black and white screen with MacII (Performa). It worked on the May build, but now the colours are inverted. It's white text on beige :|
Code: Select all
SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, PrefsFindBool("scale_nearest") ? "nearest" : "linear"
Code: Select all
SDL_RenderSetIntegerScale(sdl_renderer, PrefsFindBool("scale_integer") ? SDL_TRUE : SDL_FALSE);
Code: Select all
scale_nearest true
Code: Select all
scale_integer false
Code: Select all
SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, 0);
- rickyzhang
- Apple Corer
- Posts: 205
- Joined: Mon Sep 15, 2014 7:59 pm
Re: SDL2 scale up and scale down enhancement
For 32 Bit ROM and System 7.x, an arbitrary guest OS resolution was possible long ago.
This month, I ported arbitrary guest OS resolution ROM patch form mini vMac for 24Bit Mac SE ROM under System 6.
See screen cast: https://www.youtube.com/watch?v=aXzM8t_ ... e=emb_logo
JIT is an overkill for modern hardware. It is a piece of cake for Ghz CPU in 2020 to emulate Mhz CPU in 1980.
This month, I ported arbitrary guest OS resolution ROM patch form mini vMac for 24Bit Mac SE ROM under System 6.
See screen cast: https://www.youtube.com/watch?v=aXzM8t_ ... e=emb_logo
JIT is an overkill for modern hardware. It is a piece of cake for Ghz CPU in 2020 to emulate Mhz CPU in 1980.
There is an App for that!
https://github.com/rickyzhang82
https://github.com/rickyzhang82
Re: SDL2 scale up and scale down enhancement
I'm actually working on porting the JIT from ARAnyM. See my thread: https://www.emaculation.com/forum/viewt ... f=6&t=9674johnatcharpa wrote: As for a 64-bit JIT, could it be borrowed from FS-UAE?
I plan to submit changes to both ARAnyM and Basilisk II after I am finished with my changes and the issues are ironed out…
-
- Space Cadet
- Posts: 5
- Joined: Mon Jul 27, 2020 5:44 am
Re: SDL2 scale up and scale down enhancement
Great! I'll keep an eye on the thread.I plan to submit changes to both ARAnyM and Basilisk II after I am finished with my changes and the issues are ironed out…
-
- Space Cadet
- Posts: 5
- Joined: Mon Jul 27, 2020 5:44 am
Re: SDL2 scale up and scale down enhancement
I guess I should have included a tiny bit more detail - my bad. So when I use the build/tree from kanjitalk755 (which doesn't have the screen resize changes), this indeed works. However if I use the cebix/macemu/ tree then it does not. If you set the screen to black and white it turns to white on beige (at least on macOS 10.15.6 with SDL2). Also the preferences setting 'scale_nearest' appears to be ignored.For 32 Bit ROM and System 7.x, an arbitrary guest OS resolution was possible long ago.
I saw that when going through the git diffs. I'm not terribly excited about using X11 though, so I'll wait until it works with a pure SDL2 build. I tried the standard build without X11 and it hangs at boot.This month, I ported arbitrary guest OS resolution ROM patch form mini vMac for 24Bit Mac SE ROM under System 6.
If I make any progress on any of this I'll submit anything of use I discover.
- rickyzhang
- Apple Corer
- Posts: 205
- Joined: Mon Sep 15, 2014 7:59 pm
Re: SDL2 scale up and scale down enhancement
Use cebix upstream, instead. I fixed the hang.
There is an App for that!
https://github.com/rickyzhang82
https://github.com/rickyzhang82
-
- Apple Corer
- Posts: 239
- Joined: Thu Nov 09, 2017 12:06 pm
Re: SDL2 scale up and scale down enhancement
@johnatcharpa
Try my fork with appending following line to ~/.basilisk_ii_prefs.
Try my fork with appending following line to ~/.basilisk_ii_prefs.
Code: Select all
mag_rate 2
scale_nearest true
jit true