fork of PCE focusing on macplus, supporting DaynaPort SCSI network emulation
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

rc759: Fix initializing the RTC

+12 -5
+1 -1
src/arch/rc759/rc759.c
··· 445 445 rc759_rtc_set_time_now (&sim->rtc); 446 446 } 447 447 else { 448 - rc759_rtc_set_time (&sim->rtc, 0, 0, 0, 0); 448 + rc759_rtc_set_time_zero (&sim->rtc); 449 449 } 450 450 } 451 451
+8 -2
src/arch/rc759/rtc.c
··· 5 5 /***************************************************************************** 6 6 * File name: src/arch/rc759/rtc.c * 7 7 * Created: 2012-07-06 by Hampa Hug <hampa@hampa.ch> * 8 - * Copyright: (C) 2012-2021 Hampa Hug <hampa@hampa.ch> * 8 + * Copyright: (C) 2012-2025 Hampa Hug <hampa@hampa.ch> * 9 9 *****************************************************************************/ 10 10 11 11 /***************************************************************************** ··· 15 15 * * 16 16 * This program is distributed in the hope that it will be useful, but * 17 17 * WITHOUT ANY WARRANTY, without even the implied warranty of * 18 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * 18 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * 19 19 * Public License for more details. * 20 20 *****************************************************************************/ 21 21 ··· 124 124 rtc->wday[0] = tval->tm_wday; 125 125 rtc->mday[0] = tval->tm_mday - 1; 126 126 rtc->month[0] = tval->tm_mon; 127 + } 128 + 129 + void rc759_rtc_set_time_zero (rc759_rtc_t *rtc) 130 + { 131 + rc759_rtc_set_time (rtc, 0, 0, 0, 0); 132 + rc759_rtc_set_date (rtc, 0, 0); 127 133 } 128 134 129 135 static
+3 -2
src/arch/rc759/rtc.h
··· 5 5 /***************************************************************************** 6 6 * File name: src/arch/rc759/rtc.h * 7 7 * Created: 2012-07-06 by Hampa Hug <hampa@hampa.ch> * 8 - * Copyright: (C) 2012-2021 Hampa Hug <hampa@hampa.ch> * 8 + * Copyright: (C) 2012-2025 Hampa Hug <hampa@hampa.ch> * 9 9 *****************************************************************************/ 10 10 11 11 /***************************************************************************** ··· 15 15 * * 16 16 * This program is distributed in the hope that it will be useful, but * 17 17 * WITHOUT ANY WARRANTY, without even the implied warranty of * 18 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * 18 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * 19 19 * Public License for more details. * 20 20 *****************************************************************************/ 21 21 ··· 68 68 void rc759_rtc_set_date (rc759_rtc_t *rtc, unsigned month, unsigned day); 69 69 70 70 void rc759_rtc_set_time_now (rc759_rtc_t *rtc); 71 + void rc759_rtc_set_time_zero (rc759_rtc_t *rtc); 71 72 72 73 unsigned char rc759_rtc_get_addr (rc759_rtc_t *rtc); 73 74 void rc759_rtc_set_addr (rc759_rtc_t *rtc, unsigned char val);