This repository was archived by the owner on Nov 22, 2023. It is now read-only.
File tree 3 files changed +47
-0
lines changed 3 files changed +47
-0
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ target/pc88/pc88_cursoron
12
12
target/pc88/pc88_locate
13
13
target/pc88/pc88_crtset
14
14
target/pc88/pc88_wait_vblank
15
+ target/pc88/stdio/conio_map_colour
15
16
target/pc88/stdio/fgetc_cons
16
17
target/pc88/stdio/getk
17
18
target/pc88/stdio/fputc_cons
Original file line number Diff line number Diff line change
1
+ ; Platform specific colour transformation
2
+ ;
3
+ ; Entry: a = colour
4
+ ; Exit: a = colour to use on screen
5
+ ; Used: hl,bc,f
6
+ ;
7
+
8
+ MODULE code_clib
9
+ PUBLIC conio_map_colour
10
+
11
+ EXTERN __CLIB_CONIO_NATIVE_COLOUR
12
+
13
+ conio_map_colour:
14
+ ld c , __CLIB_CONIO_NATIVE_COLOUR
15
+ rr c
16
+ ret c
17
+ and 15
18
+ ld c , a
19
+ ld b , 0
20
+ ld hl , table
21
+ add hl , bc
22
+ ld a , (hl)
23
+ ret
24
+
25
+ SECTION rodata_clib
26
+ table:
27
+ defb $ 0 ;BLACK -> BLACK
28
+ defb $ 1 ;BLUE -> BLUE
29
+ defb $ 4 ;GREEN -> GREEN
30
+ defb $ 5 ;CYAN -> CYAN
31
+ defb $ 2 ;RED -> RED
32
+ defb $ 3 ;MAGENTA -> MAGENTA
33
+ defb $ 2 ;BROWN -> RED
34
+ defb $ 7 ;LIGHTGRAY -> WHITE
35
+ defb $ 7 ;DARKGRAY -> WHITE
36
+ defb $ 1 ;LIGHTBLUE -> BLUE
37
+ defb $ 4 ;LIGHTGREEN -> GREEN
38
+ defb $ 5 ;LIGHTCYAN -> CYAN
39
+ defb $ 2 ;LIGHTRED -> RED
40
+ defb $ 3 ;LIGHTMAGENTA -> MAGENTA
41
+ defb $ 6 ;YELLOW -> YELLOW
42
+ defb $ 7 ;WHITE -> WHITE
43
+
Original file line number Diff line number Diff line change 30
30
EXTERN generic_console_flags
31
31
EXTERN __console_x
32
32
EXTERN __CLIB_PC8800_V2_ENABLED
33
+ EXTERN conio_map_colour
33
34
34
35
INCLUDE "target/pc88/def/pc88.def"
35
36
38
39
39
40
40
41
generic_console_set_paper:
42
+ call conio_map_colour
41
43
and 7
42
44
ld (__pc88_paper) , a
43
45
ret
44
46
45
47
generic_console_set_ink:
48
+ call conio_map_colour
46
49
and 7
47
50
ld (__pc88_ink) , a
48
51
rrca
You can’t perform that action at this time.
0 commit comments