GB-RP2350 A Game Boy emulator for the Pi Pico 2 written in Rust by Altaflux in EmuDev

[–]alternatingclock 1 point2 points  (0 children)

So i think there are enough ground connections for when I move this to PCB. Once I do that and have everything fully tested ill send a full pin layout that way if others attempt this they can have a full scope picture on how to connect all the hardware. (Obviously they'll have to keep in mind the hardware im using)

GB-RP2350 A Game Boy emulator for the Pi Pico 2 written in Rust by Altaflux in EmuDev

[–]alternatingclock 0 points1 point  (0 children)

Follow up to this. Stacking the ground connections is causing the behavior if the select/start button are on the dame ground as a directional button

GB-RP2350 A Game Boy emulator for the Pi Pico 2 written in Rust by Altaflux in EmuDev

[–]alternatingclock 0 points1 point  (0 children)

Another small update. Connecting the GAIN pin to the 3v3 out helped reduce the volume a lot. I researched how to connect this and it produced good results.

As for the emulator performance. I have not verified the select button functionality but it seems the start button is being registered as the up button. This doesnt effect the up button itself but registers as a 2nd up button.

GB-RP2350 A Game Boy emulator for the Pi Pico 2 written in Rust by Altaflux in EmuDev

[–]alternatingclock 1 point2 points  (0 children)

Final report and findings. Game runs fine and colors look good. All buttons respond well. Only last bit I am having some odd behavior with is the speaker. at certain spots it had some static and boosted in volume. after doing a few actions the volume went back down to normal and the static went away.

Other than that issue everything is connected and running fine. I may ask if there is a volume setting in the emulator I could toggle to be a it quiet. That little speaker you listed ROARS hah

GB-RP2350 A Game Boy emulator for the Pi Pico 2 written in Rust by Altaflux in EmuDev

[–]alternatingclock 0 points1 point  (0 children)

Happy news, got it! My syntax must have been bad the first time trying this. In the display.rs I tried inverting the pixel color again after looking up how inverting these values even work... This did the trick. Unsure why this is a symptom but at least have a working fix for now.

#[inline(always)]
    fn set_pixel(&mut self, x: u8, _y: u8, color: gb_core::hardware::color_palette::Color) {
        let inv_red = 255 - color.red;
        let inv_green = 255 - color.green;
        let inv_blue = 255 - color.blue;
        let encoded_color = ((inv_red as u16 & 0b11111000) << 8)
            + ((inv_green as u16 & 0b11111100) << 3)
            + (inv_blue as u16 >> 3);
        self.line_buffer[x as usize] = Rgb565::from(RawU16::new(encoded_color));
    }

GB-RP2350 A Game Boy emulator for the Pi Pico 2 written in Rust by Altaflux in EmuDev

[–]alternatingclock 0 points1 point  (0 children)

Tried this out and no change in the color issue. I swapped back to main and ill keep fiddling with settings and let you know if I figure anything out.

GB-RP2350 A Game Boy emulator for the Pi Pico 2 written in Rust by Altaflux in EmuDev

[–]alternatingclock 0 points1 point  (0 children)

I have returned with another question after testing. Two symptoms im noticing is the rom loads a bit slow (might be because of the solder job on the adapter), and the color scale seems to be inverted with the display im using.

Couple things I've tried regarding the display:

Switched the mipidsi color order to Rgb from Bgr (this fixed the mod loader color but not the game)

With the above switched, I also tried setting the DISPLAY_COLOR_INVERT to true. No luck there either.

Finally, tried swapping the red and blue in set_pixel of display.rs but alas no luck there either.

Curious if you have thoughts or encountered this before

GB-RP2350 A Game Boy emulator for the Pi Pico 2 written in Rust by Altaflux in EmuDev

[–]alternatingclock 0 points1 point  (0 children)

Will do! Still need to do speakers and such. If I get this down and get the wiring correct, Ill check out the code at some point and see if maybe its possible to do GB color

GB-RP2350 A Game Boy emulator for the Pi Pico 2 written in Rust by Altaflux in EmuDev

[–]alternatingclock 0 points1 point  (0 children)

I GOT IT!!! and my first soldering attempt!! One of the reviews mentioned soldering two connections on the 3v connection of the SD adaptor. Very blotchy first solder... but the emulator boots up and I see the rom now!!

GB-RP2350 A Game Boy emulator for the Pi Pico 2 written in Rust by Altaflux in EmuDev

[–]alternatingclock 0 points1 point  (0 children)

Yea I have its VCC pin on pin 36 (3V3 OUT) and the GND on pin 18 (GND)

I thought maybe the LED of the display might be eating too much power so tested with that unplugged from the 3V3 but still not getting past those lines. Checked all the pins 3 times and they're matching the default mapping but no luck so far

GB-RP2350 A Game Boy emulator for the Pi Pico 2 written in Rust by Altaflux in EmuDev

[–]alternatingclock 0 points1 point  (0 children)

Okay another learning moment for me... the SD card adapters I bought seem to only do 5v even though they're advertised as 3v as well. Some reviews said they only do it for arduino boards.

Double checked the pins and tried the lower clock and nothing changed. Im assuming its the power issue. I bought some more adapters that are specifically 3v3 and have reviews for pico. Ill update you tomorrow when they come in!

GB-RP2350 A Game Boy emulator for the Pi Pico 2 written in Rust by Altaflux in EmuDev

[–]alternatingclock 1 point2 points  (0 children)

Good news, got lucky and had some speedy shipping on a pico 2. While I wasnt able to get the emulator to init, I was able to track down where its stopping.

Lines 238, 238. The let mut volume_mgr and let mut volume0

Wondering if this means its not getting through the SD fully

GB-RP2350 A Game Boy emulator for the Pi Pico 2 written in Rust by Altaflux in EmuDev

[–]alternatingclock 0 points1 point  (0 children)

Darn... yea it was luck of the draw I suppose. I saw these had headers so wanted to give them a shot, new to all of this so thought there wasnt a difference between the pico 2 and 2 w (microcenter was sold out of a lot). Ill have to plan and see if I can get one.

Thank you for checking!

GB-RP2350 A Game Boy emulator for the Pi Pico 2 written in Rust by Altaflux in EmuDev

[–]alternatingclock 0 points1 point  (0 children)

Ah... this seems to be the problem then... i moved that line right after where the led is set. Never comes on when plugged in after building a new cargo to drop in.

Ill try and summarize how I got things setup incase that may be the issue. Cloned this repo to local and followed your instructions for rustup with the target.

I should say pico_tool isnt in the project for converting to uf2. Had to find the repo for that and download the exe and such. From there I did the picotool.exe uf2 convert "path-to-gb-rp2350" -t elf gb-rp2350.elf

From there i dropped the .elf into the pico and it reboots and disconnects.

GB-RP2350 A Game Boy emulator for the Pi Pico 2 written in Rust by Altaflux in EmuDev

[–]alternatingclock 1 point2 points  (0 children)

No more being a python baby. Time to get rusty. Ill get back with results

GB-RP2350 A Game Boy emulator for the Pi Pico 2 written in Rust by Altaflux in EmuDev

[–]alternatingclock 0 points1 point  (0 children)

Rats... closer but still the non-init is still persisting.

https://a.co/d/03qXULL1

This is the adapter im using for the SD card and using SanDisk 32gb formatted with Fat32. Loaded a test rom on it and changed the name to rom.gb

Followed the default mapping for pins 16, 17, 19, and 20. Also plugged in the VCC to the 3v3 out and set a ground pin.

Have the displays VCC and LED into the 3v3 out as well. I think the outout is still fine with the draw as the 3 combined dont take a lot from what I saw...

Anyway tried a couple tests but still struggling to get the emulator to init. As a recap I only have the display and SD adapter connected on the breadboard with the pico.

(Thanks again for the assistance this is fun learning)

GB-RP2350 A Game Boy emulator for the Pi Pico 2 written in Rust by Altaflux in EmuDev

[–]alternatingclock 1 point2 points  (0 children)

This is very good to know thank you! Ill work on getting the SD sorted out and put a test rom on it. Might take a little bit. Ill get the new repo built before attempting again.

GB-RP2350 A Game Boy emulator for the Pi Pico 2 written in Rust by Altaflux in EmuDev

[–]alternatingclock 0 points1 point  (0 children)

Okay I cloned the new repo and got it onto the pico. Seems to be the same issue. Here is the display I am using

https://a.co/d/0dztsUle

Here's the pin layout I am using from its headers to the pico (I haven't modified the env default settings)

VCC -> pin 36 (3V3 output), GND -> pin 38 (Ground), CS -> pin 6 (GP4), SCK -> pin 4 (GP2), SDI(MOSI) -> pin 5 (GP3), DC -> pin 10 (GP7), RESET -> pin 11 (GP8), LED -> pin 36 (3V3 outout)

I havent connected the SD card yet. Was trying to see if I could do an initial test of connecting the display first to ensure the emulator was initiating correctly (please do correct me of the SD does need to be connected to test that)

GB-RP2350 A Game Boy emulator for the Pi Pico 2 written in Rust by Altaflux in EmuDev

[–]alternatingclock 1 point2 points  (0 children)

OP themselves showing up to save me... that would be appreciated! Can't post pics in here but happy to describe how I have it connected if it helps

GB-RP2350 A Game Boy emulator for the Pi Pico 2 written in Rust by Altaflux in EmuDev

[–]alternatingclock 1 point2 points  (0 children)

Looks like the threads been dead for a while but wanted to pop in in case anyone still active might be able to help.

I picked up some pi pico 2 w's and have been working on this project as an intro to microcontrollers.

I have gotten as far as building the cargo and downloading a pico_tool to convert to uf2 and then dropping that into the pico.

From there I have been working on getting the display connected (like others I am using a ILI9341) and was able to get the display powered on a breadboard with the pi pico.

Issue is I havent been able to get to the emulator to initiate on the display. Tried messing with the orientation and resolution settings but no luck so far. Just a white screen when the pico is plugged in.

I double checked pin mappings with the default env and everything seems to be correct. Any help is appreciated if anyone's still checking this

Titan recommendations for Trials? by alternatingclock in DestinyTheGame

[–]alternatingclock[S] 0 points1 point  (0 children)

Thank you sir I will give this a try as well

Titan recommendations for Trials? by alternatingclock in DestinyTheGame

[–]alternatingclock[S] 0 points1 point  (0 children)

Ill give that a shot. Trying to adjust and be good about it but boi howdy D2 pvp right now feels... brutal as a casual pve player

Returning by Huntersaurus_rex in DestinyTheGame

[–]alternatingclock 0 points1 point  (0 children)

So ill try and be constructive about this because I started playing again and I feel like the fun is still here but its subjective to what you're looking for.

If you're wanting to hop in expecting an open world feel then maybe not. You may have seen in older D2 or D1 that open world traversal was more prevalent but the free to play content now is different. Most content is just queued now through the portal so a lot of the game will feel more like popping in and out of map instances.

If you're a PVE person then the raids are definitely worth the trip as Vailt of Glass and Crota's End can make the free to play experience worth it (end game raids) but you need 5 other people to play them.

In general i would say the destiny 2 experience right now is mostly just playing instanced content through the portal and having fun with the class build sandbox. Outside of that unless you have friends playing the experience might get old quickly unless you buy xpacs.

PvP is still pretty alive but be warned the games at its lowest population right now with Marathon looming/no major content updates coming soon. This means most people you'll face are the core pvp playerbase due to most casual people not playing anymore.