32 Commits

Author SHA1 Message Date
Wolfvak
fd5320b86f - properly align ARM11 stacks and buffers
- add very simple exception dumping for the ARM11
2019-09-29 19:53:28 +02:00
Wolfvak
2ef408f4af fix broken cross-buffer assumption, check nvram reads 2019-09-29 19:53:28 +02:00
Wolfvak
d6c6f56526 fix compilation warnings due to unaligned packed structures in newer gcc 2019-09-29 19:53:27 +02:00
Wolfvak
88751ab96a refactor build system code to allow common code to be built for each target 2019-09-29 19:53:27 +02:00
Wolfvak
07b2a2beb6 fix backwards compatibility with software that exclusively uses the old SPI interface
fix PXI acknowledgement bug that prevented older GM9 from booting
2019-09-29 19:53:27 +02:00
Wolfvak
bd74ad00d8 add initial brightness config dialog, currently inaccessible 2019-06-07 17:13:42 -03:00
Wolfvak
8b098fa91a improvements over the last couple of RGB565 related commits 2019-06-03 02:28:26 +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
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
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
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
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
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
Wolfvak
7937540162 Entrypoint detection stuff (untested) 2017-10-26 20:27:02 -03:00
Wolfvak
8a4597635d Potentially fix screen init on some systems
Sanitized I2C
Reorganized the memory layout
 - Moved GM9 to ARM9 RAM
 - Increased RAMdisk size to 88MiB
2017-09-26 19:56:19 -03:00
Wolfvak
1a65b4e7f0 Fix backlight turning on issue 2017-08-23 13:31:17 +02:00
Wolfvak
5104deff9e Refactored screeninit 2017-08-23 13:31:16 +02:00
Wolfvak
7d8f6bb368 Hardcoded framebuffers
VRAM addresses are in common/vram.h

Now waits for the ARM11 to ack before running
2017-08-18 18:53:54 +02:00
Wolfvak
e920bd34a4 Fixed the MPcore interrupt handler, added local ARM9 exception handler 2017-08-16 01:44:49 +02:00
Wolfvak
930b646008 Improved MPcore interrupt handler 2017-08-16 01:44:48 +02:00
Wolfvak
b56ca0e8b8 Added brightness adjustment through the volume slider, made the ARM11 finally do something rather than sit and wait for the entrypoint 2017-08-08 09:40:09 -03:00