RESULTS.txt 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. 1. Interpretation of results
  2. The test program syncs with the 9918 (or similar) vertical interrupt. It
  3. does not consider any of the other interrupts in the V9938 or later.
  4. The results will probably be meaningless in any machine with separate clocks
  5. for the CPU and the VDP. Even in machines with a shared clock, there seem
  6. to be six possible phases between CPU and VDP, as demonstrated by the three
  7. different results obtained in the VG-8020/40 and the NMS-8250.
  8. All measurements are taken from the CPU (no hardware probes), therefore
  9. they all use the CPU clock as a basis.
  10. The program reports a screen with this layout:
  11. Screen mode: S
  12. Error code (0=no error): E
  13. Cycles/frame: F
  14. ACK works A cyc. after INT
  15. Bit 7 set B cyc. after INT
  16. ACK takes C to D cycles
  17. First fast wr. failure: G
  18. Where:
  19. F: total CPU cycles per frame.
  20. E: exit error code; a value of 0 means no error.
  21. Note: The value of F has been found to be stable in all tested computers,
  22. even in those with separate clocks. Cause is unknown.
  23. A: Number of ticks at which an interrupt may be acknowledged by reading
  24. the Status Register, relative to the interrupt, causing the interrupt
  25. line to go inactive. Negative means before the interrupt. It was
  26. negative in every tested VDP, but note that a positive value of up to
  27. 19 cycles would allow any interrupt service routine to acknowledge it,
  28. due to the delay for the interrupt to trigger and for the fastest IN
  29. instruction to execute.
  30. B: Number of ticks, relative to the interrupt, at which the Status
  31. Register bit 7 starts being set. Negative means before the interrupt.
  32. C, D: Minimum and maximum number of cycles for interrupt acknowledgement,
  33. that is, from the I/O read of the Status Register to an INT being
  34. no longer triggered. D=-1 means from C up. Possible values of C,D are:
  35. 0,2; 3,5; 6,10; 11,12; 13,13; 14,14; 15,15; 16,-1.
  36. I don't think software can distinguish finer results. Suggestions for
  37. how to perform a more fine-grained test are welcome.
  38. G: Number of ticks, relative to the interrupt, at which writing to VRAM
  39. at the fastest possible rate causes a write failure. A value equal to
  40. F (total CPU cycles per frame) means that every fast write succeeds.
  41. Example using one set of values obtained in the Philips VG-8020/40:
  42. E: 0
  43. - Error code: 0, meaning no error.
  44. F: 71364
  45. - 71364 cycles (T-states) per frame (typical in PAL machines).
  46. A: -5
  47. B: -3
  48. - If the status register is read 5 cycles before the interrupt, the
  49. interrupt is not triggered. This counts the exact cycle at which the
  50. I/O operation takes place, not the start of the instruction.
  51. - Bit 7 of the status register is set 3 cycles before the interrupt.
  52. - Note that when A < B, that leaves a gap in which, if the status port
  53. is read at a cycle >= A and < B, neither bit 7 of the Status Register
  54. will be set, nor will the interrupt trigger.
  55. C: 3
  56. D: 5
  57. - Once the int line goes low (active), it takes between 3 and 5 cycles
  58. inclusive (but we don't know how many exactly) for the interrupt to be
  59. blocked after being acknowledged. Note: Since the /INT line is sampled
  60. at the last cycle of each instruction, this probably means that at the
  61. hardware level, it takes between 2 and 4 cycles for this line to go high
  62. again.
  63. G: 27130
  64. - Writing to the VRAM at the fastest possible rate (faster than the VDP
  65. can handle) is guaranteed to succeed if performed during cycles 0 to
  66. 27129 inclusive after the interrupt; the first time it will fail is
  67. 27130 cycles after the interrupt. A value equal to F (71364 in this
  68. example) means that every fast write succeeds, no matter how many
  69. cycles after the interrupt.
  70. 2. Results for machines with synced clocks
  71. Philips VG-8020/40 (VDP: TMS9129NL):
  72. E: 0
  73. F: 71364
  74. G: 71364 for screen 0
  75. A, B, G: Varies between three possible tuples:
  76. -5, -4, 27130
  77. -5, -3, 27130
  78. -4, -3, 27131
  79. These values of G are for screens 1, 2, 3; for screen 0 it's always
  80. 71364. The values of A, B, G are consistent between runs or soft resets
  81. (DEFUSR=0); they only vary between hard resets (RESET button) or power
  82. cycles.
  83. C, D: 3, 5
  84. Two possible explanations for the different A,B,G values are:
  85. - Variation in the phase between VDP and CPU.
  86. - Randomness in the initialization of the internal 2-bit "CPU" counter
  87. in the VDP (see US Patent 4,243,984).
  88. Philips NMS-8250 (VDP: V9938):
  89. E: 0
  90. F: 71364 (59736 after entering VDP(10)=0).
  91. A, B, C, D values observed:
  92. -6, -3, 3, 5
  93. -6, -2, 3, 5
  94. -6, -3, 6, 10
  95. -6, -2, 6, 10
  96. G: 4 in screen 0, 8 in screen 1-3. Not affected by NTSC mode.
  97. Generally consistent between runs but not between hard boots, as in the
  98. VG-8020/40. One inconsistency between runs was possibly found
  99. (-6 -3 3 5 vs -6 -2 3 5), but not sure.
  100. 3. Results for machines with separate clocks
  101. Sony HB-10P (VDP: T6950, separate clocks):
  102. E: 0
  103. F: 71745
  104. A, B: Variable. Minimum A observed was -15; maximum -1. Minimum B observed
  105. was -16; maximum -1. abs(A-B) was always 0 or 1, with both A<B and
  106. A>B observed. They are tested separately, therefore it's possible
  107. that they always occur at the same cycle.
  108. The values became smaller with longer power-on times, suggesting
  109. that the cause is temperature.
  110. C, D: 3, 5
  111. G: not tested yet
  112. 4. Results for openMSX (current master as of Feb 10 2020)
  113. All machines:
  114. E: 0
  115. F: 71364/59736 (PAL/NTSC)
  116. A, B: 0, 0
  117. C, D: 0, 2
  118. G: 71364/59736 in screen 0, 27588/15960 in screens 1-3 (PAL/NTSC)