forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Using the TV out in homebrew, whatever cable, full screen
Goto page Previous  1, 2, 3  Next
 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Wed Oct 17, 2007 10:41 am    Post subject: Reply with quote

moonlight wrote:
J.F. wrote:
SilverSpring wrote:
0x25F47F96 sceSysconGetVideoCable

int sceSysconGetVideoCable(int *type);

Dont have a slim with me right now so I cant test it.


As I posted a while back, int sceImposeCheckVideoOut(int *val); also returns the cable info. It returns an error if no cable is detected, and 0 if there is. *val contains the cable type when 0 is returned. Impose probably calls the function you give above. :)


that impose function calls the hprm function i use in my prx, and i guess that one use the syscon. I didn't use the impose function, because it returned an error if executed in game config.


I was able to call it by putting it in a kernel mode prx. Called that way, it works fine. What I couldn't fugure out was how to switch to TV out... which you've dealt with.

The prx code for that function is:

Code:
int CheckVideoOut(int *val)
{
   unsigned int k1;
   int err;

   k1 = pspSdkSetK1(0);
   err = sceImposeCheckVideoOut(val);
   pspSdkSetK1(k1);
   return err;
}
Back to top
View user's profile Send private message AIM Address
MysticWhiteDragon



Joined: 16 Feb 2006
Posts: 30

PostPosted: Wed Oct 17, 2007 10:42 am    Post subject: Problem Compiling DVE Sample Reply with quote

I tried to compile the PRX and EBOOT.PBP and I can compile the the PRX no problem, but when I go to compile the EBOOT.PBP it gives me the following error below. The makefile is similar to the Makefile in the example. Any idea why I get this error?

Code:

src/pspDveManager.s: Assembler messages:
src/pspDveManager.s:5: Error: unrecognized opcode `stub_start "pspDveManager",0x40090000,0x00010005'
src/pspDveManager.s:6: Error: unrecognized opcode `stub_func 0x2ACFCB6D,pspDveMgrCheckVideoOut'
src/pspDveManager.s:7: Error: unrecognized opcode `stub_func 0xF9C86C73,pspDveMgrSetVideoOut'
src/pspDveManager.s:8: Error: unrecognized opcode `stub_end'
Back to top
View user's profile Send private message
MysticWhiteDragon



Joined: 16 Feb 2006
Posts: 30

PostPosted: Fri Oct 19, 2007 9:53 am    Post subject: Reply with quote

I found out that for some reason my pspDveManager.s file will not include "pspstub.s" because of the #. If I copy all or pspstub.s to pspDveManager.s it works fine. Does anyone know how to fix this and also is it possible to make all of this code into a single EBOOT rather that an EBOOT and PRX?
Back to top
View user's profile Send private message
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Fri Oct 19, 2007 12:05 pm    Post subject: Reply with quote

MysticWhiteDragon wrote:
I found out that for some reason my pspDveManager.s file will not include "pspstub.s" because of the #. If I copy all or pspstub.s to pspDveManager.s it works fine. Does anyone know how to fix this and also is it possible to make all of this code into a single EBOOT rather that an EBOOT and PRX?


You have to use .S, not .s. Using .S means that gcc processes the file first, so you can include .h files and do things like #define.
Back to top
View user's profile Send private message AIM Address
MysticWhiteDragon



Joined: 16 Feb 2006
Posts: 30

PostPosted: Fri Oct 19, 2007 10:39 pm    Post subject: Reply with quote

for some reason it doesn't matter if it is .s or .S neither work for me. I just get the same message as before. The only option that work for me is to add all the file info from the included stub file into to file that I call the functions from.
Back to top
View user's profile Send private message
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Sat Oct 20, 2007 3:15 am    Post subject: Reply with quote

No, the "pspDveManager.s" needs to be "pspDveManager.S". It's not the pspstub.s file that is the trouble. "pspDveManager.S" is the one doing the #include'ing, so it needs the .S.
Back to top
View user's profile Send private message AIM Address
MysticWhiteDragon



Joined: 16 Feb 2006
Posts: 30

PostPosted: Sat Oct 20, 2007 4:51 am    Post subject: Reply with quote

Sorry, what I meant is if I try .S is still reads the #include as a comment and not an include.
Back to top
View user's profile Send private message
moonlight



Joined: 26 Oct 2005
Posts: 567

PostPosted: Sat Oct 20, 2007 5:44 am    Post subject: Reply with quote

Maybe you have an outdated toolchain.
Back to top
View user's profile Send private message
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Sat Oct 20, 2007 5:48 am    Post subject: Reply with quote

MysticWhiteDragon wrote:
Sorry, what I meant is if I try .S is still reads the #include as a comment and not an include.


Are you trying to run it through psp-as in the makefile? That would make it ignore the .S. You need to run it through psp-gcc and let it pass it off to psp-as. The default build script does this, so you'd have to be doing this yourself in the makefile.
Back to top
View user's profile Send private message AIM Address
MysticWhiteDragon



Joined: 16 Feb 2006
Posts: 30

PostPosted: Sat Oct 20, 2007 6:36 am    Post subject: Reply with quote

Here is the makefile I used. btw, I use Portable Dev-C++ so I can develop programs on any PC with a USB Drive.

Code:

TARGET   = Target
FOLDER   = VideoOut
OBJS     = src/eboot.o src/pspDveManager.o

#BUILD_PRX   = 1
#PRX_EXPORTS = src/exports.exp
PSP_FW_VERSION = 371

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

LIBDIR   = lib
LIBS     = -lpspkubridge -lpsprtc
LDFLAGS  =
#USE_PSPSDK_LIBC = 1
#USE_KERNEL_LIBS = 1

EXTRA_TARGETS    = EBOOT.PBP
PSP_EBOOT_TITLE  = VideoOut Test
#PSP_EBOOT_ICON   = res/ICON0.PNG
#PSP_EBOOT_ICON1  = res/ICON1.PMF
#PSP_EBOOT_PIC1   = res/PIC1.PNG
#PSP_EBOOT_UNKPNG = res/PIC0.PNG
#PSP_EBOOT_SND0   = res/SND0.AT3

PSPSDK=../../Compiler/PSPDev/psp/sdk
include $(PSPSDK)/lib/build.mak
#include $(PSPSDK)/lib/build_prx.mak

#all: $(TARGET).prx
all: EBOOT.PBP
   -rm -f $(TARGET).elf PARAM.SFO
   -rm -f src/*.o
#   -mv -f $(TARGET).prx ../../PSP/GAME/$(FOLDER)/
   -mv -f EBOOT.PBP ../../PSP/GAME/$(FOLDER)/
Back to top
View user's profile Send private message
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Sat Oct 20, 2007 9:03 am    Post subject: Reply with quote

Ah! You've got "#BUILD_PRX = 1" in the makefile. You cannot load kernel modules in 3.xx unless you use "BUILD_PRX = 1" instead.
Back to top
View user's profile Send private message AIM Address
MysticWhiteDragon



Joined: 16 Feb 2006
Posts: 30

PostPosted: Sat Oct 20, 2007 9:35 am    Post subject: Reply with quote

I uncommented that line and still no luck. Same errors as before
Back to top
View user's profile Send private message
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Sat Oct 20, 2007 11:18 am    Post subject: Reply with quote

You should probably post everything. The bits and pieces you've shown so far have had problems, so there's probably problems all over.
Back to top
View user's profile Send private message AIM Address
cooleyes



Joined: 18 May 2006
Posts: 125

PostPosted: Tue Oct 23, 2007 2:04 pm    Post subject: Reply with quote

Code:

  pspDveMgrSetVideoOut(2, 0x1d1, 720, 503, 1, 15, 0);
  pspDveMgrSetVideoOut(0, 0x1d2, 720, 480, 1, 15, 0);
  pspDveMgrSetVideoOut(0, 0x1d1, 720, 503, 1, 15, 0);
 


why use x=1, y=15, z=0?
if I want to turn off the TV out, use which values?

pspDveMgrSetVideoOut(0, 0, 480, 272, 1, 15, 0); ??
Back to top
View user's profile Send private message
hlide



Joined: 10 Sep 2006
Posts: 750

PostPosted: Tue Oct 23, 2007 9:19 pm    Post subject: Reply with quote

MysticWhiteDragon wrote:
Sorry, what I meant is if I try .S is still reads the #include as a comment and not an include.


Maybe your devkit doesn't make a difference between .s and .S by default.
Back to top
View user's profile Send private message
hlide



Joined: 10 Sep 2006
Posts: 750

PostPosted: Tue Oct 23, 2007 9:22 pm    Post subject: Reply with quote

hlide wrote:
MysticWhiteDragon wrote:
Sorry, what I meant is if I try .S is still reads the #include as a comment and not an include.


Maybe your devkit doesn't make a difference between .s and .S by default. I can only suggest you to use Cygwin. most issues are solved with it.
Back to top
View user's profile Send private message
MysticWhiteDragon



Joined: 16 Feb 2006
Posts: 30

PostPosted: Wed Oct 24, 2007 10:33 am    Post subject: Reply with quote

I use cygwin through Dev-C++. Oh well, at least I got it to work copying the pspstubs.s file into the pspDveManager.S file. Anyway, I am trying to compile the TVOut Sample and have no idea on how to include the files that are needed:

Code:

int sceHprm_driver_1528D408();
int sceImposeSetVideoOutMode(int,int,int);
int sceDve_driver_DEB2F80C(int);
int sceDve_driver_93828323(int);
int sceDve_driver_0B85524C(int);
int sceDve_driver_A265B504(int,int,int);


Does anyone have a clue on how to compile the TVOut Sample without a prx file? In case anyone is interested, I planned on making it automatically switch to the TV if a correct cable is attached, otherwise it would just display it on the PSP screen.
Back to top
View user's profile Send private message
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Wed Oct 24, 2007 11:00 am    Post subject: Reply with quote

You really shouldn't make something like that automatic. Just because they have the cable plugged in doesn't mean they want to use the TV, or that the TV is even on. Give the user an option and wait for them to tell you to switch.
Back to top
View user's profile Send private message AIM Address
internal



Joined: 26 Oct 2007
Posts: 3

PostPosted: Fri Oct 26, 2007 9:55 pm    Post subject: Reply with quote

Is it possible to play game or ppa on tv via av cable(3 lines)? It's sooo exciting! Because every tv has this traditional interface.
Back to top
View user's profile Send private message
weltall



Joined: 20 Feb 2004
Posts: 310

PostPosted: Fri Oct 26, 2007 10:25 pm    Post subject: Reply with quote

internal wrote:
Is it possible to play game or ppa on tv via av cable(3 lines)? It's sooo exciting! Because every tv has this traditional interface.

read this thread from the beginning
Back to top
View user's profile Send private message Visit poster's website
cooleyes



Joined: 18 May 2006
Posts: 125

PostPosted: Sat Oct 27, 2007 12:52 am    Post subject: Reply with quote

internal wrote:
Is it possible to play game or ppa on tv via av cable(3 lines)? It's sooo exciting! Because every tv has this traditional interface.


I will release a new version PPA soon, it support TVOut. :P
Back to top
View user's profile Send private message
internal



Joined: 26 Oct 2007
Posts: 3

PostPosted: Sat Oct 27, 2007 3:21 pm    Post subject: Reply with quote

weltall wrote:
internal wrote:
Is it possible to play game or ppa on tv via av cable(3 lines)? It's sooo exciting! Because every tv has this traditional interface.

read this thread from the beginning


I did. I mean we support it in system level. By now if you start a game or ppa via simple av cable, psp'll send you back and say you need a better cable. if we can bypass this check, then every game or homebrew could have tv output without rewrite.

cooleyes wrote:
internal wrote:
Is it possible to play game or ppa on tv via av cable(3 lines)? It's sooo exciting! Because every tv has this traditional interface.


I will release a new version PPA soon, it support TVOut. :P


hope it's as nice as dvd:D
Back to top
View user's profile Send private message
moonlight



Joined: 26 Oct 2005
Posts: 567

PostPosted: Sat Oct 27, 2007 5:05 pm    Post subject: Reply with quote

internal wrote:
weltall wrote:
internal wrote:
Is it possible to play game or ppa on tv via av cable(3 lines)? It's sooo exciting! Because every tv has this traditional interface.

read this thread from the beginning


I did. I mean we support it in system level. By now if you start a game or ppa via simple av cable, psp'll send you back and say you need a better cable. if we can bypass this check, then every game or homebrew could have tv output without rewrite.

cooleyes wrote:
internal wrote:
Is it possible to play game or ppa on tv via av cable(3 lines)? It's sooo exciting! Because every tv has this traditional interface.


I will release a new version PPA soon, it support TVOut. :P


hope it's as nice as dvd:D


And still, read this thread from the beginning ;)
http://forums.ps2dev.org/viewtopic.php?p=59623#59623

I patched that check -> no working still, odd lines, disconnection, etc. I had to patch then impose.prx and display.prx in the reboot to change some parameters. Result -> appart of the problem of the interlace, the games were really SLOW, unplayable.

Sorry, the composite cable will always be slow, nothing can be done about that.
Back to top
View user's profile Send private message
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Sun Oct 28, 2007 4:33 am    Post subject: Reply with quote

moonlight wrote:
internal wrote:

hope it's as nice as dvd:D


And still, read this thread from the beginning ;)
http://forums.ps2dev.org/viewtopic.php?p=59623#59623

I patched that check -> no working still, odd lines, disconnection, etc. I had to patch then impose.prx and display.prx in the reboot to change some parameters. Result -> appart of the problem of the interlace, the games were really SLOW, unplayable.

Sorry, the composite cable will always be slow, nothing can be done about that.


Uh - we're talking VIDEO here, not games. The video out from the PSP is very nice and full speed, as you can see with any UMD video disc. It stands to reason that properly written, PPA TV out should be full speed for video as well.

Also, I think your test for games over TV out was probably flawed somehow - there's already one emulator out using TV out (gpsp - a GBA emu), and no one with composite has complained about speed, just the flicker from interlaced mode.
Back to top
View user's profile Send private message AIM Address
moonlight



Joined: 26 Oct 2005
Posts: 567

PostPosted: Sun Oct 28, 2007 5:38 am    Post subject: Reply with quote

He was also talking about using it in general for games.

And believe me, composite cable is slower than component-interlace. But obviously, fast enough for videos.
Back to top
View user's profile Send private message
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Sun Oct 28, 2007 10:38 am    Post subject: Reply with quote

moonlight wrote:
And believe me, composite cable is slower than component-interlace. But obviously, fast enough for videos.


That doesn't make any sense. Composite should be identical to component interlaced. There's no difference in the signals other than component using Y/Pb/Pr and composite using Y+C. I can't imagine that making any difference in program speed. No one has reported this with the GBA emu I mentioned. The timing is the same, the memory is laid out the same, so why should one be faster than the other?
Back to top
View user's profile Send private message AIM Address
cooleyes



Joined: 18 May 2006
Posts: 125

PostPosted: Sun Oct 28, 2007 11:35 am    Post subject: Reply with quote

J.F. wrote:
moonlight wrote:
And believe me, composite cable is slower than component-interlace. But obviously, fast enough for videos.


That doesn't make any sense. Composite should be identical to component interlaced. There's no difference in the signals other than component using Y/Pb/Pr and composite using Y+C. I can't imagine that making any difference in program speed. No one has reported this with the GBA emu I mentioned. The timing is the same, the memory is laid out the same, so why should one be faster than the other?


I had released a new version PPA, it supported TVOut .
I use more framebuffer to make video out fast,
so when use composite cable to TVOut, it still ok, :P
Back to top
View user's profile Send private message
internal



Joined: 26 Oct 2007
Posts: 3

PostPosted: Sun Oct 28, 2007 2:03 pm    Post subject: Reply with quote

moonlight wrote:


And still, read this thread from the beginning ;)
http://forums.ps2dev.org/viewtopic.php?p=59623#59623

I patched that check -> no working still, odd lines, disconnection, etc. I had to patch then impose.prx and display.prx in the reboot to change some parameters. Result -> appart of the problem of the interlace, the games were really SLOW, unplayable.

Sorry, the composite cable will always be slow, nothing can be done about that.


Thank you for your hard work. Hope this general fix would work someday. I always doubt if it's technic impossible or just to sell more bravias...
Back to top
View user's profile Send private message
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Sun Oct 28, 2007 3:36 pm    Post subject: Reply with quote

cooleyes wrote:
J.F. wrote:
moonlight wrote:
And believe me, composite cable is slower than component-interlace. But obviously, fast enough for videos.


That doesn't make any sense. Composite should be identical to component interlaced. There's no difference in the signals other than component using Y/Pb/Pr and composite using Y+C. I can't imagine that making any difference in program speed. No one has reported this with the GBA emu I mentioned. The timing is the same, the memory is laid out the same, so why should one be faster than the other?


I had released a new version PPA, it supported TVOut .
I use more framebuffer to make video out fast,
so when use composite cable to TVOut, it still ok, :P


Great! I love PPA. It's what I use the most for playing videos. :)

EDIT: for those who have trouble finding PPA, here's a link to the latest.
http://www1.cngba.com/thread-16816469-1-1.html
Back to top
View user's profile Send private message AIM Address
cooleyes



Joined: 18 May 2006
Posts: 125

PostPosted: Sun Oct 28, 2007 4:06 pm    Post subject: Reply with quote

J.F. wrote:
cooleyes wrote:
J.F. wrote:
moonlight wrote:
And believe me, composite cable is slower than component-interlace. But obviously, fast enough for videos.


That doesn't make any sense. Composite should be identical to component interlaced. There's no difference in the signals other than component using Y/Pb/Pr and composite using Y+C. I can't imagine that making any difference in program speed. No one has reported this with the GBA emu I mentioned. The timing is the same, the memory is laid out the same, so why should one be faster than the other?


I had released a new version PPA, it supported TVOut .
I use more framebuffer to make video out fast,
so when use composite cable to TVOut, it still ok, :P


Great! I love PPA. It's what I use the most for playing videos. :)

EDIT: for those who have trouble finding PPA, here's a link to the latest.
http://www1.cngba.com/thread-16816469-1-1.html


or you can get ppa source from googlecode svn
svn checkout http://pmplayer-advance.googlecode.com/svn/trunk/ pmplayer-advance

and you can download the english version PPA in here
http://code.google.com/p/pmplayer-advance/downloads/list
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Goto page Previous  1, 2, 3  Next
Page 2 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group