Merge branch 'master' into sane_makefile_output
This commit is contained in:
79
doc/agat.sgml
Normal file
79
doc/agat.sgml
Normal file
@@ -0,0 +1,79 @@
|
||||
<!doctype linuxdoc system>
|
||||
|
||||
<article>
|
||||
<title>Agat-7/9 - specific information for cc65
|
||||
|
||||
<author><url url="https://sourceforge.net/u/olegodintsov/profile/" name="Oleg A. Odintsov">,<newline>
|
||||
<url url="mailto:sintechs@gmail.com" name="Konstantin Fedorov">
|
||||
|
||||
<abstract>
|
||||
An overview over the Agat-7 and Agat-9 and theirs interfaces to the cc65 C
|
||||
compiler.
|
||||
</abstract>
|
||||
|
||||
<!-- Table of contents -->
|
||||
<toc>
|
||||
|
||||
<!-- Begin the document -->
|
||||
|
||||
<sect>Overview
|
||||
|
||||
<p>The Agat was a series of 8-bit computers produced in the Soviet Union from 1983 to 1993.
|
||||
It was based on Apple II architecture with all electronic components made in the Soviet Union except for 6502 microprocessors supplied by UMC (UM6502A).
|
||||
<p>If compared to Apple II, Agat had many improvements such as color text mode, additional graphic modes and flexible memory controller.
|
||||
Agat-7 had an Apple II compatibility card called "Module 121", while Agat-9 had a built-in Apple II+ mode activated by soft-switch.
|
||||
<p>All mass-produced Agat models were disk-based systems, 2K ROM contained only basic machine language monitor and disassembler.
|
||||
Agat-7 had 140K floppy-drive based on Apple DISK II, while Agat-9 was supplied with 840K drive having its own sector format and controller.
|
||||
|
||||
<sect>Binary format<p>
|
||||
|
||||
The standard binary file format generated by the linker for the Agat target is
|
||||
an AppleSingle file to be compatible with AppleCommander <url url="https://applecommander.github.io/">.
|
||||
The default load address is $1903.
|
||||
|
||||
|
||||
|
||||
<sect>Platform-specific header files<p>
|
||||
|
||||
Programs containing Agat-specific code may use the <tt/agat.h/ or
|
||||
<tt/agat.inc/ include files.
|
||||
|
||||
<sect>Usefull info<p>
|
||||
|
||||
<sect1>Emulation<p>
|
||||
|
||||
<enum>
|
||||
<item> Oleg Odintsov's Agat Emulator - <url url="https://agatemulator.sourceforge.net/english.html">
|
||||
<item> MAME - <url url="https://www.mamedev.org/">
|
||||
</enum>
|
||||
|
||||
<sect1>Links<p>
|
||||
<enum>
|
||||
<item> Most informative source on Agat (in russian) - <url url="https://agatcomp.ru">
|
||||
<item> Wikipedia - <url url="https://en.wikipedia.org/wiki/Agat_(computer)">
|
||||
<item> Controversial article on Agat from <url name="BYTE Magazine November 1984 Vol. 9, No. 12" url="https://archive.org/details/byte-magazine-1984-11/page/n135/mode/2up?view=theater">.
|
||||
The author reviewed custom-build mockup Agat bearing little relation to even the early Agat systems.
|
||||
</enum>
|
||||
|
||||
|
||||
<sect>License<p>
|
||||
|
||||
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:
|
||||
<enum>
|
||||
<item> 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.
|
||||
<item> Altered source versions must be plainly marked as such, and must not
|
||||
be misrepresented as being the original software.
|
||||
<item> This notice may not be removed or altered from any source
|
||||
distribution.
|
||||
</enum>
|
||||
|
||||
</article>
|
||||
@@ -87,7 +87,7 @@ several useful settings:
|
||||
exit then a plain vanilla ProDOS 8 doesn't make use of the Language Card bank
|
||||
2 at all.
|
||||
|
||||
<tag>LC address: $D000, LC size: $3000</tag>
|
||||
<tag>LC address: $D000, LC size: $2FFC</tag>
|
||||
For plain vanilla DOS 3.3 which doesn't make use of the Language Card at all.
|
||||
|
||||
</descrip><p>
|
||||
|
||||
@@ -88,7 +88,7 @@ several useful settings:
|
||||
exit then a plain vanilla ProDOS 8 doesn't make use of the Language Card bank
|
||||
2 at all.
|
||||
|
||||
<tag>LC address: $D000, LC size: $3000</tag>
|
||||
<tag>LC address: $D000, LC size: $2FFC</tag>
|
||||
For plain vanilla DOS 3.3 which doesn't make use of the Language Card at all.
|
||||
|
||||
</descrip><p>
|
||||
|
||||
@@ -3234,6 +3234,12 @@ See: <tt><ref id=".ASCIIZ" name=".ASCIIZ"></tt>,<tt><ref id=".CHARMAP" name=".CH
|
||||
(see <tt><ref id=".P02" name=".P02"></tt> command).
|
||||
|
||||
|
||||
<sect1><tt>.IFP02X</tt><label id=".IFP02X"><p>
|
||||
|
||||
Conditional assembly: Check if the assembler is currently in 6502X mode
|
||||
(see <tt><ref id=".P02X" name=".P02X"></tt> command).
|
||||
|
||||
|
||||
<sect1><tt>.IFP4510</tt><label id=".IFP4510"><p>
|
||||
|
||||
Conditional assembly: Check if the assembler is currently in 4510 mode
|
||||
@@ -3621,6 +3627,16 @@ See: <tt><ref id=".ASCIIZ" name=".ASCIIZ"></tt>,<tt><ref id=".BYTE" name=".BYTE"
|
||||
<tt><ref id=".P4510" name=".P4510"></tt>
|
||||
|
||||
|
||||
<sect1><tt>.P02X</tt><label id=".P02X"><p>
|
||||
|
||||
Enable the 6502X instruction set, disable 65SC02, 65C02 and 65816
|
||||
instructions.
|
||||
|
||||
See: <tt><ref id=".PC02" name=".PC02"></tt>, <tt><ref id=".PSC02"
|
||||
name=".PSC02"></tt>, <tt><ref id=".P816" name=".P816"></tt> and
|
||||
<tt><ref id=".P4510" name=".P4510"></tt>
|
||||
|
||||
|
||||
<sect1><tt>.P4510</tt><label id=".P4510"><p>
|
||||
|
||||
Enable the 4510 instruction set. This is a superset of the 65C02 and
|
||||
@@ -4016,11 +4032,13 @@ See: <tt><ref id=".ASCIIZ" name=".ASCIIZ"></tt>,<tt><ref id=".BYTE" name=".BYTE"
|
||||
|
||||
See: <tt><ref id=".CPU" name=".CPU"></tt>,
|
||||
<tt><ref id=".IFP02" name=".IFP02"></tt>,
|
||||
<tt><ref id=".IFP02X" name=".IFP02X"></tt>,
|
||||
<tt><ref id=".IFPDTV" name=".IFPDTV"></tt>,
|
||||
<tt><ref id=".IFP816" name=".IFP816"></tt>,
|
||||
<tt><ref id=".IFPC02" name=".IFPC02"></tt>,
|
||||
<tt><ref id=".IFPSC02" name=".IFPSC02"></tt>,
|
||||
<tt><ref id=".P02" name=".P02"></tt>,
|
||||
<tt><ref id=".P02X" name=".P02X"></tt>,
|
||||
<tt><ref id=".P816" name=".P816"></tt>,
|
||||
<tt><ref id=".P4510" name=".P4510"></tt>,
|
||||
<tt><ref id=".PC02" name=".PC02"></tt>,
|
||||
|
||||
114
doc/cc65.sgml
114
doc/cc65.sgml
@@ -63,6 +63,8 @@ Short options:
|
||||
-V Print the compiler version number
|
||||
-W [-+]warning[,...] Control warnings ('-' disables, '+' enables)
|
||||
-d Debug mode
|
||||
-dM Output all user macros (needs -E)
|
||||
-dP Output all predefined macros (needs -E)
|
||||
-g Add debug info to object file
|
||||
-h Help (this text)
|
||||
-j Default characters are signed
|
||||
@@ -199,6 +201,28 @@ Here is a description of all the command line options:
|
||||
Enables debug mode, for debugging the behavior of cc65.
|
||||
|
||||
|
||||
|
||||
<label id="option-dM">
|
||||
<tag><tt>-dM</tt></tag>
|
||||
|
||||
When used with -E, will output <tt>#define</tt> directives for all the user
|
||||
macros defined during execution of the preprocessor. This does not include
|
||||
macros defined by the compiler.
|
||||
|
||||
Note: Can be combined with <tt/<ref id="option-dP" name="-dP">/ by using
|
||||
<tt/-dMP/.
|
||||
|
||||
|
||||
<label id="option-dP">
|
||||
<tag><tt>-dP</tt></tag>
|
||||
|
||||
When used with -E, will output <tt>#define</tt> directives for all the macros
|
||||
defined by the compiler itself. This does not include any user defined macros.
|
||||
|
||||
Note: Can be combined with <tt/<ref id="option-dM" name="-dM">/ by using
|
||||
<tt/-dMP/.
|
||||
|
||||
|
||||
<tag><tt>--debug-tables name</tt></tag>
|
||||
|
||||
Writes symbol table information to a file, which includes details on structs, unions
|
||||
@@ -1154,6 +1178,96 @@ The compiler defines several macros at startup:
|
||||
<item><tt/__CC65_STD_CC65__/
|
||||
</itemize>
|
||||
|
||||
<label id="macro-CPU">
|
||||
<tag><tt>__CPU__</tt></tag>
|
||||
|
||||
This macro contains a bitset that allows to check if a specific instruction
|
||||
set is supported. For example, the 65C02 CPU supports all instructions of the
|
||||
65SC02. So testing for the instruction set of the 65SC02 using the following
|
||||
check will succeed for both CPUs (and also for the 65816 and HUC6280).
|
||||
|
||||
<tscreen><verb>
|
||||
#if (__CPU__ & __CPU_ISET_65SC02__)
|
||||
</verb></tscreen>
|
||||
|
||||
This is much simpler and more future proof than checking for specific CPUs.
|
||||
|
||||
The compiler defines a set of constants named <tt/__CPU_ISET_xxx/ to do the
|
||||
checks. The <tt/__CPU__/ variable is usually derived from the target system
|
||||
given, but can be changed using the <tt/<ref id="option--cpu" name="--cpu">/
|
||||
command line option.
|
||||
|
||||
<tag><tt>__CPU_6502__</tt></tag>
|
||||
|
||||
This macro is defined if the code is compiled for a 6502 CPU.
|
||||
|
||||
<tag><tt>__CPU_6502X__</tt></tag>
|
||||
|
||||
This macro is defined if the code is compiled for a 6502 CPU with invalid
|
||||
opcodes.
|
||||
|
||||
<tag><tt>__CPU_6502DTV__</tt></tag>
|
||||
|
||||
This macro is defined if the code is compiled for a DTV CPU.
|
||||
|
||||
<tag><tt>__CPU_65SC02__</tt></tag>
|
||||
|
||||
This macro is defined if the code is compiled for a 65SC02 CPU.
|
||||
|
||||
<tag><tt>__CPU_65C02__</tt></tag>
|
||||
|
||||
This macro is defined if the code is compiled for a 65C02 CPU.
|
||||
|
||||
<tag><tt>__CPU_65816__</tt></tag>
|
||||
|
||||
This macro is defined if the code is compiled for a 65816 CPU.
|
||||
|
||||
<tag><tt>__CPU_HUC6280__</tt></tag>
|
||||
|
||||
This macro is defined if the code is compiled for a HUC6280 CPU.
|
||||
|
||||
<tag><tt>__CPU_ISET_6502__</tt></tag>
|
||||
|
||||
This macro expands to a numeric constant that can be used to check the
|
||||
<tt/<ref id="macro-CPU" name="__CPU__">/ macro for the instruction set
|
||||
of the 6502 CPU.
|
||||
|
||||
<tag><tt>__CPU_ISET_6502X__</tt></tag>
|
||||
|
||||
This macro expands to a numeric constant that can be used to check the
|
||||
<tt/<ref id="macro-CPU" name="__CPU__">/ macro for the instruction set
|
||||
of the 6502X CPU.
|
||||
|
||||
<tag><tt>__CPU_ISET_6502DTV__</tt></tag>
|
||||
|
||||
This macro expands to a numeric constant that can be used to check the
|
||||
<tt/<ref id="macro-CPU" name="__CPU__">/ macro for the instruction set
|
||||
of the 6502DTV CPU.
|
||||
|
||||
<tag><tt>__CPU_ISET_65SC02__</tt></tag>
|
||||
|
||||
This macro expands to a numeric constant that can be used to check the
|
||||
<tt/<ref id="macro-CPU" name="__CPU__">/ macro for the instruction set
|
||||
of the 65SC02 CPU.
|
||||
|
||||
<tag><tt>__CPU_ISET_65C02__</tt></tag>
|
||||
|
||||
This macro expands to a numeric constant that can be used to check the
|
||||
<tt/<ref id="macro-CPU" name="__CPU__">/ macro for the instruction set
|
||||
of the 65C02 CPU.
|
||||
|
||||
<tag><tt>__CPU_ISET_65816__</tt></tag>
|
||||
|
||||
This macro expands to a numeric constant that can be used to check the
|
||||
<tt/<ref id="macro-CPU" name="__CPU__">/ macro for the instruction set
|
||||
of the 65816 CPU.
|
||||
|
||||
<tag><tt>__CPU_ISET_HUC6280__</tt></tag>
|
||||
|
||||
This macro expands to a numeric constant that can be used to check the
|
||||
<tt/<ref id="macro-CPU" name="__CPU__">/ macro for the instruction set
|
||||
of the HUC6280 CPU.
|
||||
|
||||
<tag><tt>__CX16__</tt></tag>
|
||||
|
||||
This macro is defined if the target is the Commander X16 (-t cx16).
|
||||
|
||||
@@ -109,6 +109,9 @@
|
||||
|
||||
<descrip>
|
||||
|
||||
<tag><htmlurl url="agat.html" name="agat.html"></tag>
|
||||
Topics specific to the Agat machines.
|
||||
|
||||
<tag><htmlurl url="apple2.html" name="apple2.html"></tag>
|
||||
Topics specific to the Apple ][.
|
||||
|
||||
|
||||
@@ -165,8 +165,26 @@ The names in the parentheses denote the symbols to be used for static linking of
|
||||
|
||||
<sect1>Graphics drivers<p>
|
||||
|
||||
No graphics drivers are currently available for the Plus/4.
|
||||
<descrip>
|
||||
<tag><tt/ted-hi.tgi (ted_hi_tgi)/</tag>
|
||||
This driver features a resolution of 320*200 with two colors and an
|
||||
adjustable palette (that means that the two colors can be chosen out of a
|
||||
palette of the 121 TED colors).
|
||||
|
||||
Note that the text-mode character matrix and color data are destroyed by this
|
||||
driver. The driver calls the Kernal <tt/CLRSCR/ routine to return the text
|
||||
screen to a usable (if empty) state on <tt/tgi_done()/.
|
||||
|
||||
This driver places the bitmap at $C000-$E000. Programs using
|
||||
this driver must either be linked with the option <tt/-D
|
||||
__HIMEM__=$C000/, or use the <tt/plus4-hires.cfg/ linker configuration.
|
||||
|
||||
The <tt/plus4-hires.cfg/ is preferable, as it allows the stack to remain at
|
||||
$FCFF, and exposes the remaining high memory from the end of the bitmap
|
||||
to the stack top as a <tt/HIBSS/ segment that can be used by the programmer,
|
||||
or given to <tt/_heapadd()/ (using the symbols <tt/_HIBSS_START__/ and
|
||||
<tt/_HIBSS_SIZE__/).
|
||||
</descrip><p>
|
||||
|
||||
<sect1>Extended memory drivers<p>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user