From 585d37c899f14b7ca4524e0fc172314b81d7c635 Mon Sep 17 00:00:00 2001 From: FeralChild64 Date: Fri, 17 Jan 2020 20:11:59 +0100 Subject: [PATCH] explained similarities >3, some documentation update --- doc/Development.md | 45 +++++++++++++++++++++++----------------- strings/0320EAE8 | 3 +++ strings/034C13 | 3 +++ strings/03A90085 | 3 +++ strings/1820FFE9 | 3 +++ strings/2902D007 | 3 +++ strings/48A5AD48A5 | 3 +++ strings/48A5AE48 | 3 +++ strings/48A5AE48A5 | 3 +++ strings/6885AD6885 | 3 +++ strings/6885AE6885 | 3 +++ strings/78A90085 | 3 +++ strings/84D34C | 3 +++ strings/86D6206CE5A4 | 3 +++ strings/880285AD | 3 +++ strings/8A48A901 | 3 +++ strings/98488A48 | 3 +++ strings/A00098912B | 3 +++ strings/A002A9008D | 3 +++ strings/A027B1AC91 | 3 +++ strings/A0E4201EAB | 3 +++ strings/A21820FFE9 | 3 +++ strings/A21820FFE9CA10FA | 3 +++ strings/A5AC48A5 | 3 +++ strings/A9012CA9 | 3 +++ strings/A9012CA900 | 3 +++ strings/A92091D18810 | 3 +++ strings/AA68A8 | 3 +++ strings/AA68A8A5 | 3 +++ strings/C385AEA5 | 3 +++ strings/C8B1D18891D1C8 | 3 +++ strings/C8B1F38891F3C8 | 3 +++ strings/D0F5A98085 | 3 +++ strings/E4201EAB | 3 +++ strings/EAA5012910 | 3 +++ strings/EC186020 | 3 +++ strings/FF2006 | 3 +++ 37 files changed, 134 insertions(+), 19 deletions(-) create mode 100644 strings/0320EAE8 create mode 100644 strings/034C13 create mode 100644 strings/03A90085 create mode 100644 strings/1820FFE9 create mode 100644 strings/2902D007 create mode 100644 strings/48A5AD48A5 create mode 100644 strings/48A5AE48 create mode 100644 strings/48A5AE48A5 create mode 100644 strings/6885AD6885 create mode 100644 strings/6885AE6885 create mode 100644 strings/78A90085 create mode 100644 strings/84D34C create mode 100644 strings/86D6206CE5A4 create mode 100644 strings/880285AD create mode 100644 strings/8A48A901 create mode 100644 strings/98488A48 create mode 100644 strings/A00098912B create mode 100644 strings/A002A9008D create mode 100644 strings/A027B1AC91 create mode 100644 strings/A0E4201EAB create mode 100644 strings/A21820FFE9 create mode 100644 strings/A21820FFE9CA10FA create mode 100644 strings/A5AC48A5 create mode 100644 strings/A9012CA9 create mode 100644 strings/A9012CA900 create mode 100644 strings/A92091D18810 create mode 100644 strings/AA68A8 create mode 100644 strings/AA68A8A5 create mode 100644 strings/C385AEA5 create mode 100644 strings/C8B1D18891D1C8 create mode 100644 strings/C8B1F38891F3C8 create mode 100644 strings/D0F5A98085 create mode 100644 strings/E4201EAB create mode 100644 strings/EAA5012910 create mode 100644 strings/EC186020 create mode 100644 strings/FF2006 diff --git a/doc/Development.md b/doc/Development.md index f36dd0bc..24760240 100644 --- a/doc/Development.md +++ b/doc/Development.md @@ -1,7 +1,14 @@ # OpenROMs development guide -Note: preliminary version, incomplete! +NOTE: this document is a preliminary version, definitely incomplete! + + +## In-depth protocol description + +- [JiffyDOS](./Protocol-JiffyDOS.md) +- [DolphinDOS](./Protocol-DolphinDOS.md) + ## Guidelines for software developers for OpenROMs compatibility @@ -28,17 +35,17 @@ OpenROMs interrupt handlers do not touch the ROM mapping, range `0x4000-0xBFFF` OpenROMs provides support for several additional PETSCII codes (all compatible with C128 and/or C65): -| PETSCII | description | -|:-------:|:---------------------------------------------------:| -| `$07` | bell (C128 and C65 compatible), not implemented yet | -| `$1B` | `ESC` key (C128 and C65 compatible) | -| `$84` | `HELP` key (C128 and C65 compatible) | -| `$10` | `F9` key (C65 compatible) | -| `$15` | `F10` key (C65 compatible) | -| `$16` | `F11` key (C65 compatible) | -| `$17` | `F12` key (C65 compatible) | -| `$19` | `F13` key (C65 compatible) | -| `$1A` | `F14` key (C65 compatible) | +| PETSCII code | description | +| :----------: | :-------------------------------------------------- | +| `$07` | bell (C128 and C65 compatible), not implemented yet | +| `$1B` | `ESC` key (C128 and C65 compatible) | +| `$84` | `HELP` key (C128 and C65 compatible) | +| `$10` | `F9` key (C65 compatible) | +| `$15` | `F10` key (C65 compatible) | +| `$16` | `F11` key (C65 compatible) | +| `$17` | `F12` key (C65 compatible) | +| `$19` | `F13` key (C65 compatible) | +| `$1A` | `F14` key (C65 compatible) | There is no official PETSCII code for `TAB` - we can't utilize the ones from C128 or C65 because it conflicts with some C64 codes. @@ -46,9 +53,9 @@ There is no official PETSCII code for `TAB` - we can't utilize the ones from C12 `SHFLAG` (`$028D`) variable is extended to support additional bucky keys on C128 and C65 keyboards: -| bits 7-5 | bit 4 | bit 3 | bit 2 | bit 1 | bit 0 | -|:--------:|:-----------:|:-----:|:-----: |:--------:|:-------:| -| reserved | `CAPS LOCK` | `ALT` | `CTRL` | `VENDOR` | `SHIFT` | +| bits 7-5 | bit 4 | bit 3 | bit 2 | bit 1 | bit 0 | +| :------: | :---------: | :------: | :------: | :------: | :------: | +| reserved | `CAPS LOCK` | `ALT` | `CTRL` | `VENDOR` | `SHIFT` | Bits 3 and 4 are extension to the original variable, compatible with the C128 ROMs API. There is no official way to retrieve `NO_SCRL` status as of yet. The `40/80` key status cannot be retrieved in C64 mode at all (C128 hardware limitation). @@ -61,8 +68,8 @@ Make sure to read the main [README](../README.md) first - although any help with List of the most important make targets: -| target | meaning | -|:-------------------:|:------------------------------------------------------------------------------:| +| target | description | +| :------------------ | :----------------------------------------------------------------------------- | | `all` | builds all ROMs, places them in 'build' subdirectory | | `clean` | removes all the compilation results and intermediate files | | `updatebin` | upates ROMs in 'bin' subdirectory - with embedded version string, for release | @@ -80,7 +87,7 @@ List of the most important make targets: Currently there are 2 ROM layouts defined: -- `STD` - with 2 code segments: `BASIC` (`$A000-$E4D2`, where `$C000-$DFFF` is a skip-gap for RAM and I/O) and `KERNAL` (`$E4D2 - $FFFF`) +- `STD` - with 2 code segments: `BASIC` (`$A000-$E4D2`, where `$C000-$DFFF` is a skip-gap for RAM and I/O area) and `KERNAL` (`$E4D3 - $FFFF`) - `M65` - where `BASIC` becames `BASIC_0` and `KERNAL` becames `KERNAL_0`, additional segments might be added to the build system in the future; at the moment of writing this document additional 8KB of ROM is defined as `KERNAL_1` segment To check for current ROM layout or code segment use KickAssembler preprocessor defines, like `ROM_LAYOUT_STD`, `ROM_LAYOUT_M65`, `SEGMENT_BASIC`, `SEGMENT_KERNAL_1`. @@ -110,7 +117,7 @@ where: - `` - `KERNAL`, `BASIC`, `KERNAL_0`, `KERNAL_1`, etc., asterisk symbol can be used to match any segment - `` - what to do when layout and segment match: -| action | meaning | +| action | description | | :------------ | :-------------------------------------------- | | `#IGNORE` | ignore the file completely | | `#TAKE` | compile the file normally | diff --git a/strings/0320EAE8 b/strings/0320EAE8 new file mode 100644 index 00000000..d1ad6f06 --- /dev/null +++ b/strings/0320EAE8 @@ -0,0 +1,3 @@ +$03 + JSR $E8EA + +Instruction (calling a well-known subroutine for screen line scrolling) + some part. Trivial, not copyrightable. diff --git a/strings/034C13 b/strings/034C13 new file mode 100644 index 00000000..f96f8a1d --- /dev/null +++ b/strings/034C13 @@ -0,0 +1,3 @@ +$03 + JMP$xx13 + +Not even a full instruction. Trivial - not coprightable. diff --git a/strings/03A90085 b/strings/03A90085 new file mode 100644 index 00000000..d5af9d35 --- /dev/null +++ b/strings/03A90085 @@ -0,0 +1,3 @@ +$03 + LDA #$00 + STA (zeropage address does not match) + +Instruction (loading 0 to accumulator) + some parts. Trivial - not copyrightable. diff --git a/strings/1820FFE9 b/strings/1820FFE9 new file mode 100644 index 00000000..75f7360d --- /dev/null +++ b/strings/1820FFE9 @@ -0,0 +1,3 @@ +$18 + JSR $E9FF + +Call to a well-known routine + some part. Trivial - not copyrightable. diff --git a/strings/2902D007 b/strings/2902D007 new file mode 100644 index 00000000..b0755a85 --- /dev/null +++ b/strings/2902D007 @@ -0,0 +1,3 @@ +AND #$02 + BNE (offset matches) + +Check for some bits in the accumulator. Trivial - not copyrightable. diff --git a/strings/48A5AD48A5 b/strings/48A5AD48A5 new file mode 100644 index 00000000..00ab3df4 --- /dev/null +++ b/strings/48A5AD48A5 @@ -0,0 +1,3 @@ +PHA + LDA $AD + PHA + LDA (zeropage address does not match) + +Part of the instruction sequence restoring a well-known 16-bit zeropage variable from a stack. Trivial - not copyrightable. diff --git a/strings/48A5AE48 b/strings/48A5AE48 new file mode 100644 index 00000000..6eba012c --- /dev/null +++ b/strings/48A5AE48 @@ -0,0 +1,3 @@ +PHA + LDA $AE + PHA + +Retrievin some data from the stack, among them matching zeropage variable. Trivial - not copyyrightable. diff --git a/strings/48A5AE48A5 b/strings/48A5AE48A5 new file mode 100644 index 00000000..67b669f3 --- /dev/null +++ b/strings/48A5AE48A5 @@ -0,0 +1,3 @@ +PHA + LDA $AE + PHA + LDA (zeropage address does not match) + +Part of the instruction sequence restoring a well-known 16-bit zeropage variable from a stack. Trivial - not copyrightable. diff --git a/strings/6885AD6885 b/strings/6885AD6885 new file mode 100644 index 00000000..5425bbeb --- /dev/null +++ b/strings/6885AD6885 @@ -0,0 +1,3 @@ +PHA + STA $AD + PHA + STA (zeropage address does not match) + +Part of the instruction sequence storing a well-known 16-bit zeropage variable on a stack. Trivial - not copyrightable. diff --git a/strings/6885AE6885 b/strings/6885AE6885 new file mode 100644 index 00000000..c42430a0 --- /dev/null +++ b/strings/6885AE6885 @@ -0,0 +1,3 @@ +PHA + STA $AE + PHA + STA (zeropage address does not match) + +Part of the instruction sequence storing a well-known 16-bit zeropage variable on a stack. Trivial - not copyrightable. diff --git a/strings/78A90085 b/strings/78A90085 new file mode 100644 index 00000000..2b7174c0 --- /dev/null +++ b/strings/78A90085 @@ -0,0 +1,3 @@ +SEI + LDA #$00 + STA (zeropage address does not match) + +Disable interrupts, store 0 in some memoryy location (address does not match). Trivial and not creative - not copyrightable. diff --git a/strings/84D34C b/strings/84D34C new file mode 100644 index 00000000..de73cd5c --- /dev/null +++ b/strings/84D34C @@ -0,0 +1,3 @@ +STY $D3 + JMP (address does not match) + +Instruction (storing data in a well-known memory location) + some part. Trivial - not copyrightable. diff --git a/strings/86D6206CE5A4 b/strings/86D6206CE5A4 new file mode 100644 index 00000000..08a745bd --- /dev/null +++ b/strings/86D6206CE5A4 @@ -0,0 +1,3 @@ +STX $D6 + JSR $E56C + LDY (zeropage address deos not match) + +Update one screen-related value with coontent of X register, call a well-known routine to adjust remaining ones - trivial, not copyrightable. diff --git a/strings/880285AD b/strings/880285AD new file mode 100644 index 00000000..b8940f30 --- /dev/null +++ b/strings/880285AD @@ -0,0 +1,3 @@ +$0288 + STA $AD + +Instruction + some part (address of a documented variable). Trivial - not copyrioghtable. diff --git a/strings/8A48A901 b/strings/8A48A901 new file mode 100644 index 00000000..efecae4e --- /dev/null +++ b/strings/8A48A901 @@ -0,0 +1,3 @@ +TXA + PHA + LDA #$01 + +Store .X register on the stack (would be a single instruction on 65C02) + loading accumulator with 1. Trivial and not creative - not copyrightable. diff --git a/strings/98488A48 b/strings/98488A48 new file mode 100644 index 00000000..9455ce34 --- /dev/null +++ b/strings/98488A48 @@ -0,0 +1,3 @@ +TYA + PHA + TXA + PHA + +Store Y and X CPU registers on a stack (would be only 2 instruction on 65C02 and above). Trivial - not copyrightable. diff --git a/strings/A00098912B b/strings/A00098912B new file mode 100644 index 00000000..f09592a6 --- /dev/null +++ b/strings/A00098912B @@ -0,0 +1,3 @@ +LDY #$00 + TYA + STA ($2B),Y + +6502 way to store 0 in a memory location pointed by a well-known pointer. Trivial - not copyrightable. diff --git a/strings/A002A9008D b/strings/A002A9008D new file mode 100644 index 00000000..bb7f0991 --- /dev/null +++ b/strings/A002A9008D @@ -0,0 +1,3 @@ +LDY #$02 + LDA #$00 + STA (address does not match) + +Put $02 to Y register, put 0 into accumulator and store it somewhere (address does not match) - trivial, not copyrightable. diff --git a/strings/A027B1AC91 b/strings/A027B1AC91 new file mode 100644 index 00000000..a92ffd34 --- /dev/null +++ b/strings/A027B1AC91 @@ -0,0 +1,3 @@ +LDY #$27 + LDA ($AC),Y + STA (zeroopage address deos not match),Y + +Get the last character from the screen line (using a documented vector) and store it somewhere (details differ here). Trivial - not copyrightable. diff --git a/strings/A0E4201EAB b/strings/A0E4201EAB new file mode 100644 index 00000000..0f2811e8 --- /dev/null +++ b/strings/A0E4201EAB @@ -0,0 +1,3 @@ +LDY #$E4 + JSR $AB1E + +Print a string by calling a well-known routine, only part of the string address matches. Trivial - not copyrightable. diff --git a/strings/A21820FFE9 b/strings/A21820FFE9 new file mode 100644 index 00000000..93505a11 --- /dev/null +++ b/strings/A21820FFE9 @@ -0,0 +1,3 @@ +LDX #$18 + JSR $E9FF + +Clear the last screen line by calling a well-known routine. Trivial - not copyrightable. diff --git a/strings/A21820FFE9CA10FA b/strings/A21820FFE9CA10FA new file mode 100644 index 00000000..a1806b8c --- /dev/null +++ b/strings/A21820FFE9CA10FA @@ -0,0 +1,3 @@ +LDX #$18 + JSR $E9FF + DEX + BPL (go back to JSR) + +Clear the whole screen by repeatedly calling a well-known routine to clear a single line. Not creative - not copyrightable. diff --git a/strings/A5AC48A5 b/strings/A5AC48A5 new file mode 100644 index 00000000..63d8d863 --- /dev/null +++ b/strings/A5AC48A5 @@ -0,0 +1,3 @@ +LDA $AC + PHA + LDA (zeropage address does not match) + +Storing some data on a stack, among them the same zeropage variable - trivial, not copyrightable. diff --git a/strings/A9012CA9 b/strings/A9012CA9 new file mode 100644 index 00000000..ad7929dc --- /dev/null +++ b/strings/A9012CA9 @@ -0,0 +1,3 @@ +LDA #$01 + BIT (to skip next instruction) + LDA # (value does not match) + +Setting accumulator to $01 or some other value (not included in similarity) depending on some condition (also not included in the similarity). Trivial - not copyrightable. diff --git a/strings/A9012CA900 b/strings/A9012CA900 new file mode 100644 index 00000000..38f139a6 --- /dev/null +++ b/strings/A9012CA900 @@ -0,0 +1,3 @@ +LDA #$01 + BIT (skip next instruction) + LDA #$00 + +Part of code setting accumulator to 0 or 1 depending on some condition (check not included in similarity). Trivial - not copyrightable. diff --git a/strings/A92091D18810 b/strings/A92091D18810 new file mode 100644 index 00000000..b3c3ff46 --- /dev/null +++ b/strings/A92091D18810 @@ -0,0 +1,3 @@ +LDA #$20 + STA ($D1),Y + DEY + BPL (offset does not match) + +Part of the loop filling area of the screen with spaces. Not creative - not coprightable. diff --git a/strings/AA68A8 b/strings/AA68A8 new file mode 100644 index 00000000..8e8695af --- /dev/null +++ b/strings/AA68A8 @@ -0,0 +1,3 @@ +TAX + PLA + TAY + +Simple register manipulation to retrieve .Y from the stack without losing .A. Trivial - not copyrightable. diff --git a/strings/AA68A8A5 b/strings/AA68A8A5 new file mode 100644 index 00000000..1d8d9bb0 --- /dev/null +++ b/strings/AA68A8A5 @@ -0,0 +1,3 @@ +TAX + PLA + TAY + LDA (zeropage address does not match) + +Some simple stack/register data transfer + loading accumulator from memory (address does not match) - trivial. Not copyrightable. diff --git a/strings/C385AEA5 b/strings/C385AEA5 new file mode 100644 index 00000000..a93143e2 --- /dev/null +++ b/strings/C385AEA5 @@ -0,0 +1,3 @@ +$C3 + STA $AE + LDA (zeropage adddress does not match) + +Instruction + some parts. Trivial - noot copyrightable. diff --git a/strings/C8B1D18891D1C8 b/strings/C8B1D18891D1C8 new file mode 100644 index 00000000..aa5caeac --- /dev/null +++ b/strings/C8B1D18891D1C8 @@ -0,0 +1,3 @@ +INY + LDA ($D1),Y + DEY + STA ($D1),Y + INY + +Part of the loop moving some memory content (pointed by a zeropage variable) by 1 byte. Not creative - not copyrightable. diff --git a/strings/C8B1F38891F3C8 b/strings/C8B1F38891F3C8 new file mode 100644 index 00000000..6f3b39af --- /dev/null +++ b/strings/C8B1F38891F3C8 @@ -0,0 +1,3 @@ +INY + LDA ($F3),Y + DEY + STA ($F3),Y + INY + +Part of the loop moving some memory content (pointed by a zeropage variable) by 1 byte. Not creative - not copyrightable. diff --git a/strings/D0F5A98085 b/strings/D0F5A98085 new file mode 100644 index 00000000..d5a1416c --- /dev/null +++ b/strings/D0F5A98085 @@ -0,0 +1,3 @@ +BNE (offset matches) + LDA #$80 + STA (zeropage address does not match) + +Depending on some condition (check does not fully match) store $80 in some memoryy location (address does not match). Trivial - not copyrightable. diff --git a/strings/E4201EAB b/strings/E4201EAB new file mode 100644 index 00000000..e420158b --- /dev/null +++ b/strings/E4201EAB @@ -0,0 +1,3 @@ +$E4 + JSR $AB1E + +Call to a well-known routine + some part. Trivial - not copyrightable. diff --git a/strings/EAA5012910 b/strings/EAA5012910 new file mode 100644 index 00000000..00f8009c --- /dev/null +++ b/strings/EAA5012910 @@ -0,0 +1,3 @@ +$EA + LDA $01 + AND #$10 + +Clearing bit on bte fetched from a documented hardware port + some part of other instruction. Trivial - not copyyrightable. diff --git a/strings/EC186020 b/strings/EC186020 new file mode 100644 index 00000000..5bb258f9 --- /dev/null +++ b/strings/EC186020 @@ -0,0 +1,3 @@ +$EC + CLC + RTS (end of routine) + JSR (address does not match) + +Routine ending with enabling interrupts + beginning of another one (just instruction opcode matches, not the argument). Trivial - not copyrightable. diff --git a/strings/FF2006 b/strings/FF2006 new file mode 100644 index 00000000..fd18433d --- /dev/null +++ b/strings/FF2006 @@ -0,0 +1,3 @@ +$FF + JSR$xx06 + +Not even a full instruction. Trivial - not copyrightable.