Topic: Maratis on PSP?

My game development still isn't in full swing yet, I'm waiting on a couple of pieces of artwork and a meeting to decide what the actual scope for the demo is. That basically leaves me with a bit of time to twiddle my thumbs before I can get rolling properly and now the package/publishing is wrapping up I'm poking at other things to keep my fingers busy.

One thing I would like to do with my demo is to send it to Sony in the hope of charming a (Vita?) devkit from them. For this I want to have something on a Sony device, so I've been playing around with the homebrew PSP devkit, part of devkitPro. Having a look at Maratis, there's not an awful lot that would need to be done apart from rewriting the renderer.

Firstly, a couple of questions. Does anyone else have any use for the homebrew PSP version or should I just make it for myself? If other people are interested, do they have any preference as to how the project is built? It will be based on the current iOS build, but obviously there's not really a project file that would work, as it could be built on Windows, Linux and OSX. Also, I'm not sure the existing scons build system would really work, I'd have to look into it in more detail. I was considering premake4, as I'm planning on using it for my project, but it doesn't yet support changing the compiler. The other option is CMake I guess. Anyway, thoughts?

Re: Maratis on PSP?

I'm sure it will interest some users, after I don't know what is the performance of DevKit,
some years ago I used Nintendo DS homebrew before using the official kit, and it was really not the same, but it helped me building a prototype.

Just about the build, the iOS publishing example doesn't use scons at all, just xcode. I'm curious about premake, it sounds quite good, and updating all the projects when there is new versions of Maratis is currently very time consuming.

Re: Maratis on PSP?

I have no idea about the performance either, but if I can get something playable running with devkitPSP then I might be able to get one smile If you say people would be interested, then I shall do my best to make it clean and nice for other people to use smile

I realise that the iOS project didn't use scons, which was why I suggested using something else. With iOS it's (fairly) easy because there's just the one environment to set up (xcode).

I'd heard about premake several times in the past and I've been playing with different meta-project types, but not got around to premake until recently (I even started writing my own python one tongue) It seems to be very nice and fairly easy to extend, if you fancy writing into the jungle of embedded lua. As I've not got a great experience with lua, doing more than the inbuilt functions seems a bit daunting, and they currently don't support changing the compiler from the default one (gnu make - gcc, vs20XX - cl etc) and also don't support visual studio NMake projects. I could have a look at forking and extending premake4, but it might take a while. Also, I did find a fork (which _may_ have been merged back) which supports gnu make and devkitPPC for building Wii projects, so I guess that's an option.

Also, it occured to me that for PSP, I would have to build the npk file into the executable, which means I need to persuade libnpk to take a buffer. I had a look at the code for libnpk last night and... well, I should look when I'm not sleep deprived... that many gotos hurts my little brain tongue

Re: Maratis on PSP?

smile yes, take some rest man..

This business of building data into the executable is also a homebrew stuff, normally you don't need.
There is probably a way to not be forced to do it even with DevKitPro, adding to the fact that you have limited space (I think it was 4mo for DevKitPro DS).

Re: Maratis on PSP?

I think you can load files from the memory stick using devkitPSP, so potentially I could just stick the npk file on there, but I will have a look if I can somehow give libnpk a buffer. Shouldn't be _too_ bad. I have had some caffeine and can maybe work my way through the code at lunch tongue

Re: Maratis on PSP?

If I was you I'll first check the maximum data that can be put into the executable, it was a problem for me on devkitDS.
It's maybe different on devkitPSP...

Re: Maratis on PSP?

I had a look at the NDS stuff, and it appears to be because devkitARM loads the entire program into memory, the 4MB limitation being the RAM size of the DS. The PSP-1000 has 32MB whereas every version after that has 64MB. Even if devkitPSP does the same thing and loads the whole program into memory, it's got a bit more wiggle room.

I guess having the NPK separately might be easiest, I'll have to see where it would expect to be loaded from

Re: Maratis on PSP?

ho yes, that was that.
The problem is when the data is inside the program and using ram, you still need to load the game data in the ram.
Lets say your game, when loaded, use 16mb max of loaded data and 32mb of stored data, it will be out of the 32mb PSP-1000.

Re: Maratis on PSP?

For me, I don't think these limitations will be too much of a problem as my demo will only be one room. I should be able to fit it into the memory of even the PSP-1000. For future potential Maratis-PSP-homebrew games, I will make sure that you can load and unload packages from the filesystem properly, and not keep the package open indefinitely (as it currently does).

That also, however, means, supporting multiple packages, so games can be built into smaller chunks. Whereas the package manager technically will support multiple packages without any problem, the Maratis folder structure doesn't lend itself easily to it. At least for publishing. Rather than packaging the whole project data, as is currently done, having the following structure might help:

project
|---frontend
|   |---meshs
|   |---maps
|   |---sounds
|   `---level
|---game
|   |---meshs
|   |---maps
|   |---scripts
|   |---shaders
|   `---level
|---level1
|   |---meshs
|   |---maps
|   |---scripts
|   |---shaders
|   `---level
`---level2
    |---meshs
    |---maps
    |---scripts
    |---shaders
    `---level

Although, I think that might cause more problems...

Re: Maratis on PSP?

(I should write it in the package topic) when a package is opened it takes ram ?

Re: Maratis on PSP?

package discussion continued here

Re: Maratis on PSP?

For the size of the psp ram, it also depend of the demo you want to do, if it's small it's ok, but it is good to anticipate the limitation if it's possible (it can be blocked by DevKitPro anyway).

Re: Maratis on PSP?

I think, what I would like to do is have the ability to load a package from within the executable. It would make a cleaner demo for me, and I'm pretty sure that I can fit within the 64MB limit. I don't own a PSP-1000 and I'm sure if I were to send the demo to Sony, they can find something that would run it tongue But I will also add support for loading packages from the filesystem, which will allow larger homebrew games to be made. For it to work efficiently, I think it will need to be able to split the packages up as, regardless of RAM usage, having a giant package being searched by a ~7 year old device seems like something that we might want to avoid.

Re: Maratis on PSP?

we should do some speed testing, I'm not so worried, in one studio we made a game for DS that was reading all the data from a zip (uncompressed) using zlib, it was working very good and NDS is reaaaly slow. I think it's what npk does too. Maybe the encryption can make it slower ?

Re: Maratis on PSP?

To be fair, I have little experience with this, I just assumed that searching through a large package would have significant overhead. But you're right, I think it calls for some testing. Have you thought of adding profiling code to Maratis?