1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-07 07:29:33 +00:00

Merge branch 'master' into rremd

This commit is contained in:
Bob Andrews 2021-12-11 22:36:12 +01:00 committed by GitHub
commit c0c89a81e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1834 changed files with 95693 additions and 35139 deletions

1
.gitattributes vendored Normal file
View File

@ -0,0 +1 @@
* text=auto

View File

@ -0,0 +1,56 @@
name: Build Pull Request
on: [pull_request]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build_linux:
name: Build and Test (Linux)
runs-on: ubuntu-latest
steps:
- shell: bash
run: git config --global core.autocrlf input
- name: Checkout Source
uses: actions/checkout@v2
- name: Install Dependencies
shell: bash
run: |
sudo apt-get update
sudo apt-get install linuxdoc-tools linuxdoc-tools-info binutils-mingw-w64-i686 gcc-mingw-w64-i686 sshpass
- name: Build
id: build
shell: bash
run: |
make -j2 bin USER_CFLAGS=-Werror
make -j2 lib QUIET=1
make test QUIET=1
make -j2 samples
make -C src clean
make -j2 bin USER_CFLAGS=-Werror CROSS_COMPILE=i686-w64-mingw32-
make -C samples clean
make -j2 doc zip
build_windows:
name: Build (Windows)
runs-on: windows-latest
steps:
- shell: bash
run: git config --global core.autocrlf input
- name: Checkout Source
uses: actions/checkout@v2
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v1.1
- name: Build app (debug)
run: msbuild src\cc65.sln -t:rebuild -property:Configuration=Debug
- name: Build app (release)
run: msbuild src\cc65.sln -t:rebuild -property:Configuration=Release

View File

@ -0,0 +1,69 @@
name: Snapshot Build
on:
push:
branches:
master
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build_windows:
name: Build (Windows)
runs-on: windows-latest
steps:
- shell: bash
run: git config --global core.autocrlf input
- name: Checkout Source
uses: actions/checkout@v2
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v1.1
- name: Build app (debug)
run: msbuild src\cc65.sln -t:rebuild -property:Configuration=Debug
- name: Build app (release)
run: msbuild src\cc65.sln -t:rebuild -property:Configuration=Release
build_linux:
name: Build, Test and Snaphot (Linux)
runs-on: ubuntu-latest
needs: build_windows
steps:
- shell: bash
run: git config --global core.autocrlf input
- name: Checkout Source
uses: actions/checkout@v2
- name: Install Dependencies
shell: bash
run: |
sudo apt-get update
sudo apt-get install linuxdoc-tools linuxdoc-tools-info binutils-mingw-w64-i686 gcc-mingw-w64-i686 sshpass
- name: Build
id: build
shell: bash
run: |
make -j2 bin USER_CFLAGS=-Werror
make -j2 lib QUIET=1
make test QUIET=1
make -j2 samples
make -C src clean
make -j2 bin USER_CFLAGS=-Werror CROSS_COMPILE=i686-w64-mingw32-
make -C samples clean
make -j2 doc zip
- name: Upload Snapshot Zip
uses: actions/upload-artifact@v2
with:
name: cc65-snapshot-win32.zip
path: cc65.zip
# TODO: Update docs at https://github.com/cc65/doc
# TODO: Publish snapshot zip at https://github.com/cc65/cc65.github.io

8
.gitignore vendored
View File

@ -1,13 +1,9 @@
/bin/
/emd/
/html/
/info/
/joy/
/lib/
/libwrk/
/mou/
/ser/
/targetutil/
/target/
/testwrk/
/tgi/
/wrk/
/cc65.zip

View File

@ -1,18 +1,26 @@
language:
- c
install:
- sudo apt-get update
- sudo apt-get install linuxdoc-tools linuxdoc-tools-info binutils-mingw-w64-i686 gcc-mingw-w64-i686 sshpass
script:
- make bin USER_CFLAGS=-Werror
- make lib QUIET=1
- make -C test
- make -C src clean
- make bin USER_CFLAGS=-Werror CROSS_COMPILE=i686-w64-mingw32-
- make doc zip
after_success:
- make -f Makefile.travis
env:
global:
- secure: "h+hoQdEHGPLNwaqGKmSaM8NBRDLc2X+W05VsnNG2Feq/wPv/AiBjONNlzN7jRf6D6f3aoPXaQ2Lc3bYWdxGvFRCmwiofdxkJI9n5L8HPHLZ2lf37MQsXmGJzoTFOvjPLj73H6HlbI9Ux0El3zO6hvalxiXj6TfoZ41dbhNyvpYk="
- secure: "A4hMEe5RRfUtYjFGbT7QAvT1Tyo434N+/TiuQeQ4q0L46c79LnXuGQzbFLOFZshZiplLkJr7lFg466CoI1bf2L0cQOew/LesMhE75v0HQ7tZnExWhdpAk0ri6nWixbjn/dmQ0+HxjzJ48A44DMMBYcvSIsO4vflvuJ8etfSg42k="
language: c
jobs:
include:
- os: linux
name: Linux
install:
- sudo apt-get update
- sudo apt-get install linuxdoc-tools linuxdoc-tools-info binutils-mingw-w64-i686 gcc-mingw-w64-i686 sshpass
script:
- make -j2 bin USER_CFLAGS=-Werror
- make -j2 lib QUIET=1
- make test QUIET=1
- make -j2 samples
- make -C src clean
- make -j2 bin USER_CFLAGS=-Werror CROSS_COMPILE=i686-w64-mingw32-
- make -C samples clean
- make -j2 doc zip
after_success:
- make -f Makefile.travis
- os: windows
name: Windows
script:
- src/msbuild.cmd src\\cc65.sln

View File

@ -1,23 +1,30 @@
.PHONY: all mostlyclean clean install zip avail unavail bin lib doc
.PHONY: all mostlyclean clean install zip avail unavail bin lib doc html info samples test
.SUFFIXES:
all mostlyclean clean install zip:
@$(MAKE) -C src --no-print-directory $@
@$(MAKE) -C libsrc --no-print-directory $@
@$(MAKE) -C doc --no-print-directory $@
@$(MAKE) -C src --no-print-directory $@
@$(MAKE) -C libsrc --no-print-directory $@
@$(MAKE) -C doc --no-print-directory $@
@$(MAKE) -C samples --no-print-directory $@
avail unavail bin:
@$(MAKE) -C src --no-print-directory $@
@$(MAKE) -C src --no-print-directory $@
lib:
@$(MAKE) -C libsrc --no-print-directory $@
@$(MAKE) -C libsrc --no-print-directory $@
doc:
@$(MAKE) -C doc --no-print-directory $@
doc html info:
@$(MAKE) -C doc --no-print-directory $@
samples:
@$(MAKE) -C samples --no-print-directory $@
test:
@$(MAKE) -C test --no-print-directory $@
%65:
@$(MAKE) -C src --no-print-directory $@
@$(MAKE) -C src --no-print-directory $@
%:
@$(MAKE) -C libsrc --no-print-directory $@
@$(MAKE) -C libsrc --no-print-directory $@

View File

@ -10,8 +10,8 @@ GH_PATH = ../doc
gh-pages:
ifdef GH_TOKEN
@echo 'git clone --branch=gh-pages https://$$(GH_TOKEN)@github.com/cc65/doc.git $(GH_PATH)'
@git clone --branch=gh-pages https://$(GH_TOKEN)@github.com/cc65/doc.git $(GH_PATH)
@echo 'git clone https://$$(GH_TOKEN)@github.com/cc65/doc.git $(GH_PATH)'
@git clone https://$(GH_TOKEN)@github.com/cc65/doc.git $(GH_PATH)
cd $(GH_PATH) && git config user.name "$(GH_NAME)"
cd $(GH_PATH) && git config user.email "$(GH_MAIL)"
cd $(GH_PATH) && git config push.default simple

View File

@ -1,10 +1,10 @@
[Windows Snapshot](http://sourceforge.net/projects/cc65/files/cc65-snapshot-win32.zip)
[Windows Snapshot](https://sourceforge.net/projects/cc65/files/cc65-snapshot-win32.zip)
[Documentation](http://cc65.github.io/doc)
[Documentation](https://cc65.github.io/doc)
[Wiki](http://github.com/cc65/wiki/wiki)
[Wiki](https://github.com/cc65/wiki/wiki)
[![Build Status](https://api.travis-ci.org/cc65/cc65.svg?branch=master)](https://travis-ci.org/cc65/cc65/builds)
[![Snapshot Build](https://github.com/cc65/cc65/actions/workflows/snapshot-on-push-master.yml/badge.svg?branch=master)](https://github.com/cc65/cc65/actions/workflows/snapshot-on-push-master.yml)
cc65 is a complete cross development package for 65(C)02 systems, including
a powerful macro assembler, a C compiler, linker, librarian and several
@ -22,16 +22,21 @@ including
- the 600/700 family
- newer PET machines (not 2001).
- the Apple ]\[+ and successors.
- the Atari 8 bit machines.
- the Atari 8-bit machines.
- the Atari 2600 console.
- the Atari 5200 console.
- GEOS for the C64, C128 and Apple //e.
- the Bit Corporation Gamate console.
- the NEC PC-Engine (aka TurboGrafx-16).
- the NEC PC-Engine (aka TurboGrafx-16) console.
- the Nintendo Entertainment System (NES) console.
- the Watara Supervision console.
- the VTech Creativision console.
- the Oric Atmos.
- the Oric Telestrat.
- the Lynx console.
- the Ohio Scientific Challenger 1P.
- the Commander X16.
- the Synertek Systems Sym-1.
The libraries are fairly portable, so creating a version for other 6502s
shouldn't be too much work.

80
asminc/accelerator.inc Normal file
View File

@ -0,0 +1,80 @@
;
; Accelerator definitions.
;
; ---------------------------------------------------------------------------
; Speed definitions for all accelerator, to be used as input for the 'set'
; functions.
SPEED_SLOW = $00
SPEED_FAST = $FF
SPEED_1X = SPEED_SLOW
SPEED_2X = 2 - 1
SPEED_3X = 3 - 1
SPEED_4X = 4 - 1
SPEED_5X = 5 - 1
SPEED_6X = 6 - 1
SPEED_7X = 7 - 1
SPEED_8X = 8 - 1
SPEED_10X = 10 - 1
SPEED_12X = 12 - 1
SPEED_16X = 16 - 1
SPEED_20X = 20 - 1
; ---------------------------------------------------------------------------
; C64/C128 Super CPU cartridge
SuperCPU_Slow := $D07A
SuperCPU_Fast := $D07B
SuperCPU_Speed_Mode := $D0B8
SuperCPU_Detect := $D0BC
; ---------------------------------------------------------------------------
; C64DTV
C64DTV_Extended_Regs := $D03F
C64DTV_Slow = $00
C64DTV_Fast = $03
; ---------------------------------------------------------------------------
; C128 native and C128 in C64 mode
C128_VICIIE_CLK := $D030
; ---------------------------------------------------------------------------
; C64 Chameleon cartridge
CHAMELEON_CFGTUR := $D0F3
CHAMELEON_CFGENA := $D0FE
CHAMELEON_ENABLE_REGS = $2A
CHAMELEON_DISABLE_REGS = $FF
CHAMELEON_CFGTUR_LIMIT_1MHZ = %00001100
CHAMELEON_CFGTUR_LIMIT_NONE = %10000000
; ---------------------------------------------------------------------------
; C65/C64DX in C64 mode
C65_VICIII_KEY := $D02F
C65_VICIII_CTRL_B := $D031
C65_VICIII_UNLOCK_1 = $A5
C65_VICIII_UNLOCK_2 = $96
; ---------------------------------------------------------------------------
; C64 Turbo Master cartridge
TURBOMASTER_DETECT := $BF53
TURBOMASTER_SPEED_REG := $00

View File

@ -1,6 +1,6 @@
;-----------------------------------------------------------------------------
; Zero page stuff
; Zero page
WNDLFT := $20 ; Text window left
WNDWDTH := $21 ; Text window width
@ -15,6 +15,7 @@ PROMPT := $33 ; Used by GETLN
RNDL := $4E ; Random counter low
RNDH := $4F ; Random counter high
HIMEM := $73 ; Highest available memory address+1
CURLIN := $75 ; Current line number being executed
;-----------------------------------------------------------------------------
; Vectors
@ -31,34 +32,56 @@ PWREDUP := $03F4 ; This must be = EOR #$A5 of SOFTEV+1
KBD := $C000 ; Read keyboard
KBDSTRB := $C010 ; Clear keyboard strobe
; 80 column video switches
; 80 column video
CLR80COL:= $C000 ; Disable 80 column store
SET80COL:= $C001 ; Enable 80 column store
RD80COL := $C018 ; >127 if 80 column store enabled
RD80VID := $C01F ; >127 if 80 column video enabled
; Character set switches
; Character set
CLRALTCHAR := $C00E ; Normal Apple II char set
SETALTCHAR := $C00F ; Norm/inv LC, no flash
ALTCHARSET := $C01E ; >127 if alt charset switched in
; Language card switches
; Language card
RDLCBNK2:= $C011 ; >127 if LC bank 2 in use
RDLCRAM := $C012 ; >127 if LC is read enabled
ROMIN := $C081 ; Swap in D000-FFFF ROM
LCBANK2 := $C083 ; Swap in LC bank 2
LCBANK1 := $C08B ; Swap in LC bank 1
; Video mode switches
TXTCLR := $C050 ; Display graphics
TXTSET := $C051 ; Display text
MIXCLR := $C052 ; Disable 4 lines of text
MIXSET := $C053 ; Enable 4 lines of text
LOWSCR := $C054 ; Page 1
HISCR := $C055 ; Page 2
LORES := $C056 ; Lores graphics
HIRES := $C057 ; Hires graphics
; Vertical blanking
RDVBLBAR := $C019 ; >127 if not vertical blanking
RDVBLMSK := $C041 ; >127 if VBL interrupts enabled
DISVBL := $C05A ; Disable VBL interrupts
ENVBL := $C05B ; Enable VBL interrupts
; Video mode
TXTCLR := $C050 ; Display graphics
TXTSET := $C051 ; Display text
MIXCLR := $C052 ; Disable 4 lines of text
MIXSET := $C053 ; Enable 4 lines of text
LOWSCR := $C054 ; Page 1
HISCR := $C055 ; Page 2
LORES := $C056 ; Lores graphics
HIRES := $C057 ; Hires graphics
DHIRESON := $C05E ; Enable double-width graphics
DHIRESOFF := $C05F ; Disable double-width graphics
; Game controller
BUTN0 := $C061 ; Open-Apple Key
BUTN1 := $C062 ; Closed-Apple Key
TAPEIN := $C060 ; Read casette input / Switch input 3
BUTN0 := $C061 ; Switch input 0 / Open-Apple key
BUTN1 := $C062 ; Switch input 1 / Closed-Apple key
BUTN2 := $C063 ; Switch input 2 / Shift key
PADDL0 := $C064 ; Analog input 0
PADDL1 := $C065 ; Analog input 1
PADDL2 := $C066 ; Analog input 2
PADDL3 := $C067 ; Analog input 3
PTRIG := $C070 ; Analog input reset
; Input/Output Unit
IOUDISON := $C07E ; Disable IOU
IOUDISOFF := $C07F ; Enable IOU
; Control Your Apple
CYAREG := $C036 ; Bits 0-3=disk detect 4=shadow all banks 7=fast

48
asminc/apple2.mac Normal file
View File

@ -0,0 +1,48 @@
; Convert characters to screen codes
; Helper macro that converts and outputs one character
.macro _scrcode char
.if (char < 256)
.byte (char + 128)
.else
.error "scrcode: Character constant out of range"
.endif
.endmacro
.macro scrcode arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9
; Bail out if next argument is empty
.if .blank (arg1)
.exitmacro
.endif
; Check for a string
.if .match ({arg1}, "")
; Walk over all string chars
.repeat .strlen (arg1), i
_scrcode {.strat (arg1, i)}
.endrepeat
; Check for a number
.elseif .match (.left (1, {arg1}), 0)
; Just output the number
_scrcode arg1
; Check for a character
.elseif .match (.left (1, {arg1}), 'a')
; Just output the character
_scrcode arg1
; Anything else is an error
.else
.error "scrcode: invalid argument type"
.endif
; Call the macro recursively with the remaining args
scrcode arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9
.endmacro

287
asminc/ascii_charmap.inc Normal file
View File

@ -0,0 +1,287 @@
;/*****************************************************************************/
;/* */
;/* ascii_charmap.inc */
;/* */
;/* No translations, encodings are stored as they were typed in the host. */
;/* */
;/* */
;/* 2019-09-07, Greg King */
;/* */
;/* This software is provided "as-is", without any expressed or implied */
;/* warranty. In no event will the authors be held liable for any damages */
;/* arising from the use of this software. */
;/* */
;/* Permission is granted to anyone to use this software for any purpose, */
;/* including commercial applications, and to alter it and redistribute it */
;/* freely, subject to the following restrictions: */
;/* */
;/* 1. The origin of this software must not be misrepresented; you must not */
;/* claim that you wrote the original software. If you use this software */
;/* in a product, an acknowledgment in the product documentation would be */
;/* appreciated, but is not required. */
;/* 2. Altered source versions must be plainly marked as such, and must not */
;/* be misrepresented as being the original software. */
;/* 3. This notice must not be removed or altered from any source */
;/* distribution. */
;/* */
;/*****************************************************************************/
;/* ASCII */
.charmap $00, $00
.charmap $01, $01
.charmap $02, $02
.charmap $03, $03
.charmap $04, $04
.charmap $05, $05
.charmap $06, $06
.charmap $07, $07
.charmap $08, $08
.charmap $09, $09
.charmap $0A, $0A
.charmap $0B, $0B
.charmap $0C, $0C
.charmap $0D, $0D
.charmap $0E, $0E
.charmap $0F, $0F
.charmap $10, $10
.charmap $11, $11
.charmap $12, $12
.charmap $13, $13
.charmap $14, $14
.charmap $15, $15
.charmap $16, $16
.charmap $17, $17
.charmap $18, $18
.charmap $19, $19
.charmap $1A, $1A
.charmap $1B, $1B
.charmap $1C, $1C
.charmap $1D, $1D
.charmap $1E, $1E
.charmap $1F, $1F
.charmap $20, $20
.charmap $21, $21
.charmap $22, $22
.charmap $23, $23
.charmap $24, $24
.charmap $25, $25
.charmap $26, $26
.charmap $27, $27
.charmap $28, $28
.charmap $29, $29
.charmap $2A, $2A
.charmap $2B, $2B
.charmap $2C, $2C
.charmap $2D, $2D
.charmap $2E, $2E
.charmap $2F, $2F
.charmap $30, $30
.charmap $31, $31
.charmap $32, $32
.charmap $33, $33
.charmap $34, $34
.charmap $35, $35
.charmap $36, $36
.charmap $37, $37
.charmap $38, $38
.charmap $39, $39
.charmap $3A, $3A
.charmap $3B, $3B
.charmap $3C, $3C
.charmap $3D, $3D
.charmap $3E, $3E
.charmap $3F, $3F
.charmap $40, $40
.charmap $41, $41
.charmap $42, $42
.charmap $43, $43
.charmap $44, $44
.charmap $45, $45
.charmap $46, $46
.charmap $47, $47
.charmap $48, $48
.charmap $49, $49
.charmap $4A, $4A
.charmap $4B, $4B
.charmap $4C, $4C
.charmap $4D, $4D
.charmap $4E, $4E
.charmap $4F, $4F
.charmap $50, $50
.charmap $51, $51
.charmap $52, $52
.charmap $53, $53
.charmap $54, $54
.charmap $55, $55
.charmap $56, $56
.charmap $57, $57
.charmap $58, $58
.charmap $59, $59
.charmap $5A, $5A
.charmap $5B, $5B
.charmap $5C, $5C
.charmap $5D, $5D
.charmap $5E, $5E
.charmap $5F, $5F
.charmap $60, $60
.charmap $61, $61
.charmap $62, $62
.charmap $63, $63
.charmap $64, $64
.charmap $65, $65
.charmap $66, $66
.charmap $67, $67
.charmap $68, $68
.charmap $69, $69
.charmap $6A, $6A
.charmap $6B, $6B
.charmap $6C, $6C
.charmap $6D, $6D
.charmap $6E, $6E
.charmap $6F, $6F
.charmap $70, $70
.charmap $71, $71
.charmap $72, $72
.charmap $73, $73
.charmap $74, $74
.charmap $75, $75
.charmap $76, $76
.charmap $77, $77
.charmap $78, $78
.charmap $79, $79
.charmap $7A, $7A
.charmap $7B, $7B
.charmap $7C, $7C
.charmap $7D, $7D
.charmap $7E, $7E
.charmap $7F, $7F
;/* beyond ASCII */
.charmap $80, $80
.charmap $81, $81
.charmap $82, $82
.charmap $83, $83
.charmap $84, $84
.charmap $85, $85
.charmap $86, $86
.charmap $87, $87
.charmap $88, $88
.charmap $89, $89
.charmap $8A, $8A
.charmap $8B, $8B
.charmap $8C, $8C
.charmap $8D, $8D
.charmap $8E, $8E
.charmap $8F, $8F
.charmap $90, $90
.charmap $91, $91
.charmap $92, $92
.charmap $93, $93
.charmap $94, $94
.charmap $95, $95
.charmap $96, $96
.charmap $97, $97
.charmap $98, $98
.charmap $99, $99
.charmap $9A, $9A
.charmap $9B, $9B
.charmap $9C, $9C
.charmap $9D, $9D
.charmap $9E, $9E
.charmap $9F, $9F
.charmap $A0, $A0
.charmap $A1, $A1
.charmap $A2, $A2
.charmap $A3, $A3
.charmap $A4, $A4
.charmap $A5, $A5
.charmap $A6, $A6
.charmap $A7, $A7
.charmap $A8, $A8
.charmap $A9, $A9
.charmap $AA, $AA
.charmap $AB, $AB
.charmap $AC, $AC
.charmap $AD, $AD
.charmap $AE, $AE
.charmap $AF, $AF
.charmap $B0, $B0
.charmap $B1, $B1
.charmap $B2, $B2
.charmap $B3, $B3
.charmap $B4, $B4
.charmap $B5, $B5
.charmap $B6, $B6
.charmap $B7, $B7
.charmap $B8, $B8
.charmap $B9, $B9
.charmap $BA, $BA
.charmap $BB, $BB
.charmap $BC, $BC
.charmap $BD, $BD
.charmap $BE, $BE
.charmap $BF, $BF
.charmap $C0, $C0
.charmap $C1, $C1
.charmap $C2, $C2
.charmap $C3, $C3
.charmap $C4, $C4
.charmap $C5, $C5
.charmap $C6, $C6
.charmap $C7, $C7
.charmap $C8, $C8
.charmap $C9, $C9
.charmap $CA, $CA
.charmap $CB, $CB
.charmap $CC, $CC
.charmap $CD, $CD
.charmap $CE, $CE
.charmap $CF, $CF
.charmap $D0, $D0
.charmap $D1, $D1
.charmap $D2, $D2
.charmap $D3, $D3
.charmap $D4, $D4
.charmap $D5, $D5
.charmap $D6, $D6
.charmap $D7, $D7
.charmap $D8, $D8
.charmap $D9, $D9
.charmap $DA, $DA
.charmap $DB, $DB
.charmap $DC, $DC
.charmap $DD, $DD
.charmap $DE, $DE
.charmap $DF, $DF
.charmap $E0, $E0
.charmap $E1, $E1
.charmap $E2, $E2
.charmap $E3, $E3
.charmap $E4, $E4
.charmap $E5, $E5
.charmap $E6, $E6
.charmap $E7, $E7
.charmap $E8, $E8
.charmap $E9, $E9
.charmap $EA, $EA
.charmap $EB, $EB
.charmap $EC, $EC
.charmap $ED, $ED
.charmap $EE, $EE
.charmap $EF, $EF
.charmap $F0, $F0
.charmap $F1, $F1
.charmap $F2, $F2
.charmap $F3, $F3
.charmap $F4, $F4
.charmap $F5, $F5
.charmap $F6, $F6
.charmap $F7, $F7
.charmap $F8, $F8
.charmap $F9, $F9
.charmap $FA, $FA
.charmap $FB, $FB
.charmap $FC, $FC
.charmap $FD, $FD
.charmap $FE, $FE
.charmap $FF, $FF

View File

@ -7,6 +7,7 @@
; - Atari OS manual - XL addendum
; - Atari XL/XE rev.2 source code, Atari 1984
; - Mapping the Atari - revised edition, Ian Chadwick 1985
; - SpartaDOS-X User Guide (Aug-8-2016)
;
; ##old## old OS rev.B label - moved or deleted
; ##1200xl## new label introduced in 1200XL OS (rev.10/11)
@ -106,7 +107,7 @@ SIO_WRPERCOM = $4F ;write PERCOM block (XF551)
SIO_WRITE = $50 ;write sector
SIO_READ = $52 ;read sector
SIO_STAT = $53 ;get status information
SIO_VERIFY = $56 ;verify sector
SIO_VERIFY = $56 ;verify sector
SIO_WRITEV = $57 ;write sector with verify
SIO_WRITETRK = $60 ;write track (Speedy)
SIO_READTRK = $62 ;read track (Speedy)
@ -183,6 +184,7 @@ FNTFND = 170 ;($AA) file not found
PNTINV = 171 ;($AB) point invalid
BADDSK = 173 ;($AD) bad disk
INCFMT = 176 ;($B0) DOS 3: incompatible file system
XNTBIN = 180 ;($B4) XDOS: file not binary
; DCB Device Bus Equates
@ -689,7 +691,7 @@ CASFLG = $030F ;CASSETTE MODE WHEN SET
TIMER2 = $0310 ;2-byte final baud rate timer value
TEMP1 = $0312 ;TEMPORARY STORAGE REGISTER
;TEMP2 = $0314 ;##old## TEMPORARY STORAGE REGISTER
TEMP2 = $0313 ;##1200xl## 1-byte temporary
TEMP2 = $0313 ;##1200xl## 1-byte temporary
PTIMOT = $0314 ;##1200xl## 1-byte printer timeout
TEMP3 = $0315 ;TEMPORARY STORAGE REGISTER
SAVIO = $0316 ;SAVE SERIAL IN DATA PORT
@ -756,6 +758,34 @@ FPSCR1 = $05EC ;6-byte floating point temporary
DOS = $0700
;-------------------------------------------------------------------------
; SpartaDOS-X Definitions
;-------------------------------------------------------------------------
SDX_FLAG = DOS ; 'S' for SpartaDOS
SDX_VERSION = $0701 ; SD version (e.g. $32 = 3.2, $40 = 4.0)
; address $0702 contains sub-version, e.g.
; 8 in case of SDX 4.48
SDX_KERNEL = $0703 ; SDX kernel entry point
SDX_BLOCK_IO = $0706 ; block I/O entry point
SDX_MISC = $0709 ; "misc" entry point
SDX_DEVICE = $0761
SDX_DATE = $077B ; day, month, year (3 bytes)
SDX_TIME = $077E ; hour, min, sec (3 bytes)
SDX_DATESET = $0781
SDX_PATH = $07A0 ; 64 bytes
SDX_IFSYMBOL = $07EB ; only valid on SDX 4.40 or newer
SDX_S_LOOKUP = SDX_IFSYMBOL ; alternative name for SDX_IFSYMBOL
; values for SDX_DEVICE
SDX_CLK_DEV = $10 ; clock device
; clock device functions
SDX_KD_GETTD = 100 ; get time and date
SDX_KD_SETTD = 101 ; set time and date
;-------------------------------------------------------------------------
; Cartridge Address Equates
;-------------------------------------------------------------------------
@ -765,7 +795,7 @@ CART = $BFFC ;##rev2## 1-byte cartridge present indicator
;0=Cart Exists
CARTFG = $BFFD ;##rev2## 1-byte cartridge flags
;D7 0=Not a Diagnostic Cart
; 1=Is a Diagnostic cart and control is
; 1=Is a Diagnostic cart and control is
; given to cart before any OS is init.
;D2 0=Init but Do not Start Cart
; 1=Init and Start Cart
@ -801,6 +831,104 @@ PDVS = $D1FF ;##rev2## parallel device select
POKEY = $D200 ;POKEY area
.include "atari_pokey.inc"
; POKEY KBCODE Values
KEY_NONE = $FF
KEY_0 = $32
KEY_1 = $1F
KEY_2 = $1E
KEY_3 = $1A
KEY_4 = $18
KEY_5 = $1D
KEY_6 = $1B
KEY_7 = $33
KEY_8 = $35
KEY_9 = $30
KEY_A = $3F
KEY_B = $15
KEY_C = $12
KEY_D = $3A
KEY_E = $2A
KEY_F = $38
KEY_G = $3D
KEY_H = $39
KEY_I = $0D
KEY_J = $01
KEY_K = $05
KEY_L = $00
KEY_M = $25
KEY_N = $23
KEY_O = $08
KEY_P = $0A
KEY_Q = $2F
KEY_R = $28
KEY_S = $3E
KEY_T = $2D
KEY_U = $0B
KEY_V = $10
KEY_W = $2E
KEY_X = $16
KEY_Y = $2B
KEY_Z = $17
KEY_COMMA = $20
KEY_PERIOD = $22
KEY_SLASH = $26
KEY_SEMICOLON = $02
KEY_PLUS = $06
KEY_ASTERISK = $07
KEY_DASH = $0E
KEY_EQUALS = $0F
KEY_LESSTHAN = $36
KEY_GREATERTHAN = $37
KEY_ESC = $1C
KEY_TAB = $2C
KEY_SPACE = $21
KEY_RETURN = $0C
KEY_DELETE = $34
KEY_CAPS = $3C
KEY_INVERSE = $27
KEY_HELP = $11
KEY_F1 = $03
KEY_F2 = $04
KEY_F3 = $13
KEY_F4 = $14
KEY_SHIFT = $40
KEY_CTRL = $80
; Composed keys
KEY_EXCLAMATIONMARK = KEY_1 | KEY_SHIFT
KEY_QUOTE = KEY_2 | KEY_SHIFT
KEY_HASH = KEY_3 | KEY_SHIFT
KEY_DOLLAR = KEY_4 | KEY_SHIFT
KEY_PERCENT = KEY_5 | KEY_SHIFT
KEY_AMPERSAND = KEY_6 | KEY_SHIFT
KEY_APOSTROPHE = KEY_7 | KEY_SHIFT
KEY_AT = KEY_8 | KEY_SHIFT
KEY_OPENINGPARAN = KEY_9 | KEY_SHIFT
KEY_CLOSINGPARAN = KEY_0 | KEY_SHIFT
KEY_UNDERLINE = KEY_DASH | KEY_SHIFT
KEY_BAR = KEY_EQUALS | KEY_SHIFT
KEY_COLON = KEY_SEMICOLON | KEY_SHIFT
KEY_BACKSLASH = KEY_PLUS | KEY_SHIFT
KEY_CIRCUMFLEX = KEY_ASTERISK | KEY_SHIFT
KEY_OPENINGBRACKET = KEY_COMMA | KEY_SHIFT
KEY_CLOSINGBRACKET = KEY_PERIOD | KEY_SHIFT
KEY_QUESTIONMARK = KEY_SLASH | KEY_SHIFT
KEY_CLEAR = KEY_LESSTHAN | KEY_SHIFT
KEY_INSERT = KEY_GREATERTHAN | KEY_SHIFT
KEY_UP = KEY_DASH | KEY_CTRL
KEY_DOWN = KEY_EQUALS | KEY_CTRL
KEY_LEFT = KEY_PLUS | KEY_CTRL
KEY_RIGHT = KEY_ASTERISK | KEY_CTRL
;-------------------------------------------------------------------------
; ANTIC Address Equates
;-------------------------------------------------------------------------
@ -889,6 +1017,10 @@ SETVBV_org = $E45C ;vector to set VBLANK parameters
CIOV = $E456 ;vector to CIO
SIOV = $E459 ;vector to SIO
SETVBV = $E45C ;vector to set VBLANK parameters
; aliases in order not to have to sprinkle common code with .ifdefs
CIOV_org = CIOV
SIOV_org = SIOV
SETVBV_org = SETVBV
.endif
SYSVBV = $E45F ;vector to process immediate VBLANK
XITVBV = $E462 ;vector to process deferred VBLANK
@ -925,7 +1057,7 @@ RADON = 0 ;INDICATES RADIANS
DEGON = 6 ;INDICATES DEGREES
ASCZER = '0' ;ASCII ZERO
COLON = $3A ;ASCII COLON
COLON = $3A ;ASCII COLON
CR = $9B ;SYSTEM EOL (CARRIAGE RETURN)
;-------------------------------------------------------------------------
@ -997,12 +1129,40 @@ diopp_size = 5 ; size of structure
; VALUES for dos_type
;-------------------------------------------------------------------------
ATARIDOS = 0
SPARTADOS = 1
OSADOS = 2 ; OS/A+
MYDOS = 3
SPARTADOS = 0
REALDOS = 1
BWDOS = 2
OSADOS = 3 ; OS/A+
XDOS = 4
ATARIDOS = 5
MYDOS = 6
NODOS = 255
; The DOSes with dos_type below or equal MAX_DOS_WITH_CMDLINE do support
; command line arguments.
MAX_DOS_WITH_CMDLINE = XDOS
;-------------------------------------------------------------------------
; XDOS defines (version 2.4, taken from xdos24.pdf)
;-------------------------------------------------------------------------
XOPT = $070B ; XDOS options
XCAR = $070C ; XDOS cartridge address (+ $70D)
XPAT = $086F ; XDOS bugfix and patch number
XVER = $0870 ; XDOS version number
XFILE = $087D ; XDOS filename buffer
XLINE = $0880 ; XDOS DUP input line
XGLIN = $0871 ; get line
XSKIP = $0874 ; skip parameter
.ifdef __ATARIXL__
.ifndef SHRAM_HANDLERS
.import XMOVE_handler
.endif
.define XMOVE XMOVE_handler
XMOVE_org = $0877 ; move filename
.else
XMOVE = $0877 ; move filename
.endif
XGNUM = $087A ; get number
;-------------------------------------------------------------------------
; End of atari.inc

7
asminc/atari2600.inc Normal file
View File

@ -0,0 +1,7 @@
; Atari 2600 TIA & RIOT read / write registers
;
; Florent Flament (contact@florentflament.com), 2017
; TIA & RIOT registers mapping
.include "atari2600_tia.inc"
.include "atari2600_riot.inc"

20
asminc/atari2600_riot.inc Normal file
View File

@ -0,0 +1,20 @@
; Atari 2600 RIOT read / write registers
;
; Source: DASM - vcs.h
; Details available in: Stella Programmer's Guide by Steve Wright
;
; Florent Flament (contact@florentflament.com), 2017
; Read registers
SWCHA := $0280
SWACNT := $0281
SWCHB := $0282
SWBCNT := $0283
INTIM := $0284
TIMINT := $0285
; Write registers
TIM1T := $0294
TIM8T := $0295
TIM64T := $0296
T1024T := $0297

69
asminc/atari2600_tia.inc Normal file
View File

@ -0,0 +1,69 @@
; Atari 2600 TIA read / write registers
;
; Source: DASM - vcs.h
; Details available in: Stella Programmer's Guide by Steve Wright
;
; Florent Flament (contact@florentflament.com), 2017
; Read registers
VSYNC := $00
VBLANK := $01
WSYNC := $02
RSYNC := $03
NUSIZ0 := $04
NUSIZ1 := $05
COLUP0 := $06
COLUP1 := $07
COLUPF := $08
COLUBK := $09
CTRLPF := $0A
REFP0 := $0B
REFP1 := $0C
PF0 := $0D
PF1 := $0E
PF2 := $0F
RESP0 := $10
RESP1 := $11
RESM0 := $12
RESM1 := $13
RESBL := $14
AUDC0 := $15
AUDC1 := $16
AUDF0 := $17
AUDF1 := $18
AUDV0 := $19
AUDV1 := $1A
GRP0 := $1B
GRP1 := $1C
ENAM0 := $1D
ENAM1 := $1E
ENABL := $1F
HMP0 := $20
HMP1 := $21
HMM0 := $22
HMM1 := $23
HMBL := $24
VDELP0 := $25
VDELP1 := $26
VDELBL := $27
RESMP0 := $28
RESMP1 := $29
HMOVE := $2A
HMCLR := $2B
CXCLR := $2C
; Write registers
CXM0P := $00
CXM1P := $01
CXP0FB := $02
CXP1FB := $03
CXM0FB := $04
CXM1FB := $05
CXBLPF := $06
CXPPMM := $07
INPT0 := $08
INPT1 := $09
INPT2 := $0A
INPT3 := $0B
INPT4 := $0C
INPT5 := $0D

View File

@ -8,42 +8,52 @@
; ATASCII CHARACTER DEFS
;-------------------------------------------------------------------------
ATEOL = $9B ;END-OF-LINE, used by CONIO
ATEOL = $9B ; END-OF-LINE, used by CONIO
;-------------------------------------------------------------------------
; CONIO CHARACTER DEFS
;-------------------------------------------------------------------------
CH_ULCORNER = $0B ; '+' sign
CH_URCORNER = $0B
CH_LLCORNER = $0B
CH_LRCORNER = $0B
CH_HLINE = $0D ; dash
CH_VLINE = $01 ; exclamation mark
;-------------------------------------------------------------------------
; Zero Page
;-------------------------------------------------------------------------
POKMSK = $00 ;Mask for Pokey IRQ enable
RTCLOK = $01 ;60 hz. clock
POKMSK = $00 ; Mask for Pokey IRQ enable
RTCLOK = $01 ; 60 hz. clock
JUMP = $01
CRITIC = $03 ;Critical section
ATRACT = $04 ;Attract Mode
CRITIC = $03 ; Critical section
ATRACT = $04 ; Attract Mode
SDLSTL = $05 ;DLISTL Shadow
SDLSTH = $06 ;DLISTH "
SDMCTL = $07 ;DMACTL "
SDLSTL = $05 ; DLISTL Shadow
SDLSTH = $06 ; DLISTH "
SDMCTL = $07 ; DMACTL "
PCOLR0 = $08 ;COLPM0 Shadow
PCOLR1 = $09 ;COLPM1 "
PCOLR2 = $0A ;COLPM2 "
PCOLR3 = $0B ;COLPM3 "
PCOLR0 = $08 ; COLPM0 Shadow
PCOLR1 = $09 ; COLPM1 "
PCOLR2 = $0A ; COLPM2 "
PCOLR3 = $0B ; COLPM3 "
COLOR0 = $0C ;COLPF0 Shadow
COLOR1 = $0D ;COLPF1 "
COLOR2 = $0E ;COLPF2 "
COLOR3 = $0F ;COLPF3 "
COLOR4 = $10 ;COLBK "
COLOR0 = $0C ; COLPF0 Shadow
COLOR1 = $0D ; COLPF1 "
COLOR2 = $0E ; COLPF2 "
COLOR3 = $0F ; COLPF3 "
COLOR4 = $10 ; COLBK "
PADDL0 = $11 ;POT0 Shadow
PADDL1 = $12 ;POT1 "
PADDL2 = $13 ;POT2 "
PADDL3 = $14 ;POT3 "
PADDL4 = $15 ;POT4 "
PADDL5 = $16 ;POT5 "
PADDL6 = $17 ;POT6 "
PADDL7 = $18 ;POT7 "
PADDL0 = $11 ; POT0 Shadow
PADDL1 = $12 ; POT1 "
PADDL2 = $13 ; POT2 "
PADDL3 = $14 ; POT3 "
PADDL4 = $15 ; POT4 "
PADDL5 = $16 ; POT5 "
PADDL6 = $17 ; POT6 "
PADDL7 = $18 ; POT7 "
; cc65 runtime zero page variables
@ -57,26 +67,26 @@ SAVMSC = $1B ; pointer to screen memory (conio)
;Interrupt Vectors
VIMIRQ = $0200 ;Immediate IRQ
;Preset $FC03 (SYSIRQ)
VVBLKI = $0202 ;Vblank immediate
;Preset $FCB8 (SYSVBL)
VVBLKD = $0204 ;Vblank deferred
;Preset $FCB2 (XITVBL)
VDSLST = $0206 ;Display List
;Preset $FEA1 (OSDLI)
VKYBDI = $0208 ;Keyboard immediate
;Preset $FD02 (SYSKBD)
VKYBDF = $020A ;Deferred Keyboard
;Preset $FCB2 (XITVBL)
VTRIGR = $020C ;Soft Trigger
VBRKOP = $020E ;BRK Opcode
VSERIN = $0210 ;Serial in Ready
VSEROR = $0212 ;Serial Out Ready
VSEROC = $0214 ;Serial Output complete
VTIMR1 = $0216 ;Pokey Timer 1
VTIMR2 = $0218 ;Pokey Timer 2
VTIMR4 = $021A ;Pokey Timer 4
VIMIRQ = $0200 ; Immediate IRQ
; Preset $FC03 (SYSIRQ)
VVBLKI = $0202 ; Vblank immediate
; Preset $FCB8 (SYSVBL)
VVBLKD = $0204 ; Vblank deferred
; Preset $FCB2 (XITVBL)
VDSLST = $0206 ; Display List
; Preset $FEA1 (OSDLI)
VKYBDI = $0208 ; Keyboard immediate
; Preset $FD02 (SYSKBD)
VKYBDF = $020A ; Deferred Keyboard
; Preset $FCB2 (XITVBL)
VTRIGR = $020C ; Soft Trigger
VBRKOP = $020E ; BRK Opcode
VSERIN = $0210 ; Serial in Ready
VSEROR = $0212 ; Serial Out Ready
VSEROC = $0214 ; Serial Output complete
VTIMR1 = $0216 ; Pokey Timer 1
VTIMR2 = $0218 ; Pokey Timer 2
VTIMR4 = $021A ; Pokey Timer 4
@ -84,33 +94,40 @@ VTIMR4 = $021A ;Pokey Timer 4
; CTIA/GTIA Address Equates
;-------------------------------------------------------------------------
GTIA = $C000 ;CTIA/GTIA area
GTIA = $C000 ; CTIA/GTIA area
.include "atari_gtia.inc"
;-------------------------------------------------------------------------
; ANTIC Address Equates
;-------------------------------------------------------------------------
ANTIC = $D400 ;ANTIC area
ANTIC = $D400 ; ANTIC area
.include "atari_antic.inc"
;-------------------------------------------------------------------------
; POKEY Address Equates
;-------------------------------------------------------------------------
POKEY = $E800 ;POKEY area
POKEY = $E800 ; POKEY area
.include "atari_pokey.inc"
;-------------------------------------------------------------------------
; conio color defines
;-------------------------------------------------------------------------
COLOR_WHITE = 0
COLOR_RED = 1
COLOR_GREEN = 2
COLOR_BLACK = 3
;-------------------------------------------------------------------------
; Cartridge Parameters
;-------------------------------------------------------------------------
CARTNM = $BFE8 ;Cartridge Name Area
COPYD = $BFFC ;Copyright Decade in Cart
COPYR = $BFFD ;Copyright Year in Cart
CARTNM = $BFE8 ; Cartridge Name Area
COPYD = $BFFC ; Copyright Decade in Cart
COPYR = $BFFD ; Copyright Year in Cart
; $FF=Diagnostic Cart
GOCART = $BFFE ;Cartridge Start Vector
GOCART = $BFFE ; Cartridge Start Vector
CHRORG = $F800 ;Character Generator Base
CHRORG = $F800 ; Character Generator Base

View File

@ -33,16 +33,16 @@ NMIRES = ANTIC + $0F ;NMI interrupt reset
; ScreenDL:
; .byte DL_BLK8
; .byte DL_BLK8
; .byte DL_CHR40x8x1 + DL_LMS + DL_DLI
; .byte DL_CHR40x8x1 | DL_LMS | DL_DLI
; .word ScreenAlignment
; .byte DL_BLK1 + DL_DLI
; .byte DL_MAP320x1x1 + DL_LMS
; .byte DL_BLK1 | DL_DLI
; .byte DL_MAP320x1x1 | DL_LMS
; .word Screen
;
; .repeat 99
; .byte DL_MAP320x1x1
; .endrepeat
; .byte DL_MAP320x1x1 + DL_LMS
; .byte DL_MAP320x1x1 | DL_LMS
; .word Screen + 40 * 100 ; 100 lines a 40 byte, 'Screen' has to be aligned correctly!
; .repeat 92
; .byte DL_MAP320x1x1
@ -55,6 +55,8 @@ NMIRES = ANTIC + $0F ;NMI interrupt reset
DL_JMP = 1
DL_JVB = 65
; DL_BLKn display n empty lines (just background)
DL_BLK1 = 0
DL_BLK2 = 16
DL_BLK3 = 32

View File

@ -0,0 +1,301 @@
;/*****************************************************************************/
;/* */
;/* atari_atascii_charmap.inc */
;/* */
;/* Atari system standard string mapping ISO-8859-1 -> AtASCII */
;/* */
;/* */
;/* */
;/* C 2016 Christian Krueger */
;/* */
;/* */
;/* This software is provided 'as-is', without any expressed or implied */
;/* warranty. In no event will the authors be held liable for any damages */
;/* arising from the use of this software. */
;/* */
;/* Permission is granted to anyone to use this software for any purpose, */
;/* including commercial applications, and to alter it and redistribute it */
;/* freely, subject to the following restrictions: */
;/* */
;/* 1. The origin of this software must not be misrepresented; you must not */
;/* claim that you wrote the original software. If you use this software */
;/* in a product, an acknowledgment in the product documentation would be */
;/* appreciated but is not required. */
;/* 2. Altered source versions must be plainly marked as such, and must not */
;/* be misrepresented as being the original software. */
;/* 3. This notice may not be removed or altered from any source */
;/* distribution. */
;/* */
;/*****************************************************************************/
.charmap $00, $00
.charmap $01, $01
.charmap $02, $02
.charmap $03, $03
.charmap $04, $04
.charmap $05, $05
.charmap $06, $06
.charmap $07, $FD
.charmap $08, $08
.charmap $09, $7F
.charmap $0A, $9B
.charmap $0B, $0B
.charmap $0C, $7D
.charmap $0D, $0D
.charmap $0E, $0E
.charmap $0F, $0F
.charmap $10, $10
.charmap $11, $11
.charmap $12, $12
.charmap $13, $13
.charmap $14, $14
.charmap $15, $15
.charmap $16, $16
.charmap $17, $17
.charmap $18, $18
.charmap $19, $19
.charmap $1A, $1A
.charmap $1B, $1B
.charmap $1C, $1C
.charmap $1D, $1D
.charmap $1E, $1E
.charmap $1F, $1F
.charmap $20, $20
.charmap $21, $21
.charmap $22, $22
.charmap $23, $23
.charmap $24, $24
.charmap $25, $25
.charmap $26, $26
.charmap $27, $27
.charmap $28, $28
.charmap $29, $29
.charmap $2A, $2A
.charmap $2B, $2B
.charmap $2C, $2C
.charmap $2D, $2D
.charmap $2E, $2E
.charmap $2F, $2F
.charmap $30, $30
.charmap $31, $31
.charmap $32, $32
.charmap $33, $33
.charmap $34, $34
.charmap $35, $35
.charmap $36, $36
.charmap $37, $37
.charmap $38, $38
.charmap $39, $39
.charmap $3A, $3A
.charmap $3B, $3B
.charmap $3C, $3C
.charmap $3D, $3D
.charmap $3E, $3E
.charmap $3F, $3F
.charmap $40, $40
.charmap $41, $41
.charmap $42, $42
.charmap $43, $43
.charmap $44, $44
.charmap $45, $45
.charmap $46, $46
.charmap $47, $47
.charmap $48, $48
.charmap $49, $49
.charmap $4A, $4A
.charmap $4B, $4B
.charmap $4C, $4C
.charmap $4D, $4D
.charmap $4E, $4E
.charmap $4F, $4F
.charmap $50, $50
.charmap $51, $51
.charmap $52, $52
.charmap $53, $53
.charmap $54, $54
.charmap $55, $55
.charmap $56, $56
.charmap $57, $57
.charmap $58, $58
.charmap $59, $59
.charmap $5A, $5A
.charmap $5B, $5B
.charmap $5C, $5C
.charmap $5D, $5D
.charmap $5E, $5E
.charmap $5F, $5F
.charmap $60, $60
.charmap $61, $61
.charmap $62, $62
.charmap $63, $63
.charmap $64, $64
.charmap $65, $65
.charmap $66, $66
.charmap $67, $67
.charmap $68, $68
.charmap $69, $69
.charmap $6A, $6A
.charmap $6B, $6B
.charmap $6C, $6C
.charmap $6D, $6D
.charmap $6E, $6E
.charmap $6F, $6F
.charmap $70, $70
.charmap $71, $71
.charmap $72, $72
.charmap $73, $73
.charmap $74, $74
.charmap $75, $75
.charmap $76, $76
.charmap $77, $77
.charmap $78, $78
.charmap $79, $79
.charmap $7A, $7A
.charmap $7B, $7B
.charmap $7C, $7C
.charmap $7D, $7D
.charmap $7E, $7E
.charmap $7F, $7F
.charmap $80, $80
.charmap $81, $81
.charmap $82, $82
.charmap $83, $83
.charmap $84, $84
.charmap $85, $85
.charmap $86, $86
.charmap $87, $87
.charmap $88, $88
.charmap $89, $89
.charmap $8A, $8A
.charmap $8B, $8B
.charmap $8C, $8C
.charmap $8D, $8D
.charmap $8E, $8E
.charmap $8F, $8F
.charmap $90, $90
.charmap $91, $91
.charmap $92, $92
.charmap $93, $93
.charmap $94, $94
.charmap $95, $95
.charmap $96, $96
.charmap $97, $97
.charmap $98, $98
.charmap $99, $99
.charmap $9A, $9A
.charmap $9B, $9B
.charmap $9C, $9C
.charmap $9D, $9D
.charmap $9E, $9E
.charmap $9F, $9F
.charmap $A0, $A0
.charmap $A1, $A1
.charmap $A2, $A2
.charmap $A3, $A3
.charmap $A4, $A4
.charmap $A5, $A5
.charmap $A6, $A6
.charmap $A7, $A7
.charmap $A8, $A8
.charmap $A9, $A9
.charmap $AA, $AA
.charmap $AB, $AB
.charmap $AC, $AC
.charmap $AD, $AD
.charmap $AE, $AE
.charmap $AF, $AF
.charmap $B0, $B0
.charmap $B1, $B1
.charmap $B2, $B2
.charmap $B3, $B3
.charmap $B4, $B4
.charmap $B5, $B5
.charmap $B6, $B6
.charmap $B7, $B7
.charmap $B8, $B8
.charmap $B9, $B9
.charmap $BA, $BA
.charmap $BB, $BB
.charmap $BC, $BC
.charmap $BD, $BD
.charmap $BE, $BE
.charmap $BF, $BF
.charmap $C0, $C0
.charmap $C1, $C1
.charmap $C2, $C2
.charmap $C3, $C3
.charmap $C4, $C4
.charmap $C5, $C5
.charmap $C6, $C6
.charmap $C7, $C7
.charmap $C8, $C8
.charmap $C9, $C9
.charmap $CA, $CA
.charmap $CB, $CB
.charmap $CC, $CC
.charmap $CD, $CD
.charmap $CE, $CE
.charmap $CF, $CF
.charmap $D0, $D0
.charmap $D1, $D1
.charmap $D2, $D2
.charmap $D3, $D3
.charmap $D4, $D4
.charmap $D5, $D5
.charmap $D6, $D6
.charmap $D7, $D7
.charmap $D8, $D8
.charmap $D9, $D9
.charmap $DA, $DA
.charmap $DB, $DB
.charmap $DC, $DC
.charmap $DD, $DD
.charmap $DE, $DE
.charmap $DF, $DF
.charmap $E0, $E0
.charmap $E1, $E1
.charmap $E2, $E2
.charmap $E3, $E3
.charmap $E4, $E4
.charmap $E5, $E5
.charmap $E6, $E6
.charmap $E7, $E7
.charmap $E8, $E8
.charmap $E9, $E9
.charmap $EA, $EA
.charmap $EB, $EB
.charmap $EC, $EC
.charmap $ED, $ED
.charmap $EE, $EE
.charmap $EF, $EF
.charmap $F0, $F0
.charmap $F1, $F1
.charmap $F2, $F2
.charmap $F3, $F3
.charmap $F4, $F4
.charmap $F5, $F5
.charmap $F6, $F6
.charmap $F7, $F7
.charmap $F8, $F8
.charmap $F9, $F9
.charmap $FA, $FA
.charmap $FB, $FB
.charmap $FC, $FC
.charmap $FD, $FD
.charmap $FE, $FE
.charmap $FF, $FF

View File

@ -79,3 +79,41 @@ VDELAY = GTIA + $1C ;vertical delay
GRACTL = GTIA + $1D ;graphic control
HITCLR = GTIA + $1E ;collision clear
; Hue values
HUE_GREY = 0
HUE_GOLD = 1
HUE_GOLDORANGE = 2
HUE_REDORANGE = 3
HUE_ORANGE = 4
HUE_MAGENTA = 5
HUE_PURPLE = 6
HUE_BLUE = 7
HUE_BLUE2 = 8
HUE_CYAN = 9
HUE_BLUEGREEN = 10
HUE_BLUEGREEN2 = 11
HUE_GREEN = 12
HUE_YELLOWGREEN = 13
HUE_YELLOW = 14
HUE_YELLOWRED = 15
; Color defines, similar to c64 colors (untested)
GTIA_COLOR_BLACK = (HUE_GREY << 4)
GTIA_COLOR_WHITE = (HUE_GREY << 4 | 7 << 1)
GTIA_COLOR_RED = (HUE_REDORANGE << 4 | 1 << 1)
GTIA_COLOR_CYAN = (HUE_CYAN << 4 | 3 << 1)
GTIA_COLOR_VIOLET = (HUE_PURPLE << 4 | 4 << 1)
GTIA_COLOR_GREEN = (HUE_GREEN << 4 | 2 << 1)
GTIA_COLOR_BLUE = (HUE_BLUE << 4 | 2 << 1)
GTIA_COLOR_YELLOW = (HUE_YELLOW << 4 | 7 << 1)
GTIA_COLOR_ORANGE = (HUE_ORANGE << 4 | 5 << 1)
GTIA_COLOR_BROWN = (HUE_YELLOW << 4 | 2 << 1)
GTIA_COLOR_LIGHTRED = (HUE_REDORANGE << 4 | 6 << 1)
GTIA_COLOR_GRAY1 = (HUE_GREY << 4 | 2 << 1)
GTIA_COLOR_GRAY2 = (HUE_GREY << 4 | 3 << 1)
GTIA_COLOR_LIGHTGREEN = (HUE_GREEN << 4 | 6 << 1)
GTIA_COLOR_LIGHTBLUE = (HUE_BLUE << 4 | 6 << 1)
GTIA_COLOR_GRAY3 = (HUE_GREY << 4 | 5 << 1)

View File

@ -41,4 +41,3 @@ POTGO = POKEY + $0B ;start potentiometer scan sequence
SEROUT = POKEY + $0D ;serial port output
IRQEN = POKEY + $0E ;IRQ interrupt enable
SKCTL = POKEY + $0F ;serial port and keyboard control

View File

@ -0,0 +1,303 @@
;/*****************************************************************************/
;/* */
;/* atari_screen_charmap.inc */
;/* */
;/* Atari system internal string mapping ISO-8859-1 -> Internal/Screen-Code */
;/* */
;/* */
;/* */
;/* C 2016 Christian Krueger */
;/* */
;/* */
;/* This software is provided 'as-is', without any expressed or implied */
;/* warranty. In no event will the authors be held liable for any damages */
;/* arising from the use of this software. */
;/* */
;/* Permission is granted to anyone to use this software for any purpose, */
;/* including commercial applications, and to alter it and redistribute it */
;/* freely, subject to the following restrictions: */
;/* */
;/* 1. The origin of this software must not be misrepresented; you must not */
;/* claim that you wrote the original software. If you use this software */
;/* in a product, an acknowledgment in the product documentation would be */
;/* appreciated but is not required. */
;/* 2. Altered source versions must be plainly marked as such, and must not */
;/* be misrepresented as being the original software. */
;/* 3. This notice may not be removed or altered from any source */
;/* distribution. */
;/* */
;/*****************************************************************************/
.charmap $00, $40
.charmap $01, $41
.charmap $02, $42
.charmap $03, $43
.charmap $04, $44
.charmap $05, $45
.charmap $06, $46
.charmap $07, $FD
.charmap $08, $48
.charmap $09, $7F
.charmap $0A, $DB
.charmap $0B, $4B
.charmap $0C, $7D
.charmap $0D, $4D
.charmap $0E, $4E
.charmap $0F, $4F
.charmap $10, $50
.charmap $11, $51
.charmap $12, $52
.charmap $13, $53
.charmap $14, $54
.charmap $15, $55
.charmap $16, $56
.charmap $17, $57
.charmap $18, $58
.charmap $19, $59
.charmap $1A, $5A
.charmap $1B, $5B
.charmap $1C, $5C
.charmap $1D, $5D
.charmap $1E, $5E
.charmap $1F, $5F
.charmap $20, $00
.charmap $21, $01
.charmap $22, $02
.charmap $23, $03
.charmap $24, $04
.charmap $25, $05
.charmap $26, $06
.charmap $27, $07
.charmap $28, $08
.charmap $29, $09
.charmap $2A, $0A
.charmap $2B, $0B
.charmap $2C, $0C
.charmap $2D, $0D
.charmap $2E, $0E
.charmap $2F, $0F
.charmap $30, $10
.charmap $31, $11
.charmap $32, $12
.charmap $33, $13
.charmap $34, $14
.charmap $35, $15
.charmap $36, $16
.charmap $37, $17
.charmap $38, $18
.charmap $39, $19
.charmap $3A, $1A
.charmap $3B, $1B
.charmap $3C, $1C
.charmap $3D, $1D
.charmap $3E, $1E
.charmap $3F, $1F
.charmap $40, $20
.charmap $41, $21
.charmap $42, $22
.charmap $43, $23
.charmap $44, $24
.charmap $45, $25
.charmap $46, $26
.charmap $47, $27
.charmap $48, $28
.charmap $49, $29
.charmap $4A, $2A
.charmap $4B, $2B
.charmap $4C, $2C
.charmap $4D, $2D
.charmap $4E, $2E
.charmap $4F, $2F
.charmap $50, $30
.charmap $51, $31
.charmap $52, $32
.charmap $53, $33
.charmap $54, $34
.charmap $55, $35
.charmap $56, $36
.charmap $57, $37
.charmap $58, $38
.charmap $59, $39
.charmap $5A, $3A
.charmap $5B, $3B
.charmap $5C, $3C
.charmap $5D, $3D
.charmap $5E, $3E
.charmap $5F, $3F
.charmap $60, $60
.charmap $61, $61
.charmap $62, $62
.charmap $63, $63
.charmap $64, $64
.charmap $65, $65
.charmap $66, $66
.charmap $67, $67
.charmap $68, $68
.charmap $69, $69
.charmap $6A, $6A
.charmap $6B, $6B
.charmap $6C, $6C
.charmap $6D, $6D
.charmap $6E, $6E
.charmap $6F, $6F
.charmap $70, $70
.charmap $71, $71
.charmap $72, $72
.charmap $73, $73
.charmap $74, $74
.charmap $75, $75
.charmap $76, $76
.charmap $77, $77
.charmap $78, $78
.charmap $79, $79
.charmap $7A, $7A
.charmap $7B, $7B
.charmap $7C, $7C
.charmap $7D, $7D
.charmap $7E, $7E
.charmap $7F, $7F
.charmap $80, $C0
.charmap $81, $C1
.charmap $82, $C2
.charmap $83, $C3
.charmap $84, $C4
.charmap $85, $C5
.charmap $86, $C6
.charmap $87, $C7
.charmap $88, $C8
.charmap $89, $C9
.charmap $8A, $CA
.charmap $8B, $CB
.charmap $8C, $CC
.charmap $8D, $CD
.charmap $8E, $CE
.charmap $8F, $CF
.charmap $90, $D0
.charmap $91, $D1
.charmap $92, $D2
.charmap $93, $D3
.charmap $94, $D4
.charmap $95, $D5
.charmap $96, $D6
.charmap $97, $D7
.charmap $98, $D8
.charmap $99, $D9
.charmap $9A, $DA
.charmap $9B, $DB
.charmap $9C, $DC
.charmap $9D, $DD
.charmap $9E, $DE
.charmap $9F, $DF
.charmap $A0, $80
.charmap $A1, $81
.charmap $A2, $82
.charmap $A3, $83
.charmap $A4, $84
.charmap $A5, $85
.charmap $A6, $86
.charmap $A7, $87
.charmap $A8, $88
.charmap $A9, $89
.charmap $AA, $8A
.charmap $AB, $8B
.charmap $AC, $8C
.charmap $AD, $8D
.charmap $AE, $8E
.charmap $AF, $8F
.charmap $B0, $90
.charmap $B1, $91
.charmap $B2, $92
.charmap $B3, $93
.charmap $B4, $94
.charmap $B5, $95
.charmap $B6, $96
.charmap $B7, $97
.charmap $B8, $98
.charmap $B9, $99
.charmap $BA, $9A
.charmap $BB, $9B
.charmap $BC, $9C
.charmap $BD, $9D
.charmap $BE, $9E
.charmap $BF, $9F
.charmap $C0, $A0
.charmap $C1, $A1
.charmap $C2, $A2
.charmap $C3, $A3
.charmap $C4, $A4
.charmap $C5, $A5
.charmap $C6, $A6
.charmap $C7, $A7
.charmap $C8, $A8
.charmap $C9, $A9
.charmap $CA, $AA
.charmap $CB, $AB
.charmap $CC, $AC
.charmap $CD, $AD
.charmap $CE, $AE
.charmap $CF, $AF
.charmap $D0, $B0
.charmap $D1, $B1
.charmap $D2, $B2
.charmap $D3, $B3
.charmap $D4, $B4
.charmap $D5, $B5
.charmap $D6, $B6
.charmap $D7, $B7
.charmap $D8, $B8
.charmap $D9, $B9
.charmap $DA, $BA
.charmap $DB, $BB
.charmap $DC, $BC
.charmap $DD, $BD
.charmap $DE, $BE
.charmap $DF, $BF
.charmap $E0, $E0
.charmap $E1, $E1
.charmap $E2, $E2
.charmap $E3, $E3
.charmap $E4, $E4
.charmap $E5, $E5
.charmap $E6, $E6
.charmap $E7, $E7
.charmap $E8, $E8
.charmap $E9, $E9
.charmap $EA, $EA
.charmap $EB, $EB
.charmap $EC, $EC
.charmap $ED, $ED
.charmap $EE, $EE
.charmap $EF, $EF
.charmap $F0, $F0
.charmap $F1, $F1
.charmap $F2, $F2
.charmap $F3, $F3
.charmap $F4, $F4
.charmap $F5, $F5
.charmap $F6, $F6
.charmap $F7, $F7
.charmap $F8, $F8
.charmap $F9, $F9
.charmap $FA, $FA
.charmap $FB, $FB
.charmap $FC, $FC
.charmap $FD, $FD
.charmap $FE, $FE
.charmap $FF, $FF

View File

@ -104,8 +104,14 @@ PRINT := $F77C
; Sound Effects
PING := $FA9F
PING1 := $FA85
SHOOT := $FAB5
SHOOT1 := $FA9B
EXPLODE := $FACB
EXPLODE1 := $FAB1
ZAP := $FAE1
ZAP1 := $FAC7
TICK := $FB14
TICK1 := $FAFA
TOCK := $FB2A
TOCK1 := $FB10

View File

@ -7,6 +7,7 @@
; Zero page, Commodore stuff
TXTPTR := $3D ; Pointer into BASIC source code
STATUS := $90 ; Kernal I/O completion status
TIME := $A0 ; 60HZ clock
FNAM_LEN := $B7 ; Length of filename
SECADR := $B9 ; Secondary address
@ -15,7 +16,9 @@ FNAM := $BB ; Address of filename
FNAM_BANK := $C7 ; Bank for filename
KEY_COUNT := $D0 ; Number of keys in input buffer
FKEY_COUNT := $D1 ; Characters for function key
MODE := $D7 ; 40/80 column mode flag
MODE := $D7 ; 40-/80-column mode (bit 7: 80 columns)
GRAPHM := $D8 ; Graphics mode flags (bits 5-7)
CHARDIS := $D9 ; Bit 2 shadow for location $01
CURS_X := $EC ; Cursor column
CURS_Y := $EB ; Cursor row
SCREEN_PTR := $E0 ; Pointer to current char in text screen
@ -25,32 +28,23 @@ CHARCOLOR := $F1
RVS := $F3 ; Reverse output flag
SCROLL := $F8 ; Disable scrolling flag
BASIC_BUF := $200 ; Location of command-line
BASIC_BUF := $0200 ; Location of command-line
BASIC_BUF_LEN = 162 ; Maximum length of command-line
FETCH := $2A2 ; Fetch subroutine in RAM
FETVEC := $2AA ; Vector patch location for FETCH
STASH := $2AF ; Stash routine in RAM
STAVEC := $2B9 ; Vector patch location for STASH
IRQInd := $2FD ; JMP $0000 -- used as indirect IRQ vector
PALFLAG := $A03 ; $FF=PAL, $00=NTSC
INIT_STATUS := $A04 ; Flags: Reset/Restore initiation status
FETCH := $02A2 ; Fetch subroutine in RAM
FETVEC := $02AA ; Vector patch location for FETCH
STASH := $02AF ; Stash routine in RAM
STAVEC := $02B9 ; Vector patch location for STASH
IRQInd := $02FD ; JMP $0000 -- used as indirect IRQ vector
PALFLAG := $0A03 ; $FF=PAL, $00=NTSC
INIT_STATUS := $0A04 ; Flags: Reset/Restore initiation status
VM2 := $0A2D ; VIC-IIe shadow for $D018 -- graphics mode
FKEY_LEN := $1000 ; Function key lengths
FKEY_TEXT := $100A ; Function key texts
; ---------------------------------------------------------------------------
; Kernal routines
; Direct entries
CURS_SET := $CD57
CURS_ON := $CD6F
CURS_OFF := $CD9F
CLRSCR := $C142
KBDREAD := $C006
NEWLINE := $C363
PRINT := $C322
NMIEXIT := $FF33
INDFET := $FF74
KBDREPEAT := $028a
KBDREPEATRATE := $028b
KBDREPEATDELAY := $028c
; ---------------------------------------------------------------------------
; Vectors
@ -163,34 +157,46 @@ SID_Read3 := $D41C
; ---------------------------------------------------------------------------
; I/O: VDC (128 only)
VDC_INDEX := $D600
VDC_DATA := $D601
VDC_INDEX := $D600 ; register address port
VDC_DATA := $D601 ; data port
; Registers
VDC_DATA_HI = 18 ; video RAM address (big endian)
VDC_DATA_LO = 19
VDC_CSET = 28
VDC_RAM_RW = 31 ; RAM port
; ---------------------------------------------------------------------------
; I/O: CIAs
; I/O: Complex Interface Adapters
CIA1 := $DC00
CIA1_PRA := $DC00
CIA1_PRB := $DC01
CIA1_DDRA := $DC02
CIA1_DDRB := $DC03
CIA1_TOD10 := $DC08
CIA1_TODSEC := $DC09
CIA1_TODMIN := $DC0A
CIA1_TODHR := $DC0B
CIA1_ICR := $DC0D
CIA1_CRA := $DC0E
CIA1_CRB := $DC0F
CIA1_PRA := $DC00 ; Port A
CIA1_PRB := $DC01 ; Port B
CIA1_DDRA := $DC02 ; Data direction register for port A
CIA1_DDRB := $DC03 ; Data direction register for port B
CIA1_TA := $DC04 ; 16-bit timer A
CIA1_TB := $DC06 ; 16-bit timer B
CIA1_TOD10 := $DC08 ; Time-of-day tenths of a second
CIA1_TODSEC := $DC09 ; Time-of-day seconds
CIA1_TODMIN := $DC0A ; Time-of-day minutes
CIA1_TODHR := $DC0B ; Time-of-day hours
CIA1_SDR := $DC0C ; Serial data register
CIA1_ICR := $DC0D ; Interrupt control register
CIA1_CRA := $DC0E ; Control register for timer A
CIA1_CRB := $DC0F ; Control register for timer B
CIA2 := $DD00
CIA2_PRA := $DD00
CIA2_PRB := $DD01
CIA2_DDRA := $DD02
CIA2_DDRB := $DD03
CIA2_TA := $DD04
CIA2_TB := $DD06
CIA2_TOD10 := $DD08
CIA2_TODSEC := $DD09
CIA2_TODMIN := $DD0A
CIA2_TODHR := $DD0B
CIA2_SDR := $DD0C
CIA2_ICR := $DD0D
CIA2_CRA := $DD0E
CIA2_CRB := $DD0F

View File

@ -9,6 +9,7 @@
VARTAB := $2D ; Pointer to start of BASIC variables
MEMSIZE := $37 ; Pointer to highest BASIC RAM location (+1)
TXTPTR := $7A ; Pointer into BASIC source code
STATUS := $90 ; Kernal I/O completion status
TIME := $A0 ; 60 HZ clock
FNAM_LEN := $B7 ; Length of filename
SECADR := $B9 ; Secondary address
@ -33,14 +34,9 @@ CHARCOLOR := $286
CURS_COLOR := $287 ; Color under the cursor
PALFLAG := $2A6 ; $01 = PAL, $00 = NTSC
; ---------------------------------------------------------------------------
; Kernal routines
; Direct entries
CLRSCR := $E544
KBDREAD := $E5B4
NMIEXIT := $FEBC
KBDREPEAT := $28a
KBDREPEATRATE := $28b
KBDREPEATDELAY := $28c
; ---------------------------------------------------------------------------
; Vector and other locations
@ -81,6 +77,8 @@ VIC_SPR_EXP_Y := $D017
VIC_SPR_EXP_X := $D01D
VIC_SPR_MCOLOR := $D01C
VIC_SPR_BG_PRIO := $D01B
VIC_SPR_COLL := $D01E
VIC_SPR_BG_COLL := $D01F
VIC_SPR_MCOLOR0 := $D025
VIC_SPR_MCOLOR1 := $D026
@ -162,30 +160,36 @@ VDC_INDEX := $D600
VDC_DATA := $D601
; ---------------------------------------------------------------------------
; I/O: CIAs
; I/O: Complex Interface Adapters
CIA1 := $DC00
CIA1_PRA := $DC00
CIA1_PRB := $DC01
CIA1_DDRA := $DC02
CIA1_DDRB := $DC03
CIA1_TOD10 := $DC08
CIA1_TODSEC := $DC09
CIA1_TODMIN := $DC0A
CIA1_TODHR := $DC0B
CIA1_ICR := $DC0D
CIA1_CRA := $DC0E
CIA1_CRB := $DC0F
CIA1_PRA := $DC00 ; Port A
CIA1_PRB := $DC01 ; Port B
CIA1_DDRA := $DC02 ; Data direction register for port A
CIA1_DDRB := $DC03 ; Data direction register for port B
CIA1_TA := $DC04 ; 16-bit timer A
CIA1_TB := $DC06 ; 16-bit timer B
CIA1_TOD10 := $DC08 ; Time-of-day tenths of a second
CIA1_TODSEC := $DC09 ; Time-of-day seconds
CIA1_TODMIN := $DC0A ; Time-of-day minutes
CIA1_TODHR := $DC0B ; Time-of-day hours
CIA1_SDR := $DC0C ; Serial data register
CIA1_ICR := $DC0D ; Interrupt control register
CIA1_CRA := $DC0E ; Control register for timer A
CIA1_CRB := $DC0F ; Control register for timer B
CIA2 := $DD00
CIA2_PRA := $DD00
CIA2_PRB := $DD01
CIA2_DDRA := $DD02
CIA2_DDRB := $DD03
CIA2_TA := $DD04
CIA2_TB := $DD06
CIA2_TOD10 := $DD08
CIA2_TODSEC := $DD09
CIA2_TODMIN := $DD0A
CIA2_TODHR := $DD0B
CIA2_SDR := $DD0C
CIA2_ICR := $DD0D
CIA2_CRA := $DD0E
CIA2_CRB := $DD0F

View File

@ -1,9 +1,13 @@
; Convert characters to screen codes
; Helper macro that converts and outputs one character
; Macro that converts one character.
; scrbyte() can be used as an instruction operand
.define scrbyte(code) (<(.strat ("h@dbdlhh", code >> 5) << 4) ^ code)
; Helper macro that stores one character
.macro _scrcode char
.if (char < 256)
.byte <(.strat ("h@dbdlhh", char >> 5) << 4) ^ char
.byte scrbyte {char}
.else
.error "scrcode: Character constant out of range"
.endif
@ -38,13 +42,9 @@
; Anything else is an error
.else
.error "scrcode: invalid argument type"
.endif
; Call the macro recursively with the remaining args
scrcode arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9
.endmacro

187
asminc/cbm_kernal.inc Normal file
View File

@ -0,0 +1,187 @@
;
; Olli Savia <ops@iki.fi>
; Greg King
;
; Commodore-compatibles Kernal functions
;
.if .def(__CX16__)
; CX16 extended jump table
ENTROPY_GET := $FECF
KEYBRD_BUF_PUT := $FED2
CONSOLE_SET_PAGE_MSG := $FED5
CONSOLE_PUT_IMAGE := $FED8
CONSOLE_INIT := $FEDB
CONSOLE_PUT_CHAR := $FEDE
CONSOLE_GET_CHAR := $FEE1
MEMORY_FILL := $FEE4
MEMORY_COPY := $FEE7
MEMORY_CRC := $FEEA
MEMORY_DECOMPRESS := $FEED
SPRITE_SET_IMAGE := $FEF0
SPRITE_SET_POSITION := $FEF3
FB_INIT := $FEF6
FB_GET_INFO := $FEF9
FB_SET_PALETTE := $FEFC
FB_CURSOR_POSITION := $FEFF
FB_CURSOR_NEXT_LINE := $FF02
FB_GET_PIXEL := $FF05
FB_GET_PIXELS := $FF08
FB_SET_PIXEL := $FF0B
FB_SET_PIXELS := $FF0E
FB_SET_8_PIXELS := $FF11
FB_SET_8_PIXELS_OPAQUE := $FF14
FB_FILL_PIXELS := $FF17
FB_FILTER_PIXELS := $FF1A
FB_MOVE_PIXELS := $FF1D
GRAPH_INIT := $FF20
GRAPH_CLEAR := $FF23
GRAPH_SET_WINDOW := $FF26
GRAPH_SET_COLORS := $FF29
GRAPH_DRAW_LINE := $FF2C
GRAPH_DRAW_RECT := $FF2F
GRAPH_MOVE_RECT := $FF32
GRAPH_DRAW_OVAL := $FF35
GRAPH_DRAW_IMAGE := $FF38
GRAPH_SET_FONT := $FF3B
GRAPH_GET_CHAR_SIZE := $FF3E
GRAPH_PUT_CHAR := $FF41
MULTI_ACPTR := $FF44
RESTORE_BASIC := $FF47
CLOCK_SET_DATE_TIME := $FF4D
CLOCK_GET_DATE_TIME := $FF50
JOYSTICK_SCAN := $FF53
JOYSTICK_GET := $FF56
SCREEN_SET_MODE := $FF5F
SCREEN_SET_CHARSET := $FF62
MOUSE_CONFIG := $FF68
MOUSE_GET := $FF6B
.endif
.if .def(__C128__)
; C128 extended jump table
C64MODE := $FF4D
SWAPPER := $FF5F
SETBNK := $FF68
.endif
.if .def(__C128__) || .def(__CX16__)
; Extended jump table
CLSALL := $FF4A
LKUPLA := $FF59
LKUPSA := $FF5C
PFKEY := $FF65
JSRFAR := $FF6E
INDFET := $FF74
INDSTA := $FF77
INDCMP := $FF7A
PRIMM := $FF7D
.endif
.if .def(__C64__) || .def(__C128__) || .def(__C16__) || .def(__CX16__)
CINT := $FF81
IOINIT := $FF84
RAMTAS := $FF87
.elseif .def(__VIC20__)
CINT := $E518 ; No entries are in the Kernal jump table of the VIC-20 for these three (3) functions.
IOINIT := $FDF9 ; The entries for these functions have been set to point directly to the functions
RAMTAS := $FD8D ; in the Kernal, to maintain compatibility with the other Commodore platforms.
.elseif .def(__CBM510__) || .def(__CBM610__)
IOINIT := $FF7B
CINT := $FF7E
.endif
.if .def(__VIC20__) || .def(__C64__) || .def(__C128__) || .def(__C16__) || .def(__CX16__)
RESTOR := $FF8A
VECTOR := $FF8D
.elseif .def(__CBM510__) || .def(__CBM610__)
VECTOR := $FF84
RESTOR := $FF87
.endif
.if .def(__CBM510__) || .def(__CBM610__) || .def(__VIC20__) || .def(__C64__) || .def(__C128__) || .def(__C16__) || .def(__CX16__)
SETMSG := $FF90
SECOND := $FF93
TKSA := $FF96
MEMTOP := $FF99
MEMBOT := $FF9C
SCNKEY := $FF9F
SETTMO := $FFA2
ACPTR := $FFA5
CIOUT := $FFA8
UNTLK := $FFAB
UNLSN := $FFAE
LISTEN := $FFB1
TALK := $FFB4
READST := $FFB7
SETLFS := $FFBA
SETNAM := $FFBD
OPEN := $FFC0
CLOSE := $FFC3
.endif
; Available on all platforms including PET
CHKIN := $FFC6
CKOUT := $FFC9
CHKOUT := $FFC9
CLRCH := $FFCC
CLRCHN := $FFCC
BASIN := $FFCF
CHRIN := $FFCF
BSOUT := $FFD2
CHROUT := $FFD2
.if .def(__CBM510__) || .def(__CBM610__) || .def(__VIC20__) || .def(__C64__) || .def(__C128__) || .def(__C16__) || .def(__CX16__)
LOAD := $FFD5
SAVE := $FFD8
SETTIM := $FFDB
RDTIM := $FFDE
.endif
; Available on all platforms including PET
STOP := $FFE1
GETIN := $FFE4
CLALL := $FFE7
UDTIM := $FFEA
.if .def(__CBM510__) || .def(__CBM610__) || .def(__VIC20__) || .def(__C64__) || .def(__C128__) || .def(__C16__) || .def(__CX16__)
SCREEN := $FFED
PLOT := $FFF0
IOBASE := $FFF3
.endif
; ---------------------------------------------------------------------------
; Kernal routines, direct entries
;
; Unlike the above, these are not standard functions with entries in the jump
; table. They do not exist in all Kernals, and where they do the entry point is
; specific to that particular machine and possibly even Kernal version.
;
; This list is not comprehensive: missing items for particular machines
; should be added as needed.
;
; UPDCRAMPTR: Updates the color RAM pointer to match the screen RAM pointer.
;
.if .def(__VIC20__)
CLRSCR := $E55F
KBDREAD := $E5CF
UPDCRAMPTR := $EAB2
.elseif .def(__C64__)
CLRSCR := $E544
KBDREAD := $E5B4
NMIEXIT := $FEBC
UPDCRAMPTR := $EA24
.elseif .def(__C128__)
CLRSCR := $C142
KBDREAD := $C006
NMIEXIT := $FF33
NEWLINE := $C363
PRINT := $C322
CURS_SET := $CD57
CURS_ON := $CD6F
CURS_OFF := $CD9F
.elseif .def(__C16__)
CLRSCR := $D88B
KBDREAD := $D8C1
.endif

View File

@ -0,0 +1,291 @@
;/*****************************************************************************/
;/* */
;/* cbm_petscii_charmap.inc */
;/* */
;/* CBM system standard string mapping ISO-8859-1 -> PetSCII */
;/* */
;/* */
;/* 2019-03-10, Greg King */
;/* */
;/* This software is provided "as-is", without any expressed or implied */
;/* warranty. In no event will the authors be held liable for any damages */
;/* arising from the use of this software. */
;/* */
;/* Permission is granted to anyone to use this software for any purpose, */
;/* including commercial applications, and to alter it and redistribute it */
;/* freely, subject to the following restrictions: */
;/* */
;/* 1. The origin of this software must not be misrepresented; you must not */
;/* claim that you wrote the original software. If you use this software */
;/* in a product, an acknowledgment in the product documentation would be */
;/* appreciated, but is not required. */
;/* 2. Altered source versions must be plainly marked as such, and must not */
;/* be misrepresented as being the original software. */
;/* 3. This notice must not be removed or altered from any source */
;/* distribution. */
;/* */
;/*****************************************************************************/
.charmap $00, $00
.charmap $01, $01
.charmap $02, $02
.charmap $03, $03
.charmap $04, $04
.charmap $05, $05
.charmap $06, $06
.charmap $07, $07
.charmap $08, $14
.charmap $09, $09
.charmap $0A, $0D
.charmap $0B, $11
.charmap $0C, $93
.charmap $0D, $0A
.charmap $0E, $0E
.charmap $0F, $0F
.charmap $10, $10
.charmap $11, $0B
.charmap $12, $12
.charmap $13, $13
.charmap $14, $08
.charmap $15, $15
.charmap $16, $16
.charmap $17, $17
.charmap $18, $18
.charmap $19, $19
.charmap $1A, $1A
.charmap $1B, $1B
.charmap $1C, $1C
.charmap $1D, $1D
.charmap $1E, $1E
.charmap $1F, $1F
.charmap $20, $20
.charmap $21, $21
.charmap $22, $22
.charmap $23, $23
.charmap $24, $24
.charmap $25, $25
.charmap $26, $26
.charmap $27, $27
.charmap $28, $28
.charmap $29, $29
.charmap $2A, $2A
.charmap $2B, $2B
.charmap $2C, $2C
.charmap $2D, $2D
.charmap $2E, $2E
.charmap $2F, $2F
.charmap $30, $30
.charmap $31, $31
.charmap $32, $32
.charmap $33, $33
.charmap $34, $34
.charmap $35, $35
.charmap $36, $36
.charmap $37, $37
.charmap $38, $38
.charmap $39, $39
.charmap $3A, $3A
.charmap $3B, $3B
.charmap $3C, $3C
.charmap $3D, $3D
.charmap $3E, $3E
.charmap $3F, $3F
.charmap $40, $40
.charmap $41, $C1
.charmap $42, $C2
.charmap $43, $C3
.charmap $44, $C4
.charmap $45, $C5
.charmap $46, $C6
.charmap $47, $C7
.charmap $48, $C8
.charmap $49, $C9
.charmap $4A, $CA
.charmap $4B, $CB
.charmap $4C, $CC
.charmap $4D, $CD
.charmap $4E, $CE
.charmap $4F, $CF
.charmap $50, $D0
.charmap $51, $D1
.charmap $52, $D2
.charmap $53, $D3
.charmap $54, $D4
.charmap $55, $D5
.charmap $56, $D6
.charmap $57, $D7
.charmap $58, $D8
.charmap $59, $D9
.charmap $5A, $DA
.charmap $5B, $5B
.charmap $5C, $BF
.charmap $5D, $5D
.charmap $5E, $5E
.charmap $5F, $A4
.charmap $60, $AD
.charmap $61, $41
.charmap $62, $42
.charmap $63, $43
.charmap $64, $44
.charmap $65, $45
.charmap $66, $46
.charmap $67, $47
.charmap $68, $48
.charmap $69, $49
.charmap $6A, $4A
.charmap $6B, $4B
.charmap $6C, $4C
.charmap $6D, $4D
.charmap $6E, $4E
.charmap $6F, $4F
.charmap $70, $50
.charmap $71, $51
.charmap $72, $52
.charmap $73, $53
.charmap $74, $54
.charmap $75, $55
.charmap $76, $56
.charmap $77, $57
.charmap $78, $58
.charmap $79, $59
.charmap $7A, $5A
.charmap $7B, $B3
.charmap $7C, $DD
.charmap $7D, $AB
.charmap $7E, $B1
.charmap $7F, $DF
.charmap $80, $80
.charmap $81, $81
.charmap $82, $82
.charmap $83, $83
.charmap $84, $84
.charmap $85, $85
.charmap $86, $86
.charmap $87, $87
.charmap $88, $88
.charmap $89, $89
.charmap $8A, $8A
.charmap $8B, $8B
.charmap $8C, $8C
.charmap $8D, $8D
.charmap $8E, $8E
.charmap $8F, $8F
.charmap $90, $90
.charmap $91, $91
.charmap $92, $92
.charmap $93, $0C
.charmap $94, $94
.charmap $95, $95
.charmap $96, $96
.charmap $97, $97
.charmap $98, $98
.charmap $99, $99
.charmap $9A, $9A
.charmap $9B, $9B
.charmap $9C, $9C
.charmap $9D, $9D
.charmap $9E, $9E
.charmap $9F, $9F
.charmap $A0, $A0
.charmap $A1, $A1
.charmap $A2, $A2
.charmap $A3, $A3
.charmap $A4, $A4
.charmap $A5, $A5
.charmap $A6, $A6
.charmap $A7, $A7
.charmap $A8, $A8
.charmap $A9, $A9
.charmap $AA, $AA
.charmap $AB, $AB
.charmap $AC, $AC
.charmap $AD, $AD
.charmap $AE, $AE
.charmap $AF, $AF
.charmap $B0, $B0
.charmap $B1, $B1
.charmap $B2, $B2
.charmap $B3, $B3
.charmap $B4, $B4
.charmap $B5, $B5
.charmap $B6, $B6
.charmap $B7, $B7
.charmap $B8, $B8
.charmap $B9, $B9
.charmap $BA, $BA
.charmap $BB, $BB
.charmap $BC, $BC
.charmap $BD, $BD
.charmap $BE, $BE
.charmap $BF, $BF
.charmap $C0, $60
.charmap $C1, $61
.charmap $C2, $62
.charmap $C3, $63
.charmap $C4, $64
.charmap $C5, $65
.charmap $C6, $66
.charmap $C7, $67
.charmap $C8, $68
.charmap $C9, $69
.charmap $CA, $6A
.charmap $CB, $6B
.charmap $CC, $6C
.charmap $CD, $6D
.charmap $CE, $6E
.charmap $CF, $6F
.charmap $D0, $70
.charmap $D1, $71
.charmap $D2, $72
.charmap $D3, $73
.charmap $D4, $74
.charmap $D5, $75
.charmap $D6, $76
.charmap $D7, $77
.charmap $D8, $78
.charmap $D9, $79
.charmap $DA, $7A
.charmap $DB, $7B
.charmap $DC, $7C
.charmap $DD, $7D
.charmap $DE, $7E
.charmap $DF, $7F
.charmap $E0, $E0
.charmap $E1, $E1
.charmap $E2, $E2
.charmap $E3, $E3
.charmap $E4, $E4
.charmap $E5, $E5
.charmap $E6, $E6
.charmap $E7, $E7
.charmap $E8, $E8
.charmap $E9, $E9
.charmap $EA, $EA
.charmap $EB, $EB
.charmap $EC, $EC
.charmap $ED, $ED
.charmap $EE, $EE
.charmap $EF, $EF
.charmap $F0, $F0
.charmap $F1, $F1
.charmap $F2, $F2
.charmap $F3, $F3
.charmap $F4, $F4
.charmap $F5, $F5
.charmap $F6, $F6
.charmap $F7, $F7
.charmap $F8, $F8
.charmap $F9, $F9
.charmap $FA, $FA
.charmap $FB, $FB
.charmap $FC, $FC
.charmap $FD, $FD
.charmap $FE, $FE
.charmap $FF, $FF

View File

@ -0,0 +1,305 @@
;/*****************************************************************************/
;/* */
;/* cbm_screen_charmap.inc */
;/* */
;/* c Copyright 2019, Gerhard W. Gruber (sparhawk@gmx.at) */
;/* */
;/* When using CBM mode, this include converts character literals */
;/* from ASCII to screen-code mapping, so you can write directly */
;/* to the screen memory. */
;/* */
;/* If this include is used, no additional macros are needed. */
;/* */
;/*****************************************************************************/
; Char $00 -> c + 128
.charmap $00, $80
; Char $01 ... $1A -> c + 128 + 64 control alphabet
.charmap $01, $C1
.charmap $02, $C2
.charmap $03, $C3
.charmap $04, $C4
.charmap $05, $C5
.charmap $06, $C6
.charmap $07, $C7
.charmap $08, $C8
.charmap $09, $C9
.charmap $0A, $CA
.charmap $0B, $CB
.charmap $0C, $CC
.charmap $0D, $CD
.charmap $0E, $CE
.charmap $0F, $CF
.charmap $10, $D0
.charmap $11, $D1
.charmap $12, $D2
.charmap $13, $D3
.charmap $14, $D4
.charmap $15, $D5
.charmap $16, $D6
.charmap $17, $D7
.charmap $18, $D8
.charmap $19, $D9
.charmap $1A, $DA
; Char $1B ... $1F -> c + 128
.charmap $1B, $9B
.charmap $1C, $9C
.charmap $1D, $9D
.charmap $1E, $9E
.charmap $1F, $9F
; Char $20 ... $3F -> c
.charmap $20, $20
.charmap $21, $21
.charmap $22, $22
.charmap $23, $23
.charmap $24, $24
.charmap $25, $25
.charmap $26, $26
.charmap $27, $27
.charmap $28, $28
.charmap $29, $29
.charmap $2A, $2A
.charmap $2B, $2B
.charmap $2C, $2C
.charmap $2D, $2D
.charmap $2E, $2E
.charmap $2F, $2F
.charmap $30, $30
.charmap $31, $31
.charmap $32, $32
.charmap $33, $33
.charmap $34, $34
.charmap $35, $35
.charmap $36, $36
.charmap $37, $37
.charmap $38, $38
.charmap $39, $39
.charmap $3A, $3A
.charmap $3B, $3B
.charmap $3C, $3C
.charmap $3D, $3D
.charmap $3E, $3E
.charmap $3F, $3F
; Char $40 -> c - 64
.charmap $40, $00
; Char $41 ... $5A -> c upper-case alphabet
.charmap $41, $41
.charmap $42, $42
.charmap $43, $43
.charmap $44, $44
.charmap $45, $45
.charmap $46, $46
.charmap $47, $47
.charmap $48, $48
.charmap $49, $49
.charmap $4A, $4A
.charmap $4B, $4B
.charmap $4C, $4C
.charmap $4D, $4D
.charmap $4E, $4E
.charmap $4F, $4F
.charmap $50, $50
.charmap $51, $51
.charmap $52, $52
.charmap $53, $53
.charmap $54, $54
.charmap $55, $55
.charmap $56, $56
.charmap $57, $57
.charmap $58, $58
.charmap $59, $59
.charmap $5A, $5A
; Char $5B ... $5F -> c - 64
.charmap $5B, $1B
.charmap $5C, $1C
.charmap $5D, $1D
.charmap $5E, $1E
.charmap $5F, $1F
; Char $60 -> c - 32
.charmap $60, $40
; Char $61 ... $7A -> c - 32 - 64 lower-case alphabet
.charmap $61, $01
.charmap $62, $02
.charmap $63, $03
.charmap $64, $04
.charmap $65, $05
.charmap $66, $06
.charmap $67, $07
.charmap $68, $08
.charmap $69, $09
.charmap $6A, $0A
.charmap $6B, $0B
.charmap $6C, $0C
.charmap $6D, $0D
.charmap $6E, $0E
.charmap $6F, $0F
.charmap $70, $10
.charmap $71, $11
.charmap $72, $12
.charmap $73, $13
.charmap $74, $14
.charmap $75, $15
.charmap $76, $16
.charmap $77, $17
.charmap $78, $18
.charmap $79, $19
.charmap $7A, $1A
; Char $7B ... $7F -> c - 32
.charmap $7B, $5B
.charmap $7C, $5C
.charmap $7D, $5D
.charmap $7E, $5E
.charmap $7F, $5F
; Char $80 -> c + 64
.charmap $80, $C0
; Char $81 ... $9A -> c control alphabet
.charmap $81, $81
.charmap $82, $82
.charmap $83, $83
.charmap $84, $84
.charmap $85, $85
.charmap $86, $86
.charmap $87, $87
.charmap $88, $88
.charmap $89, $89
.charmap $8A, $8A
.charmap $8B, $8B
.charmap $8C, $8C
.charmap $8D, $8D
.charmap $8E, $8E
.charmap $8F, $8F
.charmap $90, $90
.charmap $91, $91
.charmap $92, $92
.charmap $93, $93
.charmap $94, $94
.charmap $95, $95
.charmap $96, $96
.charmap $97, $97
.charmap $98, $98
.charmap $99, $99
.charmap $9A, $9A
; Char $9B ... $9F -> c + 64
.charmap $9B, $DB
.charmap $9C, $DC
.charmap $9D, $DD
.charmap $9E, $DE
.charmap $9F, $DF
; Char $A0 ... $BF -> c - 64
.charmap $A0, $60
.charmap $A1, $61
.charmap $A2, $62
.charmap $A3, $63
.charmap $A4, $64
.charmap $A5, $65
.charmap $A6, $66
.charmap $A7, $67
.charmap $A8, $68
.charmap $A9, $69
.charmap $AA, $6A
.charmap $AB, $6B
.charmap $AC, $6C
.charmap $AD, $6D
.charmap $AE, $6E
.charmap $AF, $6F
.charmap $B0, $70
.charmap $B1, $71
.charmap $B2, $72
.charmap $B3, $73
.charmap $B4, $74
.charmap $B5, $75
.charmap $B6, $76
.charmap $B7, $77
.charmap $B8, $78
.charmap $B9, $79
.charmap $BA, $7A
.charmap $BB, $7B
.charmap $BC, $7C
.charmap $BD, $7D
.charmap $BE, $7E
.charmap $BF, $7F
; Char $C0 ... $DF -> c - 128
.charmap $C0, $40
; Char $C1 ... $DA -> c - 128 - 64 lower-case alphabet
.charmap $C1, $01
.charmap $C2, $02
.charmap $C3, $03
.charmap $C4, $04
.charmap $C5, $05
.charmap $C6, $06
.charmap $C7, $07
.charmap $C8, $08
.charmap $C9, $09
.charmap $CA, $0A
.charmap $CB, $0B
.charmap $CC, $0C
.charmap $CD, $0D
.charmap $CE, $0E
.charmap $CF, $0F
.charmap $D0, $10
.charmap $D1, $11
.charmap $D2, $12
.charmap $D3, $13
.charmap $D4, $14
.charmap $D5, $15
.charmap $D6, $16
.charmap $D7, $17
.charmap $D8, $18
.charmap $D9, $19
.charmap $DA, $1A
; Char $DB ... $DF -> c - 128
.charmap $DB, $5B
.charmap $DC, $5C
.charmap $DD, $5D
.charmap $DE, $5E
.charmap $DF, $5F
; Char $E0 ... $FF -> c - 128
.charmap $E0, $60
.charmap $E1, $61
.charmap $E2, $62
.charmap $E3, $63
.charmap $E4, $64
.charmap $E5, $65
.charmap $E6, $66
.charmap $E7, $67
.charmap $E8, $68
.charmap $E9, $69
.charmap $EA, $6A
.charmap $EB, $6B
.charmap $EC, $6C
.charmap $ED, $6D
.charmap $EE, $6E
.charmap $EF, $6F
.charmap $F0, $70
.charmap $F1, $71
.charmap $F2, $72
.charmap $F3, $73
.charmap $F4, $74
.charmap $F5, $75
.charmap $F6, $76
.charmap $F7, $77
.charmap $F8, $78
.charmap $F9, $79
.charmap $FA, $7A
.charmap $FB, $7B
.charmap $FC, $7C
.charmap $FD, $7D
.charmap $FE, $7E
.charmap $FF, $7F

View File

@ -2,18 +2,23 @@
CPU_ISET_NONE = $0001
CPU_ISET_6502 = $0002
CPU_ISET_6502X = $0004
CPU_ISET_65SC02 = $0008
CPU_ISET_65C02 = $0010
CPU_ISET_65816 = $0020
CPU_ISET_SWEET16 = $0040
CPU_ISET_HUC6280 = $0080
CPU_ISET_6502DTV = $0008
CPU_ISET_65SC02 = $0010
CPU_ISET_65C02 = $0020
CPU_ISET_65816 = $0040
CPU_ISET_SWEET16 = $0080
CPU_ISET_HUC6280 = $0100
;CPU_ISET_M740 = $0200 not actually implemented
CPU_ISET_4510 = $0400
; CPU capabilities
CPU_NONE = CPU_ISET_NONE
CPU_6502 = CPU_ISET_6502
CPU_6502X = CPU_ISET_6502|CPU_ISET_6502X
CPU_6502DTV = CPU_ISET_6502|CPU_ISET_6502X|CPU_ISET_6502DTV
CPU_65SC02 = CPU_ISET_6502|CPU_ISET_65SC02
CPU_65C02 = CPU_ISET_6502|CPU_ISET_65SC02|CPU_ISET_65C02
CPU_65816 = CPU_ISET_6502|CPU_ISET_65SC02|CPU_ISET_65816
CPU_SWEET16 = CPU_ISET_SWEET16
CPU_HUC6280 = CPU_ISET_6502|CPU_ISET_65SC02|CPU_ISET_65C02|CPU_ISET_HUC6280
CPU_4510 = CPU_ISET_6502|CPU_ISET_65SC02|CPU_ISET_65C02|CPU_ISET_4510

66
asminc/creativision.inc Normal file
View File

@ -0,0 +1,66 @@
;*
;** VTech Creativision Definitions
;*
;** Screen
SCREEN_ROWS = 24
SCREEN_COLS = 32
SCREEN_PTR := $3A
CURSOR_X := $3C
CURSOR_Y := $3D
;** VDP
VDP_DATA_R := $2000
VDP_STATUS_R := $2001
VDP_DATA_W := $3000
VDP_CONTROL_W := $3001
;** PIA
PIA0_DATA := $1000
PIA0_STATUS := $1001
PIA1_DATA := $1002
PIA1_STATUS := $1003
;** General
CH_VLINE = 33
CH_HLINE = 34
CH_ULCORNER = 35
CH_URCORNER = 36
CH_LLCORNER = 37
CH_LRCORNER = 38
;** I/O (Zero-page variables)
ZP_KEYBOARD := $10
ZP_JOY0_DIR := $11
ZP_JOY1_DIR := $13
ZP_JOY0_BUTTONS := $16
ZP_JOY1_BUTTONS := $17
;** Joystick direction values (ZP_JOY0_DIR/ZP_JOY1_DIR)
JOY_N = $49
JOY_NNE = $48
JOY_NE = $47
JOY_ENE = $46
JOY_E = $45
JOY_ESE = $44
JOY_SE = $43
JOY_SSE = $42
JOY_S = $41
JOY_SSW = $40
JOY_SW = $4F
JOY_WSW = $4E
JOY_W = $4D
JOY_WNW = $4C
JOY_NW = $4B
JOY_NNW = $4A
;** BIOS routines
BIOS_NMI_RESET_ADDR := $F808
BIOS_PLAY_TUNE1 := $FBD6
BIOS_PLAY_SONG := $FBED
BIOS_PLAY_TUNE2 := $FCE6
BIOS_WRITE_VDP_REG := $FE1F
BIOS_QUIET_PSG := $FE54
BIOS_POKE_PSG := $FE77
BIOS_IRQ1_ADDR := $FF3F
BIOS_IRQ2_ADDR := $FF52

View File

@ -1,29 +1,31 @@
; ctype.inc
;
; This file is part of
; cc65 - a freeware C compiler for 6502 based systems
;
; https://cc65.github.io
;
; See "LICENSE" file for legal information.
;
; Definitions for the character type tables
;
; Ullrich von Bassewitz, 08.09.2001
;
; Make the __ctype table an exported/imported symbol
.global __ctype
; Define bitmapped constants for the table entries
CT_NONE = $00 ; Nothing special
CT_LOWER = $01 ; 0 - Lower case char
CT_UPPER = $02 ; 1 - Upper case char
CT_DIGIT = $04 ; 2 - Numeric digit
CT_XDIGIT = $08 ; 3 - Hex digit (both, lower and upper)
CT_CTRL = $10 ; 4 - Control character
CT_SPACE = $20 ; 5 - The space character itself
CT_OTHER_WS = $40 ; 6 - Other whitespace ('\f', '\n', '\r', '\t' and '\v')
CT_SPACE_TAB = $80 ; 7 - Space or tab character
CT_NONE = %00000000 ; Nothing special
CT_LOWER = %00000001 ; 0 - Lower case char
CT_UPPER = %00000010 ; 1 - Upper case char
CT_DIGIT = %00000100 ; 2 - Numeric digit
CT_XDIGIT = %00001000 ; 3 - Hex digit (both, lower and upper)
CT_CTRL = %00010000 ; 4 - Control character
CT_SPACE = %00100000 ; 5 - The space character itself
CT_OTHER_WS = %01000000 ; 6 - Other whitespace ('\f', '\n', '\r', '\t' and '\v')
CT_SPACE_TAB = %10000000 ; 7 - Space or tab character
; Combined stuff
CT_ALNUM = (CT_LOWER | CT_UPPER | CT_DIGIT)
CT_ALPHA = (CT_LOWER | CT_UPPER)
CT_CTRL_SPACE = (CT_CTRL | CT_SPACE)
CT_NOT_PUNCT = (CT_SPACE | CT_CTRL | CT_DIGIT | CT_UPPER | CT_LOWER)

91
asminc/ctype_common.inc Normal file
View File

@ -0,0 +1,91 @@
; ctype_common.inc
;
; This file is part of
; cc65 - a freeware C compiler for 6502 based systems
;
; https://cc65.github.io
;
; See "LICENSE" file for legal information.
;
; Character specification table for some common targets.
;
.include "ctypetable.inc"
.export __ctypeidx
; The tables are readonly, put them into the rodata segment
.rodata
__ctypeidx:
ct_mix CT_CTRL_IDX, CT_CTRL_IDX ; 0/00 ___ctrl_@___, 1/01 ___ctrl_A___
ct_mix CT_CTRL_IDX, CT_CTRL_IDX ; 2/02 ___ctrl_B___, 3/03 ___ctrl_C___
ct_mix CT_CTRL_IDX, CT_CTRL_IDX ; 4/04 ___ctrl_D___, 5/05 ___ctrl_E___
ct_mix CT_CTRL_IDX, CT_CTRL_IDX ; 6/06 ___ctrl_F___, 7/07 ___ctrl_G___
ct_mix CT_CTRL_IDX, CT_CTRL_WS_SPACETAB_IDX ; 8/08 ___ctrl_H___, 9/09 ___ctrl_I___
ct_mix CT_CTRL_WS_IDX, CT_CTRL_WS_IDX ; 10/0a ___ctrl_J___, 11/0b ___ctrl_K___
ct_mix CT_CTRL_WS_IDX, CT_CTRL_WS_IDX ; 12/0c ___ctrl_L___, 13/0d ___ctrl_M___
ct_mix CT_CTRL_IDX, CT_CTRL_IDX ; 14/0e ___ctrl_N___, 15/0f ___ctrl_O___
ct_mix CT_CTRL_IDX, CT_CTRL_IDX ; 16/10 ___ctrl_P___, 17/11 ___ctrl_Q___
ct_mix CT_CTRL_IDX, CT_CTRL_IDX ; 18/12 ___ctrl_R___, 19/13 ___ctrl_S___
ct_mix CT_CTRL_IDX, CT_CTRL_IDX ; 20/14 ___ctrl_T___, 21/15 ___ctrl_U___
ct_mix CT_CTRL_IDX, CT_CTRL_IDX ; 22/16 ___ctrl_V___, 23/17 ___ctrl_W___
ct_mix CT_CTRL_IDX, CT_CTRL_IDX ; 24/18 ___ctrl_X___, 25/19 ___ctrl_Y___
ct_mix CT_CTRL_IDX, CT_CTRL_IDX ; 26/1a ___ctrl_Z___, 27/1b ___ctrl_[___
ct_mix CT_CTRL_IDX, CT_CTRL_IDX ; 28/1c ___ctrl_\___, 29/1d ___ctrl_]___
ct_mix CT_CTRL_IDX, CT_CTRL_IDX ; 30/1e ___ctrl_^___, 31/1f ___ctrl_____
ct_mix CT_SPACE_SPACETAB_IDX, CT_NONE_IDX ; 32/20 ___SPACE___, 33/21 _____!_____
ct_mix CT_NONE_IDX, CT_NONE_IDX ; 34/22 _____"_____, 35/23 _____#_____
ct_mix CT_NONE_IDX, CT_NONE_IDX ; 36/24 _____$_____, 37/25 _____%_____
ct_mix CT_NONE_IDX, CT_NONE_IDX ; 38/26 _____&_____, 39/27 _____'_____
ct_mix CT_NONE_IDX, CT_NONE_IDX ; 40/28 _____(_____, 41/29 _____)_____
ct_mix CT_NONE_IDX, CT_NONE_IDX ; 42/2a _____*_____, 43/2b _____+_____
ct_mix CT_NONE_IDX, CT_NONE_IDX ; 44/2c _____,_____, 45/2d _____-_____
ct_mix CT_NONE_IDX, CT_NONE_IDX ; 46/2e _____._____, 47/2f _____/_____
ct_mix CT_DIGIT_XDIGIT_IDX, CT_DIGIT_XDIGIT_IDX ; 48/30 _____0_____, 49/31 _____1_____
ct_mix CT_DIGIT_XDIGIT_IDX, CT_DIGIT_XDIGIT_IDX ; 50/32 _____2_____, 51/33 _____3_____
ct_mix CT_DIGIT_XDIGIT_IDX, CT_DIGIT_XDIGIT_IDX ; 52/34 _____4_____, 53/35 _____5_____
ct_mix CT_DIGIT_XDIGIT_IDX, CT_DIGIT_XDIGIT_IDX ; 54/36 _____6_____, 55/37 _____7_____
ct_mix CT_DIGIT_XDIGIT_IDX, CT_DIGIT_XDIGIT_IDX ; 56/38 _____8_____, 57/39 _____9_____
ct_mix CT_NONE_IDX, CT_NONE_IDX ; 58/3a _____:_____, 59/3b _____;_____
ct_mix CT_NONE_IDX, CT_NONE_IDX ; 60/3c _____<_____, 61/3d _____=_____
ct_mix CT_NONE_IDX, CT_NONE_IDX ; 62/3e _____>_____, 63/3f _____?_____
ct_mix CT_NONE_IDX, CT_UPPER_XDIGIT_IDX ; 64/40 _____@_____, 65/41 _____A_____
ct_mix CT_UPPER_XDIGIT_IDX, CT_UPPER_XDIGIT_IDX ; 66/42 _____B_____, 67/43 _____C_____
ct_mix CT_UPPER_XDIGIT_IDX, CT_UPPER_XDIGIT_IDX ; 68/44 _____D_____, 69/45 _____E_____
ct_mix CT_UPPER_XDIGIT_IDX, CT_UPPER_IDX ; 70/46 _____F_____, 71/47 _____G_____
ct_mix CT_UPPER_IDX, CT_UPPER_IDX ; 72/48 _____H_____, 73/49 _____I_____
ct_mix CT_UPPER_IDX, CT_UPPER_IDX ; 74/4a _____J_____, 75/4b _____K_____
ct_mix CT_UPPER_IDX, CT_UPPER_IDX ; 76/4c _____L_____, 77/4d _____M_____
ct_mix CT_UPPER_IDX, CT_UPPER_IDX ; 78/4e _____N_____, 79/4f _____O_____
ct_mix CT_UPPER_IDX, CT_UPPER_IDX ; 80/50 _____P_____, 81/51 _____Q_____
ct_mix CT_UPPER_IDX, CT_UPPER_IDX ; 82/52 _____R_____, 83/53 _____S_____
ct_mix CT_UPPER_IDX, CT_UPPER_IDX ; 84/54 _____T_____, 85/55 _____U_____
ct_mix CT_UPPER_IDX, CT_UPPER_IDX ; 86/56 _____V_____, 87/57 _____W_____
ct_mix CT_UPPER_IDX, CT_UPPER_IDX ; 88/58 _____X_____, 89/59 _____Y_____
ct_mix CT_UPPER_IDX, CT_NONE_IDX ; 90/5a _____Z_____, 91/5b _____[_____
ct_mix CT_NONE_IDX, CT_NONE_IDX ; 92/5c _____\_____, 93/5d _____]_____
ct_mix CT_NONE_IDX, CT_NONE_IDX ; 94/5e _____^_____, 95/5f _UNDERLINE_
ct_mix CT_NONE_IDX, CT_LOWER_XDIGIT_IDX ; 96/60 ___grave___, 97/61 _____a_____
ct_mix CT_LOWER_XDIGIT_IDX, CT_LOWER_XDIGIT_IDX ; 98/62 _____b_____, 99/63 _____c_____
ct_mix CT_LOWER_XDIGIT_IDX, CT_LOWER_XDIGIT_IDX ; 100/64 _____d_____, 101/65 _____e_____
ct_mix CT_LOWER_XDIGIT_IDX, CT_LOWER_IDX ; 102/66 _____f_____, 103/67 _____g_____
ct_mix CT_LOWER_IDX, CT_LOWER_IDX ; 104/68 _____h_____, 105/69 _____i_____
ct_mix CT_LOWER_IDX, CT_LOWER_IDX ; 106/6a _____j_____, 107/6b _____k_____
ct_mix CT_LOWER_IDX, CT_LOWER_IDX ; 108/6c _____l_____, 109/6d _____m_____
ct_mix CT_LOWER_IDX, CT_LOWER_IDX ; 110/6e _____n_____, 111/6f _____o_____
ct_mix CT_LOWER_IDX, CT_LOWER_IDX ; 112/70 _____p_____, 113/71 _____q_____
ct_mix CT_LOWER_IDX, CT_LOWER_IDX ; 114/72 _____r_____, 115/73 _____s_____
ct_mix CT_LOWER_IDX, CT_LOWER_IDX ; 116/74 _____t_____, 117/75 _____u_____
ct_mix CT_LOWER_IDX, CT_LOWER_IDX ; 118/76 _____v_____, 119/77 _____w_____
ct_mix CT_LOWER_IDX, CT_LOWER_IDX ; 120/78 _____x_____, 121/79 _____y_____
ct_mix CT_LOWER_IDX, CT_NONE_IDX ; 122/7a _____z_____, 123/7b _____{_____
ct_mix CT_NONE_IDX, CT_NONE_IDX ; 124/7c _____|_____, 125/7d _____}_____
ct_mix CT_NONE_IDX, CT_WS_IDX ; 126/7e _____~_____, 127/7f ____DEL____
.repeat 64
ct_mix CT_NONE_IDX, CT_NONE_IDX ; 128-255
.endrepeat

48
asminc/ctypetable.inc Normal file
View File

@ -0,0 +1,48 @@
; ctypetable.inc
;
; This file is part of
; cc65 - a freeware C compiler for 6502 based systems
;
; https://cc65.github.io
;
; See "LICENSE" file for legal information.
;
; Data covering all possible combinations of character flags for target specific definition
;
.include "ctype.inc"
.export __ctype
; Table definition covering all possible ctype combinations
.rodata
__ctype:
ct_none: .byte CT_NONE
ct_lower: .byte CT_LOWER
ct_upper: .byte CT_UPPER
ct_digit_xdigit: .byte CT_DIGIT | CT_XDIGIT
ct_lower_xdigit: .byte CT_LOWER | CT_XDIGIT
ct_upper_xdigit: .byte CT_UPPER | CT_XDIGIT
ct_ctrl: .byte CT_CTRL
ct_ws: .byte CT_OTHER_WS
ct_ctrl_ws: .byte CT_CTRL | CT_OTHER_WS
ct_space_spacetab: .byte CT_SPACE | CT_SPACE_TAB
ct_ctrl_ws_spacetab: .byte CT_CTRL | CT_OTHER_WS | CT_SPACE_TAB
; build indices out of the table above:
CT_NONE_IDX = ct_none - __ctype
CT_LOWER_IDX = ct_lower - __ctype
CT_UPPER_IDX = ct_upper - __ctype
CT_DIGIT_XDIGIT_IDX = ct_digit_xdigit - __ctype
CT_LOWER_XDIGIT_IDX = ct_lower_xdigit - __ctype
CT_UPPER_XDIGIT_IDX = ct_upper_xdigit - __ctype
CT_CTRL_IDX = ct_ctrl - __ctype
CT_WS_IDX = ct_ws - __ctype
CT_CTRL_WS_IDX = ct_ctrl_ws - __ctype
CT_SPACE_SPACETAB_IDX = ct_space_spacetab - __ctype
CT_CTRL_WS_SPACETAB_IDX = ct_ctrl_ws_spacetab - __ctype
.macro ct_mix lower, upper
.byte ((lower) & $0F) | ((upper) << 4)
.endmacro

566
asminc/cx16.inc Normal file
View File

@ -0,0 +1,566 @@
;
; CX16 r38 definitions
;
; ---------------------------------------------------------------------------
; Constants
.enum COLOR
BLACK = $00
WHITE
RED
CYAN
VIOLET
PURPLE = VIOLET
GREEN
BLUE
YELLOW
ORANGE
BROWN
PINK
LIGHTRED = PINK
GRAY1
GRAY2
LIGHTGREEN
LIGHTBLUE
GRAY3
.endenum
; Special characters
.enum CH
COLOR_SWAP = $01
STOP = $03
UNDERLINE
WHITE
BOLD
BELL
BACKSPACE
TAB
LINEFEED
ITALIC
OUTLINE
ENTER
FONT_LOWER
FONT_ISO
F9
CURS_DOWN
REVERSE
HOME
DEL
F10
F11
F12
SHIFT_TAB
RED = $1C
CURS_RIGHT
GREEN
BLUE
LIRA = $5C
ORANGE = $81
RUN = $83
HELP
F1
F3
F5
F7
F2
F4
F6
F8
SHIFT_ENTER
FONT_UPPER
FONT_PET
BLACK
CURS_UP
ATTR_CLEAR
SCRN_CLEAR
INS
BROWN
PINK
LIGHTRED = PINK
GRAY1
GRAY2
LIGHTGREEN
LIGHTBLUE
GRAY3
PURPLE
VIOLET = PURPLE
CURS_LEFT
YELLOW
CYAN
SHIFT_SPACE
LTEE = $AB
LLCORNER = $AD
URCORNER
ULCORNER = $B0
BTEE
TTEE
RTEE
LRCORNER = $BD
HLINE = $C0
CROSS = $DB
VLINE = $DD
PI
.endenum
; ---------------------------------------------------------------------------
; Zero page
; GEOS and graphics pseudo-registers
.struct gREG
.org $02
.union
r0 .word
.struct
r0L .byte
r0H .byte
.endstruct
.endunion
.union
r1 .word
.struct
r1L .byte
r1H .byte
.endstruct
.endunion
.union
r2 .word
.struct
r2L .byte
r2H .byte
.endstruct
.endunion
.union
r3 .word
.struct
r3L .byte
r3H .byte
.endstruct
.endunion
.union
r4 .word
.struct
r4L .byte
r4H .byte
.endstruct
.endunion
.union
r5 .word
.struct
r5L .byte
r5H .byte
.endstruct
.endunion
.union
r6 .word
.struct
r6L .byte
r6H .byte
.endstruct
.endunion
.union
r7 .word
.struct
r7L .byte
r7H .byte
.endstruct
.endunion
.union
r8 .word
.struct
r8L .byte
r8H .byte
.endstruct
.endunion
.union
r9 .word
.struct
r9L .byte
r9H .byte
.endstruct
.endunion
.union
r10 .word
.struct
r10L .byte
r10H .byte
.endstruct
.endunion
.union
r11 .word
.struct
r11L .byte
r11H .byte
.endstruct
.endunion
.union
r12 .word
.struct
r12L .byte
r12H .byte
.endstruct
.endunion
.union
r13 .word
.struct
r13L .byte
r13H .byte
.endstruct
.endunion
.union
r14 .word
.struct
r14L .byte
r14H .byte
.endstruct
.endunion
.union
r15 .word
.struct
r15L .byte
r15H .byte
.endstruct
.endunion
.endstruct
; Kernal
KTEMP2 := $80 ; 2 bytes for temporary storage
IMPARM := $82 ; Pointer for PRIMM function
FNAM := $8C ; Pointer to filename
; BASIC
TXTPTR := $EE ; Pointer into BASIC source code
; Page two
BASIC_BUF := $0200 ; Location of command-line
BASIC_BUF_LEN = 81 ; Maximum length of command-line
SCREEN_MODE := $0261 ; Current screen mode (set by SCREEN_SET_MODE)
SCREEN_PTR := $0262 ; Pointer to current row on text screen (16 bits)
STATUS := $0286 ; Status from previous I/O operation
IN_DEV := $028A ; Current input device number
OUT_DEV := $028B ; Current output device number
FNAM_LEN := $028E ; Length of filename
SECADR := $0290 ; Secondary address
DEVNUM := $0291 ; Device number
CURS_COLOR := $0373 ; Color under the cursor
CHARCOLOR := $0376 ; Cursor's color nybbles (high: background, low: foreground)
RVS := $0377 ; Reverse flag
CURS_FLAG := $037B ; 1 = cursor off
CURS_BLINK := $037C ; Blink counter
CURS_CHAR := $037D ; Character under the cursor
CURS_STATE := $037E ; Cursor blink state
CURS_X := $0380 ; Cursor column
CURS_Y := $0383 ; Cursor row
LLEN := $0386 ; Line length
NLINES := $0387 ; Number of screen lines
; BASIC
VARTAB := $03E2 ; Pointer to start of BASIC variables
MEMSIZE := $03EA ; Pointer to highest BASIC RAM location (+1)
; ---------------------------------------------------------------------------
; Vector and other locations
IRQVec := $0314
BRKVec := $0316
NMIVec := $0318
; ---------------------------------------------------------------------------
; I/O locations
; Video Enhanced Retro Adapter
; Has audio and SPI.
.scope VERA
; External registers
.struct
.org $9F20
ADDR .faraddr ; Address for data port access
DATA0 .byte ; First data port
DATA1 .byte ; Second data port
CTRL .byte ; Control register
IRQ_EN .byte ; Interrupt enable bits
IRQ_FLAGS .byte ; Interrupt flags
IRQ_RASTER .byte ; Line where IRQ will occur
.endstruct
.enum ; Address automatic increment amounts
DEC0 = (($00 << 1) | $01) << 3
DEC1 = (($01 << 1) | $01) << 3
DEC2 = (($02 << 1) | $01) << 3
DEC4 = (($03 << 1) | $01) << 3
DEC8 = (($04 << 1) | $01) << 3
DEC16 = (($05 << 1) | $01) << 3
DEC32 = (($06 << 1) | $01) << 3
DEC64 = (($07 << 1) | $01) << 3
DEC128 = (($08 << 1) | $01) << 3
DEC256 = (($09 << 1) | $01) << 3
DEC512 = (($0A << 1) | $01) << 3
DEC40 = (($0B << 1) | $01) << 3
DEC80 = (($0C << 1) | $01) << 3
DEC160 = (($0D << 1) | $01) << 3
DEC320 = (($0E << 1) | $01) << 3
DEC640 = (($0F << 1) | $01) << 3
INC0 = (($00 << 1) | $00) << 3
INC1 = (($01 << 1) | $00) << 3
INC2 = (($02 << 1) | $00) << 3
INC4 = (($03 << 1) | $00) << 3
INC8 = (($04 << 1) | $00) << 3
INC16 = (($05 << 1) | $00) << 3
INC32 = (($06 << 1) | $00) << 3
INC64 = (($07 << 1) | $00) << 3
INC128 = (($08 << 1) | $00) << 3
INC256 = (($09 << 1) | $00) << 3
INC512 = (($0A << 1) | $00) << 3
INC40 = (($0B << 1) | $00) << 3
INC80 = (($0C << 1) | $00) << 3
INC160 = (($0D << 1) | $00) << 3
INC320 = (($0E << 1) | $00) << 3
INC640 = (($0F << 1) | $00) << 3
.endenum
.enum ; Interrupt request flags
VERT_SYNC = %00000001
RASTER_IRQ = %00000010
SPR_COLLIDED = %00000100
AUDIO_LOW = %00001000
.endenum
.scope DISP ; Display controller
SELECT1 = %00000010
.union
.org $9F29
.struct
; These four registers are visible when the DCSEL flag = %0
VIDEO .byte
HSCALE .byte
VSCALE .byte
FRAME .byte
.endstruct
.struct
; These four registers are visible when the DCSEL flag = %1
HSTART .byte
HSTOP .byte
VSTART .byte
VSTOP .byte
.endstruct
.endunion
.enum MODE ; Output mode
DISABLE = $00
VGA
NTSC
RGB ; Interlaced, composite sync
.endenum
.enum DISABLE
COLOR = %00000100 ; NTSC monochrome
.endenum
.enum ENABLE
LAYER0 = %00010000
LAYER1 = %00100000
SPRITES = %01000000
.endenum
.endscope
.struct L0 ; Display layer 0
.org $9F2D
CONFIG .byte
MAP_BASE .byte
TILE_BASE .byte
HSCROLL .word
VSCROLL .word
.endstruct
.struct L1 ; Display layer 1
.org $9F34
CONFIG .byte
MAP_BASE .byte
TILE_BASE .byte
HSCROLL .word
VSCROLL .word
.endstruct
.enum ; Layer display modes
TILE1BPP = %00000000 | $00
TILE2BPP
TILE4BPP
TILE8BPP
T256C = %00001000
BITMAP1BPP = %00000100 | $00
BITMAP2BPP
BITMAP4BPP
BITMAP8BPP
.endenum
.enum MAP ; Map geometry
WIDTH32 = $00 << 4
WIDTH64 = $01 << 4
WIDTH128 = $02 << 4
WIDTH256 = $03 << 4
HEIGHT32 = $00 << 6
HEIGHT64 = $01 << 6
HEIGHT128 = $02 << 6
HEIGHT256 = $03 << 6
.endenum
.enum TILE ; Tile geometry
WIDTH8 = $00
WIDTH16 = $01
WIDTH320 = WIDTH8
WIDTH640 = WIDTH16
HEIGHT8 = $00 << 1
HEIGHT16 = $01 << 1
.endenum
.scope PCM ; Pulse-Code Modulator
.struct
.org $9F3B
CTRL .byte
RATE .byte
DATA .byte
.endstruct
.enum
STEREO = %00010000
BITS16 = %00100000
RESET = %10000000
.endenum
.endscope
.scope SPI
.struct
.org $9F3E
DATA .byte
CTRL .byte
.endstruct
.enum
SELECT = %00000001
SLOW = %00000010
.endenum
.endscope
; Internal RAM and registers
.struct
.org $000000
VRAM .res $020000 ; 128 Kibibytes
.endstruct
.scope PSG ; Programmable Sound Generator
.struct
PITCH .word
VOL .byte ; Right, left sides; volume
WAVEFORM .byte ; Wave shape, pulse width
.endstruct
LEFT = %01 << 6
RIGHT = %10 << 6
.enum
PULSE = $00 << 6
SAWTOOTH = $01 << 6
TRIANGLE = $02 << 6
NOISE = $03 << 6
.endenum
.struct
.org $01F9C0
VOICES .res $10 * 4
.endstruct
.endscope
.struct
.org $01FA00
PALETTE .word $0100
.endstruct
.scope SPRITE
.struct ; Sprite attributes
ADDR .addr ; Address and color mode
XX .word ; Co-ordinates
YY .word
Z_FLIP .byte ; Collision mask, Z-depth, flip bits
SIZE_PAL .byte
.endstruct
.enum FLIP
NONE = %00000000
HORIZ
VERT
BOTH
.endenum
.enum DEPTH
DISABLE = $00 << 2
CANVAS = $01 << 2
LAYER0 = $02 << 2
LAYER1 = $03 << 2
.endenum
.enum ; Sprite geometry
WIDTH8 = $00 << 4
WIDTH16 = $01 << 4
WIDTH32 = $02 << 4
WIDTH64 = $03 << 4
HEIGHT8 = $00 << 6
HEIGHT16 = $01 << 6
HEIGHT32 = $02 << 6
HEIGHT64 = $03 << 6
COLORS16 = $00 << 7
COLORS256 = $01 << 7
.endenum
.endscope
.struct
.org $01FC00
SPRITES .res 128 * 8
.endstruct
.endscope
; 65C22
.struct VIA1 ; Versatile Interface Adapter
.org $9F60
PRB .byte ; ROM bank, IEC (Port Register B)
PRA .byte ; RAM bank (Port Register A)
DDRB .byte ; (Data Direction Register B)
DDRA .byte ; (Data Direction Register A)
T1 .word ; (Timer 1)
T1L .word ; (Timer 1 Latch)
T2 .word ; (Timer 2)
SR .byte ; (Shift Register)
ACR .byte ; (Auxiliary Control Register)
PCR .byte ; (Peripheral Control Register)
IFR .byte ; (Interrupt Flags Register)
IER .byte ; (Interrupt Enable Register)
PRA2 .byte ; RAM bank (Port Register A without handshaking)
.endstruct
; 65C22
.struct VIA2
.org $9F70
PRB .byte ; Mouse communication ?
PRA .byte ; NES controller communication
DDRB .byte
DDRA .byte
T1 .word
T1L .word
T2 .word
SR .byte
ACR .byte
PCR .byte
IFR .byte
IER .byte
PRA2 .byte
.endstruct
; Real-Time Clock
; X16 Emulator device
; This device doesn't exist on the real machine.
.struct EMULATOR
.org $9FB0
DEBUG .byte ; Boolean: debugging enabled
VERALOG .byte ; Boolean: log VERA activity
KEYBOARDLOG .byte ; Boolean: log keyboard data
ECHO .byte ; Type of echo that's enabled
SAVEXIT .byte ; Boolean: save machine state on exit
GIFREC .byte ; Method of recording GIF movie
.res 2
CYCLECOUNT .dword ; Running count of CPU cycles (Read-Only)
.res 1
KEYMAP .byte ; Current keyboard layout number (Read-Only)
DETECT .byte 2 ; If is "16" string, then running on emulator (RO)
.endstruct
; ---------------------------------------------------------------------------
; Banked RAM and ROM
KEY_COUNT := $A00A ; (bank 0) Number of keys in input buffer
TIMER := $A037 ; (bank 0) 60 Hz. timer (3 bytes, big-endian)
.struct BANK
.org $A000
RAM .res $2000 ; 8 Kibibyte window into 512 Kibibytes or 2048 Kibibytes
ROM .res $4000 ; 16 Kibibyte window into 128 Kibibytes
.endstruct

View File

@ -7,7 +7,7 @@
;/* */
;/* */
;/* (C) 2002-2003 Ullrich von Bassewitz */
;/* Römerstrasse 52 */
;/* Roemerstrasse 52 */
;/* D-70794 Filderstadt */
;/* EMail: uz@cc65.org */
;/* */

View File

@ -28,6 +28,7 @@
ESPIPE ; Illegal seek
ERANGE ; Range error
EBADF ; Bad file number
ENOEXEC ; Exec format error
EUNKNOWN ; Unknown OS specific error - must be last!
EMAX = EUNKNOWN ; Highest error code

View File

@ -7,7 +7,7 @@
;/* */
;/* */
;/* (C) 2002-2006, Ullrich von Bassewitz */
;/* Römerstraße 52 */
;/* Roemerstrasse 52 */
;/* D-70794 Filderstadt */
;/* EMail: uz@cc65.org */
;/* */
@ -43,20 +43,18 @@
ID .byte 3 ; $6A, $6F, $79 ("joy")
VERSION .byte 1 ; Interface version
LIBREF .addr ; Library reference
MASKS .byte 8 ; Joystick state mask array
JUMPTAB .struct
INSTALL .addr ; INSTALL routine
UNINSTALL .addr ; UNINSTALL routine
COUNT .addr ; COUNT routine
READ .addr ; READ routine
IRQ .addr ; IRQ routine
.endstruct
.endstruct
;------------------------------------------------------------------------------
; The JOY API version, stored in JOY_HDR::VERSION
JOY_API_VERSION = $03
JOY_API_VERSION = $05
;------------------------------------------------------------------------------
; Variables

View File

@ -4,7 +4,7 @@
;
; Reference:
; Bastian Schick's Lynx Documentation
; http://www.geocities.com/SiliconValley/Byte/4242/lynx/
; http://www.geocities.ws/SiliconValley/Byte/4242/lynx/
;
; ***

View File

@ -103,7 +103,7 @@
;------------------------------------------------------------------------------
; The mouse API version, stored in MOUSE_HDR::VERSION
MOUSE_API_VERSION = $05
MOUSE_API_VERSION = $06
;------------------------------------------------------------------------------
; Bitmapped mouse driver flags, stored in MOUSE_HDR::FLAGS.

File diff suppressed because it is too large Load Diff

View File

@ -1,20 +1,20 @@
;
; PCE definitions. By Groepaz/Hitmem.
; PCE definitions. By Groepaz/Hitmen.
;
; FIXME: screen dimensions my change according to selected video mode
; FIXME: Screen dimensions can change according to the selected video mode.
screenrows = (224/8)
charsperline = 61
CH_HLINE = 1
CH_VLINE = 2
; huc6270 - Video Display Controller (VDC)
; HuC6270 -- Video Display Controller (VDC)
VDC_MAWR = 0 ; Memory Address Write Register
VDC_MARR = 1 ; Memory Address Read Register
VDC_VWR = 2 ; VRAM Write Register (write only)
VDC_VRR = 2 ; VRAM Read Register (read only)
VDC_VWR = 2 ; VRAM Write Register
VDC_VRR = 2 ; VRAM Read Register
VDC_UNK03 = 3 ; (unknown)
VDC_UNK04 = 4 ; (unknown)
VDC_CR = 5 ; Control Register
@ -24,8 +24,8 @@ VDC_BYR = 8 ; Background Y-Scroll Register
VDC_MWR = 9 ; Memory-access Width Register
VDC_HSR = 10 ; Horizontal Sync Register
VDC_HDR = 11 ; Horizontal Display Register
VDC_VPR = 12 ; Vertical synchronous register
VDC_VDW = 13 ; Vertical display register
VDC_VSR = 12 ; Vertical sync Register
VDC_VDR = 13 ; Vertical Display register
VDC_VCR = 14 ; Vertical display END position register
VDC_DCR = 15 ; (DMA) Control Register
VDC_SOUR = 16 ; (DMA) Source Register
@ -34,58 +34,59 @@ VDC_LENR = 18 ; (DMA) Length Register
VDC_SATB = 19 ; Sprite Attribute Table
; VDC port
; Note: absolute addressing mode must be used when writing to this port
; Note: The zero-page addressing mode is redirected to page $20.
; We avoid it by using mirror locations that are outside of the zero page.
VDC_CTRL = $0000
VDC_DATA_LO = $0002
VDC_DATA_HI = $0003
VDC_CTRL := $0200
VDC_DATA_LO := $0202
VDC_DATA_HI := $0203
; huc6260 - Video Color Encoder (vce)
; HuC6260 -- Video Color Encoder (VCE)
; The DAC has a palette of 512 colours.
; bitmap of the palette data is this: 0000000gggrrrbbb.
; You can read and write the DAC-registers.
; The bitmap of that data is 0000000gggrrrbbb (Green, Red, Blue).
; You can read and write the DAC registers.
VCE = $0400 ; base
VCE := $0400 ; base
VCE_CTRL = $0400 ; write$00 to reset
VCE_ADDR_LO = $0402 ; LSB of byte offset into palette
VCE_ADDR_HI = $0403 ; MSB of byte offset into palette
VCE_DATA_LO = $0404 ; LSB of 16-bit palette data
VCE_DATA_HI = $0405 ; MSB of 16-bit palette data
VCE_CTRL := $0400 ; write $00 to reset
VCE_ADDR_LO := $0402 ; LSB of byte offset into palette
VCE_ADDR_HI := $0403 ; MSB of byte offset into palette
VCE_DATA_LO := $0404 ; LSB of 16-bit palette data
VCE_DATA_HI := $0405 ; MSB of 16-bit palette data
; programmable sound generator (PSG)
; Programmable Sound Generator (PSG)
PSG = $0800 ; base
PSG := $0800 ; base
PSG_CHAN_SELECT = $0800
PSG_GLOBAL_PAN = $0801
PSG_FREQ_LO = $0802
PSG_FREQ_HI = $0803
PSG_CHAN_CTRL = $0804
PSG_CHAN_PAN = $0805
PSG_CHAN_DATA = $0806
PSG_NOISE = $0807
PSG_LFO_FREQ = $0808
PSG_LFO_CTRL = $0809
PSG_CHAN_SELECT := $0800
PSG_GLOBAL_PAN := $0801
PSG_FREQ_LO := $0802
PSG_FREQ_HI := $0803
PSG_CHAN_CTRL := $0804
PSG_CHAN_PAN := $0805
PSG_CHAN_DATA := $0806
PSG_NOISE := $0807
PSG_LFO_FREQ := $0808
PSG_LFO_CTRL := $0809
; timer
; Timer
TIMER = $0c00 ; base
TIMER := $0C00 ; base
TIMER_COUNT = $0c00
TIMER_CTRL = $0c01
TIMER_COUNT := $0C00
TIMER_CTRL := $0C01
JOY_CTRL = $1000
JOY_CTRL := $1000
IRQ_MASK = $1402
IRQ_STATUS = $1403
IRQ_MASK := $1402
IRQ_STATUS := $1403
CDR_MEM_DISABLE = $1803
CDR_MEM_ENABLE = $1807
CDR_MEM_DISABLE := $1803
CDR_MEM_ENABLE := $1807
; Write VDC register
.macro VREG arg1,arg2
; Write to a VDC register.
.macro VREG arg1, arg2
st0 #arg1
st1 #<(arg2)
st2 #>(arg2)

View File

@ -26,11 +26,22 @@ SCR_LINELEN := $D5 ; Screen line length
CURS_Y := $D8 ; Cursor row
FNADR := $DA ; Pointer to file name
; 80-Column CBMs
KBDREPEAT80 := $E4
KBDRPTRATE80 := $E5
KBDRPTDELAY80 := $E6
BASIC_BUF := $200 ; Location of command-line
BASIC_BUF_LEN = 81 ; Maximum length of command-line
KEY_BUF := $26F ; Keyboard buffer
; 40-Column PETs/CBMs
KBDRPTDELAY40 := $3E9
KBDRPTRATE40 := $3EA
KBDREPEAT40 := $3EE
KBDREPEAT40B := $3F8
;----------------------------------------------------------------------------
; PET ROM type detection
@ -50,10 +61,22 @@ NMIVec := $0094
; ---------------------------------------------------------------------------
; I/O: 6522 VIA2
VIA := $E840
VIA_PRB := $E840
VIA_PRA := $E841
VIA_DDRB := $E842
VIA_DDRA := $E843
VIA := $E840 ; VIA base address
VIA_PB := VIA+$0 ; Port register B
VIA_PA1 := VIA+$1 ; Port register A
VIA_PRB := VIA+$0 ; *** Deprecated ***
VIA_PRA := VIA+$1 ; *** Deprecated ***
VIA_DDRB := VIA+$2 ; Data direction register B
VIA_DDRA := VIA+$3 ; Data direction register A
VIA_T1CL := VIA+$4 ; Timer 1, low byte
VIA_T1CH := VIA+$5 ; Timer 1, high byte
VIA_T1LL := VIA+$6 ; Timer 1 latch, low byte
VIA_T1LH := VIA+$7 ; Timer 1 latch, high byte
VIA_T2CL := VIA+$8 ; Timer 2, low byte
VIA_T2CH := VIA+$9 ; Timer 2, high byte
VIA_SR := VIA+$A ; Shift register
VIA_CR := VIA+$B ; Auxiliary control register
VIA_PCR := VIA+$C ; Peripheral control register
VIA_IFR := VIA+$D ; Interrupt flag register
VIA_IER := VIA+$E ; Interrupt enable register
VIA_PA2 := VIA+$F ; Port register A w/o handshake

View File

@ -10,6 +10,7 @@ TMPPTR := $22 ; Temporary ptr used by BASIC
VARTAB := $2D ; Pointer to start of BASIC variables
MEMSIZE := $37 ; Pointer to highest BASIC RAM location (+1)
TXTPTR := $3B ; Pointer into BASIC source code
STATUS := $90 ; Kernal I/O completion status
TIME := $A3 ; 60HZ clock
FNAM_LEN := $AB ; Length of filename
LFN := $AC ; Logical file number
@ -33,12 +34,9 @@ FKEY_COUNT := $55D ; Characters for function key
FKEY_SPACE := $55F ; Function key definitions
FKEY_ORIG := $F3D2 ; Original definitions
; ---------------------------------------------------------------------------
; Kernal routines
; Direct entries
CLRSCR := $D88B
KBDREAD := $D8C1
KBDREPEAT := $540
KBDREPEATRATE := $541
KBDREPEATDELAY := $542
; ---------------------------------------------------------------------------
; Vector and other locations
@ -69,6 +67,7 @@ TED_CURSLO := $FF0D
TED_V1FRQLO := $FF0E
TED_V2FRQLO := $FF0F
TED_V2FRQHI := $FF10
TED_CLK := $FF13
TED_BGCOLOR := $FF15
TED_COLOR1 := $FF16
TED_COLOR2 := $FF17
@ -85,5 +84,3 @@ TED_RAMSEL := $FF3F
ENABLE_ROM := TED_ROMSEL
ENABLE_RAM := TED_RAMSEL

View File

@ -7,7 +7,7 @@
;* *
;* *
;*(C) 2003-2006, Ullrich von Bassewitz *
;* Römerstrasse 52 *
;* Roemerstrasse 52 *
;* D-70794 Filderstadt *
;*EMail: uz@cc65.org *
;* *
@ -41,15 +41,15 @@
VERSION .byte 1 ; Interface version
LIBREF .addr ; Library reference
JUMPTAB .struct
INSTALL .addr ; INSTALL routine
UNINSTALL .addr ; UNINSTALL routine
OPEN .addr ; OPEN routine
CLOSE .addr ; CLOSE routine
GET .addr ; GET routine
PUT .addr ; PUT routine
STATUS .addr ; STATUS routine
IOCTL .addr ; IOCTL routine
IRQ .addr ; IRQ routine
SER_INSTALL .addr ; SER_INSTALL routine
SER_UNINSTALL .addr ; SER_UNINSTALL routine
SER_OPEN .addr ; SER_OPEN routine
SER_CLOSE .addr ; SER_CLOSE routine
SER_GET .addr ; SER_GET routine
SER_PUT .addr ; SER_PUT routine
SER_STATUS .addr ; SER_STATUS routine
SER_IOCTL .addr ; SER_IOCTL routine
SER_IRQ .addr ; SER_IRQ routine
.endstruct
.endstruct
@ -160,4 +160,3 @@ SER_STATUS_DSR = $40 ; NOT data set ready
.global _ser_ioctl
.global _ser_clear_ptr

View File

@ -1,245 +1,267 @@
; smc.mac
; ca65 Macro-Pack for Self Modifying Code (SMC)
;
; (c) Christian Krüger, latest change: 09-Nov-2011
;
; This software is provided 'as-is', without any expressed or implied
; warranty. In no event will the authors be held liable for any damages
; arising from the use of this software.
;
; Permission is granted to anyone to use this software for any purpose,
; including commercial applications, and to alter it and redistribute it
; freely, subject to the following restrictions:
;
; 1. The origin of this software must not be misrepresented; you must not
; claim that you wrote the original software. If you use this software
; in a product, an acknowledgment in the product documentation would be
; appreciated but is not required.
; 2. Altered source versions must be plainly marked as such, and must not
; be misrepresented as being the original software.
; 3. This notice may not be removed or altered from any source
; distribution.
;
.define _SMCDesignator .mid(0, .tcount(label) - 1, label) .ident(.concat(.string(.right(1, label)), "_SMC"))
.define _SMCAlias .mid(0, .tcount(alias) - 1, alias) .ident(.concat(.string(.right(1, alias)), "_SMC"))
.define SMC_AbsAdr $FADE
.define SMC_ZpAdr $00
.define SMC_Opcode nop
.define SMC_Value $42
.macro SMC_OperateOnValue opcode, label
opcode _SMCDesignator+1
.endmacro
.macro SMC_OperateOnLowByte opcode, label
SMC_OperateOnValue opcode, label
.endmacro
.macro SMC_OperateOnHighByte opcode, label
opcode _SMCDesignator + 2
.endmacro
.macro SMC_Import alias
.import _SMCAlias
.endmacro
.macro SMC_Export alias, label
.export _SMCAlias := _SMCDesignator
.endmacro
.macro SMC label, statement
_SMCDesignator: statement
.endmacro
.macro SMC_TransferOpcode label, opcode, register
.if .paramcount = 2 .or .match ({register}, a)
lda #opcode
sta _SMCDesignator
.elseif .match ({register}, x)
ldx #opcode
stx _SMCDesignator
.elseif .match ({register}, y)
ldy #opcode
sty _SMCDesignator
.endif
.endmacro
.macro SMC_LoadOpcode label, register
.if .paramcount = 1 .or .match ({register}, a)
lda _SMCDesignator
.elseif .match ({register}, x)
ldx _SMCDesignator
.elseif .match ({register}, y)
ldy _SMCDesignator
.endif
.endmacro
.macro SMC_StoreOpcode label, register
.if .paramcount = 1 .or .match ({register}, a)
sta _SMCDesignator
.elseif .match ({register}, x)
stx _SMCDesignator
.elseif .match ({register}, y)
sty _SMCDesignator
.endif
.endmacro
.macro SMC_ChangeBranch label, destination, register
.if .paramcount = 2 .or .match ({register}, a)
lda #(destination - _SMCDesignator -2)
sta _SMCDesignator+1
.elseif .match ({register}, x)
ldx #(destination - _SMCDesignator - 2)
stx _SMCDesignator+1
.elseif .match ({register}, y)
ldy #(destination - _SMCDesignator - 2)
sty _SMCDesignator+1
.endif
.endmacro
.macro SMC_TransferValue label, value, register
.if .paramcount = 2 .or .match ({register}, a)
lda value
sta _SMCDesignator+1
.elseif .match ({register}, x)
ldx value
stx _SMCDesignator+1
.elseif .match ({register}, y)
ldy value
sty _SMCDesignator+1
.endif
.endmacro
.macro SMC_LoadValue label, register
.if .paramcount = 1 .or .match ({register}, a)
lda _SMCDesignator+1
.elseif .match ({register}, x)
ldx _SMCDesignator+1
.elseif .match ({register}, y)
ldy _SMCDesignator+1
.endif
.endmacro
.macro SMC_StoreValue label, register
.if .paramcount = 1 .or .match ({register}, a)
sta _SMCDesignator+1
.elseif .match ({register}, x)
stx _SMCDesignator+1
.elseif .match ({register}, y)
sty _SMCDesignator+1
.endif
.endmacro
.macro SMC_TransferLowByte label, value, register
SMC_TransferValue label, value, register
.endmacro
.macro SMC_LoadLowByte label, register
SMC_LoadValue label, register
.endmacro
.macro SMC_StoreLowByte label, register
SMC_StoreValue label, register
.endmacro
.macro SMC_TransferHighByte label, value, register
.if .paramcount = 2 .or .match ({register}, a)
lda value
sta _SMCDesignator+2
.elseif .match ({register}, x)
ldx value
stx _SMCDesignator+2
.elseif .match ({register}, y)
ldy value
sty _SMCDesignator+2
.endif
.endmacro
.macro SMC_LoadHighByte label, register
.if .paramcount = 1 .or .match ({register}, a)
lda _SMCDesignator+2
.elseif .match ({register}, x)
ldx _SMCDesignator+2
.elseif .match ({register}, y)
ldy _SMCDesignator+2
.endif
.endmacro
.macro SMC_StoreHighByte label, register
.if .paramcount = 1 .or .match ({register}, a)
sta _SMCDesignator+2
.elseif .match ({register}, x)
stx _SMCDesignator+2
.elseif .match ({register}, y)
sty _SMCDesignator+2
.endif
.endmacro
.macro SMC_TransferAddressSingle label, address, register
.if .paramcount = 2 .or .match ((register), a)
.if (.match (.left (1, {address}), #))
; immediate mode
lda #<(.right (.tcount ({address})-1, {address}))
sta _SMCDesignator+1
lda #>(.right (.tcount ({address})-1, {address}))
sta _SMCDesignator+2
.else
; assume absolute or zero page
lda address
sta _SMCDesignator+1
lda 1+(address)
sta _SMCDesignator+2
.endif
.elseif .match ((register), x)
.if (.match (.left (1, {address}), #))
; immediate mode
ldx #<(.right (.tcount ({address})-1, {address}))
stx _SMCDesignator+1
ldx #>(.right (.tcount ({address})-1, {address}))
stx _SMCDesignator+2
.else
; assume absolute or zero page
ldx address
stx _SMCDesignator+1
ldx 1+(address)
stx _SMCDesignator+2
.endif
.elseif .match ((register), y)
.if (.match (.left (1, {address}), #))
; immediate mode
ldy #<(.right (.tcount ({address})-1, {address}))
sty _SMCDesignator+1
ldy #>(.right (.tcount ({address})-1, {address}))
sty _SMCDesignator+2
.else
; assume absolute or zero page
ldy address
sty _SMCDesignator+1
ldy 1+(address)
sty _SMCDesignator+2
.endif
.endif
.endmacro
.macro SMC_TransferAddress label, address
.if (.match (.left (1, {address}), #))
; immediate mode
lda #<(.right (.tcount ({address})-1, {address}))
sta _SMCDesignator+1
ldx #>(.right (.tcount ({address})-1, {address}))
stx _SMCDesignator+2
.else
; assume absolute or zero page
lda {address}
sta _SMCDesignator+1
ldx 1+{address}
stx _SMCDesignator)+2
.endif
.endmacro
.macro SMC_StoreAddress label
sta _SMCDesignator+1
stx _SMCDesignator+2
.endmacro
; smc.mac
; ca65 Macro-Pack for Self Modifying Code (SMC)
;
; (c) Christian Krüger, latest change: 17-Jul-2016
;
; This software is provided 'as-is', without any expressed or implied
; warranty. In no event will the authors be held liable for any damages
; arising from the use of this software.
;
; Permission is granted to anyone to use this software for any purpose,
; including commercial applications, and to alter it and redistribute it
; freely, subject to the following restrictions:
;
; 1. The origin of this software must not be misrepresented; you must not
; claim that you wrote the original software. If you use this software
; in a product, an acknowledgment in the product documentation would be
; appreciated but is not required.
; 2. Altered source versions must be plainly marked as such, and must not
; be misrepresented as being the original software.
; 3. This notice may not be removed or altered from any source
; distribution.
;
.define _SMCDesignator .mid(0, .tcount(label) - 1, label) .ident(.concat(.string(.right(1, label)), "_SMC"))
.define _SMCAlias .mid(0, .tcount(alias) - 1, alias) .ident(.concat(.string(.right(1, alias)), "_SMC"))
.define SMC_AbsAdr $FADE
.define SMC_ZpAdr $00
.define SMC_Opcode nop
.define SMC_Value $42
.macro SMC_OperateOnValue opcode, label
opcode _SMCDesignator+1
.endmacro
.macro SMC_OperateOnLowByte opcode, label
SMC_OperateOnValue opcode, label
.endmacro
.macro SMC_OperateOnHighByte opcode, label
opcode _SMCDesignator + 2
.endmacro
.macro SMC_Import alias
.import _SMCAlias
.endmacro
.macro SMC_Export alias, label
.export _SMCAlias := _SMCDesignator
.endmacro
.macro SMC label, statement
_SMCDesignator: statement
.endmacro
.macro SMC_TransferOpcode label, opcode, register
.if .paramcount = 2 .or .match ({register}, a) .or .match ({register}, )
lda #opcode
sta _SMCDesignator
.elseif .match ({register}, x)
ldx #opcode
stx _SMCDesignator
.elseif .match ({register}, y)
ldy #opcode
sty _SMCDesignator
.else
.error "Invalid usage of macro 'SMC_TransferOpcode'"
.endif
.endmacro
.macro SMC_LoadOpcode label, register
.if .paramcount = 1 .or .match ({register}, a) .or .match ({register}, )
lda _SMCDesignator
.elseif .match ({register}, x)
ldx _SMCDesignator
.elseif .match ({register}, y)
ldy _SMCDesignator
.else
.error "Invalid usage of macro 'SMC_LoadOpcode'"
.endif
.endmacro
.macro SMC_StoreOpcode label, register
.if .paramcount = 1 .or .match ({register}, a) .or .match ({register}, )
sta _SMCDesignator
.elseif .match ({register}, x)
stx _SMCDesignator
.elseif .match ({register}, y)
sty _SMCDesignator
.else
.error "Invalid usage of macro 'SMC_StoreOpcode'"
.endif
.endmacro
.macro SMC_ChangeBranch label, destination, register
.if .paramcount = 2 .or .match ({register}, a) .or .match ({register}, )
lda #(<(destination - _SMCDesignator -2))
sta _SMCDesignator+1
.elseif .match ({register}, x)
ldx #(<(destination - _SMCDesignator - 2))
stx _SMCDesignator+1
.elseif .match ({register}, y)
ldy #(<(destination - _SMCDesignator - 2))
sty _SMCDesignator+1
.else
.error "Invalid usage of macro 'SMC_ChangeBranch'"
.endif
.endmacro
.macro SMC_TransferValue label, value, register
.if .paramcount = 2 .or .match ({register}, a) .or .match ({register}, )
lda value
sta _SMCDesignator+1
.elseif .match ({register}, x)
ldx value
stx _SMCDesignator+1
.elseif .match ({register}, y)
ldy value
sty _SMCDesignator+1
.else
.error "Invalid usage of macro 'SMC_TransferValue'"
.endif
.endmacro
.macro SMC_LoadValue label, register
.if .paramcount = 1 .or .match ({register}, a) .or .match ({register}, )
lda _SMCDesignator+1
.elseif .match ({register}, x)
ldx _SMCDesignator+1
.elseif .match ({register}, y)
ldy _SMCDesignator+1
.else
.error "Invalid usage of macro 'SMC_LoadValue'"
.endif
.endmacro
.macro SMC_StoreValue label, register
.if .paramcount = 1 .or .match ({register}, a) .or .match ({register}, )
sta _SMCDesignator+1
.elseif .match ({register}, x)
stx _SMCDesignator+1
.elseif .match ({register}, y)
sty _SMCDesignator+1
.else
.error "Invalid usage of macro 'SMC_StoreValue'"
.endif
.endmacro
.macro SMC_TransferLowByte label, value, register
SMC_TransferValue label, value, register
.endmacro
.macro SMC_LoadLowByte label, register
SMC_LoadValue label, register
.endmacro
.macro SMC_StoreLowByte label, register
SMC_StoreValue label, register
.endmacro
.macro SMC_TransferHighByte label, value, register
.if .paramcount = 2 .or .match ({register}, a) .or .match ({register}, )
lda value
sta _SMCDesignator+2
.elseif .match ({register}, x)
ldx value
stx _SMCDesignator+2
.elseif .match ({register}, y)
ldy value
sty _SMCDesignator+2
.else
.error "Invalid usage of macro 'SMC_TransferHighByte'"
.endif
.endmacro
.macro SMC_LoadHighByte label, register
.if .paramcount = 1 .or .match ({register}, a) .or .match ({register}, )
lda _SMCDesignator+2
.elseif .match ({register}, x)
ldx _SMCDesignator+2
.elseif .match ({register}, y)
ldy _SMCDesignator+2
.else
.error "Invalid usage of macro 'SMC_LoadHighByte'"
.endif
.endmacro
.macro SMC_StoreHighByte label, register
.if .paramcount = 1 .or .match ({register}, a) .or .match ({register}, )
sta _SMCDesignator+2
.elseif .match ({register}, x)
stx _SMCDesignator+2
.elseif .match ({register}, y)
sty _SMCDesignator+2
.else
.error "Invalid usage of macro 'SMC_StoreHighByte'"
.endif
.endmacro
.macro SMC_TransferAddressSingle label, address, register
.if .paramcount = 2 .or .match ((register), a) .or .match ({register}, )
.if (.match (.left (1, {address}), #))
; immediate mode
lda #<(.right (.tcount ({address})-1, {address}))
sta _SMCDesignator+1
lda #>(.right (.tcount ({address})-1, {address}))
sta _SMCDesignator+2
.else
; assume absolute or zero page
lda address
sta _SMCDesignator+1
lda 1+(address)
sta _SMCDesignator+2
.endif
.elseif .match ((register), x)
.if (.match (.left (1, {address}), #))
; immediate mode
ldx #<(.right (.tcount ({address})-1, {address}))
stx _SMCDesignator+1
ldx #>(.right (.tcount ({address})-1, {address}))
stx _SMCDesignator+2
.else
; assume absolute or zero page
ldx address
stx _SMCDesignator+1
ldx 1+(address)
stx _SMCDesignator+2
.endif
.elseif .match ((register), y)
.if (.match (.left (1, {address}), #))
; immediate mode
ldy #<(.right (.tcount ({address})-1, {address}))
sty _SMCDesignator+1
ldy #>(.right (.tcount ({address})-1, {address}))
sty _SMCDesignator+2
.else
; assume absolute or zero page
ldy address
sty _SMCDesignator+1
ldy 1+(address)
sty _SMCDesignator+2
.endif
.else
.error "Invalid usage of macro 'SMC_TransferAddressSingle'"
.endif
.endmacro
.macro SMC_TransferAddress label, address
.if (.match (.left (1, {address}), #))
; immediate mode
lda #<(.right (.tcount ({address})-1, {address}))
sta _SMCDesignator+1
ldx #>(.right (.tcount ({address})-1, {address}))
stx _SMCDesignator+2
.else
; assume absolute or zero page
lda {address}
sta _SMCDesignator+1
ldx 1+{address}
stx _SMCDesignator)+2
.endif
.endmacro
.macro SMC_StoreAddress label
sta _SMCDesignator+1
stx _SMCDesignator+2
.endmacro

View File

@ -7,7 +7,7 @@
;* */
;* */
;* (C) 2003-2005, Ullrich von Bassewitz */
;* Römerstrasse 52 */
;* Roemerstrasse 52 */
;* D-70794 Filderstadt */
;* EMail: uz@cc65.org */
;* */
@ -44,9 +44,13 @@ EOF = -1
.if .defined(__APPLE2__)
FILENAME_MAX = 64+1
.elseif .defined(__ATARI__)
FILENAME_MAX = 12+1
FILENAME_MAX = 63+1
.elseif .defined(__CBM__)
FILENAME_MAX = 255
.elseif .defined(__LUNIX__)
FILENAME_MAX = 80+1
.elseif .defined(__TELESTRAT__)
FILENAME_MAX = 50+1
.else
FILENAME_MAX = 16+1
.endif

View File

@ -1,8 +1,7 @@
; supervision symbols
; supervision 65c02s
; in cc65 up to 2.9.1 65c02 means 65c02s
.pc02
; supervision 65c02s
; in cc65 up to 2.9.1 65c02 means 65sc02
lcd_addr = $4000
LCD_LINESIZE = $30

186
asminc/sym1.inc Normal file
View File

@ -0,0 +1,186 @@
; ---------------------------------------------------------------------------
;
; SYM-1 definitions
;
; ---------------------------------------------------------------------------
RAMSTART := $0200 ; Entry point
; ---------------------------------------------------------------------------
; Monitor Functions
; ---------------------------------------------------------------------------
WARM := $8003 ; Monitor entry
SVNMI := $809B ; Save NMI entry
INBYTE := $81D9 ; Get two HEX characters and pack
ASCNIB := $8275 ; Test for carriage-return
INCCMP := $82B2 ; Increment pointer
CHKSAD := $82DD ; Compute checksum
OUTPC := $82EE ; Display program counter
OUTBYT := $82FA ; Print byte as two ASCII characters
OUTS2 := $8319 ; Print pointer
INSTAT := $8386 ; Determine if key is pressed
GETKEY := $88AF ; Get key (disregarding monitor login)
SCAND := $8906 ; Flash LED display (once)
KEYQ := $8923 ; Test for keypress
BEEP := $8972 ; Make a beep
CONFIG := $89A5 ; Configure I/O
OUTDSP := $89C1 ; Output to on-board LED display
INCHR := $8A1B ; Input character and convert to uppercase
OUTCHR := $8A47 ; Output character
INTCHR := $8A58 ; Input character without case conversion
DLYF := $8AE6 ; Delay 1 bit time
DLYH := $8AE9 ; Delay 1/2 bit time
RESET := $8B4A ; Hard reset
ACCESS := $8B86 ; Unlock lowest 4K memory
NACCES := $8B9C ; Lock lowest 4K memory
L8C78 := $8C78 ; Link to tape
DUMPT := $8E87 ; Dump memory to tape
LOADT := $8C78 ; Load memory from tape
TAPEMODE := $00FD ; Top bit on for high-speed
; ---------------------------------------------------------------------------
; System Memory
; ---------------------------------------------------------------------------
DISBUF := $A640 ; On-Board Display Buffer
DISBUF0 := $A640 ; Left-Most digit
DISBUF1 := $A641 ; Second digit
DISBUF2 := $A642 ; Third
DISBUF3 := $A643 ; Fourth
DISBUF4 := $A644 ; Fifth
DISBUF5 := $A645 ; Sixth and right-most digit
DISBUF6 := $A646 ; Not-used / right of display (shift buffer)
RDIG := $A645 ; Right-most digit (same as DISBUF5)
P3L := $A64A ; Parameter 3 (low-byte)
P3H := $A64B ; (high-byte)
P2L := $A64C ; Parameter 2
P2H := $A64D ;
P1L := $A64E ; Parameter 1
P1H := $A64F
PARNR := $A649 ; Number of Parameters Entered
PADBIT := $A650 ; Pad Bits for Carriage Return
SDBYT := $A651 ; Baud Rate for RS232 (01-4800,06-2400,10-1200,24-600,4C-300,D5-110)
ERCNT := $A652 ; Error Count (Max FF)
TECHO := $A653 ; Terminal Echo (bit-7=ECHO/NO, 6=CTL-O TOGGLE)
TOUTFL := $A654 ; Output Flags (bit-7=CRT IN, 6=TTY IN, 5=TTY OUT, 4=CRT OUT)
KSHFL := $A655 ; Keyboard Shift Flag
TV := $A656 ; Trace Velocity (0=Single Step)
LSTCOM := $A657 ; Last Monitor Command
MAXRC := $A658 ; Maximum Record Length for Memory Dump
; ---------------------------------------------------------------------------
; Register Followers
; ---------------------------------------------------------------------------
PCLR := $A659 ; Program Counter (low-byte)
PCHR := $A65A ; (high-byte)
SR := $A65B ; Stack Pointer
FR := $A65C ; Status Register Flags
AR := $A65D ; A Register
XR := $A65E ; X Register
YR := $A65F ; Y Register
; ---------------------------------------------------------------------------
; I/O Vectors (3 bytes each)
; ---------------------------------------------------------------------------
INVEC := $A660 ; Input Character
OUTVEC := $A663 ; Output Character
INSVEC := $A666 ; Input Status
URSVEC := $A669 ; Unrecognized Syntax
URCVEC := $A66C ; Unrecognized Command / Error
SCNVEC := $A66F ; Scan On-board Display
; ---------------------------------------------------------------------------
; Trace and Interrupt Vectors (2 bytes each)
; ---------------------------------------------------------------------------
EXEVEC := $A672 ; Exec and Alternate InVec
TRCVEC := $A674 ; Trace
UBRKVC := $A676 ; User Break after Monitor
UIRQVC := $A678 ; User non-break IRQ after Monitor
NMIVEC := $A67A ; Non-Maskable Interrupt
RSTVEC := $A67C ; Reset
IRQVEC := $A67E ; Interrupt Request
; ---------------------------------------------------------------------------
; I/O Registers
; ---------------------------------------------------------------------------
;
; 6532 (U27)
;
PADA := $A400 ; Keyboard / Display
P3DA := $A402 ; Serial I/O
DDPADA := $A401 ; Data-Direction Register for PADA
DDP3DA := $A403 ; Data-Direction Register for P3DA
WEDRTA := $A404 ; Write-Edge Detect Read Timer A
WEDRFA := $A405 ; Write-Edge Detect Read-Int Flags A
WEDRTB := $A406 ; Write-Edge Detect Read Timer B
WEDRFB := $A407 ; Write-Edge Detect Read-Int Flags B
TIM0001 := $A41C ; Timer / 1
TIM0008 := $A41D ; Timer / 8
TIM0064 := $A41E ; Timer / 64
TIM1024 := $A41F ; Timer / 1024
;
; 6522 (U25)
;
OR1A := $A001 ; Input / Output Register for 1A
DDR1A := $A003 ; Data-Direction Register for 1A
OR1B := $A000 ; Input / Output Register for 1B
DDR1B := $A002 ; Data-Direction Register for 1B
TIC1L := $A004 ;
TIC1H := $A005 ;
TIL1L := $A006 ;
TIL1H := $A007 ;
T2L1L := $A008 ;
T2C1L := $A008 ;
T2C1H := $A009 ;
SR1 := $A00A ;
ACR1 := $A00B ;
PCR1 := $A00C ;
IFR1 := $A00D ;
IER1 := $A00E ;
DR1A := $A00F ;
;
; 6522 (U28)
;
OR2A := $A801 ; Input / Output Register for 2A
DDR2A := $A803 ; Data-Direction Register for 2A
OR2B := $A800 ; Input / Output Register for 2B
DDR2B := $A802 ; Data-Direction Register for 2B
TIC2L := $A804 ;
TIC2H := $A805 ;
TIL2L := $A806 ;
TIL2H := $A807 ;
T2L2L := $A808 ;
T2C2L := $A808 ;
T2C2H := $A809 ;
SR2 := $A80A ;
ACR2 := $A80B ;
PCR2 := $A80C ;
IFR2 := $A80D ;
IER2 := $A80E ;
DR2A := $A80F ;
;
; 6522 (U29)
;
OR3A := $AC01 ; Write-Protect RAM, Debug On/Off, I/O-3A
DDR3A := $AC03 ; Data-Direction Register for 3A
OR3B := $AC00 ; Input / Output Register for 3B
DDR3B := $AC02 ; Data-Direction Register for 3B
TIC3L := $AC04 ;
TIC3H := $AC05 ;
TIL3L := $AC06 ;
TIL3H := $AC07 ;
T2L3L := $AC08 ;
T2C3L := $AC08 ;
T2C3H := $AC09 ;
SR3 := $AC0A ;
ACR3 := $AC0B ;
PCR3 := $AC0C ;
IFR3 := $AC0D ;
IER3 := $AC0E ;
DR3A := $AC0F ;

539
asminc/telestrat.inc Normal file
View File

@ -0,0 +1,539 @@
;
; Oric TELEMON definition
; TELEMON 2.4 & TELEMON 3.x
; For TELEMON 3.x check http://orix.oric.org
;
; ---------------------------------------------------------------------------
; Constants
SCREEN_XSIZE = 40 ; Screen columns
SCREEN_YSIZE = 28 ; Screen rows
FUNCTKEY = $A5
FNAME_LEN = 11 ; Maximum length of file-name
; ---------------------------------------------------------------------------
; I/O Identifier
; Theses identifers are used for channel management
;
XKBD = $80 ; Keyboard
XRSE = $83 ; RS232 in
XSCR = $88 ; Screen
XRSS = $90 ; RS232 out
; ---------------------------------------------------------------------------
; Zero page
; ---------------------------------------------------------------------------
; Page 00
RES := $00
RESB := $02
DECDEB := $04
DECFIN := $06
DECCIB := $08
DECTRV := $0A
TR0 := $0C
TR1 := $0D
TR2 := $0E
TR3 := $0F
TR4 := $10
TR5 := $11
TR6 := $12
TR7 := $13
DEFAFF := $14
IRQSVA := $21 ; Used to save A when a BRK call occurs
IRQSVX := $22 ; Used to save X when a BRK call occurs
IRQSVY := $23 ; Used to save Y when a BRK call occurs
IRQSVP := $24 ; Used to save P when a BRK call occurs
ADSCR := $26
SCRNB := $28 ; Id of the current window
ADKBD := $2A ; Address ASCII conversion table
PTR_READ_DEST := $2C ; Used for XFREAD and XWRITE only in TELEMON 3.x
ADCLK := $40 ; Address for clock display
TIMEUS := $42
TIMEUD := $44 ; Counter clock (1/10 of a second)
HRSX := $46
HRSY := $47
XLPRBI := $48 ; Printer flag (b7)
HRSX40 := $49
HRSX6 := $4A
ADHRS := $4B ; Hires screen address (word)
HRS1 := $4D
HRS2 := $4F
HRS3 := $51
HRS4 := $53
HRS5 := $55
HRSFB := $57
VABKP1 := $58
; RS232T
; b0-b3 : speed
; 1111 => 19200 bps (please note that telestrat can't handle this speed without stopping all IRQ except ACIA's one)
; 1100 => 9600 bps (default from TELEMON)
; 1110 => 4800 bps
; 1010 => 2400 bps
; 1000 => 1200 bps
; 0111 => 600 bps
; 0110 => 300 bps
; 0101 => 150 bps
; 0010 => 75 bps
; b4 : 0 external clock, 1 internal clock
; b6-b5 : 00 8 bits
; 01 7 bits
; 10 6 bits
; 11 5 bits
; b7 : 0 a stop
RS232T := $59
; RS232C
; b0-b3 : 0
; b4 : 1 if echo
; b5 : 1 if parity
; b7-b6 : 00 in/out parity odd
; : 01 on/out parity even
; : 10 parity sent, answer not tested
; : 11 SPACE SENT, reception not tested
RS232C := $5A
INDRS := $5B
; Float and integer management
ACC1E := $60
ACC1M := $61
ACC1S := $65
ACC1EX := $66
ACC1J := $67
ACC2E := $68
ACC2M := $69
ACC2S := $6D
ACCPS := $6E
ACC3 := $6F
ACC4E := $73
ACC4M := $74
FLDT0 := $74
FLDT1 := $75
FLDT2 := $76
FLSVY := $77
FLTR0 := $7D
FLTR1 := $7E
; Menu management
MENDDY := $62
MENDFY := $63
MENX := $64
MENDY := $66
FLGMEN := $68
ADMEN := $69
FLSGN := $8A
FLINT := $88
FLSVS := $89
FLERR := $8B
VARLNG := $8C
VARAPL := $D0
; ---------------------------------------------------------------------------
; Low memory
IRQVec := $02FB ; "fast" interrupt vector
; ---------------------------------------------------------------------------
; I/O locations
; 6522
.struct VIA ; Versatile Interface Adapter
.res $0300
PRB .byte ; Port Register B
PRA .byte ; Port Register A
DDRB .byte ; Data Direction Register B
DDRA .byte ; Data Direction Register A
T1 .word ; Timer 1
T1L .word ; Timer 1 Latch
T2 .word ; Timer 2
SR .byte ; Shift Register
ACR .byte ; Auxiliary Control Register
PCR .byte ; Peripheral Control Register
IFR .byte ; Interrupt Flags Register
IER .byte ; Interrupt Enable Register
PRA2 .byte ; Port Register A without handshaking
.endstruct
.struct VIA2 ; Versatile Interface Adapter
.res $0320
PRB .byte ; Port Register B
PRA .byte ; Port Register A
DDRB .byte ; Data Direction Register B
DDRA .byte ; Data Direction Register A
T1 .word ; Timer 1
T1L .word ; Timer 1 Latch
T2 .word ; Timer 2
SR .byte ; Shift Register
ACR .byte ; Auxiliary Control Register
PCR .byte ; Peripheral Control Register
IFR .byte ; Interrupt Flags Register
IER .byte ; Interrupt Enable Register
PRA2 .byte ; Port Register A without handshaking
.endstruct
; 6551
.struct ACIA ; Asynchronous Communications Interface Adapter
.res $031C
DATA .byte
STATUS .byte
CMD .byte ; Command register
CTRL .byte ; Control register
.endstruct
SCREEN := $BB80
; ---------------------------------------------------------------------------
; ROM entries
; TELEMON primitives (2.4 & 3.x)
; all values are used to call bank 7 of telestrat cardridge. It works with 'brk value'
XOP0 = $00 ; Open device on channel 0
XOP1 = $01 ; Open device on channel 1
XOP2 = $02 ; Open device on channel 2
XOP3 = $03 ; Open device on channel 3
XCL0 = $04 ; Close channel 0
XCL1 = $05 ; Close channel 1
XCL2 = $06 ; Close channel 2
XCL3 = $07 ; Close channel 3
XRD0 = $08
XRDW0 = $0C
XWR0 = $10 ; Write a char in channel 0
XWR1 = $11 ; Write a char in channel 1
XWR2 = $12 ; Write a char in channel 2
XWR3 = $13 ; Write a char in channel 3
XWSTR0 = $14 ; Write a string in text mode channel 0
XWSTR1 = $15 ; Write a string in text mode channel 1
XWSTR2 = $16 ; Write a string in text mode channel 2
XWSTR3 = $17 ; Write a string in text mode channel 3
XDECAL = $18
XTEXT = $19
XHIRES = $1A
XEFFHI = $1B ; Clear hires screen
XFILLM = $1C
XMINMA = $1F
XVARS = $24 ; Only in TELEMON 3.x, in TELEMON 2.4, it's XNOMFI ($24)
XCRLF = $25 ; Jump a line and return to the beginning of the line
XDECAY = $26
XFREAD = $27 ; Only in TELEMON 3.x (bank 7 of Orix)
XBINDX = $28 ; Convert a number into hex and displays on channel 0
XDECIM = $29
XHEXA = $2A ; Convert a number into hex
XEDT = $2D ; Launch editor
XINSER = $2E
XSCELG = $2F ; Search a line in editor mode
XOPEN = $30 ; Only in TELEMON 3.x (bank 7 of Orix)
XECRPR = $33 ; Displays prompt
XCOSCR = $34 ; Switch off cursor
XCSSCR = $35 ; Switch on cursor
XSCRSE = $36
XSCROH = $37 ; Scroll up text screen
XSCROB = $38 ; Scroll down text screen
XSCRNE = $39 ; Load charset from rom to ram
XCLOSE = $3A ; Only in TELEMON 3.x close file (bank 7 of Orix)
XFWRITE = $3B ; Only in TELEMON 3.x write file (bank 7 of Orix)
; Clock primitive
XRECLK = $3C ; Reset clock
XCLCL = $3D ; Close clock
XWRCLK = $3E ; Displays clock in the adress in A & Y registers
; Sound primitives
XSONPS = $40 ; Send data to PSG register (14 values)
XOUPS = $42 ; Send Oups sound into PSG
XPLAY = $43 ; Play a sound
XSOUND = $44
XMUSIC = $45
XZAP = $46 ; Send Zap sound to PSG
XSHOOT = $47
; Path Management
XGETCWD = $48 ; Get current CWD
XPUTCWD = $49 ; Chdir
; File management
XMKDIR = $4B ; Create a folder. Only available in TELEMON 3.x (bank 7 of Orix)
XHCHRS = $4C ; Hard copy hires
; File management
XRM = $4D ; Remove a folder or a file. Only available in TELEMON 3.x (bank 7 of Orix)
XFWR = $4E ; Put a char on the first screen. Only available in TELEMON 3.x (bank 7 of Orix)
; Keyboard primitives
XALLKB = $50 ; Read Keyboard, and populate KBDCOL
XKBDAS = $51 ; Ascii conversion
XGOKBD = $52 ; Swap keyboard type (Qwerty, French ...)
; Buffer management
XECRBU = $54 ; Write A or AY in the buffer
XLISBU = $55 ; Read A or AY in the buffer
XTSTBU = $56
XVIDBU = $57 ; Flush the buffer
XINIBU = $58 ; Initialize the buffer X
XDEFBU = $59 ; Reset all value of the buffer
XBUSY = $5A ; Test if the buffer is empty
XMALLOC = $5B ; Only in TELEMON 3.x (bank 7 of Orix)
; RS232 primitives
XSDUMP = $5C ; RS232 input dump
XCONSO = $5D ; Swap screen into RS232 terminal
XSLOAD = $5E ; Read a file from RS232
XSSAVE = $5F ; Write a file to RS232
; Minitel primitives
XMLOAD = $60 ; Read a file from Minitel
XMSAVE = $61 ; Write a file to Minitel
XFREE = $62 ; Only in TELEMON 3.x (bank 7 of Orix)
; Next Minitel primitives
XWCXFI = $63 ; Wait connection
XLIGNE = $64 ;
XDECON = $65 ; Minitel disconnection
XMOUT = $66 ; Send a byte to minitel (from A)
XSOUT = $67 ; Send accumulator value (A) to RS232, available in TELEMON 2.4 & 3.x : if RS232 buffer is full, the Oric Telestrat freezes
XHRSSE = $8C ; Set hires position cursor
XDRAWA = $8D ; Draw a line absolute
XDRAWR = $8E ; Draw a line (relative)
XCIRCL = $8F ; Draw a circle
XCURSE = $90 ; Plot a pixel
XCURMO = $91 ; Move to x,y pos in Hires
XPAPER = $92
XINK = $93
XBOX = $94 ; Draw a box
XABOX = $95
XFILL = $96
XCHAR = $97 ; Display a char on the screen in Hires
XSCHAR = $98 ; Draw a string in hires
XEXPLO = $9C ; Send Explode sound to PSG
XPING = $9D ; Send Ping sound to PSG
; ---------------------------------------------------------------------------
; ROM entries variables
PWD_PTR = $00
; ---------------------------------------------------------------------------
;
BUFTRV := $100
; ---------------------------------------------------------------------------
; Page $200
BNKST := $200 ; Used to store signature of 8 bank (length : 8 bytes)
TABDRV := $208
DRVDEF := $20C
FLGTEL := $20D
KOROM := $20E ; Used to compute the size of all rom bank. The result is store here. The value is in KB
KORAM := $20F ; Used to compute the size of all ram bank. The result is store here. The value is in KB
; Time management
TIMED := $210 ; Clock (1/10 of seconds)
TIMES := $211
TIMEM := $212
TIMEH := $213
FLGCLK := $214
FLGCLK_FLAG := $215
FLGCUR := $216 ; Cursor management flag
; screens position managements
FLGCUR_STATE := $217 ; Cursor state flag
ADSCRL := $218
ADSCRH := $21C
SCRX := $220
SCRY := $224
SCRDX := $228
SCRFX := $22C
SCRDY := $230
SCRFY := $234
SCRBAL := $238
SCRBAH := $23C
SCRCT := $240
SCRCF := $244
FLGSCR := $248
CURSCR := $24C
HARD_COPY_HIRES := $250 ; Hard copy vector
SCRTXT := $256
SCRHIR := $25C
SCRTRA := $262 ; 6 bytes lenfth
; Keyboard management
KBDCOL := $268 ; 8 bytes length
KBDFLG_KEY := $270 ; 0 if no key pressed
KBDVRR := $272
KBDVRL := $273
FLGKBD := $275
KBDFCT := $276
KBDSHT := $278
KBDKEY := $279
KBDCTC := $27E
LPRX := $286
LPRY := $287
LPRFX := $288
LPRFY := $289
FLGLPR := $28A
; Joysticks management
FLGJCK := $28C
JCGVAL := $28D
JCDVAL := $28E
JCKTAB := $29D
HRSPAT := $2AA ; Hires pattern : it's used to draw pattern for a line or a circle
HRSERR := $2AB
IOTAB0 := $2AE
IOTAB1 := $2B2
IOTAB2 := $2B6
IOTAB3 := $2BA
ADIOB := $2BE ; 48 bytes length
FLGRST := $2EE
CSRND := $2EF
VNMI := $2F4
ADIODB_VECTOR := $2f7 ; 3 bytes length
IRQVECTOR := $2FA
VAPLIC := $2FD
; ---------------------------------------------------------------------------
; Page $400
EXBNK := $40C
VEXBNK := $414
BNKCIB := $417
; ---------------------------------------------------------------------------
; Page $500
DRIVE := $500
ERRNB := $512
SAVES := $513
BUFNOM := $517
VSALO0 := $528
VSALO1 := $529
FTYPE := $52C ; File type
DESALO := $52D
FISALO := $52F
EXSALO := $531
EXTDEF := $55D ; Default extension. At the start of telemon, it's set to ".COM"
BUFEDT := $590 ; Buffer edition
MAX_BUFEDT_LENGTH=110
; ---------------------------------------------------------------------------
; Hardware
CH376_DATA := $340
CH376_COMMAND := $341
; RAM overlays buffer
BUFBUF := $c080
; ---------------------------------------------------------------------------
; Stratsed vectors
; Stratsed is the main OS for Telestrat
XMERGE := $FF0E
XFST := $FF11
XSPUT := $FF14
XSTAKE := $FF17
XTAKE := $FF20
XOPENS := $FF1A ; XOPEN from Stratsed
XCLOSES := $FF1D ; XCLOSE from Stratsed
XPUT := $FF23
XREWIN := $FF29
XJUMP := $FF2C
XLGBUF := $FF2F
XERVEC := $FF32
XESAVE := $FF35
XCOPY := $FF38
XDNAME := $FF3B
XSTATU := $FF3E
XUPDAT := $FF41
XFORMA := $FF44
XDELBK := $FF4A
XDELN := $FF4D
XPROT := $FF50
XUNPRO := $FF53
XDIRN := $FF56
XBKP := $FF59
XINITI := $FF5C
XERREU := $FF5F
XLOAD := $FF62
XDEFSA := $FF65
XDEFLO := $FF68
XSAVE := $FF6B
XNOMDE := $FF6E
XCREAY := $FF71
XDETSE := $FF74
XLIBSE := $FF77
XTRVCA := $FF7A
XTRVNM := $FF7D
XTRVNX := $FF80
XBUCA := $FF86
XVBUF1 := $FF89
XSVSEC := $FF8C
XSAY := $FF8F
XSBUF1 := $FF92
XSBUF2 := $FF95
XSBUF3 := $FF98
XSCAT := $FF9B
XPRSEC := $FFA1
XPBUF1 := $FFA4
XPMAP := $FFA7
XRWTS := $FFAA
; ---------------------------------------------------------------------------
; MACRO
.macro BRK_TELEMON value
.byte $00,value
.endmacro

View File

@ -70,14 +70,13 @@
BAR .addr ; BAR routine
TEXTSTYLE .addr ; TEXTSTYLE routine
OUTTEXT .addr ; OUTTEXT routine
IRQ .addr ; IRQ routine
.endstruct
.endstruct
;------------------------------------------------------------------------------
; The TGI API version, stored at TGI_HDR_VERSION
TGI_API_VERSION = $05
TGI_API_VERSION = $06
;------------------------------------------------------------------------------
; Bitmapped tgi driver flags, stored in TGI_HDR::VARS::FLAGS.

View File

@ -49,11 +49,20 @@
.endstruct
;------------------------------------------------------------------------------
; Struct timespec - must match the struct defined in time.h
.struct timespec
tv_sec .dword
tv_nsec .dword
.endstruct
;------------------------------------------------------------------------------
; Exported functions
.global __systime
.global _clock_getres
.global _clock_gettime
.global _clock_settime
.global _localtime
.global _mktime

View File

@ -7,7 +7,7 @@
;/* */
;/* */
;/* (C) 2003 Ullrich von Bassewitz */
;/* Römerstrasse 52 */
;/* Roemerstrasse 52 */
;/* D-70794 Filderstadt */
;/* EMail: uz@cc65.org */
;/* */

View File

@ -1,14 +1,14 @@
;
; Vic20 generic definitions. Stolen mostly from c64.inc - Steve Schmidtke
; VIC-20 generic definitions. Stolen mostly from c64.inc -- Steve Schmidtke
;
; ---------------------------------------------------------------------------
; Zero page, Commodore stuff
VARTAB := $2D ; Pointer to start of BASIC variables
MEMSIZE := $37 ; Pointer to highest BASIC RAM location (+1)
TXTPTR := $7A ; Pointer into BASIC source code
STATUS := $90 ; Kernal I/O completion status
TIME := $A0 ; 60HZ clock
FNAM_LEN := $B7 ; Length of filename
SECADR := $B9 ; Secondary address
@ -31,6 +31,11 @@ BASIC_BUF_LEN = 89 ; Maximum length of command-line
CHARCOLOR := $286
CURS_COLOR := $287 ; Color under the cursor
KBDREPEAT := $28a
KBDREPEATRATE := $28b
KBDREPEATDELAY := $28c
RSSTAT := $297 ; RS-232 device driver status
; ---------------------------------------------------------------------------
; Screen size
@ -38,13 +43,6 @@ CURS_COLOR := $287 ; Color under the cursor
XSIZE = 22
YSIZE = 23
; ---------------------------------------------------------------------------
; Kernal routines
; Direct entries
CLRSCR := $E55F
KBDREAD := $E5CF
; ---------------------------------------------------------------------------
; Vector and other locations
@ -56,23 +54,66 @@ NMIVec := $0318
; I/O: 6560 VIC
VIC := $9000
VIC_LINES := $9003 ; Screen lines, bit 7 is bit 0 from VIC_HLINE
VIC_HLINE := $9004 ; Rasterline, bits 1-8
VIC_COLOR := $900F ; Border and background color
VIC_CR0 := VIC+$0
VIC_CR1 := VIC+$1
VIC_CR2 := VIC+$2
VIC_CR3 := VIC+$3
VIC_LINES := VIC+$3 ; Screen lines, bit 7 is bit 0 from VIC_HLINE
VIC_CR4 := VIC+$4
VIC_HLINE := VIC+$4 ; Rasterline, bits 1-8
VIC_CR5 := VIC+$5
VIC_CR6 := VIC+$6
VIC_CR7 := VIC+$7
VIC_CR8 := VIC+$8
VIC_CR9 := VIC+$9
VIC_CRA := VIC+$A
VIC_CRB := VIC+$B
VIC_CRC := VIC+$C
VIC_CRD := VIC+$D
VIC_CRE := VIC+$E
VIC_CRF := VIC+$F
VIC_COLOR := VIC+$F ; Border and background color
; ---------------------------------------------------------------------------
; I/O: 6522 VIA1
VIA1 := $9110
VIA1_JOY := $9111
VIA1_DDRB := $9112
VIA1_DDRA := $9113
VIA1 := $9110 ; VIA1 base address
VIA1_JOY := VIA1+$0 ; *** Deprecated ***
VIA1_PB := VIA1+$0 ; Port register B
VIA1_PA1 := VIA1+$1 ; Port register A
VIA1_DDRB := VIA1+$2 ; Data direction register B
VIA1_DDRA := VIA1+$3 ; Data direction register A
VIA1_T1CL := VIA1+$4 ; Timer 1, low byte
VIA1_T1CH := VIA1+$5 ; Timer 1, high byte
VIA1_T1LL := VIA1+$6 ; Timer 1 latch, low byte
VIA1_T1LH := VIA1+$7 ; Timer 1 latch, high byte
VIA1_T2CL := VIA1+$8 ; Timer 2, low byte
VIA1_T2CH := VIA1+$9 ; Timer 2, high byte
VIA1_SR := VIA1+$A ; Shift register
VIA1_ACR := VIA1+$B ; Auxiliary control register
VIA1_PCR := VIA1+$C ; Peripheral control register
VIA1_IFR := VIA1+$D ; Interrupt flag register
VIA1_IER := VIA1+$E ; Interrupt enable register
VIA1_PA2 := VIA1+$F ; Port register A w/o handshake
; ---------------------------------------------------------------------------
; I/O: 6522 VIA2
VIA2 := $9120
VIA2_JOY := $9120
VIA2_DDRB := $9122
VIA2_DDRA := $9123
VIA2 := $9120 ; VIA2 base address
VIA2_JOY := VIA2+$0 ; *** Deprecated ***
VIA2_PB := VIA2+$0 ; Port register B
VIA2_PA1 := VIA2+$1 ; Port register A
VIA2_DDRB := VIA2+$2 ; Data direction register B
VIA2_DDRA := VIA2+$3 ; Data direction register A
VIA2_T1CL := VIA2+$4 ; Timer 1, low byte
VIA2_T1CH := VIA2+$5 ; Timer 1, high byte
VIA2_T1LL := VIA2+$6 ; Timer 1 latch, low byte
VIA2_T1LH := VIA2+$7 ; Timer 1 latch, high byte
VIA2_T2CL := VIA2+$8 ; Timer 2, low byte
VIA2_T2CH := VIA2+$9 ; Timer 2, high byte
VIA2_SR := VIA2+$A ; Shift register
VIA2_ACR := VIA2+$B ; Auxiliary control register
VIA2_PCR := VIA2+$C ; Peripheral control register
VIA2_IFR := VIA2+$D ; Interrupt flag register
VIA2_IER := VIA2+$E ; Interrupt enable register
VIA2_PA2 := VIA2+$F ; Port register A w/o handshake

View File

@ -4,19 +4,19 @@ FEATURES {
STARTADDRESS: default = $0803;
}
SYMBOLS {
__LOADADDR__: type = weak, value = __CODE_RUN__;
__LOADSIZE__: type = weak, value = __BSS_RUN__ - __CODE_RUN__;
__FILETYPE__: type = weak, value = $0006; # ProDOS file type
}
MEMORY {
ZP: start = $0080, size = $001A, define = yes;
HEADER: file = %O, start = $0000, size = $0004;
RAM: file = %O, start = %S, size = $C000 - %S;
ZP: file = "", start = $0000, size = $00FF;
HEADER: file = %O, start = %S - $003A, size = $003A;
MAIN: file = %O, define = yes, start = %S, size = $C000 - %S;
BSS: file = "", start = __MAIN_LAST__, size = $C000 - __MAIN_LAST__;
}
SEGMENTS {
ZEROPAGE: load = ZP, type = zp, optional = yes;
EXEHDR: load = HEADER, type = ro, optional = yes;
CODE: load = RAM, type = rw, optional = yes, define = yes;
RODATA: load = RAM, type = ro, optional = yes;
DATA: load = RAM, type = rw, optional = yes;
BSS: load = RAM, type = bss, optional = yes, define = yes;
CODE: load = MAIN, type = rw;
RODATA: load = MAIN, type = ro, optional = yes;
DATA: load = MAIN, type = rw, optional = yes;
BSS: load = BSS, type = bss, optional = yes, define = yes;
}

49
cfg/apple2-hgr.cfg Normal file
View File

@ -0,0 +1,49 @@
# Configuration for programs including a hires screen (with 6KB LOWCODE)
FEATURES {
STARTADDRESS: default = $0803;
}
SYMBOLS {
__EXEHDR__: type = import;
__FILETYPE__: type = weak, value = $0006; # ProDOS file type
__STACKSIZE__: type = weak, value = $0800; # 2k stack
__HIMEM__: type = weak, value = $9600; # Presumed RAM end
__LCADDR__: type = weak, value = $D400; # Behind quit code
__LCSIZE__: type = weak, value = $0C00; # Rest of bank two
}
MEMORY {
ZP: file = "", define = yes, start = $0080, size = $001A;
HEADER: file = %O, start = %S - $003A, size = $003A;
MAIN: file = %O, define = yes, start = %S, size = __HIMEM__ - %S;
BSS: file = "", start = __ONCE_RUN__, size = __HIMEM__ - __STACKSIZE__ - __ONCE_RUN__;
LC: file = "", define = yes, start = __LCADDR__, size = __LCSIZE__;
}
SEGMENTS {
ZEROPAGE: load = ZP, type = zp;
EXEHDR: load = HEADER, type = ro, optional = yes;
STARTUP: load = MAIN, type = ro;
LOWCODE: load = MAIN, type = ro, optional = yes;
HGR: load = MAIN, type = rw, start = $2000;
CODE: load = MAIN, type = ro start = $4000;
RODATA: load = MAIN, type = ro;
DATA: load = MAIN, type = rw;
INIT: load = MAIN, type = rw;
ONCE: load = MAIN, type = ro, define = yes;
LC: load = MAIN, run = LC, type = ro, optional = yes;
BSS: load = BSS, type = bss, define = yes;
}
FEATURES {
CONDES: type = constructor,
label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__,
segment = ONCE;
CONDES: type = destructor,
label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__,
segment = RODATA;
CONDES: type = interruptor,
label = __INTERRUPTOR_TABLE__,
count = __INTERRUPTOR_COUNT__,
segment = RODATA,
import = __CALLIRQ__;
}

View File

@ -1,10 +1,10 @@
# Configuration for overlay programs (overlays located below main program)
# The overlay files don't include the 4 byte DOS 3.3 header so use AppleCommander like this:
# java -jar ac.jar -cc65 mydisk.dsk myprog bin < myprog
# java -jar ac.jar -p mydisk.dsk myprog.1 bin < myprog.1
# java -jar ac.jar -p mydisk.dsk myprog.2 bin < myprog.2
# java -jar ac.jar -p mydisk.dsk myprog.3 bin < myprog.3
# The overlay files are raw binary files so use AppleCommander like this:
# java -jar ac.jar -as mydisk.dsk myprog < myprog
# java -jar ac.jar -p mydisk.dsk myprog.1 bin < myprog.1
# java -jar ac.jar -p mydisk.dsk myprog.2 bin < myprog.2
# java -jar ac.jar -p mydisk.dsk myprog.3 bin < myprog.3
# ...
FEATURES {
@ -12,21 +12,19 @@ FEATURES {
}
SYMBOLS {
__EXEHDR__: type = import;
__FILETYPE__: type = weak, value = $0006; # ProDOS file type
__STACKSIZE__: type = weak, value = $0800; # 2k stack
__HIMEM__: type = weak, value = $9600; # Presumed RAM end
__LCADDR__: type = weak, value = $D400; # Behind quit code
__LCSIZE__: type = weak, value = $0C00; # Rest of bank two
__STACKSIZE__: type = weak, value = $0800; # 2k stack
__OVERLAYSIZE__: type = weak, value = $1000; # 4k overlay
__LOADADDR__: type = weak, value = __STARTUP_RUN__;
__LOADSIZE__: type = weak, value = __INITBSS_RUN__ - __STARTUP_RUN__ +
__MOVE_LAST__ - __MOVE_START__;
}
MEMORY {
ZP: define = yes, start = $0080, size = $001A;
HEADER: file = %O, start = $0000, size = $0004;
RAM: file = %O, start = %S + __OVERLAYSIZE__, size = __HIMEM__ - __STACKSIZE__ - __OVERLAYSIZE__ - %S;
MOVE: file = %O, define = yes, start = $0000, size = $FFFF;
LC: define = yes, start = __LCADDR__, size = __LCSIZE__;
ZP: file = "", define = yes, start = $0080, size = $001A;
HEADER: file = %O, start = %S - $003A, size = $003A;
MAIN: file = %O, define = yes, start = %S + __OVERLAYSIZE__, size = __HIMEM__ - __OVERLAYSIZE__ - %S;
BSS: file = "", start = __ONCE_RUN__, size = __HIMEM__ - __STACKSIZE__ - __ONCE_RUN__;
LC: file = "", define = yes, start = __LCADDR__, size = __LCSIZE__;
OVL1: file = "%O.1", start = %S, size = __OVERLAYSIZE__;
OVL2: file = "%O.2", start = %S, size = __OVERLAYSIZE__;
OVL3: file = "%O.3", start = %S, size = __OVERLAYSIZE__;
@ -38,32 +36,32 @@ MEMORY {
OVL9: file = "%O.9", start = %S, size = __OVERLAYSIZE__;
}
SEGMENTS {
ZEROPAGE: load = ZP, type = zp;
EXEHDR: load = HEADER, type = ro;
STARTUP: load = RAM, type = ro, define = yes;
LOWCODE: load = RAM, type = ro, optional = yes;
CODE: load = RAM, type = ro;
RODATA: load = RAM, type = ro;
DATA: load = RAM, type = rw;
INITBSS: load = RAM, type = bss, define = yes;
BSS: load = RAM, type = bss, define = yes;
INIT: load = MOVE, run = RAM, type = ro, define = yes, optional = yes;
LC: load = MOVE, run = LC, type = ro, optional = yes;
OVERLAY1: load = OVL1, type = ro, define = yes, optional = yes;
OVERLAY2: load = OVL2, type = ro, define = yes, optional = yes;
OVERLAY3: load = OVL3, type = ro, define = yes, optional = yes;
OVERLAY4: load = OVL4, type = ro, define = yes, optional = yes;
OVERLAY5: load = OVL5, type = ro, define = yes, optional = yes;
OVERLAY6: load = OVL6, type = ro, define = yes, optional = yes;
OVERLAY7: load = OVL7, type = ro, define = yes, optional = yes;
OVERLAY8: load = OVL8, type = ro, define = yes, optional = yes;
OVERLAY9: load = OVL9, type = ro, define = yes, optional = yes;
ZEROPAGE: load = ZP, type = zp;
EXEHDR: load = HEADER, type = ro, optional = yes;
STARTUP: load = MAIN, type = ro, define = yes;
LOWCODE: load = MAIN, type = ro, optional = yes;
CODE: load = MAIN, type = ro;
RODATA: load = MAIN, type = ro;
DATA: load = MAIN, type = rw;
INIT: load = MAIN, type = rw;
ONCE: load = MAIN, type = ro, define = yes;
LC: load = MAIN, run = LC, type = ro, optional = yes;
BSS: load = BSS, type = bss, define = yes;
OVERLAY1: load = OVL1, type = ro, define = yes, optional = yes;
OVERLAY2: load = OVL2, type = ro, define = yes, optional = yes;
OVERLAY3: load = OVL3, type = ro, define = yes, optional = yes;
OVERLAY4: load = OVL4, type = ro, define = yes, optional = yes;
OVERLAY5: load = OVL5, type = ro, define = yes, optional = yes;
OVERLAY6: load = OVL6, type = ro, define = yes, optional = yes;
OVERLAY7: load = OVL7, type = ro, define = yes, optional = yes;
OVERLAY8: load = OVL8, type = ro, define = yes, optional = yes;
OVERLAY9: load = OVL9, type = ro, define = yes, optional = yes;
}
FEATURES {
CONDES: type = constructor,
label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__,
segment = INIT;
segment = ONCE;
CONDES: type = destructor,
label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__,

View File

@ -1,36 +1,37 @@
# Configuration for ProDOS 8 system programs (without the header)
# Configuration for ProDOS 8 system programs (allowing for 3KB in LC)
SYMBOLS {
__EXEHDR__: type = import;
__FILETYPE__: type = weak, value = $00FF; # ProDOS file type
__STACKSIZE__: type = weak, value = $0800; # 2k stack
__LCADDR__: type = weak, value = $D400; # Behind quit code
__LCSIZE__: type = weak, value = $0C00; # Rest of bank two
__STACKSIZE__: type = weak, value = $0800; # 2k stack
__LOADADDR__: type = weak, value = __STARTUP_RUN__;
__LOADSIZE__: type = weak, value = __INITBSS_RUN__ - __STARTUP_RUN__ +
__MOVE_LAST__ - __MOVE_START__;
}
MEMORY {
ZP: define = yes, start = $0080, size = $001A;
RAM: file = %O, start = $2000, size = $9F00 - __STACKSIZE__;
MOVE: file = %O, define = yes, start = $0000, size = $FFFF;
LC: define = yes, start = __LCADDR__, size = __LCSIZE__;
ZP: file = "", define = yes, start = $0080, size = $001A;
HEADER: file = %O, start = $2000 - $003A, size = $003A;
MAIN: file = %O, define = yes, start = $2000, size = $BF00 - $2000;
BSS: file = "", start = __ONCE_RUN__, size = $BF00 - __STACKSIZE__ - __ONCE_RUN__;
LC: file = "", define = yes, start = __LCADDR__, size = __LCSIZE__;
}
SEGMENTS {
ZEROPAGE: load = ZP, type = zp;
STARTUP: load = RAM, type = ro, define = yes;
LOWCODE: load = RAM, type = ro, optional = yes;
CODE: load = RAM, type = ro;
RODATA: load = RAM, type = ro;
DATA: load = RAM, type = rw;
INITBSS: load = RAM, type = bss, define = yes;
BSS: load = RAM, type = bss, define = yes;
INIT: load = MOVE, run = RAM, type = ro, define = yes, optional = yes;
LC: load = MOVE, run = LC, type = ro, optional = yes;
ZEROPAGE: load = ZP, type = zp;
EXEHDR: load = HEADER, type = ro, optional = yes;
STARTUP: load = MAIN, type = ro;
LOWCODE: load = MAIN, type = ro, optional = yes;
CODE: load = MAIN, type = ro;
RODATA: load = MAIN, type = ro;
DATA: load = MAIN, type = rw;
INIT: load = MAIN, type = rw;
ONCE: load = MAIN, type = ro, define = yes;
LC: load = MAIN, run = LC, type = ro, optional = yes;
BSS: load = BSS, type = bss, define = yes;
}
FEATURES {
CONDES: type = constructor,
label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__,
segment = INIT;
segment = ONCE;
CONDES: type = destructor,
label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__,

View File

@ -5,39 +5,37 @@ FEATURES {
}
SYMBOLS {
__EXEHDR__: type = import;
__FILETYPE__: type = weak, value = $0006; # ProDOS file type
__STACKSIZE__: type = weak, value = $0800; # 2k stack
__HIMEM__: type = weak, value = $9600; # Presumed RAM end
__LCADDR__: type = weak, value = $D400; # Behind quit code
__LCSIZE__: type = weak, value = $0C00; # Rest of bank two
__STACKSIZE__: type = weak, value = $0800; # 2k stack
__LOADADDR__: type = weak, value = __STARTUP_RUN__;
__LOADSIZE__: type = weak, value = __INITBSS_RUN__ - __STARTUP_RUN__ +
__MOVE_LAST__ - __MOVE_START__;
}
MEMORY {
ZP: define = yes, start = $0080, size = $001A;
HEADER: file = %O, start = $0000, size = $0004;
RAM: file = %O, start = %S, size = __HIMEM__ - __STACKSIZE__ - %S;
MOVE: file = %O, define = yes, start = $0000, size = $FFFF;
LC: define = yes, start = __LCADDR__, size = __LCSIZE__;
ZP: file = "", define = yes, start = $0080, size = $001A;
HEADER: file = %O, start = %S - $003A, size = $003A;
MAIN: file = %O, define = yes, start = %S, size = __HIMEM__ - %S;
BSS: file = "", start = __ONCE_RUN__, size = __HIMEM__ - __STACKSIZE__ - __ONCE_RUN__;
LC: file = "", define = yes, start = __LCADDR__, size = __LCSIZE__;
}
SEGMENTS {
ZEROPAGE: load = ZP, type = zp;
EXEHDR: load = HEADER, type = ro;
STARTUP: load = RAM, type = ro, define = yes;
LOWCODE: load = RAM, type = ro, optional = yes;
CODE: load = RAM, type = ro;
RODATA: load = RAM, type = ro;
DATA: load = RAM, type = rw;
INITBSS: load = RAM, type = bss, define = yes;
BSS: load = RAM, type = bss, define = yes;
INIT: load = MOVE, run = RAM, type = ro, define = yes, optional = yes;
LC: load = MOVE, run = LC, type = ro, optional = yes;
ZEROPAGE: load = ZP, type = zp;
EXEHDR: load = HEADER, type = ro, optional = yes;
STARTUP: load = MAIN, type = ro;
LOWCODE: load = MAIN, type = ro, optional = yes;
CODE: load = MAIN, type = ro;
RODATA: load = MAIN, type = ro;
DATA: load = MAIN, type = rw;
INIT: load = MAIN, type = rw;
ONCE: load = MAIN, type = ro, define = yes;
LC: load = MAIN, run = LC, type = ro, optional = yes;
BSS: load = BSS, type = bss, define = yes;
}
FEATURES {
CONDES: type = constructor,
label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__,
segment = INIT;
segment = ONCE;
CONDES: type = destructor,
label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__,

View File

@ -4,17 +4,19 @@ FEATURES {
STARTADDRESS: default = $0803;
}
SYMBOLS {
__LOADADDR__: type = weak, value = __CODE_RUN__;
__LOADSIZE__: type = weak, value = __BSS_RUN__ - __CODE_RUN__;
__FILETYPE__: type = weak, value = $0006; # ProDOS file type
}
MEMORY {
HEADER: file = %O, start = $0000, size = $0004;
RAM: file = %O, start = %S, size = $C000 - %S;
ZP: file = "", start = $0000, size = $00FF;
HEADER: file = %O, start = %S - $003A, size = $003A;
MAIN: file = %O, define = yes, start = %S, size = $C000 - %S;
BSS: file = "", start = __MAIN_LAST__, size = $C000 - __MAIN_LAST__;
}
SEGMENTS {
EXEHDR: load = HEADER, type = ro, optional = yes;
CODE: load = RAM, type = rw, optional = yes, define = yes;
RODATA: load = RAM, type = ro, optional = yes;
DATA: load = RAM, type = rw, optional = yes;
BSS: load = RAM, type = bss, optional = yes, define = yes;
ZEROPAGE: load = ZP, type = zp, optional = yes;
EXEHDR: load = HEADER, type = ro, optional = yes;
CODE: load = MAIN, type = rw;
RODATA: load = MAIN, type = ro, optional = yes;
DATA: load = MAIN, type = rw, optional = yes;
BSS: load = BSS, type = bss, optional = yes, define = yes;
}

49
cfg/apple2enh-hgr.cfg Normal file
View File

@ -0,0 +1,49 @@
# Configuration for programs including a hires screen (with 6KB LOWCODE)
FEATURES {
STARTADDRESS: default = $0803;
}
SYMBOLS {
__EXEHDR__: type = import;
__FILETYPE__: type = weak, value = $0006; # ProDOS file type
__STACKSIZE__: type = weak, value = $0800; # 2k stack
__HIMEM__: type = weak, value = $9600; # Presumed RAM end
__LCADDR__: type = weak, value = $D400; # Behind quit code
__LCSIZE__: type = weak, value = $0C00; # Rest of bank two
}
MEMORY {
ZP: file = "", define = yes, start = $0080, size = $001A;
HEADER: file = %O, start = %S - $003A, size = $003A;
MAIN: file = %O, define = yes, start = %S, size = __HIMEM__ - %S;
BSS: file = "", start = __ONCE_RUN__, size = __HIMEM__ - __STACKSIZE__ - __ONCE_RUN__;
LC: file = "", define = yes, start = __LCADDR__, size = __LCSIZE__;
}
SEGMENTS {
ZEROPAGE: load = ZP, type = zp;
EXEHDR: load = HEADER, type = ro, optional = yes;
STARTUP: load = MAIN, type = ro;
LOWCODE: load = MAIN, type = ro, optional = yes;
HGR: load = MAIN, type = rw, start = $2000;
CODE: load = MAIN, type = ro start = $4000;
RODATA: load = MAIN, type = ro;
DATA: load = MAIN, type = rw;
INIT: load = MAIN, type = rw;
ONCE: load = MAIN, type = ro, define = yes;
LC: load = MAIN, run = LC, type = ro, optional = yes;
BSS: load = BSS, type = bss, define = yes;
}
FEATURES {
CONDES: type = constructor,
label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__,
segment = ONCE;
CONDES: type = destructor,
label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__,
segment = RODATA;
CONDES: type = interruptor,
label = __INTERRUPTOR_TABLE__,
count = __INTERRUPTOR_COUNT__,
segment = RODATA,
import = __CALLIRQ__;
}

View File

@ -1,10 +1,10 @@
# Configuration for overlay programs (overlays located below main program)
# The overlay files don't include the 4 byte DOS 3.3 header so use AppleCommander like this:
# java -jar ac.jar -cc65 mydisk.dsk myprog bin < myprog
# java -jar ac.jar -p mydisk.dsk myprog.1 bin < myprog.1
# java -jar ac.jar -p mydisk.dsk myprog.2 bin < myprog.2
# java -jar ac.jar -p mydisk.dsk myprog.3 bin < myprog.3
# The overlay files are raw binary files so use AppleCommander like this:
# java -jar ac.jar -as mydisk.dsk myprog < myprog
# java -jar ac.jar -p mydisk.dsk myprog.1 bin < myprog.1
# java -jar ac.jar -p mydisk.dsk myprog.2 bin < myprog.2
# java -jar ac.jar -p mydisk.dsk myprog.3 bin < myprog.3
# ...
FEATURES {
@ -12,21 +12,19 @@ FEATURES {
}
SYMBOLS {
__EXEHDR__: type = import;
__FILETYPE__: type = weak, value = $0006; # ProDOS file type
__STACKSIZE__: type = weak, value = $0800; # 2k stack
__HIMEM__: type = weak, value = $9600; # Presumed RAM end
__LCADDR__: type = weak, value = $D400; # Behind quit code
__LCSIZE__: type = weak, value = $0C00; # Rest of bank two
__STACKSIZE__: type = weak, value = $0800; # 2k stack
__OVERLAYSIZE__: type = weak, value = $1000; # 4k overlay
__LOADADDR__: type = weak, value = __STARTUP_RUN__;
__LOADSIZE__: type = weak, value = __INITBSS_RUN__ - __STARTUP_RUN__ +
__MOVE_LAST__ - __MOVE_START__;
}
MEMORY {
ZP: define = yes, start = $0080, size = $001A;
HEADER: file = %O, start = $0000, size = $0004;
RAM: file = %O, start = %S + __OVERLAYSIZE__, size = __HIMEM__ - __STACKSIZE__ - __OVERLAYSIZE__ - %S;
MOVE: file = %O, define = yes, start = $0000, size = $FFFF;
LC: define = yes, start = __LCADDR__, size = __LCSIZE__;
ZP: file = "", define = yes, start = $0080, size = $001A;
HEADER: file = %O, start = %S - $003A, size = $003A;
MAIN: file = %O, define = yes, start = %S + __OVERLAYSIZE__, size = __HIMEM__ - __OVERLAYSIZE__ - %S;
BSS: file = "", start = __ONCE_RUN__, size = __HIMEM__ - __STACKSIZE__ - __ONCE_RUN__;
LC: file = "", define = yes, start = __LCADDR__, size = __LCSIZE__;
OVL1: file = "%O.1", start = %S, size = __OVERLAYSIZE__;
OVL2: file = "%O.2", start = %S, size = __OVERLAYSIZE__;
OVL3: file = "%O.3", start = %S, size = __OVERLAYSIZE__;
@ -38,32 +36,32 @@ MEMORY {
OVL9: file = "%O.9", start = %S, size = __OVERLAYSIZE__;
}
SEGMENTS {
ZEROPAGE: load = ZP, type = zp;
EXEHDR: load = HEADER, type = ro;
STARTUP: load = RAM, type = ro, define = yes;
LOWCODE: load = RAM, type = ro, optional = yes;
CODE: load = RAM, type = ro;
RODATA: load = RAM, type = ro;
DATA: load = RAM, type = rw;
INITBSS: load = RAM, type = bss, define = yes;
BSS: load = RAM, type = bss, define = yes;
INIT: load = MOVE, run = RAM, type = ro, define = yes, optional = yes;
LC: load = MOVE, run = LC, type = ro, optional = yes;
OVERLAY1: load = OVL1, type = ro, define = yes, optional = yes;
OVERLAY2: load = OVL2, type = ro, define = yes, optional = yes;
OVERLAY3: load = OVL3, type = ro, define = yes, optional = yes;
OVERLAY4: load = OVL4, type = ro, define = yes, optional = yes;
OVERLAY5: load = OVL5, type = ro, define = yes, optional = yes;
OVERLAY6: load = OVL6, type = ro, define = yes, optional = yes;
OVERLAY7: load = OVL7, type = ro, define = yes, optional = yes;
OVERLAY8: load = OVL8, type = ro, define = yes, optional = yes;
OVERLAY9: load = OVL9, type = ro, define = yes, optional = yes;
ZEROPAGE: load = ZP, type = zp;
EXEHDR: load = HEADER, type = ro, optional = yes;
STARTUP: load = MAIN, type = ro, define = yes;
LOWCODE: load = MAIN, type = ro, optional = yes;
CODE: load = MAIN, type = ro;
RODATA: load = MAIN, type = ro;
DATA: load = MAIN, type = rw;
INIT: load = MAIN, type = rw;
ONCE: load = MAIN, type = ro, define = yes;
LC: load = MAIN, run = LC, type = ro, optional = yes;
BSS: load = BSS, type = bss, define = yes;
OVERLAY1: load = OVL1, type = ro, define = yes, optional = yes;
OVERLAY2: load = OVL2, type = ro, define = yes, optional = yes;
OVERLAY3: load = OVL3, type = ro, define = yes, optional = yes;
OVERLAY4: load = OVL4, type = ro, define = yes, optional = yes;
OVERLAY5: load = OVL5, type = ro, define = yes, optional = yes;
OVERLAY6: load = OVL6, type = ro, define = yes, optional = yes;
OVERLAY7: load = OVL7, type = ro, define = yes, optional = yes;
OVERLAY8: load = OVL8, type = ro, define = yes, optional = yes;
OVERLAY9: load = OVL9, type = ro, define = yes, optional = yes;
}
FEATURES {
CONDES: type = constructor,
label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__,
segment = INIT;
segment = ONCE;
CONDES: type = destructor,
label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__,

View File

@ -1,36 +1,37 @@
# Configuration for ProDOS 8 system programs (without the header)
# Configuration for ProDOS 8 system programs (allowing for 3KB in LC)
SYMBOLS {
__EXEHDR__: type = import;
__FILETYPE__: type = weak, value = $00FF; # ProDOS file type
__STACKSIZE__: type = weak, value = $0800; # 2k stack
__LCADDR__: type = weak, value = $D400; # Behind quit code
__LCSIZE__: type = weak, value = $0C00; # Rest of bank two
__STACKSIZE__: type = weak, value = $0800; # 2k stack
__LOADADDR__: type = weak, value = __STARTUP_RUN__;
__LOADSIZE__: type = weak, value = __INITBSS_RUN__ - __STARTUP_RUN__ +
__MOVE_LAST__ - __MOVE_START__;
}
MEMORY {
ZP: define = yes, start = $0080, size = $001A;
RAM: file = %O, start = $2000, size = $9F00 - __STACKSIZE__;
MOVE: file = %O, define = yes, start = $0000, size = $FFFF;
LC: define = yes, start = __LCADDR__, size = __LCSIZE__;
ZP: file = "", define = yes, start = $0080, size = $001A;
HEADER: file = %O, start = $2000 - $003A, size = $003A;
MAIN: file = %O, define = yes, start = $2000, size = $BF00 - $2000;
BSS: file = "", start = __ONCE_RUN__, size = $BF00 - __STACKSIZE__ - __ONCE_RUN__;
LC: file = "", define = yes, start = __LCADDR__, size = __LCSIZE__;
}
SEGMENTS {
ZEROPAGE: load = ZP, type = zp;
STARTUP: load = RAM, type = ro, define = yes;
LOWCODE: load = RAM, type = ro, optional = yes;
CODE: load = RAM, type = ro;
RODATA: load = RAM, type = ro;
DATA: load = RAM, type = rw;
INITBSS: load = RAM, type = bss, define = yes;
BSS: load = RAM, type = bss, define = yes;
INIT: load = MOVE, run = RAM, type = ro, define = yes, optional = yes;
LC: load = MOVE, run = LC, type = ro, optional = yes;
ZEROPAGE: load = ZP, type = zp;
EXEHDR: load = HEADER, type = ro, optional = yes;
STARTUP: load = MAIN, type = ro;
LOWCODE: load = MAIN, type = ro, optional = yes;
CODE: load = MAIN, type = ro;
RODATA: load = MAIN, type = ro;
DATA: load = MAIN, type = rw;
INIT: load = MAIN, type = rw;
ONCE: load = MAIN, type = ro, define = yes;
LC: load = MAIN, run = LC, type = ro, optional = yes;
BSS: load = BSS, type = bss, define = yes;
}
FEATURES {
CONDES: type = constructor,
label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__,
segment = INIT;
segment = ONCE;
CONDES: type = destructor,
label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__,

View File

@ -5,39 +5,37 @@ FEATURES {
}
SYMBOLS {
__EXEHDR__: type = import;
__FILETYPE__: type = weak, value = $0006; # ProDOS file type
__STACKSIZE__: type = weak, value = $0800; # 2k stack
__HIMEM__: type = weak, value = $9600; # Presumed RAM end
__LCADDR__: type = weak, value = $D400; # Behind quit code
__LCSIZE__: type = weak, value = $0C00; # Rest of bank two
__STACKSIZE__: type = weak, value = $0800; # 2k stack
__LOADADDR__: type = weak, value = __STARTUP_RUN__;
__LOADSIZE__: type = weak, value = __INITBSS_RUN__ - __STARTUP_RUN__ +
__MOVE_LAST__ - __MOVE_START__;
}
MEMORY {
ZP: define = yes, start = $0080, size = $001A;
HEADER: file = %O, start = $0000, size = $0004;
RAM: file = %O, start = %S, size = __HIMEM__ - __STACKSIZE__ - %S;
MOVE: file = %O, define = yes, start = $0000, size = $FFFF;
LC: define = yes, start = __LCADDR__, size = __LCSIZE__;
ZP: file = "", define = yes, start = $0080, size = $001A;
HEADER: file = %O, start = %S - $003A, size = $003A;
MAIN: file = %O, define = yes, start = %S, size = __HIMEM__ - %S;
BSS: file = "", start = __ONCE_RUN__, size = __HIMEM__ - __STACKSIZE__ - __ONCE_RUN__;
LC: file = "", define = yes, start = __LCADDR__, size = __LCSIZE__;
}
SEGMENTS {
ZEROPAGE: load = ZP, type = zp;
EXEHDR: load = HEADER, type = ro;
STARTUP: load = RAM, type = ro, define = yes;
LOWCODE: load = RAM, type = ro, optional = yes;
CODE: load = RAM, type = ro;
RODATA: load = RAM, type = ro;
DATA: load = RAM, type = rw;
INITBSS: load = RAM, type = bss, define = yes;
BSS: load = RAM, type = bss, define = yes;
INIT: load = MOVE, run = RAM, type = ro, define = yes, optional = yes;
LC: load = MOVE, run = LC, type = ro, optional = yes;
ZEROPAGE: load = ZP, type = zp;
EXEHDR: load = HEADER, type = ro, optional = yes;
STARTUP: load = MAIN, type = ro;
LOWCODE: load = MAIN, type = ro, optional = yes;
CODE: load = MAIN, type = ro;
RODATA: load = MAIN, type = ro;
DATA: load = MAIN, type = rw;
INIT: load = MAIN, type = rw;
ONCE: load = MAIN, type = ro, define = yes;
LC: load = MAIN, run = LC, type = ro, optional = yes;
BSS: load = BSS, type = bss, define = yes;
}
FEATURES {
CONDES: type = constructor,
label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__,
segment = INIT;
segment = ONCE;
CONDES: type = destructor,
label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__,

24
cfg/atari-asm-xex.cfg Normal file
View File

@ -0,0 +1,24 @@
FEATURES {
STARTADDRESS: default = $2E00;
}
SYMBOLS {
__STARTADDRESS__: type = export, value = %S;
}
MEMORY {
ZP: file = "", define = yes, start = $0082, size = $007E;
MAIN: file = %O, define = yes, start = %S, size = $BC20 - %S;
}
FILES {
%O: format = atari;
}
FORMATS {
atari: runad = start;
}
SEGMENTS {
ZEROPAGE: load = ZP, type = zp, optional = yes;
EXTZP: load = ZP, type = zp, optional = yes; # to enable modules to be able to link to C and assembler programs
CODE: load = MAIN, type = rw, define = yes;
RODATA: load = MAIN, type = ro optional = yes;
DATA: load = MAIN, type = rw optional = yes;
BSS: load = MAIN, type = bss, optional = yes, define = yes;
}

View File

@ -2,29 +2,29 @@ FEATURES {
STARTADDRESS: default = $2E00;
}
SYMBOLS {
__EXEHDR__: type = import;
__AUTOSTART__: type = import; # force inclusion of autostart "trailer"
__STARTADDRESS__: type = export, value = %S;
__EXEHDR__: type = import;
__AUTOSTART__: type = import; # force inclusion of autostart "trailer"
__STARTADDRESS__: type = export, value = %S;
}
MEMORY {
ZP: file = "", define = yes, start = $0082, size = $007E;
ZP: file = "", define = yes, start = $0082, size = $007E;
# file header, just $FFFF
HEADER: file = %O, start = $0000, size = $0002;
HEADER: file = %O, start = $0000, size = $0002;
# "main program" load chunk
MAINHDR: file = %O, start = $0000, size = $0004;
RAM: file = %O, define = yes, start = %S, size = $BC20 - %S;
TRAILER: file = %O, start = $0000, size = $0006;
MAINHDR: file = %O, start = $0000, size = $0004;
MAIN: file = %O, define = yes, start = %S, size = $BC20 - %S;
TRAILER: file = %O, start = $0000, size = $0006;
}
SEGMENTS {
EXEHDR: load = HEADER, type = ro, optional = yes;
MAINHDR: load = MAINHDR, type = ro, optional = yes;
CODE: load = RAM, type = ro, define = yes, optional = yes;
RODATA: load = RAM, type = ro optional = yes;
DATA: load = RAM, type = rw optional = yes;
BSS: load = RAM, type = bss, define = yes, optional = yes;
ZEROPAGE: load = ZP, type = zp, optional = yes;
EXTZP: load = ZP, type = zp, optional = yes; # to enable modules to be able to link to C and assembler programs
AUTOSTRT: load = TRAILER, type = ro, optional = yes;
ZEROPAGE: load = ZP, type = zp, optional = yes;
EXTZP: load = ZP, type = zp, optional = yes; # to enable modules to be able to link to C and assembler programs
EXEHDR: load = HEADER, type = ro, optional = yes;
MAINHDR: load = MAINHDR, type = ro, optional = yes;
CODE: load = MAIN, type = rw, define = yes;
RODATA: load = MAIN, type = ro optional = yes;
DATA: load = MAIN, type = rw optional = yes;
BSS: load = MAIN, type = bss, optional = yes, define = yes;
AUTOSTRT: load = TRAILER, type = ro, optional = yes;
}

View File

@ -10,29 +10,30 @@ SYMBOLS {
__CARTFLAGS__: type = weak, value = $01; # see documentation for other possible values
}
MEMORY {
ZP: file = "", define = yes, start = $0082, size = $007E;
RAM: file = "", define = yes, start = %S, size = __CARTSIZE__;
ROM: file = %O, define = yes, start = $C000 - __CARTSIZE__, size = __CARTSIZE__ - 6, fill = yes, fillval = $FF;
CARTID: file = %O, start = $BFFA, size = $0006;
ZP: file = "", define = yes, start = $0082, size = $007E;
MAIN: file = "", define = yes, start = %S, size = __CARTSIZE__;
ROM: file = %O, define = yes, start = $C000 - __CARTSIZE__, size = __CARTSIZE__ - 6, fill = yes, fillval = $FF;
CARTID: file = %O, start = $BFFA, size = $0006;
}
SEGMENTS {
STARTUP: load = ROM, type = ro, define = yes, optional = yes;
LOWCODE: load = ROM, type = ro, define = yes, optional = yes;
INIT: load = ROM, type = ro, optional = yes;
CODE: load = ROM, type = ro, define = yes;
RODATA: load = ROM, type = ro, optional = yes;
DATA: load = ROM, run = RAM, type = rw, define = yes, optional = yes;
INITBSS: load = RAM, type = bss, optional = yes;
BSS: load = RAM, type = bss, define = yes, optional = yes;
CARTHDR: load = CARTID, type = ro;
ZEROPAGE: load = ZP, type = zp, optional = yes;
EXTZP: load = ZP, type = zp, optional = yes;
ZEROPAGE: load = ZP, type = zp, optional = yes;
EXTZP: load = ZP, type = zp, optional = yes;
STARTUP: load = ROM, type = ro, define = yes, optional = yes;
LOWBSS: load = MAIN, type = bss, optional = yes; # not zero initialized
LOWCODE: load = ROM, type = ro, define = yes, optional = yes;
ONCE: load = ROM, type = ro, optional = yes;
CODE: load = ROM, type = ro, define = yes;
RODATA: load = ROM, type = ro, optional = yes;
DATA: load = ROM, run = MAIN, type = rw, define = yes, optional = yes;
INIT: load = MAIN, type = bss, optional = yes;
BSS: load = MAIN, type = bss, define = yes, optional = yes;
CARTHDR: load = CARTID, type = ro;
}
FEATURES {
CONDES: type = constructor,
label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__,
segment = INIT;
segment = ONCE;
CONDES: type = destructor,
label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__,

View File

@ -8,27 +8,28 @@ SYMBOLS {
_cas_hdr: type = import;
}
MEMORY {
ZP: file = "", define = yes, start = $0082, size = $007E;
RAM: file = %O, define = yes, start = %S, size = $BC20 - __STACKSIZE__ - __RESERVED_MEMORY__ - %S;
ZP: file = "", define = yes, start = $0082, size = $007E;
MAIN: file = %O, define = yes, start = %S, size = $BC20 - __STACKSIZE__ - __RESERVED_MEMORY__ - %S;
}
SEGMENTS {
CASHDR: load = RAM, type = ro;
STARTUP: load = RAM, type = ro, define = yes, optional = yes;
LOWCODE: load = RAM, type = ro, define = yes, optional = yes;
INIT: load = RAM, type = ro, optional = yes;
CODE: load = RAM, type = ro, define = yes;
RODATA: load = RAM, type = ro, optional = yes;
DATA: load = RAM, type = rw, optional = yes;
INITBSS: load = RAM, type = bss, optional = yes;
BSS: load = RAM, type = bss, define = yes, optional = yes;
ZEROPAGE: load = ZP, type = zp, optional = yes;
EXTZP: load = ZP, type = zp, optional = yes;
ZEROPAGE: load = ZP, type = zp, optional = yes;
EXTZP: load = ZP, type = zp, optional = yes;
CASHDR: load = MAIN, type = ro;
STARTUP: load = MAIN, type = ro, define = yes, optional = yes;
LOWBSS: load = MAIN, type = rw, optional = yes; # not zero initialized
LOWCODE: load = MAIN, type = ro, define = yes, optional = yes;
ONCE: load = MAIN, type = ro, optional = yes;
CODE: load = MAIN, type = ro, define = yes;
RODATA: load = MAIN, type = ro, optional = yes;
DATA: load = MAIN, type = rw, optional = yes;
BSS: load = MAIN, type = bss, define = yes, optional = yes;
INIT: load = MAIN, type = bss, optional = yes;
}
FEATURES {
CONDES: type = constructor,
label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__,
segment = INIT;
segment = ONCE;
CONDES: type = destructor,
label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__,

View File

@ -11,48 +11,49 @@ SYMBOLS {
__RESERVED_MEMORY__: type = weak, value = $0000;
}
MEMORY {
ZP: file = "", define = yes, start = $0082, size = $007E;
ZP: file = "", define = yes, start = $0082, size = $007E;
# file header, just $FFFF
HEADER: file = %O, start = $0000, size = $0002;
HEADER: file = %O, start = $0000, size = $0002;
# "system check" load chunk
SYSCHKHDR: file = %O, start = $0000, size = $0004;
SYSCHKCHNK: file = %O, start = $2E00, size = $0300;
SYSCHKTRL: file = %O, start = $0000, size = $0006;
SYSCHKHDR: file = %O, start = $0000, size = $0004;
SYSCHKCHNK: file = %O, start = $2E00, size = $0300;
SYSCHKTRL: file = %O, start = $0000, size = $0006;
# "main program" load chunk
MAINHDR: file = %O, start = $0000, size = $0004;
RAM: file = %O, define = yes, start = %S + __OVERLAYSIZE__,
size = $BC20 - __OVERLAYSIZE__ - __STACKSIZE__ - __RESERVED_MEMORY__ - %S;
TRAILER: file = %O, start = $0000, size = $0006;
MAINHDR: file = %O, start = $0000, size = $0004;
MAIN: file = %O, define = yes, start = %S + __OVERLAYSIZE__, size = $BC20 - __OVERLAYSIZE__ - __STACKSIZE__ - __RESERVED_MEMORY__ - %S;
TRAILER: file = %O, start = $0000, size = $0006;
OVL1: file = "%O.1", start = %S, size = __OVERLAYSIZE__;
OVL2: file = "%O.2", start = %S, size = __OVERLAYSIZE__;
OVL3: file = "%O.3", start = %S, size = __OVERLAYSIZE__;
OVL4: file = "%O.4", start = %S, size = __OVERLAYSIZE__;
OVL5: file = "%O.5", start = %S, size = __OVERLAYSIZE__;
OVL6: file = "%O.6", start = %S, size = __OVERLAYSIZE__;
OVL7: file = "%O.7", start = %S, size = __OVERLAYSIZE__;
OVL8: file = "%O.8", start = %S, size = __OVERLAYSIZE__;
OVL9: file = "%O.9", start = %S, size = __OVERLAYSIZE__;
# overlays
OVL1: file = "%O.1", start = %S, size = __OVERLAYSIZE__;
OVL2: file = "%O.2", start = %S, size = __OVERLAYSIZE__;
OVL3: file = "%O.3", start = %S, size = __OVERLAYSIZE__;
OVL4: file = "%O.4", start = %S, size = __OVERLAYSIZE__;
OVL5: file = "%O.5", start = %S, size = __OVERLAYSIZE__;
OVL6: file = "%O.6", start = %S, size = __OVERLAYSIZE__;
OVL7: file = "%O.7", start = %S, size = __OVERLAYSIZE__;
OVL8: file = "%O.8", start = %S, size = __OVERLAYSIZE__;
OVL9: file = "%O.9", start = %S, size = __OVERLAYSIZE__;
}
SEGMENTS {
ZEROPAGE: load = ZP, type = zp;
EXTZP: load = ZP, type = zp, optional = yes;
EXEHDR: load = HEADER, type = ro;
SYSCHKHDR: load = SYSCHKHDR, type = ro, optional = yes;
SYSCHK: load = SYSCHKCHNK, type = rw, define = yes, optional = yes;
SYSCHKTRL: load = SYSCHKTRL, type = ro, optional = yes;
MAINHDR: load = MAINHDR, type = ro;
STARTUP: load = RAM, type = ro, define = yes;
LOWCODE: load = RAM, type = ro, define = yes, optional = yes;
INIT: load = RAM, type = ro, optional = yes;
CODE: load = RAM, type = ro, define = yes;
RODATA: load = RAM, type = ro;
DATA: load = RAM, type = rw;
INITBSS: load = RAM, type = bss, optional = yes;
BSS: load = RAM, type = bss, define = yes;
ZEROPAGE: load = ZP, type = zp;
EXTZP: load = ZP, type = zp, optional = yes;
STARTUP: load = MAIN, type = ro, define = yes;
LOWBSS: load = MAIN, type = rw, optional = yes; # not zero initialized
LOWCODE: load = MAIN, type = ro, define = yes, optional = yes;
ONCE: load = MAIN, type = ro, optional = yes;
CODE: load = MAIN, type = ro, define = yes;
RODATA: load = MAIN, type = ro;
DATA: load = MAIN, type = rw;
INIT: load = MAIN, type = rw, optional = yes;
BSS: load = MAIN, type = bss, define = yes;
AUTOSTRT: load = TRAILER, type = ro;
OVERLAY1: load = OVL1, type = ro, define = yes, optional = yes;
OVERLAY2: load = OVL2, type = ro, define = yes, optional = yes;
@ -68,7 +69,7 @@ FEATURES {
CONDES: type = constructor,
label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__,
segment = INIT;
segment = ONCE;
CONDES: type = destructor,
label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__,

56
cfg/atari-xex.cfg Normal file
View File

@ -0,0 +1,56 @@
# Sample linker configuration for C programs using the Atari binary file support.
# Use with: cl65 -tatari -Catari-xex.cfg prog.c -o prog.xex
FEATURES {
STARTADDRESS: default = $2000;
}
SYMBOLS {
__SYSTEM_CHECK__: type = import; # force inclusion of "system check" load chunk
__STACKSIZE__: type = weak, value = $0800; # 2k stack
__STARTADDRESS__: type = export, value = %S;
__RESERVED_MEMORY__: type = weak, value = $0000;
__SYSCHKHDR__: type = export, value = 0; # Disable system check header
__SYSCHKTRL__: type = export, value = 0; # Disable system check trailer
}
MEMORY {
ZP: file = "", define = yes, start = $0082, size = $007E;
# "system check" load chunk
SYSCHKCHNK: file = %O, start = $2E00, size = $0300;
# "main program" load chunk
MAIN: file = %O, define = yes, start = %S, size = $BC20 - __STACKSIZE__ - __RESERVED_MEMORY__ - %S;
}
FILES {
%O: format = atari;
}
FORMATS {
atari: runad = start,
initad = SYSCHKCHNK: __SYSTEM_CHECK__;
}
SEGMENTS {
ZEROPAGE: load = ZP, type = zp;
EXTZP: load = ZP, type = zp, optional = yes;
SYSCHK: load = SYSCHKCHNK, type = rw, define = yes, optional = yes;
STARTUP: load = MAIN, type = ro, define = yes;
LOWBSS: load = MAIN, type = rw, optional = yes; # not zero initialized
LOWCODE: load = MAIN, type = ro, define = yes, optional = yes;
ONCE: load = MAIN, type = ro, optional = yes;
CODE: load = MAIN, type = ro, define = yes;
RODATA: load = MAIN, type = ro;
DATA: load = MAIN, type = rw;
INIT: load = MAIN, type = rw, optional = yes;
BSS: load = MAIN, type = bss, define = yes;
}
FEATURES {
CONDES: type = constructor,
label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__,
segment = ONCE;
CONDES: type = destructor,
label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__,
segment = RODATA;
CONDES: type = interruptor,
label = __INTERRUPTOR_TABLE__,
count = __INTERRUPTOR_COUNT__,
segment = RODATA,
import = __CALLIRQ__;
}

View File

@ -10,44 +10,45 @@ SYMBOLS {
__RESERVED_MEMORY__: type = weak, value = $0000;
}
MEMORY {
ZP: file = "", define = yes, start = $0082, size = $007E;
ZP: file = "", define = yes, start = $0082, size = $007E;
# file header, just $FFFF
HEADER: file = %O, start = $0000, size = $0002;
HEADER: file = %O, start = $0000, size = $0002;
# "system check" load chunk
SYSCHKHDR: file = %O, start = $0000, size = $0004;
SYSCHKCHNK: file = %O, start = $2E00, size = $0300;
SYSCHKTRL: file = %O, start = $0000, size = $0006;
SYSCHKHDR: file = %O, start = $0000, size = $0004;
SYSCHKCHNK: file = %O, start = $2E00, size = $0300;
SYSCHKTRL: file = %O, start = $0000, size = $0006;
# "main program" load chunk
MAINHDR: file = %O, start = $0000, size = $0004;
RAM: file = %O, define = yes, start = %S, size = $BC20 - __STACKSIZE__ - __RESERVED_MEMORY__ - %S;
TRAILER: file = %O, start = $0000, size = $0006;
MAINHDR: file = %O, start = $0000, size = $0004;
MAIN: file = %O, define = yes, start = %S, size = $BC20 - __STACKSIZE__ - __RESERVED_MEMORY__ - %S;
TRAILER: file = %O, start = $0000, size = $0006;
}
SEGMENTS {
ZEROPAGE: load = ZP, type = zp;
EXTZP: load = ZP, type = zp, optional = yes;
EXEHDR: load = HEADER, type = ro;
SYSCHKHDR: load = SYSCHKHDR, type = ro, optional = yes;
SYSCHK: load = SYSCHKCHNK, type = rw, define = yes, optional = yes;
SYSCHKTRL: load = SYSCHKTRL, type = ro, optional = yes;
MAINHDR: load = MAINHDR, type = ro;
STARTUP: load = RAM, type = ro, define = yes;
LOWCODE: load = RAM, type = ro, define = yes, optional = yes;
INIT: load = RAM, type = ro, optional = yes;
CODE: load = RAM, type = ro, define = yes;
RODATA: load = RAM, type = ro;
DATA: load = RAM, type = rw;
INITBSS: load = RAM, type = bss, optional = yes;
BSS: load = RAM, type = bss, define = yes;
ZEROPAGE: load = ZP, type = zp;
EXTZP: load = ZP, type = zp, optional = yes;
STARTUP: load = MAIN, type = ro, define = yes;
LOWBSS: load = MAIN, type = rw, optional = yes; # not zero initialized
LOWCODE: load = MAIN, type = ro, define = yes, optional = yes;
ONCE: load = MAIN, type = ro, optional = yes;
CODE: load = MAIN, type = ro, define = yes;
RODATA: load = MAIN, type = ro;
DATA: load = MAIN, type = rw;
INIT: load = MAIN, type = rw, optional = yes;
BSS: load = MAIN, type = bss, define = yes;
AUTOSTRT: load = TRAILER, type = ro;
}
FEATURES {
CONDES: type = constructor,
label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__,
segment = INIT;
segment = ONCE;
CONDES: type = destructor,
label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__,

22
cfg/atari2600.cfg Normal file
View File

@ -0,0 +1,22 @@
# Atari VCS 2600 linker configuration file for cc65
#
# Florent Flament (contact@florentflament.com), 2017
SYMBOLS {
__STACKSIZE__: type = weak, value = $0010; # 16 Bytes system stack
}
MEMORY {
RAM: file = "", start = $0080, size = $0080 - __STACKSIZE__, define = yes;
ROM: file = %O, start = $F000, size = $1000, fill = yes, fillval = $FF;
}
SEGMENTS {
ZEROPAGE: load = RAM, type = zp;
STARTUP: load = ROM, type = ro;
CODE: load = ROM, type = ro;
RODATA: load = ROM, type = ro, optional = yes;
DATA: load = ROM, run = RAM, type = rw, optional = yes, define = yes;
BSS: load = RAM, type = bss, optional = yes;
VECTORS: load = ROM, type = ro, start = $FFFA;
}

View File

@ -13,24 +13,25 @@ MEMORY {
CARTENTRY: file = %O, start = $BFFE, size = $0002;
}
SEGMENTS {
ZEROPAGE: load = ZP, type = zp, optional = yes;
EXTZP: load = ZP, type = zp, optional = yes;
DLIST: load = ROM , type = ro, define = yes, optional = yes;
STARTUP: load = ROM, type = ro, define = yes, optional = yes;
LOWCODE: load = ROM, type = ro, define = yes, optional = yes;
INIT: load = ROM, type = ro, optional = yes;
ONCE: load = ROM, type = ro, optional = yes;
CODE: load = ROM, type = ro, define = yes;
RODATA: load = ROM, type = ro, optional = yes;
DATA: load = ROM, run = RAM, type = rw, define = yes, optional = yes;
BSS: load = RAM, type = bss, define = yes, optional = yes;
CARTNAME: load = CARTNAME, type = ro, define = yes;
CARTYEAR: load = CARTYEAR, type = ro, define = yes;
CARTENTRY: load = CARTENTRY, type = ro, define = yes;
ZEROPAGE: load = ZP, type = zp, optional = yes;
EXTZP: load = ZP, type = zp, optional = yes;
CARTNAME: load = CARTNAME, type = ro;
CARTYEAR: load = CARTYEAR, type = ro;
CARTENTRY: load = CARTENTRY, type = ro;
}
FEATURES {
CONDES: type = constructor,
label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__,
segment = INIT;
segment = ONCE;
CONDES: type = destructor,
label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__,

View File

@ -6,50 +6,47 @@
FEATURES {
STARTADDRESS: default = $2400;
}
SYMBOLS {
__EXEHDR__: type = import;
__SYSTEM_CHECK__: type = import; # force inclusion of "system check" load chunk
__AUTOSTART__: type = import; # force inclusion of autostart "trailer"
__STACKSIZE__: type = weak, value = $0800; # 2k stack
__STARTADDRESS__: type = export, value = %S;
__EXEHDR__: type = import;
__SYSTEM_CHECK__: type = import; # force inclusion of "system check" load chunk
__AUTOSTART__: type = import; # force inclusion of autostart "trailer"
__STACKSIZE__: type = weak, value = $0800; # 2k stack
__CHARGENSIZE__: type = weak, value = $0400;
__STARTADDRESS__: type = export, value = %S;
}
MEMORY {
ZP: file = "", define = yes, start = $0082, size = $007E;
ZP: file = "", define = yes, start = $0082, size = $007E;
# just $FFFF
HEADER: file = %O, start = $0000, size = $0002;
HEADER: file = %O, start = $0000, size = $0002;
# "system check" load chunk
SYSCHKHDR: file = %O, start = $0000, size = $0004;
SYSCHKCHNK: file = %O, start = $2E00, size = $0300;
SYSCHKTRL: file = %O, start = $0000, size = $0006;
SYSCHKHDR: file = %O, start = $0000, size = $0004;
SYSCHKCHNK: file = %O, start = $2E00, size = $0300;
SYSCHKTRL: file = %O, start = $0000, size = $0006;
# "shadow RAM preparation" load chunk
SRPREPHDR: file = %O, start = $0000, size = $0004;
SRPREPCHNK: file = %O, define = yes, start = %S, size = $7C20 - %S - $07FF; # $07FF: space for temp. chargen buffer, 1K aligned
SRPREPTRL: file = %O, start = $0000, size = $0006;
SRPREPHDR: file = %O, start = $0000, size = $0004;
SRPREPCHNK: file = %O, define = yes, start = %S, size = $7C20 - %S - $07FF; # $07FF: space for temp. chargen buffer, 1K aligned
SRPREPTRL: file = %O, start = $0000, size = $0006;
# "main program" load chunk
MAINHDR: file = %O, start = $0000, size = $0004;
RAM: file = %O, define = yes, start = %S +
__LOWBSS_SIZE__, size = $D000 -
__STACKSIZE__ -
%S -
__LOWBSS_SIZE__;
MAINHDR: file = %O, start = $0000, size = $0004;
MAIN: file = %O, define = yes, start = %S + __LOWBSS_SIZE__, size = $D000 - __STACKSIZE__ - %S - __LOWBSS_SIZE__;
# defines entry point into program
TRAILER: file = %O, start = $0000, size = $0006;
TRAILER: file = %O, start = $0000, size = $0006;
# address of relocated character generator
CHARGEN: file = "", define = yes, start = $D800, size = $0400;
CHARGEN: file = "", define = yes, start = $D800, size = __CHARGENSIZE__;
# memory beneath the ROM
HIDDEN_RAM: file = "", define = yes, start = $DC00, size = $FFFA - $DC00;
HIDDEN_RAM: file = "", define = yes, start = $D800 + __CHARGENSIZE__, size = $FFFA - $D800 - __CHARGENSIZE__;
}
SEGMENTS {
ZEROPAGE: load = ZP, type = zp;
EXTZP: load = ZP, type = zp, optional = yes;
EXEHDR: load = HEADER, type = ro;
SYSCHKHDR: load = SYSCHKHDR, type = ro, optional = yes;
@ -57,30 +54,28 @@ SEGMENTS {
SYSCHKTRL: load = SYSCHKTRL, type = ro, optional = yes;
SRPREPHDR: load = SRPREPHDR, type = ro;
LOWBSS: load = SRPREPCHNK, type = bss, define = yes; # shared btw. SRPREPCHNK and RAM, not zero initialized
LOWBSS: load = SRPREPCHNK, type = bss, define = yes; # shared btw. SRPREPCHNK and MAIN, not zero initialized
SRPREP: load = SRPREPCHNK, type = rw, define = yes;
SHADOW_RAM: load = SRPREPCHNK, run = HIDDEN_RAM, type = rw, define = yes, optional = yes;
SHADOW_RAM2: load = SRPREPCHNK, run = HIDDEN_RAM, type = rw, define = yes, optional = yes;
SRPREPTRL: load = SRPREPTRL, type = ro;
MAINHDR: load = MAINHDR, type = ro;
STARTUP: load = RAM, type = ro, define = yes;
LOWCODE: load = RAM, type = ro, define = yes, optional = yes;
INIT: load = RAM, type = ro, optional = yes;
CODE: load = RAM, type = ro, define = yes;
RODATA: load = RAM, type = ro;
DATA: load = RAM, type = rw;
INITBSS: load = RAM, type = bss, optional = yes;
BSS: load = RAM, type = bss, define = yes;
ZEROPAGE: load = ZP, type = zp;
EXTZP: load = ZP, type = zp, optional = yes;
STARTUP: load = MAIN, type = ro, define = yes;
LOWCODE: load = MAIN, type = ro, define = yes, optional = yes;
ONCE: load = MAIN, type = ro, optional = yes;
CODE: load = MAIN, type = ro, define = yes;
RODATA: load = MAIN, type = ro;
DATA: load = MAIN, type = rw;
INIT: load = MAIN, type = rw, optional = yes;
BSS: load = MAIN, type = bss, define = yes;
AUTOSTRT: load = TRAILER, type = ro;
}
FEATURES {
CONDES: type = constructor,
label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__,
segment = INIT;
segment = ONCE;
CONDES: type = destructor,
label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__,

View File

@ -1,67 +1,63 @@
FEATURES {
STARTADDRESS: default = $2400;
}
SYMBOLS {
__EXEHDR__: type = import;
__SYSTEM_CHECK__: type = import; # force inclusion of "system check" load chunk
__AUTOSTART__: type = import; # force inclusion of autostart "trailer"
__STACKSIZE__: type = weak, value = $0800; # 2k stack
__OVERLAYSIZE__: type = weak, value = $1000; # 4k overlay
__STARTADDRESS__: type = export, value = %S;
__EXEHDR__: type = import;
__SYSTEM_CHECK__: type = import; # force inclusion of "system check" load chunk
__AUTOSTART__: type = import; # force inclusion of autostart "trailer"
__STACKSIZE__: type = weak, value = $0800; # 2k stack
__CHARGENSIZE__: type = weak, value = $0400;
__OVERLAYSIZE__: type = weak, value = $1000; # 4k overlay
__STARTADDRESS__: type = export, value = %S;
}
MEMORY {
ZP: file = "", define = yes, start = $0082, size = $007E;
ZP: file = "", define = yes, start = $0082, size = $007E;
# just $FFFF
HEADER: file = %O, start = $0000, size = $0002;
HEADER: file = %O, start = $0000, size = $0002;
# "system check" load chunk
SYSCHKHDR: file = %O, start = $0000, size = $0004;
SYSCHKCHNK: file = %O, start = $2E00, size = $0300;
SYSCHKTRL: file = %O, start = $0000, size = $0006;
SYSCHKHDR: file = %O, start = $0000, size = $0004;
SYSCHKCHNK: file = %O, start = $2E00, size = $0300;
SYSCHKTRL: file = %O, start = $0000, size = $0006;
# "shadow RAM preparation" load chunk
SRPREPHDR: file = %O, start = $0000, size = $0004;
SRPREPCHNK: file = %O, define = yes, start = %S + __OVERLAYSIZE__, size = $7C20 - %S - __OVERLAYSIZE__ - $07FF; # $07FF: space for temp. chargen buffer, 1K aligned
SRPREPTRL: file = %O, start = $0000, size = $0006;
SRPREPHDR: file = %O, start = $0000, size = $0004;
SRPREPCHNK: file = %O, define = yes, start = %S + __OVERLAYSIZE__, size = $7C20 - %S - __OVERLAYSIZE__ - $07FF; # $07FF: space for temp. chargen buffer, 1K aligned
SRPREPTRL: file = %O, start = $0000, size = $0006;
# "main program" load chunk
MAINHDR: file = %O, start = $0000, size = $0004;
RAM: file = %O, define = yes, start = %S +
__OVERLAYSIZE__ +
__LOWBSS_SIZE__, size = $D000 -
__STACKSIZE__ -
%S -
__OVERLAYSIZE__ -
__LOWBSS_SIZE__;
MAINHDR: file = %O, start = $0000, size = $0004;
MAIN: file = %O, define = yes, start = %S + __OVERLAYSIZE__ +
__LOWBSS_SIZE__, size = $D000 - __STACKSIZE__ - %S - __OVERLAYSIZE__ - __LOWBSS_SIZE__;
# defines entry point into program
TRAILER: file = %O, start = $0000, size = $0006;
TRAILER: file = %O, start = $0000, size = $0006;
# memory beneath the ROM preceeding the character generator
HIDDEN_RAM2: file = "", define = yes, start = $D800, size = $0800;
HIDDEN_RAM2: file = "", define = yes, start = $D800, size = $0800;
# address of relocated character generator (same addess as ROM version)
CHARGEN: file = "", define = yes, start = $E000, size = $0400;
CHARGEN: file = "", define = yes, start = $E000, size = __CHARGENSIZE__;
# memory beneath the ROM
HIDDEN_RAM: file = "", define = yes, start = $E400, size = $FFFA - $E400;
HIDDEN_RAM: file = "", define = yes, start = $E000 + __CHARGENSIZE__, size = $FFFA - $E000 - __CHARGENSIZE__;
# overlays
OVL1: file = "%O.1", start = %S, size = __OVERLAYSIZE__;
OVL2: file = "%O.2", start = %S, size = __OVERLAYSIZE__;
OVL3: file = "%O.3", start = %S, size = __OVERLAYSIZE__;
OVL4: file = "%O.4", start = %S, size = __OVERLAYSIZE__;
OVL5: file = "%O.5", start = %S, size = __OVERLAYSIZE__;
OVL6: file = "%O.6", start = %S, size = __OVERLAYSIZE__;
OVL7: file = "%O.7", start = %S, size = __OVERLAYSIZE__;
OVL8: file = "%O.8", start = %S, size = __OVERLAYSIZE__;
OVL9: file = "%O.9", start = %S, size = __OVERLAYSIZE__;
OVL1: file = "%O.1", start = %S, size = __OVERLAYSIZE__;
OVL2: file = "%O.2", start = %S, size = __OVERLAYSIZE__;
OVL3: file = "%O.3", start = %S, size = __OVERLAYSIZE__;
OVL4: file = "%O.4", start = %S, size = __OVERLAYSIZE__;
OVL5: file = "%O.5", start = %S, size = __OVERLAYSIZE__;
OVL6: file = "%O.6", start = %S, size = __OVERLAYSIZE__;
OVL7: file = "%O.7", start = %S, size = __OVERLAYSIZE__;
OVL8: file = "%O.8", start = %S, size = __OVERLAYSIZE__;
OVL9: file = "%O.9", start = %S, size = __OVERLAYSIZE__;
}
SEGMENTS {
ZEROPAGE: load = ZP, type = zp;
EXTZP: load = ZP, type = zp, optional = yes;
EXEHDR: load = HEADER, type = ro;
SYSCHKHDR: load = SYSCHKHDR, type = ro, optional = yes;
@ -69,23 +65,21 @@ SEGMENTS {
SYSCHKTRL: load = SYSCHKTRL, type = ro, optional = yes;
SRPREPHDR: load = SRPREPHDR, type = ro;
LOWBSS: load = SRPREPCHNK, type = bss, define = yes; # shared btw. SRPREPCHNK and RAM, not zero initialized
LOWBSS: load = SRPREPCHNK, type = bss, define = yes; # shared btw. SRPREPCHNK and MAIN, not zero initialized
SRPREP: load = SRPREPCHNK, type = rw, define = yes;
SHADOW_RAM: load = SRPREPCHNK, run = HIDDEN_RAM, type = rw, define = yes, optional = yes;
SHADOW_RAM2: load = SRPREPCHNK, run = HIDDEN_RAM2, type = rw, define = yes, optional = yes;
SRPREPTRL: load = SRPREPTRL, type = ro;
MAINHDR: load = MAINHDR, type = ro;
STARTUP: load = RAM, type = ro, define = yes;
LOWCODE: load = RAM, type = ro, define = yes, optional = yes;
INIT: load = RAM, type = ro, optional = yes;
CODE: load = RAM, type = ro, define = yes;
RODATA: load = RAM, type = ro;
DATA: load = RAM, type = rw;
INITBSS: load = RAM, type = bss, optional = yes;
BSS: load = RAM, type = bss, define = yes;
ZEROPAGE: load = ZP, type = zp;
EXTZP: load = ZP, type = zp, optional = yes;
STARTUP: load = MAIN, type = ro, define = yes;
LOWCODE: load = MAIN, type = ro, define = yes, optional = yes;
ONCE: load = MAIN, type = ro, optional = yes;
CODE: load = MAIN, type = ro, define = yes;
RODATA: load = MAIN, type = ro;
DATA: load = MAIN, type = rw;
INIT: load = MAIN, type = rw, optional = yes;
BSS: load = MAIN, type = bss, define = yes;
AUTOSTRT: load = TRAILER, type = ro;
OVERLAY1: load = OVL1, type = ro, define = yes, optional = yes;
@ -102,7 +96,7 @@ FEATURES {
CONDES: type = constructor,
label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__,
segment = INIT;
segment = ONCE;
CONDES: type = destructor,
label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__,

80
cfg/atarixl-xex.cfg Normal file
View File

@ -0,0 +1,80 @@
# Sample linker configuration for C programs using the Atari binary file support.
# Use with: cl65 -tatarixl -Catarixl-c-xex.cfg prog.c -o prog.xex
FEATURES {
STARTADDRESS: default = $2400;
}
SYMBOLS {
__SYSTEM_CHECK__: type = import; # force inclusion of "system check" load chunk
__STACKSIZE__: type = weak, value = $0800; # 2k stack
__STARTADDRESS__: type = export, value = %S;
__CHARGENSIZE__: type = weak, value = $0400;
__SYSCHKHDR__: type = export, value = 0; # Disable system check header
__SYSCHKTRL__: type = export, value = 0; # Disable system check trailer
}
MEMORY {
ZP: file = "", define = yes, start = $0082, size = $007E;
# "system check" load chunk
SYSCHKCHNK: file = %O, start = $2E00, size = $0300;
# "shadow RAM preparation" load chunk
SRPREPCHNK: file = %O, define = yes, start = %S, size = $7C20 - %S - $07FF; # $07FF: space for temp. chargen buffer, 1K aligned
# "main program" load chunk
MAIN: file = %O, define = yes, start = %S + __LOWBSS_SIZE__, size = $D000 - __STACKSIZE__ - %S - __LOWBSS_SIZE__;
# memory beneath the ROM preceeding the character generator
HIDDEN_RAM2: file = "", define = yes, start = $D800, size = $0800;
# address of relocated character generator (same addess as ROM version)
CHARGEN: file = "", define = yes, start = $E000, size = __CHARGENSIZE__;
# memory beneath the ROM
HIDDEN_RAM: file = "", define = yes, start = $E000 + __CHARGENSIZE__, size = $FFFA - $E000 - __CHARGENSIZE__;
# UNUSED - hide
UNUSED: file = "", start = $0, size = $10;
}
FILES {
%O: format = atari;
}
FORMATS {
atari: runad = start,
initad = SYSCHKCHNK: __SYSTEM_CHECK__,
initad = SRPREPCHNK: sramprep;
}
SEGMENTS {
ZEROPAGE: load = ZP, type = zp;
EXTZP: load = ZP, type = zp, optional = yes;
SYSCHK: load = SYSCHKCHNK, type = rw, define = yes, optional = yes;
LOWBSS: load = SRPREPCHNK, type = bss, define = yes; # shared btw. SRPREPCHNK and MAIN, not zero initialized
SRPREP: load = SRPREPCHNK, type = rw, define = yes;
SHADOW_RAM: load = SRPREPCHNK, run = HIDDEN_RAM, type = rw, define = yes, optional = yes;
SHADOW_RAM2: load = SRPREPCHNK, run = HIDDEN_RAM2, type = rw, define = yes, optional = yes;
STARTUP: load = MAIN, type = ro, define = yes;
LOWCODE: load = MAIN, type = ro, define = yes, optional = yes;
ONCE: load = MAIN, type = ro, optional = yes;
CODE: load = MAIN, type = ro, define = yes;
RODATA: load = MAIN, type = ro;
DATA: load = MAIN, type = rw;
INIT: load = MAIN, type = rw, optional = yes;
BSS: load = MAIN, type = bss, define = yes;
SRPREPHDR: load = UNUSED, type = ro;
SRPREPTRL: load = UNUSED, type = ro;
}
FEATURES {
CONDES: type = constructor,
label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__,
segment = ONCE;
CONDES: type = destructor,
label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__,
segment = RODATA;
CONDES: type = interruptor,
label = __INTERRUPTOR_TABLE__,
count = __INTERRUPTOR_COUNT__,
segment = RODATA,
import = __CALLIRQ__;
}

View File

@ -1,53 +1,50 @@
FEATURES {
STARTADDRESS: default = $2400;
}
SYMBOLS {
__EXEHDR__: type = import;
__SYSTEM_CHECK__: type = import; # force inclusion of "system check" load chunk
__AUTOSTART__: type = import; # force inclusion of autostart "trailer"
__STACKSIZE__: type = weak, value = $0800; # 2k stack
__STARTADDRESS__: type = export, value = %S;
__EXEHDR__: type = import;
__SYSTEM_CHECK__: type = import; # force inclusion of "system check" load chunk
__AUTOSTART__: type = import; # force inclusion of autostart "trailer"
__STACKSIZE__: type = weak, value = $0800; # 2k stack
__CHARGENSIZE__: type = weak, value = $0400;
__STARTADDRESS__: type = export, value = %S;
}
MEMORY {
ZP: file = "", define = yes, start = $0082, size = $007E;
ZP: file = "", define = yes, start = $0082, size = $007E;
# just $FFFF
HEADER: file = %O, start = $0000, size = $0002;
HEADER: file = %O, start = $0000, size = $0002;
# "system check" load chunk
SYSCHKHDR: file = %O, start = $0000, size = $0004;
SYSCHKCHNK: file = %O, start = $2E00, size = $0300;
SYSCHKTRL: file = %O, start = $0000, size = $0006;
SYSCHKHDR: file = %O, start = $0000, size = $0004;
SYSCHKCHNK: file = %O, start = $2E00, size = $0300;
SYSCHKTRL: file = %O, start = $0000, size = $0006;
# "shadow RAM preparation" load chunk
SRPREPHDR: file = %O, start = $0000, size = $0004;
SRPREPCHNK: file = %O, define = yes, start = %S, size = $7C20 - %S - $07FF; # $07FF: space for temp. chargen buffer, 1K aligned
SRPREPTRL: file = %O, start = $0000, size = $0006;
SRPREPHDR: file = %O, start = $0000, size = $0004;
SRPREPCHNK: file = %O, define = yes, start = %S, size = $7C20 - %S - $07FF; # $07FF: space for temp. chargen buffer, 1K aligned
SRPREPTRL: file = %O, start = $0000, size = $0006;
# "main program" load chunk
MAINHDR: file = %O, start = $0000, size = $0004;
RAM: file = %O, define = yes, start = %S +
__LOWBSS_SIZE__, size = $D000 -
__STACKSIZE__ -
%S -
__LOWBSS_SIZE__;
MAINHDR: file = %O, start = $0000, size = $0004;
MAIN: file = %O, define = yes, start = %S + __LOWBSS_SIZE__, size = $D000 - __STACKSIZE__ - %S - __LOWBSS_SIZE__;
# defines entry point into program
TRAILER: file = %O, start = $0000, size = $0006;
TRAILER: file = %O, start = $0000, size = $0006;
# memory beneath the ROM preceeding the character generator
HIDDEN_RAM2: file = "", define = yes, start = $D800, size = $0800;
HIDDEN_RAM2: file = "", define = yes, start = $D800, size = $0800;
# address of relocated character generator (same addess as ROM version)
CHARGEN: file = "", define = yes, start = $E000, size = $0400;
CHARGEN: file = "", define = yes, start = $E000, size = __CHARGENSIZE__;
# memory beneath the ROM
HIDDEN_RAM: file = "", define = yes, start = $E400, size = $FFFA - $E400;
HIDDEN_RAM: file = "", define = yes, start = $E000 + __CHARGENSIZE__, size = $FFFA - $E000 - __CHARGENSIZE__;
}
SEGMENTS {
ZEROPAGE: load = ZP, type = zp;
EXTZP: load = ZP, type = zp, optional = yes;
EXEHDR: load = HEADER, type = ro;
SYSCHKHDR: load = SYSCHKHDR, type = ro, optional = yes;
@ -55,30 +52,28 @@ SEGMENTS {
SYSCHKTRL: load = SYSCHKTRL, type = ro, optional = yes;
SRPREPHDR: load = SRPREPHDR, type = ro;
LOWBSS: load = SRPREPCHNK, type = bss, define = yes; # shared btw. SRPREPCHNK and RAM, not zero initialized
LOWBSS: load = SRPREPCHNK, type = bss, define = yes; # shared btw. SRPREPCHNK and MAIN, not zero initialized
SRPREP: load = SRPREPCHNK, type = rw, define = yes;
SHADOW_RAM: load = SRPREPCHNK, run = HIDDEN_RAM, type = rw, define = yes, optional = yes;
SHADOW_RAM2: load = SRPREPCHNK, run = HIDDEN_RAM2, type = rw, define = yes, optional = yes;
SRPREPTRL: load = SRPREPTRL, type = ro;
MAINHDR: load = MAINHDR, type = ro;
STARTUP: load = RAM, type = ro, define = yes;
LOWCODE: load = RAM, type = ro, define = yes, optional = yes;
INIT: load = RAM, type = ro, optional = yes;
CODE: load = RAM, type = ro, define = yes;
RODATA: load = RAM, type = ro;
DATA: load = RAM, type = rw;
INITBSS: load = RAM, type = bss, optional = yes;
BSS: load = RAM, type = bss, define = yes;
ZEROPAGE: load = ZP, type = zp;
EXTZP: load = ZP, type = zp, optional = yes;
STARTUP: load = MAIN, type = ro, define = yes;
LOWCODE: load = MAIN, type = ro, define = yes, optional = yes;
ONCE: load = MAIN, type = ro, optional = yes;
CODE: load = MAIN, type = ro, define = yes;
RODATA: load = MAIN, type = ro;
DATA: load = MAIN, type = rw;
INIT: load = MAIN, type = rw, optional = yes;
BSS: load = MAIN, type = bss, define = yes;
AUTOSTRT: load = TRAILER, type = ro;
}
FEATURES {
CONDES: type = constructor,
label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__,
segment = INIT;
segment = ONCE;
CONDES: type = destructor,
label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__,

View File

@ -8,30 +8,31 @@ SYMBOLS {
__RAMEND__: type = weak, value = $9800 + $1C00 * __GRAB__;
}
MEMORY {
ZP: file = "", define = yes, start = $00E2, size = $001A;
TAPEHDR: file = %O, type = ro, start = $0000, size = $001F;
BASHEAD: file = %O, define = yes, start = $0501, size = $000D;
RAM: file = %O, define = yes, start = __BASHEAD_LAST__, size = __RAMEND__ - __RAM_START__ - __STACKSIZE__;
ZP: file = "", define = yes, start = $00E2, size = $001A;
TAPEHDR: file = %O, type = ro, start = $0000, size = $001F;
BASHEAD: file = %O, define = yes, start = $0501, size = $000D;
MAIN: file = %O, define = yes, start = __BASHEAD_LAST__, size = __RAMEND__ - __MAIN_START__;
BSS: file = "", start = __ONCE_RUN__, size = __RAMEND__ - __STACKSIZE__ - __ONCE_RUN__;
}
SEGMENTS {
ZEROPAGE: load = ZP, type = zp;
TAPEHDR: load = TAPEHDR, type = ro;
BASHDR: load = BASHEAD, type = ro, define = yes, optional = yes;
STARTUP: load = RAM, type = ro;
LOWCODE: load = RAM, type = ro, optional = yes;
CODE: load = RAM, type = ro;
RODATA: load = RAM, type = ro;
INIT: load = RAM, type = ro, define = yes, optional = yes;
DATA: load = RAM, type = rw;
ZPSAVE1: load = RAM, type = rw, define = yes; # ZPSAVE1, ZPSAVE2 must be together
ZPSAVE2: load = RAM, type = bss; # see "libsrc/atmos/crt0.s"
BSS: load = RAM, type = bss, define = yes;
BASHDR: load = BASHEAD, type = ro, optional = yes;
STARTUP: load = MAIN, type = ro;
LOWCODE: load = MAIN, type = ro, optional = yes;
CODE: load = MAIN, type = ro;
RODATA: load = MAIN, type = ro;
DATA: load = MAIN, type = rw;
INIT: load = MAIN, type = rw;
ONCE: load = MAIN, type = ro, define = yes;
BASTAIL: load = MAIN, type = ro, optional = yes;
BSS: load = BSS, type = bss, define = yes;
}
FEATURES {
CONDES: type = constructor,
label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__,
segment = INIT;
segment = ONCE;
CONDES: type = destructor,
label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__,

View File

@ -2,24 +2,24 @@ SYMBOLS {
__STACKSIZE__: type = weak, value = $0800; # 2k stack
}
MEMORY {
ZP: file = "", define = yes, start = $0070, size = $0020;
RAM: file = %O, start = $0E00, size = $7200 - __STACKSIZE__;
ZP: file = "", define = yes, start = $0070, size = $0020;
MAIN: file = %O, start = $0E00, size = $7200 - __STACKSIZE__;
}
SEGMENTS {
STARTUP: load = RAM, type = ro, define = yes;
LOWCODE: load = RAM, type = ro, optional = yes;
INIT: load = RAM, type = ro, define = yes, optional = yes;
CODE: load = RAM, type = ro;
RODATA: load = RAM, type = ro;
DATA: load = RAM, type = rw;
BSS: load = RAM, type = bss, define = yes;
ZEROPAGE: load = ZP, type = zp;
ZEROPAGE: load = ZP, type = zp;
STARTUP: load = MAIN, type = ro, define = yes;
LOWCODE: load = MAIN, type = ro, optional = yes;
ONCE: load = MAIN, type = ro, optional = yes;
CODE: load = MAIN, type = ro;
RODATA: load = MAIN, type = ro;
DATA: load = MAIN, type = rw;
BSS: load = MAIN, type = bss, define = yes;
}
FEATURES {
CONDES: type = constructor,
label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__,
segment = INIT;
segment = ONCE;
CONDES: type = destructor,
label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__,

20
cfg/c128-asm.cfg Normal file
View File

@ -0,0 +1,20 @@
FEATURES {
STARTADDRESS: default = $1c01;
}
SYMBOLS {
__LOADADDR__: type = import;
}
MEMORY {
ZP: file = "", start = $0002, size = $00FE, define = yes;
LOADADDR: file = %O, start = %S - 2, size = $0002;
MAIN: file = %O, start = %S, size = $D000 - %S;
}
SEGMENTS {
ZEROPAGE: load = ZP, type = zp, optional = yes;
LOADADDR: load = LOADADDR, type = ro;
EXEHDR: load = MAIN, type = ro, optional = yes;
CODE: load = MAIN, type = rw;
RODATA: load = MAIN, type = ro, optional = yes;
DATA: load = MAIN, type = rw, optional = yes;
BSS: load = MAIN, type = bss, optional = yes, define = yes;
}

View File

@ -9,7 +9,7 @@ MEMORY {
ZP: file = "", define = yes, start = $0002, size = $001A;
LOADADDR: file = %O, start = $1BFF, size = $0002;
HEADER: file = %O, start = $1C01, size = $000C;
RAM: file = %O, define = yes, start = $1C0D, size = $A3F3 - __OVERLAYSIZE__ - __STACKSIZE__;
MAIN: file = %O, define = yes, start = $1C0D, size = $A3F3 - __OVERLAYSIZE__ - __STACKSIZE__;
OVL1ADDR: file = "%O.1", start = $BFFE - __OVERLAYSIZE__, size = $0002;
OVL1: file = "%O.1", start = $C000 - __OVERLAYSIZE__, size = __OVERLAYSIZE__;
OVL2ADDR: file = "%O.2", start = $BFFE - __OVERLAYSIZE__, size = $0002;
@ -30,17 +30,17 @@ MEMORY {
OVL9: file = "%O.9", start = $C000 - __OVERLAYSIZE__, size = __OVERLAYSIZE__;
}
SEGMENTS {
ZEROPAGE: load = ZP, type = zp;
LOADADDR: load = LOADADDR, type = ro;
EXEHDR: load = HEADER, type = ro;
STARTUP: load = RAM, type = ro;
LOWCODE: load = RAM, type = ro, optional = yes;
INIT: load = RAM, type = ro, define = yes, optional = yes;
CODE: load = RAM, type = ro;
RODATA: load = RAM, type = ro;
DATA: load = RAM, type = rw;
INITBSS: load = RAM, type = bss;
BSS: load = RAM, type = bss, define = yes;
ZEROPAGE: load = ZP, type = zp;
STARTUP: load = MAIN, type = ro;
LOWCODE: load = MAIN, type = ro, optional = yes;
ONCE: load = MAIN, type = ro, optional = yes;
CODE: load = MAIN, type = ro;
RODATA: load = MAIN, type = ro;
DATA: load = MAIN, type = rw;
INIT: load = MAIN, type = bss;
BSS: load = MAIN, type = bss, define = yes;
OVL1ADDR: load = OVL1ADDR, type = ro;
OVERLAY1: load = OVL1, type = ro, define = yes, optional = yes;
OVL2ADDR: load = OVL2ADDR, type = ro;
@ -64,7 +64,7 @@ FEATURES {
CONDES: type = constructor,
label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__,
segment = INIT;
segment = ONCE;
CONDES: type = destructor,
label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__,

View File

@ -7,26 +7,26 @@ MEMORY {
ZP: file = "", define = yes, start = $0002, size = $001A;
LOADADDR: file = %O, start = $1BFF, size = $0002;
HEADER: file = %O, start = $1C01, size = $000C;
RAM: file = %O, define = yes, start = $1C0D, size = $A3F3 - __STACKSIZE__;
MAIN: file = %O, define = yes, start = $1C0D, size = $A3F3 - __STACKSIZE__;
}
SEGMENTS {
ZEROPAGE: load = ZP, type = zp;
LOADADDR: load = LOADADDR, type = ro;
EXEHDR: load = HEADER, type = ro;
STARTUP: load = RAM, type = ro;
LOWCODE: load = RAM, type = ro, optional = yes;
INIT: load = RAM, type = ro, define = yes, optional = yes;
CODE: load = RAM, type = ro;
RODATA: load = RAM, type = ro;
DATA: load = RAM, type = rw;
INITBSS: load = RAM, type = bss;
BSS: load = RAM, type = bss, define = yes;
ZEROPAGE: load = ZP, type = zp;
STARTUP: load = MAIN, type = ro;
LOWCODE: load = MAIN, type = ro, optional = yes;
ONCE: load = MAIN, type = ro, optional = yes;
CODE: load = MAIN, type = ro;
RODATA: load = MAIN, type = ro;
DATA: load = MAIN, type = rw;
INIT: load = MAIN, type = bss;
BSS: load = MAIN, type = bss, define = yes;
}
FEATURES {
CONDES: type = constructor,
label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__,
segment = INIT;
segment = ONCE;
CONDES: type = destructor,
label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__,

39
cfg/c16-32k.cfg Normal file
View File

@ -0,0 +1,39 @@
SYMBOLS {
__LOADADDR__: type = import;
__EXEHDR__: type = import;
__STACKSIZE__: type = weak, value = $0800; # 2k stack
}
MEMORY {
ZP: file = "", define = yes, start = $0002, size = $001A;
LOADADDR: file = %O, start = $0FFF, size = $0002;
HEADER: file = %O, start = $1001, size = $000C;
MAIN: file = %O, start = $100D, size = $6FF3 - __STACKSIZE__;
}
SEGMENTS {
ZEROPAGE: load = ZP, type = zp;
LOADADDR: load = LOADADDR, type = ro;
EXEHDR: load = HEADER, type = ro;
STARTUP: load = MAIN, type = ro;
LOWCODE: load = MAIN, type = ro, optional = yes;
ONCE: load = MAIN, type = ro, optional = yes;
CODE: load = MAIN, type = ro;
RODATA: load = MAIN, type = ro;
DATA: load = MAIN, type = rw;
INIT: load = MAIN, type = bss;
BSS: load = MAIN, type = bss, define = yes;
}
FEATURES {
CONDES: type = constructor,
label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__,
segment = ONCE;
CONDES: type = destructor,
label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__,
segment = RODATA;
CONDES: type = interruptor,
label = __INTERRUPTOR_TABLE__,
count = __INTERRUPTOR_COUNT__,
segment = RODATA,
import = __CALLIRQ__;
}

View File

@ -1,32 +1,32 @@
SYMBOLS {
__LOADADDR__: type = import;
__EXEHDR__: type = import;
__STACKSIZE__: type = weak, value = $0800; # 2k stack
__STACKSIZE__: type = weak, value = $0400; # 1k stack
}
MEMORY {
ZP: file = "", define = yes, start = $0002, size = $001A;
LOADADDR: file = %O, start = $0FFF, size = $0002;
HEADER: file = %O, start = $1001, size = $000C;
RAM: file = %O, start = $100D, size = $6FF3 - __STACKSIZE__;
MAIN: file = %O, start = $100D, size = $2FF3 - __STACKSIZE__;
}
SEGMENTS {
ZEROPAGE: load = ZP, type = zp;
LOADADDR: load = LOADADDR, type = ro;
EXEHDR: load = HEADER, type = ro;
STARTUP: load = RAM, type = ro;
LOWCODE: load = RAM, type = ro, optional = yes;
INIT: load = RAM, type = ro, define = yes, optional = yes;
CODE: load = RAM, type = ro;
RODATA: load = RAM, type = ro;
DATA: load = RAM, type = rw;
INITBSS: load = RAM, type = bss;
BSS: load = RAM, type = bss, define = yes;
ZEROPAGE: load = ZP, type = zp;
EXEHDR: load = HEADER, type = ro;
STARTUP: load = MAIN, type = ro;
LOWCODE: load = MAIN, type = ro, optional = yes;
ONCE: load = MAIN, type = ro, optional = yes;
CODE: load = MAIN, type = ro;
RODATA: load = MAIN, type = ro;
DATA: load = MAIN, type = rw;
INIT: load = MAIN, type = bss;
BSS: load = MAIN, type = bss, define = yes;
}
FEATURES {
CONDES: type = constructor,
label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__,
segment = INIT;
segment = ONCE;
CONDES: type = destructor,
label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__,

View File

@ -5,16 +5,16 @@ SYMBOLS {
__LOADADDR__: type = import;
}
MEMORY {
ZP: file = "", start = $0002, size = $001A, define = yes;
ZP: file = "", start = $0002, size = $00FE, define = yes;
LOADADDR: file = %O, start = %S - 2, size = $0002;
RAM: file = %O, start = %S, size = $D000 - %S;
MAIN: file = %O, start = %S, size = $D000 - %S;
}
SEGMENTS {
LOADADDR: load = LOADADDR, type = ro;
EXEHDR: load = RAM, type = ro, optional = yes;
CODE: load = RAM, type = rw, optional = yes;
RODATA: load = RAM, type = ro, optional = yes;
DATA: load = RAM, type = rw, optional = yes;
BSS: load = RAM, type = bss, optional = yes;
ZEROPAGE: load = ZP, type = zp, optional = yes;
LOADADDR: load = LOADADDR, type = ro;
EXEHDR: load = MAIN, type = ro, optional = yes;
CODE: load = MAIN, type = rw;
RODATA: load = MAIN, type = ro, optional = yes;
DATA: load = MAIN, type = rw, optional = yes;
BSS: load = MAIN, type = bss, optional = yes, define = yes;
}

View File

@ -1,5 +1,5 @@
FEATURES {
STARTADDRESS: default = $0801;
STARTADDRESS: default = $0801;
}
SYMBOLS {
__LOADADDR__: type = import;
@ -14,9 +14,8 @@ MEMORY {
ZP: file = "", define = yes, start = $0002, size = $001A;
LOADADDR: file = %O, start = %S - 2, size = $0002;
HEADER: file = %O, define = yes, start = %S, size = $000D;
MAIN: file = %O, define = yes, start = __HEADER_LAST__, size = __OVERLAYSTART__ - __STACKSIZE__ - __HEADER_LAST__;
MOVE: file = %O, start = __INITBSS_LOAD__, size = __HIMEM__ - __BSS_RUN__;
INIT: file = "", start = __BSS_RUN__, size = __HIMEM__ - __BSS_RUN__;
MAIN: file = %O, define = yes, start = __HEADER_LAST__, size = __OVERLAYSTART__ - __HEADER_LAST__;
BSS: file = "", start = __ONCE_RUN__, size = __OVERLAYSTART__ - __STACKSIZE__ - __ONCE_RUN__;
OVL1ADDR: file = "%O.1", start = __OVERLAYSTART__ - 2, size = $0002;
OVL1: file = "%O.1", start = __OVERLAYSTART__, size = __OVERLAYSIZE__;
OVL2ADDR: file = "%O.2", start = __OVERLAYSTART__ - 2, size = $0002;
@ -37,41 +36,41 @@ MEMORY {
OVL9: file = "%O.9", start = __OVERLAYSTART__, size = __OVERLAYSIZE__;
}
SEGMENTS {
ZEROPAGE: load = ZP, type = zp;
LOADADDR: load = LOADADDR, type = ro;
EXEHDR: load = HEADER, type = ro;
STARTUP: load = MAIN, type = ro;
LOWCODE: load = MAIN, type = ro, optional = yes;
CODE: load = MAIN, type = ro;
RODATA: load = MAIN, type = ro;
DATA: load = MAIN, type = rw;
INITBSS: load = MAIN, type = bss, define = yes;
BSS: load = MAIN, type = bss, define = yes;
INIT: load = MOVE, run = INIT, type = ro, define = yes;
OVL1ADDR: load = OVL1ADDR, type = ro;
OVERLAY1: load = OVL1, type = ro, define = yes, optional = yes;
OVL2ADDR: load = OVL2ADDR, type = ro;
OVERLAY2: load = OVL2, type = ro, define = yes, optional = yes;
OVL3ADDR: load = OVL3ADDR, type = ro;
OVERLAY3: load = OVL3, type = ro, define = yes, optional = yes;
OVL4ADDR: load = OVL4ADDR, type = ro;
OVERLAY4: load = OVL4, type = ro, define = yes, optional = yes;
OVL5ADDR: load = OVL5ADDR, type = ro;
OVERLAY5: load = OVL5, type = ro, define = yes, optional = yes;
OVL6ADDR: load = OVL6ADDR, type = ro;
OVERLAY6: load = OVL6, type = ro, define = yes, optional = yes;
OVL7ADDR: load = OVL7ADDR, type = ro;
OVERLAY7: load = OVL7, type = ro, define = yes, optional = yes;
OVL8ADDR: load = OVL8ADDR, type = ro;
OVERLAY8: load = OVL8, type = ro, define = yes, optional = yes;
OVL9ADDR: load = OVL9ADDR, type = ro;
OVERLAY9: load = OVL9, type = ro, define = yes, optional = yes;
ZEROPAGE: load = ZP, type = zp;
LOADADDR: load = LOADADDR, type = ro;
EXEHDR: load = HEADER, type = ro;
STARTUP: load = MAIN, type = ro;
LOWCODE: load = MAIN, type = ro, optional = yes;
CODE: load = MAIN, type = ro;
RODATA: load = MAIN, type = ro;
DATA: load = MAIN, type = rw;
INIT: load = MAIN, type = rw;
ONCE: load = MAIN, type = ro, define = yes;
BSS: load = BSS, type = bss, define = yes;
OVL1ADDR: load = OVL1ADDR, type = ro;
OVERLAY1: load = OVL1, type = ro, define = yes, optional = yes;
OVL2ADDR: load = OVL2ADDR, type = ro;
OVERLAY2: load = OVL2, type = ro, define = yes, optional = yes;
OVL3ADDR: load = OVL3ADDR, type = ro;
OVERLAY3: load = OVL3, type = ro, define = yes, optional = yes;
OVL4ADDR: load = OVL4ADDR, type = ro;
OVERLAY4: load = OVL4, type = ro, define = yes, optional = yes;
OVL5ADDR: load = OVL5ADDR, type = ro;
OVERLAY5: load = OVL5, type = ro, define = yes, optional = yes;
OVL6ADDR: load = OVL6ADDR, type = ro;
OVERLAY6: load = OVL6, type = ro, define = yes, optional = yes;
OVL7ADDR: load = OVL7ADDR, type = ro;
OVERLAY7: load = OVL7, type = ro, define = yes, optional = yes;
OVL8ADDR: load = OVL8ADDR, type = ro;
OVERLAY8: load = OVL8, type = ro, define = yes, optional = yes;
OVL9ADDR: load = OVL9ADDR, type = ro;
OVERLAY9: load = OVL9, type = ro, define = yes, optional = yes;
}
FEATURES {
CONDES: type = constructor,
label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__,
segment = INIT;
segment = ONCE;
CONDES: type = destructor,
label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__,

View File

@ -1,5 +1,5 @@
FEATURES {
STARTADDRESS: default = $0801;
STARTADDRESS: default = $0801;
}
SYMBOLS {
__LOADADDR__: type = import;
@ -8,31 +8,30 @@ SYMBOLS {
__HIMEM__: type = weak, value = $D000;
}
MEMORY {
ZP: file = "", define = yes, start = $0002, size = $001A;
LOADADDR: file = %O, start = %S - 2, size = $0002;
HEADER: file = %O, define = yes, start = %S, size = $000D;
MAIN: file = %O, define = yes, start = __HEADER_LAST__, size = __HIMEM__ - __STACKSIZE__ - __HEADER_LAST__;
MOVE: file = %O, start = __INITBSS_LOAD__, size = __HIMEM__ - __BSS_RUN__;
INIT: file = "", start = __BSS_RUN__, size = __HIMEM__ - __BSS_RUN__;
ZP: file = "", define = yes, start = $0002, size = $001A;
LOADADDR: file = %O, start = %S - 2, size = $0002;
HEADER: file = %O, define = yes, start = %S, size = $000D;
MAIN: file = %O, define = yes, start = __HEADER_LAST__, size = __HIMEM__ - __HEADER_LAST__;
BSS: file = "", start = __ONCE_RUN__, size = __HIMEM__ - __STACKSIZE__ - __ONCE_RUN__;
}
SEGMENTS {
ZEROPAGE: load = ZP, type = zp;
LOADADDR: load = LOADADDR, type = ro;
EXEHDR: load = HEADER, type = ro;
STARTUP: load = MAIN, type = ro;
LOWCODE: load = MAIN, type = ro, optional = yes;
CODE: load = MAIN, type = ro;
RODATA: load = MAIN, type = ro;
DATA: load = MAIN, type = rw;
INITBSS: load = MAIN, type = bss, define = yes;
BSS: load = MAIN, type = bss, define = yes;
INIT: load = MOVE, run = INIT, type = ro, define = yes;
ZEROPAGE: load = ZP, type = zp;
LOADADDR: load = LOADADDR, type = ro;
EXEHDR: load = HEADER, type = ro;
STARTUP: load = MAIN, type = ro;
LOWCODE: load = MAIN, type = ro, optional = yes;
CODE: load = MAIN, type = ro;
RODATA: load = MAIN, type = ro;
DATA: load = MAIN, type = rw;
INIT: load = MAIN, type = rw;
ONCE: load = MAIN, type = ro, define = yes;
BSS: load = BSS, type = bss, define = yes;
}
FEATURES {
CONDES: type = constructor,
label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__,
segment = INIT;
segment = ONCE;
CONDES: type = destructor,
label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__,

View File

@ -8,30 +8,30 @@ MEMORY {
STARTUP: file = %O, start = $00FE, size = $0102, fill = yes;
PAGE2: file = %O, start = $0200, size = $0100, fill = yes;
PAGE3: file = %O, start = $0300, size = $0100, fill = yes;
RAM: file = %O, start = $0400, size = $DC00;
MAIN: file = %O, start = $0400, size = $DC00;
CHARRAM: file = "", define = yes, start = $E000, size = $1000;
VIDRAM: file = "", define = yes, start = $F000, size = $0400;
}
SEGMENTS {
ZEROPAGE: load = ZP, type = zp;
EXTZP: load = ZP, type = rw, define = yes;
EXEHDR: load = HEADER, type = rw;
STARTUP: load = STARTUP, type = rw;
PAGE2: load = PAGE2, type = rw;
PAGE3: load = PAGE3, type = rw;
LOWCODE: load = RAM, type = ro, optional = yes;
INIT: load = RAM, type = ro, define = yes, optional = yes;
CODE: load = RAM, type = ro;
RODATA: load = RAM, type = ro;
DATA: load = RAM, type = rw;
INITBSS: load = RAM, type = bss;
BSS: load = RAM, type = bss, define = yes;
ZEROPAGE: load = ZP, type = zp;
EXTZP: load = ZP, type = rw, define = yes;
LOWCODE: load = MAIN, type = ro, optional = yes;
ONCE: load = MAIN, type = ro, optional = yes;
CODE: load = MAIN, type = ro;
RODATA: load = MAIN, type = ro;
DATA: load = MAIN, type = rw;
INIT: load = MAIN, type = bss, optional = yes;
BSS: load = MAIN, type = bss, define = yes;
}
FEATURES {
CONDES: type = constructor,
label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__,
segment = INIT;
segment = ONCE;
CONDES: type = destructor,
label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__,

View File

@ -7,28 +7,28 @@ MEMORY {
STARTUP: file = %O, start = $00FE, size = $0102, fill = yes;
PAGE2: file = %O, start = $0200, size = $0100, fill = yes;
PAGE3: file = %O, start = $0300, size = $0100, fill = yes;
RAM: file = %O, start = $0400, size = $FECB - __STACKSIZE__;
MAIN: file = %O, start = $0400, size = $FECB - __STACKSIZE__;
}
SEGMENTS {
ZEROPAGE: load = ZP, type = zp;
EXTZP: load = ZP, type = rw, define = yes;
EXEHDR: load = HEADER, type = rw;
STARTUP: load = STARTUP, type = rw;
PAGE2: load = PAGE2, type = rw;
PAGE3: load = PAGE3, type = rw;
LOWCODE: load = RAM, type = ro, optional = yes;
INIT: load = RAM, type = ro, define = yes, optional = yes;
CODE: load = RAM, type = ro;
RODATA: load = RAM, type = ro;
DATA: load = RAM, type = rw;
INITBSS: load = RAM, type = bss;
BSS: load = RAM, type = bss, define = yes;
ZEROPAGE: load = ZP, type = zp;
EXTZP: load = ZP, type = rw, define = yes;
LOWCODE: load = MAIN, type = ro, optional = yes;
ONCE: load = MAIN, type = ro, optional = yes;
CODE: load = MAIN, type = ro;
RODATA: load = MAIN, type = ro;
DATA: load = MAIN, type = rw;
INIT: load = MAIN, type = bss, optional = yes;
BSS: load = MAIN, type = bss, define = yes;
}
FEATURES {
CONDES: type = constructor,
label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__,
segment = INIT;
segment = ONCE;
CONDES: type = destructor,
label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__,

36
cfg/creativision.cfg Normal file
View File

@ -0,0 +1,36 @@
SYMBOLS {
__STACKSIZE__: type = weak, value = $0040;
}
MEMORY {
ZP: file = "", define = yes, start = $0020, size = $00E0;
RAM: file = "", define = yes, start = $01FA, size = $0206 - __STACKSIZE__;
ROM: file = %O, define = yes, start = $B000, size = $1000, fill = yes, fillval = $FF;
}
SEGMENTS {
ZEROPAGE: load = ZP, type = zp;
ZP: load = ZP, type = zp, optional = yes;
VECTORS: load = ROM, run = RAM, type = rw, define = yes;
DATA: load = ROM, run = RAM, type = rw, define = yes, start = $0204;
BSS: load = RAM, type = bss, define = yes;
ONCE: load = ROM, type = ro, optional = yes;
CODE: load = ROM, type = ro;
INIT: load = ROM, type = ro;
RODATA: load = ROM, type = ro;
AUDIO: load = ROM, type = ro, optional = yes, start = $BF00;
SETUP: load = ROM, type = ro, start = $BFE8;
}
FEATURES {
CONDES: type = constructor,
label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__,
segment = INIT;
CONDES: type = destructor,
label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__,
segment = RODATA;
CONDES: type = interruptor,
label = __INTERRUPTOR_TABLE__,
count = __INTERRUPTOR_COUNT__,
segment = RODATA,
import = __CALLIRQ__;
}

45
cfg/cx16-asm.cfg Normal file
View File

@ -0,0 +1,45 @@
# Assembly configuration for R38
FEATURES {
STARTADDRESS: default = $0801;
}
SYMBOLS {
__LOADADDR__: type = import;
# Putting "-u __EXEHDR__" on cl65's command line will add a BASIC RUN stub to your program.
# __EXEHDR__: type = import;
__HIMEM__: type = weak, value = $9F00;
}
MEMORY {
ZP: file = "", start = $0022, size = $0080 - $0022, define = yes;
ZP2: file = "", start = $00A9, size = $0100 - $00A9;
LOADADDR: file = %O, start = %S - 2, size = $0002;
MAIN: file = %O, start = %S, size = __HIMEM__ - %S;
}
SEGMENTS {
ZEROPAGE: load = ZP, type = zp;
EXTZP: load = ZP2, type = zp, optional = yes; # OK if BASIC functions not used
LOADADDR: load = LOADADDR, type = ro;
EXEHDR: load = MAIN, type = ro, optional = yes;
CODE: load = MAIN, type = ro;
LOWCODE: load = MAIN, type = ro, optional = yes;
ONCE: load = MAIN, type = ro, optional = yes;
RODATA: load = MAIN, type = ro;
DATA: load = MAIN, type = rw;
INIT: load = MAIN, type = bss, optional = yes;
BSS: load = MAIN, type = bss, define = yes;
}
FEATURES {
CONDES: type = constructor,
label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__,
segment = ONCE;
CONDES: type = destructor,
label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__,
segment = RODATA;
CONDES: type = interruptor,
label = __INTERRUPTOR_TABLE__,
count = __INTERRUPTOR_COUNT__,
segment = RODATA,
import = __CALLIRQ__;
}

108
cfg/cx16-bank.cfg Normal file
View File

@ -0,0 +1,108 @@
FEATURES {
STARTADDRESS: default = $0801;
}
SYMBOLS {
__LOADADDR__: type = import;
__EXEHDR__: type = import;
__BANKRAMADDR__: type = import;
__STACKSIZE__: type = weak, value = $0800; # 2K stack
__HIMEM__: type = weak, value = $9F00;
__BANKRAMSTART__: type = export, value = $A000;
__BANKRAMSIZE__: type = weak, value = $2000; # 8K banked RAM
}
MEMORY {
ZP: file = "", define = yes, start = $0022, size = $0080 - $0022;
LOADADDR: file = %O, start = %S - 2, size = $0002;
HEADER: file = %O, define = yes, start = %S, size = $000D;
MAIN: file = %O, define = yes, start = __HEADER_LAST__, size = __HIMEM__ - __HEADER_LAST__;
BSS: file = "", start = __ONCE_RUN__, size = __HIMEM__ - __ONCE_RUN__ - __STACKSIZE__;
BRAM01ADDR: file = "%O.01", start = __BANKRAMSTART__ - 2, size = $0002;
BRAM01: file = "%O.01", start = __BANKRAMSTART__, size = __BANKRAMSIZE__, bank = $01;
BRAM02ADDR: file = "%O.02", start = __BANKRAMSTART__ - 2, size = $0002;
BRAM02: file = "%O.02", start = __BANKRAMSTART__, size = __BANKRAMSIZE__, bank = $02;
BRAM03ADDR: file = "%O.03", start = __BANKRAMSTART__ - 2, size = $0002;
BRAM03: file = "%O.03", start = __BANKRAMSTART__, size = __BANKRAMSIZE__, bank = $03;
BRAM04ADDR: file = "%O.04", start = __BANKRAMSTART__ - 2, size = $0002;
BRAM04: file = "%O.04", start = __BANKRAMSTART__, size = __BANKRAMSIZE__, bank = $04;
BRAM05ADDR: file = "%O.05", start = __BANKRAMSTART__ - 2, size = $0002;
BRAM05: file = "%O.05", start = __BANKRAMSTART__, size = __BANKRAMSIZE__, bank = $05;
BRAM06ADDR: file = "%O.06", start = __BANKRAMSTART__ - 2, size = $0002;
BRAM06: file = "%O.06", start = __BANKRAMSTART__, size = __BANKRAMSIZE__, bank = $06;
BRAM07ADDR: file = "%O.07", start = __BANKRAMSTART__ - 2, size = $0002;
BRAM07: file = "%O.07", start = __BANKRAMSTART__, size = __BANKRAMSIZE__, bank = $07;
BRAM08ADDR: file = "%O.08", start = __BANKRAMSTART__ - 2, size = $0002;
BRAM08: file = "%O.08", start = __BANKRAMSTART__, size = __BANKRAMSIZE__, bank = $08;
BRAM09ADDR: file = "%O.09", start = __BANKRAMSTART__ - 2, size = $0002;
BRAM09: file = "%O.09", start = __BANKRAMSTART__, size = __BANKRAMSIZE__, bank = $09;
BRAM0AADDR: file = "%O.0A", start = __BANKRAMSTART__ - 2, size = $0002;
BRAM0A: file = "%O.0A", start = __BANKRAMSTART__, size = __BANKRAMSIZE__, bank = $0A;
BRAM0BADDR: file = "%O.0B", start = __BANKRAMSTART__ - 2, size = $0002;
BRAM0B: file = "%O.0B", start = __BANKRAMSTART__, size = __BANKRAMSIZE__, bank = $0B;
BRAM0CADDR: file = "%O.0C", start = __BANKRAMSTART__ - 2, size = $0002;
BRAM0C: file = "%O.0C", start = __BANKRAMSTART__, size = __BANKRAMSIZE__, bank = $0C;
BRAM0DADDR: file = "%O.0D", start = __BANKRAMSTART__ - 2, size = $0002;
BRAM0D: file = "%O.0D", start = __BANKRAMSTART__, size = __BANKRAMSIZE__, bank = $0D;
BRAM0EADDR: file = "%O.0E", start = __BANKRAMSTART__ - 2, size = $0002;
BRAM0E: file = "%O.0E", start = __BANKRAMSTART__, size = __BANKRAMSIZE__, bank = $0E;
BRAM0FADDR: file = "%O.0F", start = __BANKRAMSTART__ - 2, size = $0002;
BRAM0F: file = "%O.0F", start = __BANKRAMSTART__, size = __BANKRAMSIZE__, bank = $0F;
}
SEGMENTS {
ZEROPAGE: load = ZP, type = zp;
EXTZP: load = ZP, type = zp, optional = yes;
LOADADDR: load = LOADADDR, type = ro;
EXEHDR: load = HEADER, type = ro;
STARTUP: load = MAIN, type = ro, optional = yes;
LOWCODE: load = MAIN, type = ro, optional = yes;
CODE: load = MAIN, type = ro;
RODATA: load = MAIN, type = ro;
DATA: load = MAIN, type = rw;
INIT: load = MAIN, type = rw, optional = yes;
ONCE: load = MAIN, type = ro, define = yes;
BSS: load = BSS, type = bss, define = yes;
BRAM01ADDR: load = BRAM01ADDR, type = ro, optional = yes;
BANKRAM01: load = BRAM01, type = rw, optional = yes, define = yes;
BRAM02ADDR: load = BRAM02ADDR, type = ro, optional = yes;
BANKRAM02: load = BRAM02, type = rw, optional = yes, define = yes;
BRAM03ADDR: load = BRAM03ADDR, type = ro, optional = yes;
BANKRAM03: load = BRAM03, type = rw, optional = yes, define = yes;
BRAM04ADDR: load = BRAM04ADDR, type = ro, optional = yes;
BANKRAM04: load = BRAM04, type = rw, optional = yes, define = yes;
BRAM05ADDR: load = BRAM05ADDR, type = ro, optional = yes;
BANKRAM05: load = BRAM05, type = rw, optional = yes, define = yes;
BRAM06ADDR: load = BRAM06ADDR, type = ro, optional = yes;
BANKRAM06: load = BRAM06, type = rw, optional = yes, define = yes;
BRAM07ADDR: load = BRAM07ADDR, type = ro, optional = yes;
BANKRAM07: load = BRAM07, type = rw, optional = yes, define = yes;
BRAM08ADDR: load = BRAM08ADDR, type = ro, optional = yes;
BANKRAM08: load = BRAM08, type = rw, optional = yes, define = yes;
BRAM09ADDR: load = BRAM09ADDR, type = ro, optional = yes;
BANKRAM09: load = BRAM09, type = rw, optional = yes, define = yes;
BRAM0AADDR: load = BRAM0AADDR, type = ro, optional = yes;
BANKRAM0A: load = BRAM0A, type = rw, optional = yes, define = yes;
BRAM0BADDR: load = BRAM0BADDR, type = ro, optional = yes;
BANKRAM0B: load = BRAM0B, type = rw, optional = yes, define = yes;
BRAM0CADDR: load = BRAM0CADDR, type = ro, optional = yes;
BANKRAM0C: load = BRAM0C, type = rw, optional = yes, define = yes;
BRAM0DADDR: load = BRAM0DADDR, type = ro, optional = yes;
BANKRAM0D: load = BRAM0D, type = rw, optional = yes, define = yes;
BRAM0EADDR: load = BRAM0EADDR, type = ro, optional = yes;
BANKRAM0E: load = BRAM0E, type = rw, optional = yes, define = yes;
BRAM0FADDR: load = BRAM0FADDR, type = ro, optional = yes;
BANKRAM0F: load = BRAM0F, type = rw, optional = yes, define = yes;
}
FEATURES {
CONDES: type = constructor,
label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__,
segment = ONCE;
CONDES: type = destructor,
label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__,
segment = RODATA;
CONDES: type = interruptor,
label = __INTERRUPTOR_TABLE__,
count = __INTERRUPTOR_COUNT__,
segment = RODATA,
import = __CALLIRQ__;
}

45
cfg/cx16.cfg Normal file
View File

@ -0,0 +1,45 @@
FEATURES {
STARTADDRESS: default = $0801;
}
SYMBOLS {
__LOADADDR__: type = import;
__EXEHDR__: type = import;
__STACKSIZE__: type = weak, value = $0800; # 2k stack
__HIMEM__: type = weak, value = $9F00;
}
MEMORY {
ZP: file = "", define = yes, start = $0022, size = $0080 - $0022;
LOADADDR: file = %O, start = %S - 2, size = $0002;
HEADER: file = %O, define = yes, start = %S, size = $000D;
MAIN: file = %O, define = yes, start = __HEADER_LAST__, size = __HIMEM__ - __HEADER_LAST__;
BSS: file = "", start = __ONCE_RUN__, size = __HIMEM__ - __ONCE_RUN__ - __STACKSIZE__;
}
SEGMENTS {
ZEROPAGE: load = ZP, type = zp;
EXTZP: load = ZP, type = zp, optional = yes;
LOADADDR: load = LOADADDR, type = ro;
EXEHDR: load = HEADER, type = ro;
STARTUP: load = MAIN, type = ro, optional = yes;
LOWCODE: load = MAIN, type = ro, optional = yes;
CODE: load = MAIN, type = ro;
RODATA: load = MAIN, type = ro;
DATA: load = MAIN, type = rw;
INIT: load = MAIN, type = rw, optional = yes;
ONCE: load = MAIN, type = ro, define = yes;
BSS: load = BSS, type = bss, define = yes;
}
FEATURES {
CONDES: type = constructor,
label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__,
segment = ONCE;
CONDES: type = destructor,
label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__,
segment = RODATA;
CONDES: type = interruptor,
label = __INTERRUPTOR_TABLE__,
count = __INTERRUPTOR_COUNT__,
segment = RODATA,
import = __CALLIRQ__;
}

View File

@ -1,41 +1,51 @@
# linker config to produce simple Gamate cartridge (.bin)
SYMBOLS {
__STARTUP__: type = import;
__STACKSIZE__: type = weak, value = $0080; # 1 page stack
__STARTUP__: type = import;
__STACKSIZE__: type = weak, value = $0080; # 1 page stack
}
MEMORY {
# 0000-03ff is RAM
# FIXME: what zp range can we actually use?
# $0a-$11 is used by IRQ/NMI, $e8 is used by NMI
ZP: start = $0012, size = $e8 - $12;
CPUSTACK: start = $0100, size =$100;
RAM: start = $0200, size = $200 - __STACKSIZE__, define = yes;
# 0000-03ff is RAM
# FIXME: what zp range can we actually use?
# $0a-$11 is used by IRQ/NMI, $e8 is used by NMI
ZP: start = $0012, size = $00E8 - $0012;
CPUSTACK: start = $0100, size = $0100;
RAM: start = $0200, size = $0200 - __STACKSIZE__, define = yes;
CARTHEADER: file = %O, define = yes, start = %S, size = $0029;
# 6000-e000 can be (Cartridge) ROM
# WARNING: fill value must be $00 else it will no more work
#ROM: start = $6000, size = $1000, fill = yes, fillval = $00, file = %O, define = yes;
#ROMFILL: start = $7000, size = $7000, fill = yes, fillval = $00, file = %O, define = yes;
# for images that have code >$6fff we must calculate the checksum!
ROM: start = $6000 + $29, size = $8000 - $29, fill = yes, fillval = $00, file = %O, define = yes;
CARTHEADER: file = %O, define = yes, start = %S, size = $0029;
# 6000-e000 can be (Cartridge) ROM
# WARNING: fill value must be $00 else it will no more work
#ROM: start = $6000, size = $1000, fill = yes, fillval = $00, file = %O, define = yes;
#ROMFILL: start = $7000, size = $7000, fill = yes, fillval = $00, file = %O, define = yes;
# for images that have code >$6fff we must calculate the checksum!
ROM: start = $6000 + $0029, size = $8000 - $0029, fill = yes, fillval = $00, file = %O, define = yes;
}
SEGMENTS {
ZEROPAGE: load = ZP, type = zp, define = yes;
EXTZP: load = ZP, type = zp, define = yes, optional = yes;
APPZP: load = ZP, type = zp, define = yes, optional = yes;
STARTUP: load = CARTHEADER, type = ro, define=yes;
INIT: load = ROM, type = ro, define = yes, optional = yes;
CODE: load = ROM, type = ro, define=yes;
RODATA: load = ROM, type = ro, define=yes;
DATA: load = ROM, run=RAM, type = rw, define = yes;
BSS: load = RAM, type = bss, define = yes;
ZEROPAGE: load = ZP, type = zp, define = yes;
EXTZP: load = ZP, type = zp, define = yes, optional = yes;
APPZP: load = ZP, type = zp, define = yes, optional = yes;
STARTUP: load = CARTHEADER, type = ro, define = yes;
ONCE: load = ROM, type = ro, optional = yes;
CODE: load = ROM, type = ro, define = yes;
RODATA: load = ROM, type = ro, define = yes;
DATA: load = ROM, run = RAM, type = rw, define = yes;
BSS: load = RAM, type = bss, define = yes;
}
FEATURES {
CONDES: segment = RODATA, type = constructor, label = __CONSTRUCTOR_TABLE__, count = __CONSTRUCTOR_COUNT__;
CONDES: segment = RODATA, type = destructor, label = __DESTRUCTOR_TABLE__, count = __DESTRUCTOR_COUNT__;
CONDES: segment = RODATA, type = interruptor, label = __INTERRUPTOR_TABLE__, count = __INTERRUPTOR_COUNT__, import = __CALLIRQ__;
CONDES: type = constructor,
label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__,
segment = ONCE;
CONDES: type = destructor,
label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__,
segment = RODATA;
CONDES: type = interruptor,
label = __INTERRUPTOR_TABLE__,
count = __INTERRUPTOR_COUNT__,
segment = RODATA,
import = __CALLIRQ__;
}

View File

@ -1,15 +1,19 @@
FEATURES {
STARTADDRESS: default = $4000;
}
SYMBOLS {
__BACKBUFSIZE__: type = weak, value = $2000;
__HIMEM__: type = weak, value = $C000 - __BACKBUFSIZE__;
__OVERLAYSIZE__: type = weak, value = $0000;
__OVERLAYADDR__: type = weak, value = $C000 - __BACKBUFSIZE__ - __OVERLAYSIZE__;
__STACKSIZE__: type = weak, value = $0400;
__OVERLAYADDR__: type = weak, value = __HIMEM__ - __OVERLAYSIZE__;
__STACKSIZE__: type = weak, value = $0400; # 1k stack
__STACKADDR__: type = weak, value = $2000 - __STACKSIZE__;
}
MEMORY {
CVT: file = %O, start = $0, size = $20000;
ZP: define = yes, start = $80, size = $1A + $06;
EXT: define = yes, start = $0C00, size = __STACKADDR__ - $0C00;
VLIR0: define = yes, start = $4000, size = __OVERLAYADDR__ - $4000;
EXT: define = yes, start = $0C00, size = __STACKADDR__ - __EXT_START__;
VLIR0: define = yes, start = %S, size = __OVERLAYADDR__ - %S;
VLIR1: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__;
VLIR2: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__;
VLIR3: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__;
@ -32,7 +36,7 @@ MEMORY {
}
SEGMENTS {
ZEROPAGE: type = zp, load = ZP;
EXTZP: type = zp, load = ZP, optional = yes;
EXTZP: type = zp, load = ZP, optional = yes;
EXTBSS: type = bss, load = EXT, define = yes, optional = yes;
FILEINFO: type = ro, load = CVT, offset = $002;
RECORDS: type = ro, load = CVT, offset = $100, optional = yes;
@ -40,11 +44,12 @@ SEGMENTS {
VLIRIDX0: type = ro, load = CVT, align = $200, optional = yes;
STARTUP: type = ro, run = VLIR0, load = CVT, align_load = $200, define = yes;
LOWCODE: type = ro, run = VLIR0, load = CVT, optional = yes;
INIT: type = ro, run = VLIR0, load = CVT, define = yes, optional = yes;
ONCE: type = ro, run = VLIR0, load = CVT, optional = yes;
CODE: type = ro, run = VLIR0, load = CVT;
RODATA: type = ro, run = VLIR0, load = CVT;
DATA: type = rw, run = VLIR0, load = CVT;
BSS: type = bss, load = VLIR0, define = yes;
INIT: type = bss, load = VLIR0, optional = yes;
BSS: type = bss, load = VLIR0, define = yes;
VLIRIDX1: type = ro, load = CVT, align = $200, optional = yes;
OVERLAY1: type = ro, run = VLIR1, load = CVT, align_load = $200, optional = yes;
VLIRIDX2: type = ro, load = CVT, align = $200, optional = yes;
@ -88,7 +93,7 @@ FEATURES {
CONDES: type = constructor,
label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__,
segment = INIT;
segment = ONCE;
CONDES: type = destructor,
label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__,

View File

@ -1,14 +1,18 @@
FEATURES {
STARTADDRESS: default = $0400;
}
SYMBOLS {
__BACKBUFSIZE__: type = weak, value = $2000;
__HIMEM__: type = weak, value = $8000 - __BACKBUFSIZE__;
__OVERLAYSIZE__: type = weak, value = $0000;
__OVERLAYADDR__: type = weak, value = $8000 - __BACKBUFSIZE__ - __OVERLAYSIZE__;
__STACKSIZE__: type = weak, value = $0400;
__OVERLAYADDR__: type = weak, value = __HIMEM__ - __OVERLAYSIZE__;
__STACKSIZE__: type = weak, value = $0400; # 1k stack
__STACKADDR__: type = weak, value = __OVERLAYADDR__ - __STACKSIZE__;
}
MEMORY {
CVT: file = %O, start = $0, size = $40000;
ZP: define = yes, start = $58, size = $1A + $06;
VLIR0: define = yes, start = $0400, size = __STACKADDR__ - $0400;
VLIR0: define = yes, start = %S, size = __STACKADDR__ - %S;
VLIR1: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__;
VLIR2: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__;
VLIR3: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__;
@ -31,17 +35,18 @@ MEMORY {
}
SEGMENTS {
ZEROPAGE: type = zp, load = ZP;
EXTZP: type = zp, load = ZP, optional = yes;
EXTZP: type = zp, load = ZP, optional = yes;
DIRENTRY: type = ro, load = CVT, align = $FE;
FILEINFO: type = ro, load = CVT, align = $FE;
RECORDS: type = ro, load = CVT, align = $FE, optional = yes;
STARTUP: type = ro, run = VLIR0, load = CVT, align_load = $FE, define = yes;
LOWCODE: type = ro, run = VLIR0, load = CVT, optional = yes;
INIT: type = ro, run = VLIR0, load = CVT, define = yes, optional = yes;
ONCE: type = ro, run = VLIR0, load = CVT, optional = yes;
CODE: type = ro, run = VLIR0, load = CVT;
RODATA: type = ro, run = VLIR0, load = CVT;
DATA: type = rw, run = VLIR0, load = CVT;
BSS: type = bss, load = VLIR0, define = yes;
INIT: type = bss, load = VLIR0, optional = yes;
BSS: type = bss, load = VLIR0, define = yes;
OVERLAY1: type = ro, run = VLIR1, load = CVT, align_load = $FE, optional = yes;
OVERLAY2: type = ro, run = VLIR2, load = CVT, align_load = $FE, optional = yes;
OVERLAY3: type = ro, run = VLIR3, load = CVT, align_load = $FE, optional = yes;
@ -66,7 +71,7 @@ FEATURES {
CONDES: type = constructor,
label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__,
segment = INIT;
segment = ONCE;
CONDES: type = destructor,
label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__,

View File

@ -5,24 +5,24 @@ SYMBOLS {
__STACKSIZE__: type = weak, value = $0400; # 1k stack (do typical LUnix apps. need 2k?)
}
MEMORY {
ZP: start = $0080, size = $0040;
RAM: start = %S, size = $7600 - __STACKSIZE__;
ZP: start = $0080, size = $0040;
MAIN: start = %S, size = $7600 - __STACKSIZE__;
}
SEGMENTS {
ZEROPAGE: load = ZP, type = zp, define = yes; # Pseudo-registers
STARTUP: load = RAM, type = ro; # First initialization code
LOWCODE: load = RAM, type = ro, optional = yes; # Legacy from other platforms
INIT: load = RAM, type = ro, define = yes, optional = yes; # Library initialization code
CODE: load = RAM, type = ro; # Program
RODATA: load = RAM, type = ro; # Literals, constants
DATA: load = RAM, type = rw; # Initialized variables
BSS: load = RAM, type = bss, define = yes; # Uninitialized variables
ZEROPAGE: load = ZP, type = zp, define = yes; # Pseudo-registers
STARTUP: load = MAIN, type = ro; # First initialization code
LOWCODE: load = MAIN, type = ro, optional = yes; # Legacy from other platforms
ONCE: load = MAIN, type = ro, optional = yes; # Library initialization code
CODE: load = MAIN, type = ro; # Program
RODATA: load = MAIN, type = ro; # Literals, constants
DATA: load = MAIN, type = rw; # Initialized variables
BSS: load = MAIN, type = bss, define = yes; # Uninitialized variables
}
FEATURES {
CONDES: type = constructor,
label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__,
segment = INIT;
segment = ONCE;
CONDES: type = destructor,
label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__,

View File

@ -1,32 +1,33 @@
SYMBOLS {
__STACKSIZE__: type = weak, value = $0800; # 2k stack
__STARTOFDIRECTORY__: type = weak, value = $00CB; # start just after loader
__BLOCKSIZE__: type = weak, value = $0400; # cart block size
__BANK0BLOCKSIZE__: type = weak, value = $0400; # bank 0 cart block size
__BANK1BLOCKSIZE__: type = weak, value = $0000; # bank 1 block size
__BLLHDR__: type = import;
}
MEMORY {
ZP: file = "", define = yes, start = $0000, size = $0100;
HEADER: file = %O, start = $0000, size = $000a;
RAM: file = %O, define = yes, start = $0400, size = $BC38 - __STACKSIZE__;
MAIN: file = %O, define = yes, start = $0400, size = $BC38 - __STACKSIZE__;
}
SEGMENTS {
BLLHDR: load = HEADER, type = ro;
STARTUP: load = RAM, type = ro, define = yes;
LOWCODE: load = RAM, type = ro, define = yes, optional = yes;
INIT: load = RAM, type = ro, define = yes, optional = yes;
CODE: load = RAM, type = ro, define = yes;
RODATA: load = RAM, type = ro, define = yes;
DATA: load = RAM, type = rw, define = yes;
BSS: load = RAM, type = bss, define = yes;
ZEROPAGE: load = ZP, type = zp;
EXTZP: load = ZP, type = zp, optional = yes;
APPZP: load = ZP, type = zp, optional = yes;
BLLHDR: load = HEADER, type = ro;
STARTUP: load = MAIN, type = ro, define = yes;
LOWCODE: load = MAIN, type = ro, define = yes, optional = yes;
ONCE: load = MAIN, type = ro, define = yes, optional = yes;
CODE: load = MAIN, type = ro, define = yes;
RODATA: load = MAIN, type = ro, define = yes;
DATA: load = MAIN, type = rw, define = yes;
BSS: load = MAIN, type = bss, define = yes;
}
FEATURES {
CONDES: type = constructor,
label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__,
segment = INIT;
segment = ONCE;
CONDES: type = destructor,
label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__,

View File

@ -1,7 +1,8 @@
SYMBOLS {
__STACKSIZE__: type = weak, value = $0800; # 2k stack
__STARTOFDIRECTORY__: type = weak, value = $00CB; # start just after loader
__BLOCKSIZE__: type = weak, value = $0400; # cart block size
__BANK0BLOCKSIZE__: type = weak, value = $0400; # bank 0 cart block size
__BANK1BLOCKSIZE__: type = weak, value = $0000; # bank 1 block size
__EXEHDR__: type = import;
__BOOTLDR__: type = import;
__DEFDIR__: type = import;
@ -11,28 +12,28 @@ MEMORY {
HEADER: file = %O, start = $0000, size = $0040;
BOOT: file = %O, start = $0200, size = __STARTOFDIRECTORY__;
DIR: file = %O, start = $0000, size = 8;
RAM: file = %O, define = yes, start = $0200, size = $9E58 - __STACKSIZE__;
MAIN: file = %O, define = yes, start = $0200, size = $9E58 - __STACKSIZE__;
}
SEGMENTS {
EXEHDR: load = HEADER, type = ro;
BOOTLDR: load = BOOT, type = ro;
DIRECTORY: load = DIR, type = ro;
STARTUP: load = RAM, type = ro, define = yes;
LOWCODE: load = RAM, type = ro, define = yes, optional = yes;
INIT: load = RAM, type = ro, define = yes, optional = yes;
CODE: load = RAM, type = ro, define = yes;
RODATA: load = RAM, type = ro, define = yes;
DATA: load = RAM, type = rw, define = yes;
BSS: load = RAM, type = bss, define = yes;
ZEROPAGE: load = ZP, type = zp;
EXTZP: load = ZP, type = zp, optional = yes;
APPZP: load = ZP, type = zp, optional = yes;
EXEHDR: load = HEADER, type = ro;
BOOTLDR: load = BOOT, type = ro;
DIRECTORY: load = DIR, type = ro;
STARTUP: load = MAIN, type = ro, define = yes;
LOWCODE: load = MAIN, type = ro, define = yes, optional = yes;
ONCE: load = MAIN, type = ro, define = yes, optional = yes;
CODE: load = MAIN, type = ro, define = yes;
RODATA: load = MAIN, type = ro, define = yes;
DATA: load = MAIN, type = rw, define = yes;
BSS: load = MAIN, type = bss, define = yes;
}
FEATURES {
CONDES: type = constructor,
label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__,
segment = INIT;
segment = ONCE;
CONDES: type = destructor,
label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__,

View File

@ -1,7 +1,8 @@
SYMBOLS {
__STACKSIZE__: type = weak, value = $0800; # 2k stack
__STARTOFDIRECTORY__: type = weak, value = $00CB; # start just after loader
__BLOCKSIZE__: type = weak, value = $0400; # cart block size
__BANK0BLOCKSIZE__: type = weak, value = $0400; # bank 0 cart block size
__BANK1BLOCKSIZE__: type = weak, value = $0000; # bank 1 block size
__EXEHDR__: type = import;
__BOOTLDR__: type = import;
__DEFDIR__: type = import;
@ -12,31 +13,31 @@ MEMORY {
HEADER: file = %O, start = $0000, size = $0040;
BOOT: file = %O, start = $0200, size = __STARTOFDIRECTORY__;
DIR: file = %O, start = $0000, size = 8;
RAM: file = %O, define = yes, start = $0200, size = $BD38 - __STACKSIZE__;
MAIN: file = %O, define = yes, start = $0200, size = $BD38 - __STACKSIZE__;
UPLDR: file = %O, define = yes, start = $BFDC, size = $005C;
}
SEGMENTS {
EXEHDR: load = HEADER, type = ro;
BOOTLDR: load = BOOT, type = ro;
DIRECTORY:load = DIR, type = ro;
STARTUP: load = RAM, type = ro, define = yes;
LOWCODE: load = RAM, type = ro, define = yes, optional = yes;
INIT: load = RAM, type = ro, define = yes, optional = yes;
CODE: load = RAM, type = ro, define = yes;
RODATA: load = RAM, type = ro, define = yes;
DATA: load = RAM, type = rw, define = yes;
BSS: load = RAM, type = bss, define = yes;
UPCODE: load = UPLDR, type = ro, define = yes;
UPDATA: load = UPLDR, type = rw, define = yes;
ZEROPAGE: load = ZP, type = zp;
EXTZP: load = ZP, type = zp, optional = yes;
APPZP: load = ZP, type = zp, optional = yes;
EXEHDR: load = HEADER, type = ro;
BOOTLDR: load = BOOT, type = ro;
DIRECTORY:load = DIR, type = ro;
STARTUP: load = MAIN, type = ro, define = yes;
LOWCODE: load = MAIN, type = ro, define = yes, optional = yes;
ONCE: load = MAIN, type = ro, define = yes, optional = yes;
CODE: load = MAIN, type = ro, define = yes;
RODATA: load = MAIN, type = ro, define = yes;
DATA: load = MAIN, type = rw, define = yes;
BSS: load = MAIN, type = bss, define = yes;
UPCODE: load = UPLDR, type = ro, define = yes;
UPDATA: load = UPLDR, type = rw, define = yes;
}
FEATURES {
CONDES: type = constructor,
label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__,
segment = INIT;
segment = ONCE;
CONDES: type = destructor,
label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__,

Some files were not shown because too many files have changed in this diff Show More