Page 1 of 3

OPEL Software for the Oric

Posted: Sat Jul 15, 2017 11:06 am
by Symoon
Long ago, Jonathan gave me the OPEL joystick interface, along with two tapes "OPEL Software for the ORIC".
The software was:
- Joystick Controller. Author unknown.
- Image Designer by Anders Kjoller. Also called, on the tape label, "Picture Designer", and on the inlay, "Graphics Designer".
- Oric Parchen Kirchen by Jan Bolhoj. Also called, on the tape label, "Slalom Ski Game", and on the inlay, "Slalem Ski Game".

I see the tapes are for sale on Ebay (joystick interface missing :roll: )
http://www.ebay.fr/itm/Oric-atmos-game- ... Swvc1ZZlkx

... And discover there's a set of instructions with it!
Does anyone have these instructions, so we could scan them? (Steve maybe? :mrgreen: )

Thanks!

Re: OPEL Software for the Oric

Posted: Mon Jul 31, 2017 8:31 pm
by Steve M
Yes.

I have a few of the sets with interface.

Re: OPEL Software for the Oric

Posted: Tue Aug 01, 2017 7:12 pm
by Symoon
That's great news! If you can put the instructions on your scan list, that would be great :)
Thanks Steve.

Re: OPEL Software for the Oric

Posted: Wed Aug 02, 2017 3:02 pm
by Steve M
It is done. I think I sent a message to the wrong email so have just emailed you again.

Re: OPEL Software for the Oric

Posted: Tue Dec 22, 2020 4:36 pm
by Dbug
Symoon: Have you managed to dump these tapes?

I'm trying to get the opel joystick driver code, I managed to load the image program ONCE, none of the other actually load at all, and I could not get the image program load at all with a floppy drive connected.

Re: OPEL Software for the Oric

Posted: Tue Dec 22, 2020 8:31 pm
by Symoon
Yes, here they are with transfer notes.
opel_joystick_software.zip
(20.25 KiB) Downloaded 236 times

Re: OPEL Software for the Oric

Posted: Tue Dec 22, 2020 8:45 pm
by Dbug
Symoon wrote: Tue Dec 22, 2020 8:31 pm Yes, here they are with transfer notes.

opel_joystick_software.zip
Lol, in the mean time, since I was not sure you had it:


:D

After diffing your open-id.tap, I see that matches what I saved, so I'm happy, my "hacky" method did work \o/

Re: OPEL Software for the Oric

Posted: Tue Dec 22, 2020 9:06 pm
by Chema
I've just read your thread, Dbug... so we did not have an OPEL driver and you are about to get one by reverse engineering??? That is super nice!

Re: OPEL Software for the Oric

Posted: Tue Dec 22, 2020 10:31 pm
by Dbug
I will try, what sucks is that since there's no support in emulators, I'll have to test that on the real machine, going to be painful to copy files, I wonder if I can find a better way to do that.

Re: OPEL Software for the Oric

Posted: Wed Dec 23, 2020 7:49 am
by coco.oric
Hello
I've one.
I'll scan the cover & tapes to complete

Re: OPEL Software for the Oric

Posted: Wed Dec 23, 2020 10:43 am
by Symoon
coco.oric wrote: Wed Dec 23, 2020 7:49 am Hello
I've one.
I'll scan the cover & tapes to complete
I have already scanned it all, completed by Steve's scans of the docs.
Jede probably has it all.
If you have a FTP or whatever I can send them to you - I really have no time for updates these days :?

Re: OPEL Software for the Oric

Posted: Wed Dec 23, 2020 11:28 am
by Dbug
For the ones interested, here is the painting program (the BASIC part at least, there are two other modules, the driver that loads in $400 and something else that loads in $7000), not the most readable code I've seen :D

Code: Select all

 0 HIMEM20000:O=5:POKE#26A,10:DOKE#24E,522:FP=1
 1 GOSUB5000:IFPEEK(#20C)=255THENPRINTCHR$(20)
 2 IF PEEK(#7000)<>#A9 THEN GOSUB14000:GOSUB15000
 3 X1=120:Y1=90:X=120:Y=100:GOTO30000
 4 HIRES
 5 CLS:POKE#26A,10:PRINT:PRINT"Press space to draw the line"
 10 K$=KEY$:IFK$=<"a"THEN200
 20 Q=ASC(K$):X=X+X(Q):Y=Y+Y(Q):IFQ(X+1)ORW(Y+1)THENX=X-X(Q):Y=Y-Y(Q)
 30 IFK$="m"THENGOSUB20020:GOTO30000
 31 IFK$="n"THENFL=1:GOSUB20000
 32 IFK$="p"THENCLS:PRINTX" ,"Y:PRINTX1" ,"Y1
 91 IFX=X1ANDY1=YTHEN10
 100 CURSETX,Y,2:DRAWX1-X,Y1-Y,2
 105 IFK$=" "THENCURSETX,Y,FB:DRAWX1-X,Y1-Y,FB:GOTO10
 110 CURSETX,Y,2:DRAWX1-X,Y1-Y,2
 120 GOTO10
 200 IFK$=""THEN91
 210 Q=ASC(K$):X1=X1+X(Q):Y1=Y1+Y(Q)
 211 IFQ(X1+1)ORW(Y1+1)THENX1=X1-X(Q):Y1=Y1-Y(Q)
 220 GOTO91
 300 K$=KEY$:IFK$<"a"ANDK$<>"*"THEN400
 301 Z=2
 310 CURSETX,Y,Z:Q=ASC(K$):X=X+X(Q):Y=Y+Y(Q)
 311 IFQ(X+1)ORW(Y+1)THENX=X-X(Q):Y=Y-Y(Q)
 320 IFK$="m"THENGOSUB20020:GOTO30000
 321 IFK$="n"THENFL=1:GOSUB20000
 322 IFK$="p"THENCLS:PRINTX" ,"Y
 340 CURSETX,Y,2
 350 GOTO300
 400 IFK$=""THEN300
 410 Z=FB:GOTO310
 500 POKEX,95:Z=W:CLS:PRINT:PRINT"Press space to change atribute value"
 505 K$=KEY$:IFK$<"a"ANDK$<>"*"THEN600
 510 POKEX,W:Q=ASC(K$):X=X+X(Q):X=X+Y(Q)*40
 511 IFX<#A000ORX>#BF40THENX=X-X(Q):X=X-Y(Q)*40
 515 IFK$=" "THENPRINT:INPUT"ENTER ATRIBUTE (0 - 255)";Z:CLS:IFZ>255ORZ<0THEN515
 520 IFK$="m"THENGOSUB20020:X=X1:Y=Y1:GOTO30000
 521 IFK$="n"THENFL=1:GOSUB20000
 522 IFK$="p"THENCLS:PRINT"BYTE"X
 540 W=PEEK(X):POKEX,95
 550 GOTO505
 600 IFK$=""THEN505
 605 IFK$=" "THEN510
 610 W=Z:GOTO510
 700 K$=KEY$:IFK$<"a"THEN800
 710 CURSETX,Y,2:Q=ASC(K$):X=X+X(Q):Y=Y+Y(Q)
 711 IFX>232THENX=232
 712 IFX<0THENX=0
 713 IFY>192THENY=192
 714 IFY<2THENY=2
 715 IFK$="a"THENCHARD,1,FP
 716 IFK$="s"THENCHARC,0,FP
 720 IFK$="m"THENGOSUB20020:GOTO30000
 721 IFK$="n"THENFL=1:GOSUB20000
 722 IFK$="p"THENCLS:PRINTX" ,"Y
 740 CURSETX,Y,2
 750 GOTO700
 800 IFK$=""THEN700
 810 C=C+X(ASC(K$)):IFC>126THENC=33
 811 IFC<33THENC=126
 813 D=D+Y(ASC(K$)):IFD>126THEND=33
 814 IFD<33THEND=126
 815 CLS:PRINT"S = ";CHR$(C):PRINT"A =";CHR$(27)"I"CHR$(D)
 816 GOTO700
 900 K$=KEY$:IFK$<"a"THEN950
 905 Q=ASC(K$):X=X+X(Q):Y=Y+Y(Q):IFQ(X+1)ORW(Y+1)THENX=X-X(Q):Y=Y-Y(Q)
 910 IFK$="m"THENGOSUB20020:GOTO30000
 911 IFK$="n"THENFL=1:GOSUB20000
 912 IFK$="p"THENCLS:PRINTX" ,"Y:PRINTX1" ,"Y1
 915 IFX=X1ANDY1=YTHEN900
 920 CURSETX,Y,2:DRAWX1-X,Y1-Y,2
 930 CURSETX,Y,2:DRAWX1-X,Y1-Y,2
 931 IFK$=" "THENGOSUB980      
 935 GOTO900
 950 IFK$=""THEN915
 960 Q=ASC(K$):X1=X1+X(Q):Y1=Y1+Y(Q)
 961 IFQ(X1+1)ORW(Y1+1)THENX1=X1-X(Q):Y1=Y1-Y(Q)
 970 GOTO915
 980 AA=SQR(ABS(X1-X)^2+ABS(Y1-Y)^2)
 985 IFX1+AA>239ORX1-AA<0THENRETURN
 990 IFY1+AA>199ORY1-AA<0THENRETURN
 995 CIRCLEAA,FP:RETURN
 999 CLS:POKE#26A,10:PRINT"Press space to fill areas"
 1000 K$=KEY$:IFK$<"a"ANDK$<>"*"THEN1100
 1001 Z=2
 1010 CURSETX,Y,Z:Q=ASC(K$):X=X+X(Q):Y=Y+Y(Q)
 1011 IFQ(X+1)ORW(Y+1)THENX=X-X(Q):Y=Y-Y(Q)
 1020 IFK$="m"THENGOSUB20020:GOTO30000
 1021 IFK$="n"THENFL=1:GOSUB20000
 1022 IFK$="p"THENCLS:PRINTX" ,"Y
 1030 IFK$=" "THENGOSUB1200
 1040 CURSETX,Y,2
 1050 GOTO1000
 1100 IFK$=""THEN1000
 1110 Z=1:GOTO1010
 1200 CLS:PRINT"SCANNING";:POKE775,39
 1210 REPEAT
 1220 PRINT".";
 1230 CALL#7000
 1240 UNTILPEEK(#46)=0 OR KEY$="s"
 1241 IF PEEK(#FFFC)=45 THEN POKE775,17
 1245 IF PEEK(#46)<>0THENCLS:PRINT"BREAKED":PING:RETURN
 1250 CLS:PRINT"FINISHED":PING:RETURN
 5000 DIMX(127),Y(127),Q(241),W(201)
 5010 FORB=1TO8:READA$:A=ASC(A$):READX(A),Y(A):NEXT
 5020 FORB=1TO8:READA$:A=ASC(A$):READX(A),Y(A):NEXT
 5100 DATAt,,-1,y,1,-1,h,1,,b,1,1,v,,1,c,-1,1,f,-1,,r,-1,-1
 5200 DATAT,,-1,Y,1,-1,H,1,,B,1,1,V,,1,C,-1,1,F,-1,,R,-1,-1
 5300 Q(241)=1:Q(0)=1:W(0)=1:W(201)=1
 10000 FORA=20000TO20027:READB$:B=VAL("#"+B$):POKEA,B:NEXT
 10010 DATAA0,00,B1,FE,91,FC,C8,D0,F9,18,A5,FF,69,01,85,FF,18,A5,FD,69,01
 10020 DATA85,FD,C9,BF,D0,E5,60
 10025 RETURN
 14000 IF PEEK(#FFFC)=45 THEN CALL#E6CA:POKE#67,0:POKE#35,0:CALL#E4A8:CALL#E804
 14010 IF PEEK(#FFFC)<>45 THEN CLOAD""
 14020 RETURN
 15000 PAPER0:INK1:HIRES:POKE#26A,10
 15010 CURSET50,50,3:CIRCLE40,1
 15020 CURSET70,70,3:CIRCLE50,1
 15030 CURSET100,100,3:CIRCLE45,1
 15040 CURSET105,105,3:CIRCLE30,1
 15050 CURSET140,140,3:CIRCLE45,1
 15060 CURSET160,160,3:CIRCLE25,1
 15065 FORA=0TO190:CURSET0,A,3:FILL1,1,RND(1)*7+1:NEXT
 15070 GOSUB20020
 15080 CURSET30,30,1:CURSET70,70,1
 15090 CURSET40,99,1:CURSET99,40,1
 15100 CURSET100,100,2
 15110 CURSET80,135,1:CURSET135,80,1
 15120 CURSET120,120,1:CURSET135,135,1
 15130 CURSET171,171,1
 15200 FORA=1TO2:CALL#7000:NEXT
 15220 CURSET189,50,3:CIRCLE50,1:CIRCLE39,1
 15230 CURSET200,60,3:CIRCLE20,1:CIRCLE10,1
 15240 CURSET177,37,3:CIRCLE10,1
 15250 GOSUB20020
 15300 CURSET190,2,1:CURSET190,95,1
 15310 CURSET177,37,1:CURSET200,43,1
 15320 CURSET200,77,1:CALL#7000:CALL#7000
 15400 CLS:PRINTCHR$(27)"G           (press a key)"
 15410 PRINTCHR$(4)CHR$(27)"J          IMAGE DESIGNER!!"CHR$(4)
 15999 GETA$:RETURN
 20000 IFPEEK(#FFFC)=45 THENPOKE775,17:REM NYT BILLED
 20001 IFFLTHENFL=0:CLS:PRINT"ARE YOU SURE (Y/N)?":GETA$:CLS:IF A$<>"y"THENRETURN
 20010 DOKE#FE,30000:DOKE#FC,#A000:POKE20024,192
 20015 CALL20000:RETURN
 20020 DOKE#FE,#A000:DOKE#FC,30000:POKE20024,149
 20021 POKE775,39
 20025 CLS:CALL20000:RETURN
 30000 INK0:TEXT:PAPER0:CLS:PLOT5,1,CHR$(14)+"MAIN MENU":POKE48036,0
 30001 PLOT5,2,CHR$(14)+"MAIN MENU":POKE#26A,10
 30002 FP=FP-1:PLOT21,17,1:PLOT22,17,"MODE:":GOSUB31000:PLOT27,17,2
 30010 PRINT:PRINT:PRINT:PRINT:PRINT:PRINT"1 > NEW PICTURE "CHR$(27)"P"
 30020 PRINT:PRINT"2 > LINE EDITOR "CHR$(27)"P"
 30030 PRINT:PRINT"3 > DRAW EDITOR "CHR$(27)"P"
 30034 PRINT:PRINT"4 > ATRI EDITOR "CHR$(27)"P"
 30035 PRINT:PRINT"5 > CHAR EDITOR "CHR$(27)"P"
 30036 PRINT:PRINT"6 > CIRC EDITOR "CHR$(27)"P"
 30037 PRINT:PRINT"7 > FILL EDITOR "CHR$(27)"P"
 30038 PRINT:PRINT"8 > SAVE / LOAD "CHR$(27)"P"
 30040 PRINT:PRINT:PRINT" SELECT OPTION":POKE48057+22*40,16:POKE48042+22*40,17
 30041 PLOT22,9,CHR$(10)+"IMAGE DESIGNER"+CHR$(8)
 30042 PLOT22,10,CHR$(10)+"IMAGE DESIGNER"+CHR$(8)
 30043 PLOT22,11,CHR$(1)+"      by"+CHR$(7)
 30044 PLOT22,12,CHR$(2)+"ANDERS KJ0LLER"+CHR$(7)
 30045 PLOT21,7,"~~~~~~~~~~~~~~~~~~"
 30046 PLOT21,14,"~~~~~~~~~~~~~~~~~~"
 30047 FORA=7TO14:PLOT21,A,126:PLOT38,A,126:PLOT20,A,7:NEXT:INK7
 30048 A$="":K$=KEY$:GOTO30053
 30049 GETA$:IFA$="t"ANDO>6THENO=O-2:O1=O+2
 30050 IFA$="v"ANDO<18THENO=O+2:O1=O-2
 30051 IF A$=" "THENGOSUB31000
 30052 IFA$=CHR$(1)THENGETA$:IFA$=CHR$(11)THENCLS:POKE#24E,10:PRINTCHR$(20):END
 30053 POKE48040+40*O1,16:POKE48041+40*O1,7:POKE48040+40*O,0:POKE48041+40*O,23
 30054 IFA$<>"g"THENA$=KEY$:GOTO30049
 30059 IFO=5THENHIRES:GOSUB20020:GOTO30000
 30060 IFO=7THENHIRES:GOSUB20000:GOTO5
 30070 IFO=9THENHIRES:GOSUB20000:CURSETX,Y,2:POKE#26A,10:CLS:GOTO300
 30080 IFO=11THENHIRES:GOSUB20000:X1=X:Y1=Y:X=#A000+X/6+Y*40:W=PEEK(X):GOTO500
 30090 IFO=13THENHIRES:GOSUB20000:C=65:D=65:CURSETX,Y,2:POKE#26A,10:GOTO700
 30100 IFO=15THENHIRES:GOSUB20000:CLS:POKE#26A,10:GOTO900
 30120 IFO=19THEN40000
 30130 IFO=17THENHIRES:GOSUB20000:CURSETX,Y,2:GOTO999
 30200 GOTO30049 
 31000 FP=FP+1:IFFP=3THENFP=0
 31010 FB=FP:IFFB=2THENFB=3
 31020 IF FP=0 THENPLOT28,17,"ERASE BITS   "
 31030 IF FP=1 THENPLOT28,17,"SET BITS     "
 31040 IF FP=2 THENPLOT28,17,"INVERSE      "
 31050 RETURN
 40000 POKE#26A,11:CLS:PRINT:PRINT"SAVE OR LOAD?":GETA$:IFA$="s"THEN41000
 40010 IFA$<>"l"THEN40000
 40020 PRINT:INPUT"PLEASE ENTER NAME OF PICTURE TO BE    LOADED";NA$
 40030 IFLEN(NA$)>16THENPING:PRINT"?name too long error":GOTO40020
 40040 IFNA$="?"THENNA$=""
 40045 IFPEEK(#FFFC)<>45THENCLOADNA$:GOTO30000
 40047 FOR A=1TOLEN(NA$):POKE#34,ASC(MID$(NA$,A,1)):NEXT
 40050 CALL#E6CA:POKE#67,0:CALL#E4A8:CALL#E804:GOTO30000
 41000 INPUT"PLEASE ENTER NAME OF PICTURE TO BE    SAVED";NA$
 41010 IFLEN(NA$)>16THENPING:PRINT"?name too long error":GOTO41000
 41020 IFNA$="?"THENNA$=""
 41030 CSAVENA$,A30000,E38000
 41035 IFPEEK(#FFFC)=45 THEN30000
 41040 PRINT:PRINT"DO YOU WANT TO VERIFY IT?":GETA$:IFA$<>"y"THEN30000
 41050 CLOADNA$,V:WAIT500:GOTO30000
 42000 REM ` ANDERS KJ0LLER 1984
 42010 REM   COPE DENMARK DEPT.
From what I see, the line 2 checks if the last module was loaded (by checking $A9) and if not loads it, with some ROM check to either call CLOAD or some CALL, so I guess this is some 1.0/1.1 ROM checks, and the same check makes sure to only call the "Circle Intro" only once (starts at 15000)... and I believe the code in 7000 is the flood fill routine.

Next step, disassemble the driver code

Re: OPEL Software for the Oric

Posted: Wed Dec 23, 2020 12:15 pm
by Dbug
So, the driver file starts in $400 and goes up to $61D, so it overlaps both the page 4 and the BASIC area... I'm not sure yet how they did achieve that, but basically this file contains both binary data for an IRQ routine, AND a basic program starting as usual at address $501, containing the following code:

Code: Select all

 0 IFPEEK(#FFF9)=1THEN DOKE#4DE,#EE22
 2 POKE#26A,11
 5 AD=#9C00:REM START ADDRESS
 42 GOTO300
 300 DOKE #45E,AD-109:DOKE #464,AD-77:DOKE #46A,AD-45
 305 DOKE #4E6,AD
 310 DOKE #4E9,#B800
 315 CALL #4E0
 340 IFPEEK(#FFF9)<>1THEN DOKE #231,AD:POKE #230,76
 342 IFPEEK(#FFF9)=1THEN DOKE #24B,AD:POKE #24A,76
 345 DOKE #26A,3
 346 PAPER7:INK0
 360 DOKE154,1281:CLOAD""
I've not been through all the assembler code, but here is what I have so far:

Code: Select all

StartOpelDriver PHA 
        TXA 
        PHA 
        LDX #$FC
loop_push LDA f0204,X  ;Used when checking the range of values used in sound and graphics commands.
        PHA 
        INX 
        BNE loop_push
        LDA #<pFFAF
        STA a0302
        LDA #>pFFAF
        STA a0303
        LDA #$00
        STA a0301
        LDA #$10
        AND a0300
        BEQ b0438
        PLA 
        STA a0303
        PLA 
        AND #$F7
        STA a0302
        PLA 
        STA a0301
        PLA 
        STA a0300
        PLA 
        TAX 
        PLA 
        RTI 

b0438   LDA #<p7FBF
        STA a0300
        LDA #>p7FBF
        STA a0301
        LDX #$05
b0444   LSR 
        AND a0300
        ORA #$E0
        ROR a0301
        DEX 
        BNE b0444
        TAX 
        PLA 
        STA a0303
        PLA 
        ORA #$08
        STA a0302
        PLA 
        PLA 
        LDA f9B93,X
        STA a02DF    ;The AS’CII code for the last key pressed (with top bit set).
        LDA f9BB3,X
        STA a0300
        LDA f9BD3,X
        STA a0301
        PLA 
        TAX 
        PLA 
        RTI 

        EOR f55,X
        EOR fD2,X
        EOR f55,X
        CMP f55D4,Y
        .BYTE $C3,$55 ;DCP (p55,X)
        DEC aC2
        DEC fC8,X
        .BYTE $E7,$55 ;ISC a55
        EOR f55,X
        .BYTE $F2    ;JAM 
        EOR f55,X
        SBC f55F4,Y
        .BYTE $E3,$55 ;ISC (p55,X)
        INC aE2      ;The get-character routine.
        INC fE8,X    ;The second part of the get-character routine.
        TAX 
        TAX 
        EOR f55,X
        LDA f5555,Y
        LDX f55B9,Y
        TSX 
        EOR fB9,X
        TSX 
        CLV 
        LDX f55BE,Y
        EOR f55,X
        LDA f5555,Y
        LDX f55B9,Y
        TSX 
        EOR fB9,X
        TSX 
        CLV 
        LDX f5555,Y
        EOR f55,X
        .BYTE $FB,$55,$55 ;ISC f5555,Y
        INC f55FD,X
        .BYTE $7F,$55,$F7 ;RRA $F755,X
        .BYTE $FB,$F7,$FD ;ISC $FDF7,Y
        .BYTE $FB,$55,$55 ;ISC f5555,Y
        EOR fFB,X
        EOR f55,X
        INC f55FD,X
        .BYTE $7F,$55,$F7 ;RRA $F755,X
        .BYTE $FB,$F7,$FD ;ISC $FDF7,Y
        EOR f48,X
        LDA #$F7
        AND a0302
        STA a0302
        PLA 
        JMP ROM_IRQ  ;$EE22 Poll timers.

        LDX #$00
b04E2   LDA StartOpelDriver,X
        STA f9C00,X
        STA fB800,X
        INX 
        CPX #$E0
        BNE b04E2
        RTS 

b04F1   LDA a0300
        CMP #$B0
        BNE b04FF
        LDA a0301
        CMP #$FE
        BEQ b04F1
b04FF   RTS 

Re: OPEL Software for the Oric

Posted: Wed Dec 23, 2020 1:44 pm
by Dbug
So, I took a look at the joystick controller program, the code is slightly different, but to me it looks more like some "in memory" stuff that was just there when they developed the program, with a lot of unused data which is just garbage.

The setup program is in Basic, and similarly to the Image Designer is part of the same file that loads in $400, here is the full basic program:

Code: Select all

 0 IFPEEK(#FFF9)=1THEN DOKE#4DE,#EE22
 2 POKE#26A,11
 5 AD=#9C00:REM START ADDRESS
 10 PAPER 1:INK3
 20 CLS:PRINT:PRINT"        JOYSTICK CONTROLLER"
 30 PRINT:PRINT:PRINT:PRINT"Do you want to change the function of"
 40 PRINT"the joystick (Y/N)? ";:GET A$
 41 IF A$="Y" THEN PRINT"Y":GOTO43
 42 IF A$="N" THEN PRINT"N":GOTO300
 43 PRINT:PRINT
 44 PRINT"Are you working with four or eight   "
 45 PRINT"directions (4/8)? ";:GET A$
 46 IF A$="8" THEN ST=1 ELSE ST=2:A$="4"
 47 PRINTA$
 60 PRINT:PRINT:PRINT"Press the key you want the joystick to";
 70 PRINT"simulate in the following positions:"
 75 GOSUB 1045
 80 PRINT:PRINT
 90 FOR N=0 TO 7  
 100 READ A$,Z%
 105 IF N/ST<>INT(N/ST) THEN POKE 915+Z%,0:POKE 947+Z%,0:POKE 979+Z%,0:GOTO 140
 110 PRINT A$"= ";
 120 GOSUB 1020
 140 NEXT
 150 RESTORE
 160 FOR N=0 TO 7   
 170 READ A$,Z%:Z%=Z%-16 
 175 IF N/ST<>INT(N/ST) THEN POKE 915+Z%,0:POKE 947+Z%,0:POKE 979+Z%,0:GOTO 210
 180 PRINT A$"-BUTTON= "; 
 190 GOSUB 1020
 210 NEXT
 220 PRINT"BUTTON= ";
 230 Z%=239:GOSUB 1020
 235 PRINT:PRINT
 240 PRINT"Do you want to save the program (Y/N)?";:GETA$:GETA$
 250 PRINTA$:IF A$<>"Y" THEN 300
 260 DOKE 154,#400
 270 CSAVE"JOY",AUTO:DOKE 154,1281
 300 DOKE #45E,AD-109:DOKE #464,AD-77:DOKE #46A,AD-45
 305 DOKE #4E6,AD
 310 DOKE #4E9,#B800
 315 CALL #4E0
 340 IFPEEK(#FFF9)<>1THEN DOKE #231,AD:POKE #230,76
 342 IFPEEK(#FFF9)=1THEN DOKE #24B,AD:POKE #24A,76
 345 DOKE #26A,3
 346 PAPER7:INK0
 360 NEW
 1000 DATA UP,247,UP-RIGHT,246,RIGHT,254,DOWN-RIGHT,252
 1010 DATA DOWN,253,DOWN-LEFT,249,LEFT,251,UP-LEFT,243
 1020 REPEAT:B=DEEK(768):UNTIL B<>65200:A=PEEK(735):C%=B/256:B%=B-C%*256
 1030 PRINT"CHR$("STR$(A-128)")":PRINT
 1040 POKE 915+Z%,A:POKE 947+Z%,B%:POKE 979+Z%,C% 
 1045 REPEAT:UNTIL DEEK(#300)=65200  
 1050 RETURN
By the way, both the painting program and slalom game work fine with the OPEL interface connected while loading from the Erebus.

This program also works, what it does is to change the list of key presses used by the program: It basically emulates key presses, and asks you to press which key to use for the various direction (supports 4 and 8 ways directions), with and without the fire key being pressed.

Definitely not the most practical way to handle things, but I'm pretty sure the hardware level is just bits we can read like the rest and remove this weird way of doing it :D

Re: OPEL Software for the Oric

Posted: Wed Dec 23, 2020 3:47 pm
by iss
@Symoon: thanks for the zip file!

About the OPEL joystick program and the driver: I'm pleasantly surprised, this little piece software is very well and carefully written!
It uses some very interesting techniques and tricks. For those who love to explore sources - your curiosity will be rewarded :).