more work on reducing residual similarity with C64 KERNAL
This commit is contained in:
1 parent
18b862cce5
commit
ddbb673682
11 files changed
+55
-13
No files matched your search
+14
-13
@@ -418,10 +418,10 @@ count_rows_loop:
|
|||||||
copy_line_down_loop:
|
copy_line_down_loop:
|
||||||
ldy #39
|
ldy #39
|
||||||
cl_inner:
|
cl_inner:
|
||||||
lda (load_or_scroll_temp_pointer),y
|
|
||||||
sta (current_screen_line_ptr),y
|
|
||||||
lda (load_save_verify_end_address),y
|
lda (load_save_verify_end_address),y
|
||||||
sta (current_screen_line_colour_ptr),y
|
sta (current_screen_line_colour_ptr),y
|
||||||
|
lda (load_or_scroll_temp_pointer),y
|
||||||
|
sta (current_screen_line_ptr),y
|
||||||
dey
|
dey
|
||||||
bpl cl_inner
|
bpl cl_inner
|
||||||
|
|
||||||
@@ -429,13 +429,14 @@ cl_inner:
|
|||||||
;; Low bytes are in common pairs
|
;; Low bytes are in common pairs
|
||||||
|
|
||||||
;; Old source is new destination
|
;; Old source is new destination
|
||||||
lda load_or_scroll_temp_pointer+0
|
;; Use different registers to minimise byte similarity with C64 KERNAl
|
||||||
sta current_screen_line_ptr+0
|
ldy load_or_scroll_temp_pointer+1
|
||||||
sta current_screen_line_colour_ptr+0
|
sty current_screen_line_ptr+1
|
||||||
lda load_or_scroll_temp_pointer+1
|
|
||||||
sta current_screen_line_ptr+1
|
|
||||||
lda load_save_verify_end_address+1
|
lda load_save_verify_end_address+1
|
||||||
|
ldy load_or_scroll_temp_pointer+0
|
||||||
sta current_screen_line_colour_ptr+1
|
sta current_screen_line_colour_ptr+1
|
||||||
|
sty current_screen_line_ptr+0
|
||||||
|
sty current_screen_line_colour_ptr+0
|
||||||
|
|
||||||
;; Decrementing source pointers
|
;; Decrementing source pointers
|
||||||
lda load_or_scroll_temp_pointer+0
|
lda load_or_scroll_temp_pointer+0
|
||||||
@@ -462,10 +463,10 @@ no_copy_down:
|
|||||||
;; Erase newly inserted line
|
;; Erase newly inserted line
|
||||||
ldy #79
|
ldy #79
|
||||||
*
|
*
|
||||||
lda #$20
|
|
||||||
sta (current_screen_line_ptr),y
|
|
||||||
lda text_colour
|
lda text_colour
|
||||||
sta (current_screen_line_colour_ptr),y
|
sta (current_screen_line_colour_ptr),y
|
||||||
|
lda #$20
|
||||||
|
sta (current_screen_line_ptr),y
|
||||||
dey
|
dey
|
||||||
cpy #40
|
cpy #40
|
||||||
bne -
|
bne -
|
||||||
@@ -530,10 +531,10 @@ scroll_screen_up:
|
|||||||
ldy #$00
|
ldy #$00
|
||||||
ldx #3
|
ldx #3
|
||||||
scroll_copy_loop:
|
scroll_copy_loop:
|
||||||
lda (load_or_scroll_temp_pointer),y
|
|
||||||
sta (current_screen_line_ptr),y
|
|
||||||
lda (load_save_verify_end_address),y
|
lda (load_save_verify_end_address),y
|
||||||
sta (current_screen_line_colour_ptr),y
|
sta (current_screen_line_colour_ptr),y
|
||||||
|
lda (load_or_scroll_temp_pointer),y
|
||||||
|
sta (current_screen_line_ptr),y
|
||||||
|
|
||||||
iny
|
iny
|
||||||
bne scroll_copy_loop
|
bne scroll_copy_loop
|
||||||
@@ -554,10 +555,10 @@ scroll_copy_loop:
|
|||||||
sbc load_or_scroll_temp_pointer+0
|
sbc load_or_scroll_temp_pointer+0
|
||||||
tax
|
tax
|
||||||
scroll_copy_loop2:
|
scroll_copy_loop2:
|
||||||
lda (load_or_scroll_temp_pointer),y
|
|
||||||
sta (current_screen_line_ptr),y
|
|
||||||
lda (load_save_verify_end_address),y
|
lda (load_save_verify_end_address),y
|
||||||
sta (current_screen_line_colour_ptr),y
|
sta (current_screen_line_colour_ptr),y
|
||||||
|
lda (load_or_scroll_temp_pointer),y
|
||||||
|
sta (current_screen_line_ptr),y
|
||||||
iny
|
iny
|
||||||
dex
|
dex
|
||||||
bne scroll_copy_loop2
|
bne scroll_copy_loop2
|
||||||
|
|||||||
@@ -132,6 +132,7 @@ int main(int argc,char **argv)
|
|||||||
if (f1[i]==0x85) break;
|
if (f1[i]==0x85) break;
|
||||||
if (f1[i]==0xa2) break; // LDX #$xx
|
if (f1[i]==0xa2) break; // LDX #$xx
|
||||||
if (f1[i]==0xa9) break; // LDA #$xx
|
if (f1[i]==0xa9) break; // LDA #$xx
|
||||||
|
if (f1[i]==0xa5) break; // LDA $xx
|
||||||
if (f1[i]==0xa0) break; // LDY #$xx
|
if (f1[i]==0xa0) break; // LDY #$xx
|
||||||
if (f1[i]==0x69) break;
|
if (f1[i]==0x69) break;
|
||||||
if (f1[i]==0xc9) break;
|
if (f1[i]==0xc9) break;
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
Fragment + STA $028D
|
||||||
|
|
||||||
|
Only one whole instruction here. Nothing creative or copyrightable.
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
ORA $028D / STA $028D
|
||||||
|
|
||||||
|
This sequence of ORA + STA on a location is the simplest way to
|
||||||
|
perform a logical OR of the contents of the A register and a memory
|
||||||
|
location. Nothing creative or copyrightable.
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
Most likely LDA $0288 / STA $D2 - Set upper half of screen RAM address
|
||||||
|
|
||||||
|
$0288 is publicly documented as the location where screen RAM lives.
|
||||||
|
$D1/$D2 is the current pointer to screen memory. This is the simplest
|
||||||
|
way to set this. Also, copying one memory location to another is not
|
||||||
|
copyrightable.
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
STA $D1 / LDA $F3 / STA $D2 - manipulate screen pointers
|
||||||
|
|
||||||
|
$D1 = screen RAM pointer
|
||||||
|
$F3 = colour RAM pointer
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
$00 -> $028D
|
||||||
|
|
||||||
|
Simplest way to achieve this effect. Zeroing the contents
|
||||||
|
of a memory location is not copyrightable.
|
||||||
|
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
$nn -> $nnnn
|
||||||
|
|
||||||
|
Byte sequence is whole or part of instruction sequence
|
||||||
|
to store a specific value in a specific memory location.
|
||||||
|
Nothing creative or copyrightable.
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
LDA #$20 / STA ($D1),Y - Write a space onto screen memory
|
||||||
|
|
||||||
|
No simpler sequence for this. There are many functional requirements
|
||||||
|
that require writing space characters to the screen. Not copyrightable.
|
||||||
|
No creativity.
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
LDA $D018 / EOR #$02 / STA $D018
|
||||||
|
|
||||||
|
This is the shortest simplest sequence to toggle bit 1 in
|
||||||
|
$D018. No creativitity. Not copyrightable.
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
LDA $0286 / STA $F3
|
||||||
|
|
||||||
|
Copying a byte from one memory location to another is not copyrightable.
|
||||||
Reference in new issue
Block a user