RetroDebugger icon indicating copy to clipboard operation
RetroDebugger copied to clipboard

Bad Line Timings seem incorrect (shifted) when comparing to what the VIC2.txt states

Open paich64 opened this issue 1 year ago • 2 comments

Describe the bug Machine PAL, Bad Line, No sprites. running a program cycle by cycle when on a bad line, it looks like the bad line timings reported by The CPU counters are the following: 12 r/w cycles 3 w only cycles 40 cycles stolen by vic2 (43 if the above 3 w only cycles can't be used by any instruction) 8 r/w cycles

However, according to the vic2.txt doc (https://www.zimmers.net/cbmpics/cbm/c64/vic-ii.txt) the timings should be :

11 r/w cycles 3 w only cycles 40 cycles stolen by vic2 (43 if the above 3 w only cycles can't be used by any instruction) 9 r/w cycles

To Reproduce Steps to reproduce the behavior:

  1. Load the .prg in attachement
  2. run it using SYS4096
  3. Hit F10 to stop the execution
  4. Using the VIC2 screen, explore the CPU timings on raster line $83 (which is a badline) and notice the discrepancy that i have reflected in the big picture I have uploaded

Expected behavior Unless I'm wrong, according to the VIC2.txt doc, there should be 11 r/w cycles (not 12) at the beginning of the badline, and 9 r/w cycles (not 8) at the end of the badline.

Screenshots

VicTimingIssueInRetroDebuggerOnBadLine

Desktop (please complete the following information):

  • OS: Windows 10
  • Version : 0.64.68

Additional context

rastcolor1.zip

paich64 avatar Aug 25 '24 22:08 paich64

I have carefully reviewed the VIC2.txt file, and the very first "x" on the list belongs to cycle 63 which has been voluntary duplicated by the author on the left of the document (and cycle 1 has been also voluntary duplicated by the author on the right). Also based on the "phi" signal it's obvious the first "x" belongs to cycle 63 which has been duplicated. VicTimingIssueInRetroDebuggerOnBadLine2

paich64 avatar Aug 25 '24 22:08 paich64

Reviewing again and again I think i made an interpretation mistake : I assumed that because CC transitionned from 02 to 01 when transitionning VC from 0A (10) to 0B (11) meant that LDX#$08 had used cycle 11 as its very first cycle. Which is definitely wrong. Actually LDX #$08 starts at cycle 54 and ends at cycle 55. This means that we have :

cycles 0-10 (11 cycles) cycles 11-53 (43 cycles) - including our 3 W cycles cycles 54-62 - 9 cycles

It's all OK. I apologize for having misinterpreted the retrodebugger figures :/

paich64 avatar Sep 29 '24 20:09 paich64

@paich64 thanks!

OK! No worries, it happens to me also all the time :) Thanks for checking this carefully.

slajerek avatar Oct 16 '24 13:10 slajerek