add support for older powerhsell
This commit is contained in:
parent
c9d6049914
commit
eb94c2a0cd
|
@ -146,7 +146,9 @@ In the video starting at 35m 19s, there was a section where a speedrunner named
|
|||
`dk28` died in the middle of level 1, and was advanced to level 2 for their next
|
||||
life. The video explains that there still isn't a known explanation as to why
|
||||
this happened. This got me interested in the assembly and thus this project
|
||||
began and has since changed in scope as my interest have changed.
|
||||
began. Spoilers, I have not found the cause of the level skip bug. It is still
|
||||
unknown whether the bug is from some bug in the code, or whether it was a
|
||||
hardware glitch.
|
||||
|
||||
The _Contra_ (US) NES ROM was disassembled using a NES disassembly tool. This
|
||||
provided a starting point for code investigation. The disassembler incorrectly
|
||||
|
|
|
@ -21,11 +21,20 @@ function Set-Bytes {
|
|||
# only read baserom.nes once for speed improvements
|
||||
IF ($global:SOURCE_CONTRA -eq $null) {
|
||||
Write-Output " Reading input file baserom.nes."
|
||||
IF ($PSVersionTable.PSVersion.Major -ge 6) {
|
||||
$global:SOURCE_CONTRA = Get-Content .\baserom.nes -AsByteStream
|
||||
} ELSE {
|
||||
$global:SOURCE_CONTRA = Get-Content .\baserom.nes -Raw -Encoding Byte
|
||||
}
|
||||
}
|
||||
|
||||
Write-Output " Writing file $Output."
|
||||
|
||||
IF ($PSVersionTable.PSVersion.Major -ge 6) {
|
||||
$global:SOURCE_CONTRA | Select-Object -Skip $Skip -First $Take | Set-Content $Output -AsByteStream
|
||||
} ELSE {
|
||||
$global:SOURCE_CONTRA | Select-Object -Skip $Skip -First $Take | Set-Content $Output -Encoding Byte
|
||||
}
|
||||
}
|
||||
|
||||
IF (Test-Path -Path "contra.nes") {
|
||||
|
|
Loading…
Reference in New Issue