Jump to content
IGNORED

A workaround for the UART bug


Zerosquare

Recommended Posts

Hello!

 

Here's a little idea I had to circumvent the Jaguar's UART bug. ;)

 

The ZIP file contains a detailed description and a demo program (the source code is included).

 

Thanks for sharing this :)

 

The idea sounds interesting, and to be honest i didn't know about the described option to read the data-stream while avoiding to use the receiver.

 

I have just tested the example program, it works as described (although the blank black screen on the Jaguar irritated me first), but sadly sending a stream of data shows the drop-outs as described in the README.TXT, but the positive thing is, that the Jaguar never crashed when receiving the stream (i sent 800 ASCIIs using Hyperterminals "Send Text-file"-option).

 

What i really like in this approach is, that everything is done inside the (receiving) Jaguar, no need to change the serial transmission itself (like using more or less STOP-bits, or sending the data-bytes spread over more than just 8 serial-data-bits).

 

Kind regards

Matthias

Link to comment
Share on other sites

Hi!

 

I'm glad you like it. :)

 

The drop-out problem can be easily fixed by implementing a buffer, it's just that I was too lazy to code it ;)

(same thing for the black screen)

 

Don't be so lazy, post a second example with a buffer tomorrow ;)

 

BTW:

The "MAKEFILE" in your ZIP is more like a DOS-Batch-file, i renamed it to "M.BAT" in my environment.

 

Regards

Matthias

Link to comment
Share on other sites

Here's a little idea I had to circumvent the Jaguar's UART bug. ;)

 

The ZIP file contains a detailed description and a demo program (the source code is included).

 

Enjoy !

 

All the interesting code runs on the DSP ; the 68000 is only used as a bootstrap, then stopped

immediately after so it doesn't hog the bus (maybe that's not really necessary, but hey ;)

 

Amen to that..it is nice to see others using coding practices like this on the jag. Good work.

that is how it should be.

:)

 

Nice work!

Link to comment
Share on other sites

Well Matthias, I listened to you :)

 

Version 1.01 is ready. It can be downloaded by clicking on the link in the first post of this topic.

 

Here are the changes :

- Fixed a few bugs

- Fixed the "dropped characters" issue (by adding a 1 MB circular buffer... I hope it's enough for you ! :D)

- Made the screen green (see ? no more black screen :cool: )

- Renamed Makefile to Makefile.bat (you were right, it's actually a batch file)

 

Oh, and I've credited you in the changelog as well ;)

 

I've made a few tests by transferring a ~100 kB text file several times(and temporarily disabling the "add one to the character" to get a readable echo), it seems that no characters get dropped or corrupted.

Link to comment
Share on other sites

Wow. It's great that someone else has been able to find a possible workaround that could be used for future development.

 

... and to make the findings available to everyone is definitely a great thing and will hopefully inspire someone to make optimizations and changes to make it fully usable :)

Link to comment
Share on other sites

How fast have you been able to get the software UART to be reliable at?

 

I did a software UART on the Jag a couple years ago when flirting with my serial based download program (a CD based JUGGS).

 

I was able to get 19200 and 38400 baud working well enough with the software UART.

 

I dropped the idea because I had no problems with 38400 and slower on the built in Jag serial port, so I didn't see the value in a software UART that wasn't getting me any faster speeds. Plus for my serial download application I wanted 115200.

Link to comment
Share on other sites

How fast have you been able to get the software UART to be reliable at?
For the moment, I only tested my code at 9600 bps to verify that the implementation was working okay... The maximum speed would depend on how many cycles per second you'd allocate to the software UART, of course.

 

I did a software UART on the Jag a couple years ago when flirting with my serial based download program (a CD based JUGGS).
Were you involved in the original JUGS, or did you reverse-engineer the protocol ?

 

I dropped the idea because I had no problems with 38400 and slower on the built in Jag serial port
That's very interesting ! So you found a way to avoid the UART bug too ?
Link to comment
Share on other sites

Anyone want to share with us non-Jag programmers exactly what the UART bug is? From what I can gather it has something to do with the networking code. That would explain why Doom flakes out during deathmatches half the time.

 

Tempest

Link to comment
Share on other sites

Anyone want to share with us non-Jag programmers exactly what the UART bug is? From what I can gather it has something to do with the networking code.
Yes, the UART is the part of the Jaguar chipset which handles the networking. Due to a design error, it tends to malfunction and lock up, which halts the communication between consoles. There is a workaround mentioned in Atari's developers documentation, but it seems that it is not sufficient to avoid all problems.
Link to comment
Share on other sites

Were you involved in the original JUGS, or did you reverse-engineer the protocol ?

 

No. My protocol was my own. I was going to release the software on my website for a BJL alternative for the masses.

 

That's very interesting ! So you found a way to avoid the UART bug too ?

 

I would say I was able to avoid most bugs as long as I stayed at or below 38400.

 

Biggest thing I found was that it looked like no matter what you always got even or odd parity with the jag. I noticed when I configured my PC accordingly I could send large packets to the Jag no problem. As you mentioned sending from the Jag was no problem regardless.

 

Once I made sure I had the parity right (even or odd depending on how I configured the jag, and never set to none) things worked great. I did follow the info in Atari dev docs also when it came to avoiding the bug they mention.

 

I pretty much had rock solid 38400 and below after doing the above.

 

Since you mentioned your code works at 115200 I will have to give my download CD another go.

Link to comment
Share on other sites

Anyone want to share with us non-Jag programmers exactly what the UART bug is? From what I can gather it has something to do with the networking code. That would explain why Doom flakes out during deathmatches half the time.

 

Tempest

 

 

Its a real cheap UART that they put in there and they never bothered to debug it.

IT completely locks up the Jaguar to the point where you have to reboot. There are

workarounds being developed other than the current ones that exist.

Link to comment
Share on other sites

Anyone want to share with us non-Jag programmers exactly what the UART bug is? From what I can gather it has something to do with the networking code. That would explain why Doom flakes out during deathmatches half the time.

 

Tempest

There are

workarounds being developed other than the current ones that exist.

The more the merrier!

Link to comment
Share on other sites

Were you involved in the original JUGS, or did you reverse-engineer the protocol ?

 

No. My protocol was my own. I was going to release the software on my website for a BJL alternative for the masses.

 

That's very interesting ! So you found a way to avoid the UART bug too ?

 

I would say I was able to avoid most bugs as long as I stayed at or below 38400.

 

Biggest thing I found was that it looked like no matter what you always got even or odd parity with the jag. I noticed when I configured my PC accordingly I could send large packets to the Jag no problem. As you mentioned sending from the Jag was no problem regardless.

 

Once I made sure I had the parity right (even or odd depending on how I configured the jag, and never set to none) things worked great. I did follow the info in Atari dev docs also when it came to avoiding the bug they mention.

 

I pretty much had rock solid 38400 and below after doing the above.

 

Since you mentioned your code works at 115200 I will have to give my download CD another go.

 

Will you release your version of aswell? All extra info would be nice...

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...