Changes

Tennis Cup 2 (cartridge)

2,425 bytes added, 12:52, 1 February 2010
/* Analog Joystick */
This games is pehaps the only one on Amstrad GX4000/Plus range to enable the use of an [[Analog Joysticks| Analog Joystick]], for the 2nd player.
If coders could analyse properly this game's programm[code] 25b2 010ef4 ld bc, it would give us 0f40eh25b5 ed49 out (c),c25b7 06f6 ld b,0f6h25b9 ed78 in a model ,(c)25bb e630 and 30h25bd 4f ld c,a25be f6c0 or 0c0h25c0 ed79 out (c),a25c2 ed49 out (c),c25c4 04 inc b25c5 3e92 ld a,92h25c7 ed79 out (c),a25c9 c5 push bc25ca cbf1 set 6,c 25cc 3e09 ld a,09h25ce b1 or c25cf 06f6 ld b,0f6h25d1 ed79 out (c),a25d3 06f4 ld b,0f4h25d5 ed78 in a,(c)25d7 2f cpl 25d8 328280 ld (8082h),a ;; joy 0 25db f5 push af25dc 3e06 ld a,06h25de b1 or c25df 06f6 ld b,0f6h25e1 ed79 out (c),a25e3 06f4 ld b,0f4h25e5 ed78 in a,(c)25e7 2f cpl 25e8 328380 ld (8083h),a ;; joy 125eb d1 pop de25ec b2 or d25ed 328680 ld (8086h),a 25f0 3e03 ld a,03h25f2 b1 or c25f3 06f6 ld b,0f6h25f5 ed79 out (c),a25f7 06f4 ld b,0f4h25f9 ed78 in a,(c)25fb 2f cpl 25fc 328480 ld (8084h),a ;; pause? 25ff c1 pop bc2600 3e82 ld a,82h2602 ed79 out (c),a2604 05 dec b2605 ed49 out (c),c2607 01b87f ld bc,7fb8h260a ed49 out (c),c 260c 0e00 ld c,00h260e 3a0868 ld a,(6808h) ;; analogue input channel 02611 d61f sub 1fh2613 fe14 cp 14h2615 f21f26 jp p,261fh2618 feec cp 0ech261a fa2326 jp m,2623h261d 1806 jr 2625h 261f cbd9 set 3,c ;; right2621 1802 jr 2625h 2623 cbd1 set 2,c ;; left 2625 3a0968 ld a,(6809h) ;; analogue input channel 12628 d61f sub 1fh262a fe14 cp 14h262c f23926 jp p,2639h262f feec cp 0ech2631 f23b26 jp p,263bh2634 cbc1 set 0,c ;; up 2636 c33b26 jp 263bh2639 cbc9 set 1,c ;; down 263b 3a8280 ld a,(8082h) ;; joy 0 fire.263e e610 and 10h2640 b1 or c2641 328580 ld (8085h),a[/code] The keyboard is read to implement Analog Joysticvks determine the state of the digital joysticks and the P button (pause button on GX4000/Plus modern softwaresgx4000 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 ==
2,541
edits