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

All times are UTC




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Memory map
PostPosted: Fri Jul 26, 2013 10:23 pm 
Offline
User avatar

Joined: Wed Jul 10, 2013 3:13 pm
Posts: 67
I've got questions everywhere, but if I build a 6502 how would I know what the memory locations of things such as RAM ROM, a 6551 ACIA. All this is important, but how do I know the memory locations for them

_________________
JMP $FFD2


Top
 Profile  
Reply with quote  
 Post subject: Re: Memory map
PostPosted: Fri Jul 26, 2013 10:29 pm 
Offline

Joined: Sat Dec 13, 2003 3:37 pm
Posts: 1004
Have you gone through all of these? : http://wilsonminesco.com/6502primer/

These should answer a lot of your questions.

As for this question specifically, the ROM, RAM, and I/O addresses are whatever you make them to be - it's part of the address decoding logic.


Top
 Profile  
Reply with quote  
 Post subject: Re: Memory map
PostPosted: Fri Jul 26, 2013 10:38 pm 
Offline
User avatar

Joined: Tue Mar 02, 2004 8:55 am
Posts: 996
Location: Berkshire, UK
Power on reset and interrupts are 'vectored' through addresses at the top of memory ($FFFA-$FFFF) so you normally design your address decoding for ROM to place it high up in memory (say $F000-$FFFF for a 4K ROM). The zero-page and indirect addressing modes need RAM at $0000-$00FF and the stack is fixed at $0100-$01FF so you need a RAM chip to appear low down in memory (say $0000-$7FFF for a 32K RAM). 6502 peripheral chips (ACIAs, VIAs, PIA, etc.) can be assigned to any memory area in between. Often people put all the peripherals on a single page on 16 byte boundaries to make the decoding easier.

_________________
Andrew Jacobs
6502 & PIC Stuff - http://www.obelisk.me.uk/
Cross-Platform 6502/65C02/65816 Macro Assembler - http://www.obelisk.me.uk/dev65/
Open Source Projects - https://github.com/andrew-jacobs


Top
 Profile  
Reply with quote  
 Post subject: Re: Memory map
PostPosted: Fri Jul 26, 2013 10:46 pm 
Offline
User avatar

Joined: Wed Jul 10, 2013 3:13 pm
Posts: 67
I looked at one thing but it was for high rom and ram I only need 4k rom

_________________
JMP $FFD2


Top
 Profile  
Reply with quote  
 Post subject: Re: Memory map
PostPosted: Fri Jul 26, 2013 11:22 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8546
Location: Southern California
James_Parsons wrote:
I've got questions everywhere, but if I build a 6502 how would I know what the memory locations of things such as RAM ROM, a 6551 ACIA. All this is important, but how do I know the memory locations for them
< . . . >
I looked at one thing but it was for high rom and ram I only need 4k rom

If you truly are going to use only 4K of ROM, it will be at $F000-FFFF, even if that means leaving a lot of space between used sections of the memory map. That's because $FFFA-FFFF normally have to be ROM because of the vectors. That's where the processor expects to find them. That's not to say you have to decode all the address bits. If you don't, there will be parts of RAM or ROM or I/O that are mirrored in other parts of the memory map; but there's nothing wrong with that.

_________________
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?


Top
 Profile  
Reply with quote  
 Post subject: Re: Memory map
PostPosted: Fri Jul 26, 2013 11:26 pm 
Offline
User avatar

Joined: Wed Jul 10, 2013 3:13 pm
Posts: 67
cool is it definite the location of 32k of ram my system will operate mostly off the ram

_________________
JMP $FFD2


Top
 Profile  
Reply with quote  
 Post subject: Re: Memory map
PostPosted: Fri Jul 26, 2013 11:34 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8546
Location: Southern California
James_Parsons wrote:
cool is it definite the location of 32k of ram my system will operate mostly off the ram

So you're using the second diagram at http://wilsonminesco.com/6502primer/addr_decoding.html then?

You won't really save any money or anything using a 4Kx8 ROM instead of 16Kx8, so you might as well go for the bigger one. There may be more program material you'll decide to put in it later, stuff that's stable and you need over and over so you won't want to keep re-loading it into RAM.

_________________
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?


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

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 58 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: