57 Commits

Author SHA1 Message Date
Brian Pugh
55394c70e3 Add naive zelda START and SELECT button support. Currently they just perform the same actions as GAME and TIME, respectively 2021-11-16 18:34:47 +01:00
Konrad Beckmann
ee3cb5e9b5 Add screenshot support
Closes #163
2021-10-31 02:30:13 +02:00
Brian Pugh
c1cddb4769 Increase number of brightness levels to 10 (#141) 2021-08-25 17:42:06 +02:00
Brian Pugh
278616969e fix savestates from saving/loading from the wrong location when __EXFLASH_OFFSET__ is specified (#136) 2021-08-17 20:13:39 +02:00
Konrad Beckmann
a0497229fd Set default display brightness to level3 2021-08-12 20:00:51 +02:00
northskysl
d9542eb709 STM32 RTC Hardware Support & User Interface for Watch and Calendar (#128)
* Update rg_main.c

Added a menu to view and configure RTC parameters. It is activated by pressing 'TIME' button in retro-go main menu.

* Update main.c

Enable LSE oscillator and enable it as RTC clock source. Additionally enable CRS Sync LSE.

* Added time display to RTC menu

Added time display to RTC menu and also modified RTC initialization code so that it does not set the RTC date and time. Assuming that a fresh RTC has sensible values.

* Add date display to time menu

Added date display to time menu

* Fix predivs for LSE

Fixed predivs for LSE clock

* move RTC stuff to rg_rtc

Consolidate all RTC functions to rg_rtc. So far getters have been implemented only.

* Time setup UI + setters for Time

Setters for Time have been implemented and Time setup has been added into the UI to use them.

* Date setup added

Date setup with callbacks added

* Add real time datetime display

Modified the time menu to display and update in real time.

* Add a function to return Unix time

Unix time is returned as a 64-bit time_t. Casting to uint32_t will yield time in seconds since 1st Jan 1970.

* Fix setters' return type

Fixing warnings about wrong setter return type.

* Update rg_rtc.h

Missed the .h while updating return types of setters.

* Update rg_rtc.c

Add a nicer year display

* Reactivate LSI

This should fix an issue with DACs that causes Brightness control not to work.
2021-08-12 14:34:00 +02:00
Konrad Beckmann
67685edea6 main: Increase max extflash size to 256 MB 2021-08-05 08:49:31 +02:00
Konrad Beckmann
57601aa086 BSOD: Turn on the backlight
Useful if hitting an assert very early
2021-08-04 16:16:30 +02:00
Konrad Beckmann
ade7cb6fc5 New flash driver and integrated loader 2021-08-03 17:06:54 +02:00
Konrad Beckmann
e4ec6ce857 Set TIM1 frequency to 1Hz and add an uptime counter 2021-07-03 00:23:51 +02:00
Konrad Beckmann
0459feb40a debug: Add more flash debug features 2021-06-17 12:22:46 +02:00
Konrad Beckmann
b250e5c555 Add debug menu to show flash jdec id 2021-06-17 10:30:58 +02:00
Scorp0rX0r
0e2edb09d2 Fix LCD init and merge resume support 2021-02-07 16:36:09 +01:00
Konrad Beckmann
a047912570 main: Fix BSOD infinite loop 2021-01-16 01:25:49 +01:00
Franz Levin
bc61c642b1 battery: Added battery status 2021-01-11 02:30:22 +01:00
Franz Levin
58573dc296 cubemx: Generated new code 2021-01-11 02:30:22 +01:00
Konrad Beckmann
d3bdb98781 Persist and show log after watchdog reset 2021-01-08 16:04:20 +01:00
Konrad Beckmann
9359d8b374 bsod: Encode fault in boot magic 2021-01-08 15:38:55 +01:00
Konrad Beckmann
c34d0e2cb8 Set boot_magic when watchdog expires 2021-01-08 15:32:41 +01:00
Jan Dumon
00e5d9a25c Added a watchdog to avoid power-cycles when things go wrong 2021-01-08 14:28:48 +01:00
Jan Dumon
47dc364af2 flash: align erase size with the address
Sub-block erases should be aligned with the size: e.g. 32kB erase should
only be done on 32kB boundaries, 64Kb erase should only be done on block
boundaries.
2021-01-05 15:44:14 +01:00
Konrad Beckmann
58470a91b9 Only disable caching on fb ram 2021-01-04 06:35:25 +01:00
Konrad Beckmann
f91e20153b Add unaligned mempcy fix 2021-01-02 21:28:28 +01:00
Konrad Beckmann
db504ed905 main/flash: Use SPI_MODE
This will make the project work for everyone for now.
This should be revisited later.
2021-01-02 04:22:46 +01:00
Konrad Beckmann
2c3c566437 Support 4K, 32K and 64K flash erase 2020-12-29 17:02:43 +01:00
Konrad Beckmann
bd02b964fe Fix some additional warnings 2020-12-27 22:01:33 +01:00
Jan Dumon
e618b0d8ef fixed compiler warnings 2020-12-27 19:54:48 +01:00
Konrad Beckmann
2815b9a00a BSOD: Reboot device after a button is pressed 2020-12-27 16:34:36 +01:00
Konrad Beckmann
c9904a37a3 Improve blit/scaling performance 2020-12-27 16:28:30 +01:00
Konrad Beckmann
05dc1d3211 Reset if going into standby fails 2020-12-27 16:24:54 +01:00
Konrad Beckmann
250d9c8253 Support deleting of saves 2020-12-27 16:22:03 +01:00
Konrad Beckmann
c01f51ff57 Finalize state save/load for gb and nes 2020-12-27 16:21:59 +01:00
Konrad Beckmann
4b3ab433f5 Backlight support using DAC 2020-12-27 16:19:57 +01:00
Konrad Beckmann
b12048899e Generate and include git hash in BSOD 2020-12-27 16:19:50 +01:00
Konrad Beckmann
c539baff52 Add BSOD 2020-12-27 16:19:45 +01:00
Konrad Beckmann
1374269566 Lots of stuff, menu working better than before 2020-12-27 16:19:40 +01:00
Konrad Beckmann
9f554e4e69 Add MPU protected redzone for the stack 2020-12-27 16:19:15 +01:00
Konrad Beckmann
d4854c7310 Add initial GUI hack 2020-12-27 16:17:27 +01:00
Jan Dumon
2ba0693124 protect the nullpointer redzone with the MPU
An additional region is configured in the MPU to cause memory faults
when the processor tries to access the nullpointer redzone.
2020-12-14 11:36:09 +01:00
Konrad Beckmann
da93267953 Fix broken memcpy implementation
Related to #13
2020-12-12 13:43:30 +01:00
Konrad Beckmann
181ce5b894 Build with D_FORTIFY_SOURCE=1
This also adds a naive memcpy implementation to work around
bounds checks. This is done because of symbols coming from
the ld script that don't have the correct length.

If anyone knows how to fix this properly, PRs are always welcome!

This is an alternate solution to #13
2020-12-12 13:38:17 +01:00
Konrad Beckmann
89abc22b27 Nullpointer redzone 2020-12-11 13:22:06 +01:00
Konrad Beckmann
b7cc8814bb Sample initial button states 2020-12-11 02:24:49 +01:00
Konrad Beckmann
02d052b3bf Enable RTC to allow for profiling
Uses the internal oscillator.
Can't get the external to work for some reason. PRs welcome!
2020-12-08 01:47:56 +01:00
Konrad Beckmann
948ff8fe63 gb: Disable DCACHE for AHBRAM (framebuffer area) 2020-12-06 18:34:31 +01:00
Konrad Beckmann
c9a300a8be gb: Support state saving to flash 2020-12-06 17:22:32 +01:00
Konrad Beckmann
8bb7344101 Squash largeflash_snapshots
Squashed commit of the following:

commit 8bdab8b69ee37aeafedb8da7d13fb6c02c35cc04
Author: Konrad Beckmann <konrad.beckmann@gmail.com>
Date:   Sun Dec 6 15:11:47 2020 +0100

    Update submodule

commit eaaf1893e4dc8c6ec66039a99de057de60b5f2b5
Author: Konrad Beckmann <konrad.beckmann@gmail.com>
Date:   Sun Dec 6 15:11:38 2020 +0100

    Use HALF_QUAD_MODE

commit 069985bec8b78e3c54fda2ef632ce9d7e3e79eaf
Author: Konrad Beckmann <konrad.beckmann@gmail.com>
Date:   Sun Dec 6 15:11:27 2020 +0100

    Add missing file

commit d0bb4e89f1701097f4c8e6f81ac39561157e1ea8
Author: Thomas Roth <code@stacksmashing.net>
Date:   Sat Dec 5 13:59:18 2020 +0100

    Fix HALF_QUAD_MODE support

commit d87def7b63b297231b4b9419998d63f878cce8d6
Author: Thomas Roth <code@stacksmashing.net>
Date:   Sat Dec 5 13:42:27 2020 +0100

    Add support for different flash sizes

commit 85da98252194eaeb7344b7edd3b4655996e96344
Merge: c2be063 df701cd
Author: Konrad Beckmann <konrad.beckmann@gmail.com>
Date:   Sat Dec 5 01:06:47 2020 +0100

    Merge remote-tracking branch 'origin/main' into largeflash_snapshots

commit c2be0637a99b41dbbcdab8db96dd5a4fd9f917c1
Author: Thomas Roth <code@stacksmashing.net>
Date:   Fri Dec 4 23:07:48 2020 +0100

    Enable nearest-neighbor with -DBLIT_NEAREST

commit 4706648eb4a777431ab82ae9f16bec1535d97ae3
Author: Thomas Roth <code@stacksmashing.net>
Date:   Fri Dec 4 22:51:40 2020 +0100

    Vsync

commit 692bf35345b1eae52a2cc88510f785daf8c29ccb
Author: Thomas Roth <code@stacksmashing.net>
Date:   Fri Dec 4 22:25:26 2020 +0100

    Update retro-go-stm32

commit b3caa6dd3a946e8d0e799779130daaab15a0ae8b
Author: Thomas Roth <code@stacksmashing.net>
Date:   Fri Dec 4 20:27:27 2020 +0100

    Initial snapshot support (large flash only)
2020-12-06 15:28:42 +01:00
Konrad Beckmann
994e23eaed Bring back configurable pixel format for LCD 2020-12-05 22:43:20 +01:00
Konrad Beckmann
d32f6ba532 memset framebuffer correctly 2020-12-05 22:39:47 +01:00
Konrad Beckmann
78698596a0 memset framebuffer to sizeof(framebuffer1) 2020-12-05 22:31:20 +01:00