Work-around for expanding program memory on the BS2
achilles03
Posts: 247
We all know the eeprom can't be expanded beyond it's current 2k, but as a thought exersize, I was wondering if this is possible... Could a program be written on the BS2 that would access tokenized instructions on another eeprom, write them on the BS2's eeprom, and then have a GOTO or GOSUB command that would go to the beginning address of those new instructions? After completing the instructions, the BS2 could go back to retreiving and re-writing the next set of tokenized commands from an external eeprom...
Would this work?
Dave
Would this work?
Dave
Comments
The reason is that the tokens aren't stored sequentially.
At the highest part of the address space is some sort of jump table which must match up with certain parts of your program.
(All kinds of jumps)
The only way to expand the memory is to use the BS2p and BS2pe models
There, though, there's nothing stopping you from overwriting a bank with tokens stored on an external EEPROM or any other storage device you want, then use the RUN command to execute that code.
The BS2e and BS2sx, while they also have MultiBank functions, won't allow you to read and write to other banks than the one your program is currently running in.
It's a nice thought exercise, but here's another...
How do you manage to fill the program space of an BS2p or BS2pe?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
--==<{Chris}>==--
I had to give some long thought as to what i had to OMIT function wise, because i simply could not fit it on a bsp.
Each bank is almost full, and i am still looking at ways to consolidate some of the code to sqeeze in a little more. It depends on the application and the devices that are interfaced, some require more space for code. Part of the problem is variable space, only so much per program bank, then have to move to a new one to basically do the same thing.
kelvin
As for program code, sometimes I see people writing code like:
When the same block of code could've been done with:
For beginners, the first block of code may be easier to understand, and some would recommend that, but once you're filling the memory up it's time to start learning to streamline your code a little.· If you posted some of it, you might get some feedback on how to go about doing this.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
--==<{Chris}>==--
Anyway Chris, i see that you are into the music/amplification thing. I have been in and out of the scene for the past 30 years, and have enjoyed every minute of it. Actually, i have an old Ampeg VT22 amp right beside me, 100 watts of real tube power, one of the original models released. Maybe a stamp equalizer control for it ?
kelvin
And the bank switching routines you're using wouldn't hurt, either.
heck, post everything and let us take a peek...
(But make certain it's stuffed full of comments and explanations)
we might be able to spot something.
·· I'm sorry my recommendations didn't help.· One more that I was going to offer you, you appear to have already tried (Placing the serial statements and such in sub-routines).
·· As for the audio/music stuff...Yes, I used to build Audio/Video controllers/switches using 6502 or Z80 CPUs to control it.· Of course, back then there were no easy solutions.· Most of the chips that could do most of the work were very complicated to interface to and control.
·· Later there seemed to be a slew of I2C & 1-Wire chips for Audio/Video, but many were discontinued, I think because they catered to the hobbyist, and not production (Maybe cost?).· I still see a few things around, but it's been slow lately.· I actually broke down and bought an amplifier for the DJ Business about 6 months ago because I didn't have time to wait until I could get a suitable one constructed.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
--==<{Chris}>==--