Unicorn wrote:
I recall that there were some problems withe makefile on linux, have those been fixed, Mateo?

No. I know you have Windows installed Unicorn, please just use it for now. (Or you could just change one or 2 lines in the makefile; I was able to do that and get it to build just fine. But I guess I have to fix that on my own because no one else ever will.)

Because of some people's suggestions that the build system should be cleaner for the toolchain, I modified the directory structures and makefiles so that there is a src, obj, and bin directory as the layout for projects, along with a src/gfx folder where you can build graphics and things. ConvPNG and ConvHEX were also updated and placed in the CEdev/bin folder as well, so all you need to do is type 'convpng' at the command line, and boom, you have any sprite you want. Inclusion of an icon supported by Cesium and hopefully DoorsCE later on is now automatic, no need to do any extra work. Anywho, this may be one of the easiest to use C toolchains on the interwebs, so here's the links that provide the information on how to install/update the toolchain/libraries. Enjoy, and let the amazing adventures begin! Smile

C Development SDK: https://github.com/CE-Programming/toolchain/releases/latest
C Standard Libraries: https://github.com/CE-Programming/libraries/releases/latest

Don't forget to comment if you have any ideas/suggestions! Smile

PS: This is a rather important update, so it's a good idea to have it lol Razz
In previous versions, multiple libraries would be specified as such:
L := keypadc graphc

This doesn't seem to work now, though. When I do this, I get the following error:
makece: *** No rule to make target `graphc.obj'

If I switch the order, this is the error:
makece: *** No rule to make target `keypadc.obj'
Cool, thanks Merth! Fixed and updated Smile

Unicorn wrote:
I recall that there were some problems withe makefile on linux, have those been fixed, Mateo?

Yep, I fixed that now too. Running 'make.exe' in order to bypass the gnu make works fine with the makefile. Smile
I've tried compiling two of my different programs and I'm getting similar errors for both:


Code:
make: *** No rule to make target `obj/Catylizm', needed by `bin/CATYLIZM.hex'.  Stop.

and

Code:
make: *** No rule to make target `obj/DX', needed by `bin/DXBALLCE.hex'.  Stop.


I just did a clean install of the toolchain and libraries. It's probably just a dumb mistake, but I can never figure these things out. Razz

It might have something to do with my Makefiles, so:

Makefile for DXBALL
Makefile for Catylizm
Did you break it up into the 3 directory structure, much like it has in the example programs? That might help Smile
So that makefile was fixed for linux? Awesome! now I need to work on that one algorithm...
I got it working. I didn't see that I had to add the CEDEV variable. Razz

Mateo, I'm having issues with the Scaled Sprite Transparent routine. When I put the scaled values at 1, it doesn't display anything. And when I put them any higher than one, it resets the calculator.
I'm experiencing the same problem merthsoft was experiencing in his last post. Sad

Does anyone know how to solve this? Does it have to do with the makefile or something else?


EDIT:
I mangaed to find a workaround, since make can't make a second or third .obj file, simply take it from another obj folder that already has that .obj file. Still, if anyone can fix this problem so it's no longer necessary to do this, please do Smile

EDIT2: Problem has been resolved Smile
The graphics library has been updated to v3, with numerous bug fixes and additions suggested from all of you awesome people here Smile It fixes some bugs with clipped sprites, monospace font, and a few minor things, including crazy optimizations of sprite and other routines. Here is also a list of some new functions, of which you will find descriptions of in the header file:


Code:
gc_ClipCircle();
gc_ClipLine();
gc_ClipDrawBGTilemap();
gc_ClipDrawFGTilemap();
gc_NoClipDrawBGTilemap();
gc_NoClipDrawFGTilemap();
gc_TilePtr();
gc_TilePtrMapped();
gc_LZDecompress();


As you may have noticed, tilemapping support for multiple drawn tilemaps has also been added, along with a demo program (screenshot below) for your enjoyment. gc_LZDecompress is useful for decompressing sprites using ConvPNG 'lz77' compression mode. Clipped lines and Clipped circles have also been added, and greatly improved by at least 5x speedup. Enjoy, and don't forget to report any bugs! Very Happy

For those who are interested, foreground and background tile maps can use 255 as a placeholder index. If thise number is used in a tilemap, it will simply be skipped over to allow for faster rendering times. The tilemap below renders at about 34 fps using the clipped sprite routine, and 44 fps using the unclipped version. It doesn't use direct key input, rather os_GetCSC(), which makes it quite a bit slower than it could be Smile

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

Tilemap demo:


Graphics test:
Awesome \o/
I'll crosspost the good news Smile
MateoConLechuga wrote:
Graphics test:

AHHHHHHHHHHHHHHHH FASTER FASTER FASTAAAAR!!!!!!!!!!!!!!!! Smiling Cat
Found what might be a bug in the line drawing functions




Code:

/* Keep these headers */
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <tice.h>

/* Standard headers - it's recommended to leave them included */
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include "graphc.h"

void main(void) {
   gc_InitGraph();
   gc_DrawScreen();
   gc_SetColorIndex(18);  //blue
   gc_FillScrn(0);
   gc_NoClipLine(0,0,120,120);
   gc_NoClipLine(0,239,119,119);
   gc_NoClipLine(239,0,119,119);
   gc_NoClipLine(239,239,119,119);
   os_GetKey();
   gc_CloseGraph();
   pgrm_CleanUp();
}
Fixed and updated the changes; available here:

https://github.com/CE-Programming/libraries/releases/tag/v3.7

Also patched up your code so it prints what you want, I imagine Smile


Code:
/* Keep these headers */
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <tice.h>

/* Standard headers - it's recommended to leave them included */
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include <lib/ce/graphc.h>

void main(void) {
   gc_InitGraph();
   gc_FillScrn(0);

   gc_SetColorIndex(255);  //white
   gc_NoClipLine(0,0,120,120);
   gc_NoClipLine(0,240,120,120);
   gc_NoClipLine(240,0,120,120);
   gc_NoClipLine(240,240,120,120);

   while(!os_GetCSC());

   gc_CloseGraph();
   pgrm_CleanUp();
}


Because of how the graphc library is progressing, I thought it would be a good time to get input from all of you, in order to create a new and improved version of the library. It would have a similar but different API, one that would be a lot nicer and cleaner, along with documentation along the way. This will mean a move away from graphc, and hopefully it will eventually die off, but of course still be around Razz Feel free to contribute your thoughts, comments and ideas into the handy google docs link below Very Happy

Feel free to post things you like, don't like, think could be easier, etc!

https://docs.google.com/document/d/1IS5AK7ci2pzBDZurJDfPuRuHKHyWQ6xJUYBfiueGcKs/edit?usp=sharing
I have a problem with the new updated libraries. I copied everything into my lib folder. I checked, I have newest version of both, the toolchain and the libraries.

Every program that doesn't use the graphc library works and compiles, but when I try to compile the examples demo_1 and demo_2 from graphc examples it gives me an error.

My batch file for compilation is:


Code:
@echo off
make
pause >nul


The output is:


Code:
C:\CEdev\lib\ce\examples_and_src\graphics\graphics_examples\demo_1\src\main.c
C:\CEDEV\LIB\CE\EXAMPLES_AND_SRC\GRAPHICS\GRAPHICS_EXAMPLES\DEMO_1\SRC\MAIN.C
make: *** [obj/main.obj] Error -1


Then, I modified my batch file, to show more detailed information:


Code:
@echo off
make -n
pause >nul


It showed me this:


Code:
cd obj && \
    "C:\CEdev\bin\eZ80cc" -quiet -define:NDEBUG -define:_EZ80F91 -define:_EZ80 -define: -define:_SIMULATE -NOlistinc -NOmodsect -cpu:EZ80F91 -keepasm -optspeed -NOreduceopt -NOgenprintf -stdinc:".;src\;src\gfx\;C:\CEdev\.;C:\CEdev\include\ce\asm;C:\CEdev\include\ce\c;C:\CEdev\include;C:\CEdev\include\std;C:\CEdev\lib\std\ce;C:\CEdev\lib\ce;C:\CEdev\lib\ce\graphc" -usrinc:"." -NOdebug -asmsw:"-define:_EZ80=1 -define:_SIMULATE=1 -define: -include:.;src\;src\gfx\;C:\CEdev\.;C:\CEdev\include\ce\asm;C:\CEdev\include\ce\c;C:\CEdev\include;C:\CEdev\include\std;C:\CEdev\lib\std\ce;C:\CEdev\lib\ce;C:\CEdev\lib\ce\graphc -NOlist -NOlistmac -pagelen:250 -pagewidth:132 -quiet -sdiopt -warn -NOdebug -NOigcase -cpu:EZ80F91" C:\CEdev\lib\ce\examples_and_src\graphics\graphics_examples\demo_1\src\main.c
cd obj && \
   "C:\CEdev\bin\eZ80asm" -define:_EZ80=1 -define:_SIMULATE=1 -define: -include:.;src\;src\gfx\;C:\CEdev\.;C:\CEdev\include\ce\asm;C:\CEdev\include\ce\c;C:\CEdev\include;C:\CEdev\include\std;C:\CEdev\lib\std\ce;C:\CEdev\lib\ce;C:\CEdev\lib\ce\graphc -NOlist -NOlistmac -pagelen:250 -pagewidth:132 -quiet -sdiopt -warn -NOdebug -NOigcase -cpu:EZ80F91 C:\CEdev\include\ce\asm\cstartup.asm
cd obj && \
   "C:\CEdev\bin\eZ80asm" -define:_EZ80=1 -define:_SIMULATE=1 -define: -include:.;src\;src\gfx\;C:\CEdev\.;C:\CEdev\include\ce\asm;C:\CEdev\include\ce\c;C:\CEdev\include;C:\CEdev\include\std;C:\CEdev\lib\std\ce;C:\CEdev\lib\ce;C:\CEdev\lib\ce\graphc -NOlist -NOlistmac -pagelen:250 -pagewidth:132 -quiet -sdiopt -warn -NOdebug -NOigcase -cpu:EZ80F91 C:\CEdev\include\ce\asm\libheader.asm
cd obj && \
   "C:\CEdev\bin\eZ80cc" -quiet -define:NDEBUG -define:_EZ80F91 -define:_EZ80 -define: -define:_SIMULATE -NOlistinc -NOmodsect -cpu:EZ80F91 -keepasm -optspeed -NOreduceopt -NOgenprintf -stdinc:".;src\;src\gfx\;C:\CEdev\.;C:\CEdev\include\ce\asm;C:\CEdev\include\ce\c;C:\CEdev\include;C:\CEdev\include\std;C:\CEdev\lib\std\ce;C:\CEdev\lib\ce;C:\CEdev\lib\ce\graphc" -usrinc:"." -NOdebug -asmsw:"-define:_EZ80=1 -define:_SIMULATE=1 -define: -include:.;src\;src\gfx\;C:\CEdev\.;C:\CEdev\include\ce\asm;C:\CEdev\include\ce\c;C:\CEdev\include;C:\CEdev\include\std;C:\CEdev\lib\std\ce;C:\CEdev\lib\ce;C:\CEdev\lib\ce\graphc -NOlist -NOlistmac -pagelen:250 -pagewidth:132 -quiet -sdiopt -warn -NOdebug -NOigcase -cpu:EZ80F91" -asm C:\CEdev\lib\ce\graphc\graphc.asm
make: *** No rule to make target `obj/graphc.obj`, needed by `bin/GRAPHC1.hex'.


The bottom line is most important:


Code:
make: *** No rule to make target `obj/graphc.obj`, needed by `bin/GRAPHC1.hex'.


I didn't modify the makefile of the example at all. I'll repeat: I double-checked, I have the newest version of the toolchain and the libraries. Everything compiles normally instead of those two examples demo_1 and demo_2 for graphc library examples.

Thank you for help.
You just need to run convpng from the command line in the gfx directory. Open a command window, navigate to the gfx directory, and type 'convpng', and then press enter. Everything should compile fine after that Smile
It seems that if you add iconc.png into the home directory, when running the program it freezes the calc.

If you run it using Cesium, the same thing happens... Is there something that is needed to be enabled in the makefile?
Hello everyone! Very Happy Please update the SDK and libraries as soon as possible; there are some crucial changes and bugfixes detailed below.

SDK: https://github.com/CE-Programming/toolchain/releases/tag/v4.0
Libraries: https://github.com/CE-Programming/libraries/releases/tag/v4.0

You don't have to read all this, but you can if you want Smile

    Support for the graphc library has ended. The new graphx library has taken the role of graphical routines, along with a new API
    This library is not only easier to use, it also gains some nice speed boosts in places
    There are a total of 17 demos now for the the libraries and toolchain to help you out
    There is even one in the main toolchain for working with the hardware timers, which many of you have been asking about
    ConvPNG has been updated to include support for easy tilemap conversions
    ConvPNG has also been updated to fix a glitch with a pixel in the top left corner of icons
    It also provides support now for automatic conversion of icons; no need to figure out the colors anymore
    The makefile has been adapted to work under wine without any problems
    Assembly files and functions can be directly compiled into the main C code, in case you want to use an assembly routine in your C code
    This isn't new; it's just that no one seems to realize what this means Razz
    I could go on and on, but there's a ton of new stuff, and a ton of things that will make your life easier and better. Happy coding!


The FileIO library has some new functions and version! Here they are:


Code:
char *ti_Detect(void **curr_search_posistion, const char *detection_string);
char *ti_DetectVar(void **curr_search_posistion, const char *detection_string, uint8_t var_type);
char *ti_GetTokenString(void **read_pointer, uint8_t *length_of_token, unsigned *length_of_string);
void *ti_GetDataPtr(const ti_var_t slot);


ti_Detect lets you find any variable by using a search string, very helpful with things like text editors and custom levelmaps Very Happy
Plus now you can read and interpret BASIC programs and strings if you so choose.

The graphics library now has over 70 functions for directly interacting with the LCD. Here they are if you ever wanted to just look at a list Razz
The newer ones that you haven't seen are towards the bottom, with some sprite flipping and rotation routines.


Code:
gfx_Begin
gfx_End
gfx_SetColor
gfx_SetDefaultPalette
gfx_SetPalette
gfx_FillScreen
gfx_SetPixel
gfx_GetPixel
gfx_GetDraw
gfx_SetDraw
gfx_SwapDraw
gfx_Blit
gfx_BlitLines
gfx_BlitArea
gfx_PrintChar
gfx_PrintInt
gfx_PrintUInt
gfx_PrintString
gfx_PrintStringXY
gfx_SetTextXY
gfx_SetTextBGColor
gfx_SetTextFGColor
gfx_SetTextTransparentColor
gfx_SetCustomFontData
gfx_SetCustomFontSpacing
gfx_SetMonospaceFont
gfx_GetStringWidth
gfx_GetCharWidth
gfx_GetTextX
gfx_GetTextY
gfx_Line
gfx_HorizLine
gfx_VertLine
gfx_Circle
gfx_FillCircle
gfx_Rectangle
gfx_FillRectangle
gfx_Line_NoClip
gfx_HorizLine_NoClip
gfx_VertLine_NoClip
gfx_FillCircle_NoClip
gfx_Rectangle_NoClip
gfx_FillRectangle_NoClip
gfx_SetClipRegion
gfx_GetClipRegion
gfx_ShiftDown
gfx_ShiftUp
gfx_ShiftLeft
gfx_ShiftRight
gfx_Tilemap
gfx_Tilemap_NoClip
gfx_TransparentTilemap
gfx_TransparentTilemap_NoClip
gfx_TilePtr
gfx_TilePtrMapped
gfx_LZDecompress
gfx_AllocSprite
gfx_Sprite
gfx_TransparentSprite
gfx_Sprite_NoClip
gfx_TransparentSprite_NoClip
gfx_GetSprite_NoClip
gfx_ScaledSprite_NoClip
gfx_ScaledTransparentSprite_NoClip
gfx_FlipSpriteY
gfx_FlipSpriteX
gfx_RotateSpriteC
gfx_RotateSpriteCC
gfx_RotateSpriteHalf
gfx_Polygon
gfx_Polygon_NoClip
gfx_FillTriangle
gfx_FillTriangle_NoClip


I would like the thank jacobly, Adriweb, grosged, Runer, and calc84 for there help and additions! I think the toolchain has now reached its first stable state, and will probably only be updated to fix bugs amd add features Very Happy
Some things you might want to fix up:

The template Makefile is different from the library example makefiles, which one should we use?
You may want to include the libraries in the lib/ce directory of the toolchain releases.

Also, could we get a larger printstring size?

And these sprites are a little messed up...
Original:

Now:



EDIT: Oh, could it be that I'm using the xlibc palette instead of the custom one? I'll go check that...
Unicorn wrote:
The template Makefile is different from the library example makefiles, which one should we use?
You may want to include the libraries in the lib/ce directory of the toolchain releases....

Oops, that's not right. It should be the one used in the examples. Fixed and updated Smile

Unicorn wrote:
Also, could we get a larger printstring size?

Yep, I'll add that to the feature list.

Unicorn wrote:
And these sprites are a little messed up...
Original:

Now:

EDIT: Oh, could it be that I'm using the xlibc palette instead of the custom one? I'll go check that...

It looks like 1) You are indeed using the xlibc palette instead of setting the custom one, and 2) You still have #TranspColor defined in convpng.ini, which is making the white appear because it doesn't know where else to put it Smile Removing the #TranspColor line and using the palette generated by convpng should solve this problem.

Thanks for the help Unicorn! Very Happy
  
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 ... 5, 6, 7 ... 15, 16, 17  Next
» View previous topic :: View next topic  
Page 6 of 17
» 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