Unoffical empeg BBS

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

Page 2 of 2 < 1 2
Topic Options
#228788 - 02/08/2004 05:31 Re: [emphatic] Wish List [Re: genixia]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31602
Loc: Seattle, WA
I could swear I'd thought of doing that and then something in my head told me it wouldn't work, that somehow it wouldn't do the same kind of outline. Either that or it some how ended up using the same amount of CPU. But from what you're showing there, it looks like it works, the outlines look like the exact same thing, and from what you're saying, it would theoretically use less CPU. So why had I discounted the idea before? Anyway, that's pretty cool and I hope it's something Tony can use!

By the way: You know you've used bitmap editors too much when you see a screenshot like that, and your brain automatically fillis in the animation of the dotted selection outlines. I kept thinking I saw them move out of my peripheral vision.
_________________________
Tony Fabris

Top
#228789 - 02/08/2004 16:05 Re: [emphatic] Wish List [Re: genixia]
tonyc
carpal tunnel

Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
Cool. I think I'll try either this or the "save the mask and only update the mask when the foreground changes" idea sometime soon.
_________________________
- Tony C
my empeg stuff

Top
#228790 - 02/08/2004 16:44 Re: [emphatic] Wish List [Re: tonyc]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31602
Loc: Seattle, WA
Or both.
_________________________
Tony Fabris

Top
#228791 - 03/08/2004 16:58 Re: [emphatic] Wish List [Re: tonyc]
genixia
Carpal Tunnel

Registered: 08/02/2002
Posts: 3411
I've been studying your code and thinking more about the problem.

It may not be quite as straightforward as I originally thought as I had forgotten about the 2 pixels per byte packing.
Code:

{
fy = iy + py;
fx = ix + px;
if ( fy < 0 || fy >= EMPEG_SCREEN_ROWS || fx < 0 || fx >= EMPEG_SCREEN_COLS )
continue;
if ( px == 0 && py == 0 )
continue;

n = 64 * fy + fx / 2;



This kills you because you hit it (or its sister) every time until done=1. An immediate obvious improvement would be to shift the "if ( px == 0 && py == 0 )" test up a few lines so that you can avoid the two additions and tortuous bounds test for that pixel. The real killer is the bounds test - it only has any effect for 318 out of 4096 pixels, yet you have to do the 4 comparisons every time.

This is something that I hope my method will avoid. By doing the 8 additions sequentially in turn, each addition could be bounded within the 'for' loops.

However, your algorithm only has to deal with the buffer packing problem once per pixel when you burn the bg buffer, or 4096 times per screen refresh. My solution would require this to be done for every addition...ie in the order of 32768 times. It's not the straightforward addition that I thought it was. You can't bytewise add either as you'd get carry problems between the nibbles.

There may be a way around this...it occurs to me that we only care if a pixel in our temporary buffer is non-zero after all the additions. Whether a nibble is 0x1 or 0xf is irrelevant - we burn the bg buffer for that pixel.
Because of that we may be able to use a bitwise OR instead of addition and actually achieve the same result in half the operations.

In order to shift the fg buffer one pixel left or right still is an issue though. If we could 'rotate with carry bits' across 64 bytes then it would be fairly easy.

I'm beginning to wonder whether unpacking the fg image into a byte per pixel copy might be worth considering to make the math faster.


Edited by tonyc (03/08/2004 18:03)

Top
#228792 - 03/08/2004 17:03 Re: [emphatic] Wish List [Re: genixia]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31602
Loc: Seattle, WA
Or you could just draw the text in black eight times, then in white once. No separate layer, just draw it directly onto the buffer.

I know it's not a generic solution, doesn't allow for certain kinds of interesting combinations, and means that things like the progress bar would have to be special-case coded, but perhaps it would be simplest and fastest.
_________________________
Tony Fabris

Top
#228793 - 03/08/2004 17:18 Re: [emphatic] Wish List [Re: tfabris]
genixia
Carpal Tunnel

Registered: 08/02/2002
Posts: 3411
Hmm. I can't remember how flexible vfdlib is with regards to this. I wonder how fast drawing the text is...
_________________________
Mk2a 60GB Blue. Serial 030102962 sig.mp3: File Format not Valid.

Top
#228794 - 03/08/2004 17:20 Re: [emphatic] Wish List [Re: genixia]
tman
carpal tunnel

Registered: 24/12/2001
Posts: 5528
Doesn't it keep an unpacked representation of the display buffer in memory and blats that when you tell it to?

Top
#228795 - 03/08/2004 18:21 Re: [emphatic] Wish List [Re: tonyc]
SE_Sport_Driver
carpal tunnel

Registered: 05/01/2001
Posts: 4903
Loc: Detroit, MI USA
Dumb question here.. I haven't even played with this yet so I apologize if this is something that is painfully obvious:

My database size is "too large" at the moment, and I've been going through all my songs in emplode removing the "Comment" field (and have been toying with the idea of removing Genre) to reduce the size of the database. Since the lyrics are stored in the id3v2 tags, will this cause any issues?

Can I install this on top of 2.00final and select when to boot into it via HiJack or does it always run after it's installed?
_________________________
Brad B.

Top
#228796 - 03/08/2004 21:32 Re: [emphatic] Wish List [Re: SE_Sport_Driver]
tonyc
carpal tunnel

Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
Quote:
Since the lyrics are stored in the id3v2 tags, will this cause any issues?

I don't know what you mean by "your database is too large." Is it taking up too much memory? If that's the case, emphatic will take up another 200-400k (ish) while running, so you'll have to consider that. Having said that, the lyrics are indeed in the ID3 tag, so tagging your tracks won't add to your DB size.

Quote:
Can I install this on top of 2.00final and select when to boot into it via HiJack or does it always run after it's installed?

Well, that depends on what you mean by "run." The more recent versions of Hijack add the MENU_EXEC command which can launch emphatic only when you want to via the Hijack menu. If you just use EXEC or EXEC_ONCE, then the emphatic process starts up when the player boots, but doesn't "run" (do anything) until you select it from the Hijack menu. Actually, v2.01 (which I'm probably releasing tonight) will have the ability to automatically bring itself to the foreground and "run" without being selected from the Hijack menu. So it's up to you.

Seriously though, quit your bellyaching and install the damn thing.
_________________________
- Tony C
my empeg stuff

Top
Page 2 of 2 < 1 2