FeralChild64 c8d255130c migrated to ACME assembler
commit 145d64aa6e78838ed07cefed372f0ad6a4687e97
Author: FeralChild64 <you@example.com>
Date:   Sun Sep 20 20:16:57 2020 +0200

    ACME adaptation

commit 885209d7822286744ea53232ae7461472a01d5d6
Author: FeralChild64 <you@example.com>
Date:   Sun Sep 20 19:57:25 2020 +0200

    ACME adaptation

commit 334d84486bc603551887e7cbeb59d329f2224cc7
Author: FeralChild64 <you@example.com>
Date:   Sun Sep 20 18:29:15 2020 +0200

    ACME adaptation

commit b5966f49bcd8f0ca79cbec93819a31238924707e
Author: FeralChild64 <you@example.com>
Date:   Sun Sep 20 18:09:31 2020 +0200

    ACME adaptation

commit 786536a93a5eab5e676fca99625b4eb094a554e7
Author: FeralChild64 <you@example.com>
Date:   Sun Sep 20 17:24:48 2020 +0200

    ACME adaptation

commit 704c70dfb1f5d68775d6f3da220803b8a3990f56
Author: FeralChild64 <you@example.com>
Date:   Sun Sep 20 15:07:12 2020 +0200

    ACME adaptation

commit 136874964c9083b375f151475310f9636871fc72
Author: FeralChild64 <you@example.com>
Date:   Sun Sep 20 14:45:14 2020 +0200

    ACME adaptation

commit 8eca0d5700b72d04336e72c5cd3a68e18b85f96d
Author: FeralChild64 <you@example.com>
Date:   Sun Sep 20 14:06:52 2020 +0200

    ACME adaptation

commit 11d29eb7ee318239d782f85498b6d0524624d5c4
Author: FeralChild64 <you@example.com>
Date:   Sun Sep 20 13:56:45 2020 +0200

    ACME apaptation

commit c9b5e5e04cceb92c66bc027e6440bc0f7c5a499f
Author: FeralChild64 <you@example.com>
Date:   Sun Sep 20 13:49:04 2020 +0200

    ACME adaptation

commit f5cc254cbc921f07863807468cb3fe26b410b409
Author: FeralChild64 <you@example.com>
Date:   Sun Sep 20 13:01:18 2020 +0200

    ACME adaptation

commit e135a27bf9c30cc0965379c954564e06406303b1
Author: FeralChild64 <you@example.com>
Date:   Sat Sep 19 21:55:01 2020 +0200

    ACME adaptation

commit e9dfddf90d9e2795e88b7da40ae050d733faeb56
Author: FeralChild64 <you@example.com>
Date:   Sat Sep 19 21:48:47 2020 +0200

    Makefile fix

commit 07030104c65cf5e5beeacf6d629ccb9245e58657
Author: FeralChild64 <you@example.com>
Date:   Sat Sep 19 21:42:00 2020 +0200

    ACME adaptation

commit f824362ee5bcfbffca86c430b57773b2ffd65655
Author: FeralChild64 <you@example.com>
Date:   Sat Sep 19 20:14:56 2020 +0200

    ACME adaptation

commit 3a3c59007dcd4940d89b8669f34ca56b61c25fdf
Author: FeralChild64 <you@example.com>
Date:   Fri Sep 18 21:51:45 2020 +0200

    ACME adaptation

commit 6790ef7bc88a41de2881c69b7524dd4ab8c74b5d
Author: FeralChild64 <you@example.com>
Date:   Fri Sep 18 20:35:23 2020 +0200

    ACME adaptation

commit 38ad18b90e9ec713aa7ca49576b3388ce1733357
Author: FeralChild64 <you@example.com>
Date:   Fri Sep 18 18:46:20 2020 +0200

    ACME adaptation

commit 541340371122a9702f7b2d9771c298223cffd0e9
Author: FeralChild64 <you@example.com>
Date:   Fri Sep 18 16:49:46 2020 +0200

    ACME adaptation

commit 25cfd5e186459be1a260d3eb8cfff767838de370
Author: FeralChild64 <you@example.com>
Date:   Thu Sep 17 20:13:33 2020 +0200

    ACME adaptation

commit f61599444d5b1d03d8fd8e4a6a7c3b85069bedb3
Author: FeralChild64 <you@example.com>
Date:   Thu Sep 17 19:29:23 2020 +0200

    ACME adaptation

commit b290be31ec7bb2e5723607697da1bbc621c84429
Author: FeralChild64 <you@example.com>
Date:   Thu Sep 17 17:20:14 2020 +0200

    ACME adaptation

commit 877be9e856880d98fd4bcb25b42aaaacda9dc463
Author: FeralChild64 <you@example.com>
Date:   Wed Sep 16 21:47:38 2020 +0200

    ACME adaptation

commit bb20edaf85d386e41d5c2f715b745b68fbd3362e
Author: FeralChild64 <you@example.com>
Date:   Wed Sep 16 21:31:30 2020 +0200

    ACME adaptation

commit c5d31bd8685abce37c8e254d15aac20bd1570d9f
Author: FeralChild64 <you@example.com>
Date:   Wed Sep 16 18:40:49 2020 +0200

    ACME adaptation

commit 29349826b38f8a89649171559dc8cf24c560aff1
Author: FeralChild64 <you@example.com>
Date:   Mon Sep 14 23:35:47 2020 +0200

    ACME adaptation

commit 8bcd6a621c4b11766d0cf34f79858ba90a67248e
Author: FeralChild64 <you@example.com>
Date:   Mon Sep 14 22:52:25 2020 +0200

    ACME adaptation

commit e87a69edc2ce4bfcc460c31e08dcc352a985f88d
Author: FeralChild64 <you@example.com>
Date:   Mon Sep 14 22:43:27 2020 +0200

    ACME adaptation

commit f49a097bd52e96d00b866c02bda7121e4543233c
Author: FeralChild64 <you@example.com>
Date:   Mon Sep 14 19:02:07 2020 +0200

    ACME adaptation

commit fa0e9214a633b8e8f867cc70925b390940dcd426
Author: FeralChild64 <you@example.com>
Date:   Mon Sep 14 17:47:19 2020 +0200

    ACME adaptation

commit 1b763b91e7a03e426227129c7f22f0ce57a4c197
Author: FeralChild64 <you@example.com>
Date:   Mon Sep 14 17:17:10 2020 +0200

    ACME adaptation

commit e92a4b57b232cd85eb1e71090b8a89c7c8461ebc
Author: FeralChild64 <you@example.com>
Date:   Mon Sep 14 17:15:37 2020 +0200

    ACME adaptation

commit de3c693e8a7e73ea5289198946058e3240894e6a
Author: FeralChild64 <you@example.com>
Date:   Mon Sep 14 17:10:05 2020 +0200

    ACME adaptation

commit f9bd7ae0f04e932d613be9ed5cb19af9be5d338e
Author: FeralChild64 <you@example.com>
Date:   Sun Sep 13 14:34:44 2020 +0200

    ACME adaptation

commit 694dee52555dbfc2b1f7f452a9671ff51106c057
Author: FeralChild64 <you@example.com>
Date:   Sun Sep 13 14:16:14 2020 +0200

    ACME adaptation

commit 0af2c55edfcd22942d9f25417eb0d35f55b71604
Author: FeralChild64 <you@example.com>
Date:   Fri Sep 11 17:38:09 2020 +0200

    ACME adaptation

commit 2015e17334bd56a1e8a13a5abc098d9c2e7ea44f
Author: FeralChild64 <you@example.com>
Date:   Fri Sep 11 16:46:05 2020 +0200

    ACME adaptation

commit b1e972162798d60f4483cd6cc261e856c20c2c8c
Author: FeralChild64 <you@example.com>
Date:   Fri Sep 11 16:24:31 2020 +0200

    ACME adaptation

commit 9d027e868466901ba53bf074a79ec8cf16273021
Author: FeralChild64 <you@example.com>
Date:   Fri Sep 11 15:04:31 2020 +0200

    ACME adaptation

commit 957186deddd1aa4f3b4f1aa1f421e4239a584e57
Author: FeralChild64 <you@example.com>
Date:   Thu Sep 10 22:49:07 2020 +0200

    ACME adaptation

commit b8060f67a455cfac109f08d96b62c360d693b931
Author: FeralChild64 <you@example.com>
Date:   Wed Sep 9 23:07:28 2020 +0200

    ACME adaptation

commit e54d004568f44bbfe5c070ef1d7cf3544112e497
Author: FeralChild64 <you@example.com>
Date:   Wed Sep 9 22:58:20 2020 +0200

    ACME adaptation

commit f90b77f073c5a605cb31c6ee451f65c8a8aff7d8
Author: FeralChild64 <you@example.com>
Date:   Wed Sep 9 22:12:09 2020 +0200

    ACME adaptation

commit b211bb4afcd9c58fe1f5c92f3007717d611cd531
Author: FeralChild64 <you@example.com>
Date:   Wed Sep 9 22:01:40 2020 +0200

    ACME adaptation

commit 8d7ea343b07e9e08e5f77f3c414758a6cffd0440
Author: FeralChild64 <you@example.com>
Date:   Wed Sep 9 21:38:34 2020 +0200

    ACME adaptation

commit 46413eb0d92d6400aba0ff8dfe556e61e8a44d78
Author: FeralChild64 <you@example.com>
Date:   Wed Sep 9 21:07:47 2020 +0200

    ACME adaptation

commit 9f98f69ecc21f7b74a5eb89e247f5a2c6fcb655d
Author: FeralChild64 <you@example.com>
Date:   Wed Sep 9 20:05:03 2020 +0200

    ACME adaptation

commit 7bb9f1cadc682c7e0a4a6796739d860d473ca110
Author: FeralChild64 <you@example.com>
Date:   Wed Sep 9 19:55:12 2020 +0200

    ACME adaptation

commit 5fc115392b5bdca6b56f67ad866b1884d2d2bdf8
Author: FeralChild64 <you@example.com>
Date:   Wed Sep 9 19:31:10 2020 +0200

    ACME adaptation

commit b7940fc60e568d859df9e3156f6bacc6d685b2cc
Author: FeralChild64 <you@example.com>
Date:   Wed Sep 9 19:16:09 2020 +0200

    ACME adaptation

commit 56288cb97197561afa0816b29c134ec1190e8eab
Author: FeralChild64 <you@example.com>
Date:   Wed Sep 9 18:48:23 2020 +0200

    ACME adaptation

commit 10401a60fc7922a53d782120ef6795d889140218
Author: FeralChild64 <you@example.com>
Date:   Wed Sep 9 16:34:16 2020 +0200

    ACME adaptation

commit 8ce76e4d2b56837a691ae84b1a412a2ae32a157b
Author: FeralChild64 <you@example.com>
Date:   Wed Sep 9 16:20:44 2020 +0200

    ACME adaptation

commit 33fade899fa6172ea6b5b5f6683bb61f544429fd
Author: FeralChild64 <you@example.com>
Date:   Wed Sep 9 15:28:46 2020 +0200

    ACME adaptation

commit a416f04734402fcfbc57a933731376df2e0180a1
Author: FeralChild64 <you@example.com>
Date:   Wed Sep 9 12:40:03 2020 +0200

    ACME adaptation

commit f8daee005b1d29f6912723be2ac94bc5fbeb0508
Author: FeralChild64 <you@example.com>
Date:   Mon Sep 7 23:29:54 2020 +0200

    ACME adaptation

commit 83fe6bdd0b08a44fdbfc6eefe323a4b194ccaf5b
Author: FeralChild64 <you@example.com>
Date:   Mon Sep 7 22:23:16 2020 +0200

    ACME adaptation

commit cb1f75620b9c83000a15c9c7f7acefdfee79a979
Author: FeralChild64 <you@example.com>
Date:   Mon Sep 7 19:23:12 2020 +0200

    ACME adaptation

commit e524d517c933ae1f0aeb49764d307fadb4845025
Author: FeralChild64 <you@example.com>
Date:   Sun Sep 6 08:24:25 2020 +0200

    ACME adaptation - replaced comments

commit 2ab572c3a21f4a78a7312d0e684bc11d91d1717a
Author: FeralChild64 <you@example.com>
Date:   Sat Sep 5 17:59:10 2020 +0200

    ACME adaptation - replaced the assembler
2020-09-20 20:22:36 +02:00
2020-09-20 20:22:36 +02:00
2020-09-03 20:33:25 +02:00
2020-09-20 20:22:36 +02:00
2020-09-03 21:14:14 +02:00
2020-09-20 20:22:36 +02:00
2020-09-20 20:22:36 +02:00
2020-09-20 20:22:36 +02:00
2020-09-20 20:22:36 +02:00
2020-09-20 20:22:36 +02:00
2020-02-14 22:11:03 +01:00
2019-06-16 11:07:41 +09:30
2019-06-16 11:07:41 +09:30
2020-09-03 15:52:37 +02:00
2020-03-05 19:26:13 +01:00
2020-09-20 20:22:36 +02:00
2020-09-03 15:52:37 +02:00
2020-09-03 15:52:37 +02:00

Open ROMs

screenshot generic build screenshot screenshot MEGA65 build screenshot

A project to create unencumbered open-source ROMs for use on selected retro computers. Besides this manifest, the following documents are available:

To download pre-built ROM images, go here.

Problem Statement and Motivation

The copyrights of various old computer system ROMs are still alive, and together with trademarks, can present significant challenges for retro-computing projects to ensure their ability to freely distribute their systems in a functional state, which typically requires the inclusion of firmware, i.e, "ROMs", while respecting the intellectual property rights of the owners of the copyrights in the ROMs.

Therefore the goal of this project is to create a fully open-source and unencumbered set of ROMs for various systems. The initial focus is the C64 and C65 computers, because of the desire to be able to include Open ROMs with the MEGA65 retro computer.

In short, this project exists precisely because we respect, and want to help others to respect the intellectual property rights of the copyright owners of the ROMs of various old computer systems. Any argument that we have willfully infringed their copyrights must therefore fail, since if we didn't care about their intellectual property rights, we would simply download the ROMs from any of the many locations where they are freely available on the internet.

But isn't there already an implied license to distribute and even modify the ROMs of these old systems?

On a related note, it is quite likely that the lack of defence of the copyrights of the ROMs of these old systems over many many years has created an implied license to use and distribute these ROMs. This is because the copyright owners are surely aware, and have been for many years, of this common practice. Thus, on a similar basis to the implied right of way on private land that is not defended against unrestricted public use, an implied right can develop for the use of copyright material. While it would take the courts to assess this argument (I am no lawyer, and am merely expressing my personal opinions in this document), it would seem to me likely that such an implied license exists. However, as our goals are to both respect intellectual property rights, and to avoid all possible sources of uncertainty for the retro-computing community, we have elected to proceed with this project to create compatible ROMs that are free from any and all copyright claims as possible.

Method and estimated legal situation of reverse engineering

Reverse engineering is a well known art, and enjoys protection under copyright law in a number of jurisdictions, including the EU and Australia. Large companies such as Microsoft have also used it in the past in major products such as Windows.

The generally accepted method is to create a specification from the existing software, and then have a separate team implement the new software from that specification.

Interesting challenges in our case include that the software is so widely distributed, that it is much more difficult to find people who have not been exposed to the original software, which can complicate claims of "cleanness" of the result. Also, when talking about a compact 8KB ROM, for example, there may only be so many ways to implement a given function. This latter issue is both a disadvantage and advantage, because where there is no choice in implementation, then it is questionable whether the result can be copyright, because it contains no creative expression.

What we will need to do to minimise the risks, is to describe the creation of each routine and piece of code with extensive commentary in terms of the specifications, including to explore different potential implementations of the specification, with justification of which particular implementation is being used.

Where the result is considerably similar to the original through chance or necessity, then further justification will be required to explain how this is inevitable. This is achieved through a custom tool we have created that searches for similarities and reports them, unless they have had an explanation provided.

In our favour, there is a long history of the publication of information that has been derived from disassembling the C64 and related Computer's ROMs, e.g., https://www.cubic.org/~doj/c64/mapping128.pdf We can refer to the contents of such publications, without having to actually look at the contents of the ROMs ourselves. That is, we can treat the KERNAL and BASIC ROMs as black boxes with specifications and descriptions already captured in these long standing publications.

Justifying the interoperability requirement of every routine

For each routine, there should also exist a *.interop file that in comments explains the requirement, and is followed by one or more test programs that can be demonstrated to not work if this region of the original ROM does not perform the prescribed function, or if the function is moved to another location in the ROM.

To be as defensive as possible on this front, we need to ideally demonstrate clearly that said program jumps/ calls the prescribed routine at the specific location, so that it is unambiguous that the function must exist at the location. A good way to cover this for many situations would be to generate logs of many programs running, and capturing exactly which entry points are called from where. That is, to generate a call-graph that is the combination of many program runs, so that we can build up a map of what is required in terms of correct function of the system. This then defines the interface exactly from the perspective of interoperability.

We can capture this information using x64 -remotemonitor, and then making a program that connects to port 6510 and uses reset 0 to reset the CPU, and then types step and sends carriage returns repeatedly, and logs the instruction stream. If a program is loaded and run, then this will capture the instruction stream, and allow us to generate this call graph.

Specific Method

  1. Begin with the immutable starting point of the 6502 reset entries, IRQ entry and NMI entries, and the rest of the ROM being empty. This starting point can have no copyright problems.
  2. Based on the public calling interface of the C64 KERNAL, make stub routines for the jump table.
  3. All routines begin at the lowest address in the kernal, sorted by routine name. Thus the order of the routines is deterministic, and not the result of any creative process.
  4. Implement publicly documented routines in any order, using secondary sources, such as books about the C64, but without refering to the 64 ROM contents themselves.
  5. Run test programs using the C64 KERNAL, and collect entry points into the ROMs.
  6. Where an entry point does not correspond to a public API of the KERNAL, research the function by searching for it in Google. Implement it according to those references.
  7. Where an entry point means that previously implemented routines have to be moved to make space at a specific address, move only those routines required to do so, to the next available address.
  8. Where understanding of the inner workings of a routine are required to replicate it, secondary sources, such as the "Mapping the C64" or "C64 Programmer's Reference Guide" should be used. When those do not provide the answer, internet searches based on the name of the routine should be done, and failing that, based on the routine's address if it has no well known name or insufficient material is turned up. Reference to actual disassemblies of the ROMs is not to be made, to ensure that we have strong defences against any claim of copyright infringement.

To organise this as we develop, we will assemble the ROM from many separate source files, each with a single routine in it, and with the name of the file matching the routine. Where code must be placed at a specific address, the file should be called xxxx.routine.s, where xxxx is the address. We will write a special preprocessor that will take the routines and put them in the correct deterministic order, and make sure that no address placement violations occur. To make this easier to do, we are using the Ophis assembler, as it makes it quite easy to check such things.

Defending against potential copyright infringement claims

Our overall goal is to avoid any potential challenge against this software based on claims of copyright infringement from whoever may own the copyright to Commodore 64, 65 or 128 computer ROMs. Therefore, in addition to the above procedure, we have a tool called similarity that can be run against one of the Commodore ROMs and our open-source ROMs to look for any similarity exceeding 2 bytes, and provides an explanation for every such similarity, or shows the sequence of bytes.

Matches of single bytes are excluded, because every byte value is statistically likely to be present in any substantial program, and thuss cannot possible be copyright. As similar argument applies to pairs of bytes.

For 3 byte sequences, we ignore all single CPU instructions, as it cannot be argued that any specific instruction of the 6502 processor could be copyrighted in its binary form.

We also automatically exclude some very common 3 byte sequences, such as any branch followed by its 1 byte argument and any following opcode. There is simply no creative value possible in a pairingg of two instructions, the first of which is a branch.

Similarly, any 3 byte sequence that ends in storing a value into a zero page location is excluded on the basis that such sequences occur with extreme frequency, and are a natural result of writing 6502 code.

Similarly loading or comparing the A register, followed by any single instruction cannot possibly be copyrightable. Similarly for many other 2-byte instructions.

All other matches of at least 3 bytes are searched for in the strings/ directory for a file with matching name, and if present, the first line of that file is shown as an explanation. These files contain our opinions on why such sequences cannot be copyrightable, or failing that, the subject of any claim of copyright infringement with respect to the C64/C65/C128 ROMs by their owners.

That is, we are seeking to be totally transparent in the creation of our free ROMs for these 8-bit computers, and providing reasoned arguments in advance for all to see. This should appease potential users of them, while also providing clear justification to anyone who might seek to bring any legal challenge against them. Basically if you can't provide a strong argument as to why our reasoning on a given byte sequence is fatally flawed, then we have every intention to seek dismissal of any case with prejudice and seeking costs, because we have provided you with access to information that disproves such a case along with the software, and bringing or threatening to bring any case against the authors or distributors of this software based on copyright infringement against the C64/C65/C128 ROMs is therefore clearly vexatious, since it is bought without refuting our publicly documented explanation as to why this software is not infringing.

Note that just because we provide an explanation of a byte sequence, or because our similarity tool considers it worth explaining, it does not constitute an admission on our part that such a sequence may be subject to copyright. Rather, we have purposely created and configured this tool to be overly senstive in an abundance of caution. As with everything in this software, we are going above and beyond to establish beyond reasonable doubt that our software does not infringe the copyrights of the owners of the C64/C65/C128 and other ROMs.

A note on common furniture of a BASIC system

The "READY." prompt and error messages constitute the majority of the obvious "furniture" of a computer like the C64. However, both these elements have since been widely copied to the point of being genericised in our view. It is only the exact combination of the phraseology of the C64's startup screen combined with the double-blue colour scheme that would seem to stand any chance of enjoying any protection. The number of coffee mugs and T-shirts with READY. or similar printed on them, and which have been available for decades without challenge from any rights holders would seem to confirm this view. Also, the lack of defence against such things acts to diminish any residual rights that might have ever existed.

In an abundance of caution, we are using a different colour scheme than the C64: Namely, solid blue with white text, which has long since been used on many other computer systems, such as QuickBASIC on DOS, and in many application programs. Such a colour scheme is unprotectable in our view.

Note regarding trademarks

Commodore and other trademarks are trade-marks of their owners, whoever that may be at any particular point in time.

S
Description
Fork of MEGA65 OpenROMs (LGPL-3.0-or-later, some BASIC files MIT): the Firmware of arnitech's mc64 mod. Our changes live on the mc64 branch.
Readme GPL-3.0 MIT
8.1 MiB
0 Stars 1 Watchers 0 Forks
Languages
Assembly 79%
C++ 11.9%
C 5.1%
Makefile 3.2%
GLSL 0.8%