mirror of
https://github.com/cc65/cc65.git
synced 2025-02-23 18:29:05 +00:00
Merge branch 'cc65:master' into atari7800conio
This commit is contained in:
commit
6a6aa094fa
13
.github/checks/Makefile
vendored
Normal file
13
.github/checks/Makefile
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
|
||||
.PHONY: check tabs lastline spaces
|
||||
|
||||
check: tabs lastline spaces
|
||||
|
||||
tabs: tabs.sh
|
||||
@./tabs.sh
|
||||
|
||||
lastline: lastline.sh
|
||||
@./lastline.sh
|
||||
|
||||
spaces: spaces.sh
|
||||
@./spaces.sh
|
25
.github/checks/lastline.sh
vendored
Executable file
25
.github/checks/lastline.sh
vendored
Executable file
@ -0,0 +1,25 @@
|
||||
#! /bin/bash
|
||||
OLDCWD=`pwd`
|
||||
SCRIPT_PATH=`dirname $0`
|
||||
CHECK_PATH=.
|
||||
|
||||
cd $SCRIPT_PATH/../../
|
||||
|
||||
nl='
|
||||
'
|
||||
nl=$'\n'
|
||||
r1="${nl}$"
|
||||
FILES=`find $CHECK_PATH -type f \( -name \*.inc -o -name Makefile -o -name \*.cfg -o -name \*.\[chs\] -o -name \*.mac -o -name \*.asm -o -name \*.sgml \) -print | while read f; do
|
||||
t=$(tail -c2 $f; printf x)
|
||||
[[ ${t%x} =~ $r1 ]] || echo "$f"
|
||||
done`
|
||||
|
||||
cd $OLDCWD
|
||||
|
||||
if [ x"$FILES"x != xx ]; then
|
||||
echo "error: found following files that have no newline at the end:"
|
||||
for n in $FILES; do
|
||||
echo $n
|
||||
done
|
||||
exit -1
|
||||
fi
|
18
.github/checks/spaces.sh
vendored
Executable file
18
.github/checks/spaces.sh
vendored
Executable file
@ -0,0 +1,18 @@
|
||||
#! /bin/bash
|
||||
OLDCWD=`pwd`
|
||||
SCRIPT_PATH=`dirname $0`
|
||||
CHECK_PATH=.
|
||||
|
||||
cd $SCRIPT_PATH/../../
|
||||
|
||||
FILES=`find $CHECK_PATH -type f \( -name \*.inc -o -name Makefile -o -name \*.cfg -o -name \*.\[chs\] -o -name \*.mac -o -name \*.asm -o -name \*.sgml \) -print | grep -v "libwrk/" | grep -v "testwrk/" | xargs grep -l ' $'`
|
||||
|
||||
cd $OLDCWD
|
||||
|
||||
if [ x"$FILES"x != xx ]; then
|
||||
echo "error: found dangling spaces in the following files:"
|
||||
for n in $FILES; do
|
||||
echo $n
|
||||
done
|
||||
exit -1
|
||||
fi
|
18
.github/checks/tabs.sh
vendored
Executable file
18
.github/checks/tabs.sh
vendored
Executable file
@ -0,0 +1,18 @@
|
||||
#! /bin/bash
|
||||
OLDCWD=`pwd`
|
||||
SCRIPT_PATH=`dirname $0`
|
||||
CHECK_PATH=.
|
||||
|
||||
cd $SCRIPT_PATH/../../
|
||||
|
||||
FILES=`find $CHECK_PATH -type f \( \( -name \*.inc -a \! -name Makefile.inc \) -o -name \*.cfg -o -name \*.\[chs\] -o -name \*.mac -o -name \*.asm -o -name \*.sgml \) -print | grep -v "libwrk/" | grep -v "testwrk/" | xargs grep -l $'\t'`
|
||||
|
||||
cd $OLDCWD
|
||||
|
||||
if [ x"$FILES"x != xx ]; then
|
||||
echo "error: found TABs in the following files:"
|
||||
for n in $FILES; do
|
||||
echo $n
|
||||
done
|
||||
exit -1
|
||||
fi
|
3
.github/workflows/build-on-pull-request.yml
vendored
3
.github/workflows/build-on-pull-request.yml
vendored
@ -21,6 +21,9 @@ jobs:
|
||||
- name: Checkout Source
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Do some simple style checks
|
||||
shell: bash
|
||||
run: make -j2 check
|
||||
- name: Build the tools.
|
||||
shell: bash
|
||||
run: make -j2 bin USER_CFLAGS=-Werror
|
||||
|
@ -46,6 +46,9 @@ jobs:
|
||||
- name: Checkout Source
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Do some simple style checks
|
||||
shell: bash
|
||||
run: make -j2 check
|
||||
- name: Build the tools.
|
||||
shell: bash
|
||||
run: |
|
||||
|
113
Contributing.md
Normal file
113
Contributing.md
Normal file
@ -0,0 +1,113 @@
|
||||
This document contains all kinds of information that you should know if you want to contribute to the cc65 project. Before you start, please read all of it. If something is not clear to you, please ask - this document is an ongoing effort and may well be incomplete.
|
||||
|
||||
(''Note:'' The word "must" indicates a requirement. The word "should" indicates a recomendation.)
|
||||
|
||||
# generally
|
||||
|
||||
* You must obey these rules when contributing new code or documentation to cc65. We are well aware that not all existing code may respect all rules outlined here - but this is no reason for you not to respect them.
|
||||
* One commit/patch/PR per issue. Do not mix several things unless they are very closely related.
|
||||
|
||||
# Codestyle rules
|
||||
|
||||
## All Sources
|
||||
|
||||
### TABs and spaces
|
||||
|
||||
This is an ongoing controversial topic - everyone knows that. However, the following is how we do it :)
|
||||
|
||||
* TAB characters must be expanded to spaces.
|
||||
* 4 spaces per indention level (rather than 8) are preferred, especially if there are many different levels.
|
||||
* No extra spaces at the end of lines.
|
||||
* All text files must end with new-line characters. Don't leave the last line "dangling".
|
||||
|
||||
The (bash) scipts used to check the above rules can be found in ```.github/check```. You can also run all checks using ```make check```.
|
||||
|
||||
### misc
|
||||
|
||||
* 80 characters is the desired maximum width of files. But, it isn't a "strong" rule; sometimes, you will want to type longer lines, in order to keep the parts of expressions or comments together on the same line.
|
||||
* You should avoid typing non-ASCII characters.
|
||||
* If you change "normal" source code into comments, then you must add a comment about why that code is a comment.
|
||||
* When you want to create a comment from several lines of code, you should use preprocessor lines, instead of ```/* */``` or "```;```". Example:
|
||||
<pre>
|
||||
#if 0
|
||||
one ();
|
||||
two ();
|
||||
three = two () + one ();
|
||||
#endif
|
||||
</pre>
|
||||
* You should type upper case characters for hex values.
|
||||
* When you type zero-page addresses in hexadecimal, you should type two hex characters (after the hex prefix). When you type non-zero-page addresses in hex, you should type four hex characters.
|
||||
* When you type lists of addresses, it is a good idea to sort them in ascending numerical order. That makes it easier for readers to build mental pictures of where things are in an address space. And, it is easier to see how big the variables and buffers are. Example:
|
||||
<pre>
|
||||
xCoord := $0703
|
||||
yCoord := $0705 ; (this address implies that xCoord is 16 bits)
|
||||
cmdbuf := $0706 ; (this address implies that yCoord is 8 bits)
|
||||
cmdlen := $0786 ; (this address implies that cmdbuf is 128 bytes)
|
||||
color := $0787
|
||||
</pre>
|
||||
|
||||
## C Sources
|
||||
|
||||
* Your files should obey the C89 standard.
|
||||
* All declarations in a block must be at the beginning of that block.
|
||||
* You should put a blank line between a list of local variable declarations and the first line of code.
|
||||
* You must use ANSI C comments (```/* */```); you must not use C++ comments (```//```).
|
||||
* The normal indentation width should be four spaces.
|
||||
* When a function's argument list wraps around to a next line, you should indent that next line by either the normal width or enough spaces to align it with the arguments on the previous line.
|
||||
* When you add functions to an existing file, you should separate them by the same number of blank lines that separate the functions that already are in that file.
|
||||
|
||||
(The next two rules will be changed at some time in the future; but, for now:)
|
||||
|
||||
* You must separate function names and parameter/argument lists by one space.
|
||||
* When declaring/defining pointers, you must put the asterisk (```*```) next to the data type, with a space between it and the variable's name. Examples:
|
||||
<pre>
|
||||
int* namedPtr[5];
|
||||
char* nextLine (FILE* f);
|
||||
</pre>
|
||||
|
||||
## Assembly Sources
|
||||
|
||||
* Op-code mnemonics must have lower-case letters. The names of instruction macroes may have upper-case letters.
|
||||
* Hexadecimal number constants should be used except where decimal or binary numbers make much more sense in that constant's context.
|
||||
* Hexadecimal letters should be upper-case.
|
||||
* When you set two registers or two memory locations to an immediate 16-bit zero, you should use the expressions ```#<$0000``` and ```#>$0000``` (they make it obvious where you are putting the lower and upper bytes).
|
||||
* If a function is declared to return a char-sized value, it actually must return an integer-sized value. (When cc65 promotes a returned value, it sometimes assumes that the value already is an integer.)
|
||||
* Functions, that are intended for a platform's system library, should be optimized as much as possible.
|
||||
* Sometimes, there must be a trade-off between size and speed. If you think that a library function won't be used often, then you should make it small. Otherwise, you should make it fast.
|
||||
* Comments that are put on the right side of instructions must be aligned (start in the same character columns).
|
||||
* Assembly source fields (label, operation, operand, comment) should start ''after'' character columns that are multiples of eight (such as 1, 9, 17, 33, and 41).
|
||||
|
||||
## LinuxDoc Sources
|
||||
|
||||
* TAB characters must be expanded to spaces.
|
||||
* All text files must end with new-line characters. Don't leave the last line "dangling".
|
||||
* 80 characters is the desired maximum width of files.
|
||||
* You should avoid typing non-ASCII characters.
|
||||
|
||||
* You should put blank lines between LinuxDoc sections:
|
||||
* Three blank lines between ```<sect>``` sections.
|
||||
* Two blank lines between ```<sect1>``` sections.
|
||||
* One blank line between other sections.
|
||||
|
||||
# Library implementation rules
|
||||
|
||||
* By default the toolchain must output a "standard" binary for the platform, no emulator formats, no extra headers used by tools. If the resulting binaries can not be run as is on emulators or eg flash cartridges, the process of converting them to something that can be used with these should be documented in the user manual.
|
||||
* Generally every function should live in a seperate source file - unless the functions are so closely related that splitting makes no sense.
|
||||
* Source files should not contain commented out code - if they do, there should be a comment that explains why that commented out code exists.
|
||||
|
||||
# Makefile rules
|
||||
|
||||
* Makefiles must generally work on both *nix (ba)sh and windows cmd.exe.
|
||||
* Makefiles must not use external tools that are not provided by the cc65 toolchain itself.
|
||||
|
||||
The only exception to the above are actions that are exclusive to the github actions - those may rely on bash and/or linux tools.
|
||||
|
||||
# Documentation rules
|
||||
|
||||
## User manual (LinuxDoc)
|
||||
|
||||
* This is the primary documentation.
|
||||
|
||||
## Wiki
|
||||
|
||||
* The Wiki is strictly for additional information that does not fit into the regular user manual (LinuxDoc). The wiki must not duplicate any information that is present in the user manual
|
5
Makefile
5
Makefile
@ -1,4 +1,4 @@
|
||||
.PHONY: all mostlyclean clean install zip avail unavail bin lib doc html info samples test util
|
||||
.PHONY: all mostlyclean clean install zip avail unavail bin lib doc html info samples test util check
|
||||
|
||||
.SUFFIXES:
|
||||
|
||||
@ -24,6 +24,9 @@ samples:
|
||||
test:
|
||||
@$(MAKE) -C test --no-print-directory $@
|
||||
|
||||
check:
|
||||
@$(MAKE) -C .github/checks --no-print-directory $@
|
||||
|
||||
util:
|
||||
@$(MAKE) -C util --no-print-directory $@
|
||||
|
||||
|
@ -4,7 +4,9 @@
|
||||
|
||||
[Documentation](https://cc65.github.io/doc)
|
||||
|
||||
[Wiki](https://github.com/cc65/wiki/wiki)
|
||||
[Contributing](Contributing.md) to the CC65 project.
|
||||
|
||||
The [Wiki](https://github.com/cc65/wiki/wiki) contains extra info that does not fit into the regular documentation.
|
||||
|
||||
[](https://github.com/cc65/cc65/actions/workflows/snapshot-on-push-master.yml)
|
||||
|
||||
|
@ -24,4 +24,4 @@ _FPUSHBACK = $08
|
||||
; File table
|
||||
.global __filetab
|
||||
|
||||
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
;-------------------------------------------------------------------------
|
||||
; ATASCII CHARACTER DEFS
|
||||
;-------------------------------------------------------------------------
|
||||
|
||||
|
||||
ATEOL = $9B ; END-OF-LINE, used by CONIO
|
||||
|
||||
;-------------------------------------------------------------------------
|
||||
@ -27,9 +27,9 @@ CH_VLINE = $01 ; exclamation mark
|
||||
|
||||
POKMSK = $00 ; Mask for Pokey IRQ enable
|
||||
RTCLOK = $01 ; 60 hz. clock
|
||||
JUMP = $01
|
||||
JUMP = $01
|
||||
CRITIC = $03 ; Critical section
|
||||
ATRACT = $04 ; Attract Mode
|
||||
ATRACT = $04 ; Attract Mode
|
||||
|
||||
SDLSTL = $05 ; DLISTL Shadow
|
||||
SDLSTH = $06 ; DLISTH "
|
||||
@ -66,20 +66,20 @@ SAVMSC = $1B ; pointer to screen memory (conio)
|
||||
;-------------------------------------------------------------------------
|
||||
|
||||
;Interrupt Vectors
|
||||
|
||||
VIMIRQ = $0200 ; Immediate IRQ
|
||||
|
||||
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
|
||||
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
|
||||
VTRIGR = $020C ; Soft Trigger
|
||||
VBRKOP = $020E ; BRK Opcode
|
||||
VSERIN = $0210 ; Serial in Ready
|
||||
VSEROR = $0212 ; Serial Out Ready
|
||||
|
@ -76,13 +76,13 @@ DL_CHR20x8x2 = 6 ; colour (duochrome per character), 20 character
|
||||
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)
|
||||
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...
|
||||
|
||||
|
@ -75,7 +75,7 @@ EMD_API_VERSION = $02
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; Driver entry points
|
||||
|
||||
|
||||
.global emd_install
|
||||
.global emd_uninstall
|
||||
.global emd_pagecount
|
||||
|
@ -1,4 +1,4 @@
|
||||
;
|
||||
;
|
||||
; Ullrich von Bassewitz, 16.05.2000
|
||||
;
|
||||
|
||||
|
@ -135,35 +135,35 @@ STIMCTLB = $FD1F
|
||||
TIM0BKUP = $FD00
|
||||
TIM0CTLA = $FD01
|
||||
TIM0CNT = $FD02
|
||||
TIM0CTLB = $FD03
|
||||
TIM0CTLB = $FD03
|
||||
TIM1BKUP = $FD04
|
||||
TIM1CTLA = $FD05
|
||||
TIM1CNT = $FD06
|
||||
TIM1CTLB = $FD07
|
||||
TIM1CTLB = $FD07
|
||||
TIM2BKUP = $FD08
|
||||
TIM2CTLA = $FD09
|
||||
TIM2CNT = $FD0A
|
||||
TIM2CTLB = $FD0B
|
||||
TIM2CTLB = $FD0B
|
||||
TIM3BKUP = $FD0C
|
||||
TIM3CTLA = $FD0D
|
||||
TIM3CNT = $FD0E
|
||||
TIM3CTLB = $FD0F
|
||||
TIM3CTLB = $FD0F
|
||||
TIM4BKUP = $FD10
|
||||
TIM4CTLA = $FD11
|
||||
TIM4CNT = $FD12
|
||||
TIM4CTLB = $FD13
|
||||
TIM4CTLB = $FD13
|
||||
TIM5BKUP = $FD14
|
||||
TIM5CTLA = $FD15
|
||||
TIM5CNT = $FD16
|
||||
TIM5CTLB = $FD17
|
||||
TIM5CTLB = $FD17
|
||||
TIM6BKUP = $FD18
|
||||
TIM6CTLA = $FD19
|
||||
TIM6CNT = $FD1A
|
||||
TIM6CTLB = $FD1B
|
||||
TIM6CTLB = $FD1B
|
||||
TIM7BKUP = $FD1C
|
||||
TIM7CTLA = $FD1D
|
||||
TIM7CNT = $FD1E
|
||||
TIM7CTLB = $FD1F
|
||||
TIM7CTLB = $FD1F
|
||||
|
||||
; Mikey Audio
|
||||
|
||||
|
@ -3,23 +3,23 @@
|
||||
;
|
||||
; 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.
|
||||
;
|
||||
; 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
|
||||
; ------------
|
||||
|
@ -17,7 +17,7 @@ FNAME_LEN = 11 ; Maximum length of file-name
|
||||
; ---------------------------------------------------------------------------
|
||||
; I/O Identifier
|
||||
; Theses identifers are used for channel management
|
||||
;
|
||||
;
|
||||
|
||||
XKBD = $80 ; Keyboard
|
||||
XRSE = $83 ; RS232 in
|
||||
@ -87,27 +87,27 @@ HRSFB := $57
|
||||
VABKP1 := $58
|
||||
|
||||
; RS232T
|
||||
; b0-b3 : speed
|
||||
; b0-b3 : speed
|
||||
; 1111 => 19200 bps (please note that telestrat can't handle this speed without stopping all IRQ except ACIA's one)
|
||||
; 1100 => 9600 bps (default from TELEMON)
|
||||
; 1110 => 4800 bps
|
||||
; 1010 => 2400 bps
|
||||
; 1000 => 1200 bps
|
||||
; 0111 => 600 bps
|
||||
; 0110 => 300 bps
|
||||
; 0101 => 150 bps
|
||||
; 0010 => 75 bps
|
||||
; 1110 => 4800 bps
|
||||
; 1010 => 2400 bps
|
||||
; 1000 => 1200 bps
|
||||
; 0111 => 600 bps
|
||||
; 0110 => 300 bps
|
||||
; 0101 => 150 bps
|
||||
; 0010 => 75 bps
|
||||
|
||||
; b4 : 0 external clock, 1 internal clock
|
||||
; b6-b5 : 00 8 bits
|
||||
; 01 7 bits
|
||||
; 10 6 bits
|
||||
; 11 5 bits
|
||||
; b7 : 0 a stop
|
||||
; b7 : 0 a stop
|
||||
|
||||
RS232T := $59
|
||||
|
||||
; RS232C
|
||||
; RS232C
|
||||
; b0-b3 : 0
|
||||
; b4 : 1 if echo
|
||||
; b5 : 1 if parity
|
||||
@ -218,7 +218,7 @@ SCREEN := $BB80
|
||||
|
||||
; TELEMON primitives (2.4 & 3.x)
|
||||
|
||||
; all values are used to call bank 7 of telestrat cardridge. It works with 'brk value'
|
||||
; all values are used to call bank 7 of telestrat cardridge. It works with 'brk value'
|
||||
XOP0 = $00 ; Open device on channel 0
|
||||
XOP1 = $01 ; Open device on channel 1
|
||||
XOP2 = $02 ; Open device on channel 2
|
||||
@ -281,8 +281,8 @@ XWRCLK = $3E ; Displays clock in the address in A & Y registe
|
||||
XSONPS = $40 ; Send data to PSG register (14 values)
|
||||
XOUPS = $42 ; Send Oups sound into PSG
|
||||
XPLAY = $43 ; Play a sound
|
||||
XSOUND = $44
|
||||
XMUSIC = $45
|
||||
XSOUND = $44
|
||||
XMUSIC = $45
|
||||
XZAP = $46 ; Send Zap sound to PSG
|
||||
XSHOOT = $47
|
||||
|
||||
@ -303,13 +303,13 @@ XFWR = $4E ; Put a char on the first screen. Only available
|
||||
; Keyboard primitives
|
||||
XALLKB = $50 ; Read Keyboard, and populate KBDCOL
|
||||
XKBDAS = $51 ; Ascii conversion
|
||||
XGOKBD = $52 ; Swap keyboard type (Qwerty, French ...)
|
||||
XGOKBD = $52 ; Swap keyboard type (Qwerty, French ...)
|
||||
|
||||
; Buffer management
|
||||
XECRBU = $54 ; Write A or AY in the buffer
|
||||
XLISBU = $55 ; Read A or AY in the buffer
|
||||
XTSTBU = $56
|
||||
XVIDBU = $57 ; Flush the buffer
|
||||
XVIDBU = $57 ; Flush the buffer
|
||||
XINIBU = $58 ; Initialize the buffer X
|
||||
XDEFBU = $59 ; Reset all value of the buffer
|
||||
XBUSY = $5A ; Test if the buffer is empty
|
||||
@ -328,7 +328,7 @@ XMSAVE = $61 ; Write a file to Minitel
|
||||
|
||||
XFREE = $62 ; Only in TELEMON 3.x (bank 7 of Orix)
|
||||
|
||||
; Next Minitel primitives
|
||||
; Next Minitel primitives
|
||||
XWCXFI = $63 ; Wait connection
|
||||
XLIGNE = $64 ;
|
||||
XDECON = $65 ; Minitel disconnection
|
||||
@ -340,7 +340,7 @@ XHRSSE = $8C ; Set hires position cursor
|
||||
XDRAWA = $8D ; Draw a line absolute
|
||||
XDRAWR = $8E ; Draw a line (relative)
|
||||
XCIRCL = $8F ; Draw a circle
|
||||
XCURSE = $90 ; Plot a pixel
|
||||
XCURSE = $90 ; Plot a pixel
|
||||
XCURMO = $91 ; Move to x,y pos in Hires
|
||||
XPAPER = $92
|
||||
XINK = $93
|
||||
@ -358,8 +358,8 @@ XPING = $9D ; Send Ping sound to PSG
|
||||
PWD_PTR = $00
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
;
|
||||
BUFTRV := $100
|
||||
;
|
||||
BUFTRV := $100
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
@ -377,7 +377,7 @@ TIMES := $211
|
||||
TIMEM := $212
|
||||
TIMEH := $213
|
||||
FLGCLK := $214
|
||||
FLGCLK_FLAG := $215
|
||||
FLGCLK_FLAG := $215
|
||||
FLGCUR := $216 ; Cursor management flag
|
||||
; screens position managements
|
||||
|
||||
@ -466,7 +466,7 @@ DESALO := $52D
|
||||
FISALO := $52F
|
||||
EXSALO := $531
|
||||
EXTDEF := $55D ; Default extension. At the start of telemon, it's set to ".COM"
|
||||
BUFEDT := $590 ; Buffer edition
|
||||
BUFEDT := $590 ; Buffer edition
|
||||
|
||||
MAX_BUFEDT_LENGTH=110
|
||||
|
||||
@ -480,7 +480,7 @@ BUFBUF := $c080
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; Stratsed vectors
|
||||
; Stratsed is the main OS for Telestrat
|
||||
; Stratsed is the main OS for Telestrat
|
||||
XMERGE := $FF0E
|
||||
XFST := $FF11
|
||||
XSPUT := $FF14
|
||||
@ -532,7 +532,7 @@ XPMAP := $FFA7
|
||||
XRWTS := $FFAA
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; MACRO
|
||||
; MACRO
|
||||
|
||||
.macro BRK_TELEMON value
|
||||
.byte $00,value
|
||||
|
@ -54,7 +54,7 @@ TGI_VF_CCOUNT = (TGI_VF_LASTCHAR - TGI_VF_FIRSTCHAR + 1)
|
||||
; Font data loaded directly from file
|
||||
.struct TGI_VECTORFONT
|
||||
TOP .byte ; Height of char
|
||||
BOTTOM .byte ; Descender
|
||||
BOTTOM .byte ; Descender
|
||||
HEIGHT .byte ; Maximum char height
|
||||
WIDTHS .byte ::TGI_VF_CCOUNT ; Char widths
|
||||
CHARS .word ::TGI_VF_CCOUNT ; Pointer to character defs
|
||||
|
@ -33,7 +33,7 @@
|
||||
|
||||
|
||||
|
||||
; Struct utsname
|
||||
; Struct utsname
|
||||
.struct utsname
|
||||
sysname .byte 17
|
||||
nodename .byte 9
|
||||
|
@ -12,7 +12,7 @@
|
||||
.globalzp ptr1, ptr2, ptr3, ptr4
|
||||
.globalzp tmp1, tmp2, tmp3, tmp4
|
||||
.globalzp regbank
|
||||
|
||||
|
||||
; The size of the register bank
|
||||
regbanksize = 6
|
||||
|
||||
|
@ -84,7 +84,7 @@ The names are the usual ones you can find in system reference manuals. Example:
|
||||
tics = OS.rtclok[1] // get ticks
|
||||
...
|
||||
</verb></tscreen>
|
||||
|
||||
|
||||
<sect1>Atari 5200 specific functions<p>
|
||||
|
||||
<itemize>
|
||||
@ -221,7 +221,7 @@ you cannot use any of the following functions (and a few others):
|
||||
|
||||
<sect1>CAR format<p>
|
||||
|
||||
AtariROMMaker (<url url="https://www.wudsn.com/index.php/productions-atari800/tools/atarirommaker"> )
|
||||
AtariROMMaker (<url url="https://www.wudsn.com/index.php/productions-atari800/tools/atarirommaker"> )
|
||||
can be used to create a <tt/.CAR/ file from the binary ROM image cc65 generates.
|
||||
This might be more convenient when working with emulators.
|
||||
|
||||
|
@ -3622,7 +3622,7 @@ See: <tt><ref id=".ASCIIZ" name=".ASCIIZ"></tt>,<tt><ref id=".BYTE" name=".BYTE"
|
||||
|
||||
<sect1><tt>.PDTV</tt><label id=".PDTV"><p>
|
||||
|
||||
Enable the 6502DTV instruction set. This is a superset of the 6502
|
||||
Enable the 6502DTV instruction set. This is a superset of the 6502
|
||||
instruction set.
|
||||
|
||||
See: <tt><ref id=".P02" name=".P02"></tt>
|
||||
|
@ -119,9 +119,9 @@ Here is a description of all the command line options:
|
||||
<item>4510
|
||||
</itemize>
|
||||
|
||||
6502x is for the NMOS 6502 with unofficial opcodes. 6502dtv is for the
|
||||
emulated CPU of the C64DTV device. huc6280 is the CPU of the PC engine.
|
||||
4510 is the CPU of the Commodore C65. Support for the 65816 currently
|
||||
6502x is for the NMOS 6502 with unofficial opcodes. 6502dtv is for the
|
||||
emulated CPU of the C64DTV device. huc6280 is the CPU of the PC engine.
|
||||
4510 is the CPU of the Commodore C65. Support for the 65816 currently
|
||||
is not available.
|
||||
|
||||
|
||||
@ -253,8 +253,8 @@ for this CPU. Invalid opcodes are translated into <tt/.byte/ commands.
|
||||
With the command line option <tt><ref id="option--cpu" name="--cpu"></tt>, the
|
||||
disassembler may be told to recognize either the 65SC02 or 65C02 CPUs. The
|
||||
latter understands the same opcodes as the former, plus 16 additional bit
|
||||
manipulation and bit test-and-branch commands. Using 6502x as CPU the illegal
|
||||
opcodes of 6502 CPU are detected and displayed. 6502dtv setting recognizes the
|
||||
manipulation and bit test-and-branch commands. Using 6502x as CPU the illegal
|
||||
opcodes of 6502 CPU are detected and displayed. 6502dtv setting recognizes the
|
||||
emulated CPU instructons of the C64DTV device.
|
||||
|
||||
|
||||
|
@ -1332,7 +1332,7 @@ This function returns the GEOS Kernal version combined (by logical OR) with the
|
||||
<p>
|
||||
This function returns the PAL/NTSC flag combined (by logical OR) with the 40/80 columns flag. This is
|
||||
not the best way to check if the screen has 40 or 80 columns since a PAL/NTSC check is always
|
||||
performed and it can take as long as a full raster frame. If you just want to know if the
|
||||
performed and it can take as long as a full raster frame. If you just want to know if the
|
||||
screen has 40 or 80 columns use the expression <tt/graphMode & 0x80/ which returns <tt/0/ for
|
||||
40 columns and <tt/0x80/ for 80 columns. Remember that this value can be changed during
|
||||
runtime. It is unclear if this will work for GEOS 64 so you probably do not want to test
|
||||
|
@ -410,7 +410,7 @@ Available at <url
|
||||
url="https://github.com/commanderx16/x16-emulator/releases">:
|
||||
|
||||
Emulates the Commander X16 Single Board Computer, with sound, SD card images,
|
||||
VGA and NTSC video, and a NES game controller emulation. Includes a monitor.
|
||||
VGA and NTSC video, and a NES game controller emulation. Includes a monitor.
|
||||
It runs on all SDL2 platforms.
|
||||
|
||||
Compile the tutorial with
|
||||
@ -459,7 +459,7 @@ Substitute the name of a Commodore computer for that <tt/<sys>/:
|
||||
Start the desired version of the emulator (CBM610 programs run on
|
||||
the CBM II [<tt/xcbm2/] emulator).
|
||||
|
||||
Choose <bf>File>Autostart disk/tape image...</bf>, choose your executable,
|
||||
Choose <bf>File>Autostart disk/tape image...</bf>, choose your executable,
|
||||
and click <bf/OK/.
|
||||
|
||||
The file has a 14-byte header which corresponds to a PRG-format BASIC program,
|
||||
|
@ -36,7 +36,7 @@ Here is a small traditional Hello World program for the Atari Lynx.
|
||||
<tscreen><verb>
|
||||
#include <lynx.h>
|
||||
#include <tgi.h>
|
||||
#include <6502.h>
|
||||
#include <6502.h>
|
||||
|
||||
void main(void) {
|
||||
tgi_install(tgi_static_stddrv);
|
||||
|
@ -112,7 +112,7 @@ For a C test compiled and linked with <tt/--target sim6502/ the
|
||||
command line arguments to <tt/sim65/ will be passed to <tt/main/,
|
||||
and the return value from <tt/main/ will become sim65's exit code.
|
||||
The <tt/exit/ function may also be used to terminate with an exit code.
|
||||
|
||||
|
||||
Exit codes are limited to 8 bits.
|
||||
|
||||
The standard C library high level file input and output is functional.
|
||||
|
@ -48,7 +48,7 @@ using 4k config run in the memory range of $200 - $0FFF. The 32k
|
||||
this range to $7FFF. Memory above 32k can be used to extend the heap, as described below.
|
||||
The starting memory location and entry point for running the program is $200, so when the
|
||||
program is transferred to the Sym-1, it is executed by typing 'g 200'. The system returns control
|
||||
back to the monitor ROM when the program terminates, providing the '.' prompt.
|
||||
back to the monitor ROM when the program terminates, providing the '.' prompt.
|
||||
|
||||
Special locations:
|
||||
|
||||
@ -58,7 +58,7 @@ Special locations:
|
||||
|
||||
<tag/Stack/
|
||||
The C runtime stack is located at $0FFF on 4kb Syms, or at $7FFF for 32kb systems.
|
||||
The stack always grows downwards.
|
||||
The stack always grows downwards.
|
||||
|
||||
<tag/Heap/
|
||||
The C heap is located at the end of the program and grows towards the C runtime stack. Extended
|
||||
|
@ -192,9 +192,9 @@ port cardridge.
|
||||
Telemon 2.4 returns in keyboard buffer the direction of the joysticks. This means that
|
||||
if you get input from keyboard by conio cgetc function, you will get direction from joysticks.
|
||||
|
||||
Anyway, if you don't want to use ROM, you can use joysticks standard drivers in your code.
|
||||
Anyway, if you don't want to use ROM, you can use joysticks standard drivers in your code.
|
||||
|
||||
The standard driver manages two joysticks. Only one button is managed for these joysticks.
|
||||
The standard driver manages two joysticks. Only one button is managed for these joysticks.
|
||||
|
||||
Telestrat can handle one button for the left port, and three buttons for the right port (but this port was designed for a mouse).
|
||||
|
||||
@ -217,7 +217,7 @@ RS232 port with Telemon calls (see XSOUT primitive for example)
|
||||
Telemon 3.0 handles fopen, fread, fclose primitives. It means that this
|
||||
function will crash the Telestrat because Telemon 2.4 does not have these
|
||||
primitives. By the way, Telemon 3.0 uses an extension "ch376 card" which
|
||||
handles sdcard and FAT 32 usb key. In the next version of Telemon, FT DOS,
|
||||
handles sdcard and FAT 32 usb key. In the next version of Telemon, FT DOS,
|
||||
Sedoric, Stratsed will be handled in these 3 primitives (fopen, fread, fclose).
|
||||
|
||||
<itemize>
|
||||
@ -227,10 +227,10 @@ Sedoric, Stratsed will be handled in these 3 primitives (fopen, fread, fclose).
|
||||
</itemize>
|
||||
|
||||
<sect1>conio<p>
|
||||
Functions textcolor and bgcolor are available only with Telemon 3.0 (Orix).
|
||||
Telemon 2.4 primitives can't handle any change of colors in text mode except with XINK or
|
||||
XPAPER primitives which put on the first and second columns ink and paper attributes.
|
||||
The only way to change color on the same line for text is to handle it in pure assembly
|
||||
Functions textcolor and bgcolor are available only with Telemon 3.0 (Orix).
|
||||
Telemon 2.4 primitives can't handle any change of colors in text mode except with XINK or
|
||||
XPAPER primitives which put on the first and second columns ink and paper attributes.
|
||||
The only way to change color on the same line for text is to handle it in pure assembly
|
||||
without systems calls.
|
||||
|
||||
<sect>Other hints<p>
|
||||
|
@ -76,13 +76,13 @@ ifneq ($(MAKECMDGOALS),clean)
|
||||
endif
|
||||
|
||||
%.o: %.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
	$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
$(PROGRAM): $(SOURCES:.c=.o)
|
||||
$(CC) $(LDFLAGS) -o $@ $^
|
||||
	$(CC) $(LDFLAGS) -o $@ $^
|
||||
|
||||
clean:
|
||||
$(RM) $(SOURCES:.c=.o) $(SOURCES:.c=.d) $(PROGRAM) $(PROGRAM).map
|
||||
	$(RM) $(SOURCES:.c=.o) $(SOURCES:.c=.d) $(PROGRAM) $(PROGRAM).map
|
||||
</verb></tscreen>
|
||||
|
||||
<bf/Important:/ When using the sample Makefile above via copy & paste it is
|
||||
|
@ -137,7 +137,7 @@ struct __antic {
|
||||
** Called during every vertical blank; see SYSVBV, VVBLKI, CRITIC, and VVBLKD,
|
||||
** as well as the SETVBV routine.
|
||||
*/
|
||||
#define NMIEN_VBI 0x40
|
||||
#define NMIEN_VBI 0x40
|
||||
|
||||
/* [Reset] key pressed */
|
||||
#define NMIEN_RESET 0x20
|
||||
|
@ -31,19 +31,19 @@
|
||||
struct __os {
|
||||
|
||||
/*Page zero*/
|
||||
unsigned char pokmsk; // = $00 System mask for POKEY IRQ enable
|
||||
unsigned char pokmsk; // = $00 System mask for POKEY IRQ enable
|
||||
unsigned char rtclok[2]; // = $01,$02 Real time clock
|
||||
unsigned char critic; // = $03 Critical section flag
|
||||
unsigned char critic; // = $03 Critical section flag
|
||||
unsigned char atract; // = $04 Attract mode counter
|
||||
|
||||
|
||||
union {
|
||||
struct {
|
||||
unsigned char sdlstl; // = $05 Save display list LO
|
||||
unsigned char sdlsth; // = $06 Save display list HI
|
||||
};
|
||||
void* sdlst; // = $05,$06 Display list shadow
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
unsigned char sdmctl; // = $07 DMACTL shadow
|
||||
unsigned char pcolr0; // = $08 PM color 0
|
||||
unsigned char pcolr1; // = $09 PM color 1
|
||||
@ -55,10 +55,10 @@ struct __os {
|
||||
unsigned char color3; // = $0F PF color 3
|
||||
unsigned char color4; // = $10 PF color 4
|
||||
unsigned char _free_1[0xEF]; // = $11-$FF User space
|
||||
|
||||
|
||||
/*Stack*/
|
||||
unsigned char stack[0x100]; // = $100-$1FF Stack
|
||||
|
||||
|
||||
/*Page 2 OS variables*/
|
||||
void (*vinter)(void); // = $200 Immediate IRQ vector
|
||||
void (*vvblki)(void); // = $202 Immediate VBI vector
|
||||
@ -74,7 +74,7 @@ struct __os {
|
||||
void (*vtimr1)(void); // = $216 POKEY timer 1 IRQ vector
|
||||
void (*vtimr2)(void); // = $218 POKEY timer 2 IRQ vector
|
||||
void (*vtimr4)(void); // = $21A POKEY timer 4 IRQ vector
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -66,7 +66,7 @@ struct __dcb {
|
||||
unsigned char dtimlo; /* device timeout in seconds */
|
||||
unsigned char dunuse; /* - unused - */
|
||||
unsigned int dbyt; /* # of bytes to transfer */
|
||||
union {
|
||||
union {
|
||||
struct {
|
||||
unsigned char daux1; /* 1st command auxiliary byte */
|
||||
unsigned char daux2; /* 2nd command auxiliary byte */
|
||||
@ -167,28 +167,28 @@ struct __os {
|
||||
|
||||
#ifdef OSA
|
||||
unsigned char* linzbs; // = $00/$01 LINBUG RAM (WILL BE REPLACED BY MONITOR RAM)
|
||||
#else
|
||||
#else
|
||||
unsigned char linflg; // = $00 LNBUG FLAG (0 = NOT LNBUG)
|
||||
unsigned char ngflag; // = $01 MEMORY STATUS (0 = FAILURE)
|
||||
#endif
|
||||
#endif
|
||||
unsigned char* casini; // = $02/$03 CASSETTE INIT LOCATION
|
||||
unsigned char* ramlo; // = $04/$05 RAM POINTER FOR MEMORY TEST
|
||||
|
||||
#ifdef OSA
|
||||
|
||||
#ifdef OSA
|
||||
unsigned char tramsz; // = $06 FLAG FOR LEFT CARTRIDGE
|
||||
unsigned char tstdat; // = $07 FLAG FOR RIGHT CARTRIDGE
|
||||
#else
|
||||
#else
|
||||
unsigned char trnsmz; // = $06 TEMPORARY REGISTER FOR RAM SIZE
|
||||
unsigned char tstdat; // = $07 UNUSED (NOT TOUCHED DURING RESET/COLD START)
|
||||
#endif
|
||||
|
||||
// Cleared upon Coldstart only
|
||||
|
||||
|
||||
// Cleared upon Coldstart only
|
||||
|
||||
unsigned char warmst; // = $08 WARM START FLAG
|
||||
unsigned char bootq; // = $09 SUCCESSFUL BOOT FLAG
|
||||
unsigned char bootq; // = $09 SUCCESSFUL BOOT FLAG
|
||||
void (*dosvec)(void); // = $0A/$0B DISK SOFTWARE START VECTOR
|
||||
void (*dosini)(void); // = $0C/$0D DISK SOFTWARE INIT ADDRESS
|
||||
unsigned char* appmhi; // = $0E/$0F APPLICATIONS MEMORY HI LIMIT
|
||||
unsigned char* appmhi; // = $0E/$0F APPLICATIONS MEMORY HI LIMIT
|
||||
|
||||
// Cleared upon Coldstart or Warmstart
|
||||
|
||||
@ -199,26 +199,26 @@ struct __os {
|
||||
unsigned char iccomt; // = $17 COMMAND FOR VECTOR
|
||||
unsigned char* dskfms; // = $18/$19 DISK FILE MANAGER POINTER
|
||||
unsigned char* dskutl; // = $1A/$1B DISK UTILITIES POINTER
|
||||
#ifdef OSA
|
||||
#ifdef OSA
|
||||
unsigned char ptimot; // = $1C PRINTER TIME OUT REGISTER
|
||||
unsigned char pbpnt; // = $1D PRINT BUFFER POINTER
|
||||
unsigned char pbufsz; // = $1E PRINT BUFFER SIZE
|
||||
unsigned char ptemp; // = $1F TEMPORARY REGISTER
|
||||
#else
|
||||
#else
|
||||
unsigned char abufpt[4]; // = $1C-$1F ACMI BUFFER POINTER AREA
|
||||
#endif
|
||||
#endif
|
||||
iocb_t ziocb; // = $20-$2F ZERO PAGE I/O CONTROL BLOCK
|
||||
|
||||
|
||||
unsigned char status; // = $30 INTERNAL STATUS STORAGE
|
||||
unsigned char chksum; // = $31 CHECKSUM (SINGLE BYTE SUM WITH CARRY)
|
||||
unsigned char* bufr; // = $32/$33 POINTER TO DATA BUFFER
|
||||
unsigned char* bfen; // = $34/$35 NEXT BYTE PAST END OF THE DATA BUFFER LO
|
||||
#ifdef OSA
|
||||
#ifdef OSA
|
||||
unsigned char cretry; // = $36 NUMBER OF COMMAND FRAME RETRIES
|
||||
unsigned char dretry; // = $37 NUMBER OF DEVICE RETRIES
|
||||
#else
|
||||
#else
|
||||
unsigned int ltemp; // = $36/$37 LOADER TEMPORARY
|
||||
#endif
|
||||
#endif
|
||||
unsigned char bufrfl; // = $38 DATA BUFFER FULL FLAG
|
||||
unsigned char recvdn; // = $39 RECEIVE DONE FLAG
|
||||
unsigned char xmtdon; // = $3A TRANSMISSION DONE FLAG
|
||||
@ -227,22 +227,22 @@ struct __os {
|
||||
unsigned char bptr; // = $3D CASSETTE BUFFER POINTER
|
||||
unsigned char ftype; // = $3E CASSETTE IRG TYPE
|
||||
unsigned char feof; // = $3F CASSETTE EOF FLAG (0 // = QUIET)
|
||||
|
||||
|
||||
unsigned char freq; // = $40 CASSETTE BEEP COUNTER
|
||||
unsigned char soundr; // = $41 NOISY I/0 FLAG. (ZERO IS QUIET)
|
||||
unsigned char critic; // = $42 DEFINES CRITICAL SECTION (CRITICAL IF NON-Z)
|
||||
dos2x_t fmszpg; // = $43-$49 DISK FILE MANAGER SYSTEM ZERO PAGE
|
||||
#ifdef OSA
|
||||
#ifdef OSA
|
||||
unsigned char ckey; // = $4A FLAG SET WHEN GAME START PRESSED
|
||||
unsigned char cassbt; // = $4B CASSETTE BOOT FLAG
|
||||
#else
|
||||
#else
|
||||
void* zchain; // = $4A/$4B HANDLER LINKAGE CHAIN POINTER
|
||||
#endif
|
||||
#endif
|
||||
unsigned char dstat; // = $4C DISPLAY STATUS
|
||||
unsigned char atract; // = $4D ATRACT FLAG
|
||||
unsigned char drkmsk; // = $4E DARK ATRACT MASK
|
||||
unsigned char colrsh; // = $4F ATRACT COLOR SHIFTER (EOR'ED WITH PLAYFIELD
|
||||
|
||||
|
||||
unsigned char tmpchr; // = $50 TEMPORARY CHARACTER
|
||||
unsigned char hold1; // = $51 TEMPORARY
|
||||
unsigned char lmargn; // = $52 LEFT MARGIN (NORMALLY 2, CC65 C STARTUP CODE SETS IT TO 0)
|
||||
@ -255,68 +255,68 @@ struct __os {
|
||||
unsigned int oldcol; // = $5B/$5C PRIOR COLUMN
|
||||
unsigned char oldchr; // = $5D DATA UNDER CURSOR
|
||||
unsigned char* oldadr; // = $5E/$5F SAVED CURSOR MEMORY ADDRESS
|
||||
|
||||
#ifdef OSA
|
||||
|
||||
#ifdef OSA
|
||||
unsigned char newrow; // = $60 POINT DRAW GOES TO
|
||||
unsigned int newcol; // = $61/$62 COLUMN DRAW GOES TO
|
||||
#else
|
||||
#else
|
||||
unsigned char* fkdef; // = $60/$61 FUNCTION KEY DEFINITION TABLE
|
||||
unsigned char palnts; // = $62 PAL/NTSC INDICATOR (0 // = NTSC)
|
||||
#endif
|
||||
#endif
|
||||
unsigned char logcol; // = $63 POINTS AT COLUMN IN LOGICAL LINE
|
||||
unsigned char* adress; // = $64/$65 TEMPORARY ADDRESS
|
||||
unsigned int mlttmp; // = $66/$67 TEMPORARY / FIRST BYTE IS USED IN OPEN AS TEMP
|
||||
unsigned int savadr; // = $68/$69 SAVED ADDRESS
|
||||
unsigned int mlttmp; // = $66/$67 TEMPORARY / FIRST BYTE IS USED IN OPEN AS TEMP
|
||||
unsigned int savadr; // = $68/$69 SAVED ADDRESS
|
||||
unsigned char ramtop; // = $6A RAM SIZE DEFINED BY POWER ON LOGIC
|
||||
unsigned char bufcnt; // = $6B BUFFER COUNT
|
||||
unsigned char* bufstr; // = $6C/$6D EDITOR GETCH POINTER
|
||||
unsigned char bitmsk; // = $6E BIT MASK
|
||||
unsigned char shfamt; // = $6F SHIFT AMOUNT FOR PIXEL JUSTIFUCATION
|
||||
|
||||
|
||||
unsigned int rowac; // = $70/$71 DRAW WORKING ROW
|
||||
unsigned int colac; // = $72/$73 DRAW WORKING COLUMN
|
||||
unsigned char* endpt; // = $74/$75 END POINT
|
||||
unsigned char deltar; // = $76 ROW DIFFERENCE
|
||||
unsigned int deltac; // = $77/$78 COLUMN DIFFERENCE
|
||||
#ifdef OSA
|
||||
unsigned char rowinc; // = $79 ROWINC
|
||||
#ifdef OSA
|
||||
unsigned char rowinc; // = $79 ROWINC
|
||||
unsigned char colinc; // = $7A COLINC
|
||||
#else
|
||||
#else
|
||||
unsigned char* keydef; // = $79/$7A 2-BYTE KEY DEFINITION TABLE ADDRESS
|
||||
#endif
|
||||
#endif
|
||||
unsigned char swpflg; // = $7B NON-0 1F TXT AND REGULAR RAM IS SWAPPED
|
||||
unsigned char holdch; // = $7C CH IS MOVED HERE IN KGETCH BEFORE CNTL & SH
|
||||
unsigned char insdat; // = $7D 1-BYTE TEMPORARY
|
||||
unsigned int countr; // = $7E/$7F 2-BYTE DRAW ITERATION COUNT
|
||||
|
||||
|
||||
unsigned char _free_1[0xD4-0x7F-1]; // USER SPACE
|
||||
|
||||
|
||||
// Floating Point Package Page Zero Address Equates
|
||||
fpreg_t fpreg[4]; // = $D4-$EB 4 REGSITERS, ACCCESS LIKE "fpreg[FPIDX_R0].fr"
|
||||
unsigned char frx; // = $EC 1-BYTE TEMPORARY
|
||||
fpreg_t fpreg[4]; // = $D4-$EB 4 REGSITERS, ACCCESS LIKE "fpreg[FPIDX_R0].fr"
|
||||
unsigned char frx; // = $EC 1-BYTE TEMPORARY
|
||||
unsigned char eexp; // = $ED VALUE OF EXP
|
||||
#ifdef OS_REV2
|
||||
#ifdef OS_REV2
|
||||
unsigned char frsign; // = $EE ##REV2## 1-BYTE FLOATING POINT SIGN
|
||||
unsigned char plycnt; // = $EF ##REV2## 1-BYTE POLYNOMIAL DEGREE
|
||||
unsigned char sgnflg; // = $F0 ##REV2## 1-BYTE SIGN FLAG
|
||||
unsigned char xfmflg; // = $F1 ##REV2## 1-BYTE TRANSFORM FLAG
|
||||
#else
|
||||
#else
|
||||
unsigned char nsign; // = $EE SIGN OF #
|
||||
unsigned char esign; // = $EF SIGN OF EXPONENT
|
||||
unsigned char fchrflg; // = $F0 1ST CHAR FLAG
|
||||
unsigned char digrt; // = $F1 # OF DIGITS RIGHT OF DECIMAL
|
||||
#endif
|
||||
#endif
|
||||
unsigned char cix; // = $F2 CURRENT INPUT INDEX
|
||||
unsigned char* inbuff; // = $F3/$F4 POINTS TO USER'S LINE INPUT BUFFER
|
||||
unsigned char* inbuff; // = $F3/$F4 POINTS TO USER'S LINE INPUT BUFFER
|
||||
unsigned int ztemp1; // = $F5/$F6 2-BYTE TEMPORARY
|
||||
unsigned int ztemp4; // = $F7/$F8 2-BYTE TEMPORARY
|
||||
unsigned int ztemp3; // = $F9/$FA 2-BYTE TEMPORARY
|
||||
|
||||
union {
|
||||
|
||||
union {
|
||||
unsigned char degflg; // = $FB ##OLD## SAME AS RADFLG
|
||||
unsigned char radflg; // = $FB ##OLD## 0=RADIANS, 6=DEGREES
|
||||
};
|
||||
|
||||
|
||||
fpreg_t* flptr; // = $FC/$FD 2-BYTE FLOATING POINT NUMBER POINTER
|
||||
fpreg_t* fptr2; // = $FE/$FF 2-BYTE FLOATING POINT NUMBER POINTER
|
||||
|
||||
@ -356,28 +356,28 @@ struct __os {
|
||||
union {
|
||||
struct {
|
||||
unsigned char sdlstl; // = $0230 SAVE DISPLAY LIST LOW BYTE
|
||||
unsigned char sdlsth; // = $0231 SAVE DISPLAY LIST HI BYTE
|
||||
unsigned char sdlsth; // = $0231 SAVE DISPLAY LIST HI BYTE
|
||||
};
|
||||
void* sdlst; // = $0230/$0231 (same as above as pointer)
|
||||
};
|
||||
unsigned char sskctl; // = $0232 SKCTL REGISTER RAM
|
||||
#ifdef OSA
|
||||
#ifdef OSA
|
||||
unsigned char _spare_1; // = $0233 No OS use.
|
||||
#else
|
||||
unsigned char lcount; // = $0233 ##1200xl## 1-byte relocating loader record
|
||||
#endif
|
||||
#endif
|
||||
unsigned char lpenh; // = $0234 LIGHT PEN HORIZONTAL VALUE
|
||||
unsigned char lpenv; // = $0235 LIGHT PEN VERTICAL VALUE
|
||||
void (*brkky)(void); // = $0236/$0237 BREAK KEY VECTOR
|
||||
#ifdef OSA
|
||||
#ifdef OSA
|
||||
unsigned char spare2[2]; // = $0238/$0239 No OS use.
|
||||
#else
|
||||
#else
|
||||
void (*vpirq)(void); // = $0238/$0239 ##rev2## 2-byte parallel device IRQ vector
|
||||
#endif
|
||||
#endif
|
||||
unsigned char cdevic; // = $023A COMMAND FRAME BUFFER - DEVICE
|
||||
unsigned char ccomnd; // = $023B COMMAND
|
||||
union {
|
||||
struct {
|
||||
struct {
|
||||
unsigned char caux1; // = $023C COMMAND AUX BYTE 1
|
||||
unsigned char caux2; // = $023D COMMAND AUX BYTE 2
|
||||
};
|
||||
@ -389,15 +389,15 @@ struct __os {
|
||||
unsigned char dbsect; // = $0241 NUMBER OF DISK BOOT SECTORS
|
||||
unsigned char* bootad; // = $0242/$0243 ADDRESS WHERE DISK BOOT LOADER WILL BE PUT
|
||||
unsigned char coldst; // = $0244 COLDSTART FLAG (1=IN MIDDLE OF COLDSTART>
|
||||
#ifdef OSA
|
||||
#ifdef OSA
|
||||
unsigned char spare3; // = $0245 No OS use.
|
||||
#else
|
||||
#else
|
||||
unsigned char reclen; // = $0245 ##1200xl## 1-byte relocating loader record length
|
||||
#endif
|
||||
#endif
|
||||
unsigned char dsktim; // = $0246 DISK TIME OUT REGISTER
|
||||
#ifdef OSA
|
||||
#ifdef OSA
|
||||
unsigned char linbuf[40]; // = $0247-$026E ##old## CHAR LINE BUFFER
|
||||
#else
|
||||
#else
|
||||
unsigned char pdvmsk; // = $0247 ##rev2## 1-byte parallel device selection mask
|
||||
unsigned char shpdvs; // = $0248 ##rev2## 1-byte PDVS (parallel device select)
|
||||
unsigned char pdimsk; // = $0249 ##rev2## 1-byte parallel device IRQ selection
|
||||
@ -409,7 +409,7 @@ struct __os {
|
||||
unsigned char vsflag; // = $026C ##1200xl## 1-byte fine vertical scroll count
|
||||
unsigned char keydis; // = $026D ##1200xl## 1-byte keyboard disable
|
||||
unsigned char fine; // = $026E ##1200xl## 1-byte fine scrolling mode
|
||||
#endif
|
||||
#endif
|
||||
unsigned char gprior; // = $026F GLOBAL PRIORITY CELL
|
||||
unsigned char paddl0; // = $0270 1-BYTE POTENTIOMETER 0
|
||||
unsigned char paddl1; // = $0271 1-BYTE POTENTIOMETER 1
|
||||
@ -435,30 +435,30 @@ struct __os {
|
||||
unsigned char strig1; // = $0285 1-BYTE JOYSTICK TRIGGER 1
|
||||
unsigned char strig2; // = $0286 1-BYTE JOYSTICK TRIGGER 2
|
||||
unsigned char strig3; // = $0287 1-BYTE JOYSTICK TRIGGER 3
|
||||
#ifdef OSA
|
||||
#ifdef OSA
|
||||
unsigned char cstat; // = $0288 ##old## cassette status register
|
||||
#else
|
||||
#else
|
||||
unsigned char hibyte; // = $0288 ##1200xl## 1-byte relocating loader high byte
|
||||
#endif
|
||||
#endif
|
||||
unsigned char wmode; // = $0289 1-byte cassette WRITE mode
|
||||
unsigned char blim; // = $028A 1-byte cassette buffer limit
|
||||
#ifdef OSA
|
||||
unsigned char _reserved_2[5]; // = $028B-$028F RESERVED
|
||||
#else
|
||||
#else
|
||||
unsigned char imask; // = $028B ##rev2## (not used)
|
||||
void (*jveck)(void); // = $028C/$028D 2-byte jump vector
|
||||
unsigned newadr; // = $028E/028F ##1200xl## 2-byte relocating address
|
||||
#endif
|
||||
#endif
|
||||
unsigned char txtrow; // = $0290 TEXT ROWCRS
|
||||
unsigned txtcol; // = $0291/$0292 TEXT COLCRS
|
||||
unsigned char tindex; // = $0293 TEXT INDEX
|
||||
unsigned char* txtmsc; // = $0294/$0295 FOOLS CONVRT INTO NEW MSC
|
||||
unsigned char txtold[6]; // = $0296-$029B OLDROW & OLDCOL FOR TEXT (AND THEN SOME)
|
||||
#ifdef OSA
|
||||
#ifdef OSA
|
||||
unsigned char tmpx1; // = $029C ##old## 1--byte temporary register
|
||||
#else
|
||||
#else
|
||||
unsigned char cretry; // = $029C ##1200xl## 1-byte number of command frame retries
|
||||
#endif
|
||||
#endif
|
||||
unsigned char hold3; // = $029D 1-byte temporary
|
||||
unsigned char subtmp; // = $029E 1-byte temporary
|
||||
unsigned char hold2; // = $029F 1-byte (not used)
|
||||
@ -473,41 +473,41 @@ struct __os {
|
||||
unsigned tmpcol; // = $02B9/$02BA 2-byte temporary column
|
||||
unsigned char scrflg; // = $02BB SET IF SCROLL OCCURS
|
||||
unsigned char hold4; // = $02BC TEMP CELL USED IN DRAW ONLY
|
||||
#ifdef OSA
|
||||
#ifdef OSA
|
||||
unsigned char hold5; // = $02BD ##old## DITTO
|
||||
#else
|
||||
#else
|
||||
unsigned char dretry; // = $02BD ##1200xl## 1-byte number of device retries
|
||||
#endif
|
||||
#endif
|
||||
unsigned char shflok; // = $02BE 1-byte shift/control lock flags
|
||||
unsigned char botscr; // = $02BF BOTTOM OF SCREEN 24 NORM 4 SPLIT
|
||||
unsigned char pcolr0; // = $02C0 1-byte player-missile 0 color/luminance
|
||||
unsigned char pcolr1; // = $02C1 1-byte player-missile 1 color/luminance
|
||||
unsigned char pcolr2; // = $02C2 1-byte player-missile 2 color/luminance
|
||||
unsigned char pcolr3; // = $02C3 1-byte player-missile 3 color/luminance
|
||||
unsigned char pcolr3; // = $02C3 1-byte player-missile 3 color/luminance
|
||||
unsigned char color0; // = $02C4 1-byte playfield 0 color/luminance
|
||||
unsigned char color1; // = $02C5 1-byte playfield 1 color/luminance
|
||||
unsigned char color2; // = $02C6 1-byte playfield 2 color/luminance
|
||||
unsigned char color3; // = $02C7 1-byte playfield 3 color/luminance
|
||||
unsigned char color4; // = $02C8 1-byte background color/luminance
|
||||
#ifdef OSA
|
||||
#ifdef OSA
|
||||
unsigned char _spare_2[23]; // = $02C9-$02DF No OS use.
|
||||
#else
|
||||
union {
|
||||
unsigned char parmbl[6]; // = $02C9 ##rev2## 6-byte relocating loader parameter
|
||||
struct {
|
||||
struct {
|
||||
void (*runadr)(void); // = $02C9 ##1200xl## 2-byte run address
|
||||
unsigned int hiused; // = $02CB ##1200xl## 2-byte highest non-zero page address
|
||||
unsigned int zhiuse; // = $02CD ##1200xl## 2-byte highest zero page address
|
||||
};
|
||||
};
|
||||
union {
|
||||
};
|
||||
};
|
||||
union {
|
||||
unsigned char oldpar[6]; // = $02CF ##rev2## 6-byte relocating loader parameter
|
||||
struct {
|
||||
struct {
|
||||
void (*gbytea)(void); // = $02CF ##1200xl## 2-byte GET-BYTE routine address
|
||||
unsigned int loadad; // = $02D1 ##1200xl## 2-byte non-zero page load address
|
||||
unsigned int zloada; // = $02D3 ##1200xl## 2-byte zero page load address
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
unsigned int dsctln; // = $02D5 ##1200xl## 2-byte disk sector length
|
||||
unsigned int acmisr; // = $02D7 ##1200xl## 2-byte ACMI interrupt service routine
|
||||
unsigned char krpdel; // = $02D9 ##1200xl## 1-byte auto-repeat delay
|
||||
@ -517,78 +517,78 @@ struct __os {
|
||||
unsigned char dmasav; // = $02DD ##1200xl## 1-byte SDMCTL save/restore
|
||||
unsigned char pbpnt; // = $02DE ##1200xl## 1-byte printer buffer pointer
|
||||
unsigned char pbufsz; // = $02DF ##1200xl## 1-byte printer buffer size
|
||||
#endif
|
||||
union {
|
||||
#endif
|
||||
union {
|
||||
unsigned char glbabs[4]; // = $02E0-$02E3 byte global variables for non-DOS users
|
||||
struct {
|
||||
struct {
|
||||
void (*runad)(void); // = $02E0 ##map## 2-byte binary file run address
|
||||
void (*initad)(void); // = $02E2 ##map## 2-byte binary file initialization address
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
unsigned char ramsiz; // = $02E4 RAM SIZE (HI BYTE ONLY)
|
||||
void* memtop; // = $02E5 TOP OF AVAILABLE USER MEMORY
|
||||
void* memlo; // = $02E7 BOTTOM OF AVAILABLE USER MEMORY
|
||||
#ifdef OSA
|
||||
#ifdef OSA
|
||||
unsigned char _spare_3; // = $02E9 No OS use.
|
||||
#else
|
||||
#else
|
||||
unsigned char hndlod; // = $02E9 ##1200xl## 1-byte user load flag
|
||||
#endif
|
||||
#endif
|
||||
unsigned char dvstat[4]; // = $02EA-$02ED STATUS BUFFER
|
||||
union {
|
||||
union {
|
||||
unsigned int cbaud; // = $02EE/$02EF 2-byte cassette baud rate
|
||||
struct {
|
||||
struct {
|
||||
unsigned char cbaudl; // = $02EE 1-byte low cassette baud rate
|
||||
unsigned char cbaudh; // = $02EF 1-byte high cassette baud rate
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
unsigned char crsinh; // = $02F0 CURSOR INHIBIT (00 = CURSOR ON)
|
||||
unsigned char keydel; // = $02F1 KEY DELAY
|
||||
unsigned char ch1; // = $02F2 1-byte prior keyboard character
|
||||
unsigned char chact; // = $02F3 CHACTL REGISTER RAM
|
||||
unsigned char chbas; // = $02F4 CHBAS REGISTER RAM
|
||||
#ifdef OSA
|
||||
#ifdef OSA
|
||||
unsigned char _spare_4[5]; // = $02F5-$02F9 No OS use.
|
||||
#else
|
||||
#else
|
||||
unsigned char newrow; // = $02F5 ##1200xl## 1-byte draw destination row
|
||||
unsigned int newcol; // = $02F6/$02F7 ##1200xl## 2-byte draw destination column
|
||||
unsigned char rowinc; // = $02F8 ##1200xl## 1-byte draw row increment
|
||||
unsigned char colinc; // = $02F9 ##1200xl## 1-byte draw column increment
|
||||
#endif
|
||||
#endif
|
||||
unsigned char char_; // = $02FA 1-byte internal character (naming changed due to do keyword conflict)
|
||||
unsigned char atachr; // = $02FB ATASCII CHARACTER
|
||||
unsigned char ch; // = $02FC GLOBAL VARIABLE FOR KEYBOARD
|
||||
unsigned char fildat; // = $02FD RIGHT FILL DATA <DRAW>
|
||||
unsigned char dspflg; // = $02FE DISPLAY FLAG DISPLAY CNTLS IF NON-ZERO
|
||||
unsigned char ssflag; // = $02FF START/STOP FLAG FOR PAGING (CNTL 1). CLEARE
|
||||
|
||||
|
||||
// --- Page 3 ---
|
||||
|
||||
dcb_t dcb; // = $0300-$030B DEVICE CONTROL BLOCK
|
||||
unsigned int timer1; // = $030C/$030D INITIAL TIMER VALUE
|
||||
#ifdef OSA
|
||||
#ifdef OSA
|
||||
unsigned char addcor; // = $030E ##old## ADDITION CORRECTION
|
||||
#else
|
||||
#else
|
||||
unsigned char jmpers; // = $030E ##1200xl## 1-byte jumper options
|
||||
#endif
|
||||
#endif
|
||||
unsigned char casflg; // = $030F CASSETTE MODE WHEN SET
|
||||
unsigned int timer2; // = $0310/$0311 2-byte final baud rate timer value
|
||||
unsigned char temp1; // = $0312 TEMPORARY STORAGE REGISTER
|
||||
#ifdef OSA
|
||||
#ifdef OSA
|
||||
unsigned char _spare_5; // = $0313 unused
|
||||
unsigned char temp2; // = $0314 ##old## TEMPORARY STORAGE REGISTER
|
||||
#else
|
||||
#else
|
||||
unsigned char temp2; // = $0313 ##1200xl## 1-byte temporary
|
||||
unsigned char ptimot; // = $0314 ##1200xl## 1-byte printer timeout
|
||||
#endif
|
||||
#endif
|
||||
unsigned char temp3; // = $0315 TEMPORARY STORAGE REGISTER
|
||||
unsigned char savio; // = $0316 SAVE SERIAL IN DATA PORT
|
||||
unsigned char timflg; // = $0317 TIME OUT FLAG FOR BAUD RATE CORRECTION
|
||||
unsigned char stackp; // = $0318 SIO STACK POINTER SAVE CELL
|
||||
unsigned char tstat; // = $0319 TEMPORARY STATUS HOLDER
|
||||
#ifdef OSA
|
||||
#ifdef OSA
|
||||
hatabs_t hatabs[12]; // = $031A-$033D handler address table
|
||||
unsigned int zeropad; // = $033E/$033F zero padding
|
||||
#else
|
||||
#else
|
||||
hatabs_t hatabs[11]; // = $031A-$033A handler address table
|
||||
unsigned int zeropad; // = $033B/$033C zero padding
|
||||
unsigned char pupbt1; // = $033D ##1200xl## 1-byte power-up validation byte 1
|
||||
@ -598,9 +598,9 @@ struct __os {
|
||||
|
||||
iocb_t iocb[8]; // = $0340-$03BF 8 I/O Control Blocks
|
||||
unsigned char prnbuf[40]; // = $03C0-$3E7 PRINTER BUFFER
|
||||
#ifdef OSA
|
||||
#ifdef OSA
|
||||
unsigned char _spare_6[151]; // = $03E8-$047F unused
|
||||
#else
|
||||
#else
|
||||
unsigned char superf; // = $03E8 ##1200xl## 1-byte editor super function flag
|
||||
unsigned char ckey; // = $03E9 ##1200xl## 1-byte cassette boot request flag
|
||||
unsigned char cassbt; // = $03EA ##1200xl## 1-byte cassette boot flag
|
||||
@ -639,7 +639,7 @@ struct __basic {
|
||||
void* starp; // = $8C/$8D ADDRESS FOR THE STRING AND ARRAY TABLE
|
||||
void* runstk; // = $8E/$8F ADDRESS OF THE RUNTIME STACK
|
||||
void* memtop; // = $90/$91 POINTER TO THE TOP OF BASIC MEMORY
|
||||
|
||||
|
||||
unsigned char _internal_1[0xBA-0x91-1]; // INTERNAL DATA
|
||||
|
||||
unsigned int stopln; // = $BA/$BB LINE WHERE A PROGRAM WAS STOPPED
|
||||
|
@ -131,7 +131,7 @@ struct __pokey_write {
|
||||
#define SKCTL_KEYBOARD_SCANNING 0x02 /* Enable keyboard scanning circuit */
|
||||
|
||||
/* Fast pot scan
|
||||
** The pot scan counter completes its sequence in two TV line times instead of
|
||||
** The pot scan counter completes its sequence in two TV line times instead of
|
||||
** one frame time (228 scan lines). Not as accurate as the normal pot scan
|
||||
*/
|
||||
#define SKCTL_FAST_POT_SCAN 0x04
|
||||
@ -204,7 +204,7 @@ struct __pokey_read {
|
||||
#define SKSTAT_DATA_READ_INGORING_SHIFTREG 0x10 /* Data can be read directly from the serial input port, ignoring the shift register. */
|
||||
#define SKSTAT_KEYBOARD_OVERRUN 0x20 /* Keyboard over-run; Reset BITs 7, 6 and 5 (latches) to 1, using SKREST */
|
||||
#define SKSTAT_INPUT_OVERRUN 0x40 /* Serial data input over-run. Reset latches as above. */
|
||||
#define SKSTAT_INPUT_FRAMEERROR 0x80 /* Serial data input frame error caused by missing or extra bits. Reset latches as above. */
|
||||
#define SKSTAT_INPUT_FRAMEERROR 0x80 /* Serial data input frame error caused by missing or extra bits. Reset latches as above. */
|
||||
|
||||
|
||||
/* KBCODE, internal keyboard codes for Atari 8-bit computers,
|
||||
|
@ -180,7 +180,7 @@ unsigned char detect_c128 (void);
|
||||
unsigned char __fastcall__ set_chameleon_speed (unsigned char speed);
|
||||
|
||||
/* Set the speed of the C64 Chameleon cartridge, the following inputs
|
||||
* are accepted:
|
||||
* are accepted:
|
||||
* SPEED_SLOW : 1 Mhz mode
|
||||
* SPEED_1X : 1 Mhz mode
|
||||
* SPEED_2X : 2 Mhz mode
|
||||
|
@ -159,11 +159,11 @@ extern struct {
|
||||
unsigned day :5;
|
||||
unsigned mon :4;
|
||||
unsigned year :7;
|
||||
} createdate; /* Current date: 0 */
|
||||
} createdate; /* Current date: 0 */
|
||||
struct {
|
||||
unsigned char min;
|
||||
unsigned char hour;
|
||||
} createtime; /* Current time: 0 */
|
||||
} createtime; /* Current time: 0 */
|
||||
} _datetime;
|
||||
|
||||
/* The addresses of the static drivers */
|
||||
|
@ -39,7 +39,7 @@
|
||||
** are declared here.
|
||||
**
|
||||
** To use the debugger, just call DbgInit in your application. Once it has
|
||||
** been called, the debugger will catch any BRK opcode. Use the BREAK macro
|
||||
** been called, the debugger will catch any BRK opcode. Use the BREAK macro
|
||||
** defined below to insert breakpoints into your code.
|
||||
**
|
||||
** There are currently a lot of things that cannot be debugged, graphical
|
||||
@ -121,4 +121,4 @@ void __fastcall__ DbgInit (unsigned unused);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -84,7 +84,7 @@ extern int _errno;
|
||||
|
||||
|
||||
int __fastcall__ _osmaperrno (unsigned char oserror);
|
||||
/* Map an operating system specific error code (for example from _oserror)
|
||||
/* Map an operating system specific error code (for example from _oserror)
|
||||
** into one of the E... codes above. It is user callable.
|
||||
*/
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
void __fastcall__ CopyString(char *dest, const char *source);
|
||||
char __fastcall__ CmpString(const char *dest, const char *source);
|
||||
void __fastcall__ CopyFString(char len, char *dest, const char *source);
|
||||
char __fastcall__ CmpFString(char len, char *dest, const char *source);
|
||||
char __fastcall__ CmpFString(char len, char *dest, const char *source);
|
||||
|
||||
unsigned __fastcall__ CRC(const char *buffer, unsigned len);
|
||||
void* __fastcall__ ClearRam(char *dest, unsigned len);
|
||||
|
@ -52,8 +52,8 @@ typedef unsigned size_t;
|
||||
|
||||
/* Those non-standard cc65 exit constants definitions are in addition
|
||||
** to the EXIT_SUCCESS and EXIT_FAILURE constants, which should not be
|
||||
** redefined
|
||||
*/
|
||||
** redefined
|
||||
*/
|
||||
#define EXIT_ASSERT 2
|
||||
#define EXIT_ABORT 3
|
||||
|
||||
|
@ -41,7 +41,7 @@
|
||||
/*****************************************************************************/
|
||||
/* Data */
|
||||
/*****************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
|
@ -13,4 +13,4 @@ _textcolor := return1
|
||||
|
||||
_bgcolor := return0
|
||||
|
||||
_bordercolor := return0
|
||||
_bordercolor := return0
|
||||
|
@ -18,7 +18,7 @@ typerr: lda #$4A ; "Incompatible file format"
|
||||
|
||||
; Cleanup name
|
||||
oserr: jsr popname ; Preserves A
|
||||
|
||||
|
||||
; Set __oserror
|
||||
jmp __mappederrno
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
; Oliver Schmidt, 10.9.2009
|
||||
;
|
||||
; Default ProDOS 8 I/O buffer management
|
||||
;
|
||||
;
|
||||
|
||||
.export iobuf_alloc, iobuf_free
|
||||
.import _posix_memalign, _free
|
||||
|
@ -8,13 +8,13 @@
|
||||
;
|
||||
|
||||
.export _mouse_def_callbacks
|
||||
|
||||
|
||||
.include "apple2.inc"
|
||||
|
||||
; ------------------------------------------------------------------------
|
||||
|
||||
.bss
|
||||
|
||||
|
||||
backup: .res 1
|
||||
visible:.res 1
|
||||
|
||||
|
@ -152,7 +152,7 @@ next: inc ptr1+1
|
||||
sta xparam+1
|
||||
sta jump+2
|
||||
|
||||
; Disable interrupts now because setting the slot number makes
|
||||
; Disable interrupts now because setting the slot number makes
|
||||
; the IRQ handler (maybe called due to some non-mouse IRQ) try
|
||||
; calling the firmware which isn't correctly set up yet
|
||||
sei
|
||||
@ -167,7 +167,7 @@ next: inc ptr1+1
|
||||
asl
|
||||
asl
|
||||
sta yparam+1
|
||||
|
||||
|
||||
; The AppleMouse II Card needs the ROM switched in
|
||||
; to be able to detect an Apple //e and use RDVBL
|
||||
bit $C082
|
||||
@ -175,7 +175,7 @@ next: inc ptr1+1
|
||||
; Reset mouse hardware
|
||||
ldx #INITMOUSE
|
||||
jsr firmware
|
||||
|
||||
|
||||
; Switch in LC bank 2 for R/O
|
||||
bit $C080
|
||||
|
||||
@ -236,12 +236,12 @@ UNINSTALL:
|
||||
SETBOX:
|
||||
sta ptr1
|
||||
stx ptr1+1
|
||||
|
||||
|
||||
; Set x clamps
|
||||
ldx #$00
|
||||
ldy #MOUSE_BOX::MINX
|
||||
jsr :+
|
||||
|
||||
|
||||
; Set y clamps
|
||||
ldx #$01
|
||||
ldy #MOUSE_BOX::MINY
|
||||
@ -257,7 +257,7 @@ SETBOX:
|
||||
sta pos1_lo
|
||||
iny
|
||||
lda (ptr1),y
|
||||
sta box,y
|
||||
sta box,y
|
||||
sta pos1_hi
|
||||
|
||||
; Skip one word
|
||||
@ -267,11 +267,11 @@ SETBOX:
|
||||
; Set high clamp
|
||||
iny
|
||||
lda (ptr1),y
|
||||
sta box,y
|
||||
sta box,y
|
||||
sta pos2_lo
|
||||
iny
|
||||
lda (ptr1),y
|
||||
sta box,y
|
||||
sta box,y
|
||||
sta pos2_hi
|
||||
|
||||
txa
|
||||
|
@ -57,7 +57,7 @@ extern char _cwd[FILENAME_MAX];
|
||||
|
||||
|
||||
|
||||
DIR* __fastcall__ opendir (register const char* name)
|
||||
DIR* __fastcall__ opendir (register const char* name)
|
||||
{
|
||||
register DIR* dir;
|
||||
|
||||
|
@ -111,4 +111,4 @@ errno: jmp __directerrno
|
||||
|
||||
; Set __oserror
|
||||
oserr: jmp __mappederrno
|
||||
|
||||
|
||||
|
@ -63,7 +63,7 @@ L1: lda #<brk_handler ; Set the break vector to our routine
|
||||
lda #$00
|
||||
sta oldvec ; Clear the old vector
|
||||
stx oldvec+1
|
||||
@L9: rts
|
||||
@L9: rts
|
||||
|
||||
.endproc
|
||||
|
||||
|
@ -17,7 +17,7 @@ _cclearxy:
|
||||
_cclear:
|
||||
cmp #0 ; Is the length zero?
|
||||
beq L9 ; Jump if done
|
||||
sta tmp1
|
||||
sta tmp1
|
||||
L1: lda #0 ; Blank - screen code
|
||||
jsr cputdirect ; Direct output
|
||||
dec tmp1
|
||||
|
@ -12,7 +12,7 @@
|
||||
|
||||
.include "ctypetable.inc"
|
||||
.export __ctypeidx
|
||||
|
||||
|
||||
; The tables are readonly, put them into the rodata segment
|
||||
|
||||
.rodata
|
||||
|
@ -5,7 +5,7 @@
|
||||
; void cvline (unsigned char length);
|
||||
;
|
||||
.include "atari.inc"
|
||||
|
||||
|
||||
.export _cvlinexy, _cvline
|
||||
.import gotoxy, putchar, setcursor
|
||||
.importzp tmp1
|
||||
|
@ -137,7 +137,7 @@ _dio_open:
|
||||
iny
|
||||
lda #1
|
||||
|
||||
finish: sta (ptr2),y ; set default sector size
|
||||
finish: sta (ptr2),y ; set default sector size
|
||||
fini2: lda ptr2
|
||||
ldx ptr2+1
|
||||
rts
|
||||
|
@ -12,7 +12,7 @@
|
||||
.proc _dio_query_sectsize
|
||||
|
||||
sta ptr1 ; handle
|
||||
stx ptr1+1
|
||||
stx ptr1+1
|
||||
|
||||
lda #0
|
||||
sta __oserror
|
||||
|
@ -12,7 +12,7 @@
|
||||
|
||||
.ifdef __ATARIXL__
|
||||
_doesclrscrafterexit = return1 ; the c65 runtime always clears the screen at program termination
|
||||
.else
|
||||
.else
|
||||
_doesclrscrafterexit:
|
||||
jsr __is_cmdline_dos ; currently (unless a DOS behaving differently is popping up)
|
||||
eor #$01 ; we can get by with the inverse of __is_cmdline_dos
|
||||
|
@ -11,7 +11,7 @@
|
||||
; Bit 2: bank control
|
||||
; Bit 1: BASIC on/off
|
||||
; Bit 0: OS RAM on/off
|
||||
;
|
||||
;
|
||||
; Masks: %11100011 $E3 Bank 0
|
||||
; %11100111 $E7 Bank 1
|
||||
; %11101011 $EB Bank 2
|
||||
@ -67,7 +67,7 @@
|
||||
; Constants
|
||||
|
||||
BANK = $4000 ; bank window
|
||||
STACK = $0100 ; stack location
|
||||
STACK = $0100 ; stack location
|
||||
PAGES = 256 ; 4 x 16k banks
|
||||
|
||||
|
||||
@ -93,17 +93,17 @@ stacktest: sei
|
||||
@2: sta $4000 ; restore
|
||||
cli
|
||||
rts
|
||||
stacktest_end:
|
||||
stacktest_end:
|
||||
|
||||
stackcopy: sei ; disable interrupts
|
||||
@1: dex ; pre-decrement (full page x=0)
|
||||
ldy #$FF ; this will be replaced STACK+3
|
||||
sty $D301 ; set bank
|
||||
sty $D301 ; set bank
|
||||
lda $FF00,x ; address to copy from STACK+8,+9
|
||||
ldy #$FF ; this will be replaced STACK+11
|
||||
sty $D301
|
||||
sty $D301
|
||||
sta $FF00,x ; address to copy to STACK+16,+17
|
||||
cpx #0
|
||||
cpx #0
|
||||
bne @1
|
||||
ldy #$FF ; portb_save STACK+23
|
||||
sty $D301
|
||||
@ -122,7 +122,7 @@ stackcopy_byte: sei
|
||||
sty $D301
|
||||
cli
|
||||
rts
|
||||
stackcopy_byte_end:
|
||||
stackcopy_byte_end:
|
||||
|
||||
|
||||
.data
|
||||
@ -186,14 +186,14 @@ setpage:
|
||||
INSTALL:
|
||||
lda $D301 ; save state of portb
|
||||
sta portb_save
|
||||
tay
|
||||
tay
|
||||
|
||||
jsr install_test ; doesn't touch Y
|
||||
sty STACK+13
|
||||
|
||||
lda $4000 ; test for extended memory
|
||||
jsr STACK
|
||||
bcs @1
|
||||
bcs @1
|
||||
lda #EM_ERR_OK
|
||||
rts
|
||||
@1: lda #EM_ERR_NO_DEVICE
|
||||
@ -242,7 +242,7 @@ MAP: jsr setpage ; extract the bank/page
|
||||
lda banks,x
|
||||
sta STACK+3 ; set bank to copy from
|
||||
; lda ptr1
|
||||
; sta STACK+8
|
||||
; sta STACK+8
|
||||
lda ptr1+1
|
||||
sta STACK+9 ; set copy from address
|
||||
lda portb_save
|
||||
@ -251,10 +251,10 @@ MAP: jsr setpage ; extract the bank/page
|
||||
lda ptr2
|
||||
sta STACK+16
|
||||
lda ptr2+1
|
||||
sta STACK+17 ; set copy to address
|
||||
sta STACK+17 ; set copy to address
|
||||
|
||||
ldx #0 ; full page copy
|
||||
jsr STACK ; do the copy!
|
||||
jsr STACK ; do the copy!
|
||||
|
||||
; Return the memory window
|
||||
|
||||
@ -298,7 +298,7 @@ COMMIT: lda curpage ; Get the current page
|
||||
sta STACK+3 ; set bank to copy from
|
||||
sta STACK+23 ; set final portb restore
|
||||
lda ptr1
|
||||
sta STACK+8
|
||||
sta STACK+8
|
||||
lda ptr1+1
|
||||
sta STACK+9 ; set copy from address
|
||||
ldx curbank
|
||||
@ -307,10 +307,10 @@ COMMIT: lda curpage ; Get the current page
|
||||
;lda ptr2
|
||||
;sta STACK+16
|
||||
lda ptr2+1
|
||||
sta STACK+17 ; set copy to address
|
||||
sta STACK+17 ; set copy to address
|
||||
|
||||
ldx #0 ; full page copy
|
||||
jsr STACK ; do the copy!
|
||||
jsr STACK ; do the copy!
|
||||
|
||||
commit_done:
|
||||
rts
|
||||
@ -329,7 +329,7 @@ COPYFROM:
|
||||
|
||||
ldy #EM_COPY::OFFS
|
||||
lda (ptr3),y
|
||||
sta STACK+7 ; offset goes into BANK low
|
||||
sta STACK+7 ; offset goes into BANK low
|
||||
|
||||
ldy #EM_COPY::PAGE
|
||||
lda (ptr3),y
|
||||
@ -357,9 +357,9 @@ COPYFROM:
|
||||
add #>BANK ; add to BANK address
|
||||
sta STACK+8 ; current page in bank
|
||||
ldx curbank
|
||||
lda banks,x
|
||||
sta STACK+2 ; set bank in stack
|
||||
lda portb_save
|
||||
lda banks,x
|
||||
sta STACK+2 ; set bank in stack
|
||||
lda portb_save
|
||||
sta STACK+10 ; set bank restore in stack
|
||||
sta STACK+18 ; set final restore too
|
||||
|
||||
@ -399,7 +399,7 @@ copyfrom_copy:
|
||||
bne @3
|
||||
inc STACK+16
|
||||
|
||||
@3: jmp copyfrom_copy ; copy another byte
|
||||
@3: jmp copyfrom_copy ; copy another byte
|
||||
|
||||
done:
|
||||
rts
|
||||
@ -418,7 +418,7 @@ COPYTO:
|
||||
|
||||
ldy #EM_COPY::OFFS
|
||||
lda (ptr3),y
|
||||
sta STACK+15 ; offset goes into BANK low
|
||||
sta STACK+15 ; offset goes into BANK low
|
||||
|
||||
ldy #EM_COPY::PAGE
|
||||
lda (ptr3),y
|
||||
@ -446,9 +446,9 @@ COPYTO:
|
||||
add #>BANK ; add to BANK address
|
||||
sta STACK+16 ; current page in bank
|
||||
ldx curbank
|
||||
lda banks,x
|
||||
sta STACK+10 ; set bank in stack
|
||||
lda portb_save
|
||||
lda banks,x
|
||||
sta STACK+10 ; set bank in stack
|
||||
lda portb_save
|
||||
sta STACK+2 ; set bank restore in stack
|
||||
sta STACK+18 ; set final restore too
|
||||
|
||||
@ -488,5 +488,5 @@ copyto_copy:
|
||||
bne @3
|
||||
inc STACK+8
|
||||
|
||||
@3: jmp copyto_copy ; copy another byte
|
||||
@3: jmp copyto_copy ; copy another byte
|
||||
|
||||
|
@ -74,7 +74,7 @@ prep:
|
||||
jsr getcursor ; Get character at cursor position
|
||||
cmp #mouse_txt_char ; "mouse" character
|
||||
bne overwr ; no, probably program has overwritten it
|
||||
lda backup ;
|
||||
lda backup ;
|
||||
jmp setcursor ; Draw character
|
||||
overwr: sta backup
|
||||
rts
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
.include "atari.inc"
|
||||
|
||||
__randomize:
|
||||
__randomize:
|
||||
ldx VCOUNT ; Use vertical line counter as high byte
|
||||
lda RTCLOK+2 ; Use clock as low byte
|
||||
jmp _srand ; Initialize generator
|
||||
|
@ -4,7 +4,7 @@
|
||||
; unsigned char revers (unsigned char onoff);
|
||||
;
|
||||
.include "atari.inc"
|
||||
|
||||
|
||||
.export _revers
|
||||
.export _revflag
|
||||
|
||||
|
@ -737,9 +737,9 @@ fn_cont:jsr get_fn_len
|
||||
lda #0
|
||||
sta ICBLH,x
|
||||
jsr chk_CIO_buf
|
||||
pla
|
||||
pla
|
||||
sta ICBLH,x
|
||||
pla
|
||||
pla
|
||||
sta ICBLL,x
|
||||
pla
|
||||
tay
|
||||
@ -756,7 +756,7 @@ chk_CIO_buf:
|
||||
lda ICBAH,x
|
||||
cmp #$c0
|
||||
bcc @cont
|
||||
@ret:
|
||||
@ret:
|
||||
.ifdef DEBUG
|
||||
jsr CIO_buf_noti
|
||||
.endif
|
||||
|
@ -93,7 +93,7 @@ sdnobw: lda DOS+1 ; SD version
|
||||
ldy #31 ; offset for OSRMFLG
|
||||
lda (DOSVEC),y ; get OSRMFLG
|
||||
bne sdcrts1
|
||||
|
||||
|
||||
sdcrts0:clc
|
||||
rts
|
||||
sdcrts1:sec
|
||||
|
@ -7,7 +7,7 @@
|
||||
; It calculates the value to put into RAMTOP for a subsequent
|
||||
; "GRAPHICS 0" call, and the lowest address which will be used
|
||||
; by the screen memory afterwards.
|
||||
;
|
||||
;
|
||||
; inputs:
|
||||
; __STARTADDRESS__ - load address of the program
|
||||
; outputs:
|
||||
|
@ -74,7 +74,7 @@ conio_color: .res 1
|
||||
dlist: .repeat 3
|
||||
.byte DL_BLK8
|
||||
.endrepeat
|
||||
|
||||
|
||||
.byte DL_CHR20x8x2 | DL_LMS
|
||||
.word SCREEN_BUF
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
; void cvline (unsigned char length);
|
||||
;
|
||||
.include "atari5200.inc"
|
||||
|
||||
|
||||
.export _cvlinexy, _cvline
|
||||
.import gotoxy, putchar
|
||||
.importzp tmp1
|
||||
|
@ -74,7 +74,7 @@ conio_color: .res 1
|
||||
dlist: .repeat 3
|
||||
.byte DL_BLK8
|
||||
.endrepeat
|
||||
|
||||
|
||||
.byte DL_CHR20x16x2 | DL_LMS
|
||||
.word SCREEN_BUF
|
||||
|
||||
|
@ -44,7 +44,7 @@
|
||||
;
|
||||
|
||||
INSTALL:
|
||||
lda #$04 ; enable POT input from the joystick ports, see section "GTIA" in
|
||||
lda #$04 ; enable POT input from the joystick ports, see section "GTIA" in
|
||||
sta CONSOL ; http://www.atarimuseum.com/videogames/consoles/5200/conv_to_5200.html
|
||||
lda #JOY_ERR_OK
|
||||
ldx #0
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
.include "atari5200.inc"
|
||||
|
||||
__randomize:
|
||||
__randomize:
|
||||
ldx VCOUNT ; Use vertical line counter as high byte
|
||||
lda RTCLOK+1 ; Use clock as low byte
|
||||
jmp _srand ; Initialize generator
|
||||
|
@ -9,16 +9,16 @@ Y2K LDY #$00 ; Copy BIOS opening screen to RAM
|
||||
CPX #$E8 ; Is this a 4 port?
|
||||
BNE Y2K0 ; Jump if not
|
||||
LDA #$42 ; Yes, 4 port system
|
||||
Y2K0 STA TEMPL
|
||||
Y2K1 LDA (TEMPL),Y
|
||||
Y2K0 STA TEMPL
|
||||
Y2K1 LDA (TEMPL),Y
|
||||
STA $0600,Y
|
||||
INY
|
||||
INY
|
||||
BNE Y2K1
|
||||
LDY #$50
|
||||
INC TEMPH
|
||||
Y2K2 LDA (TEMPL),Y
|
||||
Y2K2 LDA (TEMPL),Y
|
||||
STA $0700,Y
|
||||
DEY
|
||||
DEY
|
||||
BPL Y2K2
|
||||
LDA #$D4 ; Point to copyright string
|
||||
STA $0724
|
||||
@ -26,8 +26,8 @@ Y2K2 LDA (TEMPL),Y
|
||||
STA $0725
|
||||
LDX #$0B ; Store NOP's @ end
|
||||
LDA #$EA
|
||||
Y2K3 STA $0732,X
|
||||
DEX
|
||||
Y2K3 STA $0732,X
|
||||
DEX
|
||||
BPL Y2K3
|
||||
LDA #$60 ; Store RTS opcode @ end
|
||||
STA $0750
|
||||
|
@ -9,12 +9,12 @@
|
||||
.constructor init_clock
|
||||
|
||||
.import sreg: zp
|
||||
.import _zonecounter
|
||||
.import _zonecounter
|
||||
.include "atari7800.inc"
|
||||
|
||||
.macpack generic
|
||||
|
||||
.code
|
||||
.code
|
||||
|
||||
;-----------------------------------------------------------------------------
|
||||
; Read the clock counter.
|
||||
@ -38,9 +38,9 @@
|
||||
; _zonecounter == 1 (from 1st visible scanline to last visible scanline)
|
||||
;
|
||||
update_clock:
|
||||
lda _zonecounter
|
||||
and #01
|
||||
beq @L1
|
||||
lda _zonecounter
|
||||
and #01
|
||||
beq @L1
|
||||
inc clock_count
|
||||
bne @L1
|
||||
inc clock_count+1
|
||||
@ -54,10 +54,10 @@ update_clock:
|
||||
;
|
||||
.segment "ONCE"
|
||||
init_clock:
|
||||
lda #0
|
||||
sta clock_count+2
|
||||
sta clock_count+1
|
||||
sta clock_count
|
||||
lda #0
|
||||
sta clock_count+2
|
||||
sta clock_count+1
|
||||
sta clock_count
|
||||
rts
|
||||
|
||||
;-----------------------------------------------------------------------------
|
||||
|
@ -7,12 +7,12 @@
|
||||
.export __clocks_per_sec
|
||||
|
||||
.import sreg: zp
|
||||
.import _paldetected
|
||||
.import _paldetected
|
||||
.include "atari7800.inc"
|
||||
|
||||
.macpack generic
|
||||
|
||||
.code
|
||||
.code
|
||||
|
||||
;-----------------------------------------------------------------------------
|
||||
; Return the number of clock ticks in one second.
|
||||
@ -20,15 +20,15 @@
|
||||
.proc __clocks_per_sec
|
||||
|
||||
lda #0
|
||||
tax
|
||||
tax
|
||||
sta sreg ; return 32 bits
|
||||
sta sreg+1
|
||||
lda _paldetected
|
||||
bne pal
|
||||
lda #60 ; NTSC - 60Hz
|
||||
rts
|
||||
bne pal
|
||||
lda #60 ; NTSC - 60Hz
|
||||
rts
|
||||
pal:
|
||||
lda #50 ; PAL - 50Hz
|
||||
lda #50 ; PAL - 50Hz
|
||||
rts
|
||||
.endproc
|
||||
|
||||
|
@ -1,14 +1,14 @@
|
||||
.export _zonecounter
|
||||
.export __STARTUP__ : absolute = 1
|
||||
.export _exit
|
||||
.import __ROM_START__
|
||||
.import __RAM3_START__, __RAM3_SIZE__
|
||||
.import initlib, donelib
|
||||
.import zerobss, copydata
|
||||
.import IRQStub
|
||||
.import push0, _main
|
||||
.include "atari7800.inc"
|
||||
.include "zeropage.inc"
|
||||
.export _zonecounter
|
||||
.export __STARTUP__ : absolute = 1
|
||||
.export _exit
|
||||
.import __ROM_START__
|
||||
.import __RAM3_START__, __RAM3_SIZE__
|
||||
.import initlib, donelib
|
||||
.import zerobss, copydata
|
||||
.import IRQStub
|
||||
.import push0, _main
|
||||
.include "atari7800.inc"
|
||||
.include "zeropage.inc"
|
||||
|
||||
INPTCTRL = $01
|
||||
|
||||
@ -19,7 +19,7 @@ start:
|
||||
sei ; Initialize 6502
|
||||
cld
|
||||
lda #$07 ; Lock machine in 7800 mode
|
||||
sta INPTCTRL
|
||||
sta INPTCTRL
|
||||
lda #$7f ; DMA off
|
||||
sta CTRL
|
||||
ldx #0 ; OFFSET must always be 0
|
||||
@ -28,7 +28,7 @@ start:
|
||||
dex ; Stack pointer = $ff
|
||||
txs
|
||||
|
||||
; Set up parameter stack
|
||||
; Set up parameter stack
|
||||
lda #<(__RAM3_START__ + __RAM3_SIZE__)
|
||||
sta sp
|
||||
lda #>(__RAM3_START__ + __RAM3_SIZE__)
|
||||
@ -48,9 +48,9 @@ _exit:
|
||||
jsr donelib
|
||||
jmp start
|
||||
|
||||
NMIHandler:
|
||||
NMIHandler:
|
||||
inc _zonecounter
|
||||
jmp IRQStub
|
||||
jmp IRQStub
|
||||
|
||||
IRQHandler:
|
||||
rti
|
||||
|
@ -4,15 +4,15 @@
|
||||
; This header contains data for emulators
|
||||
;
|
||||
.export __EXEHDR__: absolute = 1
|
||||
.import __CARTSIZE__
|
||||
.import __CARTSIZE__
|
||||
; ------------------------------------------------------------------------
|
||||
; EXE header
|
||||
.segment "EXEHDR"
|
||||
.byte 3 ; version
|
||||
.byte 'A','T','A','R','I','7','8','0','0',' ',' ',' ',' ',' ',' ',' '
|
||||
.byte 'G','a','m','e',' ','n','a','m','e',0,0,0,0,0,0,0
|
||||
.byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
.byte 0,0,>__CARTSIZE__,0 ; Set the cart size in the cfg file
|
||||
.segment "EXEHDR"
|
||||
.byte 3 ; version
|
||||
.byte 'A','T','A','R','I','7','8','0','0',' ',' ',' ',' ',' ',' ',' '
|
||||
.byte 'G','a','m','e',' ','n','a','m','e',0,0,0,0,0,0,0
|
||||
.byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
.byte 0,0,>__CARTSIZE__,0 ; Set the cart size in the cfg file
|
||||
; bit 0 - pokey at 4000
|
||||
; bit 1 - supergame bank switched
|
||||
; bit 2 - supergame ram at $4000
|
||||
@ -28,19 +28,19 @@
|
||||
; bit 12 - souper
|
||||
; bit 13-15 - Special
|
||||
; 0 = Normal cart
|
||||
.byte 0,0 ; 0 = Normal cart
|
||||
.byte 1 ; 1 = Joystick, 2 = lightgun
|
||||
.byte 0 ; No joystick 2
|
||||
.byte 0 ; bit0 = 0:NTSC,1:PAL bit1 = 0:component,1:composite
|
||||
.byte 0 ; Save data peripheral - 1 byte (version 2)
|
||||
.byte 0,0 ; 0 = Normal cart
|
||||
.byte 1 ; 1 = Joystick, 2 = lightgun
|
||||
.byte 0 ; No joystick 2
|
||||
.byte 0 ; bit0 = 0:NTSC,1:PAL bit1 = 0:component,1:composite
|
||||
.byte 0 ; Save data peripheral - 1 byte (version 2)
|
||||
; 0 = None / unknown (default)
|
||||
; 1 = High Score Cart (HSC)
|
||||
; 2 = SaveKey
|
||||
|
||||
.byte 0 ; 63 Expansion module
|
||||
.byte 0 ; 63 Expansion module
|
||||
; 0 = No expansion module (default on all currently released games)
|
||||
; 1 = Expansion module required
|
||||
.byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
.byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
.byte 0,0,0,0,0,0,0,0
|
||||
.byte 'A','C','T','U','A','L',' ','C','A','R','T',' ','D','A','T','A',' ','S','T','A','R','T','S',' ','H','E','R','E'
|
||||
.byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
.byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
.byte 0,0,0,0,0,0,0,0
|
||||
.byte 'A','C','T','U','A','L',' ','C','A','R','T',' ','D','A','T','A',' ','S','T','A','R','T','S',' ','H','E','R','E'
|
||||
|
@ -3,63 +3,63 @@
|
||||
;
|
||||
; unsigned char get_tv (void)
|
||||
;
|
||||
.include "atari7800.inc"
|
||||
.include "get_tv.inc"
|
||||
.export _get_tv
|
||||
.export _paldetected
|
||||
.include "atari7800.inc"
|
||||
.include "get_tv.inc"
|
||||
.export _get_tv
|
||||
.export _paldetected
|
||||
|
||||
.segment "DATA"
|
||||
.segment "DATA"
|
||||
|
||||
_paldetected:
|
||||
.byte $FF
|
||||
.byte $FF
|
||||
|
||||
; ---------------------------------------------------------------
|
||||
; unsigned char get_tv (void)
|
||||
; ---------------------------------------------------------------
|
||||
|
||||
.segment "CODE"
|
||||
.segment "CODE"
|
||||
|
||||
.proc _get_tv: near
|
||||
.proc _get_tv: near
|
||||
|
||||
.segment "CODE"
|
||||
.segment "CODE"
|
||||
|
||||
ldx #$00
|
||||
lda #$FF
|
||||
cmp _paldetected
|
||||
bne L8
|
||||
L1: lda MSTAT
|
||||
and #$80
|
||||
bne L1
|
||||
L2: lda MSTAT
|
||||
and #$80
|
||||
beq L2
|
||||
L3: lda MSTAT
|
||||
and #$80
|
||||
bne L3
|
||||
lda #$00
|
||||
sta M0001
|
||||
jmp L5
|
||||
L4: sta MWSYNC
|
||||
sta MWSYNC
|
||||
dec M0001
|
||||
L5: lda MSTAT
|
||||
and #$80
|
||||
beq L4
|
||||
lda M0001
|
||||
cmp #$78
|
||||
bcc L6
|
||||
lda #TV::NTSC
|
||||
jmp L7
|
||||
L6: lda #TV::PAL
|
||||
L7: sta _paldetected
|
||||
ldx #$00
|
||||
L8: lda _paldetected
|
||||
rts
|
||||
ldx #$00
|
||||
lda #$FF
|
||||
cmp _paldetected
|
||||
bne L8
|
||||
L1: lda MSTAT
|
||||
and #$80
|
||||
bne L1
|
||||
L2: lda MSTAT
|
||||
and #$80
|
||||
beq L2
|
||||
L3: lda MSTAT
|
||||
and #$80
|
||||
bne L3
|
||||
lda #$00
|
||||
sta M0001
|
||||
jmp L5
|
||||
L4: sta MWSYNC
|
||||
sta MWSYNC
|
||||
dec M0001
|
||||
L5: lda MSTAT
|
||||
and #$80
|
||||
beq L4
|
||||
lda M0001
|
||||
cmp #$78
|
||||
bcc L6
|
||||
lda #TV::NTSC
|
||||
jmp L7
|
||||
L6: lda #TV::PAL
|
||||
L7: sta _paldetected
|
||||
ldx #$00
|
||||
L8: lda _paldetected
|
||||
rts
|
||||
|
||||
.segment "BSS"
|
||||
.segment "BSS"
|
||||
|
||||
M0001:
|
||||
.res 1,$00
|
||||
.res 1,$00
|
||||
|
||||
.endproc
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
.include "atari7800.inc"
|
||||
|
||||
.code
|
||||
.code
|
||||
; ------------------------------------------------------------------------
|
||||
|
||||
initirq:
|
||||
@ -27,10 +27,10 @@ IRQStub:
|
||||
tya
|
||||
pha
|
||||
jsr callirq ; Call the functions
|
||||
pla
|
||||
pla
|
||||
tay
|
||||
pla
|
||||
tax
|
||||
@L1: pla
|
||||
@L1: pla
|
||||
rti
|
||||
|
||||
|
@ -85,77 +85,77 @@ COUNT:
|
||||
rts
|
||||
|
||||
; ------------------------------------------------------------------------
|
||||
; READ: Read a particular joystick passed in A for 2 fire buttons.
|
||||
; READ: Read a particular joystick passed in A for 2 fire buttons.
|
||||
|
||||
readbuttons:
|
||||
; Y has joystick of interest 0/1
|
||||
; return value:
|
||||
; $00: no button,
|
||||
; $01: left/B button,
|
||||
; $02: right/A button,
|
||||
; $03: both buttons
|
||||
; preserves X
|
||||
tya
|
||||
beq L5
|
||||
; Joystick 1 processing
|
||||
; 7800 joystick 1 buttons
|
||||
ldy #0 ; ........
|
||||
bit INPT2 ; Check for right button
|
||||
bpl L1
|
||||
ldy #2 ; ......2.
|
||||
L1: bit INPT3 ;Check for left button
|
||||
bpl L2
|
||||
iny ; ......21
|
||||
L2: tya
|
||||
bne L4 ; 7800 mode joystick worked
|
||||
; 2600 Joystick 1
|
||||
bit INPT5
|
||||
bmi L4
|
||||
L3: iny ; .......1
|
||||
lda #0 ; Fallback to 2600 joystick mode
|
||||
sta CTLSWB
|
||||
L4: tya ; ......21
|
||||
rts
|
||||
; Y has joystick of interest 0/1
|
||||
; return value:
|
||||
; $00: no button,
|
||||
; $01: left/B button,
|
||||
; $02: right/A button,
|
||||
; $03: both buttons
|
||||
; preserves X
|
||||
tya
|
||||
beq L5
|
||||
; Joystick 1 processing
|
||||
; 7800 joystick 1 buttons
|
||||
ldy #0 ; ........
|
||||
bit INPT2 ; Check for right button
|
||||
bpl L1
|
||||
ldy #2 ; ......2.
|
||||
L1: bit INPT3 ;Check for left button
|
||||
bpl L2
|
||||
iny ; ......21
|
||||
L2: tya
|
||||
bne L4 ; 7800 mode joystick worked
|
||||
; 2600 Joystick 1
|
||||
bit INPT5
|
||||
bmi L4
|
||||
L3: iny ; .......1
|
||||
lda #0 ; Fallback to 2600 joystick mode
|
||||
sta CTLSWB
|
||||
L4: tya ; ......21
|
||||
rts
|
||||
|
||||
L5: ; Joystick 0 processing
|
||||
; 7800 joystick 0 buttons
|
||||
ldy #0 ; ........
|
||||
bit INPT0 ; Check for right button
|
||||
bpl L6
|
||||
ldy #2 ; ......2.
|
||||
L6: bit INPT1 ;Check for left button
|
||||
bpl L7
|
||||
iny ; ......21
|
||||
L7: tya
|
||||
bne L4 ; 7800 mode joystick worked
|
||||
; 2600 Joystick 0
|
||||
bit INPT4
|
||||
bmi L4
|
||||
bpl L3
|
||||
L5: ; Joystick 0 processing
|
||||
; 7800 joystick 0 buttons
|
||||
ldy #0 ; ........
|
||||
bit INPT0 ; Check for right button
|
||||
bpl L6
|
||||
ldy #2 ; ......2.
|
||||
L6: bit INPT1 ;Check for left button
|
||||
bpl L7
|
||||
iny ; ......21
|
||||
L7: tya
|
||||
bne L4 ; 7800 mode joystick worked
|
||||
; 2600 Joystick 0
|
||||
bit INPT4
|
||||
bmi L4
|
||||
bpl L3
|
||||
|
||||
READ:
|
||||
tay ; Store joystick 0/1 in Y
|
||||
beq L8
|
||||
lda SWCHA ; Read directions of joystick 1
|
||||
rol ; ...RLDU.
|
||||
rol ; ..RLDU..
|
||||
rol ; .RLDU... - joystick 1
|
||||
jmp L9
|
||||
L8: lda SWCHA ; Read directions of joystick 0
|
||||
ror ; .RLDU... - joystick 0
|
||||
L9: tax
|
||||
jsr readbuttons ; A = ......21, X = .RLDU...
|
||||
ror ; A = .......2 1
|
||||
tay ; Y = .......2
|
||||
txa ; A = .RLDU...
|
||||
ror ; A = 1.RLDU..
|
||||
tax ; X = 1.RLDU..
|
||||
tya ; A = .......2
|
||||
ror ; A = ........ 2
|
||||
txa ; A = 1.RLDU..
|
||||
rol ; A = .RLDU..2 1
|
||||
rol ; A = RLDU..21
|
||||
eor #$F0 ; The direction buttons were inversed
|
||||
and #$F3
|
||||
rts
|
||||
tay ; Store joystick 0/1 in Y
|
||||
beq L8
|
||||
lda SWCHA ; Read directions of joystick 1
|
||||
rol ; ...RLDU.
|
||||
rol ; ..RLDU..
|
||||
rol ; .RLDU... - joystick 1
|
||||
jmp L9
|
||||
L8: lda SWCHA ; Read directions of joystick 0
|
||||
ror ; .RLDU... - joystick 0
|
||||
L9: tax
|
||||
jsr readbuttons ; A = ......21, X = .RLDU...
|
||||
ror ; A = .......2 1
|
||||
tay ; Y = .......2
|
||||
txa ; A = .RLDU...
|
||||
ror ; A = 1.RLDU..
|
||||
tax ; X = 1.RLDU..
|
||||
tya ; A = .......2
|
||||
ror ; A = ........ 2
|
||||
txa ; A = 1.RLDU..
|
||||
rol ; A = .RLDU..2 1
|
||||
rol ; A = RLDU..21
|
||||
eor #$F0 ; The direction buttons were inversed
|
||||
and #$F3
|
||||
rts
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
;
|
||||
|
||||
.export _cclearxy, _cclear
|
||||
.import setscrptr
|
||||
.import setscrptr
|
||||
.import rvs
|
||||
.import popax
|
||||
.importzp ptr2
|
||||
@ -25,7 +25,7 @@ _cclear:
|
||||
tax ; Is the length zero?
|
||||
beq @L9 ; Jump if done
|
||||
jsr setscrptr ; Set ptr2 to screen, won't use X
|
||||
lda #' '
|
||||
lda #' '
|
||||
ora rvs
|
||||
@L1: sta (ptr2),y ; Write one char
|
||||
iny ; Next char
|
||||
|
@ -119,7 +119,7 @@ __ctypeidx:
|
||||
ct_mix CT_NONE_IDX, CT_NONE_IDX ; 186/ba ___________, 187/bb ___________
|
||||
ct_mix CT_NONE_IDX, CT_NONE_IDX ; 188/bc ___________, 189/bd ___________
|
||||
ct_mix CT_NONE_IDX, CT_NONE_IDX ; 190/be ___________, 191/bf ___________
|
||||
|
||||
|
||||
ct_mix CT_UPPER_IDX, CT_UPPER_IDX ; 192/c0 ___________, 193/c1 ___________
|
||||
ct_mix CT_UPPER_IDX, CT_UPPER_IDX ; 194/c2 ___________, 195/c3 ___________
|
||||
ct_mix CT_UPPER_IDX, CT_UPPER_IDX ; 196/c4 ___________, 197/c5 ___________
|
||||
|
@ -73,7 +73,7 @@ INSTALL:
|
||||
lda #$ff
|
||||
sta curpage
|
||||
sta curpage+1
|
||||
|
||||
|
||||
; do test for VDC presence here???
|
||||
ldx #VDC_CSET ; determine size of RAM...
|
||||
jsr vdcgetreg
|
||||
@ -97,29 +97,29 @@ INSTALL:
|
||||
jsr vdcputbyte ; restore original value of test byte
|
||||
|
||||
ldx #0 ; prepare x with hi of default pagecount
|
||||
|
||||
|
||||
lda ptr1 ; do bytes match?
|
||||
cmp ptr1+1
|
||||
bne @have64k
|
||||
lda ptr2
|
||||
cmp ptr2+1
|
||||
bne @have64k
|
||||
|
||||
|
||||
lda #64 ; assumes x = 0, here -> p.c = 64
|
||||
bne @setpagecnt
|
||||
@have64k:
|
||||
@have64k:
|
||||
txa ; assumes x = 0, here
|
||||
inx ; so that a/x becomes 0/1 -> p.c. = 256
|
||||
@setpagecnt:
|
||||
@setpagecnt:
|
||||
sta pagecount
|
||||
stx pagecount+1
|
||||
|
||||
txa
|
||||
bne @keep64kBit
|
||||
|
||||
bne @keep64kBit
|
||||
|
||||
ldx #VDC_CSET ; restore 16/64k flag
|
||||
lda vdc_cset_save
|
||||
jsr vdcputreg
|
||||
lda vdc_cset_save
|
||||
jsr vdcputreg
|
||||
@keep64kBit:
|
||||
lda #<EM_ERR_OK
|
||||
ldx #>EM_ERR_OK
|
||||
|
@ -12,7 +12,7 @@
|
||||
|
||||
;--------------------------------------------------------------------------
|
||||
; Data. We define a fixed utsname struct here and just copy it.
|
||||
|
||||
|
||||
.rodata
|
||||
|
||||
utsdata:
|
||||
|
@ -12,9 +12,9 @@
|
||||
|
||||
/* saves a memory area from start to end-1 to a file.
|
||||
*/
|
||||
unsigned char __fastcall__ cbm_save (const char* name,
|
||||
unsigned char __fastcall__ cbm_save (const char* name,
|
||||
unsigned char device,
|
||||
const void* data,
|
||||
const void* data,
|
||||
unsigned int size)
|
||||
{
|
||||
cbm_k_setlfs(0, device, 0);
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
.include "ctypetable.inc"
|
||||
.export __ctypeidx
|
||||
|
||||
|
||||
; The tables are readonly, put them into the rodata segment
|
||||
|
||||
.rodata
|
||||
|
@ -38,7 +38,7 @@ DIR* __fastcall__ opendir (register const char* name)
|
||||
d.fd = open (d.name, O_RDONLY);
|
||||
if (d.fd >= 0) {
|
||||
|
||||
/* Skip the load address */
|
||||
/* Skip the load address */
|
||||
if (_dirread (&d, buf, sizeof (buf))) {
|
||||
|
||||
/* Allocate memory for the DIR structure returned */
|
||||
|
@ -9,7 +9,7 @@
|
||||
.import RVS: zp
|
||||
|
||||
.include "cbm610.inc"
|
||||
|
||||
|
||||
|
||||
.proc _revers
|
||||
|
||||
|
@ -39,4 +39,4 @@ initheap:
|
||||
sta __heapend+1
|
||||
rts
|
||||
|
||||
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
; size_t _heapmaxavail (void);
|
||||
;
|
||||
;
|
||||
|
||||
|
||||
.importzp ptr1, ptr2
|
||||
.export __heapmaxavail
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
/*
|
||||
** Ullrich von Bassewitz, 2012-11-26
|
||||
**
|
||||
** Minimum value of a long. Is used in ascii conversions, since this value
|
||||
** Minimum value of a long. Is used in ascii conversions, since this value
|
||||
** has no positive counterpart than can be represented in 32 bits. In C,
|
||||
** since the compiler will convert to the correct character set for the
|
||||
** since the compiler will convert to the correct character set for the
|
||||
** target platform.
|
||||
*/
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
; Ullrich von Bassewitz, 2004-05-13
|
||||
;
|
||||
; __seterrno: Will set __errno to the value in A and return zero in A. Other
|
||||
; registers aren't changed. The function is C callable, but
|
||||
; registers aren't changed. The function is C callable, but
|
||||
; currently only called from asm code.
|
||||
;
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdlib.h>
|
||||
#include <signal.h>
|
||||
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
;
|
||||
; ctypemask(int c)
|
||||
;
|
||||
; converts a character to test via the is*-functions to the matching ctype-masks
|
||||
; converts a character to test via the is*-functions to the matching ctype-masks
|
||||
; If c is out of the 8-bit range, the function returns with carry set and accu cleared.
|
||||
; Return value is in accu and x has to be always clear when returning
|
||||
; (makes calling code shorter)!
|
||||
|
@ -18,10 +18,10 @@
|
||||
.importzp sreg, ptr1, tmp1
|
||||
|
||||
_div: jsr tosdivax ; Division-operator does most of the work
|
||||
|
||||
|
||||
ldy sreg ; low byte remainder from sreg
|
||||
sta sreg ; store low byte quotient to sreg
|
||||
|
||||
|
||||
lda sreg+1 ; high byte remainder from sreg
|
||||
stx sreg+1 ; store high byte quotient to sreg
|
||||
|
||||
|
@ -7,6 +7,6 @@
|
||||
;
|
||||
|
||||
.export _doesclrscrafterexit
|
||||
.import return0
|
||||
.import return0
|
||||
|
||||
_doesclrscrafterexit = return0
|
||||
|
@ -161,7 +161,7 @@
|
||||
bne @L8
|
||||
|
||||
; Error in read. Set the stream error flag and bail out. errno has already
|
||||
; been set by read(). On entry to label @L7, X must be zero.
|
||||
; been set by read(). On entry to label @L7, X must be zero.
|
||||
|
||||
inx ; X = 0
|
||||
lda #_FERROR
|
||||
|
@ -274,7 +274,7 @@ _free: sta ptr2
|
||||
; }
|
||||
; }
|
||||
;
|
||||
;
|
||||
;
|
||||
; On entry, ptr2 must contain a pointer to the block, which must be at least
|
||||
; HEAP_MIN_BLOCKSIZE bytes in size, and ptr1 contains the total size of the
|
||||
; block.
|
||||
|
@ -21,4 +21,4 @@ int __fastcall__ fsetpos (FILE* f, const fpos_t *pos)
|
||||
return fseek (f, (fpos_t)*pos, SEEK_SET);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
; ------------------------------------------------------------------------
|
||||
; Code
|
||||
|
||||
|
||||
.proc _fwrite
|
||||
|
||||
; Save file and place it into ptr1
|
||||
|
@ -53,7 +53,7 @@ overflow:
|
||||
lda #<ERANGE
|
||||
jsr __seterrno ; Returns 0 in A
|
||||
tax ; Return zero
|
||||
rts
|
||||
rts
|
||||
|
||||
; Success, return buf
|
||||
|
||||
|
@ -56,7 +56,7 @@ L1: lda __longminstr,y ; copy -2147483648
|
||||
dey
|
||||
bpl L1
|
||||
jmp L10
|
||||
|
||||
|
||||
; Check if the value is negative. If so, write a - sign and negate the
|
||||
; number.
|
||||
|
||||
@ -66,7 +66,7 @@ L2: txa ; get high byte
|
||||
|
||||
.if (.cpu .bitand CPU_ISET_65SC02)
|
||||
sta (ptr2)
|
||||
.else
|
||||
.else
|
||||
ldy #0
|
||||
sta (ptr2),y ; store sign
|
||||
.endif
|
||||
@ -79,7 +79,7 @@ L3: lda ptr1 ; negate val
|
||||
ldx ptr1+1
|
||||
|
||||
jsr negeax
|
||||
|
||||
|
||||
sta ptr1
|
||||
stx ptr1+1
|
||||
jmp ultoa
|
||||
|
@ -67,7 +67,7 @@ memcpy_getparams: ; IMPORTANT! Function has to leave with Y=0!
|
||||
jsr popptr1 ; save src to ptr1
|
||||
|
||||
; save dest to ptr2
|
||||
iny ; Y=0 guaranteed by popptr1, we need '1' here...
|
||||
iny ; Y=0 guaranteed by popptr1, we need '1' here...
|
||||
; (direct stack access is three cycles faster
|
||||
; (total cycle count with return))
|
||||
lda (sp),y
|
||||
|
@ -87,7 +87,7 @@ L3: dey
|
||||
sta (ptr1),y ; set bytes in low
|
||||
sta (ptr2),y ; and high section
|
||||
bne L3 ; flags still up to date from dey!
|
||||
leave:
|
||||
leave:
|
||||
jmp popax ; Pop ptr and return as result
|
||||
|
||||
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
;
|
||||
;
|
||||
; unsigned int __fastcall__ mul20(unsigned char value);
|
||||
;
|
||||
;
|
||||
; REMARKS: Function is defined to return with carry-flag cleared
|
||||
|
||||
|
||||
@ -34,7 +34,7 @@ mul5: adc tmp4 ; * 5
|
||||
inx ; yes, correct...
|
||||
|
||||
mul10: stx tmp4 ; continue with classic shifting...
|
||||
|
||||
|
||||
asl a ; * 10
|
||||
rol tmp4
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user