Skip to content

Commit

Permalink
refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
raydac committed Nov 20, 2019
1 parent f0d6f5b commit 77422f5
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,10 @@ public ReadResult readFrom(final File file, final int index) throws IOException
}

final byte[] extra = JBBPOut.BeginBin(JBBPByteOrder.LITTLE_ENDIAN)
// indexes of ram banks
.Byte(data.length / 0x4000)
.Byte(IntStream.range(0, data.length / 0x4000).map(x -> x + 3).toArray())

.Byte(snaFile.regAF >>> 8)
.Byte(snaFile.regAF)
.Short(snaFile.regBC)
Expand Down Expand Up @@ -235,7 +237,9 @@ public ReadResult readFrom(final File file, final int index) throws IOException
final byte[] data = snaFile.ramDump;

final byte[] extra = JBBPOut.BeginBin(JBBPByteOrder.LITTLE_ENDIAN)
// No information about RAM banks in ZX48
.Byte(0)

.Byte(snaFile.regAF >>> 8)
.Byte(snaFile.regAF)
.Short(snaFile.regBC)
Expand Down

0 comments on commit 77422f5

Please sign in to comment.