Skip to: Site menu | Main content


Welcome to PSP-Programming.com, a place for developers to get together.

Welcome to the forums. Here you can find other user tutorials as well as homebrew releases and the source code repository. You can also ask for help with your code here and post your own homebrew!

PSP-Programming.com Forums
February 11, 2012, 01:08:27 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

News: Welcome to PSP-Programming.com
Home Help Search Shop Login Register
Digg This!
Pages: 1 [2]
Print
Author Topic: Undo pspDebugScreenInit(); ??  (Read 4032 times)
Raphael
Global Moderator
Hero Member
*

Karma: +230/-10
Offline Offline

Posts: 1431
193700.11 points

View Inventory
Send Money to Raphael


View Profile WWW
« Reply #15 on: December 21, 2007, 08:47:39 AM »

Not sure because it should work like that. Some other things I noticed on your code though:
Quote
#define PIXEL_SIZE (1) /* change this if you change to another screenmode */
You are using 16bit mode, so that should be 2.

Quote
u16 *address=VRAM+((((512)*PIXEL_SIZE)*y)+x); // Caculates address of pixel.
The formula is wrong plus you're doing pointer arithmetic on 16bit pointers here. (effectively the errors sum up to 0 in your special case)

Quote
sceDisplaySetMode(mode,SCR_WIDTH,SCR_HEIGHT);
Does not do what you think it does. In fact you don't ever need to call this function and if you do, the first parameter needs to be 0.

Quote
sceDisplaySetFrameBuf(VRAM,BUF_WIDTH,1,1);
This functions third parameter should be your mode variable.

Also, you can replace the pspDebugScreenInit function with the following two functions, giving you control over where the display buffer is supposed to be and what pixelformat to use:
Code:
pspDebugScreenSetXY(0,0);
pspDebugScreenInitEx( VRAM, mode, 1 );

Anyway, is there a good reason why you want to use 16bit mode for a pixel fixer application? And why do you change brightness in three stages?

Other than that, I really see no reason why your program should still print wrongly. Could you paste your current main.c code again if it doesn't change?
Logged

Don't push the river, it flows.
http://wordpress.fx-world.org - my devblog
http://wiki.fx-world.org - VFPU documentation wiki
http://www.homebrew-illuminati.co.uk - serious homebrew development for all platforms
Alexander Berl
"A good mod is a combination playground monitor, priest, big brother/sister, psychiatrist, professor and more."


crait
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 26
1219.01 points

View Inventory
Send Money to crait


View Profile WWW
« Reply #16 on: December 21, 2007, 10:08:09 PM »

This should help me out a lot. I actually think that the #define PIXEL_SIZE (1) thing should fix it all up. The text is uber big and it seems like it's 16 bit. It seems to be the problem. I'm leaving out of town tommorrow morning. I'll tell you if this works or not.
I'll also go through and fix a lot of these problems up.
And the reason I use the brightness changing command is because whenever a pixel is stuck, it isn't polarized corectly. And scrolling through the brightness, my theory is, will help unstick it.
It seems to work. And it looks cool.
Logged



Pages: 1 [2]
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 0.132 seconds with 26 queries.
Sister Sites: Guitar Hero 4   BrokeniTouch.com