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 - Runer112
Pages: 1 ... 57 58 [59] 60 61 ... 153
871
« on: February 20, 2012, 10:42:30 pm »
I found an error in the way the token hook is handled. When you copy the text string to ram, I noticed that you don't actually configure the first byte of the string. Since most of the tokens end up being somewhere in the 01xx range, the first byte of the ram string is 1.
But here's the problem. On closer analysis of how this hook works, that first byte actually means something. The format looks like this:
[Key code][length of string][string]
Where key code is the actual key you press to signal the token. As you can see, the key codes you are returning are incorrect and then that leads to all sorts of problems. (01 translates to right, when you use axe tokens in a Recall queue, the calculator hangs because tokens aren't actually being inserted)
So the simple fix is just to put the proper key codes in. The quickest way to get the proper key code is to simply put the token in DE and call _GetKeyPress, that will return the proper key in A.
Edit: If you are going to call _GetKeyPress from within your hook, make sure you temporarily disable the hook. Otherwise you're going to have fun with recursion.
Can you elaborate on this problem? I haven't noticed any problems with the hook in my testing of it. And I can't seem to cause any problems by recalling strings that contain Axe tokens or by entering Axe tokens into the recall prompt.
872
« on: February 19, 2012, 05:10:11 pm »
Sorry if this is difficult to follow, I didn't really know how to structure the diagram (if you want to call it a diagram). If you have any questions, just ask. Otherwise, I hope this helps!
SENDER RECEIVER ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ Pull ring low
Repeat up to [ARG 2]*8μs If ring is not low, abort | If tip is low, break from loop Pull tip low If tip is not low, abort
Release tip Received byte = 0
LOOP 8 TIMES LOOP 8 TIMES | Release ring, pull tip low | | Wait ~21μs | Wait until tip == ring | Rotate byte to send left | | If 0 rotated out, pull ring low | | If 1 rotated out, release tip | | Wait ~12μs | If tip is low, rotate 0 left into byte | | If tip is high, rotate 1 left into byte
Release tip and ring
873
« on: February 18, 2012, 11:07:00 am »
Without displaying numbers, an optimized z80 assembly loop structure could count to 10000 in about 1/30th of a second. Although I would not recommend comparing processor/language speed by seeing how fast they can count to 10000, simply because there are multiple variables that will skew the results an extreme amount; display or not, scroll or not, how fast the system text routine is, how the screen is updated, and so on. If you have a project in mind, I would say the best way to compare speed is simply to start coding the project for both platforms and compare simplified, test versions of them.
874
« on: February 17, 2012, 11:22:49 am »
For menus, I think you would be better off using getKey or even getKeyr to detect keypresses. With these commands, keys except the arrow keys (and DEL I believe, but that's not really important) would only register once per physical keypress, and the arrow keys will repeat like how they do in OS contexts.
Although if you want to go with the getKey() method, I would go along the guideline that Pause 1800 approximately equals one second at 6MHz and Pause 4500 approximately equals one second at 15MHz. Alternatively, after handling a keypress, wait for all keys to be released before waiting for the next keypress:
While 1 .WAIT FOR KEYS TO BE RELEASED End!If getKey(0) While 1 .WAIT FOR A KEYPRESS EndIf getKey(0)
875
« on: February 15, 2012, 04:22:35 pm »
Hmm, so the folks that have received theirs, do you receive an email after you made your selection?
I've sort of been wondering this too... I submitted my assessments on Thursday of last week and received an email congratulating me and asking me which prize I wanted. On Thursday at around 10pm EST, I responded that I would like a Prizm. It is now about 6 days later, no response and no Prizm.
876
« on: February 13, 2012, 08:12:42 pm »
The ti83plus.inc file that you're using has only defined bcall(), not b_call(). You should probably edit your include file to have the second notation as well. So find this line:
#define bcall(xxxx) rst 28h \ .dw xxxx
And make a copy of it that includes the underscore. You should probably also make a copy of the bjump() macro with an underscore.
877
« on: February 13, 2012, 08:02:03 pm »
I think just returning the offset would work well. And for programs that do want traditional error scrolling, perhaps you could add an API entry point for scrolling to the error? The program or application could clean itself up after the compile error and then give control back to Axe to handle the rest.
878
« on: February 12, 2012, 09:54:32 pm »
Oh no, A-Z and 0-9 are fine. That's why I didn't discover the bug myself. The issue is a-z.
EDIT: Forgot to answer your first question. Tokens after GarbageCollect are passed in a special manner. But I've added code to handle this and will give you my updated token hook once I fix the above problem as well.
879
« on: February 12, 2012, 07:15:34 pm »
As a temporary fix, I would suggest putting a +1 before the variable in the final argument, like this: Copy(SizeX*SizeY→P-1+L1→N,N+SizeX,+1P)rI know it looks strange, but the issue is a faulty optimization that relies on the final argument being just a variable, so putting in that +1 avoids the optimization with minimal size cost (1 byte). And yes, that is valid syntax. Axe has very loose syntax rules.
880
« on: February 12, 2012, 06:47:14 pm »
o_PushPop9 and o_PushPop11 are not working correctly. The ld bc,($0000) in both of them isn't being replaced, resulting in code such as this not functioning properly. Also, why is o_PushPop5 commented out?
881
« on: February 12, 2012, 02:28:47 pm »
The easiest solution is to test your program in Wabbitemu without the skin enabled. You should then see Wabbitemu's built-in FPS feature on the bottom of the window, which should be accurate for any Axe program. (It may not be accurate for assembly programs with custom screen updating methods, but you don't need to worry about that)
However, if you need an actual FPS counter built into your program, I would suggest using interrupts in your program and using them to keep track of and display an approximate FPS.
882
« on: February 12, 2012, 12:12:21 pm »
Yeah, that's because it's a "new" token and is sent to the token hook in a special manner that Axe doesn't handle. I didn't add handling for it because I wasn't entirely sure how to account for it without introducing other problems on calculators with older OSes, but I think I've found a way to fix it now.
Also, I'll try to fix the issue where I stupidly forgot to account for the possibility that the Axiom name in the source code contains tokens that aren't equivalent to their ASCII values.
883
« on: February 11, 2012, 11:03:21 pm »
Here's a bug that's my fault. The tokenhook.inc file that I suggested you include in the Axe download must've been some strange unfinished version that I accidentally uploaded, because it doesn't even assemble correctly without errors. I have re-uploaded a correct version: http://www.ticalc.org/archives/files/fileinfo/445/44517.html.
884
« on: February 09, 2012, 01:57:50 am »
I've just about finished everything, but I'm stuck on two questions. First, assessment 3, question 2. I must be doing something wrong, because my graph looks strange and has no points of interest as far as I can tell: The second question I'm hung up on is question 4. I've managed to display the area and the circumference of the circle (not together, but I don't think you're supposed to). However, I cannot see how to display diameter. Am I missing something here too? Or do I just have to enter it manually? EDIT: Managed to find solutions for both problems on my own. I still don't think I did the circle diameter part right, but nobody was really offering to help so I just went ahead with manually typing it into a text box.
885
« on: February 07, 2012, 04:17:42 pm »
Draw0 isn't a routine you should be calling, I just have that label there as an optimized way to combine the routines that redraw the left and right edges. DrawC was my old method for redrawing the left and right edges that I got rid of because it was less optimized than DrawR and DrawL. I guess I forgot to remove the references to it.
Regarding shifting more than one pixel per frame: is this really necessary? It shifts very quickly already, I think it's something like 72 vertical pixels per second and 55 horizontal pixels per second with only one pixel shifted per DispGraph. But if you really wanted to shift more than one pixel per frame, you may as well just perform the 1-pixel shift in a loop, because there isn't a method for shifting multiple pixels at once that's much more optimized.
I could make it work with a map larger than 256*256, I think you'd only have to tweak a few numbers. But do you really want an image larger than 256*256? A 256*256 image is already 8KB, if you go larger than that you may not even be able to fit the images in RAM.
Pages: 1 ... 57 58 [59] 60 61 ... 153
|