Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
|
Forum Index : Microcontroller and PC projects : CMM2: Scott Adams Adventure Game Interpreter
Page 5 of 5 | |||||
Author | Message | ||||
Turbo46 Guru Joined: 24/12/2017 Location: AustraliaPosts: 1592 |
Hi Tom, I think I have transferred the files to you. Please let me know if you get them. A bit of detective work suggests the verb should be 81. It's not used in the walkthrough and I don't think it's important. Possibly interpreters only throw an error when you try to use the noun/verb combination? My idea of a menu for selection of the games is one that contains only the one game initially - Pirate. It would allow you to add or subtract games to or from its list. When adding it would present a list of data files in the DATA directory, allow you to add it to the list and prompt for a name for the game, possibly sort them alphabetically and save them to the menu file. Happy new year, I hope it's better for everyone than the last. Bill Keep safe. Live long and prosper. |
||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 3833 |
Happy New Year Bill, Files received. I'm juggling a number of things at the moment, but will try to test this and get back to you ASAP. Best wishes, Tom Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
Turbo46 Guru Joined: 24/12/2017 Location: AustraliaPosts: 1592 |
No hurry Tom, If you want to quickly find the additions I have made just look for 'Bill' in the comments. Please feel free to remove them, they are only there to point you to the damage I may have done. For advdata.inc, you probably have better ways to do what I have done to import the data into a useable format. Cheers, Bill Keep safe. Live long and prosper. |
||||
Turbo46 Guru Joined: 24/12/2017 Location: AustraliaPosts: 1592 |
Hi Tom, Sorry I forgot to mention that Brian Howarth's games abbreviate the directions in the data file: The interpreter shows: "N" works to go north "GO NORTH" works too, but: "GO NORT" doesn't. That could be a bit confusing but I forgot to look for a remedy. Cheers Bill Keep safe. Live long and prosper. |
||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 3833 |
Thanks Bill, I'm sure I can find a "fix" for that. Tom Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
Turbo46 Guru Joined: 24/12/2017 Location: AustraliaPosts: 1592 |
I know you can Tom. Thinking about that, he uses a vocabulary word length of 4 for that game and I guess that his game compiler truncates them to 4 characters. I haven't checked all of the available games but Scott Adams games use mostly a word length of 3. If that was used by others it may truncate the other directions as well. Cheers Bill Keep safe. Live long and prosper. |
||||
Turbo46 Guru Joined: 24/12/2017 Location: AustraliaPosts: 1592 |
Hi Tom, I've written a little utility to read a .dat file that uses LF characters as line endings and convert them to CR. It produces a second copy of 'filename.dat' named 'filename1.dat'. Use it on any .dat file which gives a 'line too long' error (like 'marooned.dat'). You may want to include it with the interpreter package. Bill lf2cr.zip Keep safe. Live long and prosper. |
||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 3833 |
Hey Bill, I believe you have got your carriage returns and line feeds mixed up. CR "\r" is ASCII 13 and LF "\n" is ASCII 10. So does that mean the the problem is actually files using only CR (i.e. those from a Mac) ? - that would explain why I've never seen this issue on the CMM2 despite working with files (including .BAS) using only *nix "\n" line-endings - I think MMBasic handles those fine. The bullet-proof solution would be to treat adventure .dat files as binary and write our own read_line() function on top of that that can handle lines ending "\r" or "\n" or "\r\n". Best wishes, Tom Edited 2021-01-05 20:06 by thwill Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
Turbo46 Guru Joined: 24/12/2017 Location: AustraliaPosts: 1592 |
Oops, that's what happens when I trust my memory. Benny Hill explained why you must never ASSUME. I did some checking and found that: Adv01.dat lines end with hex 0A. MAROONED,dat lines end with hex 0D. MMBasic lines in files saved by PRINT #n, "text" end with hex 0D OA. I think you're speaking 'C' but I agree, I think that MMBasic only has trouble with the 'MAROONED.dat' style. I see a problem if you are checking for 0A 0D you may be reading the first character of the next line if not EOF and would have to save that character for the next read_line() call. If you are unable to, would you like me to have a go at it? There is another problem. I found a copy of 'Mini-venture' by Bruce Hansen and it contains the line: There is no space between the second quote and the room number. In Advdata.inc I have used the space between the quote and the number as the delimiter when parsing the line into room description and room number. That will have to change if that dat file is to be accommodated. Bill Keep safe. Live long and prosper. |
||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 3833 |
Hi Bill, Unfortunately the latest UK lockdown and the requirements of child-care seems to have knocked me out of the game for the moment. Yes, unless you are reading only a single byte from the file at a time (which I don't recommend) some form of buffering will be required. Because the actual data file is small compared to the CMM2's memory you could even read the whole file into a LONGSTRING and walk through that to identify the individual lines. By all means if you are still interested then go for it. Sounds fairly niche, I'll leave it to your judgement. Best wishes, Tom Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
zeitfest Guru Joined: 31/07/2019 Location: AustraliaPosts: 375 |
Just for interest - ZORK on cheap itsy M4 |
||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 3833 |
Hi Bill, Just a line to say that I haven't forgotten about this and it has finally risen to the top of the stack. Hope you are keeping well, Tom Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
Turbo46 Guru Joined: 24/12/2017 Location: AustraliaPosts: 1592 |
Thanks Tom, Good news! I knew you hadn't forgotten. I'm looking forward to the end result. Cheers Assistant Bill Keep safe. Live long and prosper. |
||||
Page 5 of 5 |
Print this page |