Simple Hello World Tutorial with X/Y

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
DCDev
DCEmu Newbie
DCEmu Newbie
Posts: 1
https://www.artistsworkshop.eu/meble-kuchenne-na-wymiar-warszawa-gdzie-zamowic/
Joined: Sun Dec 22, 2019 7:00 am
Has thanked: 0
Been thanked: 0

Simple Hello World Tutorial with X/Y

Post by DCDev »

Hello,

I looked at the wiki and noticed there was no hello world tutorial. After some googling I found a hello world tutorial. However it uses printf which means it's not possible to set its. X, Y coordinates. I would like a simple tutorial that displays Hello World in the center of the screen.
User avatar
ThePerfectK
Insane DCEmu
Insane DCEmu
Posts: 147
Joined: Thu Apr 27, 2006 10:15 am
Has thanked: 27 times
Been thanked: 35 times

Re: Simple Hello World Tutorial with X/Y

Post by ThePerfectK »

DCDev wrote: Sun Dec 22, 2019 7:21 am Hello,

I looked at the wiki and noticed there was no hello world tutorial. After some googling I found a hello world tutorial. However it uses printf which means it's not possible to set its. X, Y coordinates. I would like a simple tutorial that displays Hello World in the center of the screen.

check out the bios font test, it's in the KOS example folder (kos/example/video/bfont/).

Pretty much exactly what you are asking for.

note that these work by directly manipulating the frame buffer being drawn to the screen, not really a wise way to work with graphics on the Dreamcast.If you want to place text on the screen using KOS or gldc or native hardware, you'll have to write a function to do so yourself, using quads or trangle strips and managing the UV mapping from a texture glyph yourself.
Still Thinking!~~
User avatar
Protofall
DCEmu Freak
DCEmu Freak
Posts: 78
Joined: Sun Jan 14, 2018 8:03 pm
Location: Emu land
Has thanked: 21 times
Been thanked: 18 times
Contact:

Re: Simple Hello World Tutorial with X/Y

Post by Protofall »

The PNG example (kos/examples/dreamcast/png/) has a function that can render text using the PVR/GPU (Hardware rendering). The bfont method uses the CPU (Software rendering). This is what ThePerfectK was referring to about bfont's method being unwise.
Moving Day: A clone of Dr Mario with 8-player support <https://dcemulation.org/phpBB/viewtopic ... 4&t=105389>
A recreation of Minesweeper for the Dreamcast <viewtopic.php?f=34&t=104820>

Twitter <https://twitter.com/ProfessorToffal>
YouTube (Not much there, but there are a few things) <https://www.youtube.com/user/TrueMenfa>
Post Reply