+rbairos Posted September 14, 2023 Share Posted September 14, 2023 Were you able to map D0-7 and A0-12 in single port reads, or did the Rasbperry PI gpio layout force multiple reads? 1 Link to comment Share on other sites More sharing options...
Marc Oberhäuser Posted September 15, 2023 Share Posted September 15, 2023 (edited) Wouldn't it be possible to use a Orange Pi Zero2? It's cheaper the the Pi3 & Pi4, and should have enough power to run Stella. General MAME Emulator Benchmark comparing several microcomputers. Edited September 15, 2023 by Marc Oberhäuser Adding some stuff. Link to comment Share on other sites More sharing options...
+Al_Nafuur Posted September 15, 2023 Share Posted September 15, 2023 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 More sharing options...
+rbairos Posted September 15, 2023 Author Share Posted September 15, 2023 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! 1 Link to comment Share on other sites More sharing options...
Kroko Posted September 15, 2023 Share Posted September 15, 2023 @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 More sharing options...
+Al_Nafuur Posted September 15, 2023 Share Posted September 15, 2023 7 hours ago, rbairos said: Even without the interruption, does the bus see $00 each cycle briefly? Without the interrupt very briefly. I guess it is nearly the same than the 6502 needs to setup the address bus. Link to comment Share on other sites More sharing options...
+Al_Nafuur Posted September 15, 2023 Share Posted September 15, 2023 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 More sharing options...
Kroko Posted September 16, 2023 Share Posted September 16, 2023 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 More sharing options...
+Al_Nafuur Posted September 16, 2023 Share Posted September 16, 2023 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 More sharing options...
+rbairos Posted September 16, 2023 Author Share Posted September 16, 2023 What are the goals for the joystick ports / riot 6532? Full bidirectional emulation? Is the goal for this thing to work with savekey etc? Link to comment Share on other sites More sharing options...
+Al_Nafuur Posted September 16, 2023 Share Posted September 16, 2023 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 More sharing options...
+rbairos Posted September 16, 2023 Author Share Posted September 16, 2023 So inputs will be via usb controllers? Link to comment Share on other sites More sharing options...
+Al_Nafuur Posted September 16, 2023 Share Posted September 16, 2023 8 minutes ago, rbairos said: So inputs will be via usb controllers? Everything that is supported by Stella running on a Pi Link to comment Share on other sites More sharing options...
+rbairos Posted September 16, 2023 Author Share Posted September 16, 2023 So specifically, usb keyboard, usb controllers etc? There won't be any db9 connectors right? Link to comment Share on other sites More sharing options...
+Al_Nafuur Posted September 17, 2023 Share Posted September 17, 2023 17 minutes ago, rbairos said: So specifically, usb keyboard, usb controllers etc? There won't be any db9 connectors right? Stelladapter? Link to comment Share on other sites More sharing options...
+rbairos Posted September 17, 2023 Author Share Posted September 17, 2023 12 hours ago, Al_Nafuur said: Stelladapter? I don't know much about it. It converts db9 joysticks to usb controllers or it provides full 8 bit bidirectional interface in general? Thanks Link to comment Share on other sites More sharing options...
+Karl G Posted September 17, 2023 Share Posted September 17, 2023 I imagine once it's done someone will make an enclosure something with db9 ports, switches, etc, but it's not far enough along to worry about those kinds of details yet IMO. 3 Link to comment Share on other sites More sharing options...
Recommended Posts