It doesn't make sense to check for Arg[3] == '\0' _before_ checking Arg[2] != '\0'. This made the Win32 builds fail to correctly parse e.g. cl65 -W unused-var test.c
Greg King [Thu, 27 Aug 2015 08:02:26 +0000 (04:02 -0400)]
Fixed bugs in the geos-cbm DIO sector-number converter functions.
* The 16-bit comparison code actually didn't compare the high byte.
* This implementation supports only the 1541, 1571, and 1581; but, it didn't exclude the other drive types that GEOS supports.
* Two error code numbers were swapped.
* A 1571 converter didn't catch sector numbers that are too high.
* A 1581 converter didn't catch sector numbers that are too high.
Oliver Schmidt [Sat, 10 Feb 2018 10:29:50 +0000 (11:29 +0100)]
Reduced default stack size to a reasonable value.
The unexpanded Creativision has only $206 bytes of RAM available to cc65 programs. So it's a bad idea(tm) to reserve $180 bytes for the software stack. $40 bytes seems a much better default (aka guess).
Greg King [Tue, 6 Feb 2018 13:52:36 +0000 (08:52 -0500)]
Normalized the definitions of structs in <supervision.h>.
The change matches the way that I/O register structures are defined in other headers. The names are defined as "struct", instead of as "pointer to struct".
Oliver Schmidt [Fri, 2 Feb 2018 17:15:45 +0000 (18:15 +0100)]
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.
Oliver Schmidt [Fri, 2 Feb 2018 11:59:05 +0000 (12:59 +0100)]
Factored out target specific inclusion of target header.
So far conio.h included the target header to get the CH_... and COLOR_... macros. However tgi.h never did the same to get the TGI_COLOR_... macros. And some time ago the JOY_..._MASK macros moved from joystick.h into the target header yet joystick.h didn't include the target header.
Why wasn't that issue detected so far? Because about every program using TGI and/or the joystick uses CONIO too and therefore includes the target header that way.
However, conceptually it's clean to factor out the target header inclusion and have tgi.h and joystick.h do it like conio.h.
Apart from that user code may make direct use of target.h too.
Oliver Schmidt [Thu, 1 Feb 2018 21:38:36 +0000 (22:38 +0100)]
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.
Oliver Schmidt [Wed, 31 Jan 2018 14:06:37 +0000 (15:06 +0100)]
Adjust alternative ProDOS 8 I/O buffer allocation module to linker configs.
The Apple II linker configs don't define symbols for the STARTP segment anymore. There refer to the load/start address in the same way the executable file header does.
Oliver Schmidt [Wed, 31 Jan 2018 13:53:31 +0000 (14:53 +0100)]
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.
Oliver Schmidt [Mon, 29 Jan 2018 16:46:36 +0000 (17:46 +0100)]
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.
Greg King [Mon, 8 Jan 2018 17:47:00 +0000 (12:47 -0500)]
Changed the type of a compiler variable that holds either integers or pointers.
The change allows cc65 to be compiled on 64-bit Windows, without getting warnings. That OS is actually 32 bits with 64-bit pointers. Its pointers are "long long" instead of "long". The change uses type-names that are configured for the actual pointer width.