Atari 800 Mouse Driver

by Bobbs1971 in Circuits > Computers

932 Views, 1 Favorites, 0 Comments

Atari 800 Mouse Driver

mouse.png

Summary

This Instructable explains how to add a Windows style mouse to an Atari 800.

Introduction

Do you have paws instead of opposable digits? Are you finding pushing arrow keys to move the cursor around the screen hard work? Do you want to move into the 21st century? Bobbs just might have the answer.

Supplies

An Atari 8 bit computer

Some means of storing the code, such as an Atari disk drive (do these still exist?), or SIO2BT, or SIO2SD

Atari Assembler Editor

Joystick

See

https://www.instructables.com/id/Atari-8-Bit-Optic...

for option 3 parts list

Option 1 - Low Tech

cover.jpg

First off, this is from Compute's Third Book of Atari. It uses a VBlank routine to move the cursor around the screen with a joystick.

https://www.atariarchives.org/c3ba/page163.php

Certainly worthy of mention. The code's nice and compact, it works and doesn't hog as much memory as option 2. However, I reckon we can do better.

Option 2 - Mouse Driver

pic2.png

Following on from step 1, leave the joystick plugged in and take a look at the attached three files. An ATR file for those with the technology, and text files of the source code - it's all in 6502 assembly code.

The mouse driver is in two parts;

1) An autorun.sys file which boots on power up, sets the PMG and imports the VBlank routine. The source code is in the mouseloader2.txt file. I reckon there might be room for improvement in the addressing.

2) The VBlank routine (M.BIN) which handles the movement and button click.

There are a few limiting factors.

The Atari joystick is the first as it only has movement and a fire button, so unlike modern mice, we can't have too many tricks

Secondly, the autorun.sys file sits in page 6 so we're restricted to 256 bytes. This isn't really a problem as it works and can be deleted after loading.

The driver can't be too long as it runs in the VBlank, and needs to finish quickly or else bad things will happen.

Just over 2k is used, along with PMG player 0 and the VBlank routine.

After all this, we're left with up, down, left, right, and click / fire to move the text cursor to the new position. Still better than using the arrow keys though.

Pressing System Reset kills the mouse and changing graphics modes causes bad things to happen. Best stick to text editing in mode 0.

Option 3 - Welcome to the 21st Century

FZWEPH4JWGNZ5ES.LARGE.jpg

Unplug that joystick and take a look at this;

https://www.instructables.com/id/Atari-8-Bit-Optic...

Enjoy