1128 Commits

Author SHA1 Message Date
Wolfvak
6823e15584 enable write buffering on VRAM, optimize some UI drawing algorithms 2019-06-03 02:28:25 +02:00
Wolfvak
bb5182cae3 skip unnecessary fixed point conversion + multiplication in touchscreen reading code 2019-06-03 02:28:25 +02:00
Wolfvak
6dc89d7107 compile time fixed brightness bugfix, reinstated command to set brightness from ARM9 2019-06-03 02:28:25 +02:00
Wolfvak
50e97d2dab Moved most things to RGB565 2019-06-03 02:28:25 +02:00
d0k3
73d8d14bd5 Fix #478 2019-06-03 02:28:25 +02:00
d0k3
dbd8b8aca8 Included software keyboard in testing 2019-06-03 02:28:25 +02:00
d0k3
ca8c2070f5 Change how TouchboxGet() works 2019-06-03 02:28:25 +02:00
d0k3
f4fc17f145 Tweak button delay in hid.c 2019-06-03 02:28:24 +02:00
Wolfvak
7d3a5270f1 fix lodepng CRC calculation 2019-06-03 02:28:24 +02:00
d0k3
9cc31b6f56 Fix several alignment assumptions 2019-06-03 02:28:24 +02:00
d0k3
c3152838db Move touchbox functions to hid.c / hid.h 2019-06-03 02:28:24 +02:00
Wolfvak
2f64a8046a - compile with size optimizations, reduces inst cache pressure
- removed most of lodepng's optional features
- lodepng now uses the already existing CRC32 code instead of using its own copy
- fixed GIC interrupt priority
2019-06-03 02:28:24 +02:00
d0k3
cadc7e6982 Revert to old splash logo 2019-06-03 02:27:44 +02:00
d0k3
ff9fde1561 With shell closed, use the LED to signal finished operations 2019-06-03 02:27:44 +02:00
d0k3
85a189b3b6 Move testing stuff to its own menu entry 2019-06-03 02:27:44 +02:00
d0k3
df21331218 New & improved touchscreen playground 2019-06-03 02:27:44 +02:00
Wolfvak
77f857ab64 - added way to prevent a race condition when reading the touchscreen values
- simplified CODEC init and read code
- fixed I2C register

thanks to @profi200 for the last two points
2019-06-03 02:27:44 +02:00
d0k3
dad662610d Moved touch testing functions to HOME -> more... 2019-06-03 02:27:44 +02:00
d0k3
54caa3588e Added touchscreen calibration from NVRAM (thanks @wolfvak) 2019-06-03 02:27:44 +02:00
d0k3
36c03e578c Enable screenshots in touch test functions 2019-06-03 02:27:44 +02:00
d0k3
500333b011 Some source code reorganisation 2019-06-03 02:27:43 +02:00
d0k3
bc66cd0ccf Improved touchscreen calibration GUI & playground 2019-06-03 02:27:43 +02:00
Wolfvak
08b53f71e1 Fix clobbered registers on MRC/MCR/MRS/MSR C wrappers
Previously the compiler could've optimized stores/reads to be placed outside of critical sections, etc
2019-06-03 02:27:43 +02:00
Wolfvak
a6734af45d licensing bs 2019-06-03 02:27:43 +02:00
Wolfvak
46a5735f5c - fixed bug where a N3DS without extra FCRAM enabled would get stuck on boot 2019-06-03 02:27:43 +02:00
Wolfvak
ad9a9bd5a0 - turn off the LCDs when the lid closes, and turn them back on when it's open
- reset LEDs on boot
- add code to set the notification LED
- add a PXI command to verify the NVRAM is actually online
- notify the ARM9 about the shell state through the HID thing
2019-06-03 02:27:43 +02:00
Wolfvak
79aa9191f7 - clamp down the touchscreen coordinates to boundaries
- fix annoying compilation warning regarding unsigned vs signed comparison
2019-06-03 02:27:42 +02:00
Wolfvak
70757e3385 - added extremely simple calibration dialog, to be replaced by something prettier/saner/safer at a later point in time
- moved all SPI code to the ARM11
- reimplemented NVRAM reading for the new SPI interface
2019-06-03 02:27:42 +02:00
Wolfvak
b52bf3b9a5 refactored SPI and CODEC drivers, getting ready to move all SPI ops to the ARM11 2019-06-03 02:27:42 +02:00
Wolfvak
1b04ca4fa1 - added touchscreen calibration code
- added very simple 12-bit precision fixed point arithmetic code as a fast float replacement
2019-06-03 02:27:42 +02:00
Wolfvak
bf45ee3900 - added new SPI and CODEC drivers ported from linux, thanks to xerpi
- circle pad simulates dpad keys (up, right, down, left)
- raw touchscreen data is provided but currently unused
- added a simple shared memory region thing
- fixed the 10ms delay to be _after_ the backlights are turned on, thanks to profi again

as always, other stuff I probably forgot about
2019-06-03 02:27:42 +02:00
Wolfvak
bcff09a389 added a small 10ms wait before turning on the backlight, thanks to profi for reminding me of that 2019-06-03 02:27:42 +02:00
Wolfvak
f5a877d00b - implemented MCU stuff and its interrupts, thanks @profi200 for the info
- moved brightness control to the ARM11
- moved HID updating to the ARM11
- moved screen init from ARM9 to the ARM11, always performed unconditionally
- removed unnecessary SCREENINIT and SET_BRIGHTNESS pxi commands

and other stuff I probably forgot about
2019-06-03 02:27:41 +02:00
Wolfvak
5e56cd2f77 - refactored arm11/sys.c
- moved common.h from the ARM9 tree to the common code tree
- does proper deinit now on the ARM11 side

the bug that caused it to fail to launch some FIRMs has been fixed - it can even boot stock FIRMs
2019-06-03 02:27:41 +02:00
Wolfvak
016eac6982 - properly set up MMU tables with caching and other fun stuff
- maps a regular ARM-style exception vector table instead of using the bootrom vector redirection

features a ton of bugs because I'm missing something, it actually manages to boot fb3DS v1.2 and BAX fine, but fails to boot itself
2019-06-03 02:27:41 +02:00
Wolfvak
2f86686388 renamed most low level functions and other stuff to fit with the current theme
- added initial SCU twiddling
- added very untested and unusable SMP code
- fixed race condition that happened on boot
- added initial MMU code (just super basic identity mapping, no caching set up or anything)
- enabled some of the fancier ARMv6 features
- reorganized ARM11 files into their own folders
- possibly more stuff I'm forgetting about
2019-06-03 02:27:41 +02:00
Wolfvak
e70b8ab116 - unified CPU/cache header that works on C and asm code
- added legacy boot PXI command that allows power savings on ARM11
2019-06-03 02:27:41 +02:00
Wolfvak
987b820c4a beginning of better ARM11:
- moved I2C code to the ARM11 (with an ugly hack that MUST be fixed)
- reworked the PXI protocol to have lower latencies and remove any potential async support
2019-06-03 02:27:41 +02:00
DMSalesman
9ab9c01aae Update user manual 2019-04-30 13:38:27 +02:00
d0k3
602b6fc7df Updated readme file, recommend fastboot3DS as bootloader 2019-04-29 00:30:08 +02:00
Wolfvak
796457e54c Restored autodependency generation 2019-04-19 15:19:37 -03:00
d0k3
c86ebe4baa CIA checker tool: properly detect custom TMD 2019-04-17 00:45:48 +02:00
d0k3
151e6389ac Use iomemcpy for registers (thanks @profi200) 2019-04-17 00:45:48 +02:00
d0k3
afd2c6593c Updated GM9Megascript.gm9
Thanks @annson24, @Validusername16 and @eip618! Merges #468
2019-04-16 00:50:24 +02:00
luigoalma
6a95643edb Very minor optimization
It only effect happens at common misaligned memory check and fixup
Does the exact same end result, just in less 2 instructions and independent of r4 and r5, using r12 instead
2019-04-16 00:41:31 +02:00
d0k3
ce71e56a52 Added third anniversary edition splash v1.8.0 2019-03-21 01:57:07 +01:00
d0k3
10425bfa03 Fix LTO related compiler warnings 2019-03-21 01:57:07 +01:00
d0k3
d4e7f092fa Reenabled LTO (fixed in dkA r52) 2019-03-21 01:23:13 +01:00
d0k3
d762c390af CPPCheck audit, several fixes 2019-03-21 00:42:39 +01:00
d0k3
539099db81 Fix compiling script runners 2019-03-20 23:53:50 +01:00