Advertisement
plirof2

SGD format v001

Apr 10th, 2024 (edited)
777
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. I have a DOS ascii text database file with the specification I give below. Each line is one record.
  2. Can you make me a PHP script that reads a file,speperates fields and prints them on screen?
  3. The current database format is:
  4.  
  5. Field        Start Length  Notes
  6.  
  7. Name             1     36
  8. Year            38      4  Year-2000 compliant :-)
  9. Publisher       43     36
  10. Memory          80      3  Either one of " 16", " 48", "128", "4/1", "US0",
  11.                            " +2", " +3" or "Pen"
  12. # Players       84      1
  13. Together        86      1  Only 'Y' if > 1 player, space otherwise
  14. Joysticks       88      5  Shrunk leftward, order is 'K12CR' for
  15.                            Kempston, Intf2#1, Intf2#2, Cursor and Redefineable.
  16. PC-Name         94     12  The '.'s are aligned (raw name padded)
  17. Type           107      7
  18. PathIndex      115      3  Index number of the appropriate `GameDir' entry
  19. FileSize       119      7  Is '+' if the size has more than 7 digits
  20. Orig screen    127      1  'Y' if checked, space otherwise
  21. Origin         129      1  ' ' = (unknown)
  22.                           'O' = Original release
  23.                           'R' = Re-release
  24.                           'C' = Compilation release
  25.                           'M' = Magazine conver-tape version
  26.                           'T' = Type-in
  27.                           'H' = Hacked/cracked version
  28.                           'I' = Incomplete version
  29.                           'B' = Buggered/corrupted version
  30. FloppyId       131      4  Marked floppy number, or 0 for harddisk etc.
  31. Emul override  136      2  -1 = none
  32.                           0  = Z80
  33.                           1  = JPP
  34.                           2  = Warajevo
  35.                           3  = X128
  36.                           4  = WSpecEm
  37.                           5  = ZX
  38.                           6  = Spanish
  39.                           7  = ZX-32
  40.                           8  = R80
  41.                           9  = Russian/Shalayev
  42.                           10 = Russian/Yudin
  43. AYSound        139      1  'Y' if checked, space otherwise
  44. MultiLoad      141      1  'Y' if multi-load in both 48K and 128K mode
  45.                           '4' if multi-load only in 48K mode
  46.                           ' ' if not multi-load at all
  47. Language       143      3
  48. Score          147      3  0  = not set
  49. Author         151    100
  50.  
  51. All fields are seperated with 1 space, each line is exactly 250 characters.
  52. Numerical fields are aligned right, plain text fields are aligned left.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement