aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Tuomi <jans.tuomi@gmail.com>2023-11-03 16:25:11 +0200
committerJan Tuomi <jans.tuomi@gmail.com>2023-11-03 16:25:11 +0200
commit83d1392c0fd1bcdddb8b63cc8b2156f9ac7fa80b (patch)
tree1e53c87b6a0a4dda341fa8d6a4712c60519ea441
parentd956f3841ad867d631fbe2324cb6e280bc9b2a66 (diff)
Start copying IBM CGA 8x8 charset, wip memory mapped text memory
-rw-r--r--asm/bootstrap.atk166
-rw-r--r--charset.txt272
-rw-r--r--digital/atk16_tpu.dig558
-rw-r--r--src/charmem.py7
4 files changed, 424 insertions, 419 deletions
diff --git a/asm/bootstrap.atk16 b/asm/bootstrap.atk16
index 9f663d1..47f411e 100644
--- a/asm/bootstrap.atk16
+++ b/asm/bootstrap.atk16
@@ -15,8 +15,10 @@
@let terminal_addr 0xE000
@let keyboard_addr 0xE001
@let gr_mode_addr 0xE002
-@let sprite_mem 0xE800 ; note: sprite memory & text memory can use the same space
-@let text_mem 0xE800 ; since they are never used at the same time
+@let sprite_mem 0xE800
+@let text_mem 0xF800 ; to 0xFFFF
+; note: sprite memory & text memory can use the same space
+; since they are never used at the same time
; graphics mode settings
@let gr_disabled_mode 0b00
diff --git a/charset.txt b/charset.txt
index 0b68a45..57ea48c 100644
--- a/charset.txt
+++ b/charset.txt
@@ -6,203 +6,75 @@
- ##
-# #
-# #
-####
-# #
-# #
-# #
-
-##
-# #
-# #
-###
-# #
-# #
-####
-
- ##
-# #
-#
-#
-#
-# #
- ##
-
-####
-#
-#
-##
-#
-#
-####
-
-####
-#
-#
-##
-#
-#
-#
-
- ##
-# #
-#
-#
-# ##
-# #
- ##
-
-# #
-# #
-####
-# #
-# #
-# #
-# #
-
-###
- #
- #
- #
- #
- #
-###
-
- ###
- #
- #
- #
- #
-# #
- ##
-
-# #
-# #
-##
-# #
-# #
-# #
-# #
-
-#
-#
-#
-#
-#
-#
-####
-
-# #
-####
-####
-# #
-# #
-# #
-# #
-
-# #
-## #
-## #
-# ##
-# ##
-# #
-# #
-
- ##
-# #
-# #
-# #
-# #
-# #
- ##
-
-###
-# #
-# #
-###
-#
-#
-#
-
- ##
-# #
-# #
-# #
-# ##
- ###
- #
-
-###
-# #
-# #
-###
-##
-# #
-# #
-
- ##
-# #
-#
- ##
- #
-# #
- ##
-
-###
- #
- #
- #
- #
- #
- #
-
-# #
-# #
-# #
-# #
-# #
-# #
- ###
-
-# #
-# #
-# #
-# #
-# #
-# #
- ##
-
-# #
-# #
-# #
-# #
-####
-####
-# #
-
-# #
-# #
- ##
-# #
-# #
-# #
-# #
-
-# #
-# #
-# #
- ###
- #
-# #
- ###
-
-####
- #
- #
- #
- #
-#
-####
- \ No newline at end of file
+ ██
+ ████
+██ ██
+██ ██
+██████
+██ ██
+██ ██
+
+██████
+ ██ ██
+ ██ ██
+ █████
+ ██ ██
+ ██ ██
+██████
+
+ ████
+ ██ ██
+██
+██
+██
+ ██ ██
+ ████
+
+█████
+ ██ ██
+ ██ ██
+ ██ ██
+ ██ ██
+ ██ ██
+█████
+
+███████
+ ██ █
+ ██ █
+ ████
+ ██ █
+ ██ █
+███████
+
+███████
+ ██ █
+ ██ █
+ ████
+ ██ █
+ ██
+████
+
+ ████
+ ██ ██
+██
+██
+██ ███
+ ██ ██
+ █████
+
+██ ██
+██ ██
+██ ██
+██████
+██ ██
+██ ██
+██ ██
+
+ ████
+ ██
+ ██
+ ██
+ ██
+ ██
+ ████
+
diff --git a/digital/atk16_tpu.dig b/digital/atk16_tpu.dig
index 6b6030c..9f006b3 100644
--- a/digital/atk16_tpu.dig
+++ b/digital/atk16_tpu.dig
@@ -60,39 +60,39 @@
<elementName>In</elementName>
<elementAttributes>
<entry>
- <string>Description</string>
- <string>MMI/O selector</string>
- </entry>
- <entry>
<string>Label</string>
- <string>MMIO_S</string>
- </entry>
- <entry>
- <string>Bits</string>
- <int>13</int>
+ <string>MMIO_IE</string>
</entry>
</elementAttributes>
- <pos x="320" y="220"/>
+ <pos x="320" y="120"/>
</visualElement>
<visualElement>
<elementName>In</elementName>
<elementAttributes>
<entry>
<string>Label</string>
- <string>MMIO_IE</string>
+ <string>MMIO_OE</string>
</entry>
</elementAttributes>
- <pos x="320" y="120"/>
+ <pos x="320" y="160"/>
</visualElement>
<visualElement>
<elementName>In</elementName>
<elementAttributes>
<entry>
+ <string>Description</string>
+ <string>MMI/O selector</string>
+ </entry>
+ <entry>
<string>Label</string>
- <string>MMIO_OE</string>
+ <string>MMIO_S</string>
+ </entry>
+ <entry>
+ <string>Bits</string>
+ <int>13</int>
</entry>
</elementAttributes>
- <pos x="320" y="160"/>
+ <pos x="320" y="220"/>
</visualElement>
<visualElement>
<elementName>Tunnel</elementName>
@@ -191,16 +191,6 @@
<pos x="320" y="480"/>
</visualElement>
<visualElement>
- <elementName>Tunnel</elementName>
- <elementAttributes>
- <entry>
- <string>NetName</string>
- <string>DBUS</string>
- </entry>
- </elementAttributes>
- <pos x="340" y="480"/>
- </visualElement>
- <visualElement>
<elementName>In</elementName>
<elementAttributes>
<entry>
@@ -293,48 +283,6 @@
<pos x="520" y="720"/>
</visualElement>
<visualElement>
- <elementName>Splitter</elementName>
- <elementAttributes>
- <entry>
- <string>Input Splitting</string>
- <string>5,6</string>
- </entry>
- <entry>
- <string>Output Splitting</string>
- <string>11</string>
- </entry>
- </elementAttributes>
- <pos x="360" y="320"/>
- </visualElement>
- <visualElement>
- <elementName>Tunnel</elementName>
- <elementAttributes>
- <entry>
- <string>rotation</string>
- <rotation rotation="2"/>
- </entry>
- <entry>
- <string>NetName</string>
- <string>TY</string>
- </entry>
- </elementAttributes>
- <pos x="320" y="320"/>
- </visualElement>
- <visualElement>
- <elementName>Tunnel</elementName>
- <elementAttributes>
- <entry>
- <string>rotation</string>
- <rotation rotation="2"/>
- </entry>
- <entry>
- <string>NetName</string>
- <string>TX</string>
- </entry>
- </elementAttributes>
- <pos x="320" y="360"/>
- </visualElement>
- <visualElement>
<elementName>Tunnel</elementName>
<elementAttributes>
<entry>
@@ -363,30 +311,6 @@
<pos x="860" y="320"/>
</visualElement>
<visualElement>
- <elementName>Ground</elementName>
- <elementAttributes>
- <entry>
- <string>rotation</string>
- <rotation rotation="1"/>
- </entry>
- <entry>
- <string>Bits</string>
- <int>8</int>
- </entry>
- </elementAttributes>
- <pos x="460" y="340"/>
- </visualElement>
- <visualElement>
- <elementName>Ground</elementName>
- <elementAttributes>
- <entry>
- <string>rotation</string>
- <rotation rotation="1"/>
- </entry>
- </elementAttributes>
- <pos x="460" y="360"/>
- </visualElement>
- <visualElement>
<elementName>VDD</elementName>
<elementAttributes>
<entry>
@@ -447,37 +371,6 @@
<pos x="480" y="900"/>
</visualElement>
<visualElement>
- <elementName>And</elementName>
- <elementAttributes>
- <entry>
- <string>inverterConfig</string>
- <inverterConfig>
- <string>In_1</string>
- <string>In_2</string>
- </inverterConfig>
- </entry>
- <entry>
- <string>Inputs</string>
- <int>3</int>
- </entry>
- </elementAttributes>
- <pos x="660" y="900"/>
- </visualElement>
- <visualElement>
- <elementName>Splitter</elementName>
- <elementAttributes>
- <entry>
- <string>Input Splitting</string>
- <string>3</string>
- </entry>
- <entry>
- <string>Output Splitting</string>
- <string>1,1,1</string>
- </entry>
- </elementAttributes>
- <pos x="580" y="900"/>
- </visualElement>
- <visualElement>
<elementName>Tunnel</elementName>
<elementAttributes>
<entry>
@@ -526,7 +419,7 @@
<elementAttributes>
<entry>
<string>rotation</string>
- <rotation reference="../../../../visualElement[38]/elementAttributes/entry/rotation"/>
+ <rotation reference="../../../../visualElement[30]/elementAttributes/entry/rotation"/>
</entry>
</elementAttributes>
<pos x="440" y="1040"/>
@@ -552,16 +445,6 @@
<pos x="560" y="1040"/>
</visualElement>
<visualElement>
- <elementName>Tunnel</elementName>
- <elementAttributes>
- <entry>
- <string>NetName</string>
- <string>COVF</string>
- </entry>
- </elementAttributes>
- <pos x="760" y="920"/>
- </visualElement>
- <visualElement>
<elementName>Not</elementName>
<elementAttributes/>
<pos x="380" y="400"/>
@@ -607,12 +490,9 @@
</entry>
<entry>
<string>Data</string>
- <data>6,9,9,f,9,9,9,0,3,5,5,7,9,9,f,0,6,9,1,1,1,9,6,0,f,1,1,3,1,1,f
-,0,f,1,1,3,1,1,1,0,6,9,1,1,d,9,6,0,9,9,f,4*9,0,7,5*2,7,0,e,4*8
-,9,6,0,9,5,3,5,5,9,9,0,6*1,f,0,9,f,f,4*9,0,9,b,b,d,d,9,9,0,6,5*9
-,6,0,7,9,9,7,1,1,1,0,6,9,9,9,d,e,8,0,7,9,9,7,3,5,9,0,6,9,1,6,8
-,9,6,0,7,6*2,0,6*9,e,0,6*9,6,0,4*9,f,f,9,0,9,9,6,4*9,0,9,9,9,e
-,8,9,e,0,f,8,8,4,2,1,f</data>
+ <data>c,1e,33,33,3f,33,33,0,3f,66,66,3e,66,66,3f,0,3c,66,3,3,3,66,3c
+,0,1f,36,66,66,66,36,1f,0,7f,46,16,1e,16,46,7f,0,7f,46,16,1e,16
+,6,f,0,3c,66,3,3,73,66,7c,0,33,33,33,3f,33,33,33,0,1e,5*c,1e</data>
</entry>
<entry>
<string>intFormat</string>
@@ -646,7 +526,7 @@
<elementAttributes>
<entry>
<string>rotation</string>
- <rotation reference="../../../../visualElement[50]/elementAttributes/entry/rotation"/>
+ <rotation reference="../../../../visualElement[41]/elementAttributes/entry/rotation"/>
</entry>
</elementAttributes>
<pos x="700" y="700"/>
@@ -743,17 +623,219 @@
<elementAttributes/>
<pos x="1040" y="660"/>
</visualElement>
+ <visualElement>
+ <elementName>Tunnel</elementName>
+ <elementAttributes>
+ <entry>
+ <string>NetName</string>
+ <string>COVF</string>
+ </entry>
+ </elementAttributes>
+ <pos x="600" y="920"/>
+ </visualElement>
+ <visualElement>
+ <elementName>Ground</elementName>
+ <elementAttributes>
+ <entry>
+ <string>rotation</string>
+ <rotation rotation="1"/>
+ </entry>
+ </elementAttributes>
+ <pos x="460" y="940"/>
+ </visualElement>
+ <visualElement>
+ <elementName>Multiplexer</elementName>
+ <elementAttributes>
+ <entry>
+ <string>Bits</string>
+ <int>11</int>
+ </entry>
+ </elementAttributes>
+ <pos x="280" y="300"/>
+ </visualElement>
+ <visualElement>
+ <elementName>Splitter</elementName>
+ <elementAttributes>
+ <entry>
+ <string>Input Splitting</string>
+ <string>5,6</string>
+ </entry>
+ <entry>
+ <string>Output Splitting</string>
+ <string>11</string>
+ </entry>
+ </elementAttributes>
+ <pos x="140" y="300"/>
+ </visualElement>
+ <visualElement>
+ <elementName>Tunnel</elementName>
+ <elementAttributes>
+ <entry>
+ <string>rotation</string>
+ <rotation rotation="2"/>
+ </entry>
+ <entry>
+ <string>NetName</string>
+ <string>TY</string>
+ </entry>
+ </elementAttributes>
+ <pos x="100" y="300"/>
+ </visualElement>
+ <visualElement>
+ <elementName>Tunnel</elementName>
+ <elementAttributes>
+ <entry>
+ <string>rotation</string>
+ <rotation rotation="2"/>
+ </entry>
+ <entry>
+ <string>NetName</string>
+ <string>TX</string>
+ </entry>
+ </elementAttributes>
+ <pos x="100" y="340"/>
+ </visualElement>
+ <visualElement>
+ <elementName>And</elementName>
+ <elementAttributes>
+ <entry>
+ <string>Inputs</string>
+ <int>3</int>
+ </entry>
+ </elementAttributes>
+ <pos x="20" y="540"/>
+ </visualElement>
+ <visualElement>
+ <elementName>Splitter</elementName>
+ <elementAttributes>
+ <entry>
+ <string>Input Splitting</string>
+ <string>13</string>
+ </entry>
+ <entry>
+ <string>Output Splitting</string>
+ <string>11,1,1</string>
+ </entry>
+ </elementAttributes>
+ <pos x="-40" y="500"/>
+ </visualElement>
+ <visualElement>
+ <elementName>Tunnel</elementName>
+ <elementAttributes>
+ <entry>
+ <string>rotation</string>
+ <rotation rotation="2"/>
+ </entry>
+ <entry>
+ <string>NetName</string>
+ <string>MMIO_S</string>
+ </entry>
+ </elementAttributes>
+ <pos x="-80" y="500"/>
+ </visualElement>
+ <visualElement>
+ <elementName>Tunnel</elementName>
+ <elementAttributes>
+ <entry>
+ <string>NetName</string>
+ <string>MMIOADDR</string>
+ </entry>
+ </elementAttributes>
+ <pos x="20" y="500"/>
+ </visualElement>
+ <visualElement>
+ <elementName>Tunnel</elementName>
+ <elementAttributes>
+ <entry>
+ <string>rotation</string>
+ <rotation rotation="2"/>
+ </entry>
+ <entry>
+ <string>NetName</string>
+ <string>MMIOADDR</string>
+ </entry>
+ </elementAttributes>
+ <pos x="260" y="340"/>
+ </visualElement>
+ <visualElement>
+ <elementName>Tunnel</elementName>
+ <elementAttributes>
+ <entry>
+ <string>rotation</string>
+ <rotation rotation="2"/>
+ </entry>
+ <entry>
+ <string>NetName</string>
+ <string>MMIOMATCH</string>
+ </entry>
+ </elementAttributes>
+ <pos x="280" y="380"/>
+ </visualElement>
+ <visualElement>
+ <elementName>Tunnel</elementName>
+ <elementAttributes>
+ <entry>
+ <string>rotation</string>
+ <rotation rotation="2"/>
+ </entry>
+ <entry>
+ <string>NetName</string>
+ <string>DBUS_L8</string>
+ </entry>
+ </elementAttributes>
+ <pos x="440" y="340"/>
+ </visualElement>
+ <visualElement>
+ <elementName>Splitter</elementName>
+ <elementAttributes>
+ <entry>
+ <string>Input Splitting</string>
+ <string>16</string>
+ </entry>
+ <entry>
+ <string>Output Splitting</string>
+ <string>8,8</string>
+ </entry>
+ </elementAttributes>
+ <pos x="360" y="480"/>
+ </visualElement>
+ <visualElement>
+ <elementName>Tunnel</elementName>
+ <elementAttributes>
+ <entry>
+ <string>NetName</string>
+ <string>DBUS_L8</string>
+ </entry>
+ </elementAttributes>
+ <pos x="420" y="480"/>
+ </visualElement>
+ <visualElement>
+ <elementName>Tunnel</elementName>
+ <elementAttributes>
+ <entry>
+ <string>NetName</string>
+ <string>MMIOMATCH</string>
+ </entry>
+ </elementAttributes>
+ <pos x="100" y="560"/>
+ </visualElement>
+ <visualElement>
+ <elementName>Tunnel</elementName>
+ <elementAttributes>
+ <entry>
+ <string>rotation</string>
+ <rotation rotation="2"/>
+ </entry>
+ <entry>
+ <string>NetName</string>
+ <string>MMIO_IE</string>
+ </entry>
+ </elementAttributes>
+ <pos x="-20" y="580"/>
+ </visualElement>
</visualElements>
<wires>
<wire>
- <p1 x="320" y="320"/>
- <p2 x="360" y="320"/>
- </wire>
- <wire>
- <p1 x="380" y="320"/>
- <p2 x="480" y="320"/>
- </wire>
- <wire>
<p1 x="840" y="320"/>
<p2 x="860" y="320"/>
</wire>
@@ -766,6 +848,14 @@
<p2 x="600" y="320"/>
</wire>
<wire>
+ <p1 x="120" y="320"/>
+ <p2 x="140" y="320"/>
+ </wire>
+ <wire>
+ <p1 x="320" y="320"/>
+ <p2 x="480" y="320"/>
+ </wire>
+ <wire>
<p1 x="700" y="640"/>
<p2 x="720" y="640"/>
</wire>
@@ -786,18 +876,18 @@
<p2 x="480" y="900"/>
</wire>
<wire>
- <p1 x="600" y="900"/>
- <p2 x="640" y="900"/>
- </wire>
- <wire>
- <p1 x="560" y="900"/>
- <p2 x="580" y="900"/>
+ <p1 x="-20" y="580"/>
+ <p2 x="20" y="580"/>
</wire>
<wire>
<p1 x="320" y="520"/>
<p2 x="340" y="520"/>
</wire>
<wire>
+ <p1 x="-20" y="520"/>
+ <p2 x="0" y="520"/>
+ </wire>
+ <wire>
<p1 x="880" y="400"/>
<p2 x="900" y="400"/>
</wire>
@@ -838,20 +928,20 @@
<p2 x="560" y="1040"/>
</wire>
<wire>
- <p1 x="340" y="340"/>
- <p2 x="360" y="340"/>
- </wire>
- <wire>
<p1 x="840" y="340"/>
<p2 x="860" y="340"/>
</wire>
<wire>
- <p1 x="460" y="340"/>
- <p2 x="480" y="340"/>
+ <p1 x="100" y="340"/>
+ <p2 x="120" y="340"/>
</wire>
<wire>
- <p1 x="460" y="980"/>
- <p2 x="740" y="980"/>
+ <p1 x="260" y="340"/>
+ <p2 x="280" y="340"/>
+ </wire>
+ <wire>
+ <p1 x="440" y="340"/>
+ <p2 x="480" y="340"/>
</wire>
<wire>
<p1 x="860" y="660"/>
@@ -866,20 +956,16 @@
<p2 x="820" y="660"/>
</wire>
<wire>
- <p1 x="720" y="920"/>
- <p2 x="740" y="920"/>
+ <p1 x="540" y="920"/>
+ <p2 x="580" y="920"/>
</wire>
<wire>
<p1 x="460" y="920"/>
<p2 x="480" y="920"/>
</wire>
<wire>
- <p1 x="600" y="920"/>
- <p2 x="640" y="920"/>
- </wire>
- <wire>
- <p1 x="740" y="920"/>
- <p2 x="760" y="920"/>
+ <p1 x="580" y="920"/>
+ <p2 x="600" y="920"/>
</wire>
<wire>
<p1 x="320" y="220"/>
@@ -890,12 +976,20 @@
<p2 x="580" y="860"/>
</wire>
<wire>
+ <p1 x="0" y="540"/>
+ <p2 x="20" y="540"/>
+ </wire>
+ <wire>
<p1 x="320" y="160"/>
<p2 x="340" y="160"/>
</wire>
<wire>
+ <p1 x="380" y="480"/>
+ <p2 x="420" y="480"/>
+ </wire>
+ <wire>
<p1 x="320" y="480"/>
- <p2 x="340" y="480"/>
+ <p2 x="360" y="480"/>
</wire>
<wire>
<p1 x="540" y="740"/>
@@ -906,22 +1000,18 @@
<p2 x="480" y="1060"/>
</wire>
<wire>
- <p1 x="320" y="360"/>
- <p2 x="340" y="360"/>
- </wire>
- <wire>
<p1 x="880" y="360"/>
<p2 x="900" y="360"/>
</wire>
<wire>
- <p1 x="460" y="360"/>
- <p2 x="480" y="360"/>
- </wire>
- <wire>
<p1 x="540" y="360"/>
<p2 x="580" y="360"/>
</wire>
<wire>
+ <p1 x="300" y="360"/>
+ <p2 x="480" y="360"/>
+ </wire>
+ <wire>
<p1 x="320" y="680"/>
<p2 x="340" y="680"/>
</wire>
@@ -930,12 +1020,8 @@
<p2 x="720" y="680"/>
</wire>
<wire>
- <p1 x="460" y="940"/>
- <p2 x="480" y="940"/>
- </wire>
- <wire>
- <p1 x="600" y="940"/>
- <p2 x="660" y="940"/>
+ <p1 x="460" y="1000"/>
+ <p2 x="580" y="1000"/>
</wire>
<wire>
<p1 x="600" y="620"/>
@@ -950,10 +1036,38 @@
<p2 x="860" y="620"/>
</wire>
<wire>
+ <p1 x="460" y="940"/>
+ <p2 x="480" y="940"/>
+ </wire>
+ <wire>
+ <p1 x="100" y="300"/>
+ <p2 x="140" y="300"/>
+ </wire>
+ <wire>
+ <p1 x="160" y="300"/>
+ <p2 x="280" y="300"/>
+ </wire>
+ <wire>
<p1 x="320" y="560"/>
<p2 x="340" y="560"/>
</wire>
<wire>
+ <p1 x="80" y="560"/>
+ <p2 x="100" y="560"/>
+ </wire>
+ <wire>
+ <p1 x="-20" y="560"/>
+ <p2 x="20" y="560"/>
+ </wire>
+ <wire>
+ <p1 x="-80" y="500"/>
+ <p2 x="-40" y="500"/>
+ </wire>
+ <wire>
+ <p1 x="-20" y="500"/>
+ <p2 x="20" y="500"/>
+ </wire>
+ <wire>
<p1 x="320" y="120"/>
<p2 x="340" y="120"/>
</wire>
@@ -978,42 +1092,26 @@
<p2 x="480" y="380"/>
</wire>
<wire>
- <p1 x="880" y="320"/>
- <p2 x="880" y="360"/>
- </wire>
- <wire>
- <p1 x="880" y="360"/>
- <p2 x="880" y="400"/>
- </wire>
- <wire>
- <p1 x="560" y="700"/>
- <p2 x="560" y="720"/>
- </wire>
- <wire>
- <p1 x="560" y="860"/>
- <p2 x="560" y="900"/>
+ <p1 x="280" y="380"/>
+ <p2 x="300" y="380"/>
</wire>
<wire>
<p1 x="800" y="620"/>
<p2 x="800" y="660"/>
</wire>
<wire>
- <p1 x="1040" y="640"/>
- <p2 x="1040" y="660"/>
- </wire>
- <wire>
- <p1 x="340" y="340"/>
- <p2 x="340" y="360"/>
- </wire>
- <wire>
- <p1 x="740" y="920"/>
- <p2 x="740" y="980"/>
+ <p1 x="0" y="520"/>
+ <p2 x="0" y="540"/>
</wire>
<wire>
<p1 x="580" y="320"/>
<p2 x="580" y="360"/>
</wire>
<wire>
+ <p1 x="580" y="920"/>
+ <p2 x="580" y="1000"/>
+ </wire>
+ <wire>
<p1 x="900" y="640"/>
<p2 x="900" y="660"/>
</wire>
@@ -1030,16 +1128,48 @@
<p2 x="840" y="760"/>
</wire>
<wire>
- <p1 x="440" y="380"/>
- <p2 x="440" y="400"/>
+ <p1 x="460" y="1000"/>
+ <p2 x="460" y="1060"/>
</wire>
<wire>
- <p1 x="460" y="940"/>
- <p2 x="460" y="980"/>
+ <p1 x="300" y="340"/>
+ <p2 x="300" y="360"/>
</wire>
<wire>
- <p1 x="460" y="980"/>
- <p2 x="460" y="1060"/>
+ <p1 x="300" y="360"/>
+ <p2 x="300" y="380"/>
+ </wire>
+ <wire>
+ <p1 x="880" y="320"/>
+ <p2 x="880" y="360"/>
+ </wire>
+ <wire>
+ <p1 x="880" y="360"/>
+ <p2 x="880" y="400"/>
+ </wire>
+ <wire>
+ <p1 x="560" y="700"/>
+ <p2 x="560" y="720"/>
+ </wire>
+ <wire>
+ <p1 x="560" y="860"/>
+ <p2 x="560" y="900"/>
+ </wire>
+ <wire>
+ <p1 x="1040" y="640"/>
+ <p2 x="1040" y="660"/>
+ </wire>
+ <wire>
+ <p1 x="-20" y="540"/>
+ <p2 x="-20" y="560"/>
+ </wire>
+ <wire>
+ <p1 x="440" y="380"/>
+ <p2 x="440" y="400"/>
+ </wire>
+ <wire>
+ <p1 x="120" y="320"/>
+ <p2 x="120" y="340"/>
</wire>
</wires>
<measurementOrdering/>
diff --git a/src/charmem.py b/src/charmem.py
index 25eeec9..9b19864 100644
--- a/src/charmem.py
+++ b/src/charmem.py
@@ -21,7 +21,7 @@ header_chars = lines[0]
charset: list[list[str]] = []
CHAR_HEIGHT_BITS = 3
CHAR_HEIGHT = 2 ** CHAR_HEIGHT_BITS
-CHAR_WIDTH = 5
+CHAR_WIDTH = 8
i = CHAR_HEIGHT
while i < len(lines):
@@ -34,11 +34,12 @@ while i < len(lines):
CHAR_N = len(charset)
TOTAL_BYTEARRAY_SIZE = CHAR_N * CHAR_HEIGHT
-print("TOTAL_BYTEARRAY_SIZE:", TOTAL_BYTEARRAY_SIZE)
def string_to_byte(input_string: str):
# Replace spaces with '0' and '#' with '1'
- binary_string = input_string.replace(' ', '0').replace('#', '1') + "000"
+ binary_string = input_string.replace(' ', '0').replace('█', '1')
+
+ assert(len(input_string) == CHAR_WIDTH)
# Check if the string contains only '0' or '1'
if not all(c in '01' for c in binary_string):