.wantdials JSR BOX2 ; Draw a border box around the space view LDA #$91 ; Set abraxas = $91, so the colour of the lower part of STA abraxas ; the screen is determined by screen RAM at $6400 ; (i.e. for when the dashboard is being shown) LDA #%11010000 ; Set bit 4 of caravanserai so that the lower part of STA caravanserai ; the screen (the dashboard) is shown in multicolour ; bitmap mode LDA DFLAG ; If DFLAG is non-zero then the dashboard is already BNE nearlyxmas ; being shown on-screen, so jump to nearlyxmas to skip ; displaying the dashboard on-screen ; We now copy the dashboard bitmap the copy at DSTORE% ; into the screen bitmap, so the dashboard appears ; on-screen ; ; The bitmap is seven character rows in size, which is ; 7 * 40 * 7 = $8C0 bytes, so we need to copy this many ; bytes from DSTORE% to the screen bitmap address of the ; dashboard at DLOC% LDX #8 ; Set X = 8 so we copy the first eight pages of the ; dashboard bitmap from DSTORE% to screen memory LDA #LO(DSTORE%) ; Set V(1 0) = DSTORE% STA V ; LDA #HI(DSTORE%) ; So V(1 0) points to the copy of the dashboard image STA V+1 ; and colour data at DSTORE% LDA #LO(DLOC%) ; Set SC(1 0) = DLOC% STA SC ; LDA #HI(DLOC%) ; So SC(1 0) points to the address in the screen bitmap STA SC+1 ; of the start of the dashboard at DLOC% JSR mvblockK ; Copy X pages from V(1 0) to SC(1 0), which copies all ; eight pages of the dashboard bitmap from the copy at ; DSTORE% into the screen bitmap ; We have copied $800 bytes, so now for the other $C0 ; bytes LDY #$C0 ; Set Y = $C0 so we copy this many bytes LDX #1 ; Set X = 1 so we copy this many bytes within just one ; page JSR mvbllop ; Copy Y bytes from V(1 0) to SC(1 0), so this copies ; the rest of the dashboard bitmap to the screen JSR zonkscanners ; Hide all ships on the scanner JSR DIALS ; Call DIALS to update the dashboard .nearlyxmas JSR BLUEBAND ; Clear the borders along the edges of the space view, ; to hide any sprites that might be lurking there JSR NOSPRITES ; Call NOSPRITES to disable all sprites and remove them ; from the screen LDA #$FF ; Set DFLAG to $FF to indicate that the dashboard is now STA DFLAG ; being shown on-screen RTS ; Return from the subroutineName: wantdials [Show more] Type: Subroutine Category: Drawing the screen Summary: Show the dashboard on-screenContext: See this subroutine in context in the source code References: This subroutine is called as follows: * TTX66K calls wantdials
[X]
Subroutine BLUEBAND (category: Drawing the screen)
Clear two four-character borders along each side of the space view
[X]
Subroutine BOX2 (category: Drawing the screen)
Draw the left and right edges of the border box for the space view
[X]
Variable DFLAG in workspace Option variables
A flag that indicates whether the dashboard is currently being shown on-screen
[X]
Subroutine DIALS (Part 1 of 4) (category: Dashboard)
Update the dashboard: speed indicator
[X]
Configuration variable DLOC% = SCBASE+18*8*40
The address in the screen bitmap of the start of the dashboard (which starts character row 18)
[X]
Configuration variable DSTORE% = SCBASE + $AF90
The address of a copy of the dashboard bitmap, which gets copied into screen memory when setting up a new screen
[X]
Subroutine NOSPRITES (category: Missions)
Disable all sprites and remove them from the screen
[X]
Variable abraxas (category: Drawing the screen)
The value for VIC register $18 to set the screen RAM address for a raster count of 1 in the interrupt routine (i.e. the dashboard)
[X]
Variable caravanserai (category: Drawing the screen)
Controls whether multicolour or standard bitmap mode is used for the lower part of the screen (i.e. the dashboard)
[X]
Subroutine mvblockK (category: Utility routines)
Copy a specific number of pages in memory
[X]
Label nearlyxmas is local to this routine
[X]
Subroutine zonkscanners (category: Drawing the screen)
Hide all ships on the scanner