• ANSI, BIN, SAUCE, and EOF

    From Kirkman@VERT/GUARDIAN to All on Wed Apr 29 21:50:19 2015
    One frustration when playing with ANSI or BIN files using frame.js is SAUCE.

    I understood from the SAUCE spec that SAUCE stuff comes after an EOF character '\0X1A', which generally prevented old terminals and programs from processing the SAUCE info.

    This doesn't seem to stop Frame.js. It attempts to render the sauce info as if it was graphic information.

    I want to propose that Frame.js be adjusted to recognize SAUCE records.

    There could be a lot of benefits from parsing SAUCE records, like getting a file's width and height and not needing it specified in code. That'd be a handy feature. However, I recognize that parsing SAUCE is probably asking way too much.

    So how about if Frame.js could at least look for SAUCE and strip/ignore it while parsing the ANSI or BIN file?

    --Josh

    ////--------------------------------------------------
    BiC -=- http://breakintochat.com -=- bbs wiki and blog

    ---
    þ Synchronet
  • From Digital Man@VERT to Kirkman on Wed Apr 29 22:23:49 2015
    Re: ANSI, BIN, SAUCE, and EOF
    By: Kirkman to All on Wed Apr 29 2015 02:50 pm

    One frustration when playing with ANSI or BIN files using frame.js is SAUCE.

    I understood from the SAUCE spec that SAUCE stuff comes after an EOF character '\0X1A', which generally prevented old terminals and programs from processing the SAUCE info.

    This doesn't seem to stop Frame.js. It attempts to render the sauce info as if it was graphic information.

    I want to propose that Frame.js be adjusted to recognize SAUCE records.

    There could be a lot of benefits from parsing SAUCE records, like getting a file's width and height and not needing it specified in code. That'd be a handy feature. However, I recognize that parsing SAUCE is probably asking way too much.

    So how about if Frame.js could at least look for SAUCE and strip/ignore it while parsing the ANSI or BIN file?

    Or just stop processing the ANSI file when a Ctrl-Z (CP/M EOF) character is read. Synchronet itself will not send Ctrl-Z characters contained in .ASC/.ANS files to the user, but it doesn't stop processing the file. I imagine if you had sauce information in ANSI files that were displayed in the general text file section or as logon messages or menus, you'd have a very similar issue.

    digital man

    Synchronet "Real Fact" #79:
    85 SBBSecho registrations were sold (at $49) between 1994 and 1996.
    Norco, CA WX: 91.0øF, 14.0% humidity, 13 mph E wind, 0.00 inches rain/24hrs

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuce@VERT/SYNCNIX to Digital Man on Thu Apr 30 04:26:53 2015
    Re: ANSI, BIN, SAUCE, and EOF
    By: Digital Man to Kirkman on Wed Apr 29 2015 03:23 pm

    Or just stop processing the ANSI file when a Ctrl-Z (CP/M EOF) character is read. Synchronet itself will not send Ctrl-Z characters contained in .ASC/.ANS files to the user, but it doesn't stop processing the file. I imagine if you had sauce information in ANSI files that were displayed in the general text file section or as logon messages or menus, you'd have a very similar issue.

    Doesn't really work for .BIN files used by frame.js since it uses binary attributes. Also, anything with a rightward arrow will stop processing early.

    I'll take a quick look.

    ---
    http://DuckDuckGo.com/ a better search engine that respects your privacy.
    þ Synchronet þ My Brand-New BBS (All the cool SysOps run STOCK!)
  • From Deuce@VERT/SYNCNIX to Kirkman on Thu Apr 30 05:10:06 2015
    Re: ANSI, BIN, SAUCE, and EOF
    By: Kirkman to All on Wed Apr 29 2015 02:50 pm

    There could be a lot of benefits from parsing SAUCE records, like getting a file's width and height and not needing it specified in code. That'd be a handy feature. However, I recognize that parsing SAUCE is probably asking way too much.

    Done. Please test it out. You shouldn't need to pass width/height now when using the frame.load() method if there's SAUCE.


    ---
    http://DuckDuckGo.com/ a better search engine that respects your privacy.
    þ Synchronet þ My Brand-New BBS (All the cool SysOps run STOCK!)
  • From Kirkman@VERT/GUARDIAN to Deuce on Thu Apr 30 16:26:55 2015
    There could be a lot of benefits from parsing SAUCE records, like getting a file's width and height and not needing it specified in code. That'd be a handy feature. However, I recognize that parsing SAUCE is probably asking way too much.

    Done. Please test it out. You shouldn't need to pass width/height now when using the frame.load() method if there's SAUCE.


    Wow, that was fast. I'll give it a look tonight. Thanks so much for doing that!

    --Josh

    ////--------------------------------------------------
    BiC -=- http://breakintochat.com -=- bbs wiki and blog

    ---
    þ Synchronet
  • From Kirkman@VERT/GUARDIAN to Deuce on Fri May 1 03:53:22 2015
    Done. Please test it out. You shouldn't need to pass width/height now when using the frame.load() method if there's SAUCE.

    I did a little bit of testing tonight. Seems to be pretty backward-compatible. Most of the recent games I tried all worked fine (Bubble Boggle, Star Trek, Chicken Delivery, etc).

    But I ran into trouble when I tried to display ANSIs or BINs with SAUCE in my own little test door.

    * BINs with SAUCE displayed okay if I specified a width/height in load(). If I omitted the w/h, I would get an error.

    * ANSIs with SAUCE would not display at all no matter what I tried.

    I tried to do some debugging, and as best as I can tell, the new code is not detecting the file_type and data_type correctly.

    --Josh

    ////--------------------------------------------------
    BiC -=- http://breakintochat.com -=- bbs wiki and blog

    ---
    þ Synchronet
  • From Deuce@VERT/SYNCNIX to Kirkman on Fri May 1 07:09:40 2015
    Re: Re: ANSI, BIN, SAUCE, and EOF
    By: Kirkman to Deuce on Thu Apr 30 2015 08:53 pm

    But I ran into trouble when I tried to display ANSIs or BINs with SAUCE in my own little test door.

    * BINs with SAUCE displayed okay if I specified a width/height in load(). If I omitted the w/h, I would get an error.

    What error?

    * ANSIs with SAUCE would not display at all no matter what I tried.

    What did you try?

    I tried to do some debugging, and as best as I can tell, the new code is not detecting the file_type and data_type correctly.

    Are you positive the SAUCE data is correct? Feel free to email test scripts and ANS/BIN files to myhuge@cox.net so I can take a look at them.

    ---
    http://DuckDuckGo.com/ a better search engine that respects your privacy.
    þ Synchronet þ My Brand-New BBS (All the cool SysOps run STOCK!)
  • From Kirkman@VERT/GUARDIAN to Deuce on Fri May 1 18:19:04 2015
    Re: Re: ANSI, BIN, SAUCE, and EOF
    By: Deuce to Kirkman on Fri May 01 2015 12:09 am

    * BINs with SAUCE displayed okay if I specified a width/height in
    load(). If I omitted the w/h, I would get an error.

    What error?

    "uncaught exception: unknown graphic dimensions"

    Are you positive the SAUCE data is correct? Feel free to email test scripts and ANS/BIN files to myhuge@cox.net so I can take a look at them.

    I'm no expert, so I can't swear that it's correct. I'm using PabloDraw 3.2.1 on the Mac. I know its BIN handling has some bugs, but the files I created render perfectly in the Escapes app, and also on the AnsiLove.js test page.

    I'll email to you my test code plus a sample .bin and .ans file.

    I put some debugging statements into frame.js to see what the code was calculating for file_type, data_type, etc. Then I compared those values to what Escapes said for the same file. Here are the results. Frame.js appears to be wrong:

    test.bin (frames.js) | datatype: 40 | filetype: 0 | tinfo1: 0 | tinfo2: 0 test.bin (escapes) | datatype: 5 | filetype: 40 | tinfo1: 0 | tinfo2: 0

    test.ans (frames.js) | datatype: 1 | filetype: 80 | tinfo1: 6144 | tinfo2: 0 test.ans (escapes) | datatype: 1 | filetype: 1 | tinfo1: 80 | tinfo2: 24

    --Josh

    ////--------------------------------------------------
    BiC -=- http://breakintochat.com -=- bbs wiki and blog

    ---
    þ Synchronet
  • From Deuce@VERT/SYNCNIX to Kirkman on Fri May 1 17:21:50 2015
    Re: Re: ANSI, BIN, SAUCE, and EOF
    By: Kirkman to Deuce on Fri May 01 2015 11:19 am

    I'll email to you my test code plus a sample .bin and .ans file.

    Thanks. Fixed now (at least for your test script).

    ---
    http://DuckDuckGo.com/ a better search engine that respects your privacy.
    þ Synchronet þ My Brand-New BBS (All the cool SysOps run STOCK!)