Post Reply 
Two new memory modules for Sharp PC-1500, TRS-80 PC-2
04-05-2024, 01:49 PM
Post: #1
Two new memory modules for Sharp PC-1500, TRS-80 PC-2
In this video we introduce two new memory modules for the Sharp PC-1500 (TRS-80 PC-2) . The CE-1638 features 8x 16K RAM banks. The CE-163F also has 8x 16K RAM banks + 8x 16K FLASH banks. Both come with backup batteries for the RAM and firmware that runs behind the scenes which makes bank switching easy.



Find all posts by this user
Quote this message in a reply
04-08-2024, 03:47 PM
Post: #2
RE: Two new memory modules for Sharp PC-1500, TRS-80 PC-2
A bit of fun with the memory modules. Below is copied from my notes:

Quote:This simple program shows current bank number, swtiches to another bank, shows bank number

Bank 1 code -
10 REM BANK 1
20 PRINT"START AT BANK ";PEEK(&D4)
30 X=2:CALL &D5,X
40 PRINT"END AT BANK ";PEEK(&D4)


Bank 2 code-
10 REM BANK 2
20 PRINT"START AT BANK ";PEEK(&D4)
30 X=1:CALL &D5,X
40 PRINT"END AT BANK ";PEEK(&D4)


Demonstrate that 2letter variables are shared when programatically swtiching banks.

Bank 1 code -
10 REM BANK 1
20 PRINT"START AT BANK ";PEEK(&D4)
25 TL=10:PRINT"TL=";TL
30 X=2:CALL &D5,X
40 PRINT"END AT BANK ";PEEK(&D4)
50 PRINT"TL=";TL

Bank 2 code-
10 REM BANK 2
20 PRINT"START AT BANK ";PEEK(&D4)
25 TL=20:PRINT"TL=";TL
30 X=1:CALL &D5,X
40 PRINT"END AT BANK ";PEEK(&D4)
50 PRINT"TL=";TL

For the PC-1500 the top of RAM pointer is &4800, which is the top of built in ~2K RAM. For the PC-1500A the top of RAM pointer is &5800, which is the top of the built in 6K. The top of the CE-153F/CE-1638 bank is &4000. This means that any variables (2 letter or arrays) in this memory area are shared by all banks. Arrays and two letter variables build down from top of RAM. When you RUN a program all two letter and arrays variables are cleared. When you DIM/create new variables of this type the RAM pointers are adjusted at that time, (run time). To save them before programmatically switching banks X=current_bank:CALL&D5,X. (Or manually change banks.)

If we do POKE &7864,64 (&40) (was &58 on PC-1500A) we will set the top of RAM to top of 16K bank in memory module. Use X=current_bank:CALL&D5,X to save this new RAM pointer for this bank. (Or manually change banks.) Now all variables will be restricted to that bank. If we want to switch banks programmatically then all banks will need to have been set up this way.

If we then run the two-letter demo program above we will find that the two-letter variable TL is now different in each bank and it is retained when we switch from Bank 1 to Bank 2, back to Bank 1.
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)