Skip to navigation


Version analysis of UNWISE

This code appears in the following versions (click to see it in the source code):

Code variations between these versions are shown below.

Name: UNWISE Type: Subroutine Category: Ship hangar Summary: Switch the main line-drawing routine between EOR and OR logic

Code variation 1 of 3A variation in the comments only

Tap on a block to expand it, and tap it again to revert.

This routine toggles the main line-drawing routine between EOR and OR logic, for use when drawing the ship hangar.
This routine does nothing in the 6502 Second Processor version of Elite. It does have a function in the disc version, so the authors presumably just cleared out the UNWISE routine for the Second Processor version, rather than unplumbing it from the code.

Code variation 2 of 3A variation in the comments only

This variation is blank in the 6502 Second Processor version.

It does this by modifying the instructions in the main line-drawing routine at LOIN/LL30, flipping the drawing logic between the default EOR logic (which merges with whatever is already on screen, allowing us to erase anything we draw for animation purposes) and OR logic (which overwrites the screen, ignoring anything that's already there). We want to use OR logic for drawing the ship hangar, as it looks better and we don't need to animate it). The routine name, UNWISE, sums up this approach - if anything goes wrong, the results would be messy.

Other entry points: HA1 Contains an RTS
.UNWISE

Code variation 3 of 3Related to the screen mode

This variation is blank in the 6502 Second Processor version.

LDA LIL2+2 \ Flip bit 6 of LIL2+2 to change the EOR (SC),Y in LIL2 EOR #%01000000 \ to an ORA (SC),Y (or back again) STA LIL2+2 LDA LIL3+2 \ Flip bit 6 of LIL3+2 to change the EOR (SC),Y in LIL3 EOR #%01000000 \ to an ORA (SC),Y (or back again) STA LIL3+2 LDA LIL5+2 \ Flip bit 6 of LIL2+2 to change the EOR (SC),Y in LIL5 EOR #%01000000 \ to an ORA (SC),Y (or back again) STA LIL5+2 LDA LIL6+2 \ Flip bit 6 of LIL2+2 to change the EOR (SC),Y in LIL6 EOR #%01000000 \ to an ORA (SC),Y (or back again) STA LIL6+2
.HA1

 RTS                    \ Return from the subroutine