joystick problems?

A place to discuss everything Dragon related that doesn't fall into the other categories.
Post Reply
samplefiend
Posts: 44
Joined: Thu Sep 03, 2009 5:53 pm

joystick problems?

Post by samplefiend »

Hiya everyone,

Forgive yet anothger query but I got my hands on some joysticks from ebay recently and have been trying them out with some games. The joysticks seem to work fine - control is nice and the fire buttons work great. One thing i've noticed though is that playing with joysticks instead of keys seems to create a lot of background noise in some games.

Devil Assault works without any noise for example. Danger Ranger & Katerpillar Attack make no noise when the stick is to the left but if you move it to the right the noise gets louder. Donkey King and Time Bandit make noise most of the time regardless ...

I've also got a dragon quickshot stick and the same thing happens with it too.

any ideas folks?

cheers again

craig xxx
munkeyboy
Posts: 95
Joined: Fri Mar 20, 2009 2:56 am
Location: South Wales

Re: joystick problems?

Post by munkeyboy »

Hello Craig,

The Dragon uses PIA0 to control joystick and also audio source selection (as well as other things). There is a reference to this in Dragon User August '84 page 45 under the title "Busily buzzing".
I can only guess that some software makes use of the PIA in a different way to others?
My electronic knowledge is limited to say the least, I can't see how it could but does anyone know if this can be resolved with a hardware fix?

Regards, Gareth
jmk
Posts: 65
Joined: Fri Mar 20, 2009 1:12 am

Re: joystick problems?

Post by jmk »

That sounds vaguely familiar... When I was programming Glove I found that exact same problem with clicks getting louder as I moved the joystick down or right. It didn't happen under emulation (then, not sure about now) just on the real thing.

I think it's something to do with the joystick taking longer to read when pushing down or right because of the way analogue joysticks work.

I made sure I switched off the 6-bit output (bit 3 of $FF23 reset and I cleared the output ($FF20) just in case) whenever I wasn't outputting any sound and that seemed to fix it, so it's probably a software issue with particular games.
zephyr
Posts: 1474
Joined: Mon Jul 21, 2008 1:18 am

Re: joystick problems?

Post by zephyr »

This problem occurs when games use the BASIC ROM joystick routine. Unlike the CoCo's, the Dragon's joystick routine does not disable audio.
zephyr
Posts: 1474
Joined: Mon Jul 21, 2008 1:18 am

Re: joystick problems?

Post by zephyr »

You can get round this problem quite easily if you have a Dragon 64, or Dragon 32 with a 64K memory upgrade. I have written a small program which copies the BASIC ROM to RAM, and applies a patch to the joystick routine so that it disables audio in the exact same way as the CoCo. This program will stop the clicking sound occurring on most games. Just load, and EXEC the attached 'JOYFIX' before loading your game from disk or cassette.

Regards,
Steve

EDIT: Attachment removed.
Last edited by zephyr on Fri Sep 10, 2010 10:58 am, edited 1 time in total.
zephyr
Posts: 1474
Joined: Mon Jul 21, 2008 1:18 am

Re: joystick problems?

Post by zephyr »

This improved version has the following changes:

(1) Main patch code moved to unused bytes at $9FF8.
(2) Hardware initialisation routine patched to help prevent games from switching the computer back to 32K mode.
(3) RAM test routine patched to prevent ROM in RAM being overwritten if a game were to cold restart the computer.
Attachments
joyfix2.zip
(2.96 KiB) Downloaded 362 times
zephyr
Posts: 1474
Joined: Mon Jul 21, 2008 1:18 am

Re: joystick problems?

Post by zephyr »

samplefiend wrote: Devil Assault works without any noise for example. Danger Ranger & Katerpillar Attack make no noise when the stick is to the left but if you move it to the right the noise gets louder. Donkey King and Time Bandit make noise most of the time regardless ...
I fixed all of these games, except for Time Bandit (The bug wasn't present in my copy), and uploaded them to the Uploads section of the forum.

Regards,
Steve
samplefiend
Posts: 44
Joined: Thu Sep 03, 2009 5:53 pm

Re: joystick problems?

Post by samplefiend »

hi again steve,

many thanks for the file and for fixing the fixed dragon games i'd mentioned. it's great to play with the volume loud and not get distracted by the joystick interference!

keep up the great work,

craig xxx
User avatar
Rolo
Posts: 228
Joined: Sun Feb 10, 2013 7:36 pm

Buzzing joystick dependent sound

Post by Rolo »

I'm having the same old problem now, patching CoCo-images for the Dragon multi-cart:
Some of the CoCo-programs have that joystick-dependent noise, since Dragon Color Basic does not, like CoCo, switch off audio, when it reads the joysticks' axis. That's easy to see comparing the assembly listings of CoCo and Dragon. I made tests with a patched "Polaris.rom", where I divert the jumps and switch off audio myself (jsr $bac3), before I jsr [$a00a] into the regular routine and finally rts back into the program. This is better, but nothing like a clean sound. Is there better way :?:
Post Reply