$ speaker-test -D hw:0,0 -t sine -f 600 |
$ sudo ./pi68k.sh start |
ホストマシン側ピン | Raspberry Pi 側ピン |
---|---|
STROBE | Phisical.23(BCM 11) |
bit 0 | Phisical.21(BCM 9) |
bit 1 | Phisical.11(BCM 17) |
bit 2 | Phisical.19(BCM 10) |
bit 3 | Phisical.7(BCM 4) |
bit 4 | Phisical.15(BCM 22) |
bit 5 | Phisical.18(BCM 24) |
bit 6 | Phisical.13(BCM 27) |
bit 7 | Phisical.16(BCM 23) |
BUSY | Phisical.26(BCM 7) |
$ cd /tmp $ wget https://project-downloads.drogon.net/wiringpi-latest.deb $ sudo dpkg -i wiringpi-latest.deb |
― | PC60 | PC88 | Pi 側 | |
---|---|---|---|---|
busy | (R) | Port.$C0.bit1 0=busy |
Port.$40.bit0 1=busy |
Pi 側が 0 のとき PC88 側は 1 Pi 側が 0 のとき PC60 側は 0 |
strobe | (W) | Port.$93(8255) 0=off 1=on |
Port.$40.bit0 0=on 1=off |
PC88 が 0 のとき Pi 側は 0 PC60 が 0 のとき Pi 側は 1 データ書き込み後 on -> off とする |
data | (W) | 反転 | そのまま | PC88 が 0 のとき Pi 側は 0 PC60 が 0 のとき Pi 側は 1 ※PC60 は反転して書き込む |
10 ' ras68k-ext TEST PC80/PC88 20 A$="_SNDITPI" 30 'FOR I=1 TO LEN(A$):DAT=ASC(MID$(A$,I,1)):GOSUB 500:NEXT 40 DAT=&HB0:GOSUB 500:DAT=&HDE:GOSUB 500 50 DAT=&HB1:GOSUB 500:DAT=&H1:GOSUB 500 60 DAT=&HB7:GOSUB 500:DAT=&H38:GOSUB 500 100 DAT=&HB8:GOSUB 500:DAT=15:GOSUB 500 110 DAT=&HF8:GOSUB 500:DAT=255:GOSUB 500 120 PRINT"PUSH SPACE TO STOP" 130 IF (INP(9) AND 64)<>0 THEN 130 140 DAT=&HB8:GOSUB 500:DAT=0:GOSUB 500 150 END 500 ' 510 IF (INP(&H40) AND 1)=1 THEN 510 520 OUT &H10,DAT 530 ST=PEEK(&HE6C1) AND 254:POKE &HE6C1,ST:OUT &H40,ST 540 IF (INP(&H40) AND 1)=0 THEN 540 550 ST=PEEK(&HE6C1) OR 1:POKE &HE6C1,ST:OUT &H40,ST 560 IF (INP(&H40) AND 1)=1 THEN 560 570 RETURN |
WriteRAS: out ($10),a ;data out to printer port .wait1: in a,($40) ;bit0:printer busy(0=ready) rrca jr c,.wait1 xor a out ($40),a ;bit0:strobe(1=on) .wait2: in a,($40) ;bit0:printer busy(1) rrca jr nc,.wait2 ld a,1 out ($40),a ;bit0:strobe(1=on) .wait3: in a,($40) ;bit0:printer busy(0) rrca jr c,.wait3 ret |
10 REM ras68k-ext TEST PC60 20 A$="_SENABLE" 30 FOR I=1 TO LEN(A$):D=ASC(MID$(A$,I,1)):GOSUB 500:NEXT 40 D=&HB0:GOSUB 500:D=&HDE:GOSUB 500 50 D=&HB1:GOSUB 500:D=&H1:GOSUB 500 60 D=&HB7:GOSUB 500:D=&H38:GOSUB 500 100 D=&HB8:GOSUB 500:D=15:GOSUB 500 110 D=&HF8:GOSUB 500:D=255:GOSUB 500 120 PRINT"PUSH SPACE TO STOP" 130 IF INKEY$<>" " THEN 130 140 D=&HB8:GOSUB 500:D=0:GOSUB 500 150 END 500 REM 510 IF (INP(&HC0) AND 2)=0 THEN 510 520 OUT &H91,(-1-D) AND 255 530 OUT &H93,1 540 IF (INP(&HC0) AND 2)<>0 THEN 540 550 OUT &H93,0 560 IF (INP(&HC0) AND 2)=0 THEN 560 570 RETURN |
WriteRAS: cpl out ($91),a ;data out to printer port (8255 port.b) .wait1: in a,($C0) ;bit1:printer busy(1=ready) and 2 jr z,.wait1 rrca ;8255 bitset/reset mode -> bit0=1 out ($93),a ;bit2:cgrom(1=off) bit1:crtkill(1=disp) bit0:strobe(1=on) .wait2: in a,($C0) ;bit1:printer busy(0) and 2 jr nz,.wait2 ;8255 bitset/reset mode -> bit0=0 out ($93),a ;bit2:cgrom(1=off) bit1:crtkill(1=disp) bit0:strobe(1=on) .wait3: in a,($C0) ;bit1:printer busy(0) and 2 jr z,.wait3 ret |
> d88saver uploader.d88 bos.pdx 0 0 6 |