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 ... 32 33 [34] 35 36 ... 135
496
The Axe Parser Project / Re: Features Wishlist
« on: April 09, 2011, 05:15:53 am »
^ Not really. Pseudo-wrapping in the horizontal direction is smaller, but its not real wrapping because the half sprite on the right side of the screen would be shifted down by one pixel and additional clipping would be needed for the last row so it wouldn't leak into memory after the screen.  This is better suited for an Axiom though since wrapping is rarely needed and can be done easily with 2 sprites.


Anyway, I came up with a new advanced syntax idea!  I was thinking of allowing programmers to take advantage of the stack the z80 offers but I'm concerned about memory leaks this could cause and undesired conflicts when calling routines since Axe uses the same stack behind the scenes.  But then I realized there is a way I could do it that would be both easy to use and be impossible to leak memory.  The solution is to:

1) Only allow the pair if they are in the same scope.  I define scope loosely... it has to fit on one line, but CAN intersect most single argument commands.
2) Require a pop for each push in that scope or else throw a syntax error.
3) Allow automatic integration into the right-hand side of binary operations.

For a non-technical explanation: Think of it as storing a value (maybe the result of a large computation) to a place you want to read later without having to use a temporary variable or do the computation again.  You can nest as many of these as you want without concern about memory.  I decided to use the pi character (π) to implement this.  Storing to it pushes the variable and reading from it pops it.

For example here is code to swap the values of 2 variables using a temporary:
Code: [Select]
A->T B->A T->BHere is the same code using the stack instead.
Code: [Select]
A->π B->A π->BSince each variable read or write is 3 bytes, but each stack read or write is only 1 byte, this code saves 4 bytes and is slightly faster.

Another example:
Code: [Select]
{A*3}->X {A*3+1}->Y {A*3+2}->ZHere is a case where you can nest them together:
Code: [Select]
{A*3->π->π}->X {π+1}->Y {π+2}->ZThis saves a HUGE amount of memory.

When nesting, the most recent store to the stack is the one that gets read when you read from the stack.  Here is a pairing example:

A->π
   B->π
      C->π
      π->D
   π->E
   F->π
   π->G
π->H


I'm hoping this will lead to more possibilities to optimize code.  I know at least one individual will have a field day with this ;) Let me know if anyone, especially asm programmers, have questions or concerns.  It seems to work in my head, but I haven't tried implementing it so there may be some unforeseen problems.

497
The Axe Parser Project / Re: ASM code and program editoring
« on: April 06, 2011, 07:29:02 pm »
Wouldn't this force the program to scroll to the error rather than instantly appearing at the error?  Or does this do that for you when you set curPC?

498
The Axe Parser Project / Re: Bug Reports
« on: April 05, 2011, 06:19:20 pm »
You're using {Y1-2}r or something similar to get the value right?  The value returned from the GetCalc is not a pointer if you're reading into a file, its just a boolean to check if it exists.

499
The Axe Parser Project / Re: Bug Reports
« on: April 04, 2011, 03:41:46 am »
The display routines are actually consistent now and will run the same speed every time.  Its the system interrupts you should turn off when doing speed tests.

500
The Axe Parser Project / Re: Memkit issues
« on: April 02, 2011, 06:12:12 pm »
You can use any free ram you'd like.  Anywhere in L1-L6 is valid, or memory within the program if its a non-application.  Just make sure that you have 9 bytes free there to write over.

501
The Axe Parser Project / Re: RabbitSign licensing
« on: April 02, 2011, 06:04:59 pm »
Thanks for pointing this out!  I think it actually used to be Wabbitsign for a while and when I replaced it with rabbitsign I forgot to update the readmes.  I have now replaced it with the README and COPYING text files you suggested and these will appear in all future updates.

502
The Axe Parser Project / Re: Bug Reports
« on: March 30, 2011, 06:00:21 pm »
No, DispGraph is a bug, I will make DispGraph work in either mode, I just have to add extra code to it to automatically switch to 6MHz before it runs the command and then switch back for you after its done.

That comment bug is so weird!  I'm really interested to find what's causing that.

503
The Axe Parser Project / Axiom Requests
« on: March 28, 2011, 07:04:01 pm »
This is the place to make requests for specific assembly commands you might need in your Axe programs as well as to show off or improve existing Axioms. In case you're not familiar with the lingo, Axioms are assembly libraries that extend the Axe language.  They can be linked into your Axe programs by using the command: #Axiom(AXIOMNAME).  To write your own Axioms, check out the AxiomSDK in the "Tools" folder of the latest version of Axe Parser (assembly knowledge required!).

As another feature of this thread.  I have more space for custom Axiom tokens.  If you can think of some token names which have no near-substitutes and are general enough for many possible uses, I will definitely consider adding them.

Here is a list of current Axioms (mods, please update):

LCDKit: Control many features of the LCD screen - By Runer112
Pucrunch: Efficiently Compress/Decompress your program data - By Iambian
Crabcake: Allows you to turn your Axe program into a larger-than-8-KB ASM program - By Hot_Dog
SpeedKey: Optimized Getkey for just the arrows - By Binder News
Aiming Utility: Returns an angle that can be used to aim at targets given a delta X and Y - By Iambian

504
The Axe Parser Project / Re: Features Wishlist
« on: March 28, 2011, 06:46:09 pm »
Speaking of which, I think it is now time to start an "Axiom Request" thread for requests such as the paint bucket, which legitimately would be a lot better as an assembly command, but wouldn't be used enough to justify being part of the standard language.  It would also be a good to keep a list of Axioms created so far so people have access to those.

The highest priority requests to me right now are actual features of the compiler, user interface improvements, and language control features.  Commands are low priority right now unless they are absolutely essential or super easy to implement since this is what Axioms are for.

505
The Axe Parser Project / Re: [Axiom] Pucrunch Decompression and tools
« on: March 28, 2011, 06:23:47 pm »
Just have to wait for Quigibo to reimplement big-endian nibble reads...

This probably isn't going to be implemented as it was a mistake before.  If you want a big-endian read though, all you have to do is flip the last bit of the doubled pointer:

Code: [Select]
nib{P*2}becomes:
Code: [Select]
nib{P*2 xor 1}and the endianness should switch.

506
The Axe Parser Project / Re: Assembly Programmers - Help Axe Optimize!
« on: March 28, 2011, 04:30:42 am »
Oh yeah, sorry.  I was trying to release this quickly with my limited time so I didn't have time to make changes that would require me to rewrite core routines.  The exch() optimization requires this, because even though it works for Axioms, its not the same for regular routines yet but it will be eventually.  The subroutines I didn't convert yet because I kind of overlooked it, but I'll get to it next version.  As for GetCalc() I'm not sure if I'm ready to change it yet because it will create an incompatibility with current programs that still use the Ptr-2 to reference os vars.  I will probably put this on the poll.

507
The Axe Parser Project / Re: [Axiom] LCDKit
« on: March 28, 2011, 04:20:26 am »
Awesome, the first real Axiom I've seen! :)

On a related note, I remember you were asking somewhere if the 32 routines was a technical limitation: kind of.  I have 160/256 unique subroutine identifiers reserved for axioms which leaves me 96 built in subroutines (I am currently using 52).  I decided to split it up such that there would be 5 Axioms maximum with 32 routines for each one.  I could change it to 4 Axioms with 40 routines per Axiom, I'm not sure what a good mix would be.  What are your thoughts?

508
Axe / Re: Trig Challenge....
« on: March 27, 2011, 10:42:34 pm »
Isn't just abs(V)+abs(W) close enough?  Its a perfect approximation for angles close to 0 and 90 degrees and only off by about 40% in the worst case of 45 degrees.

Another way you can do this is to store you vector as a magnitude and angle.  It might make some other math complicated, but it makes it super easy to read off the magnitude (its just r).  It depends more on how you plan to use this vector.

509
News / Re: Axe 0.5.1 Update
« on: March 27, 2011, 07:46:20 pm »
I wrote this getKeyr table, if you're interested :)

http://julosoft.net/ti/getkey.php

Whoa!  That's amazing!  How did you throw that together so fast?  :o

510
The Axe Parser Project / Re: Assembly Programmers - Help Axe Optimize!
« on: March 27, 2011, 06:33:30 pm »
Oh yeah, now I remember why I didn't want to change Dispgraph before  :banghead:

The overhead is small though relative to the size of the routine,  I think I'll just make regular DispGraph account for the speed settings and it would be roughly the same size as the original.

Pages: 1 ... 32 33 [34] 35 36 ... 135