Author Topic: Getting around the 8000 limit without using apps  (Read 14461 times)

0 Members and 2 Guests are viewing this topic.

Offline Raylin

  • Godslayer
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1392
  • Rating: +83/-25
  • I am a certifiable squirrel ninja.
    • View Profile
    • Ray M. Perry
Re: Getting around the 8000 limit without using apps
« Reply #15 on: March 11, 2011, 12:11:18 pm »
Lol nice, although your signature doesn't state anything about how you got a TI-73 running a 83+OS ???

BrandonW isn't finished with it yet. :c

@ralphdspam: What Deep Thought said is correct. You can have a lot of data behind the 8K limit and it will still run fine.
Bug me about my book.

Sarah: TI-83 Plus Silver Edition [OS 1.19]
Cassie: TI-86 [OS 1.XX]
Elizabeth: TI-81 [OS 1.XX]
Jehuty: TI-83 Plus Silver Edition [OS 1.19]
Tesla: CASIO Prizm







Offline Compynerd255

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 336
  • Rating: +53/-4
  • Betafreak Games
    • View Profile
    • Betafreak Games
Re: Getting around the 8000 limit without using apps
« Reply #16 on: March 11, 2011, 06:34:18 pm »
What Deep Thought said is correct. You can have a lot of data behind the 8K limit and it will still run fine.
Phew. I still have 2000 or so bytes left then. I should have little trouble keeping under that limit. If needs be, I will dive into the code and optimize it to death.
The Slime: On Hold, preparing to add dynamic tiles

Axe Eitrix: DONE

Betafreak Games: Fun filled games for XBox and PC. Check it out at http://www.betafreak.com



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: Getting around the 8000 limit without using apps
« Reply #17 on: March 11, 2011, 06:43:53 pm »
What Deep Thought said is correct. You can have a lot of data behind the 8K limit and it will still run fine.
Phew. I still have 2000 or so bytes left then. I should have little trouble keeping under that limit. If needs be, I will dive into the code and optimize it to death.

However, Axe mixes data with some of its own routines, so you'd still have to keep it under the 8811 byte limit if you're using Axe. Or you could use custom data storage, but it's slower.




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: Getting around the 8000 limit without using apps
« Reply #18 on: March 12, 2011, 02:39:54 am »
The trick is to really hard-code as fewer things as possible. For example in a RPG, don't write code for one magic spell, another piece of code for another, etc, and don't hard code NPC movement during cutscenes. Instead, store those in appvars and write a small program that processes the data.

Offline thepenguin77

  • z80 Assembly Master
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1594
  • Rating: +823/-5
  • The game in my avatar is bit.ly/p0zPWu
    • View Profile
Re: Getting around the 8000 limit without using apps
« Reply #19 on: March 12, 2011, 10:27:02 pm »
Alternatively, to break all these cool ideas, copy all of ram page 0 to ram page 3 and swap it into $C000 to $FFFF. That way, since page 3 is odd, you won't get the ram clear but you will still have the code, and when you're done. Copy everything back onto page 0 and put it back in it's place.

Of course this wouldn't work on a 83+BE, so carry on.
zStart v1.3.013 9-20-2013 
All of my utilities
TI-Connect Help
You can build a statue out of either 1'x1' blocks or 12'x12' blocks. The 1'x1' blocks will take a lot longer, but the final product is worth it.
       -Runer112

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: Getting around the 8000 limit without using apps
« Reply #20 on: March 12, 2011, 11:57:13 pm »
Of course this wouldn't work on a 83+BE, so carry on.

Great how nothing works for me :(




Offline chickendude

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 817
  • Rating: +90/-1
  • Pro-Riot Squad
    • View Profile
Re: Getting around the 8000 limit without using apps
« Reply #21 on: June 06, 2012, 07:26:58 am »
I'm having trouble with the 8.8k limit and don't have any executable code after this. Running from Mirage works fine, but the homescreen gives me an error ("ERR: INVALID"). The data isn't even used in the program yet. Any ideas?

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: Getting around the 8000 limit without using apps
« Reply #22 on: June 06, 2012, 10:38:34 am »
The limit for programs run from the home screen is actually 8,192 bytes (not 8811) because TI decided to play it really safe, losing you another 600-something bytes in the process. This is just a simple check done by the OS before running an assembly program, so all shells will happily ignore the limit.
« Last Edit: June 06, 2012, 10:39:40 am by Deep Thought »




Offline thepenguin77

  • z80 Assembly Master
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1594
  • Rating: +823/-5
  • The game in my avatar is bit.ly/p0zPWu
    • View Profile
Re: Getting around the 8000 limit without using apps
« Reply #23 on: June 06, 2012, 01:23:12 pm »
The limit for programs run from the home screen is actually 8,192 bytes (not 8811) because TI decided to play it really safe, losing you another 600-something bytes in the process. This is just a simple check done by the OS before running an assembly program, so all shells will happily ignore the limit.

Agreed

If you want to continue running said program from the homescreen, you'll either need to use DCS's run from home, or zStart's run from home. (The link to zStart is in my sig ;D)
zStart v1.3.013 9-20-2013 
All of my utilities
TI-Connect Help
You can build a statue out of either 1'x1' blocks or 12'x12' blocks. The 1'x1' blocks will take a lot longer, but the final product is worth it.
       -Runer112

Offline chickendude

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 817
  • Rating: +90/-1
  • Pro-Riot Squad
    • View Profile
Re: Getting around the 8000 limit without using apps
« Reply #24 on: June 07, 2012, 11:34:04 am »
Cool, i never knew about that "feature", thanks for the info. I decided to just write a little launcher to not have to load up DCS/Mirage/zStart every time i want to test it out, it doesn't delete the allocated memory afterwards so i guess it's just for emulators, but:
Code: [Select]
#include "includes/ti83plus.inc"
#include "includes/ion.inc"
.org progstart-2
.db t2ByteTok, tasmCmp

ld hl,debut_routine
ld de,gbuf
ld bc,fin_routine-debut_routine
ldir
jp gbuf

debut_routine:
ld  hl,programme_a_executer
rst 20h ;mov9toop1
bcall(_ChkFindSym)
push de ;de = debut du data
ex de,hl
ld a,(hl)
inc hl
ld h,(hl)
ld l,a ;premiers deux octets = taille du programme
ld de,$9D95 ;charger a $9d95
push hl
bcall(_InsertMem)
pop bc ;taille du programme dans bc
pop hl
inc hl
inc hl
inc hl
inc hl ;sauter la taille du programme et deux autres octets que je ne sais pas ce'qu'ils font
ld de,$9D95
ldir ;ldir "bc" fois
call $9D95
ret
programme_a_executer:
.db ProgObj,"PROGRAM",0
fin_routine:

And now everything is (or appears to be) running fine :)

Offline thepenguin77

  • z80 Assembly Master
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1594
  • Rating: +823/-5
  • The game in my avatar is bit.ly/p0zPWu
    • View Profile
Re: Getting around the 8000 limit without using apps
« Reply #25 on: June 07, 2012, 12:45:40 pm »
Congratulations, you just made your first shell.
zStart v1.3.013 9-20-2013 
All of my utilities
TI-Connect Help
You can build a statue out of either 1'x1' blocks or 12'x12' blocks. The 1'x1' blocks will take a lot longer, but the final product is worth it.
       -Runer112

Offline TheMachine02

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 452
  • Rating: +105/-0
  • me = EF99+F41A
    • View Profile
Re: Getting around the 8000 limit without using apps
« Reply #26 on: June 07, 2012, 01:00:06 pm »
Yes, congratulation....  errr..... what?? this is a shell ??????
« Last Edit: June 07, 2012, 01:00:41 pm by TheMachine02 »
AXE/asm programmer - unleash the power of z80 //C++//C

epic 3D things http://www.ntu.edu.sg/home/ehchua/programming/opengl/CG_BasicsTheory.html

Offline thepenguin77

  • z80 Assembly Master
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1594
  • Rating: +823/-5
  • The game in my avatar is bit.ly/p0zPWu
    • View Profile
Re: Getting around the 8000 limit without using apps
« Reply #27 on: June 07, 2012, 02:21:20 pm »
A shell's job is to run other program (especially ones that can't run themselves) and that is exactly what his program does. Although it only runs one program, it's still technically a shell.

I noticed it more from a code standpoint. "bcall(_insertMem)" and "call $9D95" are dead giveaways of a shell.
zStart v1.3.013 9-20-2013 
All of my utilities
TI-Connect Help
You can build a statue out of either 1'x1' blocks or 12'x12' blocks. The 1'x1' blocks will take a lot longer, but the final product is worth it.
       -Runer112

Offline TheMachine02

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 452
  • Rating: +105/-0
  • me = EF99+F41A
    • View Profile
Re: Getting around the 8000 limit without using apps
« Reply #28 on: June 07, 2012, 02:30:07 pm »
 Yes....
 it is a shell... (a little shell)   ;D
« Last Edit: June 07, 2012, 02:30:39 pm by TheMachine02 »
AXE/asm programmer - unleash the power of z80 //C++//C

epic 3D things http://www.ntu.edu.sg/home/ehchua/programming/opengl/CG_BasicsTheory.html

Offline chickendude

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 817
  • Rating: +90/-1
  • Pro-Riot Squad
    • View Profile
Re: Getting around the 8000 limit without using apps
« Reply #29 on: June 08, 2012, 01:22:50 am »
Haha thanks. By the way, this will only let the program use up half the RAM, right?