mirror of
https://github.com/deater/dos33fsprogs.git
synced 2024-12-25 20:30:31 +00:00
tfv: more commenting of the duet "source"
This commit is contained in:
parent
453ca6bdb2
commit
ab1c70b37c
@ -5,7 +5,21 @@ https://www.youtube.com/watch?v=bxwgd0PVyQQ
|
||||
http://www.steamgames.com/v/img/whatsnew/StillAlive.pdf
|
||||
|
||||
/* Media */
|
||||
http://hackaday.com/2017/01/12/portal-ported-to-the-apple-ii/
|
||||
https://news.ycombinator.com/item?id=13392173
|
||||
Was front-page on hackernews
|
||||
http://www.theregister.co.uk/2017/01/14/apple_2_fan_puts_the_port_in_portal/
|
||||
http://gizmodo.com/hero-coder-adapts-portal-for-the-apple-ii-1791213030
|
||||
http://www.avclub.com/article/guy-made-portal-apple-ii-complete-remade-still-ali-248404
|
||||
https://www.jwz.org/blog/2017/01/portal-for-apple/
|
||||
http://www.metafilter.com/164545/He-did-what-he-must-because-he-can
|
||||
http://www.pcgamer.com/portal-reimagined-for-the-apple-ii-by-inventive-coder/?utm_content=bufferf1457&utm_medium=social&utm_source=twitter&utm_campaign=buffer-pcgamertw
|
||||
|
||||
Related videos:
|
||||
https://www.youtube.com/watch?v=DRJZ5KfhL2s
|
||||
https://www.youtube.com/watch?v=g4MzQDjCYd4&feature=youtu.be&a
|
||||
https://www.youtube.com/watch?v=suBd5KJM-bA&feature=youtu.be&a
|
||||
|
||||
|
||||
/* Related Work */
|
||||
TI-83+ https://www.youtube.com/watch?v=SQvWa_q8OrI
|
||||
|
@ -14,6 +14,7 @@ static void tooo(void) {
|
||||
|
||||
color_equals(r[n]);
|
||||
plot(x2,y2);
|
||||
grsim_update();
|
||||
return;
|
||||
}
|
||||
|
||||
|
229
tfv/duet.s
229
tfv/duet.s
@ -20,134 +20,149 @@
|
||||
|
||||
; 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 *!*
|
||||
.define EQU =
|
||||
|
||||
; These are all "Free" zero page locations
|
||||
LOC6 EQU $06
|
||||
LOC7 EQU $07
|
||||
LOC8 EQU $08
|
||||
LOC9 EQU $09
|
||||
LOC1D EQU $1D
|
||||
LOC1E EQU $1E
|
||||
LOC1F EQU $1F
|
||||
LOC4E EQU $4E
|
||||
LOC4F EQU $4F
|
||||
|
||||
LDA #$01 ; 900: A9 01 ; 2 *!*
|
||||
STA LOC9 ; 902: 85 09 ; 3
|
||||
STA LOC1D ; 904: 85 1D ; 3
|
||||
PHA ; 906: 48 ; 3
|
||||
PHA ; 907: 48 ; 3
|
||||
PHA ; 908: 48 ; 3
|
||||
BNE label1 ; 909: D0 15 ; 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
|
||||
INY ; 90B: C8 ; 2
|
||||
LDA (LOC1E),Y ; 90C: B1 1E ; 5 *!*
|
||||
STA LOC9 ; 90E: 85 09 ; 3
|
||||
INY ; 910: C8 ; 2
|
||||
LDA (LOC1E),Y ; 911: B1 1E ; 5 *!*
|
||||
STA LOC1D ; 913: 85 1D ; 3
|
||||
loop:
|
||||
LDA LOC1E ; 915: A5 1E ; 3 *!*
|
||||
CLC ; 917: 18 ; 2
|
||||
ADC #$03 ; 918: 69 03 ; 2 *!*
|
||||
STA LOC1E ; 91A: 85 1E ; 3
|
||||
BCC label1 ; 91C: 90 02 ; 4 *!*
|
||||
INC LOC1F ; 91E: E6 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 *!*
|
||||
LDY #$00 ; 920: A0 00 ; 2 *!*
|
||||
LDA (LOC1E),Y ; 922: B1 1E ; 5 *!*
|
||||
CMP #$01 ; 924: C9 01 ; 2
|
||||
BEQ label2 ; 926: F0 E3 ; 4 *!*
|
||||
BCS label3 ; 928: B0 0D ; 4 *!*
|
||||
PLA ; 92A: 68 ; 4
|
||||
PLA ; 92B: 68 ; 4
|
||||
PLA ; 92C: 68 ; 4
|
||||
sub1:
|
||||
LDX #$49 ; 92D: A2 49 ; 2 *!*
|
||||
INY ; 92F: C8 ; 2
|
||||
LDA (LOC1E),Y ; 930: B1 1E ; 5 *!*
|
||||
BNE label4 ; 932: D0 02 ; 4 *!*
|
||||
LDX #$C9 ; 934: A2 C9 ; 2 *!*
|
||||
label4:
|
||||
RTS ; $0936> 60: RTS ; 6
|
||||
RTS ; 936: 60 ; 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 *!*
|
||||
STA LOC8 ; 937: 85 08 ; 3
|
||||
JSR sub1 ; 939: 20 2D09 ; 6
|
||||
STX $0983 ; 93C: 8E 8309 ; 4 ; self-modify
|
||||
STA LOC6 ; 93F: 85 06 ; 3
|
||||
LDX LOC9 ; 941: A6 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 *!*
|
||||
LSR A ; 943: 4A ; 2
|
||||
DEX ; 944: CA ; 2
|
||||
BNE label5 ; 945: D0 FC ; 4 *!*
|
||||
STA $097C ; 947: 8D 7C09 ; 4 ; self-modify
|
||||
JSR sub1 ; 94A: 20 2D09 ; 6
|
||||
STX $09BB ; 94D: 8E BB09 ; 4 ; self-modify
|
||||
STA LOC7 ; 950: 85 07 ; 3
|
||||
LDX LOC1D ; 952: A6 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 *!*
|
||||
LSR A ; 954: 4A ; 2
|
||||
DEX ; 955: CA ; 2
|
||||
BNE label6 ; 956: D0 FC ; 4 *!*
|
||||
STA $09B4 ; 958: 8D B409 ; 4 ; self-modify
|
||||
PLA ; 95B: 68 ; 4
|
||||
TAY ; 95C: A8 ; 2
|
||||
PLA ; 95D: 68 ; 4
|
||||
TAX ; 95E: AA ; 2
|
||||
PLA ; 95F: 68 ; 4
|
||||
BNE label8 ; 960: D0 03 ; 4 *!*
|
||||
label99:
|
||||
BIT $C030 ; $0962> 2C 30C0: BIT $C030 ; 4
|
||||
BIT $C030 ; 962: 2C 30C0 ; 4 SPEAKER
|
||||
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 *!*
|
||||
CMP #$00 ; 965: C9 00 ; 2
|
||||
BMI label7 ; 967: 30 03 ; 4 *!*
|
||||
NOP ; 969: EA ; 2
|
||||
BPL label9 ; 96A: 10 03 ; 4 *!*
|
||||
label7:
|
||||
BIT $C030 ; $096C> 2C 30C0: BIT $C030 ; 4
|
||||
BIT $C030 ; 96C: 2C 30C0 ; 4 SPEAKER
|
||||
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 *!*
|
||||
STA LOC4E ; 96F: 85 4E ; 3
|
||||
BIT $C000 ; 971: 2C 00C0 ; 4
|
||||
BMI label4 ; 974: 30 C0 ; 4 *!*
|
||||
DEY ; 976: 88 ; 2
|
||||
BNE label10 ; 977: D0 02 ; 4 *!*
|
||||
BEQ label11 ; 979: F0 06 ; 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 *!*
|
||||
CPY #$00 ; 97B: C0 00 ; 2
|
||||
BEQ label12 ; 97D: F0 04 ; 4 *!* !!!
|
||||
BNE label13 ; 97F: D0 04 ; 4 *!*
|
||||
label11:
|
||||
LDY $06 ; $0981> A4 06: LDY $06 ; 3 *!*
|
||||
LDY LOC6 ; 981: A4 06 ; 3 *!*
|
||||
label12:
|
||||
EOR #$40 ; $0983> 49 40: EOR #$40 ; 2 *!*
|
||||
EOR #$40 ; 983: 49 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 *!*
|
||||
BIT LOC4E ; 985: 24 4E ; 3
|
||||
BVC label14 ; 987: 50 07 ; 4 *!*
|
||||
BVS label15 ; 989: 70 00 ; 4 *!*
|
||||
label15:
|
||||
BPL label16 ; $098B> 10 09: BPL $0996 ; 4 *!*
|
||||
NOP ; $098D> EA: NOP ; 2
|
||||
BMI label17 ; $098E> 30 09: BMI $0999 ; 4 *!*
|
||||
BPL label16 ; 98B: 10 09 ; 4 *!*
|
||||
NOP ; 98D: EA ; 2
|
||||
BMI label17 ; 98E: 30 09 ; 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 *!*
|
||||
NOP ; 990: EA ; 2
|
||||
BMI label16 ; 991: 30 03 ; 4 *!*
|
||||
NOP ; 993: EA ; 2
|
||||
BPL label17 ; 994: 10 03 ; 4 *!*
|
||||
label16:
|
||||
CMP $C030 ; $0996> CD 30C0: CMP $C030 ; 4
|
||||
CMP $C030 ; 996: CD 30C0 ; 4 SPEAKER
|
||||
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
|
||||
DEC LOC4F ; 999: C6 4F ; 5
|
||||
BNE label18 ; 99B: D0 11 ; 4 *!*
|
||||
DEC LOC8 ; 99D: C6 08 ; 5
|
||||
BNE label18 ; 99F: D0 0D ; 4 *!*
|
||||
BVC label19 ; 9A1: 50 03 ; 4 *!*
|
||||
BIT $C030 ; 9A3: 2C 30C0 ; 4 SPEAKER
|
||||
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
|
||||
PHA ; 9A6: 48 ; 3
|
||||
TXA ; 9A7: 8A ; 2
|
||||
PHA ; 9A8: 48 ; 3
|
||||
TYA ; 9A9: 98 ; 2
|
||||
PHA ; 9AA: 48 ; 3
|
||||
JMP loop ; 9AB: 4C 1509 ; 3
|
||||
label18:
|
||||
DEX ; $09AE> CA: DEX ; 2
|
||||
BNE label20 ; $09AF> D0 02: BNE $09B3 ; 4 *!*
|
||||
BEQ label21 ; $09B1> F0 06: BEQ $09B9 ; 4 *!*
|
||||
DEX ; 9AE: CA ; 2
|
||||
BNE label20 ; 9AF: D0 02 ; 4 *!*
|
||||
BEQ label21 ; 9B1: F0 06 ; 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 *!*
|
||||
CPX #$00 ; 9B3: E0 00 ; 2
|
||||
BEQ label22 ; 9B5: F0 04 ; 4 *!* !!!
|
||||
BNE label23 ; 9B7: D0 04 ; 4 *!*
|
||||
label21:
|
||||
LDX $07 ; $09B9> A6 07: LDX $07 ; 3 *!*
|
||||
LDX LOC7 ; 9B9: A6 07 ; 3 *!*
|
||||
label22:
|
||||
EOR #$80 ; $09BB> 49 80: EOR #$80 ; 2 *!*
|
||||
EOR #$80 ; 9BB: 49 80 ; 2 *!* !!!
|
||||
label23:
|
||||
BVS label99 ; $09BD> 70 A3: BVS $0962 ; 4 *!*
|
||||
NOP ; $09BF> EA: NOP ; 2
|
||||
BVC label8 ; $09C0> 50 A3: BVC $0965 ; 4 *!*
|
||||
BVS label99 ; 9BD: 70 A3 ; 4 *!*
|
||||
NOP ; 9BF: EA ; 2
|
||||
BVC label8 ; 9C0: 50 A3 ; 4 *!*
|
||||
|
Loading…
Reference in New Issue
Block a user