Jump to content
IGNORED

XEP-80 on Raspbery Pi Pico


cbelcher

Recommended Posts

Anyone else been able to build the .UF2 for this?  I'd like to give it a try but have been able to build all the other examples except the xep80.

 

Looks like it was built by Marcin Kita - who I can find only named in a demo on atarionline.pl - but I can't find contact info.  

 

Seems like a really simple implementation - pretty much a Pi Pico, HDMI breakout and level shifter - the easiest implementation imaginable.

 

https://github.com/maaakit/PicoDVI/tree/xep80/software/apps/xep80/doc

 

He also posted video:

 

  • Like 8
Link to comment
Share on other sites

7 hours ago, cbelcher said:

Anyone else been able to build the .UF2 for this?

Can't find any instructions on how to build it other than a reference to "make xep80", but there doesn't seem to be a Makefile for this

 

Nothing saying what system to build it on (Window/Linux) etc.

Link to comment
Share on other sites

49 minutes ago, TGB1718 said:

Can't find any instructions on how to build it other than a reference to "make xep80", but there doesn't seem to be a Makefile for this

 

Nothing saying what system to build it on (Window/Linux) etc.

Based on what I see here it should build on linux.   I will test this out later today.

 

Link to comment
Share on other sites

Yes, I tried on Windows, MacOS, and Ubuntu - had to install the development toolchain for the Pico and the dependencies that are listed in the root of this repository.  All the other examples built, but it looks like Marcin added this in this particular fork without a makefile.

 

Adafruit has a tutorial going over the installation of the toolchain and using the master branch of this repository

 

https://learn.adafruit.com/adafruit-dvi-breakout-board/raspberry-pi-pico-demo-code

Link to comment
Share on other sites

I remember adding the Pico toolchain and SDK on Windows, it was a real pain, when I got it going

all it would build was the examples, nothing I created would ever build.

 

I think the big problem with it was Visual Studio Code, which again is a real pain to configure.

 

So I ended up using the Arduino IDE to create the code I needed and that works fine (Microsoft take a lesson).

  • Like 1
Link to comment
Share on other sites

  • 4 weeks later...

Any luck with this @Jfcatari ?  It looks really easy and cheap from the hardware standpoint!  But the software is killing me.  

 

The thread of it on AtariOnline.pl is here:

 

https://atarionline.pl/forum/comments.php?DiscussionID=6921&page=1

 

From that forum and the link to YouTube - I suspect @MarKit here may be the creator and I have messaged him.  Otherwise, would someone who hangs out on the Polish forums like @ZuluGula be willing to ask if he could post a build of this for us to try out?

 

 

Link to comment
Share on other sites

The Atari XEP80 was released in 1987 (very late in the life of Atari 8 bits) and interfaced thru the joystick port see https://www.atarimagazines.com/v6n3/xep80.html

 

Mytek recreated this project 2 years ago with the XEP80 II. There’s a long development thread on this forum, and details on the completed project on his website https://ataribits.weebly.com/xep80-ii.html

Link to comment
Share on other sites

On 5/14/2023 at 2:40 PM, cbelcher said:

Any luck with this @Jfcatari ?  It looks really easy and cheap from the hardware standpoint!  But the software is killing me.  

 

The thread of it on AtariOnline.pl is here:

 

https://atarionline.pl/forum/comments.php?DiscussionID=6921&page=1

 

Otherwise, would someone who hangs out on the Polish forums like @ZuluGula be willing to ask if he could post a build of this for us to try out?

The builds are on that page.  Look for the 2 *.uf2 files, I'm guessing xep80.uf2 is 24 rows/lines, and xep80_25rows.uf2 is 25 rows/lines.

 

Flashing a Pico is as easy as:

  1. Disconnect the Pico from your Atari, if you currently have it plugged in
  2. Hold down the BOOTSEL button
  3. Plug in your Pico to your computer's USB port using a USB data cable (NOT a USB power-only cable)
  4. When a new drive appears on your desktop, you can release the BOOTSEL button
  5. Then drag either one of the UF2 files mentioned above on to the new drive
  6. The drive should self-eject once the UF2 file has been copied to it
  7. If you don't like the UF2 file you dragged, start at #1 again, and try the other one

 

The schematic/connection diagram is in the repo, but I've linked the image from there:

 

XEP80-PICO.png?raw=true

WARNING: If you try to run this setup without the level shifting board (the blue PCB in the diagram above, also mentioned in the Bill of Materials linked in the first post of this thread), you could fry your Pico board.

Edited by spicyjack
clarified UF2 flashing steps
  • Like 1
  • Thanks 1
Link to comment
Share on other sites

Thanks!  I missed them on the other forum!  Was so involved in trying to build them from source.  

 

With Eben Upton saying this, I wonder if we could get around the level shifting.  

Eben Upton says:

Note: the pads themselves are 5V tolerant for input, just not 5V5 tolerant, which is what we’d need them to be to put “5V tolerant” in the data sheet. (Hypothetical) future designs will fix this.

Note also: they’re not (and will never be) 5V *failsafe*, so don’t subject them to 5V without first powering VDDIO.

Link to comment
Share on other sites

6 hours ago, cbelcher said:

Note also: they’re not (and will never be) 5V *failsafe*, so don’t subject them to 5V without first powering VDDIO.

So if you build a custom PCB that guarantees VDDIO gets power at the same time as the GPIO inputs, your Pico should be safe.

 

If you are building this on a breadboard, you might want to use the level shifter, "just in case".

 

Adafruit has the same level shifting board, you can buy it from them, or from Mouser if you have an account.

Link to comment
Share on other sites

There's a better description of what you can and can't do with regards to 5V and Pico boards in the Pico forums;

 

https://forums.raspberrypi.com/viewtopic.php?p=2092122#p2091977

 

Quote

GPIO pins that aren't shared with the ADC can accept a maximum of 3.6v without IOVDD being powered.

GPIO pins that aren't shared with the ADC and have IOVDD at 3.3v can accept a maximum of 5v ( not 5v tolerant as this typically means up to 5.5v)

Remember during powerup in typical designs 3.3v usually comes up after a 5v rail so applying 5v to a GPIO will end up over stressing the RP2040 during powerup.

If you exceed the one of the specifications the internals may not fail immediately, but over time if the silicon is stressed it may fail. Remember noise and overshoots can all add to stressing the silicon.

I would recommend designing to the datasheet as this is what is what the parts are tested to.

 

Link to comment
Share on other sites

  • 2 weeks later...

I was able to get this to build on a Mac.  It should also build without issues on Linux.

 

I have no idea if you can build this on Windows, I'm not a Windows person.

 

You will need a C compiler of some sort, as well as the CMake package installed either from Homebrew (Mac) or the package manager of your Linux system.  On Ubuntu 22.04 and in Homebrew on a Mac, the correct package for CMake is called cmake.

 

You will also need the Git SCM toolchain installed so that you can clone the two required repositories + submodules.

 

The command line build instructions are inside the spoiler block if other people want to try building it.  Flashing instructions are listed in an earlier post.

 

Spoiler

Clone these two Git repos into a working directory;

git clone https://github.com/raspberrypi/pico-sdk.git
git clone https://github.com/maaakit/PicoDVI.git

 

For the pico-sdk repo, you will need to run this command inside of the repo itself in order to correctly clone all of the repos required for the Pico SDK;

cd pico-sdk && git submodule update --init

 

Export the path to pico-sdk repo in your shell

export PICO_SDK_PATH=~/<your path to>/pico-sdk/

 

Change to to the PicoDVI/software directory, and create a new directory called build

cd PicoDVI/software && mkdir build

 

Enter the build directory you just created

cd build

 

Run cmake with options to set up building the various software modules, using the CMakefile.txt which is located in the parent directory (software).  This step is what generates the correct Makefile that you need to build the UF2 image;

cmake -DPICO_COPY_TO_RAM=1 ..


Run the make command with the xep80 target from the build directory to build things

make xep80

 

If everything builds successfully, the output UF2 file that can be used to flash the Pico will be created in the following directory (located underneath the build directory)

./apps/xep80/xep80.uf2

 

Possible issue: there's a default: branch of a switch statement that may need to be commented out on line 1164 of software/apps/xep80/xep80.c in order for everything to build without errors on a Mac with clang as the compiler; depending on your compiler and/or version, you may or may not run in to this issue on Linux as well.

 

If you get compilation errors with the make xep80 step above, open up software/apps/xep80/xep80.c in a source code editor (NOT something like Microsoft Word) and comment out the contents of line 1164 using double forward slashes (//).

 

Here's the output of git diff showing what was changed:

diff --git a/software/apps/xep80/xep80.c b/software/apps/xep80/xep80.c
index 2406190..a282c1a 100644
--- a/software/apps/xep80/xep80.c
+++ b/software/apps/xep80/xep80.c
@@ -1161,7 +1161,7 @@ static void SetReserved(char byte)
        case CMD_ATTRIB_B & 0x1f:
                SetAttributeB(last_char);
                break;
-       default:
+       // default:
                /* Other 1111xxxxx reserved commands are not currently emulated -
                   implementation would require exact emulation of the whole NS405.
                   111100001, 111100010: Set CURS

 

 

Link to comment
Share on other sites

7 hours ago, spicyjack said:

I was able to get this to build on a Mac.  It should also build without issues on Linux.

I tried on a Pi3B, had to install the Pico-SDK using the instructions here https://github.com/raspberrypi/pico-sdk

and then followed your instructions.

 

I got a few warnings from the compiler and will address those later, but I did get one error, a quirk of this compiler

for anyone else who build this on a Pi.

In xep80.c at line 1164, there's a default switch/case statement which has all the code commented out, this throws an error,

all it needs to fix it is insert a break; statement or you could just comment out the default: statement.

.

After doing that and compiling, it built the file as intended, I have a few Pico's , so just need to get a few other pieces

of hardware and build one of these :)

 

  • Thanks 1
Link to comment
Share on other sites

 

 

Built up the hardware, and was able to get HDMI video out using other examples from the GitHub library - so I think the HDMI end of the Pico circuit works fine. 

 

I used the precompiled uf2 files from the polish forum for the XEP-80 emulation using the very easy loading method mentioned above.

 

However, when I plug into joystick pin 2 (and I tried 1)  and start the ALTXEP80.SYS driver the Atari screen blanks (as it should), I see activity on Atari pins 1 and 2 and at the Pi end (the RX and TX), but I get no HDMI video out.

The Atari seems to know the Pico is there - if I'm not plugged into port 2 it complains no device detected.

 

I have 5V and ground where I think I should on the Pico.  Hmmm - maybe I should cut the 5V from the Atari and power everything from the USB on the Pico.

 

Will be glad to hear how everyone else's experiments go.

 

 

 

 

 

 

Link to comment
Share on other sites

12 minutes ago, cbelcher said:

I have 5V and ground where I think I should on the Pico.  Hmmm - maybe I should cut the 5V from the Atari and power everything from the USB on the Pico.

The diagram looks ok pin 39 VSYS is the 5V supply to the Pico, Pin 38 GND, so should be ok

 

13 minutes ago, cbelcher said:

Will be glad to hear how everyone else's experiments go.

Just ordered the DVI board, will get it on Friday, so this weekend hopefully

Link to comment
Share on other sites

As I'm going to build one of these, I thought I would try setting one up in Altirra, so added XEP80 in the firmware

got the additions disk for the driver but found all these:-

ALTXEP80 SYS   1555 29-05-23 17:17
ALTXEP8U SYS   1886 29-05-23 17:17
ALTXEP8P SYS   1567 29-05-23 17:17
ALTXEPUP SYS   1896 29-05-23 17:18
ALTXEPX  SYS   2029 29-05-23 17:18

 

First question is which one to use as none of them seem to work, the screen goes black and that's it.

I've looked through the Altirra manual and although there's loads about the XEP80, there's nothing

to tell you how to install the software or configure it, does it need some command line parameters ?

what am I missing ?

 

Link to comment
Share on other sites

In Altirra, you need to go to the "View" menu and select "XEP80" from the "Video Outputs" sub. Otherwise you're just going to be viewing your main display.

 

[Edit]

Note: it will help if you check the "Auto-Switch Video Output" from the same sub. That way you don't have to keep changing the output manually.

 

  • Like 2
Link to comment
Share on other sites

44 minutes ago, TGB1718 said:

As I'm going to build one of these, I thought I would try setting one up in Altirra, so added XEP80 in the firmware

got the additions disk for the driver but found all these:-

ALTXEP80 SYS   1555 29-05-23 17:17
ALTXEP8U SYS   1886 29-05-23 17:17
ALTXEP8P SYS   1567 29-05-23 17:17
ALTXEPUP SYS   1896 29-05-23 17:18
ALTXEPX  SYS   2029 29-05-23 17:18

Open up the Altirra Help and browse to "Emulated devices -> Additions disk", all of the files you listed above are explained there.

Link to comment
Share on other sites

I probably need to put some minimal help into the Additions disk itself. It gives a brief overview when booting the disk, but you don't see that when viewing the disk after booting DOS from another disk. And you definitely don't see the info in the help file if someone has separated the Additions disk from the emulator. The version on AtariWiki is quite old, btw -- even without the high speed support, I think that version predates some DSPFLG and margin fixes.

 

The Pico XEP80 implementation doesn't implement the UART control commands, so the ultra-speed driver variants won't work with it. Otherwise, the implementation looks based on Atari800's XEP80 emulator and should be good for the standard commands.

 

 

Link to comment
Share on other sites

4 minutes ago, phaeron said:

I probably need to put some minimal help into the Additions disk itself. It gives a brief overview when booting the disk, but you don't see that when viewing the disk after booting DOS from another disk.

That would be kind of nice, it would save a boot of the emulator to check something real quick.

Link to comment
Share on other sites

On 5/29/2023 at 2:47 PM, cbelcher said:

Will be glad to hear how everyone else's experiments go.

Got my board today, not had time to make the XEP80 but thought I would test the Pico and HDMI board before I started

with some demo stuff, looks like it's working nicely.

 

Will try to find time this weekend to build it.

  • Like 2
Link to comment
Share on other sites

On 4/18/2023 at 3:18 AM, cbelcher said:

Anyone else been able to build the .UF2 for this?  I'd like to give it a try but have been able to build all the other examples except the xep80.

 

I managed to build this today, have to admit the quality of the text is stunning, only on a breadboard at the moment, but works fine,

looks a bit fuzzy at the top, but that's just the angle I had the mobile when recording this..

 

Ignore the vertical lines on the monitor, it's a faulty one, but handy for testing things like this.

 

Also ignore the other components on the breadboard, just leftovers from something else, they are not connected,

only the Pico, HDMI interface and the lever shifter.

 

Edit: Here's the .UF2 file :)

 

20230604_160545.jpg

xep80.uf2

Edited by TGB1718
  • Like 5
  • Thanks 1
Link to comment
Share on other sites

Which xep80 driver and DOS are you using on the Atari side?

 

I’ve done something wrong on the Atari side of things apparently.   Will go back from the joystick port the the level shifter to the Pico using your driver and UF2 to eliminate those as an issue 

 

thanks!   

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

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