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

203 Commits

Author SHA1 Message Date
marqs
8b7258fa9e update Codelite workspace config 2021-07-31 18:08:16 +03:00
marqs
1ab1636619 Merge branch 'release_userdata_export_fat16' of git://github.com/megari/ossc into megari-release_userdata_export_fat16 2020-11-27 23:09:46 +02:00
Ari Sundholm
0abb7e9bb3 menu.c: Fix a typo in a Japanese translation.
This looks like a simple case of mistyping the ヲ particle, denoting
the object in the menu title.
2020-11-26 01:24:49 +02:00
Ari Sundholm
58d81cbc5f menu.c: Translate name of Settings opt menu to Japanese. 2020-11-26 01:24:49 +02:00
Ari Sundholm
6542ecaae1 Userdata export: Translate status and error messages to Japanese. 2020-11-26 01:24:49 +02:00
Ari Sundholm
709187bb43 Userdata export: provide Japanese translations for prompt.
Checked with a native speaker working in the software industry.
2020-11-26 01:24:49 +02:00
Ari Sundholm
760be1738e Userdata export (FAT16): Optimize code size.
Reorganize the and optimize the code to avoid redundant code and thus
reduce code size, while making sure to zero-initialize the used areas
on the SD card. These are the "clean" part of this change.

The "dirty" part:
Optimize the FAT16 export code further by introducing small deviations
from the FAT16 specification. These deviations should not be harmful
at all, unless the SD card is used for something requiring the jump
instruction and/or boot code in the boot sector to be valid. This is
typically only required when booting off the filesystem.

After these changes, a considerable reduction in code size can be
observed for sys_controller.elf and sys_onchip_memory2_0.bin:

sys_controller.elf:
   text	   data	    bss	    dec	    hex	filename
  32392	   2936	   2652	  37980	   945c	sys_controller.elf

sys_onchip_memory2_0.bin:
size: 35328 bytes

This reduces the cost of the FAT16 export feature to 446 bytes.
2020-11-24 23:50:05 +02:00
Ari Sundholm
12436a3d3f Userdata export: Fix remaining regressions in FAT generation. 2020-11-24 23:50:05 +02:00
Ari Sundholm
c5c3d28b48 Userdata export: Fix regression in generating FAT in multiple steps. 2020-11-24 23:50:05 +02:00
Ari Sundholm
67a64693c1 Userdata export: Zero out whole FAT area and handle SD write errors. 2020-11-24 23:50:05 +02:00
Ari Sundholm
8068542da1 Userdata export: export settings on a FAT16 filesystem. 2020-11-24 23:50:05 +02:00
marqs
2e7141c3b2 update 384p preset params to avoid conflict with PC88/98 modes 2020-11-17 17:40:23 +02:00
marqs
015f63ddff display profile name on infoscreen 2020-11-10 20:09:18 +02:00
marqs
6666db3ea2 Merge branch 'megari-release_userdata_export' into release 2020-11-10 19:56:19 +02:00
marqs
238cf0b285 update epcq_controller_mod to epcq_controller2 2020-11-10 19:46:07 +02:00
Ari Sundholm
89bc3f35e7 Userdata export: Reduce image size by 20 bytes.
Replace an array of const char* literals with a single const char*
literal containing all the messages in the rotating prompt and an
array of alt_u8 containing the offsets of each message within the
literal.

This ends up yielding a larger size reduction than expected, a
healthy 20 bytes, despite a meager 8-byte difference in the size
of local variables and slightly more complex pointer math in
calculating the address of the current message within the string
literal.
2020-11-09 19:12:41 +02:00
Ari Sundholm
b68b586ec8 Userdata export: Shrink the warning message code a bit. 2020-11-08 23:09:58 +02:00
Ari Sundholm
8df33bb364 Show warning message before exporting to SD card. 2020-11-08 17:39:26 +02:00
Ari Sundholm
32bbc49bf0 Userdata export: Fix menu behavior, particularly with the OSD.
The behavior of the menu option was all over the place, and would
easily leave the OSD in a weird state, requiring the user to blindly
do something that completely redraws the OSD.

Fix this by making the behavior similar to that of the userdata import
feature, with the difference of giving a more specific error message
when something goes wrong.
2020-11-07 01:39:06 +02:00
Ari Sundholm
b890446e3d Implement userdata export.
A very simple implementation, as we are very short on remaining
block RAM. Simply blindly copies the entire userdata area to the
SD card. This may subject the SD card to some extra wear, as well
as potentially read-disturb some Flash memory pages, but this would
require more code.
2020-11-06 15:06:29 +02:00
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
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
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
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
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
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
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
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
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
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
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
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