Commit 8370186
Improve counter/timer accuracy (TOM HC, JERRY PIT reads)
- Replace rand() stub for TOM Horizontal Count (HC) register with
deterministic halfline-based approximation. HC is now updated in
TOMExecHalfline() to 0 at even halflines and HP/2 at odd halflines.
This fixes non-deterministic behavior and gives the Object Processor's
CONDITION_SECOND_HALF_LINE branch a meaningful value.
- Implement JERRY timer register reads (JPIT1-JPIT4 at F10036-F1003D).
Both byte and word reads now return the current prescaler/divider
values instead of silently returning 0.
Refs #62
Co-Authored-By: Claude Opus 4.6 <[email protected]>1 parent 2f9c817 commit 8370186
2 files changed
Lines changed: 36 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
384 | 384 | | |
385 | 385 | | |
386 | 386 | | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
387 | 391 | | |
388 | 392 | | |
389 | | - | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
390 | 405 | | |
391 | 406 | | |
392 | 407 | | |
| |||
426 | 441 | | |
427 | 442 | | |
428 | 443 | | |
429 | | - | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
430 | 451 | | |
431 | 452 | | |
432 | 453 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
732 | 732 | | |
733 | 733 | | |
734 | 734 | | |
| 735 | + | |
735 | 736 | | |
736 | 737 | | |
737 | 738 | | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
738 | 749 | | |
739 | 750 | | |
740 | 751 | | |
| |||
919 | 930 | | |
920 | 931 | | |
921 | 932 | | |
922 | | - | |
| 933 | + | |
| 934 | + | |
923 | 935 | | |
924 | 936 | | |
925 | 937 | | |
| |||
0 commit comments