Author Topic: Features Wishlist  (Read 694671 times)

0 Members and 3 Guests are viewing this topic.

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Features Wishlist
« Reply #675 on: June 07, 2010, 12:48:46 am »
Yeah, I've been putting them in subroutines. But it just seemed like the kind of optimization that would be quite helpful to not have to manually do for every program.

Offline Quigibo

  • The Executioner
  • CoT Emeritus
  • LV11 Super Veteran (Next: 3000)
  • *
  • Posts: 2031
  • Rating: +1075/-24
  • I wish real life had a "Save" and "Load" button...
    • View Profile
Re: Features Wishlist
« Reply #676 on: June 07, 2010, 12:53:05 am »
Well its a balance I try to maintain.  Generally, if its under 10 bytes, I don't make it a subroutine, but if its around 9-12 bytes, then it depends on how rare I expect the command to be.  Any more than that, I always use subroutines.  As I said before, eventually this will be optimized automatically.
___Axe_Parser___
Today the calculator, tomorrow the world!

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Features Wishlist
« Reply #677 on: June 07, 2010, 01:08:15 am »
I didn't knew DispGraph was this large o.o

But again I only really used it 3 times per program at most

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Features Wishlist
« Reply #678 on: June 08, 2010, 07:25:25 pm »
If you ever get around to that optimization based on the number of times something shows up, make sure to hit equivalences or unequivalences too. I just went through and manually replaced things like _=16 (which seems to show up a lot) with _sub(16) which checks =16. Saved like 100 bytes.
« Last Edit: June 08, 2010, 07:25:53 pm by Runer112 »

Offline Quigibo

  • The Executioner
  • CoT Emeritus
  • LV11 Super Veteran (Next: 3000)
  • *
  • Posts: 2031
  • Rating: +1075/-24
  • I wish real life had a "Save" and "Load" button...
    • View Profile
Re: Features Wishlist
« Reply #679 on: June 08, 2010, 07:37:39 pm »
Well, I don't want to do too many of those.  Even though it reduces the size, it also slows down the program a little each time it has to call a subroutine.  Normally, you don't notice this, but sometimes when you're doing very heavy math (like checking if any objects on one list collide with objects on another list) you can actually notice it.

That's an interesting optimization though.  It would be very difficult to figure out what to group though.  Like if you did _*2+1/8+L1 a bunch of times for instance, its convenient to group that whole operation into a single subroutine.  But unlike a computer compiler, Axe doesn't have large memory or fast speed, unless I use the extra ram pages maybe but it would still be super slow for larger programs, so its really not practical to keep track of all that.  Its going to have to be up to the programmer to do a majority of these optimizations.  There's always the computer compiler idea though...
___Axe_Parser___
Today the calculator, tomorrow the world!

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Features Wishlist
« Reply #680 on: June 08, 2010, 07:59:35 pm »
It might be good to leave optimizations where the smallest slows down the program up to the programmer IMHO. Just make sure to keep those possible optimizations as documented as possible.

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Features Wishlist
« Reply #681 on: June 08, 2010, 08:03:46 pm »
Yeah, at the moment I'm making as many optimizations by putting mathematical or logical expressions used more than once (as long as it's size efficient to do so) into subroutines, because my program is at about 7.5k and I don't mind sacrificing some speed for space (it's a sprite editor after all, no need for speed)

Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: Features Wishlist
« Reply #682 on: June 10, 2010, 05:58:00 pm »
Can we have a command to store the current contrast to a variable?  For example:
ShadeF(->A
Would put the current contrast into A. :)

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Features Wishlist
« Reply #683 on: June 10, 2010, 06:14:59 pm »
Not sure if that was suggested before (I might even have suggested them myself XD):

Horizontal +r
Horizontal -r
Vertical +r
Vertical -r
ANOVA(666)r
Line(X1,Y1,X2,Y2)r

I couldn,t find those in the command list. It would let you scroll the back buffer, ANOVA(666)r would delete the entire calc OS certificate+OS the next time you recall the back buffer and you could display lines on the back buffer. White lines would also be nice, but I'M not sure if it's necessary. I simply do DrawInv, display my line then DrawInv again.

Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: Features Wishlist
« Reply #684 on: June 10, 2010, 06:20:32 pm »
White lines would also be nice, but I'M not sure if it's necessary. I simply do DrawInv, display my line then DrawInv again.
But white lines would be a lot faster.  I think Quigibo should add both while and inverted lines. :)

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Features Wishlist
« Reply #685 on: June 10, 2010, 07:37:36 pm »
yeah maybe. I was just saying in case he never adds them that they could be done that way too.

Offline calcdude84se

  • Needs Motivation
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2272
  • Rating: +78/-13
  • Wondering where their free time went...
    • View Profile
Re: Features Wishlist
« Reply #686 on: June 11, 2010, 12:40:47 pm »
zTrumpet: The current contrast is stored at $8447 and is in the range from 0 to 39 (decimal)
"People think computers will keep them from making mistakes. They're wrong. With computers you make mistakes faster."
-Adam Osborne
Spoiler For "PartesOS links":
I'll put it online when it does something.

Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: Features Wishlist
« Reply #687 on: June 11, 2010, 12:49:05 pm »
Thanks!  So I'd do {E8447}->A to store the current contrast into A, right?

Offline calcdude84se

  • Needs Motivation
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2272
  • Rating: +78/-13
  • Wondering where their free time went...
    • View Profile
Re: Features Wishlist
« Reply #688 on: June 11, 2010, 01:15:25 pm »
yes, exactly. If you want the contrast level from 0 to 9, like when you press 2nd+up/down, a simple division by 4 seems like it would work (I may be wrong, but I think that's right)
"People think computers will keep them from making mistakes. They're wrong. With computers you make mistakes faster."
-Adam Osborne
Spoiler For "PartesOS links":
I'll put it online when it does something.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Features Wishlist
« Reply #689 on: June 11, 2010, 06:18:51 pm »
Note that you cannot actually update the screen itself with the new contrast value, though. You need a bit of ASM code for that.