Welcome, Guest. Please login or register.

Author Topic: I want an asm-float-routine  (Read 3432 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline GreatLorTopic starter

  • Jr. Member
  • **
  • Join Date: Apr 2004
  • Posts: 72
    • Show all replies
I want an asm-float-routine
« on: June 05, 2004, 03:32:09 PM »
Thats right, I have rewritten my amos-vector routine in assembler, and tried things like storing the 3d coordinates (x,y,z) shifted - say - 8 positions left, I then multiply these multiplied coordinates with sinus values (shifted 14 bytes to left), then before storing the coords again I shift them 14 positions to the right and store them, then in the 2d_projecting routine I divide these (still left-shifted 8 postions) with - say - projected_x = dist*x/(dist+z), (converted to assembler code offcourse) and store them in 2d coordinate tables, and finally before I send these to my drawPixel routine I left-shift them 8 positions and add the relevant x/y offsets (150 & 120).

Now just like I thought every 2d AND 3d coords become 0. so does anyone have any float-routine in some sort ?, I dont really have the time/energy to think of one such, would be REALLY boring to see the code I've written to go to HELL !  :-D
 

Offline GreatLorTopic starter

  • Jr. Member
  • **
  • Join Date: Apr 2004
  • Posts: 72
    • Show all replies
Re: I want an asm-float-routine
« Reply #1 on: June 07, 2004, 04:10:32 PM »
Hi folks !  :-) , while reading your posts (not finished reading) I wanted to say that the error was due to the fact that I called my sinus function and the returned values I placed in memory locations labeled 'sin' and 'cos', and every time I wanted to multiply these with the 3d coordinated I DIRECTLY did "muls cos,d0", yes, you see the wrong in this, man it took HOURS to find the bug, anyway with some modifications to the code it runs nice now except for one thing, the 2d projecting routine which obviously doesnt working properly (the coordinates arent perspectivized at all), so I'll be busy some more hours with that.

oh and no, I'm not using matrices of any kind, I havent found any page/literature that learns this out step by step for ppl that havent EVER worked with matrices, the stupid pages (the authors that is) seem to think that someone like me is used to them (matrices), they forget that you read their texts to learn something you dont know yet, anyway if someone knows of any page who describes matrices with some kind of a philosopic point of view please link me there.


*EDIT*

Really appreciate your explenations Sidewinder.

Hattig, you dont happen to have time to write a tutorial about matrices ?
 

Offline GreatLorTopic starter

  • Jr. Member
  • **
  • Join Date: Apr 2004
  • Posts: 72
    • Show all replies
Re: I want an asm-float-routine
« Reply #2 on: June 09, 2004, 04:20:29 PM »
Thanks for your extensive explenation Sidewinder, however its RELLY hard to grasp the point of the system (the matrix that is), maybe I'll have easier understanding when I need a more sophisticated way to say, rotate the object not just around the local and absolute axii, but also around a arbitrary axis, whose algorithms I vill do soon.
So basically my brain finds mathemtical problems that are unpractical to my experiments distgusting ( :-( ), I dont know I've been like this as long as I can remember, only when I need to solve that problem in order to get something actually practical out of it, only then my interest awakes.

(damn I hate the word matrix more then ever now  :pissed: ...........  :-P )
 

Offline GreatLorTopic starter

  • Jr. Member
  • **
  • Join Date: Apr 2004
  • Posts: 72
    • Show all replies
Re: I want an asm-float-routine
« Reply #3 on: June 10, 2004, 01:51:07 PM »
I dont mean that I dont get ANYTHING with matrices, what I mean is that I absoulutely NEED to know not HOW, but WHY forexample matrix products work (4 x 4 system in particular), you see I need the proofes (is it called axioms in math ?), I'm that sort of dude that REFUSE to do any form of calculation that I dont get, so what I want is an extensive (or short for that matter) text/article or whatever, that lightens up all forms of matrix-calculations (for my needs - 3d programing) as easy, obvious and clear as 3d-rotations are to me now, anyone who can guide/lead me into the "right" source of tutorial/text rocks !!!  :-)
 

Offline GreatLorTopic starter

  • Jr. Member
  • **
  • Join Date: Apr 2004
  • Posts: 72
    • Show all replies
Re: I want an asm-float-routine
« Reply #4 on: June 11, 2004, 03:29:14 PM »
Thanx Sidewinder, I'll try to get a copy of that book !