libretro / blastem

Upstream tracking repo of BlastEm, the fast and accurate Genesis emulator, with libretro specific changes
https://www.retrodev.com/blastem/
GNU General Public License v3.0
53 stars 25 forks source link

Aspect ratio is incorrect, particularly with overscan cropped #37

Open bkoropoff opened 3 years ago

bkoropoff commented 3 years ago

Genesis Plus GX, NTSC Game, correct ~4:3 ratio:

Atomic Runner (USA)-211104-174450

Genesis Plus GX, PAL Game, correct ~8:5 ratio (PAL had 288 lines per field compared to NTSC's 240, but most PAL MD games still only use 224 after overscan, leaving large black borders on the top and bottom of the screen): Atomic Runner (Europe)-211104-174544

Blast'Em, NTSC Game, wrong ratio: Atomic Runner (USA)-211104-174739

Blast'Em, PAL Game, wrong ratio: Atomic Runner (Europe)-211104-174837

This pull request introduced the bug:

https://github.com/libretro/blastem/pull/25

It computes the aspect ratio using the number of (overscan-cropped) horizontal and vertical pixels, but the aspect ratio should be that of how a TV of the time was expected to display it. It should always be reporting ~4:3 for NTSC and ~8:5 for PAL (except for games that use the true 240P PAL mode of the VDP, if any exist). Genesis Plus GX does this by actually considering the pixel clock frequency compared to the canonical scan rate of the video signal, but returning a stock aspect ratio based on video mode is probably close enough. A real TV of the time could be calibrated to exactly fit the signal to its display area anyway.

See here for discussion.