aboutsummaryrefslogtreecommitdiff
path: root/testroms/branch_timing_tests
diff options
context:
space:
mode:
authorDeterminant <[email protected]>2017-11-17 13:05:25 -0500
committerDeterminant <[email protected]>2017-11-17 13:05:25 -0500
commite2ccf6053d58a2a478814f4a26018989f6fa0f26 (patch)
treeba873969aaaf0dc1856a8b300fa74c35a1621ce6 /testroms/branch_timing_tests
parentff10a24cfc2a99047c39816ea93c804d40a149c6 (diff)
add test roms
Diffstat (limited to 'testroms/branch_timing_tests')
-rw-r--r--testroms/branch_timing_tests/1.Branch_Basics.nesbin0 -> 16400 bytes
-rw-r--r--testroms/branch_timing_tests/2.Backward_Branch.nesbin0 -> 16400 bytes
-rw-r--r--testroms/branch_timing_tests/3.Forward_Branch.nesbin0 -> 16400 bytes
-rw-r--r--testroms/branch_timing_tests/readme.txt74
4 files changed, 74 insertions, 0 deletions
diff --git a/testroms/branch_timing_tests/1.Branch_Basics.nes b/testroms/branch_timing_tests/1.Branch_Basics.nes
new file mode 100644
index 0000000..e7f81f0
--- /dev/null
+++ b/testroms/branch_timing_tests/1.Branch_Basics.nes
Binary files differ
diff --git a/testroms/branch_timing_tests/2.Backward_Branch.nes b/testroms/branch_timing_tests/2.Backward_Branch.nes
new file mode 100644
index 0000000..6e02064
--- /dev/null
+++ b/testroms/branch_timing_tests/2.Backward_Branch.nes
Binary files differ
diff --git a/testroms/branch_timing_tests/3.Forward_Branch.nes b/testroms/branch_timing_tests/3.Forward_Branch.nes
new file mode 100644
index 0000000..4e701b2
--- /dev/null
+++ b/testroms/branch_timing_tests/3.Forward_Branch.nes
Binary files differ
diff --git a/testroms/branch_timing_tests/readme.txt b/testroms/branch_timing_tests/readme.txt
new file mode 100644
index 0000000..1f05e8e
--- /dev/null
+++ b/testroms/branch_timing_tests/readme.txt
@@ -0,0 +1,74 @@
+NES 6502 Branch Timing Test ROMs
+--------------------------------
+These ROMs test timing of the branch instruction, including edge cases
+which an emulator might get wrong. When run on a NES they all give a
+passing result. Each ROM runs several tests and reports the result on
+screen and by beeping a number of times. See below for the meaning of
+failure codes for each test. THE TESTS MUST BE RUN (*AND* *PASS*) IN
+ORDER, because some earlier ROMs test things that later ones assume will
+work properly.
+
+Source code for each test is included, and most tests are clearly
+divided into sections. Support code is also included, but it runs on a
+custom devcart and assembler so it will require some effort to assemble.
+Contact me if you'd like assistance porting them to your setup.
+
+
+Branch Timing Summary
+---------------------
+An untaken branch takes 2 clocks. A taken branch takes 3 clocks. A taken
+branch that crosses a page takes 4 clocks. Page crossing occurs when the
+high byte of the branch target address is different than the high byte
+of address of the next instruction:
+
+branch_target:
+ ...
+ bne branch_target
+next_instruction:
+ nop
+ ...
+branch_target:
+
+
+1.Branch_Basics
+---------------
+Tests branch timing basics and PPU NMI timing, which is needed for the
+tests
+
+2) NMI period is too short
+3) NMI period is too too long
+4) Branch not taken is too long
+5) Branch not taken is too short
+6) Branch taken is too long
+7) Branch taken is too short
+
+
+2.Backward_Branch
+-----------------
+Tests backward (negative) branch timing.
+
+2) Branch from $E4FD to $E4FC is too long
+3) Branch from $E4FD to $E4FC is too short
+4) Branch from $E5FE to $E5FD is too long
+5) Branch from $E5FE to $E5FD is too short
+6) Branch from $E700 to $E6FF is too long
+7) Branch from $E700 to $E6FF is too short
+8) Branch from $E801 to $E800 is too long
+9) Branch from $E801 to $E800 is too short
+
+
+3.Forward_Branch
+----------------
+Tests forward (positive) branch timing.
+
+2) Branch from $E5FC to $E5FF is too long
+3) Branch from $E5FC to $E5FF is too short
+4) Branch from $E6FD to $E700 is too long
+5) Branch from $E6FD to $E700 is too short
+6) Branch from $E7FE to $E801 is too long
+7) Branch from $E7FE to $E801 is too short
+8) Branch from $E8FF to $E902 is too long
+9) Branch from $E8FF to $E902 is too short
+
+--
+Shay Green <[email protected]>