Jump to content

Open Club  ·  76 members

StellaRT
IGNORED

Hardware considerations.


rbairos

Recommended Posts

12 hours ago, rbairos said:

Were you able to map D0-7 and A0-12 in single port reads, or did the Rasbperry PI gpio layout force multiple reads?
 

Yes, almost.

 

Because we are not running on a RTOS the GPIO port for the address (+data on writes) has to be switched with one 32bit "write". Unfortunately the CPU of the Pi doesn't support this. We first have to define the bits that should be cleared and then the bits that have to be set. If the OS scheduler interrupts our thread between these to writes, the bus looks for the cart like a read/write to address $00

Link to comment
Share on other sites

I see.

Even without the interruption, does the bus see $00 each cycle briefly?

Aside from that, the main limitation now, the random OS scheduler interrupts? And how long are those?
Have you looked at bare-metal implementations?  I bookmarked this one in the past with this project in mind:
https://github.com/fbergama/pigfx

Is the rest of the emulation speed a bottleneck at this point?
Very exciting work btw!

  • Like 1
Link to comment
Share on other sites

@Al_Nafur: Did you measure how fast you can currently switch the GPIO Pins from Raspberry Pi OS ? Wouldn't you have to be able to switch it "at least" once every 840us ? This is a value that is very hard to reach if you don't modify the Pi OS, right ? Or am I missing something ?

Link to comment
Share on other sites

1 hour ago, Kroko said:

@Al_Nafur: Did you measure how fast you can currently switch the GPIO Pins from Raspberry Pi OS ? Wouldn't you have to be able to switch it "at least" once every 840us ? This is a value that is very hard to reach if you don't modify the Pi OS, right ? Or am I missing something ?

We are switching (nearly) the whole port at once at the hardware level. This only takes a few ns.

 

Link to comment
Share on other sites

22 minutes ago, Al_Nafuur said:

We are switching (nearly) the whole port at once at the hardware level. This only takes a few ns.

 

I am not so much worried about how fast the signal rises, but ... if you switch a port line "on and off" in an endless loop, what frequency are you expecting to see, if you do that from PiOS ? It will certainly not be 1.19MHz, right ?

Link to comment
Share on other sites

6 minutes ago, Kroko said:

I am not so much worried about how fast the signal rises, but ... if you switch a port line "on and off" in an endless loop, what frequency are you expecting to see, if you do that from PiOS ? It will certainly not be 1.19MHz, right ?

If we would only do the switching in an endless loop, we could do much higher frequencies (with occasional hick-ups from the OS scheduler).

Link to comment
Share on other sites

1 hour ago, rbairos said:

What are the goals for the joystick ports / riot 6532?
Full bidirectional emulation?
Is the goal for this thing to work with savekey etc?

Currently we are using Stella to emulate all outside of the cartridge.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...