826
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. 827
Miscellaneous / Re: internet quotes« on: August 21, 2010, 11:50:06 pm »Possibly offensive - read with caution 828
[OTcalc] Z80-Hardware / Re: [OTZ80] [Poll] Have a SD card slot in the calc?« on: August 19, 2010, 03:53:32 pm »Hold on, I hate to be the one saying this, but it's a calculator. What real good would an SD card have for math? I don't even think that it would be that useful outside of math, either. It's an unnecessary expense for both us and the consumer. I agree completely 829
Site Feedback and Questions / Re: User-contributed calc games/dev tools downloads section« on: August 18, 2010, 10:43:00 pm »
i agree with ztrumpet. when sorting the files, maybe have both a function to sort by genre and also an option to sort by language? it may be helpful for someone who wants to learn basic/axe/asm and is looking for quality source code to learn from.
830
The Axe Parser Project / Re: Axe Parser« on: August 18, 2010, 12:19:26 pm »
minor question.
which is faster, pxl-Test(X,Y) or this: Code: [Select] .eulers 'e'
831
Axe / Re: hexadecimal conversion« on: August 18, 2010, 12:14:59 pm »That sounds exactly like my sprite editor. But thanks for reminding me about it, I should work on it a bit more. cause i like real-time hex display (: By the way, would a >Hex command be useful? I already have a >Dec, >Char, and >Tok so in a similar way I can add a >Hex. There is even a really cool optimization for it that uses the daa instruction which is something I've never used but always wanted to. yesssss. do it. qwerty: here's a very commented version of the code. Code: [Select] GetCalc("Str1",16)->I alright. a little spiel about hex, binary and hex characters: 0111. this is a binary string. each value is either 1 or 0. to get the value in decimal, you start at the very rightmost bit (a bit is a 1 or a 0). the rightmost bit is 1. add 1 to your running total. then go left, to the next bit. the bit is also 1. however, binary and the powers of two are very related. this bit is worth 2. add two to the running total, you get 3. the next bit is also a one. this bit is worth 4. add it to your total, and you get 7. the next bit is 0 and therefore doesn't contribute. 0111binary = 7 decimal. 1111 = 15 decimal, because the last bit is worth 8 in decimal. binary's pretty simple. you start at the rightmost bit, and count that as "1", multiply it by two and that's the value of the next bit, etc. so try to decipher 01100101. start from the right. you get 1+0+4+0+0+32+64+0 = 101. some terms: 1 bit is either a 1 or a 0. a byte is 8 bits long. therefore, a half-byte is 4 bits long. a half-byte is also called a "nibble". a hex character is 0-F, and therefore can hold 16 values. a half-byte can also hold 16 different values. general rule: 2^(# of bits) = numbers of possible values that can be held. whew. alright... last thing. the arithmetic. (P^2*4+T,P/2). the first expression is P^2*4+T. P^2 is P modulus two, or the remainder after division. therefore, P^2 can either return a 1 or a 0. this is to determine which half-byte we're testing, the first or second? if it's the first, P^2 returns a 0, and multiplied by 4 does nothing and the pxl-Test() is determined by the value of T. otherwise, it adds four, and tests the second half-byte. P/2 is rather simple, but it's a little neat that axe drops decimal points. since P holds values 0-15 in the for loop, P/2 will return the following: 0 0 1 1 2 2 3 3 4 4 5 5 6 6 7 7. this way, the Y coordinating of the Pxl-Test is the same for two iterations of the For() loop, so we can get both Half-bytes in the row of the sprite. hope that makes some sense.. i kinda got carried away, maybe, probably 832
The Axe Parser Project / Re: Features Wishlist« on: August 18, 2010, 12:55:11 am »
Cagliano, what sort of input are you looking for? there's a topic under the axe parser subforum i made that has some code that accepts numbers 0-65535, unless you need string and list support.
also, i'm still begging for a pxl-swap() command. i know it can be implemented easily, but i think some pretty neat effects could be achieved with it. 833
Axe / Re: hexadecimal conversion« on: August 18, 2010, 12:50:07 am »
qwerty, may i suggest real-time hex display? the hex routine i wrote in this thread would take a few seconds to execute under TI-Basic, but with Axe it's not even humanly noticeable. maybe you could get hex to display every time you change a pixel on the screen? if you do this, you'll find flipping/rotating much easier, since you can then use the built-in functions for it.
834
Axe / Re: hexadecimal conversion« on: August 18, 2010, 12:33:01 am »
yeah, you can do that same thing with any data, aka map data, sprite data, etc. in axe, they're all just numbers.
go for it. by the way, what features are you looking to implement? 835
Axe / Re: hexadecimal conversion« on: August 18, 2010, 12:26:46 am »
got you there, meishe (:
by the way, the BASIC version i linked to probably shouldn't be used if speed is important. it's slow. i think i timed it at 3 seconds, and it's about 92 bytes. then i clocked one that was about 120 bytes but it was twice as fast. 836
Axe / Re: hexadecimal conversion« on: August 18, 2010, 12:16:14 am »
axe has loads of support for strings. you can load strings. you can manipulate their data directly. you can even export them to OS variable strings! what other support were you looking for?
lastly, here's some code. assume the x and y position of the sprite is 0. Code: [Select] GetCalc("Str1",16)->I .I points to the start of the data at Str1 i think this is the most optimized way, though i'm not sure. your sprite data is in str1. an extremely optimized version in BASIC by yours truly can be found in this thread. 837
Computer Programming / Brainfuck Programs« on: August 16, 2010, 12:40:17 am »
Brainfuck has become my new hobby. my average number of migraines per minute has skyrocketed. anyway, i decided i'd share some of my programs if anyone's interested. i'll edit in more as i go. if you program in brainfuck and want to add in a few, i'd gladly post them and give credit.
Addition Code: [Select] adds the first memory slot to the second Addition Code: [Select] adds the first memory slot to the second outputs the answer Subtraction Code: [Select] subtracts the second memory slot from the first i'll definitely add more later as i become familiar with the language 839
Axe / Re: Project Snake X - help« on: August 15, 2010, 09:19:44 pm »
whenever i make a repeat, while, if, or for statement, i enter in a few lines and add the corresponding End statement. that way i never get an Err:Block.
840
Axe / Re: Project Snake X - help« on: August 15, 2010, 09:14:56 pm »
sorry for straightening your code.. i hate indented code. even in computer languages it bothers me when it's indented with brackets.
|
|