Bennugd - Playstation 2 Port

Started by l1nk3rn3l, March 28, 2012, 09:56:06 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

l1nk3rn3l

nuestro grupo esta estudiando una solucion para armarlo estilo installer


we are creating a installer to more easy use the sdk...

masteries

#16
Quote from: l1nk3rn3l on December 04, 2012, 10:54:15 PM
nuestro grupo esta estudiando una solucion para armarlo estilo installer


we are creating a installer to more easy use the sdk...

Thanks for all!  I am sure that an installer makes things easier instead of actual set-up that is pretty messy.

Here (https://sites.google.com/site/vigasocosdl/fuentes)  there is an implementation (abadia 0.071.src and abadia 0.071DC.src) of a game for PS2 that uses a slightly modified version of SDL that shows correct colors, like the showed image; long time ago I tested the binaries for PS2 and it worked ok.


Also the SDLvideo plugin and SDLaudio plugin source code for PS2 is included.









MisterN

werg

l1nk3rn3l

Quote from: DoctorN on December 06, 2012, 12:44:59 AM
whats the ram limit?

hmm in ps2 .. i believe that is 30mb


PS2 PORT  using this SDL version are be great!!!!   
masteries in this moment
we are busy  with NATIVE CLIENT port ..   in this days, our share PS2 SDK(GCC) ready to use.. plase be patient

l1nk3rn3l

#19

NEW INSTALLER  WITH GCC TO PORT EDITING
steps to install
1. install
2. restart
3. execute codeblock
4. open bennugd codeblocks project - in main menu..(Last open)
https://bennugdplay2.googlecode.com/files/installer%20PS2%20SDK%20r1.0%20.rar








BENNUGD USERS BEST DOWNLOAD THIS ONE....
Bennugd Beta release (April 2012)
- currently .. music freeze ps2 and colors not match
https://bennugdplay2.googlecode.com/files/simple%20test%20usb%20ps2.rar

masteries


Thank you very much!

I will try it as soon as possible.

masteries

#21
I found something in the SDL port of PS2,

static int PS2_SetColors(SDL_VideoDevice *device, int firstcolor, int ncolors, SDL_Color *colors)
{
int i;
int rgb;
int offset;
int r, g, b;

for (i=0; i<ncolors; i++)
{
r = colors[i].r;
g = colors[i].g;
b = colors[i].b;

rgb = b << 16 | g << 8 | r << 0;

/* transform into clut's array */
offset = clut_xlut[firstcolor + i];
gsClut[offset] = rgb;
}

return 0;
}


This sentence rgb = b << 16 | g << 8 | r << 0; assumes that the most significant
bits are blue color, next 8 bits are green color and the less significant bits are red.

We can test changig to rgb = r << 16 | g << 8 | b << 0; to set
red color to the most significant bits, and blue to the lesser ones.

I will try this ASAP, but probably it only will work or affect 8 bit color.

l1nk3rn3l

ok excelent news...  we are expecting ..  :P

masteries


I found now some time to work in the BennuGD PS2 port:

I detected some discordances between SDL port for PlayStation 2 and BennuGD port, and the way that BennuGD port
deals with RGB color:

-If we assume that the SDL port for PlayStation 2 is well made, or at least relatively well made based on actual SDL based games like
PS2PANG and La Abadia del Crimen, it can be easily deduced that the BennuGD port needs to be fixed in order to use the same color treatment
of his SDL port:

This piece of code is from BennuGD Play2 port, extracted from libdraw.c:

For a little Endian machine, this piece of code assume that red pixel byte is the most significant one, and
blue pixel byte is the less significant one.

_inline void _HLine32_nostipple( uint32_t * ptr, uint32_t length )
{
    register int n ;

    if ( pixel_alpha == 255 && ( pixel_color32 & 0xff000000 ) == 0xff000000 )
    {
        for ( n = length; n >= 0; n-- ) *ptr++ = pixel_color32 ;
    }
    else
    {
        unsigned int _f = pixel_color32 & 0xff000000, _f2 ;
        unsigned int _c1, _c2, _c3 ;
        unsigned int r, g, b ;

        _f = ( _f >> 24 ) * pixel_alpha / 255 ;
        _f2 = 255 - _f ;

        if ( _f != 0x000000ff )
        {
            _c1 = ( pixel_color32 & 0x00ff0000 ) * _f ;
            _c2 = ( pixel_color32 & 0x0000ff00 ) * _f ;
            _c3 = ( pixel_color32 & 0x000000ff ) * _f ;

            _f <<= 24 ;

            for ( n = length; n >= 0; n-- )
            {
                r = ( _c1 + (( *ptr & 0x00ff0000 ) * _f2 ) ) >> 8 ;
                g = ( _c2 + (( *ptr & 0x0000ff00 ) * _f2 ) ) >> 8 ;
                b = ( _c3 + (( *ptr & 0x000000ff ) * _f2 ) ) >> 8 ;

                if ( r > 0x00ff0000 ) r = 0x00ff0000 ; else r &= 0x00ff0000 ;
                if ( g > 0x0000ff00 ) g = 0x0000ff00 ; else g &= 0x0000ff00 ;
                if ( b > 0x000000ff ) b = 0x000000ff ; else b &= 0x000000ff ;
...



But this code from the SDL port for PlayStation 2 shows that SDL deals the blue byte color like the most significant one
for PlayStation 2, instead the BennuGD port that uses the red byte instead the blue one.


static int PS2_SetColors(SDL_VideoDevice *device, int firstcolor, int ncolors, SDL_Color *colors)
{
int i;
int rgb;
int offset;
int r, g, b;

for (i=0; i<ncolors; i++)
{
r = colors[i].r;
g = colors[i].g;
b = colors[i].b;

rgb = b << 16 | g << 8 | r << 0;

/* transform into clut's array */


I will study how to change this in the actual BennuGD port in the quickest possible way.
I think it is the problem with the colours, after fix this, we need to deal with the sound
that also has some troubles.

masteries

#24
Sorry for the double posting  :-\

Spanish message version:

Saludos compañeros,

Acabo de pulir un poco el port de BennuGD para PlayStation 2


De momento muestra los colores correctamente si se elige
la visualización de color a 32 bits, como muestran la imágenes:






Descarga:

https://www.dropbox.com/s/mbso16kwrs7ysjo/mst_runners_ps2.rar


Asuntos pendientes del port de BennuGD:

-Estudiar porque falla el color de 8 bits.

-El audio funciona mal, y ralentiza el juego.



FreeYourMind

he pillao el usb loader pero los juegos de bennu para ps2 que he visto en el foro (masteries runner, test demo y yeti) no me van, el usb loader dice el tamaño del pendrive pero dice que no encuentra juegos de ps2 instalados.

Como se instalan en el pendrive ? se pueden meter varios ? los he descomprimido en carpetas y tambien he puesto solo un juego en la raiz del usb y no va tampoco.

Gracias

l1nk3rn3l

#26
hay un monton de ejemplos en


https://sourceforge.net/projects/coldev/files/playstation2/

solo se puede de un juego a la vez... en el cd o en la usb...

eso pasa en dreamcast tambien ... falta implementar una funcion estilo...  execute("otronivel.dcb")

1. tener una ps2 con ship para leer copias
2. quemar la siguiente imagen y correrla desde el dvd de la ps2
http://www.mediafire.com/file/6z69tzb2eceh2m5/BOOTULE_JLTaringa.rar

3. copia el juego bennu a la raiz del usb, debe estar formateada en fat32 ,
    el dcb de bennu debe estar en la raiz del usb para correr ok
4. dentro del menu del uLauchELF 4.42a  selecciona el ejecutable de bennu (bennugd.elf) que copiaste a la usb (MASS )

avisa si funciona... hace rato no le echamos mano a ese port..

si te quieres ahorrar los pasos anteriores puedes quemar una iso siguiendo los pasos de los ejemplos(incluyen un leame.txt)
y correr el juego en emulador ps2 ..
cuando ya lo tengas bien listo , lo podes quemar en dvd normal y correrlo en consola real...


aqui una explicacion del programa ulaunchElf
http://javizcape.blogspot.com.co/2016/05/descargar-ulaunchelf-ps2-hackear-ps2-ulaunchelf-v4.42-instalar.html



FreeYourMind

gracias, yo estoy usando el usb loader que funciona en ps2 sin chip, aunque mi ps2 tiene chip, y con usb loader poniendo el juego en la raiz de la usb no me lo pilla, he probao el ejemplo y el masteries runner

l1nk3rn3l

#28
Preguntas:

1.ha veces son los drivers que contiene el programa, con el ulaunch funciona seguro..
Probaste con el ulaunch que te pase ? el ulaunch corre desde el dvd sin instalar nada...
    el ulaunch corre como un juego cualquiera..
http://www.mediafire.com/file/6z69tzb2eceh2m5/BOOTULE_JLTaringa.rar

suponiendo que la unidad mass: es la usb seria por ejemplo, lo que verias :

mass://   main.prg
              imagenes.fpg
              sound.wav
              imagenes2.fpg


2. Si lo anterior no funciona graba la iso de cualquier ejemplo y la corres en emulador
(puedes agregar tu propio juego, modificando la iso con el programa "ultraiso"  adicionando el main.dcb y recursos)
3. si puedes quemar la iso correla en la consola despues del paso 2 funcione... 
4. repite el paso 2 y 3 cuando crees algo nuevo...(si el primer paso no funciona...)

FreeYourMind

probare el ulaunch luego, hace años que no quemo un cd pero el otro tiene que ir tambien  ;D
gracias