Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Page 1 of 3 1 2 3 >
Topic Options
#171198 - 18/07/2003 06:10 Fixing vfdlib for v3.00
pim
addict

Registered: 14/11/2000
Posts: 474
Loc: The Hague, the Netherlands
Are there any volunteers for fixing vfdlib on v3.00?
It does not seem the original author, Richard Kirkby
is on this board.

The rendering of text using this library does not seem to work
anymore with the fonts supplied with v3.00-alpha3.

As a workaround one could probably copy the old fonts
to a separate location and use those, but this is tedious.

Pim

Top
#171199 - 18/07/2003 06:48 Re: Fixing vfdlib for v3.00 [Re: pim]
tonyc
carpal tunnel

Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
Richard hasn't posted since February (his BBS name is kirkis) but he's always been good about responding to emails. I spoke with Tony F. yesterday about this font issue and said that if the Empeg guys could provide me with the specs for the new font format, I could give it a go.
_________________________
- Tony C
my empeg stuff

Top
#171200 - 18/07/2003 08:53 Re: Fixing vfdlib for v3.00 [Re: pim]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31597
Loc: Seattle, WA
Yeah, I suspect that what happened is that 3.0 has revamped the font files to use unicode, so if you re-use the player fonts in VFDlib, the 3.0 fonts won't work. The solution would be, as you said, to upgrade VFDlib to support both possible font sets and autodetect which is present. We need only to know the spec for the new font files, and I've already placed a request for this with The Guys. They're pretty busy with some Real Life deadlines right at the moment, so I wouldn't expect a reply immediately.

There's no chance that someone could simply look at the new font files and reverse-engineer the spec, is there? Maybe it's as simple as "the file format is the same, you just have a larger unicode index instead of an 8-bit index"?
_________________________
Tony Fabris

Top
#171201 - 18/07/2003 09:02 Re: Fixing vfdlib for v3.00 [Re: tfabris]
tonyc
carpal tunnel

Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
There's no chance that someone could simply look at the new font files and reverse-engineer the spec, is there? Maybe it's as simple as "the file format is the same, you just have a larger unicode index instead of an 8-bit index"?
Possible, but more difficult, and if the team isn't in a hurry to release 3.0, I'm not in a hurry to fix vfdlib for 3.0. I'd rather have a spec in front of me than count on Doing the Right Thing with reverse engineering. Or at least someone with a blue nickname to say exactly what you just said about a larger unicode index.
_________________________
- Tony C
my empeg stuff

Top
#171202 - 18/07/2003 09:16 Re: Fixing vfdlib for v3.00 [Re: tonyc]
pim
addict

Registered: 14/11/2000
Posts: 474
Loc: The Hague, the Netherlands
If I recall correctly, the new fonts are smaller. So they might
be encoded more efficiently, while supporting larger character
sets at the same time.

According to this thread, the character sets haven't grown, though.

Pim

Top
#171203 - 18/07/2003 09:56 Re: Fixing vfdlib for v3.00 [Re: pim]
tonyc
carpal tunnel

Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
Your analysis would seem to be correct about new fonts being more efficiently encoded:

17588 large.bf
15626 large.bf.new
9272 medium.bf
8502 medium.bf.new
6500 small.bf
6102 small.bf.new

My guess is that efficiency comes at the expense of ease in decoding, but I'm sure it's not rocket science.
_________________________
- Tony C
my empeg stuff

Top
#171204 - 18/07/2003 13:14 Re: Fixing vfdlib for v3.00 [Re: tfabris]
Daria
carpal tunnel

Registered: 24/01/2002
Posts: 3937
Loc: Providence, RI
There's no chance that someone could simply look at the new font files and reverse-engineer the spec, is there? Maybe it's as simple as "the file format is the same, you just have a larger unicode index instead of an 8-bit index"?


I'm sure there's a chance it could be done, but I bet most of the people who could do it are either busy or insufficiently special.

Top
#171205 - 20/07/2003 08:58 Re: Fixing vfdlib for v3.00 [Re: Daria]
tonyc
carpal tunnel

Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
Well, I'm not the best reverse-engineer on the planet, but I can find no obvious file format for the new files. If anyone else wants to try, be my guest, but unless someone can get me a format spec (or the old spec and tell me what the differences are) I won't be the one patching vfdlib.
_________________________
- Tony C
my empeg stuff

Top
#171206 - 20/07/2003 10:28 Re: Fixing vfdlib for v3.00 [Re: tonyc]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31597
Loc: Seattle, WA
Cool, thanks for trying.

And by the way, I sent Tony *just* the font files, not a full copy of 3.0.
_________________________
Tony Fabris

Top
#171207 - 20/07/2003 11:28 Re: Fixing vfdlib for v3.00 [Re: tfabris]
tonyc
carpal tunnel

Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
And by the way, I sent Tony *just* the font files, not a full copy of 3.0.
Rub it in why don't you.
_________________________
- Tony C
my empeg stuff

Top
#171208 - 20/07/2003 14:16 Re: Fixing vfdlib for v3.00 [Re: tfabris]
rob
carpal tunnel

Registered: 21/05/1999
Posts: 5335
Loc: Cambridge UK
This is a bad week to ask for, well, pretty much anything - but hopefully next week I can dig out the font spec. I also don't mind if someone sends 3.0 to Tony for app fixing purposes.

Rob

Top
#171209 - 20/07/2003 14:21 Re: Fixing vfdlib for v3.00 [Re: rob]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31597
Loc: Seattle, WA
Thanks, Rob.
_________________________
Tony Fabris

Top
#171210 - 21/07/2003 18:01 Re: Fixing vfdlib for v3.00 [Re: pim]
kirkis
new poster

Registered: 17/03/2002
Posts: 21
Hi Guys,

I'm still around but have zero time to devote to empeg development. I couldn't even begin to try fixing the problem without v3.00 anyways.

If someone is kind enough to take on the task of doing the fix I'd be happy to put it into a new vfdlib release.

Richard
--

Top
#171211 - 18/09/2003 21:18 Fixed vfdlib for v3.00 [Re: pim]
Daria
carpal tunnel

Registered: 24/01/2002
Posts: 3937
Loc: Providence, RI
Apply the attached diff. Enjoy, people lucky enough to have the rest of the alpha


Attachments
178780-vfdlib.diff (117 downloads)


Top
#171212 - 18/09/2003 21:21 Re: Fixed vfdlib for v3.00 [Re: Daria]
Daria
carpal tunnel

Registered: 24/01/2002
Posts: 3937
Loc: Providence, RI
And actually, in fairness, it's not done. I'm still trying to figure out what the deal with the last 32 characters is.

Top
#171213 - 18/09/2003 21:51 Re: Fixed vfdlib for v3.00 [Re: Daria]
Daria
carpal tunnel

Registered: 24/01/2002
Posts: 3937
Loc: Providence, RI
In order for this to make sense, see previous patch.

unk2 is an offset. At that offset appears to be a table, which appears to be a pair of char for each entry. I'm not sure what the purpose is, since it appears the first char in the pair counts up from 0, and the other is always 0.

At least, looking at 13pixel.bf and large.bf both seem to indicate this.

Hm. Looking at 13pixelnumeric.bf, I guess the table is actually one which tells us at what offset to fill in the character.

Ok, a little more coding...

Top
#171214 - 18/09/2003 21:55 Re: Fixed vfdlib for v3.00 [Re: Daria]
Daria
carpal tunnel

Registered: 24/01/2002
Posts: 3937
Loc: Providence, RI
Hm. No, I understand now. Finished fix shortly.

Top
#171215 - 18/09/2003 22:31 Fixed better vfdlib for v3.00 [Re: Daria]
Daria
carpal tunnel

Registered: 24/01/2002
Posts: 3937
Loc: Providence, RI
Ok, this one should deal correctly with the packing. It appears to work with the v2 and the v3 fonts I have. It's not clear I have all the v3 fonts.


Attachments
178789-vfdlib.diff2 (146 downloads)


Top
#171216 - 19/09/2003 05:39 Re: Fixed vfdlib for v3.00 [Re: Daria]
pim
addict

Registered: 14/11/2000
Posts: 474
Loc: The Hague, the Netherlands
Hey that's great! Unfortunately I won't be able to try it out, as I'm just packing for a short holiday trip to the US (Chicago & New Orleans). I will certainly make a new build of my vfdlib-enabled rsync port when I return.

Thanks,
Pim

Top
#171217 - 19/09/2003 08:37 Re: Fixed vfdlib for v3.00 [Re: pim]
Daria
carpal tunnel

Registered: 24/01/2002
Posts: 3937
Loc: Providence, RI
Actually, I was lying in bed thinking about it, and there are still 2 bugs. I'll try to get a corrected patch out before I leave for Ohio.

Top
#171218 - 19/09/2003 08:40 Re: Fixed vfdlib for v3.00 [Re: Daria]
tonyc
carpal tunnel

Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
Actually, I was lying in bed thinking about it, and there are still 2 bugs. I'll try to get a corrected patch out before I leave for Ohio.
Great stuff! I had planned to restart emphatic development soon so I'll give this a shot once you've got the bugs worked out.
_________________________
- Tony C
my empeg stuff

Top
#171219 - 19/09/2003 08:42 Re: Fixed vfdlib for v3.00 [Re: tonyc]
Daria
carpal tunnel

Registered: 24/01/2002
Posts: 3937
Loc: Providence, RI
One is easy. free(cOffset); before the font register routine returns.

The other should also be easy, I'm testing it now.

Top
#171220 - 19/09/2003 08:44 Fixed vfdlib for v3.00 ter [Re: Daria]
Daria
carpal tunnel

Registered: 24/01/2002
Posts: 3937
Loc: Providence, RI
This one won't write into random memory it shouldn't when it finds a character that shouldn't be mapped.


Attachments
178817-vfdlib.diff3 (132 downloads)


Top
#171221 - 19/09/2003 12:29 Re: Fixed vfdlib for v3.00 [Re: pim]
julf
veteran

Registered: 01/10/2001
Posts: 1307
Loc: Amsterdam, The Netherlands
In reply to:

I'm just packing for a short holiday trip to the US (Chicago & New Orleans)



New Orleans OK, but holiday in chicago?

Top
#171222 - 19/09/2003 12:44 Re: Fixed vfdlib for v3.00 [Re: julf]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
From what I hear, it's a toddlin' town.
_________________________
Bitt Faulk

Top
#171223 - 19/09/2003 12:56 Re: Fixed vfdlib for v3.00 [Re: wfaulk]
mwest
old hand

Registered: 01/05/2003
Posts: 768
Loc: Ada, Oklahoma
I saw a man, he danced with his wife.
_________________________
-Michael West

Top
#171224 - 23/09/2003 18:41 Re: Fixed vfdlib for v3.00 ter [Re: Daria]
tonyc
carpal tunnel

Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
Okay, vfdlib (as written) doesn't seem to be working for me with 3.0 fonts. Here's where vfdlib_registerFont bombs out:


if (bfHeader.version == 2) {
fseek(fp, bfHeader2.offset, SEEK_SET);
if (fread(cOffset, sizeof(CharOff), totalChars, fp) < totalChars) {
fclose(fp);
return -1;
}
}

.

I threw in some debug and the fread() call seems to be reading 115 chars, and totalChars seems to always be 200.

I tried having it continue on regardless of what fread() returns, and after everything loads up, this is what I get in emphatic:


The characters all seem to be formed properly (individually) but the character map seems out of place... Watching lyrics scroll by looks pretty funny.

Any idea what's up? I'm using small.bf, medium.bf, and large.bf (the 3.0 versions.)


Attachments
179356-emphatic-fux0r3d.gif (161 downloads)

_________________________
- Tony C
my empeg stuff

Top
#171225 - 23/09/2003 20:20 Re: Fixed vfdlib for v3.00 ter [Re: tonyc]
Daria
carpal tunnel

Registered: 24/01/2002
Posts: 3937
Loc: Providence, RI
I'll look later. Maybe when I cleaned it up I broke something.

Top
#171226 - 23/09/2003 20:42 Re: Fixed vfdlib for v3.00 ter [Re: tonyc]
Daria
carpal tunnel

Registered: 24/01/2002
Posts: 3937
Loc: Providence, RI
Oh, sh*t.

It works when I run gpsapp_host on a PC, and fails in the way you describe on an empeg I dropped the fonts on.

Top
#171227 - 23/09/2003 20:50 Re: Fixed vfdlib for v3.00 ter [Re: Daria]
Daria
carpal tunnel

Registered: 24/01/2002
Posts: 3937
Loc: Providence, RI
Ok, I know why, and given what I was thinking earlier today it makes sense. It's not a table of 2 chars, it's a list of shorts, so presumably it is some encoding supporting more than 256 characters.

Top
Page 1 of 3 1 2 3 >