Comments (5)
Hi @olduf - thanks for the detailed report. I'm new to the emulation space but as far as I can tell this is a real issue. addresses 308
(0x134
) and 4404
(0x1134
) map to the same physical CPU RAM address.
from processortests.
Apologies for the long time with no input; I'm very wishy-washy on this.
On the one hand the tests in net are designed not to assume anything external to the CPU — including how addresses are decoded.
On the other, the Ricoh 2A03 (/'NES 6502'): (i) is used (almost) exclusively in the NES; and (ii) includes the APU and some other parts in the chip, so the "external to the CPU" test is fuzzier than it should be.
I think possibly a good compromise would be just to restrict all memory accesses in the NES-specific tests to the first 2kb of memory? Would that satisfy the problem adequately?
from processortests.
I think possibly a good compromise would be just to restrict all memory accesses in the NES-specific tests to the first 2kb of memory? Would that satisfy the problem adequately?
Now that I've finished my cycle-accurate CPU emulator of this chip for the NES I feel more confident weighing in here.
I think it could be an improvement to only use addresses that don't have special mapping behavior, but it invites a lot of complexity. I'm confused about why you're choosing the first 2KB (assuming this is 0x0000
- 0x1fff
which is just 0x0000
- 0x07ff
mirrored.
However if we do acknowledge the memory mapping, then that invites a lot of additional complexity where we need to support mappers.
I think the real issue is that the documentation could be more explicit (instead of implicit) about not choosing to respect memory mapping or any special cartridge mapping behavior, and I do like that this suite of tests allows me to properly isolate and unit test the CPU. Time and energy permitting, I'd like to find a suite of test roms and create some per-cycle truth data with a similar level of thoroughness found in this repo. (It's a fantastic repo!)
from processortests.
I'm confused about why you're choosing the first 2KB
The first 2kb runs to address 0x07ff
; up to 0x1fff
would be the first 8kb.
However if we do acknowledge the memory mapping, then that invites a lot of additional complexity where we need to support mappers.
I'm suggesting I just get the generator silently to drop any test that happens to generate an access outside of the range [0x0000, 0x07ff] and let it keep going until there are the desired number of test cases.
... though more explicit documentation might also just be the correct fix.
from processortests.
So I've gone with "more explicit documentation" as the immediate fix, as per #37 but if I can persuade myself that an appropriate test filter — such as the proposed first-2kb-only, but possibly something else — would render the issue moot then I'll return to the topic.
from processortests.
Related Issues (20)
- NES 6502 Incorrect Cycles test HOT 1
- JSR high byte issue HOT 3
- 65816: DBR should not be reset on BRK/COP in emulation mode
- 65816: Emulation mode stack wrapping HOT 2
- 65816: (dp,x) emulation mode page wrapping
- 65816: More emulation mode stack wrapping HOT 2
- Possible wrong cycle count for NES 6502 0C and 1/3/5/7/D/FC HOT 4
- 8088 Test Suite HOT 4
- Inconsistency of the negative flag in decimal mode across 6502 emulators HOT 2
- nes6502 README.md has incorrect sample HOT 1
- 8088 8D instruction (LEA) test has LEA r, r forms. HOT 4
- The 6502 tests assume the P register has bits 4 & 5.
- Opcode 6B Respects D Flag on NES Tests
- Opcode 9C/9E: nes6502 Result Inconsistent with Test ROM HOT 2
- 8088: some `name`s refer to `si` but should refer to `di` HOT 7
- 6502: JSR Overwriting Instruction HOT 3
- Possibly wrong test case d133 [ADD.b D0, (d8, A3, Xn)] HOT 2
- 68000: Suggestion for additional DIVS/DIVU test cases
- Test case issue `5ca0` `ADD.l Q, -(A0)` HOT 2
- 65816: missing coverage for zero flag in 16-bit adds
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from processortests.