Jump to content
IGNORED

ATASCII ASCII Assembly question on "A" = $21?


Recommended Posts

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.

 

IMG_5988.thumb.jpg.74455c88af9758872bb0085210b69b49.jpg

 

 

IMG_5989.thumb.jpg.97ee3a40684ab839b86a952d77a5e37e.jpg

 

IMG_5990.thumb.jpg.fe2aad117548b4949a57896f73dad93c.jpg

 

IMG_5991.thumb.jpg.49601c8b54e9b3cd8e87eda6f4dc2a17.jpg

 

 

 

 

 

Edited by atarialoha
Link to comment
Share on other sites

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.

  • Like 1
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...