This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Start Hash value function | |
Function Get-HashValues { | |
[CmdletBinding()] | |
Param( | |
[Parameter(Mandatory=$True,ValueFromPipeline=$True)] | |
[ValidateScript({If ((-Not (Test-Path -Path "$_")) -and ((Get-Item -Path "$_").Length -ne 0)) { } return $true })] | |
[String]$FilePath, | |
[Parameter(Mandatory=$False,ValueFromPipeline=$True)] | |
[Int]$SByte = 0, | |
[Parameter(Mandatory=$False,ValueFromPipeline=$True)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Setup CRC32 function | |
Set-Alias crc32 Get-Crc32 | |
<# | |
.NOTES | |
Author: greg zakharov | |
#> | |
$asm = Add-Type -Mem @' | |
[DllImport("ntdll.dll")] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Start - Function to get available Peripherals Components for the given GD-ROM | |
Function Get-DCComponent { | |
Param ( | |
[Parameter(Mandatory=$true, ValueFromPipeline=$true)] | |
$Comp | |
) | |
Switch ($Comp) { | |
# Optional Peripherals Supported | |
"1" { return "Mouse" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Function Get-CRC16 { | |
[CmdletBinding()] | |
Param ( | |
[Parameter(Mandatory=$true, ValueFromPipeline=$true)] | |
[string]$String, | |
[Parameter(Mandatory=$false, ValueFromPipeline=$true)] | |
$CRCValue # For future verification | |
) | |
$CRC = 0xFFFF # Set to 0x0000 for CRC-16/XMODEM, ACORN, LTE output |