misc dev questions

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

Moderators: cheriff, Herben

Post Reply
User avatar
DracoLacertae
Posts: 22
Joined: Tue Jul 13, 2004 3:49 am
Location: Berkeley, CA
Contact:

misc dev questions

Post by DracoLacertae »

I've had the ps2linux kit for quite a while, and want to get myself more into native development. I've been working in a game engine project on the PC, which I want to port over to the ps2, and am considering native mode over linux. Before I start, I have a few questions:

-I've got the latest ps2gl (0.3.1) and got it working in linux fine. I want to use ps2gl in native mode, and see a version on this site that's a bit older. I'm wondering, has anyone here used 0.3.1 with the native ps2dev tools, and if so, how well does it work?

-Memory protection: The heart of my engine is a bytecode interpreter. It runs at ok speed in linux (it just does game scripting), but I think I should write it as a recompiling interpreter. How strict is the memory protection with the native mode kernel? I need to be able to have pages of memory enabled for writing, and then change the permission to enable execution. If possible, I would like +rwx at the same time.

-File access: On the linux version, I just store everything on the linux partition. On the native version, I will have to keep everything on the host filesystem or a memory card. I've seen some hard drive drvers on this site. Do the libraries here only deal with the sony gaming filesystem (i think it's called APA), or can it read from the linux ext2 filesystems?

Thanks!
User avatar
Drakonite
Site Admin
Posts: 990
Joined: Sat Jan 17, 2004 1:30 am
Contact:

Re: misc dev questions

Post by Drakonite »

DracoLacertae wrote: -File access: On the linux version, I just store everything on the linux partition. On the native version, I will have to keep everything on the host filesystem or a memory card. I've seen some hard drive drvers on this site. Do the libraries here only deal with the sony gaming filesystem (i think it's called APA), or can it read from the linux ext2 filesystems?
It currently only deals with APA/PFS.
Shoot Pixels Not People!
Makeshift Development
rinco
Posts: 255
Joined: Fri Jan 21, 2005 2:12 pm
Location: Canberra, Australia

Post by rinco »

what is a recompiling interpreter?...

Your search - "recompiling interpreter" - did not match any documents.
Oobles
Site Admin
Posts: 347
Joined: Sat Jan 17, 2004 9:49 am
Location: Melbourne, Australia
Contact:

Post by Oobles »

I'm not sure I'm right, but feeling like responding anyway.. I think a recompiling interpreter is where byte code is rewritten into mips instructions when loaded. So the initial load of the byte code is slow, but following that all the code is run natively. Similar to JVM hotspot compiler. There's probably a more common name for this technique.
ooPo
Site Admin
Posts: 2023
Joined: Sat Jan 17, 2004 9:56 am
Location: Canada
Contact:

Post by ooPo »

dynamic recompiling?
Guest

Re: misc dev questions

Post by Guest »

DracoLacertae wrote: How strict is the memory protection with the native mode kernel? I need to be able to have pages of memory enabled for writing, and then change the permission to enable execution. If possible, I would like +rwx at the same time.
I think you have the Linux kit, no ?

Check out the EE Core User's manual. Read the sections on memory address spaces (mapping and segments) and the TLB organization.

This will answer your question better than any response you will get here.

In short, and at least my understanding is, the native kernel doesn't do anything more complicated with memory mapping than is described in the manual.

It is up to you whether you want to run things in kernel mode or user mode.
User avatar
DracoLacertae
Posts: 22
Joined: Tue Jul 13, 2004 3:49 am
Location: Berkeley, CA
Contact:

Post by DracoLacertae »

Thanks for the info. Yes, I do have the linux kit. In fact I find using reload1 to be a very clean and easy way to boot programs (Thanks mrbrown) Since the libraries only access APA, I will probably read all the files off of host.

I'm going to try messing around with ps2gl compiled in native mode tonight, and see if I can do anything with it. I'll probably end up back on this forum asking for help. :-) (That is if I have time after my HW. Being a student really sucks for your independent projects; they tend to suffer.)

Oh, the dynamic recompiling is exactly right: I don't know where I got 'recompiling interpreter.' from.
Oobles
Site Admin
Posts: 347
Joined: Sat Jan 17, 2004 9:49 am
Location: Melbourne, Australia
Contact:

Post by Oobles »

You might find it easier using dreamGL instead of the linux code. From what I remember of ps2gl it doesn't conform very well to the openGL spec. You also might find it easier than porting the ps2gl code.
User avatar
DracoLacertae
Posts: 22
Joined: Tue Jul 13, 2004 3:49 am
Location: Berkeley, CA
Contact:

Post by DracoLacertae »

I looked through the DreamGL headers, and couldn't find any blending functions. If dreamGL had fog and alpha blending, it would be practically perfect for what I need. It doesn't seem to have texture coordinate generation, but I can do this myself. Also, does DreamGL support different texture formats? I will quickly use up all the GS ram if I can only use 32bit.

Is ps2gl ready to use 'out of the box,' with ps2dev? I've looked, and the 'uber makefile' has support in it for native mode. Is this leftover from older versions when sony first made it, or does it still work? Has anyone here sucessfully used ps2gl (0.3.1) outside of ps2linux?

I also looked at gslib, and it seems to have most of what I need in terms of rendering primitives, except it doesn't do the 3d math for me. So I'm thinking of taking the 3d math and matrix handling functions from dreamgl and putting them with the primitive drawing and texture functions of gslib. Does this sound like a reasonable idea, or am I shooting myself in the foot?

Also, are there any other graphics libraries for the ps2, that do the 3d matrix/tranform/clipping/projection for you?
User avatar
Drakonite
Site Admin
Posts: 990
Joined: Sat Jan 17, 2004 1:30 am
Contact:

Post by Drakonite »

DracoLacertae wrote: Also, are there any other graphics libraries for the ps2, that do the 3d matrix/tranform/clipping/projection for you?
The PS2 libaries typically don't do those sorts of things for you, largely because it's much more effecient to write your own vu code to do it.
Shoot Pixels Not People!
Makeshift Development
mharris
Posts: 155
Joined: Sun Jan 25, 2004 2:26 pm
Location: Annapolis, MD, USA

Re: misc dev questions

Post by mharris »

Drakonite wrote:It currently only deals with APA/PFS.
I actually got about 75% of the way with an ext2fs driver for ps2sdk. It's read-only, and there are many many missing features.

I don't know what state it's in right now, this was a couple months ago and it's been relegated to my ever-growing pile of semi-finished projects.
User avatar
DracoLacertae
Posts: 22
Joined: Tue Jul 13, 2004 3:49 am
Location: Berkeley, CA
Contact:

Post by DracoLacertae »

it's been relegated to my ever-growing pile of semi-finished projects.
Haha, sounds like what happens to most of my projects. For me school has mostly been a vicous time-sucking vampire.

This weekend I'll mess around with some ps2 graphics stuff: play around with dreamgl, gskit, and the vu's.

Thanks everyone. Hopefully I can at least get the 2D path of my engine running well enough on the ps2 that I can release something to the public.
Post Reply