marqs85 / ossc

Open Source Scan Converter
http://junkerhq.net/xrgb/index.php/OSSC
GNU General Public License v3.0
480 stars 65 forks source link

The V./H. Backporch is Actually Front Porch #44

Closed eatnumber1 closed 4 years ago

eatnumber1 commented 4 years ago

When reading through rtl/scanconverter.v to implement https://github.com/marqs85/ossc/pull/43, I realized that what is coded as V. Backporch and H. Backporch is actually declaring the duration after the sync period before the active region starts. Specifically, this is viewable starting at line 905 where it says:

H_AVIDSTART <= h_config[19:11] + h_config[27:20];   // Horizontal sync+backporch length (0...1023)
...
V_AVIDSTART <= v_config[16:11] + v_config[19:17];   // Vertical sync+backporch length (0...127)

... but this is not the back porch, it is the front porch! Was this inversion intentional? Not every console (e.g. PSP) has equal values for front and back porch, so simply calling the front porch "backporch" is misleading and can produce incorrect output.

marqs85 commented 4 years ago

All the definitions for H/V timings I've seen list the sections in following time-wise order: sync, backporch, active, frontporch.

eatnumber1 commented 4 years ago

Aha, I agree :). After reviewing a few more docs, I was mistaken. Thanks :)