aboutsummaryrefslogtreecommitdiff
path: root/src/codepage.c
diff options
context:
space:
mode:
authorIan C <ianc@noddybox.co.uk>2021-09-21 21:18:46 +0100
committerIan C <ianc@noddybox.co.uk>2021-09-21 21:18:46 +0100
commit81216ea9a6da08678c7e38c5d3584d9a72655026 (patch)
treed613f8c3e6e385f39d8a407154786ce905954ad1 /src/codepage.c
parent25302a2513307a3a41b76f5e568f0916713c0620 (diff)
Imported V1.10V1.10
Diffstat (limited to 'src/codepage.c')
-rw-r--r--src/codepage.c35
1 files changed, 34 insertions, 1 deletions
diff --git a/src/codepage.c b/src/codepage.c
index 4ae9efe..5462a9b 100644
--- a/src/codepage.c
+++ b/src/codepage.c
@@ -60,6 +60,7 @@ static const ValueTable codepage_table[] =
{"zx81", CP_ZX81},
{"spectrum", CP_SPECTRUM},
{"cbm", CP_CBM},
+ {"c64", CP_C64},
{NULL}
};
@@ -188,12 +189,44 @@ static CodepageDef cp_cbm[] =
{0, 0}
};
+
+static CodepageDef cp_c64[] =
+{
+ {' ', 0x20}, {'!', 0x21}, {'"', 0x22}, {'#', 0x23},
+ {'$', 0x24}, {'%', 0x25}, {'&', 0x26}, {'\'', 0x27},
+ {'(', 0x28}, {')', 0x29}, {'*', 0x2a}, {'+', 0x2b},
+ {',', 0x2c}, {'-', 0x2d}, {'.', 0x2e}, {'/', 0x2f},
+ {'0', 0x30}, {'1', 0x31}, {'2', 0x32}, {'3', 0x33},
+ {'4', 0x34}, {'5', 0x35}, {'6', 0x36}, {'7', 0x37},
+ {'8', 0x38}, {'9', 0x39}, {':', 0x3a}, {';', 0x3b},
+ {'<', 0x3c}, {'=', 0x3d}, {'>', 0x3e}, {'?', 0x3f},
+ {'@', 0x00}, {'A', 0x41}, {'B', 0x42}, {'C', 0x43},
+ {'D', 0x44}, {'E', 0x45}, {'F', 0x46}, {'G', 0x47},
+ {'H', 0x48}, {'I', 0x49}, {'J', 0x4a}, {'K', 0x4b},
+ {'L', 0x4c}, {'M', 0x4d}, {'N', 0x4e}, {'O', 0x4f},
+ {'P', 0x50}, {'Q', 0x51}, {'R', 0x52}, {'S', 0x53},
+ {'T', 0x54}, {'U', 0x55}, {'V', 0x56}, {'W', 0x57},
+ {'X', 0x58}, {'Y', 0x59}, {'Z', 0x5a}, {'[', 0x1b},
+ {'\\', 0x1f}, {']', 0x1d}, {'^', 0x1e}, {'_', 0x64},
+ {'`', 0x1c}, {'a', 0x01}, {'b', 0x02}, {'c', 0x03},
+ {'d', 0x04}, {'e', 0x05}, {'f', 0x06}, {'g', 0x07},
+ {'h', 0x08}, {'i', 0x09}, {'j', 0x0a}, {'k', 0x0b},
+ {'l', 0x0c}, {'m', 0x0d}, {'n', 0x0e}, {'o', 0x0f},
+ {'p', 0x10}, {'q', 0x11}, {'r', 0x12}, {'s', 0x13},
+ {'t', 0x14}, {'u', 0x15}, {'v', 0x16}, {'w', 0x17},
+ {'x', 0x18}, {'y', 0x19}, {'z', 0x1a}, {'{', 0x5b},
+ {'|', 0x5c}, {'}', 0x5d}, {'~', 0x5e},
+ {0, 0}
+};
+
+
static CodepageDef *cp_table[] =
{
cp_ascii,
cp_zx81,
cp_spectrum,
- cp_cbm
+ cp_cbm,
+ cp_c64
};