6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sat Nov 16, 2024 5:21 pm

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: 6502 ROM-emulator
PostPosted: Sat Jan 03, 2015 5:03 pm 
Offline

Joined: Fri May 02, 2014 3:09 am
Posts: 4
Hello there,

First of all, Happy New Year. Hope you ladies and gentlemen will have the best times ahead.

Not long ago I was wondering could I connect a 6502 to a SRAM, and have the 6502 runs all the program memory from that mentioned SRAM? There will be another microcontroller (PIC18F) which is responsible for dumping the program code all into the SRAM.

Could it be possible? I come from a mostly microcontroller background, so pardon me if this question is a bit too silly (or unrealistic). :D


Top
 Profile  
Reply with quote  
 Post subject: Re: 6502 ROM-emulator
PostPosted: Sat Jan 03, 2015 6:51 pm 
Offline
User avatar

Joined: Wed Feb 13, 2013 1:38 pm
Posts: 589
Location: Michigan, USA
Yes, it is possible to do that.

A smallish PIC connected to the 65C02 data bus could be used as a "blind loader" if it controls the 6502 'reset' and 'clock' lines. As described by Nicholas Fitzroy-Dale (link below), after the PIC resets the 6502 it pushes instructions to the 6502 that it needs to load RAM from a pseudo ROM image in Flash on the PIC. In this case the PIC is turning RAM off and on as necessary during each 6502 instruction cycle. Once RAM has been loaded the PIC resets the 6502 again and the 6502 runs entirely from RAM while the PIC simply provides a full speed clock.

You could do a two chip design by using a larger PIC, in terms of both number of pins and amount of memory, where the PIC shares its ROM, RAM, and I/O (serial port, SPI port, etc.) with the 6502. For example, a 40-pin 18F46K22 could be used to produce a two chip 6502 or 65C02 system with ~4K RAM, 60K ROM, plus serial and SPI ports, while clocking the 6502 at around 800-KHz.

Three chip designs (6502 or 65C02, RAM, and PIC) offer more RAM, slightly better performance (1-MHz), are easy to expand (VIA, ACIA, etc.), with features that can reduce overall system size and cost. Be sure to check out Jacob's three chip design (65C02, RAM, and PIC) in the link below. It features a 65C02 cpu, a PIC with programmable "soft decoder", 64K RAM, serial and SPI ports, and a 1-MHz clock.

Cheerful regards, Mike, K8LH

Links:
Nicholas Fitzroy-Dale's Hardware SID Player article.
Andrew Jacob's SB-6502/65C02 - A Minimal 6502/65C02 Computer.


Top
 Profile  
Reply with quote  
 Post subject: Re: 6502 ROM-emulator
PostPosted: Sun Jan 11, 2015 4:37 pm 
Offline

Joined: Fri May 02, 2014 3:09 am
Posts: 4
Thanks michael for the great tip!

Over the busy week I built myself an SRAM loader first, and I checked the integrity of the SRAM by all the memory test methods so that the program code inserted will not be wrong later.

However, I do intend to make a mini, "loadable" retrocomputer like yours - with a screen, keyboard and stuff.

I have experiences building GLCD/TFT/drivers into a microcontroller, so I can take it from there.

I know it sounded very naiive - I admit it's a bit too much work to build myself an address decoder, so I took another PIC microcontroller to be it's "all in one Chipset". Again, I haven't tested the idea yet - might try this once I got the 6502s. :)


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

All times are UTC


Who is online

Users browsing this forum: barnacle and 6 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: