spieglt / nestur Goto Github PK
View Code? Open in Web Editor NEWThe NES (emulator) you left outside in the rain but let dry and still kind of works
The NES (emulator) you left outside in the rain but let dry and still kind of works
Hi!
I spent some time last night diving into some nes test roms for my fuzzer, and uncovered the following small issues. With these issues fixed games like Mega Man reproduce much better (although there are still some NMI timing issues I have yet to look into)
Given https://github.com/christopherpow/nes-test-roms/tree/master/cpu_timing_test6 the following opcodes report inaccuracies:
I've fixed this in my fuzzer by adding offsets to JMP and RTI, and adding a before_clock parameter to report a complete offset for STA in those 2 special cases (see: https://git.openprivacy.ca/sarah/nesfuzz/commit/f7110dcd50da9680d79d7253c436989818c39609) - but this is kinda hacky and you may or may not want to use a different approach.
Given https://github.com/christopherpow/nes-test-roms/tree/master/sprite_hit_tests_2005.10.05
src/ppu/rendering.rs
Note: 09/10/11 will all fail until cpu cycle issues documented above are fixed.
Given https://github.com/christopherpow/nes-test-roms/tree/master/blargg_ppu_tests_2005.09.15b
Nice project! I found a problem and thought you might want this bug report. This is based on commit
ea70b59. I'm a little new to Rust so I can't help much with the diagnosis.
fps: 14
fps: 9
thread 'main' panicked at 'attempt to subtract with overflow', src/apu/square.rs:117:17
stack backtrace:
0: backtrace::backtrace::libunwind::trace
at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.37/src/backtrace/libunwind.rs:88
1: backtrace::backtrace::trace_unsynchronized
at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.37/src/backtrace/mod.rs:66
2: std::sys_common::backtrace::_print_fmt
at src/libstd/sys_common/backtrace.rs:76
3: <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt
at src/libstd/sys_common/backtrace.rs:60
4: core::fmt::write
at src/libcore/fmt/mod.rs:1030
5: std::io::Write::write_fmt
at src/libstd/io/mod.rs:1412
6: std::sys_common::backtrace::_print
at src/libstd/sys_common/backtrace.rs:64
7: std::sys_common::backtrace::print
at src/libstd/sys_common/backtrace.rs:49
8: std::panicking::default_hook::{{closure}}
at src/libstd/panicking.rs:196
9: std::panicking::default_hook
at src/libstd/panicking.rs:210
10: std::panicking::rust_panic_with_hook
at src/libstd/panicking.rs:473
11: std::panicking::continue_panic_fmt
at src/libstd/panicking.rs:380
12: rust_begin_unwind
at src/libstd/panicking.rs:307
13: core::panicking::panic_fmt
at src/libcore/panicking.rs:85
14: core::panicking::panic
at src/libcore/panicking.rs:49
15: nestur::apu::square::Square::calculate_target_period
at src/apu/square.rs:117
16: nestur::apu::square::Square::write_timer_low
at src/apu/square.rs:146
17: nestur::apu::Apu::write_reg
at src/apu/mod.rs:95
18: nestur::cpu::Cpu::write
at src/cpu/mod.rs:203
19: nestur::cpu::opcodes::<impl nestur::cpu::Cpu>::stx
at src/cpu/opcodes.rs:491
20: nestur::cpu::Cpu::step
at src/cpu/mod.rs:174
21: nestur::main
at src/main.rs:58
22: std::rt::lang_start::{{closure}}
at /rustc/4560ea788cb760f0a34127156c78e2552949f734/src/libstd/rt.rs:64
23: std::rt::lang_start_internal::{{closure}}
at src/libstd/rt.rs:49
24: std::panicking::try::do_call
at src/libstd/panicking.rs:292
25: __rust_maybe_catch_panic
at src/libpanic_unwind/lib.rs:80
26: std::panicking::try
at src/libstd/panicking.rs:271
27: std::panic::catch_unwind
at src/libstd/panic.rs:394
28: std::rt::lang_start_internal
at src/libstd/rt.rs:48
29: std::rt::lang_start
at /rustc/4560ea788cb760f0a34127156c78e2552949f734/src/libstd/rt.rs:64
30: main
31: __libc_start_main
32: _start
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
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.