Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Architectures & Platforms Gentoo on AMD64
  • Search

Console emulators on 64bit

Have an x86-64 problem? Post here.
Locked
Advanced search
12 posts • Page 1 of 1
Author
Message
SniperSlap
n00b
n00b
Posts: 45
Joined: Fri Nov 26, 2004 2:09 pm
Location: Winnipeg, MB
Contact:
Contact SniperSlap
Website

Console emulators on 64bit

  • Quote

Post by SniperSlap » Mon Dec 13, 2004 1:58 am

Okay, so what's the process of getting gaming console emulators working under an AMD64 install?
Am I limited if the emulator is written partially (or wholly) in assembly? Are there any success stories so far of certain emulators on AMD64?

I've got piles of things working perfectly. If I didn't know any better, AMD64 is as stable if not more stable than x86-32!!! LOL

I have a very nice sexy system running with lots of great hardware features actually being used.

Any advice would be helpful. Still new to the whole "not being able to use everything I see" situation unfortunatley.
Top
2crazy
n00b
n00b
Posts: 54
Joined: Mon Apr 07, 2003 10:22 am

  • Quote

Post by 2crazy » Mon Dec 13, 2004 3:12 am

Hi,
especially emulators written in full or partially in assembler (32bit asm that is) will cause you problems. I think most of the time those asm routines get just replaced by much slower C code, if available.

An emulator completly written in C should have some speed improvement on your computer though.

You may have to run some of your favourites emulators in a 32bit chroot enviroment, at least for the time being.

cheers
Top
SniperSlap
n00b
n00b
Posts: 45
Joined: Fri Nov 26, 2004 2:09 pm
Location: Winnipeg, MB
Contact:
Contact SniperSlap
Website

  • Quote

Post by SniperSlap » Mon Dec 13, 2004 7:07 pm

So, to run a chrooted emulator, do I have to be running in a 32bit chrooted copy of Xwin?

Or does 32bit compatibility simply bring 32bit programs over to a 64bit environment already in operation?

How do I go about setting up and maintaining a 32bit environment? I've noticed that I do have quite a few extra symlinks in "/" like lib32 or whatever...All new stuff to me still.

Thanks for all the help!
Top
mike4148
l33t
l33t
Posts: 641
Joined: Tue Sep 09, 2003 11:05 pm

  • Quote

Post by mike4148 » Tue Dec 14, 2004 12:20 am

I just run with multilib and compile stuff by hand. zsnes (written almost entirely in 32-bit assembly language) works perfectly this way. Just make sure that you add the "-m32" CFLAG as an argument to configure/in the makefile. For example:

Code: Select all

CFLAGS="-O2 -pipe -m32" CXXFLAGS="-O2 -pipe -m32" ./configure
Most stuff compiles out of the box like that. Many other things work, but you have to mess with the build files a bit to get them to compile.
Top
toofastforyahuh
Apprentice
Apprentice
Posts: 172
Joined: Tue May 18, 2004 6:46 am

  • Quote

Post by toofastforyahuh » Tue Dec 14, 2004 11:13 am

xmame definitely works on amd64, except for a few games that still segfault. Some parts are being cleaned up to be truly 64-bit clean as we speak.

I've never tried xmess, but presumably a similar state there.
Top
SniperSlap
n00b
n00b
Posts: 45
Joined: Fri Nov 26, 2004 2:09 pm
Location: Winnipeg, MB
Contact:
Contact SniperSlap
Website

  • Quote

Post by SniperSlap » Tue Dec 14, 2004 10:57 pm

I grabbed a copy of the ZSnes sources and yeah, it looks quite promising! I'm anxious to get back hom to try my compile...If it does work, I'll be well impressed, 'cause I'll be using the best SNES emulator out there.

All of it's graphics calls are done using SDL, so lucky me...got that compiled and working.

This AMD64 system is just crisp so far.

So, when I do the compile, will I be able to run the end result in my 64bit Xorg sessions?
Top
mike4148
l33t
l33t
Posts: 641
Joined: Tue Sep 09, 2003 11:05 pm

  • Quote

Post by mike4148 » Wed Dec 15, 2004 12:47 am

So, when I do the compile, will I be able to run the end result in my 64bit Xorg sessions?
I do, so the answer must be yes :).
Top
SniperSlap
n00b
n00b
Posts: 45
Joined: Fri Nov 26, 2004 2:09 pm
Location: Winnipeg, MB
Contact:
Contact SniperSlap
Website

  • Quote

Post by SniperSlap » Wed Dec 15, 2004 1:48 am

Well, fine & dandy, but it seems like after trying

CFLAGS="-O2 -pipe -m32" CXXFLAGS="-O2 -pipe -m32" ./configure

I get stuff along the lines of "x86_64-unknown-linux-gnu": machine "x86_64-unknown" not recognized

Basically:

configure: error: This Target is Not Supported

So, how'd you get it working???? I have a funny feeling like my CFLAGS aren't actually being taken to heart.
Top
JazzSax006
n00b
n00b
Posts: 38
Joined: Tue Jun 03, 2003 8:25 pm

  • Quote

Post by JazzSax006 » Wed Dec 15, 2004 2:43 am

-m32 is an argument used if you have multilib support on your 64bit install (USE="multilib"). So if you want to use it, you'll need to add "multilib" to your use flags and then recompile glibc and gcc. There might be some other progs that need recompiling for multilib to work as well...can't remember since I used multilib from the start :). Basically, though, multilib allows you to compile 32bit binaries without having a full 32bit chroot environment.

EDIT: After adding "multilib" to your use settings in /etc/make.conf, I *think* that you can use

Code: Select all

emerge -pv --newuse world
to re-emerge the necessary packages on your system (assuming you are using a semi-recent version of portage)
Top
SniperSlap
n00b
n00b
Posts: 45
Joined: Fri Nov 26, 2004 2:09 pm
Location: Winnipeg, MB
Contact:
Contact SniperSlap
Website

  • Quote

Post by SniperSlap » Wed Dec 15, 2004 1:49 pm

Hrm, sounds good. I should probably get to adding some other things in there as well while I'm at it.

I know I have /lib32 and all that stuff, so could it be that it's already installed? Or am I actually missing a whole package (or few) at this point?
Top
mike4148
l33t
l33t
Posts: 641
Joined: Tue Sep 09, 2003 11:05 pm

  • Quote

Post by mike4148 » Thu Dec 16, 2004 3:54 am

There are two things you have to do to build zsnes (I hadn't done this in a while; I started from scratch to document exactly what was involved here....) 32-bit on amd64. First, zsnes will totally override any CFLAGS; don't both specifying them. To fix the unrecognized CHOST thing, run configure like so:

Code: Select all

linux32 ./configure
linux32 makes the command it runs behave exactly like it were running on an i686. This gives configure an i686-pc-linux-gnu CHOST, which is good enough for it to set things up. Next, you have to put in your own CFLAGS, to include the -m32. After running configure, open the file config.status in the current directory (zsnes-1.36/src). You'll see a line like

Code: Select all

s%@CFLAGS@%-pipe -I. ..........%g
That is, a huge line with zsnes's preferred CFLAGS. Take out the -march, all the -f's, and the -O, and replace them with yours, with a -m32 somewhere. For example, I replaced (all on one line)

Code: Select all

s%@CFLAGS@%-pipe -I. -Wall -D__LINUX__ -I/usr/X11R6/include -I/usr/include/SDL -D_REENTRANT -D__OPENGL__ -Os -ffast-math -fomit-frame-pointer -fschedule-insns2 -s -march=pentiumpro%g
with

Code: Select all

s%@CFLAGS@%-pipe -I. -Wall -D__LINUX__ -I/usr/X11R6/include -I/usr/include/SDL -D_REENTRANT -D__OPENGL__ -O3 -s -march=opteron -m32%g
After fixing the CFLAGS, run

Code: Select all

./config.status
make -j3
or similar to build 32-bit zsnes on amd64.
Top
andyjeffries
Apprentice
Apprentice
User avatar
Posts: 196
Joined: Wed Apr 14, 2004 6:46 pm
Location: Stevenage, Herts, UK
Contact:
Contact andyjeffries
Website

  • Quote

Post by andyjeffries » Thu Dec 16, 2004 2:42 pm

SniperSlap wrote:So, to run a chrooted emulator, do I have to be running in a 32bit chrooted copy of Xwin?

Or does 32bit compatibility simply bring 32bit programs over to a 64bit environment already in operation?

How do I go about setting up and maintaining a 32bit environment? I've noticed that I do have quite a few extra symlinks in "/" like lib32 or whatever...All new stuff to me still.

Thanks for all the help!
Have a look at the document I wrote:

http://forums.gentoo.org/viewtopic.php? ... 500298ff31
Developer of gPHPEdit
A8N-SLI/AMD X2 4800+/2GB Dual Channel/GF 7900GT OC
Top
Locked

12 posts • Page 1 of 1

Return to “Gentoo on AMD64”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic