Emuforums.com

Go Back   Emuforums.com > PS2 Emulation > Misc PS2 Discussion
About Us Register FAQ Members List Calendar Mark Forums Read

Login to remove all ads!
Reply
 
LinkBack Thread Tools Display Modes
Old November 22nd, 2003   #1 (permalink)
Ar-digital Intelligence
 
psycho_cyclone's Avatar
 
Join Date: Nov 2003
Location: PC heaven
Posts: 53
Question HELP... CPU instructions, Little-Endian or Big-Endian?

please help,
i'm writing a PS2 emu and i just came to the part of interpreting CPU instructions, i want to extract, for instance, the opcode num from the instruction set, BUT:
should i treat the instruction as Little-Endian byte order, or Big-Endian?
i mean, for instance, is the opcode in the FIRST byte in the ELF file, or in the FOURTH one???
PLEASE help me out! thanx.
__________________

My system:
[Motherboard:] Gigabyte 8IPE1000Pro-G (Intel 865PE chipset)
[Processor:] Intel Pentium 4 2.80E (FSB800, 1MB cache, HyperThreading support)
[RAM:] 512MB DDR400
[Video card:] nVidia GeForce FX 5900 Ultra 256MB DDR (ASUS V9950 Ultra)
[Hard drive:] 80GB Seagate Barracuda 7200.7
psycho_cyclone is offline   Reply With Quote
Old November 23rd, 2003   #2 (permalink)
Administrator
 
Chrono Archangel's Avatar
 
Join Date: Dec 2001
Location: Montreal, Canada
Posts: 7,067
Re: HELP... CPU instructions, Little-Endian or Big-Endian?

psycho_cyclone this is just a little advice. you would probably have better luck asking these kind of questions directly to an emu author. most authors dont visit the board (there are some exceptions of course) and you would probably get a faster answer by contacting via email an author
Chrono Archangel is online now   Reply With Quote
Old November 23rd, 2003   #3 (permalink)
"Insert witty title here"
 
bcrew1375's Avatar
 
Join Date: Jun 2003
Location: In a house
Posts: 1,046
Re: HELP... CPU instructions, Little-Endian or Big-Endian?

I saw on a site somewhere that the PS2 has the same endianness(is that a word?) as the PC. If that's true, it would of course be little endian.
bcrew1375 is offline   Reply With Quote
Old November 23rd, 2003   #4 (permalink)
Emu author
 
zenogais's Avatar
 
Join Date: Aug 2003
Location: Victorville(Near Los Angeles or LA for those who are on the DL)
Posts: 839
Re: HELP... CPU instructions, Little-Endian or Big-Endian?

These questions really should be simple to find out, just look around for documentation. Also I'm fairly certain that it is little-endian byte order, meaning no byte-order conversion need be done.
__________________
-----------------
Emu Tinkerer and C++ Programmer
zenogais is offline   Reply With Quote
Old November 24th, 2003   #5 (permalink)
"Insert witty title here"
 
bcrew1375's Avatar
 
Join Date: Jun 2003
Location: In a house
Posts: 1,046
Re: HELP... CPU instructions, Little-Endian or Big-Endian?

Hmm, zenogais, excuse me if I sound stupid, but I thought little-endian was having the higher bytes after the low bytes. Wouldn't it be big-endian that needs no conversion? Again, excuse me if I sound stupid, I'm no expert.
bcrew1375 is offline   Reply With Quote
Old November 24th, 2003   #6 (permalink)
B( o Y o )BS?
 
GiGaHeRz's Avatar
 
Join Date: Feb 2002
Location: Spain
Posts: 847
Re: HELP... CPU instructions, Little-Endian or Big-Endian?

Quote:
Originally Posted by bcrew1375
Hmm, zenogais, excuse me if I sound stupid, but I thought little-endian was having the higher bytes after the low bytes. Wouldn't it be big-endian that needs no conversion? Again, excuse me if I sound stupid, I'm no expert.
PCs are little endian
__________________
"There's only one absolute truth in our world: shït happens." - Gigaherz (whoever decided "s-h-i-t" is a obscene word needs to grow up a few years)

The Book and other stories:
Tears of Fantasy - An Online Book... by ME!
MetaLife, Inc. (intro)
SubGaea (intro)
Crow Blade (intro for now)
Memories - Prayer from the fallen hearts.

My weblog... not like if there was too much to read on it tho.
For anyone interested, there's a mirc script which converts "/me 's" into " * nickname's whatever" and adds a nice "/my" command.
GiGaHeRz is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 20:36.

© 2006 - 2008 Emu Forums | About Emu Forums | Legal | A member of the Crowdgather Forum Community


Powered by vBulletin® Version 3.7.0 Release Candidate 3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC5