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

380 Commits

Author SHA1 Message Date
Stefan
b449ded176
Update c64-hi.s 2018-05-09 23:56:35 +00:00
Stefan
b81a04f157
Update c64-hi.s 2018-05-09 23:52:52 +00:00
Stefan
cdce753a09
NMI friendly c64-hi
Don't clear all vectors, see #639.
2018-05-09 23:31:42 +00:00
Marco van den Heuvel
cdebf6baa7 Harmonized the comments (as in added 1 space) ;) 2018-05-03 09:11:20 -07:00
Marco van den Heuvel
e88ac62d06 Optimized the code a bit, thanks to Greg for the suggestions/comments. 2018-05-01 14:46:57 -07:00
Marco van den Heuvel
ad7b339c44 Added C64 Turbo Master accelerator code and documentation. 2018-04-30 14:30:35 -07:00
Marco van den Heuvel
5b4929ef98 Removed obsolete bit opcode. 2018-04-29 12:13:52 -07:00
Marco van den Heuvel
d0088fbc0f Fixed a wrong branch. 2018-04-28 13:26:20 -07:00
Marco van den Heuvel
a012fab090 Added a comment to make the situation more clear. 2018-04-28 13:25:16 -07:00
Marco van den Heuvel
11629bcf99 Added C65/C64DX accelerator code and documentation. 2018-04-27 14:22:41 -07:00
Oliver Schmidt
47e4b36180
Merge pull request #631 from blackystardust/master
Added C64 Chameleon accelerator code and documentation.
2018-04-27 20:47:03 +02:00
Marco van den Heuvel
97e69952c4 Removed extern keyword from function prototypes. 2018-04-27 09:16:25 -07:00
Marco van den Heuvel
1428015158 Optimized the code a bit as suggested by Greg. 2018-04-26 09:18:54 -07:00
Greg King
c92a3c5bd5 Improved the accelerator code. Fixed an infinite loop.
Removed the execute permissions from some files.
2018-04-26 05:46:34 -04:00
Marco van den Heuvel
f2e46f0fdf Added C64 Chameleon accelerator code and documentation. 2018-04-25 12:53:29 -07:00
Marco van den Heuvel
cc2bcb8a4d Changed c128 accelerator code and documention to include both C64 and C128 support. 2018-04-23 19:25:11 -07:00
Marco van den Heuvel
28f26991ac Updated c128 accelerator code and documentation. 2018-04-21 09:52:50 -07:00
Marco van den Heuvel
3f5683b391 Added C128 in C64 mode accelerator code and documentation. 2018-04-20 12:08:28 -07:00
Marco van den Heuvel
ef73310cce Fixed more comments. 2018-04-16 11:05:52 -07:00
Marco van den Heuvel
0aa2735d4e Fixed another comment. 2018-04-15 12:15:19 -07:00
Marco van den Heuvel
c5f15fa1d5 Fixed some comment and documentation errors. 2018-04-15 11:55:58 -07:00
Marco van den Heuvel
cb04bc5465 Fixed an issue with the changing the d040 value while detecting. 2018-04-14 11:31:28 -07:00
Marco van den Heuvel
6076316f38 Added c64dtv accelerator code and documentation. 2018-04-14 10:40:13 -07:00
Marco van den Heuvel
89c3ed6d7f Added C64/C128 SuperCPU accelerator functions and started on a generic framework for accelerators. 2018-04-09 19:36:53 -07:00
Greg King
b844572159 Moved most of the tgi_colors.s files into the libsrc/common/ directory.
Only the Apple2 and Lynx platforms use different codes for the white color; they have their own files.
2018-03-27 07:28:46 -04:00
Greg King
155f3ade41 C64 TGI: LINE: Optimization: Don't check boundaries; LINE always is called by tgi_clippedline().
Submitted in Pull Request #611 by Sven Michael Klose.
2018-03-26 07:28:01 -04:00
Bob Andrews
7e6942953c
Merge pull request #604 from blackystardust/master
Improved reu size detection.
2018-03-08 19:19:35 +01:00
mrdudz
3afbed48e0 tweak driver to no more use IRQ 2018-03-07 00:20:42 +01:00
Marco van den Heuvel
b783280577 Replaced reu commands with defined constants. 2018-03-05 17:46:51 -08:00
Marco van den Heuvel
40e93dd931 Improved reu size detection. 2018-03-05 15:01:55 -08:00
Oliver Schmidt
dacee3b9ed Removed IRQ support from TGI drivers.
All but one TGI drivers didn't use IRQs. Especially when the TGI driver kernel was the only .interruptor this meant quite some unnecessary overhead because it pulled in the whole IRQ infrastructure.

The one driver using IRQs (the graphics driver for the 160x102x16 mode on the Lynx) now uses a library reference to set up a JMP to its IRQ handler.
2018-02-02 18:15:45 +01:00
Oliver Schmidt
1976d6cd32 Removed IRQ support from joystick drivers.
All but one joystick drivers didn't use IRQs. Espsecially when the joystick driver kernel was the only .interruptor this meant quite some unnecessary overhead because it pulled in the whole IRQ infrastructure.

I was told that the one driver using IRQs (the DXS/HIT-4 Player joystick driver for the C64) can be reworked to not do it. Until this is done that driver is defunct.
2018-02-01 22:38:36 +01:00
mrdudz
783408080c convert to petscii 2017-12-28 17:52:27 +01:00
mrdudz
f207a60365 some cleanup 2017-12-28 02:26:23 +01:00
mrdudz
0543ecabe2 added peek functions for soft80 2017-12-28 01:58:03 +01:00
Oliver Schmidt
4aa19494f5 Removed dysfunctional kbrepeatdelay() and kbrepeatrate().
As discussed in https://github.com/cc65/cc65/pull/452 after my premature merge the two functions in question don't work as expected.

Additionally I adjusted several style deviations in the pull request in question.
2017-08-30 16:37:59 +02:00
Oliver Schmidt
20c85c8a1c Minor style adjustment. 2017-08-20 17:17:38 +02:00
Oliver Schmidt
a817da7c6b Adjusted to recent driver interface change.
Please note that this change is absolutely untested!
2017-08-20 17:17:37 +02:00
Oliver Schmidt
b5a4e5667a Merge pull request #452 from mrdudz/kbrepeat
kbrepeatdelay and kbrepeatrate for cbm targets
2017-08-20 14:15:37 +02:00
Oliver Schmidt
7f52a770d9 Removed joy_masks array.
So far the joy_masks array allowed several joystick drivers for a single target to each have different joy_read return values. However this meant that every call to joy_read implied an additional joy_masks lookup to post-process the return value.

Given that almost all targets only come with a single joystick driver this seems an inappropriate overhead. Therefore now the target header files contain constants matching the return value of the joy_read of the joystick driver(s) on that target.

If there indeed are several joystick drivers for a single target they must agree on a common return value for joy_read. In some cases this was alredy the case as there's a "natural" return value for joy_read. However a few joystick drivers need to be adjusted. This may cause some overhead inside the driver. But that is for sure smaller than the overhead introduced by the joy_masks lookup before.

!!! ToDo !!!

The following three joystick drivers become broken with this commit and need to be adjusted:
- atrmj8.s
- c64-numpad.s
- vic20-stdjoy.s
2017-08-19 19:11:28 +02:00
Bob Andrews
5dcebbccb6 Merge branch 'master' into kbrepeat 2017-08-06 20:22:52 +02:00
Oliver Schmidt
6002e59c28 Merge pull request #453 from mrdudz/waitvsync
waitvblank for cbm targets
2017-07-18 15:38:27 +02:00
mrdudz
8eee51913a add headers/fix formatting 2017-07-18 01:04:53 +02:00
mrdudz
1abce3a2a1 rename all waitvblank() to waitvsync() 2017-07-17 23:15:05 +02:00
mrdudz
49aad01bf1 dont trash akku if possible, use VDC register when in 80column mode 2017-06-21 23:18:00 +02:00
mrdudz
a42feca228 fixed some stuff, compiles again :) 2017-06-17 02:37:34 +02:00
mrdudz
035621aa95 fixed code a bit so it compiles again :) 2017-06-17 02:26:54 +02:00
Christian Groessler
8a81f9c0c8 Fix line endings (CRLF -> LF) on all affected files. 2017-03-10 11:21:14 +01:00
Greg King
54ff808c2c Added a way to show the default mouse pointer on C64 TGI (graphics) screens. 2017-01-18 16:05:47 -05: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
a3a22733f8 Cleaned up C64 linker configs.
The BSS segment and the ONCE segment share the same start address. So they need to be placed in two different memory areas.

So far BSS was placed in the MAIN memory area and ONCE was placed in an additional memory area. Both memory areas were written to the output file. They just "happened" to be loadable and runnable at a stretch.

Now ONCE is placed in the MAIN memory area and BSS is placed in an additional memory area. Only MAIN is written to the output file. It becomes more obvious that BSS is "just" defined to share memory with ONCE.
2016-03-13 14:32:07 +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
mrdudz
1d877494bf initial commit from c64-rrr-1.0 2016-02-28 23:37:04 +01:00
mrdudz
eb96a90e5f initial import from old sources 2016-02-28 22:35:46 +01:00
mrdudz
85760e0c53 initial import from old sources 2016-02-28 22:13:05 +01:00
Oliver Schmidt
3d08abcfa8 Load INITBSS segment from disk.
Conceptually the INITBSS segment is not initialized in any way. Therefore it makes sense to not load it from disk. However the INIT segment has to be loaded from disk and therefore moved to its run location above the INITBSS segment. The necessary move routine increases runtime RAM usage :-(

Therefore we now "unnecessarily" load the INITBSS segment from disk too meaning that the INIT segment is loaded at its run location. Therefore there's no need for the move routine anymore.

After all we trade disk space for (runtime) RAM space - an easy decision ;-)

Notes:

- The code allowing to re-run a program without re-load present so far could not have worked as far as I can see as it only avoided to re-run the move routine but still tried to re-run the code in the INIT segment that was clobbered by zeroing the BSS. Therefore I removed the code in question altogether. I'm personally not into this "dirty re-run" but if someone wants to add an actually working solution I won't block that.

- INITBSS is intentionally not just merged with the DATA segment as ROM-based targets can't reuse the INIT segment for the BSS and therefore have no reason to place the INIT segment above INITBSS.

- Because ROM-based targets don't copy INITBSS from the ROM (like it is done with the DATA segment) all users of INITBSS _MUST_NOT_ presume INITBSS to be initialized with zeros!
2016-02-28 19:45:36 +01:00
silverdr
2bcdf32458 blackystardust pull request with post-review changes 2016-02-26 23:55:55 +01:00
Oliver Schmidt
377f31d085 Fixed soft80 shutdown.
A call to $FDA3 cannot be used because it re-enables the BASIC ROM. If a large program (such as Contiki's webbrowser80) has destructor code or data "behind" that ROM, then the program might crash when it tries to quit gracefully. Changing that code to set CIA2_PRA works well enough.
2015-12-02 21:34:08 +01:00
mrdudz
4a49b0c8f8 reset screen editor at shutdown 2015-11-22 19:20:58 +01:00
mrdudz
54de8ac031 remove unneeded exports 2015-11-07 11:45:38 +01:00
mrdudz
60334c40e6 added size optimized monochrom soft80 driver 2015-10-19 02:49:32 +02:00
mrdudz
d6d016bb80 updated comments 2015-10-19 02:47:40 +02:00
mrdudz
8263083506 move variables into INITBSS 2015-10-15 15:11:05 +02:00
mrdudz
63d4c93006 Merge remote-tracking branch 'upstream/master' into soft80 2015-10-15 15:07:44 +02:00
Oliver Schmidt
0ee9b2e446 Changed run location of INIT segment.
So far the INIT segment was run from the later heap+stack. Now the INIT segment is run from the later BSS. The background is that so far the INIT segment was pretty small (from $80 to $180 bytes). But upcoming changes will increase the INIT segment in certain scenarios up to ~ $1000 bytes. So programs with very limited heap+stack might just not been able to move the INIT segment to its run location. But moving the INIT segment to the later BSS allows it to occupy the later BSS+heap+stack.

In order to allow that the constructors are _NOT_ allowed anymore to access the BSS. Rather they must use the DATA segment or the new INITBSS 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.
2015-10-14 22:52:09 +02:00
mrdudz
b9c688d997 remove deleted function from comment 2015-10-14 17:52:14 +02:00
mrdudz
e6f5c7d8da some comments 2015-10-14 17:50:44 +02:00
mrdudz
f391c1c3d5 remove soft80_bordercolor override 2015-10-14 17:33:58 +02:00
mrdudz
59dd15aa55 split regular color.s into color.s and bordercolor.s 2015-10-14 17:25:35 +02:00
mrdudz
c708031374 use 'soft80_internal_cellcolor' for the current cell color, and CHARCOLOR for the actual textcolor 2015-10-14 17:24:16 +02:00
Oliver Schmidt
8f67dd5cc7 Merge pull request #215 from greg-king5/c64-init
Save space by using the apple2 target's INIT overlay scheme on the c64 target.
2015-10-14 10:43:11 +02:00
mrdudz
08d7eefdd7 another size optimization, make bgcolor() much more robust 2015-10-13 04:14:04 +02:00
mrdudz
f462c173fb move some stuff to init segment, saves roughly 1480 bytes :) 2015-10-12 23:39:47 +02:00
mrdudz
362a172477 remove chline/cvline dupes 2015-10-12 21:23:27 +02:00
mrdudz
d6f48629ad export mouse driver related symbols 2015-10-12 21:02:48 +02:00
mrdudz
5840d1c08c increase conio constructor priority 2015-10-12 20:46:53 +02:00
mrdudz
df3549f502 Merge remote-tracking branch 'upstream/master' into soft80 2015-10-12 20:43:19 +02:00
mrdudz
57a43b6735 style issues 2015-10-12 20:38:06 +02:00
Oliver Schmidt
08efc299ff Allow to override mouse sprite location data. 2015-10-12 20:18:13 +02:00
mrdudz
e9f0b7943e some renaming, preparing plot table names 2015-10-12 19:57:33 +02:00
mrdudz
bf3ea5328f inverted result for checkchar, saving some bytes and cycles 2015-10-12 19:03:50 +02:00
mrdudz
4557e8d004 optimize charcode conversion, shorter and faster now :) 2015-10-12 18:53:55 +02:00
mrdudz
aed0549760 remove some commented out code 2015-10-12 18:09:50 +02:00
mrdudz
ead9950044 some code shuffling to get rid of long branches 2015-10-12 18:01:48 +02:00
mrdudz
cf8b21b27e size optimization 2015-10-12 17:12:44 +02:00
mrdudz
bc85d90468 check for space bottom up, which is faster for the average case 2015-10-12 16:15:40 +02:00
mrdudz
a2b514a7cf fix some style issues 2015-10-12 15:54:08 +02:00
mrdudz
21732e3c5b maintain lsb of cursor x position internally, saves some bytes and some cycles too :) 2015-10-12 15:44:41 +02:00
mrdudz
2a0f6c420b moved bordercolor function into a seperate file 2015-10-12 15:18:36 +02:00
mrdudz
7f2df8e8e6 move internal text/bgcolor variables into the file that also contains the init code for them. also rename them to avoid namespace pollution 2015-10-12 15:04:55 +02:00
mrdudz
07f1879f85 added some more comments and -headers 2015-10-12 14:40:12 +02:00
mrdudz
d8d7f53d1b move charset to seperate file again, added comments on charset layout 2015-10-11 17:13:28 +02:00
mrdudz
03c6af3e15 rewrote color voodoo 2015-10-09 23:39:37 +02:00
Oliver Schmidt
326da85145 Consistently place constructors (and their exclusive subroutines) in "INIT". 2015-10-09 21:44:20 +02:00
Oliver Schmidt
575f859a03 Keep low level VIC sprite stuff out of user code. 2015-10-09 18:33:35 +02:00
Greg King
8c609dd931 Explained why two variables were moved out of the BSS segment. 2015-10-09 12:00:41 -04:00
mrdudz
0b9d67d8a8 use default prio for the constructor 2015-10-09 13:40:10 +02:00
mrdudz
f712e9448a some cleanup/rework 2015-10-09 13:34:23 +02:00
mrdudz
e54ad81ce8 some more rework, second attempt on fixing the color issues. added ifdefs to disable the color voodoo alltogether for debugging purposes. 2015-10-08 20:43:25 +02:00
Greg King
ca70700a0b Restored the old C-stack initiation code.
I had forgotten that the stack must be put below the CBM overlays.
2015-10-08 06:04:49 -04:00