Clowns - I love it!

Discussion, Reviews & High-scores

Moderator: Moderators

carlsson
Class of '6502
Posts: 5516
Joined: Wed Mar 10, 2004 1:41 am

Post by carlsson »

Quite interesting to compare the two versions. There is some mismatch at the beginning, but the interesting thing is around $A18C, where input seems to occur. The paddle version goes:

Code: Select all

$A18C TAY
$A18D LDA $9008,Y ; 36872-73 for paddle registers
$A190 EOR #$FF
$A192 LSR .. and so on
while the joystick version does:

Code: Select all

$A18C TAY
$A18D JSR $AEA4
$A190 EOR #$FF
$A192 LSR .. and so on
The paddle version contains a lot of padding ($AA, TAX) in the area where the joystick routine is. Sorry for a lengthy ML dumping post in the Games subforum, but kind of interesting:

Code: Select all

$AEA4 LDA #$00
$AEA6 STA $9122 ; POKE 37154,0 to read all directions
$AEA9 LDA $9120 ; 37152
$AEAC ROL
$AEAD BCS $AEB8 ; no movement to the left
$AEAF LDA $FF ; internal variable, never initialized?
$AEB1 SEC
$AEB2 SBC #$03 ; paddles are simulated as movement by three steps
$AEB4 BCC $AEB8 ; allowed range 3..252
$AEB6 STA $FF
$AEB8 LDA $9111 ; 37137
$AEBB AND #$10 ; movement to the right
$AEBD CMP #$10
$AEBF BEQ $AECA
$AEC1 LDA $FF
$AEC3 СLC
$AEC4 ADC #$03
$AEC6 BCS $AECA
$AEC8 STA $FF
$AECA LDA #$FF
$AECC STA $9122
$AECF LDA $FF
$ACD1 RTS
I never owned a set of paddles, so I can not compare how the games play, but as paddles are analogue (?), one would expect the ability to accelerate and move faster than with a joystick whose speed is set? I'm sure one could come up with a smarter paddle simulation by having a speed counter which increases for as long as one moves in the same direction, like how mouse simulation was done by joystick on some C64 applications much later.

Considering the padded areas in the middle of the ROM, I wonder if this is an official version. Maybe during development, someone who did not have access to a set of paddles wrote this routine, and it was later released. It would not be too hard to merge the two into a version that will play either by paddles or joystick at the same time. I wonder if there are joystick versions of some other paddle-only games?
Anders Carlsson

Image Image Image Image Image
Boray
Musical Smurf
Posts: 4064
Joined: Mon May 03, 2004 10:47 am

Post by Boray »

Maybe the joystick version just is a hacked rom image?

A paddle is just a potentiometer giving a resistance to the computer. It's not hard to build one (or a pair) yourself...

/Anders
PRG Starter - a VICE helper / Vic Software (Boray Gammon, SD2IEC music player, Vic Disk Menu, Tribbles, Mega Omega, How Many 8K etc.)
Boray
Musical Smurf
Posts: 4064
Joined: Mon May 03, 2004 10:47 am

Post by Boray »

carlsson wrote:I wonder if there are joystick versions of some other paddle-only games?
Take a look at Zimmers... I think there is a joystick version of "The Sky is Falling"...

/Anders
PRG Starter - a VICE helper / Vic Software (Boray Gammon, SD2IEC music player, Vic Disk Menu, Tribbles, Mega Omega, How Many 8K etc.)
carlsson
Class of '6502
Posts: 5516
Joined: Wed Mar 10, 2004 1:41 am

Post by carlsson »

If it was a hacked version, why did Commodore put in a block of $AA padding, exactly the size of the joystick routine, in the middle of the ROM? Or maybe the paddle version also is modified from original cartridge? It may be the joystick - development - version never was sold, but leaked out from the "labs" at some time.
Anders Carlsson

Image Image Image Image Image
Boray
Musical Smurf
Posts: 4064
Joined: Mon May 03, 2004 10:47 am

Post by Boray »

This should mean that it wouldn't be much of a problem to make a jitter-reducing paddle version. Just put it where the joystick routine is. A way to do this would be to calculate a medium value of a couple of samples. For example, use two bytes for a 16 bit value. Read the first value, add three more paddle readings and then right shift the 16 bit value two times. Or read 8 times and shift three steps... Should not be very hard to fit into the joystick space...

/Anders
PRG Starter - a VICE helper / Vic Software (Boray Gammon, SD2IEC music player, Vic Disk Menu, Tribbles, Mega Omega, How Many 8K etc.)
larwe
Vic 20 Newbie
Posts: 8
Joined: Sun Jan 22, 2006 9:09 pm

Post by larwe »

The bandwidth should already be limited by hardware. I guess there is a low pass filter on the paddle pot inputs (without looking at the schematic).
Post Reply