Giter Site home page Giter Site logo

[bug] Latest WinUAE serial port about winuae HOT 12 CLOSED

midwan avatar midwan commented on September 1, 2024
[bug] Latest WinUAE serial port

from winuae.

Comments (12)

tonioni avatar tonioni commented on September 1, 2024 1

Thanks. Fix commited (that also works when ser_accurate == not cycle-accurate mode is false)

from winuae.

midwan avatar midwan commented on September 1, 2024

Did some more tests today:

  • WinUAE 4.4.0 <-> WinUAE 4.4.0 with Stunt Car Racer = works as expected
  • WinUAE 4.9.1 <-> WinUAE 4.9.1 with Stunt Car Racer = does not work (link never completes)
  • WinUAE 4.4.0, 4.9.1 and 4.10.1 <-> real Amiga with Stunt Car Racer = does not work (did it ever?)

Something changing from 4.4.0 to 4.9.x and onwards seems to have broken the serial port comms between WinUAE instances at least.

At the same time, it would be great if this would work when connected with a real Amiga, as well. :)

from winuae.

tonioni avatar tonioni commented on September 1, 2024

If it only affects Stunt Car Racer, it probably is 9-bit serial mode related. Which is a hack in UAE, it splits it in two when sending and receive side merges them back. This is what probably is broken.

PC serial ports don't support 9-bit mode (11 bits total, 1 start, 9 data bits, 1 stop bit, they do support parity as an extra bit but it is generated by the UART and not user controllable) which makes it impossible to have working PC to Amiga connection when program uses 9-bit mode.

from winuae.

midwan avatar midwan commented on September 1, 2024

@tonioni
I think it's more than just Stunt Car Racer (though I haven't yet tested other games):

  • 2 instances of WinUAE 4.4.0 connected with a null-modem cable, work with that game
  • 2 instances of WinUAE 4.9.x or newer, do not work (the link is never established).

Based on the above, I think that the chipset rewrite might have broken something that used to work with serial support.

Besides the above and that game, I also tested a serial graphics tablet which works on the Amiga: an Aiptek Hyperpen 4000, using FormAldiHyd by Chris Hodges (http://aminet.net/package/driver/input/FormAldiHyd). I realize this is probably hard for you to test of course, but it also did not work (the program reports no connection), in any WinUAE version from 4.4.0 until the latest.

This might indicate that there's something else "missing" or different, but since this is not a game I am not sure if it's also using the same 9-bit serial mode that you mentioned?

I'll test a few more games when I get a chance, to establish a better sample of what works or not.

from winuae.

tonioni avatar tonioni commented on September 1, 2024

I tried USB serial adapter to real Amiga and terminal program running on both UAE and real Amiga. Serial port seemed to work perfectly fine.

from winuae.

midwan avatar midwan commented on September 1, 2024

@tonioni
Did you try any games? How about Stunt Car Racer specifically?
That used to work in 4.4.0, but not since 4.9.x, when using 2 WinUAE instances (on different machines), or Amiga to WinUAE.

from winuae.

tonioni avatar tonioni commented on September 1, 2024

Don't have multiple USB RS232 adapters (yet).

More details needed. Does same happen in cycle-exact and non-CE approximate CPU speed modes? What was first WinUAE beta that introduced the problem? (check EAB beta threads for beta download links).

(SCR still isn't going to ever work because no PC serial port or adapter supports 9 data bit mode. Unless someone creates MCU based custom adapter)

from winuae.

midwan avatar midwan commented on September 1, 2024

I'll do more tests and provide more details, no problem.
Regarding SCR, did you miss the part where I mentioned it is working, with WinUAE 4.4.0?
I used the default Quickstart settings for A500 for this game, just enabling the serial port and nothing else (leaving RTS/CTS on).

I will also test some more games and see what happens.

from winuae.

midwan avatar midwan commented on September 1, 2024

I run a few more tests, so here are the results:

WinUAE <-> WinUAE (2 different PCs, connected with USB to serial and null modem cable)

  • Stunt Car Racer
    4.10.1: Reports "Link complete" but does not proceed after that.
    Non-Cycle Exact: no difference.
    Direct mode: no difference
    4.4.0: Works fine with WinUAE 4.4.0, using the default settings

  • Lotus II
    4.10.1: Link succeeds, game starts, but it's laggy and soon after it goes back to the title screen (probably aborts link)
    4.4.0: Using the defaults, seems a bit better (less jittery), but eventually does the same thing.
    Non-Cycle Exact: Game seems to link, but never proceeds (level not loaded, game seems stuck in a black screen)
    Direct mode:
    4.10.1 game starts, but only one instance seems working - the other is not responding.
    4.4.0 works fine.

  • Knights of the Sky (Direct)
    4.10.1: One instance connects, the other waits forever in the "connecting you" stage
    4.4.0: Works fine.

If you need more examples, I can test more of these :)

from winuae.

midwan avatar midwan commented on September 1, 2024

@tonioni
I went through the different betas, and I found the one that started breaking things:

4920b2

Up to 4920b1 Stunt Car Racer, Lotus and Knights of the Sky still work, but with 4920b2 onwards they shows the above problematic behavior.

from winuae.

midwan avatar midwan commented on September 1, 2024

@tonioni
And the actual line that breaks it, in serial_win32.cpp, is this:

in uae_u16 SERDATR(void):

if (!data_in_serdat || (ser_accurate && get_cycles() >= data_in_serdat_delay)) {

if I change it to:

if (!data_in_serdat && (ser_accurate && get_cycles() >= data_in_serdat_delay)) {

then it works as expected.

from winuae.

midwan avatar midwan commented on September 1, 2024

Great, thanks! I'll merge these changes in Amiberry as well!

from winuae.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.