1306 Commits

Author SHA1 Message Date
Balint Kovacs
fa741b265b Write support for NTR saves
Why does this work? We are writing flash memories without erasing them,
and writing pages without regard to alignment. Yet it works?
2019-10-11 16:24:08 +02:00
Balint Kovacs
38d9a23427 Minor cleanup of gamecart.c 2019-10-11 16:24:07 +02:00
Balint Kovacs
7b0a101f13 Add read support for CTR cartridge saves
I have done nothing, however, to decrypt them. There is also no write
support.
2019-10-11 16:24:07 +02:00
Balint Kovacs
f60a4c1f63 Add a vfile to show the JEDEC id for the inserted cart
This is meant to replace the Prompt I was using previously.
Fun fact: WarioWare DIY seems to have *something* on the SPI bus, as it
returns an ID of 0x000001 consistently. Or am I just glitching the
parallel flash? Or did I get a fake?
2019-10-11 16:24:07 +02:00
Balint Kovacs
fd48c95deb Add a timeout to SPIWaitWriteEnd
Solves the WarioWare issue
2019-10-11 16:24:07 +02:00
Balint Kovacs
556c75c337 Fix many bugs by simplifying SPICARD init
* Fixed card reading (I didn't notice I broke it)
* Fixed cart swapping
* Still unsupported: CTR carts
* Still hangs if cart has no SPI flash (see WarioWare DIY)

The initialization code was simplified to only enable the SPICARD
interface, which assumes the *TRCARD interface has been initialized
beforehand.
To keep things simple, I just wrapped SPIWriteRead with SPICARD_Init and
SPICARD_deinit (which does the exact opposite)
2019-10-11 16:24:07 +02:00
Balint Kovacs
ac4ec6ee90 spicard.h: use void* pointers
First initialized cart reads correctly now, and cardswap just hangs.
2019-10-11 16:24:07 +02:00
Balint Kovacs
2ceafc545b First viable(-ish) prototype
For some reason (messed up memory access?) the first two time I read the
status register, I get garbage.

Also:
* Reinserting card breaks SPI (everything reads 0xff
* No support for CTR carts for now
2019-10-11 16:24:07 +02:00
d0k3
a3cc272e63 Try to fix the infloop
Debug output (revert this later)
2019-10-11 16:24:07 +02:00
d0k3
01bc082ca0 Initial support of cartridge savegame reads 2019-10-11 16:24:07 +02:00
Wolfvak
beb2a881cd fix compilation warning due to ternary operator results having differing signedness 2019-10-09 22:31:09 -03:00
Chromaryu
d4cd60eccf Travis: Enable Sudo-safe container (#544)
Use latest ubuntu distribution, this time Bionic.
2019-10-09 20:36:11 -03:00
d0k3
2372340e6d Updated touchscreen playground 2019-10-06 22:28:57 +02:00
d0k3
392b59976b Got rid of the Testing menu
... (hint) also hiding a secret here
2019-10-06 14:02:05 +02:00
d0k3
00c0dac479 Fix notification LED color 2019-10-05 20:00:14 +02:00
d0k3
5799d99c4c Fix installing FIRMs 2019-10-04 18:26:08 +02:00
d0k3
760052f20d Fix #541 2019-10-03 17:04:35 -03:00
d0k3
e7948d9a2f Fix entering the boot menu in bootloader 2019-10-03 17:04:35 -03:00
Wolfvak
891c0c2a36 adjust stack and code dump lengths to be more useful in real life 2019-10-03 17:04:35 -03:00
d0k3
1633961707 Allow game icons as preview for scripting 2019-10-03 17:04:35 -03:00
d0k3
0e701ea719 Fix flavor colors 2019-10-03 17:04:35 -03:00
Wolfvak
a9624b6d81 fix a potential mcu bug 2019-10-03 17:04:35 -03:00
Wolfvak
ea26510402 remove unnecessary parameters being passed 2019-10-03 17:04:35 -03:00
d0k3
622fb38223 Fix compiler warnings (thanks @aspargas2) 2019-10-03 17:04:35 -03:00
d0k3
85c43795c3 Partially fix #537 (two fixes make one) 2019-10-03 17:04:35 -03:00
Wolfvak
47312797e2 Partially fix #537
if size was zero, the inputstr array could contain stack garbage
2019-10-03 17:04:35 -03:00
Wolfvak
53708e64dc
Fix Travis, take 3 2019-10-03 08:13:35 -03:00
Wolfvak
380d3ced7a Fix Travis CI, take 2 2019-10-01 17:18:16 -03:00
Wolfvak
db9b2cf8ec Reinstate Travis CI, take #1 2019-09-29 22:12:51 -03:00
aspargas2
97fed0a284 vdisadiff: reduce memory usage when fixing hashes, and fix an alignment bug 2019-09-29 19:53:30 +02:00
aspargas2
85960298e4 add wwylele and myself to the credits
because Wolfvak said I could :3
2019-09-29 19:53:30 +02:00
aspargas2
50770616d7 refactor bdri to operate on a file representing the diff ivfc lvl4
intended use here is now to mount the diff file as an image, then use bdri calls on partitionA.bin
2019-09-29 19:53:30 +02:00
aspargas2
f8b9332728 implement vdisadiff 2019-09-29 19:53:30 +02:00
aspargas2
1026a60597 add virtual disadiff mounting code 2019-09-29 19:53:29 +02:00
aspargas2
7322e31f43 refactor disadiff to cater more nicely to a vdisadiff 2019-09-29 19:53:29 +02:00
aspargas2
0283692e83 add BDRI handling 2019-09-29 19:53:29 +02:00
aspargas2
0b3b5529f2 add DISA/DIFF writing
this has only been tested with DIFF, specifically title database type files, but there's no reason it shouldn't work on all DISA/DIFF files
2019-09-29 19:53:29 +02: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
3e25393284 fix #539
saner new3DS vs old3DS detection
2019-09-29 19:53:28 +02:00
aspargas2
398c7fd14c fix null pointer deref when cancelling ticket.db mounting
take 2
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
1a0fe17b6c better FIRM checks, fix unchecked NULL that triggered a data abort 2019-09-29 19:53:28 +02:00
Wolfvak
c8a7c63963 fix unicode FAT labels (#508) 2019-09-29 19:53:28 +02:00
d0k3
e6b63f328b Store manual calibration data in a support file 2019-09-29 19:53:28 +02:00
Wolfvak
cb4ea7217a fix entrypoint detection algo (nandboot, #514) 2019-09-29 19:53:27 +02:00
Wolfvak
524a86e9a4 fix issue #512 2019-09-29 19:53:27 +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
3061da4dcc Refactor file/dir/drive information dialog and attribute setting
Now allows directory attributes to be set
2019-09-29 19:53:26 +02:00