62 Commits

Author SHA1 Message Date
Wolfvak
031762a1fe
Embed the VRAM tar data in the ARM9 executable (#824)
* Embed the VRAM tar data in the ARM9 executable

* Fix Makefile dependency order

* Use address difference instead of absolute word for the VRAM drive limit
2023-07-24 10:17:37 -03:00
Pk11
5aaac66eef Use sizeof in snprintf where possible, ensure UTF_BUFFER_BYTESIZE
This commit looks a lot bigger than it really is, I noticed a couple spots where with these issues so I ran a regex to find all possible occurrences and switched all that could be, after manually ensuring it was actually correct

Using sizeof on the buffer (as long as the buffer is a char *array*, not a pointer!!) greatly reduces the chance of something having the wrong size because of a later change to the buffer, notably a couple snprintfs were missed in the UTF_BUFFER_BYTESIZE change
2023-04-15 12:54:02 +02:00
Pk11
93ee590cad Make strings translatable 2023-04-15 12:54:02 +02:00
d0k3
c13bba4cfe Fixed a boatload of compiler warnings 2022-03-22 19:40:47 +01:00
Pk11
b366200d4b Switch to a RIFF font format
Fix height of ラ character

I accidentally made it 1px too tall before

Add Cyrillic to default font

Make Я more like latin R

Right after I commit, looking at my screenshot I notice I forgot to tweak the Я to be more angled like this font's latin R...

Improve the default font's Kana

derp fix

Properly handle invalid UTF-8

Fix conversion PBMs with non-byte aligned rows

Rename font extension to .frf

For Font RiFf

Re-add PBM font support

Default converting to CP-437 and try guess size

Revert "Default converting to CP-437 and try guess size"

Reverts 2c9a47d224b28cbb51a3ee335fd9970265201b72 as I think the old behaviour works better given PBM font support being kept

Re-add mapping file for CP-437

Automatically use mapping file with same name as image

ex. for "font_6x10.pbm" it will use "font_6x10.txt" in the same directory
2021-11-14 22:13:55 +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
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
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
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
luigoalma
2760bb4a38 Fixes to mymalloc functions 2020-03-28 07:05:42 -03:00
d0k3
2372340e6d Updated touchscreen playground 2019-10-06 22:28:57 +02:00
Wolfvak
891c0c2a36 adjust stack and code dump lengths to be more useful in real life 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
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
8b098fa91a improvements over the last couple of RGB565 related commits 2019-06-03 02:28:26 +02:00
Wolfvak
256f2465d8 converted all bitmaps to RGB565 2019-06-03 02:28:26 +02:00
Wolfvak
a42dbedf82 fix screenshot functionality 2019-06-03 02:28:26 +02:00
d0k3
500333b011 Some source code reorganisation 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
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
d0k3
10425bfa03 Fix LTO related compiler warnings 2019-03-21 01:57:07 +01:00
d0k3
d762c390af CPPCheck audit, several fixes 2019-03-21 00:42:39 +01:00
d0k3
b8b2c026ac Protect firmlaunch parameters in bootloader
Fixes #424
2018-08-30 16:41:40 +02:00
DMSalesman
99af6a73be Added refined internal user guide
This commit adds an edited README.md to be built into GM9 as user guide.

The scrubbed parts include refs to the GM9 banner, unused MarkDown and
the whole "How to build this / developer info" block.

Links have been replaced with their corresponding anchor text, when
replacing them could be done without altering the sentences' original
meaning.

Certain parts have been further altered, such as the "License"
paragraph, which now includes the full link to GM9's "license.txt".
2018-07-26 00:46:02 +02:00
Hyarion Sanyënóna
a6305206e0 Buffer all BPS, IPS, CRC32 reads in chunks of 1 MB or less 2018-06-18 00:03:12 +02:00
windows-server-2003
46f67e1d18 Fix sprintf format vulnerability 2018-05-17 00:29:03 +02:00
d0k3
c5c02a8d58 Disable PNG support when monitoring the heap 2018-04-19 00:43:35 +02:00
d0k3
e09c9b6e1d Include GodMode9 version in exception dumps 2018-04-18 00:07:57 +02:00
Hyarion
1a9bf41c9d Add support for BPS/BPM/IPS-formatted binary delta patches.
BPS standardization edits.

* Clean up headers.
* Move crc32.c to /crypto/.
* Rename beat.c to bps.c and move it to /system/ with the rest of the non-3DS file formats.

Allocate memory for Source and Target files when possible.

Last-minute BPS improvements.
* BPS fails more gracefully on error, freeing memory and showing a more detailed message.
* BPM no longer deletes the folder it patches to - that should be up to the user.
* BPM is scanned before patching to figure out the total output file size for a more accurate progress bar.

Add IPS support.
2018-04-17 00:49:29 +02:00
d0k3
f34fcf6fa3 Added GodMode64 and BrickedMode9 FLAVORs 2018-04-04 23:28:30 +02:00
Wolfvak
c6e3c0ee30 Save screenshots as PNGs. 2018-04-03 01:17:58 +02:00
Wolfvak
19209918a7 Deprecated PCX code in favor of PNG. 2018-04-03 01:17:58 +02:00
Wolfvak
03014a72ee Initial PNG support (courtesy of lodepng). 2018-04-03 01:17:58 +02:00
d0k3
84bfac6a1b Allow overriding the default font via gm9/support/font.pbm 2018-02-27 00:00:57 +01:00
Wolfvak
0eaa971b50 Fix bootfirm version 2018-02-19 01:02:03 +01:00
d0k3
1e39cbacd4 Batch operations: allow continue after failed operation 2018-02-13 03:11:31 +01:00
d0k3
0086a6bcb5 Improved memmap.h, now used everywhere 2018-02-07 00:43:21 +01:00
d0k3
93485ac287 Fixed all occurences of VGAME_BUFFER 2018-02-07 00:43:21 +01:00
d0k3
cdf72bbdc2 Fix all occurences of SCRIPT_BUFFER 2018-02-07 00:43:20 +01:00
d0k3
14323b4d8d Fix: FIRM from FCRAM handling 2018-02-07 00:43:19 +01:00
d0k3
1b236acc86 Setup heap testing 2018-02-07 00:43:18 +01:00