MDA Upgrade to Hercules

Malor
Top Contributor
Posts: 860
Joined: Wed Feb 09, 2022 11:50 pm
Has thanked: 64 times
Been thanked: 194 times

Re: MDA Upgrade to Hercules

Unread post by Malor »

I always thought of Hercules graphics as being pretty simple. Apparently there's a lot more going on than I thought. Lots of magic values, and you just know that some games are going to be tweaking those in nonstandard ways.

Seems like full support will be unpleasantly complex to implement. You might need an actual XT with an actual Hercules to test with. Yuck.

jca
Top Contributor
Posts: 1911
Joined: Wed May 27, 2020 1:59 pm
Has thanked: 145 times
Been thanked: 454 times

Re: MDA Upgrade to Hercules

Unread post by jca »

Malor wrote: Wed Jan 18, 2023 5:12 pm

I always thought of Hercules graphics as being pretty simple. ...

Yes it was pretty simple, it is basically a hacked MDA card. In text mode it uses the same chips in the same configuration which made it a great card: fully compatible with MDA.
I graphic mode the video chip is reprogrammed for 720x348, the character generator is not used and the graphic memory is just a bitmap. Nothing fancy.
On PCXT there is a graphic memory addressing problem: a vertical band which should be on the left side ends up on the right side, in AutoCAD the text rendered in graphic mode is kind of messed up. Today I made another test where I used the mouse and the cross-hair leaves some remnants on the screen. I will post a screenshot later on today.
There is also this strange problem of 600x300 resolution which does not exists on the Hercules card, someone did it: on a PC XT any program could do anything it wanted, in particular access directly the hardware. I guess SimCGA reprograms the video chip for 600x300.

jca
Top Contributor
Posts: 1911
Joined: Wed May 27, 2020 1:59 pm
Has thanked: 145 times
Been thanked: 454 times

Re: MDA Upgrade to Hercules

Unread post by jca »

I did not realize that a new version of the core was released, I will have to try it.
Hercules was a long time ago and I thought that the card had its own BIOS, reading the post announcing the new version it states it did not. The main reason is that the card was fully compatible with MDA in text mode and setting up the card to graphics was up to the program. For this reason SimCGA had to do it. It had to choose a resolution higher than CGA to do some form of dithering. 600x300 seems strange but I guess it was the higher resolution which was also suitable for CGA emulation.

jca
Top Contributor
Posts: 1911
Joined: Wed May 27, 2020 1:59 pm
Has thanked: 145 times
Been thanked: 454 times

Re: MDA Upgrade to Hercules

Unread post by jca »

As promised here is the snapshot with AutoCAD cross-hair problem.
Note the following:
The vertical part of the cross-hair is always a dotted line and leaves a lot of remnants on the screen when the mouse is moved.
The horizontal part of the cross-hair shows as a continuous line as it should. When the mouse is moved it leaves some remnants on the screen as shorts segments here and there.

Attachments
Crosshair.jpg
Crosshair.jpg (269.25 KiB) Viewed 9186 times
jca
Top Contributor
Posts: 1911
Joined: Wed May 27, 2020 1:59 pm
Has thanked: 145 times
Been thanked: 454 times

Re: MDA Upgrade to Hercules

Unread post by jca »

I tried to make some measurements to see if it could help but had to cut it short before going insane.
The first test was this vertical band which should have been on the left of the screen but appears on the right (see attached pic).
This band is offset vertically by 4 pixels which is a strange number but at least is a power of 2.
The width of the band is 10 pixels :shock: which does not seems right: 8 or 16 would have been better.
I cut this 10 pixels wide band and pasted it on the left of the picture with a 4 pixels downward offset. To my semi horror there is a gap in the horizontal line and this gap is 6 pixels wide. 10 + 6 = 16.
So a band of 16 pixels wide disappeared from the left side of the pic and only the 10 leftmost pixels of this band reappeared on the right side of the pic offset upwards by 4 pixels.
The dots of the vertical part of the cross-hair are 2 pixels high with a vertical gap of 2 pixels.

Edit:
Another thing about these vertical "dots": they always appear in the same vertical position and remain on the screen until sometimes when moving the mouse left and right a vertical column of dots disappears. This make sense as the cross-hair has to be drawn with a XOR. What does not make sense is that there are remnants in the first place and that only a few of these columns are erased when moving the mouse like if the mouse is moving by variable quantum jumps. Could it come from the mouse handling in the core?

Attachments
Corner.jpg
Corner.jpg (791 Bytes) Viewed 9166 times
User avatar
Newsdee
Top Contributor
Posts: 873
Joined: Mon May 25, 2020 1:07 am
Has thanked: 104 times
Been thanked: 239 times

Re: MDA Upgrade to Hercules

Unread post by Newsdee »

spark2k06 wrote: Wed Jan 18, 2023 5:05 pm
  • [ F11 key (Tandy/CGA will always work with Tandy 1000 model).

Would iit be possible to have a key shortcut to toggle composite mode in CGA on and off? (eg. shift F11)

jca
Top Contributor
Posts: 1911
Joined: Wed May 27, 2020 1:59 pm
Has thanked: 145 times
Been thanked: 454 times

Re: MDA Upgrade to Hercules

Unread post by jca »

jca wrote: Thu Jan 19, 2023 12:36 am

...
So a band of 16 pixels wide disappeared from the left side of the pic and only the 10 leftmost pixels of this band reappeared on the right side of the pic offset upwards by 4 pixels ....

I said to myself that I was giving up to understand what could be the problem but this thing is still spinning in my head and realize that the above sentence is stupid. It should be:
So a band of 16 pixels wide disappeared from the left side of the pic and only the 10 RIGHTMOST pixels of this band reappeared on the right side of the pic offset upwards by 4 pixels.

When I made the test and pasted the band to the left of the picture the letters in this band where too far from the letters which were on the left of the original screen, by moving the band 6 pixels to the right all the letters are in the right place.

I don't know if all this stuff is useful to figure out what the problem is but at this time I am done with it.

User avatar
spark2k06
Core Developer
Posts: 876
Joined: Sat Jun 06, 2020 9:05 am
Has thanked: 409 times
Been thanked: 969 times

Re: MDA Upgrade to Hercules

Unread post by spark2k06 »

I have already reorganised the code, I share the changes in the prerelease branch:

https://github.com/MiSTer-devel/PCXT_Mi ... 3b31093ef1

I have also attached a new binary, I have simply updated the splash screen, with information about the new F11 shortcut key:

SplashScreen.jpg
SplashScreen.jpg (184.03 KiB) Viewed 9044 times
Newsdee wrote: Thu Jan 19, 2023 1:21 am

Would iit be possible to have a key shortcut to toggle composite mode in CGA on and off? (eg. shift F11)

I'm not convinced by the idea, shortcut keys should be very exceptional. F11 for switching from HGC to CGA and vice versa seems useful to me because there may be software that uses both cards simultaneously, and in the absence of two monitors, a quick switch between one and the other is interesting.

However, the change to composite video should be circumstantial and permanent in the session depending on the game, and remember that you also have the XTCTL utility to run in a BAT file prior to the software that makes use of composite video, and whose change will not remain after a Hard Reset.

Attachments
PCXT_Hercules_V4.zip
(1.35 MiB) Downloaded 158 times
suww37
Posts: 173
Joined: Sun Apr 17, 2022 2:24 am
Has thanked: 7 times
Been thanked: 15 times

Re: MDA Upgrade to Hercules

Unread post by suww37 »

spark2k06 wrote: Thu Jan 19, 2023 10:33 am

I have already reorganised the code, I share the changes in the prerelease branch:

https://github.com/MiSTer-devel/PCXT_Mi ... 3b31093ef1

I have also attached a new binary, I have simply updated the splash screen, with information about the new F11 shortcut key:

SplashScreen.jpg

Newsdee wrote: Thu Jan 19, 2023 1:21 am

Would iit be possible to have a key shortcut to toggle composite mode in CGA on and off? (eg. shift F11)

I'm not convinced by the idea, shortcut keys should be very exceptional. F11 for switching from HGC to CGA and vice versa seems useful to me because there may be software that uses both cards simultaneously, and in the absence of two monitors, a quick switch between one and the other is interesting.

However, the change to composite video should be circumstantial and permanent in the session depending on the game, and remember that you also have the XTCTL utility to run in a BAT file prior to the software that makes use of composite video, and whose change will not remain after a Hard Reset.

Has the Hercules graphics bug issue been resolved? Still, when I run Hercules-only programs, the graphics or characters are broken, and the left side of the screen is cut off and attached to the right side.

User avatar
spark2k06
Core Developer
Posts: 876
Joined: Sat Jun 06, 2020 9:05 am
Has thanked: 409 times
Been thanked: 969 times

Re: MDA Upgrade to Hercules

Unread post by spark2k06 »

suww37 wrote: Thu Jan 19, 2023 12:49 pm

Has the Hercules graphics bug issue been resolved?

No

Still, when I run Hercules-only programs, the graphics or characters are broken, and the left side of the screen is cut off and attached to the right side.

spark2k06 wrote: Wed Jan 18, 2023 5:05 pm

Software that MiSTer identifies as 720x348 in graphics mode correctly, use the register values corresponding to the "Graphics" section of this table.

When MiSTer identifies, apparently erroneously, the 640x300 resolution, it uses register values like these (Games CGA with SIMCGA and Prehistorik, for example...):

...

In short, not only SIMCGA makes use of non-standard registers, but other games and software as well, such as Prehistorik, among others...

Those games or software (like Monkey Island, Prince Of Persia, etc...) that use the standard registers, the resolution is correct and there are no glitches.

As I have already mentioned, this remains the case for the moment... is already much more than just MDA.

suww37
Posts: 173
Joined: Sun Apr 17, 2022 2:24 am
Has thanked: 7 times
Been thanked: 15 times

Re: MDA Upgrade to Hercules

Unread post by suww37 »

spark2k06 wrote: Thu Jan 19, 2023 1:57 pm
suww37 wrote: Thu Jan 19, 2023 12:49 pm

Has the Hercules graphics bug issue been resolved?

No

Still, when I run Hercules-only programs, the graphics or characters are broken, and the left side of the screen is cut off and attached to the right side.

spark2k06 wrote: Wed Jan 18, 2023 5:05 pm

Software that MiSTer identifies as 720x348 in graphics mode correctly, use the register values corresponding to the "Graphics" section of this table.

In short, not only SIMCGA makes use of non-standard registers, but other games and software as well, such as Prehistorik, among others...

Those games or software (like Monkey Island, Prince Of Persia, etc...) that use the standard registers, the resolution is correct and there are no glitches.

As I have already mentioned, this remains the case for the moment... is already much more than just MDA.

Is there no solution to the problem at the moment? There seems to be quite a lot of programs or games that use Hercules' non-standard registers. Do we have to wait for help from someone?

User avatar
spark2k06
Core Developer
Posts: 876
Joined: Sat Jun 06, 2020 9:05 am
Has thanked: 409 times
Been thanked: 969 times

Re: MDA Upgrade to Hercules

Unread post by spark2k06 »

suww37 wrote: Thu Jan 19, 2023 2:30 pm

Is there no solution to the problem at the moment? There seems to be quite a lot of programs or games that use Hercules' non-standard registers. Do we have to wait for help from someone?

Correct, the sources are already available for anyone who can help, and soon I will publish the release for everyone despite this problem, as I said, before we didn't even have the graphical mode.

Malor
Top Contributor
Posts: 860
Joined: Wed Feb 09, 2022 11:50 pm
Has thanked: 64 times
Been thanked: 194 times

Re: MDA Upgrade to Hercules

Unread post by Malor »

Didn't XTs have F11? If they did, or could use a keyboard with that key, mapping the mode switch there could interfere with real software. Win-F11 might be better, like Win-F12 is used in AO486 as the menu key. There were definitely no Windows keys until much later.

If XT function keys only went to F10, then obviously it wouldn't matter.

User avatar
mapf
Posts: 164
Joined: Mon Aug 31, 2020 8:05 pm
Has thanked: 58 times
Been thanked: 56 times

Re: MDA Upgrade to Hercules

Unread post by mapf »

Malor wrote: Thu Jan 19, 2023 8:27 pm

If XT function keys only went to F10, then obviously it wouldn't matter.

Yes, there were only 10 function keys on the original 83-key "Model F" keyboard for IBM PC/XT.

ibm_model_f_xt_cc-pd-raymangold22.jpg
ibm_model_f_xt_cc-pd-raymangold22.jpg (47.07 KiB) Viewed 8845 times

I had an XT clone (got it in 1989) with a clone keyboard, which also used this layout.

Malor
Top Contributor
Posts: 860
Joined: Wed Feb 09, 2022 11:50 pm
Has thanked: 64 times
Been thanked: 194 times

Re: MDA Upgrade to Hercules

Unread post by Malor »

Aha, thank you. I know there are physical connection differences between XT and AT keyboards, so them only going to F10 makes sense.

jca
Top Contributor
Posts: 1911
Joined: Wed May 27, 2020 1:59 pm
Has thanked: 145 times
Been thanked: 454 times

Re: MDA Upgrade to Hercules

Unread post by jca »

But there is an IBM BIOS which supports the IBM Enhanced Keyboard.
viewtopic.php?t=5869

User avatar
spark2k06
Core Developer
Posts: 876
Joined: Sat Jun 06, 2020 9:05 am
Has thanked: 409 times
Been thanked: 969 times

Re: MDA Upgrade to Hercules

Unread post by spark2k06 »

jca wrote: Thu Jan 19, 2023 9:13 pm

But there is an IBM BIOS which supports the IBM Enhanced Keyboard.
viewtopic.php?t=5869

What software compatible with XT machines uses either of these two keys? F11 or F12

jca
Top Contributor
Posts: 1911
Joined: Wed May 27, 2020 1:59 pm
Has thanked: 145 times
Been thanked: 454 times

Re: MDA Upgrade to Hercules

Unread post by jca »

That's a good question.

dmckean
Posts: 310
Joined: Sat Jan 16, 2021 7:03 am
Has thanked: 396 times
Been thanked: 95 times

Re: MDA Upgrade to Hercules

Unread post by dmckean »

Probably almost nothing. DOSBox completely ignores F11 and F12 keypresses and does not pass them to applications.

User avatar
Newsdee
Top Contributor
Posts: 873
Joined: Mon May 25, 2020 1:07 am
Has thanked: 104 times
Been thanked: 239 times

Re: MDA Upgrade to Hercules

Unread post by Newsdee »

spark2k06 wrote: Thu Jan 19, 2023 10:33 am

I'm not convinced by the idea, shortcut keys should be very exceptional. F11 for switching from HGC to CGA and vice versa seems useful to me because there may be software that uses both cards simultaneously, and in the absence of two monitors, a quick switch between one and the other is interesting.

However, the change to composite video should be circumstantial and permanent in the session depending on the game, and remember that you also have the XTCTL utility to run in a BAT file prior to the software that makes use of composite video, and whose change will not remain after a Hard Reset.

My usage is from the perspective of exploring a library of CGA games. I've found that many games, while lacking an explicit Composite mode, still look quite nice in Composite. And when starting with Composite mode, toggling it off temporarily can help read text for specific scenes in-game.

The caveat here is that this is all subjective. Some games in composite have color that remind me of the Apple II - which looks good for the era but may not be everybody's cup of tea. So the ability to toggle on the fly via shortcuts is useful beyond just a pre-configured startup; it helps both for readability and to quickly try whether a game works well in composite.

Given that the F11 shortcut only works for PCXT mode, how about making the same shortcut a composite on/off switch for Tandy mode?
That way there is no overlap in functionality nor additional key being used.

User avatar
spark2k06
Core Developer
Posts: 876
Joined: Sat Jun 06, 2020 9:05 am
Has thanked: 409 times
Been thanked: 969 times

Re: MDA Upgrade to Hercules

Unread post by spark2k06 »

Newsdee wrote: Fri Jan 20, 2023 12:46 am

Given that the F11 shortcut only works for PCXT mode, how about making the same shortcut a composite on/off switch for Tandy mode?
That way there is no overlap in functionality nor additional key being used.

I buy your idea, but because F11 is free in Tandy mode ;)

SplashScreen.png
SplashScreen.png (94.39 KiB) Viewed 8675 times

Already available in the new release I just published

Malor
Top Contributor
Posts: 860
Joined: Wed Feb 09, 2022 11:50 pm
Has thanked: 64 times
Been thanked: 194 times

Re: MDA Upgrade to Hercules

Unread post by Malor »

dmckean wrote: Thu Jan 19, 2023 10:15 pm

Probably almost nothing. DOSBox completely ignores F11 and F12 keypresses and does not pass them to applications.

DOSBox is explicitly for games only. I can't speak for spark2k06, but I was assuming that the XT core is supposed to be usable for more than that.

I'm pretty sure WordPerfect, for instance, uses F11. On the max speed version of the core, it's probably even usable.

User avatar
spark2k06
Core Developer
Posts: 876
Joined: Sat Jun 06, 2020 9:05 am
Has thanked: 409 times
Been thanked: 969 times

Re: MDA Upgrade to Hercules

Unread post by spark2k06 »

Malor wrote: Fri Jan 20, 2023 2:38 pm
dmckean wrote: Thu Jan 19, 2023 10:15 pm

Probably almost nothing. DOSBox completely ignores F11 and F12 keypresses and does not pass them to applications.

DOSBox is explicitly for games only. I can't speak for spark2k06, but I was assuming that the XT core is supposed to be usable for more than that.

I'm pretty sure WordPerfect, for instance, uses F11. On the max speed version of the core, it's probably even usable.

We'll see to what extent these keys are essential for a satisfactory user experience, but if it comes to the worst, we can always disable them with a new option from the OSD menu.

breiztiger
Top Contributor
Posts: 468
Joined: Sun May 24, 2020 7:17 pm
Has thanked: 35 times
Been thanked: 99 times

Re: MDA Upgrade to Hercules

Unread post by breiztiger »

hi

on my mister osd display "720X350 32.40KHZ 87.6HZ" when i am in hercule mode

doesn't to be 50HZ ?

CPC-Power Staff
User avatar
Newsdee
Top Contributor
Posts: 873
Joined: Mon May 25, 2020 1:07 am
Has thanked: 104 times
Been thanked: 239 times

Re: MDA Upgrade to Hercules

Unread post by Newsdee »

spark2k06 wrote: Fri Jan 20, 2023 9:27 am

Already available in the new release I just published

Perfect! Thanks so much!

jca
Top Contributor
Posts: 1911
Joined: Wed May 27, 2020 1:59 pm
Has thanked: 145 times
Been thanked: 454 times

Re: MDA Upgrade to Hercules

Unread post by jca »

When using Micro-88 BIOS the system boots only if the primary card is CGA. If Hercules is enabled it is possible to switch back and forth between CGA and Hercules.
While typing this post I got an idea:
CGA enabled, Hercules enabled and Primary Hercules.
The system boots, the primary card is Hercules and shows just a blinking cursor but pressing F11 switches to CGA and here it is: the system did boot.
If I disable CGA, enable Hercules, set Hercules as primary the same kind of thing thing happens: you have to press F11 to switch to CGA where you see the BIOS screen, the system starts to boot but nothing is visible as CGA is disabled. Going into the OSD and enabling CGA allows to finally see that the system did boot.
So Micro-88 allows only to boot on CGA, you can not longer boot in MDA/Hercules mode.

User avatar
spark2k06
Core Developer
Posts: 876
Joined: Sat Jun 06, 2020 9:05 am
Has thanked: 409 times
Been thanked: 969 times

Re: MDA Upgrade to Hercules

Unread post by spark2k06 »

jca wrote: Fri Jan 20, 2023 10:41 pm

When using Micro-88 BIOS the system boots only if the primary card is CGA. If Hercules is enabled it is possible to switch back and forth between CGA and Hercules.
While typing this post I got an idea:
CGA enabled, Hercules enabled and Primary Hercules.
The system boots, the primary card is Hercules and shows just a blinking cursor but pressing F11 switches to CGA and here it is: the system did boot.
If I disable CGA, enable Hercules, set Hercules as primary the same kind of thing thing happens: you have to press F11 to switch to CGA where you see the BIOS screen, the system starts to boot but nothing is visible as CGA is disabled. Going into the OSD and enabling CGA allows to finally see that the system did boot.
So Micro-88 allows only to boot on CGA, you can not longer boot in MDA/Hercules mode.

viewtopic.php?t=5884#p66085

User avatar
Newsdee
Top Contributor
Posts: 873
Joined: Mon May 25, 2020 1:07 am
Has thanked: 104 times
Been thanked: 239 times

Re: MDA Upgrade to Hercules

Unread post by Newsdee »

spark2k06 wrote: Thu Jan 19, 2023 10:33 am

there may be software that uses both cards simultaneously, and in the absence of two monitors

This reminded me of the GB2P and GBA2P cores: https://www.retrorgb.com/2-player-gb-gb ... ister.html

These cores have a feature where the HDMI and VGA video output of the MiSTer can show different screens.
Mabye some code can be reused to make PCXT work with real dual monitor output.

Obviously this is only nice to have and maybe not worth the effort at all,
but here it is if you want to add another "wow" feature for Hercules users :D
https://github.com/RobertPeip/Gameboy_M ... 582106b6fd

Edit: here is a video showing a couple of apps that support it: https://www.youtube.com/watch?v=4zugZGBPTSA
and it looks like a couple of demos at least use it, e.g.: https://www.youtube.com/watch?v=xsHZl8mhE6A

dmckean
Posts: 310
Joined: Sat Jan 16, 2021 7:03 am
Has thanked: 396 times
Been thanked: 95 times

Re: MDA Upgrade to Hercules

Unread post by dmckean »

Malor wrote: Fri Jan 20, 2023 2:38 pm
dmckean wrote: Thu Jan 19, 2023 10:15 pm

Probably almost nothing. DOSBox completely ignores F11 and F12 keypresses and does not pass them to applications.

DOSBox is explicitly for games only. I can't speak for spark2k06, but I was assuming that the XT core is supposed to be usable for more than that.

I'm pretty sure WordPerfect, for instance, uses F11. On the max speed version of the core, it's probably even usable.

I can't find where DOS versions of WordPerfect use F11. It doesn't seem to do anything on my real 486 and I went through the entire manual of WP 6 and cannot find any reference to it.

I'm sure something somewhere used F11 and F12 but I think it would have been really rare. Microsoft Windows seems not to have passed F11 and F12 keypresses to the command prompt until Windows NT 4.0 service pack 4.

Malor
Top Contributor
Posts: 860
Joined: Wed Feb 09, 2022 11:50 pm
Has thanked: 64 times
Been thanked: 194 times

Re: MDA Upgrade to Hercules

Unread post by Malor »

I guess my aging brain has let me down again, then. Wordperfect 5.1 used function keys very heavily, and I thought F11 was one of them, but I haven't touched it in probably thirty years.

Post Reply