Button Suggestions for Mounting Inside Cartridge?

General GBZ-related chat goes here. Share ideas, tips and tricks, or ask questions that don't fit into the hardware/software help forums.
User avatar
RxBrad
Posts: 278
Joined: Fri Jul 22, 2016 9:10 am
Has thanked: 125 times
Been thanked: 160 times
Contact:

Button Suggestions for Mounting Inside Cartridge?

Post by RxBrad » Sat Jun 01, 2019 2:17 pm

Wondering if anyone has suggestions for buttons that could be mounted inside a Gameboy cartridge? The typical tactile buttons + hats are too big to fit in the cartridge slot, even with fairly major plastic removal. Even the plain buttons have slightly too wide of a housing (6x6mm).

Anyhow, what I'm saying is that my well-laid-out plans for hotkey, battery monitor, and screen dim/bright buttons were apparently not as well-thought-out as they could've been.
SpoilerShow
Image

Image
Image
Image Image


User avatar
RxBrad
Posts: 278
Joined: Fri Jul 22, 2016 9:10 am
Has thanked: 125 times
Been thanked: 160 times
Contact:

Re: Button Suggestions for Mounting Inside Cartridge?

Post by RxBrad » Sat Jun 01, 2019 6:32 pm

infinitLoop wrote:
Sat Jun 01, 2019 6:17 pm
i just ordered some of these to try to use for digital volume + hotkey. maybe it would fit in there. it would only be three functions though.

https://www.sparkfun.com/products/8184

i think this is its spec:

https://www.electrokit.com/uploads/prod ... S-1305.pdf
That's actually pretty cool... Woof on that shipping, though ($9 for a $1.50 part). Gonna either need to find some more stuff to order, or find me another source. (Or just suck it up and pay.)

Perhaps I could configure long-press on the hotkey to toggle the battery monitor, and then this would do everything I need. I need to test and see if GPIOs that are already mapped by Retrogame can also toggle the battery monitor in MintyShutdown.py.

EDIT: Snagged one off Amazon..

Uxcell a15050500ux0507 3 Pin 5 Way Momentary Push Button SMD SMT Mini Tactile Switch https://www.amazon.com/dp/B0147XLUVS
Image
Image Image

User avatar
infinitLoop
Posts: 536
Joined: Mon Dec 24, 2018 11:46 am
Location: Portland, OR
Has thanked: 222 times
Been thanked: 199 times
Contact:

Re: Button Suggestions for Mounting Inside Cartridge?

Post by infinitLoop » Sat Jun 01, 2019 9:25 pm

RxBrad wrote:
Sat Jun 01, 2019 6:32 pm

That's actually pretty cool... Woof on that shipping, though ($9 for a $1.50 part). Gonna either need to find some more stuff to order, or find me another source. (Or just suck it up and pay.)

Perhaps I could configure long-press on the hotkey to toggle the battery monitor, and then this would do everything I need. I need to test and see if GPIOs that are already mapped by Retrogame can also toggle the battery monitor in MintyShutdown.py.

EDIT: Snagged one off Amazon..

Uxcell a15050500ux0507 3 Pin 5 Way Momentary Push Button SMD SMT Mini Tactile Switch https://www.amazon.com/dp/B0147XLUVS
nice. yeah, you should be able to. i'll map the input to "h" key a lot of times and still have that do the battery monitor, but i do end up toggling it on and off a lot more when i'm hotkey-ing

User avatar
RxBrad
Posts: 278
Joined: Fri Jul 22, 2016 9:10 am
Has thanked: 125 times
Been thanked: 160 times
Contact:

Re: Button Suggestions for Mounting Inside Cartridge?

Post by RxBrad » Fri Jun 14, 2019 3:14 pm

FYI.. That rocker switch worked pretty well. I ended up using one of the hatted tact switches on top of the shell for the hotkey.
SpoilerShow
Image
Image
Image Image

User avatar
RxBrad
Posts: 278
Joined: Fri Jul 22, 2016 9:10 am
Has thanked: 125 times
Been thanked: 160 times
Contact:

Re: Button Suggestions for Mounting Inside Cartridge?

Post by RxBrad » Sun Jun 16, 2019 1:46 pm

I will note that using the Pi-based solution for dimming the screen on a Gearbest composite LCD resulted in some really significant slowdown in game emulation. Also, there's a fair amount of ground-loop noise when dimming the screen that way. A lot of games are downright unplayable when the PIGPIOD daemon is running in the background, but run perfect if the daemon & dimming program are not running.

Castlevania: Dracula X is a favorite game of mine, and is my go-to when testing SNES game emulation speed. Basically, when the first level starts, if running the PIGPIOD daemon, (via "sudo pigpiod &" in rc.local) everything just slows down to a crawl. MintyBatteryMonitor also cause a bit of annoying slowdown, but nowhere near what PIGPIOD does.

What I'm trying to get at is: now I get to mess around with the ATTiny solution for dimming the Gearbest screen. I have a couple ATTiny13a's & and an Arduino Uno on the way (I probably could've programmed the ATTiny with one of the Leonardo Pro Micros I have sitting around, but looking around online, that sounds like it could be a chore to get working).
Image
Image Image

User avatar
infinitLoop
Posts: 536
Joined: Mon Dec 24, 2018 11:46 am
Location: Portland, OR
Has thanked: 222 times
Been thanked: 199 times
Contact:

Re: Button Suggestions for Mounting Inside Cartridge?

Post by infinitLoop » Mon Jun 17, 2019 7:42 am

RxBrad wrote:
Sun Jun 16, 2019 1:46 pm
I will note that using the Pi-based solution for dimming the screen on a Gearbest composite LCD resulted in some really significant slowdown in game emulation. Also, there's a fair amount of ground-loop noise when dimming the screen that way. A lot of games are downright unplayable when the PIGPIOD daemon is running in the background, but run perfect if the daemon & dimming program are not running.

Castlevania: Dracula X is a favorite game of mine, and is my go-to when testing SNES game emulation speed. Basically, when the first level starts, if running the PIGPIOD daemon, (via "sudo pigpiod &" in rc.local) everything just slows down to a crawl. MintyBatteryMonitor also cause a bit of annoying slowdown, but nowhere near what PIGPIOD does.

What I'm trying to get at is: now I get to mess around with the ATTiny solution for dimming the Gearbest screen. I have a couple ATTiny13a's & and an Arduino Uno on the way (I probably could've programmed the ATTiny with one of the Leonardo Pro Micros I have sitting around, but looking around online, that sounds like it could be a chore to get working).
that's good info. i messed around with that dimming hack once, but decided not to incorporate it into the build since i couldn't figure out a good spot to put the buttons. i didn't leave it in there long enough to test performance though.

so, you also see slowdown with the minty battery monitor running? i haven't tested that much on/off, but dracula x is one of my quick test games too, and i frequently see a stutter in there. if the battery monitor is causing some of that, maybe i should switch to something else for that. like just a hardware low-battery indicator light or something.

User avatar
RxBrad
Posts: 278
Joined: Fri Jul 22, 2016 9:10 am
Has thanked: 125 times
Been thanked: 160 times
Contact:

Re: Button Suggestions for Mounting Inside Cartridge?

Post by RxBrad » Mon Jun 17, 2019 12:01 pm

I did just notice a bug in the Mintybatterymonitor script that would cause pngview to constantly keep reloading the battery icon when it didn't need to.

Line 31 of MintyBatteryMonitor.py:

Code: Select all

iconsState = percent
should be:

Code: Select all

iconState = percent
Can't test it at the moment, but it might help some of the slowdown from that script. I did a pull request on the change.

EDIT: HoolyHoo merged it into the main branch.

EDIT 2: Looking a little closer at the code, while the above line is technically a bug, I don't think it would ever actually surface due to the "status" if/then logic that triggers whether "changeicon" is even called.
Image
Image Image

User avatar
RxBrad
Posts: 278
Joined: Fri Jul 22, 2016 9:10 am
Has thanked: 125 times
Been thanked: 160 times
Contact:

Re: Button Suggestions for Mounting Inside Cartridge?

Post by RxBrad » Fri Jul 05, 2019 2:50 pm

I finally got my ATTINY13A dimmer working. It was a definite learning experience. I kept having to find creative ways to shrink the code to fit the 1KB memory on the chip. I also learned about things like decoupling capacitors and that math when coding in C is weird.

https://youtu.be/p1sUsCvlENE

There's a link the the Arduino code in my GitHub on the video description. I'll post more detailed instructions for getting it up and running when I get a chance.

I'm pretty happy with how it turned out.
Image
Image Image

User avatar
RxBrad
Posts: 278
Joined: Fri Jul 22, 2016 9:10 am
Has thanked: 125 times
Been thanked: 160 times
Contact:

Re: Button Suggestions for Mounting Inside Cartridge?

Post by RxBrad » Thu Jul 11, 2019 4:40 am

Heh.. someone asked me to record the PWM dimming in slow motion. It's kind of neat. A lot like when you tried recording old CRT televisions.

https://i.imgur.com/ZIpzUxo.gifv

Luckily, you don't notice the flickering in real life (at least I don't). Though it's at 146Hz, so there's a small possibility some people -- more likely some people's dogs -- might notice it.
Image
Image Image

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest