Showing posts with label Bluetooth. Show all posts
Showing posts with label Bluetooth. Show all posts

Saturday, May 23, 2026

Cardputer Game Station now has support for BLE controllers

 


The whole reason for my latest projects was to integrate and use controllers with Cardputer Game Station. It supports emulation of some of my favorite consoles and thus their games.

Firmware is also posted on M5Stack M5Burner
  • Atari 2600
  • Atari 7800
  • GameBoy
  • GameBoy Color
  • NES
I have some of the original consoles myself and a collection of games.  I enjoy playing these on the go! 

D-pad support is implemented, so use the d-pad on the Xbox controller.   Set your controller to pairing, and this version of Cardputer Game Station should pair with it.  Also works with other BLE (not Classic Bluetooth though) controllers.  I also have a cute little BLE controller I bought from AliExpress for cheap.

Note: Classic Bluetooth is not supported by ESP32-S3.  The newer ESP32's that have Bluetooth only do BLE.

Sunday, May 17, 2026

Gamepad Test

 


My goal is to play some games on ESP32 hardware.  One step to get there is create a test app to pair with existing game controllers.

Classic (not the newest) ESP32 boards support Bluetooth Classic and BLE.   ESP32-S3, C3, C6 for examples only support BLE.  ESP32-P4 doesn't support wireless directly at all, it uses a C6 as a wireless coprocessor.  Thus it's useful to see what controllers you can attach.

Instructions:
Auto binds to pairing device
gampad activity shows here
and see serial monitoring
for more devices & info

BLE HID Gamepad firmware for M5Stack MiniJoyC


It's not just another pretty face.  Time to get serious about retro gaming.  

Up, Left, Right, Down, Fire (M5) and second button (click joystick).  Not just a d-pad.  Is also mirrored as xpot, ypot, so can do paddle games, or analog joystick games.

Go play some games!

Link: github.com/davervw/m5_minijoystickc_gamepad

Also posted on M5Stack M5Burner

Tuesday, April 28, 2026

BLE GamePad for Cardputer-Game-Station-Emulators

There's a new game in town.  And by new, I mean old.  Name that game and controller.

Link: https://github.com/davervw/ble_gamepad_KanoPixelKit


Update (23 May 2026): The original firmware was custom BLE driver.  The new firmware is standard BLE driver so works with Windows, Android, etc.

Friday, June 30, 2023

Extremely small emulated C64 and C128

 


This "portable" Commodore 64 and 128 emulator (m5 source code branch) is my work in progress, one in a series of minimalist emulators ported to different hardware targets. Only text (on LCD) with background, foreground, border colors, keyboard entry via USB serial tethered web browser, and general 6502/6510 and C64 memory management emulation is present (no, won't play games, make sound, or do bitmapped graphics) with some D64 emulation [added 7/2/2023].

(Update 7/28/2023) Now with GO 128 command.

GO 128 command


Even my son asked, "Why do you need to do that?"  Well, he has a point.  I wanted a C64 that fit in my pocket or even on my wrist.  And targeting new hardware platforms with my emulator is part of my hobby.

How does it work?  Check out my highly technical drawing.

Now I already here you asking why I didn't connect Bluetooth to the M5Core, because certainly it has Bluetooth as well, and why didn't I use a USB keyboard connected to CoreS3, because it includes USB Host.  But I've had trouble tracking down examples of HID Host examples for M5; client examples are prevalent, but host?

Pictured here is a phone is running Chrome with a custom copy of the html/javascript keyboard adapter including web-serial-polyfill because mobile Chrome doesn't directly include Serial API support.  A Palm Pilot foldable keyboard has a Bluetooth adapter, paired with the phone.   HID keystrokes are captured by the web page, converted to C64 key scan codes, and a list of the active key scan codes (or 64 when keys released) is sent over USB Serial to the M5Core device which is running the C64 ROMs which are tricked into thinking a real keyboard is attached; keystrokes are processed by the C64 KERNAL IRQ as normal.

The M5Core is being powered by the phone.   Why M5Core?  Because it's a polished packaged solution.

Yeah, we could just run a Commodore 64 emulator on the phone, but this way, I could have complete control over the keyboard emulation, what keys are present, how CTRL and Commodore keys work, etc.  And it's just because I can, not because I should.

Why the Palm Keyboard?  Because it folds in my pocket!  And because I had one from back in the day.  Any keyboard you can attach to a phone or computer should work.  And this Bluetooth adapter just makes it so cool, and easier than a tethered keyboard.

The next step is to merge this solution with my Commodore 128 keyboard adapter to completely reject the portability feature.   That would look really cool hooked up to my phone!  Update (7/31/2023): check out YouTube for connection from ItsyBitsy/keyboard to Core Port.A.


C128 Keyboard Adapter Breadboarded Prototype


7/23/2023: PCB prototype keyboard adapter w/ ItsyBitsy

I am excited about my nonsense crazy adventures. Even if only I enjoy them.

=====

Update (7/2/2023): D64 support is currently working with Core2 only (Basic Core doesn't usually have the additional SPI RAM, but not yet sure why CoreS3 is failing to attach SD).

Update (7/3/2023): Got CoreS3 working with SD switching header to M5Unified.h for that target (was M5Cores3.h) and adding special definition, override logic for SD_CS to use GPIO_NUM_4 instead of default.  See updates to M5Core.h.

Update (7/28/2023): Commodore 128D extended keyboard working with UART connection to Port.A of Core, and Commodore 128 emulation is ported as well.

=====