From f09585176cf9b5fb7eea487982b25716ba2b5308 Mon Sep 17 00:00:00 2001 From: tudnai Date: Mon, 13 Jul 2020 10:10:33 -0700 Subject: [PATCH] Added GPL v3 License --- A2Mac.xcodeproj/project.pbxproj | 6 +- A2Mac/A2Mac-Bridging-Header.h | 17 +- A2Mac/AppDelegate.swift | 17 +- A2Mac/COPYING | 674 +++++++ A2Mac/HiRes.swift | 17 +- A2Mac/Info.plist | 2 +- A2Mac/LoRes.swift | 17 +- A2Mac/MonitorView.swift | 17 +- A2Mac/NSLayoutManager-Extension.swift | 17 +- A2Mac/PreferencesViewController.swift | 17 +- A2Mac/PreferencesWindowController.swift | 17 +- A2Mac/Shaders.metal | 17 +- A2Mac/ToolBarController.swift | 17 +- A2Mac/ViewController.swift | 17 +- A2Mac/verticies.swift | 17 +- A2MacTests/A2MacTests.swift | 17 +- A2MacUITests/A2MacUITests.swift | 17 +- A2iOS/A2iOS-Bridging-Header.h | 17 +- A2iOS/AppDelegate.swift | 17 +- A2iOS/SceneDelegate.swift | 17 +- A2iOS/ViewController.swift | 17 +- A2iOSTests/A2iOSTests.swift | 17 +- A2iOSUITests/A2iOSUITests.swift | 17 +- src/cpu/6502.c | 17 +- src/cpu/6502.h | 17 +- src/cpu/6502_vanilla.c | 17 +- src/cpu/65C02.c | 17 +- src/cpu/instructions/6502_instr_BACKUP.h | 1546 ----------------- src/cpu/instructions/6502_instr_arithmetic.h | 17 +- src/cpu/instructions/6502_instr_branch.h | 17 +- .../instructions/6502_instr_call_ret_jump.h | 17 +- .../instructions/6502_instr_compare_test.h | 17 +- src/cpu/instructions/6502_instr_inc_dec.h | 17 +- src/cpu/instructions/6502_instr_load_store.h | 17 +- src/cpu/instructions/6502_instr_logic.h | 17 +- src/cpu/instructions/6502_instr_misc.h | 17 +- src/cpu/instructions/6502_instr_set_clr.h | 17 +- .../instructions/6502_instr_shift_rotate.h | 17 +- src/cpu/instructions/6502_instr_stack.h | 17 +- src/cpu/instructions/6502_instr_transfer.h | 17 +- src/cpu/instructions/6502_instr_undoc.h | 17 +- src/cpu/instructions/6502_instructions.h | 17 +- src/dev/audio/speaker.c | 17 +- src/dev/audio/speaker.h | 17 +- src/dev/disk/disk.c | 17 +- src/dev/disk/disk.h | 17 +- src/dev/disk/dsk2woz.c | 15 + src/dev/disk/dsk2woz.h | 17 +- src/dev/disk/woz.c | 17 +- src/dev/disk/woz.h | 17 +- src/dev/game/paddle.h | 17 +- src/dev/mem/Apple2_mmio_8bit_ioaddr.h | 17 +- src/dev/mem/mmio.h | 17 +- src/util/RepeatingTimer.swift | 17 +- src/util/common.c | 17 +- src/util/common.h | 17 +- src/util/disassembler.h | 17 +- 57 files changed, 1526 insertions(+), 1601 deletions(-) create mode 100644 A2Mac/COPYING delete mode 100644 src/cpu/instructions/6502_instr_BACKUP.h diff --git a/A2Mac.xcodeproj/project.pbxproj b/A2Mac.xcodeproj/project.pbxproj index 2923303..cd34a30 100644 --- a/A2Mac.xcodeproj/project.pbxproj +++ b/A2Mac.xcodeproj/project.pbxproj @@ -58,6 +58,7 @@ 325EB6AA2401118300C6B4A4 /* Sneakers.woz in Resources */ = {isa = PBXBuildFile; fileRef = 325EB69A2401118300C6B4A4 /* Sneakers.woz */; }; 325EB6AC2401118300C6B4A4 /* Xonix.woz in Resources */ = {isa = PBXBuildFile; fileRef = 325EB69B2401118300C6B4A4 /* Xonix.woz */; }; 3267641624B6572E000BEA11 /* Merlin Assembler.woz in Copy Disk Images */ = {isa = PBXBuildFile; fileRef = 3267641524B6572E000BEA11 /* Merlin Assembler.woz */; }; + 3267641824BCC9A5000BEA11 /* COPYING in Resources */ = {isa = PBXBuildFile; fileRef = 3267641724BCC9A5000BEA11 /* COPYING */; }; 326B56E524AD8E89009BA0AC /* gobackward.png in Copy Image Files */ = {isa = PBXBuildFile; fileRef = 326B56E424AD8E89009BA0AC /* gobackward.png */; }; 326B56E724AD906D009BA0AC /* doc.text.viewfinder.png in Copy Image Files */ = {isa = PBXBuildFile; fileRef = 326B56E624AD906D009BA0AC /* doc.text.viewfinder.png */; }; 32877F8D24ADA6AF003A940D /* joystick.png in Copy Image Files */ = {isa = PBXBuildFile; fileRef = 32877F8C24ADA6AF003A940D /* joystick.png */; }; @@ -323,7 +324,6 @@ 32439F7E22ECD8AD0077AAE0 /* 6502_instr_arithmetic.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 6502_instr_arithmetic.h; sourceTree = ""; }; 32439F7F22ECD8AD0077AAE0 /* 6502_instr_transfer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 6502_instr_transfer.h; sourceTree = ""; }; 32439F8022ECD8AD0077AAE0 /* 6502_instr_load_store.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 6502_instr_load_store.h; sourceTree = ""; }; - 32439F8122ECD8AD0077AAE0 /* 6502_instr_BACKUP.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 6502_instr_BACKUP.h; sourceTree = ""; }; 32439F8222ECD8AD0077AAE0 /* 6502_instr_call_ret_jump.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 6502_instr_call_ret_jump.h; sourceTree = ""; }; 32439F8322ECD8AD0077AAE0 /* 6502_instructions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 6502_instructions.h; sourceTree = ""; }; 32439F8422ECD8AD0077AAE0 /* apple.rom */ = {isa = PBXFileReference; lastKnownFileType = file; path = apple.rom; sourceTree = ""; }; @@ -398,6 +398,7 @@ 3264261023284F6F008B615F /* Apple2_mmio_8bit_ioaddr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Apple2_mmio_8bit_ioaddr.h; sourceTree = ""; }; 326426112328ADF4008B615F /* Apple_II_ROM.s */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.asm; path = Apple_II_ROM.s; sourceTree = ""; }; 3267641524B6572E000BEA11 /* Merlin Assembler.woz */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Merlin Assembler.woz"; sourceTree = ""; }; + 3267641724BCC9A5000BEA11 /* COPYING */ = {isa = PBXFileReference; lastKnownFileType = text; path = COPYING; sourceTree = ""; }; 3268E68E2474E24900047474 /* paddle.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = paddle.h; sourceTree = ""; }; 326B56E424AD8E89009BA0AC /* gobackward.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = gobackward.png; sourceTree = ""; }; 326B56E624AD906D009BA0AC /* doc.text.viewfinder.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = doc.text.viewfinder.png; sourceTree = ""; }; @@ -606,7 +607,6 @@ 32439F7D22ECD8AD0077AAE0 /* 6502_instr_misc.h */, 32439F7E22ECD8AD0077AAE0 /* 6502_instr_arithmetic.h */, 32439F7F22ECD8AD0077AAE0 /* 6502_instr_transfer.h */, - 32439F8122ECD8AD0077AAE0 /* 6502_instr_BACKUP.h */, 32439F8222ECD8AD0077AAE0 /* 6502_instr_call_ret_jump.h */, 32439F8322ECD8AD0077AAE0 /* 6502_instructions.h */, ); @@ -796,6 +796,7 @@ 32BFFB6422EACC660003B53F /* A2Mac.entitlements */, 32439F7222ECD8AC0077AAE0 /* A2Mac-Bridging-Header.h */, 32E3126C24AC033A00E61891 /* ToolBarController.swift */, + 3267641724BCC9A5000BEA11 /* COPYING */, ); path = A2Mac; sourceTree = ""; @@ -1102,6 +1103,7 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + 3267641824BCC9A5000BEA11 /* COPYING in Resources */, 3213936624079C30007F5C4A /* Main.storyboard in Resources */, 32BFFB5F22EACC660003B53F /* Assets.xcassets in Resources */, 323D042E248980600086A901 /* Preferences.storyboard in Resources */, diff --git a/A2Mac/A2Mac-Bridging-Header.h b/A2Mac/A2Mac-Bridging-Header.h index dc2a6de..aa76b22 100644 --- a/A2Mac/A2Mac-Bridging-Header.h +++ b/A2Mac/A2Mac-Bridging-Header.h @@ -3,7 +3,22 @@ // A2Mac // // Created by Tamas Rudnai on 2/17/20. -// Copyright © 2020 GameAlloy. All rights reserved. +// Copyright © 2019,2020 Tamas Rudnai. All rights reserved. +// +// This file is part of Steve ][ -- The Apple ][ Emulator. +// +// Steve ][ is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Steve ][ is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Steve ][. If not, see . // // // Use this file to import your target's public headers that you would like to expose to Swift. diff --git a/A2Mac/AppDelegate.swift b/A2Mac/AppDelegate.swift index f456ab7..4e90eb7 100644 --- a/A2Mac/AppDelegate.swift +++ b/A2Mac/AppDelegate.swift @@ -3,7 +3,22 @@ // A2Mac // // Created by Tamas Rudnai on 7/25/19. -// Copyright © 2019 GameAlloy. All rights reserved. +// Copyright © 2019,2020 Tamas Rudnai. All rights reserved. +// +// This file is part of Steve ][ -- The Apple ][ Emulator. +// +// Steve ][ is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Steve ][ is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Steve ][. If not, see . // import Cocoa diff --git a/A2Mac/COPYING b/A2Mac/COPYING new file mode 100644 index 0000000..f288702 --- /dev/null +++ b/A2Mac/COPYING @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/A2Mac/HiRes.swift b/A2Mac/HiRes.swift index 4156714..aae6742 100644 --- a/A2Mac/HiRes.swift +++ b/A2Mac/HiRes.swift @@ -3,7 +3,22 @@ // A2Mac // // Created by Tamas Rudnai on 9/19/19. -// Copyright © 2019 GameAlloy. All rights reserved. +// Copyright © 2019,2020 Tamas Rudnai. All rights reserved. +// +// This file is part of Steve ][ -- The Apple ][ Emulator. +// +// Steve ][ is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Steve ][ is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Steve ][. If not, see . // //import Foundation diff --git a/A2Mac/Info.plist b/A2Mac/Info.plist index ca6f1ec..21f2067 100644 --- a/A2Mac/Info.plist +++ b/A2Mac/Info.plist @@ -27,7 +27,7 @@ LSMinimumSystemVersion $(MACOSX_DEPLOYMENT_TARGET) NSHumanReadableCopyright - Copyright © 2019 GameAlloy. All rights reserved. + Copyright © 2019,2020 Tamas Rudnai. All rights reserved. NSMainStoryboardFile Main NSPrincipalClass diff --git a/A2Mac/LoRes.swift b/A2Mac/LoRes.swift index 5762027..5870c24 100644 --- a/A2Mac/LoRes.swift +++ b/A2Mac/LoRes.swift @@ -3,7 +3,22 @@ // A2Mac // // Created by Tamas Rudnai on 9/19/19. -// Copyright © 2019 GameAlloy. All rights reserved. +// Copyright © 2019,2020 Tamas Rudnai. All rights reserved. +// +// This file is part of Steve ][ -- The Apple ][ Emulator. +// +// Steve ][ is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Steve ][ is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Steve ][. If not, see . // //import Foundation diff --git a/A2Mac/MonitorView.swift b/A2Mac/MonitorView.swift index 4ac61a5..f98ae76 100644 --- a/A2Mac/MonitorView.swift +++ b/A2Mac/MonitorView.swift @@ -3,7 +3,22 @@ // A2Mac // // Created by Tamas Rudnai on 9/18/19. -// Copyright © 2019 GameAlloy. All rights reserved. +// Copyright © 2019,2020 Tamas Rudnai. All rights reserved. +// +// This file is part of Steve ][ -- The Apple ][ Emulator. +// +// Steve ][ is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Steve ][ is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Steve ][. If not, see . // import Cocoa diff --git a/A2Mac/NSLayoutManager-Extension.swift b/A2Mac/NSLayoutManager-Extension.swift index 495288e..059727d 100644 --- a/A2Mac/NSLayoutManager-Extension.swift +++ b/A2Mac/NSLayoutManager-Extension.swift @@ -3,7 +3,22 @@ // A2Mac // // Created by Tamas Rudnai on 9/17/19. -// Copyright © 2019 GameAlloy. All rights reserved. +// Copyright © 2019,2020 Tamas Rudnai. All rights reserved. +// +// This file is part of Steve ][ -- The Apple ][ Emulator. +// +// Steve ][ is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Steve ][ is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Steve ][. If not, see . // import Foundation diff --git a/A2Mac/PreferencesViewController.swift b/A2Mac/PreferencesViewController.swift index ca1d6e8..f475be2 100644 --- a/A2Mac/PreferencesViewController.swift +++ b/A2Mac/PreferencesViewController.swift @@ -3,7 +3,22 @@ // A2Mac // // Created by Tamas Rudnai on 6/4/20. -// Copyright © 2020 GameAlloy. All rights reserved. +// Copyright © 2019,2020 Tamas Rudnai. All rights reserved. +// +// This file is part of Steve ][ -- The Apple ][ Emulator. +// +// Steve ][ is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Steve ][ is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Steve ][. If not, see . // import Cocoa diff --git a/A2Mac/PreferencesWindowController.swift b/A2Mac/PreferencesWindowController.swift index 881ea6f..3f174b7 100644 --- a/A2Mac/PreferencesWindowController.swift +++ b/A2Mac/PreferencesWindowController.swift @@ -3,7 +3,22 @@ // A2Mac // // Created by Tamas Rudnai on 6/4/20. -// Copyright © 2020 GameAlloy. All rights reserved. +// Copyright © 2019,2020 Tamas Rudnai. All rights reserved. +// +// This file is part of Steve ][ -- The Apple ][ Emulator. +// +// Steve ][ is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Steve ][ is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Steve ][. If not, see . // import Cocoa diff --git a/A2Mac/Shaders.metal b/A2Mac/Shaders.metal index 707de46..b77c55e 100644 --- a/A2Mac/Shaders.metal +++ b/A2Mac/Shaders.metal @@ -3,7 +3,22 @@ // A2Mac // // Created by Tamas Rudnai on 9/27/19. -// Copyright © 2019 GameAlloy. All rights reserved. +// Copyright © 2019,2020 Tamas Rudnai. All rights reserved. +// +// This file is part of Steve ][ -- The Apple ][ Emulator. +// +// Steve ][ is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Steve ][ is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Steve ][. If not, see . // #include diff --git a/A2Mac/ToolBarController.swift b/A2Mac/ToolBarController.swift index 874d660..37aef81 100644 --- a/A2Mac/ToolBarController.swift +++ b/A2Mac/ToolBarController.swift @@ -3,7 +3,22 @@ // Steve ][ // // Created by Tamas Rudnai on 6/30/20. -// Copyright © 2020 GameAlloy. All rights reserved. +// Copyright © 2019,2020 Tamas Rudnai. All rights reserved. +// +// This file is part of Steve ][ -- The Apple ][ Emulator. +// +// Steve ][ is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Steve ][ is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Steve ][. If not, see . // import Cocoa diff --git a/A2Mac/ViewController.swift b/A2Mac/ViewController.swift index 5476953..d22a4b0 100644 --- a/A2Mac/ViewController.swift +++ b/A2Mac/ViewController.swift @@ -3,7 +3,22 @@ // A2Mac // // Created by Tamas Rudnai on 7/25/19. -// Copyright © 2019 GameAlloy. All rights reserved. +// Copyright © 2019,2020 Tamas Rudnai. All rights reserved. +// +// This file is part of Steve ][ -- The Apple ][ Emulator. +// +// Steve ][ is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Steve ][ is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Steve ][. If not, see . // diff --git a/A2Mac/verticies.swift b/A2Mac/verticies.swift index 5414c3b..9077da7 100644 --- a/A2Mac/verticies.swift +++ b/A2Mac/verticies.swift @@ -3,7 +3,22 @@ // A2Mac // // Created by Tamas Rudnai on 9/28/19. -// Copyright © 2019 GameAlloy. All rights reserved. +// Copyright © 2019,2020 Tamas Rudnai. All rights reserved. +// +// This file is part of Steve ][ -- The Apple ][ Emulator. +// +// Steve ][ is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Steve ][ is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Steve ][. If not, see . // import Foundation diff --git a/A2MacTests/A2MacTests.swift b/A2MacTests/A2MacTests.swift index 3e7331b..bc492e5 100644 --- a/A2MacTests/A2MacTests.swift +++ b/A2MacTests/A2MacTests.swift @@ -3,7 +3,22 @@ // A2MacTests // // Created by Tamas Rudnai on 7/25/19. -// Copyright © 2019 GameAlloy. All rights reserved. +// Copyright © 2019,2020 Tamas Rudnai. All rights reserved. +// +// This file is part of Steve ][ -- The Apple ][ Emulator. +// +// Steve ][ is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Steve ][ is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Steve ][. If not, see . // import XCTest diff --git a/A2MacUITests/A2MacUITests.swift b/A2MacUITests/A2MacUITests.swift index 6ce0bf4..42cbcff 100644 --- a/A2MacUITests/A2MacUITests.swift +++ b/A2MacUITests/A2MacUITests.swift @@ -3,7 +3,22 @@ // A2MacUITests // // Created by Tamas Rudnai on 7/25/19. -// Copyright © 2019 GameAlloy. All rights reserved. +// Copyright © 2019,2020 Tamas Rudnai. All rights reserved. +// +// This file is part of Steve ][ -- The Apple ][ Emulator. +// +// Steve ][ is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Steve ][ is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Steve ][. If not, see . // import XCTest diff --git a/A2iOS/A2iOS-Bridging-Header.h b/A2iOS/A2iOS-Bridging-Header.h index 86fdb73..22d523d 100644 --- a/A2iOS/A2iOS-Bridging-Header.h +++ b/A2iOS/A2iOS-Bridging-Header.h @@ -3,7 +3,22 @@ // A2Mac // // Created by Tamas Rudnai on 2/17/20. -// Copyright © 2020 GameAlloy. All rights reserved. +// Copyright © 2019,2020 Tamas Rudnai. All rights reserved. +// +// This file is part of Steve ][ -- The Apple ][ Emulator. +// +// Steve ][ is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Steve ][ is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Steve ][. If not, see . // // // Use this file to import your target's public headers that you would like to expose to Swift. diff --git a/A2iOS/AppDelegate.swift b/A2iOS/AppDelegate.swift index e07f741..4458bc6 100644 --- a/A2iOS/AppDelegate.swift +++ b/A2iOS/AppDelegate.swift @@ -3,7 +3,22 @@ // A2iOS // // Created by Tamas Rudnai on 2/17/20. -// Copyright © 2020 GameAlloy. All rights reserved. +// Copyright © 2019,2020 Tamas Rudnai. All rights reserved. +// +// This file is part of Steve ][ -- The Apple ][ Emulator. +// +// Steve ][ is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Steve ][ is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Steve ][. If not, see . // import UIKit diff --git a/A2iOS/SceneDelegate.swift b/A2iOS/SceneDelegate.swift index f52d2f8..cee4c50 100644 --- a/A2iOS/SceneDelegate.swift +++ b/A2iOS/SceneDelegate.swift @@ -3,7 +3,22 @@ // A2iOS // // Created by Tamas Rudnai on 2/17/20. -// Copyright © 2020 GameAlloy. All rights reserved. +// Copyright © 2019,2020 Tamas Rudnai. All rights reserved. +// +// This file is part of Steve ][ -- The Apple ][ Emulator. +// +// Steve ][ is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Steve ][ is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Steve ][. If not, see . // import UIKit diff --git a/A2iOS/ViewController.swift b/A2iOS/ViewController.swift index 32c42db..a0bc824 100644 --- a/A2iOS/ViewController.swift +++ b/A2iOS/ViewController.swift @@ -3,7 +3,22 @@ // A2iOS // // Created by Tamas Rudnai on 2/17/20. -// Copyright © 2020 GameAlloy. All rights reserved. +// Copyright © 2019,2020 Tamas Rudnai. All rights reserved. +// +// This file is part of Steve ][ -- The Apple ][ Emulator. +// +// Steve ][ is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Steve ][ is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Steve ][. If not, see . // import UIKit diff --git a/A2iOSTests/A2iOSTests.swift b/A2iOSTests/A2iOSTests.swift index 1a8e0b4..7ebd332 100644 --- a/A2iOSTests/A2iOSTests.swift +++ b/A2iOSTests/A2iOSTests.swift @@ -3,7 +3,22 @@ // A2iOSTests // // Created by Tamas Rudnai on 2/17/20. -// Copyright © 2020 GameAlloy. All rights reserved. +// Copyright © 2019,2020 Tamas Rudnai. All rights reserved. +// +// This file is part of Steve ][ -- The Apple ][ Emulator. +// +// Steve ][ is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Steve ][ is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Steve ][. If not, see . // import XCTest diff --git a/A2iOSUITests/A2iOSUITests.swift b/A2iOSUITests/A2iOSUITests.swift index eef8838..46406d2 100644 --- a/A2iOSUITests/A2iOSUITests.swift +++ b/A2iOSUITests/A2iOSUITests.swift @@ -3,7 +3,22 @@ // A2iOSUITests // // Created by Tamas Rudnai on 2/17/20. -// Copyright © 2020 GameAlloy. All rights reserved. +// Copyright © 2019,2020 Tamas Rudnai. All rights reserved. +// +// This file is part of Steve ][ -- The Apple ][ Emulator. +// +// Steve ][ is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Steve ][ is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Steve ][. If not, see . // import XCTest diff --git a/src/cpu/6502.c b/src/cpu/6502.c index 1153dee..a86b345 100644 --- a/src/cpu/6502.c +++ b/src/cpu/6502.c @@ -3,7 +3,22 @@ // 6502 // // Created by Tamas Rudnai on 7/14/19. -// Copyright © 2019 GameAlloy. All rights reserved. +// Copyright © 2019,2020 Tamas Rudnai. All rights reserved. +// +// This file is part of Steve ][ -- The Apple ][ Emulator. +// +// Steve ][ is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Steve ][ is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Steve ][. If not, see . // // Documentations: // diff --git a/src/cpu/6502.h b/src/cpu/6502.h index 2c04ee7..4133372 100644 --- a/src/cpu/6502.h +++ b/src/cpu/6502.h @@ -3,7 +3,22 @@ // 6502 // // Created by Tamas Rudnai on 7/22/19. -// Copyright © 2019 GameAlloy. All rights reserved. +// Copyright © 2019,2020 Tamas Rudnai. All rights reserved. +// +// This file is part of Steve ][ -- The Apple ][ Emulator. +// +// Steve ][ is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Steve ][ is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Steve ][. If not, see . // #ifndef __6502_H__ diff --git a/src/cpu/6502_vanilla.c b/src/cpu/6502_vanilla.c index 0bde4bd..8e2bbb0 100644 --- a/src/cpu/6502_vanilla.c +++ b/src/cpu/6502_vanilla.c @@ -3,7 +3,22 @@ // 6502 // // Created by Tamas Rudnai on 7/14/19. -// Copyright © 2019 GameAlloy. All rights reserved. +// Copyright © 2019,2020 Tamas Rudnai. All rights reserved. +// +// This file is part of Steve ][ -- The Apple ][ Emulator. +// +// Steve ][ is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Steve ][ is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Steve ][. If not, see . // #define CLK_WAIT diff --git a/src/cpu/65C02.c b/src/cpu/65C02.c index b9f7e3f..9242cf0 100644 --- a/src/cpu/65C02.c +++ b/src/cpu/65C02.c @@ -3,7 +3,22 @@ // 6502 // // Created by Tamas Rudnai on 7/14/19. -// Copyright © 2019 GameAlloy. All rights reserved. +// Copyright © 2019,2020 Tamas Rudnai. All rights reserved. +// +// This file is part of Steve ][ -- The Apple ][ Emulator. +// +// Steve ][ is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Steve ][ is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Steve ][. If not, see . // #define CLK_WAIT diff --git a/src/cpu/instructions/6502_instr_BACKUP.h b/src/cpu/instructions/6502_instr_BACKUP.h deleted file mode 100644 index 363767b..0000000 --- a/src/cpu/instructions/6502_instr_BACKUP.h +++ /dev/null @@ -1,1546 +0,0 @@ -// -// main.c -// 6502 -// -// Created by Tamas Rudnai on 7/14/19. -// Copyright © 2019 GameAlloy. All rights reserved. -// - -#include -#include - -#include - -#define K 1000ULL -#define M (K * K) -#define G (M * K) -#define T (G * K) - - - - -unsigned long long int clktime = 0; - - -enum mmio { - ioSomething = 0xC000, -}; - - -typedef struct m6502_s { - uint8_t A; // Accumulator - uint8_t X; // X index register - uint8_t Y; // Y index register - union { - uint8_t instr; // Instruction - struct { - uint8_t aaa:3; - uint8_t bbb:3; - uint8_t cc:2; - }; - }; - union { - uint8_t sr; // Status Register as 1 byte - struct { - uint8_t N:1; // Negative Flag - uint8_t V:1; // Overflow Flag ??? - uint8_t B:2; // B Flag - uint8_t D:1; // Decimal Flag - uint8_t I:1; // Interrupt Flag - uint8_t Z:1; // Zero Flag - uint8_t C:1; // Carry Flag - } flags; // Status Register - }; - uint16_t pc; // Program Counter - uint16_t sp; // Stack Pointer - unsigned clk; // Clock Counter -} m6502_s; - -m6502_s m6502 = {0}; - -uint8_t mem[64*1024] = {0}; -uint8_t ( * mmio_read [64*1024] )( uint16_t addr ); - - -typedef -union { - uint8_t bits; - struct { - uint8_t b7:1; - uint8_t b6:1; - uint8_t b5:1; - uint8_t b4:1; - uint8_t b3:1; - uint8_t b2:1; - uint8_t b1:1; - uint8_t b0:1; - }; -} bits_t; - -#define BITTEST(n,x) ((bits_t)(n)).b##x; - -static inline void set_flags_NZ( uint8_t imm ) { - m6502.flags.N = BITTEST(imm, 7); - m6502.flags.Z = imm == 0; -} - -static inline void set_flags_NVZ( uint8_t imm ) { - set_flags_NZ(imm); - m6502.flags.V = BITTEST(imm, 6); -} - -static inline void set_flags_NZC( int test ) { - m6502.flags.N = test < 0; - m6502.flags.Z = test == 0; - m6502.flags.C = test > 0xFF; -} - -static inline uint8_t mmioRead( uint16_t addr ) { - switch (addr) { - case ioSomething: - return 123; - - default: - break; - } - return 0; -} - -/** - Naive implementation of RAM read from address - **/ -static inline uint8_t memread( uint16_t addr ) { - - if ( ( addr >= 0xC000 ) && ( addr < 0xD000 ) ) { - return mmioRead(addr); - } - -// if ( addr < 0xC000 ) -// return mem[ addr ]; -// if ( addr < 0xD000 ) -// return mmioRead(addr); - -// return ROMRead(addr); - return mem[ addr ]; -} -//#define memread(a) mem[a] - - -/** - Naive implementation of RAM read from address - **/ -static inline uint16_t memread16( uint16_t addr ) { - if ( addr < 0xC000 ) - return * (uint16_t*) (& mem[ addr ]); - if ( addr < 0xD000 ) - return * (uint16_t*) (& mem[ addr ]); - - return * (uint16_t*) (& mem[ addr ]); -} -//#define memread16(a) * (uint16_t*) (& mem[a]) - -/** - Naive implementation of RAM read from address - **/ -//static inline uint16_t memioread16( uint16_t addr ) { -// return (uint16_t)mmio_read[ addr ](addr); -//} - -/** - Naive implementation of RAM write to address - **/ -static void memwrite( uint16_t addr, uint8_t byte ) { - mem[ addr ] = byte; -} - -/** - Fetching 1 byte from memory address pc (program counter) - increase pc by one - **/ -static inline uint8_t fetch() { - // printf("fetching 0x%04X\n", m6502.pc); - return memread( m6502.pc++ ); -} -//#define fetch(a) memread(a) - -/** - Fetching 2 bytes as a 16 bit number from memory address pc (program counter) - increase pc by one - **/ -static inline uint16_t fetch16() { -// return ( (uint16_t)fetch() << 8 ) + fetch(); - uint16_t word = memread16( m6502.pc ); - m6502.pc += 2; - return word; -} -//#define fetch16(a) memread16(a) - -/** - get a 16 bit address from the zp:zp+1 - **/ -static inline uint16_t addr_zpg_ind( uint8_t zpg ) { - return memread16(zpg); -} - -/** - X,ind .... X-indexed, indirect OPC ($LL,X) - operand is zeropage address; - effective address is word in (LL + X, LL + X + 1), inc. without carry: C.w($00LL + X) - **/ -static inline uint16_t addr_X_ind() { - return addr_zpg_ind( fetch() + m6502.X ); -} - -/** - ind,Y .... indirect, Y-indexed OPC ($LL),Y - operand is zeropage address; - effective address is word in (LL, LL + 1) incremented by Y with carry: C.w($00LL) + Y - **/ -static inline uint16_t addr_ind_Y() { - return addr_zpg_ind( fetch() ) + m6502.Y; -} - -/** - abs,X .... absolute, X-indexed OPC $LLHH,X - operand is address; effective address is address incremented by X with carry ** - **/ -static inline uint16_t addr_abs_X() { - return fetch16() + m6502.X; -} - -/** - abs,Y .... absolute, Y-indexed OPC $LLHH,Y - operand is address; effective address is address incremented by Y with carry ** - **/ -static inline uint16_t addr_abs_Y() { - return fetch16() + m6502.Y; -} - -/** - zpg .... zeropage OPC $LL - operand is zeropage address (hi-byte is zero, address = $00LL) - **/ -static inline uint16_t addr_zpg() { - return fetch(); -} - -/** - zpg,X .... zeropage, X-indexed OPC $LL,X - operand is zeropage address; - effective address is address incremented by X without carry ** - **/ -static inline uint16_t addr_zpg_X() { - return addr_zpg() + m6502.X; -} - -/** - zpg,Y .... zeropage, Y-indexed OPC $LL,Y - operand is zeropage address; - effective address is address incremented by Y without carry ** - **/ -static inline uint16_t addr_zpg_Y() { - return addr_zpg() + m6502.Y; -} - - -static inline void PUSH( uint8_t n ) { - memwrite( m6502.sp--, n ); -} - -static inline uint8_t POP() { - return memread( ++m6502.sp ); -} - -static inline void PUSH_addr( uint16_t addr ) { - PUSH( (uint8_t)addr ); - PUSH( (uint8_t)(addr >> 8) ); -} - -static inline uint16_t POP_addr() { - return ( POP() << 8 ) + POP(); -} - - -/** - BRK Force Break - - interrupt, N Z C I D V - push PC+2, push SR - - - 1 - - - - addressing assembler opc bytes cyles - -------------------------------------------- - implied BRK 00 1 7 -**/ -static inline void BRK() { -// printf("BRK\n"); -} - -/** - NOP No Operation - - --- N Z C I D V - - - - - - - - - addressing assembler opc bytes cyles - -------------------------------------------- - implied NOP EA 1 2 - **/ -static inline void NOP() { - // printf("BRK\n"); -} - - -static inline void STR( uint8_t * dst, uint8_t imm ) { - *dst = imm; -} - - -/** - INC Increment Memory by One - - M + 1 -> M N Z C I D V - + + - - - - - - addressing assembler opc bytes cyles - -------------------------------------------- - zeropage INC oper E6 2 5 - zeropage,X INC oper,X F6 2 6 - absolute INC oper EE 3 6 - absolute,X INC oper,X FE 3 7 -**/ -static inline void INC( uint8_t * dst ) { - (*dst)++; - set_flags_NZ(*dst); -} - -/** - INX Increment Index X by One - - X + 1 -> X N Z C I D V - + + - - - - - - addressing assembler opc bytes cyles - -------------------------------------------- - implied INX E8 1 2 -**/ -static inline void INX() { - m6502.X++; - set_flags_NZ(m6502.X); -} - -/** - INY Increment Index Y by One - - Y + 1 -> Y N Z C I D V - + + - - - - - - addressing assembler opc bytes cyles - -------------------------------------------- - implied INY C8 1 2 -**/ -static inline void INY() { - m6502.Y++; - set_flags_NZ(m6502.Y); -} - -/** - LDA Load Accumulator with Memory - - M -> A N Z C I D V - + + - - - - - - addressing assembler opc bytes cyles - -------------------------------------------- - immidiate LDA #oper A9 2 2 - zeropage LDA oper A5 2 3 - zeropage,X LDA oper,X B5 2 4 - absolute LDA oper AD 3 4 - absolute,X LDA oper,X BD 3 4* - absolute,Y LDA oper,Y B9 3 4* - (indirect,X) LDA (oper,X) A1 2 6 - (indirect),Y LDA (oper),Y B1 2 5* -**/ -static inline void LDA( uint8_t imm ) { - m6502.A = imm; -} - -/** - LDX Load Index X with Memory - - M -> X N Z C I D V - + + - - - - - - addressing assembler opc bytes cyles - -------------------------------------------- - immidiate LDX #oper A2 2 2 - zeropage LDX oper A6 2 3 - zeropage,Y LDX oper,Y B6 2 4 - absolute LDX oper AE 3 4 - absolute,Y LDX oper,Y BE 3 4* -**/ -static inline void LDX( uint8_t imm ) { - m6502.X = imm; -} - -/** - LDY Load Index Y with Memory - - M -> Y N Z C I D V - + + - - - - - - addressing assembler opc bytes cyles - -------------------------------------------- - immidiate LDY #oper A0 2 2 - zeropage LDY oper A4 2 3 - zeropage,X LDY oper,X B4 2 4 - absolute LDY oper AC 3 4 - absolute,X LDY oper,X BC 3 4* -**/ -static inline void LDY( uint8_t imm ) { - m6502.Y = imm; -} - -/** - STA Store Accumulator in Memory - - A -> M N Z C I D V - - - - - - - - - addressing assembler opc bytes cyles - -------------------------------------------- - zeropage STA oper 85 2 3 - zeropage,X STA oper,X 95 2 4 - absolute STA oper 8D 3 4 - absolute,X STA oper,X 9D 3 5 - absolute,Y STA oper,Y 99 3 5 - (indirect,X) STA (oper,X) 81 2 6 - (indirect),Y STA (oper),Y 91 2 6 -**/ -static inline void STA( uint8_t * dst ) { - STR(dst, m6502.A); -} - -/** - STX Store Index X in Memory - - X -> M N Z C I D V - - - - - - - - - addressing assembler opc bytes cyles - -------------------------------------------- - zeropage STX oper 86 2 3 - zeropage,Y STX oper,Y 96 2 4 - absolute STX oper 8E 3 4 - **/ -static inline void STX( uint8_t * dst ) { - STR(dst, m6502.X); -} - -/** - STY Sore Index Y in Memory - - Y -> M N Z C I D V - - - - - - - - - addressing assembler opc bytes cyles - -------------------------------------------- - zeropage STY oper 84 2 3 - zeropage,X STY oper,X 94 2 4 - absolute STY oper 8C 3 4 - **/ -static inline void STY( uint8_t * dst ) { - STR(dst, m6502.Y); -} - -/** - ORA OR Memory with Accumulator - - A OR M -> A N Z C I D V - + + - - - - - - addressing assembler opc bytes cyles - -------------------------------------------- - immidiate ORA #oper 09 2 2 - zeropage ORA oper 05 2 3 - zeropage,X ORA oper,X 15 2 4 - absolute ORA oper 0D 3 4 - absolute,X ORA oper,X 1D 3 4* - absolute,Y ORA oper,Y 19 3 4* - (indirect,X) ORA (oper,X) 01 2 6 - (indirect),Y ORA (oper),Y 11 2 5* -**/ -static inline void ORA( uint8_t imm ) { - m6502.A |= imm; - set_flags_NZ( m6502.A ); -} - -/** - ADC Add Memory to Accumulator with Carry - - A + M + C -> A, C N Z C I D V - + + + - - + - - addressing assembler opc bytes cyles - -------------------------------------------- - immidiate ADC #oper 69 2 2 - zeropage ADC oper 65 2 3 - zeropage,X ADC oper,X 75 2 4 - absolute ADC oper 6D 3 4 - absolute,X ADC oper,X 7D 3 4* - absolute,Y ADC oper,Y 79 3 4* - (indirect,X) ADC (oper,X) 61 2 6 - (indirect),Y ADC (oper),Y 71 2 5* -**/ -static inline void ADC( uint8_t imm ) { - m6502.A += imm + m6502.flags.C; - set_flags_NVZ( m6502.A ); -} - -/** - SBC Subtract Memory from Accumulator with Borrow - - A - M - C -> A N Z C I D V - + + + - - + - - addressing assembler opc bytes cyles - -------------------------------------------- - immidiate SBC #oper E9 2 2 - zeropage SBC oper E5 2 3 - zeropage,X SBC oper,X F5 2 4 - absolute SBC oper ED 3 4 - absolute,X SBC oper,X FD 3 4* - absolute,Y SBC oper,Y F9 3 4* - (indirect,X) SBC (oper,X) E1 2 6 - (indirect),Y SBC (oper),Y F1 2 5* -**/ -static inline void SBC( uint8_t imm ) { - int tmp = (int)m6502.A - imm - m6502.flags.C; - m6502.A = (uint8_t)tmp; - set_flags_NVZ( tmp ); -} - -/** - AND AND Memory with Accumulator - - A AND M -> A N Z C I D V - + + - - - - - - addressing assembler opc bytes cyles - -------------------------------------------- - immidiate AND #oper 29 2 2 - zeropage AND oper 25 2 3 - zeropage,X AND oper,X 35 2 4 - absolute AND oper 2D 3 4 - absolute,X AND oper,X 3D 3 4* - absolute,Y AND oper,Y 39 3 4* - (indirect,X) AND (oper,X) 21 2 6 - (indirect),Y AND (oper),Y 31 2 5* - **/ -static inline void AND( uint8_t imm ) { - m6502.A &= imm; - set_flags_NZ( m6502.A ); -} - -/** - EOR Exclusive-OR Memory with Accumulator - - A EOR M -> A N Z C I D V - + + - - - - - - addressing assembler opc bytes cyles - -------------------------------------------- - immidiate EOR #oper 49 2 2 - zeropage EOR oper 45 2 3 - zeropage,X EOR oper,X 55 2 4 - absolute EOR oper 4D 3 4 - absolute,X EOR oper,X 5D 3 4* - absolute,Y EOR oper,Y 59 3 4* - (indirect,X) EOR (oper,X) 41 2 6 - (indirect),Y EOR (oper),Y 51 2 5* -**/ -static inline void EOR( uint8_t imm ) { - m6502.A ^= imm; - set_flags_NZ( m6502.A ); -} - - -/** - ASL Shift Left One Bit (Memory or Accumulator) - - C <- [76543210] <- 0 N Z C I D V - + + + - - - - - addressing assembler opc bytes cyles - -------------------------------------------- - accumulator ASL A 0A 1 2 - zeropage ASL oper 06 2 5 - zeropage,X ASL oper,X 16 2 6 - absolute ASL oper 0E 3 6 - absolute,X ASL oper,X 1E 3 7 -**/ -static inline void ASL( uint8_t * dst ) { - m6502.flags.C = (*dst & (1<<7)) >> 7; - *dst <<= 1; - set_flags_NZ( *dst ); -} - -/** - LSR Shift One Bit Right (Memory or Accumulator) - - 0 -> [76543210] -> C N Z C I D V - 0 + + - - - - - addressing assembler opc bytes cyles - -------------------------------------------- - accumulator LSR A 4A 1 2 - zeropage LSR oper 46 2 5 - zeropage,X LSR oper,X 56 2 6 - absolute LSR oper 4E 3 6 - absolute,X LSR oper,X 5E 3 7 -**/ -static inline void LSR( uint8_t * dst ) { - m6502.flags.C = *dst & 1; - *dst >>= 1; - set_flags_NZ( *dst ); -} - -/** - PHA Push Accumulator on Stack - - push A N Z C I D V - - - - - - - - - addressing assembler opc bytes cyles - -------------------------------------------- - implied PHA 48 1 3 -**/ -static inline void PHA() { - PUSH( m6502.A ); -} - -/** - PLA Pull Accumulator from Stack - - pull A N Z C I D V - + + - - - - - - addressing assembler opc bytes cyles - -------------------------------------------- - implied PLA 68 1 4 - **/ -static inline void PLA() { - m6502.A = POP(); -} - -/** - PHP Push Processor Status on Stack - - push SR N Z C I D V - - - - - - - - - addressing assembler opc bytes cyles - -------------------------------------------- - implied PHP 08 1 3 -**/ -static inline void PHP() { - PUSH( m6502.sr ); -} - -/** - PLP Pull Processor Status from Stack - - pull SR N Z C I D V - from stack - - addressing assembler opc bytes cyles - -------------------------------------------- - implied PLP 28 1 4 -**/ -static inline void PLP() { - m6502.sr = POP(); -} - - -static inline void BR( int8_t reladdr ) { - m6502.pc += reladdr; -} - - -/** - BNE Branch on Result not Zero - - branch on Z = 0 N Z C I D V - - - - - - - - - addressing assembler opc bytes cyles - -------------------------------------------- - relative BNE oper D0 2 2** -**/ -static inline void BNE( int8_t reladdr ) { - if ( m6502.flags.Z == 0 ) - BR( reladdr ); -} - -/** - BEQ Branch on Result Zero - - branch on Z = 1 N Z C I D V - - - - - - - - - addressing assembler opc bytes cyles - -------------------------------------------- - relative BEQ oper F0 2 2** -**/ -static inline void BEQ( int8_t reladdr ) { - if ( m6502.flags.Z == 1 ) - BR( reladdr ); -} - -/** - BPL Branch on Result Plus - - branch on N = 0 N Z C I D V - - - - - - - - - addressing assembler opc bytes cyles - -------------------------------------------- - relative BPL oper 10 2 2** -**/ -static inline void BPL( int8_t reladdr ) { - if ( m6502.flags.N == 0 ) - BR( reladdr ); -} - -/** - BMI Branch on Result Minus - - branch on N = 1 N Z C I D V - - - - - - - - - addressing assembler opc bytes cyles - -------------------------------------------- - relative BMI oper 30 2 2** -**/ -static inline void BMI( int8_t reladdr ) { - if ( m6502.flags.N == 1 ) - BR( reladdr ); -} - -/** - BVC Branch on Overflow Clear - - branch on V = 0 N Z C I D V - - - - - - - - - addressing assembler opc bytes cyles - -------------------------------------------- - relative BVC oper 50 2 2** -**/ -static inline void BVC( int8_t reladdr ) { - if ( m6502.flags.V == 0 ) - BR( reladdr ); -} - -/** - BVS Branch on Overflow Set - - branch on V = 1 N Z C I D V - - - - - - - - - addressing assembler opc bytes cyles - -------------------------------------------- - relative BVC oper 70 2 2** -**/ -static inline void BVS( int8_t reladdr ) { - if ( m6502.flags.V == 1 ) - BR( reladdr ); -} - -/** - BCC Branch on Carry Clear - - branch on C = 0 N Z C I D V - - - - - - - - - addressing assembler opc bytes cyles - -------------------------------------------- - relative BCC oper 90 2 2** -**/ -static inline void BCC( int8_t reladdr ) { - if ( m6502.flags.C == 0 ) - BR( reladdr ); -} - -/** - BCS Branch on Carry Set - - branch on C = 1 N Z C I D V - - - - - - - - - addressing assembler opc bytes cyles - -------------------------------------------- - relative BCS oper B0 2 2** -**/ -static inline void BCS( int8_t reladdr ) { - if ( m6502.flags.C == 1 ) - BR( reladdr ); -} - -/** - CLC Clear Carry Flag - - 0 -> C N Z C I D V - - - 0 - - - - - addressing assembler opc bytes cyles - -------------------------------------------- - implied CLC 18 1 2 -**/ -static inline void CLC() { - m6502.flags.C = 0; -} - -/** - SEC Set Carry Flag - - 1 -> C N Z C I D V - - - 1 - - - - - addressing assembler opc bytes cyles - -------------------------------------------- - implied SEC 38 1 2 -**/ -static inline void SEC() { - m6502.flags.C = 1; -} - -/** - CLD Clear Decimal Mode - - 0 -> D N Z C I D V - - - - - 0 - - - addressing assembler opc bytes cyles - -------------------------------------------- - implied CLD D8 1 2 - **/ -static inline void CLD() { - m6502.flags.D = 0; -} - -/** - SED Set Decimal Flag - - 1 -> D N Z C I D V - - - - - 1 - - - addressing assembler opc bytes cyles - -------------------------------------------- - implied SED F8 1 2 -**/ -static inline void SED() { - m6502.flags.D = 1; -} - -/** - CLI Clear Interrupt Disable Bit - - 0 -> I N Z C I D V - - - - 0 - - - - addressing assembler opc bytes cyles - -------------------------------------------- - implied CLI 58 1 2 - **/ -static inline void CLI() { - m6502.flags.I = 0; -} - -/** - SEI Set Interrupt Disable Status - - 1 -> I N Z C I D V - - - - 1 - - - - addressing assembler opc bytes cyles - -------------------------------------------- - implied SEI 78 1 2 - **/ -static inline void SEI() { - m6502.flags.I = 1; -} - -/** - CLV Clear Overflow Flag - - 0 -> V N Z C I D V - - - - - - 0 - - addressing assembler opc bytes cyles - -------------------------------------------- - implied CLV B8 1 2 -**/ -static inline void CLV() { - m6502.flags.V = 0; -} - -/** - CMP Compare Memory with Accumulator - - A - M N Z C I D V - + + + - - - - - addressing assembler opc bytes cyles - -------------------------------------------- - immidiate CMP #oper C9 2 2 - zeropage CMP oper C5 2 3 - zeropage,X CMP oper,X D5 2 4 - absolute CMP oper CD 3 4 - absolute,X CMP oper,X DD 3 4* - absolute,Y CMP oper,Y D9 3 4* - (indirect,X) CMP (oper,X) C1 2 6 - (indirect),Y CMP (oper),Y D1 2 5* -**/ -static inline void CMP( uint8_t imm ) { - set_flags_NZC( (int)m6502.A - imm ); -} - -/** - CPX Compare Memory and Index X - - X - M N Z C I D V - + + + - - - - - addressing assembler opc bytes cyles - -------------------------------------------- - immidiate CPX #oper E0 2 2 - zeropage CPX oper E4 2 3 - absolute CPX oper EC 3 4 -**/ -static inline void CPX( uint8_t imm ) { - set_flags_NZC( (int)m6502.X - imm ); -} - -/** - CPY Compare Memory and Index Y - - Y - M N Z C I D V - + + + - - - - - addressing assembler opc bytes cyles - -------------------------------------------- - immidiate CPY #oper C0 2 2 - zeropage CPY oper C4 2 3 - absolute CPY oper CC 3 4 -**/ -static inline void CPY( uint8_t imm ) { - set_flags_NZC( (int)m6502.Y - imm ); -} - -/** - JSR Jump to New Location Saving Return Address - - push (PC+2), N Z C I D V - (PC+1) -> PCL - - - - - - - (PC+2) -> PCH - - addressing assembler opc bytes cyles - -------------------------------------------- - absolute JSR oper 20 3 6 -**/ -static inline void JSR( uint16_t addr ) { - PUSH_addr(m6502.pc + 2); - m6502.pc = addr; -} - -/** - JMP Jump to New Location - - (PC+1) -> PCL N Z C I D V - (PC+2) -> PCH - - - - - - - - addressing assembler opc bytes cyles - -------------------------------------------- - absolute JMP oper 4C 3 3 - indirect JMP (oper) 6C 3 5 - **/ -static inline void JMP( uint16_t addr ) { - m6502.pc = addr; -} - -/** - RTS Return from Subroutine - - pull PC, PC+1 -> PC N Z C I D V - - - - - - - - - addressing assembler opc bytes cyles - -------------------------------------------- - implied RTS 60 1 6 - **/ -static inline void RTS() { - m6502.pc = POP_addr(); -} - -/** - RTI Return from Interrupt - - pull SR, pull PC N Z C I D V - from stack - - addressing assembler opc bytes cyles - -------------------------------------------- - implied RTI 40 1 6 -**/ -static inline void RTI() { - m6502.sr = POP(); - RTS(); -} - -/** - BIT Test Bits in Memory with Accumulator - - bits 7 and 6 of operand are transfered to bit 7 and 6 of SR (N,V); - the zeroflag is set to the result of operand AND accumulator. - - A AND M, M7 -> N, M6 -> V N Z C I D V - M7 + - - - M6 - - addressing assembler opc bytes cyles - -------------------------------------------- - zeropage BIT oper 24 2 3 - absolute BIT oper 2C 3 4 - -**/ -static inline void BIT( uint8_t imm ) { - m6502.flags.N = BITTEST(imm, 7); - m6502.flags.V = BITTEST(imm, 6); - m6502.flags.Z = ( m6502.A & imm ) == 0; -} - -/** - ROL Rotate One Bit Left (Memory or Accumulator) - - C <- [76543210] <- C N Z C I D V - + + + - - - - - addressing assembler opc bytes cyles - -------------------------------------------- - accumulator ROL A 2A 1 2 - zeropage ROL oper 26 2 5 - zeropage,X ROL oper,X 36 2 6 - absolute ROL oper 2E 3 6 - absolute,X ROL oper,X 3E 3 7 -**/ -static inline void ROL( uint8_t * dst ) { - uint8_t C = m6502.flags.C; - m6502.flags.C = (*dst & (1<<7)) >> 7; - *dst <<= 1; - *dst |= C; - set_flags_NZ( *dst ); -} - -/** - ROR Rotate One Bit Right (Memory or Accumulator) - - C -> [76543210] -> C N Z C I D V - + + + - - - - - addressing assembler opc bytes cyles - -------------------------------------------- - accumulator ROR A 6A 1 2 - zeropage ROR oper 66 2 5 - zeropage,X ROR oper,X 76 2 6 - absolute ROR oper 6E 3 6 - absolute,X ROR oper,X 7E 3 7 -**/ -static inline void ROR( uint8_t * dst ) { - uint8_t C = m6502.flags.C << 7; - m6502.flags.C = *dst; - *dst >>= 1; - *dst |= C; - set_flags_NZ( *dst ); -} - -/** - DEC Decrement Memory by One - - M - 1 -> M N Z C I D V - + + - - - - - - addressing assembler opc bytes cyles - -------------------------------------------- - zeropage DEC oper C6 2 5 - zeropage,X DEC oper,X D6 2 6 - absolute DEC oper CE 3 3 - absolute,X DEC oper,X DE 3 7 -**/ -static inline void DEC( uint8_t * dst ) { - (*dst)--; - set_flags_NZ(*dst); -} - -/** - DEX Decrement Index X by One - - X - 1 -> X N Z C I D V - + + - - - - - - addressing assembler opc bytes cyles - -------------------------------------------- - implied DEC CA 1 2 -**/ -static inline void DEX() { - m6502.X--; - set_flags_NZ(m6502.X); -} - -/** - DEY Decrement Index Y by One - - Y - 1 -> Y N Z C I D V - + + - - - - - - addressing assembler opc bytes cyles - -------------------------------------------- - implied DEC 88 1 2 - **/ -static inline void DEY() { - m6502.Y--; - set_flags_NZ(m6502.Y); -} - - -/** - TAX Transfer Accumulator to Index X - - A -> X N Z C I D V - + + - - - - - - addressing assembler opc bytes cyles - -------------------------------------------- - implied TAX AA 1 2 -**/ -static inline void TAX() { - m6502.X = m6502.A; - set_flags_NZ(m6502.X); -} - -/** - TAY Transfer Accumulator to Index Y - - A -> Y N Z C I D V - + + - - - - - - addressing assembler opc bytes cyles - -------------------------------------------- - implied TAY A8 1 2 -**/ -static inline void TAY() { - m6502.Y = m6502.A; - set_flags_NZ(m6502.Y); -} - -/** - TSX Transfer Stack Pointer to Index X - - SP -> X N Z C I D V - + + - - - - - - addressing assembler opc bytes cyles - -------------------------------------------- - implied TSX BA 1 2 -**/ -static inline void TSX() { - m6502.X = m6502.sp; - set_flags_NZ(m6502.X); -} - -/** - TXA Transfer Index X to Accumulator - - X -> A N Z C I D V - + + - - - - - - addressing assembler opc bytes cyles - -------------------------------------------- - implied TXA 8A 1 2 -**/ -static inline void TXA() { - m6502.A = m6502.X; - set_flags_NZ(m6502.A); -} - - -/** - TXS Transfer Index X to Stack Register - - X -> SP N Z C I D V - - - - - - - - - addressing assembler opc bytes cyles - -------------------------------------------- - implied TXS 9A 1 2 - **/ -static inline void TXS() { - m6502.sp = m6502.X; -} - - -/** - TYA Transfer Index Y to Accumulator - - Y -> A N Z C I D V - + + - - - - - - addressing assembler opc bytes cyles - -------------------------------------------- - implied TYA 98 1 2 - **/ -static inline void TYA() { - m6502.A = m6502.Y; - set_flags_NZ(m6502.A); -} - -///// - - - -static inline int m6502_step() { - -// m6502.instr = fetch(); -// switch ( m6502.instr ) { - switch ( fetch() ) { -// case 0x00: { uint16_t addr = fetch16(); BIT( (* mmio_read[addr])(addr) ); return 4; } // BIT abs BRK(); return 2; // BRK - case 0x00: BRK(); return 2; // BRK - case 0x01: ORA( memread( addr_X_ind() ) ); return 6; // ORA X,ind -// case 0x02: // t jams -// case 0x03: // SLO* (undocumented) -// case 0x04: // NOP* (undocumented) - case 0x05: ORA( memread( fetch() ) ); return 3; // ORA zpg - case 0x06: ASL( & mem[ fetch() ] ); return 5; // ASL zpg -// case 0x07: // SLO* (undocumented) - case 0x08: PHP(); return 3; // PHP - case 0x09: ORA( fetch() ); return 2; // ORA imm - case 0x0A: ASL( & m6502.A ); return 2; // ASL A -// case 0x0B: // ANC** (undocumented) -// case 0x0C: // NOP* (undocumented) - case 0x0D: ORA( memread( fetch16() ) ); return 4; // ORA abs - case 0x0E: ASL( & mem[ fetch16() ] ); return 6; // ASL abs -// case 0x0F: // SLO* (undocumented) - case 0x10: BPL( (int8_t)fetch() ); return 2; // BPL rel - case 0x11: ORA( memread( addr_ind_Y() ) ); return 5; // ORA ind,Y -// case 0x12: // t jams -// case 0x13: // SLO* (undocumented) -// case 0x14: // NOP* (undocumented) - case 0x15: ORA( memread( fetch() + m6502.X ) ); return 4; // ORA zpg,X - case 0x16: ASL( & mem[ fetch() + m6502.X ] ); return 6; // ASL zpg,X -// case 0x17: // SLO* (undocumented) - case 0x18: CLC(); return 2; // CLC - case 0x19: ORA( memread( fetch16() + m6502.Y ) ); return 4; // ORA abs,Y -// case 0x1A: // NOP* (undocumented) -// case 0x1B: // SLO* (undocumented) -// case 0x1C: // NOP* (undocumented) - case 0x1D: ORA( memread( fetch16() + m6502.X ) ); return 4; // ORA abs,X - case 0x1E: ASL( & mem[ fetch16() + m6502.X ] ); return 7; // ASL abs,X -// case 0x1F: // SLO* (undocumented) - case 0x20: JSR( fetch16() ); return 6; // JSR abs - case 0x21: AND( memread( addr_X_ind() ) ); return 6; // AND X,ind -// case 0x22: -// case 0x23: - case 0x24: BIT( memread( fetch() ) ); return 3; // BIT zpg - case 0x25: AND( memread( fetch() ) ); return 3; // AND zpg - case 0x26: ROL( & mem[ fetch() ] ); return 5; // ROL zpg -// case 0x27: - case 0x28: PLP(); return 4; // PLP - case 0x29: AND( fetch() ); return 2; // AND imm - case 0x2A: ROL( & m6502.A ); return 2; // ROL A -// case 0x2B: - case 0x2C: BIT( memread( fetch16() ) ); return 4; // BIT abs - case 0x2D: AND( fetch16() ); return 4; // AND abs - case 0x2E: ROL( & mem[ fetch16() ] ); return 6; // ROL abs -// case 0x2F: - case 0x30: BMI( (int8_t)fetch() ); return 2; // BMI rel - case 0x31: AND( memread( addr_ind_Y() ) ); return 5; // AND ind,Y -// case 0x32: -// case 0x33: -// case 0x34: - case 0x35: AND( memread( addr_zpg_X() ) ); return 4; // AND zpg,X - case 0x36: ROL( & mem[ addr_zpg_X() ] ); return 6; // ROL zpg,X -// case 0x37: - case 0x38: SEC(); return 2; // SEC - case 0x39: AND( memread( addr_abs_Y() ) ); return 4; // AND abs,Y -// case 0x3A: -// case 0x3B: -// case 0x3C: - case 0x3D: AND( memread( addr_abs_X() ) ); return 4; // AND abs,X - case 0x3E: ROL( & mem[ addr_abs_X() ] ); return 7; // ROL abs,X -// case 0x3F: - case 0x40: RTI(); return 6; // RTI - case 0x41: EOR( memread( addr_X_ind() ) ); return 6; // EOR X,ind -// case 0x42: -// case 0x43: -// case 0x44: - case 0x45: EOR( memread( fetch() ) ); return 3; // EOR zpg - case 0x46: LSR( & mem[ fetch() ] ); return 5; // LSR zpg -// case 0x47: - case 0x48: PHA(); return 3; // PHA - case 0x49: EOR( fetch() ); return 2; // EOR imm - case 0x4A: LSR( & m6502.A ); return 2; // LSR A -// case 0x4B: - case 0x4C: JMP( fetch16() ); return 3; // JMP abs - case 0x4D: EOR( fetch16() ); return 4; // EOR abs - case 0x4E: LSR( & mem[ fetch16() ] ); return 6; // LSR abs -// case 0x4F: - case 0x50: BVC( (int8_t)fetch() ); return 2; // BVC rel - case 0x51: EOR( memread( addr_ind_Y() ) ); return 5; // EOR ind,Y -// case 0x52: -// case 0x53: -// case 0x54: - case 0x55: EOR( memread( addr_zpg_X() ) ); return 4; // AND zpg,X - case 0x56: LSR( & mem[ addr_zpg_X() ] ); return 6; // LSR zpg,X -// case 0x57: - case 0x58: CLI(); return 2; // CLI - case 0x59: EOR( memread( addr_abs_Y() ) ); return 4; // EOR abs,Y -// case 0x5A: -// case 0x5B: -// case 0x5C: - case 0x5D: EOR( memread( addr_abs_X() ) ); return 4; // EOR abs,X - case 0x5E: LSR( & mem[ addr_abs_X() ] ); return 7; // LSR abs,X -// case 0x5F: - case 0x60: RTS(); return 6; // RTS - case 0x61: ADC( memread( addr_X_ind() ) ); return 6; // ADC X,ind -// case 0x62: -// case 0x63: -// case 0x64: - case 0x65: ADC( memread( fetch() ) ); return 3; // ADC zpg - case 0x66: ROR( & mem[ fetch() ] ); return 5; // ROR zpg -// case 0x67: - case 0x68: PLA(); break; // PLA - case 0x69: ADC( fetch() ); return 2; // ADC imm - case 0x6A: ROR( & m6502.A ); return 2; // ROR A -// case 0x6B: - case 0x6C: JMP( memread( fetch16() ) ); return 5; // JMP ind - case 0x6D: ADC( memread( fetch16() ) ); return 4; // ADC abs - case 0x6E: ROR( & mem[ fetch16() ] ); return 6; // ROR abs -// case 0x6F: - case 0x70: BVS( (int8_t)fetch() ); break; // BVS rel - case 0x71: ADC( memread( addr_ind_Y() ) ); return 5; // ADC ind,Y -// case 0x72: -// case 0x73: -// case 0x74: - case 0x75: ADC( memread( addr_zpg_X() ) ); return 4; // ADC zpg,X - case 0x76: ROR( & mem[ addr_zpg_X() ] ); return 6; // ROR zpg,X -// case 0x77: - case 0x78: SEI(); break; // SEI - case 0x79: ADC( memread( addr_abs_Y() ) ); return 4; // ADC abs,Y -// case 0x7A: -// case 0x7B: -// case 0x7C: - case 0x7D: ADC( memread( addr_abs_X() ) ); return 4; // ADC abs,X - case 0x7E: ROR( & mem[ addr_abs_X() ] ); return 7; // ROR abs,X -// case 0x7F: -// case 0x80: - case 0x81: STA( & mem[ addr_X_ind() ] ) ; break; // STA X,ind -// case 0x82: -// case 0x83: - case 0x84: STY( & mem[ fetch() ] ); break; // STY zpg - case 0x85: STA( & mem[ fetch() ] ); break; // STA zpg - case 0x86: STX( & mem[ fetch() ] ); break; // STX zpg -// case 0x87: - case 0x88: DEY(); break; // DEY -// case 0x89: - case 0x8A: TXA(); break; // TXA -// case 0x8B: - case 0x8C: STY( & mem[ fetch16() ] ); break; // STY abs - case 0x8D: STA( & mem[ fetch16() ] ); break; // STA abs - case 0x8E: STX( & mem[ fetch16() ] ); break; // STX abs -// case 0x8F: - case 0x90: BCC( (int8_t)fetch() ); break; // BCC rel - case 0x91: STA( & mem[ addr_ind_Y() ] ); break; // STA ind,Y -// case 0x92: -// case 0x93: - case 0x94: STY( & mem[ addr_zpg_X() ] ); break; // STY zpg,X - case 0x95: STA( & mem[ addr_zpg_X() ] ); break; // STA zpg,X - case 0x96: STX( & mem[ addr_zpg_Y() ] ); break; // STX zpg,Y -// case 0x97: - case 0x98: TYA(); break; // TYA - case 0x99: STA( & mem[ addr_abs_Y() ] ); break; // STA abs,Y - case 0x9A: TXS(); break; // TXS -// case 0x9B: -// case 0x9C: - case 0x9D: STA( & mem[ addr_abs_X() ] ); break; // STA abs,X -// case 0x9E: -// case 0x9F: - case 0xA0: LDY( fetch() ); break; // LDY imm - case 0xA1: LDA( memread( addr_X_ind() ) ) ; break; // LDA X,ind - case 0xA2: LDX( fetch() ); break; // LDX imm -// case 0xA3: - case 0xA4: LDY( memread( fetch() ) ); break; // LDY zpg - case 0xA5: LDA( memread( fetch() ) ); break; // LDA zpg - case 0xA6: LDX( memread( fetch() ) ); break; // LDX zpg -// case 0xA7: - case 0xA8: TAY(); break; // TAY - case 0xA9: LDA( fetch() ); break; // LDA imm - case 0xAA: TAX(); break; // TAX -// case 0xAB: - case 0xAC: LDY( memread( fetch16() ) ); break; // LDY abs - case 0xAD: LDA( memread( fetch16() ) ); break; // LDA abs - case 0xAE: LDX( memread( fetch16() ) ); break; // LDX abs -// case 0xAF: - case 0xB0: BCS( (int8_t)fetch() ); break; // BCS rel - case 0xB1: LDA( memread( addr_ind_Y() ) ); break; // LDA ind,Y -// case 0xB2: -// case 0xB3: - case 0xB4: LDY( memread( addr_zpg_X() ) ); break; // LDY zpg,X - case 0xB5: LDA( memread( addr_zpg_X() ) ); break; // LDA zpg,X - case 0xB6: LDX( memread( addr_zpg_Y() ) ); break; // LDX zpg,Y -// case 0xB7: - case 0xB8: CLV(); break; // CLV - case 0xB9: LDA( memread( addr_abs_Y() ) ); break; // LDA abs,Y - case 0xBA: TSX(); break; // TSX -// case 0xBB: - case 0xBC: LDY( memread( addr_abs_X() ) ); break; // LDY abs,X - case 0xBD: LDA( memread( addr_abs_X() ) ); break; // LDA abs,X - case 0xBE: LDX( memread( addr_abs_X() ) ); break; // LDX abs,X -// case 0xBF: - case 0xC0: CPY( fetch() ); break; // CPY imm - case 0xC1: CMP( memread( addr_X_ind() ) ) ; break; // LDA X,ind -// case 0xC2: -// case 0xC3: - case 0xC4: CPY( memread( fetch() ) ); break; // CPY zpg - case 0xC5: CMP( memread( fetch() ) ); break; // CMP zpg - case 0xC6: DEC( & mem[ fetch() ] ); break; // DEC zpg -// case 0xC7: - case 0xC8: INY(); break; // INY - case 0xC9: CMP( fetch() ); break; // CMP imm - case 0xCA: DEX(); break; // DEX -// case 0xCB: - case 0xCC: CPY( memread( fetch16() ) ); break; // CPY abs - case 0xCD: CMP( fetch16() ); break; // CMP abs - case 0xCE: DEC( & mem[ fetch16() ] ); break; // DEC abs -// case 0xCF: - case 0xD0: BNE( (int8_t)fetch() ); break; // BNE rel - case 0xD1: CMP( memread( addr_ind_Y() ) ); break; // CMP ind,Y -// case 0xD2: -// case 0xD3: -// case 0xD4: - case 0xD5: CMP( memread( addr_zpg_X() ) ); break; // CMP zpg,X - case 0xD6: DEC( & mem[ addr_zpg_X() ] ); break; // DEC zpg,X -// case 0xD7: - case 0xD8: CLD(); break; // CLD - case 0xD9: CMP( memread( addr_abs_Y() ) ); break; // CMP abs,Y -// case 0xDA: -// case 0xDB: -// case 0xDC: - case 0xDD: CMP( memread( addr_abs_X() ) ); break; // CMP abs,X - case 0xDE: DEC( & mem[ addr_abs_X() ] ); break; // DEC abs,X -// case 0xDF: - case 0xE0: CPX( fetch() ); break; // CPX imm - case 0xE1: SBC( memread( addr_X_ind() ) ) ; break; // SBC X,ind -// case 0xE2: -// case 0xE3: - case 0xE4: CPX( memread( fetch() ) ); break; // CPX zpg - case 0xE5: SBC( memread( fetch() ) ); break; // SBC zpg - case 0xE6: INC( & mem[ fetch() ] ); break; // INC zpg -// case 0xE7: - case 0xE8: INX(); break; // INX - case 0xE9: SBC( fetch() ); break; // SBC imm - case 0xEA: NOP(); break; // NOP -// case 0xEB: - case 0xEC: CPX( memread( fetch16() ) ); break; // CPX abs - case 0xED: SBC( fetch16() ); break; // SBC abs - case 0xEE: INC( & mem[ fetch16() ] ); break; // INC abs -// case 0xEF: - case 0xF0: BEQ( (int8_t)fetch() ); break; // BEQ rel - case 0xF1: SBC( memread( addr_ind_Y() ) ); break; // SBC ind,Y -// case 0xF2: -// case 0xF3: -// case 0xF4: - case 0xF5: SBC( memread( addr_zpg_X() ) ); break; // SBC zpg,X - case 0xF6: INC( & mem[ addr_zpg_X() ] ); break; // INC zpg,X -// case 0xF7: - case 0xF8: SED(); break; // SED - case 0xF9: SBC( memread( addr_abs_Y() ) ); break; // SBC abs,Y -// case 0xFA: -// case 0xFB: -// case 0xFC: - case 0xFD: SBC( memread( addr_abs_X() ) ); break; // SBC abs,X - case 0xFE: INC( & mem[ addr_abs_X() ] ); break; // INC abs,X -// case 0xFF: - - default: - printf("Unimplemented Instruction 0x%02X\n", m6502.instr); - break; - } - - return 2; -} - -const unsigned long long int iterations = M; - -unsigned long long TICK_PER_SEC = G; -unsigned long long TICK_6502_PER_SEC = 0; -unsigned long long MHz_6502 = 1.024 * M; - -static __inline__ unsigned long long rdtsc(void) -{ - unsigned hi, lo; - __asm__ __volatile__ ("rdtsc" : "=a"(lo), "=d"(hi) ); - return ( (unsigned long long)lo) | ( ((unsigned long long)hi) << 32 ); -} - - -static inline void m6502_run() { - uint8_t clk = 0; - // init time - unsigned long long s = rdtsc(); - unsigned long long e = (unsigned long long)-1LL; - - for ( unsigned long long int i = 0; i < iterations ; i++ ) { - clk = m6502_step(); - clktime += clk; - e = TICK_6502_PER_SEC * clktime; - // query time + wait -// usleep(1); - - // tight loop gives us the most precise wait time - while ( rdtsc() - s < e ) {} - } -} - -void init() { -// for ( int i = 0; i < 64*1024; i++ ) { -// mmio_read[i] = memread; -// } - - unsigned long long s = rdtsc(); - sleep(1); - unsigned long long e = rdtsc(); - TICK_PER_SEC = e - s; - TICK_6502_PER_SEC = TICK_PER_SEC / MHz_6502; -} - - -int main(int argc, const char * argv[]) { - // insert code here... - printf("6502\n"); - - init(); - -// clock_t start = clock(); - unsigned long long s = rdtsc(); - m6502_run(); -// clock_t end = clock(); -// double execution_time = ((double) (end - start)) / CLOCKS_PER_SEC; - unsigned long long e = rdtsc(); - unsigned long long t = e - s; - double execution_time = (double)t / TICK_PER_SEC; - - double mips = iterations / (execution_time * M); - double mhz = clktime / (execution_time * M); - printf("Elpased time: (%llu / %llu / %llu), %.3lfs (%.3lf MIPS, %.3lf MHz)\n", TICK_PER_SEC, MHz_6502, TICK_6502_PER_SEC, execution_time, mips, mhz); - - return 0; -} - diff --git a/src/cpu/instructions/6502_instr_arithmetic.h b/src/cpu/instructions/6502_instr_arithmetic.h index 2ad1d9f..57c0fad 100644 --- a/src/cpu/instructions/6502_instr_arithmetic.h +++ b/src/cpu/instructions/6502_instr_arithmetic.h @@ -3,7 +3,22 @@ // 6502 // // Created by Tamas Rudnai on 7/14/19. -// Copyright © 2019 GameAlloy. All rights reserved. +// Copyright © 2019,2020 Tamas Rudnai. All rights reserved. +// +// This file is part of Steve ][ -- The Apple ][ Emulator. +// +// Steve ][ is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Steve ][ is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Steve ][. If not, see . // diff --git a/src/cpu/instructions/6502_instr_branch.h b/src/cpu/instructions/6502_instr_branch.h index b28f277..b8bb4a7 100644 --- a/src/cpu/instructions/6502_instr_branch.h +++ b/src/cpu/instructions/6502_instr_branch.h @@ -3,7 +3,22 @@ // 6502 // // Created by Tamas Rudnai on 7/14/19. -// Copyright © 2019 GameAlloy. All rights reserved. +// Copyright © 2019,2020 Tamas Rudnai. All rights reserved. +// +// This file is part of Steve ][ -- The Apple ][ Emulator. +// +// Steve ][ is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Steve ][ is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Steve ][. If not, see . // #ifndef __6502_INSTR_BRANCH_H__ diff --git a/src/cpu/instructions/6502_instr_call_ret_jump.h b/src/cpu/instructions/6502_instr_call_ret_jump.h index 08e10c4..67d0208 100644 --- a/src/cpu/instructions/6502_instr_call_ret_jump.h +++ b/src/cpu/instructions/6502_instr_call_ret_jump.h @@ -3,7 +3,22 @@ // 6502 // // Created by Tamas Rudnai on 7/14/19. -// Copyright © 2019 GameAlloy. All rights reserved. +// Copyright © 2019,2020 Tamas Rudnai. All rights reserved. +// +// This file is part of Steve ][ -- The Apple ][ Emulator. +// +// Steve ][ is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Steve ][ is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Steve ][. If not, see . // #ifndef __6502_INSTR_CALL_RET_JUMP_H__ diff --git a/src/cpu/instructions/6502_instr_compare_test.h b/src/cpu/instructions/6502_instr_compare_test.h index 087eaca..c1099b7 100644 --- a/src/cpu/instructions/6502_instr_compare_test.h +++ b/src/cpu/instructions/6502_instr_compare_test.h @@ -3,7 +3,22 @@ // 6502 // // Created by Tamas Rudnai on 7/14/19. -// Copyright © 2019 GameAlloy. All rights reserved. +// Copyright © 2019,2020 Tamas Rudnai. All rights reserved. +// +// This file is part of Steve ][ -- The Apple ][ Emulator. +// +// Steve ][ is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Steve ][ is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Steve ][. If not, see . // #ifndef __6502_INSTR_COMPARE_TEST_H__ diff --git a/src/cpu/instructions/6502_instr_inc_dec.h b/src/cpu/instructions/6502_instr_inc_dec.h index a57b302..a1e1aa1 100644 --- a/src/cpu/instructions/6502_instr_inc_dec.h +++ b/src/cpu/instructions/6502_instr_inc_dec.h @@ -3,7 +3,22 @@ // 6502 // // Created by Tamas Rudnai on 7/14/19. -// Copyright © 2019 GameAlloy. All rights reserved. +// Copyright © 2019,2020 Tamas Rudnai. All rights reserved. +// +// This file is part of Steve ][ -- The Apple ][ Emulator. +// +// Steve ][ is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Steve ][ is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Steve ][. If not, see . // #ifndef __6502_INSTR_INC_DEC_H__ diff --git a/src/cpu/instructions/6502_instr_load_store.h b/src/cpu/instructions/6502_instr_load_store.h index aa4bff2..94fffc7 100644 --- a/src/cpu/instructions/6502_instr_load_store.h +++ b/src/cpu/instructions/6502_instr_load_store.h @@ -3,7 +3,22 @@ // 6502 // // Created by Tamas Rudnai on 7/14/19. -// Copyright © 2019 GameAlloy. All rights reserved. +// Copyright © 2019 Tamas Rudnai. All rights reserved. +// +// This file is part of Steve ][ -- The Apple ][ Emulator. +// +// Steve ][ is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Steve ][ is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Steve ][. If not, see . // diff --git a/src/cpu/instructions/6502_instr_logic.h b/src/cpu/instructions/6502_instr_logic.h index 72fce15..22139df 100644 --- a/src/cpu/instructions/6502_instr_logic.h +++ b/src/cpu/instructions/6502_instr_logic.h @@ -3,7 +3,22 @@ // 6502 // // Created by Tamas Rudnai on 7/14/19. -// Copyright © 2019 GameAlloy. All rights reserved. +// Copyright © 2019,2020 Tamas Rudnai. All rights reserved. +// +// This file is part of Steve ][ -- The Apple ][ Emulator. +// +// Steve ][ is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Steve ][ is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Steve ][. If not, see . // #ifndef __6502_INSTR_LOGIC_H__ diff --git a/src/cpu/instructions/6502_instr_misc.h b/src/cpu/instructions/6502_instr_misc.h index e8c60b9..3ea830b 100644 --- a/src/cpu/instructions/6502_instr_misc.h +++ b/src/cpu/instructions/6502_instr_misc.h @@ -3,7 +3,22 @@ // 6502 // // Created by Tamas Rudnai on 7/14/19. -// Copyright © 2019 GameAlloy. All rights reserved. +// Copyright © 2019,2020 Tamas Rudnai. All rights reserved. +// +// This file is part of Steve ][ -- The Apple ][ Emulator. +// +// Steve ][ is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Steve ][ is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Steve ][. If not, see . // #ifndef __6502_INSTR_MISC_H__ diff --git a/src/cpu/instructions/6502_instr_set_clr.h b/src/cpu/instructions/6502_instr_set_clr.h index 3a29a7e..e31dc65 100644 --- a/src/cpu/instructions/6502_instr_set_clr.h +++ b/src/cpu/instructions/6502_instr_set_clr.h @@ -3,7 +3,22 @@ // 6502 // // Created by Tamas Rudnai on 7/14/19. -// Copyright © 2019 GameAlloy. All rights reserved. +// Copyright © 2019,2020 Tamas Rudnai. All rights reserved. +// +// This file is part of Steve ][ -- The Apple ][ Emulator. +// +// Steve ][ is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Steve ][ is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Steve ][. If not, see . // #ifndef __6502_INSTR_SET_CLR_H__ diff --git a/src/cpu/instructions/6502_instr_shift_rotate.h b/src/cpu/instructions/6502_instr_shift_rotate.h index 5e9316c..cb369e0 100644 --- a/src/cpu/instructions/6502_instr_shift_rotate.h +++ b/src/cpu/instructions/6502_instr_shift_rotate.h @@ -3,7 +3,22 @@ // 6502 // // Created by Tamas Rudnai on 7/14/19. -// Copyright © 2019 GameAlloy. All rights reserved. +// Copyright © 2019,2020 Tamas Rudnai. All rights reserved. +// +// This file is part of Steve ][ -- The Apple ][ Emulator. +// +// Steve ][ is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Steve ][ is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Steve ][. If not, see . // #ifndef __6502_INSTR_SHIFT_ROTATE_H__ diff --git a/src/cpu/instructions/6502_instr_stack.h b/src/cpu/instructions/6502_instr_stack.h index 4950e14..36e7c85 100644 --- a/src/cpu/instructions/6502_instr_stack.h +++ b/src/cpu/instructions/6502_instr_stack.h @@ -3,7 +3,22 @@ // 6502 // // Created by Tamas Rudnai on 7/14/19. -// Copyright © 2019 GameAlloy. All rights reserved. +// Copyright © 2019,2020 Tamas Rudnai. All rights reserved. +// +// This file is part of Steve ][ -- The Apple ][ Emulator. +// +// Steve ][ is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Steve ][ is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Steve ][. If not, see . // #ifndef __6502_INSTR_STACK_H__ diff --git a/src/cpu/instructions/6502_instr_transfer.h b/src/cpu/instructions/6502_instr_transfer.h index b0884c8..c01f65f 100644 --- a/src/cpu/instructions/6502_instr_transfer.h +++ b/src/cpu/instructions/6502_instr_transfer.h @@ -3,7 +3,22 @@ // 6502 // // Created by Tamas Rudnai on 7/14/19. -// Copyright © 2019 GameAlloy. All rights reserved. +// Copyright © 2019,2020 Tamas Rudnai. All rights reserved. +// +// This file is part of Steve ][ -- The Apple ][ Emulator. +// +// Steve ][ is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Steve ][ is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Steve ][. If not, see . // #ifndef __6502_INSTR_TRANSFER_H__ diff --git a/src/cpu/instructions/6502_instr_undoc.h b/src/cpu/instructions/6502_instr_undoc.h index 0afacd6..1131b9f 100644 --- a/src/cpu/instructions/6502_instr_undoc.h +++ b/src/cpu/instructions/6502_instr_undoc.h @@ -3,7 +3,22 @@ // 6502 // // Created by Tamas Rudnai on 7/14/19. -// Copyright © 2019 GameAlloy. All rights reserved. +// Copyright © 2019,2020 Tamas Rudnai. All rights reserved. +// +// This file is part of Steve ][ -- The Apple ][ Emulator. +// +// Steve ][ is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Steve ][ is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Steve ][. If not, see . // #ifndef __6502_INSTR_UNDOC_H__ diff --git a/src/cpu/instructions/6502_instructions.h b/src/cpu/instructions/6502_instructions.h index e0ff849..e156261 100644 --- a/src/cpu/instructions/6502_instructions.h +++ b/src/cpu/instructions/6502_instructions.h @@ -3,7 +3,22 @@ // 6502 // // Created by Tamas Rudnai on 7/14/19. -// Copyright © 2019 GameAlloy. All rights reserved. +// Copyright © 2019,2020 Tamas Rudnai. All rights reserved. +// +// This file is part of Steve ][ -- The Apple ][ Emulator. +// +// Steve ][ is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Steve ][ is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Steve ][. If not, see . // #ifndef __6502_INSTRUCTIONS_H__ diff --git a/src/dev/audio/speaker.c b/src/dev/audio/speaker.c index 4954441..eda0b26 100644 --- a/src/dev/audio/speaker.c +++ b/src/dev/audio/speaker.c @@ -3,7 +3,22 @@ // A2Mac // // Created by Tamas Rudnai on 5/9/20. -// Copyright © 2020 GameAlloy. All rights reserved. +// Copyright © 2019,2020 Tamas Rudnai. All rights reserved. +// +// This file is part of Steve ][ -- The Apple ][ Emulator. +// +// Steve ][ is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Steve ][ is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Steve ][. If not, see . // #include diff --git a/src/dev/audio/speaker.h b/src/dev/audio/speaker.h index a6da4dc..ef78a60 100644 --- a/src/dev/audio/speaker.h +++ b/src/dev/audio/speaker.h @@ -3,7 +3,22 @@ // A2Mac // // Created by Tamas Rudnai on 5/9/20. -// Copyright © 2020 GameAlloy. All rights reserved. +// Copyright © 2019,2020 Tamas Rudnai. All rights reserved. +// +// This file is part of Steve ][ -- The Apple ][ Emulator. +// +// Steve ][ is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Steve ][ is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Steve ][. If not, see . // #ifndef speaker_h diff --git a/src/dev/disk/disk.c b/src/dev/disk/disk.c index 4eb8c41..51a58c7 100644 --- a/src/dev/disk/disk.c +++ b/src/dev/disk/disk.c @@ -3,7 +3,22 @@ // A2Mac // // Created by Tamas Rudnai on 2/15/20. -// Copyright © 2020 GameAlloy. All rights reserved. +// Copyright © 2019,2020 Tamas Rudnai. All rights reserved. +// +// This file is part of Steve ][ -- The Apple ][ Emulator. +// +// Steve ][ is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Steve ][ is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Steve ][. If not, see . // diff --git a/src/dev/disk/disk.h b/src/dev/disk/disk.h index d193b5d..a1f050a 100644 --- a/src/dev/disk/disk.h +++ b/src/dev/disk/disk.h @@ -3,7 +3,22 @@ // A2Mac // // Created by Tamas Rudnai on 2/15/20. -// Copyright © 2020 GameAlloy. All rights reserved. +// Copyright © 2019,2020 Tamas Rudnai. All rights reserved. +// +// This file is part of Steve ][ -- The Apple ][ Emulator. +// +// Steve ][ is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Steve ][ is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Steve ][. If not, see . // #ifndef disk_h diff --git a/src/dev/disk/dsk2woz.c b/src/dev/disk/dsk2woz.c index 46b7b51..c507f6a 100755 --- a/src/dev/disk/dsk2woz.c +++ b/src/dev/disk/dsk2woz.c @@ -18,6 +18,21 @@ // // Modified by Tamas Rudnai for Steve ][ emulator project (2020) // +// This file is part of Steve ][ -- The Apple ][ Emulator. +// +// Steve ][ is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Steve ][ is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Steve ][. If not, see . +// // Forward declarations; see definitions for documentation. static uint32_t crc32(const uint8_t *buf, size_t size); diff --git a/src/dev/disk/dsk2woz.h b/src/dev/disk/dsk2woz.h index 685a8ee..b55b9de 100644 --- a/src/dev/disk/dsk2woz.h +++ b/src/dev/disk/dsk2woz.h @@ -3,7 +3,22 @@ // A2Mac // // Created by Tamas Rudnai on 6/28/20. -// Copyright © 2020 GameAlloy. All rights reserved. +// Copyright © 2019,2020 Tamas Rudnai. All rights reserved. +// +// This file is part of Steve ][ -- The Apple ][ Emulator. +// +// Steve ][ is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Steve ][ is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Steve ][. If not, see . // #ifndef dsk2woz_h diff --git a/src/dev/disk/woz.c b/src/dev/disk/woz.c index 4973b91..c2ec916 100644 --- a/src/dev/disk/woz.c +++ b/src/dev/disk/woz.c @@ -3,7 +3,22 @@ // A2Mac // // Created by Tamas Rudnai on 2/15/20. -// Copyright © 2020 GameAlloy. All rights reserved. +// Copyright © 2019,2020 Tamas Rudnai. All rights reserved. +// +// This file is part of Steve ][ -- The Apple ][ Emulator. +// +// Steve ][ is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Steve ][ is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Steve ][. If not, see . // #include diff --git a/src/dev/disk/woz.h b/src/dev/disk/woz.h index 66968a1..62d9104 100644 --- a/src/dev/disk/woz.h +++ b/src/dev/disk/woz.h @@ -3,7 +3,22 @@ // A2Mac // // Created by Tamas Rudnai on 2/15/20. -// Copyright © 2020 GameAlloy. All rights reserved. +// Copyright © 2019,2020 Tamas Rudnai. All rights reserved. +// +// This file is part of Steve ][ -- The Apple ][ Emulator. +// +// Steve ][ is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Steve ][ is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Steve ][. If not, see . // #ifndef woz_h diff --git a/src/dev/game/paddle.h b/src/dev/game/paddle.h index 8116c7b..1788b25 100644 --- a/src/dev/game/paddle.h +++ b/src/dev/game/paddle.h @@ -3,7 +3,22 @@ // A2Mac // // Created by Tamas Rudnai on 5/19/20. -// Copyright © 2020 GameAlloy. All rights reserved. +// Copyright © 2019,2020 Tamas Rudnai. All rights reserved. +// +// This file is part of Steve ][ -- The Apple ][ Emulator. +// +// Steve ][ is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Steve ][ is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Steve ][. If not, see . // #ifndef paddle_h diff --git a/src/dev/mem/Apple2_mmio_8bit_ioaddr.h b/src/dev/mem/Apple2_mmio_8bit_ioaddr.h index 76ae160..7cd2dcc 100644 --- a/src/dev/mem/Apple2_mmio_8bit_ioaddr.h +++ b/src/dev/mem/Apple2_mmio_8bit_ioaddr.h @@ -3,7 +3,22 @@ // 6502 // // Created by Tamas Rudnai on 7/14/19. -// Copyright © 2019 GameAlloy. All rights reserved. +// Copyright © 2019,2020 Tamas Rudnai. All rights reserved. +// +// This file is part of Steve ][ -- The Apple ][ Emulator. +// +// Steve ][ is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Steve ][ is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Steve ][. If not, see . // #ifndef __APPLE2_MMIO_H__ diff --git a/src/dev/mem/mmio.h b/src/dev/mem/mmio.h index 46f84e0..9eb6ecd 100644 --- a/src/dev/mem/mmio.h +++ b/src/dev/mem/mmio.h @@ -3,7 +3,22 @@ // 6502 // // Created by Tamas Rudnai on 7/14/19. -// Copyright © 2019 GameAlloy. All rights reserved. +// Copyright © 2019,2020 Tamas Rudnai. All rights reserved. +// +// This file is part of Steve ][ -- The Apple ][ Emulator. +// +// Steve ][ is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Steve ][ is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Steve ][. If not, see . // #ifndef __APPLE2_MMIO_H__ diff --git a/src/util/RepeatingTimer.swift b/src/util/RepeatingTimer.swift index 2c71103..d9b5235 100644 --- a/src/util/RepeatingTimer.swift +++ b/src/util/RepeatingTimer.swift @@ -3,7 +3,22 @@ // A2Mac // // Created by Tamas Rudnai on 9/15/19. -// Copyright © 2019 GameAlloy. All rights reserved. +// Copyright © 2019,2020 Tamas Rudnai. All rights reserved. +// +// This file is part of Steve ][ -- The Apple ][ Emulator. +// +// Steve ][ is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Steve ][ is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Steve ][. If not, see . // import Foundation diff --git a/src/util/common.c b/src/util/common.c index 7c92af9..35e4030 100644 --- a/src/util/common.c +++ b/src/util/common.c @@ -3,7 +3,22 @@ // A2Mac // // Created by Tamas Rudnai on 2/16/20. -// Copyright © 2020 GameAlloy. All rights reserved. +// Copyright © 2019,2020 Tamas Rudnai. All rights reserved. +// +// This file is part of Steve ][ -- The Apple ][ Emulator. +// +// Steve ][ is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Steve ][ is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Steve ][. If not, see . // #include diff --git a/src/util/common.h b/src/util/common.h index fb98ca2..cbbd259 100644 --- a/src/util/common.h +++ b/src/util/common.h @@ -3,7 +3,22 @@ // 6502 // // Created by Tamas Rudnai on 7/14/19. -// Copyright © 2019 GameAlloy. All rights reserved. +// Copyright © 2019,2020 Tamas Rudnai. All rights reserved. +// +// This file is part of Steve ][ -- The Apple ][ Emulator. +// +// Steve ][ is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Steve ][ is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Steve ][. If not, see . // #ifndef __COMMON_H__ diff --git a/src/util/disassembler.h b/src/util/disassembler.h index 0af7ae5..4176ca5 100644 --- a/src/util/disassembler.h +++ b/src/util/disassembler.h @@ -3,7 +3,22 @@ // A2Mac // // Created by Tamas Rudnai on 9/21/19. -// Copyright © 2019 GameAlloy. All rights reserved. +// Copyright © 2019,2020 Tamas Rudnai. All rights reserved. +// +// This file is part of Steve ][ -- The Apple ][ Emulator. +// +// Steve ][ is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Steve ][ is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Steve ][. If not, see . // #ifndef disassembler_h