Login [Register]
Don't have an account? Register now to chat, post, use our tools, and much more.
The toolchain and libraries have been updated; this is a rather nice one so I would recommend getting it as soon as you can to make your life easier:

https://github.com/CE-Programming/toolchain/releases/latest
https://github.com/CE-Programming/libraries/releases/latest

It should fix all of the reported issues and everything like that; and the graphx library has been updated to v2, and ConvPNG got some better compression techniques. Also, text can now be scaled in both width and height directions separately, which is rather neat. In demo_5 of the graphx examples, you will find ways of how to do compression with individual sprites and text scaling, and in demo_7 you will find compression of tilemaps and how to extract them. Keep in mind the limited space to extract sprites into; it isn't necessary to compress *every* sprite Razz



EDIT: Oh, also, the toolchain will now add the url link to get the C libraries if the user doesn't have them. You may want to recompile your projects just for that Razz

http://tiny.cc/clibs
A few crucial bug fixes reported by Rico have been fixed and updated in the respective library binaries download. Be sure to grab them from here:
https://github.com/CE-Programming/libraries/releases/latest

Also, always be sure to have the latest toolchain download as well Smile
https://github.com/CE-Programming/toolchain/releases/latest
I think I just found a bug in graphx.h. I was compiling and fixing my train program, and when I finally finished getting all the errors fixed, it gave me errors in graphx.h at this area:

Code:
void gfx_LZDecompress(uint8_t *in, uint8_t *out, size_t in_size);

At size_t, it gives a syntax error, and it says the function defaults to int, or it may be saying in_size defaults to int. I can't tell. I think it might be because size_t isn't defined. Idk though. It's the only place size_t is used in the entire header.
I added this to the top of the header and it solved the problem:

Code:
typedef unsigned int size_t;
This is awesome! Can anyone recommend a good C tutorial? Also, is documentation for CE-specific stuff in the download?
ACagliano wrote:
This is awesome! Can anyone recommend a good C tutorial? Also, is documentation for CE-specific stuff in the download?


Indeed it is awesome!

For a tutorial, I guess this? http://www.tutorialspoint.com/cprogramming/ When I started learning I referenced that and this http://www.cprogramming.com/tutorial/c-tutorial.html

And the documentation is under lib/ce/ in the toolchain https://github.com/CE-Programming/toolchain/tree/master/CEdev/lib/ce
The toolchain has been updated; this time to fix issues with ti_Seek in both the header definition and the library binary. This just requires a redownload of the toolchain and libraries, found below:

Toolchain: https://github.com/CE-Programming/toolchain/releases/latest
Libraries: https://github.com/CE-Programming/libraries/releases/latest

There is also a known issue about the gfx_Shift commands; so please do not use them until they can be repaired in the binary. Thanks for the bug reports and feedback everyone! Smile
Is there a way you can, in a script, return a link to the most recent CEdev.zip and clibraries.zip? I'm trying to make myself an updater script.

Also is there somewhere a list of system calls and stuff you can use on the CE? Stands to reason things like printf() wont actually interact with the screen?
ACagliano wrote:
Is there a way you can, in a script, return a link to the most recent CEdev.zip and clibraries.zip? I'm trying to make myself an updater script.

Via GitHub, no. However, I also host the latest downloads on a different site; so here are the URLs for that:

CEdev.zip: http://myimages.wikidot.com/local--files/start/CEdev.zip
clibraries.zip: http://myimages.wikidot.com/local--files/start/clibraries.zip
Yes via the GitHub API, for easy access :
https://api.github.com/repos/CE-Programming/toolchain/releases
then simply look at the url property of the first asset.

(or do like the simple "hack" I coded in CEmu which is to see where the .../releases/latest url wants to redirect you (== latest tag version)
So I keep getting this syntax error at line 112 of the graphx.h header. It's in them middle of white space and if I delete the white space and the comment so nothing exists there, it still gives an error where nothing exists. Kinda weird.
seanlego23 wrote:
So I keep getting this syntax error at line 112 of the graphx.h header. It's in them middle of white space and if I delete the white space and the comment so nothing exists there, it still gives an error where nothing exists. Kinda weird.

Kind of hard to fix when I have no idea what the error message says or what code is causing it to appear Wink
I'll re-download the tool chain and see if it fixes anything tonight. Hopefully that will fix it. If not, this post will be edited with more information.

Code:
C:\CEdev\Projects\AmericanRails>make
C:\CEdev\Projects\AmericanRails\src\mainscreen.c
C:\CEDEV\.\LIB\CE\GRAPHX.H      (112,25) :      ERROR (100) Syntax error
make: *** [obj/mainScreen.obj] Error -1

There's the error.

Code:
typedef struct gfx_tilemap {
   uint8_t *map;             /* pointer to indexed map array */
   gfx_image_t **tiles;          /* pointer to tiles */
   uint8_t tile_height;      /* individual tile height */
   uint8_t tile_width;       /* individual tile width */
   uint8_t draw_height;      /* number of rows to draw in the tilemap */
   uint8_t draw_width;       /* number of cols to draw tilemap */
   uint8_t type_width;       /* 2^type_width = tile_width */
   uint8_t type_height;      /* 2^type_height = tile_height */
   uint8_t height;           /* total number of rows in the tilemap */
   uint8_t width;            /* total number of cols in the tilemap */
   uint8_t y_loc;            /* y pixel location to begin drawing at */
   uint24_t x_loc;           /* x pixel location to begin drawing at */
} gfx_tilemap_t;

The error takes place 3 spaces after uint8_t *map;
I don't understand how you have an error in the middle of whitespace.
I think you should create 2 I/O functions. One is like sscanf() where it would use 2 different LUT's to determine what character to print out in a printf() like function. Why two different LUT's, in case they press alpha and it switches from characters to numbers. It could also take input from cursor position commands as to where to put the cursor that is either set to alpha or not, and have the option to turn the cursor off. Then the printf() like function would print the character exactly where the cursor was for the sscanf() like function or it could have the option of printing it at certain coordinates.
To me this sounds like a great idea, but it would be hard to create them.
So KingInfinity and I spoke today about a very nice feature for the C SDK or a new library, and it's something like an API. It would be very nice if you could call a C program from either an ASM or a BASIC program (using Parser Hook), and also add some arguments. Like, in BASIC, it would be CallPrgm(EXAMPLE,A,B,Str0), that calls prgmEXAMPLE, and with the arguments A, B and Str0. The new library can then read the arguments, and process them, just like everything else. Also, calling it from ASM seems like a good option, where (ix+*) contains the arguments for example.
KingInfinity had the idea to make a shell or so for it, and run C program by typing for example "RUN EXAMPLE -A -B -E" if it exists. Maybe he could explain this a bit more.

Hope to get your thought about this @Mateo Smile
A good idea is a C compiler that is on-calc, maybe compiling from an appvar from the Notes program for the CE
So, how goes fixing the Screen Shifting commands? Last I hear they were fixed, if so, how long till a release? I really want to get experimenting with them for my Doodle Jump clone.
A list of the bugs fixed and repaired is detailed in this commit message. Please be sure to download the latest release of the toolchain and libraries; there's a lot of important fixes and changes. This doesn't affect any backwards compatibility as far as I am aware of, which is nice.

Keep in mind that the header files for everything is now in CEDev\include\lib\ce and CEDev\include\lib\std

Anywho, here's the links for downloading the toolchain and libraries:

Toolchain: https://github.com/CE-Programming/toolchain/releases/latest
Libraries: https://github.com/CE-Programming/libraries/releases/latest

Huge kudos to jacobly for fixing and optimizing many of the things Smile He did a great job and made my life a lot easier.

This fixes the screen shifting commands @Unicorn. But I wouldn't recommend using them for Doodle Jump CE.

PT_ wrote:
So KingInfinity and I spoke today about a very nice feature for the C SDK or a new library, and it's something like an API. It would be very nice if you could call a C program from either an ASM or a BASIC program (using Parser Hook), and also add some arguments. Like, in BASIC, it would be CallPrgm(EXAMPLE,A,B,Str0), that calls prgmEXAMPLE, and with the arguments A, B and Str0. The new library can then read the arguments, and process them, just like everything else. Also, calling it from ASM seems like a good option, where (ix+*) contains the arguments for example.
KingInfinity had the idea to make a shell or so for it, and run C program by typing for example "RUN EXAMPLE -A -B -E" if it exists. Maybe he could explain this a bit more.

Hope to get your thought about this @Mateo

Yes; if you would like to, the C startup module is available for editing to be able to change the prototype of main. Simply create a new one and link it to that from the main_makefile module. I can't really tell you how want to implement this, but it is possible, if a bit awkward.
Haha, thanks for the updates!

And now that we have talked about using the shifting routines, I have realized it is better to have a changing x value, instead. Smile

Great job, anyhow! Very Happy
Rico pointed out that using the hardware timers without restoring the timer 3 before exiting the program caused the calculator to not be able to receive files unless it was restarted. Simple fix; it does require a recompile of the C program though. Also, token definitions have been added to the end of tice.h Smile

Download: https://github.com/CE-Programming/toolchain/releases/latest
  
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
» Goto page Previous  1, 2, 3 ... 8, 9, 10 ... 13, 14, 15  Next
» View previous topic :: View next topic  
Page 9 of 15
» All times are GMT - 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