1
0
mirror of https://github.com/cc65/cc65.git synced 2024-07-05 21:29:03 +00:00
Commit Graph

6992 Commits

Author SHA1 Message Date
Greg King
4014783275 Made the samples Makefile run cl65 only when we want a disk image.
That change avoids an error message when we "make clean" from the top-level make-file (it removes the tools before it cleans the samples).
2016-07-03 02:23:59 -04:00
Greg King
90b2f5aff8 Fixed some code that adjusts an index after a deletion from a collection. 2016-07-02 10:26:33 -04:00
Oliver Schmidt
dfea22389c Merge pull request #315 from skry/fixes
Fix typo in samples makefile
2016-06-23 14:57:21 +02:00
Joni Lapilainen
ab10bd4014 Fix typo in samples makefile 2016-06-23 15:46:09 +03:00
Greg King
5d9f4dc89d Made the overlay demo programs compile for CBM targets again.
<conio.h> includes target-specific headers; so, we didn't bother to include <cbm.h> where it is needed.  But, '#include <conio.h>' was removed from some files; so now, we must include <cbm.h> explicitly.
2016-06-19 17:41:18 -04:00
Oliver Schmidt
c9e9679a06 Improved doc and samples default target.
The 'all' target deliberately doesn't build the doc nor the samples. But that doesn't mean that the Makefiles in the 'doc' and 'samples' directories must default to the (empty) 'all' target.
2016-06-19 18:55:00 +02:00
Oliver Schmidt
e47485f925 Added CONIO cursor support.
For quite some time I deliberately didn't add cursor support to the Apple II CONIO imöplementation. I consider it inappropriate to increase the size of cgetc() unduly for a rather seldom used feature.

There's no hardware cursor on the Apple II so displaying a cursor during keyboard input means reading the character stored at the cursor location, writing the cursor character, reading the keyboard and finally writing back the character read initially.

The naive approach is to reuse the part of cputc() that determines the memory location of the character at the cursor position in order to read the character stored there. However that means to add at least one additional JSR / RTS pair to cputc() adding 4 bytes and 12 cycles :-( Apart from that this approach means still a "too" large cgetc().

The approach implemented instead is to include all functionality required by cgetc() into cputc() - which is to read the current character before writing a new one. This may seem surprising at first glance but an LDA(),Y / TAX sequence adds only 3 bytes and 7 cycles so it cheaper than the JSR / RTS pair and allows to brings down the code increase in cgetc() down to a reasonable value.

However so far the internal cputc() code in question saved the X register. Now it uses the X register to return the old character present before writing the new character for cgetc(). This requires some rather small adjustments in other functions using that internal cputc() code.
2016-06-19 15:03:20 +02:00
Oliver Schmidt
2ef43e425a Adjusted to recent change. 2016-06-19 01:39:27 +02:00
Oliver Schmidt
66561c23c1 Made Makefile actually work.
Supported target systems:
* c64 (default)
* apple2
* apple2enh
* atari
* atarixl
2016-06-19 01:22:59 +02:00
Oliver Schmidt
64c10aa2fe Minor simplification. 2016-06-18 23:57:18 +02:00
Oliver Schmidt
9bc096d9b0 Make use of doesclrscrafterexit(). 2016-06-18 23:57:17 +02:00
Oliver Schmidt
520641890d Merge pull request #313 from greg-king5/plus4-joy
Fix the Plus/4 (and C16) joystick driver.
2016-06-18 23:23:55 +02:00
Greg King
f91a7e749b Fixed the Plus/4 joystick driver.
It chooses a stick correctly.  And, it reads the fire button.
2016-06-18 13:18:26 -04:00
Oliver Schmidt
a7323d399e Merge pull request #312 from groessler/atari-exec-devel
Fix exec() for atarixl target.
2016-06-16 11:49:18 +02:00
Christian Groessler
a9c69bb8c9 A small rearrangement of instructions in Atari's exec() to let the comments
make sense again.
2016-06-16 00:47:13 +02:00
Christian Groessler
ec7751332f Fix exec() for atarixl target.
The final part of exec() called 'excexit' and only then restored the
stack pointer to its value at program entry.  'excexit' does all
cleanup (the same as '_exit()'), which means that on the atarixl
target the ROM is banked in again.  On big programs the 'SP_save'
variable might reside at a high memory address which is no longer
accessible after the ROM has been banked in.
The change just moves the restoration of the stack pointer before
the call to 'excexit'.

Another change lets exec.s compile if UCASE_FILENAME is not defined.
And some other small cleanups, also in open.s.
2016-06-15 23:52:16 +02:00
Oliver Schmidt
2c8b8d90bf Merge pull request #311 from groessler/something_to_pull
Fix doesclrscrafterexit() function on atarixl target.
2016-06-15 08:59:50 +02:00
Oliver Schmidt
d8dfc29297 Merge pull request #310 from groessler/atari-exec-devel
Implement exec() for Atari XDOS.
2016-06-15 08:58:23 +02:00
Christian Groessler
d0faf471b8 Some improvements to Atari exec() after review. 2016-06-14 20:44:57 +02:00
Christian Groessler
4aa9a414c6 Fix doesclrscrafterexit() function on atarixl target.
On atarixl, the screen is always cleared, regardless of the running DOS.
2016-06-13 21:16:27 +02:00
Christian Groessler
94ba9575ec Implement exec() for Atari XDOS.
- Adds new ENOEXEC error code, also used by Apple2 targets.
- Maximum command line length is 40, incl. program name. This is
  an XDOS restriction.
- testcode/lib/tinyshell.c has been extended to be able to run
  programs.
2016-06-13 20:40:01 +02:00
Oliver Schmidt
271b65aa70 Added hint on how to quit program. 2016-06-12 23:48:19 +02:00
Oliver Schmidt
98973ee901 Avoid warnings on monochrom targets (and remove unnecessary code). 2016-06-12 23:30:29 +02:00
Oliver Schmidt
524813ff60 Allow to build samples from the main Makefile. 2016-06-12 23:30:29 +02:00
Oliver Schmidt
4fc27ffc98 Merge pull request #309 from greg-king5/map-zero
Allow character code 0x00 to be remapped with other character codes.
2016-06-11 16:13:24 +02:00
Greg King
573381a340 Allowed character code zero to be remapped with other character codes. 2016-06-11 06:43:19 -04:00
Oliver Schmidt
e95d07aa97 Merge pull request #308 from greg-king5/funcref
Update the function reference document.
2016-06-09 08:57:03 +02:00
Greg King
0835985999 Updated the function reference document.
* Added doesclrscrafterexit() to cc65.h's list.
* Added header-file function lists for some new target platforms.
2016-06-08 21:05:56 -04:00
Oliver Schmidt
2f486b6201 Merge pull request #307 from groessler/something_to_pull2
Add Atari version of of doesclrscrafterexit().
2016-06-07 15:13:28 +02:00
Christian Groessler
5705d0b55b Use 'return0' for default 'doesclrscrafterexit()' implementation in libsrc/common.
Fix include/atari.h formatting.
2016-06-07 15:05:00 +02:00
Christian Groessler
308767cbae fix wrong header reference in doesclrscrafterexit() description 2016-06-07 12:22:25 +02:00
Christian Groessler
346d88a6a7 Add issues from pull request #307. 2016-06-07 12:07:38 +02:00
Oliver Schmidt
effdc58d88 Merge pull request #306 from groessler/something_to_pull
Some Atari runtime library fixes.
2016-06-07 10:21:59 +02:00
Christian Groessler
c7874b9f60 Add Atari version of of doesclrscrafterexit().
- Update documentation.
- Update atari.h and apple2.h header files.
- Adapt Atari test/target programs.
- Fix a typo in "div" entry in funcref.sgml.
2016-06-07 00:42:51 +02:00
Christian Groessler
27841c7b40 Some Atari runtime library fixes.
* libsrc/atari/ucase_fn.s: Fix handling if input parameter 'tmp2' is 0.
* libsrc/atari/open.s: Set 'tmp2' parameter for 'ucase_fn' if DEFAULT_DEVICE
  is not defined.
2016-06-06 22:45:20 +02:00
Oliver Schmidt
13482984ca Introduced internal gotoxy that pops both parameters.
About all CONIO functions offering a <...>xy variant call
  popa
  _gotoxy

By providing an internal gotoxy variant that starts with a popa all those CONIO function can be shortened by 3 bytes. As soon as program calls more than one CONIO function this means an overall code size reduction.
2016-06-05 14:58:38 +02:00
Oliver Schmidt
d670998814 Added Apple II version of doesclrscrafterexit().
The prototype and documentation is supposed to be provided together with the ATARI version.
2016-06-05 13:01:42 +02:00
Oliver Schmidt
02b8469875 Added full stop. 2016-06-03 21:21:22 +02:00
Oliver Schmidt
6f0b57fe51 Added chrcvt65 to the Visual Studio project. 2016-06-03 11:37:15 +02:00
Oliver Schmidt
8dd003d2b3 Added --print-target-path option.
If cc65 is installed and used as designed there's no need whatsoever for CC65_HOME (both on *IX and Windows) from the perspective of the cc65 binaries. If the user however has to access files from the 'target' directory thenhe ends up with some assumption on the cc65 installation path nevertheless :-(

In order to avoid this I added the --print-target-path option. It "exports" the logic used by the cc65 binaries to locate their files to the user thus allowing him to leverage the same logic to locate the target files in his build scripts / Makefiles.
2016-06-03 11:08:53 +02:00
Oliver Schmidt
9f01392922 Write overlays to d64 image. 2016-06-02 20:49:10 +02:00
Oliver Schmidt
ce45f75987 Harmonized goal name. 2016-06-01 23:51:43 +02:00
Oliver Schmidt
d653054d98 Allow usage of C1541 environment variable. 2016-06-01 23:48:09 +02:00
Oliver Schmidt
24256256fb Removed shell for-loop.
Just a few of the many reasons why shell for-loops have no place in (GNUmake) Makefiles:
* They don't conform to https://www.gnu.org/software/make/manual/html_node/Utilities-in-Makefiles.html
* They break Windows builds for sure
* They don't fit to make's approach of working with sets
* They break make parallelism
2016-06-01 23:47:02 +02:00
Oliver Schmidt
38778cdeb6 Don't cleanup files "just in case".
The build doesn't create *.lbl files so we're not deleting *.lbl files.
2016-06-01 23:04:46 +02:00
Oliver Schmidt
1ab725e526 Don't hide build commands.
The samples Makefile serves educational purposes. From that perspective it's counterproductive to hide the actual build commands. Apart fom that it becomes visible if an installed cc65 is used to build the samples.
2016-06-01 23:00:37 +02:00
Oliver Schmidt
506e44fb5d Corrected cleanup semantics.
There's no zap goal in cc65 Makefiles.
2016-06-01 22:50:42 +02:00
Oliver Schmidt
b75e36bba1 Don't ignore more than necessary.
We know that the one and only cc65.zip we want to ignore lives in the root directory.
2016-06-01 22:36:38 +02:00
Oliver Schmidt
ec06d162bd Fixed clean goal on Windows.
Now that the clean goal of the samples Makefile is part of the global clean goal it should work on Windows!

BTW: Ideally the whole samples Makefile should work on Windows ;-))
2016-06-01 22:14:30 +02:00
Oliver Schmidt
d78b44f8c6 Adjusted to the cc65 Makefile style.
The cc65 Makefiles have a single .PHONY target. It serves as an overview of the "interesting" goals supported by the Makfile.
2016-06-01 21:08:47 +02:00