AltairZ80: Additional updates for SCP internal time base
This commit is contained in:
parent
e1ca936ab9
commit
199adf7641
4 changed files with 4 additions and 7 deletions
|
@ -6166,7 +6166,7 @@ static t_stat sim_instr_mmu (void) {
|
|||
|
||||
/* simulation halted */
|
||||
PC_S = ((reason == STOP_OPCODE) || (reason == STOP_MEM)) ? PCX : (PC & ADDRMASK);
|
||||
if ((cpu_unit.flags & UNIT_CPU_BANKED) && (PC_S < common))
|
||||
if ((cpu_unit.flags & UNIT_CPU_BANKED) && ((uint32)PC_S < common))
|
||||
PC_S |= bankSelect << MAXBANKSIZELOG2;
|
||||
pcq_r -> qptr = pcq_p; /* update pc q ptr */
|
||||
AF_S = AF;
|
||||
|
|
|
@ -54,7 +54,6 @@
|
|||
#include "altairz80_defs.h"
|
||||
#include "sim_sock.h"
|
||||
#include "sim_tmxr.h"
|
||||
#include <time.h>
|
||||
|
||||
uint8 *URLContents(const char *URL, uint32 *length);
|
||||
#ifndef URL_READER_SUPPORT
|
||||
|
@ -1366,7 +1365,7 @@ static void setClockZSDOS(void) {
|
|||
newTime.tm_min = fromBCD(GetBYTEWrapper(setClockZSDOSAdr + 4));
|
||||
newTime.tm_sec = fromBCD(GetBYTEWrapper(setClockZSDOSAdr + 5));
|
||||
newTime.tm_isdst = 0;
|
||||
ClockZSDOSDelta = (int32)(mktime(&newTime) - time(NULL));
|
||||
ClockZSDOSDelta = (int32)(mktime(&newTime) - sim_get_time(NULL));
|
||||
}
|
||||
|
||||
#define SECONDS_PER_MINUTE 60
|
||||
|
@ -1401,7 +1400,7 @@ static void setClockCPM3(void) {
|
|||
targetDate.tm_hour = fromBCD(GetBYTEWrapper(setClockCPM3Adr + 2));
|
||||
targetDate.tm_min = fromBCD(GetBYTEWrapper(setClockCPM3Adr + 3));
|
||||
targetDate.tm_sec = fromBCD(GetBYTEWrapper(setClockCPM3Adr + 4));
|
||||
ClockCPM3Delta = (int32)(mktime(&targetDate) - time(NULL));
|
||||
ClockCPM3Delta = (int32)(mktime(&targetDate) - sim_get_time(NULL));
|
||||
}
|
||||
|
||||
static int32 simh_in(const int32 port) {
|
||||
|
|
|
@ -43,7 +43,6 @@
|
|||
/*#define DBG_MSG */
|
||||
|
||||
#include "altairz80_defs.h"
|
||||
#include <time.h>
|
||||
|
||||
#ifdef DBG_MSG
|
||||
#define DBG_PRINT(args) sim_printf args
|
||||
|
|
|
@ -43,7 +43,6 @@
|
|||
/*#define DBG_MSG */
|
||||
|
||||
#include "altairz80_defs.h"
|
||||
#include <time.h>
|
||||
|
||||
#ifdef DBG_MSG
|
||||
#define DBG_PRINT(args) sim_printf args
|
||||
|
@ -469,7 +468,7 @@ static void setClockSS1(void) {
|
|||
newTime.tm_isdst = -1;
|
||||
newTime_t = mktime(&newTime);
|
||||
if (newTime_t != (time_t)-1)
|
||||
ss1_rtc[0].clockDelta = (int32)(newTime_t - time(NULL));
|
||||
ss1_rtc[0].clockDelta = (int32)(newTime_t - sim_get_time(NULL));
|
||||
}
|
||||
|
||||
static void generate_ss1_interrupt(void);
|
||||
|
|
Loading…
Add table
Reference in a new issue