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

2432 Commits

Author SHA1 Message Date
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
346d88a6a7 Add issues from pull request #307. 2016-06-07 12:07:38 +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
89329f1519 Merge pull request #287 from silverdr/target_goodies
moved output of target utils and drivers to separate directory
2016-06-01 11:01:56 +02:00
Oliver Schmidt
f1a052f259 Merge pull request #303 from groessler/something_to_pull
Atari: get current drive on XDOS
2016-05-31 12:47:11 +02:00
Christian Groessler
0114a850d9 Atari, getdefdev.s: use mnemonics for 'crvec'. 2016-05-31 12:24:21 +02:00
Christian Groessler
4d02d47832 Use atexit() to wait for key press at program ternination.
Idea by polluks.
2016-05-31 10:38:02 +02:00
Christian Groessler
c1f17e9c18 Atari: make __getdefdev function ROM-friendly 2016-05-31 09:28:53 +02:00
Christian Groessler
9523fa2d33 Atari: get current drive on XDOS 2016-05-31 07:37:58 +02:00
Patrycjusz R. Łogiewa
4dcfc036c8 samples zip and install targets moved into samples/Makefile as agreed 2016-05-30 17:42:01 +02:00
Oliver Schmidt
b979fb5763 Minor adjustment to recent change. 2016-05-30 14:31:53 +02:00
Christian Groessler
a6c306500a Small optimization in apple2 exec.s. 2016-05-30 14:16:37 +02:00
Patrycjusz R. Łogiewa
e36a636eee Indenting optimised 2016-05-29 16:34:22 +02:00
Patrycjusz R. Łogiewa
ac5bb6707d Post-review changes 2016-05-29 16:19:03 +02:00
Christian Groessler
b3d7c09ba1 forgot to add the new file atari/is_cmdline_dos.s in my last commit... 2016-05-25 01:06:53 +02:00
Christian Groessler
da65866e24 Atari: add new function '_is_cmdline_dos()' and some other small changes.
- use this function instead of directly looking at _dos_type in the included
  targetutil and test programs
- fixes/improvements to the Atari runtime library regarding the recently
  changed _dos_type values
- libsrc/atari/targetutil/w2cas.c: exit if no filename was entered
- add documentation for the new function
2016-05-25 00:57:43 +02:00
Christian Groessler
6d7dfad80b add support for XDOS command lines 2016-05-24 03:06:00 +02:00
Patrycjusz R. Łogiewa
cc747946b2 removed variable usage 2016-05-16 22:35:24 +02:00
Patrycjusz R. Łogiewa
37f9929094 adapted for zip/install targets 2016-05-16 22:14:05 +02:00
Patrycjusz R. Łogiewa
ba10c74a7a directory structure changed from driver-centric to target-centric 2016-05-16 19:49:43 +02:00
OzHawk
1369bed881 Update kernal.s 2016-05-16 08:41:13 +09:30
Patrycjusz R. Łogiewa
93f55c274b moved output of target utils and drivers to separate directory 2016-05-13 14:28:58 +02:00
OzHawk
8bd2628d1e Update the missing entries in the kernel jump table for the Vic20 with the actual function addresses.
The Vic20 does not have kernal table entries for the following functions.

;-----------------------------------------------------------------------------
; Functions which are not in the kernal jump table for VIC-20 but are for C64

CINT        := $E518
IOINIT      := $FDF9
RAMTAS      := $FD8D

All other kernal entries are the same as the C64, however, without this change, the startup code fails.

Without this change the vic20.lib builds incorrectly.
2016-05-11 19:24:16 +09:30
Oliver Schmidt
f103617512 Use .macpack to include macro package. 2016-03-27 18:29:45 +02:00
Oliver Schmidt
e92f354740 Made use of recently added Apple scrcode macro. 2016-03-27 18:27:53 +02:00
Oliver Schmidt
c0e82f4200 Merge pull request #279 from greg-king5/atmos-reconfig
Convert the Atmos configuration to the new constructor segment model.
2016-03-27 00:36:05 +01:00
Oliver Schmidt
29d1400340 Allow _sys() to call ROM routines.
_sys() is supposed to be (primarily) intended to call ROM routines. Leveraging the "file overlay" mechanism of the cc65 build system allows to provide a Apple II specific _sys() implementation that temporarily switches in the ROM.
2016-03-25 21:57:06 +01:00
Greg King
7773fcb1e1 Converted the Atmos configuration to the new constructor segment model. 2016-03-18 11:28:56 -04:00
Oliver Schmidt
e3cbc7e8b8 Moved run location of ONCE segment.
Make the same changes to the Apple II that were done with 0ee9b2e446 to the C64.

Notes:
- The startup code deliberately doesn't make use of symbols defined for the LC segment as that segment is optional.
- The <...>-asm.cfg configs move the segment BSS to an own memory area BSS although this doesn't seem necessary. However the benefit is that the size of the memeory area MAIN is identical to the number of bytes loaded from disk into RAM. To keep this an invariant for all Apple II configs allows to simplify the EXEHDR to just refer to the symbols defined for MAIN.
2016-03-17 21:07:19 +01: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
a2c9cb021a Moved things into ONCE.
Code and or data used only during initialization belongs into the ONCE segment.
2016-03-15 22:55:36 +01:00
Oliver Schmidt
56a8c69b14 Use AX paradigm. 2016-03-13 21:23:45 +01: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
084453ba57 Don't presume the stack size to be a multiple of pages. 2016-03-10 10:07:09 +01:00
Oliver Schmidt
69fbcb30fd Use AX paradigm for stack initalization. 2016-03-07 01:44:19 +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
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
Bob Andrews
25f4482641 Merge pull request #238 from mrdudz/gamate
Bit Corporation 'Gamate' support
2016-02-27 18:44:26 +01:00
Bob Andrews
3f72e59e93 Merge pull request #241 from blackystardust/c128-function-ram-emd
C128 function ram emd
2016-02-27 18:08:55 +01:00
silverdr
2bcdf32458 blackystardust pull request with post-review changes 2016-02-26 23:55:55 +01:00
Lauri Kasanen
a954e713ad nes: Fix reading the second controller
See
http://wiki.nesdev.com/w/index.php/Controller_port_registers
2015-12-14 19:28:53 +02: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
Marco van den Heuvel
433eeb1bc7 Renamed MMU_CFG_INT_FROM -> MMU_CFG_IFROM and MMU_CFG_EXT_FROM -> MMU_CFG_EFROM 2015-12-02 00:30:30 -08:00
Marco van den Heuvel
7cd80e7450 optimized the sei/cli pairing a bit. 2015-12-02 00:21:55 -08:00
Marco van den Heuvel
f55505820a optimized the sei/cli pairing a bit for internal function ram emd as well. 2015-12-02 00:17:29 -08:00