diff --git a/c64/kernal/chrout.s b/c64/kernal/chrout.s index 2c4d65e5..b641accf 100644 --- a/c64/kernal/chrout.s +++ b/c64/kernal/chrout.s @@ -68,14 +68,22 @@ no_need_to_extend: jsr get_current_line_logical_length tay * - dey - lda (current_screen_line_ptr),y - iny - sta (current_screen_line_ptr),y + ;; Note: While the following routine is obvious to any skilled + ;; in the art as the most obvious simple and efficient solution, + ;; if the screen writes are before the colour writes, it results + ;; in a relatively long verbatim stretch of bytes when compared to + ;; the C64 KERNAL. Thus we have swapped the order, just to reduce + ;; the potential for any argument of copyright infringement, even + ;; though we really don't believe that the routine can be copyrighted + ;; due to the lack of creativity. dey lda (current_screen_line_colour_ptr),y iny sta (current_screen_line_colour_ptr),y + dey + lda (current_screen_line_ptr),y + iny + sta (current_screen_line_ptr),y dey cpy current_screen_x diff --git a/c64/kernal/ramtas.s b/c64/kernal/ramtas.s index 3a93ed63..ec240259 100644 --- a/c64/kernal/ramtas.s +++ b/c64/kernal/ramtas.s @@ -40,17 +40,20 @@ ramtas_l2: STA $DD00 ;; Set screen address pointer ("Compute's Mapping the 64" p238) - LDA #>$0400 - STA HIBASE + ;; This is obvious boiler plate containing no creative input, but to avoid + ;; unnecessarily similarity to the C64 KERNAL, we use X instead of A to do this, + ;; and several following + LDX #>$0400 + STX HIBASE ;; Work out RAM size and put in MEMSTR and MEMSIZ ;; "Compute's Mapping the 64", p54 ;; http://unusedino.de/ec64/technical/project64/mapping_c64.html - lda #>$0800 - sta MEMSTR+1 - lda #$00 - sta MEMSTR+0 - sta MEMSIZ+0 + ldx #>$0800 + stx MEMSTR+1 + ldx #$00 + stx MEMSTR+0 + stx MEMSIZ+0 ;; Try to modify $8000, if it fails then RAM ends at $7FFF, else $9FFF lda $8000 eor #$FF @@ -60,13 +63,13 @@ ramtas_l2: cmp $8000 beq ramtas_32K_RAM sta $8000 - lda #$A0 - sta MEMSIZ+1 + ldx #$A0 + stx MEMSIZ+1 jmp ramtas_RAM_sized ramtas_32K_RAM: sta $8000 ; in case RAM is hiding beneath a ROM - lda #$80 - sta MEMSIZ+1 + ldx #$80 + stx MEMSIZ+1 ;; Fall through ramtas_RAM_sized: