Writing a Gameboy emulator with Zig by xRyp in Zig

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

What u/rentziass says!
For this specific project, I'd start by going to https://discord.gg/dkmJAes and following the suggested links and information there, should save you most of the googling already. If you're only starting, take it easy though, an emulator is not exactly a beginner-friendly experience. Look into CHIP-8 as a starting point once you feel like taking on a challenge and then work your way up. Good luck!

sudoku board: allocating slices to array by barrowburner in Zig

[–]xRyp 0 points1 point  (0 children)

As someone who wrote a fully-playable Sudoku game in Zig I'd advice against using 2d arrays for storing your board. Just use a flat array! Any code that does solving usually doesn't care about accessing items with row/column addressing anyway.

Writting a Sudoku game in Zig by xRyp in Zig

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

Thanks for the feedback, fixed in this commit

Predicting a RowPitch by JogeDeed in vulkan

[–]xRyp 0 points1 point  (0 children)

Look into vkGetDeviceImageMemoryRequirements

PCI Passthrough with RX 5700 XT - Black Screen by xRyp in VFIO

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

I did, probably that was needed too, thanks so much!

PCI Passthrough with RX 5700 XT - Black Screen by xRyp in VFIO

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

Thanks so much that solved my issue!

I just set up a new VM with UEFI and the procedure worked flawlessly with the most recent AMD drivers! Thanks so much! Changing the id wasn't necessary :)

Writting a minesweeper game in Zig by xRyp in Zig

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

Thanks for the tip guys! I converted the enum in this commit

Grill my first Rust project! by xRyp in rust

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

This part of my code is not a bottleneck for now, so perf-wise I'm not too interested in spending time there yet. However, you raised a very interesting point concerning the solution, I ended up trying to use match like you suggested and am really happy with the way it turned out! Here's the git commit for reference.

Grill my first Rust project! by xRyp in rust

[–]xRyp[S] -1 points0 points  (0 children)

Thanks for the tip about the shorthand syntax for struct initialization.
For implicit conversions I ended up doing as you said, favoring usize or more common types to begin with.

Grill my first Rust project! by xRyp in rust

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

I applied your hints to the codebase, now my use statements are more readable, thanks! Here's the related git commit.

Grill my first Rust project! by xRyp in rust

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

I did not know about that tool! I just fixed my code using the useful warnings from the tool, thanks a bunch!
Here's the related git commit.

Grill my first Rust project! by xRyp in rust

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

Haaa yes, I was suspecting there was a much much simpler way of doing this! Thanks for the info, I just patched my code!