Skip to navigation

Elite on the BBC Micro

Version analysis of DET1 / DODIALS

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

Code variations between these versions are shown below.

Code variation 1 of 6A variation in the comments only

Tap on a version to expand it, and tap it again to show to all variations.

Cassette, Flight, Docked, Master

6502SP

Name: DET1 Type: Subroutine Category: Screen mode Summary: Show or hide the dashboard (for when we die)
Name: DODIALS Type: Subroutine Category: Screen mode Summary: Implement the #DODIALS <rows> command (show or hide the dashboard)

Code variation 2 of 6A variation in the comments only

Cassette, Flight, Docked, 6502SP, Master

This routine sets the screen to show the number of text rows given in X.
It is used when we are killed, as reducing the number of rows from the usual 31 to 24 has the effect of hiding the dashboard, leaving a monochrome image of ship debris and explosion clouds. Increasing the rows back up to 31 makes the dashboard reappear, as the dashboard's screen memory doesn't get touched by this process.

Code variation 3 of 6A variation in the comments only

Tap on a version to expand it, and tap it again to show to all variations.

Cassette, Flight, Docked, Master

6502SP

Arguments: X The number of text rows to display on the screen (24 will hide the dashboard, 31 will make it reappear) Returns: A A is set to 6
Arguments: A The number of text rows to display on the screen (24 will hide the dashboard, 31 will make it reappear) Returns: A A is set to 6

Code variation 4 of 6A variation in the labels only

Tap on a version to expand it, and tap it again to show to all variations.

Cassette, Flight, Docked, Master

6502SP

.DET1
.DODIALS

Code variation 5 of 6Specific to an individual platform

This variation is blank in the Cassette, Disc (flight), Disc (docked) and Master versions.

6502SP

TAX \ Copy the number of rows to display into X
 LDA #6                 \ Set A to 6 so we can update 6845 register R6 below

 SEI                    \ Disable interrupts so we can update the 6845

 STA VIA+&00            \ Set 6845 register R6 to the value in X. Register R6
 STX VIA+&01            \ is the "vertical displayed" register, which sets the
                        \ number of rows shown on the screen

 CLI                    \ Re-enable interrupts

Code variation 6 of 6Related to Elite's use of the Tube

Tap on a version to expand it, and tap it again to show to all variations.

Cassette, Flight, Docked, Master

6502SP

RTS \ Return from the subroutine
JMP PUTBACK \ Jump to PUTBACK to restore the USOSWRCH handler and \ return from the subroutine using a tail call
RSS Feed