From 7736360c30b41c6c10f3aab905e9759d8e259841 Mon Sep 17 00:00:00 2001 From: Vince Weaver Date: Tue, 5 Jan 2021 16:13:43 -0500 Subject: [PATCH] utils: fix up so all compiles again --- Makefile | 3 +++ utils/Makefile | 37 ++++++++++++++++++++++++++++++++ utils/asoft_basic-utils/Makefile | 2 +- utils/asoft_presenter/Makefile | 2 +- utils/asoft_sound/Makefile | 2 +- utils/asoft_sound/README | 8 +++++++ utils/asoft_sound/asoft_sound.c | 2 +- utils/dos33fs-utils/Makefile | 2 +- utils/dos33fs-utils/README | 29 +++++++++---------------- utils/gr-sim/Makefile | 18 ++++++++++++++++ utils/gr-sim/dos/Makefile | 2 +- utils/gr-sim/hgr/fireworks.c | 32 +++++++++++++-------------- utils/gr-sim/tfv/Makefile | 4 ++-- utils/gr-sim/tunnel/Makefile | 4 ++-- utils/gr-sim/water/Makefile | 2 +- utils/gr-utils/Makefile | 4 ++-- utils/gr-utils/README | 5 +++++ utils/hgr-utils/Makefile | 2 +- utils/hgr-utils/README | 6 ++---- 19 files changed, 113 insertions(+), 53 deletions(-) create mode 100644 utils/Makefile create mode 100644 utils/asoft_sound/README create mode 100644 utils/gr-utils/README diff --git a/Makefile b/Makefile index 69671b02..071fb866 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,14 @@ include Makefile.inc all: + cd utils && make install: + cd utils && make install clean: cd asm_routines && make clean + cd utils && make clean rm -f *~ test: diff --git a/utils/Makefile b/utils/Makefile new file mode 100644 index 00000000..281bf8c9 --- /dev/null +++ b/utils/Makefile @@ -0,0 +1,37 @@ +include ../Makefile.inc + +all: + cd asoft_basic-utils && make + cd asoft_presenter && make +# cd asoft_sound && make +# cd bmp2dhr && make +# cd dos33fs-linux2.4 && make + cd dos33fs-utils && make +# cd gr-sim && make + cd gr-utils && make + cd hgr-utils && make + +install: + cd asoft_basic-utils && make install + cd asoft_presenter && make install +# cd asoft_sound && make install +# cd bmp2dhr && make install +# cd dos33fs-linux2.4 && make install + cd dos33fs-utils && make install +# cd gr-sim && make install + cd gr-utils && make install + cd hgr-utils && make install + +clean: + cd asoft_basic-utils && make clean + cd asoft_presenter && make clean + cd asoft_sound && make clean + cd bmp2dhr && make clean + cd dos33fs-linux2.4 && make clean + cd dos33fs-utils && make clean + cd gr-sim && make clean + cd gr-utils && make clean + cd hgr-utils && make clean + rm -f *~ + +test: diff --git a/utils/asoft_basic-utils/Makefile b/utils/asoft_basic-utils/Makefile index c11d97d9..c866018d 100644 --- a/utils/asoft_basic-utils/Makefile +++ b/utils/asoft_basic-utils/Makefile @@ -1,4 +1,4 @@ -include ../Makefile.inc +include ../../Makefile.inc all: asoft_detoken tokenize_asoft integer_detoken asoft_compact bin2data diff --git a/utils/asoft_presenter/Makefile b/utils/asoft_presenter/Makefile index 91da7d63..bfc757a5 100644 --- a/utils/asoft_presenter/Makefile +++ b/utils/asoft_presenter/Makefile @@ -1,4 +1,4 @@ -include ../Makefile.inc +include ../../Makefile.inc all: asoft_presenter diff --git a/utils/asoft_sound/Makefile b/utils/asoft_sound/Makefile index 9f741a0c..266fbc57 100644 --- a/utils/asoft_sound/Makefile +++ b/utils/asoft_sound/Makefile @@ -1,4 +1,4 @@ -include ../Makefile.inc +include ../../Makefile.inc all: asoft_sound diff --git a/utils/asoft_sound/README b/utils/asoft_sound/README new file mode 100644 index 00000000..e04a3d5a --- /dev/null +++ b/utils/asoft_sound/README @@ -0,0 +1,8 @@ +This is a utility that will create a BASIC program to play Apple II +speaker sound in Applesoft BASIC. + +It has a syntax a lot like the GWBASIC play syntax. + +I forget now, but I think I used this to generate the music for the +original portal demake. + diff --git a/utils/asoft_sound/asoft_sound.c b/utils/asoft_sound/asoft_sound.c index 36d20955..c99b1727 100644 --- a/utils/asoft_sound/asoft_sound.c +++ b/utils/asoft_sound/asoft_sound.c @@ -175,7 +175,7 @@ int main(int argc, char **argv) { printf("61 FOR L=770 TO 788:READ V:POKE L,V:NEXT L\n"); printf("62 GOTO 100\n"); - /* Darker/lower by Calsson */ + /* Darker/lower by Carlsson */ printf("70 DATA 173,48,192,174,0,3,202,240,247,234,234,234,136,208,247,206,1,3,208,242,96\n"); printf("71 FOR L=770 TO 790:READ V:POKE L,V:NEXT L\n"); printf("72 GOTO 100\n"); diff --git a/utils/dos33fs-utils/Makefile b/utils/dos33fs-utils/Makefile index 6c18ab2d..896bb1e9 100644 --- a/utils/dos33fs-utils/Makefile +++ b/utils/dos33fs-utils/Makefile @@ -1,4 +1,4 @@ -include ../Makefile.inc +include ../../Makefile.inc all: dos33 mkdos33fs make_b \ dos33_raw \ diff --git a/utils/dos33fs-utils/README b/utils/dos33fs-utils/README index 2f53d05e..30a98fc0 100644 --- a/utils/dos33fs-utils/README +++ b/utils/dos33fs-utils/README @@ -1,30 +1,21 @@ -%%%%%%%%%%%% +============ dos33fsprogs -%%%%%%%%%%%% +============ -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +Tools for manipulating an Apple II 140k dos33 filesystem. -make_b : take a machine language blob and give it the size/offset - header needed to BLOAD it from DOS3.3 -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ++ dos33 : a tool for manipulating dos33 .dsk images ++ dos33_raw: put raw track/sectors onto a .dsk image + this is used by the Myst demake -dos33: a tool for manipulating dos33 .dsk images ++ make_b : take a machine language blob and give it the size/offset + header needed to BLOAD it from DOS3.3 ++ dos33_text2ascii: convert a dos33 text file to ASCII -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ++ mkdos33fs: create an Apple ][ DOS 3.3 filesystems - -dos33_text2ascii: convert a dos33 text file to ASCII - - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - - -mkdos33fs: create an Apple ][ DOS 3.3 filesystems - - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/utils/gr-sim/Makefile b/utils/gr-sim/Makefile index 665f5651..39570156 100644 --- a/utils/gr-sim/Makefile +++ b/utils/gr-sim/Makefile @@ -8,16 +8,25 @@ SDL_INCLUDE= `sdl-config --cflags` all: gr-sim.a make -C 6502_test + make -C dos make -C fade + make -C fire +# make -C fluid + make -C gr + make -C hellmood_memories make -C hgr make -C kaleido_sparkle make -C lz4 make -C mode7_demo + make -C plasma make -C rasterbars + make -C rotate_wipe make -C split_screen make -C starfield make -C text make -C tfv + make -C tunnel + make -C water #### Library @@ -48,13 +57,22 @@ hgr-sim.o: hgr-sim.c gr-sim.h clean: rm -f *~ *.o *.a make -C 6502_test clean + make -C dos clean make -C fade clean + make -C fire clean + make -C fluid clean + make -C gr clean + make -C hellmood_memories clean make -C hgr clean make -C kaleido_sparkle clean make -C lz4 clean make -C mode7_demo clean + make -C plasma clean make -C rasterbars clean + make -C rotate_wipe clean make -C split_screen clean make -C starfield clean make -C text clean make -C tfv clean + make -C tunnel clean + make -C water clean diff --git a/utils/gr-sim/dos/Makefile b/utils/gr-sim/dos/Makefile index e27edd16..071c078c 100644 --- a/utils/gr-sim/dos/Makefile +++ b/utils/gr-sim/dos/Makefile @@ -11,7 +11,7 @@ all: nibble #### nibble: nibble.o $(GR_SIM) - $(CC) $(LFLAGS) $(SDL_LIBS) -o nibble nibble.o $(GR_SIM) + $(CC) -o nibble nibble.o $(GR_SIM) $(SDL_LIBS) $(LFLAGS) nibble.o: nibble.c $(CC) $(CFLAGS) -c nibble.c diff --git a/utils/gr-sim/hgr/fireworks.c b/utils/gr-sim/hgr/fireworks.c index 3aa70159..153d9971 100644 --- a/utils/gr-sim/hgr/fireworks.c +++ b/utils/gr-sim/hgr/fireworks.c @@ -10,26 +10,26 @@ //140 REM MS is max steps, CS is current step, X/Y/X1/Y1/X2/Y2 is rocket position //150 REM CL is Apple II hi-res color group -const int ysize=160,xsize=280,margin=24; -int color_group; -int max_steps; -double x_even_older,x_old=0,y_even_older,y_old=0,cs,peak; -double xpos,ypos,x_velocity,y_velocity; -double i,n; +static const int ysize=160,xsize=280,margin=24; +static int color_group; +static int max_steps; +static double x_even_older,x_old=0,y_even_older,y_old=0,cs,peak; +static double xpos,ypos,x_velocity,y_velocity; +static double i,nn; void routine_370(void) { - hplot(xpos+x_old+n,ypos+y_old+n); // NE - hplot(xpos+x_old-n,ypos+y_old-n); // SW + hplot(xpos+x_old+nn,ypos+y_old+nn); // NE + hplot(xpos+x_old-nn,ypos+y_old-nn); // SW - hplot(xpos+x_old+n,ypos+y_old-n); // SE - hplot(xpos+x_old-n,ypos+y_old+n); // NW + hplot(xpos+x_old+nn,ypos+y_old-nn); // SE + hplot(xpos+x_old-nn,ypos+y_old+nn); // NW - hplot(xpos+x_old,ypos+y_old+(n*1.5)); // N - hplot(xpos+x_old+(n*1.5),ypos+y_old); // E + hplot(xpos+x_old,ypos+y_old+(nn*1.5)); // N + hplot(xpos+x_old+(nn*1.5),ypos+y_old); // E - hplot(xpos+x_old,ypos+y_old-(n*1.5)); // S - hplot(xpos+x_old-(n*1.5),ypos+y_old); // W + hplot(xpos+x_old,ypos+y_old-(nn*1.5)); // S + hplot(xpos+x_old-(nn*1.5),ypos+y_old); // W } @@ -138,12 +138,12 @@ label_290: for(i=1;i<=9;i++) { /* Draw spreading dots in white */ if (i<9) { - n=i; + nn=i; hcolor_equals(color_group*4+3); routine_370(); } /* erase old */ - n=i-1; + nn=i-1; hcolor_equals(color_group*4); routine_370(); diff --git a/utils/gr-sim/tfv/Makefile b/utils/gr-sim/tfv/Makefile index 386a501c..e97a63e2 100644 --- a/utils/gr-sim/tfv/Makefile +++ b/utils/gr-sim/tfv/Makefile @@ -7,8 +7,8 @@ SDL_INCLUDE= `sdl-config --cflags` GR_SIM = ../gr-sim.a PNG2RLE = ../../gr-utils/png2rle -ARTDIR = ../../tfv/graphics_map -TITLEDIR = ../../tfv/graphics_title +ARTDIR = ../../../games/tfv/graphics_map +TITLEDIR = ../../../games/tfv/graphics_title all: tfv diff --git a/utils/gr-sim/tunnel/Makefile b/utils/gr-sim/tunnel/Makefile index 6ef11233..19406380 100644 --- a/utils/gr-sim/tunnel/Makefile +++ b/utils/gr-sim/tunnel/Makefile @@ -11,7 +11,7 @@ all: tunnel tunnel2 #### tunnel: tunnel.o $(GR_SIM) - $(CC) $(LFLAGS) $(SDL_LIBS) -o tunnel tunnel.o $(GR_SIM) + $(CC) -o tunnel tunnel.o $(GR_SIM) $(SDL_LIBS) $(LFLAGS) tunnel.o: tunnel.c $(CC) $(CFLAGS) -c tunnel.c @@ -19,7 +19,7 @@ tunnel.o: tunnel.c #### tunnel2: tunnel2.o $(GR_SIM) - $(CC) $(LFLAGS) $(SDL_LIBS) -o tunnel2 tunnel2.o $(GR_SIM) + $(CC) -o tunnel2 tunnel2.o $(GR_SIM) $(SDL_LIBS) $(LFLAGS) tunnel2.o: tunnel2.c $(CC) $(CFLAGS) -c tunnel2.c diff --git a/utils/gr-sim/water/Makefile b/utils/gr-sim/water/Makefile index a10568cf..24ce87c4 100644 --- a/utils/gr-sim/water/Makefile +++ b/utils/gr-sim/water/Makefile @@ -17,7 +17,7 @@ all: water #### water: water.o $(GR_SIM) - $(CC) $(LFLAGS) $(SDL_LIBS) -o water water.o $(GR_SIM) + $(CC) -o water water.o $(GR_SIM) $(LFLAGS) $(SDL_LIBS) water.o: water.c demo_title.c $(CC) $(CFLAGS) -c water.c diff --git a/utils/gr-utils/Makefile b/utils/gr-utils/Makefile index a08425f2..3d7a3411 100644 --- a/utils/gr-utils/Makefile +++ b/utils/gr-utils/Makefile @@ -1,4 +1,4 @@ -include ../Makefile.inc +include ../../Makefile.inc CFLAGS = -g -Wall -O2 @@ -123,5 +123,5 @@ install: cp png2gr png2gr_text png2rle png2lz4 png_to_40x48d png_to_40x96 png2sixbitmap png2sixrle png2sixrle2 png2fourrle png2six80 $(INSTALL_LOC) clean: - rm -f *~ *.o png2gr png2gr_text png2rle png2lz4 png_to_40x48d png_to_40x96 png2sixbitmap png2sixrle png2fourrle png2sixrle2 png2six80 + rm -f *~ *.o png2gr png2gr_text png2rle png2lz4 png_to_40x48d png_to_40x96 png2sixbitmap png2sixrle png2fourrle png2sixrle2 png2six80 text2gr pnglarge2rle diff --git a/utils/gr-utils/README b/utils/gr-utils/README new file mode 100644 index 00000000..59eb6293 --- /dev/null +++ b/utils/gr-utils/README @@ -0,0 +1,5 @@ +various Apple II lores graphics conversion utilities + +TODO: + describe what does what + diff --git a/utils/hgr-utils/Makefile b/utils/hgr-utils/Makefile index 28a8acad..98857a60 100644 --- a/utils/hgr-utils/Makefile +++ b/utils/hgr-utils/Makefile @@ -1,4 +1,4 @@ -include ../Makefile.inc +include ../../Makefile.inc CFLAGS = -O2 -Wall -g diff --git a/utils/hgr-utils/README b/utils/hgr-utils/README index e971a684..87cb2670 100644 --- a/utils/hgr-utils/README +++ b/utils/hgr-utils/README @@ -1,7 +1,5 @@ These are some tools for manipulating HGR Apple 2 graphics. -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - pcx2hgr: converts a 140x160 (or 140x192) PCX image file into an Apple II HGR graphics file that can @@ -15,8 +13,8 @@ pcx2hgr: converts a 140x160 (or 140x192) PCX image file colors and only generates black and white output. - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +pcx2dhgr: converts to Double Hires + shape_table: create an Apple shape table for use with DRAW and XDRAW commands