• Portal Prelude 5 1
Currently:  

Author Topic: Portal Prelude  (Read 253714 times)

0 Members and 1 Guest are viewing this topic.

Offline calc84maniac

  • eZ80 Guru
  • Coder Of Tomorrow
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2912
  • Rating: +471/-17
    • View Profile
    • TI-Boy CE
Re: Portal X
« Reply #180 on: May 05, 2010, 03:45:46 pm »
Yeah, that was actualy ridiculously simple.  When I went into do that, I literaly added a /2 to a single part of the code and it worked ;D it was a real easy fix.  Do you know why the TiOS doesn't let ask program greater than 8126 bytes excecuted tho? It's Little annoying x.x
That is an old issue.
Can be overcome in assembly by relocating some code to some safe to execute ram area. Unfortunately there is no fix because is done in hardware.

Some think it was TI not wanting to let people have APPS in RAM. There are some comments of Michael Vincent notes but I am not really sure if was him giving the theory.
That's just the code execution limit, data can go as far as you want. BB was wondering why TI-OS won't load programs that large at all.
"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman

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: Portal X
« Reply #181 on: May 05, 2010, 03:50:40 pm »
What's the exact limit in Mirage for executable code?

Offline calc84maniac

  • eZ80 Guru
  • Coder Of Tomorrow
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2912
  • Rating: +471/-17
    • View Profile
    • TI-Boy CE
Re: Portal X
« Reply #182 on: May 05, 2010, 05:21:30 pm »
The executable code limit in Mirage (imposed by the hardware limitations) is 8811 bytes. After that you can have as much data as free RAM will allow.
"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman

_player1537

  • Guest
Re: Portal X
« Reply #183 on: May 05, 2010, 05:24:18 pm »
I don't understand how the calculator limits executable code.  Can someone explain that please?

Btw, awesome screen shot, can't wait for the full version :D

Offline calc84maniac

  • eZ80 Guru
  • Coder Of Tomorrow
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2912
  • Rating: +471/-17
    • View Profile
    • TI-Boy CE
Re: Portal X
« Reply #184 on: May 05, 2010, 05:30:55 pm »
If you try to execute code after address $c000 in RAM, the calculator will reboot. Programs are loaded at $9d95, so $c000 - $9d95 = 8811
"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman

_player1537

  • Guest
Re: Portal X
« Reply #185 on: May 05, 2010, 05:35:01 pm »
would you be able to swap the code between everything.  I.E. if you have 7500 bytes of code already executed, could you copy some from after the program and switch it with the code at the beggining?

Offline Builderboy

  • Physics Guru
  • Project Author
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Portal X
« Reply #186 on: May 05, 2010, 05:35:27 pm »
Yikes.  So there is a limit of 8816 bytes of actual game code?  With all the rest of RAM being data?  Then I am going to figure out some serious optimizations because i currently have like 7000 bytes of game code, and if i only have 2000 bytes left to go, then i have about only 1000 bytes left of source to write, and i havent even started on my object system.  So there is absolutely no way around this? D: What about Apps?  I know that axe does not currently support writing to Apps, but is there any method on the comp that can turn Asm programs into Apps?

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: Portal X
« Reply #187 on: May 05, 2010, 05:59:05 pm »
In apps, the limit is 16kB for executable code, but you have to do page swapping for anything after that.  I'm pretty sure you can still do page swapping in regular programs though, but its really hard.

Builderboy, there is a way to reduce the code by about 30-40% using "byte mode" which is something I plan to add later on.  It will allow you to switch into and out of a mode where the parser will read instructions as single byte instructions instead of 2 byte instructions.  This makes these commands about twice as small and twice as fast.  Also, in the next version, I will be adding a new "and" "or" and "xor" for a size reduction when you have Boolean conditions in your expressions (arguments always evaluate to 1 or 0)
___Axe_Parser___
Today the calculator, tomorrow the world!

Offline Builderboy

  • Physics Guru
  • Project Author
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Portal X
« Reply #188 on: May 05, 2010, 06:19:13 pm »
Wow that would be excellent!!  Then i definetaly would be able to finish the engine in the right amount of code :) Or at least continue developing until App support is added ;) Heh dont work too hard on that tho, its not terrible important.

Out of curiosity, what is this byte mode anyway?  And why do expressions take 2 bytes to begin with?

_player1537

  • Guest
Re: Portal X
« Reply #189 on: May 05, 2010, 06:41:50 pm »
I assume by two bytes, he means how numbers are always two bytes, so that it can reach somewhere close to 65000ish.  in single byte mode, it will only be able to go up to 255 (am I right?)

Offline Builderboy

  • Physics Guru
  • Project Author
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Portal X
« Reply #190 on: May 05, 2010, 06:45:26 pm »
Actualy i think he was talking more about the new conditional byte testing maybe?  Not sure.  Either way i always need to have my numbers above 255 since i am doing some high precision math for the physics.  The optimized collision routine also uses 2 byte numbers

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: Portal X
« Reply #191 on: May 05, 2010, 11:25:26 pm »
Is there any solution to work around the 8811 code issue? Like, does the game need to be split into multiple programs to be useable?

Otherwise, the only thing I can think about is that you need to split your game in separate sub programs (archived) and do a TI-BASIC program that launches them with the help of XCOPY or Resource

Offline Builderboy

  • Physics Guru
  • Project Author
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Portal X
« Reply #192 on: May 06, 2010, 01:00:47 am »
I dont think so, you would have to do some fancy code swapping, involving self modifying code or something.  Luckily, its only *code* that has the limit.  Stuff like map/sprite/pic data doesn't count, it can get as large as RAM allows apparently.

My program has such a large number of If statements right now though, that the code should be reduced significantly once the new version is out.  I also did some optimizing and managed to cut off 200 bytes of fat :O and more is still coming!  Mayhaps me and Quigibo will have an optimizing party ;D

Offline mapar007

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 550
  • Rating: +28/-5
  • The Great Mata Mata
    • View Profile
Re: Portal X
« Reply #193 on: May 06, 2010, 12:22:36 pm »
You can make some stuff use only relative jumps, copy it to some system ram area, and execute there.

Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: Portal X
« Reply #194 on: May 06, 2010, 05:03:37 pm »
This looks incredible!  Awesome work Builderboy! ;D