Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Matrefeytontias

Pages: 1 ... 67 68 [69] 70 71 ... 133
1021
TI Z80 / Re: [z80 ASM] Unnamed set of 3D routines
« on: July 04, 2013, 12:33:12 pm »
@Xeda112358 : I used it in the ProjectVertex routine, it was all weird, I can't really say since it was 2 days ago. I'll test again.

@DJ Omnimaga : can't really say, I'm afraid that this will be a bit slow though :/ I'll make a test with MirageOS's fastline routine.

EDIT : btw, I already use MirageOS's fastcopys routine. IDK if this has any effect on the speed (it has IIRC).

1022
Miscellaneous / Re: Awesome pictures thread
« on: July 04, 2013, 12:31:54 pm »
Well, good luck then, tell me when it's done, I wanna see that :P

1023
Axe / Re: Routines
« on: July 04, 2013, 12:31:16 pm »
I don't know ... I guess we'll have to test it ;D (I won't do it though :P)

1024
Miscellaneous / Re: Awesome pictures thread
« on: July 04, 2013, 12:28:18 pm »
:o hyper-cube in da place ! :D

Can you make it rotate ? ;D

1025
Axe / Re: Routines
« on: July 04, 2013, 12:26:23 pm »
You're wrong : I test if the unsigned value of Y is lesser than 64. If Y is lesser than 0, the 15th bit will be set, making it at least 32768. So it's okay. I would have been wrong if I had used :

If Y<<64

1026
TI Z80 / Re: [z80 ASM] Unnamed set of 3D routines
« on: July 04, 2013, 06:43:37 am »
It wasn't working for me, so I got back to the first option (I optimized a bit the abs part tho).

1027
Axe / Re: Routines
« on: July 04, 2013, 06:04:00 am »
Mega bump,

I wrote this for TheMachine02's GLib, and thought it could be useful to others (even if I doubt so :P). So here's a clipped triangle filler that takes arguments between -512 and 511 (might be a bit inaccurate though, and is surely unoptimized) :

Triangle(x1,y1,x2,y2,x3,y3)

E90D3→°DX1+2→°DX2+2→°SX1+2→°SX2

Lbl Triangle
If r2>>r4
Exch(°r1,°r3,4)
End
If r4>>r6
Exch(°r3,°r5,4)
End
If r2>>r4
Exch(°r1,°r3,4)
End

If r4-r2→X
r3-r1*64//X
Else
r3-r1*64
End
→DX1
If r6-r2→X
r5-r1*64//X
Else
r5-r1*64
End
→DX2

r1*64→SX1→SX2
r2→Y

For(2)
While 1
If Y<64
!If SX1·SX2ee0
min(max(SX1,0)r/64,95)→Z
min(max(SX2,0)r/64,95)→Θ
.Remember that HLine(Y,X1,X) is broken in 1.2.1, so remember to update it with the next versions of Axe
Line(Z,Y,Θ,Y)
End
End
DX1+SX1→SX1
DX2+SX2→SX2
Y++
EndIf Y+1>>r4
If r6-r4→X
r5-r3*64//X
Else
r5-r3*64
End
→DX1
r6→r4
End

And yeah. This routine uses 10.6 fixed point numbers.

1028
TI Z80 / Re: [z80 ASM] Unnamed set of 3D routines
« on: July 04, 2013, 05:35:40 am »
Eeeeeeeeeeeeeeeeeeeer no :P

Well, if that will ever be, it'll be waaaaaaaaaaaaaaaaaaaay later. I'm not sure if I will still be alive at this time ;D

1029
TI Z80 / Re: [z80 ASM] Unnamed set of 3D routines
« on: July 04, 2013, 05:32:41 am »
Not really, it's just something I really wanted to do, but I didn't have the knowledge to do it - until now :)

I hope I'll be able to reach solid drawing, but it's still something reaaally far away x)

1030
TI Z80 / [z80 ASM] Unnamed set of 3D routines
« on: July 04, 2013, 04:49:13 am »
<cross-posted from Cemetech>

Hallaw people,

I finally got something related with 3D working in ASM ! :D <this is a bit like a dream coming true for me :P>

Well, nothing too unbelievable, but I'm happy with what I have so far :)

So, I wrote 3 main routines, and a few other ones you can use, but these latter are not focused on 3D.

Main 3D routines :
  • BuildMatrix : builds the XY composite rotation matrix given the rotation angle about X and Y axis, respectively in b and c. The advantage is that you can rotate several vertices about the same angle without recalculating the rotation for each vertex.
  • ApplyMatrix : applies the matrix stored from AX to CZ (some .db in the program) to the three points stored at inX, inY and inZ and stores the result at outX, outY and outZ (more .dw). This is not necessarily a rotation matrix, but BuildMatrix writes to this area.
  • ProjectVertex : does the necessary calculation to project a vertex on-screen. Takes outX, outY and outZ as parameters and outputs at outX and outY. outZ remains unchanged.
Others routines provided (only because they are used by the 3 above routines) :
  • multHL_DE : performs HL*DE and stores the result in HL.
  • divHL64 : I let you guess.
  • mulHL64 : ↑ this.
  • AextendSignDE : converts the 8-bits signed number in A to a 16-bits signed number in DE.
  • getSin, getCos : retrieves the entry corresponding to the angle A in the trig look-up table (1-byte entries scaled to 64, so it goes from -64 to 64).
  • HLsignedDivDE : performs signed HL/DE, result in HL.
  • HLdivDE : performs unsigned HL/DE, result in HL (by Xeda112358).
Screenshot ? Yes, definitely :P



If you have any comment on the routines I described before I release the source, please tell me :)

1031
TI Z80 / Re: [Axe] The Cutting Edge of Axe (an Axe 4k demo program)
« on: July 04, 2013, 02:01:11 am »
Yep, most likely.

Also because few people knows me on Youtube, hopefully that will change with more videos (I planned a vid on Super Crate Box, Ikaruga X, AxeJh3D, most of my projects that are worth a video).

1032
ASM / Re: [z80] 16 by 16 signed division
« on: July 03, 2013, 08:12:32 am »
It seems that the second routine is wrong ... it gives me wrong results.

1033
TI Z80 / Re: GLIB a graphics axe 3d librairy
« on: July 02, 2013, 07:35:44 pm »
I asked him, he uses frustum culling. Didn't ask how though.

1034
TI Z80 / Re: GLIB a graphics axe 3d librairy
« on: July 02, 2013, 02:03:50 pm »
Looks great :D

How are you handling the frustum culling ? Because it's something I could never figure out how to do.

1035
ASM / Re: [z80] 16 by 16 signed division
« on: July 01, 2013, 06:45:59 pm »
Meh, stop always guessing right ;D

I'll post about it later, don't worry.

Pages: 1 ... 67 68 [69] 70 71 ... 133