Jump to content

Open Club  ·  76 members

StellaRT
IGNORED

Setting up the unnamed 1970's console


Al_Nafuur

Recommended Posts

  

Here is some information how to connect the components (might change in the future):

 

Raspberry Pi            SN74LVC245AN            2600 Cartridge Port
5V                                              +5V (pin 23)
3V3                     Vcc (pin 20)
GND                     GND, OE (pin 10,19)     GND, sGND (pin 12,24)
GPIO  0 - GPIO 12                               A0 - A12 (pin 8-1,22,21,19,20,18)
GPIO 13 - GPIO 20       A1 - A8 (pin 2-9)
GPIO 21                 DIR (pin 1)
                        B1 - B8 (pin 18-11)     D1 - D8 (pin 9-11,13-17)

 

 

image.thumb.png.8e3a93f667851017e2d6340873d8c376.pngimage.png.d40889bb1f446192cb5bced4424d0be1.pngimage.png.89b9ad36d00dfcc278b62e85562c3d68.png

 

  • Like 2
Link to comment
Share on other sites

  

Setting up the Raspberry Pi development environment:

  1. Download Raspberry 32bit PiOS (here alternatively 64bit?)
  2. Install it to an SD
  3. Connect the Raspberry Pi to your breadboard (HowTo)
  4. Boot the Pi
  5. On a Pi3 I recommend resizing the 100MB swap file to at least 1GB (HowTo)
  6. Added to "/boot/cmdline.txt" as root:

    isolcpus=domain,managed_irq,2,3

     

  7. If you like to make changes to the code, install any code editor/IDE you like (Install VS Code HowTo).
  8. Clone the Stella fork and switch to the dev branch. Open the LXTerminal and type:
    cd /path/to/your-git-dir/
    git clone https://github.com/Al-Nafuur/stella.git
    cd stella
    git checkout feature/cartridgeportThread
    

     

  9. Install SDL2 dev. Open the LXTerminal and type:
    sudo apt-get update
    sudo apt-get install libsdl2-dev
    

     

  10. If your are using a Raspberry Pi3B+ you have to change the peripheral base address (define of PI_PERI_BASE) in "stella/src/emucore/CartPort.cxx" line 30-34
  11. Build Stella. Open the LXTerminal and type:

    cd /path/to/your-git-dir/stella
    ./configure --host=rtstella && make -j2 all

    current build needs root rights to access GPIO and timer hardware directly
    building and linking takes about 1 hour
     

  12. Download this file to your ROMs dir:
    CartridgePort.bin
     

  13. Start Stella. Open the LXTerminal and type:

    cd /path/to/your-git-dir/stella
    sudo export SDL_AUDIODRIVER=alsa
    echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
    sudo echo -1 > /proc/sys/kernel/sched_rt_runtime_us
    sudo ./stella -plr.timemachine 0 -dev.timemachine 0 /path/to/your-ROM-dir/CartridgePort.bin

    The rtstella build needs to be started without nice and timemachine disabled, also the file selector doesn't worked so you have to load the bin file at startup

     

  14.  Before you insert or remove a cartridge from the port unplug the 5V wire from the breadboard and reattach it when the cart is plugged in.

  15.  After you have plugged in the 5V you can start the cart by selecting the bin file in the Stella file selector.

 

  • Like 2
Link to comment
Share on other sites

4 hours ago, JetSetIlly said:

This is probably a very dumb question but I assume the "2600 Cartridge Port" is literally just a port cannibalized from a real 2600, or am I mistaken? Which model of 2600 is the most suitable donor / easiest to remove? Or are they all the same.

You can rip the off of an 2600.

 

But you also can buy a new one:

https://letmegooglethat.com/?q=24+pin+edge+connector+buy

sorry couldn't resist ;-)

 

There is also a few threads here on AA about buying them.

https://www.google.com/search?q=site%3A+fourum.atariage.com+buy+24+pin+edge+connector&sca_esv=565782341&hl=de&ei=Re4EZZetJsaHxc8PwM2o2AY&ved=0ahUKEwjX4_fl562BAxXGQ_EDHcAmCmsQ4dUDCA8&uact=5&oq=site%3A+fourum.atariage.com+buy+24+pin+edge+connector&gs_lp=Egxnd3Mtd2l6LXNlcnAiM3NpdGU6IGZvdXJ1bS5hdGFyaWFnZS5jb20gYnV5IDI0IHBpbiBlZGdlIGNvbm5lY3RvcjIFECEYoAFIiI4BUMMEWMWFAXABeAGQAQCYAZABoAG9FqoBBTE0LjE0uAEDyAEA-AEB-AECwgIKEAAYRxjWBBiwA8ICCxAAGIAEGLEDGIMBwgILEC4YigUYsQMYgwHCAgsQABiKBRixAxiDAcICERAuGIAEGLEDGIMBGMcBGNEDwgILEC4YgAQYsQMYgwHCAgcQABiKBRhDwgIOEC4YgAQYsQMYxwEY0QPCAggQLhiABBixA8ICBRAAGIAEwgIHEC4YigUYQ8ICCBAAGIAEGLEDwgIWEC4YigUYQxiXBRjcBBjeBBjgBNgBAcICChAAGIoFGLEDGEPCAgsQLhiABBjHARjRA8ICBhAAGBYYHsICCBAAGBYYHhgPwgIQEAAYFhgeGA8Y8QQYyQMYCsICCxAAGIoFGJIDGLgEwgIIEAAYigUYkgPCAggQABgWGB4YCsICBxAAGBMYgATCAggQABgWGB4YE8ICHxAuGA0YgAQYsQMYgwEYsQMYgwEYxwEYrwEYmAUYmQXCAhwQLhgNGIAEGLEDGIMBGLEDGMcBGK8BGJgFGJkFwgIZEC4YDRiABBixAxixAxjHARivARiYBRiZBcICGRAuGA0YgwEYrwEYxwEYsQMYgAQYmAUYmQXCAgcQABgNGIAEwgIoEC4YDRiABBixAxiDARjHARivARiYBRiZBRiXBRjcBBjeBBjgBNgBAcICDRAAGBYYHhgPGPEEGArCAgoQABgWGB4YDxgKwgIFEAAYogTiAwQYACBBiAYBkAYIugYGCAEQARgU&sclient=gws-wiz-serp#ip=1

 

Link to comment
Share on other sites

38 minutes ago, Al_Nafuur said:

You can rip the off of an 2600.

 

But you also can buy a new one:

https://letmegooglethat.com/?q=24+pin+edge+connector+buy

sorry couldn't resist ;-)

It took me quite a while to find out the correct name for it. Maybe @JetSetIlly didn't know too.

  • Like 1
Link to comment
Share on other sites

1 hour ago, 5-11under said:

The picture in the first post shows Raspberry Pi 3/4. @Al_Nafuur is using a 3B (I think). Would the code require changes for a 4, or would it work the same? Any information is appreciated.

It looks like the 4 has some changes to the GPIO handling, so indeed the code may has to be adapted to the 4.

  • Thanks 1
Link to comment
Share on other sites

19 hours ago, radventure said:

Would a Pi 3b+ be the path-of-least-resistance for mirroring the *something*Stella*something*'s (public) progress? I'm trying to source a new one, but they're a little scarce and less cost effective currently. 

Yes a 3B+ would be best at the moment. But there are a few people starting to test on Pi 4 soon..

 

  • Like 1
Link to comment
Share on other sites

I have a new Pi 3b+ on order, along with a couple of Sullins EBC12DCWN cart connectors.... hope they're the ones! A pair of SN74LVC245AN .... and I'm *partially* blaming @Thomas Jentzsch for me now also ordering PCBs and the items in the BOM, needed for a pair of Stelladaptors. Those enclosures are cheap enough, but the shipping isn't! Might be heat-shrink wrapped by the looks of it.

 

I'll have to sort a breadboard and jumperwire next

 

 

  • Like 1
Link to comment
Share on other sites

11 hours ago, Kroko said:

The Pi 3B+ and the 345 arrived :D
20230922_010614.thumb.jpg.009c16880914089698159da50e4c7080.jpg

Nice Setup!👍

I'm almost a little envious of the 34 channel logic analyzer. Something like that can be quite useful when debugging. Does it have 100Mhz resolution on all channels simultaneously?

 

Can you send some screenshots oft the analyzer captures?

 

Link to comment
Share on other sites

2 hours ago, Al_Nafuur said:

Can you send some screenshots oft the analyzer captures?

Yes, that was the plan. I just need to configure it to the current setup. But then we should be able to see what goes wrong timing wise, in case we suspect it has to do with bus timing.

This is the specification of this thing:  (I feel its good enough for all we need to see)
image.thumb.png.eeb03fa08ef5c7671fb265e6600b5ecf.png

Edited by Kroko
  • Thanks 1
Link to comment
Share on other sites

44 minutes ago, Kroko said:

So I think its setup now. Here is the first measurement:
image.thumb.png.123485083ffdd079f3dee0d1183f0156.png

 

Is there anything specific you want to see at this point ?

Yes, I am very interested in writes to the Zeropage and SC-RAM. From a real cartridge with SC-RAM would be cool, also writes to multicarts like the Harmony or the UnoCart/PlusCart would be nice to see.

 

Link to comment
Share on other sites

12 hours ago, Kroko said:

I am getting merge conflicts when I try to rebase.

merge conflicts? Do you have any local changes made?

You might start a clean download/build in a new folder.

 

 

12 hours ago, Kroko said:

Any chance you could provide some branch or commit that just contains all I need to build rtstella ?

I think it makes no sense to merge the two branches yet. @DirtyHairy

Link to comment
Share on other sites

7 hours ago, Al_Nafuur said:

merge conflicts? Do you have any local changes made?

no changes. Fresh folder and then applied your instructions.
 

7 hours ago, Al_Nafuur said:

You might start a clean download/build in a new folder.

Thats what I did. Maybe you could try your instructions in a new folder and see if it works ? I tried it 2 times with fresh folders ...

  • Like 1
Link to comment
Share on other sites

8 hours ago, Al_Nafuur said:

I think it makes no sense to merge the two branches yet. @DirtyHairy

I think a merge would be fine. The rtstella scheduling code seems to be stable and work as it should, and you have an ifdef in your timing code that checks for rtstella, so people can try both variants. Anyway, rtstella is the way forward, the normal scheduler will never work at full speed with a real cart..

Link to comment
Share on other sites

6 hours ago, Kroko said:

no changes. Fresh folder and then applied your instructions.
 

Thats what I did. Maybe you could try your instructions in a new folder and see if it works ? I tried it 2 times with fresh folders ...

Sorry, I cleaned up the mess and the instructions. No need to rebase the rtstella branch.

 

  • Like 1
Link to comment
Share on other sites

  • Recently Browsing   0 members

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