From 35fd0e9f237db6c358605f6583573a23113b51ae Mon Sep 17 00:00:00 2001 From: Willem Date: Sat, 18 Jan 2025 16:11:48 +0100 Subject: [PATCH] Made space for sand worms in the cake --- .../x4o/fc18/FourCornerUnicodeDisplay.java | 2 +- .../org/x4o/fc18/cake2/FourCornerDotCake.java | 16 ++++++---- .../fc18/zion7/FourCornerZion7Candlelier.java | 12 ++++---- .../fc18/zion7/FourCornerZionStenoLexer.java | 29 ++++++++++++++----- 4 files changed, 39 insertions(+), 20 deletions(-) diff --git a/nx01-x4o-fc18/src/main/java/org/x4o/fc18/FourCornerUnicodeDisplay.java b/nx01-x4o-fc18/src/main/java/org/x4o/fc18/FourCornerUnicodeDisplay.java index 8f133fa..ce13160 100644 --- a/nx01-x4o-fc18/src/main/java/org/x4o/fc18/FourCornerUnicodeDisplay.java +++ b/nx01-x4o-fc18/src/main/java/org/x4o/fc18/FourCornerUnicodeDisplay.java @@ -251,7 +251,7 @@ public class FourCornerUnicodeDisplay { } @Override - public void strobeNether(List key, List octals) { + public void strobeSandWorm(List head, List body) { // TODO Auto-generated method stub } diff --git a/nx01-x4o-fc18/src/main/java/org/x4o/fc18/cake2/FourCornerDotCake.java b/nx01-x4o-fc18/src/main/java/org/x4o/fc18/cake2/FourCornerDotCake.java index bc869e8..3a957aa 100644 --- a/nx01-x4o-fc18/src/main/java/org/x4o/fc18/cake2/FourCornerDotCake.java +++ b/nx01-x4o-fc18/src/main/java/org/x4o/fc18/cake2/FourCornerDotCake.java @@ -251,14 +251,18 @@ public enum FourCornerDotCake { FC_CLK1K_Z(131072 + (1024*25), 1024), FC_CLK1K_AMP(131072 + (1024*26), 1024), - /// Align unicode - __RESERVED_CLKSP(1 + FC_CLK1K_AMP.getStop(), 0x27000 - FC_CLK1K_AMP.getStop() - 1, "Reserved for CLKSP"), + /// Text structure control indicators + __RESERVED_STRUCT(1 + FC_CLK1K_AMP.getStop(), 0x27000 - 576 - 1 - FC_CLK1K_AMP.getStop(), "Reserved for STRUCT"), // =========== Allow more data grams for legacy unicode and next generation unicode - /// MUST Prefix with __ESC18_NETHER, than pack big indian octals per 5, which is 15 bit data in one 18 bit cake point. - /// This can encode dark text data like icons, bitmap images or vector images and unicode4D/etc. - FC_NETHER(0x27000, 32768, "Dark octal data"), + /// Preamble of a sand worm body as a identifiable type header. + /// Octal worm encoding are 192 unique octals in ordered sequence and have allowed length of 24/48/96 or 192. + FC_SAND_OLGOI(0x27000 - 576, 576, "Large head of logoi worm"), + + /// Undefined octal data which are packed big indian octals per 5, which is a 15 bit data gram in one 18 bit cake point. + /// This can encode sand worm text data like icons, bitmap images or vector images and unicode4D/etc. + FC_SAND_KHORKHOI(0x27000, 32768, "Sand octals of large khorkhoi"), /// Support lower 11 bit of unicode to be encoded with one cake point. FC_UNI2K_11(0x30000 - 4096, 2048, "Unicode page point"), @@ -339,7 +343,7 @@ public enum FourCornerDotCake { if (idx < FC_IBM1616_H8.ordinal()) { return false; } - if (idx >= FC_UNI2K_11.ordinal()) { + if (idx > FC_CLK1K_AMP.ordinal()) { return false; } return true; diff --git a/nx01-x4o-fc18/src/main/java/org/x4o/fc18/zion7/FourCornerZion7Candlelier.java b/nx01-x4o-fc18/src/main/java/org/x4o/fc18/zion7/FourCornerZion7Candlelier.java index 78961ad..f21f10e 100644 --- a/nx01-x4o-fc18/src/main/java/org/x4o/fc18/zion7/FourCornerZion7Candlelier.java +++ b/nx01-x4o-fc18/src/main/java/org/x4o/fc18/zion7/FourCornerZion7Candlelier.java @@ -33,12 +33,12 @@ import org.x4o.fc18.cake2.FourCornerDotCake; /// @version 1.0 Jan 09, 2025 public interface FourCornerZion7Candlelier { - /// Block of relative word slice offsets. - void strobeWords(FourCornerDotCake slice, List offsets); - /// Single word from slice. void strobeWord(FourCornerDotCake slice, int offset); + /// Block of relative word slice offsets. + void strobeWords(FourCornerDotCake slice, List offsets); + /// 1152 bit fractions of two 576 bit numbers. void strobeNCR1632(BigInteger denominator, BigInteger numerator); @@ -48,8 +48,8 @@ public interface FourCornerZion7Candlelier { /// Allows a 6 bit computer to use the nether,fractions or unicode. void strobeRecursiveCake(List cakePoints); - /// Dark octal data, with up to 576 bit mime-type data type header. - void strobeNether(List key, List octals); + /// Octal sand worm, with up to 576 bit mime-type data type header. + void strobeSandWorm(List head, List body); interface Adapter extends FourCornerZion7Candlelier { @@ -74,7 +74,7 @@ public interface FourCornerZion7Candlelier { } @Override - default void strobeNether(List key, List octals) { + default void strobeSandWorm(List head, List body) { } } } diff --git a/nx01-x4o-fc18/src/main/java/org/x4o/fc18/zion7/FourCornerZionStenoLexer.java b/nx01-x4o-fc18/src/main/java/org/x4o/fc18/zion7/FourCornerZionStenoLexer.java index 9736152..c610a46 100644 --- a/nx01-x4o-fc18/src/main/java/org/x4o/fc18/zion7/FourCornerZionStenoLexer.java +++ b/nx01-x4o-fc18/src/main/java/org/x4o/fc18/zion7/FourCornerZionStenoLexer.java @@ -94,8 +94,11 @@ public class FourCornerZionStenoLexer { if (FourCornerDotCake.FC_UNI2K_22.equals(cakeSlice)) { continue; // parse block manually } - if (FourCornerDotCake.FC_NETHER.equals(cakeSlice)) { - continue; // merge the nether data to octals manually + if (FourCornerDotCake.FC_SAND_OLGOI.equals(cakeSlice)) { + continue; // parse nether head manually + } + if (FourCornerDotCake.FC_SAND_KHORKHOI.equals(cakeSlice)) { + continue; // parse nether body manually } if (FourCornerDotCake.FC_NCR1632_XD.equals(cakeSlice)) { continue; // parse block manually @@ -108,7 +111,8 @@ public class FourCornerZionStenoLexer { this.scanners.add(new StenoScannerCDCDEC()); this.scanners.add(new StenoScannerNCR18()); this.scanners.add(new StenoScannerUNI21()); - this.scanners.add(new StenoScannerNether()); + this.scanners.add(new StenoScannerSandOlgoi()); + this.scanners.add(new StenoScannerSandKhorkhoi()); } public FourCornerZionStenoLexer withSmokeSignals(FourCornerZionStenoLexerSmoke smokeSignals) { @@ -274,10 +278,21 @@ public class FourCornerZionStenoLexer { } } - static class StenoScannerNether extends StenoScanner { + static class StenoScannerSandOlgoi extends StenoScanner { - public StenoScannerNether() { - super(FourCornerDotCake.FC_NETHER); + public StenoScannerSandOlgoi() { + super(FourCornerDotCake.FC_SAND_OLGOI); + } + + @Override + public void process(FourCornerZionStenoLexer lexer, int idxFirst, int idxLast) { + } + } + + static class StenoScannerSandKhorkhoi extends StenoScanner { + + public StenoScannerSandKhorkhoi() { + super(FourCornerDotCake.FC_SAND_KHORKHOI); } @Override @@ -286,7 +301,7 @@ public class FourCornerZionStenoLexer { private void handlePoints(FourCornerZionStenoLexer lexer, List slicedPoints) { // TODO: convert from 15 bit to 3 bit - lexer.handler.strobeNether(null, slicedPoints); + lexer.handler.strobeSandWorm(null, slicedPoints); } }