MiSTer-devel / C128_MiSTer

https://misterfpga.org
41 stars 8 forks source link

VDC incorrect resolution bug and reset bug #6

Closed frnno967 closed 2 years ago

frnno967 commented 2 years ago

I commented on your YouTube video "MiSTer FPGA C128 core first look" where I mentioned the serial port/modem capabilities. I downloaded and installed the latest core from here (Release 20220606). My MiSTeR is also fully updated. Using NTSC mode, V2 VDC, and default settings for everything else, I ran DesTerm 128 v2.0 available from here (run it from the DesTerm 128 v2.0 program.d64 disk image). When I ran the program it switches the VDC to some kind of Hi-Resolution mode that was way outside of the usable range of my flat screen monitor. I then hooked it up to a CRT VGA monitor that was able to display the screen but the aspect ratio and refresh rate were very strange, something like 1616x249 8.12KHz. After the program finishes loading (takes a long time, ~5 minutes) all of its modules, it puts the VDC back into a normal text-type mode which showed up correctly again with a normal resolution. But you might want to investigate why the VDC is corrupting the startup image and putting out a strange picture. Please see the picture below showing what it should look like and the photos of how its coming out. desterm 128 v2 0 PXL_20220622_035904008 PXL_20220622_035917635

Also, a different bug was observed where the core would not reset properly or at all using the Reset selection on the MiSTeR F12 menu. Only a cold reboot would restore the core to normal operation.

The C64 UART Modem functionality did work, although it was not very reliable and would stop functioning sometimes for unknown reasons. Only a cold restart would make it work again. But this is not necessarily the fault of the C128 core because I've also found it to be unreliable on the C64 core too using CCGMS and NovaTerm. I'll continue to test it and report issues found if you're able to correct any of them. Thanks!

eriks5 commented 2 years ago

VDC is currently implemented just enough for standard text and graphics modes to work as documented in the README, so the graphics issues were to be expected as this uses something non-standard.

I never encountered the reboot issues with all my many days of testing. It might have been Z80 related and fixed in the latest release, or something with your MiSTer?

frnno967 commented 2 years ago

I was hoping that you could use this program as a test case to try to diagnose and further implement the VDC modes. I don't believe it's actually non-standard, but it's probably trying to use Interlace and that's coming out as a non-standard resolution because it's not fully implemented yet.

And cold rebooting of the MiSTer works fine, it's only the warm reboot of the core (reset) that does not work correctly. I'll try the latest core and if the problem is still happening film a video showing the problem to aid in diagnosis.

eriks5 commented 2 years ago

Looking at the picture it looks like they use double wide characters since every column looks squished. So maybe some variant of the 40 column mode? Not sure. It's definitely not a standard 80 column video mode. I have a list of programs that create "interesting" outputs on the VDC implementation, I already added this one to the list ;)

While debugging the Z80 issues I sometimes did warm resets several times a minute and never had any issue with that...

eriks5 commented 2 years ago

Just had a situation where there was no more video output after running something that ran the VDC in a currently unsupported mode.

The core still worked, I could hear the pop of the sid initializing on soft reset, the video output just stayed blank. Looks like the MiSTer video scaler gets in a state where it will no longer work after receiving invalid video modes. So, this should be solved once VDC is properly implemented.

frnno967 commented 2 years ago

Understood. But in the case of this particular program the VDC does recover after the software finishes loading and it goes back to a standard 80x25 text mode. And I think it is a VDC problem because the resolution that MiSTer reports is something that no vintage commodore monitor would have supported but this program did in fact work on the original hardware. Hopefully it's just something buggy or not implemented fully yet.