Omnimaga

Calculator Community => Major Community Projects => The Axe Parser Project => Topic started by: annoyingcalc on October 02, 2015, 12:38:08 pm

Title: Axe Parser compiling as Application breaks program
Post by: annoyingcalc on October 02, 2015, 12:38:08 pm
Alright, so I've been working on a project for the last few weeks and today I broke the code execution limit for a program. I now try compiling it as an application but it breaks the program (loads wrong map, animations aren't working, enemies in the sky, etc, etc)

Can someone help me?

Edit: Axe Parser v 1.2.2
Title: Re: Axe Parser compiling as Application breaks program
Post by: Runer112 on October 02, 2015, 12:41:47 pm
Do you allocate buffers or variables inside of your code, like with Buff()? Because unlike with programs, you cannot modify internal data in an application. Any buffers or variables need to be allocated outside of the application, either in static RAM (like the L1-L6 areas) or in temporary variables (created with GetCalc()).
Title: Re: Axe Parser compiling as Application breaks program
Post by: annoyingcalc on October 02, 2015, 12:44:15 pm
Ahh, that would explain it.
Title: Re: Axe Parser compiling as Application breaks program
Post by: Haobo on October 02, 2015, 02:33:51 pm
You can fix the code execution limit with the axiom fullrene (https://www.omnimaga.org/ti-z80-calculator-projects/fullrene/msg253452/#msg253452). It allows you to use all the memory instead and the program should work, but still show the error.


Also, you never mentioned that applications can't modify internal data... that would have been useful...
Title: Re: Axe Parser compiling as Application breaks program
Post by: Hayleia on October 03, 2015, 02:06:12 am
You can fix the code execution limit with the axiom fullrene (https://www.omnimaga.org/ti-z80-calculator-projects/fullrene/msg253452/#msg253452). It allows you to use all the memory instead and the program should work, but still show the error.
I had problems using Fullrene with emulators. CrabCake however always ran fine.
So ok, maybe Fullrene works and it's the emulator the problem, but I'd assume that CrabCake is less hacky and potentially less likely to crash.

Also, you never mentioned that applications can't modify internal data... that would have been useful...
I think it's not mentionned anywhere in Axe because it's not Axe specific. But it has been said many times in many topics, and the differences between apps and programs are common knowledge. It's almost like knowing the dimensions of the screen.
-Apps don't need to be in RAM to be executed (so you can unarchive bigger appvars for example if your program is an app)
-Apps always have a size that is a multiple of 16384 bytes, and in Axe, it's always 16384
-Apps can't modify their content

So yeah, that's your choice, according to your needs. But on the other hand, I don't see why people use Buff and stuff like this when it's not necessary. It just triggers writeback when you could have used saferam areas for the same purpose.