Reply 20 of 57, by ajacocks
- Rank
- Member
This is such a cool hack.
Kudos!
- Alex
This is such a cool hack.
Kudos!
- Alex
clb wrote on 2023-08-20, 22:58:Also, it would be cool if you could run the SNOOP.EXE program on that card and post the results. Is it a CHIPS EGA or a VGA integrated graphics card?
Had to search SNOOP. I was not familiar with it. 😀
Here are the results for both CHIPS:
FCKGW-RHQQ2
Can confirm no RNG on any PCI cards tested (results in SNOOP thread). Nor on this Trident ISA VGA card.
I have more ISA cards to test soon (MDA, CGA, EGA, VGA).
ajacocks wrote on 2023-08-20, 23:24:This is such a cool hack.
Kudos!
- Alex
Thanks, I think so too!
The screenshots of biased RNG that DerBaum posted gave me some ideas to improve the game, to make the randomness vs biasedness of the RNG a more integral part of the game. 😁
Pierre32 wrote on 2023-08-21, 00:14:Can confirm no RNG on any PCI cards tested (results in SNOOP thread). Nor on this Trident ISA VGA card.
DerBaum wrote on 2023-08-20, 23:39:Had to search SNOOP. I was not familiar with it. 😀
Here are the results for both CHIPS:
Thanks for sharing the info. Now I realize with these prints something that is super interesting about these CHIPS cards, is that they are already newer PCI based cards, and not ancient ISA. So one might think they'd be already "farther away" from emulating esoteric IBM VGA features. But instead the opposite happens, and looks like they still retained this exact feature in the PCI variants of their cards.
DOS Days has something to say which might explain the reason why they were so precise at the IBM emulation compared to other manufacturers: https://www.dosdays.co.uk/topics/Manufacturers/candt.php
The CS8240 chipset was C&T's crowning glory in late 1985. C&T openly stated that it reverse-engineered the [IBM] EGA by removing the silicon chips from their DIP packages and making photographic enlargements of the circuits, then working backwards from the photos to logic diagrams. C&T patterned its own copies with a few changes - all perfectly legal before the Silicon Copyright Act of 1984. One penalty for such slavish copying is that all of IBM's bugs came as part of the package.
The C&T chip set did little to improve on IBM's EGA, which is incompatible with the monochrome adapter and CGA except on a BIOS level.
I doubt many manufacturers would have based their clones on silicon level reverse engineering, so maybe that kind of pedantic approach allowed them to capture some of the more exotic peculiarities of the IBM cards. Now certainly the PCI era version of the CHIPS card would no longer be based on a silicon level copy of an original, but maybe a lot of acquired knowledge from that initiative of theirs carried over, hence the Light Pen Address registers being preserved there as well.
Very cool idea! I'll try it on some of my cards and post results. And also I think I can test this idea on Doom's fuzzy sprite renderer for true randomness!!
I think that's cool, too. 🙂👍
I fondly remember playing around with GW-BASIC and the random number generator.
I did write a simple number guessing game when I was 6/7 years young, I vaguely remember.
"Time, it seems, doesn't flow. For some it's fast, for some it's slow.
In what to one race is no time at all, another race can rise and fall..." - The Minstrel
//My video channel//
clb wrote on 2023-08-21, 07:27:I doubt many manufacturers would have based their clones on silicon level reverse engineering, so maybe that kind of pedantic approach allowed them to capture some of the more exotic peculiarities of the IBM cards. Now certainly the PCI era version of the CHIPS card would no longer be based on a silicon level copy of an original, but maybe a lot of acquired knowledge from that initiative of theirs carried over, hence the Light Pen Address registers being preserved there as well.
That makes total sense. The SBC board they are on are made for maximum compability.
After your read the CHIPS solution seems the one closest to the original (and still available in 1999 when the later board was made) . Super interesting stuff.
FCKGW-RHQQ2
Pierre32 wrote on 2023-08-21, 00:14:Can confirm no RNG on any PCI cards tested (results in SNOOP thread). Nor on this Trident ISA VGA card.
I have more ISA cards to test soon (MDA, CGA, EGA, VGA).
Trident TVGA9000 ISA.png
Can also confirm ... No RNG on any other of my PCI or ISA cards...
All cards ran SNOOP fine (if you want any result of any let me know, i took pictures).
Except of this one :
The screen goes blank and the system crashes so hard i have to power it down.
All other cards worked fine... Maybe this one is broken? But it works fine with normal tasks...
FCKGW-RHQQ2
ViTi95 wrote on 2023-08-21, 07:43:Very cool idea! I'll try it on some of my cards and post results. And also I think I can test this idea on Doom's fuzzy sprite renderer for true randomness!!
Heh, I wonder how that will work. The performance of the RNG generation will be key there. Obtaining a new sample needs to touch the ISA bus, so the generation speed might not be the fastest. The RNG.EXE program does calculate how many kbits/second are obtained.
I pushed a new version of RNG.ZIP on GitHub, it now contains a second RNG generation method that is about 8x faster than the original one, but the randomness of that variant is still uncertain, especially on the Chips card that DerBaum has. On my Headland, visually it looks at least as random as the first method.
The RNG.EXE program now comes with command line options: https://github.com/juj/crt_terminator/blob/02 … NG.CPP#L93-L101 . "RNG2" is the new generator method. Passing no options still runs the original method.
Jo22 wrote on 2023-08-21, 08:06:I think that's cool, too. 🙂👍
I fondly remember playing around with GW-BASIC and the random number generator.
I did write a simple number guessing game when I was 6/7 years young, I vaguely remember.
That one is a classic 😀 A couple of years ago I was still teaching a programming class at a high school.. Guess the number was included there - it does bring some amount of curiosity to the students when they realize for the first time that they are able to make a program that behaves differently every time in a way that they as the programmer are unable to anticipate by reading their own code.
DerBaum wrote on 2023-08-21, 16:23:Can also confirm ... No RNG on any other of my PCI or ISA cards... […]
Can also confirm ... No RNG on any other of my PCI or ISA cards...
Interesting. I think I should probably edit the first post to list the known working cards, and known unsupported cards. I'll do that in a moment.
All cards ran SNOOP fine (if you want any result of any let me know, i took pictures).
The screen goes blank and the system crashes so hard i have to power it down.
All other cards worked fine... Maybe this one is broken? But it works fine with normal tasks...
I don't think the card is broken, it definitely just does not like something that I probe the card with in SNOOP. You can try the debugging parameters at Re: SNOOP.EXE: (S)VGA adapter info tool and CRT Terminator config utility to see if there is one specific test that it refuses to work with.
Also, I uploaded a new version of RNG.EXE, over on the same URL in the first post. It now has a second RNG entropy collection method that is activated via a command line option
RNG rng2
. It would be interesting to know if that method also produces biased results, or if the results will be more random than the first method.
Also you can run with
RNG interactive
to interactively watch the Monte Carlo simulation routine to observe how the biased streaks vary as time progresses. The two flags can be combined to run e.g.
RNG rng2 interactive
clb wrote on 2023-08-21, 21:01:Also, I uploaded a new version of RNG.EXE
rng rng2 on CHIPS F65545
rng rng2 on CHIPS F65548
rng rng2 interactive looks pretty cool when it slowly fills the screen
both cards produce a image like this after around 15 seconds:
FCKGW-RHQQ2
Nice, that indeed is much more random. Although still it looks like there are still tiny streaks observable going diagonally from bottom left to top right.
Also the generation speed with this method is really good, 2415 kbits/second and 1875 kbits/second.
In other news, I posted to VCFED forums to see if there might be someone with original IBM hardware. There user modem7 reports ( https://forum.vcfed.org/index.php?threads/loo … -cards.1244366/ ) that the entropy source is not present on an original IBM EGA card. So this suggests that the Headland comment needs to be understood as the entropy source only becoming available on the VGA ards after/due to IBM dropped Light Pen support altogether.
I imagine those streaks etc. change with how fast you try to extract the numbers. This otherwise unused light-pen interface output should depend on semi-random state of an unconnected CMOS input somewhere, in or out of the chip. What happens when a finger is put near or on the pins of the big chip on the video card ? I imagine it will have some effect 🤣
I cannot actually test things myself right now, I do have plenty of old hardware but it is all in boxes until more space is available to me...
T-04YBSC, a new YMF71x based sound card & Official VOGONS thread about it
Newly made 4MB 60ns 30pin SIMMs ~
mida sa loed ? nagunii aru ei saa 😜
Well, that would be the most awesome "RNG manip" strategy ever in speedruns if that works :>
Quick testing (tested with the latest release) on a Pentium 100.
ATI VGA800 (ISA 16bit) - No hardware RNG available
OTI 087x (ISA 16bit) - No hardware RNG available
Trident Paradise '88 PVGA1A-JK (ISA 8bit) - No hardware RNG available
HMC HM86314Q (ISA 8bit) - No hardware RNG available
I'll try more cards, let's hope at least one works 😅
EDIT 1: More cards
Realtek RTG3105iEH (ISA 8bit) - No hardware RNG available
S3 Trio64V2/DX (PCI) - No hardware RNG available
Cirrus Logic GD-5446BV (PCI) - No hardware RNG available
ATI-264VT2 (PCI) - No hardware RNG available
3DFX Voodoo Rush, MX86251FC (PCI) - No hardware RNG available
Alliance Semiconductor ProMotion AT25 (PCI) - No hardware RNG available
ARK 1000PV (PCI) - No hardware RNG available
Matrox IS-MGA-1064SG (PCI) - No hardware RNG available
Matrox IS-STORM R2 (PCI) - No hardware RNG available
EDIT 2: Found one card that also works with this method!! (and a very surprising one)
3DFX VooDoo 3 2000 (PCI)
RNG
RNG rnd2
I'm preparing a FastDoom quick'n'dirty release to test this feature 😁
I don't really understand what we're doing here but I want in!
Nvidia TNT2 M64 - No hardware RNG available 😢
Life? Don't talk to me about life.
badmojo wrote on 2023-08-22, 12:11:I don't really understand what we're doing here but I want in!
That's the retro tinkerer spirit! 😁
It looks like we have stumbled on to a very rare "feature". It could very well be that only Headland and Chips&Technologies clone manufacturers ever implemented this peculiar quirk of the original IBM VGA card. Or maybe there might still exist a smaller niche manufacturer that might have also done it. Although I imagine that smaller vendors would have been especially unlikely to model the IBM VGA card that closely.
ViTi95 wrote on 2023-08-22, 09:01:EDIT: Found one card that also works with this method!! (and a very surprising one)
3DFX VooDoo 3 2000 (PCI)
Oh wait what? Yay, go 3Dfx!!
It is surprising that it didn't work on Voodoo 1 Rush, but then works on Voodoo 3. Although now I recall that Voodoos had a separate 2D VGA subsystem that they bought from other manufacturers. Wikipedia writes
the Voodoo Rush chipset, combining a Voodoo chip with a 2D chip that lay on the same circuit board, eliminating the need for a separate VGA card. Most cards were built with an Alliance Semiconductor AT25/AT3D 2D component, but there were some built with a Macronix chip and there were initial plans to partner with Trident but no such boards were ever marketed.
And we have already ascertained that Alliance Semiconductor, Macronix and Trident did not implement this.
That then raises the question about which 2D VGA subsystem does the Voodoo 3 have? Did they build one themselves? Can it have multiple, like Voodoo Rush did? Then what about Voodoo Banshee and other Voodoos? Maybe those might support the RNG as well.
About those streaks in your image, I think I have a vague understanding of what is going on with that. DerBaum's photos also have a faint image like that. In the washing process, there is a semi-fixed point with respect to the values 0x00 and 0x80. I need to think if there is a better wash polynomial to use. Although hmm, maybe I'd need a test card to do that.
Oh dear, am I going shopping for Voodoos..
hmmm my tandy 1000 sx has a lightpen interface built in (but i have no light pen for it)... its just not vga 😀
--/\-[ Stu : Bloody Cactus :: [ https://bloodycactus.com :: http://kråketær.com ]-/\--
I don't want to spoil the fun in this thread, but as I understand it, the "RNG" is just reading the currently displayed address (which is actually a very great demo hack if you try to race the beam!). Couldn't we get similar results by just reading the low byte of system timer 0? Perhaps the VGA "RNG" is more interesting, as it doesn't increase during the blanking interval, but most of the RNG effect seems to be that you can access a counter that is not synchronized to the processor clock.