Skip to content
This repository has been archived by the owner on Aug 8, 2019. It is now read-only.

Commit

Permalink
Fixed F-Zero AX JVS/IO features
Browse files Browse the repository at this point in the history
Fixed controller input related bugs
Removed unused variable
Removed unused function declaration
Updated CMakelist.txt
  • Loading branch information
crediar committed Jan 26, 2014
1 parent 0ac41c2 commit 1c51ce5
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 23 deletions.
1 change: 1 addition & 0 deletions Source/Core/Core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ set(SRCS Src/ActionReplay.cpp
Src/HW/DSPLLE/DSPLLE.cpp
Src/HW/DSPLLE/DSPLLETools.cpp
Src/HW/DVDInterface.cpp
Src/HW/AMBaseboard.cpp
Src/HW/EXI_Channel.cpp
Src/HW/EXI.cpp
Src/HW/EXI_Device.cpp
Expand Down
2 changes: 0 additions & 2 deletions Source/Core/Core/Src/HW/DVDInterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ void Read32(u32& _uReturnValue, const u32 _iAddress);
// Write32
void Write32(const u32 _iValue, const u32 _iAddress);

void GCAMExecuteCommand( void );

// Not sure about endianness here. I'll just name them like this...
enum DIErrorLow
{
Expand Down
28 changes: 10 additions & 18 deletions Source/Core/Core/Src/HW/SI_DeviceAMBaseboard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,7 @@ CSIDevice_AMBaseboard::CSIDevice_AMBaseboard(SIDevices device, int _iDeviceNumbe

m_card_bit = 0;
m_card_state_call_count = 0;

m_controltype = 0;


m_wheelinit = 0;

m_motorinit = 0;
Expand Down Expand Up @@ -285,7 +283,7 @@ int CSIDevice_AMBaseboard::RunBuffer(u8* _pBuffer, int _iLength)
}
break;
}

/*
// Serial - Motor
m_motorreply[0] = 0x31;
m_motorreply[1] = 0x04;
Expand Down Expand Up @@ -332,6 +330,7 @@ int CSIDevice_AMBaseboard::RunBuffer(u8* _pBuffer, int _iLength)
res[resp++] = 0x31;
res[resp++] = 0x00;
}
*/
}
break;
case 0x32:
Expand Down Expand Up @@ -727,6 +726,7 @@ int CSIDevice_AMBaseboard::RunBuffer(u8* _pBuffer, int _iLength)
msg.addData(1);
msg.addData(0x10);
break;

// get slave features
/*
0x01: Player count, Bit per channel
Expand All @@ -748,12 +748,10 @@ int CSIDevice_AMBaseboard::RunBuffer(u8* _pBuffer, int _iLength)
switch(AMBaseboard::GetControllerType())
{
case 1:
// Taken from real F-Zero AX
// 2 Player (12-bits), 2 Coin slot, 8 Analog-in, 22 Driver-out
msg.addData((void *)"\x01\x02\x0C\x00", 4);
msg.addData((void *)"\x02\x02\x00\x00", 4);
msg.addData((void *)"\x03\x08\x00\x00", 4);
msg.addData((void *)"\x12\x16\x00\x00", 4);
// 1 Player (12-bits), 1 Coin slot, 8 Analog-in
msg.addData((void *)"\x01\x01\x0C\x00", 4);
msg.addData((void *)"\x02\x01\x00\x00", 4);
msg.addData((void *)"\x03\x06\x00\x00", 4);
msg.addData((void *)"\x00\x00\x00\x00", 4);
break;
case 2:
Expand Down Expand Up @@ -803,7 +801,7 @@ int CSIDevice_AMBaseboard::RunBuffer(u8* _pBuffer, int _iLength)
Pad::GetStatus(i, &PadStatus);
unsigned char player_data[3] = {0,0,0};

switch(m_controltype)
switch(AMBaseboard::GetControllerType())
{
// Controller configuration for F-Zero AX
case 1:
Expand Down Expand Up @@ -910,7 +908,7 @@ int CSIDevice_AMBaseboard::RunBuffer(u8* _pBuffer, int _iLength)
SPADStatus PadStatus;
Pad::GetStatus(0, &PadStatus);

switch(m_controltype)
switch(AMBaseboard::GetControllerType())
{
// F-Zero AX
case 1:
Expand Down Expand Up @@ -946,12 +944,6 @@ int CSIDevice_AMBaseboard::RunBuffer(u8* _pBuffer, int _iLength)
msg.addData(PadStatus.triggerLeft);
msg.addData((u8)0);

// Unused
msg.addData((u8)0);
msg.addData((u8)0);
msg.addData((u8)0);
msg.addData((u8)0);

break;
// Virtua Strike games
case 2:
Expand Down
4 changes: 1 addition & 3 deletions Source/Core/Core/Src/HW/SI_DeviceAMBaseboard.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@ class CSIDevice_AMBaseboard : public ISIDevice

unsigned short m_coin[2];
int m_coin_pressed[2];

u32 m_controltype;


u8 m_card_memory[0xD0];
u8 m_card_read_packet[0xDB];
u8 m_card_buffer[0x100];
Expand Down

0 comments on commit 1c51ce5

Please sign in to comment.