From 77422f5dfb4556b221921cbe9594e94d3526ca9a Mon Sep 17 00:00:00 2001 From: Igor Maznitsa Date: Wed, 20 Nov 2019 15:11:22 +0200 Subject: [PATCH] refactoring --- .../zxpspritecorrector/files/plugins/SNAPlugin.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/zxpoly-sprite-corrector/src/main/java/com/igormaznitsa/zxpspritecorrector/files/plugins/SNAPlugin.java b/zxpoly-sprite-corrector/src/main/java/com/igormaznitsa/zxpspritecorrector/files/plugins/SNAPlugin.java index 57f57ded..0c205222 100644 --- a/zxpoly-sprite-corrector/src/main/java/com/igormaznitsa/zxpspritecorrector/files/plugins/SNAPlugin.java +++ b/zxpoly-sprite-corrector/src/main/java/com/igormaznitsa/zxpspritecorrector/files/plugins/SNAPlugin.java @@ -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) @@ -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)