Author Topic: How are apps different?  (Read 10527 times)

0 Members and 1 Guest are viewing this topic.

Offline ZippyDee

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 729
  • Rating: +83/-8
  • Why not zoidberg?
    • View Profile
How are apps different?
« on: May 19, 2011, 03:48:03 pm »
If I wanted to write an app instead of just a normal program, what would I have to do differently? More simply: How different is it from writing a program?
There's something about Tuesday...


Pushpins 'n' stuff...


Offline ben_g

  • Hey cool I can set a custom title now :)
  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1002
  • Rating: +125/-4
  • Asm noob
    • View Profile
    • Our programmer's team: GameCommandoSquad
Re: How are apps different?
« Reply #1 on: May 19, 2011, 03:52:34 pm »
An app has a special header, and i think using 'ret' wouldn't return to the OS, but I'm not sure of that.

O, Almost forgot: an app becomes larger in 'pages', and needs to be signed to transfer to a calc
« Last Edit: May 19, 2011, 03:53:51 pm by ben_g »
My projects
 - The Lost Survivors (Unreal Engine) ACTIVE [GameCommandoSquad main project]
 - Oxo, with single-calc multiplayer and AI (axe) RELEASED (screenshot) (topic)
 - An android version of oxo (java)  ACTIVE
 - A 3D collision detection library (axe) RELEASED! (topic)(screenshot)(more recent screenshot)(screenshot of it being used in a tilemapper)
Spoiler For inactive:
- A first person shooter with a polygon-based 3d engine. (z80, will probably be recoded in axe using GLib) ON HOLD (screenshot)
 - A java MORPG. (pc) DEEP COMA(read more)(screenshot)
 - a minecraft game in axe DEAD (source code available)
 - a 3D racing game (axe) ON HOLD (outdated screenshot of asm version)

This signature was last updated on 20/04/2015 and may be outdated

Offline ZippyDee

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 729
  • Rating: +83/-8
  • Why not zoidberg?
    • View Profile
Re: How are apps different?
« Reply #2 on: May 19, 2011, 03:53:45 pm »
Well I know it has a special header, but I'm talking more about things like knowing 'ret' doesn't return to the OS (if indeed that is true). That would be an important thing to know.
There's something about Tuesday...


Pushpins 'n' stuff...


Offline aeTIos

  • Nonbinary computing specialist
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3915
  • Rating: +184/-32
    • View Profile
    • wank.party
Re: How are apps different?
« Reply #3 on: May 19, 2011, 03:59:37 pm »
You cant use shell routines in your apps, so you have to write them yourself or copy them from the web.
I'm not a nerd but I pretend:

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: How are apps different?
« Reply #4 on: May 19, 2011, 05:25:21 pm »
When you write an app, you have to do some different things to make it run on the calculator.
1. Your code will be running from the $4000-$7FFF page, which means you need to do .org $4000 instead of .org $9D95
2. You need a header, (which you can get from here)
3. You will have to use bcall(_jForceCMDNoChar) or similar to return as the OS jp's to the app, it doesn't call it
4. Most bcall's that take ptr's for inputs won't work if you give them an address in the $4000-$7FFF area. What this means is that you either need to reimplement bcall(_putS) with bcall(_putC), or copy all your strings to ram before displaying them
5. Obviously, don't change port 06 unless you have copied your routine to ram


6. And most importantly, you must compile your program for hex and then sign it, I would highly suggest that you just use spasm and make the output .8xk rather than .8xp. This will save you a lot of trouble.
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 ZippyDee

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 729
  • Rating: +83/-8
  • Why not zoidberg?
    • View Profile
Re: How are apps different?
« Reply #5 on: May 19, 2011, 05:38:37 pm »
Thanks so much for all the information! Sadly, I'm currently on my Mac, and therefore can't run AppHeader.exe. Is there some place I can see a template for app headers and write my own based off of that?
There's something about Tuesday...


Pushpins 'n' stuff...


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: How are apps different?
« Reply #6 on: May 19, 2011, 05:51:01 pm »
This is the default one that it gives you. I would assume that if you change "MYAPP" to your app name it should work.

Code: [Select]
include "ti83plus.inc"

 db 080h, 00Fh
 db 000h, 000h, 000h, 000h
 db 080h, 012h
 db 001h, 004h
 db 080h, 021h
 db 001h
 db 080h, 031h
 db 001h
 db 080h, 048h
 db "MYAPP", 000h, 000h, 000h
 db 080h, 081h
 db 001h
 db 080h, 090h
 db 003h, 026h, 009h, 004h
 db 01Bh, 00Bh, 0AEh, 0F0h
 db 002h, 00Dh, 040h, 0A1h, 06Bh, 099h, 0F6h, 059h, 0BCh, 067h
 db 0F5h, 085h, 09Ch, 009h, 06Ch, 00Fh, 0B4h, 003h, 09Bh, 0C9h
 db 003h, 032h, 02Ch, 0E0h, 003h, 020h, 0E3h, 02Ch, 0F4h, 02Dh
 db 073h, 0B4h, 027h, 0C4h, 0A0h, 072h, 054h, 0B9h, 0EAh, 07Ch
 db 03Bh, 0AAh, 016h, 0F6h, 077h, 083h, 07Ah, 0EEh, 01Ah, 0D4h
 db 042h, 04Ch, 06Bh, 08Bh, 013h, 01Fh, 0BBh, 093h, 08Bh, 0FCh
 db 019h, 01Ch, 03Ch, 0ECh, 04Dh, 0E5h, 075h
 db 080h, 07Fh
 db 000h, 000h, 000h, 000h
 db 000h, 000h, 000h, 000h
 db 000h, 000h, 000h, 000h
 db 000h, 000h, 000h, 000h
 db 000h, 000h, 000h, 000h
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