Compiling problem on an old machine...

General area for talk about ZSNES. The best place to ask for related questions as well as troubleshooting.

Moderator: ZSNES Mods

Post Reply
gpp
New Member
Posts: 7
Joined: Sun Jun 24, 2007 1:33 am
Location: U.K.

Compiling problem on an old machine...

Post by gpp »

I'm trying to see if I can compile an optimised build of the latest SVN of ZSNES for an old PC with the following spec...

CPU = Cx486sx 25MHz
MPU = 387sx 25MHz
RAM = 16MB
SND = SB AWE32
O.S. = Win 95(B)
...and other not too relevant specs...

I have no issues with PATH or virtual RAM size.
(despite the ULTRA slowness of the computer - heheheh!)

Anyhow, it starts to compile and gets so far, then generates the following two errors...

===========================
DOS window extract begins
===========================
Optimize ZSNES build for your CPU's architecture? (y/N): y
CPU Architecture detected as: "Could"
gpp -O3 -s -o parsegen.exe parsegen.cpp -lz
gcc -O3 -march=Could -ffast-math -fomit-frame-pointer -fno-unroll-loops -Wall -Wno-unused -I. -DNDEBUG -D__MSDOS__ -std=c99 -U__STRICT_ANSI__ -Wdeclaration-after-statement -o chips/dsp1emu.do -c chips/dsp1emu.c
chips/dsp1emu.c:1: error: bad value (Could) for -march= switch
chips/dsp1emu.c:1: error: bad value (Could) for -mtune= switch

make.exe: *** [chips/dsp1emu.do] Error 1
ZSNES.EXE when successfully compiled is in "E:\comp\zsnes\src".
If you'd like to use what zget installed without running zget from
the same command prompt session before hand, type the following
each time you start a new command prompt:
SET PATH=E:\mingw\bin;%PATH%

Or if you would like to be able to make DOS builds, type
the following instead:
SET DJGPP=E:\djgpp\djgpp.env
SET PATH=E:\djgpp\bin;E:\mingw\bin;%PATH%

Press any key to continue . . .
==========================
DOS window extract ends
==========================

Obviously, I can get past the compile error by saying "N" to the "Optimise for your CPU" question...but then I won't get any of the specific optimisations.

Is there any other way I can get past the two errors?

Thanks in advance...
-=3Dfx Still rox!=-
Nach
ZSNES Developer
ZSNES Developer
Posts: 3904
Joined: Tue Jul 27, 2004 10:54 pm
Location: Solar powered park bench
Contact:

Re: Compiling problem on an old machine...

Post by Nach »

gpp wrote: Obviously, I can get past the compile error by saying "N" to the "Optimise for your CPU" question...but then I won't get any of the specific optimisations.

Is there any other way I can get past the two errors?
Another way to get past the error would be for me to make archopt detect your 4x86, although as I don't have a 4x86 to develop for this becomes complicated.

4x86 I think lacks the CPUID instruction, so I'll need to find code online to detect a machine as a 4x86 specifically.
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
gpp
New Member
Posts: 7
Joined: Sun Jun 24, 2007 1:33 am
Location: U.K.

D@MN!

Post by gpp »

4x86 I think lacks the CPUID instruction
WHOA! Now that sucks! :cry:

Is there any way to use the infos. from an app. like...say... :?

CPU-Z or

CPU-ID

(of course, I'm probably talking b#ll#cks!) :roll:

I also have a Cyrix Media GX+ computer...might as well test on there while we're on this "issue" to see if it compiles...or runs into the error. :wink:

(should work as it's Pentium class...maybe...) :?
-=3Dfx Still rox!=-
Deathlike2
ZSNES Developer
ZSNES Developer
Posts: 6747
Joined: Tue Dec 28, 2004 6:47 am

Re: D@MN!

Post by Deathlike2 »

gpp wrote:
4x86 I think lacks the CPUID instruction
WHOA! Now that sucks! :cry:

Is there any way to use the infos. from an app. like...say... :?

CPU-Z or

CPU-ID

(of course, I'm probably talking b#ll#cks!) :roll:
It won't work, because those apps crash.
I also have a Cyrix Media GX+ computer...might as well test on there while we're on this "issue" to see if it compiles...or runs into the error. :wink:

(should work as it's Pentium class...maybe...) :?[
The binary on ZSNES's website is optimized for a 586, so it "should" run fine on that comp (then again, I have no faith in Cyrix).

Trying to compile ZSNES for a 486 with a 486 is asking for trouble to be honest. It may take hours, if not days (weeks?) for it to compile.
Continuing [url=http://slickproductions.org/forum/index.php?board=13.0]FF4[/url] Research...
Kajuru
Regular
Posts: 253
Joined: Wed Oct 18, 2006 6:43 pm
Location: localhost

Post by Kajuru »

CPU-ID is Pentium+ IIRC.

Release Grade + MMX Optimize in my Pentium 200MMX(oc' to 250) takes about 5/6 hours. Non optimized builds takes 13 min(19 min UPX'ed)
gpp
New Member
Posts: 7
Joined: Sun Jun 24, 2007 1:33 am
Location: U.K.

Sadistic - yup!

Post by gpp »

It may take hours, if not days (weeks?) for it to compile.
Heh - I KNOW...but I just want to see if:

1) I can even get it to compile an optimized build...

2) How long it takes (just for fun) even if it IS weeks!

I may be a sadistic swine when it comes to punishing hardware - but if it helps to improve ZSNES and make the compilation process EVEN BETTER!

What the heck - might as well!

Okay, I'm going to go and test compiling on my Media GX+ when I get up later on...[it's 3AM in the U.K. now...]

See you guys later, I'm going to bed!
-=3Dfx Still rox!=-
Kajuru
Regular
Posts: 253
Joined: Wed Oct 18, 2006 6:43 pm
Location: localhost

Post by Kajuru »

I have no idea how hot the 486 can get, but if you're really doing it, keep the case open, since the processor will be at 100% all(or most) of the time.
gpp
New Member
Posts: 7
Joined: Sun Jun 24, 2007 1:33 am
Location: U.K.

Heatwave...

Post by gpp »

UGH! It's too d@mn hot over here at the moment...
[which is VERY unusual for the U.K.]

Anyhow I couldn't sleep - and went to get a glass of water.

@Kajuru - dont worry about my Cx486sx getting too hot. I have installed an old GFX ORB cooler via means of Arctic Alumina onto the Cx486sx - PLENTY of cooling there!

@Nach - found a nice little CPU Identification Utility for both DOS and Win32 from this page:

http://web.inter.nl.net/hcc/J.Steunebrink/chkcpu.htm

I'll download both versions. I'll boot into TRUE DOS and run the DOS version to get you the correct CPU string for the older machine.

[amazing what you can find with Google and 10 seconds of time - and a glass of water...?!?]

The following is a Command window extract from CHKCPU32 running on the MediaGX+ Machine in WinXP:

---------------------------------------
extract begins
---------------------------------------
CPU Identification utility v2.01 (c) 1997-2007 Jan Steunebrink
====================================================
CPU Vendor and Model: Cyrix GXm (MediaGX with MMX)
Internal CPU speed : 233.8 MHz
Number of CPUs : 1
CPU-ID Vendor string: CyrixInstead
CPU-ID Name string : Cyrix MediaGXtm MMXtm Enhanced
CPU-ID Signature : 0540
CPU Features : Floating-Point Unit on chip: Yes
Virtual Mode Extensions : No
Time Stamp Counter : Yes
MMX instruction set : Yes
3DNow! instruction set : No
Streaming SIMD Extensions : No
Size of L1 cache : 16 KB
Integrated L2 cache : None
------------------------------------------------------------------------
extract ends
------------------------------------------------------------------------

Looks like a nice little app for correct CPU identification...I'll run the DOS version on the Cx486sx after I get up 'properly'...

I'll also give compilation a go on the MediaGX+...

==edit==
4x86 I think lacks the CPUID instruction
You have an excellent memory @Nach.

I ran CHKCPU (16 bit version) in Win95...

Invalid Instruction
Fault Loation- 0CF8:0420

It also locks-up in REAL DOS...so no luck there!

==edit 2==

Okay found some more CPU testing programs.

CPU_ID from here:

http://www.ks-soft.net/programs.eng/cpuid.htm

confirms what we already know...
==============================
+------------------------------------------------------------------------+
¦ CPU ID¦Version 0.5¦ E-Mail : ksalex@chat.ru ¦
¦ Copyright by Alexander Kozlov¦(1993,99)¦ See also cpu_id.doc¦
+------------------------------------------------------------------------+

80486 processor detected
CPUID instruction not present
==============================
However - x86test from HERE:

http://www.vortex.prodigynet.co.uk/x86test/

Detects the CPU correctly!
(well, near enough - I have a Tx486SLC from Texas Instruments. It has the same core as the Cx486SLC. But instead of 1KB Cache it has 8KB Cache. They are the same architecture though.)
==============================
x86test-0.10a

flags set by DIV: 0x0000 --> Cyrix Type
FPU Present: yes
Core clock (CTC+loop): 25.012 +/- 0.003MHz
CPU Type: Cyrix/IBM 486SLC (386-like bus, 1KB cache, no fpu)
Current Clock: 25.01MHz

x86test all done!
==============================

Okay, so it's NOT a DOS program, but it works.

Might be worth having a word with the author on how he detects the Cx486SLC - should give you a basis for adding the detection routine.

Hope all this helps!
-=3Dfx Still rox!=-
Krade
Rookie
Posts: 31
Joined: Mon Feb 19, 2007 11:23 am

Post by Krade »

EDIT 2: lol disregard that

EDIT: Btw, the march option you should use to optimize to a 486 is -march=i486 . I never touched zget as I hardly ever use Windows these days, but if there's an option to specify your own arch, you can just put that in.
gpp
New Member
Posts: 7
Joined: Sun Jun 24, 2007 1:33 am
Location: U.K.

Cheers!

Post by gpp »

Thanks @Krade!

...although I'm not sure that zget allows you to specify command line options like that...

==edit==

Well, I'm waiting for ZSNES to compile [without the 486 specific optimisations] just to see how long it will take...

...so far it's been compiling for 3 days...still running...

I'll let you guys know the total time when it finishes the compile.
-=3Dfx Still rox!=-
gpp
New Member
Posts: 7
Joined: Sun Jun 24, 2007 1:33 am
Location: U.K.

FINISHED!

Post by gpp »

Well, ZSNES finished compiling on my Cx486sx/387sx PC...

Time to compile ZSNES.EXE = 5 days
Time to compress with UPX = 1/2 a day

Total = 5 1/2 days

Longest compile modules

gui.asm = 2 days
newg162.asm = 3 days

How to compile on an old machine
======================

Requirements

386/486 compatible (preferably with MPU/FPU)
roughly 16MB of REAL RAM
DOS window DMI RAM set to 65535
128MB of manual swap file

1) Right click on DOS prompt in Win 95 and click 'properties'.

2) Change DPMI Memory from Auto to 65535.

3) Click OK.

4) Go to Control Panel -> Performance -> Virtual memory.

5) Pick an empty drive with at least 512MB free for the swapfile.

6) Set to manage swapfile manually and specify a maximum size of 128MB

7) Click OK.

8) After rebooting, chack to make sure you STILL have a manual swapfile.

9) Manually download ZGET.ZIP, zdjgpp.7z and mingw4.7z.

10) Extract ZGET.ZIP into a folder (e.g. C:\1\) and place the other two into that folder.

11) Make sure you are online on the Internet and run ZGET from a DOS window.

12) Answer questions appropriately to compile the DOS version of ZSNES (you may have to say NO for 'specific CPU optimisations' - like I did)

13) Go away for 5 days while it compiles...LOL!

That's all folks!
-=3Dfx Still rox!=-
Kajuru
Regular
Posts: 253
Joined: Wed Oct 18, 2006 6:43 pm
Location: localhost

Re: FINISHED!

Post by Kajuru »

The funny part is that, according to you, it isn't optimized for your system, and even if it were, you just spent about a week(including eletricity costs) into something that isn't going to run anyway. :twisted:
creaothceann
Seen it all
Posts: 2302
Joined: Mon Jan 03, 2005 5:04 pm
Location: Germany
Contact:

Post by creaothceann »

It takes all kinds...
vSNES | Delphi 10 BPLs
bsnes launcher with recent files list
gpp
New Member
Posts: 7
Joined: Sun Jun 24, 2007 1:33 am
Location: U.K.

Wel DUUUH!

Post by gpp »

@Kajuru - The point was to see how long it would take to compile. :roll:
(even if it IS un-optimised) :P
Obviously it's a one-time thing and I WON'T be doing it again. :wink:

All I wanted to do was see if it would be possible on such a low-end system. :)

And it was...but only after a LOOONG time...LOL! :lol:
-=3Dfx Still rox!=-
Post Reply