printf() doesn't print anything to the terminal.
- JS Lemming
- Insane DCEmu
- Posts: 202
- https://www.artistsworkshop.eu/meble-kuchenne-na-wymiar-warszawa-gdzie-zamowic/
- Joined: Mon Apr 04, 2005 8:08 am
- Location: C:\CON\CON
- Has thanked: 0
- Been thanked: 0
- Contact:
printf() doesn't print anything to the terminal.
I recently got a Dreamcast Development setup on my linux system and found that printf() does nothing for me (doesn't print stuff to the terminal). It used to work when I had it set up for windows using the DC Dev ISO. I have a faint memory of someone saying that communication bewteen the terminal can be switched on or off depending on if the program you're working on is about to be released (off is faster or something) but can't remember. Anyone know how I can get that working again?
BTW, if it matters, I'm using dc-tool 1.0.3 by <andrewk@napalm-x.com>... I've heard of a version 4 or might have even had the source to it at one point but I was unable to compile it. But I'm assuming 1.0.3 can handle things just fine.
PS: I use coder's cable.
BTW, if it matters, I'm using dc-tool 1.0.3 by <andrewk@napalm-x.com>... I've heard of a version 4 or might have even had the source to it at one point but I was unable to compile it. But I'm assuming 1.0.3 can handle things just fine.
PS: I use coder's cable.
-
- Insane DCEmu
- Posts: 147
- Joined: Thu Dec 30, 2004 7:12 pm
- Has thanked: 0
- Been thanked: 0
- Contact:
I have described that problem in my post with no solution yet.
There i trierd dc-tool-ip(BBA) 1.0.3 and 1.0.4.
The printfs just don't work.
There i trierd dc-tool-ip(BBA) 1.0.3 and 1.0.4.
The printfs just don't work.
Check the BioGB emulator any help me get it much better!!
http://www.geocities.com/instructivus
http://www.geocities.com/instructivus
- BlueCrab
- The Crabby Overlord
- Posts: 5660
- Joined: Mon May 27, 2002 11:31 am
- Location: Sailing the Skies of Arcadia
- Has thanked: 9 times
- Been thanked: 69 times
- Contact:
There is an odd problem with printf()s in KOS that I have yet to find....
As a temporary measure, you could always use dbglog instead:
dbglog can be used just like printf, with the addition of the first parameter. I, so far, haven't seen any problems with using dbglog for printing, plus, you can change the level of the stuff being printed, so that in a finalized release, you just set that you don't want anything with a level of less than a certain amount to be printed, and it won't be. Here's the relevant values for the first parameter to that function, by the way.
The higher the number, the lower priority the message is. (Most things inside KOS use the DBG_KDEBUG level).
I hope this helps out...
By the way, this is all in the <kos/dbglog.h> header, so if you're not including <kos.h>, make sure to include that or you'll have compilation errors...
As a temporary measure, you could always use dbglog instead:
Code: Select all
dbglog(DBG_DEBUG, "Insert message here\n");
Code: Select all
#define DBG_DEAD 0 /* The system is dead */
#define DBG_CRITICAL 1 /* A critical error message */
#define DBG_ERROR 2 /* A normal error message */
#define DBG_WARNING 3 /* Potential problem */
#define DBG_NOTICE 4 /* Normal but significant */
#define DBG_INFO 5 /* Informational messages */
#define DBG_DEBUG 6 /* User debug messages */
#define DBG_KDEBUG 7 /* Kernel debug messages */
I hope this helps out...
By the way, this is all in the <kos/dbglog.h> header, so if you're not including <kos.h>, make sure to include that or you'll have compilation errors...
- JS Lemming
- Insane DCEmu
- Posts: 202
- Joined: Mon Apr 04, 2005 8:08 am
- Location: C:\CON\CON
- Has thanked: 0
- Been thanked: 0
- Contact:
Thanks BlueCrab, even though I don't think I can print variables with that function which is what I really need to do. BTW, I just found out that using printf without passing a variable works... like:
Code: Select all
printf("This works!\n");
printf("But this doesn't work! %f",corn);
- JS Lemming
- Insane DCEmu
- Posts: 202
- Joined: Mon Apr 04, 2005 8:08 am
- Location: C:\CON\CON
- Has thanked: 0
- Been thanked: 0
- Contact:
- BlueCrab
- The Crabby Overlord
- Posts: 5660
- Joined: Mon May 27, 2002 11:31 am
- Location: Sailing the Skies of Arcadia
- Has thanked: 9 times
- Been thanked: 69 times
- Contact:
It should just work exactly like printf(), with the exception of the additional first argument.... Here's a bit of code from kos/kernel/net/net_udp.c:
It should handle float variables just the same as printf(). If you don't mind, paste the errors you get out of gcc when trying to compile and the relevant code that's causing the errors, of course.
Code: Select all
if(checksum != ps->checksum) {
dbglog(DBG_KDEBUG, "net_udp: discarding UDP packet with invalid "
"checksum\n"
" calculated 0x%04X, sent 0x%04X\n",
ps->checksum, checksum);
return -1;
}