Jump to content

XP running on a 486 cpu


Dietmar

Recommended Posts


This works nice as much as possible.

With this Emulator, XP SP3 on any 486 cpu is now real.

I played Pin ball and just now I am installing there Moorhuhn

Dietmar

Link to comment
Share on other sites

Posted (edited)

@user57

Not really. I have only 256 KB Cache Ram chips. With this, I can use with "Write Through" only 64 MB from the 256 installed MB.

This you can see in Task Manager. XP shows the full 256 MB, but now uses only the cached 64MB from it.

I order from China 1024 KB Cache chips for few Euro, but they arrive here only in May

Dietmar

 

PS: I notice a funny behavior: When I make a first try to install XP SP3 on a 486 cpu, this works but later I get a message,

that "NULL" was not found, but the 486 compi works. Via this way, in "System" no entry for cpu or ram.

But when I use the install from my Asrock z370 k6 board, it shows the correct ram and also the correct 100MHZ 486 cpu from AMD.

And I notice, that there exists at least 2 different IDE controller for the Shuttle Hot 433 board, vers. 1..3.

They are NOT compatible. One uses ESDI IDE(???) and the other the normal IDE.

So, I can not make a generic XP SP3 here for all of them for download, because I have only one harddisk with 8.4 GB

and so everything for this needs to be done at least 2 times.

Edited by Dietmar
Link to comment
Share on other sites

@Mov AX, 0xDEAD

I try to hack the question about CPUID and CMPXCHG8B in setupldr.exe from XP SP3 on the xp.iso.

I search via the debug version of this setupldr.exe, but changes I do in the free version of  setupldr.exe.

Still I get this crazy message about no CPUID CMPXCHG8B on this 486 compi and I have no idea, from where it comes.

This I have changed in setupldr.exe.

Thanks for help

Dietmar

.text:0031D48F loc_31D48F:                             ; CODE XREF: SlInit(x,x,x)+195j
.text:0031D48F                 call    _SlInitDisplay@0 ; SlInitDisplay()
.text:0031D494                 call    _BlIs386@0      ; BlIs386()
.text:0031D499                 test    al, al
.text:0031D49B                 jz      short loc_31D4A8
.text:0031D49D                 push    236Dh
.text:0031D4A2                 call    _SlFatalError
.text:0031D4A7                 pop     ecx
.text:0031D4A8
.text:0031D4A8 loc_31D4A8:                             ; CODE XREF: SlInit(x,x,x)+1AEj
.text:0031D4A8                 call    _BlGetFeatureBits@0 ; BlGetFeatureBits()
.text:0031D4AD                 test    ah, 1
.text:0031D4B0                 jnz     short loc_31D4BD
.text:0031D4B2                 push    238Ch
.text:0031D4B7                 call    _SlFatalError
.text:0031D4BC                 pop     ecx


==>

.text:0031D48F loc_31D48F:                             ; CODE XREF: SlInit(x,x,x)+195j
.text:0031D48F                 call    _SlInitDisplay@0 ; SlInitDisplay()
.text:0031D494                 call    _BlIs386@0      ; BlIs386()
.text:0031D499                 test    al, al
.text:0031D49B                 jmp      short loc_31D4A8
.text:0031D49D                 push    236Dh
.text:0031D4A2                 call    _SlFatalError
.text:0031D4A7                 pop     ecx
.text:0031D4A8
.text:0031D4A8 loc_31D4A8:                             ; CODE XREF: SlInit(x,x,x)+1AEj
.text:0031D4A8                 call    _BlGetFeatureBits@0 ; BlGetFeatureBits()
.text:0031D4AD                 test    ah, 1
.text:0031D4B0                 jmp     short loc_31D4BD
.text:0031D4B2                 push    238Ch
.text:0031D4B7                 call    _SlFatalError
.text:0031D4BC                 pop     ecx

 

Link to comment
Share on other sites

May be this is a more elegant way, because it sets the last bit in ah always to 1, no matter what has been there before and does not change any other bit in ah and gives the same result as the test, if the last bit in ah is 1

Dietmar

.text:0031F3CB                 call    sub_315CDC
.text:0031F3D0                 or      ah, 1
.text:0031F3D3                 jnz     short loc_31F3E0
.text:0031F3D5 ; ---------------------------------------------------------------------------
.text:0031F3D5                 push    238Ch
.text:0031F3DA                 call    sub_323C94
.text:0031F3DF                 pop     ecx

 

Link to comment
Share on other sites

1 hour ago, Dietmar said:

May be this is a more elegant way, because it sets the last bit in ah always to 1, no matter what has been there before and does not change any other bit in ah and gives the same result as the test, if the last bit in ah is 1

Dietmar

.text:0031F3CB                 call    sub_315CDC
.text:0031F3D0                 or      ah, 1
.text:0031F3D3                 jnz     short loc_31F3E0
.text:0031F3D5 ; ---------------------------------------------------------------------------
.text:0031F3D5                 push    238Ch
.text:0031F3DA                 call    sub_323C94
.text:0031F3DF                 pop     ecx

 

JNZ checks ZF flag, so you still have to change it for sure.

Link to comment
Share on other sites

@roytam1

Do you have an idea, from where that crazy message about CPUID and CMPXCHG8B can come?

I look via Ida Pro and the Debug version of setupldr.exe but do not find another place for that check.

I also look at the Source files for XP SP1.

But also there, I can find only this single place from above

 

Dietmar

Link to comment
Share on other sites

23 minutes ago, Dietmar said:

@roytam1

Do you have an idea, from where that crazy message about CPUID and CMPXCHG8B can come?

I look via Ida Pro and the Debug version of setupldr.exe but do not find another place for that check.

I also look at the Source files for XP SP1.

But also there, I can find only this single place from above

 

Dietmar

messages are appended after code section

Link to comment
Share on other sites

Posted (edited)

@roytam1

No, in setupldr.exe is no more check for this.

BUT: I find the same check in setupldr.bin

Dietmar

seg000:000213A1 loc_213A1:                              ; CODE XREF: sub_211FF+195j
seg000:000213A1                 call    sub_24F4C
seg000:000213A6                 call    sub_2995C
seg000:000213AB                 test    al, al
seg000:000213AD                 jz      short loc_213BA
seg000:000213AF                 push    236Dh
seg000:000213B4                 call    sub_25596
seg000:000213B9                 pop     ecx
seg000:000213BA
seg000:000213BA loc_213BA:                              ; CODE XREF: sub_211FF+1AEj
seg000:000213BA                 call    sub_299A0
seg000:000213BF                 test    ah, 1
seg000:000213C2                 jnz     short loc_213CF
seg000:000213C4                 push    238Ch
seg000:000213C9                 call    sub_25596
seg000:000213CE                 pop     ecx

 

Edited by Dietmar
Link to comment
Share on other sites

useally those checks are not far away from the CPUID instruction itself
the other way is to store that 2 results somewhere that can be for both (cpuid and "the mask check" 0x00200000 with the eflags (thats flag 21) ) 
and read them out later

in first case you have to find the checks and make the code ignore them
in second case you have to find the checks on other possible places


the eflags are different from cpuid command
there are some commands to control them such as popf, pushf,popfd, pushfd, pushfq, popfq, STAC, UCOMISD/UMCOMISS, VCOMISH, CLAC, COMISD, COMISS
FCOMI, FCOMIP, FUCOMI, FUCOMIP


the first is a mask check against the eflags
the second is cpuid

for CPUID it checks bit 8 in EDX (after the CPUID command) called the CX8 flag

however there are many more information that comes with the CPUID command instruction for example the USE OF SSE, windows XP very certainly would use the other flags if they are all not set

https://en.wikipedia.org/wiki/CPUID

i think i already wrote that somehow, you should change the CPUID result to a old processor result without any features 
and then let the code continue having that results 

then the code both can either store that result or make a check direct afterwards having that result


flag 21 for eflags is the so called "Able to use CPUID instruction (ID)" flag

https://en.wikipedia.org/wiki/FLAGS_register

chappells worth to mention again
https://www.geoffchappell.com/studies/windows/km/cpu/cx8.htm

(and yes where chappel mentions the mask acquired: is actually the same solution i wrote up, this code is not from chappel he readed it out from
microsoft code)

maybe worth to mention is that 2 commands are not atomic either (i dont think that was the question) 
or 2 times cmpxchg would not work either

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...