Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation adventures. #11

Open
issalig opened this issue Feb 8, 2022 · 13 comments
Open

Installation adventures. #11

issalig opened this issue Feb 8, 2022 · 13 comments

Comments

@issalig
Copy link

issalig commented Feb 8, 2022

I create this not to mix installation problems with other stuff.

@issalig
Copy link
Author

issalig commented Feb 8, 2022

@cristianoag It asks for a repository

$ sudo apt-get build-dep openmsx
Leyendo lista de paquetes... Hecho
E: Debe poner algún URI «deb-src» en su «sources.list»

@cristianoag
Copy link
Contributor

cristianoag commented Feb 8, 2022 via email

@issalig
Copy link
Author

issalig commented Feb 8, 2022

Well, I finally compiled S0urceror's OpenMSX , in my system I needed sudo apt-get install tcl-dev not libtclcl1-dev
I still have to setup download machine roms and more config stuff, but this will be tomorrow.
Thanks @cristianoag for your help.

@issalig
Copy link
Author

issalig commented Feb 9, 2022

Finally, I have everything working.
I started a document not to loose all the steps https://github.com/issalig/MSX-USB/blob/master/installation.md
It is still work in progress.

@issalig
Copy link
Author

issalig commented Feb 9, 2022

I found a bug while I was checking my ch376s with https://github.com/S0urceror/MSX-USB/blob/master/test/usb_via_arduino/src/main.parallel.cpp

main_paralell crashed when printing iProd due to a small buffer

printf (" iProduct\t\t\t%d\t%s\n",device->iProduct,get_string2 (device_address,device->iProduct).c_str());

In get_string2

uint8_t* data=(uint8_t*) malloc (max_packet_size);
data has size max_packet_size which is 64

But then in data_in_transfer, length is 255 and when being bzeroed it corrupts memory

bzero(result, length);

I fixed it by changing this line

uint8_t* data=(uint8_t*) malloc (max_packet_size);
to uint8_t* data=(uint8_t*) malloc (255)

Tell me if you are experiencing the same and I will propose a pull request.

@cristianoag
Copy link
Contributor

cristianoag commented Feb 9, 2022 via email

@issalig
Copy link
Author

issalig commented Feb 9, 2022

Yes, it is only to check wiring and if ch376s is responding and to get properties from the devices.

@S0urceror
Copy link
Owner

I found a bug while I was checking my ch376s with https://github.com/S0urceror/MSX-USB/blob/master/test/usb_via_arduino/src/main.parallel.cpp

Good catch. Never happened here because the USB strings are usually not so long. I have now changed the setup package to request maximum 64 bytes as well.

And pushed the change back to GitHub.

@S0urceror
Copy link
Owner

Finally, I have everything working.
I started a document not to loose all the steps https://github.com/issalig/MSX-USB/blob/master/installation.md
It is still work in progress.

Nice write up. Would you be okay to merge all your updated instructions with the main once you consider them finished?

@issalig
Copy link
Author

issalig commented Feb 9, 2022

Yes of course, that's the idea. I will tell you when It is finished. Also i wrote info about programming the cpld and the flash so everything is documented.

@issalig
Copy link
Author

issalig commented Feb 10, 2022

I had some problems with openMSX, for some reason it did not communicate with arduino.
I compared sources of main.parallel which works correctly and ch376s.cc in openMSX and the main difference is that it does not call tcgetattr, thus I removed tcgetattr from ch376s.cc and now it works good for me.

Have you experienced this behaviour?

https://github.com/S0urceror/openMSX/blob/dd40674cb36805b95b444d464765004d234c7d4e/src/usb/ch376s.cc#L38

@S0urceror
Copy link
Owner

S0urceror commented Feb 10, 2022 via email

@issalig
Copy link
Author

issalig commented Mar 23, 2022

I just write here as a reminder to change instructions (mainly paths and few other things) to make it work with recent @cristianoag linux support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants