+  RHDN Forum Archive
|-+  Romhacking
| |-+  ROM Hacking Discussion
| | |-+  Help wanted with GBA vwf
Pages: 1 2 3 [4] 5 6
Author Topic: Help wanted with GBA vwf  (Read 4088 times)
KaioShin
Guest
« Reply #45 on: January 20, 2007, 11:25:57 am »

Time for a messed up screenshot :p :

http://img252.imageshack.us/img252/959/mess3yo.png

I think the first two tiles illustrate the problem with the uneven widths. K is 7 pixel wide (1 space included), and i is 2 pixel wide. Somehow they got combined right, but the i was then duplicated in the new tile, because the tile was cut off wrong in RAM. It removed the trailing space instead of the i because their positions are switched on pixel level >-< I don't know which problems after that are related to that problem and how many are related to other problems with the code. I didn't step through the routine for every character, just for the first two or three.

Can no one help me with this issue? If I have to adjust the font so that every character has an even width it might turn out messy as I have to shorten some by one pixel and widen some others. I'm afraid the font will look too random then Sad
creaothceann
Guest
« Reply #46 on: January 20, 2007, 01:21:49 pm »

Uh, switch the nibbles before and after combining?
Tauwasser
Guest
« Reply #47 on: January 20, 2007, 01:34:17 pm »

There seems to be a logic problem. You don't shift the last data.
I don't understand what 2005000 and 2005001 are supposed to do, since one of them get's overwritten in the process two times.

So here's an outline.

2005000=width already in tile
2005001=width of current character

now, first thing you want to do is this:

clear 2005000/1 and tile1-3 before the actual text display starts.

Now, if 2005000 is 0, just paste the tile onto tile3 (that gets dma'ed) and save it's width in 2005000 (of course, that is, if you DON'T have characters wider than 8px, else, find a workaround)

if 2005000 is <>0, then. dma the character to tileram1. shift it right thru tileram2 until it's first pixel = [2005000] now and and or the data into tileram3, transfer to old vram location (you might have to rewrite how it counts tiles, or else your automated function that reads tileoffset [in vram] from ram will screw it up).
Increase tilecount for vram tile. dma tileram2 to new tile.

calculate [2005001] +8 - [2005000] and write that to [2005000].

cYa,

Tauwasser

KaioShin
Guest
« Reply #48 on: January 20, 2007, 02:57:54 pm »

Seems like I fixed everything somehow. I'll post some screenshots later when I've investigated some things.

Here it is, there was a nasty bug to fix beforehand ^^:



I still have to do something because of the end of line/end of string control code as you can see at the end. But the vwf seems to be perfect now. Thanks to everyone who helped me, I'll let you know how things go Smiley.
« Last Edit: January 20, 2007, 04:32:15 pm by KaioShin »
DaMarsMan
Guest
« Reply #49 on: January 20, 2007, 04:36:32 pm »

Yay!
RedComet
Guest
« Reply #50 on: January 20, 2007, 05:05:44 pm »

Beautiful. Congrats on your first VWF, Kaio! Cheesy
Nightcrawler
Guest
« Reply #51 on: January 20, 2007, 06:43:34 pm »

Nice work Kaio. I'm impressed. You learn fast.

If you haven't fixed that end line control code yet, all you need to do is print the spill over if there is any on a new tile and drop out and let the game handle it from there. That's all you're missing.
Normmatt
Guest
« Reply #52 on: January 20, 2007, 08:42:16 pm »

That VWF looks awesome, congrats on getting it working.

now if only i knew how to code a proper vwf Embarrassed


btw, it'd be nice if you could maybe write up a tutorial on how to accomplished this and/or release your code.
Spikeman
Guest
« Reply #53 on: January 20, 2007, 10:13:15 pm »

Yeah I'm interested in seeing the source. Grin
KaioShin
Guest
« Reply #54 on: January 21, 2007, 03:35:20 am »

Thanks for your support everyone  Cheesy

If there is demand I can release the source. But not until I fixed the remaining bugs and I'm 100% certain everything works perfect. And the code works - that doesn't mean it's well optimized and stuff Wink I'm sure others could write my code in half of the size, but I guess the part which matters most - the tile combining - would be the same.
KaioShin
Guest
« Reply #55 on: January 21, 2007, 07:42:29 pm »



It should be bug free now Smiley It took me much much longer than expected to implement the line break stuff properly (it worked early, but with loads of bugs), but now it looks fantastic.
Ryusui
Guest
« Reply #56 on: January 21, 2007, 08:02:15 pm »

Okay, idiot question from the crowd:

Does this display the text one character at a time, copying the character data to VRAM with a DMA, or...other?
Tauwasser
Guest
« Reply #57 on: January 21, 2007, 08:52:10 pm »

Did my notes help any? I know, I wasn't being the nicest person I can be...

cYa,

Tauwasser
Spikeman
Guest
« Reply #58 on: January 21, 2007, 10:01:07 pm »

That looks really nice! Want to release the source now? Grin
KaioShin
Guest
« Reply #59 on: January 22, 2007, 07:32:03 am »

Quote from: Ryusui on January 21, 2007, 08:02:15 pm
Okay, idiot question from the crowd:

Does this display the text one character at a time, copying the character data to VRAM with a DMA, or...other?
The original routine did exactly that, my does still the same, just with combining several on the tiles in RAM before sending Wink

Quote from: Tauwasser on January 21, 2007, 08:52:10 pm
Did my notes help any? I know, I wasn't being the nicest person I can be...

cYa,

Tauwasser

I fixed the problem you brought up some time before, sorry I didn't reupload the code to the latest source.  I don't know why your post should haven been not nice or anything, if I hadn't  catched that error before it would have been very helpful.

Quote from: Spikeman on January 21, 2007, 10:01:07 pm
That looks really nice! Want to release the source now? Grin

Well... I have to add/clean up the comments a bit now. It's by no means good code, there is a lot of redundancy in it I think, but it should help you understand the basic workings I guess.
Pages: 1 2 3 [4] 5 6  


Powered by SMF 1.1.4 | SMF © 2006-2007, Simple Machines LLC