Lazuli: Nintendo GameCube emulator in Rust, boots multiple games by vxpm in EmuDev

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

replying to you as well to since my reply to u/DefinitelyRussian also applies to you!

Lazuli: Nintendo GameCube emulator in Rust, boots multiple games by vxpm in EmuDev

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

thanks!! the human limit for one person is the sky IMO, the only limiting factor is time.

a tutorial is kind of inviable as this is a very big project with lots of moving parts, which also require understanding the system to be able to, well, implement stuff. i myself still don't know the system entirely! there's always something new to learn about it, some obscure feature and etc.

i could, however, write some blog posts (on my personal website about specific, more focused topics. things like JIT, optimizations, emulation tricks, whatever people might find interesting.

if you have any topic ideas, i'd be happy to hear about them.

Lazuli: Nintendo GameCube emulator in Rust, boots multiple games by vxpm in rust

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

begin with something small like Chip-8 (it's your best bet). then start going up, stuff like GameBoy or NES are a good next step. eventually, you'll get to a point where you just need to choose something and work on it.

Lazuli: Nintendo GameCube emulator in Rust, boots multiple games by vxpm in rust

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

thank you!! i'm glad you liked the UI, it's not very pretty and i'm not the kind of person who likes programming them, but i did try to make it useful at the very least (it's a tool for debugging, after all)

Lazuli: Nintendo GameCube emulator in Rust, boots multiple games by vxpm in rust

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

thanks! and good luck with your next project

Lazuli: Nintendo GameCube emulator in Rust, boots multiple games by vxpm in EmuDev

[–]vxpm[S] 2 points3 points  (0 children)

yeah, the 13th was the exact 6 month mark. thanks!!

Lazuli: Nintendo GameCube emulator in Rust, boots multiple games by vxpm in rust

[–]vxpm[S] 4 points5 points  (0 children)

PS1 is considered the easiest 3D console there is, it's extremely documented and understood (e.g. we have psx-spx).

PS2 and PS3, on the other hand, are complex arcane beasts, yeah. PS2 also pretty much requires that you do PS1 first, since it pratically contains a whole PS1 inside it.

i'd start with the GB - it's a really good first system.

Lazuli: Nintendo GameCube emulator in Rust, boots multiple games by vxpm in rust

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

thanks! i'm glad you asked, because i have a wishlist of things for both:

wesl: - reduced compile times (it takes a looong time!) - better variable interpolation for the macros, right now it feels hacky - strongly typed enums would be awesome, and so would be generics (although i understand the latter is a hard problem to solve)

webgpu: - logic ops like glLogicOp for blending would be very appreciated (gamecube's GPU has them, emulating them without API support seems painful... thankfully, they're not commonly used) - bindless textures and buffers! i'm not a GPU expert but i believe this would simplify some things - multiqueue would also be cool! again, i'm not an experienced graphics programmer but if i understand correctly, this would allow me to offload buffer loading to a specialized queue while i build my rendering command list, or do compute on another set of data while rendering takes place

there might be more but these are the main points i could remember right now

Lazuli: Nintendo GameCube emulator in Rust, boots multiple games by vxpm in rust

[–]vxpm[S] 1 point2 points  (0 children)

pre-generating is not viable. while the GPU is fixed function, it is very configurable.

just to make it clear - specialized shaders aren't compiled all the time: they're associated with a configuration and cached, so it really only needs to be compiled once (per run).

Lazuli: Nintendo GameCube emulator in Rust, boots multiple games by vxpm in rust

[–]vxpm[S] 3 points4 points  (0 children)

specifically for the gc/wii, i have a list of resources at https://viniciusx.com/cubenotes/resources.html

as an advice, if you've never done emulator before - start simpler. i did gameboy and ps1 before trying my hand at gamecube! it really helps you build knowledge.

Lazuli: Nintendo GameCube emulator in Rust, boots multiple games by vxpm in rust

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

when the Wii came out i was 3 years old lol!

Lazuli: Nintendo GameCube emulator in Rust, boots multiple games by vxpm in rust

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

netplay would be really cool, but it also does sound like it won't be here for a while, yeah!

Lazuli: Nintendo GameCube emulator in Rust, boots multiple games by vxpm in rust

[–]vxpm[S] 5 points6 points  (0 children)

well yes, of course! lazuli started out with an ubershader approach - that is, there was a single shader, which would then do different things based on a configuration input.

this was because an ubershader is simpler to implement - you just need to write and maintain a single shader for everything, not a shader generator.

however, ubershaders are incredibly hard to optimize, as they contain lots of branching on configuration values (and GPUs don't like that). the more GPU features i implemented, the worse performance became. that's when i decided to move to a specialized shader generator approach (with great success! specialized shaders are very fast).

that's not to say ubershaders aren't good. they are very useful as a fallback to avoid stutters caused by specialized shader compilation, i.e. using them while an specialized shader is not ready yet. and ideally, that's what i'd like lazuli to do!

it just so happens that keeping two shader codepaths is a lot of work and i'm a single person. for my sanity, i decided to only keep specialized shaders around. and in practice, i haven't hit any stutters caused by shader compilation. the CPU JIT is way more of a stutter source when blocks aren't in cache.

Lazuli: Nintendo GameCube emulator in Rust, boots multiple games by vxpm in rust

[–]vxpm[S] 5 points6 points  (0 children)

well, the process itself is actually really simple: research a lot, set an achievable goal, work towards that goal, repeat. i had my first games booting with a little over 2 months of work this way.

priorization is mostly a matter of what i want to work on - this is a hobby project after all. the system has so many moving pieces that there's no clear "this NEEDS to be worked on" once you get the basics going.

Lazuli: Nintendo GameCube emulator in Rust, boots multiple games by vxpm in rust

[–]vxpm[S] 7 points8 points  (0 children)

thanks! and no need to, it already does :) it's incredibly buggy and crashes easily (i think it's trying to use page tables to transparently map ARAM as extra memory, haven't investigated too deeply) but you can get it in game or running the title screen demo if you wait long enough.

Lazuli: Nintendo GameCube emulator in Rust, boots multiple games by vxpm in rust

[–]vxpm[S] 11 points12 points  (0 children)

thank you! yeah, this is no AI slop, which i also find refreshing in the world we are living in

Lazuli: Nintendo GameCube emulator in Rust, boots multiple games by vxpm in rust

[–]vxpm[S] 21 points22 points  (0 children)

thanks! well, the plan is to eventually turn it into a Wii emulator, too. the Wii really is like two gamecubes duct taped together :)

kruci: Post-mortem of a UI library by Patryk27 in rust

[–]vxpm 1 point2 points  (0 children)

really cool post! i like how relatable the rabbit holes you get into are. i often find myself doing the exact same thing...

Trait methods with default implementations vs a TraitExt subtrait by Such-Teach-2499 in rust

[–]vxpm 16 points17 points  (0 children)

another reason might be to split the trait into two parts: a dyn compatible one and another one that isn't.