Author Topic: Axe Parser  (Read 546358 times)

0 Members and 5 Guests are viewing this topic.

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Axe Parser
« Reply #1155 on: September 02, 2010, 02:07:10 am »
I know that you said you planned to move the variables to the end of SaveScreen.  Is this still planned?

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 #1156 on: September 02, 2010, 07:05:52 am »
o no! please don't! I'm using this pretty much u know!
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 calc84maniac

  • eZ80 Guru
  • Coder Of Tomorrow
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2912
  • Rating: +471/-17
    • View Profile
    • TI-Boy CE
Re: Axe Parser
« Reply #1157 on: September 02, 2010, 09:09:04 am »
As long as you also implement the "pointer to variable" command, it should be fine. By the way, if you do that, allow it in inline asm too ;)
"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Axe Parser
« Reply #1158 on: September 02, 2010, 01:11:57 pm »
o no! please don't! I'm using this pretty much u know!

Same with me :P I'm reading stuff like {L1-55} to get just the high byte of A, so stuff'll get messed up :(
« Last Edit: September 02, 2010, 01:12:21 pm by Deep Thought »




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 #1159 on: September 02, 2010, 02:14:15 pm »
Mhmm I am not too fond of that change, unless it won't require me to change full of code in my games. (I tend to use L1 a lot).

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 #1160 on: September 02, 2010, 05:19:12 pm »
Well, it doesn't affect normal use of L1. The main problem occurs when you use L1 and subtract something. As long as you don't use L1 to access data outside of it, it should be fine. The problem is if you use L1 to access A, for example.
"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 Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Axe Parser
« Reply #1161 on: September 02, 2010, 06:55:07 pm »
What comes before the whole L1/A-Z var group, though?




Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Axe Parser
« Reply #1162 on: September 02, 2010, 07:33:24 pm »
Yeah, moving around the variables would also mess with PortalX, as i use the locations for a large speed operation.  (not that moving them would erase this optimization, i would just have to change some numbers :P)

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Axe Parser
« Reply #1163 on: September 06, 2010, 12:05:08 am »
I was just asking Iambian how he gets grayscale to work in his project Escheron: Shadow over Ragnoth because I was wondering why it seems that every ASM game does grayscale in interrupts. Why exactly do the grayscale routines for Axe have problems with interrupts?

Offline nemo

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1203
  • Rating: +95/-11
    • View Profile
Re: Axe Parser
« Reply #1164 on: September 06, 2010, 12:11:33 am »
wait, so you can get the high/low bytes of variables by accessing a certain part of RAM? can someone tell me where this RAM starts and where it ends? is it {L1-55} to {L1-1}? that leaves 54 bytes / 2 = 27 variables..
would the following be an optimization?
Code: [Select]
{GDB1+B}^r->A
A/256->C
A^256->D
.optimizes into..
{GDB1+B}^r->A
{L1-55}->C
{L1-54}->D

of course, i'm talking about speed optimization. i know it's a bigger size.
« Last Edit: September 06, 2010, 12:12:05 am by nemo »


Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Axe Parser
« Reply #1165 on: September 06, 2010, 01:23:58 am »
Is it a bigger size? I believe that is not only faster but a good deal smaller.

Offline nemo

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1203
  • Rating: +95/-11
    • View Profile
Re: Axe Parser
« Reply #1166 on: September 06, 2010, 01:28:47 am »
/256 is 3 bytes and ^256 is 2 bytes, so i don't think so.
-55 and -54 are 4 bytes each. i'm not sure how many bytes accessing a byte at a pointer is though.


Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Axe Parser
« Reply #1167 on: September 06, 2010, 01:36:49 am »
L1-55 is a constant that is evaluated at compile time, and accessing a byte at a constant address only takes 3 bytes. Getting the value of A alone takes 3 bytes as well, let alone operating on it. They are essentially the same, except in one case you specify the constant address and in another Axe specifies the constant address. Accessing one byte and two bytes at a constant address both take 3 bytes. And without the math that needs to be applied, you'll save bytes and speed by just accessing the individual bytes of a variable.
« Last Edit: September 06, 2010, 01:40:33 am by Runer112 »

Offline nemo

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1203
  • Rating: +95/-11
    • View Profile
Re: Axe Parser
« Reply #1168 on: September 06, 2010, 01:42:15 am »
thanks for the explanation. what about the following? is there any difference?
Code: [Select]
{GDB1+X}->A
A/16->B
A^16->C
.or
{GDB1+X}->A
{L1-54}/16->B
{L1-54}^16->B


Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Axe Parser
« Reply #1169 on: September 06, 2010, 01:47:37 am »
{L1-54} accesses only one byte. A accesses two bytes, so these aren't the same. {L1-54}r, however, would be equivalent to A I believe. Also, storing the second value to B in the second example would definitely be different. :P
« Last Edit: September 06, 2010, 01:48:44 am by Runer112 »