VOGONS


First post, by red_avatar

User metadata
Rank Oldbie
Rank
Oldbie

I encountered a rather odd problem. I had a ton of problems getting certain games to work on my Pentium 75 and discovered that the reason is the batch files. Games I copied either directly to the SD card or through FTP (doesn't matter), have corrupted batch files. Well, when I say corrupted, I mean that DOS can't properly parse them. When I open these batch files in EDIT and save them, they work as intended.

Does anyone know why this is, how I can avoid it and whether other file types may be affected?

Retro game fanatic.
IBM PS1 386SX25 - 4MB
IBM Aptiva 486SX33 - 8MB - 2GB CF - SB16
IBM PC350 P233MMX - 64MB - 32GB SSD - AWE64 - Voodoo2
PIII600 - 320MB - 480GB SSD - SB Live! - GF4 Ti 4200
i5-2500k - 3GB - SB Audigy 2 - HD 4870

Reply 1 of 2, by Jorpho

User metadata
Rank l33t++
Rank
l33t++

You are probably encountering a line-terminator inconsistency. See for instance http://www.cs.toronto.edu/~krueger/csc209h/tu … ne-endings.html and https://en.wikipedia.org/wiki/Newline .

A lot of editors automatically account for single-byte line terminators, but you should be able to check by using "type whatever.bat" on the DOS command line. If everything ends up getting output on one line, then that's your problem.

I can imagine your FTP client and/or server might be automatically changing the line endings, but I don't know why that would happen with the SD card. FTP clients can usually solve the problem by toggling the "binary"/"Type I" transfer flag somewhere. I don't know why your FTP client might be set up transfer .bat files differently.

This was a very common problem once and utilities for fixing it abound. The easy one to remember is unix2dos.
http://dos2unix.sourceforge.net/

Reply 2 of 2, by red_avatar

User metadata
Rank Oldbie
Rank
Oldbie
Jorpho wrote on 2020-03-05, 17:45:
You are probably encountering a line-terminator inconsistency. See for instance http://www.cs.toronto.edu/~krueger/csc209h/tu … […]
Show full quote

You are probably encountering a line-terminator inconsistency. See for instance http://www.cs.toronto.edu/~krueger/csc209h/tu … ne-endings.html and https://en.wikipedia.org/wiki/Newline .

A lot of editors automatically account for single-byte line terminators, but you should be able to check by using "type whatever.bat" on the DOS command line. If everything ends up getting output on one line, then that's your problem.

I can imagine your FTP client and/or server might be automatically changing the line endings, but I don't know why that would happen with the SD card. FTP clients can usually solve the problem by toggling the "binary"/"Type I" transfer flag somewhere. I don't know why your FTP client might be set up transfer .bat files differently.

This was a very common problem once and utilities for fixing it abound. The easy one to remember is unix2dos.
http://dos2unix.sourceforge.net/

I figured it was the line terminator. Oddly enough not all batch files have problems - it's certain dos commands that don't work for some reason. Thanks for the info!

Retro game fanatic.
IBM PS1 386SX25 - 4MB
IBM Aptiva 486SX33 - 8MB - 2GB CF - SB16
IBM PC350 P233MMX - 64MB - 32GB SSD - AWE64 - Voodoo2
PIII600 - 320MB - 480GB SSD - SB Live! - GF4 Ti 4200
i5-2500k - 3GB - SB Audigy 2 - HD 4870