RAM installed for BLK5. How can I write to it?

Modding and Technical Issues

Moderator: Moderators

unebonnevie
Vic 20 Drifter
Posts: 35
Joined: Sat Oct 11, 2014 3:25 pm

RAM installed for BLK5. How can I write to it?

Post by unebonnevie »

Hi,

If i have RAM installed for BLK5, starting with $A000 address, which is the address for ROM. How would I tell the VIC-20 so that I am able to write to it?

Thanks!
User avatar
Mike
Herr VC
Posts: 5134
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: RAM installed for BLK5. How can I write to it?

Post by Mike »

unebonnevie wrote:If i have RAM installed for BLK5, starting with $A000 address, which is the address for ROM.
What makes you think, that a chip connected to the /BLK5 select line on the expansion port "has" to be a ROM?
How would I tell the VIC-20 so that I am able to write to it?
If this is a RAM chip, you'd additionally connect the VR/W line to it. And then you can read and write as well.

As this address range is not contiguous to the memory range normally used for BASIC programs (+variables), adding RAM in BLK5 will not increase the available memory displayed in the start up message.

You can however move the entire space for BASIC programs *into* BLK5 - getting 8191 BYTES FREE - with:

POKE642,160:POKE644,192:SYS64818
User avatar
eslapion
ultimate expander
Posts: 5037
Joined: Fri Jun 23, 2006 7:50 pm
Location: Canada
Occupation: 8bit addict

Re: RAM installed for BLK5. How can I write to it?

Post by eslapion »

BLK 5 is an expansion area - its not specifically for RAM or ROM. Its just not available to BASIC.

You don't have to "tell" the VIC-20 that you are able to write to it. If you connected RAM there, you just write to it... that's all.
Be normal.
unebonnevie
Vic 20 Drifter
Posts: 35
Joined: Sat Oct 11, 2014 3:25 pm

Re: RAM installed for BLK5. How can I write to it?

Post by unebonnevie »

Mike wrote:
unebonnevie wrote:If i have RAM installed for BLK5, starting with $A000 address, which is the address for ROM.
What makes you think, that a chip connected to the /BLK5 select line on the expansion port "has" to be a ROM?
How would I tell the VIC-20 so that I am able to write to it?
If this is a RAM chip, you'd additionally connect the VR/W line to it. And then you can read and write as well.

As this address range is not contiguous to the memory range normally used for BASIC programs (+variables), adding RAM in BLK5 will not increase the available memory displayed in the start up message.

You can however move the entire space for BASIC programs *into* BLK5 - getting 8191 BYTES FREE - with:

POKE642,160:POKE644,192:SYS64818
Mike, I assume SYS64818 is the soft reset, so that I can see the "CBM" bootup screen? And "VR/W"...I think you meant the "CR/W" signal, because the "VR/W" is to the VIC video chip, no?
User avatar
Mike
Herr VC
Posts: 5134
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: RAM installed for BLK5. How can I write to it?

Post by Mike »

unebonnevie wrote:Mike, I assume SYS64818 is the soft reset, so that I can see the "CBM" bootup screen?
Yes. The POKEs to 642 and 644 change the limits that are normally 'measured' by the RAM check, but which - incidentally - is left out when SYSing to 64818.
And "VR/W"...I think you meant the "CR/W" signal, because the "VR/W" is to the VIC video chip, no?
*No* *I* *meant* *VR/W*.
unebonnevie
Vic 20 Drifter
Posts: 35
Joined: Sat Oct 11, 2014 3:25 pm

Re: RAM installed for BLK5. How can I write to it?

Post by unebonnevie »

And "VR/W"...I think you meant the "CR/W" signal, because the "VR/W" is to the VIC video chip, no?
*No* *I* *meant* *VR/W*.
Could you please explain why it's "VR/W" signal? How would the signal to read/write the VIC video chip is related to BLK5? So, I would have to connect the CR/W AND the VR/W signals to the RAM chip's R/W pin?
unebonnevie
Vic 20 Drifter
Posts: 35
Joined: Sat Oct 11, 2014 3:25 pm

Re: RAM installed for BLK5. How can I write to it?

Post by unebonnevie »

unebonnevie wrote:
And "VR/W"...I think you meant the "CR/W" signal, because the "VR/W" is to the VIC video chip, no?
*No* *I* *meant* *VR/W*.
Could you explain why it's "VR/W" signal? How would the signal to read/write the VIC video chip is related to BLK5? So, I would have to connect the CR/W AND the VR/W signals to the RAM chip's R/W pin?
Never mind. I found http://sleepingelephant.com/ipw-web/bul ... php?t=7192.
Last edited by unebonnevie on Sat Aug 01, 2015 5:50 pm, edited 1 time in total.
User avatar
Mike
Herr VC
Posts: 5134
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: RAM installed for BLK5. How can I write to it?

Post by Mike »

@mods: Could one of you please move this thread to the Hardware section?
unebonnevie
Vic 20 Drifter
Posts: 35
Joined: Sat Oct 11, 2014 3:25 pm

Re: RAM installed for BLK5. How can I write to it?

Post by unebonnevie »

And "VR/W"...I think you meant the "CR/W" signal, because the "VR/W" is to the VIC video chip, no?
*No* *I* *meant* *VR/W*.
Does not work at all for some reason. I short out the signal from CR/W, which is connected to /WE of the SRAM chip and does work with 24KB of /BLK1,2,3 enabled, and connected the VR/W signal to /WE but no expansion RAM shown for the bootup screen. Same problem with BOTH CR/W and VR/W signals connected to the /WE pin of the SRAM chip. ONLY with the CR/W signal connected to the /WE of the SRAM chip works with 24KB but /BLK5, although enabled, can't be written; I tested by poking a value into $A000 but always get some junk value when doing a PEEK.
unebonnevie
Vic 20 Drifter
Posts: 35
Joined: Sat Oct 11, 2014 3:25 pm

Re: RAM installed for BLK5. How can I write to it?

Post by unebonnevie »

And "VR/W"...I think you meant the "CR/W" signal, because the "VR/W" is to the VIC video chip, no?
*No* *I* *meant* *VR/W*.
Does not work at all for some reason. I short out the signal from CR/W, which is connected to /WE of the SRAM chip and does work with 24KB of /BLK1,2,3 enabled, and connected the VR/W signal to /WE but no expansion RAM shown for the bootup screen. Same problem with BOTH CR/W and VR/W signals connected to the /WE pin of the SRAM chip. ONLY with the CR/W signal connected to the /WE of the SRAM chip works with 24KB but /BLK5, although enabled, can't be written; I tested by poking a value into $A000 but always get some junk value when doing a PEEK.
User avatar
eslapion
ultimate expander
Posts: 5037
Joined: Fri Jun 23, 2006 7:50 pm
Location: Canada
Occupation: 8bit addict

Re: RAM installed for BLK5. How can I write to it?

Post by eslapion »

All RAM expansions I have ever made use pin 17 -> VR/W

Pin 18 is unbuffered and will cause problems. If you look closely at the board for VIC-1110 and VIC-1111 ram expansions, they also use pin 17.
Be normal.
User avatar
Mike
Herr VC
Posts: 5134
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: RAM installed for BLK5. How can I write to it?

Post by Mike »

unebonnevie,

please check out the schematics of the VIC-20:

- /BLK5 is handled exactly the same way as the other /BLKx signals (and /RAMx)!
- All external select signals go to the '133 (13-input NAND gate) that signals the '245 on the data bus to separate the CDx and BDx lines.
- All internal RAM chips are selected over /RAM0 and /RAM4..7 from UC4, and their /WE pin is connected to VR/W.

You don't tell, what logic you use to drive the 32K SRAM from the four /BLKx signals: my bet is you took the equations from some other thread here in Denial, but mixed them up, and now /BLK5 either doesn't select the RAM chip at all or produces the same "A13"/"A14" signal as for another BLK, which doesn't give an acceptable result either as then you get mirrored contents and an unused quarter of the SRAM.

And, WTF made you think it would be any good to *connect* CR/W and VR/W?
unebonnevie
Vic 20 Drifter
Posts: 35
Joined: Sat Oct 11, 2014 3:25 pm

Re: RAM installed for BLK5. How can I write to it?

Post by unebonnevie »

Mike wrote: And, WTF made you think it would be any good to *connect* CR/W and VR/W?
Easy there...You think you know everything about the VIC20 with an attitude, huh? Get a life dude. Seems like you've promoted yourself with tons of posts that frankly people don't care of your answers. People like you, who I have seen too often at work, are either loners and/or with failed marriage(s) or have anger issue or just not mature enough or lack of social skills. Or maybe you got bullied as a child and now taking on people verbally :x
Last edited by unebonnevie on Sat Aug 01, 2015 5:58 pm, edited 5 times in total.
unebonnevie
Vic 20 Drifter
Posts: 35
Joined: Sat Oct 11, 2014 3:25 pm

Re: RAM installed for BLK5. How can I write to it?

Post by unebonnevie »

eslapion wrote:All RAM expansions I have ever made use pin 17 -> VR/W

Pin 18 is unbuffered and will cause problems. If you look closely at the board for VIC-1110 and VIC-1111 ram expansions, they also use pin 17.
Thanks, eslapion for the tip.
User avatar
Mayhem
High Bidder
Posts: 3007
Joined: Mon May 24, 2004 7:03 am
Website: http://www.mayhem64.co.uk
Location: London

Re: RAM installed for BLK5. How can I write to it?

Post by Mayhem »

unebonnevie wrote:Easy there...You think you know everything about the VIC20 with an attitude, huh? Get a life dude. Seems like you've promoted yourself with tons of posts that frankly people don't care of your answers. People like you, who I have seen too often at work, are either loners and/or with failed marriage(s) or have anger issue or just not mature enough or lack of social skills. Or maybe you got bullied as a child and now taking on people verbally :x
Now calm down there. Mike's been here a long time, and has certainly proven his knowledge on the Vic20 in a lot of ways over the years, so I would personally trust what he says. Obviously not everyone will. I'd at least consider what he says, and double check that you are not incorrect.
Lie with passion and be forever damned...
Post Reply