summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoralekseiplusplus <alekseijeaves@protonmail.com>2023-12-08 02:30:02 +1100
committeralekseiplusplus <alekseijeaves@protonmail.com>2023-12-08 02:30:02 +1100
commit5012497d6e59d787195d177d02faa55242bf7e40 (patch)
treef6127e55a81357aba0fcdc17611c0850418ec785 /src
parentdc7e55d2798c1530fc301b232ce01d032fb9935f (diff)
now you can press lowercase letters
Diffstat (limited to 'src')
-rw-r--r--src/apple.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/apple.c b/src/apple.c
index ba8737a..8d3f359 100644
--- a/src/apple.c
+++ b/src/apple.c
@@ -45,7 +45,7 @@ void AppleOn() {
void AppleReset(){
acc = 0; X = 0; Y = 0; P = 0; S = 0;
- idata.cycles = 0; idata.length = 0; idata.add = 0; idata.value = 0;
+ idata.cycles = 0; idata.length = 0; idata.address = 0; idata.value = 0;
PC = 0xFF00;
free(Memory);
Memory = calloc(MEMORY_SIZE, sizeof(byte));
@@ -116,8 +116,9 @@ byte UserInput()
if (c < 0x20)
return -1;
- if (c >= 0x60)
- return -1;
+ // Convert lowercase to uppercase
+ if (c > 0x60 && c < 0x7B)
+ c -= 'a' - 'A';
return c;
}