trying to clean up the mess of failed merge. git sucks
This commit is contained in:
parent
913608915f
commit
a8fcd502e4
2542 changed files with 0 additions and 345160 deletions
13
.gitignore
vendored
13
.gitignore
vendored
|
@ -1,13 +0,0 @@
|
|||
/bin/
|
||||
/emd/
|
||||
/html/
|
||||
/info/
|
||||
/joy/
|
||||
/lib/
|
||||
/libwrk/
|
||||
/mou/
|
||||
/ser/
|
||||
/targetutil/
|
||||
/testwrk/
|
||||
/tgi/
|
||||
/wrk/
|
17
.travis.yml
17
.travis.yml
|
@ -1,17 +0,0 @@
|
|||
language:
|
||||
- c
|
||||
install:
|
||||
- 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="
|
17
LICENSE
17
LICENSE
|
@ -1,17 +0,0 @@
|
|||
This software is provided 'as-is', without any express 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.
|
23
Makefile
23
Makefile
|
@ -1,23 +0,0 @@
|
|||
.PHONY: all mostlyclean clean install zip avail unavail bin lib doc
|
||||
|
||||
.SUFFIXES:
|
||||
|
||||
all mostlyclean clean install zip:
|
||||
@$(MAKE) -C src --no-print-directory $@
|
||||
@$(MAKE) -C libsrc --no-print-directory $@
|
||||
@$(MAKE) -C doc --no-print-directory $@
|
||||
|
||||
avail unavail bin:
|
||||
@$(MAKE) -C src --no-print-directory $@
|
||||
|
||||
lib:
|
||||
@$(MAKE) -C libsrc --no-print-directory $@
|
||||
|
||||
doc:
|
||||
@$(MAKE) -C doc --no-print-directory $@
|
||||
|
||||
%65:
|
||||
@$(MAKE) -C src --no-print-directory $@
|
||||
|
||||
%:
|
||||
@$(MAKE) -C libsrc --no-print-directory $@
|
|
@ -1,36 +0,0 @@
|
|||
.PHONY: all gh-pages sf-files
|
||||
|
||||
.SUFFIXES:
|
||||
|
||||
all: gh-pages sf-files
|
||||
|
||||
GH_NAME = Oliver Schmidt
|
||||
GH_MAIL = ol.sc@web.de
|
||||
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)
|
||||
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
|
||||
$(RM) $(GH_PATH)/*.*
|
||||
cp html/*.* $(GH_PATH)
|
||||
cd $(GH_PATH) && git add -A
|
||||
-cd $(GH_PATH) && git commit -m "Updated from commit $(TRAVIS_COMMIT)."
|
||||
cd $(GH_PATH) && git push -q
|
||||
endif
|
||||
|
||||
SF_USER = oliverschmidt
|
||||
SF_HOST = frs.sourceforge.net
|
||||
SF_FILE = /home/frs/project/cc65/cc65-snapshot-win32.zip
|
||||
|
||||
SCPFLAGS = -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -q
|
||||
|
||||
sf-files:
|
||||
ifdef SF_PASS
|
||||
echo $(TRAVIS_COMMIT) | zip -z cc65
|
||||
@echo 'sshpass -p $$(SF_PASS) scp $(SCPFLAGS) cc65.zip $(SF_USER)@$(SF_HOST):$(SF_FILE)'
|
||||
@sshpass -p $(SF_PASS) scp $(SCPFLAGS) cc65.zip $(SF_USER)@$(SF_HOST):$(SF_FILE)
|
||||
endif
|
36
README.md
36
README.md
|
@ -1,36 +0,0 @@
|
|||
[Windows Snapshot](http://sourceforge.net/projects/cc65/files/cc65-snapshot-win32.zip)
|
||||
|
||||
[Documentation](http://cc65.github.io/doc)
|
||||
|
||||
[Wiki](http://github.com/cc65/wiki/wiki)
|
||||
|
||||
[![Build Status](https://api.travis-ci.org/cc65/cc65.svg?branch=master)](https://travis-ci.org/cc65/cc65/builds)
|
||||
|
||||
cc65 is a complete cross development package for 65(C)02 systems, including
|
||||
a powerful macro assembler, a C compiler, linker, librarian and several
|
||||
other tools.
|
||||
|
||||
cc65 has C and runtime library support for many of the old 6502 machines,
|
||||
including
|
||||
|
||||
- the following Commodore machines:
|
||||
- VIC20
|
||||
- C16/C116 and Plus/4
|
||||
- C64
|
||||
- C128
|
||||
- CBM 510 (aka P500)
|
||||
- the 600/700 family
|
||||
- newer PET machines (not 2001).
|
||||
- the Apple ][+ and successors.
|
||||
- the Atari 8 bit machines.
|
||||
- the Atari 5200 console.
|
||||
- GEOS for the C64, C128 and Apple //e.
|
||||
- the NEC PC-Engine (aka TurboGrafx-16).
|
||||
- the Nintendo Entertainment System (NES) console.
|
||||
- the Supervision console.
|
||||
- the Oric Atmos.
|
||||
- the Lynx console.
|
||||
- the Ohio Scientific Challenger 1P
|
||||
|
||||
The libraries are fairly portable, so creating a version for other 6502s
|
||||
shouldn't be too much work.
|
|
@ -1,27 +0,0 @@
|
|||
;
|
||||
; _file.inc
|
||||
;
|
||||
; (C) Copyright 2002 Ullrich von Bassewitz (uz@cc65.org)
|
||||
;
|
||||
|
||||
; Assembler include file that makes the constants and structures in _file.h
|
||||
; available for asm code.
|
||||
|
||||
; Struct _FILE
|
||||
.struct _FILE
|
||||
f_fd .byte
|
||||
f_flags .byte
|
||||
f_pushback .byte
|
||||
.endstruct
|
||||
|
||||
; Flags field
|
||||
_FCLOSED = $00
|
||||
_FOPEN = $01
|
||||
_FEOF = $02
|
||||
_FERROR = $04
|
||||
_FPUSHBACK = $08
|
||||
|
||||
; File table
|
||||
.global __filetab
|
||||
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
;
|
||||
; _heap.inc
|
||||
;
|
||||
; (c) Copyright 2003, Ullrich von Bassewitz (uz@cc65.org)
|
||||
;
|
||||
|
||||
; Assembler include file that makes the constants and structures in _heap.h
|
||||
; available for asm code.
|
||||
|
||||
; Struct freeblock
|
||||
; NOTE: For performance reasons, the asm code often uses increment/decrement
|
||||
; operators to access other offsets, so just changing offsets here will
|
||||
; probably not work.
|
||||
.struct freeblock
|
||||
size .word
|
||||
next .addr
|
||||
prev .addr
|
||||
.endstruct
|
||||
|
||||
; Struct usedblock
|
||||
; See notes above
|
||||
.struct usedblock
|
||||
size .word
|
||||
start .addr
|
||||
.endstruct
|
||||
|
||||
HEAP_MIN_BLOCKSIZE = .sizeof (freeblock) ; Minimum size of an allocated block
|
||||
HEAP_ADMIN_SPACE = .sizeof (usedblock) ; Additional space for used bock
|
||||
|
||||
; Variables
|
||||
.global __heaporg
|
||||
.global __heapptr
|
||||
.global __heapend
|
||||
.global __heapfirst
|
||||
.global __heaplast
|
|
@ -1,64 +0,0 @@
|
|||
|
||||
;-----------------------------------------------------------------------------
|
||||
; Zero page stuff
|
||||
|
||||
WNDLFT := $20 ; Text window left
|
||||
WNDWDTH := $21 ; Text window width
|
||||
WNDTOP := $22 ; Text window top
|
||||
WNDBTM := $23 ; Text window bottom+1
|
||||
CH := $24 ; Cursor horizontal position
|
||||
CV := $25 ; Cursor vertical position
|
||||
BASL := $28 ; Text base address low
|
||||
BASH := $29 ; Text base address high
|
||||
INVFLG := $32 ; Normal/inverse(/flash)
|
||||
PROMPT := $33 ; Used by GETLN
|
||||
RNDL := $4E ; Random counter low
|
||||
RNDH := $4F ; Random counter high
|
||||
HIMEM := $73 ; Highest available memory address+1
|
||||
|
||||
;-----------------------------------------------------------------------------
|
||||
; Vectors
|
||||
|
||||
DOSWARM := $03D0 ; DOS warmstart vector
|
||||
BRKVec := $03F0 ; Break vector
|
||||
SOFTEV := $03F2 ; Vector for warm start
|
||||
PWREDUP := $03F4 ; This must be = EOR #$A5 of SOFTEV+1
|
||||
|
||||
;-----------------------------------------------------------------------------
|
||||
; Hardware
|
||||
|
||||
; Keyboard input
|
||||
KBD := $C000 ; Read keyboard
|
||||
KBDSTRB := $C010 ; Clear keyboard strobe
|
||||
|
||||
; 80 column video switches
|
||||
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
|
||||
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
|
||||
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
|
||||
|
||||
; Game controller
|
||||
BUTN0 := $C061 ; Open-Apple Key
|
||||
BUTN1 := $C062 ; Closed-Apple Key
|
1009
asminc/atari.inc
1009
asminc/atari.inc
File diff suppressed because it is too large
Load diff
|
@ -1,59 +0,0 @@
|
|||
; Convert characters to screen codes
|
||||
|
||||
; Helper macro that converts and outputs one character
|
||||
.macro _scrcode char
|
||||
.if (char >= 0) .and (char <= 31)
|
||||
.byte (char + 64)
|
||||
.elseif (char >= 32) .and (char <= 95)
|
||||
.byte (char - 32)
|
||||
.elseif (char >= 96) .and (char <= 127)
|
||||
.byte char
|
||||
.elseif (char >= 128) .and (char <= 159)
|
||||
.byte (char + 64)
|
||||
.elseif (char >= 160) .and (char <= 223)
|
||||
.byte (char - 32)
|
||||
.elseif (char >= 224) .and (char <= 255)
|
||||
.byte char
|
||||
.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
|
||||
|
|
@ -1,116 +0,0 @@
|
|||
;-------------------------------------------------------------------------
|
||||
; Atari 5200 System Equates
|
||||
; by Christian Groessler <chris@groessler.org>
|
||||
; taken from EQUATES.INC from Atari Inc.
|
||||
;-------------------------------------------------------------------------
|
||||
|
||||
;-------------------------------------------------------------------------
|
||||
; ATASCII CHARACTER DEFS
|
||||
;-------------------------------------------------------------------------
|
||||
|
||||
ATEOL = $9B ;END-OF-LINE, used by CONIO
|
||||
|
||||
|
||||
;-------------------------------------------------------------------------
|
||||
; Zero Page
|
||||
;-------------------------------------------------------------------------
|
||||
|
||||
POKMSK = $00 ;Mask for Pokey IRQ enable
|
||||
RTCLOK = $01 ;60 hz. clock
|
||||
JUMP = $01
|
||||
CRITIC = $03 ;Critical section
|
||||
ATRACT = $04 ;Attract Mode
|
||||
|
||||
SDLSTL = $05 ;DLISTL Shadow
|
||||
SDLSTH = $06 ;DLISTH "
|
||||
SDMCTL = $07 ;DMACTL "
|
||||
|
||||
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 "
|
||||
|
||||
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
|
||||
|
||||
ROWCRS_5200 = $19
|
||||
COLCRS_5200 = $1A
|
||||
SAVMSC = $1B ; pointer to screen memory (conio)
|
||||
|
||||
;-------------------------------------------------------------------------
|
||||
; Page #2
|
||||
;-------------------------------------------------------------------------
|
||||
|
||||
;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
|
||||
|
||||
|
||||
|
||||
;-------------------------------------------------------------------------
|
||||
; CTIA/GTIA Address Equates
|
||||
;-------------------------------------------------------------------------
|
||||
|
||||
GTIA = $C000 ;CTIA/GTIA area
|
||||
.include "atari_gtia.inc"
|
||||
|
||||
;-------------------------------------------------------------------------
|
||||
; ANTIC Address Equates
|
||||
;-------------------------------------------------------------------------
|
||||
|
||||
ANTIC = $D400 ;ANTIC area
|
||||
.include "atari_antic.inc"
|
||||
|
||||
;-------------------------------------------------------------------------
|
||||
; POKEY Address Equates
|
||||
;-------------------------------------------------------------------------
|
||||
|
||||
POKEY = $E800 ;POKEY area
|
||||
.include "atari_pokey.inc"
|
||||
|
||||
|
||||
;-------------------------------------------------------------------------
|
||||
; Cartridge Parameters
|
||||
;-------------------------------------------------------------------------
|
||||
|
||||
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
|
||||
|
||||
|
||||
CHRORG = $F800 ;Character Generator Base
|
|
@ -1,93 +0,0 @@
|
|||
;-------------------------------------------------------------------------
|
||||
; ANTIC Address Equates
|
||||
;-------------------------------------------------------------------------
|
||||
|
||||
; Read Addresses
|
||||
|
||||
VCOUNT = ANTIC + $0B ;vertical line counter
|
||||
PENH = ANTIC + $0C ;light pen horizontal position
|
||||
PENV = ANTIC + $0D ;light pen vertical position
|
||||
NMIST = ANTIC + $0F ;NMI interrupt status
|
||||
|
||||
; Write Addresses
|
||||
|
||||
DMACTL = ANTIC + $00 ;DMA control
|
||||
CHACTL = ANTIC + $01 ;character control
|
||||
DLISTL = ANTIC + $02 ;low display list address
|
||||
DLISTH = ANTIC + $03 ;high display list address
|
||||
HSCROL = ANTIC + $04 ;horizontal scroll
|
||||
VSCROL = ANTIC + $05 ;vertical scroll
|
||||
PMBASE = ANTIC + $07 ;player-missile base address
|
||||
CHBASE = ANTIC + $09 ;character base address
|
||||
WSYNC = ANTIC + $0A ;wait for HBLANK synchronization
|
||||
NMIEN = ANTIC + $0E ;NMI enable
|
||||
NMIRES = ANTIC + $0F ;NMI interrupt reset
|
||||
|
||||
|
||||
;-------------------------------------------------------------------------
|
||||
; Antic opcodes
|
||||
;-------------------------------------------------------------------------
|
||||
|
||||
; usage example:
|
||||
;
|
||||
; ScreenDL:
|
||||
; .byte DL_BLK8
|
||||
; .byte DL_BLK8
|
||||
; .byte DL_CHR40x8x1 + DL_LMS + DL_DLI
|
||||
; .word ScreenAlignment
|
||||
; .byte DL_BLK1 + DL_DLI
|
||||
; .byte DL_MAP320x1x1 + DL_LMS
|
||||
; .word Screen
|
||||
;
|
||||
; .repeat 99
|
||||
; .byte DL_MAP320x1x1
|
||||
; .endrepeat
|
||||
; .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
|
||||
; .endrepeat
|
||||
;
|
||||
; .byte DL_JVB
|
||||
|
||||
; absolute instructions (non mode lines)
|
||||
|
||||
DL_JMP = 1
|
||||
DL_JVB = 65
|
||||
|
||||
DL_BLK1 = 0
|
||||
DL_BLK2 = 16
|
||||
DL_BLK3 = 32
|
||||
DL_BLK4 = 48
|
||||
DL_BLK5 = 64
|
||||
DL_BLK6 = 80
|
||||
DL_BLK7 = 96
|
||||
DL_BLK8 = 112
|
||||
|
||||
; absolute instructions (mode lines)
|
||||
|
||||
DL_CHR40x8x1 = 2 ; monochrome, 40 character & 8 scanlines per mode line (GR. 0)
|
||||
DL_CHR40x10x1 = 3 ; monochrome, 40 character & 10 scanlines per mode line
|
||||
DL_CHR40x8x4 = 4 ; colour, 40 character & 8 scanlines per mode line (GR. 12)
|
||||
DL_CHR40x16x4 = 5 ; colour, 40 character & 16 scanlines per mode line (GR. 13)
|
||||
DL_CHR20x8x2 = 6 ; colour (duochrome per character), 20 character & 8 scanlines per mode line (GR. 1)
|
||||
DL_CHR20x16x2 = 7 ; colour (duochrome per character), 20 character & 16 scanlines per mode line (GR. 2)
|
||||
|
||||
DL_MAP40x8x4 = 8 ; colour, 40 pixel & 8 scanlines per mode line (GR. 3)
|
||||
DL_MAP80x4x2 = 9 ; 'duochrome', 80 pixel & 4 scanlines per mode line (GR.4)
|
||||
DL_MAP80x4x4 = 10 ; colour, 80 pixel & 4 scanlines per mode line (GR.5)
|
||||
DL_MAP160x2x2 = 11 ; 'duochrome', 160 pixel & 2 scanlines per mode line (GR.6)
|
||||
DL_MAP160x1x2 = 12 ; 'duochrome', 160 pixel & 1 scanline per mode line (GR.14)
|
||||
DL_MAP160x2x4 = 13 ; 4 colours, 160 pixel & 2 scanlines per mode line (GR.7)
|
||||
DL_MAP160x1x4 = 14 ; 4 colours, 160 pixel & 1 scanline per mode line (GR.15)
|
||||
DL_MAP320x1x1 = 15 ; monochrome, 320 pixel & 1 scanline per mode line (GR.8)
|
||||
|
||||
; modifiers on mode lines...
|
||||
|
||||
DL_HSCROL = 16
|
||||
DL_VSCROL = 32
|
||||
DL_LMS = 64
|
||||
|
||||
; general modifier...
|
||||
|
||||
DL_DLI = 128
|
|
@ -1,81 +0,0 @@
|
|||
;-------------------------------------------------------------------------
|
||||
; CTIA/GTIA Address Equates
|
||||
;-------------------------------------------------------------------------
|
||||
|
||||
; Read/Write Addresses
|
||||
|
||||
CONSOL = GTIA + $1F ;console switches and speaker control
|
||||
|
||||
; Read Addresses
|
||||
|
||||
M0PF = GTIA + $00 ;missile 0 and playfield collision
|
||||
M1PF = GTIA + $01 ;missile 1 and playfield collision
|
||||
M2PF = GTIA + $02 ;missile 2 and playfield collision
|
||||
M3PF = GTIA + $03 ;missile 3 and playfield collision
|
||||
|
||||
P0PF = GTIA + $04 ;player 0 and playfield collision
|
||||
P1PF = GTIA + $05 ;player 1 and playfield collision
|
||||
P2PF = GTIA + $06 ;player 2 and playfield collision
|
||||
P3PF = GTIA + $07 ;player 3 and playfield collision
|
||||
|
||||
M0PL = GTIA + $08 ;missile 0 and player collision
|
||||
M1PL = GTIA + $09 ;missile 1 and player collision
|
||||
M2PL = GTIA + $0A ;missile 2 and player collision
|
||||
M3PL = GTIA + $0B ;missile 3 and player collision
|
||||
|
||||
P0PL = GTIA + $0C ;player 0 and player collision
|
||||
P1PL = GTIA + $0D ;player 1 and player collision
|
||||
P2PL = GTIA + $0E ;player 2 and player collision
|
||||
P3PL = GTIA + $0F ;player 3 and player collision
|
||||
|
||||
TRIG0 = GTIA + $10 ;joystick trigger 0
|
||||
TRIG1 = GTIA + $11 ;joystick trigger 1
|
||||
|
||||
TRIG2 = GTIA + $12 ;cartridge interlock
|
||||
TRIG3 = GTIA + $13 ;ACMI module interlock
|
||||
|
||||
PAL = GTIA + $14 ;##rev2## PAL/NTSC indicator
|
||||
|
||||
; Write Addresses
|
||||
|
||||
HPOSP0 = GTIA + $00 ;player 0 horizontal position
|
||||
HPOSP1 = GTIA + $01 ;player 1 horizontal position
|
||||
HPOSP2 = GTIA + $02 ;player 2 horizontal position
|
||||
HPOSP3 = GTIA + $03 ;player 3 horizontal position
|
||||
|
||||
HPOSM0 = GTIA + $04 ;missile 0 horizontal position
|
||||
HPOSM1 = GTIA + $05 ;missile 1 horizontal position
|
||||
HPOSM2 = GTIA + $06 ;missile 2 horizontal position
|
||||
HPOSM3 = GTIA + $07 ;missile 3 horizontal position
|
||||
|
||||
SIZEP0 = GTIA + $08 ;player 0 size
|
||||
SIZEP1 = GTIA + $09 ;player 1 size
|
||||
SIZEP2 = GTIA + $0A ;player 2 size
|
||||
SIZEP3 = GTIA + $0B ;player 3 size
|
||||
|
||||
SIZEM = GTIA + $0C ;missile sizes
|
||||
|
||||
GRAFP0 = GTIA + $0D ;player 0 graphics
|
||||
GRAFP1 = GTIA + $0E ;player 1 graphics
|
||||
GRAFP2 = GTIA + $0F ;player 2 graphics
|
||||
GRAFP3 = GTIA + $10 ;player 3 graphics
|
||||
|
||||
GRAFM = GTIA + $11 ;missile graphics
|
||||
|
||||
COLPM0 = GTIA + $12 ;player-missile 0 color/luminance
|
||||
COLPM1 = GTIA + $13 ;player-missile 1 color/luminance
|
||||
COLPM2 = GTIA + $14 ;player-missile 2 color/luminance
|
||||
COLPM3 = GTIA + $15 ;player-missile 3 color/luminance
|
||||
|
||||
COLPF0 = GTIA + $16 ;playfield 0 color/luminance
|
||||
COLPF1 = GTIA + $17 ;playfield 1 color/luminance
|
||||
COLPF2 = GTIA + $18 ;playfield 2 color/luminance
|
||||
COLPF3 = GTIA + $19 ;playfield 3 color/luminance
|
||||
|
||||
COLBK = GTIA + $1A ;background color/luminance
|
||||
|
||||
PRIOR = GTIA + $1B ;priority select
|
||||
VDELAY = GTIA + $1C ;vertical delay
|
||||
GRACTL = GTIA + $1D ;graphic control
|
||||
HITCLR = GTIA + $1E ;collision clear
|
||||
|
|
@ -1,44 +0,0 @@
|
|||
;-------------------------------------------------------------------------
|
||||
; POKEY Address Equates
|
||||
;-------------------------------------------------------------------------
|
||||
|
||||
; Read Addresses
|
||||
|
||||
POT0 = POKEY + $00 ;potentiometer 0
|
||||
POT1 = POKEY + $01 ;potentiometer 1
|
||||
POT2 = POKEY + $02 ;potentiometer 2
|
||||
POT3 = POKEY + $03 ;potentiometer 3
|
||||
POT4 = POKEY + $04 ;potentiometer 4
|
||||
POT5 = POKEY + $05 ;potentiometer 5
|
||||
POT6 = POKEY + $06 ;potentiometer 6
|
||||
POT7 = POKEY + $07 ;potentiometer 7
|
||||
|
||||
ALLPOT = POKEY + $08 ;potentiometer port status
|
||||
KBCODE = POKEY + $09 ;keyboard code
|
||||
RANDOM = POKEY + $0A ;random number generator
|
||||
SERIN = POKEY + $0D ;serial port input
|
||||
IRQST = POKEY + $0E ;IRQ interrupt status
|
||||
SKSTAT = POKEY + $0F ;serial port and keyboard status
|
||||
|
||||
; Write Addresses
|
||||
|
||||
AUDF1 = POKEY + $00 ;channel 1 audio frequency
|
||||
AUDC1 = POKEY + $01 ;channel 1 audio control
|
||||
|
||||
AUDF2 = POKEY + $02 ;channel 2 audio frequency
|
||||
AUDC2 = POKEY + $03 ;channel 2 audio control
|
||||
|
||||
AUDF3 = POKEY + $04 ;channel 3 audio frequency
|
||||
AUDC3 = POKEY + $05 ;channel 3 audio control
|
||||
|
||||
AUDF4 = POKEY + $06 ;channel 4 audio frequency
|
||||
AUDC4 = POKEY + $07 ;channel 4 audio control
|
||||
|
||||
AUDCTL = POKEY + $08 ;audio control
|
||||
STIMER = POKEY + $09 ;start timers
|
||||
SKRES = POKEY + $0A ;reset SKSTAT status
|
||||
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
|
||||
|
111
asminc/atmos.inc
111
asminc/atmos.inc
|
@ -1,111 +0,0 @@
|
|||
;
|
||||
; Oric Atmos definitions
|
||||
; BASIC 1.1 addresses
|
||||
;
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; Constants
|
||||
|
||||
SCREEN_XSIZE = 40 ; screen columns
|
||||
SCREEN_YSIZE = 28 ; screen rows
|
||||
|
||||
FUNCTKEY = $A5
|
||||
|
||||
FNAME_LEN = 16 ; maximum length of file-name
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; Zero page
|
||||
|
||||
SCRPTR := $12
|
||||
BASIC_BUF := $35
|
||||
CHARGOT := $E8
|
||||
TXTPTR := $E9
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; Low memory
|
||||
|
||||
MODEKEY := $0209
|
||||
CAPSLOCK := $020C ; $7F = not locked, $FF = locked
|
||||
PATTERN := $0213
|
||||
IRQVec := $0245 ; "fast" interrupt vector
|
||||
JOINFLAG := $025A ; 0 = don't joiu, $4A = join BASIC programs
|
||||
VERIFYFLAG := $025B ; 0 = load, 1 = verify
|
||||
CURS_Y := $0268
|
||||
CURS_X := $0269
|
||||
STATUS := $026A
|
||||
BACKGRND := $026B
|
||||
FOREGRND := $026C
|
||||
TIMER3 := $0276
|
||||
CFILE_NAME := $027F
|
||||
CFOUND_NAME := $0293
|
||||
FILESTART := $02A9
|
||||
FILEEND := $02AB
|
||||
AUTORUN := $02AD ; $00 = only load, $C7 = autorun
|
||||
LANGFLAG := $02AE ; $00 = BASIC, $80 = machine code
|
||||
LOADERR := $02B1
|
||||
KEYBUF := $02DF
|
||||
PARMERR := $02E0
|
||||
PARAM1 := $02E1 ; & $02E2
|
||||
PARAM2 := $02E3 ; & $02E4
|
||||
PARAM3 := $02E5 ; & $02E6
|
||||
BANGVEC := $02F5
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; 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
|
||||
|
||||
; 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
|
||||
|
||||
GETLINE := $C592
|
||||
TEXT := $EC21
|
||||
HIRES := $EC33
|
||||
CURSET := $F0C8
|
||||
CURMOV := $F0FD
|
||||
DRAW := $F110
|
||||
CHAR := $F12D
|
||||
POINT := $F1C8
|
||||
PAPER := $F204
|
||||
INK := $F210
|
||||
PRINT := $F77C
|
||||
|
||||
; Sound Effects
|
||||
PING := $FA9F
|
||||
SHOOT := $FAB5
|
||||
EXPLODE := $FACB
|
||||
ZAP := $FAE1
|
||||
TICK := $FB14
|
||||
TOCK := $FB2A
|
216
asminc/c128.inc
216
asminc/c128.inc
|
@ -1,216 +0,0 @@
|
|||
;
|
||||
; C128 generic definitions. Stolen from Elite128
|
||||
;
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; Zero page, Commodore stuff
|
||||
|
||||
TXTPTR := $3D ; Pointer into BASIC source code
|
||||
TIME := $A0 ; 60HZ clock
|
||||
FNAM_LEN := $B7 ; Length of filename
|
||||
SECADR := $B9 ; Secondary address
|
||||
DEVNUM := $BA ; Device number
|
||||
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
|
||||
CURS_X := $EC ; Cursor column
|
||||
CURS_Y := $EB ; Cursor row
|
||||
SCREEN_PTR := $E0 ; Pointer to current char in text screen
|
||||
CRAM_PTR := $E2 ; Pointer to current char in color RAM
|
||||
|
||||
CHARCOLOR := $F1
|
||||
RVS := $F3 ; Reverse output flag
|
||||
SCROLL := $F8 ; Disable scrolling flag
|
||||
|
||||
BASIC_BUF := $200 ; 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
|
||||
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
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; Vectors
|
||||
|
||||
IRQVec := $0314
|
||||
BRKVec := $0316
|
||||
NMIVec := $0318
|
||||
KeyStoreVec := $033C
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; I/O: VIC
|
||||
|
||||
VIC := $D000
|
||||
VIC_SPR0_X := $D000
|
||||
VIC_SPR0_Y := $D001
|
||||
VIC_SPR1_X := $D002
|
||||
VIC_SPR1_Y := $D003
|
||||
VIC_SPR2_X := $D004
|
||||
VIC_SPR2_Y := $D005
|
||||
VIC_SPR3_X := $D006
|
||||
VIC_SPR3_Y := $D007
|
||||
VIC_SPR4_X := $D008
|
||||
VIC_SPR4_Y := $D009
|
||||
VIC_SPR5_X := $D00A
|
||||
VIC_SPR5_Y := $D00B
|
||||
VIC_SPR6_X := $D00C
|
||||
VIC_SPR6_Y := $D00D
|
||||
VIC_SPR7_X := $D00E
|
||||
VIC_SPR7_Y := $D00F
|
||||
VIC_SPR_HI_X := $D010
|
||||
VIC_SPR_ENA := $D015
|
||||
VIC_SPR_EXP_Y := $D017
|
||||
VIC_SPR_EXP_X := $D01D
|
||||
VIC_SPR_MCOLOR := $D01C
|
||||
VIC_SPR_BG_PRIO := $D01B
|
||||
|
||||
VIC_SPR_MCOLOR0 := $D025
|
||||
VIC_SPR_MCOLOR1 := $D026
|
||||
|
||||
VIC_SPR0_COLOR := $D027
|
||||
VIC_SPR1_COLOR := $D028
|
||||
VIC_SPR2_COLOR := $D029
|
||||
VIC_SPR3_COLOR := $D02A
|
||||
VIC_SPR4_COLOR := $D02B
|
||||
VIC_SPR5_COLOR := $D02C
|
||||
VIC_SPR6_COLOR := $D02D
|
||||
VIC_SPR7_COLOR := $D02E
|
||||
|
||||
VIC_CTRL1 := $D011
|
||||
VIC_CTRL2 := $D016
|
||||
|
||||
VIC_HLINE := $D012
|
||||
|
||||
VIC_LPEN_X := $D013
|
||||
VIC_LPEN_Y := $D014
|
||||
|
||||
VIC_VIDEO_ADR := $D018
|
||||
|
||||
VIC_IRR := $D019 ; Interrupt request register
|
||||
VIC_IMR := $D01A ; Interrupt mask register
|
||||
|
||||
VIC_BORDERCOLOR := $D020
|
||||
VIC_BG_COLOR0 := $D021
|
||||
VIC_BG_COLOR1 := $D022
|
||||
VIC_BG_COLOR2 := $D023
|
||||
VIC_BG_COLOR3 := $D024
|
||||
|
||||
; 128 stuff:
|
||||
VIC_KBD_128 := $D02F ; Extended kbd bits (visible in 64 mode)
|
||||
VIC_CLK_128 := $D030 ; Clock rate register (visible in 64 mode)
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; I/O: SID
|
||||
|
||||
SID := $D400
|
||||
SID_S1Lo := $D400
|
||||
SID_S1Hi := $D401
|
||||
SID_PB1Lo := $D402
|
||||
SID_PB1Hi := $D403
|
||||
SID_Ctl1 := $D404
|
||||
SID_AD1 := $D405
|
||||
SID_SUR1 := $D406
|
||||
|
||||
SID_S2Lo := $D407
|
||||
SID_S2Hi := $D408
|
||||
SID_PB2Lo := $D409
|
||||
SID_PB2Hi := $D40A
|
||||
SID_Ctl2 := $D40B
|
||||
SID_AD2 := $D40C
|
||||
SID_SUR2 := $D40D
|
||||
|
||||
SID_S3Lo := $D40E
|
||||
SID_S3Hi := $D40F
|
||||
SID_PB3Lo := $D410
|
||||
SID_PB3Hi := $D411
|
||||
SID_Ctl3 := $D412
|
||||
SID_AD3 := $D413
|
||||
SID_SUR3 := $D414
|
||||
|
||||
SID_FltLo := $D415
|
||||
SID_FltHi := $D416
|
||||
SID_FltCtl := $D417
|
||||
SID_Amp := $D418
|
||||
SID_ADConv1 := $D419
|
||||
SID_ADConv2 := $D41A
|
||||
SID_Noise := $D41B
|
||||
SID_Read3 := $D41C
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; I/O: VDC (128 only)
|
||||
|
||||
VDC_INDEX := $D600
|
||||
VDC_DATA := $D601
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; I/O: CIAs
|
||||
|
||||
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
|
||||
|
||||
CIA2 := $DD00
|
||||
CIA2_PRA := $DD00
|
||||
CIA2_PRB := $DD01
|
||||
CIA2_DDRA := $DD02
|
||||
CIA2_DDRB := $DD03
|
||||
CIA2_TOD10 := $DD08
|
||||
CIA2_TODSEC := $DD09
|
||||
CIA2_TODMIN := $DD0A
|
||||
CIA2_TODHR := $DD0B
|
||||
CIA2_ICR := $DD0D
|
||||
CIA2_CRA := $DD0E
|
||||
CIA2_CRB := $DD0F
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; I/O: MMU
|
||||
|
||||
MMU_CR := $FF00
|
||||
MMU_CFG_CC65 := %00001110 ; Bank 0 with kernal ROM
|
||||
MMU_CFG_RAM0 := %00111111 ; Bank 0 full RAM
|
||||
MMU_CFG_RAM1 := %01111111 ; Bank 1 full RAM
|
||||
MMU_CFG_RAM2 := %10111111 ; Bank 2 full RAM
|
||||
MMU_CFG_RAM3 := %11111111 ; Bank 3 full RAM
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; Super CPU
|
||||
|
||||
SCPU_VIC_Bank1 := $D075
|
||||
SCPU_Slow := $D07A
|
||||
SCPU_Fast := $D07B
|
||||
SCPU_EnableRegs := $D07E
|
||||
SCPU_DisableRegs:= $D07F
|
||||
SCPU_Detect := $D0BC
|
|
@ -1,9 +0,0 @@
|
|||
;
|
||||
; C16 generic definitions.
|
||||
;
|
||||
; The C16 and Plus/4 are identical, so just include the Plus/4 include file.
|
||||
|
||||
|
||||
.include "plus4.inc"
|
||||
|
||||
|
213
asminc/c64.inc
213
asminc/c64.inc
|
@ -1,213 +0,0 @@
|
|||
;
|
||||
; C64 generic definitions. Stolen from Elite128
|
||||
;
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; Zero page, Commodore stuff
|
||||
|
||||
TXTPTR := $7A ; Pointer into BASIC source code
|
||||
TIME := $A0 ; 60 HZ clock
|
||||
FNAM_LEN := $B7 ; Length of filename
|
||||
SECADR := $B9 ; Secondary address
|
||||
DEVNUM := $BA ; Device number
|
||||
FNAM := $BB ; Pointer to filename
|
||||
KEY_COUNT := $C6 ; Number of keys in input buffer
|
||||
RVS := $C7 ; Reverse flag
|
||||
CURS_FLAG := $CC ; 1 = cursor off
|
||||
CURS_BLINK := $CD ; Blink counter
|
||||
CURS_CHAR := $CE ; Character under the cursor
|
||||
CURS_STATE := $CF ; Cursor blink state
|
||||
SCREEN_PTR := $D1 ; Pointer to current char in text screen
|
||||
CURS_X := $D3 ; Cursor column
|
||||
CURS_Y := $D6 ; Cursor row
|
||||
CRAM_PTR := $F3 ; Pointer to current char in color RAM
|
||||
|
||||
BASIC_BUF := $200 ; Location of command-line
|
||||
BASIC_BUF_LEN = 89 ; Maximum length of command-line
|
||||
|
||||
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
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; Vector and other locations
|
||||
|
||||
IRQVec := $0314
|
||||
BRKVec := $0316
|
||||
NMIVec := $0318
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; Screen size
|
||||
|
||||
XSIZE = 40
|
||||
YSIZE = 25
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; I/O: VIC
|
||||
|
||||
VIC := $D000
|
||||
VIC_SPR0_X := $D000
|
||||
VIC_SPR0_Y := $D001
|
||||
VIC_SPR1_X := $D002
|
||||
VIC_SPR1_Y := $D003
|
||||
VIC_SPR2_X := $D004
|
||||
VIC_SPR2_Y := $D005
|
||||
VIC_SPR3_X := $D006
|
||||
VIC_SPR3_Y := $D007
|
||||
VIC_SPR4_X := $D008
|
||||
VIC_SPR4_Y := $D009
|
||||
VIC_SPR5_X := $D00A
|
||||
VIC_SPR5_Y := $D00B
|
||||
VIC_SPR6_X := $D00C
|
||||
VIC_SPR6_Y := $D00D
|
||||
VIC_SPR7_X := $D00E
|
||||
VIC_SPR7_Y := $D00F
|
||||
VIC_SPR_HI_X := $D010
|
||||
VIC_SPR_ENA := $D015
|
||||
VIC_SPR_EXP_Y := $D017
|
||||
VIC_SPR_EXP_X := $D01D
|
||||
VIC_SPR_MCOLOR := $D01C
|
||||
VIC_SPR_BG_PRIO := $D01B
|
||||
|
||||
VIC_SPR_MCOLOR0 := $D025
|
||||
VIC_SPR_MCOLOR1 := $D026
|
||||
|
||||
VIC_SPR0_COLOR := $D027
|
||||
VIC_SPR1_COLOR := $D028
|
||||
VIC_SPR2_COLOR := $D029
|
||||
VIC_SPR3_COLOR := $D02A
|
||||
VIC_SPR4_COLOR := $D02B
|
||||
VIC_SPR5_COLOR := $D02C
|
||||
VIC_SPR6_COLOR := $D02D
|
||||
VIC_SPR7_COLOR := $D02E
|
||||
|
||||
VIC_CTRL1 := $D011
|
||||
VIC_CTRL2 := $D016
|
||||
|
||||
VIC_HLINE := $D012
|
||||
|
||||
VIC_LPEN_X := $D013
|
||||
VIC_LPEN_Y := $D014
|
||||
|
||||
VIC_VIDEO_ADR := $D018
|
||||
|
||||
VIC_IRR := $D019 ; Interrupt request register
|
||||
VIC_IMR := $D01A ; Interrupt mask register
|
||||
|
||||
VIC_BORDERCOLOR := $D020
|
||||
VIC_BG_COLOR0 := $D021
|
||||
VIC_BG_COLOR1 := $D022
|
||||
VIC_BG_COLOR2 := $D023
|
||||
VIC_BG_COLOR3 := $D024
|
||||
|
||||
; 128 stuff:
|
||||
VIC_KBD_128 := $D02F ; Extended kbd bits (visible in 64 mode)
|
||||
VIC_CLK_128 := $D030 ; Clock rate register (visible in 64 mode)
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; I/O: SID
|
||||
|
||||
SID := $D400
|
||||
SID_S1Lo := $D400
|
||||
SID_S1Hi := $D401
|
||||
SID_PB1Lo := $D402
|
||||
SID_PB1Hi := $D403
|
||||
SID_Ctl1 := $D404
|
||||
SID_AD1 := $D405
|
||||
SID_SUR1 := $D406
|
||||
|
||||
SID_S2Lo := $D407
|
||||
SID_S2Hi := $D408
|
||||
SID_PB2Lo := $D409
|
||||
SID_PB2Hi := $D40A
|
||||
SID_Ctl2 := $D40B
|
||||
SID_AD2 := $D40C
|
||||
SID_SUR2 := $D40D
|
||||
|
||||
SID_S3Lo := $D40E
|
||||
SID_S3Hi := $D40F
|
||||
SID_PB3Lo := $D410
|
||||
SID_PB3Hi := $D411
|
||||
SID_Ctl3 := $D412
|
||||
SID_AD3 := $D413
|
||||
SID_SUR3 := $D414
|
||||
|
||||
SID_FltLo := $D415
|
||||
SID_FltHi := $D416
|
||||
SID_FltCtl := $D417
|
||||
SID_Amp := $D418
|
||||
SID_ADConv1 := $D419
|
||||
SID_ADConv2 := $D41A
|
||||
SID_Noise := $D41B
|
||||
SID_Read3 := $D41C
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; I/O: VDC (128 only)
|
||||
|
||||
VDC_INDEX := $D600
|
||||
VDC_DATA := $D601
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; I/O: CIAs
|
||||
|
||||
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
|
||||
|
||||
CIA2 := $DD00
|
||||
CIA2_PRA := $DD00
|
||||
CIA2_PRB := $DD01
|
||||
CIA2_DDRA := $DD02
|
||||
CIA2_DDRB := $DD03
|
||||
CIA2_TOD10 := $DD08
|
||||
CIA2_TODSEC := $DD09
|
||||
CIA2_TODMIN := $DD0A
|
||||
CIA2_TODHR := $DD0B
|
||||
CIA2_ICR := $DD0D
|
||||
CIA2_CRA := $DD0E
|
||||
CIA2_CRB := $DD0F
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; Super CPU
|
||||
|
||||
SCPU_VIC_Bank1 := $D075
|
||||
SCPU_Slow := $D07A
|
||||
SCPU_Fast := $D07B
|
||||
SCPU_EnableRegs := $D07E
|
||||
SCPU_DisableRegs:= $D07F
|
||||
SCPU_Detect := $D0BC
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; Processor Port at $01
|
||||
|
||||
LORAM = $01 ; Enable the basic rom
|
||||
HIRAM = $02 ; Enable the kernal rom
|
||||
IOEN = $04 ; Enable I/O
|
||||
CASSDATA = $08 ; Cassette data
|
||||
CASSPLAY = $10 ; Cassette: Play
|
||||
CASSMOT = $20 ; Cassette motor on
|
||||
TP_FAST = $80 ; Switch Rossmoeller TurboProcess to fast mode
|
||||
|
||||
RAMONLY = $F8 ; (~(LORAM | HIRAM | IOEN)) & $FF
|
||||
|
|
@ -1,50 +0,0 @@
|
|||
; Convert characters to screen codes
|
||||
|
||||
; Helper macro that converts and outputs one character
|
||||
.macro _scrcode char
|
||||
.if (char < 256)
|
||||
.byte <(.strat ("h@dbdlhh", char >> 5) << 4) ^ char
|
||||
.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
|
||||
|
||||
|
|
@ -1,198 +0,0 @@
|
|||
;
|
||||
; Zero page variables and I/O definitions for the CBM 510
|
||||
;
|
||||
; Taken from a kernal disassembly done by myself in 2000/2001.
|
||||
;
|
||||
; 2001-09-13, Ullrich von Bassewitz
|
||||
; 2014-04-02, Greg King
|
||||
|
||||
|
||||
;-----------------------------------------------------------------------------
|
||||
; Zeropage stuff
|
||||
|
||||
ExecReg := $00 ; Controls execution memory bank
|
||||
IndReg := $01 ; Controls indirect indexed load-store bank
|
||||
|
||||
TXTPTR := $85 ; Far pointer into BASIC source code
|
||||
FNAM := $90 ; Far pointer to LOAD/SAVE file-name
|
||||
FNAM_LEN := $9D ; Holds length of file-name
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; Screen size
|
||||
|
||||
XSIZE = 40
|
||||
YSIZE = 25
|
||||
|
||||
;-----------------------------------------------------------------------------
|
||||
; I/O Definitions
|
||||
; Note: These numbers aren't addresses. They are offsets from the start of
|
||||
; each chip's register set. They are used in the indirect indexed addressing
|
||||
; mode.
|
||||
|
||||
; I/O $d800: VIC-II
|
||||
|
||||
VIC_SPR0_X = $00
|
||||
VIC_SPR0_Y = $01
|
||||
VIC_SPR1_X = $02
|
||||
VIC_SPR1_Y = $03
|
||||
VIC_SPR2_X = $04
|
||||
VIC_SPR2_Y = $05
|
||||
VIC_SPR3_X = $06
|
||||
VIC_SPR3_Y = $07
|
||||
VIC_SPR4_X = $08
|
||||
VIC_SPR4_Y = $09
|
||||
VIC_SPR5_X = $0A
|
||||
VIC_SPR5_Y = $0B
|
||||
VIC_SPR6_X = $0C
|
||||
VIC_SPR6_Y = $0D
|
||||
VIC_SPR7_X = $0E
|
||||
VIC_SPR7_Y = $0F
|
||||
VIC_SPR_HI_X = $10
|
||||
VIC_SPR_ENA = $15
|
||||
VIC_SPR_EXP_Y = $17
|
||||
VIC_SPR_EXP_X = $1D
|
||||
VIC_SPR_MCOLOR = $1C
|
||||
VIC_SPR_BG_PRIO = $1B
|
||||
|
||||
VIC_SPR_MCOLOR0 = $25
|
||||
VIC_SPR_MCOLOR1 = $26
|
||||
|
||||
VIC_SPR0_COLOR = $27
|
||||
VIC_SPR1_COLOR = $28
|
||||
VIC_SPR2_COLOR = $29
|
||||
VIC_SPR3_COLOR = $2A
|
||||
VIC_SPR4_COLOR = $2B
|
||||
VIC_SPR5_COLOR = $2C
|
||||
VIC_SPR6_COLOR = $2D
|
||||
VIC_SPR7_COLOR = $2E
|
||||
|
||||
VIC_CTRL1 = $11
|
||||
VIC_CTRL2 = $16
|
||||
|
||||
VIC_HLINE = $12
|
||||
|
||||
VIC_LPEN_X = $13
|
||||
VIC_LPEN_Y = $14
|
||||
|
||||
VIC_VIDEO_ADR = $18
|
||||
|
||||
VIC_IRR = $19 ; Interrupt request register
|
||||
VIC_IMR = $1A ; Interrupt mask register
|
||||
|
||||
VIC_BORDERCOLOR = $20
|
||||
VIC_BG_COLOR0 = $21
|
||||
VIC_BG_COLOR1 = $22
|
||||
VIC_BG_COLOR2 = $23
|
||||
VIC_BG_COLOR3 = $24
|
||||
|
||||
|
||||
; I/O $da00: SID 6581
|
||||
|
||||
SID_S1Lo = $00
|
||||
SID_S1Hi = $01
|
||||
SID_PB1Lo = $02
|
||||
SID_PB1Hi = $03
|
||||
SID_Ctl1 = $04
|
||||
SID_AD1 = $05
|
||||
SID_SUR1 = $06
|
||||
|
||||
SID_S2Lo = $07
|
||||
SID_S2Hi = $08
|
||||
SID_PB2Lo = $09
|
||||
SID_PB2Hi = $0A
|
||||
SID_Ctl2 = $0B
|
||||
SID_AD2 = $0C
|
||||
SID_SUR2 = $0D
|
||||
|
||||
SID_S3Lo = $0E
|
||||
SID_S3Hi = $0F
|
||||
SID_PB3Lo = $10
|
||||
SID_PB3Hi = $11
|
||||
SID_Ctl3 = $12
|
||||
SID_AD3 = $13
|
||||
SID_SUR3 = $14
|
||||
|
||||
SID_FltLo = $15
|
||||
SID_FltHi = $16
|
||||
SID_FltCtl = $17
|
||||
SID_Amp = $18
|
||||
SID_ADConv1 = $19
|
||||
SID_ADConv2 = $1A
|
||||
SID_Noise = $1B
|
||||
SID_Read3 = $1C
|
||||
|
||||
|
||||
; I/O $db00: CIA 6526, Inter Process Communication
|
||||
; I/O $dc00: CIA 6526
|
||||
|
||||
.struct CIA
|
||||
PRA .byte
|
||||
PRB .byte
|
||||
DDRA .byte
|
||||
DDRB .byte
|
||||
.union
|
||||
.struct
|
||||
TALO .byte
|
||||
TAHI .byte
|
||||
.endstruct
|
||||
TA .word
|
||||
.endunion
|
||||
.union
|
||||
.struct
|
||||
TBLO .byte
|
||||
TBHI .byte
|
||||
.endstruct
|
||||
TB .word
|
||||
.endunion
|
||||
TOD10 .byte
|
||||
TODSEC .byte
|
||||
TODMIN .byte
|
||||
TODHR .byte
|
||||
SDR .byte
|
||||
ICR .byte
|
||||
CRA .byte
|
||||
CRB .byte
|
||||
.endstruct
|
||||
|
||||
|
||||
; I/O $dd00: ACIA 6551
|
||||
|
||||
.struct ACIA
|
||||
DATA .byte
|
||||
STATUS .byte
|
||||
CMD .byte
|
||||
CTRL .BYTE
|
||||
.endstruct
|
||||
|
||||
|
||||
; I/O $de00: Triport #1 6525
|
||||
; I/O $df00: Triport #2 6525
|
||||
|
||||
.struct TPI
|
||||
PRA .byte
|
||||
PRB .byte
|
||||
.union
|
||||
PRC .byte
|
||||
INT .byte
|
||||
.endunion
|
||||
DDRA .byte
|
||||
DDRB .byte
|
||||
.union
|
||||
DDRC .byte
|
||||
IMR .byte
|
||||
.endunion
|
||||
CR .byte
|
||||
AIR .byte
|
||||
.endstruct
|
||||
|
||||
|
||||
;-----------------------------------------------------------------------------
|
||||
; Our video memory address
|
||||
|
||||
COLOR_RAM := $D400 ; System bank
|
||||
|
||||
|
||||
;-----------------------------------------------------------------------------
|
||||
|
||||
BASIC_BUF := $FB5E ; Bank 0 location of command-line
|
||||
BASIC_BUF_LEN = 162 ; Maximum length of command-line
|
|
@ -1,119 +0,0 @@
|
|||
;
|
||||
; Zero page variables and I/O definitions for the CBM 610
|
||||
;
|
||||
; Taken from a kernal disassembly done by myself in 1987.
|
||||
;
|
||||
; 1998-09-28, Ullrich von Bassewitz
|
||||
; 2014-04-02, Greg King
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; Zeropage stuff
|
||||
|
||||
ExecReg := $00 ; Controls execution memory bank
|
||||
IndReg := $01 ; Controls indirect indexed load-store bank
|
||||
|
||||
TXTPTR := $85 ; Far pointer into BASIC source code
|
||||
FNAM := $90 ; Far pointer to LOAD/SAVE file-name
|
||||
FNAM_LEN := $9D ; Holds length of file-name
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; Screen size
|
||||
|
||||
XSIZE = 80
|
||||
YSIZE = 25
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; I/O definitions
|
||||
|
||||
|
||||
; I/O $d800: CRTC 6545
|
||||
|
||||
.struct CRTC
|
||||
ADDR .byte
|
||||
DATA .byte
|
||||
.endstruct
|
||||
|
||||
|
||||
; I/O $db00: CIA 6526, Inter Process Communication
|
||||
;
|
||||
; IPCcia = $db00
|
||||
|
||||
.struct CIA
|
||||
PRA .byte
|
||||
PRB .byte
|
||||
DDRA .byte
|
||||
DDRB .byte
|
||||
.union
|
||||
.struct
|
||||
TALO .byte
|
||||
TAHI .byte
|
||||
.endstruct
|
||||
TA .word
|
||||
.endunion
|
||||
.union
|
||||
.struct
|
||||
TBLO .byte
|
||||
TBHI .byte
|
||||
.endstruct
|
||||
TB .word
|
||||
.endunion
|
||||
TOD10 .byte
|
||||
TODSEC .byte
|
||||
TODMIN .byte
|
||||
TODHR .byte
|
||||
SDR .byte
|
||||
ICR .byte
|
||||
CRA .byte
|
||||
CRB .byte
|
||||
.endstruct
|
||||
|
||||
|
||||
; I/O $dc00: CIA 6526
|
||||
;
|
||||
; cia = $dc00
|
||||
|
||||
|
||||
; I/O $dd00: ACIA 6551
|
||||
;
|
||||
; acia = $dd00
|
||||
|
||||
.struct ACIA
|
||||
DATA .byte
|
||||
STATUS .byte
|
||||
CMD .byte
|
||||
CTRL .BYTE
|
||||
.endstruct
|
||||
|
||||
|
||||
; I/O $de00: Triport #1 6525
|
||||
;
|
||||
; tpi1 = $de00
|
||||
|
||||
.struct TPI
|
||||
PRA .byte
|
||||
PRB .byte
|
||||
.union
|
||||
PRC .byte
|
||||
INT .byte
|
||||
.endunion
|
||||
DDRA .byte
|
||||
DDRB .byte
|
||||
.union
|
||||
DDRC .byte
|
||||
IMR .byte
|
||||
.endunion
|
||||
CR .byte
|
||||
AIR .byte
|
||||
.endstruct
|
||||
|
||||
|
||||
; I/O $df00: Triport #2 6525
|
||||
|
||||
; tpi2 = $df00
|
||||
|
||||
|
||||
;-----------------------------------------------------------------------------
|
||||
|
||||
BASIC_BUF := $FA5E ; Bank 1 location of command-line
|
||||
BASIC_BUF_LEN = 162 ; Maximum length of command-line
|
|
@ -1,34 +0,0 @@
|
|||
;
|
||||
; Definitions for CBM file types. From cbm.h
|
||||
;
|
||||
; Ullrich von Bassewitz, 2012-06-03
|
||||
;
|
||||
|
||||
; Define bitmapped constants for the table entries
|
||||
|
||||
.enum
|
||||
CBM_T_REG = $10 ; Bit set for regular files
|
||||
CBM_T_SEQ = $10 ; Sequential file
|
||||
CBM_T_PRG = $11 ; Program file
|
||||
CBM_T_USR = $12 ; User file
|
||||
CBM_T_REL = $13 ; Relative file
|
||||
CBM_T_VRP = $14 ; Vorpal fast-loadable format
|
||||
CBM_T_DEL = $00 ; Deleted file
|
||||
CBM_T_CBM = $01 ; 1581 sub-partition
|
||||
CBM_T_DIR = $02 ; IDE64 and CMD sub-directory
|
||||
CBM_T_LNK = $03 ; IDE64 soft-link
|
||||
CBM_T_OTHER = $04 ; File-type not recognized
|
||||
CBM_T_HEADER = $05 ; Disk header / title
|
||||
.endenum
|
||||
|
||||
|
||||
; The following function maps the start character for a file type to
|
||||
; one of the file types above. Note: 'd' will always mapped to CBM_T_DEL.
|
||||
; The calling function has to look at the following character to determine
|
||||
; if the file type is actually CBM_T_DIR.
|
||||
;
|
||||
; unsigned char __fastcall__ _cbm_filetype (unsigned char c);
|
||||
|
||||
.global __cbm_filetype
|
||||
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
; CPU bitmask constants
|
||||
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 capabilities
|
||||
CPU_NONE = CPU_ISET_NONE
|
||||
CPU_6502 = CPU_ISET_6502
|
||||
CPU_6502X = CPU_ISET_6502|CPU_ISET_6502X
|
||||
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
|
|
@ -1,29 +0,0 @@
|
|||
;
|
||||
; 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
|
||||
|
||||
; 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)
|
||||
|
||||
|
|
@ -1,49 +0,0 @@
|
|||
;/*****************************************************************************/
|
||||
;/* */
|
||||
;/* em-error.inc */
|
||||
;/* */
|
||||
;/* EM error codes */
|
||||
;/* */
|
||||
;/* */
|
||||
;/* */
|
||||
;/* (C) 2002-2012, Ullrich von Bassewitz */
|
||||
;/* Roemerstrasse 52 */
|
||||
;/* D-70794 Filderstadt */
|
||||
;/* EMail: uz@cc65.org */
|
||||
;/* */
|
||||
;/* */
|
||||
;/* 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. */
|
||||
;/* */
|
||||
;/*****************************************************************************/
|
||||
|
||||
|
||||
|
||||
; Error constants
|
||||
.enum
|
||||
EM_ERR_OK ; No error
|
||||
EM_ERR_NO_DRIVER ; No driver available
|
||||
EM_ERR_CANNOT_LOAD ; Error loading driver
|
||||
EM_ERR_INV_DRIVER ; Invalid driver
|
||||
EM_ERR_NO_DEVICE ; Device (hardware) not found
|
||||
EM_ERR_INSTALLED ; A driver is already installed
|
||||
|
||||
EM_ERR_COUNT ; Special: Number of error messages
|
||||
.endenum
|
||||
|
||||
|
||||
|
|
@ -1,106 +0,0 @@
|
|||
;/*****************************************************************************/
|
||||
;/* */
|
||||
;/* em-kernel.inc */
|
||||
;/* */
|
||||
;/* EM kernel interface */
|
||||
;/* */
|
||||
;/* */
|
||||
;/* */
|
||||
;/* (C) 2002-2003 Ullrich von Bassewitz */
|
||||
;/* Römerstrasse 52 */
|
||||
;/* D-70794 Filderstadt */
|
||||
;/* EMail: uz@cc65.org */
|
||||
;/* */
|
||||
;/* */
|
||||
;/* 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. */
|
||||
;/* */
|
||||
;/*****************************************************************************/
|
||||
|
||||
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; The driver header
|
||||
|
||||
.struct EMD_HDR
|
||||
ID .byte 3 ; Contains 0x65, 0x6d, 0x64 ("emd")
|
||||
VERSION .byte 1 ; Interface version
|
||||
LIBREF .addr ; Library reference
|
||||
JUMPTAB .struct
|
||||
INSTALL .addr ; INSTALL routine
|
||||
UNINSTALL .addr ; UNINSTALL routine
|
||||
PAGECOUNT .addr ; PAGECOUNT routine
|
||||
MAP .addr ; MAP routine
|
||||
USE .addr ; USE routine
|
||||
MAPCLEAN .addr ; MAPCLEAN routine
|
||||
COPYFROM .addr ; COPYFROM routine
|
||||
COPYTO .addr ; COPYTO routine
|
||||
.endstruct
|
||||
.endstruct
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; The EMD API version, stored in EMD_HDR::VERSION
|
||||
|
||||
EMD_API_VERSION = $02
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; The asm equivalent to the C em_copy structure
|
||||
|
||||
.struct EM_COPY
|
||||
BUF .addr ; Memory buffer to copy from or to
|
||||
OFFS .byte ; Offset into page
|
||||
PAGE .word ; Starting page to copy from or to
|
||||
COUNT .word ; Number of bytes to copy
|
||||
UNUSED .byte ; Make the size 8 bytes
|
||||
.endstruct
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; Variables
|
||||
|
||||
.global _em_drv ; Pointer to driver
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; Driver entry points
|
||||
|
||||
.global emd_install
|
||||
.global emd_uninstall
|
||||
.global emd_pagecount
|
||||
.global emd_map
|
||||
.global emd_use
|
||||
.global emd_commit
|
||||
.global emd_copyfrom
|
||||
.global emd_copyto
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; ASM functions
|
||||
|
||||
.global em_clear_ptr
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; C callable functions
|
||||
|
||||
.global _em_load_driver
|
||||
.global _em_unload
|
||||
.global _em_install
|
||||
.global _em_uninstall
|
||||
.global _em_pagecount
|
||||
.global _em_map
|
||||
.global _em_use
|
||||
.global _em_commit
|
||||
.global _em_copyfrom
|
||||
.global _em_copyto
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
;
|
||||
; Ullrich von Bassewitz, 16.05.2000
|
||||
;
|
||||
|
||||
; Variables and functions
|
||||
|
||||
.global __errno, __oserror
|
||||
.global __osmaperrno
|
||||
.global __seterrno
|
||||
.global __directerrno, __mappederrno
|
||||
|
||||
; Error codes, must match the values in the C headers
|
||||
.enum
|
||||
EOK ; No error
|
||||
ENOENT ; No such file or directory
|
||||
ENOMEM ; Out of memory
|
||||
EACCES ; Permission denied
|
||||
ENODEV ; No such device
|
||||
EMFILE ; Too many open files
|
||||
EBUSY ; Device or resource busy
|
||||
EINVAL ; Invalid argument
|
||||
ENOSPC ; No space left on device
|
||||
EEXIST ; File exists
|
||||
EAGAIN ; Try again
|
||||
EIO ; I/O error
|
||||
EINTR ; Interrupted system call
|
||||
ENOSYS ; Function not implemented
|
||||
ESPIPE ; Illegal seek
|
||||
ERANGE ; Range error
|
||||
EBADF ; Bad file number
|
||||
EUNKNOWN ; Unknown OS specific error - must be last!
|
||||
|
||||
EMAX = EUNKNOWN ; Highest error code
|
||||
.endenum
|
||||
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
;
|
||||
; Ullrich von Bassewitz, 05.06.1999
|
||||
;
|
||||
|
||||
; Predefined file handles
|
||||
STDIN_FILENO = 0
|
||||
STDOUT_FILENO = 1
|
||||
STDERR_FILENO = 2
|
||||
|
||||
; File mode constants, must match the values in the C headers
|
||||
O_RDONLY = $01
|
||||
O_WRONLY = $02
|
||||
O_RDWR = $03
|
||||
O_CREAT = $10
|
||||
O_TRUNC = $20
|
||||
O_APPEND = $40
|
||||
O_EXCL = $80
|
||||
|
||||
|
||||
|
||||
|
|
@ -1,55 +0,0 @@
|
|||
|
||||
; add - Add without carry
|
||||
.macro add Arg1, Arg2
|
||||
clc
|
||||
.if .paramcount = 2
|
||||
adc Arg1, Arg2
|
||||
.else
|
||||
adc Arg1
|
||||
.endif
|
||||
.endmacro
|
||||
|
||||
; sub - subtract without borrow
|
||||
.macro sub Arg1, Arg2
|
||||
sec
|
||||
.if .paramcount = 2
|
||||
sbc Arg1, Arg2
|
||||
.else
|
||||
sbc Arg1
|
||||
.endif
|
||||
.endmacro
|
||||
|
||||
; bge - jump if unsigned greater or equal
|
||||
.macro bge Arg
|
||||
bcs Arg
|
||||
.endmacro
|
||||
|
||||
; blt - Jump if unsigned less
|
||||
.macro blt Arg
|
||||
bcc Arg
|
||||
.endmacro
|
||||
|
||||
; bgt - jump if unsigned greater
|
||||
.macro bgt Arg
|
||||
.local L
|
||||
beq L
|
||||
bcs Arg
|
||||
L:
|
||||
.endmacro
|
||||
|
||||
; ble - jump if unsigned less or equal
|
||||
.macro ble Arg
|
||||
beq Arg
|
||||
bcc Arg
|
||||
.endmacro
|
||||
|
||||
; bnz - jump if not zero
|
||||
.macro bnz Arg
|
||||
bne Arg
|
||||
.endmacro
|
||||
|
||||
; bze - jump if zero
|
||||
.macro bze Arg
|
||||
beq Arg
|
||||
.endmacro
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
;
|
||||
; get_tv.inc
|
||||
;
|
||||
; Ullrich von Bassewitz, 2004-10-15
|
||||
;
|
||||
; Defines for the get_tv function.
|
||||
|
||||
|
||||
|
||||
; Error codes returned by all functions
|
||||
.enum TV
|
||||
NTSC
|
||||
PAL
|
||||
OTHER
|
||||
.endenum
|
||||
|
||||
|
||||
; get_tv function
|
||||
|
||||
.global _get_tv
|
||||
|
||||
|
|
@ -1,44 +0,0 @@
|
|||
;/*****************************************************************************/
|
||||
;/* */
|
||||
;/* joy-error.inc */
|
||||
;/* */
|
||||
;/* Joystick error codes */
|
||||
;/* */
|
||||
;/* */
|
||||
;/* */
|
||||
;/* (C) 2002 Ullrich von Bassewitz */
|
||||
;/* Wacholderweg 14 */
|
||||
;/* D-70597 Stuttgart */
|
||||
;/* EMail: uz@musoftware.de */
|
||||
;/* */
|
||||
;/* */
|
||||
;/* 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. */
|
||||
;/* */
|
||||
;/*****************************************************************************/
|
||||
|
||||
|
||||
|
||||
; Error codes
|
||||
JOY_ERR_OK = 0 ; No error
|
||||
JOY_ERR_NO_DRIVER = 1 ; No driver available
|
||||
JOY_ERR_CANNOT_LOAD = 2 ; Error loading driver
|
||||
JOY_ERR_INV_DRIVER = 3 ; Invalid driver
|
||||
JOY_ERR_NO_DEVICE = 4 ; Device (hardware) not found
|
||||
|
||||
|
||||
|
|
@ -1,85 +0,0 @@
|
|||
;/*****************************************************************************/
|
||||
;/* */
|
||||
;/* joy-kernel.inc */
|
||||
;/* */
|
||||
;/* Internally used joystick functions */
|
||||
;/* */
|
||||
;/* */
|
||||
;/* */
|
||||
;/* (C) 2002-2006, Ullrich von Bassewitz */
|
||||
;/* Römerstraße 52 */
|
||||
;/* D-70794 Filderstadt */
|
||||
;/* EMail: uz@cc65.org */
|
||||
;/* */
|
||||
;/* */
|
||||
;/* 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. */
|
||||
;/* */
|
||||
;/*****************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; Driver header stuff
|
||||
|
||||
.struct JOY_HDR
|
||||
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
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; Variables
|
||||
|
||||
.global _joy_drv ; Pointer to driver
|
||||
.global _joy_masks
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; Driver entry points
|
||||
|
||||
.global joy_install
|
||||
.global joy_uninstall
|
||||
.global joy_count
|
||||
.global joy_read
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; C callable functions
|
||||
|
||||
.global _joy_load_driver
|
||||
.global _joy_unload
|
||||
.global _joy_install
|
||||
.global _joy_uninstall
|
||||
.global _joy_count
|
||||
.global _joy_read
|
||||
|
||||
.global _joy_clear_ptr
|
|
@ -1,88 +0,0 @@
|
|||
.macro jeq Target
|
||||
.if .match(Target, 0)
|
||||
bne *+5
|
||||
jmp Target
|
||||
.elseif .def(Target) .and .const((*-2)-(Target)) .and ((*+2)-(Target) <= 127)
|
||||
beq Target
|
||||
.else
|
||||
bne *+5
|
||||
jmp Target
|
||||
.endif
|
||||
.endmacro
|
||||
.macro jne Target
|
||||
.if .match(Target, 0)
|
||||
beq *+5
|
||||
jmp Target
|
||||
.elseif .def(Target) .and .const((*-2)-(Target)) .and ((*+2)-(Target) <= 127)
|
||||
bne Target
|
||||
.else
|
||||
beq *+5
|
||||
jmp Target
|
||||
.endif
|
||||
.endmacro
|
||||
.macro jmi Target
|
||||
.if .match(Target, 0)
|
||||
bpl *+5
|
||||
jmp Target
|
||||
.elseif .def(Target) .and .const((*-2)-(Target)) .and ((*+2)-(Target) <= 127)
|
||||
bmi Target
|
||||
.else
|
||||
bpl *+5
|
||||
jmp Target
|
||||
.endif
|
||||
.endmacro
|
||||
.macro jpl Target
|
||||
.if .match(Target, 0)
|
||||
bmi *+5
|
||||
jmp Target
|
||||
.elseif .def(Target) .and .const((*-2)-(Target)) .and ((*+2)-(Target) <= 127)
|
||||
bpl Target
|
||||
.else
|
||||
bmi *+5
|
||||
jmp Target
|
||||
.endif
|
||||
.endmacro
|
||||
.macro jcs Target
|
||||
.if .match(Target, 0)
|
||||
bcc *+5
|
||||
jmp Target
|
||||
.elseif .def(Target) .and .const((*-2)-(Target)) .and ((*+2)-(Target) <= 127)
|
||||
bcs Target
|
||||
.else
|
||||
bcc *+5
|
||||
jmp Target
|
||||
.endif
|
||||
.endmacro
|
||||
.macro jcc Target
|
||||
.if .match(Target, 0)
|
||||
bcs *+5
|
||||
jmp Target
|
||||
.elseif .def(Target) .and .const((*-2)-(Target)) .and ((*+2)-(Target) <= 127)
|
||||
bcc Target
|
||||
.else
|
||||
bcs *+5
|
||||
jmp Target
|
||||
.endif
|
||||
.endmacro
|
||||
.macro jvs Target
|
||||
.if .match(Target, 0)
|
||||
bvc *+5
|
||||
jmp Target
|
||||
.elseif .def(Target) .and .const((*-2)-(Target)) .and ((*+2)-(Target) <= 127)
|
||||
bvs Target
|
||||
.else
|
||||
bvc *+5
|
||||
jmp Target
|
||||
.endif
|
||||
.endmacro
|
||||
.macro jvc Target
|
||||
.if .match(Target, 0)
|
||||
bvs *+5
|
||||
jmp Target
|
||||
.elseif .def(Target) .and .const((*-2)-(Target)) .and ((*+2)-(Target) <= 127)
|
||||
bvc Target
|
||||
.else
|
||||
bvs *+5
|
||||
jmp Target
|
||||
.endif
|
||||
.endmacro
|
279
asminc/lynx.inc
279
asminc/lynx.inc
|
@ -1,279 +0,0 @@
|
|||
; Lynx system hardware includes
|
||||
; Shawn Jefferson
|
||||
; June 18th, 2004
|
||||
;
|
||||
; Reference:
|
||||
; Bastian Schick's Lynx Documentation
|
||||
; http://www.geocities.com/SiliconValley/Byte/4242/lynx/
|
||||
;
|
||||
|
||||
; ***
|
||||
; *** Suzy Addresses
|
||||
; ***
|
||||
|
||||
; Sprite Control Block
|
||||
|
||||
TMPADRL = $FC00
|
||||
TMPADRH = $FC01
|
||||
TILTACUML = $FC02
|
||||
TILTACUMH = $FC03
|
||||
HOFFL = $FC04
|
||||
HOFFH = $FC05
|
||||
VOFFL = $FC06
|
||||
VOFFH = $FC07
|
||||
VIDBASL = $FC08
|
||||
VIDBASH = $FC09
|
||||
COLLBASL = $FC0A
|
||||
COLLBASH = $FC0B
|
||||
VIDADRL = $FC0C
|
||||
VIDADRH = $FC0D
|
||||
COLLADRL = $FC0E
|
||||
COLLADRH = $FC0F
|
||||
SCBNEXTL = $FC10
|
||||
SCBNEXTH = $FC11
|
||||
SPRDLINEL = $FC12
|
||||
SPRDLINEH = $FC13
|
||||
HPOSSTRTL = $FC14
|
||||
HPOSSTRTH = $FC15
|
||||
VPOSSTRTL = $FC16
|
||||
VPOSSTRTH = $FC17
|
||||
SPRHSIZL = $FC18
|
||||
SPRHSIZH = $FC19
|
||||
SPRVSIZL = $FC1A
|
||||
SPRVSIZH = $FC1B
|
||||
STRETCHL = $FC1C
|
||||
STRETCHH = $FC1D
|
||||
TILTL = $FC1E
|
||||
TILTH = $FC1F
|
||||
SPRDOFFL = $FC20
|
||||
SPRDOFFH = $FC21
|
||||
SPRVPOSL = $FC22
|
||||
SPRVPOSH = $FC23
|
||||
COLLOFFL = $FC24
|
||||
COLLOFFH = $FC25
|
||||
VSIZACUML = $FC26
|
||||
VSIZACUMH = $FC27
|
||||
HSIZOFFL = $FC28
|
||||
HSIZOFFH = $FC29
|
||||
VSIZOFFL = $FC2A
|
||||
VSIZOFFH = $FC2B
|
||||
SCBADRL = $FC2C
|
||||
SCBADRH = $FC2D
|
||||
PROCADRL = $FC2E
|
||||
PROCADRH = $FC2F
|
||||
|
||||
; Suzy Math
|
||||
|
||||
MATHD = $FC52
|
||||
MATHC = $FC53
|
||||
MATHB = $FC54
|
||||
MATHA = $FC55
|
||||
MATHP = $FC56
|
||||
MATHN = $FC57
|
||||
MATHH = $FC60
|
||||
MATHG = $FC61
|
||||
MATHF = $FC62
|
||||
MATHE = $FC63
|
||||
MATHM = $FC6C
|
||||
MATHL = $FC6D
|
||||
MATHK = $FC6E
|
||||
MATHJ = $FC6F
|
||||
|
||||
; Suzy Misc
|
||||
|
||||
SPRCTL0 = $FC80
|
||||
SPRCTL1 = $FC81
|
||||
SPRCOLL = $FC82
|
||||
SPRINIT = $FC83
|
||||
SUZYHREV = $FC88
|
||||
SUZYSREV = $FC89
|
||||
SUZYBUSEN = $FC90
|
||||
SPRGO = $FC91
|
||||
SPRSYS = $FC92
|
||||
JOYSTICK = $FCB0
|
||||
SWITCHES = $FCB1
|
||||
RCART0 = $FCB2
|
||||
RCART1 = $FCB3
|
||||
LEDS = $FCC0
|
||||
PARSTATUS = $FCC2
|
||||
PARDATA = $FCC3
|
||||
HOWIE = $FCC4
|
||||
|
||||
|
||||
; ***
|
||||
; *** Mikey Addresses
|
||||
; ***
|
||||
|
||||
; Mikey Timers
|
||||
|
||||
TIMER0 = $FD00
|
||||
TIMER1 = $FD04
|
||||
TIMER2 = $FD08
|
||||
TIMER3 = $FD0C
|
||||
TIMER4 = $FD10
|
||||
TIMER5 = $FD14
|
||||
TIMER6 = $FD18
|
||||
TIMER7 = $FD1C
|
||||
HTIMER = $FD00 ; horizontal line timer (timer 0)
|
||||
VTIMER = $FD08 ; vertical blank timer (timer 2)
|
||||
STIMER = $FD1C ; sound timer (timer 7)
|
||||
|
||||
HTIMBKUP = $FD00 ; horizontal line timer (timer 0)
|
||||
HTIMCTLA = $FD01
|
||||
HTIMCNT = $FD02
|
||||
HTIMCTLB = $FD03
|
||||
VTIMBKUP = $FD08 ; vertical blank timer (timer 2)
|
||||
VTIMCTLA = $FD09
|
||||
VTIMCNT = $FD0A
|
||||
VTIMCTLB = $FD0B
|
||||
BAUDBKUP = $FD10 ; serial timer (timer 4)
|
||||
STIMBKUP = $FD1C ; sound timer (timer 7)
|
||||
STIMCTLA = $FD1D
|
||||
STIMCNT = $FD1E
|
||||
STIMCTLB = $FD1F
|
||||
|
||||
TIM0BKUP = $FD00
|
||||
TIM0CTLA = $FD01
|
||||
TIM0CNT = $FD02
|
||||
TIM0CTLB = $FD03
|
||||
TIM1BKUP = $FD04
|
||||
TIM1CTLA = $FD05
|
||||
TIM1CNT = $FD06
|
||||
TIM1CTLB = $FD07
|
||||
TIM2BKUP = $FD08
|
||||
TIM2CTLA = $FD09
|
||||
TIM2CNT = $FD0A
|
||||
TIM2CTLB = $FD0B
|
||||
TIM3BKUP = $FD0C
|
||||
TIM3CTLA = $FD0D
|
||||
TIM3CNT = $FD0E
|
||||
TIM3CTLB = $FD0F
|
||||
TIM4BKUP = $FD10
|
||||
TIM4CTLA = $FD11
|
||||
TIM4CNT = $FD12
|
||||
TIM4CTLB = $FD13
|
||||
TIM5BKUP = $FD14
|
||||
TIM5CTLA = $FD15
|
||||
TIM5CNT = $FD16
|
||||
TIM5CTLB = $FD17
|
||||
TIM6BKUP = $FD18
|
||||
TIM6CTLA = $FD19
|
||||
TIM6CNT = $FD1A
|
||||
TIM6CTLB = $FD1B
|
||||
TIM7BKUP = $FD1C
|
||||
TIM7CTLA = $FD1D
|
||||
TIM7CNT = $FD1E
|
||||
TIM7CTLB = $FD1F
|
||||
|
||||
; Mikey Audio
|
||||
|
||||
AUDIO0 = $FD20 ; audio channel 0
|
||||
AUDIO1 = $FD28 ; audio channel 1
|
||||
AUDIO2 = $FD30 ; audio channel 2
|
||||
AUDIO3 = $FD38 ; audio channel 3
|
||||
|
||||
AUD0VOL = $FD20
|
||||
AUD0FEED = $FD21
|
||||
AUD0OUT = $FD22
|
||||
AUD0SHIFT = $FD23
|
||||
AUD0BKUP = $FD24
|
||||
AUD0CTLA = $FD25
|
||||
AUD0CNT = $FD26
|
||||
AUD0CTLB = $FD27
|
||||
AUD1VOL = $FD28
|
||||
AUD1FEED = $FD29
|
||||
AUD1OUT = $FD2A
|
||||
AUD1SHIFT = $FD2B
|
||||
AUD1BKUP = $FD2C
|
||||
AUD1CTLA = $FD2D
|
||||
AUD1CNT = $FD2E
|
||||
AUD1CTLB = $FD2F
|
||||
AUD2VOL = $FD30
|
||||
AUD2FEED = $FD31
|
||||
AUD2OUT = $FD32
|
||||
AUD2SHIFT = $FD33
|
||||
AUD2BKUP = $FD34
|
||||
AUD2CTLA = $FD35
|
||||
AUD2CNT = $FD36
|
||||
AUD2CTLB = $FD37
|
||||
AUD3VOL = $FD38
|
||||
AUD3FEED = $FD39
|
||||
AUD3OUT = $FD3A
|
||||
AUD3SHIFT = $FD3B
|
||||
AUD3BKUP = $FD3C
|
||||
AUD3CTLA = $FD3D
|
||||
AUD3CNT = $FD3E
|
||||
AUD3CTLB = $FD3F
|
||||
MSTEREO = $FD50
|
||||
|
||||
; Mikey Misc
|
||||
|
||||
; Interrupt bits in INTRST and INTSET
|
||||
TIMER0_INTERRUPT = $01
|
||||
TIMER1_INTERRUPT = $02
|
||||
TIMER2_INTERRUPT = $04
|
||||
TIMER3_INTERRUPT = $08
|
||||
TIMER4_INTERRUPT = $10
|
||||
TIMER5_INTERRUPT = $20
|
||||
TIMER6_INTERRUPT = $40
|
||||
TIMER7_INTERRUPT = $80
|
||||
|
||||
HBL_INTERRUPT = TIMER0_INTERRUPT
|
||||
VBL_INTERRUPT = TIMER2_INTERRUPT
|
||||
SERIAL_INTERRUPT = TIMER4_INTERRUPT
|
||||
SND_INTERRUPT = TIMER7_INTERRUPT
|
||||
|
||||
INTRST = $FD80
|
||||
INTSET = $FD81
|
||||
MAGRDY0 = $FD84
|
||||
MAGRDY1 = $FD85
|
||||
AUDIN = $FD86
|
||||
SYSCTL1 = $FD87
|
||||
MIKEYHREV = $FD88
|
||||
MIKEYSREV = $FD89
|
||||
IODIR = $FD8A
|
||||
IODAT = $FD8B
|
||||
TxIntEnable = %10000000
|
||||
RxIntEnable = %01000000
|
||||
TxParEnable = %00010000
|
||||
ResetErr = %00001000
|
||||
TxOpenColl = %00000100
|
||||
TxBreak = %00000010
|
||||
ParEven = %00000001
|
||||
TxReady = %10000000
|
||||
RxReady = %01000000
|
||||
TxEmpty = %00100000
|
||||
RxParityErr = %00010000
|
||||
RxOverrun = %00001000
|
||||
RxFrameErr = %00000100
|
||||
RxBreak = %00000010
|
||||
ParityBit = %00000001
|
||||
SERCTL = $FD8C
|
||||
SERDAT = $FD8D
|
||||
SDONEACK = $FD90
|
||||
CPUSLEEP = $FD91
|
||||
DISPCTL = $FD92
|
||||
PBKUP = $FD93
|
||||
DISPADRL = $FD94
|
||||
DISPADRH = $FD95
|
||||
MTEST0 = $FD9C
|
||||
MTEST1 = $FD9D
|
||||
MTEST2 = $FD9E
|
||||
PALETTE = $FDA0 ; hardware rgb palette
|
||||
GCOLMAP = $FDA0 ; hardware rgb palette (green)
|
||||
RBCOLMAP = $FDB0 ; hardware rgb palette (red-blue)
|
||||
|
||||
|
||||
; ***
|
||||
; *** Misc Hardware + 6502 vectors
|
||||
; ***
|
||||
|
||||
MAPCTL = $FFF9
|
||||
VECTORS = $FFFB
|
||||
INTVECTL = $FFFE
|
||||
INTVECTH = $FFFF
|
||||
RSTVECTL = $FFFC
|
||||
RSTVECTH = $FFFD
|
||||
NMIVECTL = $FFFA
|
||||
NMIVECTH = $FFFB
|
||||
|
|
@ -1,78 +0,0 @@
|
|||
;*****************************************************************************/
|
||||
;* */
|
||||
;* modload.inc */
|
||||
;* */
|
||||
;* o65 module loader interface for cc65 */
|
||||
;* */
|
||||
;* */
|
||||
;* */
|
||||
;* (C) 2002 Ullrich von Bassewitz */
|
||||
;* Wacholderweg 14 */
|
||||
;* D-70597 Stuttgart */
|
||||
;* EMail: uz@musoftware.de */
|
||||
;* */
|
||||
;* */
|
||||
;* 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. */
|
||||
;* */
|
||||
;*****************************************************************************/
|
||||
|
||||
|
||||
|
||||
; Exports structures and functions to load relocatable o65 modules at
|
||||
; runtime.
|
||||
|
||||
|
||||
|
||||
; Offsets for the mod_ctrl struct. This struct is passed to the module loader.
|
||||
; It contains stuff, the loader needs to work, and another area where the
|
||||
; loader will place informational data if it was successful. You will have to
|
||||
; check the return code of mod_load before accessing any of these additional
|
||||
; struct members.
|
||||
.struct MOD_CTRL
|
||||
READ .addr
|
||||
CALLERDATA .word
|
||||
MODULE .addr ; Pointer to module data
|
||||
MODULE_SIZE .word ; Total size of loaded module
|
||||
MODULE_ID .word
|
||||
.endstruct
|
||||
|
||||
; unsigned char mod_load (struct mod_ctrl* ctrl);
|
||||
; /* Load a module into memory and relocate it. The function will return an
|
||||
; * error code (see below). If MLOAD_OK is returned, the outgoing fields in
|
||||
; * the passed mod_ctrl struct contain information about the module just
|
||||
; * loaded.
|
||||
; */
|
||||
.global _mod_load
|
||||
|
||||
; void mod_free (void* module);
|
||||
; /* Free a loaded module. Note: The given pointer is the pointer to the
|
||||
; * module memory, not a pointer to a control structure.
|
||||
; */
|
||||
.global _mod_free
|
||||
|
||||
; Errors
|
||||
.enum
|
||||
MLOAD_OK ; Module load successful
|
||||
MLOAD_ERR_READ ; Read error
|
||||
MLOAD_ERR_HDR ; Header error
|
||||
MLOAD_ERR_OS ; Wrong OS
|
||||
MLOAD_ERR_FMT ; Data format error
|
||||
MLOAD_ERR_MEM ; Not enough memory
|
||||
.endenum
|
||||
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
.ifndef DYN_DRV
|
||||
DYN_DRV = 1
|
||||
.endif
|
||||
|
||||
.macro module_header module_label
|
||||
.if DYN_DRV
|
||||
.segment "HEADER"
|
||||
.else
|
||||
.data
|
||||
.export module_label
|
||||
module_label:
|
||||
.endif
|
||||
.endmacro
|
|
@ -1,184 +0,0 @@
|
|||
;/*****************************************************************************/
|
||||
;/* */
|
||||
;/* mouse-kernel.inc */
|
||||
;/* */
|
||||
;/* Mouse API */
|
||||
;/* */
|
||||
;/* */
|
||||
;/* */
|
||||
;/* (C) 2003-2009, Ullrich von Bassewitz */
|
||||
;/* Roemerstrasse 52 */
|
||||
;/* D-70794 Filderstadt */
|
||||
;/* EMail: uz@cc65.org */
|
||||
;/* */
|
||||
;/* */
|
||||
;/* */
|
||||
;/* */
|
||||
;/* 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. */
|
||||
;/* */
|
||||
;/*****************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; Error codes
|
||||
|
||||
.enum
|
||||
MOUSE_ERR_OK ; No error
|
||||
MOUSE_ERR_NO_DRIVER ; No driver available
|
||||
MOUSE_ERR_CANNOT_LOAD ; Error loading driver
|
||||
MOUSE_ERR_INV_DRIVER ; Invalid driver
|
||||
MOUSE_ERR_NO_DEVICE ; Mouse hardware not found
|
||||
MOUSE_ERR_INV_IOCTL ; Invalid ioctl code
|
||||
|
||||
MOUSE_ERR_COUNT ; Special: Number of error codes
|
||||
.endenum
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; The driver header
|
||||
|
||||
.struct MOUSE_HDR
|
||||
ID .byte 3 ; Contains 0x6D, 0x6F, 0x75 ("mou")
|
||||
VERSION .byte 1 ; Interface version
|
||||
LIBREF .addr ; Library reference
|
||||
JUMPTAB .struct
|
||||
INSTALL .addr
|
||||
UNINSTALL .addr
|
||||
HIDE .addr
|
||||
SHOW .addr
|
||||
SETBOX .addr
|
||||
GETBOX .addr
|
||||
MOVE .addr
|
||||
BUTTONS .addr
|
||||
POS .addr
|
||||
INFO .addr
|
||||
IOCTL .addr
|
||||
IRQ .addr
|
||||
.endstruct
|
||||
FLAGS .byte ; Mouse driver flags
|
||||
CALLBACKS .struct ; Jump instructions
|
||||
.byte ; JMP opcode
|
||||
CHIDE .addr ; Jump address
|
||||
.byte
|
||||
CSHOW .addr
|
||||
.byte
|
||||
CPREP .addr
|
||||
.byte
|
||||
CDRAW .addr
|
||||
.byte
|
||||
CMOVEX .addr
|
||||
.byte
|
||||
CMOVEY .addr
|
||||
.endstruct
|
||||
.endstruct
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; The mouse callback structure
|
||||
|
||||
.struct MOUSE_CALLBACKS
|
||||
HIDE .addr ; Hide the mouse cursor
|
||||
SHOW .addr ; Show the mouse cursor
|
||||
PREP .addr ; Prepare to move the mouse cursor
|
||||
DRAW .addr ; Draw the mouse cursor
|
||||
MOVEX .addr ; Move the mouse cursor to X coord
|
||||
MOVEY .addr ; Move the mouse cursor to Y coord
|
||||
.endstruct
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; The mouse API version, stored in MOUSE_HDR::VERSION
|
||||
|
||||
MOUSE_API_VERSION = $05
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; Bitmapped mouse driver flags, stored in MOUSE_HDR::FLAGS.
|
||||
; Note: If neither of MOUSE_FLAG_XXX_IRQ is set, no interrupts are supplied
|
||||
; to the driver. If one of the bits is set, the interrupt vector MUST be
|
||||
; valid.
|
||||
; Beware: Some of the bits are tested using the BIT instruction, so do not
|
||||
; change the values without checking the code!
|
||||
|
||||
MOUSE_FLAG_EARLY_IRQ = $40 ; Enable IRQ *before* calling INSTALL
|
||||
MOUSE_FLAG_LATE_IRQ = $80 ; Enable IRQ *after* calling INSTALL
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; Mouse button definitions
|
||||
|
||||
MOUSE_BTN_LEFT = $10
|
||||
MOUSE_BTN_RIGHT = $01
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; Structures used to return data from the mouse driver
|
||||
|
||||
.struct MOUSE_POS
|
||||
XCOORD .word
|
||||
YCOORD .word
|
||||
.endstruct
|
||||
|
||||
.struct MOUSE_INFO
|
||||
POS .tag MOUSE_POS
|
||||
BUTTONS .byte
|
||||
.endstruct
|
||||
|
||||
.struct MOUSE_BOX
|
||||
MINX .word
|
||||
MINY .word
|
||||
MAXX .word
|
||||
MAXY .word
|
||||
.endstruct
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; Variables
|
||||
|
||||
.global _mouse_drv ; Pointer to driver
|
||||
.global _mouse_hidden ; Counter, 0 = mouse is visible
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; C callable functions
|
||||
|
||||
.global _mouse_load_driver
|
||||
.global _mouse_unload
|
||||
.global _mouse_install
|
||||
.global _mouse_uninstall
|
||||
.global _mouse_geterrormsg
|
||||
.global _mouse_hide
|
||||
.global _mouse_show
|
||||
.global _mouse_setbox
|
||||
.global _mouse_getbox
|
||||
.global _mouse_move
|
||||
.global _mouse_buttons
|
||||
.global _mouse_pos
|
||||
.global _mouse_info
|
||||
.global _mouse_ioctl
|
||||
|
||||
.global _mouse_clear_ptr
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; Driver entry points (asm callable)
|
||||
|
||||
.global mouse_install
|
||||
.global mouse_uninstall
|
||||
.global mouse_hide
|
||||
.global mouse_show
|
||||
.global mouse_setbox
|
||||
.global mouse_getbox
|
||||
.global mouse_move
|
||||
.global mouse_buttons
|
||||
.global mouse_pos
|
||||
.global mouse_info
|
||||
.global mouse_ioctl
|
|
@ -1,93 +0,0 @@
|
|||
;
|
||||
; NES definitions. By Groepaz/Hitmem.
|
||||
;
|
||||
|
||||
|
||||
;; FIXME: optimize zeropage usage
|
||||
|
||||
SCREEN_PTR = $62 ;2
|
||||
CRAM_PTR = $64 ;2
|
||||
CHARCOLOR = $66
|
||||
BGCOLOR = $67
|
||||
RVS = $68
|
||||
CURS_X = $69
|
||||
CURS_Y = $6a
|
||||
|
||||
tickcount = $6b ;2
|
||||
|
||||
VBLANK_FLAG = $70
|
||||
|
||||
ringbuff = $0200
|
||||
ringwrite = $71
|
||||
ringread = $72
|
||||
ringcount = $73
|
||||
|
||||
ppuhi = $74
|
||||
ppulo = $75
|
||||
ppuval = $76
|
||||
|
||||
screenrows = (30-1)
|
||||
charsperline = 32
|
||||
xsize = charsperline
|
||||
|
||||
;; PPU defines
|
||||
|
||||
PPU_CTRL1 = $2000
|
||||
PPU_CTRL2 = $2001
|
||||
PPU_STATUS = $2002
|
||||
PPU_SPR_ADDR = $2003
|
||||
PPU_SPR_IO = $2004
|
||||
PPU_VRAM_ADDR1 = $2005
|
||||
PPU_VRAM_ADDR2 = $2006
|
||||
PPU_VRAM_IO = $2007
|
||||
|
||||
;; APU defines
|
||||
|
||||
APU_PULSE1CTRL = $4000 ; Pulse #1 Control Register (W)
|
||||
APU_PULSE1RAMP = $4001 ; Pulse #1 Ramp Control Register (W)
|
||||
APU_PULSE1FTUNE = $4002 ; Pulse #1 Fine Tune (FT) Register (W)
|
||||
APU_PULSE1CTUNE = $4003 ; Pulse #1 Coarse Tune (CT) Register (W)
|
||||
APU_PULSE2CTRL = $4004 ; Pulse #2 Control Register (W)
|
||||
APU_PULSE2RAMP = $4005 ; Pulse #2 Ramp Control Register (W)
|
||||
APU_PULSE2FTUNE = $4006 ; Pulse #2 Fine Tune Register (W)
|
||||
APU_PULSE2STUNE = $4007 ; Pulse #2 Coarse Tune Register (W)
|
||||
APU_TRICTRL1 = $4008 ; Triangle Control Register #1 (W)
|
||||
APU_TRICTRL2 = $4009 ; Triangle Control Register #2 (?)
|
||||
APU_TRIFREQ1 = $400A ; Triangle Frequency Register #1 (W)
|
||||
APU_TRIFREQ2 = $400B ; Triangle Frequency Register #2 (W)
|
||||
APU_NOISECTRL = $400C ; Noise Control Register #1 (W)
|
||||
;;APU_ = $400D ; Unused (???)
|
||||
APU_NOISEFREQ1 = $400E ; Noise Frequency Register #1 (W)
|
||||
APU_NOISEFREQ2 = $400F ; Noise Frequency Register #2 (W)
|
||||
APU_MODCTRL = $4010 ; Delta Modulation Control Register (W)
|
||||
APU_MODDA = $4011 ; Delta Modulation D/A Register (W)
|
||||
APU_MODADDR = $4012 ; Delta Modulation Address Register (W)
|
||||
APU_MODLEN = $4013 ; Delta Modulation Data Length Register (W)
|
||||
APU_SPR_DMA = $4014 ; Sprite DMA Register (W)
|
||||
APU_CHANCTRL = $4015 ; Sound/Vertical Clock Signal Register (R)
|
||||
APU_PAD1 = $4016 ; Joypad #1 (RW)
|
||||
APU_PAD2 = $4017 ; Joypad #2/SOFTCLK (RW)
|
||||
|
||||
|
||||
CH_HLINE = 11
|
||||
CH_VLINE = 14
|
||||
CH_ULCORNER = 176
|
||||
CH_URCORNER = 174
|
||||
CH_LLCORNER = 173
|
||||
CH_LRCORNER = 189
|
||||
CH_TTEE = 178
|
||||
CH_RTEE = 179
|
||||
CH_BTEE = 177
|
||||
CH_LTEE = 171
|
||||
CH_CROSS = 123
|
||||
CH_CURS_UP = 145
|
||||
CH_CURS_DOWN = 17
|
||||
CH_CURS_LEFT = 157
|
||||
CH_CURS_RIGHT = 29
|
||||
CH_PI = 126
|
||||
CH_DEL = 20
|
||||
CH_INS = 148
|
||||
CH_ENTER = 10
|
||||
CH_STOP = 3
|
||||
CH_ESC = 27
|
||||
|
150
asminc/o65.inc
150
asminc/o65.inc
|
@ -1,150 +0,0 @@
|
|||
;*****************************************************************************/
|
||||
;* */
|
||||
;* o65.inc */
|
||||
;* */
|
||||
;* Definitions for the o65 file format */
|
||||
;* */
|
||||
;* */
|
||||
;* */
|
||||
;* (C) 2002-2009, Ullrich von Bassewitz */
|
||||
;* Roemerstrasse 52 */
|
||||
;* D-70794 Filderstadt */
|
||||
;* EMail: uz@cc65.org */
|
||||
;* */
|
||||
;* */
|
||||
;* 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. */
|
||||
;* */
|
||||
;*****************************************************************************/
|
||||
|
||||
|
||||
|
||||
; This files exports structures and constants to handle the o65 relocatable
|
||||
; file format as defined by Andre Fachat.
|
||||
|
||||
|
||||
|
||||
; The o65 header structure (6502 format)
|
||||
.struct O65_HDR
|
||||
MARKER .byte 2 ; Non-C64 marker: $01 $00
|
||||
MAGIC .byte 3 ; o65 magic: "o65"
|
||||
VERSION .byte 1 ; Version number
|
||||
MODE .word ; Mode word
|
||||
TBASE .word ; Original text (code) segment address
|
||||
TLEN .word ; Size of text (code) segment
|
||||
DBASE .word ; Original data segment address
|
||||
DLEN .word ; Size of data segment
|
||||
BBASE .word ; Original bss segment address
|
||||
BLEN .word ; Size of bss segment
|
||||
ZBASE .word ; Original zp segment address
|
||||
ZLEN .word ; Size of zp segment
|
||||
STACK .word ; Stacksize needed
|
||||
.endstruct
|
||||
|
||||
; Marker, magic and version number
|
||||
O65_MARKER_0 = $01
|
||||
O65_MARKER_1 = $00
|
||||
O65_MAGIC_0 = $6F ; 'o'
|
||||
O65_MAGIC_1 = $36 ; '6'
|
||||
O65_MAGIC_2 = $35 ; '5'
|
||||
O65_VERSION = $00
|
||||
|
||||
; Defines for the mode word
|
||||
O65_CPU_65816 = $8000 ; Executable is for 65816
|
||||
O65_CPU_6502 = $0000 ; Executable is for the 6502
|
||||
O65_CPU_MASK = $8000 ; Mask to extract CPU type
|
||||
|
||||
O65_RELOC_PAGE = $4000 ; Page wise relocation
|
||||
O65_RELOC_BYTE = $0000 ; Byte wise relocation
|
||||
O65_RELOC_MASK = $4000 ; Mask to extract relocation type
|
||||
|
||||
O65_SIZE_32BIT = $2000 ; All size words are 32bit
|
||||
O65_SIZE_16BIT = $0000 ; All size words are 16bit
|
||||
O65_SIZE_MASK = $2000 ; Mask to extract size
|
||||
|
||||
O65_FTYPE_OBJ = $1000 ; Object file
|
||||
O65_FTYPE_EXE = $0000 ; Executable file
|
||||
O65_FTYPE_MASK = $1000 ; Mask to extract type
|
||||
|
||||
O65_ADDR_SIMPLE = $0800 ; Simple addressing
|
||||
O65_ADDR_DEFAULT = $0000 ; Default addressing
|
||||
O65_ADDR_MASK = $0800 ; Mask to extract addressing
|
||||
|
||||
O65_CHAIN = $0400 ; Chained file, another one follows
|
||||
O65_CHAIN_MASK = $0400 ; Mask to extract chain flag
|
||||
|
||||
O65_BSSZERO = $0200 ; BSS segment must be zeroed
|
||||
O65_BSSZERO_MASK = $0200 ; Mask to extract bss zero flag
|
||||
|
||||
; The following is used if O65_CPU == 6502
|
||||
O65_CPU2_6502 = $0000 ; Executable is for 6502
|
||||
O65_CPU2_65C02 = $0010 ; Executable is for 65C02
|
||||
O65_CPU2_65SC02 = $0020 ; Executable is for 65SC02
|
||||
O65_CPU2_65CE02 = $0030 ; Executable is for 65CE02
|
||||
O65_CPU2_6502X = $0040 ; Executable is for NMOS 6502
|
||||
O65_CPU2_65816_EMU = $0050 ; Executable is for 65816 in emul mode
|
||||
O65_CPU2_MASK = $00F0 ; Mask to extract CPU2 field
|
||||
|
||||
O65_ALIGN_1 = $0000 ; Bytewise alignment
|
||||
O65_ALIGN_2 = $0001 ; Align words
|
||||
O65_ALIGN_4 = $0002 ; Align longwords
|
||||
O65_ALIGN_256 = $0003 ; Align pages (256 bytes)
|
||||
O65_ALIGN_MASK = $0003 ; Mask to extract alignment
|
||||
|
||||
; The mode word as generated by the ld65 linker
|
||||
O65_MODE_CC65 = O65_CPU_6502 | O65_RELOC_BYTE | O65_SIZE_16BIT | O65_FTYPE_EXE | O65_ADDR_SIMPLE | O65_ALIGN_1
|
||||
|
||||
; Relocation type codes
|
||||
O65_RTYPE_WORD = $80
|
||||
O65_RTYPE_HIGH = $40
|
||||
O65_RTYPE_LOW = $20
|
||||
O65_RTYPE_SEGADDR = $C0
|
||||
O65_RTYPE_SEG = $A0
|
||||
O65_RTYPE_MASK = $E0
|
||||
|
||||
; Segment IDs
|
||||
O65_SEGID_UNDEF = $00
|
||||
O65_SEGID_ABS = $01
|
||||
O65_SEGID_TEXT = $02
|
||||
O65_SEGID_DATA = $03
|
||||
O65_SEGID_BSS = $04
|
||||
O65_SEGID_ZP = $05
|
||||
O65_SEGID_MASK = $07
|
||||
|
||||
; Option tags
|
||||
O65_OPT_FILENAME = 0
|
||||
O65_OPT_OS = 1
|
||||
O65_OPT_ASM = 2
|
||||
O65_OPT_AUTHOR = 3
|
||||
O65_OPT_TIMESTAMP = 4
|
||||
|
||||
; Operating system codes for O65_OPT_OS
|
||||
O65_OS_OSA65 = 1
|
||||
O65_OS_LUNIX = 2
|
||||
O65_OS_CC65 = 3
|
||||
O65_OS_OPENCBM = 4
|
||||
|
||||
; Load errors
|
||||
O65_LOAD_OK = 0 ; Module load successful
|
||||
O65_LOAD_ERR_READ = 1 ; Read error
|
||||
O65_LOAD_ERR_HDR = 2 ; Header error
|
||||
O65_LOAD_ERR_OS = 3 ; Wrong OS
|
||||
O65_LOAD_ERR_FMT = 4 ; Data format error
|
||||
O65_LOAD_ERR_MEM = 5 ; Not enough memory
|
||||
|
||||
|
||||
|
|
@ -1,509 +0,0 @@
|
|||
; opcodes.inc
|
||||
; ca65 6502 - opcode definitions, mainly for self modifying code
|
||||
;
|
||||
; Christian Krüger, latest change: 18-Sep-2010
|
||||
;
|
||||
; 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.
|
||||
;
|
||||
|
||||
; Opcode-Table
|
||||
; ------------
|
||||
; Post fix explanation:
|
||||
; imm = #$00
|
||||
; zp = $00
|
||||
; zpx = $00,X
|
||||
; zpy = $00,Y
|
||||
; izp = ($00)
|
||||
; izx = ($00,X)
|
||||
; izy = ($00),Y
|
||||
; abs = $0000
|
||||
; abx = $0000,X
|
||||
; aby = $0000,Y
|
||||
; ind = ($0000)
|
||||
; iax = ($0000,X)
|
||||
; rel = $0000 (PC-relative) (supressed here)
|
||||
|
||||
.macpack cpu
|
||||
|
||||
OPC_BRK = $00
|
||||
OPC_ORA_izx = $01
|
||||
OPC_ORA_zp = $05
|
||||
OPC_ASL_zp = $06
|
||||
OPC_PHP = $08
|
||||
OPC_ORA_imm = $09
|
||||
OPC_ASL = $0A
|
||||
OPC_ORA_abs = $0D
|
||||
OPC_ASL_abs = $0E
|
||||
|
||||
OPC_BPL = $10
|
||||
OPC_ORA_izy = $11
|
||||
OPC_ORA_zpx = $15
|
||||
OPC_ASL_zpx = $16
|
||||
OPC_CLC = $18
|
||||
OPC_ORA_aby = $19
|
||||
OPC_ORA_abx = $1D
|
||||
OPC_ASL_abx = $1E
|
||||
|
||||
OPC_JSR_abs = $20
|
||||
OPC_AND_izx = $21
|
||||
OPC_BIT_zp = $24
|
||||
OPC_AND_zp = $25
|
||||
OPC_ROL_zp = $26
|
||||
OPC_PLP = $28
|
||||
OPC_AND_imm = $29
|
||||
OPC_ROL = $2A
|
||||
OPC_BIT_abs = $2C
|
||||
OPC_AND_abs = $2D
|
||||
OPC_ROL_abs = $2E
|
||||
|
||||
OPC_BMI = $30
|
||||
OPC_AND_izy = $31
|
||||
OPC_AND_zpx = $35
|
||||
OPC_ROL_zpx = $36
|
||||
OPC_SEC = $38
|
||||
OPC_AND_aby = $39
|
||||
OPC_AND_abx = $3D
|
||||
OPC_ROL_abx = $3E
|
||||
|
||||
|
||||
OPC_RTI = $40
|
||||
OPC_EOR_izx = $41
|
||||
OPC_EOR_zp = $45
|
||||
OPC_LSR_zp = $46
|
||||
OPC_PHA = $48
|
||||
OPC_EOR_imm = $49
|
||||
OPC_LSR = $4A
|
||||
OPC_JMP_abs = $4C
|
||||
OPC_EOR_abs = $4D
|
||||
OPC_LSR_abs = $4E
|
||||
|
||||
OPC_BVC = $50
|
||||
OPC_EOR_izy = $51
|
||||
OPC_EOR_zpx = $55
|
||||
OPC_LSR_zpx = $56
|
||||
OPC_CLI = $58
|
||||
OPC_EOR_aby = $59
|
||||
OPC_EOR_abx = $5D
|
||||
OPC_LSR_abx = $5E
|
||||
|
||||
OPC_RTS = $60
|
||||
OPC_ADC_izx = $61
|
||||
OPC_ADC_zp = $65
|
||||
OPC_ROR_zp = $66
|
||||
OPC_PLA = $68
|
||||
OPC_ADC_imm = $69
|
||||
OPC_ROR = $6A
|
||||
OPC_JMP_ind = $6C
|
||||
OPC_ADC_abs = $6D
|
||||
OPC_ROR_abs = $6E
|
||||
|
||||
OPC_BVS = $70
|
||||
OPC_ADC_izy = $71
|
||||
OPC_ADC_zpx = $75
|
||||
OPC_ROR_zpx = $76
|
||||
OPC_SEI = $78
|
||||
OPC_ADC_aby = $79
|
||||
OPC_ADC_abx = $7D
|
||||
OPC_ROR_abx = $7E
|
||||
|
||||
OPC_STA_izx = $81
|
||||
OPC_STY_zp = $84
|
||||
OPC_STA_zp = $85
|
||||
OPC_STX_zp = $86
|
||||
OPC_DEY = $88
|
||||
OPC_TXA = $8A
|
||||
OPC_STY_abs = $8C
|
||||
OPC_STA_abs = $8D
|
||||
OPC_STX_abs = $8E
|
||||
|
||||
OPC_BCC = $90
|
||||
OPC_STA_izy = $91
|
||||
OPC_STY_zpx = $94
|
||||
OPC_STA_zpx = $95
|
||||
OPC_STX_zpy = $96
|
||||
OPC_TYA = $98
|
||||
OPC_STA_aby = $99
|
||||
OPC_TXS = $9A
|
||||
OPC_STA_abx = $9D
|
||||
|
||||
OPC_LDY_imm = $A0
|
||||
OPC_LDA_izx = $A1
|
||||
OPC_LDX_imm = $A2
|
||||
OPC_LDY_zp = $A4
|
||||
OPC_LDA_zp = $A5
|
||||
OPC_LDX_zp = $A6
|
||||
OPC_TAY = $A8
|
||||
OPC_LDA_imm = $A9
|
||||
OPC_TAX = $AA
|
||||
OPC_LDY_abs = $AC
|
||||
OPC_LDA_abs = $AD
|
||||
OPC_LDX_abs = $AE
|
||||
|
||||
OPC_BCS = $B0
|
||||
OPC_LDA_izy = $B1
|
||||
OPC_LDY_zpx = $B4
|
||||
OPC_LDA_zpx = $B5
|
||||
OPC_LDX_zpy = $B6
|
||||
OPC_CLV = $B8
|
||||
OPC_LDA_aby = $B9
|
||||
OPC_TSX = $BA
|
||||
OPC_LDY_abx = $BC
|
||||
OPC_LDA_abx = $BD
|
||||
OPC_LDX_aby = $BE
|
||||
|
||||
OPC_CPY_imm = $C0
|
||||
OPC_CMP_izx = $C1
|
||||
OPC_CPY_zp = $C4
|
||||
OPC_CMP_zp = $C5
|
||||
OPC_DEC_zp = $C6
|
||||
OPC_INY = $C8
|
||||
OPC_CMP_imm = $C9
|
||||
OPC_DEX = $CA
|
||||
OPC_CPY_abs = $CC
|
||||
OPC_CMP_abs = $CD
|
||||
OPC_DEC_abs = $CE
|
||||
|
||||
OPC_BNE = $D0
|
||||
OPC_CMP_izy = $D1
|
||||
OPC_CMP_zpx = $D5
|
||||
OPC_DEC_zpx = $D6
|
||||
OPC_CLD = $D8
|
||||
OPC_CMP_aby = $D9
|
||||
OPC_CMP_abx = $DD
|
||||
OPC_DEC_abx = $DE
|
||||
|
||||
OPC_CPX_imm = $E0
|
||||
OPC_SBC_izx = $E1
|
||||
OPC_CPX_zp = $E4
|
||||
OPC_SBC_zp = $E5
|
||||
OPC_INC_zp = $E6
|
||||
OPC_INX = $E8
|
||||
OPC_SBC_imm = $E9
|
||||
OPC_NOP = $EA
|
||||
OPC_CPX_abs = $EC
|
||||
OPC_SBC_abs = $ED
|
||||
OPC_INC_abs = $EE
|
||||
|
||||
|
||||
OPC_BEQ = $F0
|
||||
OPC_SBC_izy = $F1
|
||||
OPC_SBC_zpx = $F5
|
||||
OPC_INC_zpx = $F6
|
||||
OPC_SED = $F8
|
||||
OPC_SBC_aby = $F9
|
||||
OPC_SBC_abx = $FD
|
||||
OPC_INC_abx = $FE
|
||||
|
||||
|
||||
.if (.cpu .bitand ::CPU_ISET_65SC02)
|
||||
|
||||
; OPC_NOP = $02 ; doublet
|
||||
; OPC_NOP = $03 ; doublet
|
||||
OPC_TSB_zp = $04
|
||||
; OPC_NOP = $0B ; doublet
|
||||
OPC_TSB_abs = $0C
|
||||
|
||||
OPC_ORA_izp = $12
|
||||
; OPC_NOP = $13 ; doublet
|
||||
OPC_TRB_zp = $14
|
||||
OPC_INC = $1A
|
||||
; OPC_NOP = $1B ; doublet
|
||||
OPC_TRB_abs = $1C
|
||||
|
||||
; OPC_NOP = $22 ; doublet
|
||||
; OPC_NOP = $23 ; doublet
|
||||
; OPC_NOP = $2B ; doublet
|
||||
|
||||
OPC_AND_izp = $32
|
||||
; OPC_NOP = $33 ; doublet
|
||||
OPC_BIT_zpx = $34
|
||||
OPC_DEC = $3A
|
||||
; OPC_NOP = $3B ; doublet
|
||||
OPC_BIT_abx = $3C
|
||||
|
||||
; OPC_NOP = $42 ; doublet
|
||||
; OPC_NOP = $43 ; doublet
|
||||
; OPC_NOP = $44 ; doublet
|
||||
; OPC_NOP = $4B ; doublet
|
||||
|
||||
OPC_EOR_izp = $52
|
||||
; OPC_NOP = $53 ; doublet
|
||||
; OPC_NOP = $54 ; doublet
|
||||
; OPC_NOP = $5A ; doublet
|
||||
; OPC_NOP = $5B ; doublet
|
||||
OPC_EOR_abx = $5C
|
||||
|
||||
; OPC_NOP = $62 ; doublet
|
||||
; OPC_NOP = $63 ; doublet
|
||||
OPC_STZ_zp = $64
|
||||
; OPC_NOP = $6B ; doublet
|
||||
|
||||
OPC_ADC_izp = $72
|
||||
; OPC_NOP = $73 ; doublet
|
||||
OPC_STZ_zpx = $74
|
||||
OPC_PLY = $7A
|
||||
; OPC_NOP = $7B ; doublet
|
||||
OPC_JMP_iax = $7C
|
||||
|
||||
OPC_BRA = $80
|
||||
; OPC_NOP = $82 ; doublet
|
||||
; OPC_NOP = $83 ; doublet
|
||||
OPC_BIT_imm = $89
|
||||
; OPC_NOP = $8B ; doublet
|
||||
|
||||
OPC_STA_izp = $92
|
||||
; OPC_NOP = $93 ; doublet
|
||||
; OPC_NOP = $9B ; doublet
|
||||
OPC_STZ_abs = $9C
|
||||
OPC_STZ_abx = $9E
|
||||
|
||||
; OPC_NOP = $A3 ; doublet
|
||||
; OPC_NOP = $AB ; doublet
|
||||
|
||||
OPC_LDA_izp = $B2
|
||||
; OPC_NOP = $B3 ; doublet
|
||||
; OPC_NOP = $BB ; doublet
|
||||
|
||||
; OPC_NOP = $C2 ; doublet
|
||||
; OPC_NOP = $C3 ; doublet
|
||||
; OPC_NOP = $CB ; doublet
|
||||
|
||||
OPC_CMP_izp = $D2
|
||||
; OPC_NOP = $D3 ; doublet
|
||||
; OPC_NOP = $D4 ; doublet
|
||||
OPC_PHX = $DA
|
||||
; OPC_NOP = $DB ; doublet
|
||||
; OPC_NOP = $DC ; doublet
|
||||
|
||||
; OPC_NOP = $E2 ; doublet
|
||||
; OPC_NOP = $E3 ; doublet
|
||||
; OPC_NOP = $EB ; doublet
|
||||
|
||||
OPC_SBC_izp = $F2
|
||||
; OPC_NOP = $F3 ; doublet
|
||||
; OPC_NOP = $F4 ; doublet
|
||||
OPC_PLX = $FA
|
||||
; OPC_NOP = $FB ; doublet
|
||||
; OPC_NOP = $FC ; doublet
|
||||
|
||||
|
||||
.if (.cpu .bitand ::CPU_ISET_65C02)
|
||||
|
||||
; bit instructions for 65C02
|
||||
|
||||
OPC_RMB0 = $07
|
||||
OPC_RMB1 = $17
|
||||
OPC_RMB2 = $27
|
||||
OPC_RMB3 = $37
|
||||
OPC_RMB4 = $47
|
||||
OPC_RMB5 = $57
|
||||
OPC_RMB6 = $67
|
||||
OPC_RMB7 = $77
|
||||
|
||||
OPC_SMB0 = $87
|
||||
OPC_SMB1 = $97
|
||||
OPC_SMB2 = $A7
|
||||
OPC_SMB3 = $B7
|
||||
OPC_SMB4 = $C7
|
||||
OPC_SMB5 = $D7
|
||||
OPC_SMB6 = $E7
|
||||
OPC_SMB7 = $F7
|
||||
|
||||
OPC_BBR0 = $0F
|
||||
OPC_BBR1 = $1F
|
||||
OPC_BBR2 = $2F
|
||||
OPC_BBR3 = $3F
|
||||
OPC_BBR4 = $4F
|
||||
OPC_BBR5 = $5F
|
||||
OPC_BBR6 = $6F
|
||||
OPC_BBR7 = $7F
|
||||
|
||||
OPC_BBS0 = $8F
|
||||
OPC_BBS1 = $9F
|
||||
OPC_BBS2 = $AF
|
||||
OPC_BBS3 = $BF
|
||||
OPC_BBS4 = $CF
|
||||
OPC_BBS5 = $DF
|
||||
OPC_BBS6 = $EF
|
||||
OPC_BBS7 = $FF
|
||||
|
||||
.else
|
||||
|
||||
; no bit instructions for 65SC02
|
||||
|
||||
; OPC_NOP = $07 ; doublet
|
||||
; OPC_NOP = $17 ; doublet
|
||||
; OPC_NOP = $27 ; doublet
|
||||
; OPC_NOP = $37 ; doublet
|
||||
; OPC_NOP = $47 ; doublet
|
||||
; OPC_NOP = $57 ; doublet
|
||||
; OPC_NOP = $67 ; doublet
|
||||
; OPC_NOP = $77 ; doublet
|
||||
; OPC_NOP = $87 ; doublet
|
||||
; OPC_NOP = $97 ; doublet
|
||||
; OPC_NOP = $A7 ; doublet
|
||||
; OPC_NOP = $B7 ; doublet
|
||||
; OPC_NOP = $C7 ; doublet
|
||||
; OPC_NOP = $D7 ; doublet
|
||||
; OPC_NOP = $E7 ; doublet
|
||||
; OPC_NOP = $F7 ; doublet
|
||||
; OPC_NOP = $0F ; doublet
|
||||
; OPC_NOP = $1F ; doublet
|
||||
; OPC_NOP = $2F ; doublet
|
||||
; OPC_NOP = $3F ; doublet
|
||||
; OPC_NOP = $4F ; doublet
|
||||
; OPC_NOP = $5F ; doublet
|
||||
; OPC_NOP = $6F ; doublet
|
||||
; OPC_NOP = $7F ; doublet
|
||||
; OPC_NOP = $8F ; doublet
|
||||
; OPC_NOP = $9F ; doublet
|
||||
; OPC_NOP = $AF ; doublet
|
||||
; OPC_NOP = $BF ; doublet
|
||||
; OPC_NOP = $CF ; doublet
|
||||
; OPC_NOP = $DF ; doublet
|
||||
; OPC_NOP = $EF ; doublet
|
||||
; OPC_NOP = $FF ; doublet
|
||||
|
||||
.endif
|
||||
|
||||
.elseif (.cpu .bitand ::CPU_ISET_6502X)
|
||||
|
||||
; stable, undocumented opcodes
|
||||
|
||||
; OPC_KIL = $02 ; unstable
|
||||
OPC_SLO_izx = $03
|
||||
OPC_NOP_zp = $04
|
||||
OPC_SLO_zp = $07
|
||||
OPC_ANC_imm = $0B
|
||||
OPC_NOP_abs = $0C
|
||||
OPC_SLO_abs = $0F
|
||||
|
||||
; OPC_KIL = $12 ; unstable
|
||||
OPC_SLO_izy = $13
|
||||
OPC_NOP_zpx = $14
|
||||
OPC_SLO_zpx = $17
|
||||
;OPC_NOP = $1A
|
||||
OPC_SLO_aby = $1B
|
||||
OPC_NOP_abx = $1C
|
||||
OPC_SLO_abx = $1F
|
||||
|
||||
; OPC_KIL = $22 ; unstable
|
||||
OPC_RLA_izx = $23
|
||||
OPC_RLA_zp = $27
|
||||
OPC_ANC_imm = $2B
|
||||
OPC_RLA_abs = $2F
|
||||
|
||||
; OPC_KIL = $32 ; unstable
|
||||
OPC_RLA_izy = $33
|
||||
OPC_NOP_zpx = $34
|
||||
OPC_RLA_zpx = $37
|
||||
; OPC_NOP = $3A ; doublet
|
||||
OPC_RLA_aby = $3B
|
||||
OPC_NOP_abx = $3C
|
||||
OPC_RLA_abx = $3F
|
||||
|
||||
; OPC_KIL = $42 ; unstable
|
||||
OPC_SRE_izx = $43
|
||||
OPC_NOP_zp = $44
|
||||
OPC_SRE_zp = $47
|
||||
OPC_ALR_imm = $4B
|
||||
OPC_SRE_abs = $4F
|
||||
|
||||
; OPC_KIL = $52 ; unstable
|
||||
OPC_SRE_izy = $53
|
||||
OPC_NOP_zpx = $54
|
||||
OPC_SRE_zpx = $57
|
||||
; OPC_NOP = $5A ; doublet
|
||||
OPC_SRE_aby = $5B
|
||||
OPC_NOP_abx = $5C
|
||||
OPC_SRE_abx = $5F
|
||||
|
||||
; OPC_KIL = $62
|
||||
OPC_RRA_izx = $63
|
||||
OPC_NOP_zp = $64
|
||||
OPC_RRA_zp = $67
|
||||
OPC_ARR_imm = $6B
|
||||
OPC_RRA_abs = $6F
|
||||
|
||||
; OPC_KIL = $72
|
||||
OPC_RRA_izy = $73
|
||||
OPC_NOP_zpx = $74
|
||||
OPC_RRA_zpx = $77
|
||||
; OPC_NOP = $7A ; doublet
|
||||
OPC_RRA_aby = $7B
|
||||
OPC_NOP_abx = $7C
|
||||
OPC_RRA_abx = $7F
|
||||
|
||||
OPC_NOP_imm = $80
|
||||
; OPC_NOP_imm = $82 ; doublet
|
||||
OPC_SAX_izx = $83
|
||||
OPC_SAX_zp = $87
|
||||
; OPC_NOP_imm = $89 ; doublet
|
||||
; OPC_XAA = $8B ; unstable
|
||||
OPC_SAX_abs = $8F
|
||||
|
||||
; OPC_KIL = $92 ; unstable
|
||||
; OPC_AHX_izy = $93 ; unstable
|
||||
OPC_SAX_zpy = $97
|
||||
; OPC_TAS_aby = $9B ; unstable
|
||||
; OPC_SHY_abx = $9C ; unstable
|
||||
; OPC_SHX_aby = $9E ; unstable
|
||||
; OPC_AHX_aby = $9F ; unstable
|
||||
|
||||
OPC_LAX_izx = $A3
|
||||
OPC_LAX_zp = $A7
|
||||
; OPC_LAX_imm = $AB ; unstable
|
||||
OPC_LAX_abs = $AF
|
||||
|
||||
; OPC_KIL = $B2 ; unstable
|
||||
OPC_LAX_izy = $B3
|
||||
OPC_LAX_zpy = $B7
|
||||
OPC_LAS_aby = $BB
|
||||
OPC_LAX_aby = $BF
|
||||
|
||||
; OPC_NOP_imm = $C2 ; doublet
|
||||
OPC_DCP_izx = $C3
|
||||
OPC_DCP_zp = $C7
|
||||
OPC_AXS_imm = $CB
|
||||
OPC_DCP_abs = $CF
|
||||
|
||||
; OPC_KIL = $D2 ; unstable
|
||||
OPC_DCP_izy = $D3
|
||||
OPC_NOP_zpx = $D4
|
||||
OPC_DCP_zpx = $D7
|
||||
OPC_NOP_DA = $DA
|
||||
OPC_DCP_aby = $DB
|
||||
OPC_NOP_abx = $DC
|
||||
OPC_DCP_abx = $DF
|
||||
|
||||
; OPC_NOP_imm = $E2 ; doublet
|
||||
OPC_ISC_izx = $E3
|
||||
OPC_ISC_zp = $E7
|
||||
; OPC_SBC_imm = $EB ; doublet
|
||||
OPC_ISC_abs = $EF
|
||||
|
||||
; OPC_KIL = $F2 ; unstable
|
||||
OPC_ISC_izy = $F3
|
||||
OPC_NOP_zpx = $F4
|
||||
OPC_ISC_zpx = $F7
|
||||
OPC_NOP_FA = $FA
|
||||
OPC_ISC_aby = $FB
|
||||
OPC_NOP_abx = $FC
|
||||
OPC_ISC_abx = $FF
|
||||
|
||||
.endif
|
|
@ -1,92 +0,0 @@
|
|||
;
|
||||
; PCE definitions. By Groepaz/Hitmem.
|
||||
;
|
||||
|
||||
; FIXME: screen dimensions my change according to selected video mode
|
||||
screenrows = (224/8)
|
||||
charsperline = 61
|
||||
|
||||
CH_HLINE = 1
|
||||
CH_VLINE = 2
|
||||
|
||||
; 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_UNK03 = 3 ; (unknown)
|
||||
VDC_UNK04 = 4 ; (unknown)
|
||||
VDC_CR = 5 ; Control Register
|
||||
VDC_RCR = 6 ; Raster Counter Register
|
||||
VDC_BXR = 7 ; Background X-Scroll Register
|
||||
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_VCR = 14 ; Vertical display END position register
|
||||
VDC_DCR = 15 ; (DMA) Control Register
|
||||
VDC_SOUR = 16 ; (DMA) Source Register
|
||||
VDC_DESR = 17 ; (DMA) Destination Register
|
||||
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
|
||||
|
||||
VDC_CTRL = $0000
|
||||
VDC_DATA_LO = $0002
|
||||
VDC_DATA_HI = $0003
|
||||
|
||||
; 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.
|
||||
|
||||
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
|
||||
|
||||
; programmable sound generator (PSG)
|
||||
|
||||
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
|
||||
|
||||
; timer
|
||||
|
||||
TIMER = $0c00 ; base
|
||||
|
||||
TIMER_COUNT = $0c00
|
||||
TIMER_CTRL = $0c01
|
||||
|
||||
JOY_CTRL = $1000
|
||||
|
||||
IRQ_MASK = $1402
|
||||
IRQ_STATUS = $1403
|
||||
|
||||
CDR_MEM_DISABLE = $1803
|
||||
CDR_MEM_ENABLE = $1807
|
||||
|
||||
; Write VDC register
|
||||
.macro VREG arg1,arg2
|
||||
st0 #arg1
|
||||
st1 #<(arg2)
|
||||
st2 #>(arg2)
|
||||
.endmacro
|
|
@ -1,58 +0,0 @@
|
|||
;
|
||||
; PET generic definitions.
|
||||
;
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; Zero page, Commodore stuff
|
||||
|
||||
MEMSIZE := $34 ; Size of memory installed
|
||||
TXTPTR := $77 ; Pointer into BASIC source code
|
||||
TIME := $8D ; 60HZ clock
|
||||
KEY_COUNT := $9E ; Number of keys in input buffer
|
||||
RVS := $9F ; Reverse flag
|
||||
CURS_FLAG := $A7 ; 1 = cursor off
|
||||
CURS_BLINK := $A8 ; Blink counter
|
||||
CURS_CHAR := $A9 ; Character under the cursor
|
||||
CURS_STATE := $AA ; Cursor blink state
|
||||
SCREEN_PTR := $C4 ; Pointer to current char in text screen
|
||||
CURS_X := $C6 ; Cursor column
|
||||
FNLEN := $D1 ; Length of filename
|
||||
LFN := $D2 ; Current Logical File Number
|
||||
SECADR := $D3 ; Secondary address
|
||||
DEVNUM := $D4 ; Device number
|
||||
SCR_LINELEN := $D5 ; Screen line length
|
||||
CURS_Y := $D8 ; Cursor row
|
||||
FNADR := $DA ; Pointer to file name
|
||||
|
||||
BASIC_BUF := $200 ; Location of command-line
|
||||
BASIC_BUF_LEN = 81 ; Maximum length of command-line
|
||||
|
||||
KEY_BUF := $26F ; Keyboard buffer
|
||||
|
||||
;----------------------------------------------------------------------------
|
||||
; PET ROM type detection
|
||||
|
||||
PET_DETECT := $FFFB
|
||||
PET_2000 = $CA
|
||||
PET_3000 = $FC
|
||||
PET_4000 = $FD
|
||||
|
||||
|
||||
;----------------------------------------------------------------------------
|
||||
; Vector and other locations
|
||||
|
||||
IRQVec := $0090
|
||||
BRKVec := $0092
|
||||
NMIVec := $0094
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; I/O: 6522 VIA2
|
||||
|
||||
VIA := $E840
|
||||
VIA_PRB := $E840
|
||||
VIA_PRA := $E841
|
||||
VIA_DDRB := $E842
|
||||
VIA_DDRA := $E843
|
||||
|
||||
|
|
@ -1,87 +0,0 @@
|
|||
;
|
||||
; Plus/4 generic definitions.
|
||||
;
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; Zero page, Commodore stuff
|
||||
|
||||
TMPPTR := $22 ; Temporary ptr used by BASIC
|
||||
TXTPTR := $3B ; Pointer into BASIC source code
|
||||
TIME := $A3 ; 60HZ clock
|
||||
FNAM_LEN := $AB ; Length of filename
|
||||
LFN := $AC ; Logical file number
|
||||
SECADR := $AD ; Secondary address
|
||||
DEVNUM := $AE ; Device number
|
||||
FNAM := $AF ; Pointer to filename for OPEN
|
||||
KEY_COUNT := $EF ; Number of keys in input buffer
|
||||
RVS := $C2 ; Reverse flag
|
||||
CURS_X := $CA ; Cursor column
|
||||
CURS_Y := $CD ; Cursor row
|
||||
SCREEN_PTR := $C8 ; Pointer to current char in text screen
|
||||
CRAM_PTR := $EA ; Pointer to current char in color RAM
|
||||
|
||||
BASIC_BUF := $200 ; Location of command-line
|
||||
BASIC_BUF_LEN = 89 ; Maximum length of command-line
|
||||
|
||||
FNBUF := $25E ; Buffer for filename
|
||||
FETCH := $494 ; lda (zp),y from RAM
|
||||
CHARCOLOR := $53B
|
||||
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
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; Vector and other locations
|
||||
|
||||
IRQVec := $0314
|
||||
BRKVec := $0316
|
||||
NMIVec := $0318
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; Screen size
|
||||
|
||||
XSIZE = 40
|
||||
YSIZE = 25
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; I/O
|
||||
|
||||
TED_T1LO := $FF00
|
||||
TED_T1HI := $FF01
|
||||
TED_T2LO := $FF02
|
||||
TED_T2HI := $FF03
|
||||
TED_T3LO := $FF04
|
||||
TED_T4HI := $FF05
|
||||
TED_MULTI1 := $FF07
|
||||
TED_KBD := $FF08
|
||||
TED_CURSHI := $FF0C
|
||||
TED_CURSLO := $FF0D
|
||||
TED_V1FRQLO := $FF0E
|
||||
TED_V2FRQLO := $FF0F
|
||||
TED_V2FRQHI := $FF10
|
||||
TED_BGCOLOR := $FF15
|
||||
TED_COLOR1 := $FF16
|
||||
TED_COLOR2 := $FF17
|
||||
TED_COLOR3 := $FF18
|
||||
TED_BORDERCOLOR := $FF19
|
||||
TED_VLINEHI := $FF1C
|
||||
TED_VLINELO := $FF1D
|
||||
TED_HPOS := $FF1E
|
||||
TED_ROMSEL := $FF3E
|
||||
TED_RAMSEL := $FF3F
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; RAM/ROM selection addresses
|
||||
|
||||
ENABLE_ROM := TED_ROMSEL
|
||||
ENABLE_RAM := TED_RAMSEL
|
||||
|
||||
|
|
@ -1,55 +0,0 @@
|
|||
;****************************************************************************
|
||||
;* *
|
||||
;* ser-error.inc *
|
||||
;* *
|
||||
;* Serial communication API *
|
||||
;* *
|
||||
;* *
|
||||
;* *
|
||||
;* (C) 2003-2012, Ullrich von Bassewitz *
|
||||
;* Roemerstrasse 52 *
|
||||
;* D-70794 Filderstadt *
|
||||
;* EMail: uz@cc65.org *
|
||||
;* *
|
||||
;* *
|
||||
;*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. *
|
||||
;* *
|
||||
;****************************************************************************
|
||||
|
||||
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; Error codes
|
||||
|
||||
.enum
|
||||
SER_ERR_OK ; Not an error - relax
|
||||
SER_ERR_NO_DRIVER ; No driver available
|
||||
SER_ERR_CANNOT_LOAD ; Error loading driver
|
||||
SER_ERR_INV_DRIVER ; Invalid driver
|
||||
SER_ERR_NO_DEVICE ; Device (hardware) not found
|
||||
SER_ERR_BAUD_UNAVAIL ; Baud rate not available
|
||||
SER_ERR_NO_DATA ; Nothing to read
|
||||
SER_ERR_OVERFLOW ; No room in send buffer
|
||||
SER_ERR_INIT_FAILED ; Initialization failed
|
||||
SER_ERR_INV_IOCTL ; IOCTL not supported
|
||||
SER_ERR_INSTALLED ; A driver is already installed
|
||||
SER_ERR_NOT_OPEN ; Driver not open
|
||||
|
||||
SER_ERR_COUNT ; Special: Number of error codes
|
||||
.endenum
|
||||
|
|
@ -1,163 +0,0 @@
|
|||
;****************************************************************************
|
||||
;* *
|
||||
;* ser-kernel.inc *
|
||||
;* *
|
||||
;* Serial communication API *
|
||||
;* *
|
||||
;* *
|
||||
;* *
|
||||
;*(C) 2003-2006, Ullrich von Bassewitz *
|
||||
;* Römerstrasse 52 *
|
||||
;* D-70794 Filderstadt *
|
||||
;*EMail: uz@cc65.org *
|
||||
;* *
|
||||
;* *
|
||||
;*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. *
|
||||
;* *
|
||||
;****************************************************************************
|
||||
|
||||
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; The driver header
|
||||
|
||||
.struct SER_HDR
|
||||
ID .byte 3 ; Contains 0x73, 0x65, 0x72 ("ser")
|
||||
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
|
||||
.endstruct
|
||||
.endstruct
|
||||
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; The SER API version, stored SER_HDR::VERSION
|
||||
|
||||
SER_API_VERSION = $02
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; ser_params
|
||||
|
||||
.struct SER_PARAMS
|
||||
BAUDRATE .byte ; Baudrate
|
||||
DATABITS .byte ; Number of data bits
|
||||
STOPBITS .byte ; Number of stop bits
|
||||
PARITY .byte ; Parity setting
|
||||
HANDSHAKE .byte ; Type of handshake to use
|
||||
.endstruct
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; Serial parameters
|
||||
|
||||
; Baudrate
|
||||
SER_BAUD_45_5 = $00
|
||||
SER_BAUD_50 = $01
|
||||
SER_BAUD_75 = $02
|
||||
SER_BAUD_110 = $03
|
||||
SER_BAUD_134_5 = $04
|
||||
SER_BAUD_150 = $05
|
||||
SER_BAUD_300 = $06
|
||||
SER_BAUD_600 = $07
|
||||
SER_BAUD_1200 = $08
|
||||
SER_BAUD_1800 = $09
|
||||
SER_BAUD_2400 = $0A
|
||||
SER_BAUD_3600 = $0B
|
||||
SER_BAUD_4800 = $0C
|
||||
SER_BAUD_7200 = $0D
|
||||
SER_BAUD_9600 = $0E
|
||||
SER_BAUD_19200 = $0F
|
||||
SER_BAUD_38400 = $10
|
||||
SER_BAUD_57600 = $11
|
||||
SER_BAUD_115200 = $12
|
||||
SER_BAUD_230400 = $13
|
||||
SER_BAUD_31250 = $14
|
||||
SER_BAUD_62500 = $15
|
||||
SER_BAUD_56_875 = $16
|
||||
|
||||
; Data bit settings
|
||||
SER_BITS_5 = $00
|
||||
SER_BITS_6 = $01
|
||||
SER_BITS_7 = $02
|
||||
SER_BITS_8 = $03
|
||||
|
||||
; Stop bit settings
|
||||
SER_STOP_1 = $00
|
||||
SER_STOP_2 = $01
|
||||
|
||||
; Parity
|
||||
SER_PAR_NONE = $00
|
||||
SER_PAR_ODD = $01
|
||||
SER_PAR_EVEN = $02
|
||||
SER_PAR_MARK = $03
|
||||
SER_PAR_SPACE = $04
|
||||
|
||||
; Handshake
|
||||
SER_HS_NONE = $00 ; No handshake
|
||||
SER_HS_HW = $01 ; Hardware (RTS/CTS) handshake
|
||||
SER_HS_SW = $02 ; Software handshake
|
||||
|
||||
; Bit masks to mask out things from the status returned by ser_status
|
||||
SER_STATUS_PE = $01 ; Parity error
|
||||
SER_STATUS_FE = $02 ; Framing error
|
||||
SER_STATUS_OE = $04 ; Overrun error
|
||||
SER_STATUS_DCD = $20 ; NOT data carrier detect
|
||||
SER_STATUS_DSR = $40 ; NOT data set ready
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; Variables
|
||||
|
||||
.global _ser_drv ; Pointer to driver
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; Driver entry points
|
||||
|
||||
.global ser_install
|
||||
.global ser_uninstall
|
||||
.global ser_open
|
||||
.global ser_close
|
||||
.global ser_get
|
||||
.global ser_put
|
||||
.global ser_status
|
||||
.global ser_ioctl
|
||||
.global ser_irq
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; C callable functions
|
||||
|
||||
.global _ser_load_driver
|
||||
.global _ser_unload
|
||||
.global _ser_install
|
||||
.global _ser_uninstall
|
||||
.global _ser_open
|
||||
.global _ser_close
|
||||
.global _ser_get
|
||||
.global _ser_put
|
||||
.global _ser_status
|
||||
.global _ser_ioctl
|
||||
|
||||
.global _ser_clear_ptr
|
||||
|
|
@ -1,57 +0,0 @@
|
|||
;/*****************************************************************************/
|
||||
;/* */
|
||||
;/* signal.inc */
|
||||
;/* */
|
||||
;/* Signal handling definitions */
|
||||
;/* */
|
||||
;/* */
|
||||
;/* */
|
||||
;/* (C) 2002 Ullrich von Bassewitz */
|
||||
;/* Wacholderweg 14 */
|
||||
;/* D-70597 Stuttgart */
|
||||
;/* EMail: uz@musoftware.de */
|
||||
;/* */
|
||||
;/* */
|
||||
;/* 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. */
|
||||
;/* */
|
||||
;/*****************************************************************************/
|
||||
|
||||
|
||||
|
||||
; Standard signal handling functions
|
||||
SIG_ERR = $0000
|
||||
|
||||
; Signal numbers
|
||||
SIGABRT = 0
|
||||
SIGFPE = 1
|
||||
SIGILL = 2
|
||||
SIGINT = 3
|
||||
SIGSEGV = 4
|
||||
SIGTERM = 5
|
||||
SIGCOUNT = 6 ; Number of signals
|
||||
|
||||
; Table with signal handlers (asm code only)
|
||||
.global sigtable
|
||||
|
||||
; Function declarations
|
||||
.global __sig_ign
|
||||
.global __sig_dfl
|
||||
.global _signal
|
||||
.global _raise
|
||||
|
||||
|
245
asminc/smc.inc
245
asminc/smc.inc
|
@ -1,245 +0,0 @@
|
|||
; 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
|
|
@ -1,70 +0,0 @@
|
|||
;*****************************************************************************/
|
||||
;* */
|
||||
;* stdio.inc */
|
||||
;* */
|
||||
;* Mirror definitions for stdio.h */
|
||||
;* */
|
||||
;* */
|
||||
;* */
|
||||
;* (C) 2003-2005, Ullrich von Bassewitz */
|
||||
;* Römerstrasse 52 */
|
||||
;* D-70794 Filderstadt */
|
||||
;* EMail: uz@cc65.org */
|
||||
;* */
|
||||
;* */
|
||||
;* 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. */
|
||||
;* */
|
||||
;*****************************************************************************/
|
||||
|
||||
|
||||
|
||||
;----------------------------------------------------------------------------
|
||||
; Constants
|
||||
|
||||
_IOFBF = 0
|
||||
_IOLBF = 1
|
||||
_IONBF = 2
|
||||
BUFSIZ = 256
|
||||
EOF = -1
|
||||
.if .defined(__APPLE2__)
|
||||
FILENAME_MAX = 64+1
|
||||
.elseif .defined(__ATARI__)
|
||||
FILENAME_MAX = 12+1
|
||||
.elseif .defined(__LUNIX__)
|
||||
FILENAME_MAX = 80+1
|
||||
.else
|
||||
FILENAME_MAX = 16+1
|
||||
.endif
|
||||
L_tmpnam = FILENAME_MAX
|
||||
SEEK_CUR = 0
|
||||
SEEK_END = 1
|
||||
SEEK_SET = 2
|
||||
TMP_MAX = 256
|
||||
|
||||
; Maximum number of open files (size of the file table)
|
||||
FOPEN_MAX = 8
|
||||
|
||||
;----------------------------------------------------------------------------
|
||||
; External variables
|
||||
|
||||
.global _stdin
|
||||
.global _stdout
|
||||
.global _stderr
|
||||
|
||||
|
||||
|
|
@ -1,76 +0,0 @@
|
|||
; supervision symbols
|
||||
|
||||
; supervision 65c02s
|
||||
; in cc65 up to 2.9.1 65c02 means 65c02s
|
||||
.pc02
|
||||
|
||||
lcd_addr = $4000
|
||||
LCD_LINESIZE = $30
|
||||
LCD_WIDTH = 160
|
||||
LCD_HEIGHT = 160
|
||||
; 2 bit per pixel, packed
|
||||
|
||||
lcd_width = $2000
|
||||
lcd_height = $2001
|
||||
lcd_xpos = $2002 ; in pixel, bit 0+1 not used
|
||||
lcd_ypos = $2003 ; weird
|
||||
|
||||
sv_port_r = $2021
|
||||
sv_port_w = $2022
|
||||
|
||||
sv_timer_count = $2023
|
||||
; read for quitting
|
||||
sv_timer_quit = $2024
|
||||
|
||||
; bit 0 timer, bit 1 dma
|
||||
sv_irq_source = $2027
|
||||
SV_IRQ_REQUEST_TIMER = 1
|
||||
SV_IRQ_REQUEST_DMA = 2
|
||||
|
||||
; bit 5,6,7 select bank at 0x8000
|
||||
sv_bank = $2026
|
||||
SV_NMI_ENABLE_ON = 1
|
||||
SV_IRQ_ENABLE_TIMER = 2
|
||||
SV_IRQ_ENABLE_DMA = 4
|
||||
SV_LCD_ON = 8
|
||||
SV_TIMER_MODE_240Hz = $10 ; else 15360
|
||||
|
||||
|
||||
; low activ/pressed
|
||||
sv_control = $2020
|
||||
SV_RIGHT = 1
|
||||
SV_LEFT = 2
|
||||
SV_DOWN = 4
|
||||
SV_UP = 8
|
||||
SV_BUTTONB = $10
|
||||
SV_BUTTONA = $20
|
||||
SV_SELECT = $40
|
||||
SV_START = $80
|
||||
|
||||
; frequency=125000/counter
|
||||
sv_audio_right_counter = $2010 ;word
|
||||
sv_audio_left_counter = $2014
|
||||
SV_AUDIO_ON =$40
|
||||
;bits 0..3 volume
|
||||
; bit 4 ?
|
||||
; bit 5 ?
|
||||
sv_audio_right_control = $2012
|
||||
sv_audio_left_control = $2016
|
||||
; write activates tone for x/60 sec (0 means 256)
|
||||
sv_audio_right_timer = $2013
|
||||
sv_audio_left_timer = $2017
|
||||
|
||||
|
||||
;read for irq quitting
|
||||
sv_dma_quit = $2025
|
||||
sv_dma_on = $201c
|
||||
; bit 7 true start, false stop
|
||||
sv_dma_start = $2018 ; word
|
||||
sv_dma_size = $201a ; *32 samples
|
||||
sv_dma_control = $201b
|
||||
; bit 0,1 speed: 0 15360, 11 15360/4
|
||||
; bit 2,3 volume: 0 silent, 11 loud
|
||||
|
||||
sv_noise_volume = $2028 ; and frequency
|
||||
sv_noise_timer = $2029
|
||||
sv_noise_control = $202a
|
|
@ -1,52 +0,0 @@
|
|||
;*****************************************************************************/
|
||||
;* */
|
||||
;* tgi-error.inc */
|
||||
;* */
|
||||
;* TGI error codes */
|
||||
;* */
|
||||
;* */
|
||||
;* */
|
||||
;* (C) 2002-2012, Ullrich von Bassewitz */
|
||||
;* Roemerstrasse 52 */
|
||||
;* D-70794 Filderstadt */
|
||||
;* EMail: uz@cc65.org */
|
||||
;* */
|
||||
;* */
|
||||
;* 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. */
|
||||
;* */
|
||||
;*****************************************************************************/
|
||||
|
||||
|
||||
|
||||
; Error constants
|
||||
.enum
|
||||
TGI_ERR_OK ; No error
|
||||
TGI_ERR_NO_DRIVER ; No driver available
|
||||
TGI_ERR_CANNOT_LOAD ; Error loading driver or font
|
||||
TGI_ERR_INV_DRIVER ; Invalid driver
|
||||
TGI_ERR_INV_MODE ; Mode not supported by driver
|
||||
TGI_ERR_INV_ARG ; Invalid function argument
|
||||
TGI_ERR_INV_FUNC ; Function not supported
|
||||
TGI_ERR_INV_FONT ; Font file is invalid
|
||||
TGI_ERR_NO_RES ; Out of resources (memory, handles, ...)
|
||||
TGI_ERR_UNKNOWN ; Unknown error
|
||||
TGI_ERR_INSTALLED ; A driver is already installed
|
||||
|
||||
TGI_ERR_COUNT ; Special: Number of error messages
|
||||
.endenum
|
||||
|
|
@ -1,234 +0,0 @@
|
|||
;*****************************************************************************/
|
||||
;* */
|
||||
;* tgi-kernel.inc */
|
||||
;* */
|
||||
;* TGI kernel interface */
|
||||
;* */
|
||||
;* */
|
||||
;* */
|
||||
;* (C) 2002-2012, Ullrich von Bassewitz */
|
||||
;* Roemerstrasse 52 */
|
||||
;* D-70794 Filderstadt */
|
||||
;* EMail: uz@cc65.org */
|
||||
;* */
|
||||
;* */
|
||||
;* 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. */
|
||||
;* */
|
||||
;*****************************************************************************/
|
||||
|
||||
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; The driver header
|
||||
|
||||
.struct TGI_HDR
|
||||
ID .byte 3 ; Contains 0x74, 0x67, 0x69 ("tgi")
|
||||
VERSION .byte 1 ; Interface version
|
||||
LIBREF .addr ; Library reference
|
||||
VARS .struct
|
||||
XRES .word 1 ; X resolution
|
||||
YRES .word 1 ; Y resolution
|
||||
COLORCOUNT .byte 1 ; Number of available colors
|
||||
PAGECOUNT .byte 1 ; Number of screens available
|
||||
FONTWIDTH .byte 1 ; System font width in pixel
|
||||
FONTHEIGHT .byte 1 ; System font height in pixel
|
||||
ASPECTRATIO .word 1 ; Fixed point 8.8 format
|
||||
FLAGS .byte 1 ; TGI driver flags
|
||||
.endstruct
|
||||
JUMPTAB .struct
|
||||
INSTALL .addr ; INSTALL routine
|
||||
UNINSTALL .addr ; UNINSTALL routine
|
||||
INIT .addr ; INIT routine
|
||||
DONE .addr ; DONE routine
|
||||
GETERROR .addr ; GETERROR routine
|
||||
CONTROL .addr ; CONTROL routine
|
||||
CLEAR .addr ; CLEAR routine
|
||||
SETVIEWPAGE .addr ; SETVIEWPAGE routine
|
||||
SETDRAWPAGE .addr ; SETDRAWPAGE routine
|
||||
SETCOLOR .addr ; SETCOLOR routine
|
||||
SETPALETTE .addr ; SETPALETTE routine
|
||||
GETPALETTE .addr ; GETPALETTE routine
|
||||
GETDEFPALETTE .addr ; GETDEFPALETTE routine
|
||||
SETPIXEL .addr ; SETPIXEL routine
|
||||
GETPIXEL .addr ; GETPIXEL routine
|
||||
LINE .addr ; LINE routine
|
||||
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
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; Bitmapped tgi driver flags, stored in TGI_HDR::VARS::FLAGS.
|
||||
; Beware: Some of the bits are tested using the BIT instruction, so do not
|
||||
; change the values without checking the code!
|
||||
|
||||
TGI_BM_FONT_FINESCALE = $80 ; Bitmap fonts are fine grained scalable
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; Text constants
|
||||
|
||||
TGI_FONT_BITMAP = 0
|
||||
TGI_FONT_VECTOR = 1
|
||||
|
||||
TGI_TEXT_HORIZONTAL = 0
|
||||
TGI_TEXT_VERTICAL = 1
|
||||
|
||||
;----------------------------------------------------------------------------
|
||||
; Results of tgi_outcode
|
||||
|
||||
TGI_CLIP_NONE = $00
|
||||
TGI_CLIP_LEFT = $01
|
||||
TGI_CLIP_RIGHT = $02
|
||||
TGI_CLIP_BOTTOM = $04
|
||||
TGI_CLIP_TOP = $08
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; ASM accessible color constants
|
||||
|
||||
.global tgi_color_black:zp ; Target-specific value for black
|
||||
.global tgi_color_white:zp ; Target-specific value for white
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; C accessible variables
|
||||
|
||||
.global _tgi_drv ; Pointer to driver
|
||||
.global _tgi_error ; Last error code
|
||||
.global _tgi_gmode ; Flag: graphics mode active
|
||||
.global _tgi_curx ; Current drawing cursor X
|
||||
.global _tgi_cury ; Current drawing cursor Y
|
||||
.global _tgi_color ; Current drawing color
|
||||
.global _tgi_font ; Which font to use
|
||||
.global _tgi_textdir ; Current text direction
|
||||
.global _tgi_vectorfont ; Pointer to vector font
|
||||
.global _tgi_textscalew ; Text magnification for the width
|
||||
.global _tgi_textscaleh ; Text magnification for the height
|
||||
.global _tgi_charwidth ; Width of scaled system font char
|
||||
.global _tgi_charheight ; Height of scaled system font char
|
||||
.global _tgi_xres ; X resolution of the current mode
|
||||
.global _tgi_yres ; Y resolution of the current mode
|
||||
.global _tgi_xmax ; Maximum X coordinate
|
||||
.global _tgi_ymax ; Maximum Y coordinate
|
||||
.global _tgi_colorcount ; Number of available colors
|
||||
.global _tgi_pagecount ; Number of available screen pages
|
||||
.global _tgi_fontwidth ; System font width
|
||||
.global _tgi_fontheight ; System font height
|
||||
.global _tgi_aspectratio ; Aspect ratio, fixed point 8.8
|
||||
.global _tgi_flags ; TGI driver flags
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; ASM accessible variables
|
||||
|
||||
.global tgi_clip_x1 ; Coordinate for line clipper
|
||||
.global tgi_clip_y1 ; Coordinate for line clipper
|
||||
.global tgi_clip_x2 ; Coordinate for line clipper
|
||||
.global tgi_clip_y2 ; Coordinate for line clipper
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; Driver entry points
|
||||
|
||||
.global tgi_install
|
||||
.global tgi_uninstall
|
||||
.global tgi_init
|
||||
.global tgi_done
|
||||
.global tgi_geterror
|
||||
.global tgi_control
|
||||
.global tgi_clear
|
||||
.global tgi_setviewpage
|
||||
.global tgi_setdrawpage
|
||||
.global tgi_setcolor
|
||||
.global tgi_setpalette
|
||||
.global tgi_getpalette
|
||||
.global tgi_getdefpalette
|
||||
.global tgi_setpixel
|
||||
.global tgi_getpixel
|
||||
.global tgi_line
|
||||
.global tgi_bar
|
||||
.global tgi_textstyle
|
||||
.global tgi_outtext
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; ASM functions
|
||||
|
||||
.global tgi_clear_ptr
|
||||
.global tgi_clippedline
|
||||
.global tgi_curtoxy
|
||||
.global tgi_getset
|
||||
.global tgi_imulround
|
||||
.global tgi_inv_arg
|
||||
.global tgi_inv_drv
|
||||
.global tgi_linepop
|
||||
.global tgi_outcode
|
||||
.global tgi_popxy
|
||||
.global tgi_popxy2
|
||||
.global tgi_set_ptr
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; C callable functions
|
||||
|
||||
.global _tgi_arc
|
||||
.global _tgi_bar
|
||||
.global _tgi_circle
|
||||
.global _tgi_clear
|
||||
.global _tgi_done
|
||||
.global _tgi_ellipse
|
||||
.global _tgi_getaspectratio
|
||||
.global _tgi_getcolor
|
||||
.global _tgi_getcolorcount
|
||||
.global _tgi_getdefpalette
|
||||
.global _tgi_geterror
|
||||
.global _tgi_geterrormsg
|
||||
.global _tgi_getmaxcolor
|
||||
.global _tgi_getmaxx
|
||||
.global _tgi_getmaxy
|
||||
.global _tgi_getpagecount
|
||||
.global _tgi_getpalette
|
||||
.global _tgi_getpixel
|
||||
.global _tgi_gettextheight
|
||||
.global _tgi_gettextwidth
|
||||
.global _tgi_getxres
|
||||
.global _tgi_getyres
|
||||
.global _tgi_gotoxy
|
||||
.global _tgi_imulround
|
||||
.global _tgi_init
|
||||
.global _tgi_install
|
||||
.global _tgi_install_vectorfont
|
||||
.global _tgi_ioctl
|
||||
.global _tgi_line
|
||||
.global _tgi_lineto
|
||||
.global _tgi_load_driver
|
||||
.global _tgi_outtext
|
||||
.global _tgi_outtextxy
|
||||
.global _tgi_pieslice
|
||||
.global _tgi_setaspectratio
|
||||
.global _tgi_setcolor
|
||||
.global _tgi_setdrawpage
|
||||
.global _tgi_setpalette
|
||||
.global _tgi_setpixel
|
||||
.global _tgi_settextdir
|
||||
.global _tgi_settextscale
|
||||
.global _tgi_settextstyle
|
||||
.global _tgi_setviewpage
|
||||
.global _tgi_uninstall
|
||||
.global _tgi_unload
|
|
@ -1,70 +0,0 @@
|
|||
;*****************************************************************************/
|
||||
;* */
|
||||
;* tgi-vectorfont.inc */
|
||||
;* */
|
||||
;* TGI vector font definitions */
|
||||
;* */
|
||||
;* */
|
||||
;* */
|
||||
;* (C) 2009, Ullrich von Bassewitz */
|
||||
;* Roemerstrasse 52 */
|
||||
;* D-70794 Filderstadt */
|
||||
;* EMail: uz@cc65.org */
|
||||
;* */
|
||||
;* */
|
||||
;* 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. */
|
||||
;* */
|
||||
;*****************************************************************************/
|
||||
|
||||
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; Vectorfont constants
|
||||
|
||||
TGI_VF_VERSION = $00 ; File version number
|
||||
TGI_VF_FIRSTCHAR = $20 ; First char in file
|
||||
TGI_VF_LASTCHAR = $7E ; Last char in file
|
||||
TGI_VF_CCOUNT = (TGI_VF_LASTCHAR - TGI_VF_FIRSTCHAR + 1)
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; TCH file header and font data structures
|
||||
|
||||
; TCH file header
|
||||
.struct TGI_VF_HDR
|
||||
MAGIC .byte 3 ; "TCH"
|
||||
VERSION .byte 1 ; Version number
|
||||
SIZE .word 1 ; Font data size
|
||||
.endstruct
|
||||
|
||||
; Font data loaded directly from file
|
||||
.struct TGI_VECTORFONT
|
||||
TOP .byte ; Height of char
|
||||
BOTTOM .byte ; Descender
|
||||
HEIGHT .byte ; Maximum char height
|
||||
WIDTHS .byte ::TGI_VF_CCOUNT ; Char widths
|
||||
CHARS .word ::TGI_VF_CCOUNT ; Pointer to character defs
|
||||
OPS .byte ; Actually dynamic
|
||||
.endstruct
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; C callable functions
|
||||
|
||||
.global _tgi_vectorchar
|
||||
|
||||
|
||||
|
|
@ -1,59 +0,0 @@
|
|||
;/*****************************************************************************/
|
||||
;/* */
|
||||
;/* time.inc */
|
||||
;/* */
|
||||
;/* Date and time */
|
||||
;/* */
|
||||
;/* */
|
||||
;/* */
|
||||
;/* (C) 2009 Ullrich von Bassewitz */
|
||||
;/* Roemerstrasse 52 */
|
||||
;/* D-70794 Filderstadt */
|
||||
;/* EMail: uz@cc65.org */
|
||||
;/* */
|
||||
;/* */
|
||||
;/* 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. */
|
||||
;/* */
|
||||
;/*****************************************************************************/
|
||||
|
||||
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; Struct tm - must match the struct defined in time.h
|
||||
|
||||
.struct tm
|
||||
tm_sec .word
|
||||
tm_min .word
|
||||
tm_hour .word
|
||||
tm_mday .word
|
||||
tm_mon .word
|
||||
tm_year .word
|
||||
tm_wday .word
|
||||
tm_yday .word
|
||||
tm_isdst .word
|
||||
.endstruct
|
||||
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; Exported functions
|
||||
|
||||
.global __systime
|
||||
.global _mktime
|
||||
|
||||
|
||||
|
|
@ -1,46 +0,0 @@
|
|||
;/*****************************************************************************/
|
||||
;/* */
|
||||
;/* utsname.inc */
|
||||
;/* */
|
||||
;/* Return system information */
|
||||
;/* */
|
||||
;/* */
|
||||
;/* */
|
||||
;/* (C) 2003 Ullrich von Bassewitz */
|
||||
;/* Römerstrasse 52 */
|
||||
;/* D-70794 Filderstadt */
|
||||
;/* EMail: uz@cc65.org */
|
||||
;/* */
|
||||
;/* */
|
||||
;/* 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. */
|
||||
;/* */
|
||||
;/*****************************************************************************/
|
||||
|
||||
|
||||
|
||||
; Struct utsname
|
||||
.struct utsname
|
||||
sysname .byte 17
|
||||
nodename .byte 9
|
||||
release .byte 9
|
||||
version .byte 9
|
||||
machine .byte 25
|
||||
.endstruct
|
||||
|
||||
|
||||
|
|
@ -1,76 +0,0 @@
|
|||
;
|
||||
; Vic20 generic definitions. Stolen mostly from c64.inc - Steve Schmidtke
|
||||
;
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; Zero page, Commodore stuff
|
||||
|
||||
TXTPTR := $7A ; Pointer into BASIC source code
|
||||
TIME := $A0 ; 60HZ clock
|
||||
FNAM_LEN := $B7 ; Length of filename
|
||||
SECADR := $B9 ; Secondary address
|
||||
DEVNUM := $BA ; Device number
|
||||
FNAM := $BB ; Pointer to filename
|
||||
KEY_COUNT := $C6 ; Number of keys in input buffer
|
||||
RVS := $C7 ; Reverse flag
|
||||
CURS_FLAG := $CC ; 1 = cursor off
|
||||
CURS_BLINK := $CD ; Blink counter
|
||||
CURS_CHAR := $CE ; Character under the cursor
|
||||
CURS_STATE := $CF ; Cursor blink state
|
||||
SCREEN_PTR := $D1 ; Pointer to current char in text screen
|
||||
CURS_X := $D3 ; Cursor column
|
||||
CURS_Y := $D6 ; Cursor row
|
||||
CRAM_PTR := $F3 ; Pointer to current char in color RAM
|
||||
|
||||
BASIC_BUF := $200 ; Location of command-line
|
||||
BASIC_BUF_LEN = 89 ; Maximum length of command-line
|
||||
|
||||
CHARCOLOR := $286
|
||||
CURS_COLOR := $287 ; Color under the cursor
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; Screen size
|
||||
|
||||
XSIZE = 22
|
||||
YSIZE = 23
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; Kernal routines
|
||||
|
||||
; Direct entries
|
||||
CLRSCR := $E55F
|
||||
KBDREAD := $E5CF
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; Vector and other locations
|
||||
|
||||
IRQVec := $0314
|
||||
BRKVec := $0316
|
||||
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
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; I/O: 6522 VIA1
|
||||
|
||||
VIA1 := $9110
|
||||
VIA1_JOY := $9111
|
||||
VIA1_DDRB := $9112
|
||||
VIA1_DDRA := $9113
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; I/O: 6522 VIA2
|
||||
|
||||
VIA2 := $9120
|
||||
VIA2_JOY := $9120
|
||||
VIA2_DDRB := $9122
|
||||
VIA2_DDRA := $9123
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
;
|
||||
; zeropage.inc
|
||||
;
|
||||
; (C) Copyright 2002-2012, Ullrich von Bassewitz (uz@cc65.org)
|
||||
;
|
||||
|
||||
; Assembler include file that imports the runtime zero page locations used
|
||||
; by the compiler, ready for usage in asm code.
|
||||
|
||||
|
||||
.globalzp sp, sreg, regsave
|
||||
.globalzp ptr1, ptr2, ptr3, ptr4
|
||||
.globalzp tmp1, tmp2, tmp3, tmp4
|
||||
.globalzp regbank
|
||||
|
||||
; The size of the register bank
|
||||
regbanksize = 6
|
||||
|
||||
; The total amount of zero page space used
|
||||
zpspace = 26
|
||||
|
||||
; The amount of space that needs to be saved by an interrupt handler that
|
||||
; calls C code (does not include the register bank, which is saved by the
|
||||
; generated C code if required).
|
||||
zpsavespace = zpspace - regbanksize
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
# Configuration for assembler programs which don't need a special setup
|
||||
|
||||
FEATURES {
|
||||
STARTADDRESS: default = $0803;
|
||||
}
|
||||
SYMBOLS {
|
||||
__LOADADDR__: type = weak, value = __CODE_RUN__;
|
||||
__LOADSIZE__: type = weak, value = __BSS_RUN__ - __CODE_RUN__;
|
||||
}
|
||||
MEMORY {
|
||||
ZP: start = $0080, size = $001A, define = yes;
|
||||
HEADER: file = %O, start = $0000, size = $0004;
|
||||
RAM: file = %O, start = %S, size = $C000 - %S;
|
||||
}
|
||||
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;
|
||||
}
|
|
@ -1,76 +0,0 @@
|
|||
# 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
|
||||
# ...
|
||||
|
||||
FEATURES {
|
||||
STARTADDRESS: default = $0803;
|
||||
}
|
||||
SYMBOLS {
|
||||
__EXEHDR__: type = import;
|
||||
__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 = __ZPSAVE_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__;
|
||||
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;
|
||||
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;
|
||||
ZPSAVE: 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;
|
||||
}
|
||||
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__;
|
||||
}
|
|
@ -1,43 +0,0 @@
|
|||
# Configuration for ProDOS 8 system programs (without the header)
|
||||
|
||||
SYMBOLS {
|
||||
__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 = __ZPSAVE_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__;
|
||||
}
|
||||
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;
|
||||
ZPSAVE: 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;
|
||||
}
|
||||
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__;
|
||||
}
|
|
@ -1,50 +0,0 @@
|
|||
# Default configuration (allowing for 3KB in LC)
|
||||
|
||||
FEATURES {
|
||||
STARTADDRESS: default = $0803;
|
||||
}
|
||||
SYMBOLS {
|
||||
__EXEHDR__: type = import;
|
||||
__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 = __ZPSAVE_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__;
|
||||
}
|
||||
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;
|
||||
ZPSAVE: 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;
|
||||
}
|
||||
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__;
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
# Configuration for assembler programs which don't need a special setup
|
||||
|
||||
FEATURES {
|
||||
STARTADDRESS: default = $0803;
|
||||
}
|
||||
SYMBOLS {
|
||||
__LOADADDR__: type = weak, value = __CODE_RUN__;
|
||||
__LOADSIZE__: type = weak, value = __BSS_RUN__ - __CODE_RUN__;
|
||||
}
|
||||
MEMORY {
|
||||
HEADER: file = %O, start = $0000, size = $0004;
|
||||
RAM: file = %O, start = %S, size = $C000 - %S;
|
||||
}
|
||||
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;
|
||||
}
|
|
@ -1,76 +0,0 @@
|
|||
# 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
|
||||
# ...
|
||||
|
||||
FEATURES {
|
||||
STARTADDRESS: default = $0803;
|
||||
}
|
||||
SYMBOLS {
|
||||
__EXEHDR__: type = import;
|
||||
__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 = __ZPSAVE_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__;
|
||||
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;
|
||||
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;
|
||||
ZPSAVE: 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;
|
||||
}
|
||||
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__;
|
||||
}
|
|
@ -1,43 +0,0 @@
|
|||
# Configuration for ProDOS 8 system programs (without the header)
|
||||
|
||||
SYMBOLS {
|
||||
__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 = __ZPSAVE_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__;
|
||||
}
|
||||
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;
|
||||
ZPSAVE: 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;
|
||||
}
|
||||
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__;
|
||||
}
|
|
@ -1,50 +0,0 @@
|
|||
# Default configuration (allowing for 3KB in LC)
|
||||
|
||||
FEATURES {
|
||||
STARTADDRESS: default = $0803;
|
||||
}
|
||||
SYMBOLS {
|
||||
__EXEHDR__: type = import;
|
||||
__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 = __ZPSAVE_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__;
|
||||
}
|
||||
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;
|
||||
ZPSAVE: 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;
|
||||
}
|
||||
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__;
|
||||
}
|
|
@ -1,30 +0,0 @@
|
|||
FEATURES {
|
||||
STARTADDRESS: default = $2E00;
|
||||
}
|
||||
SYMBOLS {
|
||||
__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;
|
||||
|
||||
# file header, just $FFFF
|
||||
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;
|
||||
}
|
||||
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;
|
||||
}
|
|
@ -1,44 +0,0 @@
|
|||
FEATURES {
|
||||
STARTADDRESS: default = $2000;
|
||||
}
|
||||
SYMBOLS {
|
||||
__CARTSIZE__: type = weak, value = $2000; # possible values: $2000 and $4000
|
||||
__CART_HEADER__: type = import;
|
||||
__STACKSIZE__: type = weak, value = $0800; # 2k stack
|
||||
__STARTADDRESS__: type = export, value = %S;
|
||||
__RESERVED_MEMORY__: type = export, value = $0000;
|
||||
__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;
|
||||
}
|
||||
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;
|
||||
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;
|
||||
}
|
||||
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__;
|
||||
}
|
|
@ -1,40 +0,0 @@
|
|||
FEATURES {
|
||||
STARTADDRESS: default = $0900;
|
||||
}
|
||||
SYMBOLS {
|
||||
__STACKSIZE__: type = weak, value = $0800; # 2k stack
|
||||
__RESERVED_MEMORY__: type = weak, value = $0000;
|
||||
__STARTADDRESS__: type = export, value = %S;
|
||||
_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;
|
||||
}
|
||||
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;
|
||||
BSS: load = RAM, type = bss, define = yes, optional = yes;
|
||||
ZEROPAGE: load = ZP, type = zp, optional = yes;
|
||||
EXTZP: load = ZP, type = zp, optional = yes;
|
||||
}
|
||||
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__;
|
||||
}
|
|
@ -1,80 +0,0 @@
|
|||
FEATURES {
|
||||
STARTADDRESS: default = $2000;
|
||||
}
|
||||
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;
|
||||
__RESERVED_MEMORY__: type = weak, value = $0000;
|
||||
}
|
||||
MEMORY {
|
||||
ZP: file = "", define = yes, start = $0082, size = $007E;
|
||||
|
||||
# file header, just $FFFF
|
||||
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;
|
||||
|
||||
# "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;
|
||||
|
||||
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 {
|
||||
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;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
EXTZP: load = ZP, type = zp, optional = yes;
|
||||
AUTOSTRT: load = TRAILER, type = ro;
|
||||
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;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
segment = RODATA;
|
||||
CONDES: type = interruptor,
|
||||
label = __INTERRUPTOR_TABLE__,
|
||||
count = __INTERRUPTOR_COUNT__,
|
||||
segment = RODATA,
|
||||
import = __CALLIRQ__;
|
||||
}
|
|
@ -1,59 +0,0 @@
|
|||
FEATURES {
|
||||
STARTADDRESS: default = $2000;
|
||||
}
|
||||
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;
|
||||
__RESERVED_MEMORY__: type = weak, value = $0000;
|
||||
}
|
||||
MEMORY {
|
||||
ZP: file = "", define = yes, start = $0082, size = $007E;
|
||||
|
||||
# file header, just $FFFF
|
||||
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;
|
||||
|
||||
# "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;
|
||||
}
|
||||
SEGMENTS {
|
||||
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;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
EXTZP: load = ZP, type = zp, optional = yes;
|
||||
AUTOSTRT: load = TRAILER, type = ro;
|
||||
}
|
||||
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__;
|
||||
}
|
|
@ -1,43 +0,0 @@
|
|||
SYMBOLS {
|
||||
__CARTSIZE__: type = weak, value = $4000; # possible values: $4000 and $8000
|
||||
__CART_ENTRY__: type = import;
|
||||
__STACKSIZE__: type = weak, value = $0400; # 4 pages stack
|
||||
__RESERVED_MEMORY__: type = export, value = $01E0; # space for 20x24 screen buffer (default display list is in ROM)
|
||||
}
|
||||
MEMORY {
|
||||
ZP: file = "", start = $001D, size = $00E3, define = yes;
|
||||
RAM: file = "", start = $021C, size = $4000 - __STACKSIZE__ - __RESERVED_MEMORY__ - $021C, define = yes;
|
||||
ROM: file = %O, start = $C000 - __CARTSIZE__, size = __CARTSIZE__ - $18, define = yes, fill = yes, fillval = $FF;
|
||||
CARTNAME: file = %O, start = $BFE8, size = $0014 fill = yes, fillval = $40;
|
||||
CARTYEAR: file = %O, start = $BFFC, size = $0002 fill = yes, fillval = $59;
|
||||
CARTENTRY: file = %O, start = $BFFE, size = $0002;
|
||||
}
|
||||
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;
|
||||
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;
|
||||
}
|
||||
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__;
|
||||
}
|
|
@ -1,92 +0,0 @@
|
|||
# This config file provides a single big upper memory block (HIDDEN_RAM).
|
||||
# To achieve this, it relocates the character generator from $E000 to CHARGEN.
|
||||
# The runtime library must be compiled with CHARGEN_RELOC for this config
|
||||
# file to work. See libsrc/atari/Makefile.inc.
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
MEMORY {
|
||||
ZP: file = "", define = yes, start = $0082, size = $007E;
|
||||
|
||||
# just $FFFF
|
||||
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;
|
||||
|
||||
# "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;
|
||||
|
||||
# "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__;
|
||||
|
||||
# defines entry point into program
|
||||
TRAILER: file = %O, start = $0000, size = $0006;
|
||||
|
||||
# address of relocated character generator
|
||||
CHARGEN: file = "", define = yes, start = $D800, size = $0400;
|
||||
|
||||
# memory beneath the ROM
|
||||
HIDDEN_RAM: file = "", define = yes, start = $DC00, size = $FFFA - $DC00;
|
||||
}
|
||||
|
||||
SEGMENTS {
|
||||
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;
|
||||
|
||||
SRPREPHDR: load = SRPREPHDR, type = ro;
|
||||
LOWBSS: load = SRPREPCHNK, type = bss, define = yes; # shared btw. SRPREPCHNK and RAM, 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;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
EXTZP: load = ZP, type = zp, optional = yes;
|
||||
AUTOSTRT: load = TRAILER, type = ro;
|
||||
}
|
||||
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__;
|
||||
}
|
|
@ -1,114 +0,0 @@
|
|||
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;
|
||||
}
|
||||
|
||||
MEMORY {
|
||||
ZP: file = "", define = yes, start = $0082, size = $007E;
|
||||
|
||||
# just $FFFF
|
||||
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;
|
||||
|
||||
# "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;
|
||||
|
||||
# "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__;
|
||||
|
||||
# defines entry point into program
|
||||
TRAILER: file = %O, start = $0000, size = $0006;
|
||||
|
||||
# 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 = $0400;
|
||||
|
||||
# memory beneath the ROM
|
||||
HIDDEN_RAM: file = "", define = yes, start = $E400, size = $FFFA - $E400;
|
||||
|
||||
# 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 {
|
||||
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;
|
||||
|
||||
SRPREPHDR: load = SRPREPHDR, type = ro;
|
||||
LOWBSS: load = SRPREPCHNK, type = bss, define = yes; # shared btw. SRPREPCHNK and RAM, 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;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
EXTZP: load = ZP, type = zp, optional = yes;
|
||||
AUTOSTRT: load = TRAILER, type = ro;
|
||||
|
||||
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;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
segment = RODATA;
|
||||
CONDES: type = interruptor,
|
||||
label = __INTERRUPTOR_TABLE__,
|
||||
count = __INTERRUPTOR_COUNT__,
|
||||
segment = RODATA,
|
||||
import = __CALLIRQ__;
|
||||
}
|
|
@ -1,90 +0,0 @@
|
|||
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;
|
||||
}
|
||||
|
||||
MEMORY {
|
||||
ZP: file = "", define = yes, start = $0082, size = $007E;
|
||||
|
||||
# just $FFFF
|
||||
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;
|
||||
|
||||
# "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;
|
||||
|
||||
# "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__;
|
||||
|
||||
# defines entry point into program
|
||||
TRAILER: file = %O, start = $0000, size = $0006;
|
||||
|
||||
# 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 = $0400;
|
||||
|
||||
# memory beneath the ROM
|
||||
HIDDEN_RAM: file = "", define = yes, start = $E400, size = $FFFA - $E400;
|
||||
}
|
||||
|
||||
SEGMENTS {
|
||||
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;
|
||||
|
||||
SRPREPHDR: load = SRPREPHDR, type = ro;
|
||||
LOWBSS: load = SRPREPCHNK, type = bss, define = yes; # shared btw. SRPREPCHNK and RAM, 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;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
EXTZP: load = ZP, type = zp, optional = yes;
|
||||
AUTOSTRT: load = TRAILER, type = ro;
|
||||
}
|
||||
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__;
|
||||
}
|
|
@ -1,44 +0,0 @@
|
|||
SYMBOLS {
|
||||
__TAPEHDR__: type = import;
|
||||
__BASHDR__: type = import;
|
||||
__PROGFLAG__: type = weak, value = $00; # $00=BASIC, $80=machine code
|
||||
__AUTORUN__: type = weak, value = $00; # $00=only load, $C7=run
|
||||
__STACKSIZE__: type = weak, value = $0800; # 2K stack
|
||||
__GRAB__: type = weak, value = 0; # 0=don't grab graphics RAM, 1=grab graphics RAM
|
||||
__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__;
|
||||
}
|
||||
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;
|
||||
}
|
||||
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__;
|
||||
}
|
32
cfg/bbc.cfg
32
cfg/bbc.cfg
|
@ -1,32 +0,0 @@
|
|||
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__;
|
||||
}
|
||||
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;
|
||||
}
|
||||
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__;
|
||||
}
|
|
@ -1,77 +0,0 @@
|
|||
SYMBOLS {
|
||||
__LOADADDR__: type = import;
|
||||
__EXEHDR__: type = import;
|
||||
__OVERLAYADDR__: type = import;
|
||||
__STACKSIZE__: type = weak, value = $0800; # 2k stack
|
||||
__OVERLAYSIZE__: type = weak, value = $1000; # 4k overlay
|
||||
}
|
||||
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__;
|
||||
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;
|
||||
OVL2: file = "%O.2", start = $C000 - __OVERLAYSIZE__, size = __OVERLAYSIZE__;
|
||||
OVL3ADDR: file = "%O.3", start = $BFFE - __OVERLAYSIZE__, size = $0002;
|
||||
OVL3: file = "%O.3", start = $C000 - __OVERLAYSIZE__, size = __OVERLAYSIZE__;
|
||||
OVL4ADDR: file = "%O.4", start = $BFFE - __OVERLAYSIZE__, size = $0002;
|
||||
OVL4: file = "%O.4", start = $C000 - __OVERLAYSIZE__, size = __OVERLAYSIZE__;
|
||||
OVL5ADDR: file = "%O.5", start = $BFFE - __OVERLAYSIZE__, size = $0002;
|
||||
OVL5: file = "%O.5", start = $C000 - __OVERLAYSIZE__, size = __OVERLAYSIZE__;
|
||||
OVL6ADDR: file = "%O.6", start = $BFFE - __OVERLAYSIZE__, size = $0002;
|
||||
OVL6: file = "%O.6", start = $C000 - __OVERLAYSIZE__, size = __OVERLAYSIZE__;
|
||||
OVL7ADDR: file = "%O.7", start = $BFFE - __OVERLAYSIZE__, size = $0002;
|
||||
OVL7: file = "%O.7", start = $C000 - __OVERLAYSIZE__, size = __OVERLAYSIZE__;
|
||||
OVL8ADDR: file = "%O.8", start = $BFFE - __OVERLAYSIZE__, size = $0002;
|
||||
OVL8: file = "%O.8", start = $C000 - __OVERLAYSIZE__, size = __OVERLAYSIZE__;
|
||||
OVL9ADDR: file = "%O.9", start = $BFFE - __OVERLAYSIZE__, size = $0002;
|
||||
OVL9: file = "%O.9", start = $C000 - __OVERLAYSIZE__, size = __OVERLAYSIZE__;
|
||||
}
|
||||
SEGMENTS {
|
||||
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;
|
||||
ZPSAVE: load = RAM, type = bss;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
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;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
segment = RODATA;
|
||||
CONDES: type = interruptor,
|
||||
label = __INTERRUPTOR_TABLE__,
|
||||
count = __INTERRUPTOR_COUNT__,
|
||||
segment = RODATA,
|
||||
import = __CALLIRQ__;
|
||||
}
|
39
cfg/c128.cfg
39
cfg/c128.cfg
|
@ -1,39 +0,0 @@
|
|||
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 = $1BFF, size = $0002;
|
||||
HEADER: file = %O, start = $1C01, size = $000C;
|
||||
RAM: file = %O, define = yes, start = $1C0D, size = $A3F3 - __STACKSIZE__;
|
||||
}
|
||||
SEGMENTS {
|
||||
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;
|
||||
ZPSAVE: load = RAM, type = bss;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
}
|
||||
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__;
|
||||
}
|
39
cfg/c16.cfg
39
cfg/c16.cfg
|
@ -1,39 +0,0 @@
|
|||
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;
|
||||
RAM: file = %O, start = $100D, size = $6FF3 - __STACKSIZE__;
|
||||
}
|
||||
SEGMENTS {
|
||||
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;
|
||||
ZPSAVE: load = RAM, type = bss;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
}
|
||||
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__;
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
FEATURES {
|
||||
STARTADDRESS: default = $0801;
|
||||
}
|
||||
SYMBOLS {
|
||||
__LOADADDR__: type = import;
|
||||
}
|
||||
MEMORY {
|
||||
ZP: file = "", start = $0002, size = $001A, define = yes;
|
||||
LOADADDR: file = %O, start = %S - 2, size = $0002;
|
||||
RAM: 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;
|
||||
}
|
|
@ -1,77 +0,0 @@
|
|||
SYMBOLS {
|
||||
__LOADADDR__: type = import;
|
||||
__EXEHDR__: type = import;
|
||||
__OVERLAYADDR__: type = import;
|
||||
__STACKSIZE__: type = weak, value = $0800; # 2k stack
|
||||
__OVERLAYSIZE__: type = weak, value = $1000; # 4k overlay
|
||||
}
|
||||
MEMORY {
|
||||
ZP: file = "", define = yes, start = $0002, size = $001A;
|
||||
LOADADDR: file = %O, start = $07FF, size = $0002;
|
||||
HEADER: file = %O, start = $0801, size = $000C;
|
||||
RAM: file = %O, define = yes, start = $080D, size = $C7F3 - __OVERLAYSIZE__ - __STACKSIZE__;
|
||||
OVL1ADDR: file = "%O.1", start = $CFFE - __OVERLAYSIZE__, size = $0002;
|
||||
OVL1: file = "%O.1", start = $D000 - __OVERLAYSIZE__, size = __OVERLAYSIZE__;
|
||||
OVL2ADDR: file = "%O.2", start = $CFFE - __OVERLAYSIZE__, size = $0002;
|
||||
OVL2: file = "%O.2", start = $D000 - __OVERLAYSIZE__, size = __OVERLAYSIZE__;
|
||||
OVL3ADDR: file = "%O.3", start = $CFFE - __OVERLAYSIZE__, size = $0002;
|
||||
OVL3: file = "%O.3", start = $D000 - __OVERLAYSIZE__, size = __OVERLAYSIZE__;
|
||||
OVL4ADDR: file = "%O.4", start = $CFFE - __OVERLAYSIZE__, size = $0002;
|
||||
OVL4: file = "%O.4", start = $D000 - __OVERLAYSIZE__, size = __OVERLAYSIZE__;
|
||||
OVL5ADDR: file = "%O.5", start = $CFFE - __OVERLAYSIZE__, size = $0002;
|
||||
OVL5: file = "%O.5", start = $D000 - __OVERLAYSIZE__, size = __OVERLAYSIZE__;
|
||||
OVL6ADDR: file = "%O.6", start = $CFFE - __OVERLAYSIZE__, size = $0002;
|
||||
OVL6: file = "%O.6", start = $D000 - __OVERLAYSIZE__, size = __OVERLAYSIZE__;
|
||||
OVL7ADDR: file = "%O.7", start = $CFFE - __OVERLAYSIZE__, size = $0002;
|
||||
OVL7: file = "%O.7", start = $D000 - __OVERLAYSIZE__, size = __OVERLAYSIZE__;
|
||||
OVL8ADDR: file = "%O.8", start = $CFFE - __OVERLAYSIZE__, size = $0002;
|
||||
OVL8: file = "%O.8", start = $D000 - __OVERLAYSIZE__, size = __OVERLAYSIZE__;
|
||||
OVL9ADDR: file = "%O.9", start = $CFFE - __OVERLAYSIZE__, size = $0002;
|
||||
OVL9: file = "%O.9", start = $D000 - __OVERLAYSIZE__, size = __OVERLAYSIZE__;
|
||||
}
|
||||
SEGMENTS {
|
||||
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;
|
||||
ZPSAVE: load = RAM, type = bss;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
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;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
segment = RODATA;
|
||||
CONDES: type = interruptor,
|
||||
label = __INTERRUPTOR_TABLE__,
|
||||
count = __INTERRUPTOR_COUNT__,
|
||||
segment = RODATA,
|
||||
import = __CALLIRQ__;
|
||||
}
|
39
cfg/c64.cfg
39
cfg/c64.cfg
|
@ -1,39 +0,0 @@
|
|||
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 = $07FF, size = $0002;
|
||||
HEADER: file = %O, start = $0801, size = $000C;
|
||||
RAM: file = %O, define = yes, start = $080D, size = $C7F3 - __STACKSIZE__;
|
||||
}
|
||||
SEGMENTS {
|
||||
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;
|
||||
ZPSAVE: load = RAM, type = bss;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
}
|
||||
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__;
|
||||
}
|
|
@ -1,43 +0,0 @@
|
|||
SYMBOLS {
|
||||
# The stack starts from $FEC3 and grows towards the video ram
|
||||
__STACKSIZE__: type = weak, value = $06C3; # ~1.5k stack
|
||||
}
|
||||
MEMORY {
|
||||
HEADER: file = %O, start = $0001, size = $0050, fill = yes;
|
||||
ZP: file = %O, define = yes, start = $0051, size = $00AD, fill = yes;
|
||||
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;
|
||||
CHARRAM: file = "", define = yes, start = $E000, size = $1000;
|
||||
VIDRAM: file = "", define = yes, start = $F000, size = $0400;
|
||||
}
|
||||
SEGMENTS {
|
||||
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;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
EXTZP: load = ZP, type = rw, define = yes;
|
||||
}
|
||||
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__;
|
||||
}
|
|
@ -1,40 +0,0 @@
|
|||
SYMBOLS {
|
||||
__STACKSIZE__: type = weak, value = $0800; # 2k stack
|
||||
}
|
||||
MEMORY {
|
||||
HEADER: file = %O, start = $0001, size = $0050, fill = yes;
|
||||
ZP: file = %O, define = yes, start = $0051, size = $00AD, fill = yes;
|
||||
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__;
|
||||
}
|
||||
SEGMENTS {
|
||||
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;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
EXTZP: load = ZP, type = rw, define = yes;
|
||||
}
|
||||
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__;
|
||||
}
|
|
@ -1,101 +0,0 @@
|
|||
SYMBOLS {
|
||||
__BACKBUFSIZE__: type = weak, value = $2000;
|
||||
__OVERLAYSIZE__: type = weak, value = $0000;
|
||||
__OVERLAYADDR__: type = weak, value = $C000 - __BACKBUFSIZE__ - __OVERLAYSIZE__;
|
||||
__STACKSIZE__: type = weak, value = $0400;
|
||||
__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;
|
||||
VLIR1: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__;
|
||||
VLIR2: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__;
|
||||
VLIR3: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__;
|
||||
VLIR4: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__;
|
||||
VLIR5: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__;
|
||||
VLIR6: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__;
|
||||
VLIR7: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__;
|
||||
VLIR8: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__;
|
||||
VLIR9: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__;
|
||||
VLIR10: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__;
|
||||
VLIR11: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__;
|
||||
VLIR12: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__;
|
||||
VLIR13: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__;
|
||||
VLIR14: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__;
|
||||
VLIR15: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__;
|
||||
VLIR16: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__;
|
||||
VLIR17: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__;
|
||||
VLIR18: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__;
|
||||
VLIR19: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__;
|
||||
}
|
||||
SEGMENTS {
|
||||
ZEROPAGE: type = zp, load = ZP;
|
||||
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;
|
||||
DIRENTRY: type = ro, load = CVT, offset = $180;
|
||||
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;
|
||||
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;
|
||||
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;
|
||||
OVERLAY2: type = ro, run = VLIR2, load = CVT, align_load = $200, optional = yes;
|
||||
VLIRIDX3: type = ro, load = CVT, align = $200, optional = yes;
|
||||
OVERLAY3: type = ro, run = VLIR3, load = CVT, align_load = $200, optional = yes;
|
||||
VLIRIDX4: type = ro, load = CVT, align = $200, optional = yes;
|
||||
OVERLAY4: type = ro, run = VLIR4, load = CVT, align_load = $200, optional = yes;
|
||||
VLIRIDX5: type = ro, load = CVT, align = $200, optional = yes;
|
||||
OVERLAY5: type = ro, run = VLIR5, load = CVT, align_load = $200, optional = yes;
|
||||
VLIRIDX6: type = ro, load = CVT, align = $200, optional = yes;
|
||||
OVERLAY6: type = ro, run = VLIR6, load = CVT, align_load = $200, optional = yes;
|
||||
VLIRIDX7: type = ro, load = CVT, align = $200, optional = yes;
|
||||
OVERLAY7: type = ro, run = VLIR7, load = CVT, align_load = $200, optional = yes;
|
||||
VLIRIDX8: type = ro, load = CVT, align = $200, optional = yes;
|
||||
OVERLAY8: type = ro, run = VLIR8, load = CVT, align_load = $200, optional = yes;
|
||||
VLIRIDX9: type = ro, load = CVT, align = $200, optional = yes;
|
||||
OVERLAY9: type = ro, run = VLIR9, load = CVT, align_load = $200, optional = yes;
|
||||
VLIRIDX10: type = ro, load = CVT, align = $200, optional = yes;
|
||||
OVERLAY10: type = ro, run = VLIR10, load = CVT, align_load = $200, optional = yes;
|
||||
VLIRIDX11: type = ro, load = CVT, align = $200, optional = yes;
|
||||
OVERLAY11: type = ro, run = VLIR11, load = CVT, align_load = $200, optional = yes;
|
||||
VLIRIDX12: type = ro, load = CVT, align = $200, optional = yes;
|
||||
OVERLAY12: type = ro, run = VLIR12, load = CVT, align_load = $200, optional = yes;
|
||||
VLIRIDX13: type = ro, load = CVT, align = $200, optional = yes;
|
||||
OVERLAY13: type = ro, run = VLIR13, load = CVT, align_load = $200, optional = yes;
|
||||
VLIRIDX14: type = ro, load = CVT, align = $200, optional = yes;
|
||||
OVERLAY14: type = ro, run = VLIR14, load = CVT, align_load = $200, optional = yes;
|
||||
VLIRIDX15: type = ro, load = CVT, align = $200, optional = yes;
|
||||
OVERLAY15: type = ro, run = VLIR15, load = CVT, align_load = $200, optional = yes;
|
||||
VLIRIDX16: type = ro, load = CVT, align = $200, optional = yes;
|
||||
OVERLAY16: type = ro, run = VLIR16, load = CVT, align_load = $200, optional = yes;
|
||||
VLIRIDX17: type = ro, load = CVT, align = $200, optional = yes;
|
||||
OVERLAY17: type = ro, run = VLIR17, load = CVT, align_load = $200, optional = yes;
|
||||
VLIRIDX18: type = ro, load = CVT, align = $200, optional = yes;
|
||||
OVERLAY18: type = ro, run = VLIR18, load = CVT, align_load = $200, optional = yes;
|
||||
VLIRIDX19: type = ro, load = CVT, align = $200, optional = yes;
|
||||
OVERLAY19: type = ro, run = VLIR19, load = CVT, align_load = $200, optional = yes;
|
||||
}
|
||||
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__;
|
||||
}
|
|
@ -1,79 +0,0 @@
|
|||
SYMBOLS {
|
||||
__BACKBUFSIZE__: type = weak, value = $2000;
|
||||
__OVERLAYSIZE__: type = weak, value = $0000;
|
||||
__OVERLAYADDR__: type = weak, value = $8000 - __BACKBUFSIZE__ - __OVERLAYSIZE__;
|
||||
__STACKSIZE__: type = weak, value = $0400;
|
||||
__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;
|
||||
VLIR1: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__;
|
||||
VLIR2: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__;
|
||||
VLIR3: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__;
|
||||
VLIR4: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__;
|
||||
VLIR5: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__;
|
||||
VLIR6: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__;
|
||||
VLIR7: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__;
|
||||
VLIR8: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__;
|
||||
VLIR9: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__;
|
||||
VLIR10: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__;
|
||||
VLIR11: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__;
|
||||
VLIR12: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__;
|
||||
VLIR13: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__;
|
||||
VLIR14: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__;
|
||||
VLIR15: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__;
|
||||
VLIR16: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__;
|
||||
VLIR17: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__;
|
||||
VLIR18: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__;
|
||||
VLIR19: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__;
|
||||
}
|
||||
SEGMENTS {
|
||||
ZEROPAGE: type = zp, load = ZP;
|
||||
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;
|
||||
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;
|
||||
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;
|
||||
OVERLAY4: type = ro, run = VLIR4, load = CVT, align_load = $FE, optional = yes;
|
||||
OVERLAY5: type = ro, run = VLIR5, load = CVT, align_load = $FE, optional = yes;
|
||||
OVERLAY6: type = ro, run = VLIR6, load = CVT, align_load = $FE, optional = yes;
|
||||
OVERLAY7: type = ro, run = VLIR7, load = CVT, align_load = $FE, optional = yes;
|
||||
OVERLAY8: type = ro, run = VLIR8, load = CVT, align_load = $FE, optional = yes;
|
||||
OVERLAY9: type = ro, run = VLIR9, load = CVT, align_load = $FE, optional = yes;
|
||||
OVERLAY10: type = ro, run = VLIR10, load = CVT, align_load = $FE, optional = yes;
|
||||
OVERLAY11: type = ro, run = VLIR11, load = CVT, align_load = $FE, optional = yes;
|
||||
OVERLAY12: type = ro, run = VLIR12, load = CVT, align_load = $FE, optional = yes;
|
||||
OVERLAY13: type = ro, run = VLIR13, load = CVT, align_load = $FE, optional = yes;
|
||||
OVERLAY14: type = ro, run = VLIR14, load = CVT, align_load = $FE, optional = yes;
|
||||
OVERLAY15: type = ro, run = VLIR15, load = CVT, align_load = $FE, optional = yes;
|
||||
OVERLAY16: type = ro, run = VLIR16, load = CVT, align_load = $FE, optional = yes;
|
||||
OVERLAY17: type = ro, run = VLIR17, load = CVT, align_load = $FE, optional = yes;
|
||||
OVERLAY18: type = ro, run = VLIR18, load = CVT, align_load = $FE, optional = yes;
|
||||
OVERLAY19: type = ro, run = VLIR19, load = CVT, align_load = $FE, optional = yes;
|
||||
}
|
||||
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__;
|
||||
}
|
|
@ -1,44 +0,0 @@
|
|||
# ld65 Linker-configuration for LUnix, Next Generation.
|
||||
|
||||
SYMBOLS {
|
||||
__HEAPSIZE__: type = weak, value = $2000; # 8k heap [temporary, until LUnix malloc() exists]
|
||||
__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__;
|
||||
}
|
||||
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
|
||||
}
|
||||
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__;
|
||||
}
|
||||
FILES {
|
||||
%O: format = o65;
|
||||
}
|
||||
FORMATS {
|
||||
o65: os = lunix,
|
||||
type = small,
|
||||
export = main, # Program entry-point
|
||||
import = LUNIXKERNEL; # Kernel entry-points
|
||||
}
|
|
@ -1,39 +0,0 @@
|
|||
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
|
||||
__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__;
|
||||
}
|
||||
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;
|
||||
}
|
||||
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__;
|
||||
}
|
|
@ -1,45 +0,0 @@
|
|||
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
|
||||
__EXEHDR__: type = import;
|
||||
__BOOTLDR__: type = import;
|
||||
__DEFDIR__: type = import;
|
||||
}
|
||||
MEMORY {
|
||||
ZP: file = "", define = yes, start = $0000, size = $0100;
|
||||
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__;
|
||||
}
|
||||
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;
|
||||
}
|
||||
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__;
|
||||
}
|
|
@ -1,49 +0,0 @@
|
|||
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
|
||||
__EXEHDR__: type = import;
|
||||
__BOOTLDR__: type = import;
|
||||
__DEFDIR__: type = import;
|
||||
__UPLOADER__: type = import;
|
||||
}
|
||||
MEMORY {
|
||||
ZP: file = "", define = yes, start = $0000, size = $0100;
|
||||
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__;
|
||||
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;
|
||||
}
|
||||
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/lynx.cfg
45
cfg/lynx.cfg
|
@ -1,45 +0,0 @@
|
|||
SYMBOLS {
|
||||
__STACKSIZE__: type = weak, value = $0800; # 2k stack
|
||||
__STARTOFDIRECTORY__: type = weak, value = $00CB; # start just after loader
|
||||
__BLOCKSIZE__: type = weak, value = 1024; # cart block size
|
||||
__EXEHDR__: type = import;
|
||||
__BOOTLDR__: type = import;
|
||||
__DEFDIR__: type = import;
|
||||
}
|
||||
MEMORY {
|
||||
ZP: file = "", define = yes, start = $0000, size = $0100;
|
||||
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 = $BE38 - __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;
|
||||
}
|
||||
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__;
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
MEMORY {
|
||||
ZP: start = $0000, size = $0100;
|
||||
COMBINED: file = %O, start = $0000, size = $FFFF;
|
||||
}
|
||||
SEGMENTS {
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
EXTZP: load = ZP, type = zp, optional = yes;
|
||||
HEADER: load = COMBINED, type = ro;
|
||||
INIT: load = COMBINED, type = ro, optional = yes;
|
||||
CODE: load = COMBINED, type = ro;
|
||||
RODATA: load = COMBINED, type = ro;
|
||||
DATA: load = COMBINED, type = rw;
|
||||
BSS: load = COMBINED, type = bss;
|
||||
}
|
||||
FILES {
|
||||
%O: format = o65;
|
||||
}
|
||||
FORMATS {
|
||||
o65: os = cc65,
|
||||
type = small;
|
||||
}
|
62
cfg/nes.cfg
62
cfg/nes.cfg
|
@ -1,62 +0,0 @@
|
|||
SYMBOLS {
|
||||
__STACKSIZE__: type = weak, value = $0300; # 3 pages stack
|
||||
}
|
||||
MEMORY {
|
||||
ZP: file = "", start = $0002, size = $001A, type = rw, define = yes;
|
||||
|
||||
# INES Cartridge Header
|
||||
HEADER: file = %O, start = $0000, size = $0010, fill = yes;
|
||||
|
||||
# 2 16K ROM Banks
|
||||
# - startup
|
||||
# - code
|
||||
# - rodata
|
||||
# - data (load)
|
||||
ROM0: file = %O, start = $8000, size = $7FF4, fill = yes, define = yes;
|
||||
|
||||
# Hardware Vectors at End of 2nd 8K ROM
|
||||
ROMV: file = %O, start = $FFF6, size = $000C, fill = yes;
|
||||
|
||||
# 1 8k CHR Bank
|
||||
ROM2: file = %O, start = $0000, size = $2000, fill = yes;
|
||||
|
||||
# standard 2k SRAM (-zeropage)
|
||||
# $0100-$0200 cpu stack
|
||||
# $0200-$0500 3 pages for ppu memory write buffer
|
||||
# $0500-$0800 3 pages for cc65 parameter stack
|
||||
SRAM: file = "", start = $0500, size = __STACKSIZE__, define = yes;
|
||||
|
||||
# additional 8K SRAM Bank
|
||||
# - data (run)
|
||||
# - bss
|
||||
# - heap
|
||||
RAM: file = "", start = $6000, size = $2000, define = yes;
|
||||
}
|
||||
SEGMENTS {
|
||||
HEADER: load = HEADER, type = ro;
|
||||
STARTUP: load = ROM0, type = ro, define = yes;
|
||||
LOWCODE: load = ROM0, type = ro, optional = yes;
|
||||
INIT: load = ROM0, type = ro, define = yes, optional = yes;
|
||||
CODE: load = ROM0, type = ro, define = yes;
|
||||
RODATA: load = ROM0, type = ro, define = yes;
|
||||
DATA: load = ROM0, run = RAM, type = rw, define = yes;
|
||||
VECTORS: load = ROMV, type = rw;
|
||||
CHARS: load = ROM2, type = rw;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
}
|
||||
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__;
|
||||
}
|
31
cfg/none.cfg
31
cfg/none.cfg
|
@ -1,31 +0,0 @@
|
|||
SYMBOLS {
|
||||
__STACKSIZE__: type = weak, value = $0800; # 2k stack
|
||||
}
|
||||
MEMORY {
|
||||
ZP: file = "", define = yes, start = $0000, size = $0001F;
|
||||
RAM: file = %O, start = %S, size = $10000 - __STACKSIZE__;
|
||||
}
|
||||
SEGMENTS {
|
||||
LOWCODE: load = RAM, type = ro, optional = yes;
|
||||
INIT: load = RAM, type = ro, define = yes, optional = yes;
|
||||
CODE: load = RAM, type = rw;
|
||||
RODATA: load = RAM, type = rw;
|
||||
DATA: load = RAM, type = rw;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
}
|
||||
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__;
|
||||
}
|
|
@ -1,25 +0,0 @@
|
|||
FEATURES {
|
||||
STARTADDRESS: default = $0200;
|
||||
}
|
||||
SYMBOLS {
|
||||
# If you want ld65 to output a loadable-format file by default, then uncomment
|
||||
# the next line. (Then, "-u __BOOT__" wouldn't be needed on the command line.)
|
||||
# __BOOT__: type = import;
|
||||
__STACKSIZE__: type = weak, value = $0400; # 1 kB stack
|
||||
__HIMEM__: type = weak, value = $8000; # 32 kB RAM
|
||||
}
|
||||
MEMORY {
|
||||
# for size of ZP, see runtime/zeropage.s and c1p/extzp.s
|
||||
ZP: file = "", define = yes, start = $0002, size = $001A + $0006;
|
||||
HEAD: file = %O, start = $0000, size = $00B6;
|
||||
RAM: file = %O, define = yes, start = %S, size = __HIMEM__ - __STACKSIZE__ - %S;
|
||||
}
|
||||
SEGMENTS {
|
||||
BOOT: load = HEAD, type = ro, optional = yes;
|
||||
INIT: load = RAM, type = ro, define = yes, optional = yes;
|
||||
CODE: load = RAM, type = rw;
|
||||
RODATA: load = RAM, type = rw;
|
||||
DATA: load = RAM, type = rw;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
}
|
|
@ -1,38 +0,0 @@
|
|||
FEATURES {
|
||||
STARTADDRESS: default = $0200;
|
||||
}
|
||||
SYMBOLS {
|
||||
# If you want ld65 to output a loadable-format file by default, then uncomment
|
||||
# the next line. (Then, "-u __BOOT__" wouldn't be needed on the command line.)
|
||||
# __BOOT__: type = import;
|
||||
__STACKSIZE__: type = weak, value = $0400; # 1 kB stack
|
||||
__HIMEM__: type = weak, value = $8000; # 32 kB RAM
|
||||
}
|
||||
MEMORY {
|
||||
# for size of ZP, see runtime/zeropage.s and c1p/extzp.s
|
||||
ZP: file = "", define = yes, start = $0002, size = $001A + $0020;
|
||||
HEAD: file = %O, start = $0000, size = $00B6;
|
||||
RAM: file = %O, define = yes, start = %S, size = __HIMEM__ - __STACKSIZE__ - %S;
|
||||
}
|
||||
SEGMENTS {
|
||||
BOOT: load = HEAD, type = ro, optional = yes;
|
||||
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 = rw;
|
||||
RODATA: load = RAM, type = rw;
|
||||
DATA: load = RAM, type = rw;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
EXTZP: load = ZP, type = zp, define = yes, optional = yes;
|
||||
}
|
||||
FEATURES {
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__,
|
||||
segment = INIT;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
segment = RODATA;
|
||||
}
|
46
cfg/pce.cfg
46
cfg/pce.cfg
|
@ -1,46 +0,0 @@
|
|||
# linker config to produce simple NEC PC-Engine cartridge (.pce)
|
||||
|
||||
SYMBOLS {
|
||||
__STACKSIZE__: type = weak, value = $0300; # 3 pages stack
|
||||
}
|
||||
|
||||
MEMORY {
|
||||
# FIXME: is this correct? the first 3? bytes cant be used?
|
||||
ZP: start = $03, size = $fd, type = rw, define = yes;
|
||||
|
||||
# reset-bank and hardware vectors
|
||||
ROM0: start = $e000, size = $1ff6, file = %O ,fill = yes, define = yes;
|
||||
ROMV: start = $fff6, size = $a, file = %O,fill = yes;
|
||||
|
||||
# first RAM page (also contains stack and zeropage)
|
||||
RAM: start = $2200, size = $1e00, define = yes;
|
||||
}
|
||||
|
||||
SEGMENTS {
|
||||
STARTUP: load = ROM0, type = ro, define = yes;
|
||||
INIT: load = ROM0, type = ro, define = yes, optional = yes;
|
||||
CODE: load = ROM0, type = ro, define = yes;
|
||||
RODATA: load = ROM0, type = ro, define = yes;
|
||||
DATA: load = ROM0, run= RAM, type = rw, define = yes;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
VECTORS: load = ROMV, type = rw, 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;
|
||||
}
|
||||
|
||||
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__;
|
||||
}
|
39
cfg/pet.cfg
39
cfg/pet.cfg
|
@ -1,39 +0,0 @@
|
|||
SYMBOLS {
|
||||
__LOADADDR__: type = import;
|
||||
__EXEHDR__: type = import;
|
||||
__STACKSIZE__: type = weak, value = $0800; # 2k stack
|
||||
}
|
||||
MEMORY {
|
||||
ZP: file = "", define = yes, start = $0055, size = $001A;
|
||||
LOADADDR: file = %O, start = $03FF, size = $0002;
|
||||
HEADER: file = %O, start = $0401, size = $000C;
|
||||
RAM: file = %O, start = $040D, size = $7BF3 - __STACKSIZE__;
|
||||
}
|
||||
SEGMENTS {
|
||||
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;
|
||||
ZPSAVE: load = RAM, type = bss;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
}
|
||||
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__;
|
||||
}
|
|
@ -1,39 +0,0 @@
|
|||
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;
|
||||
RAM: file = %O, define = yes, start = $100D, size = $ECF3 - __STACKSIZE__;
|
||||
}
|
||||
SEGMENTS {
|
||||
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;
|
||||
ZPSAVE: load = RAM, type = bss;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
}
|
||||
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__;
|
||||
}
|
|
@ -1,35 +0,0 @@
|
|||
SYMBOLS {
|
||||
__EXEHDR__: type = import;
|
||||
__STACKSIZE__: type = weak, value = $0800; # 2k stack
|
||||
}
|
||||
MEMORY {
|
||||
ZP: file = "", start = $0000, size = $001A;
|
||||
HEADER: file = %O, start = $0000, size = $0001;
|
||||
RAM: file = %O, define = yes, start = $0200, size = $FDF0 - __STACKSIZE__;
|
||||
}
|
||||
SEGMENTS {
|
||||
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;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
}
|
||||
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__;
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue