1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-12 12:29:32 +00:00
Commit Graph

8317 Commits

Author SHA1 Message Date
Piotr Fusik
d38417b347 Optimize sign extension. 2019-11-07 21:45:19 +01:00
Piotr Fusik
985371433b Swap the positive/negative paths to save a branch. 2019-11-07 21:45:19 +01:00
Piotr Fusik
421c3f2b4f Don't set carry when already set. 2019-11-07 21:45:19 +01:00
Piotr Fusik
2bec637637 Optimize a negation in signed division. 2019-11-07 21:45:19 +01:00
Richard Halkyard
0d21a2b5a4 Reformat comments to style guide rules 2019-11-02 11:21:50 +01:00
Fabrizio Caruso
2bd798fa13 Optimizations 2019-10-30 18:00:27 -04:00
Fabrizio Caruso
78d660da55 kbhit checks KBEDG and getc resets KBEDG 2019-10-30 18:00:27 -04:00
Fabrizio Caruso
43f24afe29 stz 2019-10-30 18:00:27 -04:00
Fabrizio Caruso
609f63ac74 Second tentative fix 2019-10-30 18:00:27 -04:00
Curt J. Sampson
1d39863a60 vic20/cputc: Fix incorrect CRAM_PTR at startup when using conio
To do this we add a constructor call to UPDCRAMPTR, which is the ROM
routine that fixes up CRAM_PTR to match the screen location pointed to
by SCREEN_PTR.

This adds two additional bytes to programs using cputc() or other
routines that call it. These are in theory recoverable, but the VIC-20
does not yet free space used by constructors after the constructors
have been called.

Thanks to <greg.king5@verizon.net> (GitHub: greg-king5) for
investigating the difference in the VIC-20 KERNAL from the C64 and
proposing this solution to the problem.[1]

[1]: https://github.com/cc65/cc65/issues/946#issuecomment-538502820
2019-10-25 16:03:38 -04:00
Curt J. Sampson
128991d868 libsrc/*/kplot.s: Use cbm_kernal.inc symbols, not hardcoded addrs
On C64, VIC-20 and Plus/4, the conio library PLOT routine uses direct
calls into the Kernal, including the Kernal PLOT routine that we're
replacing. These were previously hardcoded addresses; we change these
to use the symbols for those routines defined in cbm_kernal.inc. (This
changes no functionality.)

To do this, we need to import cbm_kernal.inc in a namespace so we
don't have a collision between the PLOT that we're defining and the
Kernal definition.

We also add a UPDCRAMPTR symbol (used by kplot for VIC-20 and C64) to
the direct entry kernal routines in in cbm_kernal.inc, and expand the
comments describing what the "direct entry" Kernal routines are.

<greg.king5@verizon.net> (GitHub: greg-king5) came up with this idea
and did initial testing of it.

This has been tested on VICE xvic, x64 and xplus4 emulators with a
program that does a cputs() call (github.com/0cjs/vic20cc65) to
confirm that it works the same way after as it did before.
2019-10-25 16:03:38 -04:00
Greg King
9fa90e2265 Added VERA peek() and poke() to the cx16 library.
They simplify C programs' direct access to VERA's internal address space.
2019-10-24 05:15:42 -04:00
Fabrizio Caruso
1074d35a15 remove bra 2019-10-18 11:15:54 -04:00
Fabrizio Caruso
e4b60e1068 Remove useless tax 2019-10-18 11:15:54 -04:00
Fabrizio Caruso
da01286037 Tentative solution for cgetc in Lynx 2019-10-18 11:15:54 -04:00
Greg King
f3d898d6a3 Added the GIF switch to the X16 emulator's control port. 2019-10-15 12:10:34 -04:00
Stephan Mühlstrasser
55444b8337 Removed redundant LDA
After the removal of the redundant AND in commit
704c8df04f also the
subsequent LDA became redundant.
2019-10-15 09:38:23 -04:00
Stephan Mühlstrasser
7547c4c77c Address review comments
- removed typo from comment
- removed redundant AND instruction
2019-10-15 09:38:23 -04:00
Stephan Mühlstrasser
668273cdf5 Remove source file that was only used for testing 2019-10-15 09:38:23 -04:00
Stephan Mühlstrasser
8704d42005 Remove obsolete comment 2019-10-15 09:38:23 -04:00
Stephan Mühlstrasser
eb2317d014 Restructured according to review
Restructured according to review in pull request #567.

The "inputc" function was moved in slightly modified form
to kbhit.s and replaces the old keyboard scanner.
cgetc() uses the new kbhit() to read a character.
2019-10-15 09:38:23 -04:00
Jeff Tranter
e2007d0743 New OSI input routine based on disassembly of ROM code. 2019-10-15 09:38:23 -04:00
Fabrizio Caruso
9a3e521358 small m and n fixed 2019-10-13 09:03:46 -04:00
Fabrizio Caruso
bac6f94929 Fix 127 (second left arrow) 2019-10-13 09:03:46 -04:00
Fabrizio Caruso
b91e233714 Fix left arrow (char 77=13+64) 2019-10-13 09:03:46 -04:00
Fabrizio Caruso
d04f7935c3 M N fixed 2019-10-13 09:03:46 -04:00
Fabrizio Caruso
0210d76694 Fix 4 2019-10-13 09:03:46 -04:00
Fabrizio Caruso
5eda1c256c Fix char 35 38 42 47 52 2019-10-13 09:03:46 -04:00
Greg King
4f24a06f0e Fixed error handling for missing names in ld65 configure files. 2019-10-12 07:59:49 -04:00
LRFLEW
e660a49347 [cx16] Update ROM banks to new mapping 2019-10-12 04:51:27 -04:00
Greg King
f3f15cfd25 Fixed problems with the Atari Lynx's TGI driver.
* The sprite-types for black and transparent backgrounds were swapped.
* A filler-byte for text output isn't printed.  (A hardware bug might not need that work-around in most cases.)
2019-10-12 04:01:03 -04:00
Greg King
39b10f9599 Added new program descriptions to the list. 2019-10-11 10:48:56 -04:00
LRFLEW
216105f6df Update comments in rand.s 2019-10-09 17:09:05 +02:00
LRFLEW
3994fee595 Significantly faster rand() implementation 2019-10-09 17:09:05 +02:00
Fabrizio Caruso
fb260ef17f Init is no longer in crt0.s 2019-10-09 17:01:02 +02:00
Fabrizio Caruso
7706ea2f13 Improve comments 2019-10-09 17:01:02 +02:00
Fabrizio Caruso
1b1d29ca9e Comments 2019-10-09 17:01:02 +02:00
Fabrizio Caruso
40cf719068 Use decimal for lcd size initialization 2019-10-09 17:01:02 +02:00
Fabrizio Caruso
b051c913e9 Add supervisionhello in samples/Makefile 2019-10-09 17:01:02 +02:00
Fabrizio Caruso
eb83a3fd0f Improve helloworld example for Supervision 2019-10-09 17:01:02 +02:00
Fabrizio Caruso
915836b3ec Improve init code readability 2019-10-09 17:01:02 +02:00
Fabrizio Caruso
cdb8035cf0 Move screen init into crt0.s 2019-10-09 17:01:02 +02:00
Fabrizio Caruso
74a904be54 Hello world example for the Supervision 2019-10-09 17:01:02 +02:00
Stefan
96547d1dd4 Fix colors for #948 2019-10-09 06:15:38 -04:00
Fabrizio Caruso
9bd92178b6 Fix Gamate RVS 2019-10-04 10:22:25 +02:00
Greg King
2e5fbe89cd Made the "none" CPU allow all address sizes. 2019-10-02 10:09:48 -04:00
Greg King
9dfc8f84bc Fixed cgetc().
The GETIN function doesn't protect CPU registers.
2019-10-01 05:30:36 -04:00
Greg King
3cece61525 Added character codes to change between the two CBM fonts. 2019-10-01 04:16:44 -04:00
Greg King
d7ec817f0a Fixed a typo in the cx16 document. 2019-09-30 10:41:21 -04:00
Greg King
2546c6ba1c Put the C64 code into cx16/_scrsize.s.
(I forgot that SCREEN is an official jumptable function.
2019-09-28 01:38:16 -04:00