From a406fffa6c13391e497e4b66397b6e0358f3ffa8 Mon Sep 17 00:00:00 2001 From: Shamus Hammons Date: Fri, 4 Feb 2005 06:31:19 +0000 Subject: [PATCH] No longer needed (Bye bye!) --- src/anajoy.cpp | 60 -------------------------------------------- src/include/anajoy.h | 14 ----------- 2 files changed, 74 deletions(-) delete mode 100644 src/anajoy.cpp delete mode 100644 src/include/anajoy.h diff --git a/src/anajoy.cpp b/src/anajoy.cpp deleted file mode 100644 index b759aca..0000000 --- a/src/anajoy.cpp +++ /dev/null @@ -1,60 +0,0 @@ -// -// Analog joystick handler -// -// by cal2 -// GCC/SDL port by Niels Wagenaar (Linux/WIN32) and Caz (BeOS) -// Cleanups by James L. Hammons -// -// Is it even necessary anymore to have this? According to the JTRM, these ports -// aren't even wired up in later models and I can't think of one game that used -// them. Maybe it's time to retire this? - -#include "jaguar.h" - -static uint8 anajoy_ram[2]; -static uint8 analog_x, analog_y; - - -void anajoy_init(void) -{ - anajoy_reset(); -} - -void anajoy_reset(void) -{ - memset(anajoy_ram,0x00,2); - analog_x=128; - analog_y=128; -} - -void anajoy_done(void) -{ -} - -void anajoy_byte_write(uint32 offset, uint8 data) -{ - anajoy_ram[offset&0x01]=data; -} - -void anajoy_word_write(uint32 offset, uint16 data) -{ - offset&=0x01; - anajoy_ram[offset+0]=(data>>8)&0xff; - anajoy_ram[offset+1]=data&0xff; -} - -uint8 anajoy_byte_read(uint32 offset) -{ - if (anajoy_ram[1]&0x01) - return(analog_y); - else - return(analog_x); -} - -uint16 anajoy_word_read(uint32 offset) -{ - uint16 data=anajoy_byte_read((offset+0)&0x01); - data<<=8; - data|=anajoy_byte_read((offset+1)&0x01); - return(data); -} diff --git a/src/include/anajoy.h b/src/include/anajoy.h deleted file mode 100644 index 6808a5d..0000000 --- a/src/include/anajoy.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef __ANAJOY_H__ -#define __ANAJOY_H__ - -#include "types.h" - -void anajoy_init(void); -void anajoy_reset(void); -void anajoy_done(void); -void anajoy_byte_write(uint32, uint8); -void anajoy_word_write(uint32, uint16); -uint8 anajoy_byte_read(uint32); -uint16 anajoy_word_read(uint32); - -#endif -- 2.37.2