Skip to content

Commit

Permalink
Correct reciter tables
Browse files Browse the repository at this point in the history
  • Loading branch information
s-macke committed Feb 17, 2014
1 parent 172f44a commit 37d0856
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 8 deletions.
62 changes: 54 additions & 8 deletions src/ReciterTabs.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@
//some flags
unsigned char tab36376[] =
{
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 2, 2, 2, 2, 2, 2, 130,
0, 0, 0, 0, 0, 0, 0, 0, // 0-7
0, 0, 0, 0, 0, 0, 0, 0, // 8-15
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 2, 2, 2, 2, 2, 2, 130, // ' ', '!'
0, 0, 2, 2, 2, 2, 2, 2,
3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 2, 2, 2, 2, 2, 2,
2, 192, 168, 176, 172, 192, 160, 184,
160, 192, 188, 160, 172, 168, 172, 192,
2, 192, 168, 176, 172, 192, 160, 184, // '@', 'A'
160, 192, 188, 160, 172, 168, 172, 192,
160, 160, 172, 180, 164, 192, 168, 168,
176, 192, 188, 0, 0, 0, 2, 0,
176, 192, 188, 0, 0, 0, 2, 0, // 'X', 'Y', 'Z', '[',
32, 32, 155, 32, 192, 185, 32, 205,
163, 76, 138, 142
};
Expand Down Expand Up @@ -478,6 +478,52 @@ char rules[] =
'j'|0x80
};

char rules2[] =
{
'(','A',')', '='|0x80,
'(','!',')', '=','.'|0x80,
'(','"',')',' ', '=','-','A','H','5','N','K','W','O','W','T','-'|0x80,
'(','"',')', '=','K','W','O','W','4','T','-'|0x80,
'(','#',')', '=',' ','N','A','H','4','M','B','E','R'|0x80,
'(','$',')', '=',' ','D','A','A','4','L','E','R'|0x80,
'(','%',')', '=',' ','P','E','R','S','E','H','4','N','T'|0x80,
'(','&',')', '=',' ','A','E','N','D'|0x80,
'(','\'',')', '='|0x80,
'(','*',')', '=',' ','A','E','4','S','T','E','R','I','H','S','K'|0x80,
'(','+',')', '=',' ','P','L','A','H','4','S'|0x80,
'(',',',')', '=',','|0x80,
' ','(','-',')',' ', '=','-'|0x80,
'(','-',')', '='|0x80,
'(','.',')', '=',' ','P','O','Y','N','T'|0x80,
'(','/',')', '=',' ','S','L','A','E','4','S','H'|0x80,
'(','0',')', '=',' ','Z','I','Y','4','R','O','W'|0x80,
' ','(','1','S','T',')', '=','F','E','R','4','S','T'|0x80,
' ','(','1','0','T','H',')', '=','T','E','H','4','N','T','H'|0x80,
'(','1',')', '=',' ','W','A','H','4','N'|0x80,
' ','(','2','N','D',')', '=','S','E','H','4','K','U','N','D'|0x80,
'(','2',')', '=',' ','T','U','W','4'|0x80,
' ','(','3','R','D',')', '=','T','H','E','R','4','D'|0x80,
'(','3',')', '=',' ','T','H','R','I','Y','4'|0x80,
'(','4',')', '=',' ','F','O','H','4','R'|0x80,
' ','(','5','T','H',')', '=','F','I','H','4','F','T','H'|0x80,
'(','5',')', '=',' ','F','A','Y','4','V'|0x80,
' ','(','6','4',')',' ', '=','S','I','H','4','K','S','T','I','Y',' ','F','O','H','R'|0x80,
'(','6',')', '=',' ','S','I','H','4','K','S'|0x80,
'(','7',')', '=',' ','S','E','H','4','V','U','N'|0x80,
' ','(','8','T','H',')', '=','E','Y','4','T','H'|0x80,
'(','8',')', '=',' ','E','Y','4','T'|0x80,
'(','9',')', '=',' ','N','A','Y','4','N'|0x80,
'(',':',')', '=','.'|0x80,
'(',';',')', '=','.'|0x80,
'(','<',')', '=',' ','L','E','H','4','S',' ','D','H','A','E','N'|0x80,
'(','=',')', '=',' ','I','Y','4','K','W','U','L','Z'|0x80,
'(','>',')', '=',' ','G','R','E','Y','4','T','E','R',' ','D','H','A','E','N'|0x80,
'(','?',')', '=','.'|0x80,
'(','@',')', '=',' ','A','E','6','T'|0x80,
'(','^',')', '=',' ','K','A','E','4','R','I','X','T'|0x80,
']','A'|0x80
};


//26 items. From 'A' to 'Z'
// positions for mem62 and mem63 for each character
Expand Down
6 changes: 6 additions & 0 deletions src/reciter.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ void Code37066(unsigned char mem58)
unsigned char GetRuleByte(unsigned short mem62, unsigned char Y)
{
unsigned int address = mem62;

if (mem62 >= 37541)
{
address -= 37541;
return rules2[address+Y];
}
address -= 32000;
return rules[address+Y];
}
Expand Down

0 comments on commit 37d0856

Please sign in to comment.