From 5012497d6e59d787195d177d02faa55242bf7e40 Mon Sep 17 00:00:00 2001 From: alekseiplusplus Date: Fri, 8 Dec 2023 02:30:02 +1100 Subject: now you can press lowercase letters --- src/apple.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src') 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; } -- cgit v1.2.3