Forums

Sega Master System / Mark III / Game Gear
SG-1000 / SC-3000 / SF-7000 / OMV
Home - Forums - Games - Scans - Maps - Cheats - Credits
Music - Videos - Development - Hacks - Translations - Homebrew

View topic - Can the Everdrive mess up TV type detection?

Reply to topic
Author Message
  • Joined: 01 Feb 2014
  • Posts: 878
Reply with quote
Can the Everdrive mess up TV type detection?
Post Posted: Tue Feb 06, 2024 5:57 pm
I made a little program for the upcoming competition and I encountered a strange bug I don’t really know what to make of.

When I test it on real hardware via Master Everdrive X7, the TV type detection seems to fail. The program runs in 50 Hz mode even though the system runs at 60 Hz, so everything is going too fast. On the other hand, the same program works absolutely fine in Emulicious and also on the Mega SG hardware.

I can’t rule out that it’s my Master System, as that was originally a PAL machine that’s now permanently stuck in 60 Hz mode after a botched attempt at installing a switch. However, I used the exact same detection routine in Flight of Pigarus and that have always the correct results.

Any thoughts or ideas?
  View user's profile Send private message
  • Joined: 15 Jul 2022
  • Posts: 29
Reply with quote
Post Posted: Tue Feb 06, 2024 6:05 pm
Hi,

I also have an everdrive X7 with a modded Master System 2 PALto switch from 50 to 60hz.

Did you use the Master System region detection to perform your test ?[/url]

If you have a code example, I might be able to take a look and test it on my own.
  View user's profile Send private message
  • Joined: 01 Feb 2014
  • Posts: 878
Reply with quote
Post Posted: Wed Feb 07, 2024 8:22 am
KingQuack wrote
Did you use the Master System region detection to perform your test ?

No, in this case I use this code. I’ve also used the exact same code in the past, both in Flight of Pigarus and in my WIP Mermaid game, and it has never failed me in either. Hence my question if maybe the Everdrive writes something to System RAM. The byte that stores the TV type information is located at $C000, right at the beginning of RAM. In the other two games, it’s positioned somewhere else.
  View user's profile Send private message
  • Joined: 05 Sep 2013
  • Posts: 3828
  • Location: Stockholm, Sweden
Reply with quote
Post Posted: Wed Feb 07, 2024 8:57 am
I wouldn't expect it to disrupt your RAM, but... did you try moving that byte in some other place?
  View user's profile Send private message Visit poster's website
  • Joined: 15 Jul 2022
  • Posts: 29
Reply with quote
Post Posted: Wed Feb 07, 2024 3:07 pm
I perform a test myself, with the everdrive X7 on a SMS 2, and I can confirm that the TVTypeDection code is working well.

I can switch from 50 to 60hz and the code detects the change.

You can also try to use sverx's SMS Test Suite ROM too.
  View user's profile Send private message
  • Joined: 05 Sep 2013
  • Posts: 3828
  • Location: Stockholm, Sweden
Reply with quote
Post Posted: Wed Feb 07, 2024 4:08 pm
KingQuack wrote
You can also try to use sverx's SMS Test Suite ROM too.


but the Test Suite uses a completely different approach to detecting if it's 50 or 60 Hz, not 'cycle count' based but detecting the vcount 'roll-back' count.
  View user's profile Send private message Visit poster's website
  • Joined: 15 Jul 2022
  • Posts: 29
Reply with quote
Post Posted: Wed Feb 07, 2024 6:22 pm
sverx wrote

but the Test Suite uses a completely different approach to detecting if it's 50 or 60 Hz, not 'cycle count' based but detecting the vcount 'roll-back' count.


ah right, I admit I didn't look at how the test was carried out.

For my part, here's what I used.
I just draw a 0 or a 1 on the screen depending on the result.
  View user's profile Send private message
  • Joined: 01 Feb 2014
  • Posts: 878
Reply with quote
Post Posted: Thu Feb 08, 2024 6:27 am
Problem solved, nothing to see here. It was human failure after all. Console, Everdrive and detection code are all working as they should. Turns out it was just me being stupid.

Apparently, I accidentally commented out a di, which in turn messed up the detection. It’s actually weird it even worked in Emulicious and on the Mega SG in the first place.
  View user's profile Send private message
  • Joined: 29 Mar 2012
  • Posts: 886
  • Location: Spain
Reply with quote
Post Posted: Thu Feb 08, 2024 6:55 am
Not saying that is the case, but....

The last time I was scratching my head why some ROM was working on emulicious and was not working on the everdrive, the root cause was....that I didn't copy it to the sd and I was testing the wrong one!
  View user's profile Send private message
  • Joined: 05 Sep 2013
  • Posts: 3828
  • Location: Stockholm, Sweden
Reply with quote
Post Posted: Thu Feb 08, 2024 8:23 am
Kagesan wrote
Apparently, I accidentally commented out a di, which in turn messed up the detection. It’s actually weird it even worked in Emulicious and on the Mega SG in the first place.


Interesting! I suspect the difference could be that the Master EverDrive leaves the interrupts enabled before starting the ROM while the others might start that with interrupts disabled.
In either case, never assume any previous status, always set some initial setting yourself.
  View user's profile Send private message Visit poster's website
Reply to topic



Back to the top of this page

Back to SMS Power!