Skip to content

Commit 1629294

Browse files
Add LZ4 decompression test
1 parent c516700 commit 1629294

7 files changed

Lines changed: 98 additions & 1 deletion

File tree

src/makefile.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ LIBLOAD_LIBS ?= $(wildcard $(CEDEV_TOOLCHAIN)/lib/libload/*.lib) $(EXTRA_LIBLOAD
204204
LIBLOAD_LIBS := $(foreach l,$(filter-out %libload.lib,$(LIBLOAD_LIBS)),$(call QUOTE_ARG,$(call FORWARD_PATH,$l)))
205205
endif
206206

207-
# check if there is an icon present that to convert
207+
# check if there is an icon to convert
208208
ifneq ($(ICON_IMG),)
209209
ICON_SRC = $(OBJDIR)/icon.s
210210
ifneq ($(DESCRIPTION),)
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
obj/
2+
bin/
3+
src/gfx/*.c
4+
src/gfx/*.h
5+
src/gfx/*.8xv
6+
.DS_Store
7+
convimg.yaml.lst
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"transfer_files":
3+
[
4+
"bin/DEMO.8xp"
5+
],
6+
"target":
7+
{
8+
"name": "DEMO",
9+
"isASM": true
10+
},
11+
"sequence":
12+
[
13+
"action|launch",
14+
"delay|500",
15+
"hashWait|1",
16+
"key|enter",
17+
"hashWait|2"
18+
],
19+
"hashes":
20+
{
21+
"1":
22+
{
23+
"description": "Test fullscreen image display",
24+
"start": "vram_start",
25+
"size": "vram_8_size",
26+
"expected_CRCs": [ "69A1B0DB" ]
27+
},
28+
"2":
29+
{
30+
"description": "Test program exit",
31+
"start": "vram_start",
32+
"size": "vram_16_size",
33+
"expected_CRCs": [ "FFAF89BA", "101734A5", "9DA19F44", "A32840C8", "349F4775" ]
34+
}
35+
}
36+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# ----------------------------
2+
# Makefile Options
3+
# ----------------------------
4+
5+
NAME = DEMO
6+
ICON = icon.png
7+
DESCRIPTION = "CE C Toolchain Demo"
8+
COMPRESSED = NO
9+
10+
CFLAGS = -Wall -Wextra -Oz
11+
CXXFLAGS = -Wall -Wextra -Oz
12+
13+
# ----------------------------
14+
15+
include $(shell cedev-config --makefile)
97.8 KB
Loading
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
palettes:
2+
- name: global_palette
3+
images: automatic
4+
5+
converts:
6+
- name: background
7+
palette: global_palette
8+
compress: lz4hc
9+
width-and-height: false
10+
images:
11+
- background.png
12+
13+
outputs:
14+
- type: c
15+
include-file: gfx.h
16+
palettes:
17+
- global_palette
18+
converts:
19+
- background
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#include <ti/getcsc.h>
2+
#include <graphx.h>
3+
#include <compression.h>
4+
5+
#include "gfx/gfx.h"
6+
7+
int main(void)
8+
{
9+
gfx_Begin();
10+
11+
gfx_SetPalette(global_palette, sizeof_global_palette, 0);
12+
13+
lz4_Decompress(gfx_vram, background_compressed);
14+
15+
while (!os_GetCSC());
16+
17+
gfx_End();
18+
19+
return 0;
20+
}

0 commit comments

Comments
 (0)