Build Your Own Computer - Emulate RAM/ROM For A 6502 Using a Raspberry Pi Pico

preview_player
Показать описание
Any CPU needs RAM and ROM. If you are building a retro computer using a processor like the 8-bit 6502, you could use a RAM chip and an EEPROM chip, or you could use a Raspberry Pi Pico to emulate RAM and ROM for you!




#garyexplains
Рекомендации по теме
Комментарии
Автор

40 years ago 6502 was my bread and butter. Last program I did was in assembler that was assembled by a cross assembler on a VAX. Program was a real time range estimator for a SONAR system on a Daphne Class submarine using passive ranging. It was paired with a Motorola Maths Co-Processor. What took me a year and resulted in a few kilograms of paper source code could probably be done today with a Pico in a week.

keithduffield
Автор

The two most important CPUs that started the 8-bit revolution, the Z80 and the 6502, are still made today, almost 50 years after they were introduced to the world. You have to hand it to the great talents that designed, created and marketed these wonders. Sure, there was the 6809 and the 8080 but none were as loved and as important to the microcomputer era as the 6502 and the Z80.

ftorresgamez
Автор

I got re-inspired recently to try this out (because of your video) and just got it working today. Started at 1Hz and worked my way up. I haven't implemented any form of write yet, so it's acting as a ROM right now just doing a simple loop, starting from $8000 and just looping back by a JMP $8000 command. But I'm pleased to say, it has been stable for the past hour running at 2MHz!! I had to jump through a lot of hoops to get to that level, but am extremely pleased at the result.
The concept is very similar to yours, but the code is vastly different. Hoping to add write functionality tomorrow.

Love you channel and keep up the great work!!

coding_and_things
Автор

Great solution with the rasp pico!
Thanks for sharing your experience with all of us 👍 😀

avejst
Автор

I was thinking of making my own programming language. Thanks to you Gary, now I've to create my own computer, create a micro-kernel & an abstraction layer too😤

krtirtho
Автор

I’m so glad I found this video. Thank you. I’ve been fascinated with the 6502 since it is the processor used in my first computer in 1983 - an Atari 400. My interest in computers started then and that’s when I knew I wanted to study engineering. This sounds like a great was to learn 6502 assembly. I’ll order a Raspberry Pi this weekend to get started!

timsanders
Автор

Awesome set of videos :)
The one about how to build and assembler was very interesting. I'd like to see a similar video about building a simple compiler. I get the concept of assembly to machine code but the bridge from a higher level language down to machine code it a bit more complex I believe.

Only small feedback. For series like these I think add a video number and a common main title so they are easy to find and follow. When searching on YouTube we don't always come across the play list but instead just the individual video. With a title like #1 How To Build A CPU: Assembly language, we will better know its part of a series.
Looking forward to more :)

martinfinch
Автор

I often worndered if a PICO can be used to emulate hard to get hold of RAM (and processors) in Arcade board circuits as we entered into revolution of retro gaming, the problems we face in findng replacement parts and also diagnosing faulty boards has lead me here. It's been on my mind a while - Watched a few videos so far, quite a lot covered but very impressed with the 6502 vCPU project

DaveRepairs
Автор

I did all of this back in 1988, I used the 6502F, that's the Rockwell FORTH chip, With EEprom, Ram & Latch chips, made my own Rs232 serial input interface board with a DB9 connector on a Com port as a piggyback for programming the 6502. All as a hobby project, when I working for Ampex Corp in Redwood City Ca., Long before Embedded Arduino or Pico times. Now were the old timer's presently. Living on a Farm in NE penn. usa.

pauldusa
Автор

This looks AWESOME!!!! Cant wait to try. Thank you.

dabunnisher
Автор

Hi Gary
Over lockdown I built the Ben Eater 6502 system on breadboard and thoroughly enjoyed making it. It was amazing and fascinating to go through. I was a massive 6502 fan back in the day, so it was great to re-visit the 6502.
Having discovered your YouTube video by accident I will now be definitely be building this 6502 system with a raspberry pi pico. I am really curious as to how you get the pico to emulate RAM and ROM for the 6502.

andyshaw
Автор

Hi Gary, Great proof of concept! It would be interesting if you extended this into a PIO block that could keep up with the 6502 at its full supported clock rate. That would allow a simple and cheap implementation of a full function 6502 RAM/ROM block, and you could squeeze in a debugging terminal over USB. Also, a link to your code in the dooblydoo under the video would be appreciated.

marklewus
Автор

If, like me, you want to do this yourself, you need a W65C02S (as shown in the video) not an old MOS 6502 (like was in my BBC micro). They are largely the same, the difference is that the S is for Static, it can be clocked when you like, whereas the MOS 6502 needs at least 50kHz (or so I'm told). Specifically '
The W65C02S is a fully static core and the PHI2 clock can be stopped when it is in the high (logic 1) or low (logic 0) state.'. I've got 10 coming from Aliexpress, if they work I'm happy to distribute the surplus.

tonyrobinson
Автор

Nice, one could steal a couple address lines at the expense of emulated ram. Other tricks are possible.
I do love the simplicity of this.

TomMitchellNiftyEgg
Автор

Beautifully delivered, Gary, thank you.

steventaylor
Автор

This is an amazing tutorial! Thank you for making this!

JoeBurnett
Автор

Great stuff. Would be nice to see a C version going as fast as possible.

electron
Автор

This is pretty amazing, should be able to do some very interesting ways of loading data on old computers with this.

turbinegraphics
Автор

I had actually considered doing this with a Pi or Arduino, but I wasn't sure about the clock speed, which is what I came to find out 😞. But that's cool. I'll keep watching. Fun stuff.

petedavis
Автор

@Gary Explains Would be great if you're able to do a video on this with PIO/DMA/C etc - something that will give us the required speed to work with an actual 6502 system running at 8MHz or so.

paulspark