How To Print Text?

If you have any questions on programming, this is the place to ask them, whether you're a newbie or an experienced programmer. Discussion on programming in general is also welcome. We will help you with programming homework, but we will not do your work for you! Any porting requests must be made in Developmental Ideas.
Post Reply
samsky
DCEmu Newbie
DCEmu Newbie
Posts: 1
https://www.artistsworkshop.eu/meble-kuchenne-na-wymiar-warszawa-gdzie-zamowic/
Joined: Sat Sep 29, 2012 5:46 pm
Has thanked: 0
Been thanked: 0

How To Print Text?

Post by samsky »

hi

i am looking for a way to print text to the dreamcast, at the moment i have the DDEr4 setup with code::blocks and this is the code i have:

Code: Select all

int main(other stuff...)
{
 do
    {
     cout << "\nHello world!\n" << endl;
     void bfont_draw(uint16 *buffer, int bufwidth, int c);
    }while(10 > 5);
}
Is there something i am doing wrong. and how would i go about updating my kos version, I have tried using cygwin but it does not work...

thanks
User avatar
BlueCrab
The Crabby Overlord
The Crabby Overlord
Posts: 5658
Joined: Mon May 27, 2002 11:31 am
Location: Sailing the Skies of Arcadia
Has thanked: 9 times
Been thanked: 69 times
Contact:

Re: How To Print Text?

Post by BlueCrab »

All you've done with that code is declare that there is a function called bfont_draw() that takes those arguments. I suggest looking at the video/bfont example that comes with KOS to figure out what you need to do.

I also suggest that if you don't have much experience in programming, you might want to try to get your feet wet programming for the PC first. It is a bit of a pain to debug code on the Dreamcast, especially if you don't have the appropriate hardware (BBA or Coder's Cable), so its not really an ideal target to start with. Also, I'd highly recommend using C instead of C++ if you're going to do Dreamcast stuff. :wink:

As for updating KOS, if you've never built a compiler or worked with a *nix-like system, its probably not going to be the easiest thing in the world to do. Newer versions of KOS do tend to require newer versions of GCC, Binutils, and Newlib (especially Newlib) so you'd have to build them too. I don't use Windows myself, so I really can't help you to figure out stuff enough in Cygwin to do it.
User avatar
Maturion
Moderator
Moderator
Posts: 619
Joined: Fri Oct 12, 2007 1:52 pm
Location: Munich, Germany
Has thanked: 0
Been thanked: 0
Contact:

Re: How To Print Text?

Post by Maturion »

BlueCrab wrote:It is a bit of a pain to debug code on the Dreamcast, especially if you don't have the appropriate hardware (BBA or Coder's Cable)
Don't forget the SD-Adapter, which is also quite handy for debugging. :)
User avatar
BlueCrab
The Crabby Overlord
The Crabby Overlord
Posts: 5658
Joined: Mon May 27, 2002 11:31 am
Location: Sailing the Skies of Arcadia
Has thanked: 9 times
Been thanked: 69 times
Contact:

Re: How To Print Text?

Post by BlueCrab »

Maturion wrote:
BlueCrab wrote:It is a bit of a pain to debug code on the Dreamcast, especially if you don't have the appropriate hardware (BBA or Coder's Cable)
Don't forget the SD-Adapter, which is also quite handy for debugging. :)
It is still not nearly as useful as having a live terminal to work with on the PC side, as you get with dcload/dc-tool. Sure, its easier to copy a file to a SD card than it is to burn a cd for each test, but only marginally. :wink:
User avatar
RyoDC
Mental DCEmu
Mental DCEmu
Posts: 366
Joined: Wed Mar 30, 2011 12:13 pm
Has thanked: 2 times
Been thanked: 0

Re: How To Print Text?

Post by RyoDC »

It is still not nearly as useful as having a live terminal to work with on the PC side, as you get with dcload/dc-tool. Sure, its easier to copy a file to a SD card than it is to burn a cd for each test, but only marginally.
So with dc-load and dc-tool you still need to burn updated version of your program to a disc? How long program are uploaded through dc-load?
How do I try to build a Dreamcast toolchain:
Image
User avatar
Neoblast
DC Developer
DC Developer
Posts: 314
Joined: Sat Dec 01, 2007 8:51 am
Has thanked: 3 times
Been thanked: 1 time

Re: How To Print Text?

Post by Neoblast »

Speaking of which, it would be nice to output the debugger gdb info on the sd card ( a text file ) to debug easier for those who don't have a bba...
Post Reply