MPU-401 reset now sends ACK also in UART mode, fixes MEGAMID and possibly other programs.
This commit is contained in:
@@ -162,7 +162,7 @@ static void MPU401_ResetDone(void *p)
|
||||
static void MPU401_WriteCommand(mpu_t *mpu, uint8_t val)
|
||||
{
|
||||
uint8_t i;
|
||||
|
||||
|
||||
if (mpu->state.reset)
|
||||
{
|
||||
mpu->state.cmd_pending=val+1;
|
||||
@@ -301,7 +301,9 @@ static void MPU401_WriteCommand(mpu_t *mpu, uint8_t val)
|
||||
mpu401_reset_callback = MPU401_RESETBUSY * 33 * TIMER_USEC;
|
||||
mpu->state.reset=1;
|
||||
MPU401_Reset(mpu);
|
||||
#if 0
|
||||
if (mpu->mode==M_UART) return;//do not send ack in UART mode
|
||||
#endif
|
||||
break;
|
||||
case 0x3f: /* UART mode */
|
||||
pclog("MPU-401:Set UART mode %X\n",val);
|
||||
@@ -733,6 +735,14 @@ next_event:
|
||||
|
||||
void mpu401_init(mpu_t *mpu, uint16_t addr, int irq, int mode)
|
||||
{
|
||||
#if 0
|
||||
if (mode != M_INTELLIGENT)
|
||||
{
|
||||
mpu401_uart_init(mpu, addr);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
mpu->status = STATUS_INPUT_NOT_READY;
|
||||
mpu->irq = irq;
|
||||
mpu->queue_used = 0;
|
||||
|
||||
@@ -43,6 +43,8 @@ typedef enum MpuDataType {T_OVERFLOW,T_MARK,T_MIDI_SYS,T_MIDI_NORM,T_COMMAND} Mp
|
||||
|
||||
typedef struct mpu_t
|
||||
{
|
||||
int uart_mode;
|
||||
uint8_t rx_data;
|
||||
int intelligent;
|
||||
MpuMode mode;
|
||||
int irq;
|
||||
@@ -88,3 +90,5 @@ extern int mpu401_standalone_enable;
|
||||
|
||||
void mpu401_device_add(void);
|
||||
device_t mpu401_device;
|
||||
|
||||
void mpu401_uart_init(mpu_t *mpu, uint16_t addr);
|
||||
|
||||
Reference in New Issue
Block a user