get_pixel?

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

Moderators: cheriff, Herben

Post Reply
Shine
Posts: 728
Joined: Fri Dec 03, 2004 12:10 pm
Location: Germany

get_pixel?

Post by Shine »

I've seen some put_pixel functions, but how to write a get_pixel? It should be possible, because at http://cvs.ps2dev.org/altimit/ee/altimi ... p?rev=HEAD there is a commented screenshot include.

I've found the description how to do it somewhere on the internet and I understand all, like setting the FINISH and BUSDIR register, but what is the "Host I/F" and how can I read from it?
Guest

Post by Guest »

Ahh....one of the most complex areas I think of the EE architecture. :)

It is easier to understand if you have a Linux Kit and read both the GS Users manual and the source code to the GS video driver, particularly the gsstoreimage() (not sure thats the name) function.

Basically, the frame buffer isn't set up for easy reading from host (EE). You have to specify a region in GS memory, switch transfer directions of both the GIF and the VIF1, and initiate the actual transfer. If I remember correct, you read the transfer data from VIF1 FIFO. (Might sound confusing because you would normally write to the VIF1 FIFO, not many realize there is a reason for reading as well, since the transfer occurs along PATH2).

I haven't even begun to describe the process in detail, but gave you the basics. I did a more comprehensive writeup in www.playstation2-linux.com forums some years back but it seems impossible to do any meaningful searches on forum posts there. If I find it I will let you know.
Shine
Posts: 728
Joined: Fri Dec 03, 2004 12:10 pm
Location: Germany

Post by Shine »

gorim wrote:Ahh....one of the most complex areas I think of the EE architecture. :)
Yes, it is not so easy. I wanted it for screenshots, so I checked out the whole ps2dev CVS and did a fulltext search, and there is already such a function:

http://cvs.ps2dev.org/ps2sdk/ee/debug/s ... c?rev=HEAD

I've integrated it in the starsimulation and created a little animation:

http://www.frank-buss.de/ps2/index.html
Post Reply