PDA

View Full Version : Clone slower than IBM



Xacalite
March 31st, 2017, 12:33 AM
So I've got a clone, a pretty generic turbo XT:

CPU is MBL8088-2, copyrighted by both Fujitsu and Intel, so I suspect a second-sourced Intel
FPU is C8087-2
XTALs are 14.31818 and 24.000, nothing unusual
DRAM chips are 150ns, pretty adequate for this system, aren't they?
Other components also look very generic, this thing has nothing to do with that DMA-handicapped PCjr stuff.

One would expect this clone to perform exactly like 5160, but no, Checkit 3.0 consistently measures 331 Dhrystones (0.96 times IBM PC-XT) at 4.77 MHz.
The results in turbo mode aren't great, either: 526 Dhrystones (1.53 times IBM PC-XT).

Any idea why it's so slow?

Scali
March 31st, 2017, 12:52 AM
Did you boot it entirely 'clean'? No device drivers, TSRs or anything? And did you use an official MS-DOS or PC-DOS version?
If so, that would rule out any software affecting performance (other than the BIOS itself).

Which would give us two possibilities:
1) The BIOS is doing something in the background perhaps (I have a 286 with a turbo button that is handled via the timer interrupt handler in the BIOS, so at each timer tick it will have slightly more overhead than a regular 286 without turbo).
2) Some of your hardware is stealing CPU cycles. This could be the video card for example. I know that at least the ATi Small Wonder inserts more waitstates than a real IBM CGA card. So it slows down your system a bit more when you write to video memory.

If it has any non-essential hardware installed, I suggest you pull it out. You'd only want the bare motherboard, the memory, a video card, a keyboard and a floppy drive, really, to get the most accurate measure of performance.
But yes, it does indeed happen that clones have chipsets that are slightly slower than IBM's. Some are also faster.

Stone
March 31st, 2017, 03:18 AM
One would expect this clone to perform exactly like 5160, but no, Checkit 3.0 consistently measures 331 Dhrystones (0.96 times IBM PC-XT) at 4.77 MHz.
The results in turbo mode aren't great, either: 526 Dhrystones (1.53 times IBM PC-XT).

Any idea why it's so slow?I don't see your point.

(0.96 times IBM PC-XT) is almost identical to an XT.

And (1.53 times IBM PC-XT) is 50% better than an XT.

Do you see my point?

Xacalite
March 31st, 2017, 03:27 AM
No unusual cards, just HGC clone, FDC+RTC+COM+LPT+GAME, and WD MFM controller.
Clean PC DOS 2000.
Can't see any chipset here, looks like it's all discrete ICs, just like in 5160.
No turbo button, Ctrl-Alt-GrayMinus toggles turbo, could this cause measurable slowdown?
Or that MFM controller... it has its own BIOS, maybe it does something on the timer interrupt... when I have some more time I'm going to remove that controller and go through all the pain of running Checkit off 360KB diskettes...

Scali
March 31st, 2017, 03:28 AM
Do you see my point?

I think his point is that a 'clone' should be *exactly* the same.
But as we know from 8088 MPH, many clones are not *exactly* the same. Question is then: what is 'not the same'?
Opening up the case and looking at how the motherboard looks could give some insight.
Eg, I have a Philips P3105 which is cycle-exact to a 5150/5155/5160. If I open it up, I find the exact same chips being used, mainly:
8237 DMA controller
8253 PIT
8259 PIC

So it really is a 'clone': they took the exact same chips that IBM used, and apparently wired them up in the same way, and wrote a BIOS that is equivalent to IBM's.

However, the video card was an ATi Small Wonder. It did NOT use the same chips as IBM did. Instead, ATi uses its own integrated circuit, and also added other functionality. As a result, it is NOT exactly the same speed as an IBM CGA card.

Likewise, my Commodore PC20-III is not cycle-exact.
If I open that one up, I don't see any of the above 82xx chips. Instead it uses a single Faraday FE2010 chip, which has equivalent functionality. Or apparently, *almost* equivalent, as its timing is slightly off in some cases. Good enough for most software, but 8088 MPH will crash.
It's not a perfect clone.

(Both systems use a real 8088 chip that can run at 4.77 MHz. I even tried swapping the CPUs of the Philips and Commodore to see if it made a difference, but it did not).

Scali
March 31st, 2017, 03:38 AM
Clean PC DOS 2000.

Why would you use an OS like that for an 8088? Way too modern (and bloated, it only adds features that you can't use on an 8088 anyway).
I'd stick to DOS 3.3 or 5.0 (only if you want to use harddisks larger than 32 MB) for an 8088 machine.
I'd also go with MS-DOS for any non-IBM machine, given that PC-DOS is the specific OEM version for IBM only.
MS-DOS was a bit more 'forgiving' for clones.


No turbo button, Ctrl-Alt-GrayMinus toggles turbo, could this cause measurable slowdown?

It could, but probably doesn't. My Philips also has a turbo controlled by keyboard. It's implemented in the BIOS keyboard interrupt handler. As long as you don't press a key, the code isn't run, so it shouldn't affect anything.


Or that MFM controller... it has its own BIOS, maybe it does something on the timer interrupt... when I have some more time I'm going to remove that controller and go through all the pain of running Checkit off 360KB diskettes...

Could be, but unlikely that a HDD controller does anything with timers, unless it's some kind of advanced caching job perhaps.

I'd replace the DOS version with a proper DOS (you could just boot another version of DOS from a floppy to see if it makes a difference), and the Hercules clone may also have something to do with it. Hercules seems to slow down a system more than CGA anyway. That's what I noticed with a real Hercules GB102 card in my Philips machine.

Xacalite
March 31st, 2017, 03:39 AM
(0.96 times IBM PC-XT) is almost identical to an XT.
The point is: I expect it to be *identical* to an XT when running at 4.77 MHz.
Maybe the 4% difference isn't much, but still, I want to know where does it come from.
There is some software which requires hardware to be cycle-accurate to 5150/5160.

Stone
March 31st, 2017, 03:53 AM
I think his point is that a 'clone' should be *exactly* the same. A 4% difference is statistically within the acceptable margin of error and probably less than the difference(s) encountered if various programs are used to measure this machine's speed relative to an XT as no two programs are likely to report the *exact same* values when run on any machine.

RuudB
March 31st, 2017, 03:53 AM
There is some software which requires hardware to be cycle-accurate to 5150/5160.
In that case you should use the same hardware as used in a 5150/60: either a MDA or CGA card and an ordinary FDC W/O a BIOS on board. If the results are still the same, THEN you know for sure you can "blame" the motherboard.

Good luck!

Stone
March 31st, 2017, 03:57 AM
The point is: I expect it to be *identical* to an XT when running at 4.77 MHz.
Maybe the 4% difference isn't much, but still, I want to know where does it come from.
There is some software which requires hardware to be cycle-accurate to 5150/5160.I don't think my IBM XT gives an exact 1.00 when I run CheckIt on it. :-)

Scali
March 31st, 2017, 04:07 AM
A 4% difference is statistically within the acceptable margin of error and probably less than the difference(s) encountered if various programs are used to measure this machine's speed relative to an XT as no two programs are likely to report the *exact same* values when run on any machine.

But it is ONE program, which has a recorded score on a REAL IBM XT. Running it on any other XT with a similar configuration should give the EXACT same result.
Not within 4% margin, EXACT.
8088 MPH works only on real IBM PCs and 100% clones because it requires certain code to be executed with an EXACT number of cycles. We're not talking 4% difference, not 0.4%, not 0.000004%. We are talking EXACT number of cycles.
All unmodified IBM 5150/5155/5160 machines in the world will have this EXACT same performance.
And 'perfect' clones like the Philips P3105 as well.
This is quite common for other systems like Atari VCS, C64, Amiga, Atari ST, NES etc. Developers simply assume that all machines are exactly the same, which they are, at least as far as software goes. You can count performance down to the individual clock cycle.

Of course I don't rule out that CheckIt itself is broken. But assuming it doesn't have some kind of weird bug, then it (and other programs of its nature) should produce the exact same scores on the exact same hardware everytime. This is an exact science.

Xacalite
March 31st, 2017, 04:16 AM
I don't think my IBM XT gives an exact 1.00 when I run CheckIt on it. :-)
You mean there's some inaccuracy in Checkit?
So, how many Dhrystones does Checkit 3.0 give when run on IBM XT?

Anyway, I just tried with PC DOS 3.30, but nothing changed - AFAIK Dhrystone benchmark doesn't call any DOS functions.
And there's no screen activity during the benchmark, so replacing the display adapter shouldn't change anything, either.

Xacalite
March 31st, 2017, 04:28 AM
BTW: all 8088 CPUs are either from Intel, or second-sourced using Intel's masks, right?

Scali
March 31st, 2017, 04:35 AM
BTW: all 8088 CPUs are either from Intel, or second-sourced using Intel's masks, right?

Technically, no. There are unofficial clones, eg from the Soviet Union.
In practice, in Western machines you will normally only encounter 'official' Intels or second-source chips (AMD, Siemens, Harris etc).
Of my 3 8088 machines, only one of them is Intel I believe. The others are Siemens and I think AMD. Doesn't make a difference.
The most popular non-8088 was the NEC V20.

eeguru
March 31st, 2017, 04:58 AM
Different wait states?

reenigne
March 31st, 2017, 04:59 AM
Try Topbench and see if that gives you an "identical to 5150" result. Some benchmark programs may be more susceptible to effects like "PIT phase at the time the program was started" than others. It's probably not the video card, I think benchmark programs tend to avoid using it in their timing loops unless specifically testing video card performance.

One possible reason why it could be slower is DRAM refresh - if the manufacturer got a batch of cheap DRAM chips which didn't meet their design specification, they might have been able to coax them into working by having their BIOS program a faster refresh rate, which slows the machine down overall. Try programming a DRAM refresh period of 18 cycles and see if that removes the slowdown (and/or makes the machine unstable).

Or it could be due to the motherboard inserting extra delays in order to accommodate the switchable clock. Or a difference in the CPU mask. Can't really do anything about those short of replacing hardware, though.

Great Hierophant
March 31st, 2017, 05:25 AM
IBM used a pure TTL design in the 5150 and a tiny bit of programmable logic (a PROM) in the 5160. Most systems did use some kind of programmable logic to keep the part numbers down and simplify board design. Could the use of programmable logic like PROMs, PLAs or PALs slow things down relative to a design that strictly relied on 7400 and 4000 series logic?

Stone
March 31st, 2017, 05:25 AM
But it is ONE program, which has a recorded score on a REAL IBM XT. Running it on any other XT with a similar configuration should give the EXACT same result.
Not within 4% margin, EXACT.
8088 MPH works only on real IBM PCs and 100% clones because it requires certain code to be executed with an EXACT number of cycles. We're not talking 4% difference, not 0.4%, not 0.000004%. We are talking EXACT number of cycles.
All unmodified IBM 5150/5155/5160 machines in the world will have this EXACT same performance.You are correct.

My XT just yielded 1.00.


You mean there's some inaccuracy in Checkit?
So, how many Dhrystones does Checkit 3.0 give when run on IBM XT?344 Dhrystones
112.6 Whetstones.
4.78 MHz

Xacalite
March 31st, 2017, 05:39 AM
Different wait states?
I thought about this, but:
- 4.77 MHz machines don't need wait states for DRAM access, do they?
- my 8 MHz clone has 150ns DRAM, so no need for wait states, either

I only saw one XT-class mobo with wait states option: Juko ST with V20 @ 12 MHz

Xacalite
March 31st, 2017, 05:49 AM
Try Topbench and see if that gives you an "identical to 5150" result.
Can't try it right now, but I predict one problem: Topbench takes video speed into consideration, and my display adapter definitely isn't exact clone of what IBM put into 5150.

Scali
March 31st, 2017, 06:05 AM
IBM used a pure TTL design in the 5150 and a tiny bit of programmable logic (a PROM) in the 5160. Most systems did use some kind of programmable logic to keep the part numbers down and simplify board design. Could the use of programmable logic like PROMs, PLAs or PALs slow things down relative to a design that strictly relied on 7400 and 4000 series logic?

I think the answer would be: no, unless...
That is, I think reenigne already covered the instances that affect speed:
1) DRAM refresh
2) Some kind of non-standard circuit which inserts extra wait states on the bus for whatever reason, possibly the way they implemented the turbo circuit

Normally the traffic in an 8088-based system should be quite straightforward: there is really only one bus, which does everything: memory, IO, DMA transfers and whatnot.
Each byte transfer takes 4 bus cycles, and then there's the basic signaling lines which are generally connected directly to the 82xx chips.
So you don't just 'lose time' unless something is actively signaling that on the bus.
That is, either the speed difference between the components/technology is insignificant, and they still remain within a single cycle... Or the components they used are actually so slow that they need to lengthen certain transfers by another cycle. But then they explicitly need to implement logic for that.
A PC is like clockwork, it ticks away one cycle at a time :)

reenigne
March 31st, 2017, 06:23 AM
Can't try it right now, but I predict one problem: Topbench takes video speed into consideration, and my display adapter definitely isn't exact clone of what IBM put into 5150.

It does test video speed, but doesn't amalgamate that into the other results - it's a separate measurement.

Plasma
March 31st, 2017, 06:35 AM
But it is ONE program, which has a recorded score on a REAL IBM XT. Running it on any other XT with a similar configuration should give the EXACT same result.
Not within 4% margin, EXACT.
8088 MPH works only on real IBM PCs and 100% clones because it requires certain code to be executed with an EXACT number of cycles. We're not talking 4% difference, not 0.4%, not 0.000004%. We are talking EXACT number of cycles.
All unmodified IBM 5150/5155/5160 machines in the world will have this EXACT same performance.
And 'perfect' clones like the Philips P3105 as well.
This is quite common for other systems like Atari VCS, C64, Amiga, Atari ST, NES etc. Developers simply assume that all machines are exactly the same, which they are, at least as far as software goes. You can count performance down to the individual clock cycle.

Of course I don't rule out that CheckIt itself is broken. But assuming it doesn't have some kind of weird bug, then it (and other programs of its nature) should produce the exact same scores on the exact same hardware everytime. This is an exact science.

There is no such thing as "EXACT" when discussing any real-life measurement, including time. Nothing has unlimited precision. The crystals in your PC that generate the timing are not accurate to 0.000004%. A standard 20ppm crystal is only accurate to 0.002%.

That said, 4% is well within that precision. 100.00% identical performance should be achievable. But not 100.0000%.

Scali
March 31st, 2017, 07:08 AM
There is no such thing as "EXACT" when discussing any real-life measurement, including time. Nothing has unlimited precision. The crystals in your PC that generate the timing are not accurate to 0.000004%. A standard 20ppm crystal is only accurate to 0.002%.

That doesn't matter, since you are measuring everything relative to the crystal (there is no other timing source in an XT).
So no, in the absolute sense, the PCs aren't exactly the same. But the system as a whole runs faster or slower, including the measurements. Therefore you should still get an index of 1.00 everytime on every system.
You don't need 'infinite' precision: it's a discrete system. You measure in discrete intervals of 4 cycles at 4.77 MHz, so effectively 1.19 MHz, since that is the precision of the PIT.

This especially goes for systems using CGA, since even the video circuitry is synchronized to the clock on the mainboard.
That is why 8088 MPH works: you do indeed get EXACTLY the same behaviour, everytime. The only difference between two PCs would be that the framerate and pitch of the audio would be off by whichever percentage their crystals vary. But as a 'closed system', the demo runs every cycle EXACTLY the same, 100%. The length of each cycle may just vary a bit.

reenigne
March 31st, 2017, 07:13 AM
There is no such thing as "EXACT" when discussing any real-life measurement, including time. Nothing has unlimited precision. The crystals in your PC that generate the timing are not accurate to 0.000004%. A standard 20ppm crystal is only accurate to 0.002%.

That said, 4% is well within that precision. 100.00% identical performance should be achievable. But not 100.0000%.

Well, it is if (as with a 4.77MHz PC) there's a single crystal that forms the timebase for both the measurement (i.e. the PIT) and what you're measuring (the rest of the system). Then it's a measure of "number of cycles" (i.e. an integer) rather than wall-clock time (a real number), and can be completely consistent once all the initial flip-flop states and counter values are accounted for.

kgober
March 31st, 2017, 07:43 AM
I thought about this, but:
- 4.77 MHz machines don't need wait states for DRAM access, do they?
- my 8 MHz clone has 150ns DRAM, so no need for wait states, either

I only saw one XT-class mobo with wait states option: Juko ST with V20 @ 12 MHz

I believe an 8MHz system needs 120ns DRAM to avoid wait states (actually 125ns): (8000000)^(-1) = 0.000000125

But 150ns should be easily fast enough for a 4.77MHz machine to run without wait states. Doing the math, 200ns ought to be fast enough, so 150ns should certainly be no problem.

-ken

Chuck(G)
March 31st, 2017, 07:46 AM
You can probably even things up a bit by using an IBM BIOS in your clone. But, as others have stated, a 4% difference in performance is probably well within margins of error.

Now, if you really want a clone that's slower than a PC, try a Sanyo MBC-500 on for size. There, the CPU actually does run at a slower speed.

Scali
March 31st, 2017, 08:56 AM
But, as others have stated, a 4% difference in performance is probably well within margins of error.

For most software, yes.
For 8088 MPH, no.
If you're even a single cycle off in the duration of a frame, some effects will not work correctly.
To put numbers on that:
A scanline is 76 PIT cycles. A frame is 262*76 = 19912 PIT cycles.
One PIT cycle is 4 CPU cycles at 4.77 MHz. So a frame is 19912*4 = 79648 CPU cycles.
Being one cycle off is 1/79648 = ~0.0013%
And in fact, 'frame' is still pretty arbitrary. If you're one cycle off every 2, 3, 10 or whatever number of frames, you may still get issues.

So if your goal is to build an 8088 machine capable of running 8088 MPH, 4% is nowhere near the 'margin of error'.

Stone
March 31st, 2017, 09:59 AM
For most software, yes.
For 8088 MPH, no...

So if your goal is to build an 8088 machine capable of running 8088 MPH...Hehehehe... talk about an extreme example!

What a reach.

Doesn't anybody care about norms, anymore?

This is a general forum -- not one designed to examine the deep, inner workings of fanatical mindsets. :-)

You should really start a new thread to discuss such a remotely relevant possibility.

Chuck(G)
March 31st, 2017, 10:07 AM
~0.0013%?

I suspect that long-term stability of the crystal in a gen-you-ine PC XT isn't that good--recall the trimmer cap on the crystal to get derived chroma just right on composite video output.

If you depend on a PC XT's timing, then get a PC XT--and while you're at it, pull that funky old crystal and install a TCXO--and even the commodity ones of those are usually accurate only to a couple parts per million.

Maybe an OXCO or Rubidium standard will do...

Scali
March 31st, 2017, 10:17 AM
Hehehehe... talk about an extreme example!

What a reach.

Let Xacalite speak for himself.
Since the release of 8088 MPH I've spoken with a number of people who weren't interested in 8088 before, but wanted to build a machine just to see the demo on real hardware.
Perhaps this was his intention as well.

Scali
March 31st, 2017, 10:23 AM
~0.0013%?

I suspect that long-term stability of the crystal in a gen-you-ine PC XT isn't that good--recall the trimmer cap on the crystal to get derived chroma just right on composite video output.

As reenigne and I said, it doesn't matter. Everything is relative to that clock.
I'm somewhat surprised that this idea is met with such resistance. Don't you know of the Atari VCS? You might want to read the book "Racing the beam".
Since the Atari VCS does not have enough memory for a full framebuffer, you draw your frames one scanline at a time. Many things in Atari VCS games rely on toggling the right registers at the exact cycle that a certain pixel is drawn on screen by the beam.
Likewise, many effects on the C64 and its VIC-II chip rely on toggling registers at the exact right pixel, to draw rasterbars, enable sprites in the border, perform advanced horizontal and vertical scrolling/scretching tricks etc.
Or what about the Amiga and its copper? You can program it to perform operations synchronized to exact positions on the screen.
None of this would work if the system would sometimes be a cycle off here or there.
That just doesn't happen, ever.

Stone
March 31st, 2017, 10:44 AM
Let Xacalite speak for himself.
Since the release of 8088 MPH I've spoken with a number of people who weren't interested in 8088 before, but wanted to build a machine just to see the demo on real hardware.
Perhaps this was his intention as well.Hey, I wasn't knocking either the demo or the author.

But, I still think that if that demo gets people to build or acquire an XT, it demands its own thread, for a variety of reasons.

Chuck(G)
March 31st, 2017, 10:57 AM
As reenigne and I said, it doesn't matter. Everything is relative to that clock.
I'm somewhat surprised that this idea is met with such resistance. Don't you know of the Atari VCS? You might want to read the book "Racing the beam".
Since the Atari VCS does not have enough memory for a full framebuffer, you draw your frames one scanline at a time. Many things in Atari VCS games rely on toggling the right registers at the exact cycle that a certain pixel is drawn on screen by the beam.
Likewise, many effects on the C64 and its VIC-II chip rely on toggling registers at the exact right pixel, to draw rasterbars, enable sprites in the border, perform advanced horizontal and vertical scrolling/scretching tricks etc.
Or what about the Amiga and its copper? You can program it to perform operations synchronized to exact positions on the screen.
None of this would work if the system would sometimes be a cycle off here or there.
That just doesn't happen, ever.

Yes, but Atari and Amiga were not, as far as I know, working in a field largely populated by "clones'. And, as far as I know, all of the CPUs were Motorola-origin.

If the need for cycle-accurate replication is needed, then one needs to figure out exactly where cycles differ. That may be a rather tall order. And heaven forfend that you should use a V20 in place of the 8088--or worse, use a clone that employs an 8086. Expecting a clone to be cycle-accurate is unrealistic. Were there small differences in the various generations of the 5150 and 5160? I seem to recall that there were.

If you want echt 5160 timings, get a 5160 (and cross your fingers). Otherwise, get a board that doesn't care about minor variations.

Scali
March 31st, 2017, 11:11 AM
Yes, but Atari and Amiga were not, as far as I know, working in a field largely populated by "clones'. And, as far as I know, all of the CPUs were Motorola-origin.

That's not the point though, is it?
Every 'variation' of a computer system is consistent at the cycle-level in some way.
The same goes for IBM systems. All 5150, 5155 and 5160 systems have the exact same behaviour down to the cycle-level. Even if they have variations in the exact components they used (many IBMs don't use Intel chips, but second-source ones from AMD, NEC, Siemens, Harris and whatnot), design of PCBs and other details.

Clones that may not be cycle-accurate to a real IBM are still cycle-accurate among themselves.


Expecting a clone to be cycle-accurate is unrealistic.

Well, that was the big question when we made 8088 MPH: just how closely did other brands clone the IBM? As we've found out, you indeed can't expect them to be cycle-accurate just because they have an 8088 at 4.77 MHz. However, we've certainly found certain clones that indeed are cycle-accurate. After all, the PC is not that difficult to clone. It's just off-the-shelf chips from Intel, and it's basically 70s technology, also used by 8080-based machines.
A C64 or Amiga is much more difficult to clone because they have custom chips.
If you could use the same chips, cloning a C64 is not that difficult. In fact, Jens Schoenfeld did dhat recently: https://icomp.de/shop-icomp/en/shop/product/c64-reloaded.html
He's replicated the whole motherboard, you just need to add chips from an old C64, and you have a working 'clone'.


Were there small differences in the various generations of the 5150 and 5160? I seem to recall that there were.

Nothing that affects their behaviour at the cycle-level.
You can say the same for C64 and Amiga by the way.
The C64 has a number of revisions, not only the 'breadbin' and the C64C, but there were various revisions of the motherboard of the 'breadbin' as well, to reduce components/cost over time.
In fact, the later C64Cs use entirely different chips, which are built on a newer process technology, and run at 5V instead of the 12V of the early models. These chips are the MOS 85xx series, as opposed to the 65xx series in the early models. Regardless, they're all cycle-exact to eachother.
Same with the Amiga. There was the Amiga 1000, 500, 2000, 500+ and 600, and among them various revisions of motherboards and chipsets (eg the old Agnus vs the Fat/Big Agnus). Nevertheless, all these machines are cycle-exact to eachother.

Chuck(G)
March 31st, 2017, 12:26 PM
But again, these 68K-based systems aren't clones, are they?

KC9UDX
March 31st, 2017, 12:29 PM
There were plenty of Amiga clones.

Scali
March 31st, 2017, 12:46 PM
But again, these 68K-based systems aren't clones, are they?

Does that matter?
As I say, the difference is that you couldn't just buy the original chips from Commodore. You can buy the original 8088 and 82xx chips from Intel or a second-source.
As I've shown, if you could get the original chips, a single person can easily build a perfect C64 clone. He also did an Amiga 1200 by the way: http://wiki.icomp.de/wiki/Amiga_reloaded
So if a single person can clone C64s and Amiga's, why would XT clones be all that difficult? Unlike the C64 and Amiga they don't use any custom chips. It's all off-the-shelf stuff from Intel, that people had been building systems with for years.
As I say, there are cycle-exact clones out there. The ones that aren't were probably not cycle-exact for a specific reason. Eg the Commodore PC20-III I have uses a single FE2010 chip to reduce cost and complexity of the motherboard.
It could have been cycle-exact, but apparently the people designing the FE2010 made a few small slipups.

Chuck(G)
March 31st, 2017, 01:57 PM
So precisely where does the clone under discussion fail to match the 5160 cycle-for-cycle? Is there an extra I/O or memory wait state?

Caluser2000
March 31st, 2017, 03:34 PM
Why would you use an OS like that for an 8088? Way too modern (and bloated, it only adds features that you can't use on an 8088 anyway).
I'd stick to DOS 3.3 or 5.0 (only if you want to use harddisks larger than 32 MB) for an 8088 machine.
I'd also go with MS-DOS for any non-IBM machine, given that PC-DOS is the specific OEM version for IBM only.
MS-DOS was a bit more 'forgiving' for clones.

Here's vwestlife's free conventional mem. comparison list, without any memory managers loaded, of various MS/PC Dos using
CHKDSK on each one to display the amount of free RAM (out of 640K) on each one, using a totally clean boot (no CONFIG.SYS or AUTOEXEC.BAT):

PC DOS 2.00 ... 630,672 bytes
PC DOS 2.10 ... 630,672
PC DOS 3.10 ... 616,432
MS-DOS 3.10 ... 616,432
PC DOS 3.21 ... 609,392
PC DOS 3.30 ... 600,528
MS-DOS 3.30 ... 600,368
IBM DOS 5.00 ... 593,328
MS-DOS 5.00 ... 593,328
MS-DOS 6.00 ... 592,256
IBM DOS 6.10 ... 593,056
MS-DOS 6.22 ... 592,256
PC DOS 6.30 ... 593,024
PC DOS 7.00 Revision 0 ... 593,840
PC DOS 2000 (7.00 Revision 1) ... 593,760

As you can see PC Dos 2000 has a bit more free ram than PC/IBM Dos 5 does.

I've got a copies of PC Dos 5.02 up and they were certainly made to work on clone systems.

Chuck(G)
March 31st, 2017, 04:03 PM
As a final thought, you have to understand the logic behind the IBM clones. It was often joked that "IBM" meant "I Bring Money" as the 5160 was pretty expensive in comparison to the new clone competition. Grab a copy of Nuts and Volts or Computer Shopper from about 1986 and look at the contrast in prices between a Taiwanese clone and a real IBM 5160. You'll see that the clone is priced at perhaps 1/3 of the 5160.

Most clones from Taiwan were based on ERSO reference designs as was the BIOS. There were so many clone makers that telling their products apart was a real chore. Clearly, some decided to add features to distinguish themselves; the big addition was "turbo mode". Clearly, there were design compromises, but in return, the customer got an inexpensive system that ran much faster than the 5160 original. That was a pretty good deal for most people who were interested in running spreadsheets or databases faster.

After all, IBM brought out the Peanut as a "compatible", so why not a clone?

Expecting a clone to behave identically to a real 5160 in terms of CPU cycles is expecting a bit too much, I think. Cycle-matching in the universe of compatibility simply wasn't that important back then. It shouldn't be now.

rittwage
March 31st, 2017, 06:02 PM
There were plenty of Amiga clones.

There were no Amiga clones. There were machines that would run AmigaDOS, but they lacked the Amiga chipset. They ran only through retargetable graphics and would not run any software that required the chipset, which was pretty much anything (any game, for sure). I wouldn't call that a clone...

Unless you mean each next model of Amiga was a clone of the original chipset. I'll agree with you there...

rittwage
March 31st, 2017, 06:04 PM
So I've got a clone, a pretty generic turbo XT:

CPU is MBL8088-2, copyrighted by both Fujitsu and Intel, so I suspect a second-sourced Intel
FPU is C8087-2
XTALs are 14.31818 and 24.000, nothing unusual
DRAM chips are 150ns, pretty adequate for this system, aren't they?
Other components also look very generic, this thing has nothing to do with that DMA-handicapped PCjr stuff.

One would expect this clone to perform exactly like 5160, but no, Checkit 3.0 consistently measures 331 Dhrystones (0.96 times IBM PC-XT) at 4.77 MHz.
The results in turbo mode aren't great, either: 526 Dhrystones (1.53 times IBM PC-XT).

Any idea why it's so slow?

Interesting, most of these Turbo XT's I've run across are V20 chips, which usually run a few % faster than the 5160, even in non-turbo mode.

KC9UDX
March 31st, 2017, 06:22 PM
There were no Amiga clones. There were machines that would run AmigaDOS, but they lacked the Amiga chipset. They ran only through retargetable graphics and would not run any software that required the chipset, which was pretty much anything (any game, for sure). I wouldn't call that a clone...

Unless you mean each next model of Amiga was a clone of the original chipset. I'll agree with you there...

Never heard of Draco? That was just one.

I've seen clones that ran Scala for video work, and I've seen ATM kiosks running Workbench, with not enough space inside for an A600 motherboard.

How about Minimig? I'd call that a pretty good clone.

Xacalite
March 31st, 2017, 10:21 PM
One possible reason why it could be slower is DRAM refresh - if the manufacturer got a batch of cheap DRAM chips which didn't meet their design specification, they might have been able to coax them into working by having their BIOS program a faster refresh rate, which slows the machine down overall. Try programming a DRAM refresh period of 18 cycles and see if that removes the slowdown (and/or makes the machine unstable).
How to program it to 18 cycles?
I've found FASTV20.COM, a program for tweaking DRAM refresh rate, it does the following:

mov al,74h
out 43h,al
mov al,8fh
out 41h,al
mov al,02h
out 41h,al

The user is supposed to fiddle with the "8fh" value.
Does that 028fh mean the default refresh period of 18 cycles?

--

In general: no, my goal wasn't to run 8088MPH, but yes, the ability to do so would be a nice bonus, now that I've got an 8088@4.77MHz on a "classical" motherboard, with all those chips just like in a 5160.

I just run benchmarks on a Commodore PC20-III, also 8088@4.77MHz (switchable to 7.15 and 9.54), with "modern" chipset instead of the "classical" discrete ICs, and the results were: Dhrystone - 1.00 XTs, Whetstone - 0.98 XTs.
I find it strange that "modern" board offers better compatibility than the "classical" one.

reenigne
March 31st, 2017, 10:35 PM
How to program it to 18 cycles?
I've found FASTV20.COM, a program for tweaking DRAM refresh rate, it does the following:

mov al,74h
out 43h,al
mov al,8fh
out 41h,al
mov al,02h
out 41h,al

The user is supposed to fiddle with the "8fh" value.

That seems wrong to me... it'll program the timer period to 0x28f (1.821kHz) which is way too slow. Try this:

mov al,54h
out 43h,al
mov al,12h
out 41h,al

The 12h corresponds to 18 (decimal) cycles.


In general: no, my goal wasn't to run 8088MPH, but yes, the ability to do so would be a nice bonus, now that I've got an 8088@4.77MHz on a "classical" motherboard, with all those chips just like in a 5160.

If you can eliminate that 4% difference it should be possible (and you won't even need to set the DRAM refresh rate - setting it to 18 is one of the first things the demo does), but you'll still need an genuine IBM CGA card - I don't think there are any clone cards that generate the right composite colours and have the right number of VRAM wait states.[/QUOTE]

Xacalite
March 31st, 2017, 11:42 PM
mov al,54h
out 43h,al
mov al,12h
out 41h,al
No change.
Yes, I managed to score 1.00 XTs this way, but had to increase that value to 19h.
And after running FASTV20.COM the system still seems stable, and achieves 1.06 XTs.

So I'm inclined to believe that the turbo circuitry is at fault here.
Note to self: get some non-turbo clone board for benchmarking...

Scali
April 1st, 2017, 01:02 AM
I just run benchmarks on a Commodore PC20-III, also 8088@4.77MHz (switchable to 7.15 and 9.54), with "modern" chipset instead of the "classical" discrete ICs, and the results were: Dhrystone - 1.00 XTs, Whetstone - 0.98 XTs.
I find it strange that "modern" board offers better compatibility than the "classical" one.

The Commodore PC10-III (same motherboard, no HDD, as you'll find... the PC20-III PCB reads '10-III' as well) was my first PC. I never had any problems with it, it ran anything I threw at it. So I consider it a very good clone in general.
Its internals are quite peculiar, and closely resemble the 'bridgeboards' that Commodore made to add PC-compatibility to Amigas. In fact, its mouse port takes a Commodore 1352 Amiga mouse, which acts as a Microsoft bus mouse (so better than a serial mouse, which was common at the time).
It integrates the whole PC on the motherboard, including the CGA/Plantronics/Hercules graphics adapter, floppy controller, XT-IDE controller, serial port, printer port, and the mouse. Even with all this extra functionality, the board is smaller and less populated than an IBM 5150 or 5160 board.
That's where all the cost savings go.

My Philips P3105 is similar, except it doesn't integrate the graphics adapter, and it has no mouse port. The rest (floppy, XT-IDE, serial and parallel port) are all on the motherboard. Which is interesting since unlike the PC20-III it does not use a single-chip solution for the 82xx chipset. It actually has all the discrete parts that an IBM 5150 or 5160 has. They just did a very clean and optimized layout of the board. So I would argue that IBM could have built a machine with such a design back in 1981 as well, or at least in 1983 when the 5160 came out. The Philips is from 1987 by the way, as is the Commodore. So the Philips is somewhat less 'state-of-the-art' than the Commodore is, I would say.
If we take the C64 as an example... It dates from 1982, and also integrates video, audio, serial port, parallel port, expansion port, two joystick ports, a tape interface and a TV modulator on a single board that is about 1/3rd the size of the board of a 5150.
Sure, you can argue that the PC20-III has only 3 expansion slots, and the Philips has only 4. But given how much they already integrate on board, they actually compare favourably to the 5150/5160.
In my 5160 I have:
- A serial card
- A parallel card
- A floppy controller
- A HDD controller
- A CGA card

That leaves me with only 3 slots left, and unlike my clones, they aren't full-length slots. And then I don't even have the mouse port that the Commodore already offers me.

IBM did a much better job with the design of the PCjr: they fit a whole lot more functionality on a much smaller board.
But since they didn't do that with the 5150 and 5160, they left the options for clone makes wide open to undercut their prices.

Scali
April 1st, 2017, 01:57 AM
but you'll still need an genuine IBM CGA card - I don't think there are any clone cards that generate the right composite colours and have the right number of VRAM wait states.

One of the first clones, the Compaq Portable, at least seems to have gotten the waitstates correct: https://youtu.be/1WQKOBRkyVs
The artifact colours are off, but only by a small margin.
By the looks of it, it also doesn't have CGA snow?

Scali
April 1st, 2017, 05:37 AM
Here's vwestlife's free conventional mem. comparison list, without any memory managers loaded, of various MS/PC Dos using
CHKDSK on each one to display the amount of free RAM (out of 640K) on each one, using a totally clean boot (no CONFIG.SYS or AUTOEXEC.BAT):

Yea, like I said, DOS 3.30 is the one you want, unless you need the > 32 MB drive support.
Aside from conventional memory, there's also the space it takes on the HDD of course. Which matters, especially if your drive is only 10 or 20 MB large.


I've got a copies of PC Dos 5.02 up and they were certainly made to work on clone systems.


Made to work on clone systems? What makes you say that?
If it's the fact that it runs on (some) clone systems, that may say more about the clones than about the OS.
What also matters is *which* clones... Especially the early 8088 ones can be quite quirky, which is why early versions of MS-DOS had special OEM releases. In later versions, the workarounds for various systems were integrated. PC DOS was nothing more than the OEM release for IBM. IBM later continued development independent of Microsoft, but I'm pretty sure IBM never bothered to support anything other than their own systems.
As clones matured, they all became virtually 100% compatible, which makes them capable of running real PC DOS as well.

Xacalite
April 1st, 2017, 07:24 AM
As clones matured, they all became virtually 100% compatible, which makes them capable of running real PC DOS as well.
There was one thing all true IBMs had (until 1991 or so), but all clones lacked: ROM Basic.
So, all the components of PC DOS ran fine on clones, with the exception of Basic/Basica.
It was pretty common to use PC DOS on clones, I don't know why, perhaps people didn't trust MS-DOS?
Anyway, I recently ran into a 286 clone with PC DOS 3.30 on its HDD, but without Basic/Basica, instead there was GW-Basic, obviously copied from some MS-DOS version.
IBM DOS 5 already has QBasic, which doesn't need ROM Basic, so no problems on clones at all.

Stone
April 1st, 2017, 07:40 AM
It was pretty common to use PC DOS on clones, I don't know why, perhaps people didn't trust MS-DOS?Not in my region.

In all the machines I either had or serviced in that era, clones or IBMs, not even one of them ran anything other than MS-DOS.

What's not to trust? :-) :-) :-) :-) :-) You meant that as a joke, right?

Chuck(G)
April 1st, 2017, 08:29 AM
Before MS-DOS 2.1, about all that could be had retail was PC-DOS, unless it was a special OEM version for a specific platform. I really didn't start using MS-DOS until about 3.3. At least that's what i remember...

And yes, GWBASIC was supplied in lieu of a ROM BASIC on clones. I still use GWBASIC on my Ubuntu AMD64-equipped machine. It's very convenient for little "quick and dirty" programs:


GW-BASIC 3.20
(C) Copyright Microsoft 1983,1984,1985,1986

(C) COPYRIGHT 1985,1986 PHOENIX TECHNOLOGIES LTD
INCLUDES SUPPORT FOR EXTENDED VIDEO MODES
VERSION 2.03 05-13-87
59932 Bytes free
Ok*


I did install IBM BASIC-in-ROM on a few clones, but later decided that it wasn't worth the trouble.

rittwage
April 1st, 2017, 10:00 AM
Never heard of Draco? That was just one.

I've seen clones that ran Scala for video work, and I've seen ATM kiosks running Workbench, with not enough space inside for an A600 motherboard.

How about Minimig? I'd call that a pretty good clone.

I guess we just disagree on what a clone is... Minimig is FPGA-based simulation/emulation. By that standard, any Amiga emulator is a clone.

When I hear "clone" I think an exact or nearly exact copy of the hardware.

Stone
April 1st, 2017, 10:29 AM
When I hear "clone" I think an exact or nearly exact copy of the hardware.So, IOW, when you hear 'clone'... you think clone, i.e., duplicate, copy, double, twin, replicate, replica or reproduction. :-)

Xacalite
April 1st, 2017, 04:08 PM
Not in my region.
In all the machines I either had or serviced in that era, clones or IBMs, not even one of them ran anything other than MS-DOS.
What's not to trust? :-) :-) :-) :-) :-) You meant that as a joke, right?
Oh yes, the times before globalization, with all those fascinating local deviations...
In Poland, back then, PC market was almost 100% clones based on components from Taiwan and surroundings, but people firmly believed in IBM, all PCs were commonly called "IBMs", so I guess IBM-branded DOS was considered "the true DOS".
Probably the most popular book on PC was titled "IBM PC and PC DOS", by Kozdrowicz.
In the DOS 3.xx era, PC DOS was very popular, never bothered to do statistics, but it's possible it had the absolute majority, anyway, I still keep encountering PC DOS 3.xx on vintage disks.
In the DOS 4.xx era... no, this DOS was mostly skipped, there was no such era.
In the DOS 5.xx era, Microsoft entered Poland and began aggressive campaign to make all PC vendors sell all their PCs with MS-DOS preinstalled, so MS-DOS 5.0 quickly dominated the market.

reenigne
April 2nd, 2017, 04:35 AM
No change.
Yes, I managed to score 1.00 XTs this way, but had to increase that value to 19h.
And after running FASTV20.COM the system still seems stable, and achieves 1.06 XTs.

Very interesting - that suggests that the refresh DMA circuitry takes longer to do each refresh. That could again be due to turbo circuitry.

Chuck(G)
April 2nd, 2017, 07:42 AM
So, IOW, when you hear 'clone'... you think clone, i.e., duplicate, copy, double, twin, replicate, replica or reproduction. :-)

In that case, there were no 5160 clones. They all differed from the original in some way, even if it was only in the screws used to hold the box together. The PCB artwork was certainly different, as was component selection and placement. It could be argued that only IBM made clones of the 5160 XT--they were clones of each other.

Xacalite
April 2nd, 2017, 11:09 AM
I believe an 8MHz system needs 120ns DRAM to avoid wait states (actually 125ns): (8000000)^(-1) = 0.000000125

But 150ns should be easily fast enough for a 4.77MHz machine to run without wait states. Doing the math, 200ns ought to be fast enough, so 150ns should certainly be no problem.
8088 needs more than one clock cycle to access memory, so that math doesn't apply here.

BTW, I had a look at that 12 MHz Super Turbo board - it has a jumper to toggle 0WS/1WS, and with 100ns DRAM runs perfectly at 0WS.

Though I've found one curiosity - http://stason.org/TULARC/pc/motherboards/A/AMERICAN-RESEARCH-CORPORATION-8088-Model-8-10-Syst.html
8/10MHz board with the option to select 0WS/1WS/2WS/3WS.
Were there ever DRAM chips slow enough to require 3WS here???

Chuck(G)
April 2nd, 2017, 12:28 PM
Do you mean 200-250 nsec 4164s? Sure, that's what they were when they were first introduced. And that was supposed to be good, back then. I may still have some 200nsec chips.

Trixter
April 2nd, 2017, 03:13 PM
It does test video speed, but doesn't amalgamate that into the other results - it's a separate measurement.

That's not entirely accurate; the video speed is included in the synthetic "Score" number. However, xacalite should still give it a try because there are database entries for the 5150 with CGA, with Herc, with MDA, and with VGA (this seems redundant but was intentional so that the differences of each video card's RAM speed was measured).

Video card aside, there are four other metrics that have # of microseconds elapsed that he can compare with, and those should match 8088 for his clone. If they don't, he can see which set was slightly slower/faster and that will provide insight as to what is different about his clone.

Xacalite
April 2nd, 2017, 08:35 PM
Do you mean 200-250 nsec 4164s? Sure, that's what they were when they were first introduced. And that was supposed to be good, back then. I may still have some 200nsec chips.
How many cycles does an 8088 need to access memory?
I'm sure it's more than 1, if it was 2, then at 10 MHz it would be 200ns, so even those 250ns chips would only need 1WS.
That "3WS" option still looks crazy.

Xacalite
April 3rd, 2017, 04:02 AM
However, xacalite should still give it a try
So I did, and the results are, all at 4.77 MHz:

SCORE: 4
MemTest: 3809..3812
MemEA: 1995..2002
Opcodes: 1806
VidMem: 2500
3DGames: 1890
Total: 12003..12007

After slowing down DRAM refresh to 19h:

SCORE: 4
MemTest: 3687
MemEA: 1940
Opcodes: 1749
VidMem: 2491..2515
3DGames: 1858..1865
Total: 11728..11754

Flamin Joe
April 3rd, 2017, 04:51 AM
The Commodore PC10-III (same motherboard, no HDD, as you'll find... the PC20-III PCB reads '10-III' as well) was my first PC. I never had any problems with it, it ran anything I threw at it. So I consider it a very good clone in general.
Its internals are quite peculiar, and closely resemble the 'bridgeboards' that Commodore made to add PC-compatibility to Amigas. In fact, its mouse port takes a Commodore 1352 Amiga mouse, which acts as a Microsoft bus mouse (so better than a serial mouse, which was common at the time).
It integrates the whole PC on the motherboard, including the CGA/Plantronics/Hercules graphics adapter, floppy controller, XT-IDE controller, serial port, printer port, and the mouse. Even with all this extra functionality, the board is smaller and less populated than an IBM 5150 or 5160 board.
That's where all the cost savings go.

That's very interesting because Atari did a similar thing with their IBM clones. On the 8088's in particular (PC1, PC2, PC3) the mouse port takes an Atari ST mouse and the external floppy drive connector on the back is compatible with some of the Atari ST external drives. Similar thing with the motherboard with just about everything being onboard, EGA graphics, printer port, serial port, floppy controller, external floppy and of course the mouse port which was located conveniently on the side with the keyboard port. The only expansion card was an RLL controller. Very much larger board however.

Scali
April 3rd, 2017, 05:06 AM
That's very interesting because Atari did a similar thing with their IBM clones. On the 8088's in particular (PC1, PC2, PC3) the mouse port takes an Atari ST mouse and the external floppy drive connector on the back is compatible with some of the Atari ST external drives. Similar thing with the motherboard with just about everything being onboard, EGA graphics, printer port, serial port, floppy controller, external floppy and of course the mouse port which was located conveniently on the side with the keyboard port. The only expansion card was an RLL controller. Very much larger board however.

Yup, back in the late 80s to early 90s I suppose you roughly had two classes of clones:
- Generic brandless ones, which used separate multi-IO cards, videocard etc
- Brand-names, which tried to integrate most functionality on the mainboard, resulting in more compact machines

IBM did the same with PS/2: they moved to integrate most things on the motherboard.
Commodore actually moved away from integrating the graphics on the mainboard in later models. The 386SX-16 I bought had one ISA card installed, a Paradise SVGA card. Everything else was on the motherboard.
Around the Pentium/PCI days even generic clones would usually have everything but the video integrated on the motherboard. Later, even audio and ethernet became standard features on the motherboard.
I suppose these days, with APUs, we're once again at fully integrated motherboards being the standard.

Trixter
April 3rd, 2017, 10:45 AM
So I did, and the results are, all at 4.77 MHz:

SCORE: 4
MemTest: 3809..3812
MemEA: 1995..2002
Opcodes: 1806
VidMem: 2500
3DGames: 1890
Total: 12003..12007



Ignoring the VidMem, this is very in line with an IBM PC 5150. I wouldn't be concerned that your clone is substantially slower than a real PC.

vwestlife
April 3rd, 2017, 02:00 PM
There was one thing all true IBMs had (until 1991 or so), but all clones lacked: ROM Basic.
So, all the components of PC DOS ran fine on clones, with the exception of Basic/Basica.

The QBASIC in IBM DOS 5.00 didn't need BASIC in ROM, but checked for it anyway, and would hang if the system lacked it. The ROM BASIC check was removed from the QBASIC in IBM DOS 5.00.1 in 1992.

http://www.os2museum.com/wp/ibm-dos-5-0-qbasic-hangs-on-non-ibm-systems/

Flamin Joe
April 3rd, 2017, 05:02 PM
Commodore actually moved away from integrating the graphics on the mainboard in later models. The 386SX-16 I bought had one ISA card installed, a Paradise SVGA card. Everything else was on the motherboard.

Atari did the same. The PC4 (286) was the last of the series to have an Atari designed board with the majority of components onboard. As with the 8088's before it, everything except for the RLL controller was onboard although they dropped the Atari mouse port in favour of a standard 9 pin serial port. With the PC5 (386), while it reused the same chassis introduced with the PC3, everything internally was generic with an off the shelf 386 motherboard, video card (also a Paradise), I/O card and RLL/floppy controller.