Re: [AD] CPU info changes

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Thu, Oct 25, 2001 at 07:12:35PM +0200, Henrik Stokseth wrote:
>Bob <ohannessian@xxxxxxxxxx> wrote:
>
>> > so what about a compromise? from the allegro docs i'd say the following
>info
>> > should be available in binary since they are the most likely to be used
>in a
>> > game:
>> >
>> > family.
>> > capabilities (int32 bitflags):  fpu, mmx, 3dnow, sse, cpuid
>>
>>
>> Agreed. But family will have to hacked to allow for the Pentium 4
>(currently
>> 0xF), the Hammer and the Itanium. The last two of which I can't find any
>> docs about what is exactly returned by CPUID :/
>
>i just got another idea you can have a look at. i'm still thinking about
>ways to ease parsing, while keeping extendablility. :o)
>
>what about providing the info from check_cpu() as a list of name, value
>pairs? where both name and value is a string.

Maybe we could use the config-file system here: sections that start with a
'#' are not written to/read from disk, so you could create a 'virtual'
section #cpuinfo which is filled by check_cpu, then you could just do

get_config_string("#cpuinfo", "family", "unknown"); to get the info.
get_config_int("#cpuinfo", "capabilities", 0);
etc.

This is very extensible, and does not introduce any new api entries at all.

alternatively we could use the config_hook system to hook a section
#cpuinfo to provide all the info.


-- 

Martijn Versteegh



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/