Page 3 of 3

Re: Help scale and rotation sega genesis

Posted: Fri Apr 19, 2019 8:07 pm
by Miquel
TmEE co.(TM) wrote:
Fri Apr 19, 2019 7:45 pm
it must be in horizontal sync position of the line.
Even if we are in vertical blank?

Re: Help scale and rotation sega genesis

Posted: Fri Apr 19, 2019 8:22 pm
by TmEE co.(TM)
Even then, a line is still a line regardless of where it is in the frame. There's 262 lines in 60Hz and 313 lines in 50Hz, rest are border, blanking and sync. Lines themselves all consist of border, active part, blanking and sync aswell, and switch can happen in the sync portion.

Code: Select all

Composition of one line :
+----------------+-----+------+-------+------+
|                | SMS | H256 | H320F | H320 |
+----------------+-----+------+-------+------+
| HSYNC pixels   |  26 |   26 |    32 |   34 |
| Left blanking  |  24 |   25 |    32 |   30 |
| Left border    |  14 |   14 |    13 |   13 |
| Active display | 256 |  256 |   320 |  320 |
| Right border   |  14 |   14 |    14 |   14 |
| Right blanking |   8 |    7 |     9 |    9 |
+----------------+-----+------+-------+------+
| Total pixels   | 342 |  342 |   420 |  420 |
+----------------+-----+------+-------+------+

Composition of one frame when not interlacing :
+-------------------------+-------------------+-------------------+
|                         |       50Hz        |       60Hz        |
|                         +-----+------+------+-----+------+------+
|                         | SMS | V224 | V240 | SMS | V224 | V240 |
+-------------------------+-----+------+------+-----+------+------+
| VSYNC half lines        |   0 |    6 |    6 |   0 |    6 |    0 |
| VSYNC full lines        |   3 |    0 |    0 |   3 |    0 |    0 |
| Top blanking half lines |   0 |    6 |    6 |   0 |    6 |    0 |
| Top blanking full lines |  13 |   10 |   10 |  13 |   10 |    0 |
| Top border              |  54 |   38 |   30 |  27 |   11 |    0 |
| Active display          | 192 |  224 |  240 | 192 |  224 |  240 |
| Bottom border           |  48 |   32 |   24 |  24 |    8 |  272 |
| Bottom blanking (half)  |   0 |    6 |    6 |   0 |    6 |    0 |
| Bottom blanking (full)  |   3 |    0 |    0 |   3 |    0 |    0 |
+-------------------------+-----+------+------+-----+------+------+
| Total lines             | 313 |  313 |  313 | 262 |  262 |  512 |
+-------------------------+-----+------+------+-----+------+------+

Re: Help scale and rotation sega genesis

Posted: Sat Apr 20, 2019 1:13 am
by Sik
I forgot, are the possible switch points even contiguous or are they spread over a few pixels? Because if the latter that reduces the possible split points that won't cause trouble even more. We're talking about something that needs to be cycle perfect here. I guess DMA bitmap could help give some ideas for timing code…

Either way, the original point was that even if in H32 the DMA transfer ends up being the same, the 68000 still has to render less pixels and that's still a significant improvement to consider. The alternative is to use H40 and find some excuse to pad to the sides.

Re: Help scale and rotation sega genesis

Posted: Sat Apr 20, 2019 1:53 pm
by TmEE co.(TM)
I don't actually know if there's one or few ideal moments in the sync period to do the switch since I haven't actually experimented with it. There will not be a moment that will produce exact line length so you will only get to choose between very off and little bit off. Real world tests are needed for sure and with multiple TVs and capture devices to see what sort of results there will be.