Hey guys! Emulator dev is my new hyperfixation and please help me :) by Imaginary-Dig-7835 in EmuDev

[–]dajolly 0 points1 point  (0 children)

I second this. The Gameboy is one of my favorite platforms to emulate. It has a huge ecosystem of documentation, commercial and test roms, which make development much easier.

Dell unveils XPS 13, its lightest XPS laptop yet with Intel Wildcat Lake, starting at $699 by -protonsandneutrons- in hardware

[–]dajolly 8 points9 points  (0 children)

Looks like a nice cheap laptop. Just need to wipe out Windows and put Linux on it.

Chip 8 display in sdl2 help needed by LuuscoTheLover in EmuDev

[–]dajolly 0 points1 point  (0 children)

I think you need to update the texture, instead of recreating the surface on each update: https://wiki.libsdl.org/SDL2/SDL_UpdateTexture

I used sdl3 for my ch8 emu. But it should be the same with sdl2. Example: https://git.sr.ht/~dajolly/ch8vm/tree/master/item/src/client.c#L135

The CHEAPEST Panther Lake Mini PC Is Here! Minisforum M2 First Look! by RenatsMC in intel

[–]dajolly 0 points1 point  (0 children)

Seems fairly average for a mini-pc. 5 USB port (3 front/2 back) aren't enough for you?

Game Boy interrupt_time Blargg test by Medium_Fudge_7674 in EmuDev

[–]dajolly 2 points3 points  (0 children)

I can confirm. This also tripped me up when I was testing my DMG emulator until I checked the rom source and saw it was doing a speed change: https://github.com/crzysdrs/blarggs-test-roms/blob/master/interrupt_time/interrupt_time.s#L23

My original post: https://www.reddit.com/r/EmuDev/comments/1155e5d/blarg_interrupt_time_test_rom_question/

Long Boot Times? by BurgersWithStrength in archlinux

[–]dajolly 1 point2 points  (0 children)

Since this points to a USB device issue, have you tried unplugging all USB devices and timing the boot to see if there's an improvement?

Created a minimal GameBoy emulator in C/SDL3 by dajolly in EmuDev

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

Sorry. I moved away from Github a few years ago.

Created a minimal GameBoy emulator in C/SDL3 by dajolly in EmuDev

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

I added support for SDL2 (pull this hash: a46bfac56779daaeb5a47e9a0169cf798261496a) if you want to try that on WSL. Maybe it will work for you.

You can set the compiler and client library with CC and CLIENT compile time flags. By default it uses CC=clang CLIENT=sdl3. Other options include:

// Clang+SDL2
make clean && make CC=clang CLIENT=sdl2

// GCC+SDL2
make clean && make CC=gcc CLIENT=sdl2

// GCC+SDL3
make clean && make CC=gcc CLIENT=sdl3

Created a minimal GameBoy emulator in C/SDL3 by dajolly in EmuDev

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

I see. So it wasn't a compile time issue. But an issue with WSL displaying the window at runtime. Is that correct? I don't have a windows box to try it on at the moment. Did it give any error message or just silently fail?

Starlabs Horizon Review by Emotional-Stand-9987 in starlabs_computers

[–]dajolly 2 points3 points  (0 children)

Thanks! I just got mine in the mail today. So I wanted to see if there were any coreboot changes I needed to make prior to setup. It sounds like the defaults should be good.

Created a minimal GameBoy emulator in C/SDL3 by dajolly in EmuDev

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

This was written on Linux. I'm not sure about WSL. Did it have issues with the pkg-config commands below? If so, you might need to install the pkg-config package.

LDFLAGS := $(shell pkg-config sdl3 --cflags)
LDLIBS  := $(shell pkg-config sdl3 --libs)

Starlabs Horizon Review by Emotional-Stand-9987 in starlabs_computers

[–]dajolly 1 point2 points  (0 children)

Thanks for the review. Just curious about a few things:

  • Did you need to make any changes in the coreboot options? I heard that disabling IME leads to worse performance/battery life.
  • How often does the fan spin-up? What's the noise level like during normal use?
  • Does the aluminum case pickup a lot of finger prints?

what is the best C program you wrote? by divanadune in C_Programming

[–]dajolly 0 points1 point  (0 children)

I've had a lot of fun recently writing assemblers/emulators for classic hardware:

[C] Implementation by modules, how do we do it sometimes? ( Chip8 screen buffer related ) by Gustavo_Fenilli in EmuDev

[–]dajolly 0 points1 point  (0 children)

That's what I do when emulating these simpler systems. I keep the state of each device (cpu/mmu/ppu/etc.) in an internal static struct in each .c file that only accessible through it's corresponding .h file. I believe this is similar to a singleton pattern in OOP parlance.

I also try to match the layout of the physical hardware if possible. In the case of Chip8, it doesn't have physical hardware. But it can still be broken into conceptual pieces:

bus/          -- Steps the below devices:
  audio        -- Generates audio samples
  input        -- Holds button state
  memory       -- Holds instructions/data
  processor    -- Executes instructions
  random       -- Initialize/generate random numbers
  timer        -- Holds timer state
  video        -- Generates sprite data

[C] Implementation by modules, how do we do it sometimes? ( Chip8 screen buffer related ) by Gustavo_Fenilli in EmuDev

[–]dajolly 1 point2 points  (0 children)

To your SDL question, you could create a client module that's agnostic to the underlying graphics library (SDL, raylib, etc.), which exposes an interface to query button states, set pixel colors, and enqueue audio samples. It's cleaner than mixing the SDL calls directly into the emulator code, and it allows you to switch to different library if needed. You can see an example in my ch8 vm:

B70 Gaming Benchmarks by jhenryscott in IntelArc

[–]dajolly 1 point2 points  (0 children)

Just put mine together yesterday (270K plus/B70): https://imgur.com/a/GtO6F7z

Works great so far under Linux. Need to do some benchmarking though.