diff --git a/024.simple_text/Makefile b/024.simple_text/Makefile index 87beb12..b85953b 100644 --- a/024.simple_text/Makefile +++ b/024.simple_text/Makefile @@ -6,12 +6,14 @@ USERSTACK_ADDRESS=7fffc BASE_ADDRESS=4000 # note: this must be high enough not to conflict with MFMbufE +NUM_COLORS=16 + BOOTBLOCK_ASM=alpine_bootblock.s OBJS=out/init.o out/utils.o out/image.o out/blittext.o out/cpu.o out/blit.o -IMAGES=font8x10.png +IMAGES=font8x8.png IMAGEDATA=$(addprefix out/, $(IMAGES:.png=.bin)) -VASM_EXTRA_ARGS= +VASM_EXTRA_ARGS=-DNUM_COLORS=$(NUM_COLORS) #SYMBOL_INFO=-M LINKER_OPTIONS=-T link.script.x @@ -19,7 +21,7 @@ LINKER_OPTIONS=-T link.script.x include ../shared/base.mk out/%.bin: ../assets/%.png - $(IMAGECON) --input $< $(IMAGECON_ARGS) --output-bitplanes --output-grey-palette-asm --output-palette-asm --output-palette --output out/$* --colors=16 --use-palette palette.pal --full-color-palette-file --output-mask --transparent-color=0,0,0 --output-png + $(IMAGECON) --input $< $(IMAGECON_ARGS) --output-bitplanes --output-grey-palette-asm --output-palette-asm --output-palette --output out/$* --colors=$(NUM_COLORS) --use-palette palette.pal --full-color-palette-file --output-mask --transparent-color=0,0,0 --output-png out/simple_image.o: constants.i macros.i diff --git a/024.simple_text/blittext.s b/024.simple_text/blittext.s index 6f86c0b..e6aeb3d 100644 --- a/024.simple_text/blittext.s +++ b/024.simple_text/blittext.s @@ -64,7 +64,7 @@ DrawChar8: add.l #1,d5 ; while we have a weird font image, '!' starts on second line move.l a5,a1 ; #font - if 0 + if 1 mulu.w d3,d5 ; d5 *= #FONTMAP_WIDTH_BYTES*SCREEN_BIT_DEPTH*FONT_HEIGHT else move.w d5,d3 @@ -145,6 +145,6 @@ DrawChar8: rts font: - incbin "out/font8x10.bin" + incbin "out/font8x8.bin" fontMask: - incbin "out/font8x10-mask.bin" + incbin "out/font8x8-mask.bin" diff --git a/024.simple_text/constants.i b/024.simple_text/constants.i index 2a26e52..ccc1d29 100644 --- a/024.simple_text/constants.i +++ b/024.simple_text/constants.i @@ -1,4 +1,4 @@ -MASKED_FONT equ 1 +MASKED_FONT equ 0 if MASKED_FONT==1 BACKGROUND_COLOR equ 4 @@ -7,12 +7,31 @@ BACKGROUND_COLOR equ 3 endif FONT_WIDTH equ 8 -FONT_HEIGHT equ 10 +FONT_HEIGHT equ 8 SCREEN_WIDTH equ 320 SCREEN_HEIGHT equ 256 SCREEN_WIDTH_BYTES equ (SCREEN_WIDTH/8) SCREEN_WIDTH_WORDS equ SCREEN_WIDTH_BYTES/2 + + if NUM_COLORS==64 +SCREEN_BIT_DEPTH equ 6 + endif + if NUM_COLORS==32 +SCREEN_BIT_DEPTH equ 5 + endif + if NUM_COLORS==16 SCREEN_BIT_DEPTH equ 4 + endif + if NUM_COLORS==8 +SCREEN_BIT_DEPTH equ 3 + endif + if NUM_COLORS==4 +SCREEN_BIT_DEPTH equ 2 + endif + if NUM_COLORS==2 +SCREEN_BIT_DEPTH equ 1 + endif + SCREEN_RES equ 8 ; 8=lo resolution, 4=hi resolution RASTER_X_START equ $81 ; hard coded coordinates from hardware manual RASTER_Y_START equ $2c diff --git a/024.simple_text/simple_text.s b/024.simple_text/simple_text.s index 5111523..b5cef38 100644 --- a/024.simple_text/simple_text.s +++ b/024.simple_text/simple_text.s @@ -147,11 +147,11 @@ copperListBplPtr: dc.l $fffffffe InstallPalette: - include "out/font8x10-palette.s" + include "out/font8x8-palette.s" rts GreyPalette: - include "out/font8x10-grey.s" + include "out/font8x8-grey.s" rts onscreen: dc.l bitplanes1 diff --git a/assets/font8x10.png b/assets/font8x10.png deleted file mode 100644 index 690e45e..0000000 Binary files a/assets/font8x10.png and /dev/null differ diff --git a/assets/font8x8.png b/assets/font8x8.png new file mode 100644 index 0000000..e5920fb Binary files /dev/null and b/assets/font8x8.png differ