atarialoha Posted April 14, 2022 Share Posted April 14, 2022 (edited) Hi folks, Going back to basics here. Watching Ed on YouTube: And testing out the code: https://github.com/EdSalisbury/edventure/blob/episode_1/main.asm Question: Why are the uppercase letters not following ASCII with "A" = decimal 65, etc.? (i.e., hex $41 for "A") I noticed the lowercase are correct, lowercase "a" being $61 hex I looked at the Disassembly and the Hex Dump on Altirra, and checking it on the ATASCII table just to be sure. Edited April 14, 2022 by atarialoha Quote Link to comment Share on other sites More sharing options...
atarialoha Posted April 14, 2022 Author Share Posted April 14, 2022 Quote Link to comment Share on other sites More sharing options...
Rybags Posted April 14, 2022 Share Posted April 14, 2022 The order of the characters in the character ROM aren't all the same as ASCII. This is due to how Graphics 1 and 2 work - they only allow 64 characters with the upper 2 bits choosing which PF colour to use for the foreground. The problem you'd get there is that with default ASCII order, the space, numbers and most of the symbols are in the lower 64 but upper/lower case are in the top 64. The solution used is to move the alpha characters down to the second half of the first block of 64. Then the numbers and symbols (mostly shifted numbers) are moved to the first half of that block. The second block has the control graphics followed by lower case. The other benefit is that space becomes code 0 - the clear screen routine can be shared with bitmap modes. You can use the second half of the character set in Gr. 1 and 2 to get lower case but the problem is there's no space character (heart will show instead) - this can be overcome by copying the character set to Ram then blanking that one out. 1 Quote Link to comment Share on other sites More sharing options...
atarialoha Posted April 14, 2022 Author Share Posted April 14, 2022 Many thanks! This really threw me in for a loop, after having memorized decimal 65 as A for decades. 1 Quote Link to comment Share on other sites More sharing options...
atarixle Posted April 14, 2022 Share Posted April 14, 2022 My personal opinion on this topic is that the engineers of the Atari just wanted the empty SPACE = 32 = $20 to be a zero in memory - just like a blank (pair of) pixel(s) on graphic screens. At least this makes sense to me. Quote Link to comment Share on other sites More sharing options...
phaeron Posted April 15, 2022 Share Posted April 15, 2022 That, and also making the character set usable for the 20-column modes that only support 64 chars. BTW, Altirra has an option in the memory pane to do this translation: 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.