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 - TheMachine02

Pages: 1 [2] 3 4 ... 32
16
TI Z80 / Re: Glib : a 3D graphics axe library
« on: October 01, 2014, 03:51:48 pm »
actually, with all the optimizations I done, it is even faster tahn the "normal" texture routine .... and it still pure axe  :P

17
TI Z80 / Re: Glib : a 3D graphics axe library
« on: September 26, 2014, 11:10:28 am »
well if gif is broken, you can see it there : http://i.imgur.com/HxskaVA.gif
Strange that the gif appears odly, since it look fine on my computer.

Actually I don't think per pixel light calculation are possible on a calculator, sooo it is indeed high res texture with dithered pattern (I even added magnification, but it run so slowwwwww)
- Does it start with an A? I think I know what it is :P

shhhhhh it is a secret  :P

also, billboard are planned, even if I don't think I will ever succed to code them ><


EDIT : attached the gif
 

18
TI Z80 / Re: Glib : a 3D graphics axe library
« on: September 26, 2014, 09:29:21 am »
Sooooooo it is quite a long time that I've haven't post anything,but don't worry I am not leaving calc community  :P ; it is just that I've been really busy this last few week (and it will be all the year like this  x.x )

However, I still work on this project as you might see on the next screen :  >:D



yay !
something big is also coming, but I won't tell you more  :P

19
Axe / Re: Axe Little contest !
« on: July 10, 2014, 06:28:04 am »
Actually, I think that the speed and the size come from the algorithm I use, cause I am no very good for size optimizing  :P
I tried more optimization yesterday, but none of them work, so yeah, I think I am stuck at 248 bytes...

20
The Axe Parser Project / Re: Bug Reports
« on: July 10, 2014, 04:43:10 am »
It seems that doing a Z-adress shift (ZInterval) immediatly followed by a Dispgraph command screw up the screen on some slow driver calc. I know there isn't really any fix possible in assembly code (apart putting more delay, but that is bad  :P ) , and the code flow fix is easy : do not put this two command together and do some stuff between them, but I think it is good to know.
I track down this bug for almost two hour ><

21
Axe / Re: Axe Little contest !
« on: July 08, 2014, 08:42:42 am »
Soooooo... I finally found other morar optimization.
I am at the ridiculous size of 253 bytes and without unclean code  :P

Screen :



I have no doubt that Runer will beat this though ><

EDIT : I am now at 248 bytes :p

22
Axe / Re: Axe Little contest !
« on: July 08, 2014, 03:36:11 am »
So I optimized the whole thing further and I am at 262 bytes. It is like so fast that to test the correctness of the display I have to pause it  O.O

However, I don't think I go any further this time, I mean the Dispgraph command is almsot 30% of is weight ><

23
Axe / Re: Axe Little contest !
« on: July 07, 2014, 07:21:22 am »
I am at 344 bytes with my try, without having it really optimized  :P
I named the program TE and compiled in noshell.
No screen, cause it is always the same >< (and I am lazy)


EDIT : I am at 287 bytes if I made no mistake ><

EDIT2 : got it down to a 278 bytes crazy fast program. I hope there is no hidden bug like last time  ;D

24
Axe / Re: Axe Q&A
« on: July 02, 2014, 11:36:23 am »
Does any axe command make use of the asm_flag at iy+33 ? I was wondering that, cause I want to use a flag field in an axiom, and it is the simpler way to do so.

EDIT : Streetwalrus answered to my question  :D

EDIT by Runer112: To clarify, the answer was no.

25
TI Z80 / Re: Another 2048
« on: June 19, 2014, 01:05:48 pm »
wish granted :p


EDIT : it is pretty good btw, but for an obscure reason, wabbit emulating in ti83+ would crash when I try the game >_>

26
ASM / Re: Multiplication using LUT
« on: June 12, 2014, 10:07:55 am »
Only for a = -64, but otherwise, result given are wrong.

(exemple, de=1, a=-1, result = 65471)

EDIT : result are correct if it's DE which is negative, (DE=-1, A=1 , return 65535).

27
ASM / Re: Multiplication using LUT
« on: June 12, 2014, 10:04:25 am »
no change, it still give 32767 as result  <_<

28
ASM / Re: Multiplication using LUT
« on: June 12, 2014, 02:54:01 am »
So ... it does seems to work for DE>=0 and A>=0 , but always return 32767 if one of these are negative. So there definitly a problem with negative handleling.
btw thanks for your help  :P

29
ASM / Re: Multiplication using LUT
« on: June 11, 2014, 09:09:12 am »
Well, A is always in [-64,64], with no particular value (altought an optimization for a=-64, a=0 , a=64 should be great, since it's remarquable cos/sin value).
DE is most likely in [-128,128], but something extend to [-256,256], and something (much rarer) in [-512,512]

30
ASM / Multiplication using LUT
« on: June 11, 2014, 05:41:21 am »
So ... I trying to get the maximum speed of the multiplication, since for each vertex (3d), 8 multiplications is performed (yeah, 64 multiplication for one cube).

I currently have a unrolled multiplication (from Xeda), sightly modified :
Code: [Select]
    ld hl,0
    or a
    ret z
    rlca
    jr nc,$+6
    or    a
    sbc    hl, de
    add    hl, hl
   
    rla \ jr    c, _7Set
    rla \ jr    c, _6Set
    rla \ jr    c, _5Set
    rla \ jr    c, _4Set
    rla \ jr    c, _3Set
    rla \ jr    c, _2Set
    rla \ jr    c, _1Set
   
    ret

_7Set:
    add    hl, de
   
    add    hl, hl
    rla
    jr    nc, $+3
_6Set:
    add    hl, de
    add    hl, hl
    rla
    jr    nc, $+3
_5Set:
    add    hl, de
    add    hl, hl
    rla
    jr    nc, $+3
_4Set:
    add    hl, de
    add    hl, hl
    rla
    jr    nc, $+3
_3Set:
    add    hl, de
    add    hl, hl
    rla
    jr    nc, $+3
_2Set:
    add    hl, de

    add    hl, hl
    rla
    ret    nc
_1Set:
    add    hl, de
    ret

I was wondering if using LUT would not be faster. Of course LUT must fit the calculator memory :p

I know two method :
antilog/log
the x²/4 method.

The problem is I need a 9bit*8bit signed, (DE*A), with
A between [-64,64] and DE between [-512,512] (result in HL)
I try to extend this routine , but I haven't succed :

Code: [Select]
MulAE:
    ;A in [-64,64] , E in [-64,64]
    ; MULTABLE is a 512 bytes aligned area (starting at $xx00)
    ; CMULTABLE is copied there during init.
    ;f(A+E)-f(A-E)
   
    sub    e
    ld    h, MULTABLE/256
    ld    l, a
    add    a, e
    add    a, e
    ld    e, (hl)
    inc    h
    ld    d, (hl)
    ld    l, a
    ld    a, (hl)
    dec    h
    ld    l, (hl)
    ld    h, a
    sbc    hl, de
    ret   

CMULTABLE:
.DB 0, 0, 1, 2, 4, 6, 9, 12, 16, 20
.DB 25, 30, 36, 42, 49, 56, 64, 72, 81, 90
.DB 100, 110, 121, 132, 144, 156, 169, 182, 196, 210
.DB 225, 240, 0, 16, 33, 50, 68, 86, 105, 124
.DB 144, 164, 185, 206, 228, 250, 17, 40, 64, 88
.DB 113, 138, 164, 190, 217, 244, 16, 44, 73, 102
.DB 132, 162, 193, 224, 0, 32, 65, 98, 132, 166
.DB 201, 236, 16, 52, 89, 126, 164, 202, 241, 24
.DB 64, 104, 145, 186, 228, 14, 57, 100, 144, 188
.DB 233, 22, 68, 114, 161, 208, 0, 48, 97, 146
.DB 196, 246, 41, 92, 144, 196, 249, 46, 100, 154
.DB 209, 8, 64, 120, 177, 234, 36, 94, 153, 212
.DB 16, 76, 137, 198, 4, 66, 129, 192

.DB 0, 192, 129, 66, 4, 198, 137, 76, 16, 212
.DB 153, 94, 36, 234, 177, 120, 64, 8, 209, 154
.DB 100, 46, 249, 196, 144, 92, 41, 246, 196, 146
.DB 97, 48, 0, 208, 161, 114, 68, 22, 233, 188
.DB 144, 100, 57, 14, 228, 186, 145, 104, 64, 24
.DB 241, 202, 164, 126, 89, 52, 16, 236, 201, 166
.DB 132, 98, 65, 32, 0, 224, 193, 162, 132, 102
.DB 73, 44, 16, 244, 217, 190, 164, 138, 113, 88
.DB 64, 40, 17, 250, 228, 206, 185, 164, 144, 124
.DB 105, 86, 68, 50, 33, 16, 0, 240, 225, 210
.DB 196, 182, 169, 156, 144, 132, 121, 110, 100, 90
.DB 81, 72, 64, 56, 49, 42, 36, 30, 25, 20
.DB 16, 12, 9, 6, 4, 2, 1, 0

.DB 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
.DB 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
.DB 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
.DB 0, 0, 1, 1, 1, 1, 1, 1, 1, 1
.DB 1, 1, 1, 1, 1, 1, 2, 2, 2, 2
.DB 2, 2, 2, 2, 2, 2, 3, 3, 3, 3
.DB 3, 3, 3, 3, 4, 4, 4, 4, 4, 4
.DB 4, 4, 5, 5, 5, 5, 5, 5, 5, 6
.DB 6, 6, 6, 6, 6, 7, 7, 7, 7, 7
.DB 7, 8, 8, 8, 8, 8, 9, 9, 9, 9
.DB 9, 9, 10, 10, 10, 10, 10, 11, 11, 11
.DB 11, 12, 12, 12, 12, 12, 13, 13, 13, 13
.DB 14, 14, 14, 14, 15, 15, 15, 15

.DB 16, 15, 15, 15, 15, 14, 14, 14, 14, 13
.DB 13, 13, 13, 12, 12, 12, 12, 12, 11, 11
.DB 11, 11, 10, 10, 10, 10, 10, 9, 9, 9
.DB 9, 9, 9, 8, 8, 8, 8, 8, 7, 7
.DB 7, 7, 7, 7, 6, 6, 6, 6, 6, 6
.DB 5, 5, 5, 5, 5, 5, 5, 4, 4, 4
.DB 4, 4, 4, 4, 4, 3, 3, 3, 3, 3
.DB 3, 3, 3, 2, 2, 2, 2, 2, 2, 2
.DB 2, 2, 2, 1, 1, 1, 1, 1, 1, 1
.DB 1, 1, 1, 1, 1, 1, 1, 0, 0, 0
.DB 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
.DB 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
.DB 0, 0, 0, 0, 0, 0, 0, 0
So if someone can help me ....

Pages: 1 [2] 3 4 ... 32