• Re: BBS keypressed in WINDOWS MPY

    From g00r00@21:1/108 to Analog on Tue Mar 17 13:03:38 2020
    If you would like an example, I can provide you a snippet of code that works fine on Linux 32/64 but fails in Win32/Win64.

    Yes an example would be good, thanks

    --- Mystic BBS v1.12 A46 2020/03/17 (Windows/64)
    * Origin: Sector 7 (21:1/108)
  • From Analog@21:2/123 to g00r00 on Tue Mar 17 12:27:44 2020
    Yes an example would be good, thanks
    g00r00,

    The following code will cycle near 250 times before it actually displays anything on the screen in my Windows/32 Mystic A46 latest. If you change the delay time to something like 10 or even 5, it still counts ~250 loops before cycling. It may not be a keypressed issue only. It may be something in the delay command too. Not sure.

    An alternate way to cause the keypressed issue, is to do something like "if keypressed().


    [SNIP]
    import mystic_bbs as bbs

    KEY_ESCAPE = chr(27)
    count = 0

    while not bbs.shutdown():
    while not bbs.keypressed():
    bbs.writeln("|[X01|[Y01|08Count: |04%i" % count)
    bbs.delay(100)
    count+=1


    char, extended = bbs.getkey()
    if char == KEY_ESCAPE:
    break

    bbs.writeln("|15Exited|PA")
    [SNIP]

    |20|15ÚÄ|16|08´ |08De|07ad|15be|07a|08tz b|07b|15s
    |08ÀÄÙÃÄ¿ |08:>.|07A|08rk |0710|08:|07101|08/|0714|08.
    |04þ |08À|20|15Ä|16|08Ù |08:>.|10A|02gn |1046|08:|101|08/|10123|08.
    |04A|07n|15al|07o|08g |08:>.|12F|04sx |1221|08:|122|08/|12123|08.
    |04.|08dPR|04. |08:>.|15S|07ci |1577|08:|151|08/|15131|08. |04°±°|08±ÛÛÜÝ|08:>.|11T|03qw |111337|08:|113|08/|1113|08.

    --- Mystic BBS v1.12 A45 2020/02/09 (Linux/64)
    * Origin: deadbeatz.org (21:2/123)
  • From Analog@21:2/123 to g00r00 on Tue Mar 17 12:44:52 2020
    loops before cycling. It may not be a keypressed issue only. It may be something in the delay command too. Not sure.

    Ok on my Windows VM, the keypressed was reporting TRUE without a keypress in Mystic 1.12 A43. Now it appears it's just the DELAY function called
    immediately after a WRITE/WRITELN that causes nothing to happen for around
    250 counts in a loop. Probably a buffer flush issue I'm guessing.

    With Mystic 1.12 A46 or whatever is the most recent, the keypressed DOES seem to work, but the DELAY function masked it. I have seen the DELAY issue
    through all the releases on Windows (both on my Host and Guest VMs). I
    haven't tried it on another WIndows PC. Not sure what would cause this. If it doesn't do it on your Windows system please let me know. I"m perplexed what would cause it not to send out the buffer for ~250 cycles regardless of the DELAY time.

    Cheers,

    |20|15ÚÄ|16|08´ |08De|07ad|15be|07a|08tz b|07b|15s
    |08ÀÄÙÃÄ¿ |08:>.|07A|08rk |0710|08:|07101|08/|0714|08.
    |04þ |08À|20|15Ä|16|08Ù |08:>.|10A|02gn |1046|08:|101|08/|10123|08.
    |04A|07n|15al|07o|08g |08:>.|12F|04sx |1221|08:|122|08/|12123|08.
    |04.|08dPR|04. |08:>.|15S|07ci |1577|08:|151|08/|15131|08. |04°±°|08±ÛÛÜÝ|08:>.|11T|03qw |111337|08:|113|08/|1113|08.

    --- Mystic BBS v1.12 A45 2020/02/09 (Linux/64)
    * Origin: deadbeatz.org (21:2/123)