1
0
mirror of https://github.com/marqs85/ossc.git synced 2024-06-01 17:41:37 +00:00
Commit Graph

244 Commits

Author SHA1 Message Date
Ari Sundholm
53eedc9d08 sys_controller/Makefile: Add -flto to compiler/linker flags.
This can (and does) considerably reduce the size of the resulting
binary, and as a bonus, the binary also does work. ;)
2020-11-06 15:04:21 +02:00
Ari Sundholm
0b495b234c altera_epcq_controller_mod.c: Fix faulty read/write end address check.
In the Flash info structure, the field containing the end address of
the Flash storage is documented to be non-inclusive.

However, when this field is compared to the end address of a read or
write, which is also non-inclusive, it is considered an error that
these two values match, which is incorrect, as this would error out
on an attempt to fully read/write the last page.

Fix this by simply changing the >= comparison into a > one.
2020-11-06 14:55:56 +02:00
Ari Sundholm
af1f8a20d4 ulibSD/sd_io.c: Fix line endings to be consistently CRLF. 2020-11-05 19:11:04 +02:00
Ari Sundholm
598705c7fa ulibSD/sd_io.c: Fix writing to SD card.
There were a few things wrong with the SD card write implementation:
1. The protocol change regarding the interpretation of offsets
   introduced with SDHC cards was not taken into account in the write
   path, unlike in the read path.
2. All SPI writes involved in the process were actually issued as reads
   due to the use of the SPI_RW() function, the implementation of which
   seems to have gone through some churn. Likely just an instance of
   bit-rot.
2020-11-05 19:11:04 +02:00
Ari Sundholm
556140dd62 i2c_opencores.[ch], spi_io.[ch]: Improve const correctness. 2020-11-05 19:11:04 +02:00
Ari Sundholm
cd77713255 ulibSD/spi_io.[ch]: Add function to write a single byte over SPI.
Additionally, fix the misleading documentation for SPI_RW().
The new function, SPI_WW() follows the same naming logic, for better
or worse.
2020-11-05 19:11:04 +02:00
marqs
124bcc8df8 Fix profile import 2020-11-01 14:32:28 +02:00
marqs
9c5e7b5b83 advanced OSD implementation 2020-10-05 23:05:43 +03:00
marqs
b26b213ead Mode preset selection improvements
* make selection independent of physical input
* select 480p preset based on hsync length in auto mode
* add 720p_50, 1080i_50 and 1080p_50 presets
2020-08-13 21:32:26 +03:00
marqs
299ac4a24c Clamp/ALC improvements
* more accurate clamp position selection
* fix user clamp offset adjustment in certain cases
* reduce default ALC V filter to 512
2020-08-11 18:43:24 +03:00
marqs
8f65defb49 Merge branch 'eatnumber1-fast-output-only-vref' into release 2020-06-21 23:06:23 +03:00
Russell Harmon
45b093d768 Set only HDMI_TX VREF pins to fast output.
From the Cyclone IV device handbook:

> When you use the VREF pin as a regular input or output, you can expect
> a reduced performance of toggle rate and tCO because of higher pin
> capacitance.

Previously, we had set all HDMI_TX pins to fast output, but doing so
produces some worrying timing violations which were masked over by
relaxation of the SDC constraints. With fast output enabled, actually
fixing the timing constraints would require substantial RTL
optimization.

Instead, by only setting fast output on the VREF pins, I'm able to avoid
the glitching that would occur without any fast output pins when
displaying high clock rate line3x output, while also allowing fitter
enough flexibility to avoid timing violations.

In addition, this commit restores the previously relaxed HDMI_TX timing
constraints to those documented in the IT6613 datasheet.
2020-06-21 19:56:34 +00:00
marqs
4b179d2077 Revert "Add a 2x by 3x line3x mode for the PSP's 480x272."
This reverts commit 2995f43728.
2020-06-17 02:25:31 +03:00
marqs
aa7a92e130 use dash to represent total line count, e.g. 262-p 2020-06-17 02:22:24 +03:00
marqs
daf9ec1611 optimize line3x timing 2020-06-14 20:07:24 +03:00
marqs
2823ab9f8b Merge branch 'eatnumber1-psp-line3x' into release 2020-06-14 14:18:01 +03:00
Russell Harmon
2995f43728 Add a 2x by 3x line3x mode for the PSP's 480x272.
Temporary commit, I don't want people to use this mode until I can
implement 3x by 3x line3x.
2020-06-14 09:54:14 +00:00
Russell Harmon
c2b0687e7b Set fast output on HDMI_TX pins.
Also adjust timing constraits to reflect working state with line3x at
162 MHz.
2020-06-14 09:54:06 +00:00
marqs85
a6d8c51ddd
Merge pull request #50 from eatnumber1/higher-fmax
Ignore paths which use shared clock lines.
2020-06-07 23:19:23 +03:00
marqs85
7afd0faaaf
Merge pull request #51 from eatnumber1/psp-preset
Add 480x272 sampling/optimized mode for the PSP.
2020-06-04 00:18:30 +03:00
Russell Harmon
71147c44dd Add 480x272 sampling/optimized mode for the PSP.
This commit adds both a 480p input sampling mode and line2x optimized
mode for the PSP's 480x272 picture. The line2x optimized mode is enabled
automatically when the sampling mode is selected.

When in-game, the PSP outputs a letterboxed 480p picture. The active
portion of the screen is 480x272, but is treated as 480p (480x720).

In addition, a line2x optimized mode is added which produces a 960x544
output picture, which if desired the top + bottom pixels can be dropped
producing a 960x540 (qHD) picture.

To generate a qHD picture, use the following settings:

V. Active: 270
V. Backporch: 135
2020-06-03 20:33:36 +00:00
Russell Harmon
d80a9fbb0c Ignore paths which use shared clock lines.
Quartus calculates fmax (the theoretical maximum clock rate) based on
the entirety of the logic between registers. In the case of the pclk_*
lines, this includes some invalid paths which cross between the
3x <-> 2x and 5x <-> 4x clock domains. This is because these clocks
share output pins from the PLL, but the PLL is configured to output only
one of these clocks at a time, and the correct output from the logic is
selected via a multiplexer. Therefore these paths cannot co-occur.

This has the effect of increasing the calculated fmax of these paths to:

pclk_3x: 107.98 MHz -> 132.52 MHz
pclk_5x: 162.23 MHz -> 170.33 MHz
2020-06-01 00:31:44 +00:00
marqs
b1892079d8 select 576p / 800x600 preset based on refresh rate 2020-04-28 22:31:57 +03:00
marqs
2319a6f8bd misc tool updates 2020-04-28 18:48:35 +03:00
marqs85
4dab90a651
Merge pull request #38 from MichelsonChapman/release
Update lcd.c
2020-04-08 22:58:12 +03:00
marqs85
3c9ed1edf8
Merge pull request #43 from eatnumber1/release
Increase max V. Backporch value from 63 to 236
2020-04-08 22:56:14 +03:00
Russell Harmon
bab85e713b Increase max V. Backporch value from 63 to 236
This change allows highly letterboxed content (e.g. the PSP's 480x272
picture in a 720x480 frame) to be "zoomed" to a full screen picture by
treating the letterbox as horizontal and vertical backporch.

Co-authored-by: Chris Lockfort <clockfort@gmail.com>
2020-04-07 12:51:36 -07:00
marqs
0c55cc03bb use LEDs for debug in latency tester mode 2020-02-09 21:35:50 +02:00
marqs
a076c6d2db update quartus to 19.1 2020-02-09 21:28:24 +02:00
marqs
8006cad1f2 Analog frontend updates
* add Clamp/ALC offset option
* add ALC V+H filter options
* add Analog STC LPF option
* update AV3 alternative RGB compatibility option
2020-02-09 20:21:53 +02:00
marqs
aa1e9eb60c tvp7002 related updates
* fix clock selection function implementation
* add support for ALC filter configuration
* add coarse clamp LPF selection
* add support for clamp/ALC offset
2020-02-09 20:13:33 +02:00
MichelsonChapman
28d9e40c2f
Update lcd.c
Mod: Additional delay for copycat lcd module
2019-11-14 04:03:06 +08:00
marqs
286c9a94d1 add Kana set to character ROM 2019-10-27 20:16:48 +02:00
marqs
aeb164dd2f increase OSD width in line4x and 5x modes 2019-10-15 20:18:44 +03:00
marqs
70dc68d504 fix dataram size setting 2019-10-12 22:59:04 +03:00
marqs
85c295c5e2 make pll_reconfig more robust 2019-10-12 22:56:10 +03:00
marqs
8e7236dc00 timing optimizations 2019-10-10 01:00:48 +03:00
borti4938
b8c80c7425 put a small border around OSD text area 2019-10-10 00:00:37 +03:00
marqs
9feb96888b fix PLL reference clock switchover logic 2019-10-09 23:58:55 +03:00
marqs
3771d5cb14 fix OSD size in certain modes 2019-10-08 01:08:18 +03:00
marqs
ba4614a4f8 correct even/odd field naming 2019-10-08 01:07:25 +03:00
marqs
b22365af20 add timeout to pll_reconfig and update postprocess pipeline diagram 2019-10-07 23:20:44 +03:00
marqs
3a12592c53 fix linebuf read address timing bottleneck 2019-10-07 01:25:33 +03:00
marqs
9d496383c3 optimize clock network
* replace all clock muxes with a single cycloneive_clkctrl to minimize skew
* use a single dynamically configured PLL to comply with cycloneive_clkctrl
2019-10-06 23:54:32 +03:00
marqs
d1fd30019f osd_generator: add M9K support to allow larger character array 2019-10-05 11:33:59 +03:00
marqs
a6bdd8cfab free up 1 M9K by modifying altera_jtag_avalon_master 2019-10-03 23:47:59 +03:00
marqs
6266976114 first OSD implementation 2019-10-03 02:03:43 +03:00
marqs
aa43991534 add mask color option 2019-09-30 19:31:05 +03:00
marqs
c7fc62c038 use symlinks for SW IP BSP files 2019-09-30 18:56:27 +03:00
marqs
077ce8afdc update fitter seed to more optimal value 2019-09-28 12:16:32 +03:00