diff --git a/graphics/dgr_viewer/plain/Makefile b/graphics/dgr_viewer/plain/Makefile new file mode 100644 index 00000000..a781dd6b --- /dev/null +++ b/graphics/dgr_viewer/plain/Makefile @@ -0,0 +1,50 @@ +include ../../../Makefile.inc + +ZX02 = ~/research/6502_compression/zx02.git/build/zx02 +PNG_TO_DGR = ../../../utils/gr-utils/png2dgr +LINKER_SCRIPTS = ../../../linker_scripts +DOS33 = ../../../utils/dos33fs-utils/dos33 +EMPTY_DISK = ../../../empty_disk/empty.dsk +TOKENIZE = ../../../utils/asoft_basic-utils/tokenize_asoft + +all: dlores_plain.dsk + +#### + +DLORES: dlores_plain.o + ld65 -o DLORES dlores_plain.o -C $(LINKER_SCRIPTS)/apple2_1000.inc + +dlores_plain.o: dlores_plain.s ../dlores_main.s ../zx02_optim.s \ + ../zp.inc ../hardware.inc + ca65 -o dlores_plain.o dlores_plain.s -l dlores_plain.lst +#### + +HELLO: ../hello.bas + $(TOKENIZE) < ../hello.bas > HELLO + +#### + +dlores_plain.dsk: HELLO DLORES\ + myst.gr.main.zx02 myst.gr.aux.zx02\ + channelwood.gr.main.zx02 channelwood.gr.aux.zx02\ + selenetic.gr.main.zx02 selenetic.gr.aux.zx02\ + sworg_dgr.gr.main.zx02 sworg_dgr.gr.aux.zx02\ + dgr_test_bar.gr.main.zx02 dgr_test_bar.gr.aux.zx02 + cp $(EMPTY_DISK) dlores_plain.dsk + $(DOS33) -y dlores_plain.dsk SAVE A HELLO + $(DOS33) -y dlores_plain.dsk BSAVE -a 0x1000 DLORES + $(DOS33) -y dlores_plain.dsk BSAVE -a 0xa000 myst.gr.main.zx02 MYST.MAIN.ZX02 + $(DOS33) -y dlores_plain.dsk BSAVE -a 0xa000 myst.gr.aux.zx02 MYST.AUX.ZX02 + $(DOS33) -y dlores_plain.dsk BSAVE -a 0xa000 channelwood.gr.main.zx02 CHANNEL.MAIN.ZX02 + $(DOS33) -y dlores_plain.dsk BSAVE -a 0xa000 channelwood.gr.aux.zx02 CHANNEL.AUX.ZX02 + $(DOS33) -y dlores_plain.dsk BSAVE -a 0xa000 selenetic.gr.main.zx02 SELEN.MAIN.ZX02 + $(DOS33) -y dlores_plain.dsk BSAVE -a 0xa000 selenetic.gr.aux.zx02 SELEN.AUX.ZX02 + $(DOS33) -y dlores_plain.dsk BSAVE -a 0xa000 sworg_dgr.gr.main.zx02 SWORG.MAIN.ZX02 + $(DOS33) -y dlores_plain.dsk BSAVE -a 0xa000 sworg_dgr.gr.aux.zx02 SWORG.AUX.ZX02 + $(DOS33) -y dlores_plain.dsk BSAVE -a 0xa000 dgr_test_bar.gr.main.zx02 TEST.MAIN.ZX02 + $(DOS33) -y dlores_plain.dsk BSAVE -a 0xa000 dgr_test_bar.gr.aux.zx02 TEST.AUX.ZX02 +#### + +clean: + rm -f *~ *.o *.lst + diff --git a/graphics/dgr_viewer/plain/channelwood.png b/graphics/dgr_viewer/plain/channelwood.png index 95b1bee3..358a70b9 100644 Binary files a/graphics/dgr_viewer/plain/channelwood.png and b/graphics/dgr_viewer/plain/channelwood.png differ diff --git a/graphics/dgr_viewer/plain/lady1_dgr.png b/graphics/dgr_viewer/plain/lady1_dgr.png new file mode 100644 index 00000000..ed4492d2 Binary files /dev/null and b/graphics/dgr_viewer/plain/lady1_dgr.png differ diff --git a/graphics/dgr_viewer/plain/lara1_dgr.png b/graphics/dgr_viewer/plain/lara1_dgr.png new file mode 100644 index 00000000..a84bc192 Binary files /dev/null and b/graphics/dgr_viewer/plain/lara1_dgr.png differ diff --git a/graphics/dgr_viewer/plain/myst.png b/graphics/dgr_viewer/plain/myst.png index c115573b..50e2ffeb 100644 Binary files a/graphics/dgr_viewer/plain/myst.png and b/graphics/dgr_viewer/plain/myst.png differ diff --git a/graphics/dgr_viewer/plain/plain.data b/graphics/dgr_viewer/plain/plain.data index fa10adfd..dfcb2e76 100644 --- a/graphics/dgr_viewer/plain/plain.data +++ b/graphics/dgr_viewer/plain/plain.data @@ -1,6 +1,8 @@ # label dos3.3 name prefix for png file -myst MYST myst +myst MYST myst ' chanelwood CHANNEL channelwood selenetic SELEN selenetic -sworg SWORG sworg_dgr +sworg SWORG sworg_dgr ' test TEST dgr_test_bar +lady1 LADY1 lady1_dgr ' number1exile +lara1 LARA1 lara1_dgr ' number1exile diff --git a/graphics/dgr_viewer/plain/selenetic.png b/graphics/dgr_viewer/plain/selenetic.png index 343cbfd2..95d8cc06 100644 Binary files a/graphics/dgr_viewer/plain/selenetic.png and b/graphics/dgr_viewer/plain/selenetic.png differ diff --git a/utils/gr-utils/dgr2png.c b/utils/gr-utils/dgr2png.c index 122e3350..f7536443 100644 --- a/utils/gr-utils/dgr2png.c +++ b/utils/gr-utils/dgr2png.c @@ -18,6 +18,25 @@ static int gr_offsets[24]={ 0x450-0x400,0x4D0-0x400,0x550-0x400,0x5D0-0x400,0x650-0x400,0x6D0-0x400,0x750-0x400,0x7D0-0x400, }; +/* rotate left by 1 to unconvert */ +static unsigned char aux_colors[]={ + 0, /* 0000 -> 0000 */ + 2, /* 0001 -> 0010 */ + 4, /* 0010 -> 0100 */ + 6, /* 0011 -> 0110 */ + 8, /* 0100 -> 1000 */ + 10, /* 0101 -> 1010 */ + 12, /* 0110 -> 1100 */ + 14, /* 0111 -> 1110 */ + 1, /* 1000 -> 0001 */ + 3, /* 1001 -> 0011 */ + 5, /* 1010 -> 0101 */ + 7, /* 1011 -> 0111 */ + 9, /* 1100 -> 1001 */ + 11, /* 1101 -> 1011 */ + 13, /* 1110 -> 1101 */ + 15, /* 1111 -> 1111 */ +}; int main(int argc, char **argv) { int fd; @@ -158,13 +177,17 @@ int main(int argc, char **argv) { for(y=0;y>4)&0xf; - row_pointers[(y*2)+1][x*2]=color1; + row_pointers[(y*2)+1][x*2]=aux_colors[color1]; color2=((main_screen[gr_offsets[y]+x])>>4)&0xf; row_pointers[(y*2)+1][(x*2)+1]=color2; }