gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

Coding > Tonc's Text Engine Implementation

#177330 - MisterLogan - Mon Apr 16, 2012 7:38 am

After not coding for a long stint I wanted to play around with my old gba game, but I've immediately run into a problem. I need some sort of debug info, and I wanted to just use tonc's text engine, but I just straight up am not grasping how to use it.

So can anyone give some description of it's implementation and usage? Do I need any files outside of tonclib?

Maybe I'll get it tomorrow, things always work better in the day.

Thanks

#177332 - gauauu - Mon Apr 16, 2012 3:27 pm

Before one of us starts explaining, it looks like there's really good explanations of it on the actual Tonc pages. Do you have specific questions that the tonc page wasn't able to answer?

#177333 - MisterLogan - Mon Apr 16, 2012 6:18 pm

I read through it yesterday but I'm gonna try again now, I was just really annoyed because I was tired. I tried a bunch of things and kept getting this compilation error: "undefined reference to 'irq_init'" to a bunch of different things from tonclib.

All the errors came from this line in my compilation batch file, which if I remember correctly is linking my binaries. "arm-eabi-gcc -specs=gba.specs -mthumb -mthumb-interwork source\main.o source\gfx\*.o source\gfx\palette\palette.o source\gfx\maps\*.o -o main.elf"

I have a hard time understanding other people's code, due to not having much experience, so reading through his examples really kills my brain. I'll get it eventually though!

#177334 - MisterLogan - Wed Apr 18, 2012 5:28 am

I just decided to get a fresh start and move to the ds.

#177336 - wintermute - Thu Apr 19, 2012 11:25 pm

You might also want to stop using bat files to compile & use proper Makefiles.

Recently I moved from building the toolchains directly on Windows using mingw to building on linux using mingw-w64 (things are much, much faster that way). Apparently the newer tools have disabled the old globbing crt0 for msvc compatibility so wildcards won't work from cmd or through bat files.
_________________
devkitPro - professional toolchains at amateur prices
devkitPro IRC support
Personal Blog

#177337 - MisterLogan - Sat Apr 21, 2012 12:12 am

Yeah, I switched over to makefiles when I moved over. I won't pretend I have any idea how they work, but it's nice to have everything put together.

I also had my gba project folder in my devkitarm directory when I updated (didn't know about the erasing thing) so I'm really starting fresh now!

Can't seem to get a basic tilemap running though...

#177339 - Dwedit - Sun Apr 22, 2012 8:23 am

I think it's time that devkitarm include a text file named "Do_not_create_projects_here.txt" which explains that the directory is cleared with new releases, just to cut down on mistakes.

Kind of reminds me of long ago when I installed DJGPP to make some C programs, and I learned the hard way that you couldn't name your development directory C:\dev.
_________________
"We are merely sprites that dance at the beck and call of our button pressing overlord."

#177340 - sverx - Mon Apr 23, 2012 11:21 am

First time I fell too. Fortunately I had a backup :)
_________________
libXM7|NDS programming tutorial (Italiano)|Waimanu DS / GBA|A DS Homebrewer's Diary