I am getting there:
It seems my version now needs the 'CMD_RESET_ALL' to get working properly. Now Nextor cannot get passed the HW init. @S0urcerer, is this something you can build in?
10 fora=oto255 20 out&H11,6 30 out&H10,a 40 b=inp(&H10)xor255 50 printhex$(a);" ";hex$(b) 60 if a=b then nexta else end
after issuing the reset all cmd the above BASIC program runs properly to the end.
I have connected to RESET signal of the MSX to the CH376S chip (inverted) my the reset is too short.
Hi Dubbylabby,
Thanks for sharing this. The Audio definition is probably taking too much bandwidth for our dear MSX. But the Midi definition is probably doable. I don't have a Midi USB device (yet) so I can't develop a driver for it now.
After completing the USB Host driver, USB HID Keyboard and lately the USB Ethernet driver (all UNAPI compatible) I am first focusing on doing USB Hub first. This way we can connect not just one but multiple devices behind a powered USB hub! Including MIDI when we get around that.
But if anyone in the meantime wants to develop a MIDI driver that would be great
Check out the HID Keyboard code, connect via UNAPI to the USB Host driver, and start responding to the specific MIDI control, interrupt and bulk endpoints.
Cheers...
Hi @S0urceror!
My knowledge about coding is very short (bad even at arduino so go figure...) but I will bring any source I can find and also I will pass this topic to my brother who is in the hardware side building things like ObsoNet and Omega Home Computers for the spanish community (and spanish based communities as we are documenting the most we can).
Thanks again for this amazing work. <3
BTW maybe this resource for usb host on teensy boards could be helpful (?)
I am amazed how quickly you pulled this together. Great PCB.
It seems my version now needs the 'CMD_RESET_ALL' to get working properly. Now Nextor cannot get passed the HW init. @S0urcerer, is this something you can build in?
My Nextor driver already does a RESET_ALL after first finding the CH376s with similar code like you use above. Do you mean that CMD_CHECK_EXISTS (06h) does not reply when not done a RESET_ALL (04h) first? I don't mind to turn these instructions around.
I do it straight away and put the binary on GitHub. Please tell me if that fixes things.
BTW, I am busy integrating both the low-level USB Host driver and the Nextor driver together in one ROM. Than you switch between both. This makes things much easier. If I have it done this Easter I promise to put in some Easter eggs
Also I put up a couple of disk images. Put them in the root of your USB flash drive and reboot with my Nextor ROM and it will automatically boot NEXTOR.DSK (128Mb) image. Note that you can have multiple FAT16 images on the FAT32 capable CH376s.
Thanks, just caught your changes on github while they where just 37mins old
Straight away installed the new rom version and voila, a lot better! Then inserted an other USB stick,..rebooted and ...'...NOT connected'. Could not get it to work again. So I check the code and it seems it is not doing the real HW Reset just jet :
; -------------------------------------- ; CH_RESET ; ; Clear the CH376 data buffer in case a reset was made ; while it was in the middle of a data transfer operation ; ; Input: none ; Output: none CH_RESET: ret ; ld b,64 ;_HW_RESET_CLEAR_DATA_BUF:
Can you add it? Thanks!
EDIT: After manually patching nextor.com so it will do the actual hw reset I get to '-Disk NOT connected'
progress!
Yes it was commented out before. Have made the corrections to do a proper reset.
Still a bit puzzled that we need to do a reset before actually being able to detect the device. The natural order is CH_CMD_CHECK_EXIST with OUT complement returned in subsequent IN, and then reset CH_CMD_RESET_ALL. Maybe it has to do with your reset circuitry.
The reset now messes with the rest of the initialisations. Have to work on this a bit more to get it stable. I'll update you shortly.
With the latest binaries the hw init always work, great!
Booting with inserted USB stick I get:
Starting CH376S driver +CH376s reset +CH376s connected +USB mode set +Disk connected -Disk NOT mounted
The '-Disk NOT mounted' message appears after a while. The led of the USB stick flashes.
Any way to debug this? The activity led stays on and the machine does not boot through to basic.
It is waiting on the mount interrupt. Maybe if you pull the usb stick out and back in and do a reset, not a hard boot.
I am working on a fix.