From b483313d9455048cfa7c5525375bbb6a7f10655c Mon Sep 17 00:00:00 2001 From: Vince Weaver Date: Sun, 30 Apr 2017 22:22:07 -0400 Subject: [PATCH 1/3] gr-utils: add a png2gr target --- Makefile | 4 +- gr-utils/Makefile | 18 ++++ gr-utils/png2gr.c | 203 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 224 insertions(+), 1 deletion(-) create mode 100644 gr-utils/Makefile create mode 100644 gr-utils/png2gr.c diff --git a/Makefile b/Makefile index b4751a43..85c7690d 100644 --- a/Makefile +++ b/Makefile @@ -5,19 +5,21 @@ all: cd asoft_presenter && make cd dos33fs-utils && make cd hgr-utils && make + cd gr-utils && make install: cd asoft_basic-utils && make install cd asoft_presenter && make install cd dos33fs-utils && make install cd hgr-utils && make install - + cd gr-utils && make install clean: cd asoft_basic-utils && make clean cd asoft_presenter && make clean cd dos33fs-utils && make clean cd hgr-utils && make clean + cd gr-utils && make clean rm -f *~ test: diff --git a/gr-utils/Makefile b/gr-utils/Makefile new file mode 100644 index 00000000..d3637d59 --- /dev/null +++ b/gr-utils/Makefile @@ -0,0 +1,18 @@ +include ../Makefile.inc + +all: png2gr + +png2gr: png2gr.o + $(CC) $(LFLAGS) -lpng -o png2gr png2gr.o + +png2gr.o: png2gr.c + $(CC) $(CFLAGS) -c png2gr.c + + +install: + cp png2gr $(INSTALL_LOC) + +clean: + rm -f *~ *.o png2gr + + diff --git a/gr-utils/png2gr.c b/gr-utils/png2gr.c new file mode 100644 index 00000000..9f65c429 --- /dev/null +++ b/gr-utils/png2gr.c @@ -0,0 +1,203 @@ +#include +#include + +#include +#include +#include +#include +#include + +#include + +/* TODO: */ +/* 40x48 images */ +/* 80x40, 80x48 double-highres images */ + +int main(int argc, char **argv) { + + int image[40][40]; + int x,y; + FILE *infile,*outfile; + int debug=0; + + if (argc<3) { + fprintf(stderr,"Usage:\t%s INFILE OUTFILE\n\n",argv[0]); + exit(-1); + } + + outfile=fopen(argv[2],"w"); + if (outfile==NULL) { + fprintf(stderr,"Error! Could not open %s\n",argv[2]); + exit(-1); + } + + int width, height; + png_byte color_type; + png_byte bit_depth; + + png_structp png_ptr; + png_infop info_ptr; + int number_of_passes; + png_bytep * row_pointers; + + unsigned char header[8]; + + /* open file and test for it being a png */ + infile = fopen(argv[1], "rb"); + if (infile==NULL) { + fprintf(stderr,"Error! Could not open %s\n",argv[1]); + exit(-1); + } + + /* Check the header */ + fread(header, 1, 8, infile); + if (png_sig_cmp(header, 0, 8)) { + fprintf(stderr,"Error! %s is not a PNG file\n",argv[1]); + exit(-1); + } + + /* initialize stuff */ + png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); + if (!png_ptr) { + fprintf(stderr,"Error create_read_struct\n"); + exit(-1); + } + + info_ptr = png_create_info_struct(png_ptr); + if (!info_ptr) { + fprintf(stderr,"Error png_create_info_struct\n"); + exit(-1); + } + + png_init_io(png_ptr, infile); + png_set_sig_bytes(png_ptr, 8); + + png_read_info(png_ptr, info_ptr); + + width = png_get_image_width(png_ptr, info_ptr); + height = png_get_image_height(png_ptr, info_ptr); + color_type = png_get_color_type(png_ptr, info_ptr); + bit_depth = png_get_bit_depth(png_ptr, info_ptr); + + if (debug) { + printf("PNG: width=%d height=%d depth=%d\n",width,height,bit_depth); + } + + number_of_passes = png_set_interlace_handling(png_ptr); + png_read_update_info(png_ptr, info_ptr); + + row_pointers = (png_bytep*) malloc(sizeof(png_bytep) * height); + for (y=0; y0x3f8) break; + enough++; + if (enough>119) { + fputc(0,outfile); + fputc(0,outfile); + fputc(0,outfile); + fputc(0,outfile); + fputc(0,outfile); + fputc(0,outfile); + fputc(0,outfile); + fputc(0,outfile); + enough=0; + } + + col++; + if (col>39) { + col=0; + row+=16; + if (row>47) row-=46; + } + } + + fclose(outfile); + + return 0; +} From 1f8c57d71eb9e2ef95ce96a747a3bee4711f9210 Mon Sep 17 00:00:00 2001 From: Vince Weaver Date: Sun, 30 Apr 2017 22:24:49 -0400 Subject: [PATCH 2/3] tfv: start work on ill-advised new project --- tfv/Apple II Lowres.gpl | 21 ++++++ tfv/Makefile | 16 +++++ tfv/duet.s | 156 ++++++++++++++++++++++++++++++++++++++++ tfv/sprites.piskel | 1 + tfv/sprites.png | Bin 0 -> 359 bytes tfv/tfv.dsk | Bin 0 -> 143360 bytes tfv/title.piskel | 1 + tfv/title.png | Bin 0 -> 523 bytes tfv/worldmap.piskel | 1 + tfv/worldmap.png | Bin 0 -> 507 bytes 10 files changed, 196 insertions(+) create mode 100644 tfv/Apple II Lowres.gpl create mode 100644 tfv/Makefile create mode 100644 tfv/duet.s create mode 100644 tfv/sprites.piskel create mode 100644 tfv/sprites.png create mode 100644 tfv/tfv.dsk create mode 100644 tfv/title.piskel create mode 100644 tfv/title.png create mode 100644 tfv/worldmap.piskel create mode 100644 tfv/worldmap.png diff --git a/tfv/Apple II Lowres.gpl b/tfv/Apple II Lowres.gpl new file mode 100644 index 00000000..ba091f41 --- /dev/null +++ b/tfv/Apple II Lowres.gpl @@ -0,0 +1,21 @@ +GIMP Palette +Name: Apple II Lowres +Columns: 0 +# + 0 0 0 Untitled +227 30 96 Untitled + 96 78 189 Untitled +255 68 253 Untitled + 0 163 96 Untitled +156 156 156 Untitled + 20 207 253 Untitled +208 195 255 Untitled + 96 114 3 Untitled +255 106 60 Untitled +157 157 157 Untitled +255 160 208 Untitled + 20 245 60 Untitled +208 221 141 Untitled +114 255 208 Untitled +255 255 255 Untitled + diff --git a/tfv/Makefile b/tfv/Makefile new file mode 100644 index 00000000..ec8b98e9 --- /dev/null +++ b/tfv/Makefile @@ -0,0 +1,16 @@ +include ../Makefile.inc + +DOS33 = ../dos33fs-utils/dos33 +PNG2GR = ../gr-utils/png2gr + +all: tfv.dsk + +tfv.dsk: TITLE.GR + $(DOS33) -y tfv.dsk BSAVE -a 0x400 TITLE.GR + + +TITLE.GR: title.png + $(PNG2GR) title.png TITLE.GR + +clean: + rm -f *~ TITLE.GR diff --git a/tfv/duet.s b/tfv/duet.s new file mode 100644 index 00000000..1ebecf2c --- /dev/null +++ b/tfv/duet.s @@ -0,0 +1,156 @@ +/*************************************************************************** + * Copyright (C) 1979-2015 by Paul Lutus * + * http://arachnoid.com/administration * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ + +/* Electric Duet Player Routine circa 1980 */ + +$0900> A9 01: LDA #$01 ; 2 *!* +$0902> 85 09: STA $09 ; 3 +$0904> 85 1D: STA $1D ; 3 +$0906> 48: PHA ; 3 +$0907> 48: PHA ; 3 +$0908> 48: PHA ; 3 +$0909> D0 15: BNE $0920 ; 4 *!* blah1 + +blah2: + +$090B> C8: INY ; 2 +$090C> B1 1E: LDA ($1E),Y ; 5 *!* +$090E> 85 09: STA $09 ; 3 +$0910> C8: INY ; 2 +$0911> B1 1E: LDA ($1E),Y ; 5 *!* +$0913> 85 1D: STA $1D ; 3 +$0915> A5 1E: LDA $1E ; 3 *!* +$0917> 18: CLC ; 2 +$0918> 69 03: ADC #$03 ; 2 *!* +$091A> 85 1E: STA $1E ; 3 +$091C> 90 02: BCC $0920 ; 4 *!* + blah1 + +$091E> E6 1F: INC $1F ; 5 + +blah1: + +$0920> A0 00: LDY #$00 ; 2 *!* +$0922> B1 1E: LDA ($1E),Y ; 5 *!* +$0924> C9 01: CMP #$01 ; 2 +$0926> F0 E3: BEQ $090B ; 4 *!* + blah2 + +$0928> B0 0D: BCS $0937 ; 4 *!* +$092A> 68: PLA ; 4 +$092B> 68: PLA ; 4 +$092C> 68: PLA ; 4 + +blah5: + +$092D> A2 49: LDX #$49 ; 2 *!* +$092F> C8: INY ; 2 +$0930> B1 1E: LDA ($1E),Y ; 5 *!* +$0932> D0 02: BNE $0936 ; 4 *!* +$0934> A2 C9: LDX #$c9 ; 2 *!* +$0936> 60: RTS ; 6 + +blah3: + +$0937> 85 08: STA $08 ; 3 +$0939> 20 2D09: JSR $092D ; 6 + blah5 + +$093C> 8E 8309: STX $0983 ; 4 +$093F> 85 06: STA $06 ; 3 +$0941> A6 09: LDX $09 ; 3 *!* + + +$0943> 4A: LSR A ; 2 +$0944> CA: DEX ; 2 +$0945> D0 FC: BNE $0943 ; 4 *!* + +$0947> 8D 7C09: STA $097C ; 4 +$094A> 20 2D09: JSR $092D ; 6 +$094D> 8E BB09: STX $09BB ; 4 +$0950> 85 07: STA $07 ; 3 +$0952> A6 1D: LDX $1D ; 3 *!* + +$0954> 4A: LSR A ; 2 +$0955> CA: DEX ; 2 +$0956> D0 FC: BNE $0954 ; 4 *!* + +$0958> 8D B409: STA $09B4 ; 4 +$095B> 68: PLA ; 4 +$095C> A8: TAY ; 2 +$095D> 68: PLA ; 4 +$095E> AA: TAX ; 2 +$095F> 68: PLA ; 4 +$0960> D0 03: BNE $0965 ; 4 *!* + +$0962> 2C 30C0: BIT $C030 ; 4 + + +$0965> C9 00: CMP #$00 ; 2 +$0967> 30 03: BMI $096C ; 4 *!* +$0969> EA: NOP ; 2 +$096A> 10 03: BPL $096F ; 4 *!* +$096C> 2C 30C0: BIT $C030 ; 4 +$096F> 85 4E: STA $4E ; 3 +$0971> 2C 00C0: BIT $C000 ; 4 +$0974> 30 C0: BMI $0936 ; 4 *!* +$0976> 88: DEY ; 2 +$0977> D0 02: BNE $097B ; 4 *!* +$0979> F0 06: BEQ $0981 ; 4 *!* +$097B> C0 00: CPY #$00 ; 2 +$097D> F0 04: BEQ $0983 ; 4 *!* +$097F> D0 04: BNE $0985 ; 4 *!* +$0981> A4 06: LDY $06 ; 3 *!* +$0983> 49 40: EOR #$40 ; 2 *!* +$0985> 24 4E: BIT $4E ; 3 +$0987> 50 07: BVC $0990 ; 4 *!* +$0989> 70 00: BVS $098B ; 4 *!* +$098B> 10 09: BPL $0996 ; 4 *!* +$098D> EA: NOP ; 2 +$098E> 30 09: BMI $0999 ; 4 *!* +$0990> EA: NOP ; 2 +$0991> 30 03: BMI $0996 ; 4 *!* +$0993> EA: NOP ; 2 +$0994> 10 03: BPL $0999 ; 4 *!* +$0996> CD 30C0: CMP $C030 ; 4 +$0999> C6 4F: DEC $4F ; 5 +$099B> D0 11: BNE $09AE ; 4 *!* +$099D> C6 08: DEC $08 ; 5 +$099F> D0 0D: BNE $09AE ; 4 *!* +$09A1> 50 03: BVC $09A6 ; 4 *!* +$09A3> 2C 30C0: BIT $C030 ; 4 +$09A6> 48: PHA ; 3 +$09A7> 8A: TXA ; 2 +$09A8> 48: PHA ; 3 +$09A9> 98: TYA ; 2 +$09AA> 48: PHA ; 3 +$09AB> 4C 1509: JMP $0915 ; 3 +$09AE> CA: DEX ; 2 +$09AF> D0 02: BNE $09B3 ; 4 *!* +$09B1> F0 06: BEQ $09B9 ; 4 *!* +$09B3> E0 00: CPX #$00 ; 2 +$09B5> F0 04: BEQ $09BB ; 4 *!* +$09B7> D0 04: BNE $09BD ; 4 *!* +$09B9> A6 07: LDX $07 ; 3 *!* +$09BB> 49 80: EOR #$80 ; 2 *!* +$09BD> 70 A3: BVS $0962 ; 4 *!* +$09BF> EA: NOP ; 2 +$09C0> 50 A3: BVC $0965 ; 4 *!* + diff --git a/tfv/sprites.piskel b/tfv/sprites.piskel new file mode 100644 index 00000000..7d98c8f5 --- /dev/null +++ b/tfv/sprites.piskel @@ -0,0 +1 @@ +{"modelVersion":2,"piskel":{"name":"sprites","description":"","fps":2,"height":40,"width":80,"layers":["{\"name\":\"Layer 1\",\"opacity\":0.5,\"frameCount\":2,\"chunks\":[{\"layout\":[[0],[1]],\"base64PNG\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAAAoCAYAAAB5LPGYAAABF0lEQVR4nO3YzW3CMBiAYaSuxZEzM/TMsXt0BxZhhyzQUZB7wRG1FLX+aWyj55F85FPyYieIwwEAAAAAAICdLF+f4Xn1vp7Z6FcphgvXJYTrImAm/R5KT+BWwNx5sz8J9Ku0hrgcQ7gcq288d97sTwL9KtWenPfzLTyv0hMcA84WUr9KrQKWzpv9FaLfL9IL3Fql82pPcPoFjEa/RloF3Jr36gH1a6RVwHRebcC4wukewuk+bNDR+5Vex+5a/WZYA368/Vh//fx04R5G7Tf6AV7l/m3wX/Nm2YDx/tLVa960T77IBsyT3l+rDVg6L+02S8eVDVind7+X2YCtQha/Sgp/+/TWu1/aa7Z+AAAAAAAAAAAAwP6+AVvhyi6VmIOlAAAAAElFTkSuQmCC\"}]}"]}} \ No newline at end of file diff --git a/tfv/sprites.png b/tfv/sprites.png new file mode 100644 index 0000000000000000000000000000000000000000..be3c6b5eb43c843e2677399dae37e9759120dc46 GIT binary patch literal 359 zcmV-t0hs=YP)87-U)&ksGZ~9KY1##Smc-)7r&*d+^wchldT>Ire z-oL{AD(%1&;B-N@3b3@^@IT>vgKMj_UTp{FA7EIm0$i*2@&P8T0?g~x2AEbnTtYlt ziudz0t$lHO*MZ5_zb$`NPk@#61Xx*b`T$!6Sz533>;wP+000000ASVd zS93=<{q6cz%!yPoCsN6rNF{S3KQJfKh&ho)MxPTY-N)07IwvyhpiO=Wy!LW=ZN2F_ zFMq*S0hZRwgPSJEr1zZ2%LLeKP9#4o&4~a200023TmeKxBb>ErphW-x002ovPDHLk FV1gab literal 0 HcmV?d00001 diff --git a/tfv/tfv.dsk b/tfv/tfv.dsk new file mode 100644 index 0000000000000000000000000000000000000000..18d460b432e49875b211c73d6ab26708f29cff5e GIT binary patch literal 143360 zcmeI33w#vSxxmjp*(?d!1=NUwL%bq zrIDM-4YdlfSs0dVk{NfB4Vz&N$wGiclL&F-;iH1aDi{L9!3Q8pa=)`1z(*g}`up{^ zd?)ibbIy0Z^PT^B&Y6wQ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0w@z|tLn15gLhzP3Qr_mpj?-hUSNL+ApKnP z>pWikXAJ;9N6pLL1L4Hd6ZH}bQaayh?!s0pV0b`m2|Az<&H;s)mnqN7v;!>1sqf!@ zK3O?EAQkNU`Qyq;H-P1eF8L-(_?kB6SRfWDAT|%T^Dtm|A(}go z3s4)a&Rh39qyr&Td7VYpjvxMKf)<>0r(ro9aI{bz=YUK&??543E#%t*k}$~UcJS7P^adve xwJyjSuo>36pk6vp3cSv3UD&GuDNt!g{sHgp=-+F=Oke;2002ovPDHLkV1nDE+6({y literal 0 HcmV?d00001 From f2cb528fd4271929036c5c5c9deee604721a9cc6 Mon Sep 17 00:00:00 2001 From: Vince Weaver Date: Mon, 1 May 2017 23:16:17 -0400 Subject: [PATCH 3/3] tfv: get duet.s building with cc65 --- tfv/Makefile | 10 +- tfv/apple2_900.inc | 12 ++ tfv/duet.s | 305 ++++++++++++++++++++++----------------------- 3 files changed, 171 insertions(+), 156 deletions(-) create mode 100644 tfv/apple2_900.inc diff --git a/tfv/Makefile b/tfv/Makefile index ec8b98e9..d9ca7174 100644 --- a/tfv/Makefile +++ b/tfv/Makefile @@ -5,12 +5,18 @@ PNG2GR = ../gr-utils/png2gr all: tfv.dsk -tfv.dsk: TITLE.GR +tfv.dsk: TITLE.GR ED $(DOS33) -y tfv.dsk BSAVE -a 0x400 TITLE.GR + $(DOS33) -y tfv.dsk BSAVE -a 0x900 ED +ED: duet.o + ld65 -o ED duet.o -C ./apple2_900.inc + +duet.o: duet.s + ca65 -o duet.o duet.s -l duet.lst TITLE.GR: title.png $(PNG2GR) title.png TITLE.GR clean: - rm -f *~ TITLE.GR + rm -f *~ TITLE.GR *.o *.lst ED diff --git a/tfv/apple2_900.inc b/tfv/apple2_900.inc new file mode 100644 index 00000000..945c1003 --- /dev/null +++ b/tfv/apple2_900.inc @@ -0,0 +1,12 @@ +MEMORY { + ZP: start = $00, size = $1A, type = rw; + RAM: start = $900, size = $8E00, file = %O; +} + +SEGMENTS { +CODE: load = RAM, type = ro; +RODATA: load = RAM, type = ro; +DATA: load = RAM, type = rw; +BSS: load = RAM, type = bss, define = yes; +ZEROPAGE: load = ZP, type = zp; +} diff --git a/tfv/duet.s b/tfv/duet.s index 1ebecf2c..3215bd78 100644 --- a/tfv/duet.s +++ b/tfv/duet.s @@ -1,156 +1,153 @@ -/*************************************************************************** - * Copyright (C) 1979-2015 by Paul Lutus * - * http://arachnoid.com/administration * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * - ***************************************************************************/ +; *************************************************************************** +; * Copyright (C) 1979-2015 by Paul Lutus * +; * http://arachnoid.com/administration * +; * * +; * This program is free software; you can redistribute it and/or modify * +; * it under the terms of the GNU General Public License as published by * +; * the Free Software Foundation; either version 2 of the License, or * +; * (at your option) any later version. * +; * * +; * This program is distributed in the hope that it will be useful, * +; * but WITHOUT ANY WARRANTY; without even the implied warranty of * +; * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +; * GNU General Public License for more details. * +; * * +; * You should have received a copy of the GNU General Public License * +; * along with this program; if not, write to the * +; * Free Software Foundation, Inc., * +; * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * +; *************************************************************************** -/* Electric Duet Player Routine circa 1980 */ - -$0900> A9 01: LDA #$01 ; 2 *!* -$0902> 85 09: STA $09 ; 3 -$0904> 85 1D: STA $1D ; 3 -$0906> 48: PHA ; 3 -$0907> 48: PHA ; 3 -$0908> 48: PHA ; 3 -$0909> D0 15: BNE $0920 ; 4 *!* blah1 - -blah2: - -$090B> C8: INY ; 2 -$090C> B1 1E: LDA ($1E),Y ; 5 *!* -$090E> 85 09: STA $09 ; 3 -$0910> C8: INY ; 2 -$0911> B1 1E: LDA ($1E),Y ; 5 *!* -$0913> 85 1D: STA $1D ; 3 -$0915> A5 1E: LDA $1E ; 3 *!* -$0917> 18: CLC ; 2 -$0918> 69 03: ADC #$03 ; 2 *!* -$091A> 85 1E: STA $1E ; 3 -$091C> 90 02: BCC $0920 ; 4 *!* - blah1 - -$091E> E6 1F: INC $1F ; 5 - -blah1: - -$0920> A0 00: LDY #$00 ; 2 *!* -$0922> B1 1E: LDA ($1E),Y ; 5 *!* -$0924> C9 01: CMP #$01 ; 2 -$0926> F0 E3: BEQ $090B ; 4 *!* - blah2 - -$0928> B0 0D: BCS $0937 ; 4 *!* -$092A> 68: PLA ; 4 -$092B> 68: PLA ; 4 -$092C> 68: PLA ; 4 - -blah5: - -$092D> A2 49: LDX #$49 ; 2 *!* -$092F> C8: INY ; 2 -$0930> B1 1E: LDA ($1E),Y ; 5 *!* -$0932> D0 02: BNE $0936 ; 4 *!* -$0934> A2 C9: LDX #$c9 ; 2 *!* -$0936> 60: RTS ; 6 - -blah3: - -$0937> 85 08: STA $08 ; 3 -$0939> 20 2D09: JSR $092D ; 6 - blah5 - -$093C> 8E 8309: STX $0983 ; 4 -$093F> 85 06: STA $06 ; 3 -$0941> A6 09: LDX $09 ; 3 *!* - - -$0943> 4A: LSR A ; 2 -$0944> CA: DEX ; 2 -$0945> D0 FC: BNE $0943 ; 4 *!* - -$0947> 8D 7C09: STA $097C ; 4 -$094A> 20 2D09: JSR $092D ; 6 -$094D> 8E BB09: STX $09BB ; 4 -$0950> 85 07: STA $07 ; 3 -$0952> A6 1D: LDX $1D ; 3 *!* - -$0954> 4A: LSR A ; 2 -$0955> CA: DEX ; 2 -$0956> D0 FC: BNE $0954 ; 4 *!* - -$0958> 8D B409: STA $09B4 ; 4 -$095B> 68: PLA ; 4 -$095C> A8: TAY ; 2 -$095D> 68: PLA ; 4 -$095E> AA: TAX ; 2 -$095F> 68: PLA ; 4 -$0960> D0 03: BNE $0965 ; 4 *!* - -$0962> 2C 30C0: BIT $C030 ; 4 - - -$0965> C9 00: CMP #$00 ; 2 -$0967> 30 03: BMI $096C ; 4 *!* -$0969> EA: NOP ; 2 -$096A> 10 03: BPL $096F ; 4 *!* -$096C> 2C 30C0: BIT $C030 ; 4 -$096F> 85 4E: STA $4E ; 3 -$0971> 2C 00C0: BIT $C000 ; 4 -$0974> 30 C0: BMI $0936 ; 4 *!* -$0976> 88: DEY ; 2 -$0977> D0 02: BNE $097B ; 4 *!* -$0979> F0 06: BEQ $0981 ; 4 *!* -$097B> C0 00: CPY #$00 ; 2 -$097D> F0 04: BEQ $0983 ; 4 *!* -$097F> D0 04: BNE $0985 ; 4 *!* -$0981> A4 06: LDY $06 ; 3 *!* -$0983> 49 40: EOR #$40 ; 2 *!* -$0985> 24 4E: BIT $4E ; 3 -$0987> 50 07: BVC $0990 ; 4 *!* -$0989> 70 00: BVS $098B ; 4 *!* -$098B> 10 09: BPL $0996 ; 4 *!* -$098D> EA: NOP ; 2 -$098E> 30 09: BMI $0999 ; 4 *!* -$0990> EA: NOP ; 2 -$0991> 30 03: BMI $0996 ; 4 *!* -$0993> EA: NOP ; 2 -$0994> 10 03: BPL $0999 ; 4 *!* -$0996> CD 30C0: CMP $C030 ; 4 -$0999> C6 4F: DEC $4F ; 5 -$099B> D0 11: BNE $09AE ; 4 *!* -$099D> C6 08: DEC $08 ; 5 -$099F> D0 0D: BNE $09AE ; 4 *!* -$09A1> 50 03: BVC $09A6 ; 4 *!* -$09A3> 2C 30C0: BIT $C030 ; 4 -$09A6> 48: PHA ; 3 -$09A7> 8A: TXA ; 2 -$09A8> 48: PHA ; 3 -$09A9> 98: TYA ; 2 -$09AA> 48: PHA ; 3 -$09AB> 4C 1509: JMP $0915 ; 3 -$09AE> CA: DEX ; 2 -$09AF> D0 02: BNE $09B3 ; 4 *!* -$09B1> F0 06: BEQ $09B9 ; 4 *!* -$09B3> E0 00: CPX #$00 ; 2 -$09B5> F0 04: BEQ $09BB ; 4 *!* -$09B7> D0 04: BNE $09BD ; 4 *!* -$09B9> A6 07: LDX $07 ; 3 *!* -$09BB> 49 80: EOR #$80 ; 2 *!* -$09BD> 70 A3: BVS $0962 ; 4 *!* -$09BF> EA: NOP ; 2 -$09C0> 50 A3: BVC $0965 ; 4 *!* +; Electric Duet Player Routine circa 1980 + LDA #$01 ; $0900> A9 01 ; 2 *!* + STA $09 ; $0902> 85 09 ; 3 + STA $1D ; $0904> 85 1D ; 3 + PHA ; $0906> 48: PHA ; 3 + PHA ; $0907> 48: PHA ; 3 + PHA ; $0908> 48: PHA ; 3 + BNE label1 ; $0909> D0 15: BNE $0920 ; 4 *!* +label2: + INY ; $090B> C8: INY ; 2 + LDA ($1E),Y ; $090C> B1 1E: LDA ($1E),Y ; 5 *!* + STA $09 ; $090E> 85 09: STA $09 ; 3 + INY ; $0910> C8: INY ; 2 + LDA ($1E),Y ; $0911> B1 1E: LDA ($1E),Y ; 5 *!* + STA $1D ; $0913> 85 1D: STA $1D ; 3 + LDA $1E ; $0915> A5 1E: LDA $1E ; 3 *!* + CLC ; $0917> 18: CLC ; 2 + ADC #$03 ; $0918> 69 03: ADC #$03 ; 2 *!* + STA $1E ; $091A> 85 1E: STA $1E ; 3 + BCC label1 ; $091C> 90 02: BCC $0920 ; 4 *!* + INC $1F ; $091E> E6 1F: INC $1F ; 5 +label1: + LDY #$00 ; $0920> A0 00: LDY #$00 ; 2 *!* + LDA ($1E),Y ; $0922> B1 1E: LDA ($1E),Y ; 5 *!* + CMP #$01 ; $0924> C9 01: CMP #$01 ; 2 + BEQ label2 ; $0926> F0 E3: BEQ $090B ; 4 *!* + BCS label3 ; $0928> B0 0D: BCS $0937 ; 4 *!* + PLA ; $092A> 68: PLA ; 4 + PLA ; $092B> 68: PLA ; 4 + PLA ; $092C> 68: PLA ; 4 + LDX #$49 ; $092D> A2 49: LDX #$49 ; 2 *!* + INY ; $092F> C8: INY ; 2 + LDA ($1E),Y ; $0930> B1 1E: LDA ($1E),Y ; 5 *!* + BNE label4 ; $0932> D0 02: BNE $0936 ; 4 *!* + LDX #$C9 ; $0934> A2 C9: LDX #$c9 ; 2 *!* +label4: + RTS ; $0936> 60: RTS ; 6 +label3: + STA $08 ; $0937> 85 08: STA $08 ; 3 + JSR $092D ; $0939> 20 2D09: JSR $092D ; 6 + STX $0983 ; $093C> 8E 8309: STX $0983 ; 4 + STA $06 ; $093F> 85 06: STA $06 ; 3 + LDX $09 ; $0941> A6 09: LDX $09 ; 3 *!* +label5: + LSR A ; $0943> 4A: LSR A ; 2 + DEX ; $0944> CA: DEX ; 2 + BNE label5 ; $0945> D0 FC: BNE $0943 ; 4 *!* + STA $097C ; $0947> 8D 7C09: STA $097C ; 4 + JSR $092D ; $094A> 20 2D09: JSR $092D ; 6 + STX $09BB ; $094D> 8E BB09: STX $09BB ; 4 + STA $07 ; $0950> 85 07: STA $07 ; 3 + LDX $1D ; $0952> A6 1D: LDX $1D ; 3 *!* +label6: + LSR A ; $0954> 4A: LSR A ; 2 + DEX ; $0955> CA: DEX ; 2 + BNE label6 ; $0956> D0 FC: BNE $0954 ; 4 *!* + STA $09B4 ; $0958> 8D B409: STA $09B4 ; 4 + PLA ; $095B> 68: PLA ; 4 + TAY ; $095C> A8: TAY ; 2 + PLA ; $095D> 68: PLA ; 4 + TAX ; $095E> AA: TAX ; 2 + PLA ; $095F> 68: PLA ; 4 + BNE label8 ; $0960> D0 03: BNE $0965 ; 4 *!* +label99: + BIT $C030 ; $0962> 2C 30C0: BIT $C030 ; 4 +label8: + CMP #$00 ; $0965> C9 00: CMP #$00 ; 2 + BMI label7 ; $0967> 30 03: BMI $096C ; 4 *!* + NOP ; $0969> EA: NOP ; 2 + BPL label9 ; $096A> 10 03: BPL $096F ; 4 *!* +label7: + BIT $C030 ; $096C> 2C 30C0: BIT $C030 ; 4 +label9: + STA $4E ; $096F> 85 4E: STA $4E ; 3 + BIT $C000 ; $0971> 2C 00C0: BIT $C000 ; 4 + BMI label4 ; $0974> 30 C0: BMI $0936 ; 4 *!* + DEY ; $0976> 88: DEY ; 2 + BNE label10 ; $0977> D0 02: BNE $097B ; 4 *!* + BEQ label11 ; $0979> F0 06: BEQ $0981 ; 4 *!* +label10: + CPY #$00 ; $097B> C0 00: CPY #$00 ; 2 + BEQ label12 ; $097D> F0 04: BEQ $0983 ; 4 *!* + BNE label13 ; $097F> D0 04: BNE $0985 ; 4 *!* +label11: + LDY $06 ; $0981> A4 06: LDY $06 ; 3 *!* +label12: + EOR #$40 ; $0983> 49 40: EOR #$40 ; 2 *!* +label13: + BIT $4E ; $0985> 24 4E: BIT $4E ; 3 + BVC label14 ; $0987> 50 07: BVC $0990 ; 4 *!* + BVS label15 ; $0989> 70 00: BVS $098B ; 4 *!* +label15: + BPL label16 ; $098B> 10 09: BPL $0996 ; 4 *!* + NOP ; $098D> EA: NOP ; 2 + BMI label17 ; $098E> 30 09: BMI $0999 ; 4 *!* +label14: + NOP ; $0990> EA: NOP ; 2 + BMI label16 ; $0991> 30 03: BMI $0996 ; 4 *!* + NOP ; $0993> EA: NOP ; 2 + BPL label17 ; $0994> 10 03: BPL $0999 ; 4 *!* +label16: + CMP $C030 ; $0996> CD 30C0: CMP $C030 ; 4 +label17: + DEC $4F ; $0999> C6 4F: DEC $4F ; 5 + BNE label18 ; $099B> D0 11: BNE $09AE ; 4 *!* + DEC $08 ; $099D> C6 08: DEC $08 ; 5 + BNE label18 ; $099F> D0 0D: BNE $09AE ; 4 *!* + BVC label19 ; $09A1> 50 03: BVC $09A6 ; 4 *!* + BIT $C030 ; $09A3> 2C 30C0: BIT $C030 ; 4 +label19: + PHA ; $09A6> 48: PHA ; 3 + TXA ; $09A7> 8A: TXA ; 2 + PHA ; $09A8> 48: PHA ; 3 + TYA ; $09A9> 98: TYA ; 2 + PHA ; $09AA> 48: PHA ; 3 + JMP $0915 ; $09AB> 4C 1509: JMP $0915 ; 3 +label18: + DEX ; $09AE> CA: DEX ; 2 + BNE label20 ; $09AF> D0 02: BNE $09B3 ; 4 *!* + BEQ label21 ; $09B1> F0 06: BEQ $09B9 ; 4 *!* +label20: + CPX #$00 ; $09B3> E0 00: CPX #$00 ; 2 + BEQ label22 ; $09B5> F0 04: BEQ $09BB ; 4 *!* + BNE label23 ; $09B7> D0 04: BNE $09BD ; 4 *!* +label21: + LDX $07 ; $09B9> A6 07: LDX $07 ; 3 *!* +label22: + EOR #$80 ; $09BB> 49 80: EOR #$80 ; 2 *!* +label23: + BVS label99 ; $09BD> 70 A3: BVS $0962 ; 4 *!* + NOP ; $09BF> EA: NOP ; 2 + BVC label8 ; $09C0> 50 A3: BVC $0965 ; 4 *!*