• Hey, guest user. Hope you're enjoying NeoGAF! Have you considered registering for an account? Come join us and add your take to the daily discourse.

Programming on PS2 is easy ( a before and after photo comparison )

Panajev2001a

GAF's Pleasant Genius
Panajev's mood before starting to really sit down at the low level ( sps2 dev library ).

stu-smiling-skiing.jpg




Panajev's mood after days of GIF tags here, VIF tags there, DMA tags above, tons of "samples" with tons of lines of uncommented code, etc...

img2.gif


+

img2.gif




Programming the actual VUs is not an enormous task, neither is the RISC core or the GS: is the first step to get everything going, to move data around, to set things up which is really, really mind-bending.

Unless you have a pre-made engine and your focus is not to understand how to do things youself.

:(.

Sigh.
 

Panajev2001a

GAF's Pleasant Genius
TekunoRobby said:
Pana is the HAWTEST programmer alive.
stu-smiling-skiing.jpg

That is not a picture of me :p.

And that was my mood "before" sitting down at the low level.

The jump from PS2GL to sps2 is really enormous.
 

TekunoRobby

Tag of Excellence
Panajev2001a said:
That is not a picture of me :p.

And that was my mood "before" sitting down at the low level.

The jump from PS2GL to sps2 is really enormous.

Don't be modest Pana, you gotta flaunt it baby.

How different is it anyways?
 

Panajev2001a

GAF's Pleasant Genius
TekunoRobby said:
Don't be modest Pana, you gotta flaunt it baby.

How different is it anyways?

It is a BITCH.

It is like not only asking you to run the Tour de France on your bike, but asking you to build the bike yourself manually.

:(.


030.jpg
 

slayn

needs to show more effort.
suddenly getting a gba to get what you want it to do doesn't look nearly as bad eh?
 

pcostabel

Gold Member
Hey, Pana. Just look at one of the Sony examples. It's not that hard once you have a working DMA list. Of course having a DTL-T15000 to play with helps... :D
 

Panajev2001a

GAF's Pleasant Genius
pcostabel said:
Hey, Pana. Just look at one of the Sony examples. It's not that hard once you have a working DMA list. Of course having a DTL-T15000 to play with helps... :D

I cannot look at Sony examples ( with PS2Linux ), I do not have access to a DTL-T15000 you EVIL thing :(.

Having classes to generate pre-built DMA packets with GIF tags, VIF tags, the whole shabang is not that easy.

We are going to prolly write our class to create DMA, GIF and VIF tags as the sps2 examples are either either badly documented and criptic or limited or both.

The thing is that we do not want to ditch the 3D model loader the guy behind sps2 made as it seems to be quite powerful: strip-ifies the models, imports textures and animation, etc...

We do not want to re-write everything, but we do not want to go ahead with a library without knowing jackshit about how things are done as we would then not able to produce a thing or we would end up making something ultra slow and buggy.

We, for now, is me and Ourumov as so far no other IGGS members owns a Linux kit: they could look at the PS2 docs and help making the classes to handle the low level stuff ;).

I am looking at you Slayn and Fart :p.
 

Panajev2001a

GAF's Pleasant Genius
fart said:
i'm bored. i'd like to try this.

oh wait, no emu :(

The Linux kit is the price of a Flash cart writer ;).




suddenly getting a gba to get what you want it to do doesn't look nearly as bad eh?

Hehe, that can be a pain because of stack and heap overwriting shit in RAM or breaking VBLANK time and creating bugs that are freaking weird.

Yes, PS2 is a nightmare to start with, but it does hold a lot of potential.

The pain in the GBA was not setting things up, but setting things up is the major pain on PS2: you have the sweetness of two powerful VUs and the RISC core SIMD unit :).
 

slayn

needs to show more effort.
I finally got a programming job, and guess what, they use my brackets =P
did anyone ever end up continuing with the gba engine?
 

pcostabel

Gold Member
Panajev2001a said:
I cannot look at Sony examples ( with PS2Linux ), I do not have access to a DTL-T15000 you EVIL thing :(.

Having classes to generate pre-built DMA packets with GIF tags, VIF tags, the whole shabang is not that easy.

We are going to prolly write our class to create DMA, GIF and VIF tags as the sps2 examples are either either badly documented and criptic or limited or both.

The thing is that we do not want to ditch the 3D model loader the guy behind sps2 made as it seems to be quite powerful: strip-ifies the models, imports textures and animation, etc...

We do not want to re-write everything, but we do not want to go ahead with a library without knowing jackshit about how things are done as we would then not able to produce a thing or we would end up making something ultra slow and buggy.

We, for now, is me and Ourumov as so far no other IGGS members owns a Linux kit: they could look at the PS2 docs and help making the classes to handle the low level stuff ;).

I am looking at you Slayn and Fart :p.


Not sure what you're trying to accomplish, but I have a Linux kit and there are plenty of low level examples. It's really not that hard to figure out what's going on with the Hardware manual at hand. If you want, I can take a look at your code. And what is IGGS?
 

slayn

needs to show more effort.
I wouldn't mind taking a look at it, just get on aim and start telling me about it this weekend or something.

I have no plans on getting a linux kit though.
 

fugimax

Member
Panajev --

Completely unrelated, but is it possible to throw a PS2 formatted HDD into a PC and mount it (read/write) via linux? I'm figuring *someone* in the ps2 homebrew community would have done this...but I can't seem to find it.
 

Panajev2001a

GAF's Pleasant Genius
slayn said:
I finally got a programming job, and guess what, they use my brackets =P
did anyone ever end up continuing with the gba engine?

I solved some bugs it had yes and >< ( bored ) was still working on the pathfinding engine.

What kind of job did you find ?

And screw their brackets :p.
 

Panajev2001a

GAF's Pleasant Genius
pcostabel said:
Not sure what you're trying to accomplish, but I have a Linux kit and there are plenty of low level examples. It's really not that hard to figure out what's going on with the Hardware manual at hand. If you want, I can take a look at your code. And what is IGGS?

Internet Garage Games Studio ;).

http://iggs.ript.net/IGGS_forum

( we have a website, but very old and not kept up-to-date )

The issue is not understanding how each thing in itself work, but the massive work you need to set-up things before even starting to work on each of the single processors ( this is something PS2 developers will likely confirm to you too ).

I can go with pre-done code, the problem is that it will take me quite a bit to decipher tons of uncommented lines before I can integrate my code or I can start writing classes to handle and create packets and tags for DMA, GIF and VIF transfers which is not easy.

I'll IM you my MSN and AIM nicks, maybe you too can join IGGS ;).

As soon as we get a bit farther along with development, we will open up a project on playstation2-linux.com and use their CVS to keep our code up-to-date with each other: when we have a title in mind.

We are going to be using sps2, I am not sure if you have ever used it but if you have not it is here:

http://playstation2-linux.com/projects/sps2/

And here is the 3D model converter/loader page made by the sps2 guys:

http://playstation2-linux.com/projects/ps2conv

It supposely give you extremely easy access to the models, but yet in their sample they dedicate two additional files to handle the data after the model has been loaded.
 

Fafalada

Fafracer forever
pcostabel said:
Just look at one of the Sony examples.
Much as those samples were the necessery evil for all of us at some point, most of those that ship with PS2 SDK are pretty terrible. If there's one thing you learn from them very quickly it's how "not" to do things ;) Granted it's still better then nothing when you're new to the hw.

Don't know about the stuff that's there with linux kits though, maybe they have better sample code there.

Panajev said:
I can go with pre-done code, the problem is that it will take me quite a bit to decipher tons of uncommented lines before I can integrate my code or I can start writing classes to handle and create packets and tags for DMA, GIF and VIF transfers which is not easy.
What's wrong with the chain management API that comes with the SDK?
 

Panajev2001a

GAF's Pleasant Genius
fugimax said:
Panajev --

Completely unrelated, but is it possible to throw a PS2 formatted HDD into a PC and mount it (read/write) via linux? I'm figuring *someone* in the ps2 homebrew community would have done this...but I can't seem to find it.

Maybe, but why would you want to do that though ?
 

Panajev2001a

GAF's Pleasant Genius
Bizarro Sun Yat-sen said:
hmm... I'd kind of like to work on the GBA project again, if you can find someone else to do the game design so I can only worry about programming...

Who are you though ?

I would not mind it either, I can shift myself more on the design part and fin d more people do to art, but the engine needs some serious thought put into it as we often broke outof VBLANK time and we need to implement some non buggy UI, etc...

The project is not dead ;).
 

Panajev2001a

GAF's Pleasant Genius
Fafalada said:
Much as those samples were the necessery evil for all of us at some point, most of those that ship with PS2 SDK are pretty terrible. If there's one thing you learn from them very quickly it's how "not" to do things ;) Granted it's still better then nothing when you're new to the hw.

Don't know about the stuff that's there with linux kits though, maybe they have better sample code there.

Uhm........ no :(.


What's wrong with the chain management API that comes with the SDK?

What API ?

What SDK ?

:)

I hope you do not mean libps2dev as not only does not noffer any documentation or comments in regards to GIF, VIF and DMA chain management ( a little bit on DMA, but really just a description of the basic functions it provides ), but do not really do much.

For DMA transfers to VUs you have to write the packets by hand ( in their samples they have already created packets embedded in the .dsm files, so they cna make DMA/VIF/GIF transfers appear much easier in the .c files ;) ).
 

Fafalada

Fafracer forever
Panajev said:
What API ?
What SDK ?
I'm not too familiar with LinuxKit environment, but I remember seeing some code that used calls rather similar to the API that comes with DTL SDK, for managing DMA chains.
Maybe it was custom written stuff, I really wouldn't know.

Of course the API doesn't do much more for you then say - using assembler as opposed to writting straight machine code. The functions are just enough to help writting DMA commands into the chain, instead of assembling the opcodes by hand.
In all fairness - knowing actual opcodes is kind of a requirement when it comes to debugging the chains though...

For DMA transfers to VUs you have to write the packets by hand ( in their samples they have already created packets embedded in the .dsm files, so they cna make DMA/VIF/GIF transfers appear much easier in the .c files ).
Well .dsm has a pretty nice macro preprocessor that makes writting of DMA chains easier then the above mentioned API. But it's only usefull for statically assembled chains of course.
 

slayn

needs to show more effort.
I was always interested in both game design and programming, wouldn't mind doing either. I spose it woudl be better if I looked at the gba stuff again since I don't have a linux kit. My problem with gba was people working on backgrounds and stuff. I was getting bored of using my mspaint pictures =\

stupid kitsune owes me blocks and colomns for my puzzle game!

I wonder if I still have that game lying around here somewhere...
 

slayn

needs to show more effort.
also, if you need 3d models for your ps2 thing pana I would love to do that. btw, forum link doesn't work for me.
 

ourumov

Member
I'm not too familiar with LinuxKit environment, but I remember seeing some code that used calls rather similar to the API that comes with DTL SDK, for managing DMA chains.
Maybe it was custom written stuff, I really wouldn't know.
I think you are refering to sps2...Take a look at this to confirm:

http://atari.upf.es/alumnes/~u5866/Files/main.cpp

To do simple stuff it's easy imo...At least I didn't have a lot of trouble to do my first steps (load an ASE model and display it). But when you want to begin using vus the thing changes a lot, specially if it's micro mode....So far I only succeeded using vu0 in macro mode which can't be called a big achievement since it's just writing the asm code...
But I agree with Pana...sps2 only comments well the first two examples (triangle/dma_triangle) ; all the rest should be better explained.


BTW, to all the linux kit users...You have to see the vu1 coding contest entries...specially "galaxies"...
 

Fafalada

Fafracer forever
Hey, those are actual classes - that's more then the clumsy API they supplied with SDK for first few years... If they had stuff like that from the start I might have actually used some of their libs instead of writting everything from scratch :p

Btw - for your learning steps you might want to try running microcode by calling it from CPU first - easier to debug too. For VU0 you aren't likely to run it off DMA too often anyhow.
 

Panajev2001a

GAF's Pleasant Genius
ourumov said:
I think you are refering to sps2...Take a look at this to confirm:

http://atari.upf.es/alumnes/~u5866/Files/main.cpp

To do simple stuff it's easy imo...At least I didn't have a lot of trouble to do my first steps (load an ASE model and display it). But when you want to begin using vus the thing changes a lot, specially if it's micro mode....So far I only succeeded using vu0 in macro mode which can't be called a big achievement since it's just writing the asm code...
But I agree with Pana...sps2 only comments well the first two examples (triangle/dma_triangle) ; all the rest should be better explained.


BTW, to all the linux kit users...You have to see the vu1 coding contest entries...specially "galaxies"...


Again, it's VUniverse not Galaxies :p.

Ourumov, I need to talk with you, I have an idea: we might need our own model loader ( we can build DMA/GIF/VIF chains statically while we import the geometry... we need to talk on that topic a bit before and especially after your exam ).
 
Top Bottom