PDA

View Full Version : EGA video corruption?



offensive_Jerk
June 11th, 2014, 06:29 AM
So I hooked up a EGA monitor to my IBM AT for the first time.
I was previously using a IBM CGA 5153 Monitor.

The hardware for the computer is the same. I'm running a IBM EGA card. Previously, I had the dip switches on the card set for CGA operation.
I hooked the EGA monitor up to my AT and noticed the quality should have been better as the resolution still looked low and the text looked interlaced.

That's when I turned the system off and changed the dip switches on the card for EGA mode. ( EGA │ 0 1 1 0) as per this thread. (although ON/OFF seems to be reversed on these switches.)
http://www.vintage-computer.com/vcforum/showthread.php?7622-IBM-EGA-card-DIP-switch-settings

I booted it back up and immediately noticed the text looked better. (sharper and better resolution).

I then wanted to fire up a game. I booted up Commander Keen 1 and the prompt states EGA detected. Then it boots to a garbled screen.
https://farm3.staticflickr.com/2901/14397034402_925058b2ca_b.jpg

I then booted up a golf game.
The screen starts with some corruption. But it seems when the screen changes, the image becomes more corrupt. For instance, the image of the golfer gets more corrupt as his swing animates.
https://farm4.staticflickr.com/3895/14374805126_112cf7496e_b.jpg
https://farm3.staticflickr.com/2903/14394566381_fa0a3ecd97_b.jpg

And on the copy protection screen, the image gets corrupt behind where I move the mouse cursor.

https://farm4.staticflickr.com/3882/14211268919_4cff3cba2d_b.jpg




Do I have bad RAM in my card? How can I tell which chip?

mikey99
June 11th, 2014, 07:08 AM
The IBM Diagnostics diskette has a selection to test the IBM EGA memory.
It also tests all the different resolution/modes of the adapter/display.

If you get a memory error during the test.....
There's a diagram describing how to determine the faulty chip.

More info here:

http://www.vintage-computer.com/vcforum/showthread.php?24068-IBM-EGA-video-memory-error-codes

Stone
June 11th, 2014, 08:01 AM
Checkit will test the video memory (and everything else, as well).

offensive_Jerk
June 11th, 2014, 10:42 AM
Checkit will test the video memory (and everything else, as well).

But there is an issue with Checkit and the EGA card.
http://www.minuszerodegrees.net/checkit_video_test/checkit_vt_problem.htm

I'll run the IBM Diags.

Stone
June 11th, 2014, 11:04 AM
I guess your card doesn't have 256K.

offensive_Jerk
June 11th, 2014, 12:46 PM
I guess your card doesn't have 256K.

No it doesn't. That piggy back card seems like it's hard to find

offensive_Jerk
June 11th, 2014, 03:38 PM
I ran the advanced diagnostics. When I run the EGA memory test, it asks how much memory, 64K? And I select yes since there are no daughterboards. The screen sort of flashes for a second, then goes back to the main menu. (not sure if that's what's supposed to happen?)
When I quit the diagnostics for the video, a line shows "Enhanced Graphics Adapter 2400" then goes back to the main menu. I'll start reading that thread mikey99 pointed to.

I ran it again and all of the other tests, and didn't see any corruption there, FWIW.

offensive_Jerk
June 11th, 2014, 03:49 PM
Found the HMS and it tells me to replace the adapter..... huh?
http://www.minuszerodegrees.net/hms/HMS%20-%206280087%20-%20Maps%20-%202400.pdf

barythrin
June 11th, 2014, 03:57 PM
Is the memory on the video card socketed or soldered? If socket it would hopefully be to re-seat the chips.

H-A-L-9000
June 13th, 2014, 01:36 PM
One thing to check is if the games actually expect a 64k EGA. There may be some that don't check and assume they got 256k.

Otherwise this looks like the GFX part of the EGA is failing.

offensive_Jerk
June 17th, 2014, 02:01 AM
Anyone have any known working games with the IBM EGA card with 64K?

offensive_Jerk
December 17th, 2014, 06:18 PM
Seems fine in monochrome and CGA games, but anything above that seems to still mess with this card.
Can anyone tell me if Commander Keen works with their IBM EGA card with no memory daughter card?

Here's what SimAnt looks like in EGA mode.21831

Also, here's a youtube video I made of the issue, running several programs.


http://youtu.be/BeQHVZ1_gyc

lyonadmiral
December 17th, 2014, 06:38 PM
I can verify from my own personal experience that the IBM EGA card without memory expansion will not drive many EGA games. Sad but true.

offensive_Jerk
December 18th, 2014, 03:22 AM
Did you get similar results? Or did the games just not launch?

Stone
December 18th, 2014, 04:38 AM
Keen requires EGA or VGA. No CGA. It uses high powered graphics (for its time) that when I just ran it look (intuitively) like they would never run on 64K cards. 64K EGA is just a bastardized CGA.

Caluser2000
December 18th, 2014, 08:08 AM
Goodby Galaxy ran fine in CGA. So did other episodes https://www.youtube.com/watch?v=6LQLeUtI9cU

Caluser2000
December 18th, 2014, 08:55 AM
The issue clearly is the IBM card. After 6 months with no solution or memory expansion card to see if matters improve suggests the OP needs to replace his current video card with something with decent EGA support if playing EGA games/software. A quick n dirty solution is using a 8 bit compatible vga card or 16 bit vga card that'll work in an 8-bit isa slot, then use a vga monitor

offensive_Jerk
December 18th, 2014, 09:20 AM
My plan for this was to keep my 5170 using all IBM parts. I don't have the ega memory expansion board to test with. I wanted to know if the issues I have here are the same as other users get when using the card with no expansion board. If the symptoms are totally different, then I would assume the card has issues.

I was trying to figure out if I should attempt to procure the RAm expansion board for the ega card, or not to bother with it if the card is bad.

That's why I'm trying to compare my results to other people who try to run these games with a vanilla ibm ega card. I may have no choice to go to a 3rd party card, but I would like to keep it all ibm.

Also I have an IBM ega monitor that I am using with this system.

Stone
December 18th, 2014, 09:27 AM
A quick n dirty solution is using a 8 bit compatible vga card or 16 bit vga card that'll work in an 8-bit isa slot, then use a vga monitor??? Why? An AT has plenty of 16-bit slots. :-)

mikey99
December 18th, 2014, 10:37 AM
I tried Commander Keen part 1 on my IBM XT-286 running an IBM EGA card with the memory expansion (256K).
The first thing I noticed was the messages displayed are slightly different, and this indicates my version
number is 1.31. You should try downloading version 1.31 and see if that works any better.
I downloaded this from www.myabandonware.com

Also there is a message displayed about decompressing graphics.
The game runs fine, and I don't see any video corruption.

I do have another IBM EGA card (somewhere) without the memory expansion, I'll try that and see what results I get.
I also have a couple of other EGA cards, a VEGA Video 7 and another unidentified one, I'll see if these work as well.

21833

offensive_Jerk
December 18th, 2014, 11:02 AM
I think my copy also says ega detected. I'll try downloading this other version.

If you could test your ibm ega card without memory upgrade, that would be awesome! The other cards I don't care about as much as I just want to see if the ibm card works.

mikey99
December 18th, 2014, 02:20 PM
I removed the memory expansion from the EGA card and I see the same corrupted graphics as in your video.

I also tried the following EGA cards...both worked fine in Keen......

Video 7 VEGA Deluxe EGA card
Vtech AutoEGA4+

offensive_Jerk
December 18th, 2014, 02:22 PM
I removed the memory expansion from the EGA card and I see the same corrupted graphics as in your video.

Ok thanks. So that should mean that I need the extra memory and the card is working normally. Now I need to somehow find one of those cards.

mikey99
December 18th, 2014, 03:49 PM
Just ran a search ......There are a few listed on the auction site......
search for
1) IBM 6480098
2) IBM EGA (this one has no chips installed)
and
3) RAM TMS4416-15NL TEXAS INST TI 18-Pin DIP TMS4416 Qty 43 + 6480099XM Exp Card

offensive_Jerk
December 18th, 2014, 04:59 PM
Just ran a search ......There are a few listed on the auction site......
search for
1) IBM 6480098
2) IBM EGA (this one has no chips installed)
and
3) RAM TMS4416-15NL TEXAS INST TI 18-Pin DIP TMS4416 Qty 43 + 6480099XM Exp Card

Thanks mikey99!! I got the first one. Did you fill up the ram on your card or did it come maxed out?

Caluser2000
December 18th, 2014, 06:52 PM
??? Why? An AT has plenty of 16-bit slots. :-)Wow!! Even more options.

mikey99
December 19th, 2014, 06:48 AM
Thanks mikey99!! I got the first one. Did you fill up the ram on your card or did it come maxed out?

Great !
Looks like the first memory bank is filled, which should give you 128K total. You can add memory one bank at a time for 128/192/256K total video memory.
The IBM Diagnostics diskette has tests for the EGA video memory, it will tell you the amount of memory detected and run tests against that memory.

The memory expansion card I have came already installed on an EGA card with 256K total.

offensive_Jerk
December 23rd, 2014, 09:45 PM
Well, I got the expansion card and installed it. I'm still getting some corruption, but the good news is the more RAM I throw at it, the better the games look. These games must require 256K.
http://www.vintage-computer.com/vcforum/attachment.php?attachmentid=21929&d=1419403237
http://www.vintage-computer.com/vcforum/attachment.php?attachmentid=21928&d=1419403216
http://www.vintage-computer.com/vcforum/attachment.php?attachmentid=21930&d=1419403271

Scali
December 24th, 2014, 06:04 AM
I am actually surprised by this. I didn't think there would be many EGA cards with more than 64K memory. Sure, VGA cards have 256K by default, and they have EGA-compatibility. But I would have thought that regular EGA games would mostly aim for 64K cards.
Especially since 64K already allows for double-buffering and such. As a programmer I don't really see why certain games would require so much more memory. I've always targeted 64K hardware only at least, and never really saw it as a problem.

Stone
December 24th, 2014, 07:08 AM
I am actually surprised by this. I didn't think there would be many EGA cards with more than 64K memory.All the major 8-bit EGA cards seem to support 256K memory, e.g., ATI, Diamond Flower, DTK, Everex, Genoa, Juko, Paradise, Sigma, STB and Western Digital. So I'm suprised by your statement. :-)

Great Hierophant
December 24th, 2014, 07:46 AM
If someone designed a clone expansion board, they could easily shave eighteen chips off the design by using 64kx4 chips instead of 64kx1 chips. Piggyback the RAM chips and you can save three sockets too!

Scali
December 24th, 2014, 08:48 AM
All the major 8-bit EGA cards seem to support 256K memory, e.g., ATI, Diamond Flower, DTK, Everex, Genoa, Juko, Paradise, Sigma, STB and Western Digital. So I'm suprised by your statement. :-)

Yes, but how many of those were sold? And how many of those actually HAD 256K?
I've only seen 64K ones and the odd 128K one.
EGA was incredibly rare anyway. Seems to have landed in the black hole between stock CGA/Hercules cards and early VGA cards.

Stone
December 24th, 2014, 09:29 AM
Yes, but how many of those were sold? And how many of those actually HAD 256K?
I've only seen 64K ones and the odd 128K one.
EGA was incredibly rare anyway. Seems to have landed in the black hole between stock CGA/Hercules cards and early VGA cards.I don't know how many were sold or what they were sold with. I just know that they were made. :smile:

I do have a 286 with EGA on the motherboard and it has 256K video memory.

I also have a Paradise EGA card and it has 256K video memory, soldered, not socketed.

And I have a DataMedia EGA card with 256K on it (see pic).

21932

There's three examples of 256K EGA video.

Scali
December 24th, 2014, 09:41 AM
I don't know how many were sold or what they were sold with. I just know that they were made. :smile:

Yes, but my point is: 256K needs to be reasonably widespread before games can require it. Which I don't think it was.

Caluser2000
December 24th, 2014, 09:47 AM
My AST-3G-Plus EGA card shipped with 256k soldered. It seems obvious that some of the games the OP is trying to run do require 256k EGA but are running fine in CGA mode on his card. A lot of late 80s through early 90s software had EGA support.

Stone
December 24th, 2014, 10:05 AM
Yes, but my point is: 256K needs to be reasonably widespread before games can require it. Which I don't think it was.Really?????

http://www.vintage-computer.com/vcforum/showthread.php?8961-Forgotten-EGA-games

https://www.google.com/search?q=best+ega+games&safe=off&biw=1280&bih=613&tbm=isch&tbo=u&source=univ&sa=X&ei=iwubVLuTEYayggTNsoLACA&ved=0CDcQsAQ

Caluser2000
December 24th, 2014, 10:09 AM
My grandson loves playing The Commander Keen series, Rescue Rover, Monster Bash, Dangerous Dave, Star Goose et el.

offensive_Jerk
December 24th, 2014, 01:30 PM
I just really love the visual style of EGA games. Now I'll have to find more ram for my card.
I just didn't expect so many of these ega game s I wanted to play would require 256k. I guess by then nobody was really creating for the IBM branded hardware (64k) and using specs for the clone cards.(256k)

I would image the price for an IBM card with the daughter board maxed out with ram would be super expensive compared to a 3rd party manufacturer.

Scali
December 24th, 2014, 01:59 PM
Really?????

http://www.vintage-computer.com/vcforum/showthread.php?8961-Forgotten-EGA-games

https://www.google.com/search?q=best+ega+games&safe=off&biw=1280&bih=613&tbm=isch&tbo=u&source=univ&sa=X&ei=iwubVLuTEYayggTNsoLACA&ved=0CDcQsAQ

Uhhh, I'm talking about 256K variations of EGA cards.
You're talking about EGA-support in games in general.
I just don't recall EGA games requiring 256K.
I know a few that had a 128K option, but quite it's not like most EGA games need 256K.
I think the memory is just broken on this card, which causes the artifacts. Either that, or the ALU itself is damaged.

Stone
December 24th, 2014, 02:07 PM
I just really love the visual style of EGA games.Yes, somehow EGA seems softer and richer than VGA does.


I just didn't expect so many of these ega game s I wanted to play would require 256k. I guess by then nobody was really creating for the IBM branded hardware (64k) and using specs for the clone cards.(256k)I think you're correct.


I would image the price for an IBM card with the daughter board maxed out with ram would be super expensive compared to a 3rd party manufacturer.Again, you're probably correct on this as well.

You know, I like the old machines for what they were -- clunky dinosaurs. I never thought they played games as well as they should and so I usually got games that were one or two generations older than the machine I had at the time for that reason. So I'm not too keen on playing games on the machine they were 'supposedly' designed for, because, IMO, they just weren't up to snuff on those so-called 'correct' machines. And that's why I'm so thankful for DOSBox, where everything runs as it was hyped, as it should have originally. :-)

Stone
December 24th, 2014, 02:11 PM
I just don't recall EGA games requiring 256K.Uhh, isn't that *exactly* what THIS thread is about? OP is unable to run his EGA games correctly because his EGA card only has 64K. :-)

Scali
December 24th, 2014, 03:00 PM
Uhh, isn't that *exactly* what THIS thread is about? OP is unable to run his EGA games correctly because his EGA card only has 64K. :-)

I am openly questioning this hypothesis. As I already said: I don't see why most games would even need more than 64K, code-wise, let alone 256K.
As I said, I think his memory is just partly damaged, causing artifacts. Either that, or the ALU.

In fact, you could try running this demo of mine: http://www.pouet.net/prod.php?which=62165
The colours will be off on real EGA (so you'll see random flickering polygons), but I know for a fact that it does not require more than 64K. If it can render the polygons correctly, other than the colour, you know the memory and ALU are working properly.
Namely, the code uses mode 0Dh, which is EGA's 16-colour mode. It uses the EGA ALU to maximize fillrate of the polys, and for the scroller. It also uses double-buffering. So it's a decent workout for your EGA card.
The only difference on real VGA is that it will set the 16 colours via the VGA palette.
If you see random wrong pixels etc, like the artifacts you posted earlier, then your card is broken.

Caluser2000
December 24th, 2014, 04:03 PM
I removed the memory expansion from the EGA card and I see the same corrupted graphics as in your video.

I also tried the following EGA cards...both worked fine in Keen......

Video 7 VEGA Deluxe EGA card
Vtech AutoEGA4+

mikey99 removed the memory expansion card in his IBM EGA card, working ok otherwise, to verify the issue the OP was having.
Can you explain this at all? There may be a hint here- http://theodor.lauppert.ws/games/ega.htm

As for 256k EGA cards, a number of which have already been listed- most with 256k soldered in place, have a gander at http://stason.org/TULARC/pc/graphics-cards/8ISA_1.html If you believe what wikipedia has to offer, most clone EGA cards shipped with at least 128k. But it also mentions the IBM EGA memory expansion card only supplies an extra 64k, but as we can see by previous post thats not quite true.

Rare you say? Cool.

offensive_Jerk
December 24th, 2014, 08:16 PM
Here's a video running the EGA test on the IBM Advanced Diagnostics Disk. Please excuse me while I fumble around in the menus; it's been a long time since I've ran this.
When I quit the EGA test screen, it shows Enhanced Graphics Adapter 2400. I don't know if that's an error code or not, but that's still the only feedback I get.


http://youtu.be/f3m8HwyBqD4?list=UURsD10iMZqKtjS37EYwQBaQ

offensive_Jerk
December 24th, 2014, 08:41 PM
I am openly questioning this hypothesis. As I already said: I don't see why most games would even need more than 64K, code-wise, let alone 256K.
As I said, I think his memory is just partly damaged, causing artifacts. Either that, or the ALU.

In fact, you could try running this demo of mine: http://www.pouet.net/prod.php?which=62165
The colours will be off on real EGA (so you'll see random flickering polygons), but I know for a fact that it does not require more than 64K. If it can render the polygons correctly, other than the colour, you know the memory and ALU are working properly.
Namely, the code uses mode 0Dh, which is EGA's 16-colour mode. It uses the EGA ALU to maximize fillrate of the polys, and for the scroller. It also uses double-buffering. So it's a decent workout for your EGA card.
The only difference on real VGA is that it will set the 16 colours via the VGA palette.
If you see random wrong pixels etc, like the artifacts you posted earlier, then your card is broken.

Here's the video of my machine running it. Mind you, I have recently installed the daughtercard so the memory on my EGA is now 128K.
I'll let you tell me if my graphics card it working correctly.


http://youtu.be/HdrW9_q1ZN8

Scali
December 25th, 2014, 01:49 AM
I'll let you tell me if my graphics card it working correctly.

Yup, that's what it should look like on EGA. It would look exactly the same with 64K.
Well, that's interesting then. The problem might indeed be with games requiring 256K then (which afaik I have never seen in any setup menus or system requirements lists).
As I said, I wouldn't expect many games to require more than 64K, let alone 128K. I surely didn't need it :)

By the way, note the 60 Hz scroller at the bottom(!) of the screen... This is done with the ALU, not with hardware scrolling (which you can only do at the top of the screen) :)

Scali
December 25th, 2014, 01:55 AM
There may be a hint here- http://theodor.lauppert.ws/games/ega.htm

There is some important info that supports my personal experience with EGA:

Hi-res EGA was adopted later than lo-res EGA. Few games used it previous to 1989. One reason for this may be that early EGA cards often only had 64kB video memory and therefore did not support this mode.

Apparently we were already well into the VGA era by the time games arrived that required more than 64K on EGA. Which probably made them slip under my radar.
Aside from that, most games are 320x200 anyway, since hi-res was not suitable for fast moving action:

Speaking of commercial games, few hi-res EGA games ever were.

These two quotes support my view of EGA.


Rare you say? Cool.

Yes. Perhaps it's a geographical issue, but I believe I have only seen TWO actual EGA cards in my life. Everything was either CGA/Hercules or (S)VGA. EGA was skipped almost entirely, at least, in my part of the world. I had a Paradise 8-bit SVGA card in my Commodore PC10-III by 1989.

Stone
December 25th, 2014, 03:06 AM
There is some important info that supports my personal experience with EGA:

Apparently we were already well into the VGA era by the time games arrived that required more than 64K on EGA.The games that did require more than 64K EGA were likely those designated 'EGA/VGA'. But they ran fine on EGA. I remember as I had EGA 25 years ago.



Yes. Perhaps it's a geographical issue, but I believe I have only seen TWO actual EGA cards in my life. Everything was either CGA/Hercules or (S)VGA. EGA was skipped almost entirely, at least, in my part of the world.You need to get out and about more! :-) EGA was not nearly as uncommon as you thought it was 25 years ago.

Scali
December 25th, 2014, 03:31 AM
The games that did require more than 64K EGA were likely those designated 'EGA/VGA'. But they ran fine on EGA. I remember as I had EGA 25 years ago.

I know. I code EGA/VGA stuff myself (see above, as I said, the 1991 donut would work on EGA, even though it is technically a VGA-demo. Which is why I also don't quite see why games would need more than 128K, even if they are high-res).
99% of all features on VGA are actually EGA-features. VGA doesn't add much more than the 320x200 256 colour and 640x480 16 colour modes.
Mode X actually uses the EGA 4 bitplane layout and all the related EGA registers to manipulate pixels/planes.


You need to get out and about more! :-) EGA was not nearly as uncommon as you thought it was 25 years ago.

As I say, it could be a geographical thing.
In Europe, PCs weren't very popular with home users anyway, in the 80s. We mostly used home computers, VIC-20, C64, ZX Spectrum, Atari ST, Amiga.
In the late 80s, people would slowly start to use PCs as well, but they were mostly 8088-based machines with Hercules/CGA (such as my PC10-III at the time).
By the time PCs became popular for gaming over here, in the early 90s, they would come with VGA stock anyway.
Also, the few people who upgraded their 8088 (such as myself), would generally skip EGA, and go straight to VGA (such as myself).
So at least over here, I've rarely seen a real EGA system. I know two friends who had one. Everyone else had either CGA/Hercules or VGA.
Out of the hundreds of PCs I've seen back then, having encountered only two EGA ones, makes it extremely rare.

VileR
December 25th, 2014, 04:50 AM
Ah hey there Scali, fancy meeting you here :)

From my experience, most EGA cards out there were clones, and nearly all clones had 256K on board (our family XT had one of those at some point).

Also, keep in mind that you wouldn't get 16 colors in hi-res (640x350) with only 64K. And still, most programs and games out there that use hi-res expect 16 colors. (Some do support monochrome hi-res EGA, but they're few and far between.)

Caluser2000
December 25th, 2014, 06:07 AM
Yes. Perhaps it's a geographical issue, but I believe I have only seen TWO actual EGA cards in my life. Everything was either CGA/Hercules or (S)VGA. EGA was skipped almost entirely, at least, in my part of the world. I had a Paradise 8-bit SVGA card in my Commodore PC10-III by 1989.I was given a XT Turbo clone with a 256k EGA card a few years ago. The only one I've personally owned, my first x86 machine was a 286/16 with 256k VGA card so I missed the mono/cga/ega thing hardware wise completely. The kids were using C64s at the time. A little research would've confirmed that a metric crap load of software was made during the very early 90s that supported and ran on EGA cards with more than 64k of memory. It goes without saying they ran on VGA cards fine.

A nice breakdown of EGA games by mode supported http://www.classicdosgames.com/search.html#video Of course it's not all inclusive.

Here's an example of an EGA program requiring 128k or more http://www.classicdosgames.com/game/EGA_Coloring_Book.html

Here's one that requires 256k http://www.classicdosgames.com/game/Drum_Blaster.html


Nice that it's considered rare as I do have a corresponding monitor. Mind you I must admit I did slap in a VGA card for the sake of convenience so I can use larger screens.

Scali
December 25th, 2014, 10:16 AM
A little research would've confirmed that a metric crap load of software was made during the very early 90s that supported and ran on EGA cards with more than 64k of memory.

Yup, even though VGA was commonplace back then, there were still good reasons to support EGA I guess. Firstly there is the fact that the 16-colour mode is faster than the 256-colour mode (which is why my 1991 donut uses it). So even when developing for VGA, various games used the 16-colour mode (sometimes with custom palette, but you'd get an EGA version 'for free'). Another reason could be that other platforms only had 16 colours as well, and the game would be ported to/from these platforms anyway.

Trixter
December 26th, 2014, 09:38 AM
Here is a list of EGA games that likely require 128K or more vram: http://www.mobygames.com/browse/games/dos/tic,2/ti,6/

Caluser2000
December 26th, 2014, 10:19 AM
I think there was a member a while back that was setting up a system primarily to run EGA software.

offensive_Jerk
December 26th, 2014, 04:53 PM
I think there was a member a while back that was setting up a system primarily to run EGA software.

Well, I guess that's what this AT is basically for. I ordered some more ram so hopefully I will be able to max out this EGA card with 256k of memory and this system will be mainly used for EGA software. It's an AT with IBM EGA card and matching IBM EGA 5154 monitor.

I also have an XT with IBM CGA card and IBM 5153 CGA monitor, then a 5150 with MDA and IBM monochrome monitor. So, I have all the early years of IBM PC gaming covered. For VGA stuff I just use a generic 486 box since I don't have any IBM machines newer than a AT.

Anyway, I'll post back with results once I install the memory chips in the EGA card.

Scali
December 27th, 2014, 01:36 AM
For VGA stuff I just use a generic 486 box since I don't have any IBM machines newer than a AT.

A fast VGA card in a fast 8088, 8086 or 286 can be pretty awesome as well though :)
I had great fun with my PC10-III at 9.54 MHz with a Paradise card, playing 3d games like F29 Retaliator.

offensive_Jerk
December 27th, 2014, 07:33 PM
I had a pc10 a long time ago. Should have kept it. Sold it on eBay like 10 years ago

Scali
December 28th, 2014, 02:57 AM
I had a pc10 a long time ago. Should have kept it.

Same here... It was my father's, and he sold it after he upgraded to a Commodore 386SX-16.
A fellow student of mine borrowed the 386SX-16 years ago.... When I asked it back recently, he said it didn't work anymore, so he threw it out.
That's another machine I wish I still had. It also had a very nice Paradise SVGA card (16-bit but capable of working in an 8-bit machine).
So I recently bought a PC20-III to try and rebuild a system like the one I used to have.

mikey99
December 28th, 2014, 08:58 AM
I have another IBM EGA memory expansion card that wasn't working. It would give one long,
three short beeps at boot. The video memory diagnostics would always fail with error
code 010311. Spent some time looking at this yesterday and found a short on the circuit
board, looks like a solder splash bridged two traces. Interestingly the error code indicated
an error in the first memory bank, however the short was on traces running from a memory
chip in the third bank.

It works now, and only has one bank of memory chips for a total of 128K :-)
I tried running Commander Keen 1, and I see the same partially scrambled graphics as your screen capture.
So its starting to look like 256K will be the magic number.

offensive_Jerk
December 28th, 2014, 06:41 PM
I have another IBM EGA memory expansion card that wasn't working. It would give one long,
three short beeps at boot. The video memory diagnostics would always fail with error
code 010311. Spent some time looking at this yesterday and found a short on the circuit
board, looks like a solder splash bridged two traces. Interestingly the error code indicated
an error in the first memory bank, however the short was on traces running from a memory
chip in the third bank.

It works now, and only has one bank of memory chips for a total of 128K :-)
I tried running Commander Keen 1, and I see the same partially scrambled graphics as your screen capture.
So its starting to look like 256K will be the magic number.
Odd, you would thimk that it would have been faulty from the facroty then... anyway thanks for your info mikey!!!

Scali
December 28th, 2014, 11:47 PM
Ah hey there Scali, fancy meeting you here :)

Oh hi Vile btw! :)
Missed that post earlier.


From my experience, most EGA cards out there were clones, and nearly all clones had 256K on board (our family XT had one of those at some point).

Well, interesting.
I figured that EGA was very rare as a stock-option in clone PCs (it seems that quite a few of them used an ATi Graphics Solution/Small Wonder), so most EGA cards out there would have been original IBM cards in original IBM PCs.
There was only a small window of opportunity for upgrading a CGA/MDA/Hercules machine to EGA, because VGA arrived on the scene only shortly after third-party EGA cards did, so in my experience, EGA aftermarket was never big.
Then again, as I say, it could be a geographical thing. In my part of the world, PC gaming didn't take off until the early 90s anyway (386SX-16 with Trident VGA seemed to be an early 'standard', around the time that Wolfenstein 3D became popular). So there weren't many people who had a PC at home, let alone that they were interested in upgrading the graphics capabilities.

Great Hierophant
December 29th, 2014, 07:10 AM
Most game developers probably were not using the original IBM card, they probably used third-party clones that either came with 256KB or were much easier to upgrade to 256KB. Most 16-color games used 320x200x16, and EGA supported eight pages of those graphics for such things like page flipping, double buffering and to assist with fine scrolling. I know that certain 16-color games, like Commander Keen 4, 5, 6 and Keen Dreams, have very serious difficulties with scrolling graphics with EGA cards outside a narrow speed "window" (roughly a 286 or 386SX 16Mhz) but work fine with VGA cards regardless of CPU speed.

Scali
December 29th, 2014, 08:56 AM
Most game developers probably were not using the original IBM card, they probably used third-party clones that either came with 256KB or were much easier to upgrade to 256KB.

Either that, or they just relied on the EGA-compatibility of their VGA cards? :)


I know that certain 16-color games, like Commander Keen 4, 5, 6 and Keen Dreams, have very serious difficulties with scrolling graphics with EGA cards outside a narrow speed "window" (roughly a 286 or 386SX 16Mhz) but work fine with VGA cards regardless of CPU speed.

Well, my experience is that VGA cards tend to have WAY faster memory access than EGA cards.
Scrolling on PC will always be a clumsy affair, even if you abuse the EGA ALU latches for moving data in all bitplanes at a time... It still requires a lot of CPU-work, and lots of waiting on the slow videomemory.
Perhaps VGA cards made the difference with more advanced memory interfaces (something like an ET4000 is incredibly fast even over an ISA bus).

Caluser2000
December 29th, 2014, 09:07 AM
Well, my experience is that VGA cards tend to have WAY faster memory access than EGA cards.That's exactly what Great Hierophant implied. Except the fact 256k EGA cards did exist, a fare few folk had them, systems even shipped from OEMs with EGA build in. The fact they weren't that common around your location is here nor there.

Stone
December 29th, 2014, 09:13 AM
Except the fact 256k EGA cards did exist, a fare few folk had them, systems even shipped from OEMs with EGA build in.Yup... I've still got an OEM system (Osicom, with a WD 80286 mobo and 256K EGA onboard) and a few 256K EGA cards to prove it.

H-A-L-9000
December 29th, 2014, 10:02 AM
The IBM EGA simply doesn't support 16 colors with only 64k RAM. Attached is an excerpt of the manual. It appears only two bitplanes are populated without the expansion card.

H-A-L-9000
December 29th, 2014, 11:37 AM
(yay stock 64K config should be enough for anyone)

Only 4 colors per scanline sux...

Scali
December 29th, 2014, 11:41 AM
Only 4 colors per scanline sux...

Well, as I say in my blog, with some tweakmodes you can get 16 colours from the full 64-colour palette, and double buffering/other trickery even from a stock 64K card :)

Great Hierophant
December 31st, 2014, 09:27 PM
The IBM EGA simply doesn't support 16 colors with only 64k RAM. Attached is an excerpt of the manual. It appears only two bitplanes are populated without the expansion card.

That only applies to the 640x350 16/64 color mode. EGA supports 16 color 320x200 and 640x200 graphics modes with the minimum of 64KB.

Scali
January 1st, 2015, 12:49 AM
That only applies to the 640x350 16/64 color mode. EGA supports 16 color 320x200 and 640x200 graphics modes with the minimum of 64KB.

Yup, that excerpt of the manual is from a section that discusses mode 10h specifically. See the full manual here: http://www.minuszerodegrees.net/oa/OA%20-%20IBM%20Enhanced%20Graphics%20Adapter.pdf
That is from page 11. Page 10 is important here :)
Elsewhere in that manual you will indeed find that all the other 16-colour modes will work with 64K (on page 4 it says that you always have 4 bitplanes, 16K each, with 64K, hence enabling 16 colours. More memory will just give you extra pages in these modes).

The tweakmode I discussed by the way is to make use of the 64-colour palette. Namely, EGA will use the hardwired 16-colour CGA palette in 200-line modes to remain compatible with CGA monitors (what a crazy idea). So you need to use 350-line mode for the full palette.
However, it should be possible to switch the card into a 320x350 graphics mode, where you get 4 bitplanes, and the full 64-colour palette. If you then reduce the visible area to something like 320x204 or less, you can even do double-buffering on a 64K card.

offensive_Jerk
January 2nd, 2015, 01:35 PM
I filled up all the banks of memory on the expansion card, but there must still be an issue. The graphics on Commander Keen are almost correct, except for some odd garbage on the intro Screen. The levels don't show any immediate corruption like before.

When I ran the advanced diagnostics disk, it only detects 192KB memory installed. When I say that's not correct, and run the test, it bombs out with an error "failing graphics memory 030101."


https://farm8.staticflickr.com/7558/15558369253_45b15b4f1f.jpg
https://farm9.staticflickr.com/8587/15558369463_a836a35322.jpg
https://farm8.staticflickr.com/7548/16178199635_304def1118.jpg

offensive_Jerk
January 2nd, 2015, 01:43 PM
I may have not inserted a RAM chip correctly. I think I may have accidentally installed the chip with a pin or two not in the socket...
I'll have to take it out and check.:confused:

mikey99
January 2nd, 2015, 03:51 PM
error "failing graphics memory 030101

This error is pointing to the fourth chip from the left in the third bank of ram

Take a look at the diagram on page 37 of the HW maintenance EGA section from modem7's site :
http://www.minuszerodegrees.net/hms/HMS%20-%206280087%20-%20Maps%20-%202400.pdf

offensive_Jerk
January 2nd, 2015, 10:52 PM
error "failing graphics memory 030101

This error is pointing to the fourth chip from the left in the third bank of ram

Take a look at the diagram on page 37 of the HW maintenance EGA section from modem7's site :
http://www.minuszerodegrees.net/hms/HMS%20-%206280087%20-%20Maps%20-%202400.pdf

Yup, that was the exact chip I didn't insert properly. I was in a rush, I should have taken my time. Anyway, now all the RAM is detected by the Diag Disk.

Also, Commander Keen now works fine. Along with SimAnt and the PGA Golf game. That corruption was not due to faulty memory... Just not enough memory.

Caluser2000
January 2nd, 2015, 11:02 PM
Harray!! Good on ya for sticking at it ;)

Scali
January 3rd, 2015, 02:36 AM
That corruption was not due to faulty memory... Just not enough memory.

Yes, apparently Keen needs the full 256K for its scrolling trickery (apparently it sets up a much larger playfield than the viewing window)... Not really sure what a golf game would need 256K for though.

Timo W.
January 3rd, 2015, 02:58 AM
Not really sure what a golf game would need 256K for though.
To store animation frames, I'd guess.

Scali
January 3rd, 2015, 04:09 AM
To store animation frames, I'd guess.

Yup, things that make you go hmmm.
If they had used some more main memory, they could easily make the game work on cards with 128K or even 64K.
Looks almost as if they load the graphics of the whole game in videomemory at startup, and then do everything from there. Quite bruteforce.

dr.zeissler
May 26th, 2015, 02:09 PM
https://www.youtube.com/watch?v=KRrD7K93fk8

I have another problem with EGA stuttering on my 286/10/EGA. I don't know why this happens.
(Only the starship in the intro, the rest is OK in my opinion)

Doc

Trixter
May 26th, 2015, 04:21 PM
You'll notice that the stars stay in the same place while the entire ship is moving; this is due to the hardware address being changed while the stars are redrawn to make them look like they're stationary.

It's possible that a 286/10 + slow EGA card + bad programming is the cause. I don't think it means anything is broken, it's just the way it is.

chjmartin2
May 26th, 2015, 07:53 PM
You'll notice that the stars stay in the same place while the entire ship is moving; this is due to the hardware address being changed while the stars are redrawn to make them look like they're stationary.

It's possible that a 286/10 + slow EGA card + bad programming is the cause. I don't think it means anything is broken, it's just the way it is.

Foul ball for having a post with the words EGA, Video and Corruption in it and having Jim reply to it - got my hopes up.

dr.zeissler
May 26th, 2015, 09:08 PM
You'll notice that the stars stay in the same place while the entire ship is moving; this is due to the hardware address being changed while the stars are redrawn to make them look like they're stationary.

It's possible that a 286/10 + slow EGA card + bad programming is the cause. I don't think it means anything is broken, it's just the way it is.

Thx! Some other games like Keen show the same issue, but i can live with that, mostly it is quite OK.

dr.zeissler
May 26th, 2015, 10:36 PM
Some later games with that engine (eg. Keen) have an option for "svga-compatibility-mode"/"alternative-mode".
If that option is available und choosen, this fixes the stutterproblems for my EGA! card in that games.
I'll have a look what games that were and post them later on.

Scali
May 26th, 2015, 11:00 PM
Is yours an original IBM EGA card, or a clone?
To me it looks like there is a synchronization problem. This may be because your EGA card latches and resets its internal registers at slightly different times than the EGA card the developers targeted.

It could also be as Trixter says, the timing issues are a result of your EGA card and/or your CPU not being fast enough to stay in sync.

dr.zeissler
May 27th, 2015, 02:34 AM
It is a special EGA Onboard-Chip with 256KB (Gemini-VC001). That Card hat the same Chipset=> greyghost.mooo.com/eg3000
It has much more resolutions. 640x400 640x480 up to 800x600@16colors.
I can change some Bios-Settings for the used Monitor. Currently Multisync-Hires Display is chosen. That gives the best looking Picture.
I can change CPU/Cycles within the Bios of the Machine. Currently full speed is chosen (10/10), I can change that to 10/5 and 5/5,
but that will slowdown the PC significantly.

I have experimented with "ega.sys" dosdriver and "fastbios.sys" but the use of these drivers do not make any differences in performance or visability.

Doc

Great Hierophant
May 27th, 2015, 03:19 AM
Commander Keen 4, 5 & 6 show the same kind of stuttering in their intros with an EGA card and if the game is run on a system outside a narrow speed range. I bet you won't see that stuttering if you run the game with a VGA card in the same system.

Scali
May 27th, 2015, 04:51 AM
Commander Keen 4, 5 & 6 show the same kind of stuttering in their intros with an EGA card and if the game is run on a system outside a narrow speed range. I bet you won't see that stuttering if you run the game with a VGA card in the same system.

That holy grail of smooth-scrolling in 1 frame... so easy on most 80s systems, yet so difficult on early PCs :)

I must say, I didn't know about that game Menace, looks quite nice (and ambitious) for early PC shoot-em-ups.
Xenon II should also work on EGA btw, although it only does vertical scrolling, which should be easier than horizontal.

dr.zeissler
May 27th, 2015, 04:55 AM
what is "a system outside a narrow speed range?" can you fix it with some numbers?
EGA on an EGA-Card is 8Bit with what Busspeed? 5 Mhz?

Thx
Doc

dr.zeissler
May 27th, 2015, 06:00 AM
I changed the Bios-Settings CPU/BUS from "10Mz/CPU-Takt", which means 10/10 to 10/5.
If I reboot the machine this particular Intro-Scene with the giant SpaceShip is absolute stutterfree !! :)
The reduction of the Bus-Speed causes 20% less GPU-Speed in the Landmark600 test (490->410),
but it causes some effects that the machine does not feel so fast as before with the 10/10 option.

But!, the 10/5 Option does not solve all down stuttering-problems.

First I must differentiate between "global stuttering" which most games have and "stuttering with flickering",
the stuttering with flickering (as you saw in the menace-intro) is in some games like "DDAVE", "CCAVES", "SAGENT".
Some of them have a "alternative scrolling" option which solves this problem, there is "only" global stuttering" left.

This scrolling issues are possible something for the next "nerdly-pleasures-article" :)

As "scali" already said, stutterfree scrolling was a domain of the old 8/16Bit Homecomputers, and the (early)
PC's have lot's of problems with that, that is a real mess.

Doc

****Edit****
Beside the first Shooter "MENACE" the follower "BLOOD-MONEY" does not get smooth scrolling.
The starfield in the Back of the planets look nice and is smooth, but the game stutters all the time.
it is a bit better by pressing "F4" during gameplay, but ist is far away from the amiga performance.
too bad that psygnosis did not include any other then pc-peepser. I alway thought about putting
audio in the old pc-ports of 16Bit Homecomputer-Stuff, but that is not realistic at any time in the future.

Trixter
May 27th, 2015, 07:56 AM
Foul ball for having a post with the words EGA, Video and Corruption in it and having Jim reply to it - got my hopes up.

The only way I would target EGA for video playback would be to go back to text mode and use a custom font. EGA has latch tricks for updating graphics, but if the entire graphics screen is changing, it's too slow. EGA also has latch tricks for copying VRAM around, which I suppose could be leveraged for a vector-quantization scheme, but again if the entire screen needs to change, copying 64KB+ blocks would be too slow. Even deltas would be too slow, IMO.

So, here's a project for an enterprising individual: Write a video converter for EGA that uses text mode and leverages one or more of the following:



Multiple video pages
Custom font
Both font banks (can have 512 different characters onscreen simultaneously)
Different palettes (text mode can use any 16 of the available 64 EGA colors)


Quick datarate check: Assuming all of the above is possible to change in a single frame, (80*25)+(512*16)+16 = 10208 bytes per frame to change a "640x400x16" picture. At 24fps, that's ~240KB/s.
A more reasonable target would be a single font bank and 40x25 text mode, for (40*25)+(256*16)+16 = 5112 bytes per frame to change a "320x400x16" picture. That cuts the datarate in half.

Great Hierophant
May 27th, 2015, 09:35 AM
I changed the Bios-Settings CPU/BUS from "10Mz/CPU-Takt", which means 10/10 to 10/5.
If I reboot the machine this particular Intro-Scene with the giant SpaceShip is absolute stutterfree !! :)
The reduction of the Bus-Speed causes 20% less GPU-Speed in the Landmark600 test (490->410),
but it causes some effects that the machine does not feel so fast as before with the 10/10 option.

But!, the 10/5 Option does not solve all down stuttering-problems.

First I must differentiate between "global stuttering" which most games have and "stuttering with flickering",
the stuttering with flickering (as you saw in the menace-intro) is in some games like "DDAVE", "CCAVES", "SAGENT".
Some of them have a "alternative scrolling" option which solves this problem, there is "only" global stuttering" left.

This scrolling issues are possible something for the next "nerdly-pleasures-article" :)

As "scali" already said, stutterfree scrolling was a domain of the old 8/16Bit Homecomputers, and the (early)
PC's have lot's of problems with that, that is a real mess.

Doc

****Edit****
Beside the first Shooter "MENACE" the follower "BLOOD-MONEY" does not get smooth scrolling.
The starfield in the Back of the planets look nice and is smooth, but the game stutters all the time.
it is a bit better by pressing "F4" during gameplay, but ist is far away from the amiga performance.
too bad that psygnosis did not include any other then pc-peepser. I alway thought about putting
audio in the old pc-ports of 16Bit Homecomputer-Stuff, but that is not realistic at any time in the future.


I believe I have also seen what you describe as "Global Stuttering" with Keen 4-6. I refer to in game scrolling where the image appears to shift back and forth as you scroll and screen tearing can be seen. I can easily replicate this in DOSBox with an EGA machine type and a cycle count below 1000 or about 2400. I came to the conclusion long ago that these shareware games were designed by programmers with VGA cards, because with VGA these games' scrolling routines are not speed sensitive.

dr.zeissler
May 27th, 2015, 11:24 AM
I came to the conclusion long ago that these shareware games were designed by programmers with VGA cards, because with VGA these games' scrolling routines are not speed sensitive.

But that is totally stupid to "design" games for VGA and use EGA with fixed 16 colors instead of choosing up to 256 form 262.000 ?

dr.zeissler
May 27th, 2015, 11:25 AM
I believe I have also seen what you describe as "Global Stuttering" with Keen 4-6.

No, global stuttering has every keen. I'll try to catch this by camera later.

dr.zeissler
May 27th, 2015, 12:21 PM
The 10/5 Combination does not solve all Problems and causes some new ones. I changed it back to 10/10.
Here is how the Bios looks like.
24467

I managed to figure out, how to get "BloodMoney" smooth. It is quite simple. Choose "Fast-PC" in the menu
and press "F4" during gameplay. You will see the stuttering in the video and it is gone after pressing "F4"


https://www.youtube.com/watch?v=4Nvu_CUTKSE&feature=youtu.be

Greetings
Doc

Scali
May 27th, 2015, 12:27 PM
But that is totally stupid to "design" games for VGA and use EGA with fixed 16 colors instead of choosing up to 256 form 262.000 ?

Not really.
In 16-colour mode you only need 4 bits for every pixel, instead of 8.
So you can fit twice as much data into video memory, and only need to move half as much data around for scrolling.
If they went for full 256-colour VGA, the system requirements would be much higher (just look at games like Jazz Jackrabbit).

I do agree that they could have chosen any 16 colours from the VGA palette. But since the game is even CGA-compatible, they probably wanted to be EGA-compatible as well, and didn't see any reason to make specific VGA-graphics.

Scali
May 27th, 2015, 12:35 PM
I came to the conclusion long ago that these shareware games were designed by programmers with VGA cards, because with VGA these games' scrolling routines are not speed sensitive.

I wonder what makes them speed-sensitive on EGA though. EGA should not behave differently from VGA when it comes to scrolling.
One theory I can think of is that they don't understand the latching of the screen offset and scroll registers.
On many systems you would wait for vertical blank to update the scroll position of the screen. On CGA/EGA/VGA however, you can write the value anytime you like, and it will not become active until the next frame starts (I (ab)use this in 8088 MPH: I set the new vertical scroll position just before I start drawing the sprite, which is after the last visible scanline of the previous position was passed by the beam).
If you actually DO try to wait for vertical blank, you may run the risk of being too late, and your value will get latched, and won't get active until a frame later. Which would explain the big jumps (they seem to jump 8 pixels at a time, which is exactly how much you can scroll the screen).

Perhaps most VGA cards are somewhat more 'forgiving', or they just process the data faster, leading to less sensitivity when scrolling.

dr.zeissler
May 27th, 2015, 01:31 PM
I believe I have also seen what you describe as "Global Stuttering" with Keen 4-6.

You are right with that. Keen 4-6 stutter all the time. The svga-compatiblity mode does not help either. What did they do wrong? Keen 1-3 is not stutterfree either, but MUCH better then the later ones.

chjmartin2
May 28th, 2015, 04:49 PM
The only way I would target EGA for video playback would be to go back to text mode and use a custom font. EGA has latch tricks for updating graphics, but if the entire graphics screen is changing, it's too slow. EGA also has latch tricks for copying VRAM around, which I suppose could be leveraged for a vector-quantization scheme, but again if the entire screen needs to change, copying 64KB+ blocks would be too slow. Even deltas would be too slow, IMO.

So, here's a project for an enterprising individual: Write a video converter for EGA that uses text mode and leverages one or more of the following:



Multiple video pages
Custom font
Both font banks (can have 512 different characters onscreen simultaneously)
Different palettes (text mode can use any 16 of the available 64 EGA colors)


Quick datarate check: Assuming all of the above is possible to change in a single frame, (80*25)+(512*16)+16 = 10208 bytes per frame to change a "640x400x16" picture. At 24fps, that's ~240KB/s.
A more reasonable target would be a single font bank and 40x25 text mode, for (40*25)+(256*16)+16 = 5112 bytes per frame to change a "320x400x16" picture. That cuts the datarate in half.

Why 640x400 and 320x400 versus 640x200 and 320x200? Don't want to hijack thread....

Trixter
May 28th, 2015, 06:22 PM
Why 640x400 and 320x400 versus 640x200 and 320x200? Don't want to hijack thread....

Because EGA uses a larger font. However, I'm wrong; I thought EGA used an 8x16 font but it uses an 8x14 font, so the "resolution" of 80x25 text mode in EGA is 640x350.

H-A-L-9000
June 10th, 2015, 02:13 AM
I wonder what makes them speed-sensitive on EGA though. EGA should not behave differently from VGA when it comes to scrolling.
One theory I can think of is that they don't understand the latching of the screen offset and scroll registers.
On many systems you would wait for vertical blank to update the scroll position of the screen. On CGA/EGA/VGA however, you can write the value anytime you like, and it will not become active until the next frame starts (I (ab)use this in 8088 MPH: I set the new vertical scroll position just before I start drawing the sprite, which is after the last visible scanline of the previous position was passed by the beam).
If you actually DO try to wait for vertical blank, you may run the risk of being too late, and your value will get latched, and won't get active until a frame later. Which would explain the big jumps (they seem to jump 8 pixels at a time, which is exactly how much you can scroll the screen).

Perhaps most VGA cards are somewhat more 'forgiving', or they just process the data faster, leading to less sensitivity when scrolling.

Thing is, CGA/EGA/VGA are *not* compatible in terms of register latching. It took a while, and lots of comparison to real HW, to get it right in DOSBox back then (vga_draw.cpp).



switch(machine) {
...
case MCH_CGA:
case MCH_HERC:
// MC6845-powered graphics: Loading the display start latch happens somewhere
// after vsync off and before first visible scanline, so probably here
VGA_DisplayStartLatch(0);
break;
case MCH_VGA:
PIC_AddEvent(VGA_DisplayStartLatch, (float)vga.draw.delay.vrstart);
PIC_AddEvent(VGA_PanningLatch, (float)vga.draw.delay.vrend);
...
break;
case MCH_EGA:
PIC_AddEvent(VGA_DisplayStartLatch, (float)vga.draw.delay.vrend);
...


On the 6845 the display start latching is not related to the vertical retrace pulse in the status register. Probably it's taken at the point where it's used for the first time, before the first line of the frame.

On compatible VGA, the display start address is latched at the rising edge of the retrace pulse. The PEL panning value is latched at the falling edge. Yes, it's idiotic but that's what the vast majority of VGA models do.

On EGA and the Paradise PVGA1A, and maybe others, display start is latched at the falling edge, and PEL panning is NOT LATCHED AT ALL. PEL panning can be updated while visible scanlines are put out and the change is seen immediately (or at scanline start). The game Beverly Hills Cop (by Tynesoft) uses this to show a screen with text with sine wave effect. This works on EGA but not on VGA (except on the Paradise card).

As this exact latching behaviour is totally undocumented, programmers who were not aware of it and trusted backwards compatibility produced bad games for the EGA. Also hardware manufacturers who didn't bother to test their compatibility 100% exactly produced incompatible cards, such as Paradise and Matrox and I think I've also seen problems on some AGPish ATI models.

From the behaviour above it can also be derived that it's a bad idea on EGA/VGA to write the registers any time you like if using panning. There is a time window where values from the previous frame can be mixed with the next frame: the vsync pulse. When your update hits this window you will get an inconsistent frame.

Scali
June 10th, 2015, 02:51 AM
On EGA and the Paradise PVGA1A, and maybe others, display start is latched at the falling edge, and PEL panning is NOT LATCHED AT ALL. PEL panning can be updated while visible scanlines are put out and the change is seen immediately (or at scanline start).

Yes, this is EXACTLY what you want. Most other systems work like that as well, such as C64 and Amiga.
This allows you to do clever Tech Tech effects and if combined with display start updates, you can also use it for bitmap zooming/planar texturemapping etc.
The trick is to have multiple pre-scaled bitmaps, eg at 16 pixel intervals. The 'inbetween' scaling is done by adjusting the scroll register a few times per scanline, so you skip some pixels.

Basically the latching is in the way of all kinds of cool effects. But with the trick that reenigne developed for 8088 MPH, we may be able to get around it. He figured out that you can create frames of 2 scanlines high, with no vblank at all, so you can 'stack' them... 100 of these frames construct an image of 200 scanlines high. This allows you to set a new display start every 2 scanlines.
On EGA/VGA it should even be possible at every scanline, because the 2-scanline thing is a 6845 limitation with the even and odd bitplanes (it only supports 127 rows, because it was never meant for graphics, only text).

H-A-L-9000
June 10th, 2015, 03:27 AM
One VGA demo trick I've seen (Panic demo and others) is to use the offset register (it defines the width of a virtual screen) to sort of 'jump' in video memory. This register isn't latched even on VGA. You would wait for horizontal retrace [or "/OFF], update the offset, and after the next scanline it will start from a different portion of video memory than it normally would. Of course this uses a lot of CPU and thus you have a static logo at the bottom of the screen where the CPU 'can take a breath' (handle sound and prepare next frame).

The Copper and GBU demos have one part where horizontal zooming is shown, they may also use the offset register.

Scali
June 10th, 2015, 08:32 AM
Ah yes, offset is like the modulo of Amiga screens. CGA didn't have that yet.
Another interesting way to hack your framebuffer address :)

Great Hierophant
June 10th, 2015, 08:34 AM
On EGA and the Paradise PVGA1A, and maybe others, display start is latched at the falling edge, and PEL panning is NOT LATCHED AT ALL. PEL panning can be updated while visible scanlines are put out and the change is seen immediately (or at scanline start). The game Beverly Hills Cop (by Tynesoft) uses this to show a screen with text with sine wave effect. This works on EGA but not on VGA (except on the Paradise card).

As this exact latching behaviour is totally undocumented, programmers who were not aware of it and trusted backwards compatibility produced bad games for the EGA. Also hardware manufacturers who didn't bother to test their compatibility 100% exactly produced incompatible cards, such as Paradise and Matrox and I think I've also seen problems on some AGPish ATI models.


So we should expect to see stuttering on PVGA1A-based VGA cards? That is very disheartening to hear.

H-A-L-9000
June 10th, 2015, 12:22 PM
So we should expect to see stuttering on PVGA1A-based VGA cards? That is very disheartening to hear.

Yes, just tried:
- Matrox Mystique has the keen shaking bug
- PVGA1A has it
- other suspects are in the basement

Fortunately they have not that much of a market share ;)

- WD90C11 doesn't have the bug (weren't they said to have bought Paradise?).

The SVGA fix option in Keen addresses a different issue. On some SVGA cards (a famous one being ET4000) the video memory doesn't wrap as on a compatible VGA with 256kb, but displays something in the 256-512k range instead. The game doesn't expect this and thus garbage or a black screen are shining through. The fix probably has a preformance penalty.

Scali
June 10th, 2015, 11:15 PM
Yes, just tried:
- Matrox Mystique has the keen shaking bug
- PVGA1A has it
- other suspects are in the basement

Fortunately they have not that much of a market share ;)

Do you have a real IBM PS/2 VGA machine to test against?
I've never acutally used a real IBM VGA chip. Wonder Matrox and WD got it wrong, or if all others did, but there were so many that it became the de facto standard :)


- WD90C11 doesn't have the bug (weren't they said to have bought Paradise?).

Yes, WD bought Paradise, but back in 1986 according to wikipedia, so all VGA cards were released after it was already WD-owned.

H-A-L-9000
June 11th, 2015, 02:25 AM
Nope, I don't have any type of original IBM VGA. It could be that someone on vogons did some tests back then.

It could also be that Paradise took their EGA core and added VGA capabilities.

dr.zeissler
June 11th, 2015, 03:04 AM
I have some problems to follow the discussion... did I get it right?

The game Beverly Hills Cop (by Tynesoft) uses special undocumented feature of an EGA-Card that produces Text with stutterfree sinus waves.
This could be seen with EGA but not with VGA in EGA-Displaying-Mode. (The Game has only EGA) Only some VGA-Cards (Paradise) could show it too.
Yesterday I tested this on my 286/EGA and the Scrolling and the Text with Sinuswave are absolutely stutterfree and look perfect to me.
I'll test this game on my second 286/12,5 witch has an ATI-VGA Onboard.

The other thing is Keen1-3 and 4-x. Keen is EGA but it runs terrible on EGA. It stutters all the time. Keen 1-3 are bad according to stutterfree scrolling,
Keen4-x are horrible. Why can't it be like beverlyhillscop...?

Have I mixed something up, or is it the same source with the latching ?

Doc

H-A-L-9000
June 11th, 2015, 07:05 AM
Yes, same source. It appears they got it right in Keen Dreams. It has no problems on MGA, EGA, Matrox.

In the source code for Keen Dreams we find this:


PROC VW_SetScreen crtc:WORD, pel:WORD
PUBLIC VW_SetScreen

if waitforvbl

mov dx,STATUS_REGISTER_1

;
; wait util the CRTC just starts scaning a diplayed line to set the CRTC start
;
cli

@@waitnodisplay:
in al,dx
test al,01b
jz @@waitnodisplay

@@waitdisplay:
in al,dx
test al,01b
jnz @@waitdisplay

endif

;
; set CRTC start
;
; for some reason, my XT's EGA card doesn't like word outs to the CRTC
; index...
;
mov cx,[crtc]
mov dx,CRTC_INDEX
mov al,0ch ;start address high register
out dx,al
inc dx
mov al,ch
out dx,al
dec dx
mov al,0dh ;start address low register
out dx,al
mov al,cl
inc dx
out dx,al

if waitforvbl

;
; wait for a vertical retrace to set pel panning
;
mov dx,STATUS_REGISTER_1
@@waitvbl:
sti ;service interrupts
jmp $+2
cli
in al,dx
test al,00001000b ;look for vertical retrace
jz @@waitvbl

endif

;
; set horizontal panning
;
mov dx,ATR_INDEX
mov al,ATR_PELPAN or 20h
out dx,al
jmp $+2
mov al,[BYTE pel] ;pel pan value
out dx,al

sti

ret

ENDP


The first part with the horrible spelling could be the fix.

dr.zeissler
June 11th, 2015, 07:47 AM
does this mean this could be fixed for my EGA-card? :) (changing the code in order to get it stutterfree and recompile it)
i'll test keen-dreams :)

H-A-L-9000
June 11th, 2015, 09:09 AM
Source code seems to be available only for Keen Dreams. There is still a chance for binary patching. If one knows how to add more code to an existing binary, and if really only this part is missing...

dr.zeissler
June 14th, 2015, 07:16 AM
KeenDreams is really better, but not top-notch.

https://youtu.be/--4XmCKyPqo
https://youtu.be/Kuqw8RrcpCU
https://www.youtube.com/watch?v=-YuFQbghCBM

Scali
June 14th, 2015, 08:48 AM
KeenDreams is really better, but not top-notch.


https://youtu.be/--4XmCKyPqo
https://youtu.be/Kuqw8RrcpCU
https://youtu.be/--4XmCKyPqo

Ah, I remember that FBI intro... One of the first on PC that felt like classic C64/Amiga stuff with the graphics style, colour cycling and smooth scrolling.
Note though that scrolling a whole game is more difficult than just moving a logo from left to right on a part of the screen.
In fact, I might reverse-engineer that FBI intro later. I think it should be possible without actually moving memory around, by just reprogramming the screen offset and scroll register (and using the auto-reset feature of both to keep the bottom of the screen solid... which means the scrolling text is probably bruteforce). If you do it like that, even a 4.77 MHz 8088 should be able to run it at full speed.
So I wonder how they implemented it.

Also, you linked to the ball video twice, I think you meant to paste another link the third time?

dr.zeissler
June 14th, 2015, 09:01 AM
I corrected that. The game BeverlyHillsCop has real smooth scrolling (for an ega-game)!

Scali
June 15th, 2015, 12:04 PM
In fact, I might reverse-engineer that FBI intro later. I think it should be possible without actually moving memory around, by just reprogramming the screen offset and scroll register (and using the auto-reset feature of both to keep the bottom of the screen solid... which means the scrolling text is probably bruteforce). If you do it like that, even a 4.77 MHz 8088 should be able to run it at full speed.
So I wonder how they implemented it.

Right, so I've been poking around in their code a bit, and indeed, they just update the start address register and scroll register to move the logo. It's very fast and smooth, even on a very slow PC.
The text scrolling is done 'bruteforce': all bytes are read from video memory and rotated 1 bit through carry.
The approach I took in 1991 Donut would probably speed up the text scrolling quite a bit, but since there's nothing else going on, it should be fast enough even on an 8088 I guess. I'd have to test it on one of my machines with VGA installed.

dr.zeissler
June 15th, 2015, 01:46 PM
Those smooth scrolling-animations are quite rare for the PC. Especially when it comes to EGA! Mostly cracktros only support VGA.
Another thing that is quite rar, is cool chip tune-music. I already guessed about making some sort of Disk-Menu with Scrollertext and Chiptunemusic.
(For OLD! machines, like the Schneider 286/EGA or the Tandy1000RL)

But I am lightyears away from any type of programming, all I can do is a stupid batch-file with a loop and a black/white-Disk with ASCII code.
The chiptunes run fine on my PII-333/Win98SE. I don't know how low the cpu-speed for these kind of music can be, but I think a pentium is truly required for that.
In fact, there are only Win9x/NT players as far as I see. So no Dos and therefore no real old machines.

Scali
June 15th, 2015, 11:21 PM
If that is the same AHX as on the Amiga, then it will be reasonably CPU-heavy: http://www.pouet.net/prod.php?which=13329
AHX is an early 'softsynth' format, where the CPU generates waveforms and performs filtering.
Early versions on Amiga required at least an 68020. Later versions do work on a stock 68000 Amiga, but they have to build all sorts of tables, which can take up to 45 seconds before the music can start.
And an Amiga still has 4 hardware audio channels. So on a PC you need even more CPU power to also do software mixing.
So I wouldn't be surprised that you need a Pentium at least, if they went for a high-quality synth/filter/mixer.
Of course you could trade in quality for speed and get it faster, but it's quite a bit more heavy than a mod player at least, so a low-end 286 would probably be too slow.

dr.zeissler
June 16th, 2015, 12:55 AM
Do I get it right that:
- These AHX Files sound like a SID or AtariST Music-file.
- These machines have chips that do this type of sound without consupting a lot of cpu-speed. they do have very limited cpu-speed either.
- In order to recreate such type of sound you need a fast PC.

AHX-Player need about 4% CPU-Speed at a P200 (do I read this somewhere?)

So as you said it is quite impossible to do these type of music/sounds with a very limited 286 :(
I did not know, that generating Waveforms cost so much CPU-Power. I thoght about the C64 and the ST and theire CPU-Power, but it's all about the custom soundchips :(

Doc

Scali
June 16th, 2015, 01:06 AM
Do I get it right that:
- These AHX Files sound like a SID or AtariST Music-file.
- These machines have chips that do this type of sound without consupting a lot of cpu-speed. they do have very limited cpu-speed either.
- In order to recreate such type of sound you need a fast PC.

Yes, something like that.
AHX was designed to sound somewhat like SID music, but optimized for use on Amiga.
The key to the SID sound is realtime filtering of waveforms. Amiga has no adjustable audio filters, it can only play back samples. So the CPU has to generate filtered samples in realtime to simulate SID-like sounds.


So as you said it is quite impossible to do these type of music/sounds with a very limited 286 :(

It may be possible, but you'd need a specially optimized player, with limited quality.
You can play back the music on an 68000 at 7 MHz, which is slower than a 286 at 10 MHz. If you use a decent sound card with DMA, like an SB2.0/Pro or even better, a GUS, then you should be able to get acceptable results on such a machine, but I doubt that such a player exists.
The first version of the AHX tracker was introduced in 1995, long after 286 went out of use.

dr.zeissler
June 16th, 2015, 03:00 AM
It's nice to be able to play back this type of music on a PII, but my main wish is to do so on a 286 :)

uncutspline
June 16th, 2015, 06:17 AM
Hi,

I looked at unpacked keen4 and code looks similar to keen dreams. But I totally cannot understand what it's trying to do pre-crtc start. I've attached a dosbox tracelog of the area.

Could someone explain it to me better? Thanks

H-A-L-9000
June 18th, 2015, 11:43 AM
Ok, they are using a three-way timing sensitive routine to determine the vertical blanking start. Using multiple I/O reads to determine if the display still generates visible scanlines.
a) depending a bit on CPU speed
b) depending on bus speed -> PCI card
c) depending on the horizontal frequency of the display (VGA and EGA differ by factor 2 here)

So it's not really related to differences in the register latching in the EGA/VGA.

There would be a lot of room to use an own routine. My suggestion, if Keen doesn't reprogram it, to use the system timer 0 to wait and check for a defined timespan. EGA scanline is 64Ás, VGA 31Ás. I guess we should watch for like 20Ás...