What's new
Big thanks to @GeorgeSpinner for programming my trinket. I did a permanent install to the bottom of my 1C because it's only ever going to run the 161-in-1 cart. Wires are run to the 1P start and 1P button D, following the original example. 5v and GND are tapped off the vias near the JAMMA pins.
 

Attachments

  • PXL_20220407_210920351.jpg
    PXL_20220407_210920351.jpg
    308.7 KB · Views: 137
Big thanks to @GeorgeSpinner for programming my trinket. I did a permanent install to the bottom of my 1C because it's only ever going to run the 161-in-1 cart. Wires are run to the 1P start and 1P button D, following the original example. 5v and GND are tapped off the vias near the JAMMA pins.
You're welcome. I'm glad it worked out for you. Nice install.
 
Thanks @GeorgeSpinner ! My original Arthrimus mod just wasn't working anymore so I checked this thread and noticed your solution.
No fear of screen burn-in from the 161-in-1 basic menu if the cab was turned on and forgotten by the kids :)
 
Thanks @GeorgeSpinner ! My original Arthrimus mod just wasn't working anymore so I checked this thread and noticed your solution.
No fear of screen burn-in from the 161-in-1 basic menu if the cab was turned on and forgotten by the kids :)
You're welcome.

You got it working?
 
Yup, works great. I had a problem initially so i wanted a visual indictor if it was holding the start button or not, so I shifted the input from Pin1 to Pin2 and used the onboard indictor LED (believe it needs to act as Pin1?) to show when Start is being held down. Again, the fear of screen burnin with the standard 161-in-1 menu on my DinoKing cab is no more :D
Its a shame that there isn't an option in the UniBIOS to enable PICKnMIX by default.
 
Brilliant. Thank you so much @GeorgeSpinner.

Here's my install:

picknmix_fix_trinket_2_slot.jpg

I installed the Trinket on a spare 2-slot I had. I edited the sketch provided by GeorgeSpinner so that the Trinket only needs three wires. It's wired to Game Select Up as I have the motherboard set up in my Neo 29.

PICKnMIX is awesome, I love it.

I had to look up some things on how to prepare the Trinket, so I'm just going to add them below.

The bootloader on the Trinket needed to be replaced. You need an Arduino Uno to do this. Luckily I had one here that I had previously used for to program CPS keys. The instructions on how to wire the Trinket to your Uno are here:

https://learn.adafruit.com/introducing-trinket/repairing-bootloader

After you've replaced the bootloader, you can upload the PICKnMIX FIX sketch to the Trinket by installing drivers and then setting up the Arduino IDE. Instruction for this are here:

https://learn.adafruit.com/introducing-trinket/windows-setup
 
Brilliant. Thank you so much @GeorgeSpinner.

Here's my install:

picknmix_fix_trinket_2_slot.jpg

I installed the Trinket on a spare 2-slot I had. I edited the sketch provided by GeorgeSpinner so that the Trinket only needs three wires. It's wired to Game Select Up as I have the motherboard set up in my Neo 29.

PICKnMIX is awesome, I love it.

I had to look up some things on how to prepare the Trinket, so I'm just going to add them below.

The bootloader on the Trinket needed to be replaced. You need an Arduino Uno to do this. Luckily I had one here that I had previously used for to program CPS keys. The instructions on how to wire the Trinket to your Uno are here:

https://learn.adafruit.com/introducing-trinket/repairing-bootloader

After you've replaced the bootloader, you can upload the PICKnMIX FIX sketch to the Trinket by installing drivers and then setting up the Arduino IDE. Instruction for this are here:

https://learn.adafruit.com/introducing-trinket/windows-setup

Nice install!

I'm glad you like it.

The boot loader is the biggest pain in the ass for the project. I don't enjoy flashing them. I actually haven't done one in quite a while. Thanks for the write-up. I might need to use it for reference!
 
Brilliant. Thank you so much @GeorgeSpinner.

Here's my install:

picknmix_fix_trinket_2_slot.jpg

I installed the Trinket on a spare 2-slot I had. I edited the sketch provided by GeorgeSpinner so that the Trinket only needs three wires. It's wired to Game Select Up as I have the motherboard set up in my Neo 29.

PICKnMIX is awesome, I love it.

I had to look up some things on how to prepare the Trinket, so I'm just going to add them below.

The bootloader on the Trinket needed to be replaced. You need an Arduino Uno to do this. Luckily I had one here that I had previously used for to program CPS keys. The instructions on how to wire the Trinket to your Uno are here:

https://learn.adafruit.com/introducing-trinket/repairing-bootloader

After you've replaced the bootloader, you can upload the PICKnMIX FIX sketch to the Trinket by installing drivers and then setting up the Arduino IDE. Instruction for this are here:

https://learn.adafruit.com/introducing-trinket/windows-setup
Looks clean, seems straight forward. I plan on doing this.
 
Thanks for all the work here!

A few remarks:
- I'm surprised that PIN 1 has a reliable state (i.e. that digitalRead(PNW_DISABLE) will reliably return "HIGH" when not connected), since there doesn't seem to be a pull up resistor. I wonder if something is setting this PIN (which is the LED pin) with INPUT_PULLUP. It may still be worth setting explicitly
- To replace the bootloader, if you don't already own an Arduino Uno, it may be worth buying a dedicated ICSP programmer instead of using an Uno to replace the bootloader. I like the Pololu one at https://www.pololu.com/product/3172. It may make life easier
- Once you have an ICSP programmer, you don't even need a bootloader, you can directly flash the picknmix application, but a bootloader is convenient if one wants to be able to update later via the USB port instead of using the ICSP programmer.

I made a few modifications to this project, which you can find at https://github.com/semi-simple/Adafruit_Trinket_Mini_Auto_PICKnMIX
1. Most important: I moved the "sensing" pin to disable PickNMix from PIN 1 to PIN 2. This is because PIN1 is the LED pin and I wanted to use the LED
2. Whenever the trinket pulls pin 0 low (i.e. simulating pressing "start"), the LED is lit. I find it convenient for debugging etc
3. I added a ready-to-flash bootloader in prebuilt/. I'm using micronucleus, which I found to be convenient for me

If you like those modifications, use the GitHub repository above, or you can simply flash this pre-built via ICSP (or via a non-stock bootloader that boot immediately, itself flashed via ICSP): https://github.com/semi-simple/Adaf...o_PICKnMIX/raw/main/prebuilt/autopicknmix.hex

On an Tiny85 like this Trinket it is actually not technically necessary to have an ICSP programmer. It would be possible to make a "normal" program modify the bootloader. If there was a lot of demand, I would consider doing this, but it's a good bit of work.
 
Thanks for all the work here!

A few remarks:
- I'm surprised that PIN 1 has a reliable state (i.e. that digitalRead(PNW_DISABLE) will reliably return "HIGH" when not connected), since there doesn't seem to be a pull up resistor. I wonder if something is setting this PIN (which is the LED pin) with INPUT_PULLUP. It may still be worth setting explicitly
I have never had it not-work, myself; nor have I heard any reports that it didn't work.
 
Perhaps it is mostly tested while soldered to the Neo Geo (which will pull this line high) ? I saw this problem while testing it isolated and on its own (not ni a Neo Geo). Although I didn't try it on the LED pin (pin 1), it's possible that this pin is set up differently.
 
Also please let me know if you'd like me to make a pull request for these changes. They're more of a matter of taste than necessary, which is why I didn't ask before. I'm also happy to more clearly link to your original project in the README, for people who don't use GitHub much and don't see that this is a fork.
 
Perhaps it is mostly tested while soldered to the Neo Geo (which will pull this line high) ? I saw this problem while testing it isolated and on its own (not ni a Neo Geo). Although I didn't try it on the LED pin (pin 1), it's possible that this pin is set up differently.
The NEO GEO inputs all have pullup resistors on them.
 
Perhaps it is mostly tested while soldered to the Neo Geo (which will pull this line high) ? I saw this problem while testing it isolated and on its own (not ni a Neo Geo). Although I didn't try it on the LED pin (pin 1), it's possible that this pin is set up differently.
I only tested it while connected to an MVS.
It works.
 
Also please let me know if you'd like me to make a pull request for these changes. They're more of a matter of taste than necessary, which is why I didn't ask before. I'm also happy to more clearly link to your original project in the README, for people who don't use GitHub much and don't see that this is a fork.
I think just keeping it a separate fork is fine.

I didn't do the project for any type of credit (I don't even make a separate thread) so no need to link it.

Were you saying in your original post that you can program the bootloader using only the USB connection?
 
I think just keeping it a separate fork is fine.

I didn't do the project for any type of credit (I don't even make a separate thread) so no need to link it.

Were you saying in your original post that you can program the bootloader using only the USB connection?
Yes, I can update even the bootloader from USB. However I can so far only do that after I have transitioned the bootloader to micronucleus once (and then I can update the bootloader however I want).

It is possible to update the original Trinket purely via USB, without the use of an ICSP (because AVR Tiny85 don't have a separate protected boot section). But I have not written the code to do so, and it is a fair amount of work to do it.
I'm considering doing it, but it'll take me a while. I'm also not sure how useful and necessary it is: there might be alternatives to the trinket out there already (maybe the Trinket M0 ?) that don't have a bootloader delay.
 
Last edited:
Yes, I can update even the bootloader from USB. However I can so far only do that after I have transitioned the bootloader to micronucleus once (and then I can update the bootloader however I want).

It is possible to update the original Trinket purely via USB, without the use of an ICSP (because AVR Tiny85 don't have a separate protected boot section). But I have not written the code to do so, and it is a fair amount of work to do it.
I'm considering doing it, but it'll take me a while. I'm also not sure how useful and necessary it is: there might be alternatives to the trinket out there already (maybe the Trinket M0 ?) that don't have a bootloader delay.
I am not that familiar with these small project boards.

I didn't know what micronucleus was but after a search I think I understand.

I only ended up with the trinket because it uses the same chip that was used in the original project.

Since the original trinket is now deprecated, it probably doesn't make sense to spend too much time on it.

The trinket m0 looks promising and even supports Python.
 
Hi.
Great work here @GeorgeSpinner . May I ask would it be possible to run this on an arduino nano.
Thank you.
Thanks. I'm not familiar with the nano but I took a quick look at it. It seems like this project could be ported to it. It's not very complex.

I wrote a total of 1 program using the Arduino IDE and this is it. My experience with Arduino is 100% on the trinket (to my recollection).

I have a trinket m0 that I'm somewhat interested in porting to/testing out but I haven't found the motivation to do it.
 
Back
Top