File tree Expand file tree Collapse file tree 8 files changed +353
-272
lines changed Expand file tree Collapse file tree 8 files changed +353
-272
lines changed Original file line number Diff line number Diff line change
1
+ {
2
+ "rom" : " 84pce_515.rom" ,
3
+ "transfer_files" : [
4
+ " bin/DEMO.8xp"
5
+ ],
6
+ "target" : {
7
+ "name" : " DEMO" ,
8
+ "isASM" : true
9
+ },
10
+ "sequence" : [
11
+ " action|launch" ,
12
+ " delay|300" ,
13
+ " hash|1" ,
14
+ " key|enter" ,
15
+ " delay|300" ,
16
+ " hash|2" ,
17
+ " delay|300" ,
18
+ " key|enter" ,
19
+ " delay|300"
20
+ ],
21
+ "hashes" : {
22
+ "1" : {
23
+ "description" : " A black star outline is drawn to the screen" ,
24
+ "start" : " vram_start" ,
25
+ "size" : " vram_8_size" ,
26
+ "expected_CRCs" : [ " 7EA01B1B" ]
27
+ },
28
+ "2" : {
29
+ "description" : " The rest of the screen will be filled a solid black" ,
30
+ "start" : " vram_start" ,
31
+ "size" : " vram_8_size" ,
32
+ "expected_CRCs" : [ " 4CECC590" ]
33
+ }
34
+ }
35
+ }
Original file line number Diff line number Diff line change
1
+ # ----------------------------
2
+
3
+ # Change TARGET to specify the output program name
4
+ # Change DEBUGMODE to "DEBUG" in order to compile debug.h functions in, and "NDEBUG" to not compile debugging functions
5
+ # Change ARCHIVED to "YES" to mark the output as archived, and "NO" to not
6
+ # Change ICONPNG to change the name of the png file that should be made into the icon
7
+ # Change DESCRIPTION to modify what is displayed within a compatible shell (Not compiled in if icon is not present)
8
+ # Change COMPRESSED to change if the output program should be a self extracting archive (usually reduces program size)
9
+
10
+ # ----------------------------
11
+ TARGET ?= DEMO
12
+ DEBUGMODE ?= NDEBUG
13
+ ARCHIVED ?= NO
14
+ COMPRESSED ?= NO
15
+ # ----------------------------
16
+ ICONPNG ?= iconc.png
17
+ DESCRIPTION ?= "C Demo"
18
+ # ----------------------------
19
+
20
+ # Add shared library names to the L varible, for instance:
21
+ # L := graphx fileioc keypadc
22
+ L := graphx
23
+
24
+ # These directories specify where source and output should go
25
+
26
+ # ----------------------------
27
+ SRCDIR := src
28
+ OBJDIR := obj
29
+ BINDIR := bin
30
+ GFXDIR := src/gfx
31
+ # ----------------------------
32
+
33
+ # This changes the location of compiled output (Advanced)
34
+
35
+ # ----------------------------
36
+ BSSHEAP_LOW := D031F6
37
+ BSSHEAP_HIGH := D13FD6
38
+ STACK_HIGH := D1A87E
39
+ INIT_LOC := D1A87F
40
+ # ----------------------------
41
+
42
+ # Use the (slower) OS embedded functions (Advanced)
43
+
44
+ # ----------------------------
45
+ USE_FLASH_FUNCTIONS ?= YES
46
+ # ----------------------------
47
+
48
+ include $(CEDEV ) /include/.makefile
Original file line number Diff line number Diff line change
1
+ ### GraphX Flood Fill Demo
2
+
3
+ This example demonstrates using the flood fill algorithim implemented in GraphX
4
+
5
+ ---
6
+
7
+ This demo is a part of the C SDK Toolchain for use on the CE.
8
+
Original file line number Diff line number Diff line change
1
+ /* Keep these headers */
2
+ #include <stdbool.h>
3
+ #include <stddef.h>
4
+ #include <stdint.h>
5
+ #include <tice.h>
6
+
7
+ /* Standard headers - it's recommended to leave them included */
8
+ #include <math.h>
9
+ #include <stdio.h>
10
+ #include <stdlib.h>
11
+ #include <string.h>
12
+
13
+ /* Shared libraries */
14
+ #include <libs/graphx.h>
15
+
16
+ /* Put function prototypes here */
17
+
18
+ /* Put all your code here */
19
+ void main (void ) {
20
+ int pts [10 ], i ;
21
+
22
+ int rx = 100 ;
23
+ int ry = 100 ;
24
+ int cx = LCD_WIDTH / 2 ;
25
+ int cy = LCD_HEIGHT / 2 ;
26
+
27
+ /* Build the corridinates of the polygon */
28
+ double theta = - M_PI / 2 ;
29
+ double dtheta = 4 * M_PI / 5 ;
30
+ for (i = 0 ; i < 5 * 2 ; i += 2 ) {
31
+ pts [i ] = (int )(cx + rx * cos (theta )),
32
+ pts [i + 1 ] = (int )(cy + ry * sin (theta ));
33
+ theta += dtheta ;
34
+ }
35
+
36
+ /* Initialize the 8bpp graphics */
37
+ gfx_Begin ( gfx_8bpp );
38
+
39
+ /* Set up the palette */
40
+ gfx_SetColor ( gfx_black );
41
+
42
+ /* Draw a polygon on the buffer */
43
+ gfx_Polygon (pts , 5 );
44
+
45
+ /* Pause */
46
+ while ( !os_GetCSC () );
47
+
48
+ /* Flood fill the rest of the screen */
49
+ gfx_FloodFill (0 , 0 , 0 );
50
+
51
+ /* Pause */
52
+ while ( !os_GetCSC () );
53
+
54
+ /* Close the graphics and return to the OS */
55
+ gfx_End ();
56
+ prgm_CleanUp ();
57
+ }
Original file line number Diff line number Diff line change 5
5
# set NAME to the name of the library
6
6
# set SRC to the assembly source of the library
7
7
NAME := fileioc
8
- SRC := fileioc.asm
8
+ VARN := FILEIOC
9
9
10
10
# defult locations
11
11
SPASM ?= spasm
@@ -33,6 +33,7 @@ CP = cp
33
33
PREFIX ?= $(HOME )
34
34
endif
35
35
36
+ SRC += $(NAME ) .asm
36
37
DEV ?= $(call NATIVEPATH,$(PREFIX ) /CEdev)
37
38
BIN ?= $(call NATIVEPATH,$(DEV ) /bin)
38
39
@@ -46,7 +47,7 @@ EZSRC = $(wildcard *.src)
46
47
TBL = relocation_table
47
48
48
49
LIB_LIB := $(NAME ) .lib
49
- LIB_8XV := $(NAME ) .8xv
50
+ LIB_8XV := $(VARN ) .8xv
50
51
LIB_ASM := $(NAME ) _header.asm
51
52
LIB_JMP := $(NAME ) _equates.asm
52
53
LIB_H := $(NAME ) .h
@@ -71,7 +72,7 @@ $(LIB_LIB): $(LIB_LIB)($(EZSRC:.src=.obj))
71
72
$(RM ) $<
72
73
73
74
clean :
74
- $(RM ) $(LIB_8XV ) $(LIB_LIB ) $(LIB_8XV ) $( LIB_ASM ) $(LIB_JMP ) $(EZOBJ ) $(EZSRC ) $(TBL )
75
+ $(RM ) $(LIB_8XV ) $(LIB_LIB ) $(LIB_ASM ) $(LIB_JMP ) $(EZOBJ ) $(EZSRC ) $(TBL )
75
76
76
77
install :
77
78
$(CP ) $(LIB_H ) $(H_LOC )
You can’t perform that action at this time.
0 commit comments