Skip to content

Commit 15a573e

Browse files
committed
CR purge
1 parent 78be69c commit 15a573e

File tree

15 files changed

+472
-471
lines changed

15 files changed

+472
-471
lines changed

.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text eol=lf
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,62 @@
1-
{
2-
"rom": "84pce_515.rom",
3-
"transfer_files": [
4-
"bin/GRAPHX11.8xp"
5-
],
6-
"target": {
7-
"name": "GRAPHX11",
8-
"isASM": true
9-
},
10-
"sequence": [
11-
"action|launch", "delay|300", "hash|rectangles", "hash|palette_0",
12-
"key|enter", "delay|1000", "hash|palette_25",
13-
"key|enter", "delay|1000", "hash|palette_50",
14-
"key|enter", "delay|1000", "hash|palette_75",
15-
"key|enter", "delay|1000", "hash|palette_100",
16-
"key|enter", "delay|300", "hash|after_exit"
17-
],
18-
"hashes": {
19-
"rectangles": {
20-
"description": "Test rectangles",
21-
"start": "vram_start",
22-
"size": "vram_8_size",
23-
"expected_CRCs": [ "328D511E" ]
24-
},
25-
"palette_0": {
26-
"description": "Test lighten/darken fade, 0% progress",
27-
"start": "lcdPalette",
28-
"size": "8",
29-
"expected_CRCs": [ "41C3BFF8" ]
30-
},
31-
"palette_25": {
32-
"description": "Test lighten/darken fade, 25% progress",
33-
"start": "lcdPalette",
34-
"size": "8",
35-
"expected_CRCs": [ "5F64F889" ]
36-
},
37-
"palette_50": {
38-
"description": "Test lighten/darken fade, 50% progress",
39-
"start": "lcdPalette",
40-
"size": "8",
41-
"expected_CRCs": [ "C48CEF7C" ]
42-
},
43-
"palette_75": {
44-
"description": "Test lighten/darken fade, 75% progress",
45-
"start": "lcdPalette",
46-
"size": "8",
47-
"expected_CRCs": [ "81FEDD4E" ]
48-
},
49-
"palette_100": {
50-
"description": "Test lighten/darken fade, 100% progress",
51-
"start": "lcdPalette",
52-
"size": "8",
53-
"expected_CRCs": [ "B451E096" ]
54-
},
55-
"after_exit": {
56-
"description": "Back to the home screen (exit check)",
57-
"start": "vram_start",
58-
"size": "vram_16_size",
59-
"expected_CRCs": [ "FFAF89BA", "101734A5" ]
60-
}
61-
}
1+
{
2+
"rom": "84pce_515.rom",
3+
"transfer_files": [
4+
"bin/GRAPHX11.8xp"
5+
],
6+
"target": {
7+
"name": "GRAPHX11",
8+
"isASM": true
9+
},
10+
"sequence": [
11+
"action|launch", "delay|300", "hash|rectangles", "hash|palette_0",
12+
"key|enter", "delay|1000", "hash|palette_25",
13+
"key|enter", "delay|1000", "hash|palette_50",
14+
"key|enter", "delay|1000", "hash|palette_75",
15+
"key|enter", "delay|1000", "hash|palette_100",
16+
"key|enter", "delay|300", "hash|after_exit"
17+
],
18+
"hashes": {
19+
"rectangles": {
20+
"description": "Test rectangles",
21+
"start": "vram_start",
22+
"size": "vram_8_size",
23+
"expected_CRCs": [ "328D511E" ]
24+
},
25+
"palette_0": {
26+
"description": "Test lighten/darken fade, 0% progress",
27+
"start": "lcdPalette",
28+
"size": "8",
29+
"expected_CRCs": [ "41C3BFF8" ]
30+
},
31+
"palette_25": {
32+
"description": "Test lighten/darken fade, 25% progress",
33+
"start": "lcdPalette",
34+
"size": "8",
35+
"expected_CRCs": [ "5F64F889" ]
36+
},
37+
"palette_50": {
38+
"description": "Test lighten/darken fade, 50% progress",
39+
"start": "lcdPalette",
40+
"size": "8",
41+
"expected_CRCs": [ "C48CEF7C" ]
42+
},
43+
"palette_75": {
44+
"description": "Test lighten/darken fade, 75% progress",
45+
"start": "lcdPalette",
46+
"size": "8",
47+
"expected_CRCs": [ "81FEDD4E" ]
48+
},
49+
"palette_100": {
50+
"description": "Test lighten/darken fade, 100% progress",
51+
"start": "lcdPalette",
52+
"size": "8",
53+
"expected_CRCs": [ "B451E096" ]
54+
},
55+
"after_exit": {
56+
"description": "Back to the home screen (exit check)",
57+
"start": "vram_start",
58+
"size": "vram_16_size",
59+
"expected_CRCs": [ "FFAF89BA", "101734A5" ]
60+
}
61+
}
6262
}
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,66 @@
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 <lib/ce/graphx.h>
15-
16-
#define color gfx_RGBTo1555(34, 55, 89)
17-
18-
/* Put function prototypes here */
19-
20-
/* Put all your code here */
21-
void main(void) {
22-
uint8_t i = 0;
23-
24-
/* Initialize the 8bpp graphics */
25-
gfx_Begin( gfx_8bpp );
26-
27-
/* For i in 0..255 */
28-
do {
29-
30-
/* Fade out to black */
31-
gfx_palette[0] = gfx_Darken(color, i);
32-
/* Fade in from black */
33-
gfx_palette[1] = gfx_Darken(color, ~i);
34-
/* Fade in from white */
35-
gfx_palette[3] = gfx_Lighten(color, ~i);
36-
/* Fade out to white */
37-
gfx_palette[2] = gfx_Lighten(color, i);
38-
39-
/* Fade out to black */
40-
gfx_SetColor(0);
41-
gfx_FillRectangle_NoClip(0,0,160,120);
42-
/* Fade in from black */
43-
gfx_SetColor(1);
44-
gfx_FillRectangle_NoClip(160,0,160,120);
45-
/* Fade in from white */
46-
gfx_SetColor(2);
47-
gfx_FillRectangle_NoClip(0,120,160,120);
48-
/* Fade out to white */
49-
gfx_SetColor(3);
50-
gfx_FillRectangle_NoClip(160,120,160,120);
51-
52-
/* Wait for a keypress at the start of each quarter of the fade */
53-
if (!(i & 0x3f)) {
54-
while(!os_GetCSC());
55-
}
56-
57-
/* Loop until i is 0 again because of 8 bit range */
58-
} while(++i);
59-
60-
/* Wait for a keypress */
61-
while(!os_GetCSC());
62-
63-
/* Usual cleanup */
64-
gfx_End();
65-
prgm_CleanUp();
66-
}
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 <lib/ce/graphx.h>
15+
16+
#define color gfx_RGBTo1555(34, 55, 89)
17+
18+
/* Put function prototypes here */
19+
20+
/* Put all your code here */
21+
void main(void) {
22+
uint8_t i = 0;
23+
24+
/* Initialize the 8bpp graphics */
25+
gfx_Begin( gfx_8bpp );
26+
27+
/* For i in 0..255 */
28+
do {
29+
30+
/* Fade out to black */
31+
gfx_palette[0] = gfx_Darken(color, i);
32+
/* Fade in from black */
33+
gfx_palette[1] = gfx_Darken(color, ~i);
34+
/* Fade in from white */
35+
gfx_palette[3] = gfx_Lighten(color, ~i);
36+
/* Fade out to white */
37+
gfx_palette[2] = gfx_Lighten(color, i);
38+
39+
/* Fade out to black */
40+
gfx_SetColor(0);
41+
gfx_FillRectangle_NoClip(0,0,160,120);
42+
/* Fade in from black */
43+
gfx_SetColor(1);
44+
gfx_FillRectangle_NoClip(160,0,160,120);
45+
/* Fade in from white */
46+
gfx_SetColor(2);
47+
gfx_FillRectangle_NoClip(0,120,160,120);
48+
/* Fade out to white */
49+
gfx_SetColor(3);
50+
gfx_FillRectangle_NoClip(160,120,160,120);
51+
52+
/* Wait for a keypress at the start of each quarter of the fade */
53+
if (!(i & 0x3f)) {
54+
while(!os_GetCSC());
55+
}
56+
57+
/* Loop until i is 0 again because of 8 bit range */
58+
} while(++i);
59+
60+
/* Wait for a keypress */
61+
while(!os_GetCSC());
62+
63+
/* Usual cleanup */
64+
gfx_End();
65+
prgm_CleanUp();
66+
}

CEdev/lib/src/std/shared/isalnum.asm

+28-28
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
1-
.def _isalnum
2-
.ref ___maptab
3-
.assume adl=1
4-
5-
; original source
6-
; int isalnum(int c) {
7-
; if( (unsigned char)c & (unsigned char)0x80 )
8-
; return (0);
9-
; return(__maptab[c] & (unsigned char)(UC|LC|DIG));
10-
; }
11-
12-
_isalnum:
13-
pop hl
14-
pop de
15-
push de
16-
push hl
17-
or a,a
18-
sbc hl,hl
19-
bit 7,e
20-
ret nz
21-
ex de,hl
22-
ld de,___maptab
23-
add hl,de
24-
ld a,(hl)
25-
and a,13
26-
sbc hl,hl
27-
ld l,a
28-
ret
1+
.def _isalnum
2+
.ref ___maptab
3+
.assume adl=1
4+
5+
; original source
6+
; int isalnum(int c) {
7+
; if( (unsigned char)c & (unsigned char)0x80 )
8+
; return (0);
9+
; return(__maptab[c] & (unsigned char)(UC|LC|DIG));
10+
; }
11+
12+
_isalnum:
13+
pop hl
14+
pop de
15+
push de
16+
push hl
17+
or a,a
18+
sbc hl,hl
19+
bit 7,e
20+
ret nz
21+
ex de,hl
22+
ld de,___maptab
23+
add hl,de
24+
ld a,(hl)
25+
and a,13
26+
sbc hl,hl
27+
ld l,a
28+
ret

CEdev/lib/src/std/shared/isalpha.asm

+27-27
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
1-
.def _isalpha
2-
.ref ___maptab
3-
.assume adl=1
4-
5-
; original source
6-
; int isalnum(int c) {
7-
; if( (unsigned char)c & (unsigned char)0x80 )
8-
; return (0);
9-
; return(__maptab[c] & (unsigned char)(UC|LC));
10-
11-
_isalpha:
12-
pop hl
13-
pop de
14-
push de
15-
push hl
16-
or a,a
17-
sbc hl,hl
18-
bit 7,e
19-
ret nz
20-
ex de,hl
21-
ld de,___maptab
22-
add hl,de
23-
ld a,(hl)
24-
and a,12
25-
sbc hl,hl
26-
ld l,a
27-
ret
1+
.def _isalpha
2+
.ref ___maptab
3+
.assume adl=1
4+
5+
; original source
6+
; int isalnum(int c) {
7+
; if( (unsigned char)c & (unsigned char)0x80 )
8+
; return (0);
9+
; return(__maptab[c] & (unsigned char)(UC|LC));
10+
11+
_isalpha:
12+
pop hl
13+
pop de
14+
push de
15+
push hl
16+
or a,a
17+
sbc hl,hl
18+
bit 7,e
19+
ret nz
20+
ex de,hl
21+
ld de,___maptab
22+
add hl,de
23+
ld a,(hl)
24+
and a,12
25+
sbc hl,hl
26+
ld l,a
27+
ret

0 commit comments

Comments
 (0)