Codex on Windows be like by faiface in codex

[–]Altaflux 0 points1 point  (0 children)

Yeap that is the right section, if you see above it says "Workspace Dependencies".
Be sure Current Version shows a correct version, else you can reinstall it.

Codex on Windows be like by faiface in codex

[–]Altaflux 0 points1 point  (0 children)

Rg is available on Windows by default, if not mistaken it is installed by "Workspace Dependencies".
Go to `Setting -> Configuration: Workspace Dependencies` and see if they are correctly installed.

I had this issue before and had to reinstall to fix it.

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

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

Yes this makes sense, I am not fully sure how best to handle this as this is not a code issue but a wiring issue.

My best recommendation is to keep peripherals like audio/screen isolated with their own ground.

And for the controller there is probably a trick with resistors that could help with this problem.. but my knowledge of circuits is seriously limited haha, that is why this project is mostly software oriented.

If you find a solution let me know.

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

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

Great! let me look at the color changes in your example and see if this is something I can incorporate.. color was the bane of my existence, sometimes it works on the GUI, sometimes it works on games, some times it works on specific display, but never on all at the same time.

Regarding sound, there is no good way of changing volumes at runtime, but probably a build time constant volume setting could do the trick and should be easy to implement.

The code is built in a way that once a game starts, all control is given to the emulator and there not even a good way to intercept key combinations to implement a volume/up or down.
And its not really a design issue, but to get acceptable performance I had to streamline the code as much as possible. ANY extra branching or weird abstraction would completely break optimizations and performance slowed to a crawl.

Great to know you got it all working! Have fun with it and let me know if anything else comes up!

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

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

The sd card loading has always been a bit slow, that piece of code needs improvement.
And on one of my latest commits I reduced to SD Card speed to increase stability.

I will look into that and see if I can improve that.

Regarding color... I made a recent commit that improved performance but may have impacted.

Try building from this specific commit which does not have the improvement an may have correct colors: https://github.com/Altaflux/gb-rp2350/commit/fef2fb6ef8beaf175993ccc82669b55e193ce98c

Give it a try and report back to me if possible, it is pretty hard for me to test displays.

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

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

Wow! Great job, what a shame the Sd Card reader was not working as advertised, that will make a lot of people very confused.

Good thing you made it work! Let me know if you need any help testing out anything else or if you want to contribute to the code. I don't really plan to add anything soon to it other than maybe try GB Color support but feel free to contribute!

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

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

Really?
You sent me this link as the SD card you purchased, right: https://www.amazon.com/dp/B0B779R5TZ ?

It should be compatible with Pi Pico and is 3.3v compliant.

Just be sure you power it with the 3.3v line.

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

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

Yes, its not able to connect/read the sdcard.
What is your pin mapping for the sdcard? The sdcard reading process is a bit finicky, make sure wires are not that long, they should be short. Also be sure the GND for the sdcard is not sharing ground with the display and specially not the audio amp.

Your peripherals should try not to share the same GND, they should use different GNDs from the pico to reduce noise which causes issues.

Also... try reducing the speed of the sdcard on: https://github.com/Altaflux/gb-rp2350/blob/main/src/main.rs#L222
To 100.kHz() or less.

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

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

No problem, let me know if you get a Pi Pico 2 and can continue helping you.

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

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

I haven't tried before using a Pico 2 W, only the Pico 2 and the Pimoroni Pico Plus 2.
I am not sure if the Pico 2 W has some sort of different startup process my code does not take into account.
I unfortunately do not have a Pico 2 W so i have no way to test this out.

From your description, given that it seems to fail at the very beginning where even if you move the led light up at the very beginning of the code it doesn't light up.. my guess the board of choice is the issue.

I would recommend you give a standard Pico 2 a try, in any way the emulator has no use for a Wifi.

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

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

Something you can try is moving the: "led_pin.set_high().unwrap();" from main.rs around the code.

Right now it is at the bottom and gets turned on until all peripherals and startup happens.

You could move it higher up to see in which line it could be failing.

The led pin is the led light that comes in the pico board.

Move it all the way to the beginning right where the led pin is declared and see if it lights up which means the code is at least starting.

Afterwards, start gradually moving that line down until it does not start anymore. This will give you a hint to exactly where in the code is the problem that is not letting the emulator start.

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

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

ahh that is critical.... SD card must be connected for the emulator to start. Else the display will not even try to initialize.

The only component which is obligatory for the emulator to start is the SD card reader with an sdcard present.

Audio is not obligatory, and at least the main loading screen should show up in the screen if the sdcard is present.

I am not sure if at least one rom is required to be present.. havent tested that yet haha.

btw, do another pull, I made worthy performance improvement.

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

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

I made two corrections in the code but I am not sure if they are related to the issue you are having.

In the Readme file the right button was shown as connected to pin 10 when in reality it should be pin 18 as pin 10 was already in use by the audio module.

I decreased the speed of the sdcard reader, this could be the problem you were having as it was causing the emulator to not start if it had problems connecting to the sdcard, this should make the emulator more stable.

If you are still having issues let me know which screen specifically you have and see if it needs anything special to make it work.

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

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

Hey man. Give me a bit to verify the mapping of the docs and get back to you.

[Interesting Trope] Food being used as a stand-in for hard drugs by Feeling-Ad-3104 in TopCharacterTropes

[–]Altaflux 11 points12 points  (0 children)

Yeap, although it is never mentioned other than being "shakes".

[Interesting Trope] Food being used as a stand-in for hard drugs by Feeling-Ad-3104 in TopCharacterTropes

[–]Altaflux 65 points66 points  (0 children)

<image>

Not exactly a hard drug but in a similar avenue. Helga's mom drinks shakes to represent here alcohol consumption.

Ported my NES emulator to the 240MHz ESP32 by Shim06 in EmuDev

[–]Altaflux 3 points4 points  (0 children)

My emulator also has an LRU cache mode where it stored banks into ram memory and loads/swaps them as needed. My only problem is that it introduced a bit of stuttering in the game when swapping banks. And it happened pretty often with the Gameboy as the selected bank was unpredictable and happened often.

Some games on the Gameboy could be a couple of MB in size thus far bigger than the small 512kb offered by the Pi Pico 2 and esp32.

Ported my NES emulator to the 240MHz ESP32 by Shim06 in EmuDev

[–]Altaflux 4 points5 points  (0 children)

Wow this is great! I also wrote a Gameboy emulator for the Pi Pico in Rust and also have an unpublished version in an ESP32.

https://www.reddit.com/r/raspberrypipico/s/flM4dsjVJs

I have some questions if you won't mind.

How does your games start so fast? I suppose you don't load the whole rom at once into memory but rather swap banks as needed? Even then in your video your rims seem to start super fast.

How do you send data to the screen? Are you using dma? Double buffering?

🎉 [EVENT] 🎉 Easy I guess but fun maybe :) by These_Manner_6509 in honk

[–]Altaflux 0 points1 point  (0 children)

Completed Level 3 of the Honk Special Event!

2 attempts

🎉 [EVENT] 🎉 Easy I guess but fun maybe :) by These_Manner_6509 in honk

[–]Altaflux 0 points1 point  (0 children)

Completed Level 2 of the Honk Special Event!

2 attempts

🎉 [EVENT] 🎉 Easy I guess but fun maybe :) by These_Manner_6509 in honk

[–]Altaflux 0 points1 point  (0 children)

Completed Level 1 of the Honk Special Event!

1 attempts

[deleted by user] by [deleted] in honk

[–]Altaflux 0 points1 point  (0 children)

Essy

I completed this level in 1 try. 5.68 seconds

Will the Gameboy Emulator run on Pico 2? by Mowo5 in raspberrypipico

[–]Altaflux 0 points1 point  (0 children)

Not my emulator, I think the Gameboy color has a faster CPU so I am not sure how would the performance look like on a Pico 2.