X-R-Cycle

Developer(s): Fred Schakel
Date: 1986
Type: Program
Platform(s): TS 2068
Tags: Game

An exercise-bike game. A reed switch on the bike wheel is wired to the fire button of a joystick, and a machine-code routine reads the wheel speed from it. You ride a bike around a map of Fred Schakel’s subdivision, steering left and right with the joystick, and score points for each place you reach (home, Mac’s Milk, the cleaners, Canadian Tire, the mall, the park, Mom’s and A & D); riding off the road or into the river ends the ride. Without the bike, tap 0 and steer with 5 and 8.

Only the BASIC was printed. The map screen and the machine code (about 7K, saved as CODE 51400,7045 by line 9999) were not, so there is no download. Lines 9200-9210 define the four bike UDGs used in line 80.

Published in Sinc-Link May-June 1986 (Using the TS 2068 With an Exercycle Machine).

Related Articles

User-written program that provides list of destinations while riding a stationary bike.

Source Code

10 LET o=0
20 POKE 58443,74: POKE 58444,201: POKE 58445,0: POKE 58446,64: RANDOMIZE USR 51480: REM move screen from 51530 to d-file
50 REM  init vars
60 LET a=2: LET x=12: LET y=12
70 LET sc=0: LET x1=x: LET y1=y
80 GO SUB 9200: LET a$="\q\r\s\t"
90 PRINT AT 12,11; INK 3; PAPER 0;"\::";AT 12,4;" ";AT 5,19;" ";AT 12,28;" "
100 REM  print bike
110 PRINT AT y,x; INK 6; PAPER 0;"\::"
130 PRINT INK 4; PAPER 6;AT y1,x1;a$(a)
140 LET x=x1: LET y=y1
200 REM sense speed
210 LET w=USR 51400: IF w<20 OR w>1000 THEN LET s=0: GO TO 260
220 LET s=1500/w
260 PRINT AT 20,1;"SPEED ";INT s;" "
300 REM direction
310 LET a=a+(IN 61438=26)-(IN 63486=15): IF a=0 THEN LET a=4
320 IF a=5 THEN LET a=1
400 REM locate
405 LET d=s/500
410 LET x1=x1+(a=2)*d-(a=4)*d
420 LET y1=y1+(a=3)*d-(a=1)*d
430 LET o=o+d
440 PRINT AT 21,1;"MILES ";INT o;"  "
500 REM collision
505 LET c=ATTR (y1,x1)
510 IF c=6 OR c=52 THEN GO TO 100
520 IF c=5 THEN PRINT FLASH 1;AT 20,12;"FELL IN RIVER": GO TO 700
530 IF c=3 THEN GO SUB 1000: LET sc=sc+p: PRINT AT 20,12;"ARRIVED at ";q$;AT 21,19;"SCORE ";sc: GO SUB 2000: GO TO 130
540 PRINT AT 20,12;"RAN OFF the ROAD": GO TO 700
700 FOR q=1 TO 4: BEEP .1,11: BEEP .1,30: NEXT q: PAUSE 150: GO TO 20
1000 IF y1>17 THEN GO TO 1100
1010 IF INT y1=12 THEN GO TO 1200
1020 IF INT y1<7 THEN LET q$="PARK": LET p=425: IF INT y=5 THEN LET a=3: RETURN
1025 LET a=2: RETURN
1100 IF INT x1=4 THEN LET q$="MOM'S": LET p=350: LET a=1: RETURN
1110 IF INT x1=10 THEN LET q$="MAC'S": LET p=225: LET a=1: RETURN
1120 IF INT x1=21 THEN LET q$="CLEANERS": LET p=475: LET a=1: RETURN
1130 IF INT x1=28 THEN LET q$="CTC": LET p=550: LET a=1: RETURN
1200 IF INT X1=4 THEN LET q$="MALL": LET p=350: LET a=3: RETURN
1210 IF INT x1=11 THEN LET q$="HOME": LET p=0: RETURN
1220 IF INT x1=27 THEN LET q$="A&D": LET p=550: LET a=3: RETURN
2000 LET y1=y: LET x1=x: FOR q=1 TO 50: LET w=COS q: NEXT q: PRINT PAPER 0;AT 20,12;"                    ": RETURN
9000 CLEAR 51000: LOAD ""CODE : BEEP .2,22: RUN
9199 REM get map from memory
9200 DATA 16,124,84,56,56,56,16,16,0,0,6,58,255,58,6,0,16,16,56,56,56,84,124,16,0,0,96,92,255,92,96,0
9210 RESTORE 9200: FOR q=65496 TO 65527: READ w: POKE q,w: NEXT q: RETURN
9999 SAVE "bike" LINE 9000: BEEP .01,11: SAVE "code"CODE 51400,7045: BEEP .01,11

Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.