Tennis Cup 2 (cartridge)

From CPCWiki - THE Amstrad CPC encyclopedia!
Revision as of 08:57, 1 February 2010 by Arnoldemu (Talk | contribs) (Analog Joystick)

Jump to: navigation, search

Cover

Covers from CPCmania

Cartridge

Manual

You can download in PDF from CPCmania ( See the links ).

Game

You can download in CPR for use in emulators and BIN from CPCmania ( See the links ).


Analog Joystick

This games is pehaps the only one on Amstrad GX4000/Plus range to enable the use of an Analog Joystick, for the 2nd player.

ld      bc,0f40eh
out     (c),c
ld      b,0f6h
in      a,(c)
and     30h
ld      c,a
or      0c0h
out     (c),a
out     (c),c
inc     b
ld      a,92h
out     (c),a
push    bc
set     6,c
ld      a,09h ;; keyboard line for joy 0
or      c
ld      b,0f6h
out     (c),a
ld      b,0f4h
in      a,(c)
cpl     
ld      (8082h),a			;; joy 0
push    af
ld      a,06h ;; keyboard line for joy 1
or      c
ld      b,0f6h
out     (c),a
ld      b,0f4h
in      a,(c)
cpl     
ld      (8083h),a			;; joy 1
pop     de
or      d
ld      (8086h),a
ld      a,03h
or      c
ld      b,0f6h
out     (c),a
ld      b,0f4h
in      a,(c)
cpl     
ld      (8084h),a			;; pause?
pop     bc
ld      a,82h
out     (c),a
dec     b
out     (c),c
ld      bc,7fb8h
out     (c),c

260c 0e00 ld c,00h 260e 3a0868 ld a,(6808h) ;; analogue input channel 0 2611 d61f sub 1fh 2613 fe14 cp 14h 2615 f21f26 jp p,261fh 2618 feec cp 0ech 261a fa2326 jp m,2623h 261d 1806 jr 2625h

261f cbd9 set 3,c ;; right 2621 1802 jr 2625h

2623 cbd1 set 2,c ;; left

2625 3a0968 ld a,(6809h) ;; analogue input channel 1 2628 d61f sub 1fh 262a fe14 cp 14h 262c f23926 jp p,2639h 262f feec cp 0ech 2631 f23b26 jp p,263bh 2634 cbc1 set 0,c ;; up 2636 c33b26 jp 263bh 2639 cbc9 set 1,c ;; down

263b 3a8280 ld a,(8082h) ;; joy 0 fire. 263e e610 and 10h 2640 b1 or c 2641 328580 ld (8085h),a

The keyboard is read to determine the state of the digital joysticks and the P button (pause button on gx4000 console).

The routine reads analogue input channel 0 and 1 for the analogue joystick and performs some checking to see the range of the numbers. Based on this it sets the direction pressed.

Links

http://www.cpcmania.com/ ( on the games section : GX4000/CPC+ GAMES )