/r/EmuDev

Photograph via snooOG

Community of people building emulators.

Discord: https://discord.gg/dkmJAes

Rules

  • Follow Reddiquette
  • Try to keep all posts related to Emulation Development such as:

  • Emulators you've made
  • Cool Tricks/Resources
  • Questions
  • Blog Posts

Official Chat


DARK THEME

NORMAL THEME


For any questions/problems, please PM the moderator, /u/VeloCity666.

/r/EmuDev

22,789 Subscribers

18

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

2 Comments
2024/12/04
13:59 UTC

3

Chip 8 quirks test for clipping

Can someone explain me what behaviour is expected for original chip 8.
Right now I am getting a off and cross for this test when i am wrapping around.
And if I clips I get ERR2

0 Comments
2024/12/04
11:35 UTC

11

Emulating an fpga

So I been thinking about what I want to make and I am fairly interested in logic circuits. So I have decided i want to emulate an fpga. Has anyone tried this and is there resources. I know there are a few digital circuit simulators but I am interested in replication of how an fgpa would implement a circuit.

3 Comments
2024/11/30
14:15 UTC

21

Yet another CHIP-8

Hello everyone,

So, I build the CHIP-8 interpreter following the popular guide by Tobias V. Langhoff. It was a bit stressful for me, but as I got implementing opcodes, I started getting it.

I was able to add sound generation, and I have tested it on some games, but I am still looking for a test suit for it.

Here is the Github: https://github.com/morukele/Chip-8

I am open to suggestions and opinions. Thank you very much.

4 Comments
2024/11/30
12:48 UTC

15

6502 Resorces

After my successes with chip8 and 8080 emulators I want to try writing a 6502 emulator...

Finding a list of opcodes is fairly easy but finding detailed information on what exactly each opcode does is not.

I saw a youtube video of a guy writing one in 2020 using what appeared to be a great website but the site no longer exists.

Can anyone point me to some good online sources of info for building a 6502 emulator. Thanks 😁

12 Comments
2024/11/30
09:15 UTC

7

Gameboy JSON Test and C#

Hello, I am having a embarrassing time trying to set up and wrap my head around how the JSON test works.

  1. Does anyone know a way to go about to setup the JSON test using C#?

  2. Also I see cycle by cycle, and as I understand, this only for you cycle during read and write, but I don't, I just return the number of t-cycle of a instruction, so I don't need to worry about that?

  3. Also this the main JSON test repo right: https://github.com/SingleStepTests/sm83 ?

Thank you for any help!

1 Comment
2024/11/30
02:11 UTC

5

Help needed for Chip-8 Rust Implementation

Hello everyone,

I am getting started with Emulation Development, I am working on a CHIP-8 implementation in Rust. I am using the SDL2 library for my display.

My current aim it to implement the minimum amount of opcode handlers needed to get the famous IBM rom displaying so I can use it as a start to know if the system is core of the system is working properly.

To that aim, I have implemented the follow commands

- 0X0E0: clear screen

-0x1NN: jumpt to NNN

- 0x6NN: set VX to NN

- 0x7XNN: Add value to VX

- 0xANNN: Set index register I to NNN

- DXYN: draw

I have loaded the rom and I am sure it loaded properly because I manually checked it against the hex code.

When I run the program, I keep getting the pixels only bring draw at the upper left of the screen like this:

Failed Display

I have tried to debug the code but no change. I have carefully gone through the code and I can't see any obvious mistakes. I have even compared my code with the ones from tutorials online, I can see that they are the same but I keep getting this image.

Is this normal? If not, please could you help me point out where I went wrong?

Thank you in advance, I really appreciate.

Link to project code: https://github.com/morukele/Chip-8

4 Comments
2024/11/29
22:59 UTC

5

GameBoy PPU: Rendering Scanline how to go about it?

Hello, so for my GameBoy emulator, I want to make a scanline based render since FIFO is little complex and doing full frame I heard is not worth it. I need some help to how to go about rendering the scanline. Do we iterate by pixel or tiles? How would we go about doing that?

3 Comments
2024/11/28
21:19 UTC

7

database/API of game artwork covers?

So I'm working on an iOS emulator, and I want to be able to let the user select artwork for each game / detect artwork automatically.

Is there some kind of database out there of game album art that I could possibly use? Would I have to manually do it myself?

Just curious if anyone knew of anything.

2 Comments
2024/11/28
02:48 UTC

39

FBGL: A Lightweight Framebuffer Graphics Library for Linux

I'm excited to share a project I've been working on: FBGL (Framebuffer Graphics Library), a lightweight, header-only graphics library for direct framebuffer manipulation in Linux.

🚀 What is FBGL?

FBGL is a simple, single-header C library that allows you to draw directly to the Linux framebuffer with minimal dependencies. Whether you're into embedded graphics, game development, or just want low-level graphics rendering, this library might be for you!

✨ Key Features:

  • Header-only design: Just include and go!
  • No external dependencies (except standard Linux libraries)
  • Simple API for:
    • Pixel drawing
    • Shape rendering (lines, rectangles, circles)
    • Texture loading (TGA support)
    • Font rendering (PSF1 format)
    • FPS calculation

github: https://github.com/lvntky/fbgl

https://reddit.com/link/1h10ky1/video/8im1v8dmye3e1/player

0 Comments
2024/11/27
09:33 UTC

7

Help wanted for my chip8 emulator

I'm building a CHIP-8 emulator in Go, and I’ve been profiling the performance of the dxyn opcode, specifically the DrawSprite function. I noticed it’s taking ~25 ms per frame for some ROMs. So how will i be able to run each frame in 16.67 ms.

Switch Case for DXYN

case 0xD000:
        regX := second
        regX >>= 8
        regY := third
        regY >>= 4
        height := fourth

        xval := cpu.Registers[regX]
        yval := cpu.Registers[regY]

        cpu.Registers[0xF] = 0

        sprite := make([]uint8, height)
        for row := 0; row < int(height); row++ {
            sprite[row] = cpu.Memory.Read(cpu.I + uint16(row))
        }

        collision, updated := cpu.Display.DrawSprite(xval, yval, sprite)
        if collision {
            cpu.Registers[0xF] = 1
        }
        cpu.DrawFlag = updated

DrawSprite function

func (d *Display) DrawSprite(x, y uint8, sprite []uint8) (bool, bool) {
    collision := false
    updated := false
    for row := 0; row < len(sprite); row++ {
        spriteRow := sprite[row]
        if spriteRow == 0 { // No pixels to draw in this row
            continue
        }
        for col := 0; col < 8; col++ {
            pixelX := (x + uint8(col)) % Width
            pixelY := (y + uint8(row)) % Height

            pixelState := (spriteRow >> (7 - col)) & 1

            // both are 1 then resulting pixel will be 0 (means VF = 1)
            if d.Pixels[pixelY][pixelX] == 1 && pixelState == 1 {
                collision = true
            }

            if pixelState == 1 {
                d.Pixels[pixelY][pixelX] ^= pixelState
                updated = true
            }
        }
    }

    return collision, updated
}
11 Comments
2024/11/25
14:28 UTC

9

Suggestions on my NES CPU.

Hey I am trying to build a NES emulator and I am very new to building emulators. I have just finished implementing the CPU and will move onto to the PPU next. It would be great if you could take a look at it and tell me where I could improve. Thanks!
Github repo: https://github.com/AbhisekhBhandari/NES

6 Comments
2024/11/24
04:00 UTC

21

GO-8080: A Intel 8080 Emulator, powered by Go and Raylib

Hello, I made this a few months back, but I like to share it. It's open source, and the repo has a detailed readme for more information (I recommended reading it, beware of grammar mistakes lol). If I can get 16 stars on it on GitHub, that would be nice :) https://github.com/BotRandomness/GO-8080

https://preview.redd.it/apjjxrided2e1.png?width=611&format=png&auto=webp&s=6456eaf604a9f1ad01498bd47d4075c5b6a0a164

https://preview.redd.it/osc08s9eed2e1.png?width=850&format=png&auto=webp&s=2c24b881aafe7455c502c16a9f8b16aa9791e53a

9 Comments
2024/11/22
03:12 UTC

10

Can I be assisted?

Sorry if this post is a waste of space.
Just want to ask where I should start with doing a CHIP8?

Was trying to learn this stuff around April of this year, but some personal things happened that I had to take care of that caused me to forget everything I learned, but even then I was still a newbie.

Currently I'm still at the point of being able to write "Hello, World!" in C++ and that's all, but my goal is to make my own CHIP8, just need to figure out where I need to restart learning.

27 Comments
2024/11/21
03:17 UTC

8

How do I implement a second joypad for my NES emulator?

I've been following this tutorial, and looking at the source code it seems as simple as having the 0x4017 address in the bus map to joypad2, and initialise some additional mappings at the start. But after doing that, while my inputs are being registered by the joypad according to the std output, notthing happens in-game. Where am I likely going wrong?

Edit (3): I think there is an issue with how I am mapping the $4016 and $4017 registers.

7 Comments
2024/11/19
21:09 UTC

7

Emu development tutorial

Is there a tutorial that explains in detail how to start from scratch for emulator development?

5 Comments
2024/11/18
03:27 UTC

6

Gameboy: Boot Rom with Tetris loaded up Log

Edit: Answer found, the Bootrom logs computes checksum on individual cpu_instrs roms, all 11 of have the same checksum

Hello,

So I made GameBoy CPU that can run through the Boot Rom, I compared my logs to this log: https://github.com/wheremyfoodat/Gameboy-logs/blob/master/BootromLYStubbed.zip At like PC: 00F4 is where the bootrom does the checksum. This is different ROM to ROM, and I loaded up Tetris, but using wheremyfootat log differs at that point since I don't know what ROM they used. Does anyone of CPU log of boot rom with Tetris (1.1/Rev 1, World)? I just want to make sure it actually works

8 Comments
2024/11/18
02:35 UTC

19

Chip8 Wasmulator

5 Comments
2024/11/17
14:08 UTC

40

8080 Space Invaders

11 Comments
2024/11/15
23:00 UTC

59

Dreamcast emulator written in Zig

Hello there,

I've been delaying posting about this here for a while now, but I just got it stable enough on Linux to be usable there (I mainly use Windows) and I figured now is as good a time as any to share it!

Deecy is a Dreamcast emulator written in Zig and using the WebGPU API for its rendering. It has a fairly ad hoc JIT for the main CPU which I already want to rewrite with a proper optimisation step. Maybe one day. It runs some games well enough to be completed, but being its only user I can't really give an overall overview (Here's what I have for now).

I don't really know where I want to go with this project now; I guess I'm hoping that sharing it will motivate me to tackle some of the more obvious problems :)

Github Repo: https://github.com/Senryoku/Deecy/

Release (with ready to download Windows and Linux binaries): https://github.com/Senryoku/Deecy/releases/tag/v0.1.0

10 Comments
2024/11/15
18:34 UTC

14

Chip-8 in Zig

Hello folks, I am new here...
I am currently trying to learn zig, and implemented (partially) chip 8 in zig, using SDL3. Currently it passes the BC_test rom..

Currently writing the instructions for the timers...

Just wanted to ask, is there any rom which can help in testing the instruction for timers. ?

https://github.com/CeNiEi/8chips

2 Comments
2024/11/15
11:17 UTC

10

touchHLE emulator development video

3 Comments
2024/11/14
11:42 UTC

27

(Another) GBA Emulator, for the web

Hello EmuDev!

I wanted to share the GBA emulator project that I've been working on for a long while now. I'm still not satisfied with the state that it's in (the sound is still really rough and the UI could use a lot more work, to name a few problems) but I figure that I'd share anyway for some feedback.

You can check out the project here -> https://samuelchen52.github.io/gbaemu/

And the repo itself here -> https://github.com/samuelchen52/gbaemu

The emulator itself is written entirely in JavaScript, and features exportable save states and an adjustable FPS slider. Save games do not work yet unfortunately but they are next up on the eventual to-do list!

As for game compatibility, I only fully played through Fire Emblem Sacred Stones, though most other games I tried did boot up and were playable. For the browser, I would recommend using Chrome.

Would love to hear your thoughts / feedback!

5 Comments
2024/11/14
04:05 UTC

15

Made my first chip8 emu in python

It was pretty eye opening. I opened up vs code with no idea what I was doing until piece by piece line by line it started to make sense. It really Helped futher my understanding of programming as a whole. You can check my code here https://github.com/ejay0289/Py-Chip8 can't wait to port it to c++.

5 Comments
2024/11/13
00:56 UTC

3

Space Invaders Emulator Support Needed.

I can't share the code yet so this is armed at people who have seen this symptom and may have some insight as to why its happening.

My emulator is not fully complete. All opcodes are in place. My display routine is in place and the core operating loop is in place with the correct timings. I currently have no key input routine and no interrupts coded.

When I run the program My display shows the the initial screen. I see the scores at the top of the screen (all 0000) and I see 'CREDIT 00' in the bottom right corner...

After a moment I would expect the screen to begin showing the word PLAY and underneath that the words SPACE INVADERS etc etc... but this does not happen. I only see what I described above.

Anyone encountered this when developing their Space Invaders emulator?

5 Comments
2024/11/12
19:12 UTC

12

Working on an NES Emulator: What are some ways in which I could enable online multiplayer?

9 Comments
2024/11/12
13:13 UTC

Back To Top