Help with a "Your computer" program

Here you can ask questions or provide insights about how to use efficiently 6502 assembly code on the Oric.
Post Reply
User avatar
peacer
Flight Lieutenant
Posts: 393
Joined: Wed Jun 09, 2010 9:23 pm
Location: Turkey
Contact:

Help with a "Your computer" program

Post by peacer » Fri Feb 08, 2019 1:00 am

I found an excellent utility in Your computer magazine December 1984 issue "Oric Sprites"
As it was described, "Sprites will work in Text mode, but one pixel movement in every direction"

Image
Image

The usage is well documented and Eventhough it is so hard to type-in the listing, I became really curious about the action of it, So I typed the program in as it is only 1 page of listings.

Unfortunately there are many codes that are really hard to read . I had to guess what was the code. I know there are many mistakes. But here is the code that I typed in.

Code: Select all

0 HIMEM 38892
10 FOR F=38912 TO 40011
20 POKE F,0
30 NEXT F
40 N=5
50 POKE 105,N
60 FOR F=38892 TO 38899
70 READA
80 POKE F,A
90 NEXT F
100 DATA 18,12,30,45,45,30,18,0
105 GOSUB 60000
110 POKE 38912+N*2-2,1
120 POKE 39012+N*2-2,15
130 POKE 39112+N*2-2,15
140 DOKE 39212+N*2-2,46080+(8*ASC("a"))
150 DOKE 39712+N*2-2,38892
160 POKE 39812+N*2-2,ASC("a")
170 DOKE #2F5,40396
180 !
190 FOR F=1 TO 20
200 Y=PEEK(39012+N*2-2)
210 Y=Y+1
220 POKE 39012+N*2-2,Y
230 X=PEEK (39112+N*2-2)
240 X=X+1
250 POKE 39112+N*2-2,X
260 !
270 NEXT F
280 POKE 38912+N*2-2,0
290 !
300 END
500 HIMEM 38900
505 FOR F=1 TO 8:READ A:NEXT
510 GOSUB 60000
520 FOR F=38912 TO 40011
530 POKE F,0
540 NEXT
550 FOR F=1 TO 20
560 POKE 38912+F*2-2,1
570 NEXT
580 C=0
590 FOR F=1 TO 20
600 POKE 39112+F*2-2,C
610 C=C+12
620 NEXT
625 Y=20
630 FOR F=1 TO 20
640 POKE 39012+F*2-2,20
650 NEXT
660 C=33
670 DOKE 39212+F*2-2,46080+(8*C)
680 C=C+4
690 NEXT
700 C=64888
710 FOR F=1 TO 20
720 DOKE 39712+F*2-2,C
740 C=C+8
740 NEXT
750 C=33
760 FOR F=1 TO 20
770 POKE 39812+F*2-2,C
780 C=C+4
790 NEXT
795 POKE 105,20
800 DOKE #2F5,40396
802 PAPER 0:INK 7
803 POKE 48035,0
804 POKE #26A,10
805 CLS
810 !
820 Y=Y+1
830 FOR F=1 TO 20
840 POKE 39012+F*2-2,Y
850 NEXT
860 IF Y=200 THEN END
870 GOTO 810
10000 REM
60000 FOR F=40012 TO 40618
60010 READ A
60020 POKE F,A
60030 NEXT
60040 DATA#A5,100,#A2,0,#C9,8,#90,6,#38,#E9,8,#E8,#D0,246,#85,102,#E0,0,#F0
60050DATA16,#18,#A5,106,#69,40,#85,106,#A5,107,#69,0,#85,107,#CA,#D0,240,#60
60060DATA#A5,101,#A2,0,#C9,6,#90,6,#38,#E9,6,#E8,#D0,246,#85,103,#8A,#18,#65
60070 DATA106,#85,106,#A5,107,#69,0,#85,107,#60
60080 DATA#A6,102,#D0,1,#60,#A0,14,#B1,108,#C8,#91,108,#88,#88,#10,247,#A9,0
60090 DATA#C8,#91,108,#CA,#D0,237,#60
60100 DATA#A5,103,#D0,1,#60,#18,#A5,108,#69,16,#85,110,#A5,109,#69,0,#85,111
60110 DATA#A0,0,#A9,0,#85,112,#B1,108,#A6,103,#4A,#66,112,#CA,#D0,250,#91
60120 DATA108,#18,#66,112,#66,112,#A5,112,#91,110,#C8,#C0,16,#D0,226,#60
60130 DATA#A5,115,#10,2,#49,128,#C9,32,#F0,35,#90,33,#38,#E9,32,#AA,#18,#A5
60140 DATA113,#69,8,#85,113,#A5,114,#69,0,#85,114,#CA,#D0,240,#A0,0,#B1,113
60150 DATA#11,108,#91,108,#C8,#D0,8,#D0,245,#60
60160 DATA#A9,0,#A0,8,#91,108,#C8,#C0,32,#D0,249,#60
60170 DATA#A0,0,#B1,106,#85,116,#C8,#B1,106,#85,118,#A0,40,#B1,106,#85,117
60180 DATA#C8,#91,106,#85,119,#60
60190 DATA#A2,0,#B5,116,#85,115,#48,#8A,#48,#98,#48,#20,218,156,#68,#A8,#68
60200 DATA#AA,#68,#A9,0,#85,113,#A9,181,#85,114,#18,#A5,108,#69,8,#85,108
60210 DATA#A5,109,#69,0,#85,109,#E8,#E0,4,#D0,213,#60
60220 DATA#A0,0,#A5,104,#91,106,#C8,#AA,#E8,#E8,#8A,#91,106,#A0,40,#AA,#CA
60230 DATA#8A,#91,106,#C8,#AA,#E8,#E8,#E8,#8A,#91,106,#60
60240 DATA#A0,0,#A5,116,#91,106,#C8,#A5,118,#91,106,#A0,40,#A5,117,#91,106
60250 DATA#C8,#A5,119,#91,106,#60
60260 DATA#A0,0,#B1,120,#91,108,#C8,#C0,8,#D0,247,#60
60270 DATA#A5,122,#18,65,122,#A8,#A5,106,#99,232,155,#A5,107,#99,233,155
60280 DATA#60
60290 DATA#A5,122,#18,#65,122,#A8,#A5,116,#99,144,153,#A5,117,#99,244,153
60300 DATA#A5,118,#99,88,154,#A5,119,#99,100,154,#60
60310 DATA#A9,0,#85,166,#A9,152,#85,167
60320 DATA#A9,0,#8D,192,2,#A5,105,#C9,50,#B0,4,#C9,0,#D0,1,#60,#A9,0,#85,122
60330 DATA#A5,122,#10,#65,122,#A8,#69,0,152,#C9,0,#D0,15,#B9,1,152,#C9,0,#F0
60340 DATA56,#A9,0,#99,1,152,#18,#90,15,#B9,1,152,#C9,0,#D0,8,#A9,1,#99,1
60350 DATA152,#18,#90,33,#B9,232,155,#95,106,#B9,233,155,#85,107,#89,144,153
60360 DATA#85,116,#B9,244,153,#85,117,#B9,88,154,#85,110,#B9,188,154,#85,119
60370 DATA#20,117,157,#C6,122,#A5,105,#C5,122,#D0,172,#A5,105,#85,122,#C6
60380 DATA122,#A5,122,#18,#65,122,#A8,#B9,0,152,#C9,0,#D0,7,#99,1,152,#C9,0
60390 DATA#F0,84,#A9,128,#85,106,#A9,187,#85,107,#A9,0,#85,113,#A9,181,#85
60400 DATA114,#B9,100,152,#85,100,#B9,200,152,#85,101,#B9,132,155,#85,104
60410 DATA#B9,44,153,#85,100,#B9,45,153,#85,109,#B9,32,155,#85,120,#B9,33
60420 DATA155,#85,121,#20,8,157,#20,140,157,#20,76,156,#20,113,156,#20,152
60430 DATA157,#20,142,156,#20,167,156,#20,20,157,#20,169,157,#20,43,157,#20
60440 DATA89,157,#C6,122,#A5,122,#C9,255,#D0,144,#60
60450 RETURN
I disassamble the the resulting machine code with Oric explorer as like that

Code: Select all

$9C4C  A5 64       LDA $64        .d 
$9C4E  A2 00       LDX #$00       .. 
$9C50  C9 08       CMP #$08       .. 
$9C52  90 06       BCC $9C5A      .. 
$9C54  38          SEC            8  
$9C55  E9 08       SBC #$08       .. 
$9C57  E8          INX            .  
$9C58  D0 F6       BNE $9C50      .. 
$9C5A  85 66       STA $66        .f 
$9C5C  E0 00       CPX #$00       .. 
$9C5E  F0 10       BEQ $9C70      .. 
$9C60  18          CLC            .  
$9C61  A5 6A       LDA $6A        .j 
$9C63  69 28       ADC #$28       i( 
$9C65  85 6A       STA $6A        .j 
$9C67  A5 6B       LDA $6B        .k 
$9C69  69 00       ADC #$00       i. 
$9C6B  85 6B       STA $6B        .k 
$9C6D  CA          DEX            .  
$9C6E  D0 F0       BNE $9C60      .. 
$9C70  60          RTS            ©  
$9C71  A5 65       LDA $65        .e 
$9C73  A2 00       LDX #$00       .. 
$9C75  C9 06       CMP #$06       .. 
$9C77  90 06       BCC $9C7F      .. 
$9C79  38          SEC            8  
$9C7A  E9 06       SBC #$06       .. 
$9C7C  E8          INX            .  
$9C7D  D0 F6       BNE $9C75      .. 
$9C7F  85 67       STA $67        .g 
$9C81  8A          TXA            .  
$9C82  18          CLC            .  
$9C83  65 6A       ADC $6A        ej 
$9C85  85 6A       STA $6A        .j 
$9C87  A5 6B       LDA $6B        .k 
$9C89  69 00       ADC #$00       i. 
$9C8B  85 6B       STA $6B        .k 
$9C8D  60          RTS            ©  
$9C8E  A6 66       LDX $66        .f 
$9C90  D0 01       BNE $9C93      .. 
$9C92  60          RTS            ©  
$9C93  A0 0E       LDY #$0E       .. 
$9C95  B1 6C       LDA ($6C),Y    .l 
$9C97  C8          INY            .  
$9C98  91 6C       STA ($6C),Y    .l 
$9C9A  88          DEY            .  
$9C9B  88          DEY            .  
$9C9C  10 F7       BPL $9C95      .. 
$9C9E  A9 00       LDA #$00       .. 
$9CA0  C8          INY            .  
$9CA1  91 6C       STA ($6C),Y    .l 
$9CA3  CA          DEX            .  
$9CA4  D0 ED       BNE $9C93      .. 
$9CA6  60          RTS            ©  
$9CA7  A5 67       LDA $67        .g 
$9CA9  D0 01       BNE $9CAC      .. 
$9CAB  60          RTS            ©  
$9CAC  18          CLC            .  
$9CAD  A5 6C       LDA $6C        .l 
$9CAF  69 10       ADC #$10       i. 
$9CB1  85 6E       STA $6E        .n 
$9CB3  A5 6D       LDA $6D        .m 
$9CB5  69 00       ADC #$00       i. 
$9CB7  85 6F       STA $6F        .o 
$9CB9  A0 00       LDY #$00       .. 
$9CBB  A9 00       LDA #$00       .. 
$9CBD  85 70       STA $70        .p 
$9CBF  B1 6C       LDA ($6C),Y    .l 
$9CC1  A6 67       LDX $67        .g 
$9CC3  4A          LSR A          J  
$9CC4  66 70       ROR $70        fp 
$9CC6  CA          DEX            .  
$9CC7  D0 FA       BNE $9CC3      .. 
$9CC9  91 6C       STA ($6C),Y    .l 
$9CCB  18          CLC            .  
$9CCC  66 70       ROR $70        fp 
$9CCE  66 70       ROR $70        fp 
$9CD0  A5 70       LDA $70        .p 
$9CD2  91 6E       STA ($6E),Y    .n 
$9CD4  C8          INY            .  
$9CD5  C0 10       CPY #$10       .. 
$9CD7  D0 E2       BNE $9CBB      .. 
$9CD9  60          RTS            ©  
$9CDA  A5 73       LDA $73        .s 
$9CDC  10 02       BPL $9CE0      .. 
$9CDE  49 80       EOR #$80       I. 
$9CE0  C9 20       CMP #$20       .  
$9CE2  F0 23       BEQ $9D07      .# 
$9CE4  90 21       BCC $9D07      .! 
$9CE6  38          SEC            8  
$9CE7  E9 20       SBC #$20       .  
$9CE9  AA          TAX            .  
$9CEA  18          CLC            .  
$9CEB  A5 71       LDA $71        .q 
$9CED  69 08       ADC #$08       i. 
$9CEF  85 71       STA $71        .q 
$9CF1  A5 72       LDA $72        .r 
$9CF3  69 00       ADC #$00       i. 
$9CF5  85 72       STA $72        .r 
$9CF7  CA          DEX            .  
$9CF8  D0 F0       BNE $9CEA      .. 
$9CFA  A0 00       LDY #$00       .. 
$9CFC  B1 71       LDA ($71),Y    .q 
$9CFE  11 6C       ORA ($6C),Y    .l 
$9D00  91 6C       STA ($6C),Y    .l 
$9D02  C8          INY            .  
$9D03  D0 08       BNE $9D0D      .. 
$9D05  D0 F5       BNE $9CFC      .. 
$9D07  60          RTS            ©  
$9D08  A9 00       LDA #$00       .. 
$9D0A  A0 08       LDY #$08       .. 
$9D0C  91 6C       STA ($6C),Y    .l 
$9D0E  C8          INY            .  
$9D0F  C0 20       CPY #$20       .  
$9D11  D0 F9       BNE $9D0C      .. 
$9D13  60          RTS            ©  
$9D14  A0 00       LDY #$00       .. 
$9D16  B1 6A       LDA ($6A),Y    .j 
$9D18  85 74       STA $74        .t 
$9D1A  C8          INY            .  
$9D1B  B1 6A       LDA ($6A),Y    .j 
$9D1D  85 76       STA $76        .v 
$9D1F  A0 28       LDY #$28       .( 
$9D21  B1 6A       LDA ($6A),Y    .j 
$9D23  85 75       STA $75        .u 
$9D25  C8          INY            .  
$9D26  91 6A       STA ($6A),Y    .j 
$9D28  85 77       STA $77        .w 
$9D2A  60          RTS            ©  
$9D2B  A2 00       LDX #$00       .. 
$9D2D  B5 74       LDA $74,X      .t 
$9D2F  85 73       STA $73        .s 
$9D31  48          PHA            H  
$9D32  8A          TXA            .  
$9D33  48          PHA            H  
$9D34  98          TYA            .  
$9D35  48          PHA            H  
$9D36  20 DA 9C    JSR $9CDA       ..
$9D39  68          PLA            h  
$9D3A  A8          TAY            .  
$9D3B  68          PLA            h  
$9D3C  AA          TAX            .  
$9D3D  68          PLA            h  
$9D3E  A9 00       LDA #$00       .. 
$9D40  85 71       STA $71        .q 
$9D42  A9 B5       LDA #$B5       .. 
$9D44  85 72       STA $72        .r 
$9D46  18          CLC            .  
$9D47  A5 6C       LDA $6C        .l 
$9D49  69 08       ADC #$08       i. 
$9D4B  85 6C       STA $6C        .l 
$9D4D  A5 6D       LDA $6D        .m 
$9D4F  69 00       ADC #$00       i. 
$9D51  85 6D       STA $6D        .m 
$9D53  E8          INX            .  
$9D54  E0 04       CPX #$04       .. 
$9D56  D0 D5       BNE $9D2D      .. 
$9D58  60          RTS            ©  
$9D59  A0 00       LDY #$00       .. 
$9D5B  A5 68       LDA $68        .h 
$9D5D  91 6A       STA ($6A),Y    .j 
$9D5F  C8          INY            .  
$9D60  AA          TAX            .  
$9D61  E8          INX            .  
$9D62  E8          INX            .  
$9D63  8A          TXA            .  
$9D64  91 6A       STA ($6A),Y    .j 
$9D66  A0 28       LDY #$28       .( 
$9D68  AA          TAX            .  
$9D69  CA          DEX            .  
$9D6A  8A          TXA            .  
$9D6B  91 6A       STA ($6A),Y    .j 
$9D6D  C8          INY            .  
$9D6E  AA          TAX            .  
$9D6F  E8          INX            .  
$9D70  E8          INX            .  
$9D71  E8          INX            .  
$9D72  8A          TXA            .  
$9D73  91 6A       STA ($6A),Y    .j 
$9D75  60          RTS            ©  
$9D76  A0 00       LDY #$00       .. 
$9D78  A5 74       LDA $74        .t 
$9D7A  91 6A       STA ($6A),Y    .j 
$9D7C  C8          INY            .  
$9D7D  A5 76       LDA $76        .v 
$9D7F  91 6A       STA ($6A),Y    .j 
$9D81  A0 28       LDY #$28       .( 
$9D83  A5 75       LDA $75        .u 
$9D85  91 6A       STA ($6A),Y    .j 
$9D87  C8          INY            .  
$9D88  A5 77       LDA $77        .w 
$9D8A  91 6A       STA ($6A),Y    .j 
$9D8C  60          RTS            ©  
$9D8D  A0 00       LDY #$00       .. 
$9D8F  B1 78       LDA ($78),Y    .x 
$9D91  91 6C       STA ($6C),Y    .l 
$9D93  C8          INY            .  
$9D94  C0 08       CPY #$08       .. 
$9D96  D0 F7       BNE $9D8F      .. 
$9D98  60          RTS            ©  
$9D99  A5 7A       LDA $7A        .z 
$9D9B  18          CLC            .  
$9D9C  41 7A       EOR ($7A,X)    Az 
$9D9E  A8          TAY            .  
$9D9F  A5 6A       LDA $6A        .j 
$9DA1  99 E8 9B    STA $9BE8,Y    ...
$9DA4  A5 6B       LDA $6B        .k 
$9DA6  99 E9 9B    STA $9BE9,Y    ...
$9DA9  60          RTS            ©  
$9DAA  A5 7A       LDA $7A        .z 
$9DAC  18          CLC            .  
$9DAD  65 7A       ADC $7A        ez 
$9DAF  A8          TAY            .  
$9DB0  A5 74       LDA $74        .t 
$9DB2  99 90 99    STA $9990,Y    ...
$9DB5  A5 75       LDA $75        .u 
$9DB7  99 F4 99    STA $99F4,Y    ...
$9DBA  A5 76       LDA $76        .v 
$9DBC  99 58 9A    STA $9A58,Y    .X.
$9DBF  A5 77       LDA $77        .w 
$9DC1  99 64 9A    STA $9A64,Y    .d.
$9DC4  60          RTS            ©  
$9DC5  A9 00       LDA #$00       .. 
$9DC7  85 A6       STA $A6        .. 
$9DC9  A9 98       LDA #$98       .. 
$9DCB  85 A7       STA $A7        .. 
$9DCD  A9 00       LDA #$00       .. 
$9DCF  8D C0 02    STA $02C0      ...
$9DD2  A5 69       LDA $69        .i 
$9DD4  C9 32       CMP #$32       .2 
$9DD6  B0 04       BCS $9DDC      .. 
$9DD8  C9 00       CMP #$00       .. 
$9DDA  D0 01       BNE $9DDD      .. 
$9DDC  60          RTS            ©  
$9DDD  A9 00       LDA #$00       .. 
$9DDF  85 7A       STA $7A        .z 
$9DE1  A5 7A       LDA $7A        .z 
$9DE3  10 65       BPL $9E4A      .e 
$9DE5  7A          ???            z  
$9DE6  A8          TAY            .  
$9DE7  69 00       ADC #$00       i. 
$9DE9  98          TYA            .  
$9DEA  C9 00       CMP #$00       .. 
$9DEC  D0 0F       BNE $9DFD      .. 
$9DEE  B9 01 98    LDA $9801,Y    ...
$9DF1  C9 00       CMP #$00       .. 
$9DF3  F0 38       BEQ $9E2D      .8 
$9DF5  A9 00       LDA #$00       .. 
$9DF7  99 01 98    STA $9801,Y    ...
$9DFA  18          CLC            .  
$9DFB  90 0F       BCC $9E0C      .. 
$9DFD  B9 01 98    LDA $9801,Y    ...
$9E00  C9 00       CMP #$00       .. 
$9E02  D0 08       BNE $9E0C      .. 
$9E04  A9 01       LDA #$01       .. 
$9E06  99 01 98    STA $9801,Y    ...
$9E09  18          CLC            .  
$9E0A  90 21       BCC $9E2D      .! 
$9E0C  B9 E8 9B    LDA $9BE8,Y    ...
$9E0F  95 6A       STA $6A,X      .j 
$9E11  B9 E9 9B    LDA $9BE9,Y    ...
$9E14  85 6B       STA $6B        .k 
$9E16  89          ???            .  
$9E17  90 99       BCC $9DB2      .. 
$9E19  85 74       STA $74        .t 
$9E1B  B9 F4 99    LDA $99F4,Y    ...
$9E1E  85 75       STA $75        .u 
$9E20  B9 58 9A    LDA $9A58,Y    .X.
$9E23  85 6E       STA $6E        .n 
$9E25  B9 BC 9A    LDA $9ABC,Y    ...
$9E28  85 77       STA $77        .w 
$9E2A  20 75 9D    JSR $9D75       u.
$9E2D  C6 7A       DEC $7A        .z 
$9E2F  A5 69       LDA $69        .i 
$9E31  C5 7A       CMP $7A        .z 
$9E33  D0 AC       BNE $9DE1      .. 
$9E35  A5 69       LDA $69        .i 
$9E37  85 7A       STA $7A        .z 
$9E39  C6 7A       DEC $7A        .z 
$9E3B  A5 7A       LDA $7A        .z 
$9E3D  18          CLC            .  
$9E3E  65 7A       ADC $7A        ez 
$9E40  A8          TAY            .  
$9E41  B9 00 98    LDA $9800,Y    ...
$9E44  C9 00       CMP #$00       .. 
$9E46  D0 07       BNE $9E4F      .. 
$9E48  99 01 98    STA $9801,Y    ...
$9E4B  C9 00       CMP #$00       .. 
$9E4D  F0 54       BEQ $9EA3      .T 
$9E4F  A9 80       LDA #$80       .. 
$9E51  85 6A       STA $6A        .j 
$9E53  A9 BB       LDA #$BB       .. 
$9E55  85 6B       STA $6B        .k 
$9E57  A9 00       LDA #$00       .. 
$9E59  85 71       STA $71        .q 
$9E5B  A9 B5       LDA #$B5       .. 
$9E5D  85 72       STA $72        .r 
$9E5F  B9 64 98    LDA $9864,Y    .d.
$9E62  85 64       STA $64        .d 
$9E64  B9 C8 98    LDA $98C8,Y    ...
$9E67  85 65       STA $65        .e 
$9E69  B9 84 9B    LDA $9B84,Y    ...
$9E6C  85 68       STA $68        .h 
$9E6E  B9 2C 99    LDA $992C,Y    .,.
$9E71  85 64       STA $64        .d 
$9E73  B9 2D 99    LDA $992D,Y    .-.
$9E76  85 6D       STA $6D        .m 
$9E78  B9 20 9B    LDA $9B20,Y    . .
$9E7B  85 78       STA $78        .x 
$9E7D  B9 21 9B    LDA $9B21,Y    .!.
$9E80  85 79       STA $79        .y 
$9E82  20 08 9D    JSR $9D08       ..
$9E85  20 8C 9D    JSR $9D8C       ..
$9E88  20 4C 9C    JSR $9C4C       L.
$9E8B  20 71 9C    JSR $9C71       q.
$9E8E  20 98 9D    JSR $9D98       ..
$9E91  20 8E 9C    JSR $9C8E       ..
$9E94  20 A7 9C    JSR $9CA7       ..
$9E97  20 14 9D    JSR $9D14       ..
$9E9A  20 A9 9D    JSR $9DA9       ..
$9E9D  20 2B 9D    JSR $9D2B       +.
$9EA0  20 59 9D    JSR $9D59       Y.
$9EA3  C6 7A       DEC $7A        .z 
$9EA5  A5 7A       LDA $7A        .z 
$9EA7  C9 FF       CMP #$FF       .. 
$9EA9  D0 90       BNE $9E3B      .. 

Unfortunately When I run the program , it just loads the code into the memory and when the machine code is call'ed the program hangs up.

When it hangs up, the Oricutron monitor says
Unable to open "symbols"
Opcode 32 executed at B529

So, anyone can help me by?
- Checking the code and finding any type-in mistakes
- Having a better scan of Your computer 1984 december issue page 110

Link to code section
https://puu.sh/CIQIq/1037344c54.jpg
YourComputer_1984_12_0108.jpg
SPRITE.tap
(628 Bytes) Downloaded 62 times
Attachments
YourComputer_1984_12_0108.jpg

User avatar
coco.oric
Flight Lieutenant
Posts: 471
Joined: Tue Aug 11, 2009 9:50 am
Location: North of France
Contact:

Re: Help with a "Your computer" program

Post by coco.oric » Fri Feb 08, 2019 6:20 am

Seems that page 2 isn't uploaded like page 1.
I'm looking on your tap file. Anyway, i didn't have any release of the mag
coco.oric as DidierV, CEO Member
Image Image

User avatar
peacer
Flight Lieutenant
Posts: 393
Joined: Wed Jun 09, 2010 9:23 pm
Location: Turkey
Contact:

Re: Help with a "Your computer" program

Post by peacer » Fri Feb 08, 2019 6:24 am

I tried to upload it here but the forum does not let me , probably because of the file / size limit.

Page 2 is here
http://puu.sh/CIYpV/611c53abb0.jpg

Thank you :)

User avatar
Symoon
Archivist
Posts: 1696
Joined: Sat Jan 14, 2006 12:44 am
Location: Paris, France
Contact:

Re: Help with a "Your computer" program

Post by Symoon » Fri Feb 08, 2019 7:07 am

A stupid question before anyone starts hunting mistakes: did you try the program on both ROM 1.0 and ROM 1.1? It could be ROM 1.0 only (sorry didn't read the article yet, maybe it's already explained).

User avatar
iss
Squad Leader
Posts: 890
Joined: Sat Apr 03, 2010 5:43 pm
Location: Bulgaria
Contact:

Re: Help with a "Your computer" program

Post by iss » Fri Feb 08, 2019 2:49 pm

Nice article! Unfortunately the bad scan quality is not the only problem :?
You can see in lines 170 and 800 the '!'-vector is pointed to address 40396 i.e.

Code: Select all

170 DOKE #2F5,40396
but 40396 = #9DCC and this is jump in the middle of instruction:

Code: Select all

$9DCB  85 A7       STA $A7
I think the correct entry point should be #9DC5.

Another annoying bug is in line 60000:

Code: Select all

60000 FOR F=40012 TO 40618
here the cycle is short with 1 byte, so the last #60 (RTS) is not placed in memory (it's missing in your disassembly too).

Next, the line 665 FOR F=1 TO 20 is missing in your BASIC source... ;)

I fixed some other obvious bugs and attached you can find both parts - BASIC and assembler sources.
Something moves on the screen but it's far from working...
IMHO, in this case, it would be easier to code such sprite animation from zero, instead to fix the existing code.
Attachments
sprite.zip
(3.54 KiB) Downloaded 49 times

User avatar
mikeb
Pilot Officer
Posts: 114
Joined: Wed Sep 05, 2018 8:03 pm
Location: West Midlands, UK
Contact:

Re: Help with a "Your computer" program

Post by mikeb » Fri Feb 08, 2019 6:08 pm

"Opcode 32 executed at B529"

If that's hex 32, then that'll be your CPU killer (all opcodes ending #x2, apart from #A2, halt the CPU).

I do have a scan of this magazine (probably Internet Archive?, but the listing is sufficiently bad quality to render it unreliable, by eye. The OCR layer in it is worse. As I commented elsewhere, often the original printed quality wasn't that good to start with, never mind low res scans, or attempting OCR :)

M/C loaders, where everything needs to be 100% accurate, or don't bother, really should come with a checksum per line, so you can verify your reading/typing. Some listings did that, and flagged an error if anything was wrong.

This sprite scheme appears to be the same idea used in Manic Miner, where a 2x2 cluster of text characters were used to animate each of the (8, IIRC) steps in a walk cycle. After the 8 steps, Willy had walked from the left vertical column of 2, almost into the right, and the cycle could repeat displaced one character over.

User avatar
polluks
Pilot Officer
Posts: 65
Joined: Tue Jun 05, 2012 10:09 pm
Location: Germany
Contact:

Re: Help with a "Your computer" program

Post by polluks » Sat Feb 09, 2019 1:14 pm

No checksum, not a good idea.
cc65 development
Oric Atmos + Cumulus
Acorn Electron

User avatar
peacer
Flight Lieutenant
Posts: 393
Joined: Wed Jun 09, 2010 9:23 pm
Location: Turkey
Contact:

Re: Help with a "Your computer" program

Post by peacer » Sun Feb 10, 2019 4:43 pm

Thank you very much , your helps are really appreciated, especially iss :)

I'll try to work on it.

Once I tried to write such an utility as software sprite to use in many projects but I failed due to ınsufficiency of my experience on machine coding.
I am sure its not that diffucult to create a standart software sprite program such as

MEMORY ADRESS N : ON-OFF register for 8 sprites. For example POKE N, 3 = Sprites 1 and 2 are on
MEMORY ADRESS M : 16 bytes of data for memory adress for all 8 sprites
MEMORY ADRESS P : 16 bytes of data for X and Y positions of each sprites

etc..

This program is an example for this. I hope I can correct it and make a running result..

User avatar
Steve M
Squad Leader
Posts: 533
Joined: Fri Mar 24, 2006 3:33 am
Location: Cumbria, UK
Contact:

Re: Help with a "Your computer" program

Post by Steve M » Tue Mar 05, 2019 11:31 pm

Not sure if this helps but I've scanned the listing at a higher resolution.
(It has holes punched in the page.)

https://www.dropbox.com/s/qbi1lu0wlxxdo ... 1.jpg?dl=0
Last edited by Steve M on Tue Mar 19, 2019 12:41 pm, edited 1 time in total.

User avatar
iss
Squad Leader
Posts: 890
Joined: Sat Apr 03, 2010 5:43 pm
Location: Bulgaria
Contact:

Re: Help with a "Your computer" program

Post by iss » Wed Mar 06, 2019 10:22 am

This helped lot, @Steve M! :)
Attached are working BAS and TAP files.
Now we waiting some animations from @peacer! ;)
Attachments
sprite-ok.zip
(3.52 KiB) Downloaded 38 times

User avatar
Chema
Game master
Posts: 2482
Joined: Tue Jan 17, 2006 10:55 am
Location: Gijón, SPAIN
Contact:

Re: Help with a "Your computer" program

Post by Chema » Wed Mar 06, 2019 2:18 pm

I *had* that Your Computer.... The only one I ever had :D

I remember this article perfectly, and I am quite sure there was another with a Fill routine? And the text said something such as "it's nearly as fast as the Oric version of the Hobbit!", so I learnt there indeed existed an Oric's version of that game!

Unfortunately I do not know where the mag is now... probably lost :(

Happy to see you made the code work!

User avatar
peacer
Flight Lieutenant
Posts: 393
Joined: Wed Jun 09, 2010 9:23 pm
Location: Turkey
Contact:

Re: Help with a "Your computer" program

Post by peacer » Wed Mar 06, 2019 8:30 pm

Ahh you are sooooo amazing . I don't know how to thank you :)

Maybe, someone who is out of this community would not get it, why we are spending time with gibberish numbers and letters. Only you can understand how amazing it is to see such a code running perfectly. Its something miracleous..

Of course I will try to make some "sprites" soon :)

Thank you very much again...

Regarding to paint ;
YourComputer_1984_12_0206.jpg

Post Reply