6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sun Nov 24, 2024 1:22 pm

All times are UTC




Post new topic Reply to topic  [ 7 posts ] 
Author Message
PostPosted: Wed Oct 27, 2021 7:55 pm 
Offline
User avatar

Joined: Mon May 25, 2015 2:25 pm
Posts: 693
Location: Gillies, Ontario, Canada
In a recent thread regarding a minimal ROM programmer, my mind began to wander to past 6502 projects I have done, some of them a little far fetched from the "norm". I didn't want to wander off topic on the other thread, so here is a very strange ROMless system I once made work.

Just wondering if anyone else tried this very bizarre scheme...

I had a 6502 running from a single 16K SRAM and no other ROM / RAM on the bus.
The 16K sram was mapped to the first 14 address lines.
On start, the SRAM is boot loaded with the code to run.
My IO was on address line 14.

Seems normal enough except when you consider the boot vectors!

What I did was connect address line 15 to the CE on the SRAM so it was disabled when the 6502 address the last segment of memory.
I also used weak pulldowns on the data bus so that data would read 0 when looking for the boot vectors.
This pointed the start of code to address zero, where I then had a jump out of zero page to my actual code.

Since the SRAM is loaded on boot, this worked perfectly and required no other components for an address decode scheme.
Probably seems pointless, but in my system it kept speed high and parts count low.

Brad


Top
 Profile  
Reply with quote  
PostPosted: Wed Oct 27, 2021 10:49 pm 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3367
Location: Ontario, Canada
I like it! :)

However, I'm curious about the speed being kept high. I'm sure the pulldowns worked, but would they pull the bus low as rapidly as the RAM or IO would do? It seems to me the slowness of the pulldowns might limit your maximum clock rate. If I were in your situation (and assuming it's a WDC CPU being used) I think I'd replace the pulldowns with diodes, whose cathodes I'd attach to the VPB pin.

On the topic of unexpected approaches for ROMless systems, I hope you've seen my thread, Ultra-minimal 3-wire Interface boots up 65xx CPU's! (It's not a replacement for what you've done -- just something conceived in a perhaps similar spirit!)

-- Jeff

_________________
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 27, 2021 11:19 pm 
Offline
User avatar

Joined: Mon May 25, 2015 2:25 pm
Posts: 693
Location: Gillies, Ontario, Canada
That was a good read! Very out of the box thinking indeed.
Did you ever verify it in a prototype?

I am shacked up in a lodge at Kitchenuhmaykoosib Inninuwug right now for a school I.T. job I am on, so this forum is keeping me sane!
And yep, I did spell that from memory.

Brad

Dr Jefyll wrote:
I like it! :)

However, I'm curious about the speed being kept high. I'm sure the pulldowns worked, but would they pull the bus low as rapidly as the RAM or IO would do? It seems to me the slowness of the pulldowns might limit your maximum clock rate. If I were in your situation (and assuming it's a WDC CPU being used) I think I'd replace the pulldowns with diodes, whose cathodes I'd attach to the VPB pin.

On the topic of unexpected approaches for ROMless systems, I hope you've seen my thread, Ultra-minimal 3-wire Interface boots up 65xx CPU's! (It's not a replacement for what you've done -- just something conceived in a perhaps similar spirit!)

-- Jeff


Top
 Profile  
Reply with quote  
PostPosted: Wed Oct 27, 2021 11:31 pm 
Offline

Joined: Fri Dec 21, 2018 1:05 am
Posts: 1120
Location: Albuquerque NM USA
Oneironaut wrote:

What I did was connect address line 15 to the CE on the SRAM so it was disabled when the 6502 address the last segment of memory.
I also used weak pulldowns on the data bus so that data would read 0 when looking for the boot vectors.
This pointed the start of code to address zero, where I then had a jump out of zero page to my actual code.


There is a similar approach in Z80 world where reset vector is at 0x0 and NOP is 0x0, but because of CP/M, RAM needs to start from 0x0 and ROM located in high memory. So the approach (an old design I don't recall the product name) is disable RAM at power-on reset and pull data bus to 0x0 with weak pull down resistors. The program will run NOP until first instruction in ROM; RAM is then enabled via ROM software.


Dr J's 3-wire bootstrap is very innovative. I was hoping he'll have similar idea for the simple EPROM programmer.
Bill


Top
 Profile  
Reply with quote  
PostPosted: Mon Nov 01, 2021 1:24 am 
Offline
User avatar

Joined: Wed Feb 13, 2013 1:38 pm
Posts: 589
Location: Michigan, USA
Oneironaut wrote:
On start, the SRAM is boot loaded with the code to run.

May I ask how SRAM was loaded, please?
Quote:
My IO was on address line 14.

So IO is active when A14 is low ($0000..$3FFF and $8000..$BFFF) and SRAM is active when A15 is low ($0000..$7FFF)?


Top
 Profile  
Reply with quote  
PostPosted: Tue Nov 02, 2021 12:00 pm 
Offline
User avatar

Joined: Mon May 25, 2015 2:25 pm
Posts: 693
Location: Gillies, Ontario, Canada
With many of my 6502 projects, I push code to the SRAM via microcontroller. After loaded, the uc simply tristates and sleeps like a ghost.
In some designs (like this one), the uc does other work after boot. In this case, it became IO to an SDcard file system.

Taking it a step further (less chip count), I sometimes use ONLY the microcontroller - a tight assembly loop emulates ROM directly.
I am doing this right now on a Commodore PET project, putting PC loadable code into the option ROM socket.

In all cases, the "ROM" can be instantly (and in-circuit) loaded from a PC.

Brad

Attachment:
6502-srom.jpg
6502-srom.jpg [ 327.23 KiB | Viewed 664 times ]



Michael wrote:
Oneironaut wrote:
On start, the SRAM is boot loaded with the code to run.

May I ask how SRAM was loaded, please?
Quote:
My IO was on address line 14.

So IO is active when A14 is low ($0000..$3FFF and $8000..$BFFF) and SRAM is active when A15 is low ($0000..$7FFF)?


Top
 Profile  
Reply with quote  
PostPosted: Wed Nov 03, 2021 4:29 am 
Offline
User avatar

Joined: Wed Feb 13, 2013 1:38 pm
Posts: 589
Location: Michigan, USA
Still confused... Sorry.

How are you using A15 to select RAM and A14 to select I/O without additional address decode logic without overlapping/conflicting memory region?


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: No registered users and 52 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: