forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

ASM, can't think of anything better

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PS2 Development
View previous topic :: View next topic  
Author Message
soks



Joined: 25 May 2004
Posts: 100
Location: Chicago, IL

PostPosted: Tue Nov 09, 2004 8:17 pm    Post subject: ASM, can't think of anything better Reply with quote

So I was looking at some beginner stuff for PS2 development and I suddenly saw something scarier than the intense use of macros (which I'm slowly liking more), ASM! AH!

Now don't get me wrong I get the basics behind ASM as well as hardware logic but I've never written more than 3 lines of assembly first hand, and that was HLA which seemed... well... let's just say like SUSE as opposed to LFS. I was just wondering if more knowledge than put something into registers, command, hey there it goes, is needed and possibly what good resources any of you guys ever used or know? (prefferably something that doesn't involve Win32 ASM crap that is pointless for me, maybe some linux =p ).

Also if anyone knows good free or book resources on circuits and stuff... I've never been good with that either... come to think of it all I can do is program and err... graphics stuff... damn. Hi PS2... please don't bite me.

At least the loader works =P
Back to top
View user's profile Send private message AIM Address
Drakonite
Site Admin


Joined: 17 Jan 2004
Posts: 989

PostPosted: Tue Nov 09, 2004 10:52 pm    Post subject: Reply with quote

If you are using one of the graphics libs then techincally you can get by without knowing ASM at all.

If you really want to take control and push the PS2 you'll have to access the graphics hardware on your own and write some vu code... And you have to program the VUs in ASM ;)
_________________
Shoot Pixels Not People!
Makeshift Development
Back to top
View user's profile Send private message Visit poster's website
soks



Joined: 25 May 2004
Posts: 100
Location: Chicago, IL

PostPosted: Wed Nov 10, 2004 3:33 am    Post subject: Reply with quote

Wow, thanks a lot, I didn't think I would get an answer that's so specific, I had no idea the VU's required ASM.

Any idea on places I can learn it? Whenever I try I can never really decide on WHAT freakin' assembler to use and then I find people talking about legality issues with MASM and it's all very very sad. Then again I might just be nuts, any ideas on sites to learn? Yeah I know, google, but I'm wondering about personal opinions and maybe "how you learned".

Personally I'm at a University right now that has a Game Development degree and from what I hear, they recommend you learn ASM, but they don't teach it! O_o
Back to top
View user's profile Send private message AIM Address
soks



Joined: 25 May 2004
Posts: 100
Location: Chicago, IL

PostPosted: Wed Nov 10, 2004 6:08 pm    Post subject: Reply with quote

Ok, so I'm browsing ASM tuts, will read more specific stuff for a bit better understanding of syntax, but this stuff surely doesn't directly relate to the VU's.

That is... VU ASM is different than x86 ASM right? I mean it HAS TO BE, it's a different friggin' chip right?

That being said the commands are the main difference then right? So is there anywhere I can get ASM info on the VU's directly? or is that something the PS2-Linux docs have, and thus I can't?
Back to top
View user's profile Send private message AIM Address
Drakonite
Site Admin


Joined: 17 Jan 2004
Posts: 989

PostPosted: Wed Nov 10, 2004 11:25 pm    Post subject: Reply with quote

ASM for different archs is completely different. From what I've been told the VU ASM seems extremely different from anything else out there you might have worked with...
But then again, I do not know ASM, so how much you can trust what I say you'll have to decide.
The majority of VU docs are with the linux kit. There are a bit more floating around the web I think, but I'm not sure where or how much.

I don't know much on the subject, so I'll just stop here and hope someone else helps you out with the rest.
_________________
Shoot Pixels Not People!
Makeshift Development
Back to top
View user's profile Send private message Visit poster's website
pixel



Joined: 30 Jan 2004
Posts: 791

PostPosted: Thu Nov 11, 2004 12:05 am    Post subject: Reply with quote

Well, you've told basically everything: asm is different for each machine. Learning x86 asm won't really help you understanding ps2 asm. Well, okay, you may understand the vague 'register-based' concept of the language asm, but that's all. When I moved to mips asm some years ago, it was quite a difficult task to get myself used with it, and I had a quite non-neglectable x86 experience.

Now, I think learning ps2 asm is quite helpful, especially when you have to decypher ps2link's exceptions. That's always better to have some hints about "what is my compiled code doing wrong here", in order to guess what is the C code doing wrong.
_________________
pixel: A mischievous magical spirit associated with screen displays. The computer industry has frequently borrowed from mythology. Witness the sprites in computer graphics, the demons in artificial intelligence and the trolls in the marketing department.
Back to top
View user's profile Send private message
soks



Joined: 25 May 2004
Posts: 100
Location: Chicago, IL

PostPosted: Thu Nov 11, 2004 8:42 am    Post subject: Reply with quote

Wow, ok, I'll poke around for VU info then... but yeah I got the basic register stuff a few years ago, took hardware course just didn't write ASM, so then I looked at VU an I see some bizzare commands and I thought maybe... I dunno. Yeah.

Anyways, the sytax looks kinda the same as x86, then again that's porbably just because of registers, so yeah.

Fun, thanks for the info, I should like.... go code SOMETHING before poking the ASM... I really should...
Back to top
View user's profile Send private message AIM Address
mharris



Joined: 25 Jan 2004
Posts: 155
Location: Annapolis, MD, USA

PostPosted: Fri Nov 12, 2004 8:39 am    Post subject: Reply with quote

One of the best ways to learn asm for an unfamiliar architecure is to look at compiler-generated code. Use ee-gcc with the "-S" option (rather than "-c") to generate an assembly file. (Use the -o <output_filename>, or it will write it to a.out or somewhere odd like that).

You can also disassemble .o and .elf files using ee-objdump -d <filename>
Back to top
View user's profile Send private message AIM Address
soks



Joined: 25 May 2004
Posts: 100
Location: Chicago, IL

PostPosted: Fri Nov 12, 2004 9:14 am    Post subject: Reply with quote

That's an interesting thought... O_O

Although it seems a little frightening, it makes a lot of sense, not to mention small snippets of code can't be too hard to figure out, right?... eheh.
Back to top
View user's profile Send private message AIM Address
Guest






PostPosted: Fri Nov 12, 2004 1:36 pm    Post subject: Reply with quote

soks wrote:

Although it seems a little frightening...


You should be safe. It is the rare ASM that looks at you with malicious red baleful eyes while baring its big sharp pointy teeth.

When that happens, I suggest retreating from the room and calling 911 or whatever your emergency response number is.

After they have applied the holy hand grenade of Antioch, consult back here on your next step.
Back to top
soks



Joined: 25 May 2004
Posts: 100
Location: Chicago, IL

PostPosted: Fri Nov 12, 2004 3:01 pm    Post subject: Reply with quote

O_O
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PS2 Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group