Skip to content

Commit d60b539

Browse files
committed
[core] Updated KallistiOS and fixed RTC driver.
Also some other minor fixes and removed sd_loader_with.bios
1 parent 5413bb0 commit d60b539

7 files changed

Lines changed: 13 additions & 20 deletions

File tree

exports.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1873,6 +1873,7 @@ fs_pty_shutdown
18731873
fs_shutdown
18741874
thd_shutdown
18751875
rtc_shutdown
1876+
ubc_shutdown
18761877
_arch_old_stack
18771878
_arch_old_sr
18781879
_arch_old_vbr

modules/isoldr/exec.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ static void isoldr_arch_shutdown() {
6464
dbglog(DBG_CRITICAL, "arch: shutting down kernel\n");
6565

6666
/* Turn off UBC breakpoints, if any */
67-
ubc_disable_all();
67+
ubc_shutdown();
6868

6969
/* Do auto-shutdown */
7070
isoldr_arch_auto_shutdown();

modules/luaKOS/KOS.pkg

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -569,8 +569,7 @@ void * sq_set32(void *s, uint32 c, int n);
569569
#define PM_RGB0888 3 /**< \brief RGB0888 pixel mode (32-bit) */
570570
#define PM_RGB888 PM_RGB0888 /**< \brief Backwards compatibility support */
571571

572-
//-----------------------------------------------------------------------------
573-
// More specific modes (and actual indeces into the mode table)
572+
#define DM_MULTIBUFFER 0x2000
574573

575574
typedef enum vid_display_mode {
576575
DM_INVALID = 0, /**< \brief Invalid display mode */
@@ -585,16 +584,6 @@ typedef enum vid_display_mode {
585584
DM_768x576_PAL_IL, /**< \brief 768x576 PAL Interlaced 50Hz */
586585
DM_768x480_PAL_IL, /**< \brief 768x480 PAL Interlaced 50Hz */
587586
DM_320x240_PAL, /**< \brief 320x240 PAL 50Hz */
588-
DM_320x240_VGA_MB, /**< \brief 320x240 VGA 60Hz, 4FBs */
589-
DM_320x240_NTSC_MB, /**< \brief 320x240 NTSC 60Hz, 4FBs */
590-
DM_640x480_VGA_MB, /**< \brief 640x480 VGA 60Hz, 4FBs */
591-
DM_640x480_NTSC_IL_MB, /**< \brief 640x480 NTSC IL 60Hz, 4FBs */
592-
DM_640x480_PAL_IL_MB, /**< \brief 640x480 PAL IL 50Hz, 4FBs */
593-
DM_256x256_PAL_IL_MB, /**< \brief 256x256 PAL IL 50Hz, 4FBs */
594-
DM_768x480_NTSC_IL_MB, /**< \brief 768x480 NTSC IL 60Hz, 4FBs */
595-
DM_768x576_PAL_IL_MB, /**< \brief 768x576 PAL IL 50Hz, 4FBs */
596-
DM_768x480_PAL_IL_MB, /**< \brief 768x480 PAL IL 50Hz, 4FBs */
597-
DM_320x240_PAL_MB, /**< \brief 320x240 PAL 50Hz, 4FBs */
598587
// The below is only for counting..
599588
DM_SENTINEL, /**< \brief Sentinel value, for counting */
600589
DM_MODE_COUNT /**< \brief Number of modes */
-2 MB
Binary file not shown.

sdk/doc/KallistiOS.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
95a16abc543b202cdbe3597883df441e93c06ab4
1+
6220f330c91a02f4def0126aa27c2abc972f73eb

src/drivers/rtc.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* DreamShell ##version##
22
33
rtc.c
4-
Copyright (C) 2015-2016 SWAT
4+
Copyright (C) 2015-2016, 2024 SWAT
55
Copyright (C) 2016 Megavolt85
66
*/
77

@@ -19,6 +19,7 @@
1919
#define AICA_RTC_SECS_H 0xa0710000
2020
#define AICA_RTC_SECS_L 0xa0710004
2121
#define AICA_RTC_WRITE_EN 0xa0710008
22+
#define AICA_RTC_CTRL_ADDR 0xa0710008
2223

2324
#define AICA_RTC_ATTEMPTS_COUNT 10
2425

@@ -48,11 +49,12 @@ int rtc_settime(time_t time) {
4849
time_t secs = time + TWENTY_YEARS;
4950
int i = 0;
5051

52+
g2_write_32(AICA_RTC_WRITE_EN, 1);
53+
5154
do {
5255

53-
g2_write_32(1, AICA_RTC_WRITE_EN);
54-
g2_write_32((secs & 0xffff0000) >> 16, AICA_RTC_SECS_H);
55-
g2_write_32((secs & 0xffff), AICA_RTC_SECS_L);
56+
g2_write_32(AICA_RTC_SECS_H, (secs & 0xffff0000) >> 16);
57+
g2_write_32(AICA_RTC_SECS_L, (secs & 0xffff));
5658

5759
val1 = ((g2_read_32(AICA_RTC_SECS_H) & 0xffff) << 16) | (g2_read_32(AICA_RTC_SECS_L) & 0xffff);
5860
val2 = ((g2_read_32(AICA_RTC_SECS_H) & 0xffff) << 16) | (g2_read_32(AICA_RTC_SECS_L) & 0xffff);
@@ -63,6 +65,7 @@ int rtc_settime(time_t time) {
6365

6466
} while ((val1 != val2) && ((val1 & 0xffffff80) != (secs & 0xffffff80)));
6567

68+
g2_write_32(AICA_RTC_CTRL_ADDR, 0);
6669
return 0;
6770
}
6871

src/video.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -484,8 +484,8 @@ void ShutdownVideo() {
484484
}
485485

486486
if(plx_cursor_txr) {
487-
plx_txr_destroy(plx_screen_txr);
488-
plx_screen_txr = NULL;
487+
plx_txr_destroy(plx_cursor_txr);
488+
plx_cursor_txr = NULL;
489489
}
490490

491491
if (plx_cxt) {

0 commit comments

Comments
 (0)