Guys, can you tell me what these numbers mean?

A place to discuss the ZX80's and ZX81's younger brother - the Sinclair ZX Spectrum
Daniel Baines
Posts: 25
Joined: Tue Jul 28, 2015 1:40 am

Guys, can you tell me what these numbers mean?

Post by Daniel Baines »

OK Guys, as you know, I've been working tirelessly on my Vulcan expansion pack. It has developed over a period of many years. I released a 'beta,' and since then I have ironed out all the bugs except 2. I've had to stop work at version 5, because I'm really stumped on how to resolve the last two bugs. If I hadn't already fried my brain working really hard on it myself, I would certainly not be asking for help!

Problem 1: I don't know how to disable/erase from view the '1begin new game,' '2load old game,' '3save gamem' and '4abandon game,' options on the menu screen.

Problem 2: Roads. I don't need anyone to program any roads for me. Just solve a riddle that has been a pain in my butt for 8 years.

When a game unit is over a road, you can press 'T,' choose a destination, press enter, then during the 'Forces Moving' part of the game, the unit will move along the road. I can create junctions, and they work just fine.

The problem is creating more than one road, (rather than just weaving one long road over itself a few times to make junctions.)

After you program in a road, you can instruct the computer to 'teleport' to a new location, to begin a brand new piece of road which does not just carry on where the first road left off. Its a new road.

To do this 'teleport,' you first close off the old road with a 5. Then, you need to input a mystery number, followed by the two number map co-ordinates the new road will begin from, then a 6 to begin the new road program. Along the road program, when you want a junction you put 255, followed by a two number distance marker, and another 255 before continuing that road. Rinse and repeat.

It is this mystery number I can't work out what it refers to in RT Smith's original game.

Can anyone enlighten me? What do these 'mystery numbers' mean, and what do they do? Once I know, I can program much better maps, and fix the roads on existing maps.

In 'Vulcan,' the roads are programmed between memory addresses 61862 and 62562.

The 'mystery numbers' are 90, 19, 218, 70, 50 etc, as listed below.

Address 61862 is a 90, before the road beginning at co-ordinates 0 5.

61952 is a 19, before the road beginning at co-ordinates 19 9.

61971 is a 218, before the road beginning at co-ordinates 23 10.

62189 is a 70, before the road beginning at co-ordinates 0 12.

62259 is a 50, before the road beginning at co-ordinates 0 25.

62309 is a 78, before the road beginning at co-ordinates 30 20

62387 is a 45, before the road beginning at co-ordinates 33 20

62432 is a 24, before the road beginning at co-ordinates 37 12

62456 is a 77, before the road beginning at co-ordinates 9 27

62533 is a 30, before the road beginning at co-ordinates 11 39


Please note you can only take a look at these addresses on a non-modded version of 'Vulcan,' or if you do download my expansion pack, they only apply to 'The Tunisian Campaign,' which still uses RT Smith's original road layout.

Just so you guys know, I think its something to do with distance of the road segment, as the numbers do match the order of how long the forthcoming road will be. But why they are what they are, and what they should be in alternate road networks, is a mystery.

If anyone can solve this, you will have solved an 8 year riddle for me! Its probably something silly and simple I missed.
IanB
Posts: 60
Joined: Mon Jul 27, 2015 5:40 am
Location: Northampton UK

Re: Guys, can you tell me what these numbers mean?

Post by IanB »

I'm just thinking it's hard to even guess, without knowing how the whole engine works. What happens if you change these bytes? You can sometimes find out what something does by breaking it, if you see what I mean.
Daniel Baines
Posts: 25
Joined: Tue Jul 28, 2015 1:40 am

Re: Guys, can you tell me what these numbers mean?

Post by Daniel Baines »

Oh yes. I've broken it. Changing a number erases recognition of all the roads in the memory written after it.

Which wasn't much help in finding out what it all means. Just 255 to the power of 8 or something combos to try to see if I can get it right on a different road network then. I am stumped, and its really the only info I have on the problem.

Maybe someone could look at it, or has seen a similar kind of pathfinding program before?
Rishi
Posts: 107
Joined: Mon Jun 08, 2015 6:57 pm
Location: Amsterdam

Re: Guys, can you tell me what these numbers mean?

Post by Rishi »

How about the length of the road in bytes,
telling the program where to find the road that comes after.
Standard data-structure, length of the road is limited to 255 bytes but if i want to jump to the next road i can do this quite quick now.
61952 + 19 = 61971
61971 + 218 = 62189
62189 + 70 = 62259 etc.
32K SRAM WRX compatible, 32Bit IO-Port, ROM Ghost, ZX-Printer.
IanB
Posts: 60
Joined: Mon Jul 27, 2015 5:40 am
Location: Northampton UK

Re: Guys, can you tell me what these numbers mean?

Post by IanB »

That appears to be the right answer!
Daniel Baines
Posts: 25
Joined: Tue Jul 28, 2015 1:40 am

Re: Guys, can you tell me what these numbers mean?

Post by Daniel Baines »

HOLY CRAP! YOU GUYS! You're RIGHT! If I was gay, I would hug you and kiss you!

WHY DIDN'T I NOTICE THAT? It was so OBVIOUS! I feel like a TOTAL fool now!

But SO HAPPY!

You guys, now I can make a whole new game!!!!

I can make ENORMOUS maps now. Once the road issue was solved, I planned to release an East African Campaign wargame taking some parts of the RT Smith engine I'm familiar with. And now its all possible!

But why didn't I work it out myself? Jesus I'm an idiot. I knew a fresh pair of eyes would solve it! I think I'd just got stuck in a rut of getting it wrong and not seeing the obvious. Jesus. Was far easier to work out than almost all of the programming I've done in the past. Oh. Gosh! I even had the answer when I said 'something to do with the length of the road,' and still I wasn't getting it!
Daniel Baines
Posts: 25
Joined: Tue Jul 28, 2015 1:40 am

Re: Guys, can you tell me what these numbers mean?

Post by Daniel Baines »

Oh... my... god I'm an idiot. But thanks again! Version 5 of the Vulcan North Africa Expansion pack is pretty damn definitive already. 9 out of the 12 scenarios have 0 bugs of any kind. The other 2 have only VERY minor issues, and although the roads on the 'Torch' map are terrible (definately the 'wild card' scenario as far as quality is concerned,) its only 5 turns out of the 1000 or so in the rest of the game. So really, it might not be worth making a version 6.

I'll put version 6 on low priority. Now its time to start work on a brand new game! WATCH THIS SPACE GUYS! I am going to do a whole new game! I know now I have the programming skills to complete the entire thing and get it completely right from version 1. I don't want another release then 4 more download links to correct bugs debacle.

I've started looking at code with fresh eyes now this weight is lifted from my mind. So much more is making sense.
IanB
Posts: 60
Joined: Mon Jul 27, 2015 5:40 am
Location: Northampton UK

Re: Guys, can you tell me what these numbers mean?

Post by IanB »

This kind of result is why I love the internet :)
User avatar
1024MAK
Posts: 5118
Joined: Mon Sep 26, 2011 10:56 am
Location: Looking forward to summer in Somerset, UK...

Re: Guys, can you tell me what these numbers mean?

Post by 1024MAK »

I think Daniel is rather happy :D :lol:

Mark
ZX81 Variations
ZX81 Chip Pin-outs
ZX81 Video Transistor Buffer Amp

:!: Standby alert :!:
There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb :!:
Looking forward to summer later in the year.
IanB
Posts: 60
Joined: Mon Jul 27, 2015 5:40 am
Location: Northampton UK

Re: Guys, can you tell me what these numbers mean?

Post by IanB »

I think he is :D

Daniel, what was the thing with Problem 1? Are you trying to remove the Save/Load menu entirely, or change the options, or something else? Does it not need those options?
Post Reply