Commit Graph
375 Commits
Author SHA1 Message Date
marqs 14e7258bfc adapt review comments
* automate coast enable/disable based on sync type
* move glitch filter under sync menu
2026-09-28 21:46:19 +03:00
marqs 0e7345464b fix overlapping setting IDs 2026-09-28 21:16:44 +03:00
Peter YooandClaude Fable 5.1 88577e1467 Add "Sync glitch filt" compatibility option
While an input is locked, single-shot deviations of the frontend
measurements (line count, field period beyond PCNT_TOLERANCE, hsync width
beyond HSYNC_WIDTH_TOLERANCE, activity flag or the validity check) make
get_status() re-program the mode or drop sync. A NeXT SoG source produced
such glitches (868 -> 814 -> 868 lines) every few minutes, each one a
visible blink.

With this option on, a deviation is acted upon only once it has been seen
on three consecutive status reads; the first two deviating reads are
replaced by the previous stable values. That is 30 ms in the normal case
and up to about 105 ms if the vsync wait in get_status() times out on every
read. Counting deviating reads (rather than requiring identical readings)
guarantees that a real mode change or sync loss is always accepted on the
third read. The counter is cleared whenever the input is not locked or the
option is off. Default Off (stock behaviour). Stored as profile item id 69.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WiXHy7Jhh5yTdsBaenucgw
2026-09-18 22:10:53 +09:00
Peter YooandClaude Fable 5.1 5ff096e9d4 Guard clkcnt division against a zero line count
get_status() divides before check_linecnt() validates totlines; with no
lines measured the divisor is zero (RISC-V returns all ones silently).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WiXHy7Jhh5yTdsBaenucgw
2026-09-18 22:10:53 +09:00
Peter YooandClaude Fable 5.1 5fd71e8312 Add "PC SoG/CS coast" compatibility option
tvp_source_setup() disables the TVP7002 internal H-PLL coast for every
PC-type preset. That is right for RGBHV, but with sync-on-green or
composite sync the serration pulses during vsync disturb the H-PLL every
frame; on a NeXTstation Color (1120x832, SoG) this caused continuous
horizontal jitter, jitter in the top third of the picture and a periodic
HDMI re-sync. With the option on, coast is re-enabled after setup when the
sync source is SOG or CSYNC; RGBHV is untouched. Default Off, so existing
behaviour is unchanged. Stored as profile item id 68.

On the NeXT, this option together with the existing settings Analog sync
LPF = 10 MHz, ADC PLL BW = Low and H-PLL Pre/Post-Coast = 4/4 ran 19
minutes without a sync loss, mode re-program or IT6613 video-stable
change. SPARCstation 20 framebuffers (ZX, TurboGX) over composite sync are
stable without it.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WiXHy7Jhh5yTdsBaenucgw
2026-09-18 22:10:53 +09:00
Peter YooandClaude Opus 5 f3b2419da8 Add workstation presets: NeXT 1120x832@72, Sun 1152x900 and 1280x1024
All entries go into GROUP_FIXED_VHZ at the end of the table, so they are
considered only for sources with the matching refresh rate; every other
source is matched exactly as before.

- 1120x832@72 (NeXTstation Color, ADB configuration): 868 total lines,
  62.50 kHz, 90.000 MHz pixel clock (h_total 1440), 1.22 us hsync (110 px),
  3-line vsync; back porches 185/30 and a 45 degree sampling phase tuned on
  hardware. Without it the signal matched 1024x768 and was cropped.
- Sun, timings from the cg6 (GX/TGX) and cg14 (SX) framebuffer PROMs:
  1152x900@66 (94.5 MHz, 1528x937), 1152x900@76 (108 MHz, 1504 total;
  cg6 937 lines @ 76.64 Hz as "1152x900H", cg14 943 lines @ 76.15 Hz as
  "1152x900HS"), 1280x1024@67 (118.125 MHz, 1648x1075, "1280x1024L") and
  1280x1024@76 (135 MHz, 1664x1066, "1280x1024H"). Previously these matched
  1280x960 or the VESA-timed 1280x1024 preset (h_total 1688).

1152x900@66 was verified on a SPARCstation 20 with ZX (Leo) and TurboGX
boards; the other Sun entries are not yet verified on hardware. Mode names
are limited to 10 characters, hence the H/HS/L suffixes.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WiXHy7Jhh5yTdsBaenucgw
2026-09-18 22:10:53 +09:00
Peter YooandClaude Opus 5 b2fd00d439 Add fixed-refresh preset group for workstation modes
get_pure_lm_mode() picks the preset with the nearest total line count.
Several workstation display modes share line counts with each other or with
VESA modes while having one fixed refresh rate (e.g. Sun 1152x900 is 937
lines at both 66 Hz and 76.6 Hz on cg6 boards, and Sun 1280x1024@76 has the
1066 lines of VESA 1280x1024).

Add GROUP_FIXED_VHZ. Presets in this group are candidates only when the
measured refresh is within +-0.3 Hz of the preset (the measured refresh is
exact to about 0.01 Hz). They are appended at the end of the table, so the
early exit of the search loop is replaced by a flag that skips the
remaining regular presets exactly as before but still lets fixed-refresh
presets take part, including the existing equal-line refresh tie-break
(group >= GROUP_720P). Group-indexed arrays in video_modes.c and
controls.c get the extra entry.

No preset uses the group yet, so behaviour is unchanged.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WiXHy7Jhh5yTdsBaenucgw
2026-09-18 22:10:33 +09:00
marqs e800f095de fix 384col and 480p preset processing when PR2x is disabled v1.22 2026-09-05 12:26:19 +03:00
marqs 56509de3b6 add JTAG UART command to disable/enable infrared remote 2026-08-27 21:53:22 +03:00
marqs e6e76171f6 add support for input/profile select via JTAG UART 2026-07-03 23:01:54 +03:00
marqs d653b67ffc add compatibility option for disabling HDMI PR2x 2026-06-28 13:05:51 +03:00
marqs 35f8595a05 misc fixes
* fix compiler warnings
* fix Last Used initial input
* remove duplicate gtia_pal branch
* include hdmi_ar into saved profile
2026-06-25 18:35:05 +03:00
marqs 20bf6d32d7 boot into newly installed firmware after update 2026-06-23 18:49:40 +03:00
marqs e6e2a3305e better support for GBI Line3x generic 2026-06-23 18:49:40 +03:00
marqs85 75adfd8f1a Merge pull request #136 from capriots/aspect
Add an option to set the HDMI aspect ratio flag
2026-06-22 00:37:29 +03:00
Simon Capriotti 91bc0df236 add HDMI aspect ratio flag option 2026-06-20 15:52:41 +02:00
marqs eee3950f2e fix multi-sector SD_Read v1.21 2026-03-07 23:47:28 +02:00
marqs c7fa9527fa finalize Lumacode support 2026-03-07 23:47:02 +02:00
marqs bb4932fc28 update FW image creation instructions 2026-02-02 22:42:13 +02:00
marqs 5a8b914c84 fix multi-sector SD_Write 2026-01-08 00:52:58 +02:00
marqs dd79df5167 update README v1.20 2025-12-21 15:10:25 +02:00
marqs b151be6833 misc bug fixes
* fixed shmask strength and phase adjust hotkeys
* added invalidation for existing shmask and lumacode arrays upon profile load
2025-12-21 14:44:12 +02:00
marqs 8c0a0c181d add Line2x pillarbox option 2025-10-30 21:59:09 +02:00
marqs 32af38e252 code cleanup 2025-10-27 00:25:11 +02:00
marqs e9bfa11fa6 restore Panasonic hack 2025-10-27 00:24:23 +02:00
marqs 906ec6d574 add support for Lumacode Intellivision and custom palettes 2025-10-27 00:23:42 +02:00
marqs 1ba635901a restore latency tester feature 2025-10-11 00:07:11 +03:00
marqs 496e3f68b8 add support for secondary FW 2025-09-06 13:46:20 +03:00
marqs 4606dc4aba add remote hotkeys for shadow masks 2025-09-05 16:14:55 +03:00
marqs 3194ec6ed3 integrate userdata structure from Ossc Pro 2025-08-27 18:27:19 +03:00
marqs 05a9e351d4 integrate general improvements from Ossc Pro
* OSD timing optimizations and cursor color selection
* flash robustness fixes
2025-08-21 18:51:46 +03:00
marqs e09f3c88b0 integrate shmask generation logic from Ossc Pro 2025-06-21 11:52:36 +03:00
marqs d6dba1618b make Lumacode palettes CPU controlled 2025-06-16 22:53:34 +03:00
marqs 6198ce7d9e fix firmware update functionality 2025-05-03 16:14:58 +03:00
marqs 30d403f157 add fatfs 2025-05-02 19:21:32 +03:00
marqs 21f8bc5406 update Codelite project file 2025-04-19 12:33:10 +03:00
marqs 41549e0957 use ndmreset after reprogram 2025-04-19 12:32:51 +03:00
balika011 8ed64b5cba remove deprecated ENABLE_AUDIO option 2025-04-19 12:20:18 +03:00
balika011 933dbbaa75 add SH1107 driver
TODO: auto detect
2025-04-19 12:16:16 +03:00
balika011 6b554e4088 rename spi_charlcd to st7032 2025-04-19 12:15:13 +03:00
balika011 9f0c62c80a update gitignore 2025-04-19 12:10:29 +03:00
balika011 8f779136fa restructure firmware to be more inline with pro 2025-04-19 12:09:37 +03:00
marqs c572fb651a implement ndmreset via RV DM 2025-04-18 22:34:00 +03:00
marqs 3abd3d7ec0 prevent potential alignment issues wrt. link & load 2025-04-09 23:58:29 +03:00
marqs e74da07802 first version booting from flash 2025-03-26 23:30:42 +02:00
marqs 429b0f7201 update README v1.12 2025-03-09 23:07:56 +02:00
marqs fe3c6fdfa7 add Full VSYNC bypas option 2025-03-01 11:23:24 +02:00
marqs 2725351039 change compiler and libc to optimize size 2025-01-23 20:01:10 +02:00
marqs 9af171947a add missing include 2025-01-23 19:24:15 +02:00
marqs 0c8b85d3f2 restore lower default PLL BW for better compatibility 2025-01-23 00:04:32 +02:00