Back to Skool Bugs
Catapult animation

When ERIC fires his catapult, he should go through the following animatory states:

1) 10/138: raising arm in preparation
2) 11/139: firing
3) 10/138: lowering arm
4) 0/128: standing normally

However, phase 3 (10/138: lowering arm) is omitted. See 24296.

POKE 24327,215

Gate kiss

When ERIC kisses HAYLEY, he moves one space forward (see 24348). This allows ERIC to pass through the skool gate if he kisses HAYLEY from behind it while it's shut.

Wrong plant pot

If ERIC is standing on a plant pot when a fully grown plant in another pot dies, he will fall to the ground. This is because the routine at 64077 checks whether ERIC is standing on a plant pot when a plant dies, but doesn't check whether it's the plant pot that contains the plant.

Undethronable ERIC

ERIC doesn't get pushed to the floor when someone sits in his seat (see 26175).

POKE 26211,54
POKE 26212,128

Far left scrolling

If ERIC is at the far left of the boys' skool (x-coordinate 0) facing right, and 'C', 'D', 'G', 'K' or 'T' is pressed, the screen scrolls left, pushing ERIC out of view; the screen then scrolls left again with every step ERIC takes (see 28160).

POKE 28193,198
POKE 28194,21
POKE 28195,240

Talking garbage

If one character is speaking while a second is waiting to speak, and the screen scrolls so that the speaking character is shifted out of view, the second character may start talking garbage. What happens is that the character who was speaking first is tricked into thinking that his speech bubble is still on-screen, and the two characters end up sharing the bubble opened by the second character.

To see how the first character is tricked, consider the case where MR CREAK is at the Blue Room door, telling the kids to sit down, and MR WITHIT is at the Yellow Room door, waiting for MR CREAK to finish speaking:

0) MR CREAK is under control of the entry point at 27182 (speaking); MR WITHIT is under control of the entry point at 27165 (waiting to speak).
1) The screen scrolls left, taking MR CREAK and his speech bubble out of view.
2) 25248 (update display) is called from the main loop; this calls 26849, which sets 32760 to 0 (indicating that the bubble is no longer on-screen).
3) MR WITHIT begins execution of the entry point at 27165; this detects that 32760 is now 0, and so calls 26958 to open the speech bubble, which:
  a) sets 32760 to some non-zero value (indicating that the bubble is on-screen), and
  b) updates 32762 to the current leftmost column on-screen.
4) MR CREAK begins execution of the entry point at 27182; this first calls 26849, which:
  a) detects the non-zero value in 32760, and
  b) fails to detect that the screen has scrolled, because MR WITHIT updated 32762,
thus fooling MR CREAK into thinking that his speech bubble is still on-screen.
5) MR CREAK and MR WITHIT share the speech bubble, taking turns rolling message characters into it until one of them finishes.

Hovering pellet

If a catapult pellet bounces off a teacher's head on the top floor, it never hits the ceiling; instead it hovers just below the ceiling briefly before disappearing (see 30459).

POKE 30474,250
POKE 30475,207
POKE 30476,116

Pellet through the wall

If ERIC stands against the far wall of the Science Lab storeroom while facing it, and then fires his catapult, the pellet will travel through the wall. See the routine at 28315 (which lets ERIC reach x-coordinate 63 - rather too close to that far wall), and the routine at 30292 (which takes that far wall to be at x-coordinate 62).

POKE 28375,62 (to stop ERIC at x-coordinate 62 instead of 63), or...
POKE 30348,63 (to check for the wall in front of the pellet at x-coordinate 63 instead of 62)

Pellet through the door

If ERIC stands against the right study door while facing it, and then fires his catapult, the pellet will travel through the door. See the routine at 30292, which checks for the presence of the right study door at x-coordinate 84 in front of the pellet. But when ERIC is standing up against the door, he is already at x-coordinate 84, which is where the pellet will be launched from; so at launch time, the x-coordinate of the spot in front of the pellet is 83, and the door check fails.

Conker of mass destruction

The section of code at 29943 was probably meant to check whether any of the four main kids besides ERIC has been hit by the falling conker. However, because the B and D registers are not properly initialised before calling the routine at 27820, every character (including the non-human objects) is treated as a potential target.

One consequence of this bug is that it's possible to knock out the little boys with the conker. Not all that interesting, I suppose.

Another consequence of this bug is that it's possible to 'knock out' the bike. But, of course, there is no 'knocked out bike' sprite; instead, an airborne frog (specifically, animatory state 30 or 158, depending on which way the bike is facing) is displayed. Which is rather more interesting. (And easy to verify, too, since the bike is not a moving target. Just park it at the base of the tree and get firing through the top-floor window.)

Unfortunately, owing to a technicality, the other non-human objects - mouse, frog, BOY WANDER's pellet etc. - are not vulnerable to the conker's destructive effects. (That technicality being that each is controlled by a routine whose address is stored in bytes 17 and 18 of the character buffer, so they are passed over by the routine at 27820.) Oh well.

Jump out of class

If ERIC jumps continuously (hold 'J' down) during class, EINSTEIN will tell the teacher that ERIC is absent.

This is a consequence of the zero flag being set upon entry to the routine at 28085, which forces an early return with D=17, indicating that ERIC is on the bottom floor (even though he isn't). In this case, the zero flag is set by the 'CP 52' instruction at 61515.

Jump into the dinner hall

During dinner, go to the Yellow Room or the Science Lab, directly above the dinner hall. When the teacher on dinner duty comes and finds ERIC there, jump (press 'J'). The teacher will then return to the dinner hall, tricked into thinking that ERIC is back there too.

This is another consequence of the zero flag being set upon entry to the routine at 28085, which forces an early return with D=17, indicating that ERIC is on the bottom floor (even though he isn't). In this case, the zero flag is set by the 'BIT 0,(HL)' instruction at 61608.

Jump into the assembly hall

During assembly, go to the area between the Yellow Room and the head's study. When MR WITHIT comes and finds ERIC there, jump (press 'J'). MR WITHIT will then return to the assembly hall, tricked into thinking that ERIC is back there too.

This is yet another consequence of the zero flag being set upon entry to the routine at 28085, which forces an early return with D=17, indicating that ERIC is on the bottom floor (even though he isn't). In this case, the zero flag is set by the 'BIT 0,(HL)' instruction at 61608.

One more jump bug

Play truant during class, somewhere on the top or middle floor. (The toilets are an ideal spot.) As ERIC's teacher approaches, start jumping continuously (hold 'J' down). When the teacher reaches the spot four spaces away from ERIC, you might see him turn round briefly, and then turn round again to continue the approach towards ERIC. The reason the teacher turns round is that he is tricked into thinking that ERIC is on the bottom floor, and so starts heading for the nearest staircase.

This is one more (less dramatic) consequence of the zero flag being set upon entry to the routine at 28085, which forces an early return with D=17, indicating that ERIC is on the bottom floor (even though he isn't). In this case, the zero flag is set by the 'CP 4' instruction at 25986.

No blackboard tales

EINSTEIN never tells tales on ERIC or BOY WANDER for writing on the blackboard. This is because the section of code at 61852 calls 26453 to collect the ID of the blackboard that the teacher is standing beside, but that routine returns early (with an invalid blackboard ID in B) because the teacher is not standing within a threshold of 4 spaces of the left edge of the board. Instead, the routine at 28658 should be called, which collects the ID of the blackboard within a threshold of 12 spaces:

POKE 61853,242: POKE 61854,111

But this reveals another bug in the section of code at 61852: instead of placing the message number for the name of the character EINSTEIN is grassing up (27 or 31) into 32656, it places the character number (206 or 210) there, which means EINSTEIN ends up saying either:

'Please Sir I cannot tell a lie . . 714 wrote on the board'

('714' being message 206) or:

'Please Sir I cannot tell a lie . . X wrote on the board'

where 'X' is the textual representation of whatever happens to be at address 20289 (in the display file) at the time of grassing (20289 being equal to PEEK (210+65024) + 256 * PEEK (210+65280), which is how the address of message 210 would be determined if it existed).

Double wipe

If ERIC leaves class at some point after the teacher has started wiping the board, but returns while EINSTEIN is telling the teacher that he's absent, the teacher will give ERIC or EINSTEIN lines, and then start wiping the board again (see 61899), without first walking to the right edge of the board. This means that either:

(a) the lesson will resume with the teacher standing near the doorway (if the class is in the Yellow Room or the Science Lab), or
(b) the teacher will walk through the far left wall of the boys' skool, conduct the rest of the lesson from behind the wall until the bell rings, and later reappear through the far right wall of the girls' skool (if the class is in the Blue Room).

You can confirm (b) by making use of the far left scroll bug to scroll the screen left until the girls' skool is in view. Or you can follow the teacher through the "no man's land" between the two skools by using the POKEs given here (which enable ERIC to walk through walls).

Speech queue hogs

ERIC's teacher and EINSTEIN can hog the 'speech queue' for several rounds of a question-and-answer session, making the other teachers wait a long time - sometimes until after the bell has rung - before they can tell the kids to sit down or what to do during the lesson. This bug is best observed during lessons in the Science Lab, with the Blue Room doorway and the Yellow Room in view.

Assembly sitting confusion

During assembly, if ERIC is standing a teacher will scream 'SIT FACING THE STAGE', but if he's sitting down facing left (away from the stage), a teacher will scream 'NOW SIT DOWN'. This is the wrong way round.

POKE 32205,32