Author Topic: RT2A on SGX  (Read 2024 times)

touko

  • Hero Member
  • *****
  • Posts: 953
Re: RT2A on SGX
« Reply #15 on: March 18, 2016, 09:13:35 PM »
Quote
"I do not think that optimization does what you think it does."  :wink:
:lol:

In evidence no, it's the counterpart when you code exclusively with emulator .

Quote
Just one brilliant-idea too far ... and every good programmer has made that mistake before!  :)
But for now i have no idea what's wrong with it,may be a synchro problem with VSR/VDR/VCR when i switch between 5 and 10 mhz ..
« Last Edit: March 18, 2016, 10:03:19 PM by touko »

elmer

  • Hero Member
  • *****
  • Posts: 2153
Re: RT2A on SGX
« Reply #16 on: March 20, 2016, 01:35:31 AM »
But for now i have no idea what's wrong with it,may be a synchro problem with VSR/VDR/VCR when i switch between 5 and 10 mhz ..

You are messing with the clock that controls the TV signal. CRT TV's don't like unstable signals.

You may be able to fix things by changing HSR and HDR at the same time ... but it all depends upon when the VDC chip latches those values, and you're still going to introduce a few cycles of "glitch".

Are there any examples of shipping games that have split-screens in different resolutions?

SamIAm

  • Hero Member
  • *****
  • Posts: 1835
Re: RT2A on SGX
« Reply #17 on: March 20, 2016, 02:28:10 AM »
Are there any examples of shipping games that have split-screens in different resolutions?

I could be totally wrong about this, but I think some Super Famicom RPGs switched into a high resolution for the text boxes so the fonts could be more detailed.

elmer

  • Hero Member
  • *****
  • Posts: 2153
Re: RT2A on SGX
« Reply #18 on: March 20, 2016, 02:52:10 AM »
I could be totally wrong about this, but I think some Super Famicom RPGs switched into a high resolution for the text boxes so the fonts could be more detailed.

Ahhh ... I wasn't quite specific-enough. I'm only asking about the PCE.

Resolution-switching mid-screen is a "hardware" issue. Some systems are definitely designed for it (I did it on the Amstrad CPC in all my games, but that was a color-depth-vs-resolution switch, and not a different-clock-signal switch).

I can't remember if the capability was built-in to the SNES ... but I wouldn't be at-all-surprised.

With the way that the PCE splits the TV's timing between the VCE and the VDC, with multiple registers controlling different aspects of the signal, and with the VDC tending to only update certain settings at the start of a vblank, then I'm not-at-all-sure if it can handle a mid-screen resolution change ... which is effectively what Touko is trying to do with his 10MHz-in-vblank trick.

But I've not done any experiments ... so I wonder if anyone knows of a PCE game that does it, because that would be instant-proof that it's capable.  :wink:
« Last Edit: March 20, 2016, 04:15:16 AM by elmer »

SamIAm

  • Hero Member
  • *****
  • Posts: 1835
Re: RT2A on SGX
« Reply #19 on: March 20, 2016, 02:58:31 AM »
Gotcha.  :D

Does this count?
https://youtu.be/EvRVhtetvQs?t=79

Mednafen

  • Full Member
  • ***
  • Posts: 140
Re: RT2A on SGX
« Reply #20 on: March 20, 2016, 03:39:08 AM »
IIRC, the VDC behaves strangely(output image is positioned inconsistently horizontally compared to 5MHz and 7MHz modes, and wait-stating is inconsistent too) when running with the 10MHz pixel clock from the VCE.  I think it's probably because the lines(hsync to hsync) are "too" long, although I never got around to digging into it.

FWIW, Mednafen doesn't emulate this properly.
« Last Edit: March 20, 2016, 03:42:17 AM by Mednafen »

touko

  • Hero Member
  • *****
  • Posts: 953
Re: RT2A on SGX
« Reply #21 on: March 20, 2016, 06:25:55 AM »
Quote
You may be able to fix things by changing HSR and HDR at the same time
yes,i already did it but seems to be not sufficient(or it's done too late ??)

Quote
Are there any examples of shipping games that have split-screens in different resolutions?
the chris covell's split resolution demo doing this on active display .
« Last Edit: March 20, 2016, 06:34:44 AM by touko »

elmer

  • Hero Member
  • *****
  • Posts: 2153
Re: RT2A on SGX
« Reply #22 on: March 20, 2016, 06:33:59 AM »
the chris covell's split resolution demo doing this on active display .

Cool! Sounds like you've got some code-hacking to do, or maybe Chris can just tell us his secret.  :wink:

touko

  • Hero Member
  • *****
  • Posts: 953
Re: RT2A on SGX
« Reply #23 on: March 20, 2016, 06:39:12 AM »
Quote
Cool! Sounds like you've got some code-hacking to do, or maybe Chris can just tell us his secret.  :wink:
Chris posted also the source code,and he changed only HDR/HSR if i remember correctly . :-k

ccovell

  • Hero Member
  • *****
  • Posts: 2245
Re: RT2A on SGX
« Reply #24 on: March 20, 2016, 12:36:03 PM »
The VDC was quite malleable when changing resolutions mid-field.  There was a line of sprite glitching, but that might not be the case if you time your writes a bit better than I did.

Plus, there was no problem with my TV, but modern LCD TVs might be a different story...   :-k

Mednafen

  • Full Member
  • ***
  • Posts: 140
Re: RT2A on SGX
« Reply #25 on: March 20, 2016, 12:58:52 PM »
You can even change the pixel clock mid-scanline to something else and back, if you're careful with the timing, to get a wavy effect:


I wasn't careful enough with the timing in that proof-of-concept demo I wrote 8 years ago, as the glitching can attest to. ;)

touko

  • Hero Member
  • *****
  • Posts: 953
Re: RT2A on SGX
« Reply #26 on: March 21, 2016, 12:15:51 AM »
The download link is updated with the new version .

The mednafen example make me think that may be my code change the VDC reg mid scanline sometimes, and cause a sort of out of synch ??, because even if i am doing it in vblank,i don't care about if i am at a start of scanline or not .
« Last Edit: March 21, 2016, 12:24:30 AM by touko »

MNKyDeth

  • Hero Member
  • *****
  • Posts: 715
Re: RT2A on SGX
« Reply #27 on: March 21, 2016, 03:54:31 AM »
Besides a couple of graphical glitches on my SuperGrafx. Everything seemed to work just fine going through my XRGB-mini this time. My screen never blacked out and it never tried to resync.

touko

  • Hero Member
  • *****
  • Posts: 953
Re: RT2A on SGX
« Reply #28 on: March 21, 2016, 04:29:01 AM »
Quote
My screen never blacked out and it never tried to resync.
Cool, i deleted the resolution switch on vblank .  :wink:

Quote
Besides a couple of graphical glitches on my SuperGrafx
Where have you those glitches exactly ??
If you can test directly on your tv(and not through your XRGB-mini) to see if the glitches have disappeared.
« Last Edit: March 21, 2016, 04:32:20 AM by touko »

MNKyDeth

  • Hero Member
  • *****
  • Posts: 715
Re: RT2A on SGX
« Reply #29 on: March 21, 2016, 04:37:30 AM »
There is one, when I die I become a white or grey object. It seems to be a random color. Hard to describe really. I see the flame animation and then my ship becomes the squares or square type objects before going to the End Of Game screen.

Sometimes when I kill the missile coming at me it becomes two black bars in the location that I killed it.

Those seem to be the only two I have seen so far. I havn't gotten very far into the game yet.