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 - Quigibo
Pages: 1 ... 41 42 [43] 44 45 ... 135
631
« on: December 25, 2010, 06:20:39 am »
Thanks Runer! Its actually kind of freaky how nearly identical it was to my modifications But I didn't catch that one with the daa since I'm still not entirely sure how that instruction works. I should be on schedule for an update tomorrow night.
632
« on: December 25, 2010, 03:29:59 am »
Runner, the one I made is much smaller than the one from WikiTI:
p_DispHex: ld b,4 __DispHexLoop: xor a add hl,hl rla add hl,hl rla add hl,hl rla add hl,hl rla add a,$90 daa adc a,$40 daa B_CALL(_PutC) djnz __DispHexLoop ret It would be about 8 bytes larger to save it to a buffer. The syntax wouldn't really work well though because axe would throw a fit if you tried to do Disp A►Hex->B for instance since the display routine looks for commas. You would have to do some hackish code by putting the store on the line after it or using the address of the buffer directly. But I guess if this is a conversion command rather than a display command this could be allowed... and then I would only need one routine for both display and text. That might actually work. I will have to see if I can make that more consistent with the other display format commands because that does sound convenient.
Builderboy. I really want to but I'm afraid it will break too much compatibility with current Axe programs. For instance:
:A+1->A :If A=10 :->A :End
This code increments A and if it goes above 10 rests it back to 1. Here you are using the fact that the result of the if expression is a one if it ends up going inside the block. It would be impossible for me to tell if the next expression is going to use the result of the if expression or not.
NINJA'D!
633
« on: December 25, 2010, 12:10:25 am »
Runner, that would make the routines a lot larger and I don't think it would be as used often enough to justify the extra size.
I optimized the 3 level grayscale routine more. Its 5 bytes smaller and the inner loop is 20 T-states faster. The inner loop iterates 768 times per frame at 6MHz which results in the overall routine being 2.5 milliseconds faster per frame. That's about a 4% speedup for a game running at 15fps. The grayscale is smoother too.
The only thing I'm worried about is that there's only 57 T-states between LCD driver commands at one point (which is not including the 11 T-states of the "out" instruction). The z80 in 28 days tutorial recommends 60, but the routine works on my 84+ which has the bad LCD. Anyone willing to test this on hardware? I attached an example that uses the routine.
634
« on: December 24, 2010, 04:10:09 pm »
Not really, I'm already using 6*2 = 12 for the r1-r6 variables, 10*3 = 30 for the Y0-Y9 files, 2 for the random seed, and 8 for the sprite buffer. That totals 52 bytes so I really only have 12 bytes left Edit: Also, I added >Hex finally
635
« on: December 24, 2010, 04:54:25 am »
That's exactly the intention. In fact, you don't need them to be in any of the L1-L6 buffers at all if you're compiling for a shell/noshell. You can store them directly in your program: :Zeros(54)->Str1V :#Realloc(Str1V)
636
« on: December 24, 2010, 04:34:57 am »
As much as I would like to do OOP, there just simply aren't enough resources on the calculator to handle all the overhead that would take in the parser. I finally moved the default location of the variables to the end of L1 instead of the beginning and I'm in the process of writing the #Realloc() routine to move them anywhere else. I decided to make all the compiler instructions have the '#' prefix so they don't get confused with actual commands. So far, the only other token that has changed is "#Axiom()" but "#Icon()" will be coming soon and I'm pretty sure you can guess what that does Another thing I noticed that I can't believe I didn't see before was to move the random seed away from the variables and into the hidden buffer (the one I'm using for r1-r6, files and other smaller things). This expands the usable memory in L1 by 2 extra bytes! It was actually kind of a necessity rather than a choice though because the Rand routine uses a fixed location to get the seed. If the variables included the seed and then got reallocated, the Rand routine would no longer be looking at the correct location so you could get glitches if you tried to use all of L1 for something. So it was a win-win to move it.
637
« on: December 23, 2010, 07:43:04 pm »
Yeah, TI is lazy so they don't want to write the extra code to do clipping so it will just start to glitch and ram clear if you go off screen instead. The only way around it other than writing your own routine is to clip it yourself by adjusting the size bytes and the picture in ram. That would allow you to clip up, down, and right. Clipping on the left side would be very tricky though, I'm not sure there's an easy way to do that.
EDIT: Actually, thinking about it again, that wouldn't work for right or left. But at least up and down are easy to clip.
638
« on: December 23, 2010, 07:35:35 pm »
Yeah, that's supposed to happen. Its TI's routine not mine, they don't do clipping like mine do.
639
« on: December 23, 2010, 04:22:27 pm »
New feature added:
DispGraphClrDraw
When used on the same line without a colon or newline in-between, it will function exactly as if you had done DispGraph:ClrDraw but it does them both simultaneously so its just as fast as if you had used the DispGraph by itself. Its great to squeeze more frame rate out of games where you have to clear the screen after drawing each frame like for instance; ray-casters. But I'm sure this can be used in may games. Keep in mind this does add an extra routine to your code so I would still use the regular DispGraph unless you can use the new command exclusively or if you really need more speed.
640
« on: December 23, 2010, 03:38:43 pm »
The statistics would be different if you assume that A and B are non-Boolean. In that case you have extra clock cycles for the not equals zero operations which might actually make it always faster to do the 2 separate statements regardless of probability. But then again, realistically in programs, there is likely to be a mix of operations so I would include in that calculation.
If A__op__ If B__op__ Do stuff End End
If A__op__ and (B__op__) Do stuff End In this case, assuming the previous numbers were correct, there is a difference of * A is false: 34 t-states + ops * A is true: 68 t-states + ops
Against: * Always: 87 t-states + ops
So you should always short circuit if you're looking for a speed optimization (assuming non-Boolean), but the second is smaller I think.
641
« on: December 23, 2010, 02:09:03 am »
I did look at his F-Zero engine, but it used a lot of unrolled loops, self-modifying code, and look-up tables. I prefer something simpler, smaller, and app compatible so I'm making my own routine based off of JimE's. I'm going through it and making a lot of optimizations so that its nearly as fast as Calc84maniac's.
642
« on: December 23, 2010, 01:07:29 am »
Recursive subroutines are great and often reduce the size of the program a lot. The drawback is that they are generally a little slower and there is a limit to how many nested subroutines and pushed variables you can have before you get a stack overflow which crashes the calc.
643
« on: December 22, 2010, 10:56:09 pm »
Maybe, but I would need a new token to change.
644
« on: December 22, 2010, 10:19:22 pm »
I'm rewriting the line drawing routine. So far, its about the same size as the original, except its at least twice as fast and can be drawn to ANY buffer.
645
« on: December 22, 2010, 09:45:05 pm »
It will be final as far as features go, the only updates after that will be bug fixes and optimizations. At that point, I am hoping the Axiom system will be enough to expand the capabilities of the parser without me needing to code anymore of it. I've got a mode7 Axiom coming along as well to show off the expandability.
Pages: 1 ... 41 42 [43] 44 45 ... 135
|