Mouser sells the CY62148ESL-55ZAXI SRAM chips for
5.74€ or 7.28€ apiece in singles. Mouser component search is better than LCSC's, and I started with
this search, picking the low power (LP) ones. You can find many of them at LCSC, I just didn't bother.
I use address 0 to 14 all the time but for a15 16 17 18 would be either 0 or 1... which gives different total address each time? 4 pins (15 to 18) would mean 4x4 = 16 banks, and the output is already 8 bits which means directly compatible.
Yes. Specifically, you'd put a pull-up resistor from each of the A15, A16, A17, A18 pins to 5V, maybe as high as 1MΩ each? And also connect them to the four wiper pins of a 16-position absolute encoder like
Bourns PAC18R1-33D28F, and the fifth pin to GND.
This way, the other pins of the SRAM chip work exactly like LH52256, but the rotary encoder selects which one of the 16 "banks" the N16 sees.
In reality, each "bank" is just a different 32k range within the 512k range the SRAM supports.
Another possibility would be to use a small microcontroller, for example a dirt cheap
ATTiny404 (that you can program with an UPDI programmer using your freestanding C/C++ code developed in the PlatformIO environment), powered from the 5V supply line, with four of the microcontroller pins connected to the SRAM A15, A16, A17, A18 pins.
so for example, setting [A15, A16, A17, A18] to 0 would give me an address, let's call it memory card 1. setting a15 to 1 and others to 0 would give me another address called memory card 2...etc?
Yes, exactly.
The "trick" is that an absolute rotary encoder would let you do that directly, just by rotating the knob.
would the target device see it as it should be? a 32kx8 single pak for each address configuration?
Yes.
The other option would be to use a microcontroller with at least 4 output pins and 1 input pin. The output pins would be connected to the A15..A18 pins on the SRAM, but also to gates of four N-channel MOSFETS (like BSS138, NX138AKR, etc.). Each MOSFET source is to ground, and drain is connected to the cathode of a LED. Each LED anode is connected to a suitable current-limiting resistor, say 1kΩ, and that to the 5V. The input pin is connected to a tiny tactile button, the other side of the button connected to ground (or 5V). The internal pull-up (or pull-down) is enabled for that pin.
The microcontroller would be programmed to switch to the next bank when the button is pressed, rotating through the 16 banks. The four LEDs would show the currently selected bank as a binary pattern. (You might wish to add a fifth LED and a resistor between 5V and ground, so that it lights up whenever the pak has power.)
If you use a binary counter like 74HC393 instead of a microcontroller, make sure you have a low-pass (debouncing) filter on the button connected to the clock input. Otherwise a single press may jump multiple banks.
As to the battery, I haven't thought about exactly what kind of circuit is needed. A simple (Schottky) diode would protect the battery from being backfed by 5V whenever it is connected and powered on; but something like a MOSFET that would disconnect the 5V line when no 5V power is present, and disconnect the battery when 5V is present, would reduce the load on the battery through the pull-up/pull-down resistors, and ensure the battery would not try to power the microcontroller/counter if one is used.
still expensive and won't fit inside i guess
Expensive? I count less than 10€ in parts, either way. If you or a friend has a 3D printer, you could print a custom enclosure, too.