GP32 (f)print(f) statements


unit3

Member
Joined
Aug 8, 2003
Messages
151
Location
Canada
Website
demoni.ca
Hey all,

I've got ffplay compiled. But all is not well, as it sets the screen mode, and then dies. Debugging is proving to be a pain, as all the output is in printf and fprintf statments. Naturally, these don't show up anywhere on the gamepark that I can tell.

Is there an easy way to see this output? I can't think of a nice way to handle getting them to the screen... but, could they be redirected to a file, to be looked at later? Any ideas on how I would do this?
 
The GDB-stub supports printing to GDB.
you basically do a DEBUG_Printf("whatever"); the same functionality as printf, but
the text will appear in the GDB window..
Anyway, i think the GDB-stub and gdb itself can help you out more.

---
mithris
 
hrm, ok mithril, that'd be handy... but how to I hook gdb-stub on my gamepark to gdb on my computer? Is there a howto somewhere that shows how you'd set this up, both physically and in your code?
 
GDB-Stub package contains required information & examples. Complete n00b like me was even able to use it :unsure: Anyway there are few requirements: 1) modded firmware like multifw, 2) you must use gcc, 3) gdb-seerver exists only for Linux & Mac OSX at the moment.

Another alternative for debug output can be found from Darkfader's MyLib2 package. You should probably check that too.
 
Cool, I'll check those out... I don't really want to deal with multifirmware, so if darkfader's stuff doesn't do what I want, I may just write a "printf to file" library to use with projects like these.

UPDATE: The code from gpscumm looks good, so I'm going to attempt to make a generic piece of code that you can link to any project. If ph0x has such a thing already, I'd like to hear about it, but otherwise I'm going to just work on that myself. :)
 
ARG!

Ok, so none of my attempts have gone very smoothly, all the code I've found has been pretty tailored for specific projects, and hasn't integrated well generically.

Here's what I'd like to do, and maybe someone out there can give me a *simple* example of how to do it:

I'd like to redefine stdout and stderr to be a single text file, so that all output to those goes to files on the SMC that I can read later. I'd imagine this could be done by including a header that redefines them in my regular source files, and then writing a little function to init and open the files for writing.

However, my strait C skills are *very* rusty (I realized that I haven't done *any* file i/o without fstream in over 5 years).

So yeah, PLEASE HELP!! :p As soon as I get this worked out, I can get this debugged and provide a real movie player for everyone!
 
So,
how are things going?
The project isn't dead, I hope?

I'd love to see ffmpeg ported, since I don't own a credit card and can't buy gpcinema or moviepark. And I'm sure that a lot of other people have the same problem.

I can't help you, since my programming skills are quite low (basic, visual basic and php), but I can support you :)

Please don't give up and try to get this baby up and running :)

Good luck.
 
Back
Top