ossc icon indicating copy to clipboard operation
ossc copied to clipboard

Request: Support for 17kHz modes (MDA/Hercules)

Open root42 opened this issue 2 years ago • 14 comments

It would be cool if IBM MDA and Hercules modes (17kHz) could be supported, too. I can test, as I have the hardware.

I use the GGLabs CGA2VGA converter to bring the TTL levels to VGA levels, which works fine for CGA (15kHz) and EGA (25kHz) modes. However MDA/HGC are still not supported on the OSSC.

root42 avatar Feb 11 '23 14:02 root42

What do you mean by being not supported, not syncing at all (e.g. no stable numbers on the front LCD) or nothing displayed on the connected monitor? 17kHz @ 50Hz is 340 lines which I think should currently map to GBI preset (while not ideal, should still show something).

marqs85 avatar Feb 12 '23 14:02 marqs85

It does not sync at all. No numbers on the front LCD. Actually it's 350 lines at 49 Hz, IIRC. At least that's what I measured on the scope on all three cards I tried. So there should be something showing you say?

root42 avatar Feb 12 '23 14:02 root42

I just tested the following generated MDA-like modeline via PC which did work:

Modeline "720x340_49 (MDA)" 15.126 720 738 873 882 340 341 344 350 -hsync -vsync.

The problem might be in sync detection of the analog frontend chip. I'm currently working on a beta firmware which bypasses the chip's sync processing as much as possible and replaces it with custom logic. I'll post soon some details how to take it into use (requires a small HW modification and USB Blaster).

marqs85 avatar Feb 12 '23 17:02 marqs85

Cool. How do I import this modeline into my OSSC?

root42 avatar Feb 12 '23 18:02 root42

The modeline was just a sanity check whether a 350-line input signal will match a preset which it did. A new MDA preset could be eventually added on the firmware but current lack of it is not really causing the problem here.

marqs85 avatar Feb 12 '23 18:02 marqs85

49hz sounds pretty weird. @root42 have you tried looking up official docs on the MDA refresh rate?

On Sun, Feb 12, 2023 at 10:26 AM marqs85 @.***> wrote:

The modeline was just a sanity check whether a 350-line input signal will match a preset which it did. A new MDA preset could be eventually added on the firmware but current lack of it is not really causing the problem here.

— Reply to this email directly, view it on GitHub https://github.com/marqs85/ossc/issues/101#issuecomment-1427099904, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANPGZ5JAPV4H3B2DIDAOHKDWXETNTANCNFSM6AAAAAAUYXI5ZY . You are receiving this because you are subscribed to this thread.Message ID: @.***>

alanbork avatar Feb 12 '23 18:02 alanbork

@marqs85 FYI, I am connecting through the GGLabs CGA2VGA, which inverts the polarity, so it comes up positive, as expected for VGA, plus it adjusts the signal levels. It just can't do anything about the refresh rate or scanlines, obviously. @alanbork Let me check the docs about MDA/HGC!

root42 avatar Feb 12 '23 18:02 root42

Docs I can find say 50 Hz. But my cards output 49Hz pretty smack on, according to my scope:

Screenshot 2023-02-12 at 20 01 14

Horizontal freq at 18.1 kHz:

Screenshot 2023-02-12 at 20 02 35

root42 avatar Feb 12 '23 19:02 root42

One more note: The GGLabs SHOULD invert the sync pulses, however I compare VSync between my VGA card (+vsync) to the HGC -- and the HGC always has -vsync! With or without GGLabs! So there is something wrong with my GGLabs! No matter how I set the DIP switches it doesn't invert the vsync. That's probably why my OSSC can't lock on.

root42 avatar Feb 12 '23 19:02 root42

Wouldn't that mean 18147/49.04=370 lines? Sync polarity shouldn't matter, but I've not really tested much with sources with positive polarity.

marqs85 avatar Feb 12 '23 19:02 marqs85

370 lines maybe with overscan? I am absolutely no expert regarding video modes... However I get the same numbers on all my cards.

root42 avatar Feb 12 '23 19:02 root42

Yes, I was talking about total number of lines.

marqs85 avatar Feb 12 '23 19:02 marqs85

Ok, so you are saying that the sync polarity doesn't matter? Then I guess the GGLabs is perhaps even working as intended. I would have assumed that polarity does matter, but I have no idea how the OSSC works internally. :)

root42 avatar Feb 12 '23 19:02 root42

The chip is supposed to accept any polarity, but I wouldn't be too surprised if it didn't. Here is the thread for the new beta fw.

marqs85 avatar Feb 12 '23 20:02 marqs85