6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sun Nov 24, 2024 5:55 am

All times are UTC




Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Configurable memory map
PostPosted: Thu Jan 12, 2023 7:57 pm 
Offline

Joined: Fri Mar 18, 2022 6:33 pm
Posts: 491
Forum member Michael has often posted about his idea for a jumper-configurable memory map. For example:

http://forum.6502.org/download/file.php?id=9128&mode=view

This seems like a cool idea to me, but no one ever seems to take him up on it. I was thinking I might try it; that way if I decide I don't like my I/O in Zero Page, I can just relocate it with a couple of jumpers! :) However, Michael's moveable-IO-space window is always at least 1 page in size. Suppose I wanted the option of a smaller (128 byte) IO space. Wouldn't this get the job done?

Attachment:
20230112_145602.jpg
20230112_145602.jpg [ 3.2 MiB | Viewed 963 times ]

_________________
"The key is not to let the hardware sense any fear." - Radical Brad


Top
 Profile  
Reply with quote  
PostPosted: Thu Jan 12, 2023 8:24 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8514
Location: Midwestern USA
Paganini wrote:
Forum member Michael has often posted about his idea for a jumper-configurable memory map...

I’ve not looked much at this...color schematics are a challenge for me to read.

Quote:
This seems like a cool idea to me, but no one ever seems to take him up on it.

Just to be devil’s advocate, you can achieve pretty much the same thing with a 22V10C or an ATF1504AS and change your memory map with a few keystrokes. The 1504 is attractive because it may be programmed in situ via a JTAG port.

Quote:
However, Michael's moveable-IO-space window is always at least 1 page in size. Suppose I wanted the option of a smaller (128 byte) IO space. Wouldn't this get the job done?

You can make your decoding as granular as you want, as long as you are willing to tolerate the buildup of propagation delay. In this regard, programmable logic makes it easier to produce small I/O windows without being clobbered by excessive prop time.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
PostPosted: Fri Jan 13, 2023 2:38 am 
Offline
User avatar

Joined: Tue Mar 05, 2013 4:31 am
Posts: 1385
I would also second BDD's suggestion on using programmable logic, as it will simplify the overall design, eliminate 2 or more chips and give you a much more flexible solution that can be easily changed.

I'm using the ATF22V10 as a single glue logic on my C02 Pocket SBC. The configuration allows for clock qualified read and write signals, RAM and ROM chip selects and 5- I/O selects that are 32-bytes wide each. You can also get a 5V part with a 7ns rating, so they are quite fast.

Regarding memory maps... I've been using the same one for decades with the 6502 (now 65C02). I always put the I/O in page $FE. As the 65(C)02 requires some ROM type memory to kick it off at the hardware vectors, I can keep ROM and I/O in a very small upper memory range. This allows a larger contiguous RAM address which can be quite useful... but again, it all depends on what you're planning on doing with your system.

_________________
Regards, KM
https://github.com/floobydust


Top
 Profile  
Reply with quote  
PostPosted: Fri Jan 13, 2023 7:41 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
Context is everything - I believe Michael's suggestions are not about GALs, they are about using 74 series logic. Whether one uses one technology or another is often a personal preference.

For example
Michael wrote:
May I showcase another decoder + glue logic method for inserting an I/O page almost anywhere into address space with ROM above and RAM below? I like it better than a GAL based solution because it's jumper configurable (no GAL programmer required) while providing several I/O strobes and qualified Read and Write strobes for memory and non-6500 peripheral ICs.


Edit: Here's another previous post from Michael.


Top
 Profile  
Reply with quote  
PostPosted: Fri Jan 13, 2023 8:08 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
It would be great if we could address ourselves to Paganini's question:

Paganini wrote:
However, Michael's moveable-IO-space window is always at least 1 page in size. Suppose I wanted the option of a smaller (128 byte) IO space. Wouldn't this get the job done?


Top
 Profile  
Reply with quote  
PostPosted: Fri Jan 13, 2023 11:46 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8546
Location: Southern California
Paganini wrote:
Suppose I wanted the option of a smaller (128-byte) IO space.

You could go further and merge ZP and page 1, by making it so if A9...A15 are all 0's, A8 gets ignored and also replaced with a 0, so $100-$1FF becomes a duplicate of 00-$FF, making the hardware stack addressable in page 0 also, opening up ZP addressing modes for it.  Then you could, for example, use TSX, ADC(5,X) to add the contents of an address pointed to by a byte pair in a stack frame passed to the currently executing subroutine.  There would be no hard boundary between ZP and page 1; so for example if your I/O takes 00-$3F, and you know that your hardware stack needs will be adequately met with $30 bytes (addresses $1D0 to $1FF, now same as $D0 to $FF), it would leave you with $90 bytes of normal usable ZP space, ie, more than half a page.

Quote:
Wouldn't this get the job done?

I don't see anything wrong with it (after using the threshold function in the free gimp software as shown here):
Attachment:
Paganini.gif
Paganini.gif [ 36.78 KiB | Viewed 850 times ]

Note however that the '521 is the same thing as the '688 and is available in faster variations.  Can you explain your intention regarding the A7...A14 to the right of the B inputs of the '688.

_________________
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  
PostPosted: Fri Jan 13, 2023 3:57 pm 
Offline
User avatar

Joined: Wed Feb 13, 2013 1:38 pm
Posts: 589
Location: Michigan, USA
BigDumbDinosaur wrote:
Paganini wrote:
Forum member Michael has often posted about his idea for a jumper-configurable memory map...

I’ve not looked much at this...color schematics are a challenge for me to read.

Would an on-line image converter or something similar be of any help to you, Sir?

Cheerful regards, Mike, K8LH (Michigan, USA)

Attachment:
temp2-ConvertImage.png
temp2-ConvertImage.png [ 74.08 KiB | Viewed 823 times ]
Attachment:
temp2.png
temp2.png [ 171.89 KiB | Viewed 823 times ]


Top
 Profile  
Reply with quote  
PostPosted: Fri Jan 13, 2023 4:56 pm 
Offline

Joined: Fri Mar 18, 2022 6:33 pm
Posts: 491
floobydust wrote:
I would also second BDD's suggestion on using programmable logic, as it will simplify the overall design, eliminate 2 or more chips and give you a much more flexible solution that can be easily changed.


I would like to see this amazing quantum glue logic that can be implemented with *zero or fewer* chips! Your kung fu must indeed be powerful. Maybe we can sell the chips generated by the "or fewer" version and make a profit. (Or maybe that's where all those sketchy Ali Express logic ICs already come from!)

:P

GARTHWILSON wrote:
You could go further and merge ZP and page 1, by making it so if A9...A15 are all 0's, A8 gets ignored and also replaced with a 0, so $100-$1FF becomes a duplicate of 00-$FF, making the hardware stack addressable in page 0 also, opening up ZP addressing modes for it. Then you could, for example, use TSX, ADC(5,X) to add the contents of an address pointed to by a byte pair in a stack frame passed to the currently executing subroutine. There would be no hard boundary between ZP and page 1; so for example if your I/O takes 00-$3F, and you know that your hardware stack needs will be adequately met with $30 bytes (addresses $1D0 to $1FF, now same as $D0 to $FF), it would leave you with $90 bytes of normal usable ZP space, ie, more than half a page.


I will have to think about this for a while to really get a grasp of how to do it, but I think it sounds amazingly cool. :D

GARTHWILSON wrote:
Can you explain your intention regarding the A7...A14 to the right of the B inputs of the '688.


Each Q input is pulled low through resistors, by default. You can use a jumper to short it either to VCC (to move the window around in address space), or to the corresponding P input address line so that P=Q will always be true for that line, effectively shrinking the width of the comparator. The notion is that you can double the size of the window each time you de-activate the next low-order bit.

I suppose you might be able to do interesting things by removing random upper address lines from the mix, but I can't visualize what would happen; I think it would start mirroring the window, wouldn't it?

Edit:

GARTHWILSON wrote:
Note however that the '521 is the same thing as the '688 and is available in faster variations.


BTW, I did read that in the Primer, and I looked for them when I went "comparator shopping." HC and AHC don't seem to exist on Mouser / Digikey, and AC is listed as "obsolete, non stocked" on Digikey. I see now they have them in F and ALS. I am uncertain about mixing logic families.

_________________
"The key is not to let the hardware sense any fear." - Radical Brad


Last edited by Paganini on Fri Jan 13, 2023 5:21 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
PostPosted: Fri Jan 13, 2023 5:17 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
Quote:
However, Michael's moveable-IO-space window is always at least 1 page in size. Suppose I wanted the option of a smaller (128 byte) IO space. Wouldn't this get the job done?


Yes, Paganini, I think you're on the right lines. You're using Michael's scheme but squeezing in an extra bit of decode by using the enable input: you've called it Gbar, Michael called it OEbar, and elsewhere I see it as E (active low). It took me a little thinking to understand what Michael is doing with the size and address jumpers, but it did become clear. (It would be good if you could link to the post where he shared that attachment - I haven't been able to find it.)

The only caveat I would have is that I haven't checked the logic for whether everything is the right logic sense - it's easy to miss an inversion here or there.


Top
 Profile  
Reply with quote  
PostPosted: Fri Jan 13, 2023 6:06 pm 
Offline

Joined: Fri Mar 18, 2022 6:33 pm
Posts: 491
Here you go Ed:

viewtopic.php?f=4&t=7347&start=15#p95827

(Sorry, took longer than I meant. I got sidetracked because I discovered more interesting old threads I hadn't previously read. :) )

_________________
"The key is not to let the hardware sense any fear." - Radical Brad


Top
 Profile  
Reply with quote  
PostPosted: Fri Jan 13, 2023 6:21 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
Thanks! There is a great deal of accumulated experience in the back catalogue... the dusty old threads.


Top
 Profile  
Reply with quote  
PostPosted: Fri Jan 13, 2023 6:34 pm 
Offline
User avatar

Joined: Wed Feb 13, 2013 1:38 pm
Posts: 589
Location: Michigan, USA
Unfortunately, that post doesn't really explain how the jumpers work. I was trying to come up with a relatively intuitive method to set size and address. Basically, you fill in jumpers across the {size} rows in each column from right to left to set the size of the block. So four jumpers across the {size} rows in the A8, A9, A10, and A11 columns would set the size to 4096 bytes. The remaining columns, A15 through A12, are used to set the block address which in this case can be $0XXX, $1XXX, $2XXX, $3XXX... $FXXX. A jumper placed across the {addr} rows in a particular column represents a '1' while the absence of a jumper represents a '0'.


Top
 Profile  
Reply with quote  
PostPosted: Fri Jan 13, 2023 8:13 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8546
Location: Southern California
Paganini wrote:
GARTHWILSON wrote:
Can you explain your intention regarding the A7...A14 to the right of the B inputs of the '688.


Each Q input is pulled low through resistors, by default. You can use a jumper to short it either to VCC (to move the window around in address space), or to the corresponding P input address line so that P=Q will always be true for that line, effectively shrinking the width of the comparator. The notion is that you can double the size of the window each time you de-activate the next low-order bit.

Ok, so changing the size of the window.  Each 4.7K resistor will take a milliamp when pulled up to Vcc or pulled up by an address line.  That's kind of heavy.  On CMOS inputs, you can make the resistors much higher, like 47K.  Someone might be concerned with noise; but especially if the jumper block is nearby, meaning the lines to it are short, there's no concern for noise pick-up.  Some logic can't pull up as hard as down; so you might do better to make the resistors pull to Vcc, and if you want the line permanently low, use the jumper to bring it to ground, or another jumper to connect it to an address line.

Quote:
GARTHWILSON wrote:
Note however that the '521 is the same thing as the '688 and is available in faster variations.

BTW, I did read that in the Primer, and I looked for them when I went "comparator shopping." HC and AHC don't seem to exist on Mouser / Digikey, and AC is listed as "obsolete, non stocked" on Digikey. I see now they have them in F and ALS. I am uncertain about mixing logic families.

In the latest thing I'm working on, I'm using the Harris CD74FCT521DTM which has a maximum delay of 4.2ns, with a strong pull-up for interfacing to subsequent CMOS inputs.  Most of the time, the output will be high, so the pull-up resistor is not taking any current.

_________________
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  
PostPosted: Fri Jan 13, 2023 8:21 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
I notice Michael's original does use 47k - it's Paganini's version which has 4k7. That's the sort of thing I didn't check at all!


Top
 Profile  
Reply with quote  
PostPosted: Fri Jan 13, 2023 8:54 pm 
Offline

Joined: Fri Apr 15, 2022 1:56 pm
Posts: 47
Location: San Antonio, TX, USA
Michael wrote:
Would an on-line image converter or something similar be of any help ...
Another perhaps simpler possibility if using Windows 10/11 is the "Color filters" system setting which can render the whole screen in greyscale and can be turned on/off with a shortcut key if so enabled:
Attachment:
Windows color filter.png
Windows color filter.png [ 805.5 KiB | Viewed 774 times ]


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 55 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: