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

86 Commits

Author SHA1 Message Date
Greg King
7773fcb1e1 Converted the Atmos configuration to the new constructor segment model. 2016-03-18 11:28:56 -04:00
Oliver Schmidt
1d1ba3ed3b Adjusted constructors.
The constructors are _NOT_ allowed anymore to access the BSS. Rather they must use the DATA segment or the INIT segment. The latter isn't cleared at any point so the constructors may use it to expose values to the main program. However they must make sure to always write the values as they are not pre-initialized.
2016-03-16 16:28:32 +01:00
Oliver Schmidt
d8c31cf1d3 Renamed RAM to MAIN for all disk based targets.
The name RAM doesn't make much sense in general for a memeory area because i.e. the zero page is for sure RAM but is not part of the memory area named RAM.

For disk based targets it makes sense to put the disk file more into focus and here MAIN means the main part of the file - in contrast to some header.

Only for ROM based targets the name RAM is kept as it makes sense to focus on the difference between RAM and ROM.
2016-03-07 01:28:55 +01:00
Oliver Schmidt
419eb700b5 Renamed INITBSS to INIT and INIT to ONCE.
The way we want to use the INITBSS segment - and especially the fact that it won't have the type bss on all ROM based targets - means that the name INITBSS is misleading. After all INIT is the best name from my perspective as it serves several purposes and therefore needs a rather generic name.

Unfortunately this means that the current INIT segment needs to be renamed too. Looking for a short (ideally 4 letter) name I came up with ONCE as it contains all code (and data) accessed only once during initialization.
2016-03-06 21:27:19 +01:00
Greg King
fccd2bf66a Added more info to a comment. 2015-01-09 22:19:35 -05:00
Greg King
43342366ed Added comments that say why the ZPSAVE1 and ZPSAVE2 segments must be together. 2015-01-08 17:07:28 -05:00
Greg King
22e06c41d1 Fixed a bug that had padded Atmos binaries with 25 bytes too many. 2015-01-08 03:51:20 -05:00
Greg King
d61feae7f8 Added a comment. 2015-01-07 10:51:48 -05:00
Greg King
09e50d433d * Changed the way that Atmos programs are started.
- Put a BASIC-language stub at the beginning.
  - Removed the Autostart flag.

  Those changes make it easy to give command-line arguments to a program.

* Made the Atmos configure file accept a special symbol definition on ld65's command line.  We can use "__RAMEND__" to increase the amount of RAM that's available to programs.
2014-11-09 06:32:11 -05:00
Greg King
74c2415795 Changed literal zeroes of the style "#>0" into the style "#>$0000". 2014-09-10 19:15:07 -04:00
Greg King
970af0cdb2 Swapped the locations of a constructor and a destructor in a source file.
The constructor now is first.

Used a more expressive literal zero.
2014-09-04 17:37:41 -04:00
Greg King
145a010e59 Moved the CAPS LOCK code out of the startup file, and into its own file. 2014-08-24 10:05:45 -04:00
Greg King
58b73a2842 Disable the Atmos keyboard's CAPS LOCK for both conio and stdio. 2014-08-21 11:04:23 -04:00
Greg King
0390c34e88 Changed multi-line C comments into another style.
The left side doesn't look unbalanced.
2014-06-30 16:51:07 -04:00
Oliver Schmidt
2c975d3642 Create static drivers directly from source files.
Up to now static drivers were created via co65 from dynamic drivers. However there was an issue with that approach:

The dynamic drivers are "o65 simple files" which obligates that they start with the 'code' segment. However dynamic drivers need to start with the module header - which is written to. For dynamic drivers this isn't more than a conceptual issue because they are always contain a 'data' segment and may therefore only be loaded into writable memory.

However when dynamic drivers are converted to static drivers using co65 then that issue becomes a real problem as then the 'code' segment may end up in non-writable memory - and thus writing to the module header fails.

Instead of changing the way dynamic drivers work I opted to rather make static driver creation totally independent from dynamic drivers. This allows to place the module header in the 'data' segment (see 'module.mac').
2014-06-04 23:50:18 +02:00
Oliver Schmidt
d6c3bd29ac Renamed JUMPTABLE and cleaned up module.cfg.
This change was suppsed to fix the issue that the former JUMPTABLE is merked as 'ro' while it is actually written to in several scenarios. When drivers are converted using co65 and then compiled into ROMs the JUMPTABLE isn't copied to RAM and therefore the write operations in question fail.

However unfortunately I didn't succeed in changing that :-( Just setting the former JUMPTABLE to 'rw' broke the drivers. So I placed the DATA segment directly after the former JUMPTABLE segment. This made the drivers converted with co65 work again - obviously after changing libsrc/Makefile:235 from '--code-label' to '--data-label'. But the actual dynamic drivers still didn't work as the former JUMPTABLE wasn't placed as the beginning of the loaded file anymore. That effect could be changed by exchanging src/ld65/o65.c:1391 with src/ld65/o65.c:1394 but doing so broke the drivers again :-((
2014-05-01 21:44:39 +02:00
Greg King
6f72758587 Reset the stdin console when a program starts. 2013-12-24 15:26:05 -05:00
Greg King
0dc8a278c7 Moved the command-line arguments out of BASIC's input buffer.
The stdin console re-uses that buffer.
2013-12-24 13:56:19 -05:00
Greg King
d56f5d65ab Added a simplistic read() that gives a stdin console on the Atmos. 2013-12-24 05:18:04 -05:00
Greg King
6589288a04 Exposed, to C code, the names of the Atmos ROM's sound effect functions. 2013-08-06 11:12:30 -04:00
Greg King
f02843f05d Replaced number literals in source code with meaningful symbol names. 2013-07-26 03:33:54 -04:00
Greg King
641a609cf3 Moved common symbol names out of sources, and into a global include file. 2013-07-16 00:30:56 -04:00
Oliver Schmidt
b0dd6c614f Added library reference tgi_libref to TGI interface. 2013-06-01 12:42:00 +02:00
Oliver Schmidt
ae409e4978 Added library reference ser_libref to SER interface. 2013-06-01 11:03:14 +02:00
Oliver Schmidt
23650cb946 Added library reference joy_libref to JOY interface. 2013-06-01 00:36:08 +02:00
Oliver Schmidt
85885001b1 Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
Oliver Schmidt
81e467cdc2 Replaced whole bunch for Makefiles with a single generic Makefile.
- No complex shell logic.
- "Source file shadowing" for all targets via vpath.
- Dependency handling.
- True incremental build.
- Don't write into source directories.
- Easy cleanup by just removing 'wrk'.
2013-05-04 22:15:30 +02:00
Oliver Schmidt
008b4c4e1d Replaced whole bunch for Makefiles with a single generic Makefile.
- No complex shell logic.
- "Source file shadowing" for all targets via vpath.
- Dependency handling.
- True incremental build.
- Don't write into source directories.
- Easy cleanup by just removing 'wrk'.
2013-05-04 22:10:48 +02:00
ol.sc
2e5823d43d Save some bytes by sharing the code doing the actual vector setting. Note: Jumping from segemnt INIT to segment CODE is okay while the other way wouldn't be.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5989 b7a2c559-68d2-44c3-8de9-860c34a00d81
2013-02-14 16:48:05 +00:00
uz
0205906707 Remove needless instruction to make the code assemble.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5986 b7a2c559-68d2-44c3-8de9-860c34a00d81
2013-02-13 07:31:04 +00:00
ol.sc
7c9171ee87 Moved IRQ hooking / unhooking from startup code to constructor / destructor to avoid linking in the hooking / unhooking code (and callirq) for the majority of cc65 prorams not linking in interruptors.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5985 b7a2c559-68d2-44c3-8de9-860c34a00d81
2013-02-12 22:39:38 +00:00
uz
3f677208d4 Bugfix by Stefan Haubenthal.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5961 b7a2c559-68d2-44c3-8de9-860c34a00d81
2013-01-07 20:28:59 +00:00
uz
a302df3cc1 Patch by Greg King: Added a TGI text translator and a palette graphics driver
to Atmos library.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5958 b7a2c559-68d2-44c3-8de9-860c34a00d81
2013-01-07 19:37:18 +00:00
uz
eadd7c7ade Patch by Greg King: The Oric Atmos graphics driver tries to be both a
black-and-white driver and a color-palette driver, at the same time.  That
cannot work on the Oric's architecture.  This patch makes it be only a
black-and-white driver.



git-svn-id: svn://svn.cc65.org/cc65/trunk@5955 b7a2c559-68d2-44c3-8de9-860c34a00d81
2013-01-07 19:30:55 +00:00
ol.sc
6860ac7dfd Introduced static standard drivers.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5891 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-11-01 19:53:47 +00:00
ol.sc
dbc66c247a Added missing standard driver definitions.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5890 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-11-01 15:58:27 +00:00
ol.sc
1bba8355da Fixed typo.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5889 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-10-31 23:39:58 +00:00
ol.sc
a3c940e315 Convert dynamically loadable drivers into statically linkable drivers and add them to the target libraries.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5887 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-10-29 20:26:26 +00:00
uz
293c279416 Tape load and save functions for the Oric Atmos. By Stefan Haubenthal.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5660 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-05-28 11:11:39 +00:00
uz
65a8da9fde Added a new serial driver for the atmos. By Stefan Haubenthal.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5580 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-03-09 10:48:59 +00:00
uz
4f61106043 The IRQ handler needs to save the registers. By Stefan Haubenthal.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5574 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-03-04 19:25:22 +00:00
uz
285aaf8933 Patch by Stefan Haubenthal: Remove __fastcall__ in comments and/or the
function description for functions that don't take any parameters.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5573 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-03-04 13:08:54 +00:00
uz
4026a28c60 Added a new flags byte to the TGI headers. Bumped the API version.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5083 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-07-17 11:23:27 +00:00
uz
9d7edad0cc Fixes for program arguments and TAP header by Stefan Haubenthal.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5071 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-07-03 13:23:07 +00:00
uz
f40c977623 Added (again) IRQ support for the Oric Atmos by Stefan Haubenthal. This time
with the correct patch for atmos.inc.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5039 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-06-07 21:22:02 +00:00
uz
c4492130c4 Reverted the last change, because it doesn't compile.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5028 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-05-24 06:48:02 +00:00
uz
5df93d5561 Add support for interruptors (Stefan Haubenthal).
git-svn-id: svn://svn.cc65.org/cc65/trunk@5027 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-05-23 17:35:25 +00:00
ol.sc
4aa00e84e1 Removed tgi_load() and all corresponding infrastructure. The idea behind tgi_load() was to be able to describe a TGI mode in a target-neutral way by resolution and colordepth. However it turned out that there arn't any cc65 targets sharing any resolution. As a result the only working target-independent approach for a TGI program is to call tgi_loaddriver(tgi_stddrv); and then look up the resolution provided - and to adapt to that resolution.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5016 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-05-02 10:38:48 +00:00
uz
06fddaf11f Improved the stub for __osmaperrno somewhat (Stefan Haubenthal).
git-svn-id: svn://svn.cc65.org/cc65/trunk@5013 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-05-01 21:39:04 +00:00
ol.sc
b47113ad80 Removed recently added TGI mode tables for Atmos and Lynx as according to Greg King those targets don't load drivers dynamically.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5011 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-05-01 21:32:03 +00:00