d0k3
c8caf5888f
Fix -flto parameter in Makefiles
2025-10-17 19:38:36 +02:00
Wolfvak
7b6b478582
Use VA start and end linker symbols instead of length ( #865 )
2024-06-19 16:19:45 -03:00
ihaveahax
ad8b5e0a8c
arm9/arm11 Makefile: Fix building with spaces in path ( #828 )
...
This quotes $(CURDIR) which fixes an issue with building GM9 in a path
with spaces, which Windows users are likely to have.
2023-08-25 21:58:22 -03:00
Wolfvak
b5fca3bc7e
Use the correct MCU LED period for calculations ( #807 )
...
Fixes #772
2023-04-25 10:13:07 -03:00
aspargas2
658c9b491c
use --use-blx linker argument
...
makes firm about 500 bytes smaller for free
2022-04-16 18:40:47 -04:00
d0k3
ee43fe328f
Fix a compiler warning
2021-02-21 14:40:33 +01:00
Wolfvak
31389687ab
event model seems to work
...
refactors all the ugly "pendingX" atomic operations into a single "Event" subsystem/interface thing with two operations
moves all existing code to use this instead
also changes the "bkpt" macro to also indicate unreachable code
2021-02-21 14:40:33 +01:00
Wolfvak
eadc1ab6b9
simplify the sharedmem buffers
...
also made the wait on boot unconditional
2021-02-21 14:40:33 +01:00
Wolfvak
9ecb90a2ba
make interrupt handlers more lazy, most processing is done in interruptible context now
...
- completely moved MCU interrupt handling outside of the critical section
- refactored a bit of the PXI code and command names
- merge the I2C read and write cmds to be one
- remove SET_VMODE cmd, now it's always initialized to BGR565 on boot and to RGB565 on firmlaunch
- atomic-ize more stuff
2021-02-21 14:40:33 +01:00
Wolfvak
a6e20c641a
initial mcu events implementation
...
- backlight power control is reinstated but currently buggy, for some reason the __builtin_trap is tripped on GFX_powerOnBacklights and GFX_powerOffBacklights
- also refactored a bunch of other code pertaining to mcu and other hw init, moved the gpu init to a later point since lcd init now depends on mcu events
2021-02-21 14:40:32 +01:00
Gabriel Marcano
d010f2858b
Remove trailing white space
...
- Removed trailing whitespace from all source code files (.c, .h. and
.s) and the README.md
2020-08-26 23:01:58 +02:00
Wolfvak
1f2514f19e
forgot to update non-FIXED_BRIGHTNESS mode
2020-08-22 17:15:10 -03:00
Wolfvak
a2e574a451
fix #622
2020-08-22 16:37:27 -03:00
Wolfvak
68a4ceac5b
add another pxi barrier for firmlaunch
...
fixes a race condition when booting gm9 from itself (especially noticeable on new3DS consoles)
2020-08-19 23:11:45 -03:00
Wolfvak
bf767f2c01
add a needed delay for new 3ds consoles ( #617 )
2020-08-04 16:41:10 -03:00
Wolfvak
4dc5661d58
use hardcoded configuration for ARM11 interrupts
2020-08-02 11:40:18 -03:00
Wolfvak
8a7448995f
fixed overlooked ARM9 exception handler issue where code would be dumped incorrectly, modified ARM11 exception vectors to not take an entire page of compiled code
2020-07-26 10:27:48 -03:00
Wolfvak
f835469e19
rewrite the bootrom function header, add more operations and add ARM11 versions
...
- the bootrom is now mapped on the ARM11
- removed the waitClks in favor of a more canonical implementation (subs r0, r0, 4/5 + branch back)
2020-07-24 13:37:29 -03:00
Wolfvak
3973ce57df
revert back to using Thumb code for the ARM9 binary
...
leads to better density and therefore much smaller FIRM sizes
2020-07-23 20:33:46 -03:00
Wolfvak
929cc7fdcf
better hints to reduce compiled size by a few kb
...
mostly just added static const to constant arrays/buffers
2020-07-23 13:46:42 -03:00
Wolfvak
6487307cf0
improved mmu and gic code
2020-07-19 11:59:52 -03:00
Wolfvak
5905fb84fb
removed the cross allocator, use the shared memory region instead for I2C and NVRAM transfers
2020-07-19 11:44:03 -03:00
Wolfvak
30f0b004c2
fixed screen init, hopefully the last commmit
...
- properly performs gpu/backlight reset
- nukes vram so the initrd had to be moved to arm9 memory, and have its size (at least temporarily) limited to 256k
2020-07-18 20:25:34 -03:00
santiago
1e92163245
lazy fix for the screen init bug, hopefully
2020-05-09 16:24:40 -03:00
d0k3
e58760231a
Fix building with FIXED_BRIGHTNESS
...
@thanks uwabami
2020-01-02 21:07:22 +01:00
Wolfvak
915cb2d13e
Hopefully fix #466 - now it resets the GPU/LCD into a known state instead of leaving the previous one on
2019-10-13 18:32:41 -03:00
Balint Kovacs
d2f596e7a3
Merge ARM11 spi and ARM9 spicard drivers
...
Also centralize device IDs into SPI.h
2019-10-11 16:24:08 +02:00
Wolfvak
a9624b6d81
fix a potential mcu bug
2019-10-03 17:04:35 -03:00
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
04bf6438de
lowered circle pad sensitivity on the horizontal axis
2019-06-03 02:28:27 +02:00
Wolfvak
ca7944ce04
- enable the VFP on the ARM11
...
- stopped using the ITCM as the interrupt vector table
- removed dead Thumb code handler in interrupt handling
- added basic memory protection flags
2019-06-03 02:28:26 +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
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
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
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