Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Most MiSTer jtcores break experimental DV1 support and put MiSTer into a bad state #535

Closed
c0d3h4x0r opened this issue Feb 7, 2024 · 14 comments
Assignees
Labels
enhancement New feature or request

Comments

@c0d3h4x0r
Copy link

This is a reliable repro, starting from a powered-off state, using MiSTer_unstable_240203_16710d and the latest stable menu.rbf (from 2023).

MiSTer.ini has direct_video=1 and video_mode=8 in the default section, but it has direct_video=0 for the [menu] section.

Repro Steps:

  1. Power on.
  2. menu.rbf loads. RetroTink-4K OSD correctly displays 1920x1080. Good.
  3. Load MegaDrive_unstable_240127_16710d.rbf and load Sonic the Hedgehog. RetroTink-4K OSD correctly displays 240p (MegaDrive) and correctly auto-decimates and auto-crops the image. Good.
  4. RetroTink-4K's OSD diagnostic also displays the SPD Infoframe data. Make a note of it.
  5. Open MiSTer OSD >> Core >> select the jotego arcade core "Quartet".

Actual Result:
RetroTink-4K does not detect that the video source has changed (its OSD still displays MiSTer 240p (MegaDrive) and still displays the same SPD Infoframe data), and it does not correctly auto-crop or auto-decimate the image. It appears that MiSTer is still sending the SPD infoframes for the MegaDrive core, despite it no longer being the running core.

Expected Result:
RetroTink-4K should detect a video source change, see a new SPD infoframe, and stop applying the MegaDrive core's DV1 settings.

Repro Steps (continued):

  1. Open the OSD >> Reboot (warm, not cold) >> arrive back at menu.rbf.

Actual Result:
RetroTink-4K detects a video source change and displays HDMI 1080p in its OSD, but the image is cropped and scaled incorrectly. RetroTink-4K appears to still be applying the MegaDrive core's DV1 settings.

Expected Result:
RetroTink-4K should stop applying any auto-decimation or auto-cropping because the menu.rbf core is explicitly configured to not use DirectVideo.

Repro Steps (continued):

  1. Power off MiSTer, and power it back on.
  2. Repeat repro steps 1-5.
  3. Open the OSD >> Reboot (Cold Reboot) >> arrive back at menu.rbf.

Actual Result:
RetroTink-4K detects a video source change and displays HDMI 1080p in its OSD, but the image is cropped and scaled incorrectly. RetroTink-4K appears to still be applying the MegaDrive core's DV1 settings.

Expected Result:
RetroTink-4K should stop applying any auto-decimation or auto-cropping because the menu.rbf core is explicitly configured to not use DirectVideo.

Final observation:
Most of the jtcores cause MiSTer to end up in a permanently bad state in which it is "stuck" using stale DV1 data. The only way I've found out of this state (so far) is to hard power cycle MiSTer. I have not (yet) been able to repro this same issue with any non-Jotego cores.

@c0d3h4x0r
Copy link
Author

c0d3h4x0r commented Feb 7, 2024

Additional notes:

Does not repro when I follow the same steps but use an official DV1-updated core (ex: "Tropical Angel" arcade) instead of "Quartet".

Does not repro when I follow the same steps but use an official non-DV1-updated core (ex: NeoGeo) instead of "Quartet".

Does not repro when I follow the same steps but use the latest JT1942.rbf instead of "Quartet". (So not all jtcores cause this to happen.)

After entering the bad state by loading "Quartet", loading a core that has been updated to the latest official framework (and which normally works with DV1 just fine, ex: "Tropical Angel" arcade) does not work correctly and does not cause MiSTer to return to a proper working state. Only a hard power cycle will get DV1 behaving correctly again.

@birdybro
Copy link

birdybro commented Feb 7, 2024

This comment from @paulb-nl is likely helpful for jotego:

MiSTer-devel/Main_MiSTer#808 (comment)

@birdybro
Copy link

birdybro commented Feb 7, 2024

In sys.tcl the following line is missing from Jotego's fork of the framework:

image

@jotego
Copy link
Owner

jotego commented Feb 7, 2024

In sys.tcl the following line is missing from Jotego's fork of the framework:

That explains a lot! Thanks!

@c0d3h4x0r
Copy link
Author

Nice catch!

@jotego
Copy link
Owner

jotego commented Feb 7, 2024

I have applied the change in f32092a
I checked the files again and I could not see relevant differences with the template. Again, I am not modifying the core logic at all for this. I am assuming the changes come from the MiSTer subsystem.

@c0d3h4x0r
Copy link
Author

If it will help, I can test a private build against my RetroTink-4K and report back.

@mikechi2
Copy link

mikechi2 commented Feb 7, 2024

Hey @jotego , if you like, I'm more than happy to send you a RT4K. Thanks a lot for taking a look at this.

@jotego
Copy link
Owner

jotego commented Feb 7, 2024

Thanks, @mikechi2, I am expecting to borrow one next week. Are you involved in the development of RT4K?

@jotego jotego self-assigned this Feb 7, 2024
@jotego jotego added the enhancement New feature or request label Feb 7, 2024
@jotego jotego added this to JTCores Feb 7, 2024
@jotego jotego moved this to 🏗 In progress in JTCores Feb 7, 2024
@mikechi2
Copy link

mikechi2 commented Feb 7, 2024

Thanks, @mikechi2, I am expecting to borrow one next week. Are you involved in the development of RT4K?

Yes you could say that ;)

I just sent you a DM on Twitter since we follow each other.

@asturur
Copy link

asturur commented Feb 8, 2024

Are you involved? Slightly

Image

@jotego
Copy link
Owner

jotego commented Feb 9, 2024

All MiSTer files updated today in JTBIN. Let me know how it goes.

@jotego
Copy link
Owner

jotego commented Feb 9, 2024

@jotego jotego closed this as completed Feb 9, 2024
@github-project-automation github-project-automation bot moved this from 🏗 In progress to ✅ Done in JTCores Feb 9, 2024
@c0d3h4x0r
Copy link
Author

Looks great on my end! Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Archived in project
Development

No branches or pull requests

5 participants