randyrossi / bmc64

A bare metal Commodore 64 emulator for the Raspberry Pi with true 50hz/60hz smooth scrolling, low input latency and better audio/video sync.
GNU General Public License v3.0
473 stars 56 forks source link

No userport activity on GPIO pins? #203

Closed 1980alexGS closed 2 years ago

1980alexGS commented 2 years ago

I cannot measure any activity on the GPIO pins, e.g. GPIO4, when I expect there to be. I am using v3.6. I have a C64 program that I know activates userport outputs correctly (have tested on my real C64c) I have an interface connected to the GPIO pins and they activate when tested using Python/GPIOzero I have added the line gpio_outputs_enabled=true to the cmdline.txt file as instructed by README.md. I note the text file advises that entries should not be placed there but instead in machines.txt under the correct heading; I have done so and ensured that machine is active. I have set the GPIO config to 4 in the F12 menu within the emulated environment. I note the description of 4 is N/A. Does that mean 'not available' or somehow not applicable to my hardware? I am using Pi 3B+.

I wanted to test an older version (3.4?) but could not find how to download the image/zip. I cannot test 3.7 as I get no display output from it.

Please test that userport output is working correctly in v3.6?

Thanks

randyrossi commented 2 years ago

It sounds like you've done everything correct. I haven't tried the user port feature in a while so I'll have to try it myself.

You should be able to download 3.4 here:

https://accentual.com/bmc64/downloads/bmc64-3.4.files.zip https://accentual.com/bmc64/downloads/bmc64-3.4.img.zip

Let me know if it starts working on that version and I will try to find out where things went wrong.

On Sun, Dec 12, 2021 at 5:13 AM 1980alexGS @.***> wrote:

I cannot measure any activity on the GPIO pins, e.g. GPIO4, when I expect there to be. I am using v3.6. I have a C64 program that I know activates userport outputs correctly (have tested on my real C64c) I have an interface connected to the GPIO pins and they activate when tested using Python/GPIOzero I have added the line gpio_outputs_enabled=true to the cmdline.txt file as instructed by README.md. I note the text file advises that entries should not be placed there but instead in machines.txt under the correct heading; I have done so and ensured that machine is active. I have set the GPIO config to 4 in the F12 menu within the emulated environment. I note the description of 4 is N/A. Does that mean 'not available' or somehow not applicable to my hardware? I am using Pi 3B+.

I wanted to test an older version (3.4?) but could not find how to download the image/zip. I cannot test 3.7 as I get no display output from it.

Please test that userport output is working correctly in v3.6?

Thanks

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/randyrossi/bmc64/issues/203, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAI3HKDEL6IW3AURMQFGLWLUQRYVFANCNFSM5J4CTGEQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

-- Randy Rossi

randyrossi commented 2 years ago

Actually, after re-reading your report, the GPIO config menu should be saying '#4 (Userport+Joy)' not N/A.

If it says 'N/A', that means it thinks gpio_outputs_enabled is still false. Double check it actually shows up in config.txt. If you only add it to machines.txt, it won't show up until the next switch to that machine. So try switching to something different, then switch back. Then verify it shows up in config.txt.

On Mon, Dec 13, 2021 at 10:09 AM Randy Rossi @.***> wrote:

It sounds like you've done everything correct. I haven't tried the user port feature in a while so I'll have to try it myself.

You should be able to download 3.4 here:

https://accentual.com/bmc64/downloads/bmc64-3.4.files.zip https://accentual.com/bmc64/downloads/bmc64-3.4.img.zip

Let me know if it starts working on that version and I will try to find out where things went wrong.

On Sun, Dec 12, 2021 at 5:13 AM 1980alexGS @.***> wrote:

I cannot measure any activity on the GPIO pins, e.g. GPIO4, when I expect there to be. I am using v3.6. I have a C64 program that I know activates userport outputs correctly (have tested on my real C64c) I have an interface connected to the GPIO pins and they activate when tested using Python/GPIOzero I have added the line gpio_outputs_enabled=true to the cmdline.txt file as instructed by README.md. I note the text file advises that entries should not be placed there but instead in machines.txt under the correct heading; I have done so and ensured that machine is active. I have set the GPIO config to 4 in the F12 menu within the emulated environment. I note the description of 4 is N/A. Does that mean 'not available' or somehow not applicable to my hardware? I am using Pi 3B+.

I wanted to test an older version (3.4?) but could not find how to download the image/zip. I cannot test 3.7 as I get no display output from it.

Please test that userport output is working correctly in v3.6?

Thanks

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/randyrossi/bmc64/issues/203, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAI3HKDEL6IW3AURMQFGLWLUQRYVFANCNFSM5J4CTGEQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

-- Randy Rossi

  • "There are only two things that are hard about computer science; Naming things, Cache Invalidation, and Off-by-one errors."

-- Randy Rossi

1980alexGS commented 2 years ago

Thank you very much for this information - it is especially helpful to know the meaning of N/A.

Before seeing your response, I managed to download 3.5 by using The Wayback Machine, and I was delighted when the user port worked for me in that version (#4 being Userport/Joy, not N/A). I shall now test the other versions again and report back. I’ve been adding to cmdline.txt.

Disregard my mention of 3.7 display output not working for me as I think that was a faulty SD card… no other version works on that card either, even though the files are all there :)

1980alexGS commented 2 years ago

Thanks, Randy… This has turned out to be user error on my part - I’m embarrassed and really sorry to have wasted your time.

I had been adding the line gpio_outputs_enabled=true after the other lines in cmdline.txt. It turns out if I put it as the first line, it works in all versions I’ve tested (3.4, 3.5, 3.6, 3.7). So easy, I’m sorry that it tripped me up for long enough to ask if there was something wrong. Also, it was much easier to know when it was working once I realised that ‘#4 N/A’ meant that it wasn’t enabled.

Thank you for all your great work. I will be running an old piece of software that controls the user port - once I have that working, I will certainly remember to support you on Patreon.

Kind regards from New Zealand -Alex