rynorris / nes

NES emulator written in Rust
MIT License
11 stars 0 forks source link

Bill & Ted #20

Open rynorris opened 6 years ago

rynorris commented 6 years ago

Crashes at boot with 'Unknown opcode: 2'. Guess we must have a CPU bug still hiding somewhere? Probably it's not actually expecting to use the undocumented opcodes.

rynorris commented 6 years ago

This is certainly due to exactly the problem stated on nesdev: "These depend on the mapper ignoring successive writes".

My trace ends with 2 successive writes to $FFFF and then crash.

EDIT: Those writes aren't the problem, it's definitely this: "At least Bill & Ted's Excellent Adventure resets the MMC1 by doing INC on a ROM location containing $FF; the MMC1 sees the $FF written back and ignores the $00 written on the next cycle"

Mine is not resetting on the INC, and then jumping after only 4 writes the next time.

Unfortunately with my current architecture there's no easy way for the mapper to know if writes are happening on consecutive cycles.