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

Pages: 1 ... 66 67 [68] 69 70 ... 161
1006
[FR] Programmation Axe Parser / Re: [Axe] Tableau dynamique
« on: October 25, 2010, 12:31:57 pm »
{I}*{I-1}+A→A
You still have the unfixed code in your file. Could you fix it to {I}*{I+1}+A→A and try again? :)
Edit: Just tried it; it still says "2"... I'll keep looking.
Edit 2: There was a problem with my code. L*2+(GDB2→I)→E should be L-1*2+(GDB2→I)→E. Trying that now.

1007
KnightOS / Re: KnightOS
« on: October 25, 2010, 12:27:38 pm »
No more double error all the way? :P
Looks great. Can't wait for more! :)

1008
[FR] Programmation Axe Parser / Re: [Axe] Tableau dynamique
« on: October 25, 2010, 11:43:39 am »
Is L set to 1?
If so, that should work...

1009
[FR] Programmation Axe Parser / Re: [Axe] Tableau dynamique
« on: October 25, 2010, 11:23:19 am »
Code: [Select]
[b]Edit:[/b] Annoying code tag bug. Try to ignore x.x
Okay :)
So, one line at a time:
[code]0->A
Initialize A, like we've been doing
Code: [Select]
L*2+(GDB2->I)->EYou can store to variable inside expressions. We need I to point to the beginning of the data containing the size, so it is stored.
Since the size data for each map is 2 bytes, we multiply L by 2, then add it to the beginning of the size data to get the end where we stop.
Code: [Select]
Repeat I=EJust repeat until we reach the end.
Code: [Select]
 {I}*{I+1}+A->AI points to the X-size of the current map, and I+1 points to the Y-size of it. (I had had I-1, but I fixed it.)
We multiply these to get the total size of the current map, and add it to A. The multiplication comes first because otherwise it would evaluate as (A+{I})*{I+1} and not A+({I}*{I+1})
Code: [Select]
 I+2->IAdd 2 to move on to the next set of data.
Code: [Select]
End/code]
Finish our loop
Copy(A+GDB1,L1,{E-1}*{E-2})[/code]
A is the correct offset, so we add it to GDB1 to get to the start of the map data.
Alternatively, we could have done GDB1->A at the beginning and just A on this line instead of A+GDB1.
L1 is the destination.
E is the end of the size data we've scanned. The data for the map you're loading is right before it. So {E-1} is the Y-size and {E-2} is the X-size. We multiply those to get the size of the map which we're copying.

1010
[FR] Programmation Axe Parser / Re: [Axe] Tableau dynamique
« on: October 25, 2010, 11:07:21 am »
Hm... that code is almost good. I think it would be better to use a While loop, though.
Also, there is no "order of operations" and your data for each map is now two bytes.
Code: [Select]
0->A
L*2+(GDB2->I)->E
.E is the end of the size data which we're scanning
Repeat I=E
  {I}*{I-1}+A->A
  .No order of operations, so we have to make the multiplication come first.
  I+2->I
  .Add 2
End
Copy(A+GDB1,L1,{E-1}*{E-2})
.I would work too instead of E

1011
The Axe Parser Project / Re: Features Wishlist
« on: October 25, 2010, 10:48:31 am »
Nice to know :)
However, just in case he'll decide to change where it is ;)

1012
[FR] Programmation Axe Parser / Re: [Axe] Tableau dynamique
« on: October 25, 2010, 10:46:04 am »
GDB2 wouldn't be the size of each map but rather the sum of the sizes of all the maps before it.
So instead of Data(56,42 ...)->GDB2 you would have Data(0,56,98 ...)->GDB2. 98 is 56+42, of course.
To map L indexed from 1 you would then use
Code: [Select]
Copy(GDB1+{L+GDB2-1},L1,{L+GDB2}-{L+GDB2-1})Note that you'd have to add to the end of GDB2 an extra entry that is the sum of the sizes of all the maps.
You could use your method too, but L should be L-1 in both places where it appears. It will also be somewhat slower ;)
Code: [Select]
0->A
For(I,1,L
  A+{I+GDB2-1}->A
End
Copy(A+GDB1,L1,{L+GDB2-1})
This is the fixed version of yours.

What do you mean by "How to access at the different case of L1. Like GDB?"
Edit: You can use TI-Graph Link, you just need to know to use conj( instead of Copy(, expr( instead of Exch(, and so on.

1013
The Axe Parser Project / Re: Features Wishlist
« on: October 25, 2010, 10:20:50 am »
AFAIK the Axe rand seed is two bytes somewhere in RAM. Maybe using °rand could get us that address? at which point you could use something like S->{°rand}r.

1014
tiDE / Re: tiDE
« on: October 25, 2010, 10:17:58 am »
AFAIK tiDE is will be a z80 assembly IDE. I'm not sure there are any computer-based Axe compilers yet. (Informal feature request)

1015
TI-BASIC / Re: Application booting just after turning on
« on: October 25, 2010, 10:08:07 am »
I know of two solutions. The first one is just to use TI's Start-Up Customization app.
The other option is to mess with OFFSCRPT by hand, as detailed in these URL's:

1016
[FR] Programmation Axe Parser / Re: [Axe] Tableau dynamique
« on: October 25, 2010, 09:56:54 am »
Okay. My suggestion was that, instead of, say, L1+5 you use M+5, where M is the pointer to the map created by the code I gave above.
To load the maps into L1, you can use Copy(. For example, to copy X bytes from GDB1 to L1, you can use Copy(GDB1,L1,X).
A more complete line of code was that which was given above:
Code: [Select]
Copy(L-1*56+GDB1,L1,56This code assumes you store 56-byte maps in the way I suggested in my previous post.

1017
ASM / Re: Direct Input + GetCSC = Fail?
« on: October 25, 2010, 09:45:40 am »
Nice to hear.
Glad to help. :)

1018
In some ways it is; both have their difficulties.
TI-BASIC is not processor-dependent, so it's easier there, but you have to implement all the math routines and a parser. Using xLib, Celtic III, or DCSB libs would be difficult.
ASM requires an emulator, but you don't necessarily need a ROM; for a lot of games you can probably get away with a few variable-related bcall and other common bcall clones and the standard shell routines.
Just my view on this. I might be wrong ;)

1019
The Axe Parser Project / Re: Bug Reports
« on: October 24, 2010, 11:13:26 am »
I've noticed that with Axe 0.4.5, sometimes compiling an archived program will throw Err:Bad Symbol. Unarchiving the program will fix the problem.
This seems like a problem with reading from the archive. I thought this was fixed early on, but I guess Axe is still being thrown off at times...
Maybe it's something silly like improperly reading a two-byte token across a page/sector boundary?

1020
[FR] Programmation Axe Parser / Re: [Axe] Tableau dynamique
« on: October 24, 2010, 11:06:53 am »
I don't speak French, but using Google Translate I can tell that you seem to be misunderstanding how "->GDB1" works.
(DJ or another French speaker, please translate my response.)
GDB1 etc. are not dynamic like in BASIC. Instead, when you use "->" with them, the data you store to them is placed in the compiled program. To use it like you would in BASIC, you have to use L1 or another place to store your data. However, this does bring up another problem; you still have to store the original data somewhere. You can use one GDB for each map, and you can add another digit to each. (You can use GDB10, GDB56, and so on, and maybe even another, like GDB623. However, I'm not sure about two extra digits.)
Another solution exists, though. If each set of data is the same size, rather than using GDB01 to access the first, GDB02 for the second, and so on, you can use GDB1 for the first, GDB1+56 for the second, GDB1+112 for the third, and so on, storing them like in the code box below. (assuming each set map is 56 bytes) (If you are using it with L like you were above, you could actually just use L-1*56+GDB1 to access the L'th set of data, indexed from 1.)
Code: [Select]
Data(...)->GDB1
.Data for map 1
Data(...)
.Data for map 2
Data(...)
.Data for map 3
.And so on
Thinking over it, I've realized that, if you're using maps, they are static and their content does not change. This means that you won't have to use L1 for that purpose. Rather, you can have a line like
Code: [Select]
L-1*56+GDB1->MM now contains the address of the map data, and you can index from there. If, however, you would rather use L1 (perhaps for convenience?) you would have to copy the data to L1 like so: (You can use any free RAM area, not just L1)
Code: [Select]
Copy(L-1*56+GDB1,L1,56Feel free to ask more if you are still confused; I doubt I've clarified everything.

Pages: 1 ... 66 67 [68] 69 70 ... 161