ASM, can't think of anything better

Discuss the development of software, tools, libraries and anything else that helps make ps2dev happen.

Moderators: cheriff, Herben

Post Reply
soks
Posts: 100
Joined: Tue May 25, 2004 1:25 am
Location: Chicago, IL

ASM, can't think of anything better

Post by soks »

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
User avatar
Drakonite
Site Admin
Posts: 990
Joined: Sat Jan 17, 2004 1:30 am
Contact:

Post by Drakonite »

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
soks
Posts: 100
Joined: Tue May 25, 2004 1:25 am
Location: Chicago, IL

Post by soks »

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
soks
Posts: 100
Joined: Tue May 25, 2004 1:25 am
Location: Chicago, IL

Post by soks »

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?
User avatar
Drakonite
Site Admin
Posts: 990
Joined: Sat Jan 17, 2004 1:30 am
Contact:

Post by Drakonite »

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
pixel
Posts: 791
Joined: Fri Jan 30, 2004 11:43 pm

Post by pixel »

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.
soks
Posts: 100
Joined: Tue May 25, 2004 1:25 am
Location: Chicago, IL

Post by soks »

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...
mharris
Posts: 155
Joined: Sun Jan 25, 2004 2:26 pm
Location: Annapolis, MD, USA

Post by mharris »

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>
soks
Posts: 100
Joined: Tue May 25, 2004 1:25 am
Location: Chicago, IL

Post by soks »

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.
Guest

Post by Guest »

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.
soks
Posts: 100
Joined: Tue May 25, 2004 1:25 am
Location: Chicago, IL

Post by soks »

O_O
Post Reply