Help with Hercules InColor emulation.

Support and general discussion.
Post Reply
User avatar
Neville
Posts: 16
Joined: Tue 02 Aug, 2016 1:43 pm

Help with Hercules InColor emulation.

Post by Neville » Wed 22 Aug, 2018 1:42 pm

Since I heard "Karateka" has support for this card I've been wanting to give it a try. However, I've come into a few obstacles.

1) What machine works reasonably well with this card? I've tried a few of the older ones, but either they come with in-built video cards or the BIOS doesn't seem to recognise the HIC card, asking me to configure it as a "monochrome" adaptor.

2) Do I need an special edition of the game?

3) Do I need any HIC drivers?

User avatar
JohnElliott
Posts: 73
Joined: Sun 31 Jan, 2016 7:29 pm

Re: Help with Hercules InColor emulation.

Post by JohnElliott » Wed 22 Aug, 2018 4:25 pm

There's no BIOS support for the InColor card, just like there wasn't for the original Hercules card - you configure either as MDA.

I remember testing a copy of Karateka found online with a real InColor card and it didn't work - the dump was missing the required graphic files for HIC support. You might be encountering the same problem.

User avatar
Neville
Posts: 16
Joined: Tue 02 Aug, 2016 1:43 pm

Re: Help with Hercules InColor emulation.

Post by Neville » Wed 22 Aug, 2018 4:35 pm

Can you remember what machine you used to test the HIC? That could save me a lot of testing.

User avatar
JohnElliott
Posts: 73
Joined: Sun 31 Jan, 2016 7:29 pm

Re: Help with Hercules InColor emulation.

Post by JohnElliott » Wed 22 Aug, 2018 6:41 pm

It was on an Amstrad PC1512, but that's not the best machine to use because Karateka uses the onboard CGA in preference to the InColor, and I had to patch that check out. Once that was done, it just stopped at a message saying 'Make sure your Karateka disk is in drive A:' as it tried to access whichever file wasn't there.

BigAlUK
Posts: 33
Joined: Mon 15 Feb, 2016 8:27 pm

Re: Help with Hercules InColor emulation.

Post by BigAlUK » Mon 24 Sep, 2018 1:34 pm

I came across an intriguing result whilst experimenting with my 5150 emulation accuracy tester (that's not what it started out as - honest).

If I use it on PCE with a Hercules HGC emulation, it correctly identifies that. But if I run it on PCem, it does not. The BIOS doesn't actually know that it is a Hercules - it records it as an MDA. What my code does is look for the CRTC port and test for sync signal changes occurring. Apparently, this is a standard way of telling MDA and HGC apart when dealing with real hardware. I was actually stunned when it worked with PCE. But it doesn't with PCem (though it may be that PCem is emulating the signal more slowly and I have to use a longer sampling loop).

Just thought I'd throw that in there to see if that helps your thinking at all.

BigAlUK
Posts: 33
Joined: Mon 15 Feb, 2016 8:27 pm

Re: Help with Hercules InColor emulation.

Post by BigAlUK » Mon 24 Sep, 2018 1:44 pm

I was right! PCem needs me to keep sampling the port for a bit longer. This also shows a problem with this method of detection: namely if it is not a Hercules, you could be in that loop for a very long time! Just how long is long enough?

But now I was also able try PCem's Hercules InColor emulation - and my code detected the CRTC vsync for that too. Now I all need to search for a way to tell HGC and InColor apart! (oh, and a better algorithm than one based on trying to sample a quasi-realtime pulse) :)

So, anyways - where I was going with this is that detection routines (in the games, etc) may depend upon idiosyncrasies like this - and thus whether your emulation speed is even a close match to the reality - as I just discovered!

User avatar
JohnElliott
Posts: 73
Joined: Sun 31 Jan, 2016 7:29 pm

Re: Help with Hercules InColor emulation.

Post by JohnElliott » Mon 24 Sep, 2018 4:05 pm

BigAlUK wrote:
Mon 24 Sep, 2018 1:44 pm
But now I was also able try PCem's Hercules InColor emulation - and my code detected the CRTC vsync for that too. Now I all need to search for a way to tell HGC and InColor apart! (oh, and a better algorithm than one based on trying to sample a quasi-realtime pulse) :)
Take a look at bits 6-4 of the vsync register (0x3BA) - they should be 101 for InColor, 001 for HGC+, 000 for original Herc.

BigAlUK
Posts: 33
Joined: Mon 15 Feb, 2016 8:27 pm

Re: Help with Hercules InColor emulation.

Post by BigAlUK » Mon 24 Sep, 2018 7:14 pm

Ok ta - will try that later :) :) :)

BigAlUK
Posts: 33
Joined: Mon 15 Feb, 2016 8:27 pm

Re: Help with Hercules InColor emulation.

Post by BigAlUK » Tue 25 Sep, 2018 12:43 am

Yep - that worked (ta)

BigAlUK
Posts: 33
Joined: Mon 15 Feb, 2016 8:27 pm

Re: Help with Hercules InColor emulation.

Post by BigAlUK » Tue 25 Sep, 2018 5:29 pm

By the way - loving your website, John. I see you had that algorithm written out a lot clearer than my source (I was using the source code from Marcus Johnson as reference, and had not fully appreciated what he was doing there in my haste to simply get basic detection).

Post Reply