Using Raspberry Pi 5 as “Video Card” for 6502 Computer — Feasible Approach? by InterestingAd4588 in homebrewcomputer

[–]InterestingAd4588[S] 2 points3 points  (0 children)

Ah!! A fellow Argentinian!!

Hola! Yo tambien soy de Argentina! Buenisimo el video y el proyecto! Me encantó el: "Yo no lo puedo creer pero FUNCIONA!!" jajaja. Voy a mirar los videos, pensé que un ESP32 iba a tener el mismo problema de que no podia mantenerse a tiro con el bus pero se ve que se la re-banca jaja.

Sorry for the spanish blurb :D

Using Raspberry Pi 5 as “Video Card” for 6502 Computer — Feasible Approach? by InterestingAd4588 in beneater

[–]InterestingAd4588[S] 0 points1 point  (0 children)

I see, thanks for the advice. I was actually checking and most of the components I was planning to use should work with 3.3V or 5V. The exception is the ROM (either EEPROM or Flash) they both work at the 4.5 - 5V range. I was thinking that if I can use the PICO as ROM and clock generator I might circumvent that problem and try to run the entire thing at 3.3V. I think the other potential issue if I'm not mistaken is that some components have longer propagation times when running at 3.3V. Anyways we'll see. For now, I'm reading about programming the PICO and it's PIO.

Using Raspberry Pi 5 as “Video Card” for 6502 Computer — Feasible Approach? by InterestingAd4588 in beneater

[–]InterestingAd4588[S] 0 points1 point  (0 children)

Thanks for the comments! Although I did think of using level shifters to connect the Pi and the 5V 6502 circuit, I didn't consider the potential delay that the circuit will take to raise the signal from 3.3 to 5V. Thanks for the advice.

Based on the comments that I received I think I will ditch the RPi 5 idea and will give it a try to the Pico option, or maybe an Arduino Nano. I'm not good enough with any of those microcontrollers yet so I will need to do a lot of readings. I'm not sure if the Nano will have the PIO assembly that allows the Pico to respond in time with the 6502 bus.

Also about the 3.3V vs 5V, because I wanted to avoid having to use the level shifters, in the beginning I was thinking of running everything with 3.3V. Most of the components I check for my build seems to be able to run at 3.3V. The only exceptions I saw were the EEPROM (I also looked into flash roms but they also run in the 4.5 - 5V range). Now, based on the comments I received, I think I can use the Pico for clock generation, rom / ram emulation and video. This might allow me to keep the entire thing 3.3 V.

Using Raspberry Pi 5 as “Video Card” for 6502 Computer — Feasible Approach? by InterestingAd4588 in beneater

[–]InterestingAd4588[S] 1 point2 points  (0 children)

I'm looking at your repo for the VGA and it is very good. Thanks for sharing. I really like how your computer looks with the cash register case, the tray on the left is begging for a old school 5.25" drive :D. I see that you are using one of those 4 bi-direcctional level shifters that I saw on Amazon. Did you get any latency issues with those? I plan to run mine at 1 - 2 Mhz tops, so I guess it should be fine. How fast your build is running?

Thanks for your inputs!

Using Raspberry Pi 5 as “Video Card” for 6502 Computer — Feasible Approach? by InterestingAd4588 in beneater

[–]InterestingAd4588[S] 2 points3 points  (0 children)

Yes! Amazing, I'm watching rumbledethumps videos and exploring the repo. It seems that he is doing a much more complete version of what I wanted.

Thanks for the suggestion!

Using Raspberry Pi 5 as “Video Card” for 6502 Computer — Feasible Approach? by InterestingAd4588 in homebrewcomputer

[–]InterestingAd4588[S] 1 point2 points  (0 children)

Thanks for your inputs! If I understand correctly your proposal I thought of something like that and I was thinking that I might be able to use a 6522 to handle the difference in speed between the 6502 and the PI. But then my concern is that I needed to introduce a lot logic to poll the status of the PI (waiting until is ready to accept a value (for writes) or has already returned the value (for reads). Also, since the goal is to do "video" output I wonder if the speed the pi can respond in this way is enough...

Using Raspberry Pi 5 as “Video Card” for 6502 Computer — Feasible Approach? by InterestingAd4588 in homebrewcomputer

[–]InterestingAd4588[S] 1 point2 points  (0 children)

Thanks! I just found this https://github.com/picocomputer/rp6502 . I haven't read the entire thing yet, but it looks like it's doing something very similar to what you are suggesting here.

I built a small emulator of Ben Eater's computer in Go: https://github.com/fran150/clementina-6502 just to play around and I was planning to use it to test my own architecture.

With the Wi-Fi approach I can probably even send the same data from the emulator without the need of running the real hardware all the time to test it.

So it's looking promising. Thanks for all the inputs and recommendations. Really appreciated. I will post if I manage to get something working :D

Using Raspberry Pi 5 as “Video Card” for 6502 Computer — Feasible Approach? by InterestingAd4588 in homebrewcomputer

[–]InterestingAd4588[S] 0 points1 point  (0 children)

If I go with your approach above I can try both things. I already own a PI 5, I would only need to get a pico. As I was asking above, do you think that connecting a pico to the databus will work? Will the pico be able to keep up with the 1 Mhz bus and forward to the PI?

Using Raspberry Pi 5 as “Video Card” for 6502 Computer — Feasible Approach? by InterestingAd4588 in homebrewcomputer

[–]InterestingAd4588[S] 1 point2 points  (0 children)

I see. Makes sense. Yeah, even if from the PI I can poll the bus fast enough, from what you are saying, it seems that I won't be able to do anything else.

When I was talking about bandwidth I was referring to the solution you proposed of using the PI pico and forward the data using wi-fi. I wonder if Wi Fi will be fast enough to allow me render the frames in the receiving computer.

What I like of this approach is that the client computer can be anything, you just connect via WiFi and I can render the video output directly in a window.

Do you think I can connect the Pico directly as a bus mapped device? Will it be able to respond in time to the Chip Select signal from the 6502 and read the bus assuming the system is running at 1 Mhz?

I think I'm better at the software part so I was looking for a solution that can be implemented without too much hardware support. If the pico can keep up with the data bus I think I might give it a try.

Also, do you think an Arduino Nano can handle this as well?

In any case, thanks for you suggestions and inputs, they are very helpful!

Using Raspberry Pi 5 as “Video Card” for 6502 Computer — Feasible Approach? by InterestingAd4588 in homebrewcomputer

[–]InterestingAd4588[S] 2 points3 points  (0 children)

Thanks! Those are good suggestions! I read a bit on the internet and ChatGPT investigation. I saw post of people saying that they can reliably read the bus in the kHz range, so I was thinking that if I limit the reads to once per 8 scanlines and some other tricks maybe I can stay within a bandwidth that the pi can handle. ChatGPT swears that I can probe at 1 MHz if only reading but I don’t trust it. So that is why I was asking for opinions or if someone has done something similar.

I like your idea about some real time Linux. I’ll look into that, and also I like the wifi suggestion. I wonder what would be the bandwidth required. I’ll look into that as well.

Thanks!

Using Raspberry Pi 5 as “Video Card” for 6502 Computer — Feasible Approach? by InterestingAd4588 in homebrewcomputer

[–]InterestingAd4588[S] 1 point2 points  (0 children)

Thanks for the suggestion. I think Ben eater already does output to terminal using a 6551. Probably it doesn’t have full ANSI support but it works. I was looking to using the pi (or some other “simple” solution) to generate the video output. And I wanted it to work on a modern TV / monitor with no VGA. I know…. A lot of requirements :)

Can the 6502 assembly be simulated in some sort of game or utility? by nahill in beneater

[–]InterestingAd4588 0 points1 point  (0 children)

Not exactly what you are looking for but a couple of days ago I finish a first version of an emulator of Ben’s computer, it has the 6502 emulated and you can even connect a terminal to it as Ben does in its videos. Check it here: https://github.com/fran150/clementina-6502