The hobbit: developing the parser

The place for codemasters or beginners to talk about programming any language for the Spectrum.
MrPixel
Microbot
Posts: 170
Joined: Sat Mar 24, 2018 7:42 pm

The hobbit: developing the parser

Post by MrPixel »

what program did Veronika Megler use to the the parser. also, how were the graphics created? Assembly? each area takes a bit to load but i'm curious nonetheless. hoping to make a version for the atari 800 some day (the lack of an IF- Then command notwithstanding)
User avatar
Einar Saukas
Bugaboo
Posts: 3070
Joined: Wed Nov 15, 2017 2:48 pm

Re: The hobbit: developing the parser

Post by Einar Saukas »

Everything coded in Assembly. The parser was implemented from scratch.
Nomad
Manic Miner
Posts: 600
Joined: Thu Dec 28, 2017 12:38 pm

Re: The hobbit: developing the parser

Post by Nomad »

She was an expert in database design on early micros. This is reflected in the overall design of the parser/tokenizer & how the text printing is handled. That is why you don't see any fan translations of the hobbit. It's not just a case of swapping out strings.

Like Einar says the Hobbit is assembly programming. You take a look at the disassembly. It is quite hard to understand even when its annotated. To port that to 6502 would be quite a task. I figure you would need to be very good at Atari programming to pull it off.

There was a guy who asked about doing exactly this thing on the atari forums and the consensus view was it was going to be an insanely difficult task. Especially if you are new to Atari 800 programming. (Actually if I remember they flat out told the guy he would never be able to do it)

Go for a simple program first. Starting with the Hobbit is got to be one of the hardest things you could attempt to port. Aside from a 3d engine.

Why not have a go at porting Gossip to the ZX Spectrum. That was a great little game for the Atari.

[media]https://www.youtube.com/watch?v=OcEfaG9jIoI[/media]

I am guessing you want to look at the dissasembly of the Hobbit.

http://opensourcezx.untergrund.net/file ... hobbit.txt

It does have some annotation, check it out for yourself.
MrPixel
Microbot
Posts: 170
Joined: Sat Mar 24, 2018 7:42 pm

Re: The hobbit: developing the parser

Post by MrPixel »

just one question: how would i change 6502 to z80 code? and vice versa?

also, i can't find the disassembly
Last edited by MrPixel on Tue Apr 10, 2018 11:52 pm, edited 1 time in total.
User avatar
Sokurah
Manic Miner
Posts: 283
Joined: Tue Nov 14, 2017 10:38 am
Contact:

Re: The hobbit: developing the parser

Post by Sokurah »

Nomad wrote: Tue Apr 10, 2018 5:01 pm Like Einar says the Hobbit is assembly programming. You take a look at the disassembly. It is quite hard to understand even when its annotated. To port that to 6502 would be quite a task. I figure you would need to be very good at Atari programming to pull it off.

There was a guy who asked about doing exactly this thing on the atari forums and the consensus view was it was going to be an insanely difficult task. Especially if you are new to Atari 800 programming. (Actually if I remember they flat out told the guy he would never be able to do it)

Go for a simple program first. Starting with the Hobbit is got to be one of the hardest things you could attempt to port. Aside from a 3d engine.
MrPixel wrote: Tue Apr 10, 2018 11:35 pm just one question: how would i change 6502 to z80 code? and vice versa?
That is not something you "just do". If you have to ask then you don't have what it takes to do it. Didn't you read above?
Website: Tardis Remakes / Mostly remakes of Arcade and ZX Spectrum games.
My games for the Spectrum: Dingo, The Speccies, The Speccies 2, Vallation & Sqij.
Twitter: Sokurah
MrPixel
Microbot
Posts: 170
Joined: Sat Mar 24, 2018 7:42 pm

Re: The hobbit: developing the parser

Post by MrPixel »

i meant for Gossip.
Nomad
Manic Miner
Posts: 600
Joined: Thu Dec 28, 2017 12:38 pm

Re: The hobbit: developing the parser

Post by Nomad »

Chris Crawford is the author. I *think* he released the source to Gossip. Like he did with Eastern Front.

The Game and instructions

https://www.atariarchives.org/APX/showi ... nknown_gos

I know he talked about Gossip in his book, he also talked about it in his discussions at conferences and seminars.
Spoiler
Chris Crawford on game design - Chapter 19: Gossip
Source code:
Spoiler
Crawford also uploaded his design diaries for Gossip - you get a good insight into his thought process and how he tackled writing the game/problems.
Spoiler
Now you look at the code and start the port to z80 from 6502. Good luck.

Read the book, play the game, look at the documentation, examine the Atari source.

Bonus Round:

Here is his Get Lamp interview.

[media]https://www.youtube.com/watch?v=3BPERIDSxKo[/media]

Talks about 'interpersonal games' (inc. Gossip), IF, Graphics vs Text in text adventures, parser frustration and crap puzzles. So its pretty reliant to the topic :lol:
Bizzley
Microbot
Posts: 124
Joined: Thu Nov 16, 2017 10:47 am

Re: The hobbit: developing the parser

Post by Bizzley »

MrPixel wrote: Tue Apr 10, 2018 11:35 pm just one question: how would i change 6502 to z80 code? and vice versa?
also, i can't find the disassembly
To be honest I think the best way for you to produce a viable Spectrum game with your current knowledge is to use a program like Jonathan Cauldwell's Arcade Game Designer - though I'm sure other similar all-in-one packages are available. This seems quite capable of producing good quality results without you having to go anywhere near Z80 or BASIC.

I'm sure there are people on here who can help you get to grips with this kind of software but you have to remember it's just a tool - the same as a Z80 assembler or a copy of The Quill is just a tool. You have to learn how to use any tool and that takes time and effort, plenty of practice and making mistakes before you can produce anything you feel capable of sharing with others.

If however you really want to learn Z80 then it's time to knuckle down and put in the effort. Unless you are one of those gifted people who can pick up a language - spoken or computer - in a matter of weeks then it's time to hit the books; Z80 programming, the Zaks book, assembler instruction manuals, Spectrum manuals, on-line guides etc. After that it gets harder, you have to take all that knowledge and do something constructive with it. If you want to write a game then you might get lucky and find someone who will do graphics and sound for you otherwise you better learn to do them yourself which means more reading, learning and experimenting (and of course having some talent in those areas to begin with.)

Some people find the whole procedure worth the effort, others just give up. Some people 'get it' right away while for others it can take years before anything even starts to make sense. Like it did for me. So it's time to take an honest appraisal of what you want to achieve and how you want to go about it and decide the path you want to take. You've been given plenty of pointers by others on how to get started, have you actually taken any of these suggestions on board, followed them up and come to any conclusions about what you feel you're capable of doing?
"He made eloquent speeches to an audience consisting of a few depressed daffodil roots, and sometimes the cat from next door."
Ralf
Rick Dangerous
Posts: 2279
Joined: Mon Nov 13, 2017 11:59 am
Location: Poland

Re: The hobbit: developing the parser

Post by Ralf »

If you want to write a Spectrum game with minimal effort and acceptable result, use AGD.

Assembler is hard, especially at beginning. Later it becomes easier but you have to get some practice.

And porting a game from Atari to Spectrum is even harder in my opinion that writing a completely new game on Spectrum.

In case of new game you need to know:
-Z80 assembler
-architecture of Zx Spectrum

In case of game port you need to know:
-Z80 assembler
-6502 assembler
-architecture of Zx Spectrum
-architecture of 8-bit Atari
Nomad
Manic Miner
Posts: 600
Joined: Thu Dec 28, 2017 12:38 pm

Re: The hobbit: developing the parser

Post by Nomad »

Agree with the guys here Senor Pixel.

Whatever you decide to do, Game editor, Basic, or Assembly. Think about doing a development log - that way you can write about your progress and questions on a regular basis. It will help you stick to your stated goals and keep you motivated.

No shame in using the editor - you will be able to get a working program much faster that way but you still have to learn the tool. When you get enough confidence, get a few projects under your belt move on to Assembly. Or do some hybrid Basic/Assembly monster. :lol:

The Main thing is to start the journey, document your progress. Set targets/goals/milestones.

With Atari 800 you also are going to be spoiled with the amount of cool hardware support you have for creating graphics and sound. A lot of what you need to do on the Z80 is handled by dedicated chips on the Atari.

That would have some headaches for doing a port, because some stuff you can do on the Atari that is a pita or impossible on the Spectrum.

[media]https://www.youtube.com/watch?v=EItr8jSyxXY[/media]
[media]https://www.youtube.com/watch?v=ZJf4OjE6IXA[/media]
[media]https://www.youtube.com/watch?v=LLowdBQToV8[/media]

Most programmers would have killed for this kind of hardware support on the spectrum :lol:
MrPixel
Microbot
Posts: 170
Joined: Sat Mar 24, 2018 7:42 pm

Re: The hobbit: developing the parser

Post by MrPixel »

one last thing. i sent a few sna. files to the admin and he has been having trouble opening them. is there a way to convert sna. files to a form that he can open? i send them and he said that it just wouldn't open. i tried Zip files, i tried tzx, no result. any ideas?
User avatar
PeterJ
Site Admin
Posts: 6853
Joined: Thu Nov 09, 2017 7:19 pm
Location: Surrey, UK

Re: The hobbit: developing the parser

Post by PeterJ »

Which emulator are you creating them from [mention]MrPixel[/mention].

Talk us briefly through the process you are following. Can you load the files back into your emulator?

The ones you sent us seemed to completely crash Fuse and lock my PC which was very impressive!

As [mention]Nomad[/mention] said get yourself a Dropbox account and share the file here.
User avatar
R-Tape
Site Admin
Posts: 6353
Joined: Thu Nov 09, 2017 11:46 am

Re: The hobbit: developing the parser

Post by R-Tape »

MrPixel wrote: Wed Apr 11, 2018 6:13 pm one last thing. i sent a few sna. files to the admin and he has been having trouble opening them. is there a way to convert sna. files to a form that he can open? i send them and he said that it just wouldn't open. i tried Zip files, i tried tzx, no result. any ideas?
I didn't see a .sna file, perhaps an email got buried. I only got the .TZX with no code blocks or header.

Feel free to email me another snapshot (in your emulator of choice with the BASIC visible or the game running properly, go Save As, and pick one of the snapshot options). When you email let me know what kind of game it is (ZX81, 48K)
MrPixel
Microbot
Posts: 170
Joined: Sat Mar 24, 2018 7:42 pm

Re: The hobbit: developing the parser

Post by MrPixel »

i sent it
User avatar
jmk
Drutt
Posts: 26
Joined: Mon Nov 13, 2017 2:23 pm

Re: The hobbit: developing the parser

Post by jmk »

I helped to debug the Dragon/CoCo (6809) port of The Hobbit and I have to agree that the code is unintuitive.

It would be a difficult task to convert the code from Z80 to 6502, certainly not a task for a beginner. However, there are conversions of The Hobbit to 6502-based systems like the C64, Apple 2, BBC Micro and Oric. If you can find the source code to any of them, that would be a much simpler task.
Just like before, it's yesterday once more.
MrPixel
Microbot
Posts: 170
Joined: Sat Mar 24, 2018 7:42 pm

Re: The hobbit: developing the parser

Post by MrPixel »

i'd have an easier time writing a better basic for the commodore vic 20 to be honest. i;ll save the porting jobs for when i have more experience
Nomad
Manic Miner
Posts: 600
Joined: Thu Dec 28, 2017 12:38 pm

Re: The hobbit: developing the parser

Post by Nomad »

Image

:shock:
MrPixel
Microbot
Posts: 170
Joined: Sat Mar 24, 2018 7:42 pm

Re: The hobbit: developing the parser

Post by MrPixel »

Nomad wrote: Thu Apr 12, 2018 5:32 am Image

:shock:
:?:
spectron
Drutt
Posts: 25
Joined: Thu Mar 29, 2018 3:27 pm

Re: The hobbit: developing the parser

Post by spectron »

You might want to take a look at this:-

http://members.aon.at/~ehesch1/wl/wl.htm

"WILDERLAND (WL) allows you to see what's REALLY going on in this wonderful world created by Veronika Megler and Philip Mitchell in 1982 at Melbourne House. It runs the original game code in a rudimentary Spectrum emulator, while displaying the state of objects and animals, the current positions of the latter, and a log what all the other creatures (NPC) do while Bilbo is in one place. "
Nomad
Manic Miner
Posts: 600
Joined: Thu Dec 28, 2017 12:38 pm

Re: The hobbit: developing the parser

Post by Nomad »

MrPixel wrote: Thu Apr 12, 2018 4:11 pm :?:
Your plan is to create a optimized version of BASIC for a machine with ~3k or free memory (stock).

Sure you have the whole Jack T biz deal to explain why commodore basic sucked so bad but you got to ask yourself 'what benefit would years of work revising vic-20 basic get me?) A custom rom project.. People tried that before on retro systems and after a ton of work usually they are the only ones that ever use these optimized BASIC roms.

Why not just write a program for the VIC-20 if that is what you want to do? instead of doing something that strikes me as underpants gnome logic.

Image

You got to think of the community associated with a system - ZX Spectrum people are some of the most welcoming and tolerant of beginners, plus they have active forums. At the other end of the field Commodore. Atari is somewhere in the middle.

It's totally your choice what you decide to do fella - it just seems to me to make a whole lot more sense to stick around, design a program with a game editor and get some experience under your belt. Then you will have a better idea where to go next. You want to develop for different systems go for it but you got to factor in tolerance of beginners that don't exhibit savant level skills in the community. :lol:
Wall_Axe
Manic Miner
Posts: 492
Joined: Mon Nov 13, 2017 11:13 pm

Re: The hobbit: developing the parser

Post by Wall_Axe »

this bit from the WL readme might interest some:
this is how the hobbit stores objects?

(7) - The Objects
=================
The object database is (beside the room and dictionary database) one of the
core items of the game. The following informations are stored for each object:

Object Number: the game's internal object reference number (NPCs are >= 60d).
Name: the object's full name (a noun and a maximum of two adjectives).
1L (first location): most objects do only appear in one location, which is
referenced here as room number (see game map). Some objectes (eg. doors) are
visible from more than one room, in this cases only the first room is
indicated.
# (number of): how many times the object appears in the game.
MO (mother object): if an object is carried or enclosed within another object
this object is referenced by its object number (or 0xFF if this is not the
case).
Vo (volume): the object's volume.
Ma (mass): the object's mass.
04 (property with offset +04): currently unknown
St (strength): the object's strength (eg. used in fighting)
06 (property with offset +06): currently unknown
Attributes (each object has 8 binary attributes associated with it):
v: visible
A: animal (otherwise it is an object)
o: open (otherwise it is closed)
*: gives light
b: broken (or dead for animals)
f: full
F: it is a fluid (water, wine)
l: locked
MrPixel
Microbot
Posts: 170
Joined: Sat Mar 24, 2018 7:42 pm

Re: The hobbit: developing the parser

Post by MrPixel »

interesting
hikoki
Manic Miner
Posts: 576
Joined: Thu Nov 16, 2017 10:54 am

Re: The hobbit: developing the parser

Post by hikoki »

MrPixel wrote: Tue May 01, 2018 12:14 aminteresting
even better playing it like a hangman or wheel of fortune :)
Nomad
Manic Miner
Posts: 600
Joined: Thu Dec 28, 2017 12:38 pm

Re: The hobbit: developing the parser

Post by Nomad »

I figure this was the only way you could practically do a Plotto style interactive fiction game/RPG on the spectrum.

https://www.brainpickings.org/2012/01/06/plotto/
MrPixel
Microbot
Posts: 170
Joined: Sat Mar 24, 2018 7:42 pm

Re: The hobbit: developing the parser

Post by MrPixel »

how does that help? just curious
Post Reply