6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sat Nov 23, 2024 8:59 pm

All times are UTC




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: Proof reading memory map
PostPosted: Mon Oct 12, 2015 4:49 am 
Offline

Joined: Wed Mar 11, 2015 2:05 am
Posts: 11
Hello! If you guys could help me go through my memory decoding scheme to make sure I haven't done anything wrong that would be greatly appreciated :D
Chips:
3 - 2k ROM
3 - 2k RAM
1 - 6522 VIA
1 - 74LS139 2 to 4 decoder (two on the dip)
1 - 74LS138 3 to 8 decoder

Goal is to divide the address space in 8 chunks of 8k, and the first and last chunks into 4 2k each. The 3-8 decoder will enable the adequate side of the 2-4 decoder through it's enable lines (here marked Ea and Eb) which will
then enable the appropriate chip.

Image

Intended memory map:

Image

Sorry if I'm a little too hard to understand, this is my first attempt at this.


Top
 Profile  
Reply with quote  
PostPosted: Mon Oct 12, 2015 5:43 am 
Offline

Joined: Mon Mar 25, 2013 9:26 pm
Posts: 183
Location: Germany
Hello,

it would be good to have a schematic and the types of your ROM and RAM chips. Some of them have more then one chipselect line and this could make address decoding simpler.

Mario.

_________________
How should I know what I think, until I hear what I've said.


Top
 Profile  
Reply with quote  
PostPosted: Mon Oct 12, 2015 2:17 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 9:02 pm
Posts: 1748
Location: Sacramento, CA
I believe this is what yvibod is trying to describe

Attachment:
sch.jpg
sch.jpg [ 43.04 KiB | Viewed 1531 times ]

_________________
Please visit my website -> https://sbc.rictor.org/


Top
 Profile  
Reply with quote  
PostPosted: Mon Oct 12, 2015 4:09 pm 
Offline

Joined: Wed Mar 11, 2015 2:05 am
Posts: 11
8BIT wrote:
I believe this is what yvibod is trying to describe

Attachment:
sch.jpg


Wow, thank you for taking the time!

Here are the schematics on the chips:

ROM:
Image
Image

RAM:
Image
Image


Top
 Profile  
Reply with quote  
PostPosted: Mon Oct 12, 2015 7:04 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 9:02 pm
Posts: 1748
Location: Sacramento, CA
Happy to help.


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 13, 2015 6:49 pm 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3367
Location: Ontario, Canada
yvibod wrote:
this is my first attempt at this.
Looks like you've got a good grasp of the subject, yvibod. :) But it may be your circuit is more complex than necessary.

yvibod wrote:
Goal is to divide the address space in 8 chunks of 8k, and the first and last chunks into 4 2k each.

And your circuit maps the six 8k chunks in the middle to nothing. But is it an actual requirement to have nothing there (so there's plenty of room for future expansion perhaps)? If not, there's an alternative arrangement (below) which omits the '139 decoder and uses just a '138. Apologies, Daryl, for hacking your diagram! :D
Attachment:
sch mod-A.jpg
sch mod-A.jpg [ 17.06 KiB | Viewed 1480 times ]
It's A13, A12 and A11 that drive the '138 inputs, and that means each of the '138 outputs will span a 2K range. But A15 and A14 are "no connect" -- they are ignored. The resulting memory map looks roughly like this. (I didn't draw the whole thing.)
Attachment:
map mod-A.png
map mod-A.png [ 3.38 KiB | Viewed 1479 times ]
Notice that the 0 - $3FFF region is identical to the $4000 to $7FFF region. Although I didn't draw the whole thing, $8000-$BFFF is the also the same, and $C000-$FFFF too. It's the result of ignoring A15 and A14.

From a coding perspective, LDA $0000 (for example) has the same effect as LDA $4000 or LDA $8000 or LDA $C000. And LDA 1 is the same as $4001 and $8001 and $C001, and so on.

It's harmless to have all those aliases. The only drawback is if you want to add more devices in future. There's only a 2K space left available (at $1800 aka $5800 aka $9800 aka $D800).

Edit:
yvibod wrote:
Here are the schematics on the chips:
Re: the 6522 you'll need to connect the '138 output to 6522 /CS (pin 23), and tie the 6522 CS input (pin 24) high.

cheers,
Jeff

ps- here at 6502.org you can include images as attachments to your post. You'll find that more convenient than putting the images on a third-party site, and it also ensures the images will remain permanently available.

_________________
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html


Top
 Profile  
Reply with quote  
PostPosted: Wed Oct 14, 2015 11:56 pm 
Offline

Joined: Wed Mar 11, 2015 2:05 am
Posts: 11
Dr Jefyll wrote:
yvibod wrote:
this is my first attempt at this.
Looks like you've got a good grasp of the subject, yvibod. :) But it may be your circuit is more complex than necessary.

yvibod wrote:
Goal is to divide the address space in 8 chunks of 8k, and the first and last chunks into 4 2k each.

And your circuit maps the six 8k chunks in the middle to nothing. But is it an actual requirement to have nothing there (so there's plenty of room for future expansion perhaps)? If not, there's an alternative arrangement (below) which omits the '139 decoder and uses just a '138. Apologies, Daryl, for hacking your diagram! :D
Attachment:
sch mod-A.jpg
It's A13, A12 and A11 that drive the '138 inputs, and that means each of the '138 outputs will span a 2K range. But A15 and A14 are "no connect" -- they are ignored. The resulting memory map looks roughly like this. (I didn't draw the whole thing.)
Attachment:
map mod-A.png
Notice that the 0 - $3FFF region is identical to the $4000 to $7FFF region. Although I didn't draw the whole thing, $8000-$BFFF is the also the same, and $C000-$FFFF too. It's the result of ignoring A15 and A14.

From a coding perspective, LDA $0000 (for example) has the same effect as LDA $4000 or LDA $8000 or LDA $C000. And LDA 1 is the same as $4001 and $8001 and $C001, and so on.

It's harmless to have all those aliases. The only drawback is if you want to add more devices in future. There's only a 2K space left available (at $1800 aka $5800 aka $9800 aka $D800).

Edit:
yvibod wrote:
Here are the schematics on the chips:
Re: the 6522 you'll need to connect the '138 output to 6522 /CS (pin 23), and tie the 6522 CS input (pin 24) high.

cheers,
Jeff

ps- here at 6502.org you can include images as attachments to your post. You'll find that more convenient than putting the images on a third-party site, and it also ensures the images will remain permanently available.


That's way simpler! Specially because I'm going to hand solder the thing this is very cool, Thank you for taking the time!


Top
 Profile  
Reply with quote  
PostPosted: Thu Oct 15, 2015 3:58 am 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3367
Location: Ontario, Canada
You're welcome. Just recently we were discussing something similar, BTW -- a project using 6503, which can't connect to the upper address pins because the 6503 doesn't have any upper address pins!

Good luck, and keep us posted.

_________________
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 44 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: