Working with plastic

Mar 07, 2009 00:13

Today, I have had another miserable day at the office. On the way home, I purchased some bolts at B&Q and then called in at the BEVoB (Battery Electric Vehicles of Bristol) meeting. After a pleasant taramasalata and pitta bread snack, I set about answering the serious question of the day: can I tap a thread into 6mm polycarbonate?


Read more... )

solvent welding, polycarbonate, uk101, maker faire

Leave a comment

Comments 3

ginaspider March 8 2009, 03:43:16 UTC
Hey, I noticed that 68000 was in your interests. Any tips for optimizing this?

lea v,%a0
move.w (op1),%d0
move.w %d0,%d1
move.w (op2),%d2
move.w %d2,%d3
and.w #7,%d0
lsl.w #2,%d0
lsr.w #3,%d1
lsl.w #8,%d1
lsl.w #1,%d1
add.w %d1,%d0
and.w #3,%d2
lsr.w #2,%d3
lsl.w #5,%d3
add.w %d2,%d3
add.w %d3,%d0
move.b (color),%d4
move.b %d4,(%a0,%d0)

it's suppose to replace this:

v[(((op1)&7)<<2) + (((op1)/8)*512) +
((op2)&3)+(((op2)/4)*0x20)] = color;

I kinda have a really messed-up framebuffer I'm writing to.

Reply

c0re_dump March 8 2009, 19:15:16 UTC
My suggestion would be to make two lookup tables, one for the calulation on op1 and the other for op2. Then, simply index the tables by op1 and op2, get the results, add them together and use the result as an offset from 'v'. How many bits are op1 and op2? Eight bits or more than that? And do you mave enough memory for the two look-up tables?

Reply

ginaspider March 8 2009, 19:44:51 UTC
Huh, that's clever. I should have enough memory. op1 and op2 actually never go above 0x7f- so that totally should be feasible. Gee thanks

Reply


Leave a comment

Up