I will buy anyone a beer at #Bierhaus at #Tripla in Helsinki (within the next hour or so) if you correctly tell me what this code is doing.

#demoscene #assembly

So, I don't believe I received any correct answers. In fairness you really have to have been doing #demoscene style stuff on a 32 bit #Motorola 68K (020 or so) processor to get it. I don't think I would've figured it out myself, but one other friend did guess, by looking at it.

The answer is this is a texture mapping routine. My friend guessed because of the two steps at the end.

(Cc @a13cui)

@a13cui btw the guy in the picture is #Emphii from the demo group #Extream. He does #Atari #demoscene stuff.

@Setok @a13cui

dammit for a minute I thought extream was on fedi

koska olen väsynyt, koska Assembly

@Truck @a13cui at Bierhaus we were wondering if there was anyone that on Mastodon that might get the code. You and @franky came up in the discussion but we weren’t sure if either of you have done 68K assembler :)

@Setok @a13cui @franky

68000 and 6502 are my chips (:

I just didn't see it til now, and even then, I was thinking "I really need to know what the address registers are pointing to"
would really have needed "more sleep" (:

@Truck @a13cui @franky my reaction was the same but #Wiztom got it fairly quickly. The pattern is there even if you don’t know where things are pointing.

@Setok @a13cui @franky

Yes, it's the sort of thing wiztom would look at and instantly know.
Britelite probably would get it quickly; maybe Dweezil would get it instantly also. Depends when Dweezil has last looked at assembly (:

@Setok @Truck @a13cui I have not done 68000,sorry.

@Setok @Truck @a13cui @franky Well I got it, but since I wasn't there to collect the prize I didn't bother with it. Sorry 😎​

This is a variation of the classic addx texturemapping innerloop as discussed here: https://amycoders.org/opt/innerloops.html

#m68k #democoding

A brief discussion about texturemapper innerloops using ADDX

@harrysintonen @Setok @a13cui @franky

Oh yes, piru would also instantly know it (:

@Setok @[email protected] is this using the 32-bit trick where you stuff both a 16-bit x and y into the same register? Or is that more of just an Intel thing to do?
@ExtentOfTheJam @a13cui I believe this was using a 32 bit trick (I was informed this was for a Falcon, but that probably 1200 Amiga too), so possibly. Haven’t thought it through myself.

@Setok @a13cui

even with the explanation I don't know how it works, I can see the steps but don't follow the logic

@methchild @a13cui are you familiar with how texture mapping works?

@Setok

not really, when I was in my teens I dabbled with wireframe images using example code for the 3d to 2d mapping and hidden line removal to get something approximating a Cobra MkIII from Elite but I had other distractions. When it came to the next stage of filling the faces with a colour, I managed that too after a fashion. I got stuck when it came to adding a lightsource to adjust the colours of the faces and wrapping a texture on to a skewed face and never returned to it.