Experimental Cartridge Shim

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

JetSetIlly

Now I've had some fun putting this together, I've done my sums. The wrong way
around, but for such a small inconsequential project I think it's okay to approach
problems like this. It gives us a chance to explore.


Measuring the latency for a bus change inside the emulation (ie: whenever the address
or data bus changes we need to change the bus for the cartridge) is 5ms. This matches
the latency for a USB poll set in the kernel.

Now, assuming that the address/data bus changes every CPU cycle (it doesn't but
it keeps the sums simple) then the latency needs to be 0.0008ms. Which is
thousands of times slower.

You can lower the latency for the USB poll below 5ms but it's still nothing like
the required speed.

I was expecting the project to be slower than real-time but I wasn't expecting
it to be as slow a solution as it's turned out to be.


An obvious solution to the latency problem is to return data for more than one
address at a time. But how would this work complex bank switching schemes? I
have some ideas about caching but they probably wouldn't be universal solutions.

Another solution and probably the one I'll explore some time, is to disregard
USB entirely and move to PCI-Express or something like that.


Despite the apparent failure, this has been a worthwhile exercise for me. It's
forced me to think about some things I've never thought about before and it's
improved some areas of the emulator code (the disassembly) that haven't been
touched in some time; and highlighted some other areas (file loading/streaming)
that need attention.
https://github.com/JetSetIlly/Gopher2600
@JetSetIlly@mastodon.gamedev.place
@jetsetilly.bsky.social

radventure

Poking this thread from it's slumber a little, but keen to see if there's any more development in this direction?

The idea of some sort of hardware/software mashup is intriguing. The PicoGUS and PicoMEM cards are doing crazy stuff for 8bit PCs, Software Defined Amiga accelerators etc. There's a 6510 replacement now that even has the illegal instruction stuff(for you technical folk).

Some sort of Pi-alike driven board to run Gopher or Stella that adds optional sockets for RIOT + TIA(or future SD/FPGA replacements) and cartridge slot, with dev/wizard-friendly breakout? I guess that comes down to something a bit like the Plaion offering, just a bit more compatible/capable and hackable? I don't pretend to understand all the voodoo - just interested in what is bubbling away in peoples tinkering.....

JetSetIlly

Quote from: radventure on 24 May 2024, 11:04 AMPoking this thread from it's slumber a little, but keen to see if there's any more development in this direction?

The idea of some sort of hardware/software mashup is intriguing. The PicoGUS and PicoMEM cards are doing crazy stuff for 8bit PCs, Software Defined Amiga accelerators etc. There's a 6510 replacement now that even has the illegal instruction stuff(for you technical folk).

Some sort of Pi-alike driven board to run Gopher or Stella that adds optional sockets for RIOT + TIA(or future SD/FPGA replacements) and cartridge slot, with dev/wizard-friendly breakout? I guess that comes down to something a bit like the Plaion offering, just a bit more compatible/capable and hackable? I don't pretend to understand all the voodoo - just interested in what is bubbling away in peoples tinkering.....

I've not done anything with this since my last post. Performance will be an issue for Gopher2600 so for the time being at least, I think the rtstella branch of Stella is the only realistic option for this type of application https://github.com/stella-emu/stella/commits/rtstella


That said, I have been thinking about doing something more along these lines. But it'll be a development tool only, rather than any replacement for legacy hardware.
https://github.com/JetSetIlly/Gopher2600
@JetSetIlly@mastodon.gamedev.place
@jetsetilly.bsky.social

radventure

I bought a Pi3 and some components to follow along with the StellaRT (rtstella?) thing. But it was a smidge too low level to easily commit to initially and seems to have gone a bit quiet (no criticism or anything, I get everyone has other stuff in life - priorities must shift).

Always keen to see development  :)