Skip to content
This repository has been archived by the owner on Apr 11, 2023. It is now read-only.

Layout overhaul and initial splashscreen support #58

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

UntrustedRoot
Copy link

This PR add several new layouts and includes initial support for a splash screen.

This was originally planned as a smaller PR that spiralled out of control.

Let me know about anything you need changed, scrapped, or added. I could use a little bit of help testing these changes against different setups.

Problems with this PR

  • Nothing here has been tested with the WebUI. I only built using pico-fighting-board and tested on a breadboard.
  • This might break leds.cpp and led support. I'm not setup to test this at this time. See lines 203-205 in leds.cpp
  • This might not respect your current settings if you used the ARCADE layout before
  • I have no business codding in C++, and I thank you for allowing me to contribute 😄

Layouts changes

  • Split the layouts into two halves, allowing for mix-and-match button and stick layouts.
  • Renamed ARCADE layout to UDLR
  • Removed buttons from ARCADE, HITBOX, and WASDB. Created ARCADEB, HITBOXB, and WASDB from removed button layouts
  • Replaced ARCADE with an 'animated' arcade stick.
  • Added the following layouts:
    • MIXBOX: WASD, but with keyboard style buttons
    • MAME: Keyboard style layout. More of a cosmetic layout for the display. 6 buttons.
    • VEWLIX
    • CAPCOM
    • CAPCOM6: CAPCOM, but 6 buttons
    • SEGA2P
    • NOIR8

Layouts can be set using BUTTON_LAYOUT and BUTTON_LAYOUT_RIGHT in BoardConfig.h, check enums.h

Splash screen addition

  • Initial support, works but needs work
  • All splashes are hard coded to 7500ms
  • No WebUI support
  • Added the following splash modes:
    • STATICSPLASH: Display custom bitmap if it exists, GP2040 logo if it does not. Default to show off.
    • CLOSEIN: 'Animated' GP2040 logo
    • CLOSEINCUSTOM: CLOSEIN, but it shows the custom bitmap, if it exists.
    • NOSPLASH: No splash, no delay, all action.
  • Adds additional header file called bitmaps.h

Splash modes can be set using SPLASH_MODE in BoardConfig.h.

Renamed drawArcadeStick and BUTTON_LAYOUT_ARCADESTICK to drawUDLR and BUTTON_LAYOUT_UDLR. Replace ArcadeStick with a stick animation.

Initial work on splitting left and right sides of the display to avoid code reuse and allow additional button layouts.
Fixed a few things, added Capcom layout, broke button overlap.
Added Sega2p, fixed Vewlix, added Capcom6, renamed original layout to Noir8
framework for a splash screen has been added. I'm actually not really happy with this code, but a prototype is a prototype
Swapped out GFX for sprite, was reinventing the wheel,
Added a second boot logo-mode. You need to switch it on line 358 for now,
Added new (but not complete) layouts: Mixbox (WASD, but keys on an angle), MAME (WASD, but keys plus numpad style buttons), and DDR layout (for a future project of mine.)
Need to do a custom obd style function to finish Mixbox. Some out of git work is incoming as well to cleanup all the byte arrays that are stuck in display.cpp
Finished MixBox
Renamed DDR to Dancepad
Switched layouts to be A and B instead of L and R when names overlap
Yeah, I'm 100% going to use this firmware for a custom arcade quality DDR dance pad.
Finished right side of MAME layout.
Applied lessons learned from Dancepad layout to left side of MAME layout.
Brought back in the old button layouts. I misidentified them and they are unique.
Noir8 and Sega2p are similar, this was easy.
Added splash modes:
STATICIMAGE
CLOSEIN
CLOSEINCUSTOM
NOSPLASH
Added bitmaps.h for bitmaps
Pulled dancepad related code - it requires it's own fork.
Some small code cleanup.
Made sure sane defines are set and code compiles one last time.
@UntrustedRoot UntrustedRoot changed the title Layout overhaul and intial splashscreen support Layout overhaul and initial splashscreen support Feb 21, 2022
@UntrustedRoot
Copy link
Author

Just adding a few things I forgot to put in the PR post.

  • The Noir8 layout has an issue and is not correct. I will address this and push. The right half is higher then it should be. (I'll note that there are two versions of the Noir8 from what I've seen. Slagcoin makes it look like the Sega2p with a small change, but Focus Attack and BNB have additional differences that make it closer to a slanted Vewlix.)
  • The button side of the layouts all work, but need a cleanup. The start position includes a large amount of empty space to push the layouts over to the right. This is a holdover from when the layouts were not split and will need to be adjusted. This needs to be corrected as the layouts will not scale correctly as is. Ongoing work is being done on this.

The above issues are really cosmetic and do not affect the function of this PR. The second issue needs to be corrected before I can test against smaller and larger screens. Any testing on the PR as is would be appreciated as my setup doesn't reflect most GP2040 users.

Added Vewlix7 for anyone who is crazy enough to build that board.

Also added .gitignore so I'm not breaking your workspace.
@TheTrainGoes
Copy link

Hi @UntrustedRoot,

We are looking to keep the GP2040 project alive over on the Community Edition of GP2040: https://github.com/OpenStickFoundation/GP2040-CE

I tried to compile your changes but am getting an error on SPLASH_MODE.

Would love to chat further about this as your changes are fantastic!

@TheTrainGoes
Copy link

Update - Got it compiled. For those that might be looking at this there is no included BoardConfig.h so you will need to add something for SPLASH_MODE and BUTTON_LAYOUT_RIGHT into the normal PicoFightingBoard config file.

Example:

#define SPLASH_MODE CLOSEINCUSTOM
#define BUTTON_LAYOUT_RIGHT BUTTON_LAYOUT_ARCADEB

@UntrustedRoot
Copy link
Author

Hey @TheTrainGoes, I have a few issues with my PR I'd like to discuss, it's a lack of experience issue and I don't want to be a bother. I also have something else I'd like to talk to you about that I cannot put here (it's a secret. shhhhh....)

Do you mind if I PM you on Discord to discuss? I don't like just showing up in your PMs unannounced.

@TheTrainGoes
Copy link

Hey @UntrustedRoot , please do!

@TheTrainGoes
Copy link

Hey @UntrustedRoot not sure if you sent anything but I have not gotten a request on Discord. I am listed there as TheTrain#6755

@UntrustedRoot
Copy link
Author

I will be porting/rebuilding this PR for GP2040-CE over here: https://github.com/FBUFS/GP2040-CE/tree/oled-CE
GitHub doesn't let you fork a fork that you've forked before so I had to make an org to keep these side by side. Once the new PR is merged into GP2040-CE I'll nuke both forks and start fresh.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants