Skip to navigation

Drawing the screen: DET1

[Elite-A, I/O processor]

Name: DET1 [Show more] Type: Subroutine Category: Drawing the screen Summary: Show or hide the dashboard (for when we die)
Context: See this subroutine in context in the source code References: This subroutine is called as follows: * tube_table calls DET1

This routine is run when the parasite sends a write_crtc command. It updates the number of text rows shown on the screen, which has the effect of hiding or showing the dashboard. 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.
.DET1 JSR tube_get \ Get the number of rows from the parasite into A LDX #6 \ Set X to 6 so we can update 6845 register R6 below SEI \ Disable interrupts so we can update the 6845 STX VIA+&00 \ Set 6845 register R6 to the value in A. Register R6 STA VIA+&01 \ is the "vertical displayed" register, which sets the \ number of rows shown on the screen CLI \ Re-enable interrupts RTS \ Return from the subroutine