/r/EmuDev
Community of people building emulators.
Discord: https://discord.gg/dkmJAes
Try to keep all posts related to Emulation Development such as:
For any questions/problems, please PM the moderator, /u/VeloCity666.
/r/EmuDev
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
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.
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.
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 😁
Hello, I am having a embarrassing time trying to set up and wrap my head around how the JSON test works.
Does anyone know a way to go about to setup the JSON test using C#?
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?
Also this the main JSON test repo right: https://github.com/SingleStepTests/sm83 ?
Thank you for any help!
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:
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
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?
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.
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.
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!
github: https://github.com/lvntky/fbgl
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
}
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
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
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.
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.
Is there a tutorial that explains in detail how to start from scratch for emulator development?
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
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
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. ?
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!
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++.
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?