From 1d35a4f6128caccce40f1649f3a8aa6b7f70f9a0 Mon Sep 17 00:00:00 2001 From: Peter Schorn Date: Sat, 29 Mar 2014 08:19:22 +0100 Subject: [PATCH] Updated year in copyright and implemented sim_vm_pc_value --- AltairZ80/altairz80_cpu.c | 10 ++++++++-- AltairZ80/altairz80_cpu_nommu.c | 2 +- AltairZ80/altairz80_defs.h | 2 +- AltairZ80/altairz80_dsk.c | 6 ++++-- AltairZ80/altairz80_hdsk.c | 6 ++++-- AltairZ80/altairz80_net.c | 2 +- AltairZ80/altairz80_sio.c | 2 +- AltairZ80/s100_fif.c | 2 +- 8 files changed, 21 insertions(+), 11 deletions(-) diff --git a/AltairZ80/altairz80_cpu.c b/AltairZ80/altairz80_cpu.c index 123c3ef8..2e3f078a 100644 --- a/AltairZ80/altairz80_cpu.c +++ b/AltairZ80/altairz80_cpu.c @@ -1,6 +1,6 @@ /* altairz80_cpu.c: MITS Altair CPU (8080 and Z80) - Copyright (c) 2002-2013, Peter Schorn + Copyright (c) 2002-2014, Peter Schorn Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), @@ -6508,7 +6508,8 @@ static t_stat cpu_show(FILE *st, UNIT *uptr, int32 val, void *desc) { static void cpu_clear(void) { uint32 i; - for (i = 0; i < MAXMEMORY; i++) M[i] = 0; + for (i = 0; i < MAXMEMORY; i++) + M[i] = 0; for (i = 0; i < (MAXMEMORY >> LOG2PAGESIZE); i++) mmu_table[i] = RAM_PAGE; for (i = (MEMORYSIZE >> LOG2PAGESIZE); i < (MAXMEMORY >> LOG2PAGESIZE); i++) @@ -6852,9 +6853,14 @@ static t_stat cpu_set_memory(UNIT *uptr, int32 value, char *cptr, void *desc) { return SCPE_ARG; } +t_value altairz80_pc_value (void) { + return (t_value)PCX; +} + /* AltairZ80 Simulator initialization */ void altairz80_init(void) { cpu_clear(); + sim_vm_pc_value = &altairz80_pc_value; /* altairz80_print_tables(); */ } diff --git a/AltairZ80/altairz80_cpu_nommu.c b/AltairZ80/altairz80_cpu_nommu.c index 460b5166..7e5be792 100644 --- a/AltairZ80/altairz80_cpu_nommu.c +++ b/AltairZ80/altairz80_cpu_nommu.c @@ -1,6 +1,6 @@ /* altairz80_cpu_opt.c: MITS Altair CPU (8080 and Z80) - Copyright (c) 2002-2013, Peter Schorn + Copyright (c) 2002-2014, Peter Schorn Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), diff --git a/AltairZ80/altairz80_defs.h b/AltairZ80/altairz80_defs.h index 3d92b492..ef229502 100644 --- a/AltairZ80/altairz80_defs.h +++ b/AltairZ80/altairz80_defs.h @@ -1,6 +1,6 @@ /* altairz80_defs.h: MITS Altair simulator definitions - Copyright (c) 2002-2013, Peter Schorn + Copyright (c) 2002-2014, Peter Schorn Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), diff --git a/AltairZ80/altairz80_dsk.c b/AltairZ80/altairz80_dsk.c index 1dcd3358..1fb93559 100644 --- a/AltairZ80/altairz80_dsk.c +++ b/AltairZ80/altairz80_dsk.c @@ -1,6 +1,6 @@ /* altairz80_dsk.c: MITS Altair 88-DISK Simulator - Copyright (c) 2002-2013, Peter Schorn + Copyright (c) 2002-2014, Peter Schorn Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), @@ -306,7 +306,9 @@ static t_stat dsk_reset(DEVICE *dptr) { } void install_ALTAIRbootROM(void) { - ASSURE(install_bootrom(bootrom_dsk, BOOTROM_SIZE_DSK, ALTAIR_ROM_LOW, TRUE) == SCPE_OK); + const t_bool result = (install_bootrom(bootrom_dsk, BOOTROM_SIZE_DSK, ALTAIR_ROM_LOW, TRUE) == + SCPE_OK); + assert(result); } /* The boot routine modifies the boot ROM in such a way that subsequently diff --git a/AltairZ80/altairz80_hdsk.c b/AltairZ80/altairz80_hdsk.c index e779752f..1d67939e 100644 --- a/AltairZ80/altairz80_hdsk.c +++ b/AltairZ80/altairz80_hdsk.c @@ -1,6 +1,6 @@ /* altairz80_hdsk.c: simulated hard disk device to increase capacity - Copyright (c) 2002-2013, Peter Schorn + Copyright (c) 2002-2014, Peter Schorn Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), @@ -609,7 +609,9 @@ static t_stat hdsk_boot(int32 unitno, DEVICE *dptr) { } install_ALTAIRbootROM(); /* install modified ROM */ } - ASSURE(install_bootrom(bootrom_hdsk, BOOTROM_SIZE_HDSK, HDSK_BOOT_ADDRESS, FALSE) == SCPE_OK); + const t_bool result = (install_bootrom(bootrom_hdsk, BOOTROM_SIZE_HDSK, HDSK_BOOT_ADDRESS, + FALSE) == SCPE_OK); + assert(result); *((int32 *) sim_PC -> loc) = HDSK_BOOT_ADDRESS; return SCPE_OK; } diff --git a/AltairZ80/altairz80_net.c b/AltairZ80/altairz80_net.c index 9c1c4edd..fe5074be 100644 --- a/AltairZ80/altairz80_net.c +++ b/AltairZ80/altairz80_net.c @@ -1,6 +1,6 @@ /* altairz80_net.c: networking capability - Copyright (c) 2002-2013, Peter Schorn + Copyright (c) 2002-2014, Peter Schorn Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), diff --git a/AltairZ80/altairz80_sio.c b/AltairZ80/altairz80_sio.c index fbbe79a2..c864a14e 100644 --- a/AltairZ80/altairz80_sio.c +++ b/AltairZ80/altairz80_sio.c @@ -1,6 +1,6 @@ /* altairz80_sio.c: MITS Altair serial I/O card - Copyright (c) 2002-2013, Peter Schorn + Copyright (c) 2002-2014, Peter Schorn Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), diff --git a/AltairZ80/s100_fif.c b/AltairZ80/s100_fif.c index 9795e160..d6e2a309 100644 --- a/AltairZ80/s100_fif.c +++ b/AltairZ80/s100_fif.c @@ -2,7 +2,7 @@ IMSAI FIF Disk Controller by Ernie Price - Based on altairz80_dsk.c, Copyright (c) 2002-2013, Peter Schorn + Based on altairz80_dsk.c, Copyright (c) 2002-2014, Peter Schorn Plug-n-Play added by Howard M. Harte