QJ.NET | Videos | Forums | iPhone | MMORPG | Nintendo DS | Wii | PlayStation 3 | PSP | Xbox 360 | PC | Downloads | Contact Us
Forums | Gaming News | Videos | Downloads | Today's Posts | Mark Forums Read | Chat | FAQ | Members List | Contact

QJ.net Game Discussion - PSP, Xbox, Wii, PS3, PSP Homebrew, and PSP Guides

Go Back   QJ.net Game Discussion - PSP, Xbox, Wii, PS3, PSP Homebrew, and PSP Guides > Developers Corner > PSP Development, Hacks, and Homebrew > PSP Development Forum
The above video goes away if you are a member and logged in, so log in now!

OSLIB - Exception - Syscall - FW 4.xx. Any working Samples?

This is a discussion on OSLIB - Exception - Syscall - FW 4.xx. Any working Samples? within the PSP Development Forum forums, part of the PSP Development, Hacks, and Homebrew category; I have made a hard decision to move to Oslib but NOT A SINGLE sample works. Any one got a ...

Reply
 
LinkBack Thread Tools
Old 08-17-2008, 05:34 AM   #1

QJ Gamer Gold
 
Mr305's Avatar
 
Join Date: Nov 2006
Posts: 1,522
Trader Feedback: 0
Red face OSLIB - Exception - Syscall - FW 4.xx. Any working Samples?

I have made a hard decision to move to Oslib but NOT A SINGLE sample works.

Any one got a simplistic working source that simply blits and image?


I'm using MinPSPW with OSlib devpack.
Mr305 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Best prices available for:
Price Range:
$13.00 - $25.00
at 10 Stores

Price Range:
$17.00 - $48.00
at 10 Stores

Old 08-17-2008, 07:02 AM   #2
 
MiKeY188's Avatar
 
Join Date: Apr 2008
Location: Ireland
Posts: 979
Trader Feedback: 0
Default

I have the same problem, It compiles fine sometimes. But it never displays once i click on it.
MiKeY188 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-17-2008, 08:08 AM   #3
QJ Gamer Green
 
brethren's Avatar
 
Join Date: Apr 2007
Posts: 464
Trader Feedback: 0
Default

must be your setup...i've just compiled revision 2418 pspdev, installed oslib headers and libs and compiled the SimpleSample that comes with oslib210, it runs fine on my slim using 401m33-2
brethren is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-17-2008, 08:30 AM   #4

Developer
 
xart's Avatar
 
Join Date: Dec 2005
Posts: 1,873
Trader Feedback: 0
Default

here is the sample I have that compiles ok for 4.01 CFW

makefile
Code:
TARGET = eboot
OBJS = main.o 	

INCDIR = sdk/include
CFLAGS = -O2 -G0 -Wall 
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)

LIBDIR = sdk/lib
LDFLAGS =
LIBS = -losl -lmikmod -lpng -lz -lpspsdk -lpspctrl -lpspumd -lpsprtc -lpsppower -lpspgu -lpspaudiolib -lpspaudio -lm

PSP_FW_VERSION = 400
BUILD_PRX = 1

EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = Simple OldSchool Library Sample
PSP_EBOOT_ICON = ICON0.png

PSPSDK=$(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build.mak
main.c
Code:
#include <oslib/oslib.h>


PSP_MODULE_INFO("OSLib Sample", 0x200, 1, 0);
PSP_MAIN_THREAD_ATTR(THREAD_ATTR_USER | THREAD_ATTR_VFPU);

PSP_HEAP_SIZE_MAX();


int main(int argc, char* argv[])
{
	OSL_IMAGE *imgCharacter;
	OSL_SOUND *sndBgm;

	//Initialization
	oslInit(0);							//The lib
	oslInitGfx(OSL_PF_8888, 1);			//Gfx
	oslInitAudio();						//Sound

	//Show the OSLib logo
	oslShowSplashScreen(1);

	//Quit directly if a file could not be found
	oslSetQuitOnLoadFailure(1);

	//Set bright pink as transparent for PNG files
	oslSetTransparentColor(RGB(255, 0, 255));
	{
		//Image is swizzled for more speed (you should always swizzle your images, except if you are planning to modify them).
		imgCharacter = oslLoadImageFilePNG("res/image.png", OSL_IN_RAM | OSL_SWIZZLED, OSL_PF_5551);
	}
	oslDisableTransparentColor();

	//Load a MOD file
	sndBgm = oslLoadSoundFileMOD("res/music.s3m", OSL_FMT_NONE);

	//Loop the music
	oslSetSoundLoop(sndBgm, 1);
	oslPlaySound(sndBgm, 0);

	//Set the rotation center to the center of the image
	oslSetImageRotCenter(imgCharacter);

	//Center the image on the screen
	imgCharacter->x = OSL_SCREEN_WIDTH / 2;
	imgCharacter->y = OSL_SCREEN_HEIGHT / 2;
	
	//Triple size
	imgCharacter->stretchX = imgCharacter->sizeX * 3;
	imgCharacter->stretchY = imgCharacter->sizeY * 3;

	//Crop the border (tricky hack to avoid weird borders when an image is zoomed and bilinear is turned on)
	oslCorrectImageHalfBorder(imgCharacter);

	while (!osl_quit)
	{
		//osl_skip indicates that frameskipping should be applied. Don't render anything when osl_skip is true!
		if (!osl_skip)		{
			oslStartDrawing();

			//The gradient blue background
			oslDrawGradientRect(0, 0, 480, 272, RGB(0, 0, 128), RGB(0, 0, 128), RGB(0, 255, 255), RGB(0, 255, 255));

			//Enable bilinear filtering for the image
			oslSetBilinearFilter(1);

			//Draw the image
			oslDrawImage(imgCharacter);

			//Disable it then
			oslSetBilinearFilter(0);

			//Draw some text
			oslSetTextColor(RGB(255, 255, 255));
			oslSetBkColor(RGBA(0, 0, 0, 128));
			oslDrawString(0, 8, "Press triangle to quit");

			oslSysBenchmarkDisplay();
			oslEndDrawing();
		}

		oslReadKeys();

		imgCharacter->angle++;

		//Quit if triangle is pressed
		if (osl_pad.pressed.triangle)
			break;

		oslEndFrame();
		oslSyncFrame();
	}

	oslEndGfx();
	oslQuit();
	return 0;
}
__________________
www.xart.co.uk

coreXlib, old school library.

ColorSync Display Profiles for MacBook (LG LCD) & New MacBook (AUO LCD)
Profile for LG LP133WX1
Profile for AUO B133EW01
xart is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-17-2008, 08:39 AM   #5

QJ Gamer Gold
 
Mr305's Avatar
 
Join Date: Nov 2006
Posts: 1,522
Trader Feedback: 0
Default

Quote:
Originally Posted by xart View Post
here is the sample I have that compiles ok for 4.01 CFW

makefile
Code:
TARGET = eboot
OBJS = main.o     

INCDIR = sdk/include
CFLAGS = -O2 -G0 -Wall 
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)

LIBDIR = sdk/lib
LDFLAGS =
LIBS = -losl -lmikmod -lpng -lz -lpspsdk -lpspctrl -lpspumd -lpsprtc -lpsppower -lpspgu -lpspaudiolib -lpspaudio -lm

PSP_FW_VERSION = 400
BUILD_PRX = 1

EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = Simple OldSchool Library Sample
PSP_EBOOT_ICON = ICON0.png

PSPSDK=$(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build.mak
main.c
Code:
#include <oslib/oslib.h>


PSP_MODULE_INFO("OSLib Sample", 0x200, 1, 0);
PSP_MAIN_THREAD_ATTR(THREAD_ATTR_USER | THREAD_ATTR_VFPU);

PSP_HEAP_SIZE_MAX();


int main(int argc, char* argv[])
{
    OSL_IMAGE *imgCharacter;
    OSL_SOUND *sndBgm;

    //Initialization
    oslInit(0);                            //The lib
    oslInitGfx(OSL_PF_8888, 1);            //Gfx
    oslInitAudio();                        //Sound

    //Show the OSLib logo
    oslShowSplashScreen(1);

    //Quit directly if a file could not be found
    oslSetQuitOnLoadFailure(1);

    //Set bright pink as transparent for PNG files
    oslSetTransparentColor(RGB(255, 0, 255));
    {
        //Image is swizzled for more speed (you should always swizzle your images, except if you are planning to modify them).
        imgCharacter = oslLoadImageFilePNG("res/image.png", OSL_IN_RAM | OSL_SWIZZLED, OSL_PF_5551);
    }
    oslDisableTransparentColor();

    //Load a MOD file
    sndBgm = oslLoadSoundFileMOD("res/music.s3m", OSL_FMT_NONE);

    //Loop the music
    oslSetSoundLoop(sndBgm, 1);
    oslPlaySound(sndBgm, 0);

    //Set the rotation center to the center of the image
    oslSetImageRotCenter(imgCharacter);

    //Center the image on the screen
    imgCharacter->x = OSL_SCREEN_WIDTH / 2;
    imgCharacter->y = OSL_SCREEN_HEIGHT / 2;
    
    //Triple size
    imgCharacter->stretchX = imgCharacter->sizeX * 3;
    imgCharacter->stretchY = imgCharacter->sizeY * 3;

    //Crop the border (tricky hack to avoid weird borders when an image is zoomed and bilinear is turned on)
    oslCorrectImageHalfBorder(imgCharacter);

    while (!osl_quit)
    {
        //osl_skip indicates that frameskipping should be applied. Don't render anything when osl_skip is true!
        if (!osl_skip)        {
            oslStartDrawing();

            //The gradient blue background
            oslDrawGradientRect(0, 0, 480, 272, RGB(0, 0, 128), RGB(0, 0, 128), RGB(0, 255, 255), RGB(0, 255, 255));

            //Enable bilinear filtering for the image
            oslSetBilinearFilter(1);

            //Draw the image
            oslDrawImage(imgCharacter);

            //Disable it then
            oslSetBilinearFilter(0);

            //Draw some text
            oslSetTextColor(RGB(255, 255, 255));
            oslSetBkColor(RGBA(0, 0, 0, 128));
            oslDrawString(0, 8, "Press triangle to quit");

            oslSysBenchmarkDisplay();
            oslEndDrawing();
        }

        oslReadKeys();

        imgCharacter->angle++;

        //Quit if triangle is pressed
        if (osl_pad.pressed.triangle)
            break;

        oslEndFrame();
        oslSyncFrame();
    }

    oslEndGfx();
    oslQuit();
    return 0;
}
Can you attach your binaries too? (the compiled eboot)

---

I am getting linking errors;

Code:
psp-gcc -Isdk/include -I. -IC:/PSPSDK/psp/sdk/include -O2 -G0 -Wall  -D_PSP_FW_V
ERSION=400   -c -o main.o main.c
psp-gcc -Isdk/include -I. -IC:/PSPSDK/psp/sdk/include -O2 -G0 -Wall  -D_PSP_FW_V
ERSION=400  -L. -LC:/PSPSDK/psp/sdk/lib -specs=C:/PSPSDK/psp/sdk/lib/prxspecs -W
l,-q,-TC:/PSPSDK/psp/sdk/lib/linkfile.prx   main.o C:/PSPSDK/psp/sdk/lib/prxexpo
rts.o -losl -lmikmod -lpng -lz -lpspsdk -lpspctrl -lpspumd -lpsprtc -lpsppower -
lpspgu -lpspaudiolib -lpspaudio -lm -lpspdebug -lpspdisplay -lpspge -lpspctrl -l
pspsdk -lc -lpspnet -lpspnet_inet -lpspnet_apctl -lpspnet_resolver -lpsputility
-lpspuser -lpspkernel -o eboot.elf
C:/PSPSDK/psp/sdk/lib\libosl.a(mod.o): In function `oslLoadSoundFileMOD':
audio/mod.c:232: undefined reference to `MikMod_LoadSong'
audio/mod.c:220: undefined reference to `MD_RegisterDriver'
C:/PSPSDK/psp/sdk/lib\libosl.a(mod.o): In function `my_error_handler':
audio/mod.c:195: undefined reference to `_mm_errno'
audio/mod.c:195: undefined reference to `_mm_errno'
audio/mod.c:195: undefined reference to `_mm_critical'
audio/mod.c:195: undefined reference to `_mm_critical'
C:/PSPSDK/psp/sdk/lib\libosl.a(mod.o): In function `oslAudioCallback_DeleteSound
_MOD':
audio/mod.c:190: undefined reference to `MikMod_FreeSong'
C:/PSPSDK/psp/sdk/lib\libosl.a(mod.o): In function `oslAudioCallback_AudioCallba
ck_MOD':
audio/mod.c:167: undefined reference to `md_mixshift'
audio/mod.c:167: undefined reference to `md_mixshift'
C:/PSPSDK/psp/sdk/lib\libosl.a(mod.o):(.data+0x58): undefined reference to `VC_V
oiceReleaseSustain'
collect2: ld returned 1 exit status
make: *** [eboot.elf] Error 1
And what's the 0x200 Module attribute? Never seen it before

Last edited by Mr305; 08-17-2008 at 08:52 AM..
Mr305 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-17-2008, 08:55 AM   #6
QJ Gamer Green
 
brethren's Avatar
 
Join Date: Apr 2007
Posts: 464
Trader Feedback: 0
Default

that example that xart posted comes with oslib210, its called SimpleSample. Your gonna need to download it yourself for the resources

edit you need to replace your libmikmod with the one that comes with the oslib archive
brethren is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-17-2008, 09:05 AM   #7

QJ Gamer Gold
 
Mr305's Avatar
 
Join Date: Nov 2006
Posts: 1,522
Trader Feedback: 0
Default

Quote:
Originally Posted by brethren View Post
that example that xart posted comes with oslib210, its called SimpleSample. Your gonna need to download it yourself for the resources

edit you need to replace your libmikmod with the one that comes with the oslib archive
Got it.

I was using the old sample one that comes with oslib 1.0.0.


THank you all!


---

What's 0x200; It's not user mode and still it works in 3.xx kernel
Mr305 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-18-2008, 06:26 AM   #8
 
roe-ur-boat's Avatar
 
Join Date: May 2007
Location: Ireland
Posts: 56
Trader Feedback: 0
Default

0x200 is the flag needed to use psp-packer. I don't know what mode it is though, it was asked on lan.st but I don't remember it getting answered.
roe-ur-boat is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Tags
4xx , exception , oslib , samples , syscall , working

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT -8. The time now is 07:32 PM.



Use of this Web site constitutes acceptance of the TERMS & CONDITIONS and PRIVACY POLICY
Copyright © 2010, QJ.NET. All Rights Reserved.
Contact Us | Free Flash Games