From a1732840d1519b9561c133c26ac00251838f34bc Mon Sep 17 00:00:00 2001 From: Vince Weaver Date: Wed, 6 Jan 2021 11:43:43 -0500 Subject: [PATCH] text_demo: move some more things around also fix bug in text demo, whole problem of shared asm includes --- compression/Makefile | 2 ++ compression/README | 3 +++ .../plaintext_asm}/Makefile | 9 +++++---- compression/plaintext_asm/README | 6 ++++++ .../plaintext_asm}/empty.dsk | Bin .../plaintext_asm}/plain.s | 0 graphics/gr/mode7/Makefile | 17 ++--------------- graphics/gr/{rotate => rotozoom}/Makefile | 0 graphics/gr/{rotate => rotozoom}/README | 0 {textmode => graphics/gr/rotozoom}/empty.dsk | Bin graphics/gr/{rotate => rotozoom}/gr.dsk | Bin graphics/gr/{rotate => rotozoom}/snow.s | 0 textmode/README | 2 -- .../mode7 => textmode/textflip}/text_demo.s | 18 +++++++++--------- 14 files changed, 27 insertions(+), 30 deletions(-) rename {textmode => compression/plaintext_asm}/Makefile (50%) create mode 100644 compression/plaintext_asm/README rename {graphics/gr/rotate => compression/plaintext_asm}/empty.dsk (100%) rename {textmode => compression/plaintext_asm}/plain.s (100%) rename graphics/gr/{rotate => rotozoom}/Makefile (100%) rename graphics/gr/{rotate => rotozoom}/README (100%) rename {textmode => graphics/gr/rotozoom}/empty.dsk (100%) rename graphics/gr/{rotate => rotozoom}/gr.dsk (100%) rename graphics/gr/{rotate => rotozoom}/snow.s (100%) delete mode 100644 textmode/README rename {graphics/gr/mode7 => textmode/textflip}/text_demo.s (94%) diff --git a/compression/Makefile b/compression/Makefile index 56147fb0..0300eec4 100644 --- a/compression/Makefile +++ b/compression/Makefile @@ -1,7 +1,9 @@ all: cd lzsa_test && make + cd plaintext_asm && make clean: cd lzsa_test && make clean + cd plaintext_asm && make clean rm -f *~ diff --git a/compression/README b/compression/README index 342934f3..7395542a 100644 --- a/compression/README +++ b/compression/README @@ -1,3 +1,6 @@ lzsa_test: some tests of lzsa decompression +plaintext_asm: + trying to fit more assembly in basic program + diff --git a/textmode/Makefile b/compression/plaintext_asm/Makefile similarity index 50% rename from textmode/Makefile rename to compression/plaintext_asm/Makefile index 0f53b3e4..ccf66d59 100644 --- a/textmode/Makefile +++ b/compression/plaintext_asm/Makefile @@ -1,7 +1,8 @@ -include ../Makefile.inc +include ../../Makefile.inc -DOS33 = ../utils/dos33fs-utils/dos33 -TOKENIZE = ../utils/asoft_basic-utils/tokenize_asoft +DOS33 = ../../utils/dos33fs-utils/dos33 +TOKENIZE = ../../utils/asoft_basic-utils/tokenize_asoft +LINKERSCRIPTS = ../../linker_scripts all: plain.dsk @@ -13,7 +14,7 @@ plain.dsk: PLAIN ### PLAIN: plain.o - ld65 -o PLAIN plain.o -C ../linker_scripts/apple2_800.inc + ld65 -o PLAIN plain.o -C $(LINKERSCRIPTS)/apple2_800.inc plain.o: plain.s ca65 -o plain.o plain.s -l plain.lst diff --git a/compression/plaintext_asm/README b/compression/plaintext_asm/README new file mode 100644 index 00000000..c0c31ff2 --- /dev/null +++ b/compression/plaintext_asm/README @@ -0,0 +1,6 @@ +trying to fit more executable code in a tweet + +this was an experiment in plain-text machine code +it is possible but not really practical for 280 char payloads + + diff --git a/graphics/gr/rotate/empty.dsk b/compression/plaintext_asm/empty.dsk similarity index 100% rename from graphics/gr/rotate/empty.dsk rename to compression/plaintext_asm/empty.dsk diff --git a/textmode/plain.s b/compression/plaintext_asm/plain.s similarity index 100% rename from textmode/plain.s rename to compression/plaintext_asm/plain.s diff --git a/graphics/gr/mode7/Makefile b/graphics/gr/mode7/Makefile index 62a395d2..8d4e1329 100644 --- a/graphics/gr/mode7/Makefile +++ b/graphics/gr/mode7/Makefile @@ -12,15 +12,12 @@ $(DOS33): cd ../../../utils/dos33fs-utils && make mode7.dsk: $(DOS33) MODE7_ISLAND MODE7_CHECKERBOARD MODE7_RAINBOW \ - PLOT_TEST SKY_DEMO TEXT_DEMO + PLOT_TEST SKY_DEMO $(DOS33) -y mode7.dsk BSAVE -a 0x1000 MODE7_ISLAND $(DOS33) -y mode7.dsk BSAVE -a 0x1000 MODE7_CHECKERBOARD $(DOS33) -y mode7.dsk BSAVE -a 0x1000 MODE7_RAINBOW $(DOS33) -y mode7.dsk BSAVE -a 0x1000 PLOT_TEST $(DOS33) -y mode7.dsk BSAVE -a 0x1000 SKY_DEMO - $(DOS33) -y mode7.dsk BSAVE -a 0x1000 TEXT_DEMO - - ### @@ -90,16 +87,6 @@ sky_demo.o: sky_demo.s \ gr_setpage.s ca65 -o sky_demo.o sky_demo.s -l sky_demo.lst -TEXT_DEMO: text_demo.o - ld65 -o TEXT_DEMO text_demo.o -C $(LINKERSCRIPTS)/apple2_1000.inc - -text_demo.o: text_demo.s \ - gr_scroll.s \ - pageflip.s \ - gr_setpage.s \ - gr_fast_clear.s - ca65 -o text_demo.o text_demo.s -l text_demo.lst - scroller: scroller.o $(CC) $(LFLAGS) -o scroller scroller.o @@ -115,5 +102,5 @@ background.o: background.c clean: rm -f *~ *.o scroller background \ MODE7 MODE7_ISLAND MODE7_CHECKERBOARD MODE7_RAINBOW \ - PLOT_TEST SKY_DEMO TEXT_DEMO *.lst + PLOT_TEST SKY_DEMO *.lst diff --git a/graphics/gr/rotate/Makefile b/graphics/gr/rotozoom/Makefile similarity index 100% rename from graphics/gr/rotate/Makefile rename to graphics/gr/rotozoom/Makefile diff --git a/graphics/gr/rotate/README b/graphics/gr/rotozoom/README similarity index 100% rename from graphics/gr/rotate/README rename to graphics/gr/rotozoom/README diff --git a/textmode/empty.dsk b/graphics/gr/rotozoom/empty.dsk similarity index 100% rename from textmode/empty.dsk rename to graphics/gr/rotozoom/empty.dsk diff --git a/graphics/gr/rotate/gr.dsk b/graphics/gr/rotozoom/gr.dsk similarity index 100% rename from graphics/gr/rotate/gr.dsk rename to graphics/gr/rotozoom/gr.dsk diff --git a/graphics/gr/rotate/snow.s b/graphics/gr/rotozoom/snow.s similarity index 100% rename from graphics/gr/rotate/snow.s rename to graphics/gr/rotozoom/snow.s diff --git a/textmode/README b/textmode/README deleted file mode 100644 index 11958b86..00000000 --- a/textmode/README +++ /dev/null @@ -1,2 +0,0 @@ -some scratch files when working on textmode issues - diff --git a/graphics/gr/mode7/text_demo.s b/textmode/textflip/text_demo.s similarity index 94% rename from graphics/gr/mode7/text_demo.s rename to textmode/textflip/text_demo.s index 0d355f6e..1b8ca492 100644 --- a/graphics/gr/mode7/text_demo.s +++ b/textmode/textflip/text_demo.s @@ -51,14 +51,13 @@ outer_loop: credit_loop: ldy #0 - lda (OUTL),Y - clc + lda (OUTL),Y ; load x offset + clc ; and add 7 to it adc #7 - sta CH - lda #22 + lda #22 ; y hardcoded at 22 sta CV lda #$f6 ; - 10 @@ -67,18 +66,19 @@ inner_loop: jsr htab_vtab - ldy #1 + ldy #1 ; loop through the string print_loop: lda (OUTL),Y beq done_print clc - adc XX + adc XX ; add -10 - ora #$80 - sta (BASL),Y - iny + ora #$80 ; convert from ASCII + sta (BASL),Y ; write to display + iny ; point to next jmp print_loop + done_print: