Join us on Discord!
You can help CodeWalrus stay online by donating here.

Making Axe games that uses up to 1.5 MB executable code theoretically possible

Started by Dream of Omnimaga, February 20, 2017, 05:26:23 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Dream of Omnimaga

There are many Axe Parser projects that have died because the programmer have hit the executable code limit and thought there was no way around it:
8 KB by default for 8xp executables
16 KB for apps
24 KB with Fullrene (can be problematic if your code uses the same RAM space as Fullrene)
40 KB with that one trick that DrDnar posted once, but I forgot the post ID on Omnimaga
even more with RunPrgm or Pageswap axiom (but most likely has problems similar to Fullrene regarding safe RAM usage conflicts)

However, TI-BASIC has no executable code limit. With the help of simple ASM utilities to copy archived 8xp files to the RAM and delete the RAM copies, you can theoretically "increase Axe Parser executable code limit" to the following, sort-of:
164 KB on TI-83+
480 KB on TI-84+
1540 KB on TI-84+SE

Which isn't increasing the limit per-SE, but simply getting around it by splitting your Axe executable into multiple ones (eg one program for the menu, one program for Cutscenes 1 and 2, one program for Cutscenes 3 and 4, one program for the game ending sequence, one for enemy battles, one for the title screen and one for the overworld). You also need to use an appvar for data that needs to be shared across each executable. Then finally, you make a TI-BASIC launcher which, with the help of your favorite archive/unarchive ASM utility (XCOPY is the smallest and can be downloaded at https://www.omnimaga.org/files/Old-Calculator-RPGs-Headquarter-Archive/TI-Programming-Tools/XCPY7.zip ), temporarily copies needed archived Axe executables to RAM, then you launch the resulting XTEMP00x.8xp file and delete it afterwards.

The only downside is that this requires splitting your game into several sub-programs, cluttering the PRGM menu, so you might want to prefix the sub-program names with the theta symbol. Also, grayscale games will look crappy during the switching between programs, so you might need to add a "LOADING" text somewhere so that the user won't think his calculator froze.


Of course, I doubt people will need this much code and I recommend using as much data as possible as code replacement to avoid having to do this, but I think this trick could extend the life of several projects further.
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

Snektron

You dont even need ti-basic. You just need a few appvars with relocatable code. If that is not possible, you can just launch one program from another which results in tios copying the program to the code area and running it from there. Or you could make an app like everybody else but who does that anyway.
  • Calculators owned: TI-84+
Legends say if you spam more than DJ Omnimaga, you will become a walrus...


Dream of Omnimaga

  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

E37

If you have an SE, you can have more than 65536b of RAM without using a single byte of user RAM. (so you could have all 65536+b of ram even if the user has ram completely full of other programs and stuff)

On the 84+, it is the same as above but only 16000b
  • Consoles, mobile devices and vintage computers owned: Ti83,Ti84!
I've never finished a project, there is always a way to improve!
What's my calc's name? Convert $37 to decimal. Look up that element in the periodic table. Then take the abbreviation of that element and you have it!
Look! A slime!    <(^.^)>

Dream of Omnimaga

Actually both the 84+ and SE have 48 KB of RAM total, meaning an extra 16000 bytes on both calcs, not just the 84+. However, the 2004-07 hardware revisions of the TI-84+ and SE have 128 KB of RAM total. The hardware was changed in May 2007.
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

E37

If we are talking about apps, just use pageswap. That will give you as much runable code as archive.
  • Consoles, mobile devices and vintage computers owned: Ti83,Ti84!
I've never finished a project, there is always a way to improve!
What's my calc's name? Convert $37 to decimal. Look up that element in the periodic table. Then take the abbreviation of that element and you have it!
Look! A slime!    <(^.^)>

Dream of Omnimaga

Ah I didn't know that pageswap existed for Axe. The DrDnar utility (I think) basically used both a 8xp and an app
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

E37

Quote from: DJ Omnimaga on February 20, 2017, 05:54:40 PM
Ah I didn't know that pageswap existed for Axe. The DrDnar utility (I think) basically used both a 8xp and an app
That is RunPrgm.
https://www.omnimaga.org/the-axe-parser-project/(axiom)-run-(unarchived)-external-assembly-programs/
It has its own special uses besides running programs. The other things it can do are REALLY awesome in some special cases.
  • Consoles, mobile devices and vintage computers owned: Ti83,Ti84!
I've never finished a project, there is always a way to improve!
What's my calc's name? Convert $37 to decimal. Look up that element in the periodic table. Then take the abbreviation of that element and you have it!
Look! A slime!    <(^.^)>

Dream of Omnimaga

After looking further, it was in the PageSwap Axiom topic that I found the thing mentioning 40 KB of code. Thanks for the link to RunPrgm.
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

c4ooo

Quote from: Snektron on February 20, 2017, 05:29:17 PM
You dont even need ti-basic. You just need a few appvars with relocatable code. If that is not possible, you can just launch one program from another which results in tios copying the program to the code area and running it from there. Or you could make an app like everybody else but who does that anyway.
Too bad its hard to make relocatable code for Axe. I have asked runer112 for .org statements but he said no. I don't remember now, but he had a good reason for it I think.

E37

Quote from: c4ooo on February 20, 2017, 06:39:15 PM
Quote from: Snektron on February 20, 2017, 05:29:17 PM
You dont even need ti-basic. You just need a few appvars with relocatable code. If that is not possible, you can just launch one program from another which results in tios copying the program to the code area and running it from there. Or you could make an app like everybody else but who does that anyway.
Too bad its hard to make relocatable code for Axe. I have asked runer112 for .org statements but he said no. I don't remember now, but he had a good reason for it I think.
I asked him recently, and he said because he doesn't know how that part of Axe is structured and that not enough people would know how to use something that low level.  :'(
  • Consoles, mobile devices and vintage computers owned: Ti83,Ti84!
I've never finished a project, there is always a way to improve!
What's my calc's name? Convert $37 to decimal. Look up that element in the periodic table. Then take the abbreviation of that element and you have it!
Look! A slime!    <(^.^)>

Dream of Omnimaga

Now if only Axe would have been open-source like ICE Compiler, many other people could have helped not only porting it to the CSE/CE, but also been able to help others understand how it works based on the source code.
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

Snektron

Quote from: E37 on February 20, 2017, 05:58:05 PM
Quote from: DJ Omnimaga on February 20, 2017, 05:54:40 PM
Ah I didn't know that pageswap existed for Axe. The DrDnar utility (I think) basically used both a 8xp and an app
That is RunPrgm.
https://www.omnimaga.org/the-axe-parser-project/(axiom)-run-(unarchived)-external-assembly-programs/
It has its own special uses besides running programs. The other things it can do are REALLY awesome in some special cases.

You didn't even link my runprgm axiom :(
  • Calculators owned: TI-84+
Legends say if you spam more than DJ Omnimaga, you will become a walrus...


alexgt

Hmmmmm, this makes me think back to good old JarvAXE, anyone remember him? Or the even the older J.A.R.V.I.S. in Ti-BASIC xD
  • Calculators owned: Ti-84+, Ti-Nspire, Hp Prime, Broken HP Prime, HP 48SX

Sorunome

Page swapping should be way more efficiant, though......by editing the app header a bit and re-signing you should be able to make that a single app.
  • Calculators owned: Too many (why are you even reading this?)
  • Consoles, mobile devices and vintage computers owned: Gamebuino!
This is a signature.
And now......give me an internet!

To be or not to be.........is that even a question? Who gets to decide this anyways?

Powered by EzPortal