User Tools

Site Tools


x68000:joystick_regs

Joystick Registers

The X68000 joystick interface is a µPD82C55. The ADPCM sample rate and pan pot are also set through Port C of this device.

Register List

AddressSizeR/WDescription
0xE9A0011.bR8255 Port A (Joystick #1)
0xE9A0031.bR8255 Port B (Joystick #2)
0xE9A0051.bR/w8255 Port C (Joystick Control)
0xE9A0071.bW8255 Control Word (Mode/Bit Manipulation)

Register Descriptions

Joystick # 1 (0xE9A001):
Joystick # 2 (0xE9A003):

MSX 2 Button
7 6 5 4 3 2 1 0
0 TRG B TRG A 0 RIGHT LEFT BACK FORWARD
CPSF and CPSF-MD

PC4/PC5 = 0:

7 6 5 4 3 2 1 0
0 TRG B TRG A 0 RIGHT LEFT BACK FORWARD

PC4/PC5 = 1:

7 6 5 4 3 2 1 0
0 START TRG C 0 MODE TRG X TRG Y TRG Z

Joystick Control (0xE9A005):

7 6 5 4 3 2 1 0
IOC7 IOC6 IOC5 IOC4 Sampling Rate PCM PAN
BitsNameDescription
7 IOC7 %0: Normal operation
%1: Joystick #1 Option Function B
6 IOC6 %0: Normal operation
%1: Joystick #1 Option Function A
5 IOC5 %0: Normal operation
%1: Joystick #2 Disable processing
4 IOC4 %0: Normal operation
%1: Joystick #1 Disable processing
3~2 Sampling Rate ADPCM sampling frequency setting
1~0 PCM PAN ADPCM output pan setting

Control Word - Bit Set/Reset (0xE9A007):

* Note: When MSB of this register is '0' the function is 8255 Port C line set/reset.

7 6 5 4 3 2 1 0
0 BITSEL DATA
BitsNameDescription
3~1 BITSEL Specify the position to manipulate. Values 0~7 correspond to its respective PCn line on the 8255.
0 DATA Value to set

Control Word - Mode (0xE9A007):

* Note: When MSB of this register is '1' the function is 8255 mode setting.

7 6 5 4 3 2 1 0
1 Group A Mode PORT A IN/OUT PORT C(High) IN/OUT Group B Mode PORT B IN/OUT PORT C(low) IN/OUT
BitsNameDescription
6~5 Group A Mode Operating mode of group A(Port A and Port C(High))
%00: Mode 0
%01: Mode 1
%10: Mode 2
%11: Mode 3
4 PORT A IN/OUT %0: Port A Output
%1: Port A Input
3 PORT C(High) IN/OUT %0: Port C(High) Output
%1: Port C(High) Input
2 Group B Mode Operating mode of Group B(Port B and Port C(Low))
%0: Mode 0
%1: Mode 1
1 PORT B IN/OUT %0: Port B Output
%1: Port B Input
0 PORT C(Low) IN/OUT %0: Port C(Low) Output
%1: Port C(Low) Input
x68000/joystick_regs.txt · Last modified: 2019/08/27 20:45 by 127.0.0.1