• Axe Parser 5 1
Currently:  

Author Topic: Axe Parser  (Read 552664 times)

0 Members and 1 Guest are viewing this topic.

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: Axe Parser
« Reply #1110 on: August 11, 2010, 03:45:13 am »
If you already had the location of the buffer's byte, I would say yes (like from scanning a horizontal line of the screen).  But if you have to find it given just an X and a Y, the extra math to find the particular byte and bit from the buffer is going be less optimized than if you just used the pxl-test command since it does all that math for you but in optimized assembly.
___Axe_Parser___
Today the calculator, tomorrow the world!

Offline ACagliano

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 919
  • Rating: +32/-2
    • View Profile
    • ClrHome Productions
Re: Axe Parser
« Reply #1111 on: August 17, 2010, 07:50:37 pm »
Is it possible to convert or otherwise read the HEX data a program contains in Axe? Any of the Disp PTR commands only show the TOKEN.

Lets say I want to tell a user the hex a program contains. So I do:

"progOFFBY1"->Str1A
GetCalc(Str1A)->P

Now lets say I want the first byte of the program:

Disp {P}->Tok  but that only disps the token, like "real(". I want the hex. What do I do?
« Last Edit: August 17, 2010, 08:05:09 pm by ACagliano »

Offline calcdude84se

  • Needs Motivation
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2272
  • Rating: +78/-13
  • Wondering where their free time went...
    • View Profile
Re: Axe Parser
« Reply #1112 on: August 17, 2010, 08:03:51 pm »
You'll have to do it by hand. Assuming you don't need T, then the following code will display 2 hex digits corresponding to the data at P.
Code: [Select]
Disp {P}/16->T>=10*7+T+48>Char,{P}^16->T>=10*7+T+48>CharThe condition is to add the right amount to make $30+$10 $41 (which is A)
"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 nemo

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1203
  • Rating: +95/-11
    • View Profile
Re: Axe Parser
« Reply #1113 on: August 18, 2010, 12:19:26 pm »
minor question.

which is faster, pxl-Test(X,Y) or this:
Code: [Select]
.eulers 'e'
{Y*12+(X/8)+L6} e X^8


Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Axe Parser
« Reply #1114 on: August 18, 2010, 02:08:49 pm »
minor question.

which is faster, pxl-Test(X,Y) or this:
Code: [Select]
.eulers 'e'
{Y*12+(X/8)+L6} e X^8


See:

If you already had the location of the buffer's byte, I would say yes (like from scanning a horizontal line of the screen).  But if you have to find it given just an X and a Y, the extra math to find the particular byte and bit from the buffer is going be less optimized than if you just used the pxl-test command since it does all that math for you but in optimized assembly.

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: Axe Parser
« Reply #1115 on: August 21, 2010, 03:30:44 am »
Nice update again, keep up the good work :)

Offline calcdude84se

  • Needs Motivation
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2272
  • Rating: +78/-13
  • Wondering where their free time went...
    • View Profile
Re: Axe Parser
« Reply #1116 on: August 21, 2010, 12:12:47 pm »
Nice to see ElseIf and Else!If; that should help reduce some excess End's in programs.
Keep up the good work! :D
"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 LordConiupiter

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 339
  • Rating: +3/-0
  • Just one of the thousands of Axe-fans...
    • View Profile
Re: Axe Parser
« Reply #1117 on: August 21, 2010, 02:07:25 pm »
Yes, I'm lovin' it! very nice update again!
« Last Edit: August 21, 2010, 02:09:21 pm by LordConiupiter »
everytime that I was down, you would always come around, and get my feedback on the ground. (modified part from 'Seasons in the sun')

No matter how many errors are bothering you, always try to stay rel-Axe!

The HoMM project will be resumed as soon Axe 1.0.0 will be released!
Projects:
Code: [Select]
HoMM:   [==--------]    Project 'resumed': I'm suffering overwhelming new ideas being popped up in my dreams :P
tiDE:   [----------]    Explored and understood the main part of the code: just started writing a Tokenizer.



password of the week: uvanapererubupa (Any pronunciation is the right one ;) )   :D click me, and you'll be raided :D

Offline Hot_Dog

  • CoT Emeritus
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3006
  • Rating: +445/-10
    • View Profile
Re: Axe Parser
« Reply #1118 on: August 21, 2010, 11:02:19 pm »
Nice to see ElseIf and Else!If; that should help reduce some excess End's in programs.
Keep up the good work! :D

Agreed!  Great work, Quigibo

Offline qazz42

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1130
  • Rating: +30/-12
  • hiiiiiiiii
    • View Profile
Re: Axe Parser
« Reply #1119 on: August 21, 2010, 11:11:26 pm »
wait, we have endif and elseif's now?


:O OH EMM GEE!

Offline willrandship

  • Omnimagus of the Multi-Base.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2953
  • Rating: +98/-13
  • Insert sugar to begin programming subroutine.
    • View Profile
Re: Axe Parser
« Reply #1120 on: August 21, 2010, 11:20:38 pm »
Wow...75 pages.

I was wondering: is there a good way to easily get less flickery gray? it bugs me that I can't just type in Pt-On( and Pt-On()r and see some smooth gray! I wouldn't mind typing more, but I don't know what to type :P

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Axe Parser
« Reply #1121 on: August 22, 2010, 12:51:56 am »
Wow...75 pages.

I was wondering: is there a good way to easily get less flickery gray? it bugs me that I can't just type in Pt-On( and Pt-On()r and see some smooth gray! I wouldn't mind typing more, but I don't know what to type :P

What do you mean? The grayscale methods currently supported by Axe are just about as good as gray gets. The screen on TI-83s and TI-84s weren't built for grayscale, have no automated processes for grayscale, and are relatively slow. As far as im concerned, based on the hardware we have to work with, Axe's grayscale routines do an amazing job.

The only way to get less flickery gray is to update the screen more often. If you're doing things like drawing sprites, a good way to help maximize the update frequency is to make sure you're only drawing things on the screen that moved or weren't there before and actually need to be redrawn. Also, optimize your program for speed as much as you can. Use as little processing power as you can between screen updates, and try to make sure the time between updates is somewhat constant and doesn't have large spikes of processing time used up between two screen updates.

If you wondering why there's no automated process to display grayscale without having to call DispGraphr/DispGraphrr, it's because that would require interrupts to update the screen automatically, but the display routines don't work with interrupts. You wouldn't want that anyways, because it would display the buffer contents a potentially inopportune moments, which could cause tearing (the screen updating while the buffers are being updated, resulting in displaying part of the new image and part of the old).
« Last Edit: August 22, 2010, 01:14:03 am by Runer112 »

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: Axe Parser
« Reply #1122 on: August 22, 2010, 01:12:01 am »
You need to use DispGraphr or DispGraphrr for gs. So far Axe does a nice job as Runer said. For higher quality you need to update often as he says, but keep in mind it may slow down the program a lot if you add too many.


Offline Happybobjr

  • James Oldiges
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2325
  • Rating: +128/-20
  • Howdy :)
    • View Profile
Re: Axe Parser
« Reply #1123 on: August 22, 2010, 09:05:25 am »
the more dispgraphs the faster it goes.
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 shmibs

  • しらす丼
  • Administrator
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2132
  • Rating: +281/-3
  • try to be ok, ok?
    • View Profile
    • shmibbles.me
Re: Axe Parser
« Reply #1124 on: August 22, 2010, 10:13:37 am »
The only way to get less flickery gray is to update the screen more often. If you're doing things like drawing sprites, a good way to help maximize the update frequency is to make sure you're only drawing things on the screen that moved or weren't there before and actually need to be redrawn. Also, optimize your program for speed as much as you can. Use as little processing power as you can between screen updates, and try to make sure the time between updates is somewhat constant and doesn't have large spikes of processing time used up between two screen updates.

If you wondering why there's no automated process to display grayscale without having to call DispGraphr/DispGraphrr, it's because that would require interrupts to update the screen automatically, but the display routines don't work with interrupts. You wouldn't want that anyways, because it would display the buffer contents a potentially inopportune moments, which could cause tearing (the screen updating while the buffers are being updated, resulting in displaying part of the new image and part of the old).

i've done 4lvl with interrupts in axe and it was far less flickery(and that was with the map being updated every time the sprites were). Tearing isnt an issue because with interrupts the screen is being updated so often that user never notices the difference. however, it is very processor intensive, and if your goal is an action game then the dispgraphs are definitely your best bet