dinoboards / yellow-msx-series-for-rc2014

V9958 Video Board Designed for RC2014
MIT License
37 stars 5 forks source link

USBFDD #6

Closed cristianoag closed 1 month ago

cristianoag commented 1 year ago

@vipoo - I'm checking your code an performing a few tests so I can implement the USB floppy drives on the original MSXUSB project. I can successfully get the USB descriptors back when I have a USB thumb drive connected to the module, but every time I try to connect the USB floppy drive I can't get the interruption generated by the CH376. If I check status even without receiving the interruption it is always 0x51.

Did you use any trick to get descriptors from the USB floppy drives?

Here is the communication with the CH376 when the USB thumb drive is connected:

writeCommand (CH_CMD_RESET_ALL) 0x05
writeCommand (CH_CMD_CHECK_EXIST) 0x06
writeData (0xbe)
0x41 = readData ()
writeCommand (CH_CMD_GET_IC_VER) 0x01
0x43 = readData ()
writeCommand (CH_CMD_SET_USB_MODE) 0x15
writeData (0x06)
0x51 = readData ()
writeCommand (CH_CMD_SET_USB_MODE) 0x15
writeData (0x07)
0x51 = readData ()
writeCommand (CH_CMD_SET_USB_MODE) 0x15
writeData (0x06)
0x51 = readData ()
writeCommand (UNKNOWN) 0x8b
writeData (0x25)
writeData (0xdf)
writeCommand (CH_CMD_SET_USB_ADDR) 0x13
writeData (0x00)
writeCommand (CH_CMD_GET_DESCR) 0x46
writeData (0x01)
writeCommand (CH_CMD_GET_STATUS) 0x22
0x14 = readData ()
writeCommand (CH_CMD_RD_USB_DATA0) 0x27
readDataMultiple[12]: 0x12,0x01,0x00,0x02,0x00,0x00,0x00,0x40,0x81,0x07,0x51,0x51,0x00,0x02,0x01,0x02,0x03,0x01

Here is the communication with the CH376 when the USB floppy is connected:

writeCommand (CH_CMD_RESET_ALL) 0x05
writeCommand (CH_CMD_CHECK_EXIST) 0x06
writeData (0xbe)
0x41 = readData ()
writeCommand (CH_CMD_GET_IC_VER) 0x01
0x43 = readData ()
writeCommand (CH_CMD_SET_USB_MODE) 0x15
writeData (0x06)
0x51 = readData ()
writeCommand (CH_CMD_SET_USB_MODE) 0x15
writeData (0x07)
0x51 = readData ()
writeCommand (CH_CMD_SET_USB_MODE) 0x15
writeData (0x06)
0x51 = readData ()
writeCommand (UNKNOWN) 0x8b
writeData (0x25)
writeData (0xdf)
writeCommand (CH_CMD_SET_USB_ADDR) 0x13
writeData (0x00)
writeCommand (CH_CMD_GET_DESCR) 0x46
writeData (0x01)
writeCommand (CH_CMD_GET_STATUS) 0x22
0x51 = readData ()
writeCommand (CH_CMD_RD_USB_DATA0) 0x27
readDataMultiple[51]: 0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51
vipoo commented 1 year ago

Hi Cristiano,

I am sorry, i cant recall anything specific - other than lots of trial and errors

its been a while since i been able to play with this stuff - so memory is rather unhelpful - sorry

I also recall that some drives are different - I had to get a few different drives/usb thumb disks - and some work better than others.

Sorry i can be more helpful

On Wed, 10 May 2023 at 22:53, Cristiano Goncalves @.***> wrote:

@vipoo https://github.com/vipoo - I'm checking your code an performing a few tests so I can implement the USB floppy drives on the original MSXUSB project. I can successfully get the USB descriptors back when I have a USB thumb drive connected to the module, but every time I try to connect the USB floppy drive I can't get the interruption generated by the CH376. If I check status even without receiving the interruption it is always 0x51.

Did you use any trick to get descriptors from the USB floppy drives?

— Reply to this email directly, view it on GitHub https://github.com/vipoo/yellow-msx-series-for-rc2014/issues/6, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADIL7UYGPPDHGUH7D4MORTXFOFU7ANCNFSM6AAAAAAX4WNGLU . You are receiving this because you were mentioned.Message ID: @.***>

cristianoag commented 1 year ago

You got it. The issue is that some floppy drives are just not compatible with the ch376. I just got one that is working ok. Thanks Dean!

Get Outlook for iOShttps://aka.ms/o0ukef


From: Dean Netherton @.> Sent: Thursday, May 11, 2023 8:30:08 PM To: vipoo/yellow-msx-series-for-rc2014 @.> Cc: Cristiano Goncalves @.>; Author @.> Subject: Re: [vipoo/yellow-msx-series-for-rc2014] USBFDD (Issue #6)

Hi Cristiano,

I am sorry, i cant recall anything specific - other than lots of trial and errors

its been a while since i been able to play with this stuff - so memory is rather unhelpful - sorry

I also recall that some drives are different - I had to get a few different drives/usb thumb disks - and some work better than others.

Sorry i can be more helpful

On Wed, 10 May 2023 at 22:53, Cristiano Goncalves @.***> wrote:

@vipoo https://github.com/vipoo - I'm checking your code an performing a few tests so I can implement the USB floppy drives on the original MSXUSB project. I can successfully get the USB descriptors back when I have a USB thumb drive connected to the module, but every time I try to connect the USB floppy drive I can't get the interruption generated by the CH376. If I check status even without receiving the interruption it is always 0x51.

Did you use any trick to get descriptors from the USB floppy drives?

— Reply to this email directly, view it on GitHub https://github.com/vipoo/yellow-msx-series-for-rc2014/issues/6, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADIL7UYGPPDHGUH7D4MORTXFOFU7ANCNFSM6AAAAAAX4WNGLU . You are receiving this because you were mentioned.Message ID: @.***>

— Reply to this email directly, view it on GitHubhttps://github.com/vipoo/yellow-msx-series-for-rc2014/issues/6#issuecomment-1544827044, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ALSAPKXZF7UG2A2WFYE7PATXFVZABANCNFSM6AAAAAAX4WNGLU. You are receiving this because you authored the thread.Message ID: @.***>