Hi,
My new project is to read a bar code from the IRQ $7F.
Can be use to select an ID game in a ROM cartrige using a paper or a cardboard picture/info card.
It runs with two bits, and others can drive a joystick.
It's a weird project, but the concept is just funny...
Wait the $7F Bit 7 signal (synchro), and read the secound data on the next raw on the card.
Test card 40x50mm:
Work in progress...
"Bars Reader" card project [KiCad-ZX81&SPECTRUM]
"Bars Reader" card project [KiCad-ZX81&SPECTRUM]
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
Re: "Bars Reader" card project [KiCad-ZX81&SPECTRUM]
Hi,
The first release is ready (Kicad r.8):
http://zx81.ordi5.free.fr/brico/ZX81_CardReader/
Driver:
Have fun.
The first release is ready (Kicad r.8):
http://zx81.ordi5.free.fr/brico/ZX81_CardReader/
Driver:
Code: Select all
;------- TASM ASM mnemonics. -------
; Compile this file using:
; Set TASMOPTS = -b
; tasm -80 ThisCode.tas MyBinary.BIN
;-----------------------------------
; Zx81 Program name: VB81 XuR [CardReader.bas] :
; REM line name: D=16514/16693 : H=4082/4135
#define ORG .org ; TASM cross-assembler definitions
#define equ .equ
;-----------------------------------
;------------------------------------
;-BASIC sub-routine entry. -
;+----------------------------------+
; Lb4082 ; <- USR BASIC Enty.
;+----------------------------------+
ORG $4082 ; [@16514/@h4082]
; OPTICAL READER (BITs 6-7)
; 7 =SYNC
; 6 =DATA (BLACK STRIP=1 WHITE=0)
Lb4082:
LD BC,$0800
Lb4085:
IN A,($7F) ; MAGECO 8 IO card.
BIT 7,A
JR NZ, Lb4085 ; [$4085:16517]
LD DE,$0010 ; DELAY / to grab a good inline data.
Lb408E:
DEC DE
LD A,D
OR E
JR NZ, Lb408E ; [$408E:16526]
IN A,($7F) ; MAGECO 8 IO card.
RR C
BIT 6,A
JR NZ, Lb409D ; [$409D:16541]
SET 7,C
Lb409D:
DEC B
JR Z, Lb40A8 ; [$40A8:16552]
Lb40A0:
IN A,($7F) ; MAGECO 8 IO card.
BIT 7,A
JR NZ, Lb4085 ; [$4085:16517]
JR Lb40A0 ; [$40A0:16544]
Lb40A8:
RET ; ==========================
; JOYSTICK (BITs 0-5)
Lb40A9: ; <16553>
LD BC,$0000
IN A,($7F) ; MAGECO LIGHT-PEN [V]/8 IO card.
RES 6,A
RES 7,A
LD C,A
RET ; ==========================
.end
Code: Select all
1 REM [HEX:\
01,00,08,DB,7F,CB,7F,20,\
FA,11,00,01,1B,7A,B3,20,\
FB,DB,7F,CB,19,CB,77,20,\
02,CB,F9,05,28,08,DB,7F,\
CB,7F,20,DF,18,F8,C9,01,\
00,00,DB,7F,CB,B7,CB,BF,\
4F,C9 ]
10 PRINT USR 16514
15 STOP
20 PRINT ""JOY:";USR 16553
30 GOTO 20
Xavier ...on the Facebook groupe : "Zx81 France"(fr)