S0urceror / MSX-USB

Schematics, drivers, debug tools, to make USB devices on the MSX a reality
GNU General Public License v2.0
65 stars 18 forks source link

Minified pcb (my build log) #2

Closed issalig closed 2 years ago

issalig commented 3 years ago

Hi, thanks for sharing the project. I am new to the MSX world and I am working on a minified pcb with plcc sockets and exposed headers for future developement (as soon as everything works I will update my fork). Board will be 5 cm high.

I have some doubts about the bill of materials, the cpld is epm7064 or epm7032? SLC44 or LC44? The memory could it be SST39SF040-70 or SST39SF040-55?

Maybe there is a BOM file and I did not find but it would be nice to have it also with some alternative components.

Thanks in advance

S0urceror commented 3 years ago

Hi Issalig,

Interesting project. Minified PCB. Let me know how it goes.

Regarding the BOM. I have generated one with KiCAD. You can find it enclosed.

The CPLD is a EPM7064 in a PLCC-44 housing. The flash you can use anyone that is compatible to the pins. Basically every flash that conforms to the JEDEC standard you can use. Only in programming the flash you have to use another routine. If you program in a separate programmer then this is not an issue.

Regards,

Mario

From: issalig @.> Date: Tuesday, 27 July 2021 at 19:19 To: S0urceror/MSX-USB @.> Cc: Subscribed @.***> Subject: [S0urceror/MSX-USB] Bill of materials (#2)

Hi, thanks for the project. I am new to the MSX world and I am working on a minified pcb.

I have some doubts about the bill of materials, the cpld is epm7064 or epm7032? The memory could it be SST39SF040?

Maybe there is a BOM file and I did not find but it would be nice to have it als owith some alternative components.

Thanks in advance

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/S0urceror/MSX-USB/issues/2, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABGC6KF6I4M6NPANRLLM2HLTZ3TCXANCNFSM5BCVUJOA.

issalig commented 3 years ago

Thanks for the quick answer, I am going to order the components now.

issalig commented 3 years ago

I have received the PCB but still some components are on their way. Looking fwd to test it all and hopefully without magic smoke :)

Once everything works I will upload the files to my fork.

IMG_20210813_125302

S0urceror commented 3 years ago

Nice. Congratulations on the design. Hope it all works fine.

Sent by phone


From: issalig @.> Sent: Friday, August 13, 2021 6:55:15 PM To: S0urceror/MSX-USB @.> Cc: S0urceror @.>; Comment @.> Subject: Re: [S0urceror/MSX-USB] Bill of materials (#2)

I have received the PCB but still some components are on their way. Looking fwd to test it all and hopefully without magic smoke :)

[IMG_20210813_125302]https://user-images.githubusercontent.com/7136948/129393504-bacc87d3-1c16-4001-8c5b-5266cc834abf.jpg

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/S0urceror/MSX-USB/issues/2#issuecomment-898595348, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABGC6KBA67WXLGB3BHIZLO3T4VE7HANCNFSM5BCVUJOA. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email.

issalig commented 3 years ago

I will use this issue for now as my building log.

I have all the components but I am totally lost, I suppose I have to program the CPLD and flash the memory but I can't find the proper files.

Is the memory file https://github.com/S0urceror/MSX-USB/blob/master/software/flash/dist/flash.com ? I think I can program it with tl866

And now the difficult part to me (never programmed a CPLD) I see you used Quartus software, is there an open source alternative? I have ordered this programmer that support MAX7000 series (hope it is ok) https://aliexpress.com/item/1005002674193901.html

As far as I guess, this is the file I have to write in the CPLD https://github.com/S0urceror/MSX-USB/blob/master/hardware/quartus/output_files/MSXUSB.pof and it could be done by command line $ quartus_pgm -m jtag -o "p;MSXUSB.pof"

Thanks in advance and sorry for so many questions.

S0urceror commented 3 years ago

Hi Issalig,

You have to do two things:

  1. Program the CPLD. For this you have to use Quartus. You can download a free version from Intel. Download the one (older version) that supports this chip. There is no open source version. You don’t have to build you can program the POF file. You do this by connecting the JTAG connector to an Altera compatible USB Blaster device. You can find cheap ones on eBay. Make sure you also connect 5v and GND to the PCB when you do this. Easiest to do this is to connect to the relevant pins of the CH376 connector.
  2. Program the Flash chip. You can use flash.com for this from inside the MSX and use the Nextor.rom file. You can also use an USB EPROM programmer for this.

Once this is done you should have a functioning cartridge and start Nextor and use USB devices. Let me know how it goes.

issalig commented 3 years ago

Thanks for the explanation. I am waiting for the programmer (let's hope it will be here in 2 weeks).

Looking fwd to explore the MSX world (which is new to me) and test my nice VG-8020

issalig commented 2 years ago

Programmer finally arrived. I got a dirty cheap one https://aliexpress.com/item/1005002674193901.html

I am using Ubuntu 20.04 and got quartus 13.0sp1 which is the last version supporting MAX7000 series from https://fpgasoftware.intel.com/13.0sp1/?edition=web&platform=linux

I tried directly and got this error ./quartus_pgm -m jtag -o "p;MSXUSB.pof" Error (213019): Can't scan JTAG chain. Error code 89.

That can be better diagnosed ./quartus_pgm --auto ... 1) USB-Blaster variant [3-1] Unable to lock chain (Insufficient port permissions) ..

So we need to add the needed rules to file /etc/udev/rules.d/37-usbblaster.rules

SUBSYSTEM=="usb", ATTRS{idVendor}=="09fb", ATTRS{idProduct}=="6001", GROUP="plugdev", MODE="0666", SYMLINK+="usbblaster" 

And then

sudo service udev restart 

Then the following error appear ./quartus_pgm -m jtag -o "p;./MSXUSB.pof" Error (213019): Can't scan JTAG chain. Error code 87.

So I had to power it externally from 5V because for some reason power from programmer was not enough (see this issue for similar problems https://github.com/drandyhaas/Haasoscope/issues/45 )

And now the programmer works! :)

./quartus_pgm -m jtag -o "p;./MSXUSB.pof" ... Info (209011): Successfully performed operation(s) ...

mario-smit-heroes commented 2 years ago

Hi Issalig,

Also have a simple programmer from AliExpress. Works good.

I don’t use the command line but use the Quartus UI.

Additional 5v is indeed necessary.

PS. I have some time later this week to check the command line examples you gave. I’ll tell you how that went.

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


From: issalig @.> Sent: Tuesday, September 21, 2021 8:44:03 PM To: S0urceror/MSX-USB @.> Cc: Mario Smit @.>; Comment @.> Subject: Re: [S0urceror/MSX-USB] Minified pcb (my build log) (#2)

Programmer finally arrived. I got a dirty cheap one https://aliexpress.com/item/1005002674193901.htmlhttps://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Faliexpress.com%2Fitem%2F1005002674193901.html&data=04%7C01%7Cmario.smit%40heroes.nl%7C6e6e423fd6a047b2a8ff08d97d2fc9af%7C192d7c931ae94fbd872c9e59ca31cffa%7C0%7C0%7C637678466469134266%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=zA22yyzbf9s%2FdpVNBA2Uv7EQni7dK9lI3vzJBUlJTDk%3D&reserved=0

I tried directly and got this error ./quartus_pgm -m jtag -o "p;MSXUSB.pof" Error (213019): Can't scan JTAG chain. Error code 89.

That can be better diagnosed ./quartus --auto ...

  1. USB-Blaster variant [3-1] Unable to lock chain (Insufficient port permissions) ..

So we need to add the needed rules to file /etc/udev/rules.d/37-usbblaster.rules

SUBSYSTEM=="usb", ATTRS{idVendor}=="09fb", ATTRS{idProduct}=="6001", GROUP="plugdev", MODE="0666", SYMLINK+="usbblaster"

And then

sudo service udev restart

Then the following error appear ./quartus_pgm -m jtag -o "p;./MSXUSB.pof" Error (213019): Can't scan JTAG chain. Error code 87.

So I had to power it externally from 5V because for some reason power from programmer was not enough (see this issue for similar problems drandyhaas/Haasoscope#45https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fdrandyhaas%2FHaasoscope%2Fissues%2F45&data=04%7C01%7Cmario.smit%40heroes.nl%7C6e6e423fd6a047b2a8ff08d97d2fc9af%7C192d7c931ae94fbd872c9e59ca31cffa%7C0%7C0%7C637678466469144239%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=QYAMdsNbhd8s9IQcXFm2XgFAJ3%2BhrbhgCekoU%2BZHyRw%3D&reserved=0 )

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FS0urceror%2FMSX-USB%2Fissues%2F2%23issuecomment-924272138&data=04%7C01%7Cmario.smit%40heroes.nl%7C6e6e423fd6a047b2a8ff08d97d2fc9af%7C192d7c931ae94fbd872c9e59ca31cffa%7C0%7C0%7C637678466469149193%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=cW%2FvueGX1wAcYnVhFGrxlpWHCr%2Fgpef8tu00LupE05M%3D&reserved=0, or unsubscribehttps://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAR73JKNOGVTYF7JK5NL6HGTUDDG7HANCNFSM5BCVUJOA&data=04%7C01%7Cmario.smit%40heroes.nl%7C6e6e423fd6a047b2a8ff08d97d2fc9af%7C192d7c931ae94fbd872c9e59ca31cffa%7C0%7C0%7C637678466469154159%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=lQQEp2q%2BWaR80TL4G31OIka2WMKkGQAAZXaK5tpJeRQ%3D&reserved=0. Triage notifications on the go with GitHub Mobile for iOShttps://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapps.apple.com%2Fapp%2Fapple-store%2Fid1477376905%3Fct%3Dnotification-email%26mt%3D8%26pt%3D524675&data=04%7C01%7Cmario.smit%40heroes.nl%7C6e6e423fd6a047b2a8ff08d97d2fc9af%7C192d7c931ae94fbd872c9e59ca31cffa%7C0%7C0%7C637678466469159151%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=OGZxRoitLqjm1fhR%2BqS52gwzHeg%2FdOtdFnXBKmGyk1o%3D&reserved=0 or Androidhttps://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fplay.google.com%2Fstore%2Fapps%2Fdetails%3Fid%3Dcom.github.android%26referrer%3Dutm_campaign%253Dnotification-email%2526utm_medium%253Demail%2526utm_source%253Dgithub&data=04%7C01%7Cmario.smit%40heroes.nl%7C6e6e423fd6a047b2a8ff08d97d2fc9af%7C192d7c931ae94fbd872c9e59ca31cffa%7C0%7C0%7C637678466469164131%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=Oen2Be618auFKOX6pMmD%2Fwcj6%2B9UNbXj78enOQ%2F9%2BLc%3D&reserved=0.

issalig commented 2 years ago

I copied NEXTOR.SYS and COMMAND2.COM from MSX-USB/software/dist but I am not sure what TXT_NEXTOR_DSK has to be. Also in the docs NEXTOR.DSK is mentioned to be on the flash drive but I cannot find it in the repository :(

After building the video cable, I can see that it boots :) Then, it appears +UNAPI initialised +MSXUSB cartridge found ................... (some points) and finally "No enough memory" appears.

SD Card is formatted as fat16 with a total of 256Mb

I will read in detail https://github.com/S0urceror/MSX-USB/tree/master/drivers/NextorUsbHost because probably I missed some step.

issalig commented 2 years ago

imagen

issalig commented 2 years ago

Thanks for the indications @S0urceror, after changing my USB reader, I am a little bit closer vlcsnap-2021-10-03-10h48m41s479 Then some random chars vlcsnap-2021-10-03-10h50m19s939 Then asks for date

But CALL USBFILES does not say anything my_photo-2

S0urceror commented 2 years ago

Hi Issalig, I guess we're almost there.

I see you're running it on an MSX1 computer. Which one is it? I believe Nextor will then run in MSX-DOS1 mode please put a MSXDOS.SYS and COMMAND.COM in the root of your USB device. Don't know where the characters are coming from. I am running it on my trusty MSX2 computer with a 128kb memory mapper.

I'll do a check on my modded OpenMSX connected to my MSXUSB test board and run the computer image you are having. This would then show the same results I guess.

The different CALL commands are not supported anymore. This was in FAT32 support mode only. In that mode you cannot work with USB hubs and other devices at the same time. The install.md still contained the old text. I have now updated that.

issalig commented 2 years ago

Yes, it is an MSX1 Philips VG8020

I have put MSXDOS.SYS and results seem the same. But the problem is I do not know how to list the USB contents :(

Thanks for your support, I am totally a noob in MSX world and I am discovering it thanks to MSXUXB :+1:

S0urceror commented 2 years ago

No problem. You can use the following standard commands in MSX Basic:

FILES lists the contents of the disk/folder LOAD (“filename”) load a Basic program BLOAD (“filename”) load a binary

more info here: https://www.msx.org/wiki/Category:Disk_BASIC

Of course these only work when the disk has been recognized and formatted correctly.

I’ll do a test as I described before later this evening CET. I’ll let you know how this goes.

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


From: issalig @.> Sent: Sunday, October 3, 2021 11:56:30 AM To: S0urceror/MSX-USB @.> Cc: S0urceror @.>; Mention @.> Subject: Re: [S0urceror/MSX-USB] Minified pcb (my build log) (#2)

Yes, it is an MSX1 Philips VG8020

I have put MSXDOS.SYS and results seem the same. But the problem is I do not know how to list the USB contents :(

Thanks for your support, I am totally a noob in MSX world and I am discovering it thanks to MSXUXB 👍

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/S0urceror/MSX-USB/issues/2#issuecomment-932900588, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABGC6KG7FOU3RNRLRGQO3J3UFASE5ANCNFSM5BCVUJOA. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

issalig commented 2 years ago

Thanks, FILES returns Disk I/O Errror

According to NEXTOR documentation "Trying to access an unsupported partition type in MSX-DOS 1 mode now throws a “Disk I/O error”.

BTW, I have a FAT16 partition of 155Mb because gparted does not let me make it smaller (i.e. 128Mb)

issalig commented 2 years ago

Tried with FAT12 and 16Mb that seems to be the supported format for nextor with MSX1 and 64kb but still not working :(

S0urceror commented 2 years ago

Issalig, I managed to emulate your machine with OpenMSX and my testboard. I made a screen capture.

First you see my emulated machine a Philips NMS8250 MSX2. There the MSXUSB board works. Then you see your machine the Philips VG8020/00. There you get something similar to your screenshots.

Check the recording here:

This does not solve it yet but I am now able to debug it and make it working. Once I have it working I'll report back to you.

S0urceror commented 2 years ago

Btw. this is FAT16 with COMMAND.COM and MSXDOS.SYS in the root of the usb stick. I'll try now with a FAT12 image. If it also doesn't work then it's in the driver. I'll let you know.

S0urceror commented 2 years ago

Okay, a MacOS FAT12 formatted USB also didn't work.

Then I did the following. I copied a 720KB disk images straight to the USB stick and tried again. ➜ sudo dd if=MSXDOS.DSK of=/dev/disk4 bs=512 1440+0 records in 1440+0 records out 737280 bytes transferred in 0.607898 secs (1212835 bytes/sec)

The result you see here.

It works!

So there is no problem with the hardware or driver. There is a problem with the disk layout not being MSX DOS 1.0 compatible. Now we can check what we can do about this.

issalig commented 2 years ago

I close this thread because I have a working pcb.

I have updated my fork https://github.com/issalig/MSX-USB with the gerbers of the minipcb and a DIY guide in the README.md file.

@S0urceror , feel free to include anything you want and again thanks for your project.