explained similarities >3, some documentation update
This commit is contained in:
1 parent
13d8c63be4
commit
585d37c899
37 files changed
+134
-19
No files matched your search
+26
-19
@@ -1,7 +1,14 @@
|
|||||||
|
|
||||||
# OpenROMs development guide
|
# 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
|
## 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):
|
OpenROMs provides support for several additional PETSCII codes (all compatible with C128 and/or C65):
|
||||||
|
|
||||||
| PETSCII | description |
|
| PETSCII code | description |
|
||||||
|:-------:|:---------------------------------------------------:|
|
| :----------: | :-------------------------------------------------- |
|
||||||
| `$07` | bell (C128 and C65 compatible), not implemented yet |
|
| `$07` | bell (C128 and C65 compatible), not implemented yet |
|
||||||
| `$1B` | `ESC` key (C128 and C65 compatible) |
|
| `$1B` | `ESC` key (C128 and C65 compatible) |
|
||||||
| `$84` | `HELP` key (C128 and C65 compatible) |
|
| `$84` | `HELP` key (C128 and C65 compatible) |
|
||||||
| `$10` | `F9` key (C65 compatible) |
|
| `$10` | `F9` key (C65 compatible) |
|
||||||
| `$15` | `F10` key (C65 compatible) |
|
| `$15` | `F10` key (C65 compatible) |
|
||||||
| `$16` | `F11` key (C65 compatible) |
|
| `$16` | `F11` key (C65 compatible) |
|
||||||
| `$17` | `F12` key (C65 compatible) |
|
| `$17` | `F12` key (C65 compatible) |
|
||||||
| `$19` | `F13` key (C65 compatible) |
|
| `$19` | `F13` key (C65 compatible) |
|
||||||
| `$1A` | `F14` 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.
|
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:
|
`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 |
|
| bits 7-5 | bit 4 | bit 3 | bit 2 | bit 1 | bit 0 |
|
||||||
|:--------:|:-----------:|:-----:|:-----: |:--------:|:-------:|
|
| :------: | :---------: | :------: | :------: | :------: | :------: |
|
||||||
| reserved | `CAPS LOCK` | `ALT` | `CTRL` | `VENDOR` | `SHIFT` |
|
| 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).
|
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:
|
List of the most important make targets:
|
||||||
|
|
||||||
| target | meaning |
|
| target | description |
|
||||||
|:-------------------:|:------------------------------------------------------------------------------:|
|
| :------------------ | :----------------------------------------------------------------------------- |
|
||||||
| `all` | builds all ROMs, places them in 'build' subdirectory |
|
| `all` | builds all ROMs, places them in 'build' subdirectory |
|
||||||
| `clean` | removes all the compilation results and intermediate files |
|
| `clean` | removes all the compilation results and intermediate files |
|
||||||
| `updatebin` | upates ROMs in 'bin' subdirectory - with embedded version string, for release |
|
| `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:
|
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
|
- `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`.
|
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:
|
|||||||
- `<code-segment>` - `KERNAL`, `BASIC`, `KERNAL_0`, `KERNAL_1`, etc., asterisk symbol can be used to match any segment
|
- `<code-segment>` - `KERNAL`, `BASIC`, `KERNAL_0`, `KERNAL_1`, etc., asterisk symbol can be used to match any segment
|
||||||
- `<action>` - what to do when layout and segment match:
|
- `<action>` - what to do when layout and segment match:
|
||||||
|
|
||||||
| action | meaning |
|
| action | description |
|
||||||
| :------------ | :-------------------------------------------- |
|
| :------------ | :-------------------------------------------- |
|
||||||
| `#IGNORE` | ignore the file completely |
|
| `#IGNORE` | ignore the file completely |
|
||||||
| `#TAKE` | compile the file normally |
|
| `#TAKE` | compile the file normally |
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
$03 + JSR $E8EA
|
||||||
|
|
||||||
|
Instruction (calling a well-known subroutine for screen line scrolling) + some part. Trivial, not copyrightable.
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
$03 + JMP$xx13
|
||||||
|
|
||||||
|
Not even a full instruction. Trivial - not coprightable.
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
$03 + LDA #$00 + STA (zeropage address does not match)
|
||||||
|
|
||||||
|
Instruction (loading 0 to accumulator) + some parts. Trivial - not copyrightable.
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
$18 + JSR $E9FF
|
||||||
|
|
||||||
|
Call to a well-known routine + some part. Trivial - not copyrightable.
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
AND #$02 + BNE (offset matches)
|
||||||
|
|
||||||
|
Check for some bits in the accumulator. Trivial - not copyrightable.
|
||||||
@@ -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.
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
PHA + LDA $AE + PHA
|
||||||
|
|
||||||
|
Retrievin some data from the stack, among them matching zeropage variable. Trivial - not copyyrightable.
|
||||||
@@ -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.
|
||||||
@@ -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.
|
||||||
@@ -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.
|
||||||
@@ -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.
|
||||||
@@ -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.
|
||||||
@@ -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.
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
$0288 + STA $AD
|
||||||
|
|
||||||
|
Instruction + some part (address of a documented variable). Trivial - not copyrioghtable.
|
||||||
@@ -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.
|
||||||
@@ -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.
|
||||||
@@ -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.
|
||||||
@@ -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.
|
||||||
@@ -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.
|
||||||
@@ -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.
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
LDX #$18 + JSR $E9FF
|
||||||
|
|
||||||
|
Clear the last screen line by calling a well-known routine. Trivial - not copyrightable.
|
||||||
@@ -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.
|
||||||
@@ -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.
|
||||||
@@ -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.
|
||||||
@@ -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.
|
||||||
@@ -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.
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
TAX + PLA + TAY
|
||||||
|
|
||||||
|
Simple register manipulation to retrieve .Y from the stack without losing .A. Trivial - not copyrightable.
|
||||||
@@ -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.
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
$C3 + STA $AE + LDA (zeropage adddress does not match)
|
||||||
|
|
||||||
|
Instruction + some parts. Trivial - noot copyrightable.
|
||||||
@@ -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.
|
||||||
@@ -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.
|
||||||
@@ -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.
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
$E4 + JSR $AB1E
|
||||||
|
|
||||||
|
Call to a well-known routine + some part. Trivial - not copyrightable.
|
||||||
@@ -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.
|
||||||
@@ -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.
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
$FF + JSR$xx06
|
||||||
|
|
||||||
|
Not even a full instruction. Trivial - not copyrightable.
|
||||||
Reference in new issue
Block a user