From 61b69ddf3d30ad17eca459e7b25ef88cb9f2d0bf Mon Sep 17 00:00:00 2001 From: Paul Gardner-Stephen Date: Tue, 7 May 2019 12:17:52 +0930 Subject: [PATCH] document many more cooincidental similarities with C64 ROMs --- strings/000005 | 3 +++ strings/00000800 | 3 +++ strings/00029900 | 1 + strings/00DD09 | 6 ++++++ strings/00DD09088D00DD | 6 ++++++ strings/00DD60AD00DD29 | 5 +++++ strings/00DDAD | 6 ++++++ strings/026078 | 6 ++++++ strings/034CED | 3 +++ strings/071869 | 5 +++++ strings/087820 | 4 ++++ strings/0878820 | 4 ++++ strings/09088D | 4 ++++ strings/09108D00DD60AD00DD | 6 ++++++ strings/09208D00DD | 6 ++++++ strings/09A90085 | 5 +++++ strings/0DDC68A868AA6840A900 | 9 +++++++++ strings/1860A5 | 5 +++++ strings/1860A90085 | 4 ++++ strings/1860AD | 11 +++++++++++ strings/20A3FD20 | 4 ++++ strings/29EF09 | 4 ++++ strings/29F78D | 5 +++++ strings/30034C | 5 +++++ strings/3860A5 | 5 +++++ strings/38E901 | 5 +++++ strings/4C4F4144494E | 1 + strings/4F5220 | 3 +++ strings/534541524348494E47 | 1 + strings/586C00A0 | 4 ++++ strings/607820 | 5 +++++ strings/60AD00DD29EF | 5 +++++ strings/68AA6840 | 6 ++++++ strings/A4C218 | 3 +++ strings/A868AAA5 | 3 +++ strings/C4B7F00C | 4 ++++ strings/C8C004D0 | 5 +++++ strings/CAD0F560 | 4 ++++ strings/D2FFC8C0 | 1 + strings/DCAD0DDCA9 | 4 ++++ strings/DD29F78D00DD | 5 +++++ strings/DD60AD00DD29 | 7 +++++++ strings/EA20A0E5 | 10 ++++++++++ strings/EC140D1D8885868711335741345A5345 | 16 ++++++++++++++++ strings/F0021860 | 3 +++ strings/FFD0034C | 4 ++++ 46 files changed, 224 insertions(+) create mode 100644 strings/000005 create mode 100644 strings/00000800 create mode 100644 strings/00029900 create mode 100644 strings/00DD09 create mode 100644 strings/00DD09088D00DD create mode 100644 strings/00DD60AD00DD29 create mode 100644 strings/00DDAD create mode 100644 strings/026078 create mode 100644 strings/034CED create mode 100644 strings/071869 create mode 100644 strings/087820 create mode 100644 strings/0878820 create mode 100644 strings/09088D create mode 100644 strings/09108D00DD60AD00DD create mode 100644 strings/09208D00DD create mode 100644 strings/09A90085 create mode 100644 strings/0DDC68A868AA6840A900 create mode 100644 strings/1860A5 create mode 100644 strings/1860A90085 create mode 100644 strings/1860AD create mode 100644 strings/20A3FD20 create mode 100644 strings/29EF09 create mode 100644 strings/29F78D create mode 100644 strings/30034C create mode 100644 strings/3860A5 create mode 100644 strings/38E901 create mode 100644 strings/4C4F4144494E create mode 100644 strings/4F5220 create mode 100644 strings/534541524348494E47 create mode 100644 strings/586C00A0 create mode 100644 strings/607820 create mode 100644 strings/60AD00DD29EF create mode 100644 strings/68AA6840 create mode 100644 strings/A4C218 create mode 100644 strings/A868AAA5 create mode 100644 strings/C4B7F00C create mode 100644 strings/C8C004D0 create mode 100644 strings/CAD0F560 create mode 100644 strings/D2FFC8C0 create mode 100644 strings/DCAD0DDCA9 create mode 100644 strings/DD29F78D00DD create mode 100644 strings/DD60AD00DD29 create mode 100644 strings/EA20A0E5 create mode 100644 strings/EC140D1D8885868711335741345A5345 create mode 100644 strings/F0021860 create mode 100644 strings/FFD0034C diff --git a/strings/000005 b/strings/000005 new file mode 100644 index 00000000..74d7cdfb --- /dev/null +++ b/strings/000005 @@ -0,0 +1,3 @@ +$05 byte after some leading $00s + +Not creative. Not copyrightable. diff --git a/strings/00000800 b/strings/00000800 new file mode 100644 index 00000000..9f1ac4a7 --- /dev/null +++ b/strings/00000800 @@ -0,0 +1,3 @@ +A single $08 byte in a field of $00's + +Nothing creative or copyrightable here. diff --git a/strings/00029900 b/strings/00029900 new file mode 100644 index 00000000..df30c11b --- /dev/null +++ b/strings/00029900 @@ -0,0 +1 @@ +fragments of instructions. Not copyrightable. diff --git a/strings/00DD09 b/strings/00DD09 new file mode 100644 index 00000000..0d2816aa --- /dev/null +++ b/strings/00DD09 @@ -0,0 +1,6 @@ +Do something with $DD00 and compare it with some value. + +$DD00 is one of the CIA ports, so checking the value of inputs +on this port is something rather expected and common. +Also, this sequence doesn't even contain a whole instruction. +Not copyrightable. diff --git a/strings/00DD09088D00DD b/strings/00DD09088D00DD new file mode 100644 index 00000000..b6822322 --- /dev/null +++ b/strings/00DD09088D00DD @@ -0,0 +1,6 @@ +Set a bit in $DD00 + +See other notes on bit manipulations of $DD00. +Manipulating bits in a bit is not creative or copyrightable. +Also, $DD00 is an IO register, which is expected to suffer +such bit manipulations. diff --git a/strings/00DD60AD00DD29 b/strings/00DD60AD00DD29 new file mode 100644 index 00000000..9407651e --- /dev/null +++ b/strings/00DD60AD00DD29 @@ -0,0 +1,5 @@ +Do something with $DD00, return from subroutine. Do something else with $DD00 + +$DD00 is an IO register of a CIA in the C64 associated with the disk drive port. +Thus having routines that do things with it is expected and necessary. +The sequence here has nothing creative nor is it in our view copyrightable. diff --git a/strings/00DDAD b/strings/00DDAD new file mode 100644 index 00000000..e250d3f4 --- /dev/null +++ b/strings/00DDAD @@ -0,0 +1,6 @@ +Do something with $DD00, then read something from memory. Only instruction fragments. + +No whole instructions here. +$DD00 is a CIA IO register on the C64, so doing things with it is rather necessary. +Loading from memory is also intrinsic to operation of a processor. +Nothing creative. Nothing copyrightable. diff --git a/strings/026078 b/strings/026078 new file mode 100644 index 00000000..0945c624 --- /dev/null +++ b/strings/026078 @@ -0,0 +1,6 @@ +Fragment, RTS, Disable interrupts. Fragment of end and start of routines. + +Neither returning from a subroutine nor disabling interrupts is +notable or copyrightable. One in 256 routines would be expected +to result in this sequence by pure chance. +Nothing creative or copyrightable. diff --git a/strings/034CED b/strings/034CED new file mode 100644 index 00000000..759cc397 --- /dev/null +++ b/strings/034CED @@ -0,0 +1,3 @@ +Fragment of JMP instruction. + +Only fragments of instructions. Not creative nor copyrightable. diff --git a/strings/071869 b/strings/071869 new file mode 100644 index 00000000..f165afad --- /dev/null +++ b/strings/071869 @@ -0,0 +1,5 @@ +Fragment + CLC + ADC fragment. + +Fragment of an addition pattern. +Nothing creative nor copyrightable. +Also only one whole instruction. diff --git a/strings/087820 b/strings/087820 new file mode 100644 index 00000000..192d80b7 --- /dev/null +++ b/strings/087820 @@ -0,0 +1,4 @@ +fragment + SEI + JSR fragment + +Only a single whole instruction. +Not copyrightable. diff --git a/strings/0878820 b/strings/0878820 new file mode 100644 index 00000000..f0fc7935 --- /dev/null +++ b/strings/0878820 @@ -0,0 +1,4 @@ +SEI surrounded by instruction fragments. + +Single whole insstruction. +Not creative. Not copyrightable. diff --git a/strings/09088D b/strings/09088D new file mode 100644 index 00000000..a5841578 --- /dev/null +++ b/strings/09088D @@ -0,0 +1,4 @@ +Or A register with $08 and store result somewhere. + +Simple bit manipulation and memory access. +Not creative or copyrightable. diff --git a/strings/09108D00DD60AD00DD b/strings/09108D00DD60AD00DD new file mode 100644 index 00000000..3570a426 --- /dev/null +++ b/strings/09108D00DD60AD00DD @@ -0,0 +1,6 @@ +set a bit in $DD00, Return from subroutine, read $DD00 + +$DD00 is a key IO register for the IEC serial port. +Thus it is no surprise to find routines that manipulate $DD00, +and indeed for them to appear one after the other. +Nothing creative. Not copyrightable. diff --git a/strings/09208D00DD b/strings/09208D00DD new file mode 100644 index 00000000..c093f5cf --- /dev/null +++ b/strings/09208D00DD @@ -0,0 +1,6 @@ +Set a bit in $DD00. + +Again, $DD00 is a register that is used for the IEC serial interface. +Clearing and setting bits in it is required to implement the protocol. +Also, clearing and setting bits in a memory location is not creative +or copyrightable. diff --git a/strings/09A90085 b/strings/09A90085 new file mode 100644 index 00000000..12e73bd8 --- /dev/null +++ b/strings/09A90085 @@ -0,0 +1,5 @@ +Fragment + store $00 somewhere into ZP. + +Writing to a memory location with a specific value +is neither creative nor copyrightable. + diff --git a/strings/0DDC68A868AA6840A900 b/strings/0DDC68A868AA6840A900 new file mode 100644 index 00000000..6e1f9283 --- /dev/null +++ b/strings/0DDC68A868AA6840A900 @@ -0,0 +1,9 @@ +Tail end of standard CIA-triggered interrupt, followed by start of another routine + +LDA $DC0D is the standard way to clear interrupt status on the 6526 CIA. +Then we have the standard return from interrupt sequence for a 6502 +(see the wikipedia page on 6502 interrupts, for example), followed by +loading A with $00 at the start of a following routine -- which is a not +uncommon way for routines to start. + +In short, nothing creative nor copyrightable. diff --git a/strings/1860A5 b/strings/1860A5 new file mode 100644 index 00000000..eb93e447 --- /dev/null +++ b/strings/1860A5 @@ -0,0 +1,5 @@ +CLC RTS + instruction fragment. + +i.e., return success from a routine, and then whatever follows. +Better than 1 in 256 routines can be expected to exhibit this +sequence simply through chance. diff --git a/strings/1860A90085 b/strings/1860A90085 new file mode 100644 index 00000000..76c9aa1c --- /dev/null +++ b/strings/1860A90085 @@ -0,0 +1,4 @@ +Return from routine with success, Store $00 somewhere in ZP. + +End of routine fragment followed by the start of a routine that +stores 0 somewhere. Not creative. Not copyrightable. diff --git a/strings/1860AD b/strings/1860AD new file mode 100644 index 00000000..13327767 --- /dev/null +++ b/strings/1860AD @@ -0,0 +1,11 @@ +CLC / RTS / JSR $xxxx + +CLC / RTS the obvious and simplest way to clear the carry flag +when returing from a routine. Many of the routines in the C64 KERNAL +public API indicate that they use the carry flag to indicate success +or failure, hence how often it shows up in the C64 KERNAL itself. +That a JSR instruction happens to be the first instruction in whatever +follows actually highly likely through chance, since several percent +of all instructions in a typical 6502 program are JSR instructions. + +Not copyrightable. diff --git a/strings/20A3FD20 b/strings/20A3FD20 new file mode 100644 index 00000000..354e81a2 --- /dev/null +++ b/strings/20A3FD20 @@ -0,0 +1,4 @@ +JSR $FDA3 (SCAN KEYBOARD) , JSR somewhere else + +$FDA3 is listed on p238 of Compute's Mapping the 64 +and thus calling it is totally expected. diff --git a/strings/29EF09 b/strings/29EF09 new file mode 100644 index 00000000..6f1badce --- /dev/null +++ b/strings/29EF09 @@ -0,0 +1,4 @@ +Clear a bit in A and do something with it. + +Only one whole instruction. +Not creative. Not copyrightable. diff --git a/strings/29F78D b/strings/29F78D new file mode 100644 index 00000000..8c94aa47 --- /dev/null +++ b/strings/29F78D @@ -0,0 +1,5 @@ +clear a bit and store result some where. + +Only one whole instruction. +Manipulating bits in bytes is bread and butter of CPUs. +Nothing creative nor copyrightable. diff --git a/strings/30034C b/strings/30034C new file mode 100644 index 00000000..2dbf9662 --- /dev/null +++ b/strings/30034C @@ -0,0 +1,5 @@ +Conditionally JMP somewhere. + +Would be single instruction on many architectures. +Not copyrightable. Not creative. +Only one whole instruction. diff --git a/strings/3860A5 b/strings/3860A5 new file mode 100644 index 00000000..83dc12a0 --- /dev/null +++ b/strings/3860A5 @@ -0,0 +1,5 @@ +SEC + RTS + fragment of next routine + +C flag is used to report success or failure of routines. +This is an example of a routine fragment for returning failure. +Not creative nor copyrightable. diff --git a/strings/38E901 b/strings/38E901 new file mode 100644 index 00000000..ccbe7ab9 --- /dev/null +++ b/strings/38E901 @@ -0,0 +1,5 @@ +SEC / SBC #$01 - subtract 1 from A. + +Would be single instruction on many architectures. +Is simple and common register manipulation. +Nothing creative. Not copyrightable. diff --git a/strings/4C4F4144494E b/strings/4C4F4144494E new file mode 100644 index 00000000..49a4c6e5 --- /dev/null +++ b/strings/4C4F4144494E @@ -0,0 +1 @@ +The string "LOADIN", part of LOADING. Not copyrightable. diff --git a/strings/4F5220 b/strings/4F5220 new file mode 100644 index 00000000..df64d6ee --- /dev/null +++ b/strings/4F5220 @@ -0,0 +1,3 @@ +"OR " string, being part of "ERROR " + +Not copyrightable. diff --git a/strings/534541524348494E47 b/strings/534541524348494E47 new file mode 100644 index 00000000..cb808641 --- /dev/null +++ b/strings/534541524348494E47 @@ -0,0 +1 @@ +The string "SEARCHING". Not copyrightable. diff --git a/strings/586C00A0 b/strings/586C00A0 new file mode 100644 index 00000000..95cda6b7 --- /dev/null +++ b/strings/586C00A0 @@ -0,0 +1,4 @@ +Clear C, jump into BASIC ROM to start BASIC. + +Simplest and most obvious way to achieve this action, +as required for a C64 to boot. diff --git a/strings/607820 b/strings/607820 new file mode 100644 index 00000000..1419e204 --- /dev/null +++ b/strings/607820 @@ -0,0 +1,5 @@ +RTS / SEI / JSR somewhere + +End and start of routines fragment. +Nothing creative. Not copyrightable. + diff --git a/strings/60AD00DD29EF b/strings/60AD00DD29EF new file mode 100644 index 00000000..f9a6431f --- /dev/null +++ b/strings/60AD00DD29EF @@ -0,0 +1,5 @@ +Return from sub-routine, clear a bit in $DD00 + +See other commentary on IO port $DD00 and the reasonableness +of seeing routines that manipulate bits in it. +Not creative. Not copyrightable. diff --git a/strings/68AA6840 b/strings/68AA6840 new file mode 100644 index 00000000..5cfe5651 --- /dev/null +++ b/strings/68AA6840 @@ -0,0 +1,6 @@ +PLA / TAX / PLA / RTI + +Pop A and X registers from the stack and return from interrupt. +Standard end of interrupt sequence on 6502. +See, for example, https://en.wikipedia.org/wiki/Interrupts_in_65xx_processors +Not copyrightable. diff --git a/strings/A4C218 b/strings/A4C218 new file mode 100644 index 00000000..5876f5f4 --- /dev/null +++ b/strings/A4C218 @@ -0,0 +1,3 @@ +Load Y from ZP. Clear carry flag. Simple register manipulations. + +Not creative. Not copyrightable. diff --git a/strings/A868AAA5 b/strings/A868AAA5 new file mode 100644 index 00000000..5816f804 --- /dev/null +++ b/strings/A868AAA5 @@ -0,0 +1,3 @@ +Restore Y and X from stack, load A from somewhere. + +Simple register manipulation. Not creative nor copyrightable. diff --git a/strings/C4B7F00C b/strings/C4B7F00C new file mode 100644 index 00000000..1faa036c --- /dev/null +++ b/strings/C4B7F00C @@ -0,0 +1,4 @@ +take a branch based on comparison of Y register and memory. + +Changing program flow based on the result of a comparison is +a very common programming pattern diff --git a/strings/C8C004D0 b/strings/C8C004D0 new file mode 100644 index 00000000..8a8e8f43 --- /dev/null +++ b/strings/C8C004D0 @@ -0,0 +1,5 @@ +branch based on whether X register holds the number 4. + +Loop fragment. +Nothing creative. +No copyrightable. diff --git a/strings/CAD0F560 b/strings/CAD0F560 new file mode 100644 index 00000000..f9b89a49 --- /dev/null +++ b/strings/CAD0F560 @@ -0,0 +1,4 @@ +End of loop fragment (branch backwards based on X, then return when done). + +Not creative. +Not copyrightable. diff --git a/strings/D2FFC8C0 b/strings/D2FFC8C0 new file mode 100644 index 00000000..53c7f33a --- /dev/null +++ b/strings/D2FFC8C0 @@ -0,0 +1 @@ +fragment of string printing loop (JSR $FFD2 / INX / CPX ... ) diff --git a/strings/DCAD0DDCA9 b/strings/DCAD0DDCA9 new file mode 100644 index 00000000..c6b60eb5 --- /dev/null +++ b/strings/DCAD0DDCA9 @@ -0,0 +1,4 @@ +Read from $DC0D to clear CIA interrupts, surrounded by instruction fragments. + +This is the method for clearing CIA interrupts. +Not creative or copyrightable. diff --git a/strings/DD29F78D00DD b/strings/DD29F78D00DD new file mode 100644 index 00000000..3a3fd967 --- /dev/null +++ b/strings/DD29F78D00DD @@ -0,0 +1,5 @@ +clear a bit in $DD00 + +Yet another fragment of bit manipulation for the CIA register $DD00 +that is used to communicate with the disk drive port. +Clearing specific bits in bytes is not creative nor copyrightable. diff --git a/strings/DD60AD00DD29 b/strings/DD60AD00DD29 new file mode 100644 index 00000000..96bc1e55 --- /dev/null +++ b/strings/DD60AD00DD29 @@ -0,0 +1,7 @@ +do something with $DD00, then RTS, then read $DD00 + +Again, $DD00 is a CIA IO register, and so there are a number +of routines that are required that simply check or modify the +contents of this register in order to implement the IEC serial +protocol. Thus it is totally unsurprising to find routines that +start by reading $DD00 and then processing it in some way. diff --git a/strings/EA20A0E5 b/strings/EA20A0E5 new file mode 100644 index 00000000..ca3021c6 --- /dev/null +++ b/strings/EA20A0E5 @@ -0,0 +1,10 @@ +instruction fragment followed by JSR to VIC-II register setup. + +$E5A0 is documented in Compute's Mapping the 64 on p216 as +the correct location for this routine, so it is no surprise to +find a call there. +Not creative. Not copyrightable. + +The leading $EA which is a NOP in the C64 KERNAL is a good example +of purely cooincidental matches, as in our ROM it is the high-byte +of an argument to the preceeding instruction. diff --git a/strings/EC140D1D8885868711335741345A5345 b/strings/EC140D1D8885868711335741345A5345 new file mode 100644 index 00000000..6b6aa28d --- /dev/null +++ b/strings/EC140D1D8885868711335741345A5345 @@ -0,0 +1,16 @@ +List of key codes generated when certain key combinations are pressed + +This sequence is a list of which ASCII/PETSCII code should be generated +when certain key combinations are pressed, based on the keyboard matrix +position. That is, it is a sequence in keyboard matrix order, of the +codes that should be generated. Thus it is a list of facts, which cannot +be copyright, according to the long standing precedent under US copyright law: + +https://www.law.cornell.edu/copyright/cases/499_US_340.htm + +Similar decisions exist in other jurisidctions. + +Note also that the matrix order list of keys is a fact of the C64 hardware, +and which has been repeated in many publications, such as Compute's Mapping the 64, +without challenge from the C64 ROM copyright owners, which serves to reinforce the +claim that this sequence of bytes is not copyrightable. diff --git a/strings/F0021860 b/strings/F0021860 new file mode 100644 index 00000000..69c9ffa4 --- /dev/null +++ b/strings/F0021860 @@ -0,0 +1,3 @@ +conditionally execute CLC + RTS, i.e., conditionally return success from a routine. + +Nothing creative or copyrightable here. diff --git a/strings/FFD0034C b/strings/FFD0034C new file mode 100644 index 00000000..741b355e --- /dev/null +++ b/strings/FFD0034C @@ -0,0 +1,4 @@ +fragment / BNE / JMP somewhere + +Conditionally jump somewhere. Would be a single instruction +on many architectures. Not copyrightable.