• Please review our updated Terms and Rules here

CPU/FPU Detection Program / Routines

thanks for the fast testing pearce_jj!!!

Ok, it has at least detected the cpu correctly !!!
That's fine.

The Bug: I used the SMSW (Store Machine Status Word) Instruction, which is not available on your V20.
I will solve the problem, tomorrow.

Good Night !

it looks like your main program code for checking everything out will ALWAYS call the IsInV86 routine. it will always cause a lock up on an 80186 as well, because starting with that CPU, interrupt 6 is called on illegal opcodes so it's not just the V20/30 that will effect. (i learned this while doing research when writing Fake86) basically anything between the 8086/8088 and the 80286 will be hung by that if interrupt 6 isn't hooked by something to handle that. an 8086/8088 will just pass the offending instructions and execute the next byte so that's why there's no problem there.

so yeah, either skip the call to that function if the CPU is less than a 286, or hook int 6 before the call.
 
The 18x is an odd-ball certainly, it seems the original ran with the 8087, whilst the latter CMOS 80C186 supported only the 80C187, whilst the 80C188 couldn't use a coprocessor at all.
 
@ Mike Chambers: Problem solved, by checking whether an 286 or higher is installed.
The XMS code is contained in the file 'memory.asm'
 
@ Chuck(G): I didn't found any pecularities or code (not in the CPU/FPU Detection Library) for detecting V40/50 Processors
 
@ Chuck(G): I didn't found any pecularities or code (not in the CPU/FPU Detection Library) for detecting V40/50 Processors

I'm assuming that you're simply not copying other people's code, but deriving your code from a careful reading of the data books. The bible for V-series CPUs is the NEC "16-Bit V-Series Microprocessor Data Book", circa 1991. The variety in the NEC V-series is pretty wide; the V40 and V50 are to the V20 and V30 what the 80188 and 80186 are to the 8088 and 8086--there's a lot of difference between them.

Not having an NPU for the 80C188 makes sense, if you look at how Intel decided to re-cast the series. The 80186/80188 were marketed as CPUs--sort of an extension to the 8086/8088 line. When the 80C186 and 80C188 came out, they were re-classified by Intel as "embedded processors" and the NDP took a back seat. I'm surprised that there is an 80C187 at all.

Look at the varieties of 80C18x-yy CPUs; DMA or not, UARTs or not, etc. (Did you include code to distinguish between them, MMoeller?)
 
Re 80C187, it gets better still... it was pretty much a re-packaged 80387 - here's the data sheet.

Probably a 80387SX, just like the 80287XL, which had no provision for 8-bit bus access.

But if you have an 80C188, perhaps all is not lost. I seem to remember that it's possible to put enough glue together to operate the 80387SX as an I/O device, instead of a co-processor. But golly, why?
 
I've not read anything about that before, though I have no doubt you are correct! Didn't the Weitek co-pro's work in that way?

Anyway, we digress :)
 
Hello guys,

i have added video card detection to dcpu.
It supports the following cards:
MDA
CGA
EGA
VGA
MCGA
PGA
8514
XGA
UNKNOWN
PCJR
TANDY1000
TANDYSLTL
SVGA
HGC
HGCPlus
HGCInColor

This should be the most comprehensive detection routine out there!

I have tested it on: Hercules, CGA, Tandy, PC/Jr, EGA, VGA, SVGA using DosBox
Would someone please test the video card detection routine on your ancient computer !?!?!?!

Files:
------
Source Code
Executable (.com)

How to assemble:
-----------------
% nasm -o dcpu.com dcpu.asm

Thanks in advance,
Martin
 
Hello guys,

i have added video card detection to dcpu.
It supports the following cards:
MDA
CGA
EGA
VGA
MCGA
PGA
8514
XGA
UNKNOWN
PCJR
TANDY1000
TANDYSLTL
SVGA
HGC
HGCPlus
HGCInColor

This should be the most comprehensive detection routine out there!

I have tested it on: Hercules, CGA, Tandy, PC/Jr, EGA, VGA, SVGA using DosBox
Would someone please test the video card detection routine on your ancient computer !?!?!?!

Files:
------
Source Code
Executable (.com)

How to assemble:
-----------------
% nasm -o dcpu.com dcpu.asm

Thanks in advance,
Martin

it detects the 8514 in my PS/2 model 80 as VGA. otherwise seems fine.

EDIT: scratch that, looking at the back of my PS/2, it seems i removed the 8514 at some point and forgot. it is using the onboard VGA. :-o
 
Works fine on Tandy 1400FD - V20, no FPU, no CPUID, Real Mode, True DOS, 640KB, CGA.

Any way to pick up clock speed?
 
Pick up the Clock Speed, already thought about how to do this, maybe use the hardware timer, execute some instructions and calculate the
cycles required to perform these instructions.

Has somebody a method to calculate the clock frequency ?
 
(1) Identify the CPU
(2) Perform the instruction loop X times
(3) Calculate the clock speed, based on the CPU identity.

How about Plantronics CGA and AT&T 6300 display types? TIGA?
 
I'd guess a table of CPU type, instruction to execute to do the test, number of repetitions to perform, and finally the expected rate per MHz for that CPU type would be needed? There's probably a better way... Chuck?

EDIT - posts crossed. At least I'm on the right lines for once :)
 
I need some more informations about the Plantronics CGA (what are the pecularities of this card. shouldn't this card be simply detected as CGA ??), the AT&t 6300 (how do i detect this machine, what are the machine id bytes at F000:FFFE ???).
If you want a particular feature please include some more informations, to save time for me.

In order to detect a TIGA card I need the getenv and strstr library function, which i don't have in plain assembler.

With regards,
Martin
 
The Olivetti PC also has model/submodel/revision bytes all zero, is this computer identical to the AT&T 6300?
Do they have the same video cards ?
 
Back
Top