Permalink
Browse files

now Oberon program fixes "~" and 0A8X (wrong և) characters.

removed fixes in shell code.
  • Loading branch information...
norayr committed Sep 11, 2014
1 parent 1e52037 commit 466e24ad4884f2f8fd793adc346dfc3511bffcb6
Showing with 50 additions and 17 deletions.
  1. +38 −5 armdictohack.Mod
  2. +12 −12 run.sh
View
@@ -17,10 +17,38 @@ BEGIN
Files.WriteBytes(r, str^, LEN(str^)-1);
Out.String(str^);
END WriteString;
(*
PROCEDURE Fix(VAR r : Files.Rider; VAR f : Files.File);
VAR WrongYev, RightYev, WrongExclam, RightExclam : CHAR;
i : LONGINT;
ch, lch : CHAR;
BEGIN
WrongYev := 0A8X;
RightYev := 0A2X;
WrongExclam := 07EX; (* ~ *)
RightExclam := 0AFX;
i := 0; lch := ' ';
Files.Set(r, f, i);
WHILE ~ r.eof DO
Files.Set(r, f, i);
Files.Read(r, ch);
IF ch = WrongYev THEN
Files.Set(r, f, i);
Files.WriteByte(r, RightYev);
(*Files.Set(r, f, i+1);*)
END;
IF (ch = WrongExclam) & (lch > 0A2X) THEN
Files.Set(r, f, i);
Files.WriteByte(r, RightExclam);
(*Files.Set(r, f, i+1); *)
END;
lch := ch;
INC(i);
END;
Files.Set(r, f, 2191531); (* 002170AB is 2191531 *)
Files.WriteByte(r, 111); (* replace errorneus armscii-8 o with latin o *)
@@ -29,11 +57,16 @@ BEGIN
Files.Set(r, f, 1815116);
Files.WriteByte(r, 0);
(*
Files.Set(r, f, 2245510); (* fix "hello" translation at address 00224386H *)
Files.WriteByte(r, 175) (* af is ՜ in armscii-8 *)
Files.WriteByte(r, 0A2X); (* af is ՜ in armscii-8 *)
Files.Set(r, f, 5465087);
Files.WriteByte(r, 0A2X);
*)
END Fix;
*)
PROCEDURE Go;
VAR f, fo : Files.File;
r, ro : Files.Rider;
@@ -44,7 +77,7 @@ PROCEDURE Go;
BEGIN
f := Files.Old(maindat);
IF f # NIL THEN
(* Fix(r, f);*)
Fix(r, f);
Files.Set(r, f, 0);
View
24 run.sh
@@ -34,10 +34,10 @@ cp ArmDicto1.1/data1.cab .
# cabextract
unshield x data1.cab
cp Program_Executable_Files/Data/main.dat .
#cp main.dat maintest.dat
cp main.dat maintest.dat
#fix all և
sed 's/\xa8/\xa2/g' main.dat > maintest.dat
#sed 's/\xa8/\xa2/g' main.dat > maintest.dat
function replaceByte() {
printf "$(printf '\\x%02X' $3)" | dd of="$1" bs=1 seek=$2 count=1 conv=notrunc &> /dev/null
@@ -47,41 +47,41 @@ function replaceByte() {
#That's why even stock armdicto was unable to show that translation.
#fixing bf with 6f (111) - to the real ASCII o letter.
# 002170AB is 2191531
replaceByte maintest.dat 2191531 111
#replaceByte maintest.dat 2191531 111
#same here, instead of latin o, armscii o by mistake
# 002dc5d3 is 2999763
replaceByte maintest.dat 2999763 111
#replaceByte maintest.dat 2999763 111
# word flance ends with strange b0 instead of 00,
# 001bb24c is 1815116
replaceByte maintest.dat 1815116 0
#replaceByte maintest.dat 1815116 0
# hello
#fixing ~ in hello translation
replaceByte maintest.dat 2245510 175
#replaceByte maintest.dat 2245510 175
# zulu
#00726D97, fixing 2d (-) with ad(֊)
replaceByte maintest.dat 7499159 173
#replaceByte maintest.dat 7499159 173
# 00726D9AH, fixing a8, should be և
#replaceByte maintest.dat 7499162 162
###replaceByte maintest.dat 7499162 162
# ahem
# 0002802f, 7e -> af (~)
replaceByte maintest.dat 163887 175
#replaceByte maintest.dat 163887 175
# alas
# 00029fe8, 7e -> af (~)
replaceByte maintest.dat 172008 175
#replaceByte maintest.dat 172008 175
# cheer
# 000b1274 ~
replaceByte maintest.dat 725620 175
#replaceByte maintest.dat 725620 175
# cherry-pie
# 005363ff a8 -> և (162)
#replaceByte maintest.dat 5465087 162
###replaceByte maintest.dat 5465087 162
#running hack

0 comments on commit 466e24a

Please sign in to comment.