Table of Contents

Copyright

N60 BASIC

A copyright signature for NOSTROMO occupied the first 9 lines of the BASIC portion.

A player would have to LIST out the BASIC program after loading to have a chance to ever encounter this copyright message.

It does not show up anywhere, ever, in the running game itself.

1 REM**************************
2 REM*                        *
3 REM*       NOSTROMO         *
4 REM*                        *
5 REM*  Copyright 1982 ASCII  *
6 REM*                        *
7 REM*    by HIROMI OHBA      *
8 REM*                        *
9 REM**************************

6809

One decision when porting I had to make came down to “what should I do with these 9 lines?”

Just delete them?

That didn't seem right.

Instead, I thought the copyright REMarks could make a screen of their own to expose the credits rather than skip, ignore, or delete them.

There were a number of choices of how I could turn these lines into a screen:

  1. Create a 32×16 block of data and copy it to screen RAM
  2. Clear the screen somewhere, and copy the 9 lines one after another, spaces and all into a block on the cleared screen
  3. Clear screen, draw each star as a box and put each specific centered string in their specific place

The first option drastically wastes memory in the assembled binary: 512 bytes plus code to copy it to the screen.

The second option uses far less memory, holding only 26×9 bytes to place on the screen, and the code to do so, something having 9 print statements in a row.

But all those spaces …

The third option requires the most lines of source code to implement, but ends up using the least space in the assembled binary or memory.

To do this I created and leveraged these functions:

With that, drawing the the copyright onto the screen broke down into seven steps

  1. Use HLINE to place the top of the box characters on screen
  2. Use VLINE to place the left side of the box characters on screen
  3. Use VLINE to create the right side of the box characters on screen
  4. Use HLINE to place the bottom line of the box characters on screen
  5. Use PRINTAT to write NOSTROMO as a single string
  6. Use PRINTAT to write Copyright 1982 ASCII as a single string
  7. Use PRINTAT to write by HIROMI OHBA as a single string

Finally, I needed a pause of some sort before moving on to give the player a short opportunity to see the screen before moving on, without leaving it on screen so long it becomes an irritation over many starts.

Since the game already required a seconds countdown timer, I could use that.

So this is what I came up with expose the copyright remarks as a new screen, rather than skip over or simply delete them unused.

;*********************************************************************
;* COPYRIGHT
;*          Display a copyright screen from original REM statements
;* Entry Values
;*          None
;* Exit Values
;*          None
;* Control Register Modifications
;*          A,X,Y
;* Subroutines Called
;*          COLOR1,HLINE,VLINE,PRINTAT
;*********************************************************************

COPYRIGHT:                    ; 1 REM**************************
                              ; 2 REM*                        *
                              ; 3 REM*       NOSTROMO         *
                              ; 4 REM*                        *
                              ; 5 REM*  Copyright 1982 ASCII  *
                              ; 6 REM*                        *
                              ; 7 REM*    by HIROMI OHBA      *
                              ; 8 REM*                        *
                              ; 9 REM**************************
                              ;      12345678901234567890123456

            lbsr  COLOR1      ; Setup white letters on black background

BAS0001:                      ; Draw box top
            lda   #3          ; start drawing at ...
            sta   TX          ; ... column 3
            sta   TY          ; ... row 3
            lda   #29         ; for 29 horizontal characters
            sta   INDEXIX     ; working varable for horizontal count
            ldb   #$6A        ; '* to draw
            lbsr  HLINE       ; now go draw horizonal line of *

                              ; Draw box left side
            ldd   #$0304      ; draw vertical line of * at column 3
            sta   TX          ; ... column 3
            stb   TY          ; ... row 4
            lda   #11         ; for 8 vertical characters
            sta   INDEXIY     ; working variable for vertical count
            ldb   #$6A        ; '* to draw
            lbsr  VLINE       ; now go draw vertical line of *

                              ; Draw box right side
            ldd   #$1C04      ; draw vertical line of * at column 29
            sta   TX          ; ... column 29
            stb   TY          ; ... row 4
            lda   #11         ; for 8 vertical characters
            sta   INDEXIY     ; working varable for vertical count
            ldb   #$6A        ; '* to draw
            lbsr  VLINE       ; now go draw vertical line of *

                              ; Draw box bottom
            ldd   #$030B      ; start drawing at ...
            sta   TX          ; ... column 3
            stb   TY          ; ... row 11
            lda   #29         ; for 29 horizontal characters
            sta   INDEXIX     ; working variable for horizontal count
            ldb   #$6A        ; '* to draw
            lbsr  HLINE       ; now go draw horizontal line of *

                              ; Draw TXTNAME program name message
            ldd   #$0C05      ; start drawing at ...
            sta   TX          ; ... column 12
            stb   TY          ; ... row 5
            ldx   #TXTNAME    ; load X with pointer to string
            stx   STRPTR      ; ... and store in temp
            lda   #8          ; load Y with length of string
            sta   STRLEN      ; ... and store in temp
            lbsr  PRINTAT     ; now go print string at

                              ; Draw TXTCOPY copyright message
            ldd   #$0707      ; start drawing at ...
            sta   TX          ; ... column 7
            stb   TY          ; ... row 7
            ldx   #TXTCOPY    ; load X with pointer to string
            stx   STRPTR      ; ... and store in temp
            lda   #20         ; load Y with length of string
            sta   STRLEN      ; ... and store in temp
            lbsr  PRINTAT     ; now go print string at

                              ; Draw TXTAUTH author message
            ldd   #$0909      ; start drawing at ...
            sta   TX          ; ... column 12
            stb   TY          ; ... row 9
            ldx   #TXTAUTH    ; load X with pointer to string
            stx   STRPTR      ; ... and store in temp
            lda   #14         ; load Y with length of string
            sta   STRLEN      ; ... and store in temp
            lbsr  PRINTAT     ; now go print string at

                              ; FIXME TEST CODE
            lbsr  INITTMR     ; INITIALIZE TIMER ROUTINE
            lda   #1          ; LETS WAIT 5 SECONDS
            sta   SECONDS     ; STORE FOR NUMBER OF SECONDS TO WAIT
WAIT1:      lbsr  WAITSYNC    ; WAIT FOR VSYNC
            lda   SECONDS     ; HAS SECONDS COUNTED OUT TO 0?
            cmpa  #0          ; Out of Seconds?
            bne   WAIT1       ; NO, SECONDS WAS > 0 SO WAIT MORE

Return to Nostromo