32blit / 32blit-sdk

32blit SDK
https://32blit.com
MIT License
197 stars 69 forks source link

PicoVision #829

Closed Daft-Freak closed 1 year ago

Daft-Freak commented 1 year ago

Opening this to keep track of things now that the dependencies have been merged. Most things are at least working at this point. The biggest limitation is that screen.data is null, so anything that directly reads/writes screen data is going to be broken. (The recently added get_pixel helps with reading a little)

Potential breakages:

PicoVision-specific unfinished-ness:

I also have plans to allow more screen modes (and 640x480 without recompiling). That shouldn't involve huge changes though... and I need to add some way to write a bunch of raw data to I can port DaftBoy (if only blits from 16-bit formats were supported. Not sure I want to add a format that's only supported as a blit source on one device...)

Daft-Freak commented 1 year ago

Now with less breakage to other things and actually compiles before the end! (Now I just need to fix audio and maybe make it not depend on core1... for uh, reasons)

Daft-Freak commented 1 year ago

Just need to merge the screen and audio PRs and rebase then this should be safe.

Gadgetoid commented 1 year ago

I think Mike has rained on your parade a little by adding vertical scrolling and changing the number of available scroll whatsits, but I guess in principle you can just target whatever prior version of the pico-stick driver since you don't use fancy stuff anyway?

Daft-Freak commented 1 year ago

The unfancy-ness should mean it's not too hard to fix hopefully. Though this does make me wonder if I should make it automatically grab the picovision repo to simplify setup :thinking:

Need to do a rebase/tidy tomorrow (probably) anyway...

Gadgetoid commented 1 year ago

Ugh that reminds me I need to get Mike to fix permissions on the pico-stick repo so releases can upload! Or maybe I can...

Gadgetoid commented 1 year ago

Just in case it's useful: I have added a new release for pico-stick, which includes both normal and widescreen firmware headers and elf files: https://github.com/MichaelBell/pico-stick/releases/tag/v0.1.0

Daft-Freak commented 1 year ago

Might decide to copy the relevant drivers instead of the dependency... but probably not right now. :thinking:

Anyway this should have no risk of affecting anything else now, so un-drafted. Also, claiming a more accurate format... it uh, may be named differently to the official code though...

Daft-Freak commented 1 year ago

Now with more blend/blit fixes/improvements for https://github.com/Daft-Freak/Pico3D/tree/picovision (Also need the "special blit" patch for DaftBoy)

Gadgetoid commented 1 year ago

Are there .blit builds for PicoVision anywhere, or was that too borken?

Gadgetoid commented 1 year ago

Patch for Geometry to support the 8bitdo Zero 2 (ie: re-enabled and tweaked joystick support that totally doesn't allow 32blit users to press the dpad and joystick at the same time noooo)-

diff --git a/examples/geometry/geometry.cpp b/examples/geometry/geometry.cpp
index 970dc8e..7178619 100644
--- a/examples/geometry/geometry.cpp
+++ b/examples/geometry/geometry.cpp
@@ -415,12 +415,12 @@ void update(uint32_t time) {

     if (pressed(Button::DPAD_LEFT))  { player1.rotational_velocity += rotation_speed; }
     if (pressed(Button::DPAD_RIGHT)) { player1.rotational_velocity -= rotation_speed; }
-    //player1.rotational_velocity -= joystick.x * pi / 720;
+    player1.rotational_velocity -= joystick.x * pi / 1440;

     if(player1.energy >= MOVEMENT_COST) {
         if (pressed(Button::DPAD_UP))    { movement.y -= 0.03f; }
         if (pressed(Button::DPAD_DOWN))  { movement.y += 0.03f; }
-        //movement.y += joystick.y / 10.0f;
+        movement.y += joystick.y / 40.0f;

         if(pressed(Button::DPAD_UP) || pressed(Button::DPAD_DOWN)) {
             player1.energy -= MOVEMENT_COST;
Daft-Freak commented 1 year ago

Are there .blit builds for PicoVision anywhere, or was that too borken?

Should still be over here: https://github.com/Daft-Freak/32blit-beta/tree/picovision-and-everything-else (if I didn't break it). It's stuck behind an uh, somewhat large API refactor...

Patch for Geometry to support the 8bitdo Zero 2 (ie: re-enabled and tweaked joystick support that totally doesn't allow 32blit users to press the dpad and joystick at the same time noooo)-

... or press Up + Select for 5 seconds (Left + Select to undo, super-well-documented feature :laughing:)

Gadgetoid commented 1 year ago

... or press Up + Select for 5 seconds (Left + Select to undo, super-well-documented feature 😆)

Wait is this a feature of the controller or the build? :laughing:

Daft-Freak commented 1 year ago

The controller, it's hidden in the FAQs. (Can also map to the right stick, not that that is useful here)

Of course, I found that detail after writing a bunch of code to remap...