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

Pages: 1 ... 55 56 [57] 58 59 ... 135
841
Axe / Re: The most efficient way to store and recall lots of text
« on: September 15, 2010, 09:20:48 pm »
If you mean memory efficient, you might want to try some kind of compression by using a reduced character set.  26 uppercase, 26 lowercase, 10 numbers, a space, and a 'special character' is 64 possibilities (6 bits) which means you can store 4 characters in only 3 bytes.  'special character' (which is the binary combination 000000) would look at the next character which could be one of 64 special characters like a period, exclamation mark, parenthesis, question mark, apostrophe, and most importantly the end-of-line character.  That makes all your text data about 20% smaller.

Another strategy is to chose 255 of the most used words and have a list of these "common words" to form a sentence with the unused combination representing that you will spell out the word instead.  That can lead to reduction of over 50% for large text files.

Either way, you'll have to make a decoder/encoder to actually use them in your programs.

842
The Axe Parser Project / Re: How quick is Axe?
« on: September 14, 2010, 08:26:12 pm »
That includes aligning and clipping in every direction which sometimes is not used in regular assembly when you don't need those and I have a feeling a lot of that time actually went into the for loop I was using since it took almost a second even with nothing in the loop.

843
The Axe Parser Project / Re: Axe Parser
« on: September 14, 2010, 07:48:53 pm »
The thread you choose is up to you.  I would only report Axe bugs in the bug reports section though, not bugs in your code.

You can check with getCalc("prgmA") first.  If it works, its in RAM.  If it fails, you can next try to read it to a file getCalc("prgmA",Y1) if that works, then its in ROM.  If it fails, it doesn't exist.

So like this:
If getCalc("prgmA")->A
  .RAM
Else
  If getCalc("prgmA",Y1)
    .ROM
  Else
    .NO
  End
End

844
The Axe Parser Project / Re: How quick is Axe?
« on: September 14, 2010, 07:20:57 pm »
It depends on what you're trying to do.  Somethings take almost the same amount of time like "Disp", "Output", and "ClrDraw" for instance because they are basically the same routines.  The only speed increase there is the absence of the interpreter.

Other things like storing to variables, math, and reading from lists are hundreds of times faster than BASIC becasue you are dealing with 16-bit integers instead of 72-bit floats.  Native assembly is even faster still because you can use registers for temporary storage and decide when you need the faster 8-bit operations instead of the 16-bit ones, but the difference is only 1.5 to 2 times the speed generally.

The rest of the commands like sprite drawing, grayscale, copying data, etc. are pretty much the exact same speed as regular assembly because its literally replacing those with the same routines you would use if you were programming in regular assembly except I've spent the time to optimize them to be as fast as possible.

I can't really compare Axe to BASIC much more than the math commands becasue things like sprite drawing don't exist in BASIC.  Pixel drawing is the same speed in BASIC and in Axe if you're updating the screen after every pixel.  But if you draw all the pixels first and then update the screen when you're done, you can fill the entire screen in about half a second since updating the LCD is so slow.  The best way to see "how fast it is" is to just try running some programs like "How long does it take to draw 10,000 sprites?"  (about 3 seconds)  "How long does it take to do 10,000 multiplications?" (about 2 seconds) etc.

845
The Axe Parser Project / Re: Compile Off-Calc
« on: September 14, 2010, 06:53:30 pm »
I think there is a way to export a .sav file from wabbitemu and then maybe you can steal a portion from that with a hex editor.

846
News / Re: Axe Contest ending soon!
« on: September 14, 2010, 06:49:10 pm »
And just to add a clarification: While I do encourage open-source, if you want your source code to remain private for any reason, please indicate that in the submission email.  You still have to submit the source code to the judges to make sure there was no asm usage or other violations of the rules, but only the executable will be made public with your entry.

847
Axe / Re: Grayscale title screen editor
« on: September 13, 2010, 04:49:03 pm »
Yeah, the "input" command is essentially identical to BASIC's "Input" execept that it stores to a temporary variable instead of an OS one.  The i is Lower-case here because it can be used in-line since things like "1+input" are acceptable.  The buggyness that's been reported so far has to do with the fact that in BASIC there is an optional argument for a leading string to display before the actual inputing portion.  So far, that string has always been null for me but it has been reported that garbage strings occasionally show up meaning that I need to zero a piece of memory somewhere before calling it to keep it blank (you can use the regular Disp to print text before it).  Both [Enter] and [On] should end the input the same way.  There may or may not be an issue with APD.

848
The Axe Parser Project / Re: Features Wishlist
« on: September 13, 2010, 04:32:20 pm »
I will definitely have a new example program in the next version.  And it will be an entire game, not just a demo like the other ones.

Oh yeah, that WAVE support... I did try, but the quality was unacceptably low in 6MHz with any kind of compression.  It was something I wanted to add at one time, but after playing around with it, it doesn't seem practical.  Someone can always write an Axiom for it eventually but I don't think it will be supported natively.

849
The Axe Parser Project / Re: French Translation / Traduction Française
« on: September 13, 2010, 02:15:15 am »
There won't be much change to the documentation between now and the final version.  More stuff might be added, but the majority of the stuff already there won't see many changes so all you'd have to do is expand your current translation and not change the stuff you already wrote.  If for some reason I do need to change some part of it a little bit, I'll let you know ahead of time.

850
TI Z80 / Re: Metroid-like game
« on: September 13, 2010, 01:05:41 am »
The largest semantic obstacle when learning axe is Pointers.  If you've never programed in a language that uses pointers before, you might have a hard time getting used to it.  The Wikipedia article about them is good, but its pretty technical and most of the examples are with C syntax.  The second important thing to be aware of is the difference between signed and unsigned numbers,  operations, and what you can actually store in the built in variables which are 16-bit integers instead of floats.  Once you get past those 2 things, you'll start having a lot of fun because you get a lot of power, some times too much when it causes ram clears or freezes, so be sure to use it responsibly and archive/backup anything important.

You can start on a big project if you want, but you'll want to have every important function as a subroutine so that you can work on the project step by step.  For instance, first write a routine "Draw Tile" that draws a tile and run the program to test it out.  Then, try to make a new routine "Draw Map" which calls the tile drawing routine to draw your tiles according to an array.  Then "Scroll Map" which scrolls the tile map, etc.  So as long as you keep working on smaller sections of code at a time, you might be able to manage a somewhat large project at the same time as you learn the language.  Good luck on your project!

851
Axe / Re: Save screen on a variable pic calculator
« on: September 12, 2010, 01:57:08 pm »
If you have a variable S which is the S-th pic, you can save pictures like this instead:

Code: [Select]
"Pic1"->Str1   .Only need one string name
S->{Str1+2}    .Changes to Pic2, Pic3, etc.
GetCalc(Str1)  .Use the string

852
The Axe Parser Project / Re: Features Wishlist
« on: September 11, 2010, 07:29:25 pm »
Probability of having a 2nd page of data is about 80% right now.  It's more difficult to find some allocated space for 2 pages and I also have several ideas of how I could implement it that I need to decide on.  Its also on the dangerous side, so I need to make sure I do a lot of debugging before I actually release it.  I think with all the things I still want to add, there might actually be more versions before 1.0 or several versions after 1.0 for followup.

853
TI Z80 / Re: Axe Minesweeper
« on: September 11, 2010, 06:21:08 pm »
The App compiling used to be buggy in a very small number of calculators with the older version, but with the current versions (0.4.x), it's been working perfectly so far, I haven't heard of anyone having problems with them.  It just takes a little longer to compile.  I would backup your stuff anyway though.

854
The Axe Parser Project / Re: Bug Reports
« on: September 09, 2010, 02:42:01 pm »
Yeah I should turn ADP off, I completely forgot about that.  As for that app error, that's really strange because that error code doesn't exist.  If you can replicate it, can you email me the source or upload it if its not for the contest?  Thanks.

855
Axe / Re: Animating an 8x8 sprite with facing
« on: September 09, 2010, 02:33:59 pm »
If you have like 100 sprites doing this it will definitely slow down, but with a single sprite, there will be no slowdown.  If you want a super speed optimized method instead of a convenient one, you need a 16 sprite array.  4 for each direction and 4 frames per animation.  Then, you can just look up the correct sprite with Pt-On(X,Y,D*4+(T^4)+Pic1) where D is direction (0,1,2, or 3) and T is the "step timer".  Usually, you can just replace T with X+Y or something similar, it depends on the speed of animation and other factors you might want.  The downside of this though is that even though the total amount of size in the executable will be around the same, its a hassle to have to draw 16 individual sprites for each character.

Pages: 1 ... 55 56 [57] 58 59 ... 135