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

160 Commits

Author SHA1 Message Date
Oliver Schmidt
7521ae888a Marked Apple II EXEHDR segment as optional.
The docs say "Use -D __EXEHDR__=0 to omit the header." so it should work without generating a linker warning.
2018-02-02 14:46:57 +01:00
Oliver Schmidt
38049d22ba Provide symbole for RAM memory area.
The RAM memory area symbols are referred by the startup code. The 64k and 128k variant say "for assembler" so it may be not necessary to do that there. However given the "limited" state of documentation for the target I don't assign too much value to those statements.

Additionally it's unclear to me why two variants provide symbols for the ROM memory.
2018-01-31 14:53:31 +01:00
Oliver Schmidt
80b09ba9fc Significantly simplified recently added linker config files.
I just forgot about the 'start' segment attribute - which makes the scenario at hand dead easy.
2018-01-31 08:54:48 +01:00
Oliver Schmidt
855aceaba8 Added Apple II linker configs for programs including a hires screen.
The Apple II hires screen buffer is located at $2000 (and can't be moved). The usual way to get along with this is to load the cc65 program above the hires screen buffer at $4000. However, that means that it becomes difficult to make good use of the memory below the hires screen buffer. The simplest approach is to add that memory to the heap. But there are programs containing just lots of code and not much data. One could think of moving the code to the area below the hires screen after loading (like it is done with the code for the language card). But if the program is really large (and already contains code to be moved to the language card) it won't just fit into memory in the first place.

The alternative is to load the program at the usual $803 and have it "cover" the hires screen buffer. Of course the part of the program that actually "covers" the hires screen buffer mustn't contain anything necessary for the program. The downside of this approach is that the program file on disk contains 8kB that can't be used by the program. But instead of just containing zeros the program can as well contain a hires screen picture that can be displayed right after startup.

Now the user can have code loaded below the hires screen buffer by setting the code-name to LOWCODE. However, he needs to explicitly do so. Otherwise the memory below the hires screen is totally wasted.

Trivia: Allowing to do this hires screen buffer "covering" was the very reason to change tgi_init() to not clear the hires screen anymore.
2018-01-29 17:46:36 +01:00
Christian Groessler
356c73f2cf atari5200.cfg: fix formatting 2018-01-21 15:42:12 +01:00
Christian Groessler
643152fb38 Fix last change, put display list at beginning of ROM. 2018-01-21 15:40:22 +01:00
Christian Groessler
2ef6514e47 atari5200: put default display list into its own memory area
This avoids 1K boundary crossing of the display list. Fix for issue #560.
2018-01-19 15:18:43 +01:00
bauen1
aa34aed7dd
Fixed unused import and export of none.cfg and none/crt0.s 2018-01-04 22:27:39 +01:00
bauen1
cea8332084
Fixed none.cfg 2018-01-04 22:01:44 +01:00
bauen1
ef993f2fcf
none.cfg consistency changes 2018-01-04 21:29:58 +01:00
bauen1
884dfcf3c1
Fixed none.lib missing symbols 2018-01-04 12:22:42 +01:00
bauen1
98b2b2544d
Added crt0 to none.lib 2018-01-04 12:07:35 +01:00
Stefan
98e2b79ef4 Optimizing the stack size 2017-12-18 19:19:59 +01:00
Oliver Schmidt
bbbd4e4742
Merge pull request #553 from polluks/patch-1
Fixed memory config #551
2017-12-16 18:29:27 +00:00
Stefan
b4fe03e49f
Update c16.cfg 2017-12-16 02:36:31 +01:00
Stefan
afb758bd6c
Update c16-32k.cfg 2017-12-16 02:35:00 +01:00
Stefan
6452fbac89
Added new config #551 2017-12-16 01:04:05 +01:00
Stefan
41fab61253
Fixed memory config #551 2017-12-16 00:41:00 +01:00
Oliver Schmidt
3a6430b13d Merge pull request #494 from jedeoric/master
[telestrat] Adding some vars, adding getcwd management, changing ZP address and ZP length
2017-09-27 09:52:19 +02:00
jede
d4c6c995ba Correcting missing return line :/ 2017-09-24 11:57:52 +02:00
jede
fdd789edd8 correcting some return lines 2017-09-24 11:56:55 +02:00
jede
c640619db5 Add some bytes in ZP block in order to able to link with o65 files 2017-09-24 11:55:37 +02:00
Piotr Fusik
8e35a82c91 Fix regression of #pragma bss-name
Closes #409
2017-03-21 22:35:25 +01:00
Christian Groessler
a3d8829be9 Creativison changes.
This change includes some cleanups, removal of mainargs.s (game console
programs never have arguments), and a workaround for a problem I'm seeing.

The problem is that sometimes (in fact, more often than not) the clrscr()
call in testcode/lib/joy-test.c writes some garbage chars on the screen (most
often a "P"). Could be my hardware (I haven't seen it on MAME), but to
me the root cause is still unknown.
2017-03-17 21:42:51 +01:00
Christian Groessler
a5fba551d1 Merge remote-tracking branch 'upstream/master' into something_to_pull2 2017-02-13 21:38:38 +01:00
Oliver Schmidt
5bbf010029 Merge pull request #371 from jedeoric/master
Create an Oric Telestrat target library
2017-02-10 23:47:13 +01:00
jede
0e649f24ea Correcting some code from github comments 2017-02-01 23:58:33 +01:00
Christian Groessler
a08f905224 Cleanups for Creativision. 2017-02-01 20:09:03 +01:00
Christian Groessler
07f840f11c Merge remote-tracking branch 'upstream/master' into creativision 2017-02-01 18:15:05 +01:00
jede
b5fef66f37 Merge telemon24 and telemon30 into telestrat target.
Cleaning, and replace tab to spaces
Converting hex lowercase value into uppercase char.
Changing := and = when it was needed
2017-01-31 22:09:14 +01:00
jede
0f8fb4d79d Merge with current version 2017-01-29 22:39:51 +01:00
jede
d1b5a6632d Adding telemon30 and telemon24 primitives 2017-01-29 21:18:49 +01:00
Florent Flament
c1aac0de0e Add C support for Atari 2600 (VCS) 2017-01-13 21:12:22 +01:00
Marshall Ward
09495519c0 NES memory map amend (16k prg, 8k chr default)
The configuration file and runtime (crt0.s) provided for the default NES
ROM layout (2x16k PRG, 8k CHR) incorrectly added interrupts (IRQ1, IRQ2,
TIMERIRQ) which are not supported by the NES hardware.  For example, see
the NESdev wiki, which makes no reference to these interrupts.

    https://wiki.nesdev.com/w/index.php/CPU_memory_map

The VECTORS region was also incorrectly set to 0xFFF6, which would have
left the 0xFFF4 normally unspecified.  This did not result in any error,
however, since cc65 simply placed ROMV directly after ROM0 regardless of
start address.

(This layout may be due to a copy-and-paste from the PC-Engine
configuration, whose interrupt registers start at 0xFFF6, begins with
the three interrupts listed above, followed by NMI and START, and does
not end with a final IRQ interrupt.)

Despite the absence of any actual error, since START is still placed at
0xFFFC, this patch removes the nonexistent interrupts and also correctly
aligns the ROM0 and ROMV regions.  It also has the (admittedly very
minor) benefit of freeing up 6 additional bytes for ROM0.
2016-12-24 08:32:54 +11:00
Alex Thissen
601c6102e8 Fixed last linefeed and notation convention errors. 2016-09-13 22:02:37 +02:00
Alex Thissen
ef7e9db116 Changed __BLOCKSIZE__ to __BANK0BLOCKSIZE__.
Added __BANK1BLOCKSIZE__ which defaults to 0.
2016-09-11 22:26:52 +02:00
Christian Groessler
e2d14291b7 make BSS segment optional in atari-cassette.cfg 2016-05-25 01:29:00 +02:00
Greg King
7773fcb1e1 Converted the Atmos configuration to the new constructor segment model. 2016-03-18 11:28:56 -04:00
Oliver Schmidt
78dcb61cb8 Harmonized asm linker configs.
- All segments but CODE are optional and CODE is R/W. Both together allow to "just" write code/data without ever explicitly using a segment.

- Symbols are defined for the BSS. This allows to use/implement zerobss.

- The ZP memory area isn't artificially limited.
2016-03-17 21:51:20 +01:00
Oliver Schmidt
d5092d2d3f Consider the segment attributes 'define' and 'optional' mutually exclusive.
In normal situations it isn't too useful to define symbols for optional segments as those symbols can't be presumed to be always present.

I in fact suspect that most currently present combinations of 'define' and 'optional' aren't useful - apart form the overlay configurations of course.
2016-03-17 21:31:43 +01: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
3d6cbec6a1 Adjust linker config to match startup code.
Apply aaf90c1252 to the Supervision default configuration.
2016-03-16 16:00:09 +01:00
Oliver Schmidt
4270b8a96c Fixed segment properties.
The CBMx10 targets don't use the INIT segment in the startup code. So it may turn out to be not necessary at all for certain programs.

The CBMx10 targets don't need symbols for the ONCE segment. Likely their definition was a C&P error in the first place.
2016-03-15 22:55:39 +01:00
Oliver Schmidt
0edd05b4bf Removed symbol definition for ONCE.
Almost all targets don't need symbols for the ONCE segment. Likely their definition was a C&P error in the first place.
2016-03-15 22:55:34 +01:00
Oliver Schmidt
46d4307bbb Removed ONCE segment.
Pure assembler programs don't have constructors. Therefore constructor code ending up in an assembler program should trigger an error.
2016-03-15 22:55:32 +01:00
Oliver Schmidt
c768de156a Fixed INIT properties.
The main chunk load header references __BSS_LOAD__ so BSS must be the first bss type segment. Subsequent changes will move ONCE to share its address with the BSS. Then it'll be necessary to load INIT from disk. Therefore we do it right now.
2016-03-13 22:18:51 +01:00
Oliver Schmidt
692f96409d Fixed BSS properties.
The cassette boot file header references __BSS_RUN__ so BSS must be the first bss type segment (and for sure isn't optional).
2016-03-13 22:13:41 +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
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