Jump to content

Tennis Cup 2 (cartridge): Difference between revisions

From CPCWiki - THE Amstrad CPC encyclopedia!
Polluks (talk | contribs)
 
(18 intermediate revisions by 5 users not shown)
Line 1: Line 1:
[[File:Tennis cup 2 intro.png|384px|thumb|right]]
'''Tennis Cup 2''' is the Cartridge version of '''Tennis Cup''', a tennis game on CPC (old), both games produced by [[Loriciel]].
Certainly the best looking Tennis game on Amstrad (in cartridge version).
== Cover ==
== Cover ==


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


== Videos ==
==Analog Joystick==
Quick look by Novabug
{{#ev:youtube|VQgmT-HRt2Y|340}}
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.


==Comparison==


25b2 010ef4    ld      bc,0f40eh
[[File:Tennis cup cpc intro.png]][[File:Tennis cup cpc game.png]]
25b5 ed49      out    (c),c
25b7 06f6      ld      b,0f6h
25b9 ed78      in      a,(c)
25bb e630      and    30h
25bd 4f        ld      c,a
25be f6c0      or      0c0h
25c0 ed79      out    (c),a
25c2 ed49      out    (c),c
25c4 04        inc    b
25c5 3e92      ld      a,92h
25c7 ed79      out    (c),a
25c9 c5        push    bc
25ca cbf1      set    6,c


25cc 3e09      ld      a,09h
CPC version in mode1.
25ce b1        or      c
25cf 06f6      ld      b,0f6h
25d1 ed79      out    (c),a
25d3 06f4      ld      b,0f4h
25d5 ed78      in     a,(c)
25d7 2f        cpl   
25d8 328280    ld      (8082h),a ;; joy 0


25db f5        push    af
[[File:Tennis cup 2 cartridge game 1.png]][[File:Tennis cup 2 cartridge game 2.png]]
25dc 3e06      ld      a,06h
25de b1        or      c
25df 06f6      ld      b,0f6h
25e1 ed79      out    (c),a
25e3 06f4      ld      b,0f4h
25e5 ed78      in      a,(c)
25e7 2f        cpl   
25e8 328380    ld      (8083h),a ;; joy 1
25eb d1        pop    de
25ec b2        or      d
25ed 328680    ld      (8086h),a


25f0 3e03      ld      a,03h
Cartridge version in Mode0 + Hardwired sprites.
25f2 b1        or      c
25f3 06f6      ld      b,0f6h
== Analog Joystick Support ==
25f5 ed79      out    (c),a
25f7 06f4      ld      b,0f4h
This game is perhaps the only one on Amstrad GX4000/Plus range that supports an [[Analog Joysticks|Analog Joystick]], however, it converts the analog signals to digital signals by software. In two-player mode, the game can be controlled by:
25f9 ed78      in      a,(c)
* Digital Joystick #1 and Digital Joystick #2
25fb 2f        cpl   
or alternately (selectable in Options),
25fc 328480    ld      (8084h),a ;; pause?
* Analog Joystick #1 and Digital Joystick #2
 
That feature is intended for people who own one digital stick, and one analogue stick (rather than two digital ones). In the "analog" mode, Digital Joystick #1 is not used (because its button inputs would conflict with Analog Joystick #1).
25ff c1        pop    bc
2600 3e82      ld      a,82h
2602 ed79      out    (c),a
2604 05        dec    b
2605 ed49      out    (c),c
2607 01b87f    ld      bc,7fb8h
260a ed49      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
Disassembly of the joystick code in Tennis Cup 2:
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.
  ld      bc,0f40eh
263e e610     and    10h
  out    (c),c
2640 b1        or      c
  ld      b,0f6h
2641 328580    ld      (8085h),a
  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      ;keyb.row 9              ;\
  or      c                                    ;
  ld      b,0f6h                                ;
  out    (c),a                                ; read digital joystick 1
  ld      b,0f4h                                ;
  in      a,(c)                                ;
  cpl                                          ;
  ld      (8082h),a  ;store joy 1              ;/
  push    af      ;push joy 1
  ld      a,06h      ;keyb.row6                ;\
  or      c                                    ;
  ld      b,0f6h                                ;
  out    (c),a                                ; read digital joystick 2
  ld      b,0f4h                                ;
  in      a,(c)                                ;
  cpl                                          ;
  ld      (8083h),a  ;store joy 2              ;/
  pop    de      ;pop joy 1                  ;\
  or      d        ;merge joy 2                ; merge digital joystick 1+2
  ld      (8086h),a  ;store both              ;/
  ld      a,03h      ;keyb.row3                ;\
  or      c                                    ; read pause button
  ld      b,0f6h                                ; (aka "P" key)
  out    (c),a                                ; (row3.bit3)
  ld      b,0f4h                                ; (bit3 still needs to be
  in      a,(c)                                ; isolated elsewhere)
  cpl                                          ;
  ld      (8084h),a  ;store pause              ;/
  pop    bc
  ld      a,82h
  out    (c),a
  dec    b
  out    (c),c
  ld      bc,7fb8h
  out    (c),c
  ld      c,00h  ;digital-joystick-style bits
  ld      a,(6808h)  ;ADC0 ;+00h..+3Fh        ;\
  sub    1fh              ;-1Fh..+20h        ;
  cp      14h                                  ;
  jp      p,261fh_RIGHT    ;+14h..+20h        ;
  cp      0ech              ;-14h              ; read analog joystick 1,
  jp      m,2623h_LEFT      ;-1Fh..-15h        ; X-axis (ADC0)
  jr      2625h_X_DONE      ;-14h..+13h        ;
261f_RIGHT:                                    ;
  set    3,c  ;bit3=right (as on digital joy) ; convert to digital left/right
  jr      2625h_X_DONE                          ;
2623_LEFT:                                    ;
  set    2,c  ;bit2=left (as on digital joy)  ;
2625_X_DONE:                                  ;/
  ld      a,(6809h)  ;ADC0 ;+00h..+3Fh        ;\
  sub    1fh              ;-1Fh..+20h        ;
  cp      14h                                  ;
  jp      p,2639h_DOWN      ;+14h..+20h        ;
  cp      0ech              ;-14h              ; read analog joystick 1,
  jp      p,263bh_Y_DONE    ;-14h..+13h        ; Y-axis (ADC1)
2634h_UP:                  ;-1Fh..-15h        ;
  set    0,c  ;bit0=up (as on digital joy)    ; convert to digital up/down
  jp      263bh_Y_DONE                          ;
2639h_DOWN:                                    ;
  set    1,c  ;bit1=down (as on digital joy)  ;
263bh_Y_DONE:                                  ;/
  ld     a,(8082h) ;joy1                      ;\
  and    10h       ;joy1 fire                  ; use digital joystick 1 fire
  or      c                                     ; as analog joystick 1 fire
  ld      (8085h),a ;store A/D converted analog ;/


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

Latest revision as of 00:07, 7 June 2023

Error creating thumbnail: Unable to save thumbnail to destination

Tennis Cup 2 is the Cartridge version of Tennis Cup, a tennis game on CPC (old), both games produced by Loriciel.


Certainly the best looking Tennis game on Amstrad (in cartridge version).


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 ).

Videos

Quick look by Novabug {{#ev:youtube|VQgmT-HRt2Y|340}}

Comparison

Error creating thumbnail: Unable to save thumbnail to destinationError creating thumbnail: Unable to save thumbnail to destination

CPC version in mode1.

Error creating thumbnail: Unable to save thumbnail to destinationError creating thumbnail: Unable to save thumbnail to destination

Cartridge version in Mode0 + Hardwired sprites.

Analog Joystick Support

This game is perhaps the only one on Amstrad GX4000/Plus range that supports an Analog Joystick, however, it converts the analog signals to digital signals by software. In two-player mode, the game can be controlled by:

  • Digital Joystick #1 and Digital Joystick #2

or alternately (selectable in Options),

  • Analog Joystick #1 and Digital Joystick #2

That feature is intended for people who own one digital stick, and one analogue stick (rather than two digital ones). In the "analog" mode, Digital Joystick #1 is not used (because its button inputs would conflict with Analog Joystick #1).

Disassembly of the joystick code in Tennis Cup 2:

 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       ;keyb.row 9               ;\
 or      c                                     ;
 ld      b,0f6h                                ;
 out     (c),a                                 ; read digital joystick 1
 ld      b,0f4h                                ;
 in      a,(c)                                 ;
 cpl                                           ;
 ld      (8082h),a   ;store joy 1              ;/
 push    af       ;push joy 1
 ld      a,06h       ;keyb.row6                ;\
 or      c                                     ;
 ld      b,0f6h                                ;
 out     (c),a                                 ; read digital joystick 2
 ld      b,0f4h                                ;
 in      a,(c)                                 ;
 cpl                                           ;
 ld      (8083h),a   ;store joy 2              ;/
 pop     de       ;pop joy 1                   ;\
 or      d        ;merge joy 2                 ; merge digital joystick 1+2
 ld      (8086h),a   ;store both               ;/
 ld      a,03h       ;keyb.row3                ;\
 or      c                                     ; read pause button
 ld      b,0f6h                                ; (aka "P" key)
 out     (c),a                                 ; (row3.bit3)
 ld      b,0f4h                                ; (bit3 still needs to be
 in      a,(c)                                 ; isolated elsewhere)
 cpl                                           ;
 ld      (8084h),a   ;store pause              ;/
 pop     bc
 ld      a,82h
 out     (c),a
 dec     b
 out     (c),c
 ld      bc,7fb8h
 out     (c),c
 ld      c,00h   ;digital-joystick-style bits
 ld      a,(6808h)   ;ADC0 ;+00h..+3Fh         ;\
 sub     1fh               ;-1Fh..+20h         ;
 cp      14h                                   ;
 jp      p,261fh_RIGHT     ;+14h..+20h         ;
 cp      0ech              ;-14h               ; read analog joystick 1,
 jp      m,2623h_LEFT      ;-1Fh..-15h         ; X-axis (ADC0)
 jr      2625h_X_DONE      ;-14h..+13h         ;
261f_RIGHT:                                    ;
 set     3,c   ;bit3=right (as on digital joy) ; convert to digital left/right
 jr      2625h_X_DONE                          ;
2623_LEFT:                                     ;
 set     2,c   ;bit2=left (as on digital joy)  ;
2625_X_DONE:                                   ;/
 ld      a,(6809h)   ;ADC0 ;+00h..+3Fh         ;\
 sub     1fh               ;-1Fh..+20h         ;
 cp      14h                                   ;
 jp      p,2639h_DOWN      ;+14h..+20h         ;
 cp      0ech              ;-14h               ; read analog joystick 1,
 jp      p,263bh_Y_DONE    ;-14h..+13h         ; Y-axis (ADC1)
2634h_UP:                  ;-1Fh..-15h         ;
 set     0,c   ;bit0=up (as on digital joy)    ; convert to digital up/down
 jp      263bh_Y_DONE                          ;
2639h_DOWN:                                    ;
 set     1,c   ;bit1=down (as on digital joy)  ;
263bh_Y_DONE:                                  ;/
 ld      a,(8082h) ;joy1                       ;\
 and     10h       ;joy1 fire                  ; use digital joystick 1 fire
 or      c                                     ; as analog joystick 1 fire
 ld      (8085h),a ;store A/D converted analog ;/

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.

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