• Features Wishlist 5 1
Currently:  

Author Topic: Features Wishlist  (Read 253497 times)

0 Members and 2 Guests are viewing this topic.

Offline Freyaday

  • The One And Only Serial Time Killing Catboy-Capoeirista-Ballerino
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1970
  • Rating: +128/-15
  • I put on my robe and pixel hat...
    • View Profile
Re: Features Wishlist
« Reply #2535 on: August 27, 2011, 05:18:10 pm »
Unless the file is a subprogram.
In other news, Frey continues kicking unprecedented levels of ass.
Proud member of LF#N--Lolis For #9678B6 Names


I'm a performer at heart; I stole it last week.
My Artwork!

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 #2536 on: August 27, 2011, 10:10:13 pm »
Well seeing as you can define variables in any location now, Realloc is kind of depreciated, and is only a convenience to define A through Theta all at once.
___Axe_Parser___
Today the calculator, tomorrow the world!

Offline Happybobjr

  • James Oldiges
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2325
  • Rating: +128/-20
  • Howdy :)
    • View Profile
Re: Features Wishlist
« Reply #2537 on: September 01, 2011, 06:48:06 am »
request: For(var)

I know it wouldn't be anywhere near as optimized as For(const), but it would be faster than for(var, #, #) right?
School: East Central High School
 
Axe: 1.0.0
TI-84 +SE  ||| OS: 2.53 MP (patched) ||| Version: "M"
TI-Nspire    |||  Lent out, and never returned
____________________________________________________________

Offline calc84maniac

  • eZ80 Guru
  • Coder Of Tomorrow
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2896
  • Rating: +467/-17
    • View Profile
    • TI-Boy CE
Re: Features Wishlist
« Reply #2538 on: September 02, 2011, 04:20:21 pm »
Alright, everybody knows about the getPixel routine. But you know what would be cool? A getSprite routine, of course! I modified the getPixel routine so it grabs an 8x8 sprite from the buffer (and it's optimized for aligned reads!):
Code: [Select]
p_GetSprite:
.db __GetSpriteEnd-1-$ ;Gets sprite at (c,l) into 8 bytes at IX
ld de,plotSScreen
pop af
pop bc
pop ix
push af
ld a,l
add a,a
add a,l
ld l,a
add hl,hl
add hl,hl
add hl,de
ld a,c
sra c
sra c
sra c
add hl,bc
and %00000111
ld b,8
jr nz,___GetSpriteUnaligned
ld de,12
___GetSpriteAlignedLoop:
ld a,(hl)
ld (ix),a
add hl,de
inc ix
djnz ___GetSpriteAlignedLoop
ret
___GetSpriteUnaligned:
ld d,(hl)
inc hl
ld e,(hl)
ex de,hl
ld c,a
___GetSpriteUnalignedLoop:
add hl,hl
dec c
jr nz,___GetSpriteUnalignedLoop
ld (ix),h
ld hl,11
add hl,de
inc ix
djnz ___GetSpriteUnaligned
ret
__GetSpriteEnd:

I feel like this could be useful for a lot of different things, one obvious example being making a cursor that can be drawn on the buffer and then restoring what was on the buffer behind it. Oh, and I forgot to mention, the syntax for that routine would be getSprite(addressToPutSprite, x, y), and an optional buffer argument could be easily supported. Also, any pixels read from outside the buffer can be considered "garbage" (which is no big deal if you draw the sprite in the exact same spot)

Edit: Fixed popping of arguments in the wrong order
« Last Edit: September 03, 2011, 09:48:21 am by calc84maniac »
"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman

Ashbad

  • Guest
Re: Features Wishlist
« Reply #2539 on: September 02, 2011, 05:36:29 pm »
Regarding that get-sprite routine, it's cool and all, but wouldn't it be better as part of some axiom filled with optimized sprite things.  The commands list is already pretty clogged up IMHO and I don't see the point of axioms if every other suggested routine will be made into a standard-supported one, especially if they're not staple ones needed.

Offline AngelFish

  • Is this my custom title?
  • Administrator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3242
  • Rating: +270/-27
  • I'm a Fishbot
    • View Profile
Re: Features Wishlist
« Reply #2540 on: September 02, 2011, 05:50:21 pm »
Frankly, I've found a get-sprite routine wanting multiple times. I'd vote for removing rotCC() if you really think the number of commands should be minimized.
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ

Ashbad

  • Guest
Re: Features Wishlist
« Reply #2541 on: September 02, 2011, 05:51:44 pm »
Frankly, I've found a get-sprite routine wanting multiple times. I'd vote for removing rotCC() if you really think the number of commands should be minimized.

Meh, probably true, but perhaps an axiom for holding both the rotate commands, this new one, and perhaps a few others seldom used? 

Offline AngelFish

  • Is this my custom title?
  • Administrator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3242
  • Rating: +270/-27
  • I'm a Fishbot
    • View Profile
Re: Features Wishlist
« Reply #2542 on: September 02, 2011, 05:52:23 pm »
A standard library of sorts would be nice :P

Similarly: Macro/Axe library support would be nice, presumably something like #ifdef or #if with a matching #endif to selectively include code segments.
« Last Edit: September 02, 2011, 05:54:07 pm by Qwerty.55 »
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ

Offline Darl181

  • Vy'o'us pleorsdti thl'e gjaemue
  • CoT Emeritus
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3408
  • Rating: +305/-13
  • VGhlIEdhbWU=
    • View Profile
    • darl181.webuda.com
Re: Features Wishlist
« Reply #2543 on: September 03, 2011, 07:11:17 pm »
How about, when the compiler hits an error, it displays the name of the source program the error is in?  It's really fun when there's like 10 source programs/libraries and they're all archived x.x

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 #2544 on: September 09, 2011, 10:56:58 pm »
How about, when the compiler hits an error, it displays the name of the source program the error is in?  It's really fun when there's like 10 source programs/libraries and they're all archived x.x
Yeah really.  That'd be a nice feature.

Alright, everybody knows about the getPixel routine. But you know what would be cool? A getSprite routine, of course! I modified the getPixel routine so it grabs an 8x8 sprite from the buffer (and it's optimized for aligned reads!)
I think it should be added.

Offline Freyaday

  • The One And Only Serial Time Killing Catboy-Capoeirista-Ballerino
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1970
  • Rating: +128/-15
  • I put on my robe and pixel hat...
    • View Profile
Re: Features Wishlist
« Reply #2545 on: September 09, 2011, 11:02:13 pm »
What would GetSprite return?
Also, what's getPixel again?
In other news, Frey continues kicking unprecedented levels of ass.
Proud member of LF#N--Lolis For #9678B6 Names


I'm a performer at heart; I stole it last week.
My Artwork!

Offline calc84maniac

  • eZ80 Guru
  • Coder Of Tomorrow
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2896
  • Rating: +467/-17
    • View Profile
    • TI-Boy CE
Re: Features Wishlist
« Reply #2546 on: September 09, 2011, 11:09:50 pm »
What would GetSprite return?
Also, what's getPixel again?
getPixel returns a 0 or 1 if a certain pixel is reset or set, respectively. getSprite would get an 8x8 image from the buffer and write it at the supplied pointer, so it can be used as a sprite.
"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman

Offline Freyaday

  • The One And Only Serial Time Killing Catboy-Capoeirista-Ballerino
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1970
  • Rating: +128/-15
  • I put on my robe and pixel hat...
    • View Profile
Re: Features Wishlist
« Reply #2547 on: September 09, 2011, 11:19:36 pm »
Ah, ok. That would make sprite editors a lot easer, methinks. Oh, the fun things I could do with cloning...
* Freyaday drools
Hey wait, couldn't that be used to replicate the functionality of Pt-Off()?
« Last Edit: September 09, 2011, 11:20:45 pm by Freyaday »
In other news, Frey continues kicking unprecedented levels of ass.
Proud member of LF#N--Lolis For #9678B6 Names


I'm a performer at heart; I stole it last week.
My Artwork!

Offline LincolnB

  • Check It Out Now
  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1115
  • Rating: +125/-4
  • By Hackers For Hackers
    • View Profile
Re: Features Wishlist
« Reply #2548 on: September 10, 2011, 04:54:44 pm »
Oooh, I am digging the idea of a GetSprite function...
* buttsfredkin drools
Completed Projects:
   >> Spacky Emprise   >> Spacky 2 - Beta   >> Fantastic Sam
   >> An Exercise In Futility   >> GeoCore

My Current Projects:

Projects in Development:
In Medias Res - Contest Entry

Talk to me if you need help with Axe coding.


Spoiler For Bragging Rights:
Not much yet, hopefully this section will grow soon with time (and more contests)



Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Features Wishlist
« Reply #2549 on: September 18, 2011, 02:12:11 am »
This is less of a feature request and more of a feature no-brainer. I don't know how I forgot about this for so long.

As we all know, TI can be quite idiotic sometimes. And they were very idiotic when they decided to add ports 29h-2Eh. These ports don't do anything on an 83+. But on the 15MHz calculators, they inject an extra cycle into some memory access instructions. The affected instructions are opcode reads from flash and all memory writes. Apparently TI thought certain memory operations required a small delay, but as far as I and other experienced assembly programmers know, these delays aren't necessary. This means that on a 15MHz calc, any applications and OS calls will run about 5-25% slower and routines that write to memory will run perhaps 1-3% slower for no reason.

You may think, why not just have users permanently disable this delay? That sounds like a good idea at first, but you have to take into account all pre-existing programs. They were designed without knowledge of this port, so many of them may actually unknowingly rely on the delay for their program to run at the programmer's desired speed. For compatibility with all existing programs, this port needs to stay at it's original delay-inducing value. If you want your program to run faster on a 15MHz calculator though, ideally you would want to do is (if the calculator isn't an 83+) save the value of [wikiti]83Plus:Ports:2E[/wikiti], set it to 0 for the duration of the program, and then restore it to its original value when returning. This is done easily enough by reading the port, pushing it's value, outputting 0, calling the program, and then restoring the original port value before returning for good.


I guess the only question is how you would want to implement this. I see a few possibilities:
  • Include this as a standard command, but instruct programmers to only call it once at the start of the program and not to use an instant return.
  • Include an option inside the Axe application to automatically add this wrapper to all compiled programs. If the option is enabled, an alternate instant return routine would be used.
  • Give programs the ability to define this option like metadata. If the option is enabled, an alternate instant return routine would be used.
  • Automatically add this wrapper to all compiled programs. The instant return routine would be changed.

My favorite option would be the third one. It would be a good idea to enforce that this command exist before any code.
« Last Edit: September 26, 2011, 11:25:16 am by Runer112 »