bardeci / gambatte-dms

Gambatte-DMS is a GB/GBC emulator for handheld devices, using a modified Gambatte core.
GNU General Public License v2.0
66 stars 21 forks source link

Implement "Scale3x+Sample.75x" scaling from OhBoy emulator #15

Open zanhecht opened 3 years ago

zanhecht commented 3 years ago

The "Scale3x+Sample.75x" scaling in the OhBoy emulator produces results that are far better than those produced by either the "1.5 Fast" or "1.5 Smooth" options in gambatte (look at the eye of the bird statue, or the girl's hair, for example, in the images below). It is based around the GPL Scale3x algorithm from http://www.scale2x.it/algorithm.html, an algorithm developed for AdvanceMAME that can upscale the image in such a way that removes jagged edges without making it blurry.

OhBoy Scale3x+Sample.75: ohboy_Scale3x+Sample 75

Gambatte 1.5x Smooth: gambatte_1 5x_Smooth

Gambatte 1.5x Fast: gambatte_1 5x_Fast

According to the OhBoy documentation, it uses Scale3x to scale the image to 480x432, and then it uses simple pixel averaging to downscale to 240x216. The actual implementation in OhBoy, which starts at line 460 in https://github.com/hi-ban/ohboy/blob/master/main.c, appears a bit more clever than that, but I can't quite follow the code.

zanhecht commented 3 years ago

Pinging @hi-ban, since he worked on implementing Scale3x in Ohboy.

360fun commented 2 years ago

This would be great!!! Even better if would be possibile use the entire screen vertical (like the 1,666x scaler)! 🤩 In the meanwhile I use a recent port of Ohboy: https://github.com/Rezzy-dev/ohboy/