Skip to content

Commit 78f51bb

Browse files
20x30 char resolution
1 parent b8c4e60 commit 78f51bb

File tree

5 files changed

+129
-5
lines changed

5 files changed

+129
-5
lines changed
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
#include <cx16.h>
2+
#include "standard_libs.h"
3+
4+
#include "8x8_chars.h"
5+
6+
#include "udg_map.h"
7+
8+
9+
#define CHAR_BASE ((long) 0x01F000)
10+
11+
12+
void redefine(const uint8_t ch, const uint8_t* image)
13+
{
14+
uint8_t i;
15+
16+
for(i=0;i<8;++i)
17+
{
18+
if(ch>63)
19+
{
20+
vpoke(image[i], CHAR_BASE +(unsigned long)((((unsigned long) ch-64U)<<3)+i));
21+
}
22+
else
23+
{
24+
vpoke(image[i], CHAR_BASE +(unsigned long)((((unsigned long) ch)<<3)+i));
25+
}
26+
}
27+
}
28+
29+
30+
void SET_UDG_IMAGES(void)
31+
{
32+
uint8_t i;
33+
34+
for (i = 0; i < sizeof(redefine_map) / sizeof(*redefine_map); ++i)
35+
{
36+
redefine(redefine_map[i].ascii, redefine_map[i].bitmap);
37+
}
38+
}
39+
40+
// ; #define VIDEOMODE_80x60 0x00
41+
// ; #define VIDEOMODE_80x30 0x01
42+
// ; #define VIDEOMODE_40x60 0x02
43+
// ; #define VIDEOMODE_40x30 0x03
44+
// ; #define VIDEOMODE_40x15 0x04
45+
// ; #define VIDEOMODE_20x30 0x05
46+
// ; #define VIDEOMODE_20x15 0x06
47+
// ; #define VIDEOMODE_22x23 0x07
48+
// ; #define VIDEOMODE_64x50 0x08
49+
// ; #define VIDEOMODE_64x25 0x09
50+
// ; #define VIDEOMODE_32x50 0x0A
51+
// ; #define VIDEOMODE_32x25 0x0B
52+
// ; #define VIDEOMODE_80COL VIDEOMODE_80x60
53+
// ; #define VIDEOMODE_40COL VIDEOMODE_40x30
54+
// ; #define VIDEOMODE_320x240 0x80
55+
void _XL_INIT_GRAPHICS(void)
56+
{
57+
videomode(VIDEOMODE_20x30);
58+
SET_UDG_IMAGES();
59+
}

src/cross_lib/display/tiles.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,11 @@
55

66
# if defined(__C64__) && defined(__MEMORY_MAPPED_GRAPHICS)
77
#include "c64_memory_mapped_settings.h"
8-
#elif defined(__AGAT__) && defined(__BIT_MAPPED_GRAPHICS)
8+
#elif (defined(__AGAT__) && defined(__BIT_MAPPED_GRAPHICS))
99
#include "agat_settings.h"
10+
#elif (defined(__CX16__) && !defined(_XL_NO_UDG))
11+
// #include "agat_settings.h"
12+
#include "cx16_settings.h"
1013
#elif defined(__PV1000__) && defined(__PV1000_GRAPHICS)
1114
#include "pv1000_settings.h"
1215
#elif defined(__C64__) && defined(__CONIO_GRAPHICS)
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
#define _TILE_0 (33)
2+
3+
#define _TILE_1 (34)
4+
5+
#define _TILE_2 (35)
6+
7+
#define _TILE_3 (36)
8+
9+
#define _TILE_4 (37)
10+
11+
#define _TILE_5 (38)
12+
13+
#define _TILE_6 (39)
14+
15+
#define _TILE_7 (40)
16+
17+
#define _TILE_8 (41)
18+
19+
#define _TILE_9 (42)
20+
21+
#define _TILE_10 (43)
22+
23+
#define _TILE_11 (44)
24+
25+
#define _TILE_12 (45)
26+
27+
#define _TILE_13 (46)
28+
29+
#define _TILE_14 (47)
30+
31+
#define _TILE_15 (58)
32+
33+
#define _TILE_16 (59)
34+
35+
#define _TILE_17 (60)
36+
37+
#define _TILE_18 (61)
38+
39+
#define _TILE_19 (62)
40+
41+
#define _TILE_20 (63)
42+
43+
#define _TILE_21 (64)
44+
45+
#define _TILE_22 (65)
46+
47+
#define _TILE_23 (66)
48+
49+
#define _TILE_24 (67)
50+
51+
#define _TILE_25 (68)
52+
53+
#define _TILE_26 (69)

src/makefiles.common/auxiliary/Makefile_default_values

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ _C16_SLOWDOWN?=0
2323
_C64_SLOWDOWN?=0
2424
_CBM610_SLOWDOWN?=0
2525
_CBM510_SLOWDOWN?=0
26-
_CX16_SLOWDOWN?=0
26+
_CX16_SLOWDOWN?=500
2727
_CREATIVISION_SLOWDOWN?=0
2828
_GAMATE_SLOWDOWN?=0
2929
_ORIC_SLOWDOWN?=0
Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,16 @@
1-
cx16:
2-
$(CC65_PATH)$(MYCC65) $(INCLUDE_OPTS) -O -t cx16 -DEXTRA_TITLE \
1+
cx16_no_gfx:
2+
$(CC65_PATH)$(MYCC65) $(INCLUDE_OPTS) -O -t cx16 \
33
-D__CX16__ -DXSize=80 -DYSize=60 \
44
-D_XL_SLOW_DOWN_FACTOR=$(_COMMON_SLOWDOWN_FACTOR)*$(_CX16_SLOWDOWN) \
5-
-D__CONIO_GRAPHICS -D__NO_INIT_GRAPHICS \
5+
-D__CONIO_GRAPHICS -D__NO_INIT_GRAPHICS -D_XL_NO_UDG \
6+
$(FULL_FILES) \
7+
-o $(BUILD_PATH)/X$(GAME_NAME)_cx16.prg
8+
9+
cx16: $(ASSETS_PATH)/8x8_chars.h
10+
$(CC65_PATH)$(MYCC65) $(INCLUDE_OPTS) -O -t cx16 \
11+
-D__CX16__ -DXSize=20 -DYSize=30 -D_XL_NO_SMALL_LETTERS \
12+
-D_XL_SLOW_DOWN_FACTOR=$(_COMMON_SLOWDOWN_FACTOR)*$(_CX16_SLOWDOWN) \
13+
-D__CONIO_GRAPHICS \
14+
$(CROSS_LIB_PATH)/display/init_graphics/cc65/cx16/cx16_init_graphics.c \
615
$(FULL_FILES) \
716
-o $(BUILD_PATH)/X$(GAME_NAME)_cx16.prg

0 commit comments

Comments
 (0)