diff --git a/.github/workflows/cmake-builds.yml b/.github/workflows/cmake-builds.yml index 42b3941f..974b4177 100644 --- a/.github/workflows/cmake-builds.yml +++ b/.github/workflows/cmake-builds.yml @@ -34,8 +34,8 @@ jobs: - name: Upload DEB uses: actions/upload-artifact@v3 with: - name: simh-4.0.0-x86_64-${{matrix.os}}.deb - path: cmake/build-ninja/simh-4.0.0-x86_64-${{matrix.os}}.deb + name: simh-4.1.0-x86_64-${{matrix.os}}.deb + path: cmake/build-ninja/simh-4.1.0-x86_64-${{matrix.os}}.deb cmake-macOS: @@ -68,13 +68,13 @@ jobs: - name: Upload ZIP uses: actions/upload-artifact@v3 with: - name: simh-4.0.0-x86_64.${{matrix.os}}.zip - path: cmake/build-xcode/simh-4.0.0-x86_64.${{matrix.os}}.zip + name: simh-4.1.0-x86_64.${{matrix.os}}.zip + path: cmake/build-xcode/simh-4.1.0-x86_64.${{matrix.os}}.zip - name: Upload DMG uses: actions/upload-artifact@v3 with: - name: simh-4.0.0-x86_64.${{matrix.os}}.dmg - path: cmake/build-xcode/simh-4.0.0-x86_64.${{matrix.os}}.dmg + name: simh-4.1.0-x86_64.${{matrix.os}}.dmg + path: cmake/build-xcode/simh-4.1.0-x86_64.${{matrix.os}}.dmg ## This looks like it's doing the right thing on the Github CI/CD pipeline because @@ -108,46 +108,128 @@ jobs: runs-on: windows-latest steps: - uses: actions/checkout@v3 - ##+ - ## NOTE: This will have to change when Github updates the windows-latest - ## image AND when Microsoft bumps the Visual Studio year. - ## - ## Things that need updating: - ## - Product ID (maybe: MS seems to be very consistent with the component - ## name, hasn't changed since VS 2019.) - ## - Channel ID - ##- - - name: Install v141_xp (XP toolkit) + - name: Install v141_xp (XP toolkit) and build SIMH shell: pwsh run: | - $ErrorActionPreference="Stop" - $WarningPreference="Continue" - $packageParams = @( "--productId", "Microsoft.VisualStudio.Product.Enterprise", - "--channelId", "VisualStudio.17.Release", - "--add", "Microsoft.VisualStudio.Component.VC.v141.x86.x64", - "--add", "Microsoft.VisualStudio.Component.WinXP", - "--no-includeRecommended", - "--includeOptional", - "--quiet", - "--locale en-US" ) -join " " - choco install visualstudio2022-workload-nativedesktop --package-parameters $packageParams + $ErrorActionPreference = "Stop" + $WarningPreference = "Continue" + $DebugPreference = "Continue" - - name: vs2022-xp build - shell: pwsh - run: | - $ErrorActionPreference="Stop" - $WarningPreference="Continue" - $env:ChocolateyInstall = Convert-Path "$((Get-Command choco).Path)\..\.." - Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1" - Update-SessionEnvironment # Fix PATH so that "C:\Strawberry" (Strawberry Perl) doesn't mess with the build # CMake WILL find incompatible libraries within Strawberry. $fixPATH = (${env:PATH}.Split(';') | ` Where-Object { $_ -notlike "*\Strawberry\*" -and $_ -notlike "*/Strawberry/*" }) -join ';' $env:Path = $fixPATH + + #+ + # Update the existing Github Visual Studio installation in-place. `vswhere` may find multiple + # VS installations, so iterate through them all. + # + # This is Grey Magic. `vs_installer` exits almost immediately if you run it from the command + # line. However, `vs_installer`'s subprocesses are well known and we look for them and wait + # for them to terminate. + # + # GH Actions does something strange with stdout and stderr, so you won't get any + # indication of failure or output that shows you that something is happening. + # + # The waiting code was adapted from the Chocolatey VS installer scripts. + #- + $vswhere = "${env:ProgramFiles} (x86)\Microsoft Visual Studio\Installer\vswhere" + $vsinstaller = "${env:ProgramFiles} (x86)\Microsoft Visual Studio\Installer\vs_installer.exe" + $vsInstallOut = "$env:TEMP\vsinstall-out.txt" + $vsInstallErr = "$env:TEMP\vsinstall-err.txt" + + & ${vswhere} -property installationPath | ` + Foreach-Object -process { + ## --quiet: Don't open/show UI + ## --force: Terminate any VS instances forcibly + ## --norestart: Delay reboot after install, if needed + ## --installWhileDownloading: Self-explanitory. + $Params = @( + "modify", + "--installPath", "$_", + "--add", "Microsoft.VisualStudio.Component.VC.v141.x86.x64", + "--add", "Microsoft.VisualStudio.Component.WinXP", + "--quiet", "--force", "--norestart", "--installWhileDownloading" + ) + + & $vsInstaller $Params 2> $vsInstallErr > $vsInstallOut + + $vsinstallerProcesses = @('vs_installer', 'vs_installershell', 'vs_installerservice') + $vsInstallerStartup = $true + $vsInstallerStartCount = 10 + + do + { + Write-Debug ('Looking for running VS installer processes') + $vsInstallerRemaining = Get-Process -Name $vsinstallerProcesses -ErrorAction SilentlyContinue | Where-Object { $null -ne $_ -and -not $_.HasExited } + $vsInstallerProcessCount = ($vsInstallerRemaining | Measure-Object).Count + if ($vsInstallerProcessCount -gt 0) + { + ## Installer processes are present, so obviously not starting up. + $vsInstallerStartup = $false + try + { + Write-Debug "Found $vsInstallerProcessCount running Visual Studio installer processes which are known to exit asynchronously:" + $vsInstallerRemaining | Sort-Object -Property Name, Id | ForEach-Object { '[{0}] {1}' -f $_.Id, $_.Name } | Write-Debug + Write-Debug ('Giving the processes some time to exit') + $vsInstallerRemaining | Wait-Process -Timeout 45 -ErrorAction SilentlyContinue + } + finally + { + $vsInstallerRemaining | ForEach-Object { $_.Dispose() } + $vsInstallerRemaining = $null + } + } else { + if ($vsInstallerStartup) { + if ($vsInstallerStartCount -gt 0) { + Write-Debug "No VS installer processes detected; sleeping with $vsInstallerStartCount tries remaining." + Start-Sleep -Seconds 10.0 + $vsInstallerStartCount -= 1 + } else { + $vsInstallerStartup = $false + Write-Debug "VS installer never started? Exiting." + Exit 99 + } + } + } + } + while (($vsInstallerStartup -and $vsInstallerStartCount -gt 0) -or $vsInstallerProcessCount -gt 0) + } + + if ((Test-Path $vsInstallOut -PathType Leaf) -and (Get-Item $vsInstallOut).length -gt 0kb) + { + Write-Output "-- vsinstaller output:" + Get-Content $vsInstallOut + } + else + { + Write-Debug "-- No vsinstaller output." + } + + if ((Test-Path $vsInstallErr -PathType Leaf) -and (Get-Item $vsInstallErr).length -gt 0kb) + { + Write-Output "-- vsinstaller error output:" + Get-Content $vsInstallErr + } + else + { + Write-Debug "-- No vsinstaller error/diag output." + } + + #+ + # The GH Windows runner image documentation says that the VSSetup module is installed, from + # whence Get-VSSetupInstance and Select-VSSetupInstance are imported. This step is pure + # paranoia, ensuring that we really, truly and honestly have WinXP support. + #- + Write-Debug "Get-VSSetupInstance/Select-VSSetupInstance" + Get-VSSetupInstance -All | Select-VSSetupInstance -Require 'Microsoft.VisualStudio.Component.WinXP' -Latest + ## Don't use LTO for XP. XP compatibility comes from VS2017 -- MS is ## at VS2022. There are likely legacy bugs that have been fixed. ./cmake/cmake-builder.ps1 -flavor vs2022-xp -config Release -clean -verbose -notest -cpack_suffix win32-xp + + - name: SIMH simulator suite test shell: pwsh run: | @@ -166,13 +248,13 @@ jobs: - name: Upload ZIP uses: actions/upload-artifact@v3 with: - name: simh-4.0.0-win32-vs2022xp.zip - path: cmake/build-vs2022-xp/simh-4.0.0-win32-xp.zip + name: simh-4.1.0-win32-vs2022xp.zip + path: cmake/build-vs2022-xp/simh-4.1.0-win32-xp.zip - name: Upload MSI uses: actions/upload-artifact@v3 with: - name: simh-4.0.0-win32-vs2022xp.zip - path: cmake/build-vs2022-xp/simh-4.0.0-win32-xp.msi + name: simh-4.1.0-win32-vs2022xp.zip + path: cmake/build-vs2022-xp/simh-4.1.0-win32-xp.msi cmake-vs2022: name: VS 2022 Win10 native VCPKG @@ -213,15 +295,15 @@ jobs: - name: Upload ZIP uses: actions/upload-artifact@v3 with: - name: simh-4.0.0-win32-vs2022.zip - path: cmake/build-vs2022/simh-4.0.0-win32-native.zip + name: simh-4.1.0-win32-vs2022.zip + path: cmake/build-vs2022/simh-4.1.0-win32-native.zip - name: Upload EXE installer uses: actions/upload-artifact@v3 with: - name: simh-4.0.0-win32-vs2022.exe - path: cmake/build-vs2022/simh-4.0.0-win32-native.exe + name: simh-4.1.0-win32-vs2022.exe + path: cmake/build-vs2022/simh-4.1.0-win32-native.exe - name: Upload MSI installer uses: actions/upload-artifact@v3 with: - name: simh-4.0.0-win32-vs2022.msi - path: cmake/build-vs2022/simh-4.0.0-win32-native.msi + name: simh-4.1.0-win32-vs2022.msi + path: cmake/build-vs2022/simh-4.1.0-win32-native.msi diff --git a/.github/workflows/coverity-scan.yml b/.github/workflows/coverity-scan.yml new file mode 100644 index 00000000..4c5d568b --- /dev/null +++ b/.github/workflows/coverity-scan.yml @@ -0,0 +1,59 @@ +name: Coverity Scan +on: + schedule: + - cron: '0 18 * * 2,4' # Bi-weekly at 18:00 UTC on Tuesday and Thursday + +# Automatically cancel any previous workflow on new push. +concurrency: + group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }} + cancel-in-progress: true + +jobs: + latest: + runs-on: ubuntu-22.04 + steps: + - name: Determine current repository + id: "determine-repo" + run: echo "repo=${GITHUB_REPOSITORY}" >> $GITHUB_OUTPUT + + - uses: actions/checkout@v3 + - name: Download Coverity Build Tool + run: | + wget -q https://scan.coverity.com/download/cxx/linux64 --post-data "token=$TOKEN&project=open-simh%2Fsimh" -O cov-analysis-linux64.tar.gz + mkdir cov-analysis-linux64 + tar xzf cov-analysis-linux64.tar.gz --strip 1 -C cov-analysis-linux64 + env: + TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }} + if: steps.determine-repo.outputs.repo == 'open-simh/simh' + + - name: Fixed world writable dirs + run: | + chmod go-w $HOME + sudo chmod -R go-w /usr/share + if: steps.determine-repo.outputs.repo == 'open-simh/simh' + + - name: Installing build dependencies + run: | + sh -ex .travis/deps.sh linux + sudo apt --assume-yes install -ym ninja-build + if: steps.determine-repo.outputs.repo == 'open-simh/simh' + + - name: Build with cov-build + run: | + export PATH=`pwd`/cov-analysis-linux64/bin:$PATH + cov-build --dir cov-int cmake/cmake-builder.sh --config Release --flavor ninja --lto --notest --parallel --verbose --cpack_suffix x86_64-${{matrix.os}} + if: steps.determine-repo.outputs.repo == 'open-simh/simh' + + - name: Submit the result to Coverity Scan + run: | + tar czvf simh.tgz cov-int + curl \ + --form token=$TOKEN \ + --form email=noreply@opensimh.org \ + --form file=@simh.tgz \ + --form version=trunk \ + --form description="opensimh" \ + https://scan.coverity.com/builds?project=open-simh%2Fsimh + env: + TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }} + if: steps.determine-repo.outputs.repo == 'open-simh/simh' diff --git a/.github/workflows/windows_build.yml b/.github/workflows/windows_build.yml deleted file mode 100644 index fdd0214f..00000000 --- a/.github/workflows/windows_build.yml +++ /dev/null @@ -1,197 +0,0 @@ -name: Windows_Build - -on: - workflow_dispatch: - inputs: - ref: - description: 'Ref/hash/tag - blank for head' - required: false - type: string - configuration: - description: 'Configuration' - required: true - default: 'Release' - type: choice - options: - - Release - - Debug - platform: - description: 'Platform' - required: true - default: 'Win32' - type: choice - options: - - Win32 -# - ARM - architecture: - description: 'Architecture' - required: true - default: x64 - type: choice - options: - - x64 - - x86 - - arm64 - dispose: - description: 'Disposition' - required: true - default: 'Discard' - type: choice - options: - - 'Discard' - - 'Snapshot' - - 'Release' - - pull_request: - types: closed - branches: [ 'master', 'Supnik-Current' ] - - push: - branches: [ 'master', 'Supnik-Current' ] - - # min hr mday mon dow UTC - schedule: - - cron: '23 8 * * 1,3,5' # x64 snapshots - - cron: '13 16 * * 2,4,6' # x86 snapshots -# - cron: '46 20 * * 1,4,7' # Arm snapshots - - # GITHUB_SHA last commit GITHUB_REF refs/tags/name - release: - types: published - -env: - SOLUTION_FILE: 'Visual Studio Projects\Simh.ci.sln' - REF: ${{ inputs.ref || github.sha }} - BUILD_CONFIGURATION: ${{ inputs.configuration || 'Release' }} - BUILD_PLATFORM: ${{ inputs.platform || 'Win32' }} - BUILD_ARCH: ${{ inputs.architecture || ( github.event_name == 'schedule' && ( ( contains(github.event.schedule, '16') && 'x86' ) || ( contains(github.event.schedule, '20') && 'arm64' ) ) ) || 'x64' }} - DISPOSE: ${{ inputs.dispose || ( github.event_name == 'schedule' && 'Snapshot' ) || ( github.event_name == 'release' && 'Release' ) || 'Discard' }} - -permissions: - contents: read - -jobs: - build-on-windows: - environment: open-simh-ci - runs-on: windows-latest - - steps: - - name: 'Verify configuration' - if: ( env.BUILD_PLATFORM == 'Win32' && env.BUILD_ARCH != 'x86' && env.BUILD_ARCH != 'x64' ) || ( env.BUILD_PLATFORM == 'ARM' && env.BUILD_ARCH != 'arm64' ) - shell: cmd - run: | - echo ::error file=windows_build.yml,title=Invalid configuration::Platform ${{ env.BUILD_PLATFORM }} does not support Architecture ${{ env.BUILD_ARCH }} - exit 1 - - name: 'Deal with CRLF files in repo' - run: git config --global core.autocrlf input - - name: 'Checkout branch' - uses: actions/checkout@v3 - with: - ref: ${{ env.REF }} - - name: Identify branch - shell: pwsh - run: | - $br="${{ github.ref_name || github.head_ref }}" - if ( $null -eq $br ) { - "DISPOSE=Discard" >>$env:GITHUB_ENV - "BRANCH=null" >>$env:GITHUB_ENV - } else { - $br=$br.Trim() - if( $br -eq '' ) { - "DISPOSE=Discard" >>$env:GITHUB_ENV - "BRANCH=empty" >>$env:GITHUB_ENV - } elseif ( $br -match '[Ss]upnik' ) { - "BRANCH=V3" >>$env:GITHUB_ENV - } else { - "BRANCH=V4" >>$env:GITHUB_ENV - }} - - name: Get external libraries - #(Required for V3, V4 will see and skip) - shell: pwsh - run: | - Invoke-WebRequest -Uri "https://github.com/simh/windows-build/archive/windows-build.zip" -UseBasicParsing -OutFile windows-build.zip - Expand-Archive -Path .\windows-build.zip -DestinationPath .\windows-build.tmp - move .\windows-build.tmp\windows-build-windows-build ..\windows-build - del windows-build.tmp - del windows-build.zip - - name: Add MSBuild to PATH for Visual Studio - uses: microsoft/setup-msbuild@v1.1 - with: - msbuild-architecture: ${{ env.BUILD_ARCH }} - - name: Install PuTTY - run: | - choco install --no-progress putty - - name: Build Simulators with Visual Studio - shell: cmd - working-directory: ${{env.GITHUB_WORKSPACE}} - run: | - msbuild "${{env.SOLUTION_FILE}}" -property:Configuration=${{env.BUILD_CONFIGURATION}} -property:Platform=${{env.BUILD_PLATFORM}} - - name: Compute zipfile name step 1 - if: env.DISPOSE != 'Discard' - shell: pwsh - run: | - git log -1 --pretty="COMMIT=%H" >>$env:GITHUB_ENV - $(git log -1 --pretty="#=%aI").Replace("T","-").Replace("#","CDATE").Replace(":","-") >>$env:GITHUB_ENV - echo PACNAME=${{env.BUILD_PLATFORM}}-${{env.BUILD_ARCH}}-${{env.BUILD_CONFIGURATION}} >>$env:GITHUB_ENV - - name: Compute zipfile name step 2 - if: env.DISPOSE != 'Discard' - shell: pwsh - run: | - "ZIPNAME=${{env.CDATE}}-${{env.COMMIT}}-${{env.PACNAME}}.zip" >>$env:GITHUB_ENV - - name: Collect results for deployment - if: env.DISPOSE != 'Discard' - shell: cmd - working-directory: ${{env.GITHUB_WORKSPACE}} - run: | - mkdir "${{env.PACNAME}}" - copy "LICENSE.txt" "${{env.PACNAME}}\" - echo This software was created by the Open SIMH Project>"${{env.PACNAME}}\README.txt" - echo For more information, see https://opensimh.org>>"${{env.PACNAME}}\README.txt" - move "BIN\NT\${{env.BUILD_PLATFORM}}-${{env.BUILD_CONFIGURATION}}\*.exe" "${{env.PACNAME}}" - echo Built in ${{ github.repository }} by ${{ github.actor }} (${{ github.event_name }}) from ${{ github.ref_type }}/${{ github.ref_name }}>${{ env.ZIPNAME }}-contents.txt - echo In the zip file, the files reside in ${{env.PACNAME}}\*>>${{ env.ZIPNAME }}-contents.txt - echo Dates/times are UTC>>${{ env.ZIPNAME }}-contents.txt - echo .>>${{ env.ZIPNAME }}-contents.txt - dir "${{env.PACNAME}}" >>${{ env.ZIPNAME }}-contents.txt - - name: Import signing key - if: env.DISPOSE != 'Discard' - uses: crazy-max/ghaction-import-gpg@v5 - with: - gpg_private_key: ${{ secrets.GPG_KIT_SIGNING_KEY }} - - name: Create and sign zip file - if: env.DISPOSE != 'Discard' - shell: pwsh - working-directory: ${{env.GITHUB_WORKSPACE}} - run: | - Compress-Archive -Path "${{ env.PACNAME }}" -DestinationPath "${{ env.ZIPNAME }}" - gpg --output "${{ env.ZIPNAME }}.sig" --detach-sig "${{ env.ZIPNAME }}" - - name: Deploy new executables to kits server - id: scp-ppk - if: env.DISPOSE != 'Discard' - shell: pwsh - working-directory: ${{env.GITHUB_WORKSPACE}} - env: - SCP_DEPLOY_KEY: '${{ secrets.SCP_DEPLOY_KEY }}' - run: | - $fn = Join-Path -Path $env:RUNNER_TEMP -ChildPath "sdk.ppk"; - $eb = [System.Convert]::FromBase64String($env:SCP_DEPLOY_KEY); - Set-Content $fn -Value $eb -AsByteStream; - "SDK=$fn" >>$env:GITHUB_OUTPUT - "KITS_HOST_KEY=" + "${{ vars.KITS_HOST_KEY }}".Trim() + "`n" >>$env:GITHUB_ENV - - name: Save as snapshot - if: ${{ env.DISPOSE == 'Snapshot' }} - shell: cmd - run: | - pscp -p -r -q -batch -noagent -i ${{ steps.scp-ppk.outputs.SDK }} -hostkey "${{ env.KITS_HOST_KEY }}" ${{ env.ZIPNAME }} ${{ env.ZIPNAME }}.sig ${{ env.ZIPNAME }}-contents.txt simh-deploy@kits.opensimh.org:/var/www/kits/html/${{ env.BRANCH }}/Windows/Snapshots/${{ env.BUILD_ARCH }}/ - - name: Save as release - if: env.DISPOSE == 'Release' - shell: cmd - run: | - pscp -p -r -q -batch -noagent -i ${{ steps.scp-ppk.outputs.SDK }} -hostkey "${{ env.KITS_HOST_KEY }}" ${{ env.ZIPNAME }} ${{ env.ZIPNAME }}.sig ${{ env.ZIPNAME }}-contents.txt simh-deploy@kits.opensimh.org:/var/www/kits/html/${{ env.BRANCH }}/Windows/Releases/${{ env.BUILD_ARCH }}/ - - name: cleanup ppk - env: - FN: ${{ steps.scp-ppk.outputs.SDK }} - shell: pwsh - if: always() && ( env.FN != '' ) - run: | - Remove-Item -Path $env:FN; diff --git a/3B2/3b2_iu.c b/3B2/3b2_iu.c index e3639eec..cb38ab50 100644 --- a/3B2/3b2_iu.c +++ b/3B2/3b2_iu.c @@ -233,7 +233,8 @@ MTAB contty_mod[] = { { MTAB_XTD|MTAB_VDV|MTAB_NMO, 1, "CONNECTIONS", NULL, NULL, &tmxr_show_cstat, (void *)&contty_desc, "Display current connection" }, { MTAB_XTD|MTAB_VDV|MTAB_NMO, 0, "STATISTICS", NULL, - NULL, &tmxr_show_cstat, (void *)&contty_desc, "Display CONTTY statistics" } + NULL, &tmxr_show_cstat, (void *)&contty_desc, "Display CONTTY statistics" }, + { 0 } }; CONST char *brg_rates[IU_SPEED_REGS][IU_SPEEDS] = { @@ -276,7 +277,8 @@ DEVICE contty_dev = { MTAB iu_timer_mod[] = { { MTAB_XTD|MTAB_VDV|MTAB_VALR, 0, "MULT", "MULT={1|2|3|4}", - &iu_timer_set_mult, &iu_timer_show_mult, NULL, "Timer Multiplier" } + &iu_timer_set_mult, &iu_timer_show_mult, NULL, "Timer Multiplier" }, + { 0 } }; REG iu_timer_reg[] = { diff --git a/AltairZ80/altairz80_cpu.c b/AltairZ80/altairz80_cpu.c index 7b34d476..fe52030c 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-2014, Peter Schorn + Copyright (c) 2002-2023, Peter Schorn Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), @@ -451,7 +451,7 @@ REG cpu_reg[] = { }, /* 65 M68K, PREF_ADDR */ { HRDATAD (M68K_PREF_DATA, m68k_registers[M68K_REG_PREF_DATA], 32, "M68K Last Prefetch Data register"), }, /* 66 M68K, PREF_DATA */ - { HRDATAD (M68K_PPC, m68k_registers[M68K_REG_PPC], 32, "M68K Previous Proram Counter register"), + { HRDATAD (M68K_PPC, m68k_registers[M68K_REG_PPC], 32, "M68K Previous Program Counter register"), }, /* 67 M68K, PPC */ { HRDATAD (M68K_IR, m68k_registers[M68K_REG_IR], 32, "M68K Instruction Register"), }, /* 68 M68K, IR */ @@ -6384,7 +6384,7 @@ static t_stat sim_instr_mmu (void) { /* * This sequence of instructions is a mix that mimics - * a resonable instruction set that is a close estimate + * a reasonable instruction set that is a close estimate * to the calibrated result. */ diff --git a/AltairZ80/altairz80_cpu_nommu.c b/AltairZ80/altairz80_cpu_nommu.c index aaa04b32..911de920 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-2014, Peter Schorn + Copyright (c) 2002-2023, 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 a9859cb0..087e58a5 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-2014, Peter Schorn + Copyright (c) 2002-2023, 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 7264bc05..8290edbf 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-2014, Peter Schorn + Copyright (c) 2002-2023, Peter Schorn Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), @@ -109,12 +109,12 @@ ---------------------------------------------------------- 5/22/2014 - Updated by Mike Douglas to support the Altair Minidisk. - This disk uses 35 (vs 70) tracks of 16 (vs 32) sectors + This disk uses 35 (vs 70) tracks of 16 (vs 32) sectors of 137 bytes each. - 6/30/2014 - When the disk is an Altair Minidisk, load the head as + 6/30/2014 - When the disk is an Altair Minidisk, load the head as soon as the disk is enabled, and ignore the head - unload command (both like the real hardware). + unload command (both like the real hardware). 7/13/2014 - This code previously returned zero when the sector position register was read with the head not loaded. This zero looks @@ -125,9 +125,9 @@ 7/13/2014 Some software for the Altair skips a sector by verifying that "Sector True" goes false. Previously, this code - returned "Sector True" every time the sector register + returned "Sector True" every time the sector register was read. Now the flag alternates true and false on - subsequent reads of the sector register. + subsequent reads of the sector register. */ #include "altairz80_defs.h" @@ -555,7 +555,7 @@ int32 dsk10(const int32 port, const int32 io, const int32 data) { if (current_track[current_disk] == 0) /* track 0? */ current_flag[current_disk] |= 0x40; /* yes, set track 0 true as well */ if (sectors_per_track[current_disk] == MINI_DISK_SECT) /* drive enable loads head for Minidisk */ - current_flag[current_disk] |= 0x84; + current_flag[current_disk] |= 0x84; } } return 0; /* ignored since OUT */ diff --git a/AltairZ80/altairz80_hdsk.c b/AltairZ80/altairz80_hdsk.c index 97cd3722..9ce1524a 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-2014, Peter Schorn + Copyright (c) 2002-2023, Peter Schorn Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), @@ -419,7 +419,7 @@ static DISK_INFO* hdsk_imd[HDSK_NUMBER]; static REG hdsk_reg[] = { { DRDATAD (HDCMD, hdskLastCommand, 32, "Last command"), REG_RO }, - { DRDATAD (HDPOS, hdskCommandPosition, 32, "Commmand position"), + { DRDATAD (HDPOS, hdskCommandPosition, 32, "Command position"), REG_RO }, { DRDATAD (HDDSK, selectedDisk, 32, "Selected disk"), REG_RO }, @@ -605,7 +605,7 @@ static t_stat hdsk_attach(UNIT *uptr, CONST char *cptr) { } ASSURE((uptr -> HDSK_SECTORS_PER_TRACK) && (uptr -> HDSK_SECTOR_SIZE) && (uptr -> HDSK_FORMAT_TYPE >= 0)); - /* Step 4: Number of tracks is smallest number to accomodate capacity */ + /* Step 4: Number of tracks is smallest number to accommodate capacity */ uptr -> HDSK_NUMBER_OF_TRACKS = (uptr -> capac + uptr -> HDSK_SECTORS_PER_TRACK * uptr -> HDSK_SECTOR_SIZE - 1) / (uptr -> HDSK_SECTORS_PER_TRACK * uptr -> HDSK_SECTOR_SIZE); ASSURE( ( (t_addr) ((uptr -> HDSK_NUMBER_OF_TRACKS - 1) * uptr -> HDSK_SECTORS_PER_TRACK * diff --git a/AltairZ80/altairz80_mhdsk.c b/AltairZ80/altairz80_mhdsk.c index a2b4b087..2b11079b 100755 --- a/AltairZ80/altairz80_mhdsk.c +++ b/AltairZ80/altairz80_mhdsk.c @@ -1,6 +1,6 @@ /* altairz80_mhdsk.c: MITS 88-HDSK Hard Disk simulator - Copyright (c) 2002-2014, Peter Schorn + Copyright (c) 2002-2023, 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_net.c b/AltairZ80/altairz80_net.c index 2cfd5016..c5f8fef2 100644 --- a/AltairZ80/altairz80_net.c +++ b/AltairZ80/altairz80_net.c @@ -1,6 +1,6 @@ /* altairz80_net.c: networking capability - Copyright (c) 2002-2014, Peter Schorn + Copyright (c) 2002-2023, Peter Schorn Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), @@ -295,7 +295,7 @@ int32 netData(const int32 port, const int32 io, const int32 data) { } sim_debug(IN_MSG, &net_dev, "NET: " ADDRESS_FORMAT " IN(%i)=%03xh (%c)\n", PCX, port, (result & 0xff), (32 <= (result & 0xff)) && ((result & 0xff) <= 127) ? (result & 0xff) : '?'); return result; - } else { /* OUT */ + } else { /* OUT */ if (serviceDescriptor[i].outputSize == BUFFER_LENGTH) { sim_printf("over-write %i to %i\n", data, port); serviceDescriptor[i].outputBuffer[serviceDescriptor[i].outputPosWrite > 0 ? diff --git a/AltairZ80/altairz80_sio.c b/AltairZ80/altairz80_sio.c index 6476cf12..95ef5fe1 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-2014, Peter Schorn + Copyright (c) 2002-2023, 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_sys.c b/AltairZ80/altairz80_sys.c index d44bd456..f50841b1 100644 --- a/AltairZ80/altairz80_sys.c +++ b/AltairZ80/altairz80_sys.c @@ -1,6 +1,6 @@ /* altairz80_sys.c: MITS Altair system interface - Copyright (c) 2002-2014, Peter Schorn + Copyright (c) 2002-2023, 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/i86.h b/AltairZ80/i86.h index 19d50edc..69c5b100 100644 --- a/AltairZ80/i86.h +++ b/AltairZ80/i86.h @@ -35,7 +35,7 @@ EAX & 0xff === AL EAX & 0xffff == AX - etc. The result is that alot of the calculations can then be + etc. The result is that a lot of the calculations can then be done using the native instruction set fully. */ @@ -196,7 +196,7 @@ struct pc_env struct i386_general_regs Gn_regs; struct i386_special_regs Sp_regs; struct i386_segment_regs Sg_regs; - /* our flags structrure. This contains information on + /* our flags structure. This contains information on REPE prefix 2 bits repe,repne SEGMENT overrides 5 bits normal,DS,SS,CS,ES Delayed flag set 3 bits (zero, signed, parity) diff --git a/AltairZ80/i86_decode.c b/AltairZ80/i86_decode.c index d82ad576..a8594a0b 100644 --- a/AltairZ80/i86_decode.c +++ b/AltairZ80/i86_decode.c @@ -77,7 +77,7 @@ void cpu8086_intr(uint8 intrnum); /* this file includes subroutines which do: stuff involving decoding instruction formats. - stuff involving accessess of immediate data via IP. + stuff involving accesses of immediate data via IP. etc. */ @@ -675,7 +675,7 @@ uint8 fetch_data_byte(PC_ENV *m, uint16 offset) refer to addresses relative to the SS. So, at the minimum, all decodings of addressing modes would have to set/clear a bit describing whether the access is relative to DS or SS. - That is the function of the cpu-state-varible m->sysmode. + That is the function of the cpu-state-variable m->sysmode. There are several potential states: repe prefix seen (handled elsewhere) repne prefix seen (ditto) @@ -683,7 +683,7 @@ uint8 fetch_data_byte(PC_ENV *m, uint16 offset) ds segment override es segment override ss segment override - ds/ss select (in absense of override) + ds/ss select (in absence of override) Each of the above 7 items are handled with a bit in the sysmode field. The latter 5 can be implemented as a simple state machine: diff --git a/AltairZ80/i86_ops.c b/AltairZ80/i86_ops.c index f652b237..56cab9df 100644 --- a/AltairZ80/i86_ops.c +++ b/AltairZ80/i86_ops.c @@ -78,7 +78,7 @@ extern uint32 in(const uint32 Port); to the 256 byte-"opcodes" found on the 8086. The table which dispatches this is found in the files optab.[ch]. - Each opcode proc has a comment preceeding it which gives it's table + Each opcode proc has a comment preceding it which gives it's table address. Several opcodes are missing (undefined) in the table. Each proc includes information for decoding (DECODE_PRINTF and @@ -3100,7 +3100,7 @@ static void i86op_movs_byte(PC_ENV *m) inc = 1; if (m->sysmode & (SYSMODE_PREFIX_REPE | SYSMODE_PREFIX_REPNE)) { - /* dont care whether REPE or REPNE */ + /* don't care whether REPE or REPNE */ /* move them until CX is ZERO. */ while (m->R_CX != 0) { @@ -3133,7 +3133,7 @@ static void i86op_movs_word(PC_ENV *m) inc = 2; if (m->sysmode & (SYSMODE_PREFIX_REPE | SYSMODE_PREFIX_REPNE)) { - /* dont care whether REPE or REPNE */ + /* don't care whether REPE or REPNE */ /* move them until CX is ZERO. */ while (m->R_CX != 0) { @@ -3291,7 +3291,7 @@ static void i86op_stos_byte(PC_ENV *m) inc = 1; if (m->sysmode & (SYSMODE_PREFIX_REPE | SYSMODE_PREFIX_REPNE)) { - /* dont care whether REPE or REPNE */ + /* don't care whether REPE or REPNE */ /* move them until CX is ZERO. */ while (m->R_CX != 0) { @@ -3319,7 +3319,7 @@ static void i86op_stos_word(PC_ENV *m) inc = 2; if (m->sysmode & (SYSMODE_PREFIX_REPE | SYSMODE_PREFIX_REPNE)) { - /* dont care whether REPE or REPNE */ + /* don't care whether REPE or REPNE */ /* move them until CX is ZERO. */ while (m->R_CX != 0) { @@ -3347,7 +3347,7 @@ static void i86op_lods_byte(PC_ENV *m) inc = 1; if (m->sysmode & (SYSMODE_PREFIX_REPE | SYSMODE_PREFIX_REPNE)) { - /* dont care whether REPE or REPNE */ + /* don't care whether REPE or REPNE */ /* move them until CX is ZERO. */ while (m->R_CX != 0) { @@ -3375,7 +3375,7 @@ static void i86op_lods_word(PC_ENV *m) inc = 2; if (m->sysmode & (SYSMODE_PREFIX_REPE | SYSMODE_PREFIX_REPNE)) { - /* dont care whether REPE or REPNE */ + /* don't care whether REPE or REPNE */ /* move them until CX is ZERO. */ while (m->R_CX != 0) { diff --git a/AltairZ80/i86_prim_ops.c b/AltairZ80/i86_prim_ops.c index b45cf376..4aedbd7c 100644 --- a/AltairZ80/i86_prim_ops.c +++ b/AltairZ80/i86_prim_ops.c @@ -186,7 +186,7 @@ uint8 xor_0x3_tab[] = { 0, 1, 1, 0 }; By inspection, one gets: cc = ab + r'(a + b) - That represents alot of operations, but NO CHOICE.... + That represents a lot of operations, but NO CHOICE.... BORROW CHAIN CALCULATION. The following table represents the @@ -498,7 +498,7 @@ uint8 neg_byte(PC_ENV *m, uint8 s) CONDITIONAL_SET_FLAG(res & 0x80, m, F_SF); CONDITIONAL_SET_FLAG(parity_tab[res], m, F_PF); /* calculate the borrow chain --- modified such that d=0. - substitutiing d=0 into bc= res&(~d|s)|(~d&s); + substituting d=0 into bc= res&(~d|s)|(~d&s); (the one used for sub) and simplifying, since ~d=0xff..., ~d|s == 0xffff..., and res&0xfff... == res. Similarly ~d&s == s. So the simplified result is:*/ @@ -518,7 +518,7 @@ uint16 neg_word(PC_ENV *m, uint16 s) CONDITIONAL_SET_FLAG(res & 0x8000, m, F_SF); CONDITIONAL_SET_FLAG(parity_tab[res&0xff], m, F_PF); /* calculate the borrow chain --- modified such that d=0. - substitutiing d=0 into bc= res&(~d|s)|(~d&s); + substituting d=0 into bc= res&(~d|s)|(~d&s); (the one used for sub) and simplifying, since ~d=0xff..., ~d|s == 0xffff..., and res&0xfff... == res. Similarly ~d&s == s. So the simplified result is:*/ @@ -793,7 +793,7 @@ uint16 rcr_word(PC_ENV *m, uint16 d, uint16 s) if (cnt==1) { cf = d & 0x1; - /* see note above on teh byte version */ + /* see note above on the byte version */ ocf = ACCESS_FLAG(m,F_CF) != 0; } else @@ -1310,7 +1310,7 @@ void test_byte(PC_ENV *m, uint8 d, uint8 s) CONDITIONAL_SET_FLAG(res&0x80, m, F_SF); CONDITIONAL_SET_FLAG(res==0, m, F_ZF); CONDITIONAL_SET_FLAG(parity_tab[res&0xff], m, F_PF); - /* AF == dont care*/ + /* AF == don't care*/ CLEAR_FLAG(m, F_CF); } @@ -1322,7 +1322,7 @@ void test_word(PC_ENV *m, uint16 d, uint16 s) CONDITIONAL_SET_FLAG(res&0x8000, m, F_SF); CONDITIONAL_SET_FLAG(res==0, m, F_ZF); CONDITIONAL_SET_FLAG(parity_tab[res&0xff], m, F_PF); - /* AF == dont care*/ + /* AF == don't care*/ CLEAR_FLAG(m, F_CF); } diff --git a/AltairZ80/ibc.c b/AltairZ80/ibc.c index 091b7c09..44fc8d08 100644 --- a/AltairZ80/ibc.c +++ b/AltairZ80/ibc.c @@ -142,10 +142,10 @@ static const char* ibc_description(DEVICE *dptr); /* IBC Middi Cadet I/O Ports */ #define IBC_SIO 0x04 /* 0x04-0x13: UARTs (using AltairZ80 SIO.) UARTS 0x00-0x03 are using 2sio. */ -#define IBC_FDC_DATA 0x28 /* FDC Data Regster */ -#define IBC_PARAM 0x2a /* FDC PARAM register */ +#define IBC_FDC_DATA 0x28 /* FDC Data Register */ +#define IBC_PARAM 0x2a /* FDC PARAM Register */ #define IBC_DIPSWE 0x3c /* CPU Board DIP Switch E */ -#define IBC_BANKSEL 0x38 /* Bank Select register */ +#define IBC_BANKSEL 0x38 /* Bank Select Register */ #define IBC_FIFO_CTRL 0x3e /* FDC FIFO Control */ #define IBC_ROM_CTRL 0x3f /* ROM Control Register */ #define IBC_SCC_BANKSEL 0x58 /* Bank Select register */ @@ -252,7 +252,7 @@ static DEBTAB ibc_dt[] = { { "SBD", SBD_MSG, "System Board messages" }, { "UART", UART_MSG, "UART messages" }, { "CACHE", CACHE_MSG, "CACHE messages" }, - { "UIO", UNHANDLED_IO_MSG, "Unsuported I/O Ports" }, + { "UIO", UNHANDLED_IO_MSG, "Unsupported I/O Ports" }, { "FIFO", FIFO_MSG, "FDC FIFO messages" }, { "DIPSW", DIPSW_MSG, "DIP Switch messages" }, { NULL, 0, NULL } @@ -1817,7 +1817,7 @@ static int32 ibc_banksel(const int32 port, const int32 io, const int32 data) * 0xff: Boot from floppy (All off.) * Switch 1 - 0xfe: Boot into ROM monitor (Switch 1 on.) * Switch 2 - 0xfd: Boot from hard disk (Switch 2 on.) - * Switch 7 - 0xbe: OFF = Use FDC Interupts, ON = Poll FDC instead. + * Switch 7 - 0xbe: OFF = Use FDC Interrupts, ON = Poll FDC instead. */ result = ibc_info->dipsw_E; diff --git a/AltairZ80/ibc_mcc_hdc.c b/AltairZ80/ibc_mcc_hdc.c index 71468b5b..227ee641 100644 --- a/AltairZ80/ibc_mcc_hdc.c +++ b/AltairZ80/ibc_mcc_hdc.c @@ -49,7 +49,8 @@ #define IBC_HDC_MAX_DRIVES 4 /* Maximum number of drives supported */ #define IBC_HDC_MAX_SECLEN 256 /* Maximum of 256 bytes per sector */ #define IBC_HDC_FORMAT_FILL_BYTE 0xe5 /* Real controller uses 0, but we - choose 0xe5 so the disk shows up as blank under CP/M. */ + choose 0xe5 so the disk shows + up as blank under CP/M. */ #define IBC_HDC_MAX_CYLS 1024 #define IBC_HDC_MAX_HEADS 16 #define IBC_HDC_MAX_SPT 256 @@ -67,6 +68,7 @@ #define TF_TRKH 7 #define TF_FIFO 8 +#define IBC_HDC_STATUS_BUSY (1 << 4) #define IBC_HDC_STATUS_ERROR (1 << 0) #define IBC_HDC_ERROR_ID_NOT_FOUND (1 << 4) @@ -238,7 +240,7 @@ static t_stat ibc_hdc_attach(UNIT *uptr, CONST char *cptr) /* Defaults for the Quantum 2020 Drive */ pDrive->ready = 0; if (pDrive->ncyls == 0) { - /* If geometry was not specified, default to Quantun 2020 */ + /* If geometry was not specified, default to Quantum 2020 */ pDrive->ncyls = 512; pDrive->nheads = 4; pDrive->nsectors = 32; @@ -536,7 +538,7 @@ static t_stat IBC_HDC_doCommand(void) IBC_HDC_DRIVE_INFO* pDrive = &ibc_hdc_info->drive[ibc_hdc_info->sel_drive]; uint8 cmd = ibc_hdc_info->taskfile[TF_CMD] & IBC_HDC_CMD_MASK; - pDrive->cur_cyl = ibc_hdc_info->taskfile[TF_TRKH] << 8; + pDrive->cur_cyl = (uint16)ibc_hdc_info->taskfile[TF_TRKH] << 8; pDrive->cur_cyl |= ibc_hdc_info->taskfile[TF_TRKL]; pDrive->xfr_nsects = ibc_hdc_info->taskfile[TF_NSEC]; pDrive->cur_head = ibc_hdc_info->taskfile[TF_HEAD]; @@ -569,7 +571,7 @@ static t_stat IBC_HDC_doCommand(void) if (IBC_HDC_Validate_CHSN(pDrive) != SCPE_OK) break; /* Calculate file offset */ - file_offset = (pDrive->cur_cyl * pDrive->nheads * pDrive->nsectors); /* Full cylinders */ + file_offset = (pDrive->cur_cyl * pDrive->nheads * pDrive->nsectors); /* Full cylinders */ file_offset += (pDrive->cur_head * pDrive->nsectors); /* Add full heads */ file_offset += (pDrive->cur_sect); /* Add sectors for current request */ file_offset *= pDrive->sectsize; /* Convert #sectors to byte offset */ diff --git a/AltairZ80/ibc_smd_hdc.c b/AltairZ80/ibc_smd_hdc.c index 12c76145..a8deddb9 100644 --- a/AltairZ80/ibc_smd_hdc.c +++ b/AltairZ80/ibc_smd_hdc.c @@ -232,7 +232,7 @@ static t_stat ibc_smd_attach(UNIT *uptr, CONST char *cptr) /* Defaults for the Quantum 2020 Drive */ pDrive->ready = 0; if (pDrive->ncyls == 0) { - /* If geometry was not specified, default to Quantun 2020 */ + /* If geometry was not specified, default to Quantum 2020 */ pDrive->ncyls = 512; pDrive->nheads = 4; pDrive->nsectors = 16; diff --git a/AltairZ80/m68k/m68k.h b/AltairZ80/m68k/m68k.h index d28a2893..19169679 100755 --- a/AltairZ80/m68k/m68k.h +++ b/AltairZ80/m68k/m68k.h @@ -379,7 +379,7 @@ void m68k_set_reg(m68k_register_t reg, unsigned int value); /* Check if an instruction is valid for the specified CPU type */ unsigned int m68k_is_valid_instruction(unsigned int instruction, unsigned int cpu_type); -/* Disassemble 1 instruction using the epecified CPU type at pc. Stores +/* Disassemble 1 instruction using the specified CPU type at pc. Stores * disassembly in str_buff and returns the size of the instruction in bytes. */ unsigned int m68k_disassemble(char* str_buff, unsigned int pc, unsigned int cpu_type); diff --git a/AltairZ80/m68k/m68kconf.h b/AltairZ80/m68k/m68kconf.h index bcd4e5d6..c86721b3 100644 --- a/AltairZ80/m68k/m68kconf.h +++ b/AltairZ80/m68k/m68kconf.h @@ -140,7 +140,7 @@ * the exception occurs normally. * The callback looks like int callback(int opcode) * You should put OPT_SPECIFY_HANDLER here if you cant to use it, otherwise it will - * use a dummy default handler and you'll have to call m68k_set_illg_instr_callback explicitely + * use a dummy default handler and you'll have to call m68k_set_illg_instr_callback explicitly */ #define M68K_ILLG_HAS_CALLBACK OPT_OFF #define M68K_ILLG_CALLBACK(opcode) op_illg(opcode) @@ -199,7 +199,7 @@ */ -/* If ON, the enulation core will use 64-bit integers to speed up some +/* If ON, the emulation core will use 64-bit integers to speed up some * operations. */ #define M68K_USE_64_BIT OPT_ON diff --git a/AltairZ80/m68k/m68kcpu.c b/AltairZ80/m68k/m68kcpu.c index 643e3654..ec21c1c9 100755 --- a/AltairZ80/m68k/m68kcpu.c +++ b/AltairZ80/m68k/m68kcpu.c @@ -973,7 +973,7 @@ int m68k_execute(int num_cycles) do { int i; - /* Set tracing accodring to T1. (T0 is done inside instruction) */ + /* Set tracing according to T1. (T0 is done inside instruction) */ m68ki_trace_t1(); /* auto-disable (see m68kcpu.h) */ /* Set the address space for reads */ @@ -1037,7 +1037,7 @@ void m68k_end_timeslice(void) /* ASG: rewrote so that the int_level is a mask of the IPL0/IPL1/IPL2 bits */ /* KS: Modified so that IPL* bits match with mask positions in the SR - * and cleaned out remenants of the interrupt controller. + * and cleaned out remnants of the interrupt controller. */ void m68k_set_irq(unsigned int int_level) { diff --git a/AltairZ80/m68k/m68kcpu.h b/AltairZ80/m68k/m68kcpu.h index 5befb393..42663d26 100755 --- a/AltairZ80/m68k/m68kcpu.h +++ b/AltairZ80/m68k/m68kcpu.h @@ -398,7 +398,7 @@ typedef uint32 uint64; /* ----------------------------- Configuration ---------------------------- */ -/* These defines are dependant on the configuration defines in m68kconf.h */ +/* These defines are dependent on the configuration defines in m68kconf.h */ /* Disable certain comparisons if we're not using all CPU types */ #if M68K_EMULATE_040 @@ -2015,7 +2015,7 @@ static inline void m68ki_exception_illegal(void) USE_CYCLES(CYC_EXCEPTION[EXCEPTION_ILLEGAL_INSTRUCTION_M68K] - CYC_INSTRUCTION[REG_IR]); } -/* Exception for format errror in RTE */ +/* Exception for format error in RTE */ static inline void m68ki_exception_format_error(void) { uint sr = m68ki_init_exception(); @@ -2052,7 +2052,7 @@ static inline void m68ki_exception_address_error(void) /* Use up some clock cycles. Note that we don't need to undo the instruction's cycles here as we've longjmp:ed directly from the - instruction handler without passing the part of the excecute loop + instruction handler without passing the part of the execute loop that deducts instruction cycles */ USE_CYCLES(CYC_EXCEPTION[EXCEPTION_ADDRESS_ERROR]); } diff --git a/AltairZ80/m68k/m68kdasm.c b/AltairZ80/m68k/m68kdasm.c index c42e1c3b..1af9172d 100755 --- a/AltairZ80/m68k/m68kdasm.c +++ b/AltairZ80/m68k/m68kdasm.c @@ -156,7 +156,7 @@ uint read_imm_8(void); uint read_imm_16(void); uint read_imm_32(void); -/* Read data at the PC but don't imcrement the PC */ +/* Read data at the PC but don't increment the PC */ uint peek_imm_8(void); uint peek_imm_16(void); uint peek_imm_32(void); @@ -3721,7 +3721,7 @@ static void build_opcode_table(void) /* ================================= API ================================== */ /* ======================================================================== */ -/* Disasemble one instruction at pc and store in str_buff */ +/* Disassemble one instruction at pc and store in str_buff */ unsigned int m68k_disassemble(char* str_buff, unsigned int pc, unsigned int cpu_type) { if(!g_initialized) @@ -3773,7 +3773,7 @@ unsigned int m68k_disassemble(char* str_buff, unsigned int pc, unsigned int cpu_ char* m68ki_disassemble_quick(unsigned int pc, unsigned int cpu_type) { - static char buff[100]; + static char buff[200]; buff[0] = 0; m68k_disassemble(buff, pc, cpu_type); return buff; diff --git a/AltairZ80/m68ksim.c b/AltairZ80/m68ksim.c index c497d7ad..fedec4b7 100644 --- a/AltairZ80/m68ksim.c +++ b/AltairZ80/m68ksim.c @@ -1,6 +1,6 @@ /* m68kcpmsim.c: CP/M for Motorola 68000 definitions - Copyright (c) 2014, Peter Schorn + Copyright (c) 2014 - 2023, Peter Schorn Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), @@ -48,7 +48,7 @@ sector number to the sector register. This write triggers the requested operation. The status of the operation can be determined by reading the status register. - A zero indicates that no error occured. + A zero indicates that no error occurred. Note that these operations invoke read() and write() system calls directly so that they will alter the image on the hard disk. KEEP BACKUPS! @@ -98,7 +98,7 @@ /* Memory-mapped IO ports */ -/* 6850 serial port like thing. Implements a reduced set of functionallity. */ +/* 6850 serial port like thing. Implements a reduced set of functionality. */ #define MC6850_STAT 0xff1000L // command/status register #define MC6850_DATA 0xff1002L // receive/transmit data register @@ -335,7 +335,7 @@ static int MC6850_device_ack(void) { static void MC6850_data_write(uint32 value) { sim_putchar(value); - if ((m68k_MC6850_control & 0x60) == 0x20) { // transmit interupt enabled? + if ((m68k_MC6850_control & 0x60) == 0x20) { // transmit interrupt enabled? int_controller_clear(IRQ_MC6850); int_controller_set(IRQ_MC6850); } diff --git a/AltairZ80/m68ksim.h b/AltairZ80/m68ksim.h index 060810b5..6e3ca884 100644 --- a/AltairZ80/m68ksim.h +++ b/AltairZ80/m68ksim.h @@ -1,6 +1,6 @@ /* m68kcpmsim.h: CP/M for Motorola 68000 definitions - Copyright (c) 2014, Peter Schorn + Copyright (c) 2014 - 2023, 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/nasm.h b/AltairZ80/nasm.h index 2745189b..df33098d 100644 --- a/AltairZ80/nasm.h +++ b/AltairZ80/nasm.h @@ -11,8 +11,6 @@ #ifndef NASM_NASM_H #define NASM_NASM_H -#include - #ifndef NULL #define NULL 0 #endif diff --git a/AltairZ80/s100_2sio.c b/AltairZ80/s100_2sio.c index 0501718e..7b7561de 100644 --- a/AltairZ80/s100_2sio.c +++ b/AltairZ80/s100_2sio.c @@ -65,7 +65,7 @@ We get many calls on how to interface terminals to the 2SIO. The problem is that the Asynchronous Communications Interface Adapter's (ACIA) handshaking signals make interfacing with the 2SIO a - somewhat complicated matter. An explaination of the signals and + somewhat complicated matter. An explanation of the signals and their function should make the job easier. The three handshaking signals--Data Carrier Detect (DCD), Request to Send (RTS) and Clear to Send (CTS)--permit limited control of a modem or @@ -79,8 +79,8 @@ section is inhibited and no data can be received by the ACIA. Information from the two input signals, CTS and DCD, is present in - the ACIA status register. Bit 2 represents *DCD, and bit 3 repre- - sents *CTS. When bit 2 is high, DCD is inactive. When bit 3 is high, + the ACIA status register. Bit 2 represents *DCD, and bit 3 + represents *CTS. When bit 2 is high, DCD is inactive. When bit 3 is high, CTS is inactive. When bit 2 goes low, valid data is sent to the ACIA. When bit 3 goes low, data can be transmitted. @@ -230,6 +230,8 @@ static TMXR m2sio1_tmxr = { /* multiplexer descriptor */ #define UNIT_M2SIO_DTR (1 << UNIT_V_M2SIO_DTR) #define UNIT_V_M2SIO_DCD (UNIT_V_UF + 2) /* Force DCD active low */ #define UNIT_M2SIO_DCD (1 << UNIT_V_M2SIO_DCD) +#define UNIT_V_M2SIO_CTS (UNIT_V_UF + 3) /* Force CTS active low */ +#define UNIT_M2SIO_CTS (1 << UNIT_V_M2SIO_CTS) static MTAB m2sio_mod[] = { { MTAB_XTD|MTAB_VDV, 0, "IOBASE", "IOBASE", @@ -246,6 +248,10 @@ static MTAB m2sio_mod[] = { "Force DCD active low" }, { UNIT_M2SIO_DCD, 0, "NODCD", "NODCD", NULL, NULL, NULL, "DCD follows status line (default)" }, + { UNIT_M2SIO_CTS, UNIT_M2SIO_CTS, "CTS", "CTS", NULL, NULL, NULL, + "Force CTS active low" }, + { UNIT_M2SIO_CTS, 0, "NOCTS", "NOCTS", NULL, NULL, NULL, + "CTS follows status line (default)" }, { MTAB_XTD|MTAB_VDV|MTAB_VALR, 0, "BAUD", "BAUD", &m2sio_set_baud, &m2sio_show_baud, NULL, "Set baud rate (default=9600)" }, { 0 } @@ -395,7 +401,7 @@ static t_stat m2sio_reset(DEVICE *dptr, int32 (*routine)(const int32, const int3 c = getClockFrequency() / 5; dptr->units[0].wait = (c && c < 1000) ? c : 1000; - /* Enable TMXR modem control passthru */ + /* Enable TMXR modem control passthrough */ tmxr_set_modem_control_passthru(xptr->tmxr); /* Reset status registers */ @@ -440,7 +446,7 @@ static t_stat m2sio_svc(UNIT *uptr) tmxr_set_get_modem_bits(xptr->tmln, 0, 0, &s); stb = xptr->stb; xptr->stb &= ~M2SIO_CTS; - xptr->stb |= (s & TMXR_MDM_CTS) ? 0 : M2SIO_CTS; /* Active Low */ + xptr->stb |= ((s & TMXR_MDM_CTS) || (uptr->flags & UNIT_M2SIO_CTS)) ? 0 : M2SIO_CTS; /* Active Low */ if ((stb ^ xptr->stb) & M2SIO_CTS) { sim_debug(STATUS_MSG, uptr->dptr, "CTS state changed to %s.\n", (xptr->stb & M2SIO_CTS) ? "LOW" : "HIGH"); } @@ -665,7 +671,7 @@ static t_stat m2sio_config_line(UNIT *uptr) ** to run irrelevant, old software, that use TMXR and ** rely on some semblance of timing (Remote CP/M, BYE, ** RBBS, PCGET/PUT, Xmodem, MEX, Modem7, or most - ** other communications software), on contemprary + ** other communications software), on contemporary ** hardware. ** ** Serial ports are self-limiting and sockets will run diff --git a/AltairZ80/s100_64fdc.c b/AltairZ80/s100_64fdc.c index 19cb86da..e8ca326f 100644 --- a/AltairZ80/s100_64fdc.c +++ b/AltairZ80/s100_64fdc.c @@ -258,7 +258,7 @@ DEVICE cromfdc_dev = { }; /* This is the CROMFDC RDOS-II ROM. - * The CROMFDC has a single 8K ROM; however ths simulation includes + * The CROMFDC has a single 8K ROM; however this simulation includes * two different versions of RDOS: * RDOS 2.52 and RDOS 3.12 * RDOS 2.52 is the default, but RDOS 3.12 can be diff --git a/AltairZ80/s100_adcs6.c b/AltairZ80/s100_adcs6.c index 104c650d..fa2f8433 100644 --- a/AltairZ80/s100_adcs6.c +++ b/AltairZ80/s100_adcs6.c @@ -313,7 +313,7 @@ static uint8 adcs6_rom[2][ADCS6_ROM_SIZE] = { * * MONITOR COMMANDS : * B = Load disk boot loader - * C = Load disk boot loader from cartriage + * C = Load disk boot loader from cartridge * DSSSS,QQQQ = Dump memory in hex from S to Q * FSSSS,QQQQ,BB = Fill memory from S to Q with B * GAAAA = Go to address A diff --git a/AltairZ80/s100_disk2.c b/AltairZ80/s100_disk2.c index 1def375f..1e817c43 100644 --- a/AltairZ80/s100_disk2.c +++ b/AltairZ80/s100_disk2.c @@ -78,8 +78,8 @@ typedef struct { uint8 sel_drive; /* Currently selected drive */ uint8 head_sel; /* Head select (signals to drive itself) */ uint8 head; /* Head set by write to the HEAD register */ - uint8 cyl; /* Cyl that the current operation is targetting */ - uint8 sector; /* Sector the current READ/WRITE operation is targetting */ + uint8 cyl; /* Cyl that the current operation is targeting */ + uint8 sector; /* Sector the current READ/WRITE operation is targeting */ uint8 hdr_sector; /* Current sector for WRITE_HEADER */ uint8 ctl_attn; uint8 ctl_run; @@ -152,11 +152,11 @@ static REG disk2_reg[] = { { HRDATAD (SEL_DRIVE, disk2_info_data.sel_drive, 3, "Currently selected drive"), }, { HRDATAD (CYL, disk2_info_data.cyl, 8, - "Cylinder that the current operation is targetting"), }, + "Cylinder that the current operation is targeting"), }, { HRDATAD (HEAD, disk2_info_data.head, 8, - "Head that the current operation is targetting"), }, + "Head that the current operation is targeting"), }, { HRDATAD (SECTOR, disk2_info_data.sector, 8, - "Sector that the current operation is targetting"), }, + "Sector that the current operation is targeting"), }, { NULL } }; @@ -575,7 +575,7 @@ static uint8 DISK2_Write(const uint32 Addr, uint8 cData) " READ_HEADER: sim_fseek error.\n", PCX); } selchan_dma(sdata.raw, 3); - + break; default: sim_printf("DISK2: " ADDRESS_FORMAT " Unknown CMD=%d\n", PCX, disk2_info->ctl_op); diff --git a/AltairZ80/s100_dj2d.c b/AltairZ80/s100_dj2d.c index 2cd3c120..28ad1645 100644 --- a/AltairZ80/s100_dj2d.c +++ b/AltairZ80/s100_dj2d.c @@ -973,7 +973,7 @@ static DEBTAB dj2d_dt[] = { { "WRITE", WR_DATA_MSG, "Write messages" }, { "STATUS", STATUS_MSG, "Status messages" }, { "RDDETAIL", RD_DATA_DETAIL_MSG, "Read detail messages" }, - { "WRDETAIL", WR_DATA_DETAIL_MSG, "Write detail messags" }, + { "WRDETAIL", WR_DATA_DETAIL_MSG, "Write detail messages" }, { "VERBOSE", VERBOSE_MSG, "Verbose messages" }, { "DEBUG", DEBUG_MSG, "Debug messages" }, { NULL, 0 } @@ -2075,7 +2075,7 @@ static uint32 DJ2D_WriteSector(UNIT *uptr, uint8 track, uint8 sector, uint8 *buf } rtn = sim_fwrite(buffer, 1, len, uptr->fileref); - + sim_debug(WR_DATA_MSG, &dj2d_dev, DJ2D_SNAME ": WRITESEC track %03d sector %03d at offset %08llX len %d rtn=%d\n", track, sector, sec_offset, len, rtn); return rtn; diff --git a/AltairZ80/s100_djhdc.c b/AltairZ80/s100_djhdc.c index 7479c94b..d223ee87 100644 --- a/AltairZ80/s100_djhdc.c +++ b/AltairZ80/s100_djhdc.c @@ -529,7 +529,7 @@ static uint8 DJHDC_Write(const uint32 Addr, uint8 cData) /* Point IOPB to new link */ djhdc_info->link_addr = next_link; - /* Read remaineder of IOPB */ + /* Read remainder of IOPB */ for(i = 0; i < DJHDC_IOPB_LEN-3; i++) { djhdc_info->iopb[i] = GetByteDMA((djhdc_info->link_addr) + i); } diff --git a/AltairZ80/s100_fif.c b/AltairZ80/s100_fif.c index a5a612ce..ed65a70f 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-2014, Peter Schorn + Based on altairz80_dsk.c, Copyright (c) 2002-2023, Peter Schorn Plug-n-Play added by Howard M. Harte diff --git a/AltairZ80/s100_hayes.c b/AltairZ80/s100_hayes.c index 350e856e..e69c6b8e 100644 --- a/AltairZ80/s100_hayes.c +++ b/AltairZ80/s100_hayes.c @@ -27,7 +27,7 @@ This device emulates D.C. Hayes 80-103A and Micromodem 100 communications adapters. - To provide any useful funcationality, this device need to be attached to + To provide any useful functionality, this device need to be attached to a socket or serial port. Enter "HELP HAYES" at the "simh>" prompt for additional information. */ @@ -199,32 +199,32 @@ static REG hayes_reg[] = { }; DEVICE hayes_dev = { - HAYES_SNAME, /* name */ - hayes_unit, /* unit */ - hayes_reg, /* registers */ - hayes_mod, /* modifiers */ - 1, /* # units */ - 10, /* address radix */ - 31, /* address width */ - 1, /* address increment */ - 8, /* data radix */ - 8, /* data width */ - NULL, /* examine routine */ - NULL, /* deposit routine */ + HAYES_SNAME, /* name */ + hayes_unit, /* unit */ + hayes_reg, /* registers */ + hayes_mod, /* modifiers */ + 1, /* # units */ + 10, /* address radix */ + 31, /* address width */ + 1, /* address increment */ + 8, /* data radix */ + 8, /* data width */ + NULL, /* examine routine */ + NULL, /* deposit routine */ &hayes_reset, /* reset routine */ - NULL, /* boot routine */ - &hayes_attach, /* attach routine */ - &hayes_detach, /* detach routine */ - &hayes_ctx, /* context */ - (DEV_DISABLE | DEV_DIS | DEV_DEBUG | DEV_MUX), /* flags */ - 0, /* debug control */ - hayes_dt, /* debug flags */ - NULL, /* mem size routine */ - NULL, /* logical name */ - NULL, /* help */ - NULL, /* attach help */ - NULL, /* context for help */ - &hayes_description /* description */ + NULL, /* boot routine */ + &hayes_attach, /* attach routine */ + &hayes_detach, /* detach routine */ + &hayes_ctx, /* context */ + (DEV_DISABLE | DEV_DIS | DEV_DEBUG | DEV_MUX), /* flags */ + 0, /* debug control */ + hayes_dt, /* debug flags */ + NULL, /* mem size routine */ + NULL, /* logical name */ + NULL, /* help */ + NULL, /* attach help */ + NULL, /* context for help */ + &hayes_description /* description */ }; static const char* hayes_description(DEVICE *dptr) @@ -243,7 +243,7 @@ static t_stat hayes_reset(DEVICE *dptr) /* Set DEVICE for this UNIT */ dptr->units[0].dptr = dptr; - /* Enable TMXR modem control passthru */ + /* Enable TMXR modem control passthrough */ tmxr_set_modem_control_passthru(hayes_ctx.tmxr); /* Reset status registers */ @@ -505,7 +505,7 @@ static t_stat hayes_config_line(UNIT *uptr) ** to run irrelevant, old software, that use TMXR and ** rely on some semblance of timing (Remote CP/M, BYE, ** RBBS, PCGET/PUT, Xmodem, MEX, Modem7, or most - ** other communications software), on contemprary + ** other communications software), on contemporary ** hardware. ** ** Serial ports are self-limiting and sockets will run diff --git a/AltairZ80/s100_hdc1001.c b/AltairZ80/s100_hdc1001.c index 0f0f8480..017fb53d 100644 --- a/AltairZ80/s100_hdc1001.c +++ b/AltairZ80/s100_hdc1001.c @@ -261,7 +261,7 @@ static t_stat hdc1001_attach(UNIT *uptr, CONST char *cptr) /* Defaults for the Quantum 2020 Drive */ pDrive->ready = 0; if (pDrive->ncyls == 0) { - /* If geometry was not specified, default to Quantun 2020 */ + /* If geometry was not specified, default to Quantum 2020 */ pDrive->ncyls = 512; pDrive->nheads = 4; pDrive->nsectors = 16; @@ -448,7 +448,7 @@ static uint8 HDC1001_Write(const uint32 Addr, uint8 cData) break; case 2: sim_debug(ERROR_MSG, &hdc1001_dev,DEV_NAME "%d: " ADDRESS_FORMAT - " Invalid sector size specified in SDH registrer.\n", hdc1001_info->sel_drive, PCX); + " Invalid sector size specified in SDH register.\n", hdc1001_info->sel_drive, PCX); pDrive->cur_sectsize = 512; break; case 3: @@ -458,7 +458,7 @@ static uint8 HDC1001_Write(const uint32 Addr, uint8 cData) if (pDrive->sectsize != pDrive->cur_sectsize) { sim_debug(ERROR_MSG, &hdc1001_dev,DEV_NAME "%d: " ADDRESS_FORMAT - " Sector size specified in SDH registrer (0x%x) does not match disk geometry (0x%x.)\n", + " Sector size specified in SDH register (0x%x) does not match disk geometry (0x%x.)\n", hdc1001_info->sel_drive, PCX, pDrive->cur_sectsize, pDrive->sectsize); } /* fall through */ diff --git a/AltairZ80/s100_icom.c b/AltairZ80/s100_icom.c index a8b4ffa6..6bd0f6b3 100644 --- a/AltairZ80/s100_icom.c +++ b/AltairZ80/s100_icom.c @@ -1,7 +1,7 @@ /* s100_icom.c: iCOM FD3712/FD3812 Flexible Disk System - + Created by Patrick Linstruth (patrick@deltecent.com) - + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation @@ -116,7 +116,7 @@ 32K: B = 32K - 16K = 16K = 04000H 48K: B = 48K = 16K = 32K = 08000H 62K: B = 62K = 16K = 46K = 0B800H - 64K: B = 64K = 16K = 48K = 0C000H + 64K: B = 64K = 16K = 48K = 0C000H +----------------------------------------------------------------------+ | | @@ -200,134 +200,134 @@ static uint8 icom_mem[ICOM_MEM_SIZE]; /* iCOM PROMs are 1024 bytes */ static uint8 icom_3712_prom[ICOM_PROM_SIZE] = { - 0xc3, 0x73, 0xf0, 0x20, 0x41, 0x4c, 0x54, 0x41, - 0x49, 0x52, 0x43, 0x20, 0xc3, 0x85, 0xf0, 0x15, - 0xc3, 0xa6, 0xf0, 0xc3, 0xc7, 0xf0, 0xc3, 0x06, - 0xf4, 0xc3, 0x09, 0xf4, 0xc3, 0x0c, 0xf4, 0xc3, - 0x0f, 0xf4, 0xc3, 0x12, 0xf4, 0xc3, 0x15, 0xf4, - 0xc3, 0x6b, 0xf1, 0xc3, 0x73, 0xf1, 0xc3, 0x6e, - 0xf1, 0xc3, 0x7d, 0xf1, 0xc3, 0x82, 0xf1, 0xc3, - 0x88, 0xf1, 0xc3, 0xc5, 0xf1, 0xc9, 0x00, 0x00, - 0xc3, 0x64, 0xf1, 0xc3, 0x5a, 0xf2, 0x20, 0x33, - 0x37, 0x31, 0x32, 0x2d, 0x56, 0x32, 0x31, 0x20, - 0x28, 0x43, 0x29, 0x20, 0x4c, 0x49, 0x46, 0x45, - 0x42, 0x4f, 0x41, 0x54, 0x20, 0x41, 0x53, 0x53, - 0x4f, 0x43, 0x49, 0x41, 0x54, 0x45, 0x53, 0x20, - 0x31, 0x39, 0x37, 0x39, 0x20, 0x21, 0xe0, 0xf3, - 0xc3, 0x7f, 0xf0, 0x21, 0xf0, 0xf3, 0xc3, 0x7f, - 0xf0, 0x21, 0x68, 0xf3, 0xc3, 0x7f, 0xf0, 0x31, - 0x80, 0x00, 0xcd, 0x8f, 0xf2, 0x31, 0x80, 0x00, - 0xcd, 0x5a, 0xf2, 0x0e, 0x00, 0xcd, 0x6e, 0xf1, - 0x01, 0x80, 0x00, 0xcd, 0x82, 0xf1, 0xcd, 0x88, - 0xf1, 0xc2, 0x88, 0xf0, 0x21, 0x00, 0xf4, 0xeb, - 0x21, 0x10, 0xf0, 0xc3, 0x80, 0x00, 0x22, 0x40, - 0xf4, 0x11, 0xf0, 0xff, 0x19, 0x11, 0x20, 0xf4, - 0x06, 0x10, 0xcd, 0x86, 0xf2, 0x11, 0x80, 0xff, - 0x19, 0xaf, 0x32, 0x48, 0xf4, 0xcd, 0x4f, 0xf1, - 0xaf, 0x32, 0x04, 0x00, 0xc3, 0x28, 0xf1, 0x31, - 0x00, 0x01, 0xcd, 0x5a, 0xf2, 0x0e, 0x00, 0xcd, - 0x6e, 0xf1, 0x2a, 0x40, 0xf4, 0x11, 0x00, 0xeb, - 0x19, 0x24, 0x3e, 0x04, 0xcd, 0xf7, 0xf0, 0x0e, - 0x01, 0xcd, 0x6e, 0xf1, 0x2a, 0x40, 0xf4, 0x11, - 0x00, 0xeb, 0x19, 0x11, 0x80, 0x0c, 0x19, 0x3e, - 0x01, 0xcd, 0xf7, 0xf0, 0xc3, 0x28, 0xf1, 0x32, - 0x32, 0xf4, 0x22, 0x33, 0xf4, 0x3a, 0x41, 0xf4, - 0x3d,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xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xd1, 0xf2, 0xd2, 0xf2, 0xd3, 0xf2, 0xdc, 0xf2, - 0xeb, 0xf2, 0xf6, 0xf2, 0xeb, 0xf2, 0xdc, 0xf2, - 0xa5, 0xf2, 0xd2, 0xf2, 0xae, 0xf2, 0xb7, 0xf2, - 0xc6, 0xf2, 0xf6, 0xf2, 0xc6, 0xf2, 0xb7, 0xf2, + 0xc3, 0x73, 0xf0, 0x20, 0x41, 0x4c, 0x54, 0x41, + 0x49, 0x52, 0x43, 0x20, 0xc3, 0x85, 0xf0, 0x15, + 0xc3, 0xa6, 0xf0, 0xc3, 0xc7, 0xf0, 0xc3, 0x06, + 0xf4, 0xc3, 0x09, 0xf4, 0xc3, 0x0c, 0xf4, 0xc3, + 0x0f, 0xf4, 0xc3, 0x12, 0xf4, 0xc3, 0x15, 0xf4, + 0xc3, 0x6b, 0xf1, 0xc3, 0x73, 0xf1, 0xc3, 0x6e, + 0xf1, 0xc3, 0x7d, 0xf1, 0xc3, 0x82, 0xf1, 0xc3, + 0x88, 0xf1, 0xc3, 0xc5, 0xf1, 0xc9, 0x00, 0x00, + 0xc3, 0x64, 0xf1, 0xc3, 0x5a, 0xf2, 0x20, 0x33, + 0x37, 0x31, 0x32, 0x2d, 0x56, 0x32, 0x31, 0x20, + 0x28, 0x43, 0x29, 0x20, 0x4c, 0x49, 0x46, 0x45, + 0x42, 0x4f, 0x41, 0x54, 0x20, 0x41, 0x53, 0x53, + 0x4f, 0x43, 0x49, 0x41, 0x54, 0x45, 0x53, 0x20, + 0x31, 0x39, 0x37, 0x39, 0x20, 0x21, 0xe0, 0xf3, + 0xc3, 0x7f, 0xf0, 0x21, 0xf0, 0xf3, 0xc3, 0x7f, + 0xf0, 0x21, 0x68, 0xf3, 0xc3, 0x7f, 0xf0, 0x31, + 0x80, 0x00, 0xcd, 0x8f, 0xf2, 0x31, 0x80, 0x00, + 0xcd, 0x5a, 0xf2, 0x0e, 0x00, 0xcd, 0x6e, 0xf1, + 0x01, 0x80, 0x00, 0xcd, 0x82, 0xf1, 0xcd, 0x88, + 0xf1, 0xc2, 0x88, 0xf0, 0x21, 0x00, 0xf4, 0xeb, + 0x21, 0x10, 0xf0, 0xc3, 0x80, 0x00, 0x22, 0x40, + 0xf4, 0x11, 0xf0, 0xff, 0x19, 0x11, 0x20, 0xf4, + 0x06, 0x10, 0xcd, 0x86, 0xf2, 0x11, 0x80, 0xff, + 0x19, 0xaf, 0x32, 0x48, 0xf4, 0xcd, 0x4f, 0xf1, + 0xaf, 0x32, 0x04, 0x00, 0xc3, 0x28, 0xf1, 0x31, + 0x00, 0x01, 0xcd, 0x5a, 0xf2, 0x0e, 0x00, 0xcd, + 0x6e, 0xf1, 0x2a, 0x40, 0xf4, 0x11, 0x00, 0xeb, + 0x19, 0x24, 0x3e, 0x04, 0xcd, 0xf7, 0xf0, 0x0e, + 0x01, 0xcd, 0x6e, 0xf1, 0x2a, 0x40, 0xf4, 0x11, + 0x00, 0xeb, 0x19, 0x11, 0x80, 0x0c, 0x19, 0x3e, + 0x01, 0xcd, 0xf7, 0xf0, 0xc3, 0x28, 0xf1, 0x32, + 0x32, 0xf4, 0x22, 0x33, 0xf4, 0x3a, 0x41, 0xf4, + 0x3d, 0xbc, 0xda, 0x0b, 0xf1, 0xcd, 0x88, 0xf1, + 0xc2, 0xc7, 0xf0, 0x2a, 0x33, 0xf4, 0x11, 0x80, + 0x01, 0x19, 0x3a, 0x32, 0xf4, 0xc6, 0x03, 0xfe, + 0x1b, 0xda, 0xf7, 0xf0, 0xd6, 0x1a, 0x11, 0x00, + 0xf3, 0x19, 0xfe, 0x01, 0xc2, 0xf7, 0xf0, 0xc9, + 0x01, 0x80, 0x00, 0xcd, 0x82, 0xf1, 0x3e, 0xc3, + 0x32, 0x00, 0x00, 0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af, + 0x32, 0x47, 0xf4, 0x79, 0x32, 0x49, 0xf4, 0xdb, + 0x02, 0xe6, 0x11, 0xca, 0x4f, 0xf3, 0x79, 0xd3, + 0x03, 0xc9, 0x0e, 0x20, 0xcd, 0x0c, 0xf3, 0x3a, + 0x47, 0xf4, 0xe6, 0x07, 0xc2, 0x5a, 0xf3, 0xc9, + 0xa8, 0xf3, 0xd2, 0xf2, 0xa1, 0xf3, 0x78, 0xf3, + 0x8e, 0xf3, 0xf6, 0xf2, 0x8e, 0xf3, 0x78, 0xf3, + 0xcd, 0x84, 0xf3, 0xca, 0x78, 0xf3, 0x7e, 0xe6, + 0x7f, 0x36, 0x00, 0xc9, 0x21, 0x4b, 0xf4, 0x7e, + 0xb7, 0xcc, 0x1f, 0xc0, 0x77, 0xc9, 0x3a, 0x4a, + 0xf4, 0xfe, 0x0d, 0xc2, 0x98, 0xf3, 0xb9, 0xc8, + 0x79, 0x32, 0x4a, 0xf4, 0x41, 0xcd, 0x19, 0xc0, + 0xc9, 0xcd, 0x84, 0xf3, 0xc8, 0x3e, 0xff, 0xc9, + 0x21, 0x00, 0x00, 0x22, 0x4a, 0xf4, 0xc9, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xd1, 0xf2, 0xd2, 0xf2, 0xd3, 0xf2, 0xdc, 0xf2, + 0xeb, 0xf2, 0xf6, 0xf2, 0xeb, 0xf2, 0xdc, 0xf2, + 0xa5, 0xf2, 0xd2, 0xf2, 0xae, 0xf2, 0xb7, 0xf2, + 0xc6, 0xf2, 0xf6, 0xf2, 0xc6, 0xf2, 0xb7, 0xf2, }; static uint8 icom_3812_prom[ICOM_PROM_SIZE] = { @@ -458,7 +458,7 @@ static uint8 icom_3812_prom[ICOM_PROM_SIZE] = { 0xb7, 0xc8, 0x4e, 0xe5, 0xcd, 0xec, 0xf3, 0xe1, 0x23, 0xc3, 0xdf, 0xf3, 0x2a, 0x40, 0xf4, 0x2e, 0x0c, 0xe9, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; static uint8 *icom_prom = icom_3812_prom; /* default is 3812 */ @@ -655,7 +655,7 @@ static DEBTAB icom_dt[] = { { "WRITE", WR_DATA_MSG, "Write messages" }, { "STATUS", STATUS_MSG, "Status messages" }, { "RDDETAIL", RD_DATA_DETAIL_MSG, "Read detail messages" }, - { "WRDETAIL", WR_DATA_DETAIL_MSG, "Write detail messags" }, + { "WRDETAIL", WR_DATA_DETAIL_MSG, "Write detail messages" }, { NULL, 0 } }; @@ -678,7 +678,7 @@ DEVICE icom_dev = { &icom_detach, /* detach routine */ &icom_info_data, /* context */ (DEV_DISABLE | DEV_DIS | DEV_DEBUG), /* flags */ - ERROR_MSG, /* debug control */ + ERROR_MSG, /* debug control */ icom_dt, /* debug flags */ NULL, /* mem size routine */ NULL, /* logical name */ @@ -785,7 +785,7 @@ static t_stat icom_attach(UNIT *uptr, CONST char *cptr) /* Default for new file is DSK */ uptr->u3 = IMAGE_TYPE_DSK; - sim_debug(VERBOSE_MSG, uptr->dptr, "unit %d, attached to '%s' size=%d interface=%s\n", + sim_debug(VERBOSE_MSG, uptr->dptr, "unit %d, attached to '%s' size=%d interface=%s\n", i, cptr, uptr->capac, (icom_info->boardType == ICOM_TYPE_3712) ? "FD3712" : "FD3812"); return SCPE_OK; diff --git a/AltairZ80/s100_jadedd.c b/AltairZ80/s100_jadedd.c index 0fe8aec2..e6a3de8f 100644 --- a/AltairZ80/s100_jadedd.c +++ b/AltairZ80/s100_jadedd.c @@ -1,8 +1,8 @@ /* s100_jadedd.c: Jade Double D Disk Controller - + Created by Patrick Linstruth (patrick@deltecent.com) Based on s100_mdsa.c written by Mike Douglas - + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation @@ -31,7 +31,7 @@ and memory address space. While the Double D is capable to loading many different operating systems, - this emulator is centered around Digital Reasearch's CP/M 2 operating + this emulator is centered around Digital Research's CP/M 2 operating system as it was released by Jade. The process of booting CP/M with the DD is a bit more complicated than @@ -60,9 +60,9 @@ When the DDBOOT PROM sees that the DD has halted, it checks for errors and then moves BIOS from memory bank 1 to the address stored in the Command Block. DDBOOT PROM then jumps to the BIOS cold start address. - + ** NOTE ** - + This emulator does not actually execute Z80 code injected on the DD. The functionality of the code is only emulated. Changing the DD modules on the attached disk image, such as running DCMGEN, will not change the functionality @@ -301,7 +301,7 @@ static uint8 jade_prom[JADE_PROM_SIZE] = { 0xdb,0x80,0xdb,0x07,0xa9,0x77,0x23,0x1b,0x7a,0xb3,0xc2,0x8a,0x00,0xdb,0x04,0xa9, 0xe6,0x9c,0xc2,0xaa,0x00,0xcd,0x50,0x00,0xc3,0x03,0x04,0x3e,0x02,0xc3,0xb1,0x00, 0x3e,0x04,0xc3,0xb1,0x00,0x3e,0x01,0x32,0x76,0x03,0xaf,0xd3,0x00,0xdb,0x10,0x76, - 0x3e,0xdc,0x3d,0x00,0xc2,0xbc,0x00,0x1b,0x7a,0xb3,0xc2,0xba,0x00,0xc9 + 0x3e,0xdc,0x3d,0x00,0xc2,0xbc,0x00,0x1b,0x7a,0xb3,0xc2,0xba,0x00,0xc9 }; #define JADE_STAT_HLT_MSK 0x01 @@ -312,7 +312,7 @@ static uint8 jade_prom[JADE_PROM_SIZE] = { #define CMD_MD0 0x01 /* Select DD bank 0 */ #define CMD_MD1 0x03 /* Select DD bank 1 */ #define CMD_SOT 0x00 /* Switch DD mem out of system */ -#define CMD_INT 0x02 /* Isssue DD Z80A interrupt */ +#define CMD_INT 0x02 /* Issue DD Z80A interrupt */ #define CMD_BGN 0x80 /* Reset Z80 and execute */ #define DC_LOG 0x00 /* Log on diskette */ @@ -494,7 +494,7 @@ static DEBTAB jade_dt[] = { { "WRITE", WR_DATA_MSG, "Write messages" }, { "STATUS", STATUS_MSG, "Status messages" }, { "RDDETAIL", RD_DATA_DETAIL_MSG, "Read detail messages" }, - { "WRDETAIL", WR_DATA_DETAIL_MSG, "Write detail messags" }, + { "WRDETAIL", WR_DATA_DETAIL_MSG, "Write detail messages" }, { NULL, 0 } }; @@ -901,7 +901,7 @@ static uint8 JADE_Out(uint32 Addr, int32 Data) case CMD_BGN: /* Reset and Execute */ /* - ** Card has been reset and the host boot PROM + ** Card has been reset and the host boot PROM ** has loaded the DCM injector module onto the DD. ** This modules reads the DCM from track 0 starting ** at sector 13 into memory bank 1. After the DCM @@ -1200,7 +1200,7 @@ static uint8 DCM_Format(uint8 drive, uint8 track) memset(sbuf, 0xe5, sizeof(sbuf)); jade_info->dt[drive].flg = 0; - + /* ** Are we formatting double density? */ diff --git a/AltairZ80/s100_mdsa.c b/AltairZ80/s100_mdsa.c index aa4a865c..d6646ada 100644 --- a/AltairZ80/s100_mdsa.c +++ b/AltairZ80/s100_mdsa.c @@ -190,7 +190,7 @@ static DEBTAB mdsa_dt[] = { { "WRITE", WR_DATA_MSG, "Write messages" }, { "STATUS", STATUS_MSG, "Status messages" }, { "RDDETAIL", RD_DATA_DETAIL_MSG, "Read detail messages" }, - { "WRDETAIL", WR_DATA_DETAIL_MSG, "Write detail messags" }, + { "WRDETAIL", WR_DATA_DETAIL_MSG, "Write detail messages" }, { NULL, 0 } }; diff --git a/AltairZ80/s100_mdsad.c b/AltairZ80/s100_mdsad.c index 58d3e78f..939979b3 100644 --- a/AltairZ80/s100_mdsad.c +++ b/AltairZ80/s100_mdsad.c @@ -111,7 +111,7 @@ typedef struct { typedef struct { uint8 dd; /* Controls density on write DD=1 for double density and DD=0 for single density. */ uint8 ss; /* Specifies the side of a double-sided diskette. The bottom side (and only side of a single-sided diskette) is selected when SS=0. The second (top) side is selected when SS=1. */ - uint8 dp; /* has shared use. During stepping operations, DP=O specifies a step out and DP=1 specifies a step in. During write operations, write procompensation is invoked if and only if DP=1. */ + uint8 dp; /* has shared use. During stepping operations, DP=O specifies a step out and DP=1 specifies a step in. During write operations, write precompensation is invoked if and only if DP=1. */ uint8 st; /* controls the level of the head step signal to the disk drives. */ uint8 pst; /* value of step signal (st) on previous order */ uint8 ds; /* is the drive select field, encoded as follows: */ @@ -270,7 +270,7 @@ static DEBTAB mdsad_dt[] = { { "STATUS", STATUS_MSG, "Status messages" }, { "ORDERS", ORDERS_MSG, "Orders messages" }, { "RDDETAIL", RD_DATA_DETAIL_MSG, "Read detail messages" }, - { "WRDETAIL", WR_DATA_DETAIL_MSG, "Write detail messags" }, + { "WRDETAIL", WR_DATA_DETAIL_MSG, "Write detail messages" }, { NULL, 0 } }; diff --git a/AltairZ80/s100_pmmi.c b/AltairZ80/s100_pmmi.c index d15aeb55..99bf9d06 100644 --- a/AltairZ80/s100_pmmi.c +++ b/AltairZ80/s100_pmmi.c @@ -33,11 +33,11 @@ The MM-103 uses the Motorola MC6860L digital modem chip. This device does not have the ability to emulate the modulation and demodulation functions or the ability to connect to a phone line. All modem features, such as - switch hook, dialtone detection, and dialing, are emulated in such a way + switch hook, dial tone detection, and dialing, are emulated in such a way that most software written for the MM-103 should function in some useful fashion. - To provide any useful funcationality, this device need to be attached to + To provide any useful functionality, this device need to be attached to a socket or serial port. Enter "HELP PMMI" at the "simh>" prompt for additional information. */ @@ -222,10 +222,10 @@ static REG pmmi_reg[] = { }; DEVICE pmmi_dev = { - PMMI_SNAME, /* name */ - pmmi_unit, /* unit */ - pmmi_reg, /* registers */ - pmmi_mod, /* modifiers */ + PMMI_SNAME, /* name */ + pmmi_unit, /* unit */ + pmmi_reg, /* registers */ + pmmi_mod, /* modifiers */ 1, /* # units */ 10, /* address radix */ 31, /* address width */ @@ -236,18 +236,18 @@ DEVICE pmmi_dev = { NULL, /* deposit routine */ &pmmi_reset, /* reset routine */ NULL, /* boot routine */ - &pmmi_attach, /* attach routine */ - &pmmi_detach, /* detach routine */ - &pmmi_ctx, /* context */ - (DEV_DISABLE | DEV_DIS | DEV_DEBUG | DEV_MUX), /* flags */ - 0, /* debug control */ - pmmi_dt, /* debug flags */ - NULL, /* mem size routine */ - NULL, /* logical name */ - NULL, /* help */ - NULL, /* attach help */ - NULL, /* context for help */ - &pmmi_description /* description */ + &pmmi_attach, /* attach routine */ + &pmmi_detach, /* detach routine */ + &pmmi_ctx, /* context */ + (DEV_DISABLE | DEV_DIS | DEV_DEBUG | DEV_MUX), /* flags */ + 0, /* debug control */ + pmmi_dt, /* debug flags */ + NULL, /* mem size routine */ + NULL, /* logical name */ + NULL, /* help */ + NULL, /* attach help */ + NULL, /* context for help */ + &pmmi_description /* description */ }; static const char* pmmi_description(DEVICE *dptr) @@ -266,7 +266,7 @@ static t_stat pmmi_reset(DEVICE *dptr) /* Set DEVICE for this UNIT */ dptr->units[0].dptr = dptr; - /* Enable TMXR modem control passthru */ + /* Enable TMXR modem control passthrough */ tmxr_set_modem_control_passthru(pmmi_ctx.tmxr); /* Reset status registers */ @@ -571,7 +571,7 @@ static t_stat pmmi_config_line(UNIT *uptr) ** to run irrelevant, old software, that use TMXR and ** rely on some semblance of timing (Remote CP/M, BYE, ** RBBS, PCGET/PUT, Xmodem, MEX, Modem7, or most - ** other communications software), on contemprary + ** other communications software), on contemporary ** hardware. ** ** Serial ports are self-limiting and sockets will run @@ -626,8 +626,8 @@ static int32 pmmi_reg0(int32 io, int32 data) } else { pmmi_ctx.oreg0 = data; /* Set UART configuration */ pmmi_config_line(&pmmi_dev.units[0]); - if (data & PMMI_SH) { /* If off-hook, clear dialtone bit (active low) */ - pmmi_ctx.dtimer = sim_os_msec() + 500; /* Dialtone in 500ms */ + if (data & PMMI_SH) { /* If off-hook, clear dial tone bit (active low) */ + pmmi_ctx.dtimer = sim_os_msec() + 500; /* Dial tone in 500ms */ if (pmmi_ctx.oreg0 & PMMI_SH) { pmmi_ctx.ireg2 &= ~PMMI_AP; /* Answer Phone Bit (active low) */ } diff --git a/AltairZ80/s100_scp300f.c b/AltairZ80/s100_scp300f.c index be593847..a2c49a50 100644 --- a/AltairZ80/s100_scp300f.c +++ b/AltairZ80/s100_scp300f.c @@ -190,7 +190,7 @@ static REG scp300f_reg[] = { { HRDATAD(SPIC_OCW2, scp300f_pic[SLAVE_PIC].OCW2, 8, "Slave OCW2 register"), }, { HRDATAD(SPIC_OCW3, scp300f_pic[SLAVE_PIC].OCW3, 8, "Slave OCW3 register"), }, - { HRDATAD(9513_HUND, data9513[0], 8, "9513 Hundreths"), }, + { HRDATAD(9513_HUND, data9513[0], 8, "9513 Hundredths"), }, { HRDATAD(9513_SS, data9513[1], 8, "9513 Seconds"), }, { HRDATAD(9513_MM, data9513[2], 8, "9513 Minutes"), }, { HRDATAD(9513_HH, data9513[3], 8, "9513 Hours"), }, @@ -709,7 +709,7 @@ static uint8 SCP300F_Write(const uint32 Addr, uint8 cData) switch(Addr & SCP300F_IO_MASK) { case SCP300F_SPIC_0: - sel_pic = SLAVE_PIC; /* intentional falltrough */ + sel_pic = SLAVE_PIC; /* intentional fallthrough */ case SCP300F_MPIC_0: if (cData & 0x10) { sim_debug(PIC_MSG, &scp300f_dev, "SCP300F: " ADDRESS_FORMAT diff --git a/AltairZ80/s100_ss1.c b/AltairZ80/s100_ss1.c index fc93b5b1..61d4543f 100644 --- a/AltairZ80/s100_ss1.c +++ b/AltairZ80/s100_ss1.c @@ -483,7 +483,7 @@ static uint8 SS1_Write(const uint32 Addr, uint8 cData) switch(Addr & 0x0F) { case SS1_S8259_L: - sel_pic = SLAVE_PIC; /* intentional falltrough */ + sel_pic = SLAVE_PIC; /* intentional fallthrough */ case SS1_M8259_L: if(cData & 0x10) { sim_debug(PIC_MSG, &ss1_dev, "SS1: " ADDRESS_FORMAT diff --git a/AltairZ80/s100_tarbell.c b/AltairZ80/s100_tarbell.c index 3faa289c..17ed6073 100644 --- a/AltairZ80/s100_tarbell.c +++ b/AltairZ80/s100_tarbell.c @@ -1,7 +1,7 @@ /* s100_tarbell.c: Tarbell 1011/2022 Disk Controller - + Created by Patrick Linstruth (patrick@deltecent.com) - + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation @@ -332,7 +332,7 @@ static DEBTAB tarbell_dt[] = { { "WRITE", WR_DATA_MSG, "Write messages" }, { "STATUS", STATUS_MSG, "Status messages" }, { "RDDETAIL", RD_DATA_DETAIL_MSG, "Read detail messages" }, - { "WRDETAIL", WR_DATA_DETAIL_MSG, "Write detail messags" }, + { "WRDETAIL", WR_DATA_DETAIL_MSG, "Write detail messages" }, { NULL, 0 } }; @@ -672,7 +672,7 @@ static void showdata(int32 isRead) { sim_debug(isRead ? RD_DATA_DETAIL_MSG : WR_DATA_DETAIL_MSG, &tarbell_dev, "\n\t"); } } - sim_debug(RD_DATA_DETAIL_MSG|WR_DATA_DETAIL_MSG, &tarbell_dev, "\n"); + sim_debug(RD_DATA_DETAIL_MSG|WR_DATA_DETAIL_MSG, &tarbell_dev, "\n"); } static uint32 secs_per_track(uint8 track) diff --git a/AltairZ80/wd179x.c b/AltairZ80/wd179x.c index a771f7a3..78354f85 100644 --- a/AltairZ80/wd179x.c +++ b/AltairZ80/wd179x.c @@ -1091,7 +1091,7 @@ static uint8 Do1793Command(uint8 cCommand) sdata.raw[wd179x_info->fdc_dataindex] = wd179x_info->fdc_data; if (wd179x_info->external_fifo_len) { - /* For external FIFO, write the sector immediately, as the sofware pre-fills a FIFO, which is then read out into the FDC using DRQ */ + /* For external FIFO, write the sector immediately, as the software pre-fills a FIFO, which is then read out into the FDC using DRQ */ wd179x_info->fdc_status &= ~(WD179X_STAT_DRQ | WD179X_STAT_BUSY); /* Clear DRQ, BUSY */ wd179x_info->drq = 0; wd179x_info->intrq = 1; diff --git a/CMakeLists.txt b/CMakeLists.txt index 12000fe9..a926652d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -75,7 +75,7 @@ endif() ## SIMH Version variables: set(SIMH_VERSION_MAJOR 4) -set(SIMH_VERSION_MINOR 0) +set(SIMH_VERSION_MINOR 1) set(SIMH_VERSION_PATCH 0) set(SIMH_VERSION "${SIMH_VERSION_MAJOR}.${SIMH_VERSION_MINOR}.${SIMH_VERSION_PATCH}") diff --git a/PDP11/pdp11_rk.c b/PDP11/pdp11_rk.c index 7e785fb3..26d1b25b 100644 --- a/PDP11/pdp11_rk.c +++ b/PDP11/pdp11_rk.c @@ -105,9 +105,9 @@ #define RK_NUMTR (RK_NUMCY * RK_NUMSF) /* tracks/drive */ #define RK_NUMDR 8 /* drives/controller */ #define RK_M_NUMDR 07 -#define RK_SIZE (RK_NUMCY * RK_NUMSF * RK_NUMSC * RK_NUMWD) +#define RK_NUMBL (RK_NUMTR * RK_NUMSC) +#define RK_SIZE (RK_NUMBL * RK_NUMWD) /* words/drive */ #define RK_RSRVSEC (3 * RK_NUMSF * RK_NUMSC) /* reserved (unused) disk area */ - /* words/drive */ #define RK_CTLI 1 /* controller int */ #define RK_SCPI(x) (2u << (x)) /* drive int */ #define RK_MAXFR (1 << 16) /* max transfer */ @@ -122,7 +122,7 @@ struct drvtyp { }; static struct drvtyp drv_tab[] = { - { RK_NUMSC, RK_NUMSF, RK_NUMCY, RK_SIZE, "RK05" }, + { RK_NUMSC, RK_NUMSF, RK_NUMCY, RK_NUMBL, "RK05" }, { 0 } }; @@ -294,7 +294,7 @@ BITFIELD *rk_reg_bits[] = { rk_ba_bits, rk_da_bits, NULL, - NULL, + NULL }; /* Debug detail levels */ @@ -324,6 +324,7 @@ int32 last_drv = 0; /* last r/w drive */ int32 rk_stopioe = 1; /* stop on error */ int32 rk_swait = 10; /* seek time */ int32 rk_rwait = 10; /* rotate time */ +static int32 not_impl = 0; /* placeholder for unused regs */ const char *rk_regnames[] = { "RKDS", @@ -333,7 +334,7 @@ const char *rk_regnames[] = { "RKBA", "RKDA", "unused", - "RKDB", + "RKDB" }; int32 *rk_regs[] = { @@ -343,6 +344,8 @@ int32 *rk_regs[] = { &rkwc, &rkba, &rkda, + ¬_impl, + ¬_impl }; t_stat rk_rd (int32 *data, int32 PA, int32 access); @@ -607,7 +610,7 @@ if (func == RKCS_CTLRESET) { /* control reset? */ rker = rker & ~RKER_SOFT; /* clear soft errors */ if (rker == 0) /* redo summary */ rkcs = rkcs & ~RKCS_ERR; -rkcs = rkcs & ~RKCS_SCP; /* clear sch compl*/ +rkcs = rkcs & ~RKCS_SCP; /* clear sch compl */ rk_clr_done (); /* clear done */ last_drv = GET_DRIVE (rkda); /* get drive no */ uptr = rk_dev.units + last_drv; /* select unit */ @@ -750,7 +753,7 @@ if (wc && (err == 0)) { /* seek ok? */ else { /* normal store */ if ((t = MAP_WRW (ma, wc << 1, rkxb))) { /* store buf */ rker = rker | RKER_NXM; /* NXM? set flag */ - wc = wc - t; /* adj wd cnt */ + wc = wc - (t >> 1); /* adj wd cnt */ } } break; /* end read */ @@ -765,16 +768,16 @@ if (wc && (err == 0)) { /* seek ok? */ rkxb[i] = comp; } else { /* normal fetch */ - if ((t = MAP_RDW (ma, wc << 1, rkxb))) { /* get buf */ + if ((t = MAP_RDW (ma, wc << 1, rkxb))) { /* get buf */ rker = rker | RKER_NXM; /* NXM? set flg */ - wc = wc - t; /* adj wd cnt */ + wc = wc - (t >> 1); /* adj wd cnt */ } } if (wc) { /* any xfer? */ awc = (wc + (RK_NUMWD - 1)) & ~(RK_NUMWD - 1); /* clr to */ for (i = wc; i < awc; i++) /* end of blk */ rkxb[i] = 0; - sim_disk_data_trace (uptr, (uint8 *)rkxb, da/RK_NUMWD, awc, "sim_disk_wrsect", RKDEB_DAT & dptr->dctrl, RKDEB_OPS); + sim_disk_data_trace (uptr, (uint8 *)rkxb, da/RK_NUMWD, awc*sizeof(*rkxb), "sim_disk_wrsect", RKDEB_DAT & dptr->dctrl, RKDEB_OPS); err = sim_disk_wrsect (uptr, da/RK_NUMWD, (uint8 *)rkxb, NULL, awc/RK_NUMWD); } break; /* end write */ @@ -817,7 +820,7 @@ if ((uptr->FUNC == RKCS_READ) && (rkcs & RKCS_FMT)) /* read format? */ else da = da + wc + (RK_NUMWD - 1); /* count by words */ track = (da / RK_NUMWD) / RK_NUMSC; sect = (da / RK_NUMWD) % RK_NUMSC; -uptr->CYL = track / RK_NUMSF; /* update position */ +uptr->CYL = track / RK_NUMSF; rkda = (rkda & RKDA_DRIVE) | (track << RKDA_V_TRACK) | (sect << RKDA_V_SECT); rk_set_done (0); @@ -919,13 +922,9 @@ return auto_config (0, 0); t_stat rk_attach (UNIT *uptr, CONST char *cptr) { t_stat r; -static const char *drives[] = {"RK05", NULL}; - r = sim_disk_attach_ex2 (uptr, cptr, RK_NUMWD * sizeof (uint16), sizeof (uint16), TRUE, 0, - "RK05", 0, 0, - (uptr->flags & UNIT_NOAUTO) ? NULL: drives, - RK_RSRVSEC); + "RK05", 0, 0, NULL, RK_RSRVSEC); if (r != SCPE_OK) /* error? */ return r; return SCPE_OK; diff --git a/PDP11/pdp11_rq.c b/PDP11/pdp11_rq.c index c99b9141..e1a4dfef 100644 --- a/PDP11/pdp11_rq.c +++ b/PDP11/pdp11_rq.c @@ -122,6 +122,12 @@ extern int32 MMR2; #error "Assertion failure: RQ_NUMCT exceeds 4" #endif +#if defined (VAX_610) +#define MICROVAX1 1 +#else +#define MICROVAX1 0 +#endif + #include "pdp11_uqssp.h" #include "pdp11_mscp.h" #include "sim_disk.h" @@ -137,13 +143,7 @@ extern int32 MMR2; #define RQ_SH_UN 010 /* show unit q's */ #define RQ_SH_ALL 017 /* show all */ -#define RQ_CLASS 1 /* RQ class */ -#define RQU_UQPM 6 /* UB port model */ -#define RQQ_UQPM 19 /* QB port model */ -#define RQ_UQPM (UNIBUS? RQU_UQPM: RQQ_UQPM) -#define RQU_MODEL 6 /* UB MSCP ctrl model (UDA50A) */ -#define RQQ_MODEL 19 /* QB MSCP ctrl model (RQDX3) */ -#define RQ_MODEL (UNIBUS? RQU_MODEL: RQQ_MODEL) +#define RQ_CLASS 1 /* RQ class: Mass storage controllers */ #define RQ_HVER 1 /* hardware version */ #define RQ_SVER 3 /* software version */ #define RQ_DHTMO 60 /* def host timeout */ @@ -172,6 +172,7 @@ extern int32 MMR2; #define unit_plug u4 /* drive unit plug value */ #define io_status u5 /* io status from callback */ #define io_complete u6 /* io completion flag */ +/* we can re-use filebuf because we don't set UNIT_BUFABLE in flags */ #define rqxb filebuf /* xfer buffer */ #define RQ_RMV(u) ((drv_tab[GET_DTYPE (u->flags)].flgs & RQDF_RMV)? \ UF_RMV: 0) @@ -752,31 +753,35 @@ x RA73 70(+1) 21 2667+ 21 1 ? 3920490 // AFAIK the UNIBUS KLESI and QBUS KLESI used the same controller type ... #define KLESI_CTYPE 1 // RC25 controller (UNIBUS and QBUS both) -#define KLESI_UQPM 1 -#define KLESI_MODEL 1 +#define KLESI_UQPM 3 +#define KLESI_MODEL 3 #define RUX50_CTYPE 2 // UNIBUS RX50-only controller -#define RUX50_UQPM 2 -#define RUX50_MODEL 2 +#define RUX50_UQPM 10 // this should be 10 according to the MSCP spec +#define RUX50_MODEL 10 #define UDA50_CTYPE 3 // UNIBUS SDI (RAxx) controller -#define UDA50_UQPM 6 +#define UDA50_UQPM 6 // really type of UDA50A; UDA50 is 2 #define UDA50_MODEL 6 -#define RQDX3_CTYPE 4 // QBUS RX50/RDxx controller +#define RQDX1_CTYPE 4 // QBUS RX50/RDxx controller, +#define RQDX1_UQPM 7 // first version; RQDX2 has the same id +#define RQDX1_MODEL 7 + +#define RQDX3_CTYPE 5 // QBUS RX50/RDxx controller #define RQDX3_UQPM 19 #define RQDX3_MODEL 19 -#define KDA50_CTYPE 5 // QBUS SDI (RAxx) controller -#define KDA50_UQPM 13 +#define KDA50_CTYPE 6 // QBUS SDI (RAxx) controller +#define KDA50_UQPM 13 // KDA50-Q #define KDA50_MODEL 13 -#define KRQ50_CTYPE 6 // QBUS RRD40/50 CDROM controller +#define KRQ50_CTYPE 7 // QBUS RRD40/50 CDROM controller #define KRQ50_UQPM 16 #define KRQ50_MODEL 16 -#define KRU50_CTYPE 7 // UNIBUS RRD40/50 CDROM controller -#define KRU50_UQPM 26 +#define KRU50_CTYPE 8 // UNIBUS RRD40/50 CDROM controller +#define KRU50_UQPM 26 // unassigned in appendix C #define KRU50_MODEL 26 struct drvtyp { @@ -883,6 +888,7 @@ static struct ctlrtyp ctlr_tab[] = { RQ_CTLR (KLESI), RQ_CTLR (RUX50), RQ_CTLR (UDA50), + RQ_CTLR (RQDX1), RQ_CTLR (RQDX3), RQ_CTLR (KDA50), RQ_CTLR (KRQ50), @@ -1119,10 +1125,12 @@ MTAB rq_mod[] = { NULL, &rq_show_ctrl, NULL, "Display all unit queues" }, { MTAB_XTD|MTAB_VDV|MTAB_NMO, RQ_SH_ALL, "ALL", NULL, NULL, &rq_show_ctrl, NULL, "Display complete controller state" }, + { MTAB_XTD|MTAB_VDV, RQDX1_CTYPE, NULL, "RQDX1", + &rq_set_ctype, NULL, NULL, "Set RQDX1/2 (QBUS RX50/RDnn) Controller Type" }, { MTAB_XTD|MTAB_VDV, RQDX3_CTYPE, NULL, "RQDX3", &rq_set_ctype, NULL, NULL, "Set RQDX3 (QBUS RX50/RDnn) Controller Type" }, { MTAB_XTD|MTAB_VDV, UDA50_CTYPE, NULL, "UDA50", - &rq_set_ctype, NULL, NULL, "Set UDA50 (UNIBUS SDI RAnn) Controller Type" }, + &rq_set_ctype, NULL, NULL, "Set UDA50A (UNIBUS SDI RAnn) Controller Type" }, { MTAB_XTD|MTAB_VDV, KDA50_CTYPE, NULL, "KDA50", &rq_set_ctype, NULL, NULL, "Set KDA50 (QBUS SDI RAnn) Controller Type" }, { MTAB_XTD|MTAB_VDV, KRQ50_CTYPE, NULL, "KRQ50", @@ -3099,7 +3107,8 @@ if (cidx < 0) /* not found??? */ cp = rq_ctxmap[cidx]; /* get context */ cp->cnum = cidx; /* init index */ if (cp->ctype == DEFAULT_CTYPE) - cp->ctype = (UNIBUS? UDA50_CTYPE : RQDX3_CTYPE); + cp->ctype = (UNIBUS ? UDA50_CTYPE : + MICROVAX1 ? RQDX1_CTYPE : RQDX3_CTYPE); if (!plugs_inited ) { #if !defined (VM_VAX) @@ -3418,9 +3427,9 @@ fprintf (st, "UDA50 MSCP Disk Controller (%s)\n\n", dptr->name); fprintf (st, "The simulator implements four MSCP disk controllers, RQ, RQB, RQC, RQD.\n"); fprintf (st, "Initially, RQB, RQC, and RQD are disabled. Each RQ controller simulates\n"); fprintf (st, "an MSCP disk controller with four drives. The MSCP controller type can be\n"); -fprintf (st, "specified as one of RQDX3, UDA50, KDA50, KRQ50, KLESI or RUX50. RQ options\n"); -fprintf (st, "include the ability to set units write enabled or write locked, and to set\n"); -fprintf (st, "the drive type to one of many disk types:\n"); +fprintf (st, "specified as one of RQDX1, RQDX3, UDA50, KDA50, KRQ50, KLESI or RUX50.\n"); +fprintf (st, "RQ options include the ability to set units write enabled or write locked,\n"); +fprintf (st, "and to set the drive type to one of many disk types:\n"); fprint_set_help (st, dptr); fprintf (st, "set RQn RAUSER{=n} Set disk type to RA82 with n MB's\n"); fprintf (st, " (1MB is 1000000 bytes)\n"); diff --git a/README-CMake.md b/README-CMake.md index 0e5a0c0d..63146b0b 100644 --- a/README-CMake.md +++ b/README-CMake.md @@ -5,7 +5,7 @@ - [Why CMake?](#why-cmake) - [Before You Begin Building...](#before-you-begin-building) - [Toolchains and Tools](#toolchains-and-tools) - - [Ninja: "file recompation: Permission denied"](#ninja-file-recompation-permission-denied) + - [Ninja: "failed recompaction: Permission denied"](#ninja-file-recompation-permission-denied) - [Windows XP-compatible/Server 2003 binaries](#windows-xp-compatibleserver-2003-binaries) - [Feature Libraries](#feature-libraries) - [Linux, macOS and MinGW-w64](#linux-macos-and-mingw-w64) @@ -160,7 +160,7 @@ Before you begin building the simulators, you need the following: Unix Makefiles and Visual Studio's `msbuild`. -#### Ninja: "file recompation: Permission denied" +#### Ninja: "failed recompaction: Permission denied" This is a long-standing issue with [Ninja][ninja] on Windows when `ninja` is recursively invoked. You are very likely to encounter this error message when @@ -547,7 +547,7 @@ or video support. --cppcheck Enable cppcheck static code analysis rules --cpack_suffix Specify CPack's packaging suffix, e.g., "ubuntu-22.04" - to produce the "simh-4.0.0-ubuntu-22.04.deb" Debian + to produce the "simh-4.1.0-ubuntu-22.04.deb" Debian package. --verbose Turn on verbose build output @@ -1035,7 +1035,7 @@ within the IDE. The walkthrough provides directions for VS 2022 and VS 2019. on the keyboard, to start the dependecy feature library superbuild. - When all dependency feature libraries have been built, the build process - __will__ unexpectedly terminate with a _"file recompation: Permission + __will__ unexpectedly terminate with a _"failed recompaction: Permission denied"_ error (see [this `ninja` note](#ninja-file-recompation-permission-denied).) Choose `Delete Cache and Reconfigure` from the `Project` menu. This will diff --git a/Visual Studio Projects/Pre-Build-Event.cmd b/Visual Studio Projects/Pre-Build-Event.cmd index ec459ef0..d1dd236b 100644 --- a/Visual Studio Projects/Pre-Build-Event.cmd +++ b/Visual Studio Projects/Pre-Build-Event.cmd @@ -29,7 +29,7 @@ rem rem Everything implicitly requires BUILD to also be set to have rem any meaning, it always gets set. set _X_BUILD=BUILD -set _X_REQUIRED_WINDOWS_BUILD=20220119 +set _X_REQUIRED_WINDOWS_BUILD=20230621 call :FindVCVersion _VC_VER set _PDB=%~dpn1.pdb diff --git a/appveyor.yml b/appveyor.yml index 60e2a909..60a46246 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -13,14 +13,15 @@ environment: ## The matrix is ordered by relative popularity/priority: ##- - - APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu - SIMH_BUILD_FLAVOR: ninja - - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022 SIMH_BUILD_FLAVOR: vs2022 + ## Static library support available in this vcpkg install. + VCPKG_ROOT: C:\Tools\vcpkg - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 SIMH_BUILD_FLAVOR: vs2019 + ## Static library support available in this vcpkg install. + VCPKG_ROOT: C:\Tools\vcpkg - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 SIMH_BUILD_FLAVOR: vs2017 @@ -28,32 +29,39 @@ environment: - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022 SIMH_BUILD_FLAVOR: vs2022-xp - - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 - SIMH_BUILD_FLAVOR: vs2019-xp + ## These Appveyor VM images exist, aren't strictly needed to build XP-compatible + ## executables. - - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 - SIMH_BUILD_FLAVOR: vs2017-xp + # - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 + # SIMH_BUILD_FLAVOR: vs2019-xp - - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 - SIMH_BUILD_FLAVOR: vs2015 + # - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 + # SIMH_BUILD_FLAVOR: vs2017-xp + + # - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 + # SIMH_BUILD_FLAVOR: vs2015 + + - APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu + SIMH_BUILD_FLAVOR: ninja - APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu2004 SIMH_BUILD_FLAVOR: unix - - APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu1604 - SIMH_BUILD_FLAVOR: unix + ## Older image -- still needed? + # - APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu1604 + # SIMH_BUILD_FLAVOR: unix ## These images have cmake 3.12, which is too old. Could build if ## cmake were upgraded in the image in the before_build stanza, but - ## that subverts the purpose of the image. + ## that subverts the image's purpose. # - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013 # SIMH_BUILD_FLAVOR: vs2013 # - # - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013 + # - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2012 # SIMH_BUILD_FLAVOR: vs2012 # - # - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013 + # - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2008 # SIMH_BUILD_FLAVOR: vs2008 ## - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022 @@ -89,11 +97,10 @@ build: verbosity: minimal before_build: - - ps: | - if ($isWindows) { - if (${env:SIMH_BUILD_FLAVOR} -eq "ninja") { choco install ninja; } - if (!(Test-Path -Path cmake\dependencies)) { New-Item -ItemType Directory -Path cmake\dependencies } - } + - cmd: | + if "%SIMH_BUILD_FLAVOR%"=="ninja" ( choco install ninja ) + if not exist "cmake\dependencies" ( mkdir "cmake\dependencies" ) + - sh: | case "${APPVEYOR_BUILD_WORKER_IMAGE}" in Ubuntu*) @@ -112,17 +119,18 @@ before_build: esac build_script: - # Run the cmake-builder script all the way through: generate, build, test. - - ps: | - if ($isWindows) { - $ErrorActionPreference="Stop" - $WarningPreference="Continue" - if (!([string]::IsNullOrEmpty($env:MINGW))) { $env:PATH=$(@(${env:MINGW}, ${env:PATH}) -join ";"); }; - cmake\cmake-builder.ps1 ` - -flavor ${env:SIMH_BUILD_FLAVOR} ` - -config ${env:CONFIGURATION} ` - -lto -parallel -clean -notest -noinstall -verbose - } + ## Need to use cmd, per Appveyor support. PowerShell has issues with output. + ## Specifically, when CMake prints the "old CMake version, won't CPack" warning, + ## Appveyor terminates the build injudiciously. The workaround is cmd. + ## + ## LTO works reliably on VS 2022 and 2019. Hangs while building SEL32 on VS 2017. + - cmd: | + SETLOCAL EnableExtensions + if not "%MINGW%"=="" ( set "PATH=%MINGW%;%PATH%" ) + if "%SIMH_BUILD_FLAVOR%"=="vs2022" set LTO=-lto + if "%SIMH_BUILD_FLAVOR%"=="vs2019" set LTO=-lto + powershell -File .\cmake\cmake-builder.ps1 -flavor %SIMH_BUILD_FLAVOR% -config %CONFIGURATION% %LTO% -parallel -clean -notest -noinstall -verbose + - sh: | case "${APPVEYOR_BUILD_WORKER_IMAGE}" in Ubuntu1604) @@ -137,11 +145,15 @@ build_script: --verbose --parallel --clean --notest --noinstall test_script: - - ps: | - if ($isWindows) { - Write-Output "cmake\cmake-builder.ps1 -testonly -config ${env:CONFIGURATION} -flavor ${env:SIMH_BUILD_FLAVOR}" - cmake\cmake-builder.ps1 -testonly -config ${env:CONFIGURATION} -flavor ${env:SIMH_BUILD_FLAVOR} - } + # - ps: | + # if ($isWindows) { + # Write-Output "cmake\cmake-builder.ps1 -testonly -config ${env:CONFIGURATION} -flavor ${env:SIMH_BUILD_FLAVOR}" + # cmake\cmake-builder.ps1 -testonly -config ${env:CONFIGURATION} -flavor ${env:SIMH_BUILD_FLAVOR} + # } + + - cmd: | + powershell -File .\cmake\cmake-builder.ps1 -flavor %SIMH_BUILD_FLAVOR% -config %CONFIGURATION% -testonly + - sh: | cmake/cmake-builder.sh --testonly --config ${CONFIGURATION} --flavor ${SIMH_BUILD_FLAVOR} diff --git a/cmake/GitHub-release.md b/cmake/GitHub-release.md index 2ce7db05..7575702b 100644 --- a/cmake/GitHub-release.md +++ b/cmake/GitHub-release.md @@ -18,14 +18,14 @@ Welcome to SIMH's pre-built binaries! TO INSTALL. If you do, you are likely to get a Windows Defender popup box that will prevent you from installing SIMH. Instead, use a CMD or PowerShell command window and execute the `.exe` from the command line prompt. For - example, to install `simh-4.0.0-win32-native.exe`: + example, to install `simh-4.1.0-win32-native.exe`: ``` ## PowerShell: - PS> .\simh-4.0.0-win32-native + PS> .\simh-4.1.0-win32-native ## CMD: - > .\simh-4.0.0-win32-native + > .\simh-4.1.0-win32-native ``` - `.msi`: WiX toolkit-created Windows MSI installer. @@ -37,5 +37,5 @@ Welcome to SIMH's pre-built binaries! or CMD command window: ``` - > msiexec /qf /i simh-4.0.0-win32-native.msi + > msiexec /qf /i simh-4.1.0-win32-native.msi ``` diff --git a/cmake/cmake-builder.sh b/cmake/cmake-builder.sh index 2ed9763b..ba64c6f6 100755 --- a/cmake/cmake-builder.sh +++ b/cmake/cmake-builder.sh @@ -41,7 +41,7 @@ Options: --cppcheck Enable cppcheck static code analysis rules --cpack_suffix Specify CPack's packaging suffix, e.g., "ubuntu-22.04" - to produce the "simh-4.0.0-ubuntu-22.04.deb" Debian + to produce the "simh-4.1.0-ubuntu-22.04.deb" Debian package. --verbose Turn on verbose build output diff --git a/cmake/dep-locate.cmake b/cmake/dep-locate.cmake index f80dc7c9..bd810159 100644 --- a/cmake/dep-locate.cmake +++ b/cmake/dep-locate.cmake @@ -122,21 +122,21 @@ list(APPEND PCRE_SOURCE_URL "https://sourceforge.net/projects/pcre/files/pcre/8.45/pcre-8.45.zip/download?use_mirror=freefr" "https://sourceforge.net/projects/pcre/files/pcre/8.45/pcre-8.45.zip/download?use_mirror=master" ) -set(PNG_SOURCE_URL "https://github.com/glennrp/libpng/archive/refs/tags/v1.6.39.tar.gz") +set(PNG_SOURCE_URL "https://github.com/glennrp/libpng/archive/refs/tags/v1.6.40.tar.gz") ## Freetype also needs multiple URLs to chase a working mirror: list(APPEND FREETYPE_SOURCE_URL - "https://github.com/freetype/freetype/archive/refs/tags/VER-2-12-1.zip" - "https://sourceforge.net/projects/freetype/files/freetype2/2.12.1/ft2121.zip/download?use_mirror=cytranet" - "https://sourceforge.net/projects/freetype/files/freetype2/2.12.1/ft2121.zip/download?use_mirror=phoenixnap" - "https://sourceforge.net/projects/freetype/files/freetype2/2.12.1/ft2121.zip/download?use_mirror=versaweb" - "https://sourceforge.net/projects/freetype/files/freetype2/2.12.1/ft2121.zip/download?use_mirror=netactuate" - "https://sourceforge.net/projects/freetype/files/freetype2/2.12.1/ft2121.zip/download?use_mirror=cfhcable" - "https://sourceforge.net/projects/freetype/files/freetype2/2.12.1/ft2121.zip/download?use_mirror=freefr" - "https://sourceforge.net/projects/freetype/files/freetype2/2.12.1/ft2121.zip/download?use_mirror=master" - "https://download.savannah.gnu.org/releases/freetype/freetype-2.12.1.tar.xz" - "https://gitlab.freedesktop.org/freetype/freetype/-/archive/VER-2-12-1/freetype-VER-2-12-1.zip" + "https://github.com/freetype/freetype/archive/refs/tags/VER-2-13-0.zip" + "https://sourceforge.net/projects/freetype/files/freetype2/2.13.1/ft2131.zip/download?use_mirror=cytranet" + "https://sourceforge.net/projects/freetype/files/freetype2/2.13.1/ft2131.zip/download?use_mirror=phoenixnap" + "https://sourceforge.net/projects/freetype/files/freetype2/2.13.1/ft2131.zip/download?use_mirror=versaweb" + "https://sourceforge.net/projects/freetype/files/freetype2/2.13.1/ft2131.zip/download?use_mirror=netactuate" + "https://sourceforge.net/projects/freetype/files/freetype2/2.13.1/ft2131.zip/download?use_mirror=cfhcable" + "https://sourceforge.net/projects/freetype/files/freetype2/2.13.1/ft2131.zip/download?use_mirror=freefr" + "https://sourceforge.net/projects/freetype/files/freetype2/2.13.1/ft2131.zip/download?use_mirror=master" + "https://download.savannah.gnu.org/releases/freetype/freetype-2.13.1.tar.xz" + "https://gitlab.freedesktop.org/freetype/freetype/-/archive/VER-2-13-0/freetype-VER-2-13-0.zip" ) -set(SDL2_SOURCE_URL "https://github.com/libsdl-org/SDL/archive/refs/tags/release-2.26.3.zip") +set(SDL2_SOURCE_URL "https://github.com/libsdl-org/SDL/archive/refs/tags/release-2.28.1.zip") set(SDL2_TTF_SOURCE_URL "https://github.com/libsdl-org/SDL_ttf/archive/refs/tags/release-2.20.2.zip") ## Need to build ZLIB for both PCRE and libpng16: diff --git a/doc/altairz80_doc.docx b/doc/altairz80_doc.docx new file mode 100644 index 00000000..d87e5580 Binary files /dev/null and b/doc/altairz80_doc.docx differ diff --git a/doc/altairz80_doc.pdf b/doc/altairz80_doc.pdf deleted file mode 100644 index 2094948a..00000000 Binary files a/doc/altairz80_doc.pdf and /dev/null differ diff --git a/doc/vax780_doc.doc b/doc/vax780_doc.doc index df41d67e..c81bda1f 100644 Binary files a/doc/vax780_doc.doc and b/doc/vax780_doc.doc differ diff --git a/makefile b/makefile index 1a55f947..ca439dd6 100644 --- a/makefile +++ b/makefile @@ -697,11 +697,11 @@ ifeq (${WIN32},) #*nix Environments (&& cygwin) endif endif endif + ifeq (cygwin,$(OSTYPE)) + LIBEXTSAVE := ${LIBEXT} + LIBEXT = dll.a + endif ifneq (,$(VIDEO_USEFUL)) - ifeq (cygwin,$(OSTYPE)) - LIBEXTSAVE := ${LIBEXT} - LIBEXT = dll.a - endif ifneq (,$(call find_include,SDL2/SDL)) ifneq (,$(call find_lib,SDL2)) ifneq (,$(shell which sdl2-config)) @@ -782,14 +782,6 @@ ifeq (${WIN32},) #*nix Environments (&& cygwin) endif endif endif - ifeq (cygwin,$(OSTYPE)) - LIBEXT = $(LIBEXTSAVE) - LIBPATH += /usr/lib/w32api - ifneq (,$(call find_lib,winmm)) - OS_CCDEFS += -DHAVE_WINMM - OS_LDFLAGS += -lwinmm - endif - endif ifeq (,$(findstring HAVE_LIBSDL,$(VIDEO_CCDEFS))) $(info *** Info ***) $(info *** Info *** The simulator$(BUILD_MULTIPLE) you are building could provide more functionality) @@ -831,6 +823,14 @@ ifeq (${WIN32},) #*nix Environments (&& cygwin) $(info *** Info ***) endif endif + ifeq (cygwin,$(OSTYPE)) + LIBEXT = $(LIBEXTSAVE) + LIBPATH += /usr/lib/w32api + ifneq (,$(call find_lib,winmm)) + OS_CCDEFS += -DHAVE_WINMM + OS_LDFLAGS += -lwinmm + endif + endif ifneq (,$(NETWORK_USEFUL)) ifneq (,$(call find_include,pcap)) ifneq (,$(shell grep 'pcap/pcap.h' $(call find_include,pcap) | grep include)) @@ -1312,9 +1312,9 @@ endif ifneq (,$(UNSUPPORTED_BUILD)) CFLAGS_GIT += -DSIM_BUILD=Unsupported=$(UNSUPPORTED_BUILD) endif -OPTIMIZE ?= -O2 +OPTIMIZE ?= -O2 -DNDEBUG=1 ifneq ($(DEBUG),) - CFLAGS_G = -g -ggdb -g3 + CFLAGS_G = -g -ggdb -g3 -D_DEBUG=1 CFLAGS_O = -O0 BUILD_FEATURES = - debugging support LTO = diff --git a/scp.c b/scp.c index 4a2d8473..a8583c4a 100644 --- a/scp.c +++ b/scp.c @@ -13119,8 +13119,6 @@ else { ep->match = match_buf; ep->size = match_size; } -ep->match_pattern = (char *)malloc (strlen (match) + 1); -strcpy (ep->match_pattern, match); if (ep->act) { /* replace old action? */ free (ep->act); /* deallocate */ ep->act = NULL; /* now no action */ @@ -13243,6 +13241,7 @@ for (i=0; i < exp->size; i++) { if (ep->switches & EXP_TYP_REGEX) { #if defined (USE_REGEX) int *ovector = NULL; + int ovector_elts; int rc; char *cbuf = (char *)exp->buf; static size_t sim_exp_match_sub_count = 0; @@ -13261,27 +13260,38 @@ for (i=0; i < exp->size; i++) { } } ++regex_checks; - ovector = (int *)malloc (3 * (ep->re_nsub + 1) * sizeof (*ovector)); + ovector_elts = 3 * (ep->re_nsub + 1); + ovector = (int *)calloc ((size_t) ovector_elts, sizeof(*ovector)); if (sim_deb && exp->dptr && (exp->dptr->dctrl & exp->dbit)) { char *estr = sim_encode_quoted_string (exp->buf, exp->buf_ins); sim_debug (exp->dbit, exp->dptr, "Checking String: %s\n", estr); sim_debug (exp->dbit, exp->dptr, "Against RegEx Match Rule: %s\n", ep->match_pattern); free (estr); } - rc = pcre_exec (ep->regex, NULL, cbuf, exp->buf_ins, 0, PCRE_NOTBOL, ovector, 3 * (ep->re_nsub + 1)); + rc = pcre_exec (ep->regex, NULL, cbuf, exp->buf_ins, 0, PCRE_NOTBOL, ovector, ovector_elts); if (rc >= 0) { size_t j; char *buf = (char *)malloc (1 + exp->buf_ins); for (j=0; j < (size_t)rc; j++) { char env_name[32]; + int end_offs = ovector[2 * j + 1], start_offs = ovector[2 * j]; sprintf (env_name, "_EXPECT_MATCH_GROUP_%d", (int)j); - memcpy (buf, &cbuf[ovector[2 * j]], ovector[2 * j + 1] - ovector[2 * j]); - buf[ovector[2 * j + 1] - ovector[2 * j]] = '\0'; - setenv (env_name, buf, 1); /* Make the match and substrings available as environment variables */ - sim_debug (exp->dbit, exp->dptr, "%s=%s\n", env_name, buf); - } + if (start_offs >= 0 && end_offs >= start_offs) { + memcpy (buf, &cbuf[start_offs], end_offs - start_offs); + buf[end_offs - start_offs] = '\0'; + setenv (env_name, buf, 1); /* Make the match and substrings available as environment variables */ + sim_debug (exp->dbit, exp->dptr, "%s=%s\n", env_name, buf); + } + else { + /* Substring was not captured by regexp: remove from the environment + * (unsetenv is local static -- doesn't actually remove the variable from + * the environment, sets it to an empty string.) */ + sim_debug (exp->dbit, exp->dptr, "unsetenv %s\n", env_name); + unsetenv(env_name); + } + } for (; jUCMD) { if (CHS_IFERR (st)) /* channel error? */ return dp_chan_err (dva, st); } - if ((i != DPS_NBY) || (st != CHS_ZBC)) { /* length error? */ + if (!DP_Q10B (ctx->dp_ctype) && (st != CHS_ZBC)) { /* 16B only: length error? */ ctx->dp_flags |= DPF_PGE; /* set prog err */ if (chan_set_chf (dva, CHF_LNTE)) /* do we care? */ return SCPE_OK; diff --git a/sim_disk.c b/sim_disk.c index a45ffd0c..f0bc3264 100644 --- a/sim_disk.c +++ b/sim_disk.c @@ -3380,12 +3380,14 @@ if ((uptr->flags & UNIT_BUF) && (uptr->filebuf)) { sim_messagef (SCPE_OK, "%s: writing buffer to file: %s\n", sim_uname (uptr), uptr->filename); sim_disk_wrsect (uptr, 0, (uint8 *)uptr->filebuf, NULL, (cap + ctx->sector_size - 1) / ctx->sector_size); } + if (uptr->flags & UNIT_MUSTBUF) { /* dyn alloc? */ + free (uptr->filebuf); /* free buffers */ + uptr->filebuf = NULL; + free (uptr->filebuf2); + uptr->filebuf2 = NULL; + } uptr->flags = uptr->flags & ~UNIT_BUF; } -free (uptr->filebuf); /* free buffers */ -uptr->filebuf = NULL; -free (uptr->filebuf2); -uptr->filebuf2 = NULL; update_disk_footer (uptr); /* Update meta data if highwater has changed */ @@ -5756,7 +5758,7 @@ if (1) { /* CHS Calculation */ cylinderTimesHeads = totalSectors / sectorsPerTrack; } } - cylinders = cylinderTimesHeads / heads; + cylinders = (totalSectors + sectorsPerTrack * heads - 1) / (sectorsPerTrack * heads); Footer.DiskGeometry = NtoHl ((cylinders<<16)|(heads<<8)|sectorsPerTrack); } Footer.Checksum = NtoHl (CalculateVhdFooterChecksum(&Footer, sizeof(Footer))); diff --git a/sim_timer.c b/sim_timer.c index 6a170560..4028a687 100644 --- a/sim_timer.c +++ b/sim_timer.c @@ -1083,7 +1083,7 @@ do { sim_os_clock_resoluton_ms = clock_diff; clock_last = clock_now; } while (clock_now < clock_start + 100); -if ((sim_idle_rate_ms != 0) && (sim_os_clock_resoluton_ms != 0)) +if ((sim_os_clock_resoluton_ms != 0) && (sim_idle_rate_ms >= sim_os_clock_resoluton_ms)) sim_os_tick_hz = 1000/(sim_os_clock_resoluton_ms * (sim_idle_rate_ms/sim_os_clock_resoluton_ms)); else { fprintf (stderr, "Can't properly determine host system clock capabilities.\n"); diff --git a/sim_video.c b/sim_video.c index d6220e57..05a8794c 100644 --- a/sim_video.c +++ b/sim_video.c @@ -2235,7 +2235,7 @@ return 0; const char *vid_version(void) { static char SDLVersion[160]; -SDL_version compiled, running; +SDL_version compiled = { 0, }, running = { 0, }; SDL_GetVersion(&running); diff --git a/vcpkg.json b/vcpkg.json index b050f3db..1c63ed53 100644 --- a/vcpkg.json +++ b/vcpkg.json @@ -1,6 +1,6 @@ { "name": "simh", - "version-string": "4.0.0", + "version-string": "4.1.0", "description": [ "SIMH: The historical computer architecture simulation suite." ], @@ -11,4 +11,4 @@ "sdl2", "sdl2-ttf" ] -} \ No newline at end of file +}