Bank Switched RAM Sizes

Feel free to discuss any harware topic here
Post Reply
Posts: 43
Joined: Sun Aug 22, 2021 6:56 am

Bank Switched RAM Sizes

Post by amenjet »

I have been checking that my LZ emulator correctly handles the bank switched RAM on the LZ model. When I ran the SPACE program on the LZ ROM 4.2 I didn't get a larger RAM size when I was running with 64K of RAM. It then occurred to me to run the LZ64 ROM and when I did that I got a larger RAM size reported. So, it looks like the LZ ROMs don't have bank switching.

For the POS350 I had an INFO datapack in a slot and that patched the OS for me, so I could then run the SPACE program.

The results:

Code: Select all

XP   ROM 3.1 with 64K  of RAM: 22452
LZ   ROM 4.2 with 32K  of RAM: Code didn't run
LZ   ROM 4.2 with 64K  of RAM: 21790

LZ64 ROM 4.3 with 32K  of RAM: Code didn't run
LZ64 ROM 4.3 with 64K  of RAM: 54673 bytes     Verified on my LZ64
LZ64 ROM 4.3 with 96K  of RAM: 54673 bytes
P350 ROM 3.8 with 64K  of RAM: Code didn't run
P350 ROM 3.8 with 96K  of RAM: 65398 bytes
P350 ROM 3.8 with 129K of RAM: 65398 bytes
So from these results it looks like the RAM size is fixed with the OS version (and the hardware the ROM s running on). There doesn't appear to be a routine in the ROMs that check s to see what the actual RAM size is.

The P350 values look a bit suspicious to me, as they are larger than the LZ64 values but don't seem to be as close to 96K as I was expecting, so maybe there's a bug in my code.
Now, I don't have a P350, could anyone with one check what value they get when they run the SPACE program, please?


User avatar
Posts: 128
Joined: Wed Jan 27, 2021 3:44 pm

Bank Switched RAM Sizes

Post by MartinReid »

Dear Andrew..

Unfortunately I don't have a POS350... But I did do some searching around and not wanting to 'teach mother to suck eggs' this is what I found, it may of may not be of any use..

Jaap has 'two' PSION Organiser ROM images for the POS350... does anything change? I notice there is no other ROM version 3.8 for any other model XP, LA or LZ......................POS350 32K 96K 2×16 Normal English ver 3.6 ver 3.8

Again I'm not sure if you have read this (or if it helps in any way) but the Republished Technical Reference Manual is easiy to search for POS350..

(on page 4)

VALUES: See below. (table)
The base model type and the special model type are held together in the model byte. The base model type is held in the bottom 3 bits of this byte and the special model type is a single bit set in the remaining 5 bits. The base model type is for identifying the ROM/RAM configuration AND the Operating System.
NOTE: The ROM/RAM configuration alone does not determine the base model type.

There is a table on page 4 of the republished technical reference manual

(and on page 37)

$0400-$7FFF are assigned to external RAM.
8,16 or 31 kbyte may be present, filled from $2000 up except for the 31 kbyte option which is from $0400 up.
The LZ64 has 63k. The RAM from $4000 to $7FFF is bank switched in 3 banks of 16k and the RAM below $4000 is fixed.
The POS350 has 95k. No technical information for the memory layout is available, but most likely the RAM from $4000 to $7FFF is bank switched in 5 banks of 16k and the RAM below $4000 is fixed.

Anyway hope it helps
Always sincere
Posts: 43
Joined: Sun Aug 22, 2021 6:56 am

Re: Bank Switched RAM Sizes

Post by amenjet »


I think I was vaguely aware of those memory locations. It's interesting that there's no 3.8 for anything else. I think this means that the code is hard wired to see a certain amount of RAM for each ROM version. Which is a bit of a shame. I saw some other information in the warm/cold start documentation that said the same sort of thing, only some RAM sizes are searched for. So you can't add RAM to a machine without swapping the ROM to one that supports it. Ah, I think that is the section of the manual you quoted.

I am bank switching the RAM in the location $4000-$7FFF and it seems to work for the LZ, I was just surprised to see a lot less than 96K when I tried the P350 ROM out. Maybe someone with a P350 can give me the amount of memory a real unit reports. That will tell me if my emulator is wrong somehow.

Post Reply