Hey everybody,

I'd like to know how to create an app, using the dcs_sdk software.
I know you've gotta make a header and replace the "strange" routines like _PutS. On the 32-bit compiler, you had to make another batchfile, so do you have to do the same for this compiler? Or does it have another trick up its sleeve? (hehe, I had to learn that idiomXD)

Greetings, Arriopolis.
Arrio, well, the main tool at your disposal here is Brass, which is perfectly capable of creating applications. You just need a slightly different header on your source code files, and a slightly different compile.bat batch file. I (of course) have examples of both from Doors CS if you'd like me to share.
Does anyone have an app compile bat?
For windows 64bit, with dcs_sdk.
I would like to have that so I can start making apps.

oguh
Please do share Kerm. I was going to ask for the header info myself. Also, are there any particular coding caveats that we should know about...stuff that must be done differently in apps, or bcalls that should be avoided, ect?
One thing that you have to do differently in app development is to copy data that is used for BCALLs to RAM. This is important if you want to display a string, for example. If the data is located inside your app, the BCALL can't read it since the BCALL is on a different flash page, which is why you need to copy it to RAM.
souvik1997 wrote:
One thing that you have to do differently in app development is to copy data that is used for BCALLs to RAM. This is important if you want to display a string, for example. If the data is located inside your app, the BCALL can't read it since the BCALL is on a different flash page, which is why you need to copy it to RAM.


I would be using the DCS_GUI API for my text display and graphics. Any issues with using the DCS_GUI API in an app?
You can't use any Doors CS calls in an app since your app would be on a different flash page than what Doors CS is on. (well, you _may_ be able to use Doors CS calls, but it would be hard because it involves page swapping and copying data to RAM).
Another thing to remember in Apps is the presence of pages. Each page is 16K, so you're forced to write code that correlates together on similar pages -- flipping pages is slow (not like a few seconds, but it can ruin something like grayscale or drop your program a few FPS if you use it in a loop) so try to copy every scrap of data you can to RAM and dispose of RAM as you please instead of going the easy flipping route Smile
Exactly what they have said. If you want to use DCS calls, it is probably better for you to just restrict yourself to 8kb than trying to do page flips among other things. From the sounds of it, your Slideshow program shouldn't need 16kb _to run_, so I think you should be fine.
Also, to exit an app, you have to use B_JUMP(_JForceCMDNoChar) or B_CALL(_JForceCMDNoChar) instead of ret, since the app is jumped to rather than called from the TIOS.
I read that b_call(_PutS) doesn't work in apps, but b_call(_PutC) does. Why is this? And how do I know which b_calls do work when using an app?
arriopolis wrote:
I read that b_call(_PutS) doesn't work in apps, but b_call(_PutC) does. Why is this? And how do I know which b_calls do work when using an app?


Because when _PutS is BCALLed, the OS swaps it into the second bank (0x4000-0x7FFF), which is where your application is. If you pass a pointer to your string in HL which resides on your application's page (in 0x4000-0x7FFF), and then BCALL _PutS, you've swapped out the page your string data is on (your application page) in order to call the _PutS code.

The solution there is to replace it with your own equivalent routine (a loop of _PutC for each character in your string), or copy your string data to RAM (0x8000-0xFFFF), which will still be intact when your application page is swapped out for _PutS'.
Kerm, could you please share the compile.bat file I could use for developing apps? I'm currently working with arriopolis on a science program, which is already 11380 bytes in size. We've decided to make an app out of is, but don't know how to do so.
Thanks in advance
oguh wrote:
Kerm, could you please share the compile.bat file I could use for developing apps? I'm currently working with arriopolis on a science program, which is already 11380 bytes in size. We've decided to make an app out of is, but don't know how to do so.
Thanks in advance
Oguh, I'd recommend first trying to see if you can do some extreme optimizations, but failing that, here's the batch file that I use for my apps:


Code:
@echo off

set ASM83DIR=C:\Users\Christ~1\Documents\DCS7Dev\
set BrASSDIR=C:\Users\Christ~1\Documents\DCS7Dev\
if "%TI83PLUSDIR%" == "" goto notdefined
goto alreadydefined
:notdefined
echo Defining Environment Variable TI83PLUSDIR=%cd%
set TI83PLUSDIR=%cd%
:alreadydefined

cd %2

call %ASM83DIR%_getall.bat

echo ----- Assembling %1 for TI-83 Plus APP...
echo #define TI83P >temp.asm
echo #define APP >>temp.asm
if exist %1.z80 echo #include "%1.z80" >>temp.asm
if exist %1.asm echo #include "%1.asm" >>temp.asm
%BRASSDIR%brass temp.asm %1.bin -l dcs6.html
if errorlevel 1 goto ERRORS
goto DONE

del %1.8xk

%ASM83DIR%wabbitsign\wabbit %1.bin %1.8xk
REM %ASM83DIR%bintointelhex -o %1.hex %1.bin -e
REM call %TI83PLUSDIR%\utils\appsign.bat %TI83PLUSDIR%\utils\0104.key %1.hex

echo ----- Success!
echo TI-83 Plus APP version is %1.8xk
goto DONE
:ERRORS
echo ----- There were errors.
goto DONE
:DONE

rem If you want to keep any of the intermediate files, comment out these deletions

del temp.asm > nul
rem del %1.hex > nul
rem del %1.app > nul
rem del testing.txt > nul
del %1.bin > nul

call %ASM83DIR%_cleanall.bat
cd %ASM83DIR%
set ASM83DIR=

:Done2
It requires Brass and the WabbitSign application, of course.
Kerm, Thanks for the bat-file. I have tried to compile but cmd returns that I haven't the WabbitSign_getall.bat. Do you know how I can fix this problem?
Thanks in advance.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement