Date : Fri, 01 Mar 1996 09:23:16 +0000 (GMT)
From : James Fidell <james@...>
Subject: Re: Planetoid/Snapper problems
James Turner (aren't there a lot of James' on this list ?) wrote:
> On Thu, 29 Feb 1996, lamcw wrote:
>
> > Tom Seddon wrote:
> >
> > ;I believe this has been discussed before on the previous mailing list,
> > ;but I couldn't find a solution to the problem: Snapper doesn't work!
> > ;Apparently this is due to &FE60 not producing values it should--what
> > ;should it do? Should there be random values on PB (as I have now) or
> > s;teady values?
>
> PB0-PB7 (&FE60) are the data bits for the User Port. I think that the
> value you get from reading &FE60 depends on the value of &FE62 (data
> direction register B). DDRB allows each bit to be considered as either an
> input or an output. With a bit in DDRB set to 0, the corresponding bit in
> &FE60 is considered an input. On a real BBC, the inputs would drift high
> with no connection to them (they were, I think, partially TTL compatible).
> Setting a bit in DDRB to 1 sets the corresponding bit in &FE60 to
> an output. In this condition, reading the port shows that bit set to 0,
> as far as I remember.
The inputs do drift high. What you have to remember is that the voltage
levels on the inputs do not necessarily correspond to the values in DDRA
and DDRB because of latching issues. On a ~RESET signal, the 6522 appears
to set all registers to zero other than the counters and latches which are
random. I'm told that the SR is random, too, but it is always 0xff on
my Beeb.
I believe that Xbeeb v0.3 has a reasonable representation of the
start-up state of the 6522 VIAs. Xbeeb v0.2 only ran Snapper because I'd
hacked the start-up state until it did :-)
> > ;And also, Planetoid doesn't work. It works for about 2 seconds and then
> > ;stops. And, finally, Killer Gorilla doesn't draw any platforms or
> > ;levels--most odd.
> >
> > Yes, &FE60 affects Snapper and Planetoids. I poke vaguely random values
> > into this location and it seems to work okay. The speed of the ghosts
> > and their behaviour are determined by this value. Bizarre.
"Vaguely random" ? :-)
> I have absolutely no idea why either Snapper or Planetoids should be
> looking at this location! On most machines, I would imagine that nothing
> is connected to the user port, giving the behaviour described above. With
> something connected, the result of reading and writing could be pretty
> much anything, and would be a bad idea, as for all the program knows, it
> could be messing up some piece of hardware.
I know that they use the user VIA for timing etc. What I don't understand
is that they didn't take proper measures to set the whole thing up
properly in the software rather than relying on it's power-up state.
> > I've tried Snapper with the new graphics (i.e. not the Pacman characters
> > but silly little men) and that seems to work better.
>
> I think Acornsoft were forced to change from Pacman's graphics to "silly
> little men" as you call them due to some sort of copyright problem...
I'm sure that was the reason. I much prefer the original, though.
James.
--
"Yield to temptation -- | Work: james@...
it may not pass your way again" | Play: james@...
| http://www.OiT.co.uk/~james/
- Lazarus Long | James Fidell