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!

Printing to the Screen Using a PRX ?

This is a discussion on Printing to the Screen Using a PRX ? within the PSP Development Forum forums, part of the PSP Development, Hacks, and Homebrew category; I've got the following code for a PRX, just as a test really, but anyway, here it is, i'm new ...

Reply
 
LinkBack Thread Tools
Old 11-01-2006, 11:55 AM   #1
MiG
 
MiG's Avatar
 
Join Date: Jun 2006
Location: UK
Posts: 499
Trader Feedback: 0
Default Printing to the Screen Using a PRX ?

I've got the following code for a PRX, just as a test really, but anyway, here it is, i'm new to creating PRX's so i'm wondering if the techniques are any diff.

O yea, why doesnt it do my desired result ?

Code:
/*
 * PSP Software Development Kit - http://www.pspdev.org
 * -----------------------------------------------------------------------
 * Licensed under the BSD license, see LICENSE in PSPSDK root for details.
 *
 * main.c - Basic PRX template
 *
 * Copyright (c) 2005 Marcus R. Brown <mrbrown@ocgnet.org>
 * Copyright (c) 2005 James Forshaw <tyranid@gmail.com>
 * Copyright (c) 2005 John Kelley <ps2dev@kelley.ca>
 *
 * $Id: main.c 1888 2006-05-01 08:47:04Z tyranid $
 * $HeadURL$
 */
#include <pspkernel.h>
#include <pspdebug.h>
#include <pspdisplay.h>
#include <stdio.h>
#include <psppower.h> 
#include <pspctrl.h>

#define printf  pspDebugScreenPrintf


PSP_MODULE_INFO("oc_mod", 0, 1, 1);
PSP_MAIN_THREAD_ATTR(THREAD_ATTR_USER | THREAD_ATTR_VFPU);

int main(int argc, char *argv[]){
	SceCtrlData pad;
	while(1) {
         sceCtrlReadBufferPositive(&pad, 1);

		 if (pad.Buttons & PSP_CTRL_LEFT) {
	
			 scePowerSetClockFrequency(222, 222, 166);
			 printf("CPU Set at 222mhz");
	
		 } else if(pad.Buttons & PSP_CTRL_RIGHT) {

			 scePowerSetClockFrequency(333, 333, 166);
			  printf("CPU Set at 333mhz");
		 }
	}

	return 0;

}
MiG is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-01-2006, 12:23 PM   #2


Developer
 
Join Date: Sep 2005
Posts: 480
Trader Feedback: 0
Default

Quote:
Originally Posted by MiG
I've got the following code for a PRX, just as a test really, but anyway, here it is, i'm new to creating PRX's so i'm wondering if the techniques are any diff.

O yea, why doesnt it do my desired result ?

Code:
/*
 * PSP Software Development Kit - http://www.pspdev.org
 * -----------------------------------------------------------------------
 * Licensed under the BSD license, see LICENSE in PSPSDK root for details.
 *
 * main.c - Basic PRX template
 *
 * Copyright (c) 2005 Marcus R. Brown <mrbrown@ocgnet.org>
 * Copyright (c) 2005 James Forshaw <tyranid@gmail.com>
 * Copyright (c) 2005 John Kelley <ps2dev@kelley.ca>
 *
 * $Id: main.c 1888 2006-05-01 08:47:04Z tyranid $
 * $HeadURL$
 */
#include <pspkernel.h>
#include <pspdebug.h>
#include <pspdisplay.h>
#include <stdio.h>
#include <psppower.h> 
#include <pspctrl.h>

#define printf  pspDebugScreenPrintf


PSP_MODULE_INFO("oc_mod", 0, 1, 1);
PSP_MAIN_THREAD_ATTR(THREAD_ATTR_USER | THREAD_ATTR_VFPU);

int main(int argc, char *argv[]){
	SceCtrlData pad;
	while(1) {
         sceCtrlReadBufferPositive(&pad, 1);

		 if (pad.Buttons & PSP_CTRL_LEFT) {
	
			 scePowerSetClockFrequency(222, 222, 166);
			 printf("CPU Set at 222mhz");
	
		 } else if(pad.Buttons & PSP_CTRL_RIGHT) {

			 scePowerSetClockFrequency(333, 333, 166);
			  printf("CPU Set at 333mhz");
		 }
	}

	return 0;

}
debug printf isn't available in the psp kernel.
follow devhook guidelines for makefile
weltall is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-01-2006, 12:48 PM   #3
 
Coldbird's Avatar
 
Join Date: Jan 2006
Location: Pawnzor!
Posts: 1,490
Trader Feedback: 0
Default

Theres no Pre-Worked Out Way of printing to the Screen... I did many Trial and Error Attempts on doing a proper Text-Blitting (Output) to Screen...

The Way it works without relying on the DebugScreen Stuff is calling to the VRAM Framebuffer and directly write Color Values in the currently used BPP Rate to the Screen...

I enhanced the Code Booster used for his VSH Extender a bit myself using Information I gathered over Time...

You can find a extensive and proper working Blit-Library of mine inside the Musou-Cheating Device R5 Sources you can find on my Devspace http://coldbird.lan.st

This should help you out...
__________________
[B]PS2*NFO Hatelist[/B]
[SIZE=1]Peaple who hate PS2*NFO:
[COLOR="Orange"][I]Coldbird[/I][/COLOR], [COLOR="Green"]Macca[/COLOR], [COLOR="Blue"][I]Mathieulh[/I][/COLOR], [COLOR="Burgundy"][I]Dark_Alex[/I][/COLOR], [COLOR="Red"][I]harleyg[/I][/COLOR], [COLOR="Yellow"]wakAwooki[/COLOR], [COLOR="Purple"]mr_dank[/COLOR], [COLOR="Grey"]dedb33t[/COLOR], [COLOR="Orange"]Moose_Island[/COLOR], [COLOR="Green"]myschoo[/COLOR], [COLOR="Blue"][I]jas0nuk[/I][/COLOR], [COLOR="Burgundy"]pyro_person6493[/COLOR], [COLOR="Red"]Train[/COLOR], [COLOR="Yellow"]MaSt3r_ShAk3[/COLOR], [COLOR="Purple"]duh[/COLOR], [COLOR="Grey"]jacksmyhro[/COLOR], [COLOR="Orange"]Axionkt[/COLOR], [COLOR="Green"]Swasagon[/COLOR], [COLOR="Blue"]poohter[/COLOR], [COLOR="Burgundy"]duncans_pumpkin[/COLOR], [COLOR="Red"]xsorifc28[/COLOR], [COLOR="Yellow"]vb_master[/COLOR], [COLOR="Purple"][I]spectroplasm[/I][/COLOR], [COLOR="Grey"]frylock[/COLOR], [COLOR="Orange"]UChessmaster[/COLOR], [COLOR="Green"]AndyMosh[/COLOR], [COLOR="Blue"]Looroll91[/COLOR], [COLOR="Burgundy"]kompas[/COLOR], [COLOR="Red"]Pspbricker[/COLOR], [COLOR="Yellow"]Hag2bard[/COLOR], [COLOR="Purple"]PSP Pro_1[/COLOR], [COLOR="Grey"]vicecity31[/COLOR], [COLOR="Orange"]ab88[/COLOR], [COLOR="Green"]ipodlinux[/COLOR], [COLOR="Blue"]afiser[/COLOR], [COLOR="Burgundy"]PsPumPkin[/COLOR][/SIZE]
[CENTER][IMG]http://amasora.com/pass/image_7_Coldbird.png[/IMG][/CENTER]
Coldbird is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-01-2006, 01:01 PM   #4
MiG
 
MiG's Avatar
 
Join Date: Jun 2006
Location: UK
Posts: 499
Trader Feedback: 0
Default

Quote:
Originally Posted by Coldbird
Theres no Pre-Worked Out Way of printing to the Screen... I did many Trial and Error Attempts on doing a proper Text-Blitting (Output) to Screen...

The Way it works without relying on the DebugScreen Stuff is calling to the VRAM Framebuffer and directly write Color Values in the currently used BPP Rate to the Screen...

I enhanced the Code Booster used for his VSH Extender a bit myself using Information I gathered over Time...

You can find a extensive and proper working Blit-Library of mine inside the Musou-Cheating Device R5 Sources you can find on my Devspace http://coldbird.lan.st

This should help you out...
thanks all, i thought it wouldnt have been as simple as that.. lol.

quick edit - i cant find the "Mosou-Cheating Device" you reffered to in your post. *scratches head*
MiG is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-01-2006, 01:47 PM   #5
 
Coldbird's Avatar
 
Join Date: Jan 2006
Location: Pawnzor!
Posts: 1,490
Trader Feedback: 0
Default

coldbird.lan.st

Subsection Cheating Devices / Shin Sangokumusou 2nd Evolution / Musou[J]R5.rar

That was it I think... haha
__________________
[B]PS2*NFO Hatelist[/B]
[SIZE=1]Peaple who hate PS2*NFO:
[COLOR="Orange"][I]Coldbird[/I][/COLOR], [COLOR="Green"]Macca[/COLOR], [COLOR="Blue"][I]Mathieulh[/I][/COLOR], [COLOR="Burgundy"][I]Dark_Alex[/I][/COLOR], [COLOR="Red"][I]harleyg[/I][/COLOR], [COLOR="Yellow"]wakAwooki[/COLOR], [COLOR="Purple"]mr_dank[/COLOR], [COLOR="Grey"]dedb33t[/COLOR], [COLOR="Orange"]Moose_Island[/COLOR], [COLOR="Green"]myschoo[/COLOR], [COLOR="Blue"][I]jas0nuk[/I][/COLOR], [COLOR="Burgundy"]pyro_person6493[/COLOR], [COLOR="Red"]Train[/COLOR], [COLOR="Yellow"]MaSt3r_ShAk3[/COLOR], [COLOR="Purple"]duh[/COLOR], [COLOR="Grey"]jacksmyhro[/COLOR], [COLOR="Orange"]Axionkt[/COLOR], [COLOR="Green"]Swasagon[/COLOR], [COLOR="Blue"]poohter[/COLOR], [COLOR="Burgundy"]duncans_pumpkin[/COLOR], [COLOR="Red"]xsorifc28[/COLOR], [COLOR="Yellow"]vb_master[/COLOR], [COLOR="Purple"][I]spectroplasm[/I][/COLOR], [COLOR="Grey"]frylock[/COLOR], [COLOR="Orange"]UChessmaster[/COLOR], [COLOR="Green"]AndyMosh[/COLOR], [COLOR="Blue"]Looroll91[/COLOR], [COLOR="Burgundy"]kompas[/COLOR], [COLOR="Red"]Pspbricker[/COLOR], [COLOR="Yellow"]Hag2bard[/COLOR], [COLOR="Purple"]PSP Pro_1[/COLOR], [COLOR="Grey"]vicecity31[/COLOR], [COLOR="Orange"]ab88[/COLOR], [COLOR="Green"]ipodlinux[/COLOR], [COLOR="Blue"]afiser[/COLOR], [COLOR="Burgundy"]PsPumPkin[/COLOR][/SIZE]
[CENTER][IMG]http://amasora.com/pass/image_7_Coldbird.png[/IMG][/CENTER]
Coldbird is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-01-2006, 02:09 PM   #6
MiG
 
MiG's Avatar
 
Join Date: Jun 2006
Location: UK
Posts: 499
Trader Feedback: 0
Default

Quote:
Originally Posted by Coldbird
coldbird.lan.st

Subsection Cheating Devices / Shin Sangokumusou 2nd Evolution / Musou[J]R5.rar

That was it I think... haha
So it is :P anyways, i found what i needed in the Devhook SDK, but when i try and listen for keypresses Games dont respond to key presses and all..

for instance, the keys are unresponsive and the in game camera is allover the place
MiG is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-01-2006, 02:29 PM   #7


Developer
 
Join Date: Sep 2005
Posts: 480
Trader Feedback: 0
Default

you must use peek else you will remove the controller data
weltall is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-01-2006, 03:20 PM   #8
 
Coldbird's Avatar
 
Join Date: Jan 2006
Location: Pawnzor!
Posts: 1,490
Trader Feedback: 0
Default

yup... keep peekbuffer positive...

I still suggest you take a close look at my Musou Device... It should have everything ready for use - even stuff the DHSDK cant offer you...

Like Multi-BPP Blitting and of course Resetting of Screen (that one thought aint too exclusive - as its easy to code...)
__________________
[B]PS2*NFO Hatelist[/B]
[SIZE=1]Peaple who hate PS2*NFO:
[COLOR="Orange"][I]Coldbird[/I][/COLOR], [COLOR="Green"]Macca[/COLOR], [COLOR="Blue"][I]Mathieulh[/I][/COLOR], [COLOR="Burgundy"][I]Dark_Alex[/I][/COLOR], [COLOR="Red"][I]harleyg[/I][/COLOR], [COLOR="Yellow"]wakAwooki[/COLOR], [COLOR="Purple"]mr_dank[/COLOR], [COLOR="Grey"]dedb33t[/COLOR], [COLOR="Orange"]Moose_Island[/COLOR], [COLOR="Green"]myschoo[/COLOR], [COLOR="Blue"][I]jas0nuk[/I][/COLOR], [COLOR="Burgundy"]pyro_person6493[/COLOR], [COLOR="Red"]Train[/COLOR], [COLOR="Yellow"]MaSt3r_ShAk3[/COLOR], [COLOR="Purple"]duh[/COLOR], [COLOR="Grey"]jacksmyhro[/COLOR], [COLOR="Orange"]Axionkt[/COLOR], [COLOR="Green"]Swasagon[/COLOR], [COLOR="Blue"]poohter[/COLOR], [COLOR="Burgundy"]duncans_pumpkin[/COLOR], [COLOR="Red"]xsorifc28[/COLOR], [COLOR="Yellow"]vb_master[/COLOR], [COLOR="Purple"][I]spectroplasm[/I][/COLOR], [COLOR="Grey"]frylock[/COLOR], [COLOR="Orange"]UChessmaster[/COLOR], [COLOR="Green"]AndyMosh[/COLOR], [COLOR="Blue"]Looroll91[/COLOR], [COLOR="Burgundy"]kompas[/COLOR], [COLOR="Red"]Pspbricker[/COLOR], [COLOR="Yellow"]Hag2bard[/COLOR], [COLOR="Purple"]PSP Pro_1[/COLOR], [COLOR="Grey"]vicecity31[/COLOR], [COLOR="Orange"]ab88[/COLOR], [COLOR="Green"]ipodlinux[/COLOR], [COLOR="Blue"]afiser[/COLOR], [COLOR="Burgundy"]PsPumPkin[/COLOR][/SIZE]
[CENTER][IMG]http://amasora.com/pass/image_7_Coldbird.png[/IMG][/CENTER]
Coldbird is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Tags
printing , prx , screen

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 03:03 PM.



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