namuol / boyziigame Goto Github PK
View Code? Open in Web Editor NEWAnother Game Boy emulator written in Zig, for fun. At least that's the plan.
License: MIT License
Another Game Boy emulator written in Zig, for fun. At least that's the plan.
License: MIT License
Most of the mooneye tests fail.
I suspect that many of them fail due to the lack of cycle-accuracy baked into our emulator. For instance, DMA operations occur in parallel with CPU operation, so a write that should happen a few cycles after an instruction is fetched will lead to the data being incorrect.
These fail because our CPU implementation performs all its reads within a single call to cpu.cycle()
, and then keeps track of how many cycles it needs to wait before the next instruction is fetched and executed.
In order to fix these kinds of issues, we need to ensure that reads/writes actually occur on the appropriate cycle, such that the calls to e.g. ppu.cycle()
will allow DMA to read/write values at the exact right cycle time.
There are many ways to achieve this, but if I understand the problem correctly, we may be able to solve this without major refactoring since the problem is isolated to bus access. This means we may be able to allow the bus to ultimately dictate timing for the various devices that communicate with it, essentially allowing the bus to say how many cycles should run for each device whenever reads/writes happen, and the rest would be indirectly driven by the CPU instructions.
Concretely, this would mean that special calls to e.g. bus.read()
would actually advance devices on the bus four machine cycles (usually, I think). This may mean that we'd want to get rid of the cpu.cycle()
function and instead have something like cpu.step()
always advance to the next instruction, with all other devices being driven by the bus.
This sounds relatively simple but could be tricky to get right... probably worthy of a feature branch to try it out and see if we can get a few of these tests to pass.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.